/* Interaction states */

.sidebar-navigation a:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.sidebar-navigation a.up-current,
.sidebar-navigation a[aria-current="page"] {
    background: var(--surface-2);
    color: var(--gold-light);
    border-left-color: var(--gold);
}

.sidebar-navigation a:focus-visible,
.button:focus-visible,
.user-menu-button:focus-visible,
.user-menu a:focus-visible,
.user-menu button:focus-visible {
    outline: 3px solid rgba(233, 185, 73, 0.45);
    outline-offset: 2px;
}

.navbar-brand a:focus-visible,
.pagination a:focus-visible,
.auth-links a:focus-visible {
    outline: 3px solid rgba(233, 185, 73, 0.45);
    outline-offset: 2px;
    border-radius: 4px;
}

.card:hover {
    border-color: var(--border-strong);
}

.button:hover {
    border-color: var(--gold);
    color: var(--gold-light);
    background: rgba(233, 185, 73, 0.06);
}

.button-primary:hover {
    border-color: transparent;
    color: var(--gold-ink);
    background: linear-gradient(150deg, var(--gold-light), var(--gold) 60%);
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(233, 185, 73, 0.22);
}

.button:active {
    transform: translateY(0);
}

.button:disabled,
.button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.user-menu-button:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
}

.user-menu a:hover,
.user-menu button:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.pagination a:not(.button) {
    color: var(--gold-light);
    font-weight: 600;
}

.pagination a:not(.button):hover {
    color: var(--gold);
    text-decoration: underline;
}


/* Messages */

.message {
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    font-size: 12px;
    line-height: 1;
}

.message-success {
    border-color: var(--success-border);
    background: var(--success-bg);
    color: #a7f3d0;
}

.message-success .message-icon {
    background: rgba(52, 211, 153, 0.18);
    color: var(--success);
}

.message-error {
    border-color: var(--danger-border);
    background: var(--danger-bg);
    color: #fecaca;
}

.message-error .message-icon {
    background: rgba(248, 113, 113, 0.18);
    color: var(--danger);
}

.message-warning {
    border-color: var(--warning-border);
    background: var(--warning-bg);
    color: var(--gold-light);
}

.message-warning .message-icon {
    background: rgba(233, 185, 73, 0.2);
    color: var(--gold);
}

.message-info {
    border-color: var(--info-border);
    background: var(--info-bg);
    color: #bfdbfe;
}

.message-info .message-icon {
    background: rgba(96, 165, 250, 0.18);
    color: var(--info);
}


/* Badges */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 0.3px;
}


/* Optional badge states */

.badge-success {
    border-color: var(--success-border);
    background: var(--success-bg);
    color: var(--success);
}

.badge-warning {
    border-color: var(--warning-border);
    background: var(--warning-bg);
    color: var(--gold-light);
}

.badge-danger {
    border-color: var(--danger-border);
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-info {
    border-color: var(--info-border);
    background: var(--info-bg);
    color: var(--info);
}


/* ============================================================
   ADDITIONS FOR THE REBUILT TEMPLATES
   ============================================================ */

/* Page eyebrow */

.page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.auth-header .page-eyebrow {
    margin-bottom: 10px;
}

/* Page header with an action on the right */

.page-header-split {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.page-header-split .button {
    flex-shrink: 0;
}


/* Dashboard grid: cards sit in a grid, so no extra bottom margin */

.dashboard-grid {
    margin-bottom: 20px;
}

.dashboard-grid .card {
    margin-bottom: 0;
}


/* Card heading with icon chip */

.card-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.card-heading h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.card-heading p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.card-heading-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--gold);
    font-size: 17px;
}

.card-heading:has(> div) {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.card-body > .button {
    margin-top: 6px;
}


/* Detail rows */

.detail-list {
    width: 100%;
}

.detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 48px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
    border-bottom: 0;
}

.detail-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.detail-label i {
    font-size: 14px;
}

.detail-value {
    max-width: 65%;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
}

.detail-block {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.detail-block:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.detail-block .detail-label {
    display: block;
    margin-bottom: 6px;
}

.detail-text {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-line;
    overflow-wrap: anywhere;
}


/* Profile hero */

.profile-hero {
    display: flex;
    align-items: center;
    gap: 22px;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    flex: 0 0 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-strong);
    box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px rgba(233, 185, 73, 0.55);
}

.profile-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(150deg, var(--gold-light), var(--gold-dark));
    color: var(--gold-ink);
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
}

.profile-hero-info {
    min-width: 0;
}

.profile-hero-info h2 {
    margin: 0 0 3px;
    font-size: 22px;
}

.profile-hero-info p {
    margin: 0 0 10px;
}

.profile-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


/* Forms: grid, checkboxes, files */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 20px;
}

.form-grid .form-group {
    min-width: 0;
}

.form-field-full {
    grid-column: 1 / -1;
}

.field-help {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto;
    margin-right: 8px;
    padding: 0;
    accent-color: var(--gold);
}

.form-group input[type="file"] {
    padding: 10px;
}

.form-group input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 6px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.form-group a {
    color: var(--gold-light);
    font-weight: 600;
}

.form-errors p {
    margin: 0;
    color: var(--danger);
    font-size: 13px;
}

.form-errors ul {
    margin: 0;
    padding-left: 18px;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-bottom: 20px;
}


/* Social accounts */

.social-form {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
}

.social-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.social-field {
    min-width: 0;
}

.social-field label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
}

.social-field input,
.social-field select {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.social-field input:focus,
.social-field select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(233, 185, 73, 0.16);
}

.social-form-options {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 14px;
}

.checkbox-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.checkbox-field input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: var(--gold);
}

.checkbox-field label {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}


/* Sidebar icons and section title */

.sidebar-section-title {
    margin: 0 0 8px;
    padding: 0 12px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.sidebar-navigation a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-icon {
    width: 22px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1;
    transition: color 0.18s ease;
}

.sidebar-navigation a:hover .nav-icon {
    color: var(--gold-light);
}

.sidebar-navigation a.up-current .nav-icon,
.sidebar-navigation a[aria-current="page"] .nav-icon {
    color: var(--gold);
}


/* User menu */

.user-avatar {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(150deg, var(--gold-light), var(--gold-dark));
    color: var(--gold-ink);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 0 0 2px var(--bg-alt), 0 0 0 3px rgba(233, 185, 73, 0.55);
}

.user-menu-chevron {
    color: var(--text-muted);
    font-size: 11px;
}

.user-menu a,
.user-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-menu a i,
.user-menu button i {
    color: var(--text-muted);
    font-size: 15px;
}

.user-menu-header {
    display: flex;
    flex-direction: column;
    padding: 8px 12px 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.user-menu-header strong {
    font-size: 13px;
    color: var(--text-primary);
}

.user-menu-header span {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.user-menu-divider {
    height: 1px;
    margin: 6px 0;
    background: var(--border);
}

.user-menu form button:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.user-menu form button:hover i {
    color: var(--danger);
}


/* Empty state icon */

.empty-state-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--gold);
    font-size: 23px;
}

.empty-state p {
    max-width: 450px;
    margin: 0 auto 20px;
}


/* Loading spinner */

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: -3px;
    border: 2px solid var(--border-strong);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: loading-spin 0.8s linear infinite;
}

@keyframes loading-spin {
    to { transform: rotate(360deg); }
}


/* Responsive additions */

@media (max-width: 900px) {

    .social-form-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 768px) {

    .sidebar-section-title {
        display: none;
    }

    .page-header-split {
        flex-direction: column;
        align-items: stretch;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-field-full {
        grid-column: auto;
    }

    .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .profile-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .detail-value {
        max-width: 100%;
        text-align: left;
    }

    .user-menu-button-name {
        display: none;
    }

}


/* Reduced motion */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }

}


/* pages.css — management screens, role dashboards and shared patterns.
   Uses the tokens from app.css; nothing here redefines the theme. */

/* Layout helpers */
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack > .card { margin-bottom: 0; }
.narrow { max-width: 640px; }
.nowrap { white-space: nowrap; }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.back-link:hover { color: var(--gold-light); }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.action-row form { margin: 0; }

/* Sidebar: not-yet-built destinations and sections */
.sidebar-section-spaced { margin-top: 18px; }
.nav-link-disabled { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px 10px 15px; border-left: 3px solid transparent; color: var(--text-muted); font-size: 14px; font-weight: 600; cursor: not-allowed; opacity: .7; }
.nav-soon { margin-left: auto; padding: 2px 8px; border: 1px solid var(--border); border-radius: 999px; font-size: 10px; font-weight: 700; color: var(--text-muted); }
@media (max-width: 768px) {
    .nav-link-disabled { display: none; }
    .sidebar-section-spaced { margin-top: 0; }
}

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.stat-card-link:hover { border-color: var(--gold-dark); }
.stat-icon { width: 42px; height: 42px; flex: 0 0 42px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--gold); font-size: 18px; }
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-value { font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--text-primary); }
.stat-label { color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.stat-hint { color: var(--text-muted); font-size: 11px; }

/* Progress and checklist */
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); }
.progress-caption { margin: 8px 0 16px; color: var(--text-muted); font-size: 12px; }
.checklist { margin: 0 0 20px; padding: 0; list-style: none; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-secondary); }
.checklist li:last-child { border-bottom: 0; }
.checklist .bi-circle { color: var(--border-strong); }
.checklist .bi-check-circle-fill { color: var(--success); }
.checklist li.is-done span { color: var(--text-muted); text-decoration: line-through; }
.checklist a { color: var(--gold-light); font-weight: 600; }

/* People rows and tables */
.person-cell { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.person-cell strong { display: block; font-size: 13px; }
.person-cell small { display: block; color: var(--text-muted); font-size: 12px; overflow-wrap: anywhere; }
a.person-cell:hover strong { color: var(--gold-light); }
.avatar-sm { width: 36px; height: 36px; flex: 0 0 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; object-fit: cover; background: linear-gradient(150deg, var(--gold-light), var(--gold-dark)); color: var(--gold-ink); font-family: var(--font-display); font-size: 14px; font-weight: 800; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-row:hover strong { color: var(--gold-light); }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { padding: 10px 12px; text-align: left; color: var(--text-muted); font-size: 12px; font-weight: 700; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.data-table td { padding: 12px; color: var(--text-secondary); border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr:hover { background: var(--surface-hover); }
.result-count { margin: 14px 0 0; color: var(--text-muted); font-size: 12px; }

/* Filters */
.status-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.status-chip { padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.status-chip strong { margin-right: 4px; color: var(--gold-light); }
.status-chip:hover { border-color: var(--gold-dark); }
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; padding: 18px 22px 4px; }
.filter-bar .form-group { margin-bottom: 14px; min-width: 150px; }
.filter-search { flex: 1 1 280px; }
.filter-actions { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.filter-actions .loading-spinner { margin: 0; }

/* Timeline */
.timeline { margin: 0 0 20px; padding: 0; list-style: none; }
.timeline li { position: relative; display: flex; gap: 14px; padding: 0 0 18px 0; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 4px; top: 14px; bottom: 0; width: 1px; background: var(--border-strong); }
.timeline-dot { width: 9px; height: 9px; flex: 0 0 9px; margin-top: 6px; border-radius: 50%; background: var(--gold); }
.timeline-summary { margin: 0; color: var(--text-primary); font-size: 13px; }
.timeline-meta { margin: 2px 0 0; color: var(--text-muted); font-size: 12px; }

/* Callout, results, diagnostics */
.callout { display: flex; gap: 12px; padding: 14px 16px; margin-bottom: 22px; border: 1px solid var(--info-border); border-radius: var(--radius-sm); background: var(--info-bg); color: #bfdbfe; }
.callout p { margin: 0; color: inherit; font-size: 13px; }
.callout .bi { margin-top: 2px; color: var(--info); }
.result-icon { width: 64px; height: 64px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 50%; background: var(--surface-2); color: var(--gold); font-size: 26px; }
.auth-card-center { text-align: center; }
.auth-card-center p { margin: 0 0 22px; }
.error-page h2 { margin: 6px 0 10px; }
.error-page p { max-width: 420px; margin: 0 auto 22px; }
.diagnostic-row { margin-top: 12px; }
.diagnostic-result { margin: 10px 0 0; color: var(--success); }
.field-help ul { margin: 6px 0 0; padding-left: 18px; }
.empty-state .button { margin-top: 4px; }



/* batch3_additions.css: 
*/

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted-line { display: block; color: var(--text-muted); font-size: 12px; font-weight: 400; }
.warn-line { display: block; color: var(--gold-light); font-size: 12px; }
.inline-form { display: inline-block; margin: 0 0 0 6px; }
.filter-bar select, .filter-bar input[type="search"] { width: 100%; padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-primary); font-size: 13px; }
.filter-bar input[type="search"]:focus, .filter-bar select:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(233, 185, 73, 0.16); }

/* Member panel and candidate search */
.member-search { margin-bottom: 22px; }
.member-search label { display: block; margin-bottom: 6px; color: var(--text-secondary); font-size: 13px; font-weight: 700; }
.member-search input[type="search"] { width: 100%; padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-primary); font-size: 13px; }
.member-search input[type="search"]:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(233, 185, 73, 0.16); }
.candidate-list { margin: 10px 0 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.candidate-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.candidate-list li:last-child { border-bottom: 0; }
.scope-form { margin-top: 16px; }
.scope-form select { width: 100%; padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-primary); font-size: 13px; }

/* Responsive: stack candidate rows on phones */
@media (max-width: 768px) {
    .candidate-list li { flex-direction: column; align-items: flex-start; }
    .inline-form { margin: 6px 0 0; }
}




/* Checkbox groups (evidence types, groups, cohorts) */
.form-group [id^="id_"] > div > label { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 500; color: var(--text-primary); }
.form-group [id^="id_"] > div > label input { margin: 0; }

/* Active filter chip (assignment status filters) */
.status-chip.is-active { border-color: var(--gold); color: var(--gold-light); background: rgba(233, 185, 73, 0.08); }

/* Action buttons sit in one row above a task */
.action-row-top { margin-top: 0; padding-top: 0; border-top: 0; }








/* My tasks */
.task-section { margin-bottom: 26px; }
.task-section-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 14px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.task-section-danger { color: var(--danger); }
.task-list { display: flex; flex-direction: column; gap: 10px; }
.task-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); transition: border-color 0.18s ease, background 0.18s ease; }
.task-row:hover { border-color: var(--gold-dark); background: var(--surface-hover); }
.task-row-main strong { display: block; font-size: 14px; }
.task-row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; flex-shrink: 0; }
.task-row-meta .badge + .badge { margin-top: 2px; }

/* Interactive checklist */
.checklist-interactive li { gap: 12px; }
.tick-button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-muted); font-size: 20px; line-height: 1; }
.tick-button:hover { color: var(--gold-light); background: rgba(233, 185, 73, 0.08); }
.tick-button[aria-pressed="true"] { color: var(--success); }
.tick-button:focus-visible { outline: 3px solid rgba(233, 185, 73, 0.45); outline-offset: 2px; }

@media (max-width: 768px) {
    .task-row { flex-direction: column; align-items: flex-start; }
    .task-row-meta { align-items: flex-start; text-align: left; }
    .tick-button { width: 44px; height: 44px; }   /* comfortable touch target on phones */
}




/* batch4c_additions.css: paste at the bottom of components.css (do not link as a separate file) */

/* Rich text shown to readers */
.rich-text { color: var(--text-secondary); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.rich-text > :first-child { margin-top: 0; }
.rich-text > :last-child { margin-bottom: 0; }
.rich-text p, .rich-text div { margin: 0 0 10px; }
.rich-text h1, .rich-text h2, .rich-text h3 { margin: 18px 0 8px; font-size: 16px; color: var(--text-primary); }
.rich-text ul, .rich-text ol { margin: 0 0 12px; padding-left: 22px; }
.rich-text blockquote { margin: 0 0 12px; padding: 4px 14px; border-left: 3px solid var(--gold-dark); color: var(--text-muted); }
.rich-text pre, .rich-text code { background: var(--surface-2); border-radius: 6px; font-size: 13px; }
.rich-text pre { padding: 10px 12px; overflow-x: auto; }
.rich-text a { color: var(--gold-light); text-decoration: underline; }

/* Rich text editor (Trix) on the dark theme */
.rich-field trix-toolbar { margin-bottom: 8px; }
.rich-field trix-toolbar .trix-button-row { flex-wrap: wrap; gap: 6px; }
.rich-field trix-toolbar .trix-button-group { margin-bottom: 0; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.rich-field trix-toolbar .trix-button { border-bottom: 0; background: transparent; }
.rich-field trix-toolbar .trix-button::before { filter: invert(1) brightness(0.9); }
.rich-field trix-toolbar .trix-button.trix-active { background: rgba(233, 185, 73, 0.22); }
.rich-field trix-toolbar .trix-button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); }
.rich-field trix-toolbar .trix-button--icon:disabled::before { opacity: 0.25; }
.rich-field trix-toolbar .trix-dialog { background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow-lift); }
.rich-field trix-toolbar .trix-input--dialog { background: var(--surface); color: var(--text-primary); border: 1px solid var(--border-strong); }
.rich-field trix-toolbar .trix-button--dialog { color: var(--text-primary); }
.rich-field trix-toolbar [data-trix-file-tools], .rich-field trix-toolbar .trix-button-group--file-tools { display: none; }
.rich-field trix-editor { min-height: 190px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-primary); font-size: 14px; line-height: 1.7; }
.rich-field trix-editor:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(233, 185, 73, 0.16); }
.rich-field trix-editor a { color: var(--gold-light); }
.rich-field trix-editor:empty::before { color: var(--text-muted); }

/* Checklist and links editors: Enter adds the next row */
.row-editor-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.row-editor-row { display: flex; align-items: center; gap: 10px; }
.row-editor-row input { flex: 1; min-width: 0; width: auto; }
.row-editor-link input[name="link_label"] { flex: 0 0 34%; }
.row-editor-grip { flex: 0 0 auto; color: var(--text-muted); font-size: 16px; }
.row-editor-remove { flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 50%; background: transparent; color: var(--text-muted); font-size: 12px; }
.row-editor-remove:hover { border-color: var(--danger); color: var(--danger); }
.row-editor-add { font-size: 12px; padding: 8px 16px; }
@media (max-width: 768px) {
    .row-editor-link { flex-wrap: wrap; }
    .row-editor-link input[name="link_label"] { flex: 1 1 100%; }
    .row-editor-remove { width: 44px; height: 44px; }
}


/* ============================================================
   Task submissions (Batch 5)
   ============================================================ */

.callout-success { border-color: var(--success-border); background: var(--success-bg); color: var(--success); }
.callout-success .bi { color: var(--success); }
.callout-warning { border-color: var(--warning-border); background: var(--warning-bg); color: var(--gold-light); }
.callout-warning .bi { color: var(--gold-light); }
.callout-danger { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger); }
.callout-danger .bi { color: var(--danger); }

.submission-form { display: grid; gap: 18px; }
.file-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.file-list li, .link-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-list li span { word-break: break-all; }
.link-row { margin-bottom: 8px; }
.link-row input { flex: 1 1 220px; }
.upload-status progress { width: 100%; height: 8px; }

.attempt { padding: 16px 0; border-top: 1px solid var(--border); }
.attempt:first-of-type { border-top: 0; padding-top: 0; }
.attempt-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.attempt-head h3 { margin: 0; font-size: 15px; }
.evidence-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; }
.evidence-list a, .evidence-list span { word-break: break-all; }
.attempt-trail { margin-top: 8px; font-size: 12px; color: var(--text-muted); }
.attempt-trail ol { margin: 6px 0 0; padding-left: 18px; }

.feedback-box { margin: 10px 0; padding: 12px 14px; border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius-sm); background: var(--surface-2); }
.feedback-box p { margin: 6px 0 0; font-size: 13px; }
.feedback-approved { border-left-color: var(--success); }
.feedback-changes_required { border-left-color: var(--gold); }
.feedback-rejected { border-left-color: var(--danger); }
.feedback-prominent { margin-bottom: 18px; }


/* Reviews (Batch 5, Stage 3) */
.nav-count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--gold); color: #111; font-size: 11px; font-weight: 700; text-align: center; }
.button-danger { border-color: var(--danger-border); color: var(--danger); }
.button-danger:hover { background: var(--danger-bg); }
.review-claim { margin-bottom: 18px; }
.review-form { display: grid; gap: 14px; }
.review-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.review-next { margin-top: 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.trail { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.evidence-grid { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 14px; }
.evidence-grid li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.evidence-grid a, .evidence-grid span { word-break: break-all; }
.evidence-thumb { display: block; flex: 0 0 100%; }
.evidence-thumb img { display: block; max-width: 100%; max-height: 360px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
