/* ==========================================================================
   UU Bus Portal - Shared Theme Shell (css/theme.css)
   Universal Dark Shell for Non-Landing Public Content Pages (Category B)
   Strictly scoped under body.theme-dark-shell (Zero bleed to Category C app pages)
   ========================================================================== */

/* 1. Core Semantic Tokens & Scope Binding (White Mode Default + Dark Mode Switch) */
body.theme-dark-shell {
    --bg-deep: #F8FAFC;
    --text-strong: #0E1B33;
    --text-body: #475569;
    --text-muted: #64748B;
    --surface-glass: #FFFFFF;
    --surface-glass-hover: #F8FAFC;
    --border-glass: #E2E8F0;
    --border-glass-hover: #38BDF8;
    --accent-cyan: #0284C7;
    --accent-blue: #2451C4;

    /* Legacy CSS Variable Overrides */
    --ink: var(--text-strong);
    --ink-soft: var(--text-body);
    --ink-faint: var(--text-muted);
    --surface: var(--surface-glass);
    --surface-card: var(--surface-glass);
    --surface-sunken: #F1F5F9;
    --card: var(--surface-glass);
    --border: var(--border-glass);
    --border-strong: var(--border-glass-hover);
    --bg-page: var(--bg-deep);
    --nav-bg: rgba(255, 255, 255, 0.90);
    --primary: #2451C4;
    --primary-soft: rgba(36, 81, 196, 0.08);

    /* Specificity win over body in legacy sheets (NO !important needed) */
    background-color: var(--bg-deep);
    color: var(--text-body);
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html.dark-theme body.theme-dark-shell {
    --bg-deep: #060B18;
    --text-strong: rgba(255, 255, 255, 0.96);
    --text-body: rgba(255, 255, 255, 0.78);
    --text-muted: rgba(255, 255, 255, 0.60);
    --surface-glass: rgba(15, 23, 60, 0.65);
    --surface-glass-hover: rgba(24, 38, 95, 0.78);
    --border-glass: rgba(255, 255, 255, 0.10);
    --border-glass-hover: rgba(56, 189, 248, 0.40);
    --accent-cyan: #38BDF8;
    --accent-blue: #2F5BFF;

    --surface-sunken: rgba(10, 16, 40, 0.75);
    --nav-bg: rgba(6, 11, 24, 0.85);
    --primary: var(--accent-cyan);
    --primary-soft: rgba(56, 189, 248, 0.15);

    background-color: var(--bg-deep);
    color: var(--text-body);
}

/* 2. Typography & Headings */
body.theme-dark-shell h1,
body.theme-dark-shell h2,
body.theme-dark-shell h3,
body.theme-dark-shell h4,
body.theme-dark-shell h5,
body.theme-dark-shell h6 {
    color: var(--text-strong);
    letter-spacing: -0.015em;
}

body.theme-dark-shell p,
body.theme-dark-shell li {
    color: var(--text-body);
}

body.theme-dark-shell strong,
body.theme-dark-shell b {
    color: var(--text-strong);
}

body.theme-dark-shell a:not([class]) {
    color: var(--accent-cyan);
    transition: color 0.18s ease, border-color 0.18s ease;
}

@media (hover: hover) and (pointer: fine) {
    body.theme-dark-shell a:not([class]):hover {
        color: #7dd3fc;
    }
}

/* 3. Reusable Shell Top Navigation (Lovable Capsule Track & Active Pill Design) */
body.landing-portal .portal-top-nav,
body.landing-portal header.portal-top-nav,
.portal-top-nav,
body.theme-dark-shell .shell-top-nav,
body.theme-dark-shell header.top-nav,
header.shell-top-nav,
body.theme-dark-shell .dash-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 64px !important;
    height: 64px !important;
    padding: 10px clamp(16px, 2vw, 28px) !important;
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(18px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(150%) !important;
    border-bottom: 1px solid rgba(220, 230, 245, 0.9) !important;
    box-shadow: 0 1px 2px rgba(14, 27, 51, 0.03) !important;
    display: flex !important;
    align-items: center !important;
    width: 100%;
    box-sizing: border-box !important;
}

html.dark-theme body.landing-portal .portal-top-nav,
html.dark-theme body.landing-portal header.portal-top-nav,
html.dark-theme .portal-top-nav,
html.dark-theme body.theme-dark-shell .shell-top-nav,
html.dark-theme body.theme-dark-shell header.top-nav,
html.dark-theme header.shell-top-nav,
html.dark-theme body.theme-dark-shell .dash-header {
    background: rgba(6, 11, 24, 0.92) !important;
    border-bottom-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

body.landing-portal .portal-top-nav.scrolled,
.portal-top-nav.scrolled {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(20px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
    border-bottom: 1px solid rgba(220, 230, 245, 0.95) !important;
    box-shadow: 0 4px 14px rgba(14, 27, 51, 0.06) !important;
}

html.dark-theme body.landing-portal .portal-top-nav.scrolled,
html.dark-theme .portal-top-nav.scrolled {
    background: rgba(6, 11, 24, 0.96) !important;
    border-bottom-color: rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6) !important;
}

.portal-top-nav-inner,
body.theme-dark-shell .shell-nav-container,
.shell-nav-container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
}

body.theme-dark-shell .shell-brand,
body.theme-dark-shell .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

body.theme-dark-shell .shell-brand-mark,
body.theme-dark-shell .brand-mark {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(36, 81, 196, 0.35);
}

body.theme-dark-shell .shell-brand-info,
body.theme-dark-shell .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

body.theme-dark-shell .shell-brand-title,
body.theme-dark-shell .brand-text .title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: var(--text-strong);
    line-height: 1.2;
}

body.theme-dark-shell .shell-brand-subtitle,
body.theme-dark-shell .brand-text .live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--status-success-text);
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    margin-top: 1px;
}

body.theme-dark-shell .shell-live-dot,
body.theme-dark-shell .live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10B981;
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

body.theme-dark-shell .shell-live-dot::after,
body.theme-dark-shell .live-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid #10B981;
    opacity: 0.6;
    animation: liveDotPulse 1.8s ease-out infinite;
}

@keyframes liveDotPulse {
    0% { transform: scale(0.6); opacity: 0.7; }
    100% { transform: scale(2.2); opacity: 0; }
}

body.theme-dark-shell .shell-header-actions,
body.landing-portal .shell-header-actions,
.shell-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
}

/* Capsule Track Container (Desktop Only) */
@media (min-width: 769px) {
    body.theme-dark-shell .shell-nav-links.desktop-nav,
    body.theme-dark-shell .desktop-nav,
    body.landing-portal .shell-nav-links.desktop-nav,
    body.landing-portal .desktop-nav,
    .shell-nav-links.desktop-nav,
    .desktop-nav {
        display: flex !important;
        align-items: center !important;
        gap: 2px !important;
        padding: 4px !important;
        border: 0 !important;
        border-radius: 999px !important;
        background: #eef2f8 !important;
        box-shadow: none !important;
    }
}

/* Tab Item Pill Button */
body.theme-dark-shell .shell-nav-link,
body.theme-dark-shell .desktop-nav .nav-btn,
body.landing-portal .shell-nav-link,
body.landing-portal .desktop-nav .nav-btn,
.shell-nav-link {
    position: relative !important;
    min-height: 40px !important;
    padding: 9px 13px !important;
    border: 1px solid transparent !important;
    border-radius: 999px !important;
    color: #62708a !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.1px !important;
    gap: 7px !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    transform: translateY(0);
    transition: color 160ms ease, background-color 160ms ease,
                box-shadow 160ms ease, transform 160ms ease !important;
}

body.theme-dark-shell .shell-nav-link svg,
body.theme-dark-shell .desktop-nav .nav-btn svg,
body.landing-portal .shell-nav-link svg,
body.landing-portal .desktop-nav .nav-btn svg,
.shell-nav-link svg {
    width: 16px !important;
    height: 16px !important;
    opacity: 0.9;
    stroke-width: 1.75 !important;
    flex-shrink: 0 !important;
    transition: opacity 160ms ease, transform 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
    body.theme-dark-shell .shell-nav-link:hover,
    body.theme-dark-shell .desktop-nav .nav-btn:hover,
    body.landing-portal .shell-nav-link:hover,
    body.landing-portal .desktop-nav .nav-btn:hover,
    .shell-nav-link:hover {
        color: #0E1B33 !important;
        background: rgba(255, 255, 255, 0.72) !important;
    }
    body.theme-dark-shell .shell-nav-link:hover svg,
    body.theme-dark-shell .desktop-nav .nav-btn:hover svg,
    body.landing-portal .shell-nav-link:hover svg,
    body.landing-portal .desktop-nav .nav-btn:hover svg,
    .shell-nav-link:hover svg {
        opacity: 1;
        transform: translateY(-1px);
    }
}

/* Active Capsule Tab Pill */
body.theme-dark-shell .shell-nav-link.active,
body.theme-dark-shell .shell-nav-link[aria-current=page],
body.theme-dark-shell .desktop-nav .nav-btn.active,
body.theme-dark-shell .desktop-nav .nav-btn[aria-current=page],
body.landing-portal .shell-nav-link.active,
body.landing-portal .shell-nav-link[aria-current=page],
.shell-nav-link.active,
.shell-nav-link[aria-current=page] {
    color: var(--theme-accent-text) !important;
    background: #FFFFFF !important;
    font-weight: 700 !important;
    border-color: rgba(36, 81, 196, 0.06) !important;
    box-shadow: 0 1px 2px rgba(14, 27, 51, 0.06),
                0 5px 14px -8px rgba(36, 81, 196, 0.32) !important;
    transform: none !important;
}

body.theme-dark-shell .shell-nav-link.active svg,
body.theme-dark-shell .shell-nav-link[aria-current=page] svg,
body.theme-dark-shell .desktop-nav .nav-btn.active svg,
body.theme-dark-shell .desktop-nav .nav-btn[aria-current=page] svg,
body.landing-portal .shell-nav-link.active svg,
body.landing-portal .shell-nav-link[aria-current=page] svg,
.shell-nav-link.active svg,
.shell-nav-link[aria-current=page] svg {
    opacity: 1 !important;
    stroke: #2451C4 !important;
}

body.theme-dark-shell .shell-nav-link:focus-visible,
body.theme-dark-shell .desktop-nav .nav-btn:focus-visible,
body.landing-portal .shell-nav-link:focus-visible,
body.landing-portal .desktop-nav .nav-btn:focus-visible,
.shell-nav-link:focus-visible {
    outline: 3px solid rgba(36, 81, 196, 0.22) !important;
    outline-offset: 2px;
}

/* Dark Theme Overrides for Capsule Track & Active Pill */
html.dark-theme body.theme-dark-shell .shell-nav-links.desktop-nav,
html.dark-theme body.theme-dark-shell .desktop-nav,
html.dark-theme body.landing-portal .shell-nav-links.desktop-nav,
html.dark-theme body.landing-portal .desktop-nav,
html.dark-theme .shell-nav-links.desktop-nav {
    background: rgba(255, 255, 255, 0.065) !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

html.dark-theme body.theme-dark-shell .shell-nav-link,
html.dark-theme body.theme-dark-shell .desktop-nav .nav-btn,
html.dark-theme body.landing-portal .shell-nav-link,
html.dark-theme body.landing-portal .desktop-nav .nav-btn,
html.dark-theme .shell-nav-link {
    color: rgba(255, 255, 255, 0.70) !important;
}

@media (hover: hover) and (pointer: fine) {
    html.dark-theme body.theme-dark-shell .shell-nav-link:hover,
    html.dark-theme body.theme-dark-shell .desktop-nav .nav-btn:hover,
    html.dark-theme body.landing-portal .shell-nav-link:hover,
    html.dark-theme body.landing-portal .desktop-nav .nav-btn:hover,
    html.dark-theme .shell-nav-link:hover {
        color: #FFFFFF !important;
        background: rgba(255, 255, 255, 0.07) !important;
    }
}

html.dark-theme body.theme-dark-shell .shell-nav-link.active,
html.dark-theme body.theme-dark-shell .shell-nav-link[aria-current=page],
html.dark-theme body.theme-dark-shell .desktop-nav .nav-btn.active,
html.dark-theme body.theme-dark-shell .desktop-nav .nav-btn[aria-current=page],
html.dark-theme body.landing-portal .shell-nav-link.active,
html.dark-theme body.landing-portal .shell-nav-link[aria-current=page],
html.dark-theme .shell-nav-link.active,
html.dark-theme .shell-nav-link[aria-current=page] {
    color: #8faeff !important;
    background: rgba(24, 38, 95, 0.90) !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

html.dark-theme body.theme-dark-shell .shell-nav-link.active svg,
html.dark-theme body.theme-dark-shell .shell-nav-link[aria-current=page] svg,
html.dark-theme body.theme-dark-shell .desktop-nav .nav-btn.active svg,
html.dark-theme body.theme-dark-shell .desktop-nav .nav-btn[aria-current=page] svg,
html.dark-theme body.landing-portal .shell-nav-link.active svg,
html.dark-theme body.landing-portal .shell-nav-link[aria-current=page] svg,
html.dark-theme .shell-nav-link.active svg,
html.dark-theme .shell-nav-link[aria-current=page] svg {
    opacity: 1 !important;
    stroke: #8faeff !important;
}

/* Sign In Pill Button (Royal Blue Brand Gradient) */
body.theme-dark-shell .shell-nav-signin,
body.landing-portal .shell-nav-signin,
.shell-nav-signin {
    position: relative !important;
    min-height: 40px !important;
    padding: 9px 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    border-radius: 999px !important;
    color: #FFFFFF !important;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.32), inset 0 1px 1px rgba(255, 255, 255, 0.35) !important;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease !important;
}

body.theme-dark-shell .shell-nav-signin *,
body.theme-dark-shell .shell-nav-signin span,
body.landing-portal .shell-nav-signin *,
body.landing-portal .shell-nav-signin span,
.shell-nav-signin *,
.shell-nav-signin span {
    color: #FFFFFF !important;
}

body.theme-dark-shell .shell-nav-signin svg,
body.landing-portal .shell-nav-signin svg,
.shell-nav-signin svg {
    width: 15px !important;
    height: 15px !important;
    stroke-width: 2.2 !important;
    flex-shrink: 0 !important;
    stroke: #FFFFFF !important;
    color: #FFFFFF !important;
}

@media (hover: hover) and (pointer: fine) {
    body.theme-dark-shell .shell-nav-signin:hover,
    body.landing-portal .shell-nav-signin:hover,
    .shell-nav-signin:hover {
        transform: translateY(-1px);
        background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%) !important;
        box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.45) !important;
        filter: none !important;
        color: #FFFFFF !important;
    }
}

/* Header Theme Toggle Button (Desktop & Mobile) */
.shell-theme-toggle-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    border: 1px solid var(--border-glass, #E2E8F0) !important;
    background: #FFFFFF !important;
    color: #475569 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease !important;
    box-shadow: 0 1px 3px rgba(14, 27, 51, 0.05) !important;
}

.shell-theme-toggle-btn svg {
    width: 18px !important;
    height: 18px !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2.2 !important;
    flex-shrink: 0 !important;
    transition: transform 200ms ease, opacity 200ms ease !important;
}

/* Light mode: show moon, hide sun */
.shell-theme-toggle-btn .theme-icon-sun {
    display: none !important;
}
.shell-theme-toggle-btn .theme-icon-moon {
    display: block !important;
}

/* Dark mode overrides */
html.dark-theme .shell-theme-toggle-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #F8FAFC !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

html.dark-theme .shell-theme-toggle-btn .theme-icon-moon {
    display: none !important;
}
html.dark-theme .shell-theme-toggle-btn .theme-icon-sun {
    display: block !important;
}

@media (hover: hover) and (pointer: fine) {
    .shell-theme-toggle-btn:hover {
        transform: translateY(-1px);
        border-color: #2451C4 !important;
        color: var(--theme-accent-text) !important;
        box-shadow: 0 4px 12px rgba(36, 81, 196, 0.18) !important;
    }
    html.dark-theme .shell-theme-toggle-btn:hover {
        border-color: rgba(56, 189, 248, 0.5) !important;
        color: #38BDF8 !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6) !important;
    }
}

body.theme-dark-shell .portal-mobile-menu-btn,
body.theme-dark-shell .icon-btn.menu-btn-top,
body.landing-portal .portal-mobile-menu-btn {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border-glass, #E2E8F0);
    background: var(--surface-glass, #ffffff);
    color: var(--text-strong, #0E1B33);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* 4. Mobile Responsiveness Hierarchy */
/* 4.1 Tablets & Mobile Viewports (<= 768px) */
@media (max-width: 768px) {
    body.theme-dark-shell .shell-nav-links.desktop-nav,
    body.theme-dark-shell .desktop-nav,
    body.landing-portal .shell-nav-links.desktop-nav,
    body.landing-portal .desktop-nav,
    .shell-nav-links,
    .shell-nav-links.desktop-nav,
    .desktop-nav,
    .portal-nav-links,
    body.landing-portal .shell-theme-toggle-btn {
        display: none !important;
    }

    body.landing-portal .portal-top-nav,
    body.landing-portal header.portal-top-nav,
    .portal-top-nav {
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(18px) saturate(150%) !important;
        -webkit-backdrop-filter: blur(18px) saturate(150%) !important;
        border-bottom: 1px solid rgba(220, 230, 245, 0.9) !important;
        box-shadow: 0 1px 3px rgba(14, 27, 51, 0.04) !important;
    }

    html.dark-theme body.landing-portal .portal-top-nav,
    html.dark-theme .portal-top-nav {
        background: rgba(6, 11, 24, 0.95) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    }

    body.theme-dark-shell .shell-header-actions,
    body.landing-portal .shell-header-actions,
    .shell-header-actions {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex-shrink: 0 !important;
        flex-wrap: nowrap !important;
    }

    body.theme-dark-shell .portal-mobile-menu-btn,
    body.theme-dark-shell .icon-btn.menu-btn-top,
    body.landing-portal .portal-mobile-menu-btn,
    .portal-mobile-menu-btn {
        display: inline-flex !important;
    }
}

/* 4.2 Standard Mobile Phones (<= 480px: iPhone, Galaxy, Xiaomi) */
@media (max-width: 480px) {
    .portal-brand-subtitle,
    .shell-brand-subtitle,
    .brand-text .live-badge {
        display: none !important;
    }

    .portal-top-nav-inner,
    .shell-nav-container {
        padding: 0 4px !important;
        gap: 8px !important;
    }

    .shell-nav-signin {
        min-height: 36px !important;
        height: 36px !important;
        padding: 6px 13px !important;
        font-size: 12.5px !important;
        gap: 5px !important;
    }

    .shell-nav-signin svg {
        width: 14px !important;
        height: 14px !important;
    }

    .portal-mobile-menu-btn {
        width: 36px !important;
        height: 36px !important;
    }
}

/* 4.3 Ultra-Compact Mobile Phones (<= 360px) */
@media (max-width: 360px) {
    .shell-nav-signin {
        min-height: 34px !important;
        height: 34px !important;
        padding: 5px 10px !important;
    }

    .shell-nav-signin span {
        font-size: 11.5px !important;
    }
}

body.theme-dark-shell .main-wrapper {
    max-width: 860px;
    margin: 0 auto;
    padding: 28px 16px 60px;
}

body.theme-dark-shell .page-title-section {
    margin-bottom: 24px;
}

body.theme-dark-shell .shell-page-title {
    font-family: inherit;
    font-weight: 800;
    font-size: 26px;
    color: var(--text-strong);
    margin-bottom: 6px;
}

body.theme-dark-shell .shell-page-subtitle {
    color: var(--text-body);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

body.theme-dark-shell .shell-divider {
    border-top: 1px solid var(--border-glass) !important;
    padding-top: 18px;
}

body.theme-dark-shell .shell-list {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body.theme-dark-shell .shell-quick-bar {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

body.theme-dark-shell .shell-nav-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
    background: var(--surface-glass);
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

@media (hover: hover) and (pointer: fine) {
    body.theme-dark-shell .shell-nav-btn:hover {
        background: var(--surface-glass-hover);
        border-color: var(--border-glass-hover);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.1), 0 0 12px rgba(56, 189, 248, 0.2);
    }
}

/* 4. Reusable Shell Content Cards */
body.theme-dark-shell .shell-content-card,
body.theme-dark-shell .privacy-card {
    background: var(--surface-glass) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 18px !important;
    padding: 28px 24px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    gap: 22px;
    color: var(--text-body) !important;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
}

html.dark-theme body.theme-dark-shell .shell-content-card,
html.dark-theme body.theme-dark-shell .privacy-card {
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(15, 23, 60, 0.4) !important;
}

body.theme-dark-shell .shell-content-card > div[style*="border-top"],
body.theme-dark-shell .privacy-card > div[style*="border-top"],
body.theme-dark-shell .shell-divider {
    border-top: 1px solid var(--border-glass) !important;
}

/* 5. Disclaimer / Callout Boxes */
body.theme-dark-shell .shell-disclaimer-box,
body.theme-dark-shell div[style*="#FFFBEB"] {
    background: #FFFBEB !important;
    border: 1px solid #FDE68A !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;
    color: #92400E !important;
    font-size: 13.5px;
    line-height: 1.55;
}

html.dark-theme body.theme-dark-shell .shell-disclaimer-box,
html.dark-theme body.theme-dark-shell div[style*="#FFFBEB"] {
    background: rgba(245, 158, 11, 0.08) !important;
    border-color: rgba(245, 158, 11, 0.28) !important;
    color: #FDE68A !important;
}

body.theme-dark-shell .shell-disclaimer-box strong,
body.theme-dark-shell div[style*="#FFFBEB"] strong {
    color: #78350F !important;
}

html.dark-theme body.theme-dark-shell .shell-disclaimer-box strong,
html.dark-theme body.theme-dark-shell div[style*="#FFFBEB"] strong {
    color: #FBBF24 !important;
}

/* 6. Quick Action Navigation Bar */
body.theme-dark-shell .shell-quick-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

body.theme-dark-shell .shell-quick-btn.primary,
.shell-quick-btn.primary {
    background: var(--accent-blue) !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

body.theme-dark-shell .shell-quick-btn.primary *,
body.theme-dark-shell .shell-quick-btn.primary span,
.shell-quick-btn.primary *,
.shell-quick-btn.primary span {
    color: #FFFFFF !important;
}

body.theme-dark-shell .shell-quick-btn.primary svg,
.shell-quick-btn.primary svg {
    color: #FFFFFF !important;
    stroke: #FFFFFF !important;
}

body.theme-dark-shell .shell-quick-btn.secondary,
.shell-quick-btn.secondary {
    background: var(--surface-glass) !important;
    color: var(--text-strong) !important;
    border: 1px solid var(--border-glass) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.theme-dark-shell .shell-quick-btn.secondary *,
body.theme-dark-shell .shell-quick-btn.secondary span,
.shell-quick-btn.secondary *,
.shell-quick-btn.secondary span {
    color: var(--text-strong) !important;
}

body.theme-dark-shell .shell-quick-btn.secondary svg,
.shell-quick-btn.secondary svg {
    stroke: currentColor !important;
}

@media (hover: hover) and (pointer: fine) {
    body.theme-dark-shell .shell-quick-btn.primary:hover,
    .shell-quick-btn.primary:hover {
        background: #1D4ED8 !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
        transform: translateY(-2px);
        box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.45);
        color: #FFFFFF !important;
    }
    body.theme-dark-shell .shell-quick-btn.primary:hover *,
    .shell-quick-btn.primary:hover * {
        color: #FFFFFF !important;
    }
    body.theme-dark-shell .shell-quick-btn.secondary:hover,
    .shell-quick-btn.secondary:hover {
        background: var(--surface-glass-hover) !important;
        border-color: var(--border-glass-hover) !important;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.4), 0 0 12px rgba(56, 189, 248, 0.2);
    }
}

/* Form Submit Buttons */
body.theme-dark-shell button[type="submit"],
body.theme-dark-shell #contactSubmitBtn {
    background: #2451C4 !important;
    color: #FFFFFF !important;
}

body.theme-dark-shell button[type="submit"] *,
body.theme-dark-shell button[type="submit"] span,
body.theme-dark-shell #contactSubmitBtn *,
body.theme-dark-shell #contactSubmitBtn span {
    color: #FFFFFF !important;
}

body.theme-dark-shell button[type="submit"] svg,
body.theme-dark-shell #contactSubmitBtn svg {
    color: #FFFFFF !important;
    stroke: #FFFFFF !important;
}

/* 7. Reusable Shell Footer */
body.theme-dark-shell .shell-footer,
body.theme-dark-shell footer.footer-area {
    margin-top: 48px;
    padding: 28px 16px;
    border-top: 1px solid var(--border-glass) !important;
    text-align: center;
    color: var(--text-muted) !important;
    font-size: 12.5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

body.theme-dark-shell .shell-footer-credit,
body.theme-dark-shell footer.footer-area span {
    color: var(--text-muted);
}

body.theme-dark-shell .shell-footer-credit b,
body.theme-dark-shell footer.footer-area span b,
body.theme-dark-shell .shell-footer-credit strong {
    color: var(--text-strong) !important;
}

body.theme-dark-shell .shell-footer-links,
body.theme-dark-shell footer.footer-area div {
    margin-top: 6px;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

body.theme-dark-shell .shell-footer-links a,
body.theme-dark-shell footer.footer-area a {
    color: var(--text-body) !important;
    text-decoration: none !important;
    font-size: 12.5px;
    font-weight: 500;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 4px 6px;
    transition: color 0.18s ease;
}

@media (hover: hover) and (pointer: fine) {
    body.theme-dark-shell .shell-footer-links a:hover,
    body.theme-dark-shell footer.footer-area a:hover {
        color: var(--accent-cyan) !important;
    }
}

/* 8. Accessibility & Focus Visible */
body.theme-dark-shell :focus-visible {
    outline: 2px solid var(--accent-cyan) !important;
    outline-offset: 3px !important;
}

@media (prefers-reduced-motion: reduce) {
    body.theme-dark-shell *,
    body.theme-dark-shell *::before,
    body.theme-dark-shell *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 9. Responsive Breakpoints (Strictly compliant with AGENTS.md) */
@media (max-width: 768px) {
    body.theme-dark-shell .shell-top-nav,
    body.theme-dark-shell header.top-nav,
    body.theme-dark-shell .shell-content-card,
    body.theme-dark-shell .privacy-card {
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
    }
}

@media (max-width: 480px) {
    body.theme-dark-shell .shell-top-nav,
    body.theme-dark-shell header.top-nav {
        padding: 10px 14px;
    }
    body.theme-dark-shell .main-wrapper {
        padding: 16px 12px 40px !important;
    }
    body.theme-dark-shell .shell-content-card,
    body.theme-dark-shell .privacy-card {
        padding: 20px 16px !important;
        border-radius: 16px !important;
        gap: 18px !important;
    }
    body.theme-dark-shell .shell-brand-title {
        font-size: 14px;
    }
    body.theme-dark-shell .shell-nav-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    body.theme-dark-shell .shell-quick-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 360px) {
    body.theme-dark-shell .shell-top-nav,
    body.theme-dark-shell header.top-nav {
        padding: 8px 10px;
    }
    body.theme-dark-shell .shell-brand {
        gap: 8px;
    }
    body.theme-dark-shell .shell-brand-mark {
        width: 32px;
        height: 32px;
    }
    body.theme-dark-shell .shell-brand-title {
        font-size: 13px;
    }
    body.theme-dark-shell .shell-brand-subtitle {
        font-size: 10px;
    }
    body.theme-dark-shell .shell-content-card,
    body.theme-dark-shell .privacy-card {
        padding: 16px 12px !important;
    }
    body.theme-dark-shell .shell-footer-links,
    body.theme-dark-shell footer.footer-area div {
        gap: 10px;
    }
}
