/**
 * DH Rally — App-Specific Styles
 *
 * Mobile-first volunteer management with shared design tokens.
 * Shared tokens, reset, base, layout, components, and utilities are loaded
 * via the template CSS stack (symlinked from shared/).
 * This file contains only Rally-specific styles.
 */

@layer app {


.card-link {
    font-size: var(--font-size-sm);
}


.col-config-panel {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 50;
    min-width: 180px;
    background: white;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-2) 0;
}

.col-config-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    padding: var(--spacing-2) var(--spacing-3);
    font-size: var(--font-size-sm);
    cursor: pointer;
    white-space: nowrap;
}

.col-config-item:hover {
    background: var(--color-gray-50);
}

.col-config-item input[type="checkbox"] {
    margin: 0;
}



@media (max-width: 767px) {
    .modal {
        padding: var(--spacing-2);
    }

    .modal-content {
        max-height: 95vh;
    }

    .modal-header, .modal-body, .modal-footer {
        padding: var(--spacing-3);
    }
}

/* Tabs (.tab-bar, .tab-btn) live in shared components.css */

/* ==========================================================================
   Header Brand (per STYLE-GUIDE.md)
   ========================================================================== */

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

.header-brand-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    text-decoration: none;
    color: inherit;
}

.header-brand-link:hover {
    text-decoration: none;
}

/* Full logo: 200x50px max for desktop headers */
.header-logo-full {
    height: 40px;
    max-width: 200px;
    width: auto;
    object-fit: contain;
}

/* Icon logo: hidden on desktop, shown on tablet/mobile */
.header-logo-icon {
    display: none;
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.header-brand-name {
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
    white-space: nowrap;
    color: inherit;
}

.header-role-badge {
    padding: var(--spacing-1) var(--spacing-2);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-sm);
    background-color: rgba(255, 255, 255, 0.2);
}

/* Tablet and below: Show icon, hide full logo */
@media (max-width: 1023px) {
    .header-logo-full {
        display: none;
    }

    .header-logo-icon {
        display: block;
    }
}

/* Mobile: Smaller sizing */
@media (max-width: 767px) {
    .header-logo-icon {
        width: 32px;
        height: 32px;
    }

    .header-brand-name {
        font-size: var(--font-size-base);
    }
}

/* ==========================================================================
   Portal App Shell
   ========================================================================== */

.portal-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.portal-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background-color: var(--color-primary);
    color: white;
    z-index: 100;
}

.portal-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 var(--spacing-4);
}

.portal-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-1);
    overflow-x: auto;
    background-color: white;
    border-bottom: 1px solid var(--color-gray-200);
    padding: 0 var(--spacing-4);
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 99;
    -webkit-overflow-scrolling: touch;
}

.portal-nav-item {
    padding: var(--spacing-3) var(--spacing-4);
    color: var(--color-gray-600);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
}

.portal-nav-item:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.portal-nav-item:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-ring-offset);
}

.portal-nav-item.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.portal-main {
    flex: 1;
    padding: 112px var(--spacing-4) var(--spacing-6);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}



/* Header button variant for portal header (white on brand background) */
.btn-header-outline {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    background: transparent;
}

.btn-header-outline:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-header-outline:focus-visible {
    outline: 2px solid white;
    outline-offset: var(--focus-ring-offset);
}

.portal-user-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
}

.portal-user-name {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    display: none;
}

@media (min-width: 768px) {
    .portal-user-name {
        display: inline;
    }
}

/* Mobile: hamburger replaces nav */
@media (max-width: 899px) {
    .portal-nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        flex-direction: column;
        align-items: stretch;
        padding: var(--spacing-4) 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 201;
        overflow-y: auto;
    }

    .portal-nav.open {
        transform: translateX(0);
    }

    .portal-nav-item {
        padding: var(--spacing-3) var(--spacing-6);
        border-bottom: none;
    }

    .portal-nav-item.active {
        background-color: color-mix(in srgb, var(--color-primary) 10%, transparent);
        border-bottom: none;
    }

    .portal-main {
        padding-top: 72px;
    }
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 200;
}

/* ==========================================================================
   Admin Shell
   ========================================================================== */

.admin-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: white;
    border-bottom: 1px solid var(--color-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-4);
    z-index: 100;
}

.admin-header-left,
.admin-header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
}

.admin-badge {
    padding: var(--spacing-1) var(--spacing-2);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-sm);
    background-color: var(--color-primary);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-layout {
    display: flex;
    padding-top: 60px;
    min-height: calc(100vh - 60px);
}

/* Admin sidebar */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    width: 240px;
    background-color: white;
    border-right: 1px solid var(--color-gray-200);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 99;
    overflow-y: auto;
}

.admin-sidebar.open {
    transform: translateX(0);
}

.sidebar-overlay {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 98;
}


.sidebar-section-label {
    padding: var(--spacing-2) var(--spacing-4);
    margin: 0;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    /* gray-400 on white is 2.5:1; small text needs 4.5:1 */
    color: var(--color-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}







.admin-main {
    flex: 1;
    padding: var(--spacing-6);
    margin-left: 0;
    overflow-x: hidden;
}

/* Desktop: sidebar always visible */
@media (min-width: 1024px) {
    .admin-sidebar {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none !important;
    }

    .admin-main {
        margin-left: 240px;
    }

    .admin-header .menu-btn {
        display: none;
    }
}

/* ==========================================================================
   Dashboard Components
   ========================================================================== */


.stat-card.stat-primary { border-left: 4px solid var(--color-primary); }
.stat-card.stat-success { border-left: 4px solid var(--color-success); }
.stat-card.stat-warning { border-left: 4px solid var(--color-warning); }
.stat-card.stat-info { border-left: 4px solid var(--color-info); }
.stat-card.stat-danger { border-left: 4px solid var(--color-danger); }
/* A dashboard tile is itself the link to its page. */
a.stat-card { color: inherit; text-decoration: none; }
a.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-note { font-size: var(--font-size-xs); }

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background-color: var(--color-gray-100);
}

.stat-value {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    line-height: 1;
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--color-gray-500);
}


.stat-card-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    color: inherit;
    text-decoration: none;
}

.stat-card-link:hover {
    text-decoration: none;
}

.stat-card:has(.stat-card-link):hover {
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--transition-fast);
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-3);
}

.quick-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
}

/* ==========================================================================
   Auth Pages
   ========================================================================== */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--spacing-4);
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: var(--spacing-8);
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.auth-container-wide {
    max-width: 460px;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--spacing-4);
}

.auth-logo {
    max-height: 60px;
    max-width: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.auth-title {
    text-align: center;
    margin-bottom: var(--spacing-6);
    color: var(--color-gray-800);
    font-size: var(--font-size-xl);
}

.auth-form {
    margin-bottom: var(--spacing-6);
}

.auth-shared__label {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    font-weight: normal;
    cursor: pointer;
}

.auth-shared .form-hint {
    margin: var(--spacing-1) 0 0;
}

.auth-link {
    text-align: center;
    color: var(--color-gray-600);
    font-size: var(--font-size-sm);
}

/* A link inside a sentence needs more than colour to stand out (WCAG 1.4.1) */
.auth-link a {
    text-decoration: underline;
}

/* ==========================================================================
   Landing Page
   ========================================================================== */

.landing-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.landing-header {
    padding: var(--spacing-12) var(--spacing-4);
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
}

.landing-header h1 {
    margin-bottom: var(--spacing-2);
    font-size: var(--font-size-3xl);
}

.landing-header .tagline {
    font-size: var(--font-size-lg);
    opacity: 0.9;
    margin: 0;
}

.hero-brand {
    margin-bottom: var(--spacing-4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-3);
}

.hero-logo {
    max-height: 60px;
    max-width: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.hero-org-name {
    margin: 0;
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: white;
    text-align: center;
}

@media (max-width: 640px) {
    .hero-brand {
        gap: var(--spacing-2);
    }

    .hero-logo {
        max-height: 48px;
        max-width: 160px;
    }

    .hero-org-name {
        font-size: var(--font-size-xl);
    }
}

.landing-nav {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4);
    padding: var(--spacing-8) var(--spacing-4);
    max-width: 400px;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .landing-nav {
        flex-direction: row;
        max-width: 500px;
    }

    .landing-nav .btn {
        flex: 1;
    }
}

.landing-info {
    flex: 1;
    padding: var(--spacing-8) var(--spacing-4);
    max-width: 600px;
    margin: 0 auto;
}

.landing-info h2 {
    color: var(--color-primary);
    font-size: var(--font-size-xl);
    margin-top: var(--spacing-6);
}

.landing-info h2:first-child {
    margin-top: 0;
}

.landing-footer {
    padding: var(--spacing-6) var(--spacing-4);
    text-align: center;
    background-color: var(--color-gray-100);
    color: var(--color-gray-600);
    font-size: var(--font-size-sm);
}

.landing-footer p {
    margin: 0;
}

/* Toasts live in shared feedback.css */

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    margin-top: var(--spacing-6);
}

.pagination-btn {
    padding: var(--spacing-2) var(--spacing-3);
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    background-color: white;
    color: var(--color-gray-700);
    cursor: pointer;
    font-size: var(--font-size-sm);
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--color-gray-50);
}

.pagination-btn.active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.pagination-btn:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-ring-offset);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: var(--font-size-sm);
    color: var(--color-gray-500);
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.empty-state {
    text-align: center;
    padding: var(--spacing-8);
    color: var(--color-gray-500);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: var(--spacing-4);
    color: var(--color-gray-300);
}

.empty-state p {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-2);
}

.empty-state .help-text {
    margin-bottom: var(--spacing-4);
}

/* ==========================================================================
   Loading
   ========================================================================== */

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-gray-200);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ==========================================================================
   Geocoding — Address lookup component
   ========================================================================== */

.geocoding-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    margin-bottom: var(--spacing-4);
}

.geocoding-status {
    font-size: var(--font-size-sm);
    line-height: 1.4;
}

.geocoding-status-loading {
    color: var(--color-text-muted);
}

.geocoding-status-success {
    color: var(--color-success);
}

.geocoding-status-error {
    color: var(--color-danger);
}

/* A corrected spelling waiting on a yes or no. */
.geocoding-status-confirm {
    color: var(--color-warning-text, var(--color-text));
}

.geocoding-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: geo-spin 0.6s linear infinite;
    vertical-align: middle;
}

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

.geocoding-coords-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-1);
}


/* ==========================================================================
   Filter Bar
   ========================================================================== */



/* ==========================================================================
   Sort Indicators
   ========================================================================== */

.sort-indicator {
    font-size: var(--font-size-xs);
    margin-left: var(--spacing-1);
}

/* ==========================================================================
   Mobile Touch Target Sizes (WCAG 2.5.8 — minimum 44x44px)
   ========================================================================== */

@media (max-width: 767px) {
    .btn-sm {
        min-height: 44px;
        padding: var(--spacing-3) var(--spacing-4);
    }

    .pagination-btn {
        min-width: 44px;
        min-height: 44px;
    }

    /* Disable compact view on mobile for touch accessibility */
    .compact-view .btn-icon {
        width: 40px;
        height: 40px;
    }

    .compact-view .btn-icon svg {
        width: 16px;
        height: 16px;
    }
}

/* ==========================================================================
   Error Pages
   ========================================================================== */

.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--spacing-4);
    text-align: center;
}

.error-container {
    max-width: 480px;
}

.error-code {
    font-size: 6rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-gray-200);
    line-height: 1;
    margin-bottom: var(--spacing-4);
}

.error-title {
    font-size: var(--font-size-2xl);
    color: var(--color-gray-800);
    margin-bottom: var(--spacing-3);
}

.error-description {
    color: var(--color-gray-500);
    margin-bottom: var(--spacing-6);
}

/* ==========================================================================
   Pagination Navigation (ARIA)
   ========================================================================== */

.pagination[role="navigation"] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    margin-top: var(--spacing-6);
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .portal-header,
    .portal-nav,
    .admin-header,
    .admin-sidebar,
    .sidebar-overlay,
    .nav-overlay,
    .toast-container,
    .modal {
        display: none !important;
    }

    .portal-main,
    .admin-main {
        padding: 0;
        margin: 0;
    }

    .badge {
        border: 1px solid currentColor;
    }
}



/* --------------------------------------------------------------------------
   Autosave status
   --------------------------------------------------------------------------
   The portal saves as the volunteer works, so the page has to say where their
   work stands -- an autosaving form with no visible state is indistinguishable
   from one that is quietly dropping what you type.

   Sticky, because on a long form the volunteer is rarely looking at the top of
   the page when a save lands. It is short and the form groups carry a matching
   `scroll-margin-top`, so a focused field is never left under it (WCAG 2.4.11).

   Empty means idle: `:empty` collapses the element so an untouched form has no
   stray gap under its heading.
   -------------------------------------------------------------------------- */
.autosave-status {
    position: sticky;
    top: 0;
    z-index: 5;
    display: block;
    padding: var(--spacing-1) 0 var(--spacing-2);
    margin-bottom: var(--spacing-2);
    background: var(--color-bg, #fff);
    font-size: var(--font-size-sm);
    line-height: 1.4;
}

.autosave-status:empty {
    display: none;
}

.autosave-status--saving {
    color: var(--color-text-secondary, #4b5563);
}

.autosave-status--saved {
    color: var(--color-success-text, #166534);
}

.autosave-status--held {
    color: var(--color-warning-text, #b45309);
}

.autosave-status--error {
    color: var(--color-danger-text, #991b1b);
}

/* A tick and a warning sign so the state does not rest on colour alone
   (WCAG 1.4.1). Generated content, so it is not selectable text. */
.autosave-status--saved::before {
    content: "\2713\00a0";
}

.autosave-status--held::before,
.autosave-status--error::before {
    content: "\26a0\00a0";
}

/* Keep a focused field clear of the sticky status line above it. */
.autosave-status ~ form .form-group {
    scroll-margin-top: 3rem;
}

/* Advice, not a rejection: the value was saved, and something about it is
   worth a second look. Amber rather than the error red. */
.field-error--warning {
    color: var(--color-warning-text, #b45309);
}

/* A count pinned to the right of a sidebar item. The older items carry this
   as an inline style; new ones use the class, which is one fewer inline
   declaration for `test_css_conventions.py` to ratchet against. */
.sidebar-item-badge {
    margin-left: auto;
}

/* Evidence under a row: what the training records say about a claim somebody
   is being asked to confirm. Not colour alone — each carries its own words,
   because a coordinator who cannot tell the two greens apart still has to be
   able to read the answer (WCAG 1.4.1). */
.evidence {
    font-size: var(--font-size-xs);
    margin-top: var(--spacing-1);
}

.evidence--met {
    color: var(--color-success-text, #166534);
}

.evidence--unmet {
    color: var(--color-text-secondary, #4b5563);
}

/* --------------------------------------------------------------------------
   Status tabs
   --------------------------------------------------------------------------
   One row of the same records, filtered. Background Checks introduced these
   and Certifications now uses them too, so they moved out of the page
   stylesheet rather than being copied into a second one.
   -------------------------------------------------------------------------- */
.status-tabs {
    display: flex;
    gap: var(--spacing-1);
    border-bottom: 2px solid var(--color-gray-200);
    margin-bottom: var(--spacing-4);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.status-tab {
    padding: var(--spacing-2) var(--spacing-4);
    border: none;
    background: none;
    font-size: var(--font-size-sm);
    color: var(--color-gray-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}
.status-tab:hover {
    color: var(--color-gray-700);
}
.status-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
}
.status-tab .tab-count {
    font-size: var(--font-size-xs);
    background: var(--color-gray-100);
    color: var(--color-gray-600);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-full);
    margin-left: var(--spacing-1);
}

/* --------------------------------------------------------------------------
   Onboarding wizard footer
   --------------------------------------------------------------------------
   The forward path through onboarding. Hidden until portal/wizard.js has the
   summary, and absent entirely once onboarding is finished. The left menu is
   unchanged -- this adds a way forward, it does not remove free navigation.
   -------------------------------------------------------------------------- */
.wizard-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-3);
    margin-top: var(--spacing-8);
    padding-top: var(--spacing-4);
    border-top: 1px solid var(--color-border);
}

/* ⛳ The same defect as the dashboard hint further down, one element out. The
   rule under it hides hidden *children* of the footer; the footer itself is
   `display: flex` above, which beats the browser's `[hidden] { display: none }`
   the way every author declaration does. So `<nav class="wizard-footer" hidden>`
   stayed on screen and an approved volunteer editing their profile was shown
   Back and Continue on a sequence they had finished, with an empty caption
   where the step count would be. Reported from the demo 2026-09-14. */
.wizard-footer[hidden] {
    display: none;
}

.wizard-footer__caption {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.wizard-footer__controls {
    display: flex;
    gap: var(--spacing-2);
    margin-left: auto;
}

/* ⛳ `hidden` alone does not hide these. `[hidden] { display: none }` comes from
   the browser's stylesheet, and every author declaration beats every UA one
   regardless of specificity — so `.btn { display: inline-flex }` left a Back
   control marked hidden fully visible on step 1. The same defect shipped in the
   app switcher (SESSION-STATE, 2026-08-25). A compound rule is what fixes it;
   a bare `[hidden]` in the reset does not, because an attribute selector and a
   class have equal specificity and the reset loads first. */
.wizard-footer [hidden] {
    display: none;
}

/* A control we cannot aim is shown, not hidden: a step that exists but has no
   URL is a configuration problem somebody should see, and a silently missing
   button reports nothing. */
.wizard-footer .is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

@media (max-width: 768px) {
    .wizard-footer__controls {
        width: 100%;
        margin-left: 0;
    }

    .wizard-footer__controls .btn {
        flex: 1;
    }
}

/* --------------------------------------------------------------------------
   Volunteer portal dashboard
   --------------------------------------------------------------------------
   The landing page for an approved volunteer, replacing the finished Getting
   Started checklist. Card grammar matches Respond's portal dashboard.
   -------------------------------------------------------------------------- */
/* Certifications, Expiring soon: sort, seen and attention controls */
#expiring-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--spacing-3) var(--spacing-5);
    margin-top: var(--spacing-3);
}

#expiring-controls .form-group {
    margin: 0;
}

#expiring-controls .checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
    min-height: 40px;
}

#expiring-controls.hidden {
    display: none;
}

/* "As a leader" on the volunteer dashboard */
.portal-leading {
    margin-bottom: var(--spacing-6);
}

.portal-leading__title {
    margin: 0 0 var(--spacing-3);
    font-size: var(--font-size-lg);
}

.portal-leading__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-3);
}

.portal-dashboard__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-3);
    margin-bottom: var(--spacing-6);
}

.portal-dashboard__header h1 {
    margin: 0 0 var(--spacing-1);
}

/* The one-time welcome hint. Brand-soft rather than an alert colour: nothing
   is wrong, and an amber box would say something is. --color-brand-soft is
   color-mix(brand 10%, white), near-white for any branding colour, so the
   body text stays readable however dark the brand is. */
.dashboard-hint {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-4);
    padding: var(--spacing-4);
    margin-bottom: var(--spacing-4);
    border: 1px solid var(--color-brand-soft-border, #c6cdd9);
    border-radius: var(--radius-md);
    background: var(--color-brand-soft, #e8ebf0);
}

/* ⛳ The third time this has bitten — see `.wizard-footer [hidden]` above and
   `.app-switcher-item[hidden]` in the shared sheet. `display: flex` on the line
   above is an author declaration, and every author declaration beats the
   browser's own `[hidden] { display: none }` whatever the specificity. Without
   this the hint ignored its `hidden` attribute completely: it showed before the
   script had decided anything, it stayed up for somebody who had dismissed it,
   and Got it did nothing visible. Reported 2026-09-11. */
.dashboard-hint[hidden] {
    display: none;
}

.dashboard-hint__body {
    flex: 1 1 320px;
}

.dashboard-hint__title {
    margin: 0 0 var(--spacing-1);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
}

.dashboard-hint p {
    margin: 0;
    font-size: var(--font-size-sm);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-4);
    margin-top: var(--spacing-4);
}

.dashboard-card__body {
    padding: var(--spacing-4);
}

.dashboard-list {
    margin: 0;
    padding-left: var(--spacing-5);
}

.dashboard-list li + li {
    margin-top: var(--spacing-2);
}

.dashboard-blocked {
    margin: 0 0 var(--spacing-2);
    font-weight: var(--font-weight-medium);
}

/* Three empty states, deliberately distinguishable. "Nothing needs you" and
   "we could not ask" must never look alike -- the second is not an empty
   state, and reading it as one is how a broken card passes for a quiet one. */
.dashboard-empty {
    margin: 0;
    color: var(--color-text-secondary);
}

.dashboard-empty--first-use {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-3);
}

.dashboard-empty--error {
    color: var(--color-danger-text);
}

.card-link {
    margin-left: auto;
    font-size: var(--font-size-sm);
}

.progress-note {
    margin: var(--spacing-2) 0 var(--spacing-4);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.progress-note--submit {
    padding: var(--spacing-3) var(--spacing-4);
    background: var(--color-brand-soft);
    border-left: 3px solid var(--color-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--color-text);
}
} /* end @layer app */
