/* Integration Collective — Job Checklist (scoped under .checklist-page) */

.checklist-page .cl-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

/* Offline banner */
.checklist-page .cl-offline-banner {
    display: none;
    background: #fef3c7;
    color: #92400e;
    text-align: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 100;
}

.checklist-page .cl-offline-banner.visible {
    display: block;
}

/* Header */
.checklist-page .cl-header {
    text-align: center;
    padding: 28px 16px 24px;
    background: #1a1a1a;
    border-radius: 12px;
    border: 2px solid #2563EB;
    margin-bottom: 24px;
}

.checklist-page .cl-header-logo {
    font-size: 11px;
    color: #2563EB;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.checklist-page .cl-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.checklist-page .cl-header p {
    color: #999;
    font-size: 13px;
}

/* Step indicator */
.checklist-page .cl-steps {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    justify-content: center;
}

.checklist-page .cl-step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e2e8f0;
    transition: background 0.3s;
}

.checklist-page .cl-step-dot.active {
    background: #2563EB;
}

.checklist-page .cl-step-dot.done {
    background: #10b981;
}

/* Views */
.checklist-page .cl-view {
    display: none;
}

.checklist-page .cl-view.active {
    display: block;
}

/* Form card */
.checklist-page .cl-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.checklist-page .cl-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
}

.checklist-page .cl-field {
    margin-bottom: 14px;
}

.checklist-page .cl-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.checklist-page .cl-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}

.checklist-page .cl-input:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.checklist-page .cl-input::placeholder {
    color: #94a3b8;
}

.checklist-page select.cl-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6l3.5 4 3.5-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Template option cards */
.checklist-page .cl-template-options {
    display: grid;
    gap: 10px;
}

.checklist-page .cl-template-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.checklist-page .cl-template-opt:hover,
.checklist-page .cl-template-opt:active {
    border-color: #2563EB;
}

.checklist-page .cl-template-opt.selected {
    border-color: #2563EB;
    background: rgba(37, 99, 235, 0.04);
}

.checklist-page .cl-template-opt .cl-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.checklist-page .cl-template-opt.selected .cl-radio {
    border-color: #2563EB;
    background: #2563EB;
}

.checklist-page .cl-template-opt.selected .cl-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}

.checklist-page .cl-template-opt-info {
    flex: 1;
}

.checklist-page .cl-template-opt-name {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.checklist-page .cl-template-opt-desc {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

/* Primary button */
.checklist-page .cl-btn {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.checklist-page .cl-btn-primary {
    background: #2563EB;
    color: #fff;
}

.checklist-page .cl-btn-primary:hover {
    background: #1d4ed8;
}

.checklist-page .cl-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checklist-page .cl-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    margin-top: 10px;
}

.checklist-page .cl-btn-secondary:hover {
    background: #e2e8f0;
}

/* Progress bar */
.checklist-page .cl-progress-wrap {
    position: sticky;
    top: 0;
    z-index: 99;
    background: #f8fafc;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 16px;
}

.checklist-page .cl-progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.checklist-page .cl-progress-fill {
    height: 100%;
    background: #2563EB;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.checklist-page .cl-progress-fill.complete {
    background: #10b981;
}

.checklist-page .cl-progress-text {
    font-size: 12px;
    color: #64748b;
    text-align: center;
    font-weight: 600;
}

/* Category accordion */
.checklist-page .cl-category {
    margin-bottom: 12px;
}

.checklist-page .cl-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s;
}

.checklist-page .cl-cat-header:active {
    background: #f8fafc;
}

.checklist-page .cl-cat-header.all-done {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.04);
}

.checklist-page .cl-cat-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.checklist-page .cl-cat-count {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
}

.checklist-page .cl-cat-count.done {
    color: #10b981;
}

.checklist-page .cl-cat-arrow {
    color: #94a3b8;
    transition: transform 0.2s;
    font-size: 14px;
}

.checklist-page .cl-cat-header.open .cl-cat-arrow {
    transform: rotate(180deg);
}

.checklist-page .cl-cat-items {
    display: none;
    padding: 8px 0;
}

.checklist-page .cl-cat-items.open {
    display: block;
}

/* Checklist item */
.checklist-page .cl-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.checklist-page .cl-item.checked {
    background: rgba(16, 185, 129, 0.04);
    border-color: #a7f3d0;
}

.checklist-page .cl-checkbox {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 2px solid #cbd5e1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-top: 1px;
}

.checklist-page .cl-item.checked .cl-checkbox {
    background: #10b981;
    border-color: #10b981;
}

.checklist-page .cl-checkbox-mark {
    display: none;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.checklist-page .cl-item.checked .cl-checkbox-mark {
    display: block;
}

.checklist-page .cl-item-body {
    flex: 1;
    min-width: 0;
}

.checklist-page .cl-item-text {
    font-size: 14px;
    color: #0f172a;
    line-height: 1.4;
}

.checklist-page .cl-item.checked .cl-item-text {
    color: #64748b;
}

.checklist-page .cl-item-req {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #dc2626;
    background: #fef2f2;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.checklist-page .cl-item.checked .cl-item-req {
    opacity: 0.4;
}

/* Note toggle */
.checklist-page .cl-note-toggle {
    font-size: 12px;
    color: #2563EB;
    background: none;
    border: none;
    padding: 4px 0;
    cursor: pointer;
    font-weight: 600;
    margin-top: 4px;
}

.checklist-page .cl-note-input {
    width: 100%;
    margin-top: 6px;
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    resize: vertical;
    min-height: 60px;
}

.checklist-page .cl-note-input:focus {
    outline: none;
    border-color: #2563EB;
}

/* Review summary */
.checklist-page .cl-review-cat {
    margin-bottom: 16px;
}

.checklist-page .cl-review-cat-title {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.checklist-page .cl-review-item {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 13px;
    align-items: flex-start;
}

.checklist-page .cl-review-item.pass {
    background: rgba(16, 185, 129, 0.06);
    color: #065f46;
}

.checklist-page .cl-review-item.fail {
    background: rgba(239, 68, 68, 0.06);
    color: #991b1b;
}

.checklist-page .cl-review-icon {
    flex-shrink: 0;
    font-size: 14px;
    margin-top: 1px;
}

.checklist-page .cl-review-note {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Warning */
.checklist-page .cl-warning {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #991b1b;
    font-weight: 600;
}

/* Success screen */
.checklist-page .cl-success {
    text-align: center;
    padding: 40px 20px;
}

.checklist-page .cl-success-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.checklist-page .cl-success h2 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.checklist-page .cl-success p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 24px;
}

/* Resume draft banner */
.checklist-page .cl-draft-banner {
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.checklist-page .cl-draft-banner-text {
    font-size: 13px;
    color: #1e40af;
    font-weight: 600;
}

.checklist-page .cl-draft-banner-actions {
    display: flex;
    gap: 8px;
}

.checklist-page .cl-draft-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.checklist-page .cl-draft-btn-resume {
    background: #2563EB;
    color: #fff;
}

.checklist-page .cl-draft-btn-discard {
    background: #e2e8f0;
    color: #475569;
}

/* Page background */
.checklist-page {
    background: #f8fafc;
    min-height: 100dvh;
    padding-bottom: 1px;
}

/* Responsive — already mobile-first, add desktop guard */
@media (min-width: 540px) {
    .checklist-page .cl-container {
        padding: 0 20px;
        padding-bottom: 80px;
    }
}
