/* ============================================================
   HudaNav CCO Dashboard — Design System & Styles
   Colors from mobile/src/theme/colors.ts
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-50: #EFF6FF;
    --primary-100: #DBEAFE;
    --primary-200: #BFDBFE;
    --primary-300: #93C5FD;
    --primary-400: #60A5FA;
    --primary-500: #3B82F6;
    --primary-600: #2563EB;
    --primary-700: #1D4ED8;
    --primary-800: #1E40AF;
    --primary-900: #1E3A8A;
    --gold-50: #F8FAFC;
    --gold-100: #F1F5F9;
    --gold-200: #E2E8F0;
    --gold-300: #CBD5E1;
    --gold-400: #94A3B8;
    --gold-500: #64748B;
    --gold-600: #475569;
    --gold-700: #334155;
    --gold-800: #1E293B;
    --gold-900: #0F172A;
    --success: #16A34A;
    --success-light: #F0FDF4;
    --warning: #F59E0B;
    --warning-light: #FFFBEB;
    --error: #DC2626;
    --error-light: #FEF2F2;
    --info: #2563EB;
    --info-light: #EFF6FF;
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-tertiary: #94A3B8;
    --text-inverse: #FFFFFF;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gradient-primary: linear-gradient(135deg, #1D4ED8, #2563EB);
    --gradient-gold: linear-gradient(135deg, #475569, #334155, #1E293B);
    --gradient-dark: linear-gradient(135deg, #0F172A, #1E293B, #334155);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --sidebar-width: 280px;
    --ease: cubic-bezier(.4, 0, .2, 1);
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text-primary);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden
}

h1,
h2,
h3,
h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

a {
    color: var(--primary-500);
    text-decoration: none
}

img {
    max-width: 100%;
    display: block
}

/* ─── Login ─── */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    overflow: hidden
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(13, 115, 119, .3) 0%, transparent 50%), radial-gradient(ellipse at 70% 80%, rgba(212, 165, 116, .15) 0%, transparent 50%);
    animation: loginBg 20s ease-in-out infinite alternate
}

@keyframes loginBg {
    0% {
        transform: rotate(0) scale(1)
    }

    100% {
        transform: rotate(15deg) scale(1.1)
    }
}

.login-card {
    position: relative;
    width: 420px;
    max-width: 92vw;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    animation: cardIn .8s var(--ease) forwards;
    opacity: 0;
    transform: translateY(30px) scale(.96)
}

@keyframes cardIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

.login-brand {
    text-align: center;
    margin-bottom: 36px
}

.login-brand .logo-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    background: var(--primary-100);
    color: var(--primary-600);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-brand h1 {
    color: var(--text-primary);
    font-size: 24px;
    letter-spacing: -.5px
}

.login-brand p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 6px
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all .2s var(--ease);
    outline: none;
    box-shadow: var(--shadow-sm);
}

.form-group input::placeholder {
    color: var(--text-tertiary)
}

.form-group input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100)
}

.login-error {
    background: rgba(198, 40, 40, .15);
    border: 1px solid rgba(198, 40, 40, .3);
    color: #FF8A80;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    display: none;
    animation: shakeIn .5s var(--ease)
}

.login-error.visible {
    display: block
}

@keyframes shakeIn {

    0%,
    100% {
        transform: translateX(0)
    }

    20% {
        transform: translateX(-8px)
    }

    40% {
        transform: translateX(8px)
    }

    60% {
        transform: translateX(-4px)
    }

    80% {
        transform: translateX(4px)
    }
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s var(--ease);
    outline: none;
    position: relative;
    overflow: hidden
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background .3s var(--ease)
}

.btn:hover::after {
    background: rgba(255, 255, 255, .1)
}

.btn:active {
    transform: scale(.97)
}

.btn-primary {
    background: var(--gradient-gold);
    color: var(--text-primary);
    box-shadow: 0 4px 16px rgba(212, 165, 116, .35)
}

.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(212, 165, 116, .5);
    transform: translateY(-1px)
}

.btn-secondary {
    background: var(--gradient-primary);
    color: var(--text-inverse);
    box-shadow: 0 4px 16px rgba(13, 115, 119, .3)
}

.btn-secondary:hover {
    box-shadow: 0 6px 24px rgba(13, 115, 119, .45);
    transform: translateY(-1px)
}

.btn-danger {
    background: linear-gradient(135deg, #C62828, #B71C1C);
    color: var(--text-inverse)
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 16px
}

.btn-ghost:hover {
    background: rgba(0, 0, 0, .04);
    color: var(--text-primary)
}

.btn-sm {
    padding: 8px 18px;
    font-size: 13px
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px
}

.btn-block {
    width: 100%
}

.btn:disabled {
    opacity: 1;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none;
    filter: saturate(.8)
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled {
    color: rgba(255, 255, 255, .96);
    background: linear-gradient(135deg, #8b97a3, #6f7c88)
}

.btn-ghost:disabled {
    color: var(--text-secondary);
    background: rgba(15, 23, 42, .06)
}

.btn .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin .7s linear infinite
}

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

/* ─── Dashboard Shell ─── */
.dashboard {
    display: none;
    min-height: 100vh
}

.dashboard.active {
    display: flex
}

.login-page.hidden {
    display: none
}

/* ─── Sidebar ─── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--gradient-dark);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform .35s var(--ease)
}

.sidebar-header {
    padding: 24px 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .08)
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px
}

.sidebar-brand .brand-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-gold);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(212, 165, 116, .3)
}

.sidebar-brand h2 {
    color: var(--text-inverse);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -.02em;
}

.sidebar-brand small {
    display: block;
    color: rgba(255, 255, 255, .4);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 2px
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, .55);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .25s var(--ease);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit
}

.nav-item:hover {
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .85)
}

.nav-item.active {
    background: rgba(212, 165, 116, .12);
    color: var(--gold-400)
}

.nav-item .nav-icon {
    width: 22px;
    text-align: center;
    font-size: 18px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .05)
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255, 255, 255, .08)
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .06)
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0
}

.user-info {
    flex: 1;
    min-width: 0
}

.user-info .name {
    color: rgba(255, 255, 255, .85);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.user-info .role {
    color: var(--gold-500);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .5px
}

.btn-logout {
    background: none;
    border: none;
    color: rgba(255, 255, 255, .35);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all .2s var(--ease);
    font-size: 18px
}

.btn-logout:hover {
    color: var(--error);
    background: rgba(198, 40, 40, .1)
}

/* ─── Main Content ─── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh
}

.topbar {
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px)
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px
}

.topbar-left h1 {
    font-size: 22px;
    color: var(--text-primary)
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px
}

.api-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    transition: background .2s var(--ease), color .2s var(--ease)
}

.api-indicator.status-connected {
    background: var(--success-light);
    color: var(--success)
}

.api-indicator.status-connecting {
    background: var(--info-light);
    color: var(--info)
}

.api-indicator.status-disconnected {
    background: var(--error-light);
    color: var(--error)
}

.api-indicator .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    animation: pulseDot 2s ease-in-out infinite
}

@keyframes pulseDot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1)
    }

    50% {
        opacity: .5;
        transform: scale(.8)
    }
}

.page-content {
    padding: 32px;
    flex: 1;
    max-width: 1440px
}

.page-section {
    display: none;
    animation: fadeIn .45s var(--ease) forwards
}

.page-section.active {
    display: block
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* ─── Stats ─── */
.dashboard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px;
    margin-bottom: 24px;
    border-radius: var(--radius-xl);
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.dashboard-eyebrow {
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.dashboard-hero h2 {
    font-size: 28px;
    letter-spacing: -.02em;
    margin-bottom: 8px;
}

.dashboard-hero-summary {
    max-width: 760px;
    color: var(--text-secondary);
    font-size: 15px;
}

.dashboard-hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.executive-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.executive-kpi-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, .7);
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .9));
    box-shadow: var(--shadow-sm);
}

.executive-kpi-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
}

.executive-kpi-card.critical::before {
    background: linear-gradient(180deg, #C62828, #EF5350);
}

.executive-kpi-card.warning::before {
    background: linear-gradient(180deg, #EF6C00, #F9A825);
}

.executive-kpi-card.success::before {
    background: linear-gradient(180deg, #2E7D32, #66BB6A);
}

.executive-kpi-card.neutral::before {
    background: var(--gradient-primary);
}

.executive-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.executive-kpi-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 22px;
    background: rgba(13, 115, 119, .08);
}

.executive-kpi-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
}

.executive-kpi-value {
    font-family: inherit;
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.executive-kpi-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}

.executive-kpi-note {
    color: var(--text-tertiary);
    font-size: 13px;
}

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

.dashboard-grid-primary {
    align-items: start;
}

.dashboard-grid-wide {
    grid-template-columns: 1fr;
}

.attention-list {
    display: grid;
    gap: 14px;
}

.attention-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 246, 243, .92));
}

.attention-item.critical {
    border-color: rgba(198, 40, 40, .16);
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 235, 238, .68));
}

.attention-item.warning {
    border-color: rgba(239, 108, 0, .18);
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 243, 224, .78));
}

.attention-item.info {
    border-color: rgba(21, 101, 192, .14);
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(227, 242, 253, .78));
}

.attention-item.success {
    border-color: rgba(46, 125, 50, .14);
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(232, 245, 233, .76));
}

.attention-item-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, .8);
    font-size: 22px;
}

.attention-item-copy h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.attention-item-copy p {
    color: var(--text-secondary);
    font-size: 13px;
}

.pulse-chart {
    display: grid;
    gap: 18px;
}

.pulse-row-head,
.mix-row-head,
.coverage-watchlist-header,
.coverage-watch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pulse-row-head span,
.mix-row-head p,
.coverage-watch-row p,
.mix-footer,
.activity-legend span {
    color: var(--text-secondary);
    font-size: 13px;
}

.pulse-row-head strong,
.mix-row-head strong {
    font-size: 16px;
}

.pulse-track,
.mix-track {
    height: 12px;
    border-radius: var(--radius-full);
    background: rgba(8, 69, 71, .08);
    overflow: hidden;
    margin-top: 10px;
}

.pulse-fill,
.mix-fill {
    height: 100%;
    border-radius: inherit;
}

.pulse-fill.critical,
.mix-fill.critical {
    background: linear-gradient(90deg, #C62828, #EF5350);
}

.pulse-fill.warning,
.mix-fill.warning {
    background: linear-gradient(90deg, #EF6C00, #F9A825);
}

.pulse-fill.info {
    background: linear-gradient(90deg, #1565C0, #42A5F5);
}

.pulse-fill.success,
.mix-fill.success {
    background: linear-gradient(90deg, #2E7D32, #66BB6A);
}

.coverage-panel {
    display: grid;
    gap: 24px;
}

.coverage-summary {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
}

.coverage-ring-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.coverage-ring {
    --coverage: 0%;
    width: 152px;
    height: 152px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle closest-side, white 71%, transparent 72% 100%),
        conic-gradient(var(--primary-500) 0 var(--coverage), rgba(8, 69, 71, .12) var(--coverage) 100%);
}

.coverage-ring-inner {
    display: grid;
    place-items: center;
    text-align: center;
}

.coverage-ring-inner strong {
    font-family: 'Outfit', sans-serif;
    font-size: 30px;
    line-height: 1;
}

.coverage-ring-inner span {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 6px;
}

.coverage-summary-copy h4 {
    font-size: 22px;
    margin-bottom: 8px;
}

.coverage-summary-copy p {
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.coverage-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.coverage-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
}

.coverage-pill.success {
    background: var(--success-light);
    color: var(--success);
}

.coverage-pill.neutral {
    background: rgba(0, 0, 0, .05);
    color: var(--text-secondary);
}

.coverage-pill.info {
    background: var(--info-light);
    color: var(--info);
}

.coverage-watchlist {
    display: grid;
    gap: 12px;
}

.coverage-watchlist-header h5 {
    font-size: 14px;
}

.coverage-watch-row {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--bg);
    border: 1px solid var(--border-light);
}

.coverage-watch-row strong {
    display: block;
    margin-bottom: 4px;
}

.guide-identity-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.guide-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border);
    background: var(--surface);
}

.guide-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guide-avatar-fallback {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: var(--text-inverse);
    font-size: 12px;
    font-weight: 700;
}

.guide-avatar-sm {
    width: 34px;
    height: 34px;
}

.guide-avatar-md {
    width: 40px;
    height: 40px;
}

.guide-avatar-lg {
    width: 44px;
    height: 44px;
}

.guide-avatar-xl {
    width: 72px;
    height: 72px;
}

.mix-chart {
    display: grid;
    gap: 18px;
}

.mix-row-head {
    align-items: flex-start;
}

.mix-row-head p {
    margin-top: 4px;
}

.mix-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 6px;
}

.activity-chart {
    display: grid;
    gap: 18px;
}

.activity-bars {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
    min-height: 240px;
}

.activity-day {
    display: grid;
    justify-items: center;
    gap: 8px;
}

.activity-day strong {
    font-size: 15px;
}

.activity-day span {
    color: var(--text-tertiary);
    font-size: 12px;
}

.activity-bar-stack {
    width: 100%;
    max-width: 82px;
    height: 180px;
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-start;
    gap: 4px;
}

.activity-bar {
    width: 100%;
    min-height: 0;
    border-radius: 16px 16px 10px 10px;
}

.activity-bar.routes,
.legend-swatch.routes {
    background: linear-gradient(180deg, #0D7377, #33A7AB);
}

.activity-bar.incidents,
.legend-swatch.incidents {
    background: linear-gradient(180deg, #C62828, #EF5350);
}

.activity-bar.signups,
.legend-swatch.signups {
    background: linear-gradient(180deg, #D4A574, #E3BD95);
}

.activity-legend {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    display: inline-block;
    margin-right: 8px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px
}

.stat-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .9));
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all .3s var(--ease);
    box-shadow: var(--shadow-sm)
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0
}

.stat-card.teal::before {
    background: var(--gradient-primary)
}

.stat-card.gold::before {
    background: var(--gradient-gold)
}

.stat-card.green::before {
    background: linear-gradient(135deg, #2E7D32, #1B5E20)
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg)
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px
}

.stat-card.teal .stat-icon {
    background: var(--primary-50);
    color: var(--primary-500)
}

.stat-card.gold .stat-icon {
    background: var(--gold-50);
    color: var(--gold-700)
}

.stat-card.green .stat-icon {
    background: var(--success-light);
    color: var(--success)
}

.stat-card .stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 500
}

/* ─── Card ─── */
.card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .93));
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow .3s var(--ease), transform .3s var(--ease);
    box-shadow: var(--shadow-sm)
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px)
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: linear-gradient(180deg, rgba(248, 246, 243, .95), rgba(248, 246, 243, .55))
}

.card-header-spread {
    align-items: flex-start;
}

.card-header h3 {
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 10px
}

.card-header h3 .icon {
    color: var(--primary-500)
}

.card-subtitle {
    color: var(--text-tertiary);
    font-size: 14px;
}

.card-body {
    padding: 24px
}

.card-body.no-padding {
    padding: 0
}

/* ─── Table ─── */
.table-wrapper {
    overflow-x: auto;
    background: linear-gradient(180deg, rgba(248, 246, 243, .45), rgba(255, 255, 255, 0))
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px
}

.data-table thead th {
    padding: 14px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-tertiary);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    white-space: nowrap
}

.data-table tbody tr {
    transition: background .2s var(--ease)
}

.data-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(253, 248, 243, 1), rgba(250, 240, 230, .45))
}

.data-table tbody td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: middle
}

.data-table tbody tr:last-child td {
    border-bottom: none
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600
}

.badge-active {
    background: var(--success-light);
    color: var(--success)
}

.badge-inactive {
    background: var(--error-light);
    color: var(--error)
}

.badge-id {
    background: var(--primary-50);
    color: var(--primary-600);
    font-size: 11px
}

.badge-approved {
    background: var(--success-light);
    color: var(--success)
}

.badge-pending {
    background: var(--warning-light);
    color: var(--warning)
}

.badge-rejected {
    background: var(--error-light);
    color: var(--error)
}

.badge-visible {
    background: rgba(46, 125, 50, .12);
    color: var(--success)
}

.badge-hidden {
    background: rgba(0, 0, 0, .05);
    color: var(--text-secondary)
}

.route-flow-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}

.route-flow-item,
.route-flow-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.route-flow-inline {
    max-width: calc(50% - 16px);
    vertical-align: middle;
}

.route-point-icon,
.action-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    flex-shrink: 0;
}

.route-point-icon svg,
.action-icon svg {
    width: 14px;
    height: 14px;
    display: block;
}

.route-point-icon-start {
    color: var(--success);
    background: rgba(46, 125, 50, .12);
}

.route-point-icon-end {
    color: var(--error);
    background: rgba(198, 40, 40, .12);
}

.action-icon-trash {
    color: inherit;
}

.table-status-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.status-note {
    color: var(--text-tertiary);
    font-size: 12px;
    max-width: 220px;
}

.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-tertiary)
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: .4
}

.empty-state h4 {
    color: var(--text-secondary);
    margin-bottom: 8px
}

.btn-delete-row {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: all .2s var(--ease)
}

.btn-delete-row:hover {
    color: var(--error);
    background: var(--error-light)
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.btn-table-action {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--primary-600);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all .2s var(--ease)
}

.btn-table-action:hover {
    background: var(--primary-50);
    border-color: var(--primary-200)
}

/* ─── Form ─── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px
}

.form-grid .full-width {
    grid-column: 1/-1
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.form-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: .3px
}

.form-field label .required {
    color: var(--error)
}

.form-field input {
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, .9);
    transition: all .25s var(--ease);
    outline: none
}

.form-field input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(13, 115, 119, .1)
}

.form-field input::placeholder {
    color: var(--text-tertiary)
}

.form-field .hint {
    font-size: 12px;
    color: var(--text-tertiary)
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px
}

.list-toolbar {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 20px
}

.list-toolbar-padded {
    padding: 24px 24px 0
}

.list-search {
    width: min(100%, 420px);
    display: flex;
    flex-direction: column;
    gap: 8px
}

.list-search span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: .3px
}

.list-search input {
    width: 100%;
    min-height: 46px;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, .92);
    transition: all .25s var(--ease);
    outline: none
}

.list-search input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(13, 115, 119, .1)
}

.list-search input::placeholder {
    color: var(--text-tertiary)
}

.list-filter {
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 8px
}

.list-filter span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: .3px
}

.list-filter select {
    width: 100%;
    min-height: 46px;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, .92);
    transition: all .25s var(--ease);
    outline: none
}

.list-filter select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(13, 115, 119, .1)
}

.queue-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px
}

.queue-summary-card {
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px
}

.queue-summary-card strong {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    color: var(--text-primary)
}

.queue-summary-card span {
    color: var(--text-secondary);
    font-size: 13px
}

.approval-list {
    display: grid;
    gap: 18px
}

.accordion-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 246, 243, .92));
    box-shadow: var(--shadow-sm);
    overflow: hidden
}

.accordion-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px
}

.accordion-summary::-webkit-details-marker {
    display: none
}

.accordion-summary::after {
    content: '+';
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .86);
    color: var(--primary-600);
    font-size: 22px;
    line-height: 1;
    transition: transform .2s var(--ease), background .2s var(--ease)
}

.accordion-card[open] .accordion-summary::after {
    content: '−';
    background: rgba(13, 115, 119, .08)
}

.accordion-summary-main {
    min-width: 0;
    flex: 1
}

.accordion-summary-main h4 {
    font-size: 20px;
    margin: 0
}

.group-card-top-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px
}

.accordion-summary-subtitle {
    margin: 8px 0 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5
}

.accordion-summary-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px
}

.accordion-summary-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px
}

.accordion-summary-meta span {
    padding: 6px 10px;
    background: rgba(13, 115, 119, .06);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 12px
}

.accordion-body {
    padding: 0 22px 22px;
    border-top: 1px solid var(--border-light)
}

.group-card-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px
}

.group-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 14px
}

.group-stat-card {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--bg);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 4px
}

.group-stat-card strong {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    color: var(--text-primary)
}

.group-stat-card span {
    color: var(--text-secondary);
    font-size: 13px
}

.signup-tabs {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    border-radius: var(--radius-lg);
    background: var(--bg);
    border: 1px solid var(--border-light);
    margin-bottom: 20px
}

.signup-tab {
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 18px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s var(--ease)
}

.signup-tab:hover {
    background: rgba(13, 115, 119, .06);
    color: var(--primary-700)
}

.signup-tab.active {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: #fff;
    box-shadow: var(--shadow-sm)
}

.signup-tab-panel {
    display: none
}

.signup-tab-panel.active {
    display: block
}

.approval-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 246, 243, .92));
    box-shadow: var(--shadow-sm)
}

.approval-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px
}

.approval-card-title-with-avatar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.approval-card-header h4 {
    font-size: 20px
}

.approval-card-eyebrow {
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 4px
}

.approval-card-path {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.approval-card-path .approval-path-separator {
    color: var(--text-tertiary);
    margin: 0 6px
}

.approval-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 18px
}

.approval-card-meta span {
    padding: 6px 10px;
    background: rgba(13, 115, 119, .06);
    border-radius: var(--radius-full)
}

.approval-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap
}

/* ─── Toast ─── */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    font-weight: 500;
    min-width: 300px;
    max-width: 420px;
    animation: toastIn .4s var(--ease-spring) forwards;
    transform: translateX(120%)
}

.toast.removing {
    animation: toastOut .3s var(--ease) forwards
}

@keyframes toastIn {
    to {
        transform: translateX(0)
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateX(120%)
    }
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0
}

.toast.success .toast-icon {
    color: var(--success)
}

.toast.error .toast-icon {
    color: var(--error)
}

.toast.info .toast-icon {
    color: var(--info)
}

.toast .toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    font-size: 16px
}

/* ─── Modal ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    backdrop-filter: blur(4px);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center
}

.modal-overlay.active {
    display: flex
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 32px;
    width: 460px;
    max-width: 92vw;
    box-shadow: var(--shadow-xl);
    animation: modalIn .35s var(--ease-spring) forwards;
    transform: scale(.92);
    opacity: 0
}

.modal-xl {
    width: min(1100px, 92vw);
    max-width: min(1100px, 92vw);
}

@keyframes modalIn {
    to {
        transform: scale(1);
        opacity: 1
    }
}

.modal h3 {
    font-size: 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px
}

.modal p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 24px
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px
}

.route-review-modal {
    max-height: 90vh;
    overflow: auto
}

.route-review-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px
}

.route-review-eyebrow {
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 6px
}

.route-review-subtitle {
    color: var(--text-secondary);
    margin-top: 8px
}

.route-review-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 22px
}

.route-meta-pill {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--bg);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 4px
}

.route-meta-pill strong {
    color: var(--text-primary)
}

.route-meta-pill span {
    color: var(--text-secondary);
    font-size: 13px
}

.route-meta-pill-warning {
    background: var(--warning-light)
}

.route-review-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px
}

.group-detail-modal .route-review-body {
    grid-template-columns: 1fr;
    gap: 18px
}

.group-member-card {
    padding: 22px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 246, 243, .92));
    box-shadow: var(--shadow-sm)
}

.group-member-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px
}

.group-member-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.group-member-card-header h4 {
    margin: 0;
    font-size: 20px
}

.group-members-section {
    display: grid;
    gap: 16px
}

.group-members-heading h4 {
    margin-bottom: 4px
}

.group-members-heading p {
    margin: 0;
    color: var(--text-secondary)
}

.member-edit-form {
    display: grid;
    gap: 16px
}

.member-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px
}

.member-edit-field-wide {
    grid-column: 1 / -1
}

.member-edit-field {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.member-edit-field span,
.group-link-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary)
}

.member-edit-field input,
.member-edit-field select {
    width: 100%;
    min-height: 44px;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, .92);
    outline: none;
    transition: all .25s var(--ease)
}

.member-edit-field input:focus,
.member-edit-field select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(13, 115, 119, .1)
}

.group-link-block {
    display: grid;
    gap: 8px
}

.group-account-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 18px
}

.group-account-meta-item {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: rgba(13, 115, 119, .06);
    border: 1px solid rgba(13, 115, 119, .12)
}

.group-account-meta-item span {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600
}

.group-account-meta-item strong {
    font-size: 14px;
    color: var(--text-primary)
}

.member-edit-actions {
    display: flex;
    justify-content: flex-end
}

.member-photo-editor {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, .86);
    flex-wrap: wrap;
}

.member-photo-preview .guide-avatar {
    box-shadow: var(--shadow-sm);
}

.member-photo-controls {
    display: grid;
    gap: 8px;
    flex: 1;
    min-width: min(100%, 220px);
}

.member-photo-controls input[type='file']::file-selector-button,
.member-photo-controls input[type='file']::-webkit-file-upload-button {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-inline-end: 8px;
}

.member-photo-remove-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.route-review-loading {
    padding: 24px;
    text-align: center;
    color: var(--text-secondary)
}

.route-review-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px
}

.waypoint-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 18px;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 14px
}

.waypoint-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start
}

.waypoint-eyebrow {
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 5px
}

.waypoint-note {
    color: var(--text-secondary);
    line-height: 1.7
}

.waypoint-note-empty,
.waypoint-image-empty {
    color: var(--text-tertiary)
}

.waypoint-image-wrap {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
    background: var(--bg);
    width: 100%;
    padding: 0;
    cursor: zoom-in;
    position: relative;
    text-align: left
}

.waypoint-image {
    width: 100%;
    height: 220px;
    object-fit: cover
}

.waypoint-image-hint {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(17, 24, 39, .74);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    pointer-events: none
}

.image-preview-overlay {
    padding: 32px;
    background: rgba(10, 12, 16, .88)
}

.image-preview-shell {
    width: min(1100px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px
}

.image-preview-close,
.image-preview-link {
    align-self: flex-end
}

.image-preview-close {
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer
}

.image-preview-close:hover,
.image-preview-link:hover {
    opacity: .92
}

.image-preview-image {
    max-width: min(1100px, 100%);
    max-height: calc(100vh - 180px);
    width: auto;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
    background: #fff
}

.image-preview-link {
    color: #fff;
    font-weight: 700;
    text-decoration: underline
}

@media (max-width: 768px) {
    .image-preview-overlay {
        padding: 16px
    }

    .image-preview-image {
        max-height: calc(100vh - 140px)
    }
}

/* ─── Rebuild ─── */
.rebuild-card {
    border: 1.5px solid var(--warning-light);
    background: linear-gradient(135deg, #FFFDF9, var(--surface))
}

.rebuild-card .card-header {
    border-bottom-color: var(--warning-light)
}

.rebuild-info {
    display: flex;
    align-items: flex-start;
    gap: 16px
}

.rebuild-info .info-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--warning-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0
}

.rebuild-info .info-text h4 {
    font-size: 15px;
    margin-bottom: 6px
}

.rebuild-info .info-text p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px
}

/* ─── Skeleton ─── */
.skeleton {
    background: linear-gradient(90deg, var(--border-light) 25%, var(--bg) 50%, var(--border-light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm)
}

@keyframes shimmer {
    0% {
        background-position: 200% 0
    }

    100% {
        background-position: -200% 0
    }
}

.skeleton-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light)
}

.skeleton-row .sk-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%
}

.skeleton-row .sk-text {
    height: 14px;
    flex: 1
}

.skeleton-row .sk-badge {
    width: 60px;
    height: 22px;
    border-radius: var(--radius-full)
}

/* ─── Groups And Signups ─── */
.signup-links-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px
}

.signup-link-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 246, 243, .92));
    box-shadow: var(--shadow-sm)
}

.signup-link-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px
}

.signup-link-card-header h4 {
    margin: 0
}

.signup-link-meta {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 0 8px
}

.signup-link-url {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--bg);
    border: 1px dashed var(--border);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    word-break: break-all
}

.signup-link-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px
}

.signup-request-reason {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--error-light);
    color: var(--error);
    font-size: 14px
}

.signup-request-notes {
    margin-bottom: 18px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: var(--bg);
    border: 1px solid var(--border-light)
}

.signup-request-notes h4 {
    margin: 0 0 8px
}

.signup-request-notes p {
    margin: 0;
    color: var(--text-secondary)
}

.signup-guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px
}

.signup-guide-item {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--bg);
    border: 1px solid var(--border-light)
}

.signup-guide-item span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-tertiary);
    margin-bottom: 4px
}

.signup-guide-item strong {
    color: var(--text-primary)
}

.empty-state.compact {
    min-height: 180px
}

/* ─── Responsive ─── */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-primary);
    padding: 4px
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 99
}

.sidebar-overlay.active {
    display: block
}

@media(max-width:1024px) {
    .dashboard-hero,
    .coverage-summary,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        align-items: stretch;
    }

    .sidebar {
        transform: translateX(-100%)
    }

    .sidebar.open {
        transform: translateX(0)
    }

    .main-content {
        margin-left: 0
    }

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

    .topbar {
        padding: 12px 20px
    }

    .page-content {
        padding: 20px
    }

    .menu-toggle {
        display: block
    }
}

@media(max-width:640px) {
    .executive-kpi-grid,
    .dashboard-grid,
    .activity-bars {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        padding: 24px 20px;
    }

    .dashboard-hero h2 {
        font-size: 26px;
    }

    .attention-item {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .coverage-summary {
        grid-template-columns: 1fr;
    }

    .activity-bar-stack {
        max-width: none;
        height: 120px;
    }

    .stats-row {
        grid-template-columns: 1fr
    }

    .login-card {
        padding: 32px 24px
    }

    .modal {
        margin: 16px
    }

    .route-review-header,
    .approval-card-header,
    .signup-link-card-header,
    .accordion-summary {
        flex-direction: column;
        align-items: stretch
    }

    .accordion-summary::after {
        align-self: flex-end
    }

    .accordion-summary-side,
    .accordion-summary-meta {
        align-items: flex-start;
        justify-content: flex-start
    }

    .table-actions {
        justify-content: flex-start;
        flex-wrap: wrap
    }

    .list-toolbar {
        justify-content: stretch
    }

    .list-search {
        width: 100%
    }

    .list-filter {
        width: 100%
    }

    .signup-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr
    }

    .signup-link-actions {
        flex-direction: column
    }

    .signup-guide-grid {
        grid-template-columns: 1fr
    }
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px
}

::-webkit-scrollbar-track {
    background: transparent
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full)
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary)
}
