/**
 * public/css/app.css
 *
 * Custom styles for Transport Report System.
 * Supplements Tailwind CDN with custom utilities and overrides.
 */

/* ============================================================
   Fonts & Base
   (Fonts loaded via <link> in layout — no @import to avoid render-blocking)
   ============================================================ */

/* Hide Alpine x-cloak elements before init */
[x-cloak] { display: none !important; }

:root {
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
}

body {
    font-family: 'Inter', 'Noto Sans Ethiopic', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Amharic / Ethiopic text improvements */
html[lang="am"] body {
    font-family: 'Noto Sans Ethiopic', 'Inter', system-ui, sans-serif;
    line-height: 1.7;
    letter-spacing: 0.01em;
}
html[lang="am"] h1, html[lang="am"] h2, html[lang="am"] h3,
html[lang="am"] h4, html[lang="am"] h5, html[lang="am"] h6 {
    line-height: 1.5;
}
html[lang="am"] .text-sm {
    font-size: 0.8125rem;
}
html[lang="am"] select,
html[lang="am"] input,
html[lang="am"] textarea,
html[lang="am"] button {
    font-family: 'Noto Sans Ethiopic', 'Inter', system-ui, sans-serif;
}

/* ============================================================
   Scrollbar (Webkit)
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ============================================================
   Custom Utilities
   ============================================================ */

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
.spinner--dark {
    border-color: rgba(0,0,0,0.1);
    border-top-color: #2563eb;
}

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

/* Fade transitions */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.2s ease;
}
.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}

/* Slide down */
.slide-down-enter-active {
    transition: all 0.3s ease-out;
}
.slide-down-leave-active {
    transition: all 0.2s ease-in;
}
.slide-down-enter-from {
    transform: translateY(-10px);
    opacity: 0;
}
.slide-down-leave-to {
    transform: translateY(-10px);
    opacity: 0;
}

/* ============================================================
   Form Styles
   ============================================================ */

/* Input focus glow */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Number input — hide arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* Readonly inputs */
input[readonly],
textarea[readonly] {
    background-color: #f9fafb;
    cursor: default;
}

/* ============================================================
   Table Styles
   ============================================================ */
.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.report-table thead {
    background-color: #f8fafc;
}
.report-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}
.report-table td {
    padding: 0.625rem 1rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}
.report-table tbody tr:hover {
    background-color: #f8fafc;
}
.report-table tfoot td {
    font-weight: 700;
    background-color: #f0f9ff;
    border-top: 2px solid #bfdbfe;
}
.report-table input[type="number"] {
    width: 5rem;
    padding: 0.375rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    text-align: right;
    font-size: 0.8125rem;
}
.report-table input[type="number"]:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* Responsive table wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

/* ============================================================
   Status Badges
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.5;
}
.badge--draft     { background: #fef9c3; color: #854d0e; }
.badge--submitted { background: #dbeafe; color: #1e40af; }
.badge--approved  { background: #dcfce7; color: #166534; }
.badge--rejected  { background: #fee2e2; color: #991b1b; }

/* ============================================================
   Card Styles
   ============================================================ */
.card {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-body {
    padding: 1.5rem;
}

/* ============================================================
   Toast / Notification Styles
   ============================================================ */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    min-width: 300px;
    max-width: 420px;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease-out;
}
.toast--success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.toast--error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.toast--warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.toast--info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* ============================================================
   Skeleton Loading
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.375rem;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   Accessibility
   ============================================================ */
/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   Mobile Adjustments
   ============================================================ */
@media (max-width: 640px) {
    .report-table th,
    .report-table td {
        padding: 0.5rem 0.375rem;
        font-size: 0.8125rem;
    }
    .report-table input[type="number"] {
        width: 4.5rem;
        min-height: 2.75rem;
        padding: 0.5rem;
        font-size: 1rem;
    }
    .report-table select {
        min-height: 2.75rem;
        font-size: 0.875rem;
    }
    .card-body {
        padding: 1rem;
    }
    .toast {
        min-width: auto;
        max-width: calc(100vw - 2rem);
        left: 1rem;
        right: 1rem;
    }
    .toast-container {
        left: 0;
        right: 0;
        padding: 0 0.5rem;
    }
}

/* ============================================================
   Dark Mode
   ============================================================ */
[data-theme="dark"] {
    color-scheme: dark;
}
[data-theme="dark"] body {
    background: #0f172a;
    color: #e2e8f0;
}

/* Top bar */
[data-theme="dark"] header.sticky,
[data-theme="dark"] .top-bar {
    background: #1e293b !important;
    border-color: #334155 !important;
}
[data-theme="dark"] header.sticky h1,
[data-theme="dark"] .tb-user-name { color: #f1f5f9 !important; }
[data-theme="dark"] .tb-user-role { color: #94a3b8 !important; }
[data-theme="dark"] .tb-lang {
    background: #334155 !important; border-color: #475569 !important; color: #cbd5e1 !important;
}
[data-theme="dark"] .tb-lang:hover { background: #475569 !important; color: #f1f5f9 !important; }
[data-theme="dark"] .tb-bell { color: #94a3b8 !important; }
[data-theme="dark"] .tb-bell:hover { background: #334155 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .tb-divider { background: #475569 !important; }
[data-theme="dark"] .tb-user-btn:hover { background: #334155 !important; }
[data-theme="dark"] .tb-dd {
    background: #1e293b !important;
    box-shadow: 0 10px 40px rgba(0,0,0,.4), 0 0 0 1px #334155 !important;
}
[data-theme="dark"] .tb-dd-header { border-color: #334155 !important; }
[data-theme="dark"] .tb-dd-name { color: #f1f5f9 !important; }
[data-theme="dark"] .tb-dd-email { color: #64748b !important; }
[data-theme="dark"] .tb-dd-role { background: #1e3a5f !important; color: #60a5fa !important; }
[data-theme="dark"] .tb-dd a { color: #cbd5e1 !important; }
[data-theme="dark"] .tb-dd a:hover { background: #334155 !important; }
[data-theme="dark"] .tb-dd a svg { color: #64748b !important; }
[data-theme="dark"] .tb-dd-sep { background: #334155 !important; }

/* Cards & panels */
[data-theme="dark"] .bg-white,
[data-theme="dark"] .card {
    background: #1e293b !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .bg-gray-50 { background: #0f172a !important; }
[data-theme="dark"] .bg-gray-100 { background: #1e293b !important; }
[data-theme="dark"] .border-gray-200 { border-color: #334155 !important; }
[data-theme="dark"] .border-gray-100 { border-color: #1e293b !important; }
[data-theme="dark"] .card-header { border-color: #334155 !important; }

/* Text colors */
[data-theme="dark"] .text-gray-800,
[data-theme="dark"] .text-gray-900 { color: #f1f5f9 !important; }
[data-theme="dark"] .text-gray-700 { color: #e2e8f0 !important; }
[data-theme="dark"] .text-gray-600 { color: #cbd5e1 !important; }
[data-theme="dark"] .text-gray-500 { color: #94a3b8 !important; }
[data-theme="dark"] .text-gray-400 { color: #64748b !important; }

/* Headings */
[data-theme="dark"] h1, [data-theme="dark"] h2,
[data-theme="dark"] h3, [data-theme="dark"] h4 { color: #f1f5f9; }

/* Forms */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: #0f172a !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,.25) !important;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: #64748b !important; }
[data-theme="dark"] input[readonly],
[data-theme="dark"] textarea[readonly] { background: #1e293b !important; }

/* Tables */
[data-theme="dark"] .report-table thead { background: #1e293b !important; }
[data-theme="dark"] .report-table th {
    color: #94a3b8 !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .report-table td {
    color: #cbd5e1 !important;
    border-color: #1e293b !important;
}
[data-theme="dark"] .report-table tbody tr:hover { background: #334155 !important; }
[data-theme="dark"] .report-table tfoot td {
    background: #172554 !important;
    border-color: #1e3a5f !important;
}
[data-theme="dark"] .report-table input[type="number"] {
    background: #0f172a !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] .table-responsive { border-color: #334155 !important; }

/* Status badges */
[data-theme="dark"] .badge--draft     { background: #422006; color: #fbbf24; }
[data-theme="dark"] .badge--submitted { background: #172554; color: #60a5fa; }
[data-theme="dark"] .badge--approved  { background: #052e16; color: #4ade80; }
[data-theme="dark"] .badge--rejected  { background: #450a0a; color: #f87171; }

/* Toasts */
[data-theme="dark"] .toast--success { background: #052e16; border-color: #166534; color: #4ade80; }
[data-theme="dark"] .toast--error   { background: #450a0a; border-color: #991b1b; color: #f87171; }
[data-theme="dark"] .toast--warning { background: #422006; border-color: #92400e; color: #fbbf24; }
[data-theme="dark"] .toast--info    { background: #172554; border-color: #1e40af; color: #60a5fa; }

/* Skeleton */
[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%) !important;
    background-size: 200% 100%;
}

/* Scrollbar */
[data-theme="dark"] ::-webkit-scrollbar-track { background: #0f172a; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #475569; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* Focus */
[data-theme="dark"] *:focus-visible { outline-color: #3b82f6; }

/* Flash messages */
[data-theme="dark"] .bg-green-50  { background: #052e16 !important; border-color: #166534 !important; color: #4ade80 !important; }
[data-theme="dark"] .bg-red-50    { background: #450a0a !important; border-color: #991b1b !important; color: #f87171 !important; }
[data-theme="dark"] .bg-yellow-50 { background: #422006 !important; border-color: #92400e !important; color: #fbbf24 !important; }
[data-theme="dark"] .bg-blue-50   { background: #172554 !important; border-color: #1e40af !important; color: #60a5fa !important; }

/* Sidebar (already dark — no change needed, but tweak for consistency) */
[data-theme="dark"] aside { background: #0c1425 !important; }
[data-theme="dark"] .bg-primary-950 { background: #070d1a !important; }

/* Footer */
[data-theme="dark"] footer { border-color: #334155 !important; }
[data-theme="dark"] footer p { color: #64748b !important; }
[data-theme="dark"] footer strong { color: #94a3b8 !important; }

/* Settings page cards */
[data-theme="dark"] .st-card { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .st-hdr-green,
[data-theme="dark"] .st-hdr-cyan,
[data-theme="dark"] .st-hdr-sky,
[data-theme="dark"] .st-hdr-blue,
[data-theme="dark"] .st-hdr-indigo,
[data-theme="dark"] .st-hdr-rose,
[data-theme="dark"] .st-hdr-red,
[data-theme="dark"] .st-hdr-amber,
[data-theme="dark"] .st-hdr-orange,
[data-theme="dark"] .st-hdr-gray { background: #0f172a !important; }
[data-theme="dark"] .st-row:not(:last-child) { border-color: #1e293b !important; }
[data-theme="dark"] .st-row:hover { background: #0f172a !important; }
[data-theme="dark"] .st-label { color: #e2e8f0 !important; }
[data-theme="dark"] .st-desc { color: #64748b !important; }

/* Notifications page cards */
[data-theme="dark"] .nf-card { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .nf-card-unread { background: #172554 !important; border-color: #1e3a5f !important; }
[data-theme="dark"] .nf-content-title { color: #f1f5f9 !important; }
[data-theme="dark"] .nf-content-msg { color: #94a3b8 !important; }
[data-theme="dark"] .nf-title { color: #f1f5f9 !important; }

/* Dark mode toggle button */
.dm-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 8px; border: none;
    color: #6b7280; background: transparent; cursor: pointer; transition: all .15s;
}
.dm-toggle:hover { background: #f3f4f6; color: #374151; }
[data-theme="dark"] .dm-toggle { color: #fbbf24 !important; }
[data-theme="dark"] .dm-toggle:hover { background: #334155 !important; }

/* ============================================================
   Mobile Bottom Navigation
   ============================================================ */
.mobile-bottom-nav {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 20px rgba(0,0,0,.06);
    padding: 4px 0 calc(4px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 1023px) {
    .mobile-bottom-nav { display: flex; }
    main#main-content { padding-bottom: 5rem !important; }
    footer { padding-bottom: 5rem !important; }
}
.mob-nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    gap: 2px; padding: 6px 0; text-decoration: none;
    color: #9ca3af; font-size: .625rem; font-weight: 500;
    transition: color .15s; position: relative;
    -webkit-tap-highlight-color: transparent;
}
.mob-nav-item svg { width: 22px; height: 22px; transition: transform .15s; }
.mob-nav-item.active { color: #2563eb; }
.mob-nav-item.active svg { transform: scale(1.1); }
.mob-nav-item:active svg { transform: scale(.9); }
.mob-nav-badge {
    position: absolute; top: 2px; right: calc(50% - 18px);
    min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 8px; background: #ef4444; color: #fff;
    font-size: .5625rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* Dark mode bottom nav */
[data-theme="dark"] .mobile-bottom-nav {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,.3) !important;
}
[data-theme="dark"] .mob-nav-item { color: #64748b; }
[data-theme="dark"] .mob-nav-item.active { color: #60a5fa; }

/* Auto-save indicator dark mode */
[data-theme="dark"] #autosave-indicator {
    background: #052e16 !important; color: #4ade80 !important;
    border-color: #166534 !important;
}

/* ============================================================
   Print-only elements — hidden on screen, shown only in print
   ============================================================ */
.print-header,
.print-footer,
.print-signatures,
.print-only {
    display: none !important;
}

/* ============================================================
   Print Styles — Clean report output for Print / Save PDF
   ============================================================ */
@media print {
    /* Hide non-print elements */
    aside, nav, header,
    .sidebar, .top-bar, .toast-container,
    .cp-btn, .cp-btns, .cp-actions,
    footer,
    [x-show="isEditable"],
    button,
    .badge, .cp-badge,
    .no-print {
        display: none !important;
    }

    /* Reset page layout */
    body {
        background: white !important;
        color: black !important;
        font-size: 11pt;
        line-height: 1.4;
        margin: 0;
        padding: 0;
    }

    /* Remove shadows, rounded corners for print */
    .bg-white, .cp-card, [class*="rounded"], [class*="shadow"] {
        box-shadow: none !important;
        border-radius: 0 !important;
        border: none !important;
    }

    /* Main content takes full width */
    main, .main-content, [class*="ml-"] {
        margin-left: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Report tables */
    .report-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 10pt;
    }
    .report-table th,
    .report-table td {
        border: 1px solid #333 !important;
        padding: 4px 8px !important;
        background: white !important;
        color: black !important;
    }
    .report-table thead th {
        background: #e5e7eb !important;
        font-weight: bold;
    }
    .report-table tfoot td {
        font-weight: bold;
        border-top: 2px solid #333 !important;
    }

    /* Hide inputs, show values */
    .report-table input[type="number"],
    .report-table input[type="text"],
    .report-table textarea,
    .cp-form-input,
    .cp-remarks-input {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        font-size: 10pt;
        text-align: center;
        -webkit-appearance: none;
        -moz-appearance: textfield;
    }

    /* Print header info */
    .print-header {
        display: block !important;
        margin-bottom: 1.5rem;
    }
    .print-header-inner {
        max-width: 100%;
    }
    .print-logo-row {
        display: flex;
        align-items: center;
        gap: 1.25rem;
        margin-bottom: 0.75rem;
    }
    .print-logo-img {
        width: 70px;
        height: 70px;
        object-fit: contain;
        border-radius: 8px;
        flex-shrink: 0;
    }
    .print-org-text {
        flex: 1;
        text-align: left;
    }
    .print-org-name {
        font-size: 1rem;
        font-weight: 800;
        color: #1e3a8a;
        letter-spacing: 0.02em;
        margin-bottom: 2px;
    }
    .print-org-name-en {
        font-size: 0.55rem;
        font-weight: 600;
        color: #64748b;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        margin-bottom: 6px;
    }
    .print-org-dept {
        font-size: 0.85rem;
        font-weight: 700;
        color: #dc2626;
    }
    .print-org-dept-en {
        font-size: 0.5rem;
        font-weight: 600;
        color: #94a3b8;
        letter-spacing: 0.05em;
    }
    .print-badge {
        background: linear-gradient(135deg, #1e40af, #3b82f6);
        color: white;
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        text-align: center;
        flex-shrink: 0;
        min-width: 120px;
    }
    .print-badge-title {
        font-size: 0.65rem;
        font-weight: 600;
        margin-bottom: 2px;
    }
    .print-badge-sub {
        font-size: 0.75rem;
        font-weight: 800;
        letter-spacing: 0.02em;
    }
    .print-badge-en {
        font-size: 0.5rem;
        font-weight: 400;
        opacity: 0.75;
        margin-top: 2px;
    }
    .print-divider {
        height: 3px;
        background: linear-gradient(90deg, #dc2626, #1e40af, #dc2626);
        border-radius: 2px;
        margin: 0.75rem 0;
    }
    .print-meta-row {
        display: flex;
        gap: 2rem;
        justify-content: center;
        flex-wrap: wrap;
        font-size: 0.65rem;
    }
    .print-meta-label {
        font-weight: 600;
        color: #475569;
    }
    .print-meta-value {
        font-weight: 700;
        color: #1e293b;
        margin-right: 0.25rem;
    }

    /* Stats for complaints */
    .cp-stats { border: 1px solid #333 !important; }
    .cp-stat { border-right: 1px solid #333 !important; }
    .cp-stat-value { color: black !important; }

    /* Page margins */
    @page {
        margin: 1.5cm;
        size: A4 landscape;
    }

    /* Prevent page breaks inside tables */
    .report-table tr { page-break-inside: avoid; }
}

/* ============================================================
   Step Indicator (Sequential Forms)
   ============================================================ */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.step-circle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.step-circle--active {
    border: 2px solid #2563eb;
    color: #2563eb;
    background: white;
}
.step-circle--done {
    background: #2563eb;
    color: white;
    border: 2px solid #2563eb;
}
.step-circle--pending {
    border: 2px solid #d1d5db;
    color: #9ca3af;
    background: white;
}
.step-connector {
    flex: 1;
    max-width: 6rem;
    height: 2px;
    transition: background 0.3s ease;
}
.step-connector--done {
    background: #2563eb;
}
.step-connector--pending {
    background: #e5e7eb;
}
.step-label {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.375rem;
}
.step-description {
    text-align: center;
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* ============================================================
   Sticky Action Footer (Mobile Forms)
   ============================================================ */
.form-actions-sticky {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border-top: 1px solid #e5e7eb;
}
@media (max-width: 640px) {
    .form-actions-sticky {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 30;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    }
    body.has-sticky-actions {
        padding-bottom: 5rem;
    }
}

/* ============================================================
   Form Header Gradient
   ============================================================ */
.form-header-gradient {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.form-header-gradient h2 {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}
.form-header-gradient p {
    color: rgba(255,255,255,0.75);
    font-size: 0.8125rem;
    margin: 0.25rem 0 0 0;
}
.form-header-gradient .form-header-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.form-header-gradient .form-header-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    color: white;
}

/* ============================================================
   Report Table: Read-only Values
   ============================================================ */
.report-table .readonly-value {
    padding: 0.375rem 0.5rem;
    font-weight: 600;
    color: #475569;
    display: block;
    text-align: center;
    min-width: 3rem;
}
.report-table input.step-disabled {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ============================================================
   Per-Sub-City Section Cards (Reports Viewer)
   ============================================================ */
.sc-section {
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: white;
    transition: box-shadow 0.15s ease;
}
.sc-section:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.sc-header {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}
.sc-header:hover {
    background: #f1f5f9;
}
.sc-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sc-header .sc-count {
    font-size: 0.75rem;
    color: #64748b;
    background: #e2e8f0;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-weight: 500;
}
.sc-header .sc-toggle {
    transition: transform 0.2s ease;
    color: #94a3b8;
}
.sc-header.expanded .sc-toggle {
    transform: rotate(180deg);
}
.sc-body {
    padding: 0;
}
.sc-export-group {
    display: flex;
    gap: 0.25rem;
}
.sc-export-group a,
.sc-export-group button {
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
    border-radius: 0.25rem;
    font-weight: 500;
    transition: all 0.15s;
    border: 1px solid #e2e8f0;
    background: white;
    color: #475569;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.sc-export-group a:hover,
.sc-export-group button:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* ============================================================
   Compact Session Card
   ============================================================ */
.session-card-compact {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s ease;
}
.session-card-compact:last-child {
    border-bottom: none;
}
.session-card-compact:hover {
    background: #fafbfc;
}
.session-card-compact .session-header {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    flex-wrap: wrap;
    min-height: 2.75rem;
}
.session-card-compact .session-date {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}
.session-card-compact .session-submitter {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
}
.session-card-compact .session-status {
    margin-left: auto;
}
.session-card-compact .session-stats {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

/* ============================================================
   Compact Summary Row
   ============================================================ */
.compact-summary {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    gap: 1.5rem;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
}
.compact-summary-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.compact-summary-item .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.compact-summary-value {
    font-weight: 600;
    color: #334155;
}

/* ============================================================
   Multi-Select Chip Filter
   ============================================================ */
.filter-multi-select {
    position: relative;
}
.filter-multi-select .ms-trigger {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
    min-height: 2.5rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    cursor: pointer;
    background: white;
    font-size: 0.8125rem;
}
.filter-multi-select .ms-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 500;
}
.filter-multi-select .ms-dropdown {
    position: absolute;
    z-index: 20;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.25rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    max-height: 14rem;
    overflow-y: auto;
}

/* ============================================================
   Dark Mode Overrides for New Components
   ============================================================ */
[data-theme="dark"] .step-circle--active {
    background: #0f172a;
    border-color: #3b82f6;
    color: #60a5fa;
}
[data-theme="dark"] .step-circle--done {
    background: #2563eb;
    border-color: #2563eb;
}
[data-theme="dark"] .step-circle--pending {
    background: #1e293b;
    border-color: #475569;
    color: #64748b;
}
[data-theme="dark"] .step-label {
    color: #94a3b8;
}
[data-theme="dark"] .step-description {
    color: #94a3b8;
}
[data-theme="dark"] .form-actions-sticky {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .form-header-gradient {
    background: linear-gradient(135deg, #1e3a5f 0%, #1d4ed8 100%);
}
[data-theme="dark"] .form-header-gradient h2 {
    color: #f1f5f9;
}
[data-theme="dark"] .form-header-gradient p {
    color: rgba(255,255,255,0.6);
}
[data-theme="dark"] .report-table .readonly-value {
    color: #94a3b8;
}
[data-theme="dark"] .report-table input.step-disabled {
    background: #0f172a !important;
    color: #64748b !important;
}
[data-theme="dark"] .sc-section {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .sc-section:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
[data-theme="dark"] .sc-header {
    background: #0f172a;
    border-color: #334155;
}
[data-theme="dark"] .sc-header:hover {
    background: #1e293b;
}
[data-theme="dark"] .sc-header h3 {
    color: #f1f5f9;
}
[data-theme="dark"] .sc-header .sc-count {
    background: #334155;
    color: #94a3b8;
}
[data-theme="dark"] .sc-export-group a,
[data-theme="dark"] .sc-export-group button {
    background: #1e293b;
    border-color: #475569;
    color: #cbd5e1;
}
[data-theme="dark"] .sc-export-group a:hover,
[data-theme="dark"] .sc-export-group button:hover {
    background: #334155;
}
[data-theme="dark"] .session-card-compact {
    border-color: #1e293b;
}
[data-theme="dark"] .session-card-compact:hover {
    background: #1a2332;
}
[data-theme="dark"] .session-card-compact .session-date {
    color: #e2e8f0;
}
[data-theme="dark"] .session-card-compact .session-submitter {
    color: #64748b;
}
[data-theme="dark"] .session-card-compact .session-stats {
    color: #94a3b8;
}
[data-theme="dark"] .compact-summary {
    background: #0f172a;
    border-color: #1e293b;
    color: #94a3b8;
}
[data-theme="dark"] .compact-summary-value {
    color: #e2e8f0;
}
[data-theme="dark"] .filter-multi-select .ms-trigger {
    background: #0f172a;
    border-color: #475569;
}
[data-theme="dark"] .filter-multi-select .ms-chip {
    background: #1e3a5f;
    color: #60a5fa;
}
[data-theme="dark"] .filter-multi-select .ms-dropdown {
    background: #1e293b;
    border-color: #334155;
}
