@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:ital,wght@0,500;0,600;0,700;1,700&family=Oxanium:wght@500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ==========================================================================
   SPU PROXY / INTER-KNOT SURVEY PROTOCOL - ZENLESS ZONE ZERO DESIGN SYSTEM
   ========================================================================== */

:root {
    /* Fonts */
    --font-heading: 'Oxanium', 'Chakra Petch', sans-serif;
    --font-body: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Chakra Petch', monospace;

    /* Light Mode: Eridu Day */
    --bg-canvas: #F4F4F0;
    --bg-surface: #FFFFFF;
    --bg-surface-elevated: #EAEAE4;
    --bg-surface-contrast: #111111;
    --ink-primary: #111111;
    --ink-secondary: #4A4D59;
    --ink-tertiary: #7D8294;
    --ink-inverse: #F4F4F0;

    --hazard-orange: #FF5500;
    --hazard-orange-glow: rgba(255, 85, 0, 0.45);
    --cyber-cyan: #00B8D9;
    --cyber-cyan-glow: rgba(0, 184, 217, 0.3);
    --crimson-red: #E01E37;
    --crimson-red-glow: rgba(224, 30, 55, 0.3);
    --neon-yellow: #FFD000;
    --ether-purple: #9D00FF;

    --border-color: #111111;
    --border-width: 2.5px;
    --border-style: solid var(--border-color);

    --shadow-base: 4px 4px 0px #111111;
    --shadow-lg: 6px 6px 0px #111111;
    --shadow-sm: 2px 2px 0px #111111;
    --shadow-hover: 5px 5px 0px #FF5500;

    --hazard-stripe: repeating-linear-gradient(-45deg, #FF5500 0, #FF5500 12px, #111111 12px, #111111 24px);
    --hazard-stripe-yellow: repeating-linear-gradient(-45deg, #FFE500 0, #FFE500 12px, #111111 12px, #111111 24px);
    --hazard-stripe-subtle: repeating-linear-gradient(-45deg, #EAEAE4, #EAEAE4 10px, #D0D0C8 10px, #D0D0C8 20px);
    --dot-grid: radial-gradient(#D2D2C8 1.5px, transparent 1.5px);
    --grid-bg-size: 20px 20px;
    
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-pill: 999px;

    /* ZZZ Tech Geometry Cuts */
    --clip-chamfer-sm: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
    --clip-chamfer: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
    --clip-chamfer-lg: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    --clip-slant-tab: polygon(0 0, calc(100% - 12px) 0, 100% 100%, 0 100%);

    --transition-snappy: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode: Hollow Night */
[data-theme="dark"] {
    --bg-canvas: #0D0E12;
    --bg-surface: #181A22;
    --bg-surface-elevated: #212430;
    --bg-surface-contrast: #F4F4F0;
    --ink-primary: #F4F4F0;
    --ink-secondary: #9DA3B4;
    --ink-tertiary: #5E6475;
    --ink-inverse: #0D0E12;

    --hazard-orange: #FF5500;
    --hazard-orange-glow: rgba(255, 85, 0, 0.5);
    --cyber-cyan: #00E5FF;
    --cyber-cyan-glow: rgba(0, 229, 255, 0.4);
    --crimson-red: #FF1E44;
    --crimson-red-glow: rgba(255, 30, 68, 0.45);
    --neon-yellow: #FFE500;
    --ether-purple: #B53DF5;

    --border-color: #353B4B;
    --shadow-base: 4px 4px 0px #000000;
    --shadow-lg: 6px 6px 0px #000000;
    --shadow-sm: 2px 2px 0px #000000;
    --shadow-hover: 5px 5px 0px #FF5500;

    --hazard-stripe: repeating-linear-gradient(-45deg, #FF5500 0, #FF5500 12px, #0D0E12 12px, #0D0E12 24px);
    --hazard-stripe-yellow: repeating-linear-gradient(-45deg, #FFE500 0, #FFE500 12px, #0D0E12 12px, #0D0E12 24px);
    --hazard-stripe-subtle: repeating-linear-gradient(-45deg, #181A22, #181A22 10px, #212430 10px, #212430 20px);
    --dot-grid: radial-gradient(#242938 1.5px, transparent 1.5px);
}

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

body {
    background-color: var(--bg-canvas);
    background-image: var(--dot-grid);
    background-size: var(--grid-bg-size);
    color: var(--ink-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.25s ease, color 0.25s ease;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.mono {
    font-family: var(--font-mono);
}

/* Hazard Headers & Stripes */
.hazard-stripe-top {
    height: 10px;
    width: 100%;
    background: var(--hazard-stripe);
}

/* Tape Badges */
.tape-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 8px;
    border: 1.5px solid #000;
    box-shadow: 2px 2px 0px #000;
    transform: rotate(-1.5deg);
    white-space: nowrap;
    user-select: none;
}

.tape-orange { background: var(--hazard-orange); color: #FFF; }
.tape-cyan   { background: var(--cyber-cyan); color: #000; }
.tape-yellow { background: var(--neon-yellow); color: #000; }
.tape-red    { background: var(--crimson-red); color: #FFF; }
.tape-dark   { background: #111111; color: #FFF; border-color: #333; }
.tape-ghost  { background: var(--bg-surface-elevated); color: var(--ink-primary); border-color: var(--border-color); }

/* ZZZ Button Styles */
.btn-zzz {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    padding: 10px 18px;
    border: var(--border-width) solid #000;
    background: var(--bg-surface);
    color: var(--ink-primary);
    box-shadow: var(--shadow-base);
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--transition-snappy), box-shadow var(--transition-snappy), background-color var(--transition-snappy);
    border-radius: var(--radius-sm);
    position: relative;
    user-select: none;
}

.btn-zzz:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-hover);
}

.btn-zzz:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px #000;
}

.btn-zzz-primary {
    background: var(--hazard-orange);
    color: #FFFFFF;
}
.btn-zzz-primary:hover {
    background: #E64C00;
    box-shadow: 6px 6px 0px #000;
}

.btn-zzz-cyan {
    background: var(--cyber-cyan);
    color: #000000;
}
.btn-zzz-cyan:hover {
    background: #00C8E0;
    box-shadow: 6px 6px 0px #000;
}

.btn-zzz-danger {
    background: var(--crimson-red);
    color: #FFFFFF;
}

.btn-zzz-ghost {
    background: transparent;
    border-color: var(--border-color);
    color: var(--ink-primary);
    box-shadow: var(--shadow-sm);
}

.btn-zzz-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-zzz-lg {
    padding: 14px 28px;
    font-size: 16px;
    letter-spacing: 1px;
}

.btn-zzz-pill {
    border-radius: var(--radius-pill);
}

/* ZZZ Cards & Containers */
.zzz-card {
    background: var(--bg-surface);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-base);
    border-radius: var(--radius-sm);
    position: relative;
    transition: transform var(--transition-snappy), box-shadow var(--transition-snappy);
}

.zzz-card:hover {
    box-shadow: var(--shadow-lg);
}

.zzz-card-header {
    padding: 14px 18px;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-surface-elevated);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.zzz-card-body {
    padding: 20px;
}

.zzz-card-footer {
    padding: 14px 18px;
    border-top: 2px solid var(--border-color);
    background: var(--bg-surface-elevated);
}

/* Form Controls */
.zzz-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--ink-secondary);
    margin-bottom: 6px;
}

.zzz-input, .zzz-select, .zzz-textarea {
    width: 100%;
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--ink-primary);
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    outline: none;
    transition: border-color var(--transition-snappy), box-shadow var(--transition-snappy);
}

.zzz-input:focus, .zzz-select:focus, .zzz-textarea:focus {
    border-color: var(--hazard-orange);
    box-shadow: 3px 3px 0px var(--hazard-orange);
}

/* Kinetic Pill Tabs */
.tab-bar-kinetic {
    display: flex;
    gap: 8px;
    background: var(--bg-surface-elevated);
    padding: 6px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-pill);
    overflow-x: auto;
    scrollbar-width: none;
}
.tab-bar-kinetic::-webkit-scrollbar { display: none; }

.tab-pill {
    padding: 8px 18px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-pill);
    border: 2px solid transparent;
    background: transparent;
    color: var(--ink-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-snappy);
    user-select: none;
}

.tab-pill:hover {
    color: var(--ink-primary);
    background: rgba(255, 85, 0, 0.1);
}

.tab-pill.active {
    background: var(--hazard-orange);
    color: #FFFFFF;
    border-color: #000;
    box-shadow: 2px 2px 0px #000;
}

/* Telemetry Top Bar */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--bg-surface);
    border-bottom: 3px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.topbar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink-primary);
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: #000;
    color: var(--hazard-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    border: 2px solid var(--hazard-orange);
    box-shadow: 2px 2px 0px var(--hazard-orange);
    transform: rotate(-3deg);
}

.brand-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.5px;
    line-height: 1.1;
}
.brand-sub {
    font-size: 11px;
    color: var(--ink-tertiary);
    letter-spacing: 1px;
}

/* Mission Telemetry Box */
.mission-telemetry-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface-contrast);
    color: var(--ink-inverse);
    padding: 6px 14px;
    border: 2px solid var(--border-color);
    box-shadow: 3px 3px 0px var(--hazard-orange);
    border-radius: var(--radius-sm);
    position: relative;
    cursor: default;
}

.telemetry-pulse {
    width: 8px;
    height: 8px;
    background: #00FF66;
    border-radius: 50%;
    box-shadow: 0 0 8px #00FF66;
    animation: blinker 1.2s infinite;
}

@keyframes blinker {
    50% { opacity: 0.3; }
}

.telemetry-counter {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--hazard-orange);
    letter-spacing: 1px;
}

/* Pager Icon & Dropdown */
.pager-toggle-btn {
    position: relative;
    padding: 8px 12px;
}

.pager-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--crimson-red);
    color: #FFF;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #000;
    box-shadow: 1px 1px 0px #000;
}

/* Pager Overlay Drawer */
.pager-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-surface);
    border-left: 3px solid var(--border-color);
    box-shadow: -6px 0 20px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: right 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.pager-drawer.open {
    right: 0;
}

.pager-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.pager-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* Notifications Items */
.notif-item {
    border: 2px solid var(--border-color);
    background: var(--bg-surface-elevated);
    box-shadow: 2px 2px 0px var(--border-color);
    padding: 12px;
    margin-bottom: 12px;
    border-radius: var(--radius-sm);
    position: relative;
    transition: transform 0.1s;
}
.notif-item.unread {
    border-left: 6px solid var(--hazard-orange);
    background: var(--bg-surface);
}
.notif-item.emergency {
    border-left: 6px solid var(--crimson-red);
    background: rgba(255, 30, 68, 0.05);
}

/* Modal Overlay */
.zzz-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.zzz-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.zzz-modal {
    background: var(--bg-surface);
    border: 3px solid var(--border-color);
    box-shadow: 8px 8px 0px var(--border-color);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--radius-sm);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.zzz-modal-backdrop.active .zzz-modal {
    transform: scale(1);
}

/* Interactive Tutorial Highlight & Spotlights */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    pointer-events: none;
    transition: all 0.3s ease;
}

.tutorial-spotlight-box {
    position: absolute;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.8), 0 0 15px var(--hazard-orange);
    border: 3px solid var(--hazard-orange);
    border-radius: 4px;
    pointer-events: auto;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tutorial-card {
    position: absolute;
    background: #181A20;
    color: #FFF;
    border: 3px solid var(--border-color);
    box-shadow: 6px 6px 0px var(--hazard-orange);
    padding: 20px;
    width: 320px;
    max-width: calc(100vw - 40px);
    z-index: 2001;
    pointer-events: auto;
    transition: all 0.3s ease;
}

/* Survey Option Pills */
.survey-option-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    user-select: none;
    transition: all var(--transition-snappy);
    margin-bottom: 10px;
}

.survey-option-pill:hover {
    border-color: var(--hazard-orange);
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-base);
}

.survey-option-pill.selected {
    background: var(--hazard-orange);
    color: #FFFFFF;
    border-color: #000;
    box-shadow: 3px 3px 0px #000;
}
.survey-option-pill.selected .option-indicator {
    background: #000;
    color: var(--hazard-orange);
    border-color: #000;
}

.option-indicator {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
}

/* Political Party Flag Badge in Survey & Analytics */
.party-flag-badge {
    width: 60px;
    height: 38px;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: 2px 2px 0px #000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #090B10;
    flex-shrink: 0;
    transition: all var(--transition-snappy);
}

.survey-option-pill:hover .party-flag-badge {
    border-color: var(--hazard-orange);
    transform: scale(1.05);
}

.survey-option-pill.selected .party-flag-badge {
    border-color: #000;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.4);
}

.party-flag-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.party-flag-badge-sm {
    width: 34px;
    height: 22px;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #000;
    vertical-align: middle;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Rating Scale Bar */
.rating-scale-group {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin: 16px 0;
}

.rating-btn {
    flex: 1;
    height: 50px;
    border: 2px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--ink-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-snappy);
}
.rating-btn:hover {
    background: var(--bg-surface-elevated);
    transform: translateY(-2px);
    box-shadow: var(--shadow-base);
}
.rating-btn.selected {
    background: var(--hazard-orange);
    color: #FFF;
    border-color: #000;
    box-shadow: 3px 3px 0px #000;
}

/* Leaflet Map Tactical Filter */
.tactical-map-container {
    height: 480px;
    width: 100%;
    border: 2.5px solid var(--border-color);
    box-shadow: var(--shadow-base);
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .leaflet-layer,
[data-theme="dark"] .leaflet-control-zoom-in,
[data-theme="dark"] .leaflet-control-zoom-out,
[data-theme="dark"] .leaflet-control-attribution {
    filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

/* Progress Step Bar */
.step-progress-bar {
    height: 6px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.step-progress-fill {
    height: 100%;
    background: var(--hazard-orange);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Utility classes */
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-orange { color: var(--hazard-orange); }
.text-cyan   { color: var(--cyber-cyan); }
.text-red    { color: var(--crimson-red); }

/* Responsive adjustments */
@media (max-width: 768px) {
    .topbar-content {
        padding: 8px 12px;
    }
    .brand-title {
        font-size: 15px;
    }
    .brand-sub {
        display: none;
    }
    .mission-telemetry-box {
        padding: 4px 8px;
        font-size: 12px;
    }
    .telemetry-counter {
        font-size: 14px;
    }
    .btn-zzz {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* ==========================================================================
   APP SIDEBAR & MODERN DASHBOARD LAYOUT
   ========================================================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 260px;
    background: var(--bg-surface);
    border-right: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    background: var(--hazard-orange);
    color: #FFF;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    box-shadow: 2px 2px 0px #000;
}

.sidebar-brand-name {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink-primary);
}

.sidebar-brand-sub {
    font-size: 11px;
    color: var(--ink-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-user-card {
    padding: 14px 20px;
    border-bottom: 1px dashed var(--border-color);
    background: var(--bg-surface-elevated);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.nav-item-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--ink-primary);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.nav-item-btn:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--border-color);
    color: var(--hazard-orange);
}

.nav-item-btn.active {
    background: var(--hazard-orange);
    color: #FFF;
    border-color: var(--hazard-orange);
    box-shadow: 3px 3px 0px #000;
}

.sidebar-footer {
    padding: 16px;
    border-top: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-main-content {
    flex: 1;
    margin-left: 260px;
    padding: 24px 30px 80px 30px;
    min-height: 100vh;
    box-sizing: border-box;
    max-width: 1280px;
}

.mobile-topbar {
    display: none;
    height: 56px;
    background: var(--bg-surface);
    border-bottom: 2px solid var(--border-color);
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.65);
    z-index: 99;
}

/* Question location pill in survey */
.question-geo-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--cyber-cyan);
}

/* PDF Print Formatting */
@media print {
    .app-sidebar, .mobile-topbar, .btn-zzz, .sidebar-backdrop {
        display: none !important;
    }
    .app-main-content {
        margin-left: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
    }
    body {
        background: #FFF !important;
        color: #000 !important;
    }
    .zzz-card {
        box-shadow: none !important;
        border: 1px solid #CCC !important;
        page-break-inside: avoid;
    }
}

@media (max-width: 900px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.open {
        transform: translateX(0);
    }
    .sidebar-backdrop.active {
        display: block;
    }
    .app-main-content {
        margin-left: 0;
        padding: 16px;
    }
    .mobile-topbar {
        display: flex;
    }
}

/* ==========================================================================
   ZENLESS ZONE ZERO VISUAL UPGRADE // STREETWEAR & TACTICAL INTER-KNOT UI
   ========================================================================== */

/* 1. Sidebar ZZZ Aesthetic Overhaul */
.sidebar-brand-avatar-box {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #000;
    border: 2px solid var(--hazard-orange);
    box-shadow: 0 0 10px rgba(255, 85, 0, 0.4), inset 0 0 4px #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

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

.sidebar-header {
    background: var(--bg-surface-elevated);
    border-bottom: 3px solid var(--border-color);
    position: relative;
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--hazard-stripe);
}

.sidebar-brand-name {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--hazard-orange);
    text-shadow: 1px 1px 0px #000;
}

.sidebar-brand-sub {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--cyber-cyan);
    letter-spacing: 0.5px;
}

/* Sidebar Normal User Counter Chip */
.sidebar-counter-chip {
    margin-top: 10px;
    padding: 8px 12px;
    background: #0A0B0E;
    border: 1.5px solid var(--hazard-orange);
    border-radius: 4px;
    box-shadow: 2px 2px 0px #000;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-counter-chip .chip-label {
    font-size: 11px;
    font-weight: 700;
    color: #9DA3B4;
    letter-spacing: 0.5px;
}

.sidebar-counter-chip .chip-value {
    font-size: 14px;
    font-weight: 800;
    color: var(--hazard-orange);
    text-shadow: 0 0 8px rgba(255, 85, 0, 0.6);
}

/* Cassette Style Nav Items */
.nav-item-btn {
    position: relative;
    border: 2px solid transparent;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 12px 14px;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item-btn::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 12px;
    background: transparent;
    border-radius: 1px;
    transition: all 0.15s ease;
}

.nav-item-btn:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--border-color);
    transform: translateX(4px);
    box-shadow: 3px 3px 0px #000;
    color: var(--hazard-orange);
}

.nav-item-btn:hover::before {
    background: var(--hazard-orange);
}

.nav-item-btn.active {
    background: var(--hazard-orange);
    color: #000 !important;
    font-weight: 800;
    border-color: #000;
    box-shadow: 4px 4px 0px #000;
    transform: translateX(3px);
}

.nav-item-btn.active::before {
    background: #000;
}

/* 2. ZZZ Normal User Response Counter Terminal Box */
.zzz-counter-terminal-card {
    background: #12141C;
    border: 2.5px solid var(--border-color);
    box-shadow: 5px 5px 0px #000;
    clip-path: var(--clip-chamfer);
    position: relative;
    overflow: hidden;
}

.card-hazard-stripe,
.hazard-stripe-top {
    height: 8px;
    width: 100%;
    background: var(--hazard-stripe);
}

.counter-terminal-inner {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    background: radial-gradient(circle at 90% 50%, rgba(255, 85, 0, 0.08) 0%, transparent 60%);
}

.counter-terminal-left {
    flex: 1;
    min-width: 260px;
}

.counter-terminal-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--ink-primary);
    margin: 6px 0 4px 0;
    letter-spacing: 0.5px;
}

.counter-terminal-subtitle {
    font-size: 13px;
    color: var(--ink-secondary);
    line-height: 1.4;
}

.counter-terminal-right {
    flex-shrink: 0;
}

.zzz-counter-display-box {
    background: #090A0E;
    border: 2px solid var(--hazard-orange);
    box-shadow: 0 0 15px rgba(255, 85, 0, 0.25), inset 0 0 12px rgba(0,0,0,0.8);
    padding: 14px 22px;
    text-align: center;
    min-width: 180px;
    position: relative;
    clip-path: var(--clip-chamfer-sm);
}

.counter-giant-digits {
    font-size: 48px;
    font-weight: 900;
    line-height: 1;
    color: var(--hazard-orange);
    text-shadow: 0 0 12px rgba(255, 85, 0, 0.7), 2px 2px 0px #000;
    margin: 4px 0;
    letter-spacing: 2px;
}

.counter-metric-sub {
    font-size: 10px;
    font-weight: 700;
    color: var(--ink-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.counter-metric-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--neon-yellow);
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00FF66;
    box-shadow: 0 0 8px #00FF66;
    animation: zzzPulse 1.5s infinite;
}

.zzz-live-pulse-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #00FF66;
    background: rgba(0, 255, 102, 0.1);
    border: 1px solid rgba(0, 255, 102, 0.3);
    padding: 3px 8px;
    border-radius: 3px;
}

.zzz-tech-code {
    font-size: 11px;
    color: var(--cyber-cyan);
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.3);
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: 700;
}

@keyframes zzzPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* 3. Tactical In-Page Survey Card Overhaul */
.survey-inpage-card {
    background: var(--bg-surface);
    border: 2.5px solid var(--border-color);
    box-shadow: 6px 6px 0px #000;
    clip-path: var(--clip-chamfer);
    padding: 26px 30px;
    max-width: 820px;
    margin: 0 auto;
    position: relative;
}

/* Duct Tape Badges (Angled Streetwear Vibe) */
.tape-badge {
    display: inline-block;
    padding: 4px 10px;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    transform: rotate(-1.5deg);
    box-shadow: 2px 2px 0px rgba(0,0,0,0.5);
    border-radius: 1px;
}

.tape-badge:nth-child(even) {
    transform: rotate(1deg);
}

.tape-orange {
    background: var(--hazard-orange);
    color: #000;
    border: 1px solid #000;
}

.tape-yellow {
    background: var(--neon-yellow);
    color: #000;
    border: 1px solid #000;
}

.tape-cyan {
    background: var(--cyber-cyan);
    color: #000;
    border: 1px solid #000;
}

.tape-red {
    background: var(--crimson-red);
    color: #FFF;
    border: 1px solid #000;
}

.tape-ghost {
    background: var(--bg-surface-elevated);
    color: var(--ink-primary);
    border: 1px solid var(--border-color);
}

/* Tactical Cartridge Option Pills */
.survey-option-pill {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-surface-elevated);
    border: 2px solid var(--border-color);
    box-shadow: 3px 3px 0px #000;
    clip-path: var(--clip-chamfer-sm);
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.survey-option-pill:hover {
    border-color: var(--hazard-orange);
    transform: translate(-3px, -3px);
    box-shadow: 5px 5px 0px var(--hazard-orange);
}

.survey-option-pill.selected {
    background: rgba(255, 85, 0, 0.16);
    border-color: var(--hazard-orange);
    box-shadow: 4px 4px 0px var(--hazard-orange);
    transform: translate(-2px, -2px);
}

.option-indicator {
    width: 32px;
    height: 32px;
    background: #0B0D12;
    border: 2px solid var(--border-color);
    color: #FFF;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: var(--clip-chamfer-sm);
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.survey-option-pill:hover .option-indicator {
    border-color: var(--hazard-orange);
    color: var(--hazard-orange);
}

.survey-option-pill.selected .option-indicator {
    background: var(--hazard-orange);
    border-color: var(--hazard-orange);
    color: #000;
    box-shadow: 0 0 8px rgba(255, 85, 0, 0.6);
}

/* ZZZ Action Buttons */
.btn-zzz {
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: 2px solid #000;
    box-shadow: 4px 4px 0px #000;
    clip-path: var(--clip-chamfer-sm);
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.btn-zzz:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--hazard-orange);
}

.btn-zzz:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px #000;
}

.btn-zzz-primary {
    background: var(--hazard-orange);
    color: #000;
}

.btn-zzz-cyan {
    background: var(--cyber-cyan);
    color: #000;
}

.btn-zzz-danger {
    background: var(--crimson-red);
    color: #FFF;
}

/* Metric Cards on Dashboard */
.metric-card {
    background: var(--bg-surface);
    border: 2.5px solid var(--border-color);
    box-shadow: 4px 4px 0px #000;
    clip-path: var(--clip-chamfer-sm);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    bottom: 0;
    background: var(--hazard-orange);
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 900;
    color: var(--hazard-orange);
    letter-spacing: 1px;
}

/* ==========================================================================
   Political Party Flag Badges (ZZZ Aesthetic)
   ========================================================================== */
.party-flag-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 30px;
    border-radius: 4px;
    border: 1.5px solid var(--border-color);
    background: #0d0e12;
    box-shadow: 2px 2px 0px #000;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 12px;
    transition: transform var(--transition-snappy), border-color var(--transition-snappy);
}

.party-flag-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.survey-option-pill:hover .party-flag-badge {
    transform: scale(1.08);
    border-color: var(--hazard-orange);
}

.survey-option-pill.selected .party-flag-badge {
    border-color: #000;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.5);
}

.party-flag-badge-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 17px;
    border-radius: 3px;
    border: 1px solid var(--border-color);
    background: #0d0e12;
    overflow: hidden;
    flex-shrink: 0;
    vertical-align: middle;
    margin-right: 6px;
}

/* ==========================================================================
   Question 2: Pure Logo Options Grid (No Justification, Picture Only)
   ========================================================================== */
.logo-only-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 18px 0;
}

@media (min-width: 580px) {
    .logo-only-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

.logo-only-card {
    background: var(--bg-surface-elevated);
    border: 2.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 18px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-snappy);
    box-shadow: 3px 3px 0px #000;
    min-height: 125px;
    user-select: none;
    touch-action: manipulation;
}

.logo-only-card:hover {
    border-color: var(--hazard-orange);
    transform: translateY(-2px);
    box-shadow: 4px 4px 0px #000;
}

.logo-only-card.selected {
    border-color: var(--hazard-orange);
    background: rgba(255, 85, 0, 0.12);
    box-shadow: 3px 3px 0px var(--hazard-orange);
}

.logo-only-card .option-indicator {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 26px;
    height: 26px;
    font-size: 12px;
    border-radius: 50%;
}

.logo-only-card.selected .option-indicator {
    background: var(--hazard-orange);
    color: #000;
    font-weight: 800;
}

.logo-only-img-container {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.logo-only-img {
    max-width: 100%;
    max-height: 75px;
    object-fit: contain;
    filter: drop-shadow(0px 2px 5px rgba(0,0,0,0.6));
    transition: transform var(--transition-snappy);
}

.logo-only-card:hover .logo-only-img {
    transform: scale(1.06);
}

/* ==========================================================================
   Mobile-Friendly Enhancements for All Phones (iPhone, Samsung, Android)
   ========================================================================== */
@media (max-width: 768px) {
    .app-layout {
        overflow-x: hidden;
    }

    .app-main-content {
        padding: 12px 10px 40px 10px !important;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .survey-card {
        padding: 16px 14px !important;
        border-width: 2px;
        box-shadow: 3px 3px 0px #000;
    }

    .counter-terminal-inner {
        flex-direction: column !important;
        gap: 12px !important;
        padding: 14px 12px !important;
    }

    .counter-terminal-right {
        border-left: none !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 10px;
        width: 100%;
        justify-content: flex-start;
    }

    .counter-terminal-title {
        font-size: 16px !important;
    }

    .counter-terminal-subtitle {
        font-size: 12px !important;
    }

    .survey-option-pill {
        padding: 12px 14px !important;
        min-height: 48px;
    }

    .btn-zzz {
        min-height: 44px;
        touch-action: manipulation;
    }

    .logo-only-grid {
        gap: 10px;
    }

    .logo-only-card {
        padding: 14px 8px;
        min-height: 110px;
    }

    .logo-only-img-container {
        height: 70px;
    }

    .logo-only-img {
        max-height: 65px;
    }
}

@media (max-width: 380px) {
    .logo-only-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .logo-only-img {
        max-height: 55px;
    }
}

