:root {
    --c-nav: #002855;
    --c-brand-green: #3ECF8E;
    --c-cool-gray: #616365;
    --c-alert-red: #ff3366;
    --c-warn-orange: #ffaa00;
    --c-info-blue: #33aaff;
    --c-dark-bg: #002855;
    --c-dark-panel: #001a38;
    --c-light-bg: #002855;
    --c-light-panel: #ffffff;
    --omnicomm-blue: var(--c-nav);
    --omnicomm-cool-gray: var(--c-cool-gray);
    --brand-green: var(--c-brand-green);
    --alert-red: var(--c-alert-red);
    --warn-orange: var(--c-warn-orange);
    --info-blue: var(--c-info-blue);
    --bg-dark: var(--c-dark-bg);
    --panel-bg: var(--c-dark-panel);
    --border-color: rgba(255, 255, 255, 0.1);
    --brand-green-dim: rgba(62, 207, 142, 0.15);
    --warn-orange-dim: rgba(255, 170, 0, 0.3);
    --text-main: #EDEDED;
    --text-muted: #B0B0B0;
    --text-card: #CCCCCC;
    --text-footer: #D0D0D0;
}

body.light-theme {
    --bg-dark: var(--c-light-bg);
    --panel-bg: var(--c-light-panel);
    --border-color: rgba(97, 99, 101, 0.2);
    --text-main: #111111;
    --text-muted: #555555;
    --text-card: #333333;
    --text-footer: #444444;
}

body, html {
    margin: 0; padding: 0; width: 100%; height: 100dvh;
    background-color: var(--bg-dark);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-y: auto;
    transition: background-color 0.3s, color 0.3s;
}

/* Scroll block helper for modals */
body.modal-open {
    overflow: hidden !important;
    touch-action: none;
}

.mono { font-family: "JetBrains Mono", Consolas, monospace; }

.app-container {
    display: flex; flex-direction: column; width: 100%; min-height: 100dvh;
}

/* Top Nav */
.top-nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 30px; background: var(--omnicomm-blue);
    border-bottom: 1px solid rgba(255,255,255,0.15);
    flex-shrink: 0; color: #EDEDED; transition: background 0.3s;
}
.logo { display: flex; align-items: center; gap: 15px; font-size: 1.2rem; font-weight: 400; letter-spacing: -0.5px; }
.nav-logo-img { height: 38px; width: auto; object-fit: contain; }
.logo-divider { width: 1px; height: 26px; background: rgba(255,255,255,0.2); }
.logo-text { color: #fff; }
.nav-right { display: flex; align-items: stretch; gap: 10px; }
.nav-btn {
    background: #FA4616; color: #fff; border: none; padding: 8px 16px; border-radius: 6px;
    font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; text-align: center;
}
.nav-btn:hover { background: #e03f14; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(250,70,22,0.4); }

/* theme-toggle now lives in app footer */
.theme-toggle {
    background: transparent; border: 1px solid rgba(255,255,255,0.2); color: var(--text-muted);
    border-radius: 6px; padding: 5px 8px; cursor: pointer; display: flex;
    align-items: center; justify-content: center; transition: all 0.2s;
}
.theme-toggle:hover { background: rgba(255,255,255,0.1); color: var(--text-main); }
body.light-theme .theme-toggle { border-color: rgba(97,99,101,0.25); }
body.light-theme .theme-toggle:hover { background: rgba(0,0,0,0.06); }

/* FAQ Nav Button */
.nav-btn-faq {
    display: flex; align-items: center; justify-content: center; text-align: center; gap: 6px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff; border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.nav-btn-faq:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.4); }
.nav-btn-faq svg { flex-shrink: 0; }

/* Status Badges */
.accuracy-badge { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--alert-red); border: 1px solid rgba(255,51,102,0.3); padding: 5px 12px; border-radius: 20px; background: rgba(0,0,0,0.5); transition: all 0.3s; }
.accuracy-badge.safe { color: var(--brand-green); border-color: var(--brand-green-dim); }
.accuracy-badge.warning { color: var(--warn-orange); border-color: var(--warn-orange-dim); }
body.light-theme .accuracy-badge { background: #ffffff; box-shadow: 0 2px 10px rgba(0,0,0,0.15); border-color: rgba(0,0,0,0.15); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; transition: background-color 0.3s, box-shadow 0.3s; }
.dot.green { background: var(--brand-green); box-shadow: 0 0 8px var(--brand-green); }
.dot.red { background: var(--alert-red); box-shadow: 0 0 8px var(--alert-red); }
.dot.orange { background: var(--warn-orange); box-shadow: 0 0 8px var(--warn-orange); }
.blink { animation: blinker 1.5s linear infinite; }
@keyframes blinker { 50% { opacity: 0.3; } }

/* Dashboard Layout */
.dashboard-layout {
    display: flex; flex: 1; padding: 20px; gap: 20px; min-height: 600px;
}

/* Left Sidebar */
.control-panel {
    width: 360px; background: var(--panel-bg); border: 1px solid var(--border-color);
    border-radius: 16px; display: flex; flex-direction: column; flex-shrink: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4); transition: background 0.3s, box-shadow 0.3s;
    overflow: hidden;
}
body.light-theme .control-panel { box-shadow: 0 10px 30px rgba(0,0,0,0.2); }

.panel-scroll-area {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.panel-scroll-area::-webkit-scrollbar { width: 6px; }
.panel-scroll-area::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }
body.light-theme .panel-scroll-area::-webkit-scrollbar-thumb { background: rgba(97,99,101,0.3); }

.panel-title { margin: 0 0 10px 0; font-size: 1.5rem; letter-spacing: -0.5px; }
.panel-desc { color: #C8C8C8; font-size: 0.85rem; line-height: 1.5; margin-bottom: 25px; }
body.light-theme .panel-desc { color: #555555; }

.input-group { margin-bottom: 25px; }
.input-group label { display: block; margin-bottom: 10px; font-size: 0.85rem; font-weight: 500; }
.highlight { color: var(--brand-green); font-family: monospace; font-size: 1.05rem; transition: color 0.3s; }
.mt-15 { margin-top: 15px; }

input[type=range] { width: 100%; -webkit-appearance: none; background: rgba(255,255,255,0.1); height: 4px; border-radius: 2px; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--brand-green); cursor: pointer; border: 2px solid #fff; box-shadow: 0 0 10px var(--brand-green-dim); transition: background-color 0.3s; }
body.light-theme input[type=range] { background: rgba(97,99,101,0.2); }

/* --- GATED SLIDERS OVERLAY --- */
.sliders-wrapper {
    position: relative;
}
.sliders-content {
    transition: opacity 0.3s;
}
.sliders-wrapper.is-locked .sliders-content {
    opacity: 0.15;
    pointer-events: none;
    user-select: none;
}
.gated-overlay {
    position: absolute;
    top: -15px; left: -15px; right: -15px; bottom: -15px;
    background: rgba(0, 20, 45, 0.85);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.sliders-wrapper.is-locked .gated-overlay {
    opacity: 1;
    pointer-events: auto;
}
body.light-theme .gated-overlay {
    background: rgba(255, 255, 255, 0.9);
}
.glass-form {
    background: rgba(15, 15, 15, 0.75);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 22px 20px;
    border-radius: 12px;
    text-align: center;
    width: 85%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
body.light-theme .glass-form {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(97,99,101,0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.glass-icon { font-size: 1.8rem; margin-bottom: 8px; }
.glass-form h3 { margin: 0 0 8px 0; font-size: 1.05rem; color: var(--text-main); }
.glass-form p { margin: 0 0 15px 0; font-size: 0.8rem; color: #C0C0C0; line-height: 1.4; }
body.light-theme .glass-form p { color: #555555; }
.glass-form input[type="email"] {
    width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 6px;
    background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.2);
    color: #fff; font-size: 16px !important; margin-bottom: 12px;
    transition: border-color 0.3s;
    appearance: none;
    -webkit-appearance: none;
}
.glass-form input[type="email"]:focus { outline: none; border-color: #FA4616; }
body.light-theme .glass-form input[type="email"] { background: #fff; color: #111; border-color: rgba(97,99,101,0.3); }

.btn-unlock {
    width: 100%; padding: 12px; border-radius: 6px; border: none;
    background: #FA4616; color: #fff; font-weight: 600; cursor: pointer;
    transition: background 0.2s, transform 0.1s; margin-bottom: 8px;
}
.btn-unlock:hover { background: #e03f14; transform: translateY(-1px); }
.gated-note { font-size: 0.7rem; color: var(--text-muted); display: block; }

/* System Mode Buttons */
.system-selector { display: flex; flex-direction: column; gap: 8px; }
.sys-btn {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(0,0,0,0.4); border: 1px solid var(--border-color); color: var(--text-muted);
    padding: 12px 16px; border-radius: 8px; cursor: pointer; transition: all 0.2s; text-align: left;
    position: relative;
    overflow: hidden;
}
.sys-btn:hover { border-color: rgba(255,255,255,0.3); }
.sys-btn.active { background: rgba(0,0,0,0.8); border-color: rgba(255,255,255,0.5); color: var(--text-main); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.sys-btn[data-mode="standard"].active { border-color: var(--warn-orange); background: rgba(255,170,0,0.05); }
.sys-btn[data-mode="omnicomm"].active { border-color: var(--brand-green); background: rgba(62,207,142,0.1); }
body.light-theme .sys-btn { background: #f8f9fa; border-color: rgba(97,99,101,0.2); }
body.light-theme .sys-btn:hover { border-color: var(--omnicomm-cool-gray); }
body.light-theme .sys-btn.active { background: #ffffff; border-color: var(--omnicomm-cool-gray); color: var(--text-main); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
body.light-theme .sys-btn[data-mode="standard"].active { background: rgba(255,170,0,0.05); border-color: var(--warn-orange); }
body.light-theme .sys-btn[data-mode="omnicomm"].active { background: rgba(62,207,142,0.1); border-color: var(--brand-green); }

/* Instagram Stories-style Progress Bar */
.tech-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #FA4616, #ff6b3d);
    border-radius: 0 0 8px 8px;
    display: none;
    z-index: 1;
    box-shadow: 0 0 8px rgba(250, 70, 22, 0.6);
}
.sys-btn.active .tech-progress-bar {
    display: block;
}
body.light-theme .tech-progress-bar {
    background: linear-gradient(90deg, #FA4616, #ff6b3d);
    box-shadow: 0 0 8px rgba(250, 70, 22, 0.4);
}

.sys-title { font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.sys-sub { font-size: 0.75rem; font-family: monospace; opacity: 0.8; }
.badge-new {
    background: var(--brand-green); color: #000; font-size: 0.6rem; font-weight: 800;
    padding: 2px 6px; border-radius: 4px; letter-spacing: 0.5px; transition: background-color 0.3s;
}

/* Button Pulse Attention */
@keyframes btnPulseAttention {
    0% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.8); transform: scale(1); }
    50% { transform: scale(1.02); background: rgba(62,207,142,0.2); border-color: var(--brand-green); }
    100% { box-shadow: 0 0 0 15px rgba(62, 207, 142, 0); transform: scale(1); }
}
.pulse-attention {
    animation: btnPulseAttention 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Checkbox */
.checkbox-container { display: block; position: relative; padding-left: 28px; cursor: pointer; font-size: 0.85rem; color: var(--text-muted); user-select: none; transition: all 0.3s; }
.checkbox-container input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkmark { position: absolute; top: 0; left: 0; height: 18px; width: 18px; background: rgba(0,0,0,0.5); border: 1px solid var(--border-color); border-radius: 4px; }
.checkbox-container:hover input ~ .checkmark { background-color: #333; }
.checkbox-container input:checked ~ .checkmark { background-color: var(--brand-green); border-color: var(--brand-green); }
.checkmark:after { content: ""; position: absolute; display: none; }
.checkbox-container input:checked ~ .checkmark:after { display: block; }
.checkbox-container .checkmark:after { left: 6px; top: 2px; width: 4px; height: 10px; border: solid #000; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.checkbox-container.active-state { color: var(--text-main); opacity: 1 !important; pointer-events: auto !important; }
.checkbox-desc { font-size: 0.75rem; opacity: 0.7; }
body.light-theme .checkmark { background: #f8f9fa; border-color: rgba(97,99,101,0.3); }
body.light-theme .checkbox-container:hover input ~ .checkmark { background: #e9ecef; }
body.light-theme .checkbox-container input:checked ~ .checkmark { background: var(--brand-green); }

/* Mobile Calculate Button */
.mobile-calc-btn { display: none; }

/* ----------------------------------------
   Unified App Footer
---------------------------------------- */
.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
    background: var(--panel-bg);
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-footer);
    flex-shrink: 0;
    transition: background 0.3s;
}
.app-footer-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}
.app-footer-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
/* Note sits next to action buttons and wraps its own text if needed */
.app-footer-note {
    color: var(--text-footer);
    line-height: 1.4;
}
.app-footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding-top: 4px;
    color: var(--text-footer);
}
.app-footer a {
    color: #FA4616;
    text-decoration: none;
    transition: all 0.4s ease;
}
.app-footer a:hover {
    text-decoration: none;
    opacity: 0.7;
}

/* Right Content Area */
.main-content {
    flex: 1; display: flex; flex-direction: column; gap: 20px; min-width: 0;
}

/* Map Widget */
.map-widget {
    flex: 1; min-height: 200px;
    background: radial-gradient(circle at center, #0a0a12 0%, #050508 100%);
    border-radius: 16px; border: 1px solid var(--border-color);
    position: relative; overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    transition: background 0.3s, box-shadow 0.6s ease-out;
}
body.light-theme .map-widget {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-color: rgba(97,99,101,0.2);
}

/* ----------------------------------------
   Map Loader OVERLAY
---------------------------------------- */
.map-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.6) 100%);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.6s ease;
    color: var(--text-main);
    border-radius: inherit; /* matches widget radius */
}
body.light-theme .map-loader {
    background: radial-gradient(circle at center, rgba(255,255,255,0.7) 0%, rgba(200,200,200,0.6) 100%);
}

/* Simple Spinner using omnicomm colors */
.map-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--text-muted);
    border-top: 3px solid #FA4616;
    border-radius: 50%;
    animation: mapSpin 1s linear infinite;
    margin-bottom: 16px;
}
@keyframes mapSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.map-loader-text {
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 0.9rem;
    color: var(--text-main);
    letter-spacing: 1px;
}

.widget-header {
    position: absolute; top: 0; left: 0; width: 100%; padding: 15px 20px; box-sizing: border-box;
    display: flex; justify-content: space-between; align-items: center; z-index: 20; pointer-events: none;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent); transition: background 0.3s;
}
body.light-theme .widget-header { background: linear-gradient(to bottom, rgba(255,255,255,0.95), transparent); }
.widget-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; color: #fff; transition: color 0.3s, opacity 0.4s ease; }
body.light-theme .widget-title { color: #002855; font-weight: 700; }
.map-legend {
    position: absolute;
    top: 38px;
    left: 20px;
    z-index: 20;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.7);
    background: rgba(0,0,0,0.45);
    padding: 5px 12px;
    border-radius: 6px;
    pointer-events: none;
}
body.light-theme .map-legend {
    color: rgba(0,40,85,0.6);
    background: rgba(255,255,255,0.6);
}
.legend-icon {
    display: inline-block;
    width: 14px;
    height: 8px;
    background: #3a5f8a;
    clip-path: polygon(0% 50%, 100% 0%, 75% 50%, 100% 100%);
    vertical-align: middle;
    margin-right: 3px;
}
body.light-theme .legend-icon { background: #8899aa; }
#canvas-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; overflow: hidden; }
#bubbles-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }

/* Fleet Grid (CSS replacement for Three.js) */
.fleet-grid-wrap {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    perspective: 500px;
    perspective-origin: 50% 35%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.fleet-grid-bg {
    --fleet-grid-color: rgba(100,120,140,0.12);
    --fleet-grid-color-major: rgba(100,120,140,0.25);
    position: absolute;
    top: -150%; left: -150%;
    width: 400%; height: 400%;
    background-image:
        linear-gradient(var(--fleet-grid-color-major) 1px, transparent 1px),
        linear-gradient(90deg, var(--fleet-grid-color-major) 1px, transparent 1px),
        linear-gradient(var(--fleet-grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--fleet-grid-color) 1px, transparent 1px);
    background-size: 120px 120px, 120px 120px, 30px 30px, 30px 30px;
    transform: rotateX(55deg) rotateZ(45deg);
    transform-origin: center center;
    pointer-events: none;
    mask-image: radial-gradient(ellipse 65% 55% at 50% 40%, black 15%, transparent 60%);
    -webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 40%, black 15%, transparent 60%);
}
.fleet-fog {
    display: none;
}
.fleet-plane {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    perspective: 500px;
    perspective-origin: 50% 35%;
    pointer-events: none;
    z-index: 2;
}
.fleet-container {
    position: absolute;
    top: 40%; left: 50%;
    width: 0; height: 0;
    transform: rotateX(55deg) rotateZ(45deg);
    transform-origin: center center;
    pointer-events: none;
}
.fleet-arrow {
    position: absolute;
    width: 18px;
    height: 10px;
    clip-path: polygon(0% 50%, 100% 0%, 75% 50%, 100% 100%);
    transform: rotateZ(-45deg);
    will-change: transform;
}
.fleet-arrow.glow {
    filter: drop-shadow(0 0 5px currentColor) drop-shadow(0 0 10px currentColor);
}
body.light-theme .fleet-arrow.glow {
    filter: none;
}

/* Map Click Overlay & Toast */
.map-dark-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); opacity: 0; pointer-events: none;
    transition: opacity 0.4s ease; z-index: 15;
}
body.light-theme .map-dark-overlay {
    background: rgba(255,255,255,0.7);
}
.map-dark-overlay.active {
    opacity: 1;
}

.map-center-toast {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -40%) scale(0.95);
    opacity: 0; pointer-events: none; z-index: 25;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    background: rgba(15,15,15,0.9); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 20px;
    padding: 14px 28px; font-size: 1rem; font-family: "JetBrains Mono", monospace; color: #EDEDED;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6); 
    width: max-content; max-width: 90%; text-align: center; line-height: 1.4;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.light-theme .map-center-toast {
    background: rgba(255,255,255,0.95); border-color: rgba(97,99,101,0.2); color: #111; box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}
.map-center-toast.active {
    opacity: 1; transform: translate(-50%, -50%) scale(1);
}
.toast-sync { border-color: rgba(62,207,142,0.4); color: var(--brand-green); }
.toast-theft { border-color: rgba(255,51,102,0.4); color: var(--alert-red); }
.toast-idle { border-color: rgba(255,170,0,0.4); color: var(--warn-orange); }

body.light-theme .map-center-toast.toast-sync { color: var(--brand-green); border-color: rgba(62,207,142,0.4); }
body.light-theme .map-center-toast.toast-theft { color: var(--alert-red); border-color: rgba(255,51,102,0.4); }
body.light-theme .map-center-toast.toast-idle { color: var(--warn-orange); border-color: rgba(255,170,0,0.4); }

/* Results Row */
.results-row { display: flex; gap: 20px; flex-shrink: 0; flex: 0.4; min-height: 160px; }
.result-card {
    flex: 1; background: var(--panel-bg); border: 1px solid var(--border-color); border-radius: 16px;
    padding: 30px 25px; transition: all 0.4s; display: flex; flex-direction: column; 
    justify-content: flex-start;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
body.light-theme .result-card { box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.result-card.big { flex: 1.3; border-color: rgba(255,51,102,0.3); background: linear-gradient(135deg, rgba(255,51,102,0.05), var(--panel-bg)); }
.result-card.big.warning { border-color: var(--warn-orange-dim); background: linear-gradient(135deg, rgba(255,170,0,0.05), var(--panel-bg)); }
.result-card.big.safe { border-color: var(--brand-green-dim); background: linear-gradient(135deg, rgba(62,207,142,0.05), var(--panel-bg)); }
body.light-theme .result-card.big { background: linear-gradient(135deg, rgba(255,51,102,0.15), #ffffff); }
body.light-theme .result-card.big.warning { background: linear-gradient(135deg, rgba(255,170,0,0.15), #ffffff); }
body.light-theme .result-card.big.safe { background: linear-gradient(135deg, rgba(62,207,142,0.2), #ffffff); }

.card-header-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    height: 34px;
}

.card-label { 
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: #B8B8B8; 
    font-weight: 700; line-height: 1.2;
}
body.light-theme .card-label { color: #222222; font-weight: 700; }

.info-icon {
    position: relative;
    color: #FA4616;
    opacity: 0.85;
    cursor: help;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    margin-top: -4px;
    transition: opacity 0.2s, transform 0.2s;
}
.info-icon:hover {
    opacity: 1;
}
body.light-theme .info-icon { color: #FA4616; }

/* Custom Tooltip Base (Center aligned) */
.tooltip-box {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: rgba(15,15,15,0.95);
    border: 1px solid rgba(255,255,255,0.1);
    color: #EDEDED;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.4;
    width: max-content;
    max-width: 220px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 100;
}
.info-icon:hover .tooltip-box {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.tooltip-box::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(15,15,15,0.95) transparent transparent transparent;
}
body.light-theme .tooltip-box {
    background: rgba(255,255,255,0.98);
    color: #111;
    border-color: rgba(97,99,101,0.2);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
body.light-theme .tooltip-box::after {
    border-color: rgba(255,255,255,0.98) transparent transparent transparent;
}

.icon-left .tooltip-box {
    left: -10px;
    transform: translateX(0) translateY(5px);
}
.icon-left:hover .tooltip-box {
    transform: translateX(0) translateY(0);
}
.icon-left .tooltip-box::after {
    left: 18px;
    margin-left: 0;
}

.icon-right .tooltip-box {
    left: auto;
    right: -10px;
    transform: translateX(0) translateY(5px);
}
.icon-right:hover .tooltip-box {
    transform: translateX(0) translateY(0);
}
.icon-right .tooltip-box::after {
    left: auto;
    right: 18px;
    margin-left: 0;
}


.card-value { 
    font-size: 2.2rem; font-family: monospace; font-weight: 700; 
    margin-bottom: 12px; letter-spacing: -1px; transition: color 0.3s; 
    height: 45px; line-height: 1;
    display: flex; align-items: flex-end; 
}
.result-card.big .card-value { font-size: 2.8rem; }
.card-value.bad { color: var(--alert-red); }
.card-value.warning { color: var(--warn-orange); }
.card-value.good { color: var(--brand-green); }
.bad-text { color: var(--alert-red); }
.warning-text { color: var(--warn-orange); }
.good-text { color: var(--brand-green); }

.card-desc { 
    font-size: 0.8rem; color: var(--text-card); line-height: 1.4; transition: color 0.3s; margin: 0; 
    min-height: 36px; height: auto;
}

/* Map Bubbles */
.chat-bubble {
    position: absolute; display: flex; align-items: center; gap: 8px;
    background: rgba(15,15,15,0.85); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 16px;
    padding: 6px 12px; font-size: 0.75rem; font-family: "JetBrains Mono", monospace; color: #EDEDED;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5); white-space: nowrap; will-change: transform, left, top;
}
body.light-theme .chat-bubble {
    background: rgba(255,255,255,0.95); border-color: rgba(97,99,101,0.2); color: #111; box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.bubble-pulse { width: 6px; height: 6px; border-radius: 50%; background: white; animation: twPulse 1.5s cubic-bezier(0.4,0,0.6,1) infinite; }
.bubble-type-theft { border-color: rgba(255,51,102,0.3); color: var(--alert-red); }
.bubble-type-theft .bubble-pulse { background: var(--alert-red); box-shadow: 0 0 8px var(--alert-red); }
.bubble-type-idle { border-color: rgba(255,170,0,0.3); color: var(--warn-orange); }
.bubble-type-idle .bubble-pulse { background: var(--warn-orange); box-shadow: 0 0 8px var(--warn-orange); }
.bubble-type-route { border-color: rgba(51,170,255,0.3); color: var(--info-blue); }
.bubble-type-route .bubble-pulse { background: var(--info-blue); box-shadow: 0 0 8px var(--info-blue); }
.bubble-type-sync { border-color: rgba(62,207,142,0.3); color: var(--brand-green); }
.bubble-type-sync .bubble-pulse { background: var(--brand-green); box-shadow: 0 0 8px var(--brand-green); }
.bubble-type-error { border-color: rgba(255,255,255,0.1); color: #999; }
.bubble-type-error .bubble-pulse { background: #666; animation: none; }

body.light-theme .chat-bubble.bubble-type-theft { color: var(--alert-red); border-color: rgba(255,51,102,0.3); }
body.light-theme .chat-bubble.bubble-type-idle { color: var(--warn-orange); border-color: rgba(255,170,0,0.3); }
body.light-theme .chat-bubble.bubble-type-route { color: var(--info-blue); border-color: rgba(51,170,255,0.3); }
body.light-theme .chat-bubble.bubble-type-sync { color: var(--brand-green); border-color: rgba(62,207,142,0.3); }
body.light-theme .chat-bubble.bubble-type-error { color: var(--omnicomm-cool-gray); border-color: rgba(97,99,101,0.2); }
body.light-theme .chat-bubble.bubble-type-error .bubble-pulse { background: var(--omnicomm-cool-gray); }

@keyframes twPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.3; transform: scale(0.8); } }


/* ----------------------------------------
   FAQ MODAL
---------------------------------------- */
.faq-overlay {
    display: none;
    position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh;
    background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
    z-index: 9999998;
    justify-content: center; align-items: flex-start;
    padding-top: 60px;
    box-sizing: border-box;
}
.faq-overlay.open { display: flex; }
.faq-box {
    background: var(--panel-bg); border: 1px solid var(--border-color);
    border-radius: 16px; width: 90%; max-width: 620px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.7);
    display: flex; flex-direction: column; overflow: hidden;
    animation: faqSlideIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    max-height: calc(100dvh - 90px);
}
@keyframes faqSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}
body.light-theme .faq-box { box-shadow: 0 25px 60px rgba(0,0,0,0.2); }
.faq-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 24px; border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.faq-header-left {
    display: flex; align-items: center; gap: 10px; color: #FA4616;
}
.faq-header-left h2 { margin: 0; font-size: 1.1rem; color: var(--text-main); }
body.light-theme .faq-header-left { color: #FA4616; }
.faq-close {
    background: none; border: none; color: var(--text-muted); font-size: 2rem;
    cursor: pointer; padding: 0; line-height: 0.8; transition: color 0.2s;
    flex-shrink: 0; margin-left: 12px;
}
.faq-close:hover { color: var(--text-main); }
.faq-body {
    padding: 20px 24px; overflow-y: auto; flex: 1;
    -webkit-overflow-scrolling: touch;
}
.faq-body::-webkit-scrollbar { width: 5px; }
.faq-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
body.light-theme .faq-body::-webkit-scrollbar-thumb { background: rgba(97,99,101,0.2); }
.faq-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}
.faq-item:last-child { border-bottom: none; padding-bottom: 4px; }
.faq-q {
    font-size: 0.92rem; font-weight: 600; color: var(--text-main);
    margin-bottom: 8px; line-height: 1.4;
}
.faq-a {
    font-size: 0.85rem; line-height: 1.6; color: #B8B8B8;
}
body.light-theme .faq-a { color: #444444; }

/* Dev Settings Modal */
.dev-settings-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
    z-index: 9999999;
    justify-content: center; align-items: center;
}
.dev-settings-box {
    background: #1a1a1a; border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px; width: 340px; box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    display: flex; flex-direction: column; overflow: hidden; color: #fff;
}
.dev-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.dev-header h2 { margin: 0; font-size: 1rem; color: #fff; }
.dev-close { background: none; border: none; color: #aaa; font-size: 1.5rem; cursor: pointer; padding: 0 5px; }
.dev-close:hover { color: #fff; }
.dev-body { padding: 20px; max-height: 70vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.dev-section-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: #888; margin: 15px 0 10px; padding-bottom: 5px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.dev-section-title:first-child { margin-top: 0; }
.dev-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.dev-row label { font-size: 0.85rem; color: #ccc; }
.dev-row input[type="color"] { -webkit-appearance: none; border: none; width: 30px; height: 30px; border-radius: 4px; cursor: pointer; padding: 0; background: none; }
.dev-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.dev-row input[type="color"]::-webkit-color-swatch { border: 1px solid rgba(255,255,255,0.2); border-radius: 4px; }
.dev-row input.dev-input-num { background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 4px 8px; border-radius: 4px; width: 60px; text-align: right; font-family: "JetBrains Mono", Consolas, monospace; }
.dev-row input.dev-input-num:focus { outline: none; border-color: var(--brand-green); }


/* ----------------------------------------
   QUIZ MODAL (LEAD CAPTURE)
---------------------------------------- */
.quiz-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
    z-index: 9999999; justify-content: center; align-items: center;
}
.quiz-overlay.open { display: flex; }
.quiz-box {
    background: var(--panel-bg); border: 1px solid var(--border-color);
    border-radius: 16px; width: 90%; max-width: 540px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.7);
    display: flex; flex-direction: column; overflow: hidden;
    animation: faqSlideIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.light-theme .quiz-box { box-shadow: 0 25px 60px rgba(0,0,0,0.2); }

.quiz-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px; border-bottom: 1px solid var(--border-color);
    flex-shrink: 0; gap: 20px;
}
.quiz-progress-wrapper {
    flex: 1; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden;
}
body.light-theme .quiz-progress-wrapper { background: rgba(0,0,0,0.1); }
.quiz-progress-bar {
    height: 100%; width: 25%; background: #FA4616;
    transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.quiz-close {
    background: none; border: none; color: var(--text-muted); font-size: 2rem;
    cursor: pointer; padding: 0; line-height: 0.8; transition: color 0.2s;
}
.quiz-close:hover { color: var(--text-main); }

.quiz-body {
    padding: 24px; max-height: 70vh; overflow-y: auto; position: relative;
    -webkit-overflow-scrolling: touch;
}
.quiz-body::-webkit-scrollbar { width: 5px; }
.quiz-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
body.light-theme .quiz-body::-webkit-scrollbar-thumb { background: rgba(97,99,101,0.2); }

.quiz-step { display: none; animation: fadeIn 0.4s; }
.quiz-step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.quiz-title { margin: 0 0 20px 0; font-size: 1.3rem; color: var(--text-main); letter-spacing: -0.5px; text-align: center; }
body.light-theme .quiz-title { color: #111; }

/* Step 1: Grid */
.industry-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.ind-btn {
    background: rgba(0,0,0,0.3); border: 1px solid var(--border-color);
    border-radius: 8px; padding: 14px 10px; color: var(--text-main);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    font-size: 0.85rem; font-weight: 500;
    cursor: pointer; transition: all 0.2s; text-align: center;
}
.ind-btn-icon {
    width: 28px; height: 28px;
    filter: invert(80%) sepia(10%) saturate(200%) hue-rotate(180deg) brightness(110%);
    transition: all 0.2s;
}
.ind-btn.selected .ind-btn-icon {
    filter: invert(42%) sepia(93%) saturate(1500%) hue-rotate(3deg) brightness(97%) contrast(96%);
}
body.light-theme .ind-btn-icon {
    filter: invert(12%) sepia(60%) saturate(3000%) hue-rotate(200deg) brightness(40%) contrast(110%);
}
body.light-theme .ind-btn.selected .ind-btn-icon {
    filter: invert(42%) sepia(93%) saturate(1500%) hue-rotate(3deg) brightness(97%) contrast(96%);
}
.ind-btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.3); transform: translateY(-1px); }
.ind-btn:focus { outline: none; }
.ind-btn.selected { background: rgba(250, 70, 22, 0.15); border-color: #FA4616; color: #FA4616; font-weight: 600; box-shadow: 0 0 10px rgba(250, 70, 22, 0.2); }
.industry-bottom {
    display: flex; gap: 8px; margin-top: 12px;
}
.industry-bottom .quiz-select { flex: 1; }
.ind-btn-sp {
    flex: 1; flex-direction: row; gap: 6px; padding: 12px 14px; white-space: nowrap;
    background: rgba(0,0,0,0.3); border: 1px solid var(--border-color);
    border-radius: 8px; color: var(--text-main); font-size: 0.85rem; font-weight: 500;
    cursor: pointer; transition: all 0.2s; text-align: center;
}
.ind-btn-sp:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.3); }
.ind-btn-sp.selected { background: rgba(250, 70, 22, 0.15); border-color: #FA4616; color: #FA4616; }
body.light-theme .ind-btn { background: #f8f9fa; border-color: rgba(97,99,101,0.2); color: #111; }
body.light-theme .ind-btn:hover { background: #e9ecef; border-color: var(--omnicomm-cool-gray); }
body.light-theme .ind-btn.selected { background: rgba(250, 70, 22, 0.15); border-color: #FA4616; color: #FA4616; }
body.light-theme .ind-btn-sp { background: #f8f9fa; border-color: rgba(97,99,101,0.2); color: #111; }
body.light-theme .ind-btn-sp:hover { background: #e9ecef; }
body.light-theme .ind-btn-sp.selected { background: rgba(250, 70, 22, 0.15); border-color: #FA4616; color: #FA4616; }

/* Other industry select styled as button */
.ind-btn-select-wrap {
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.3); border: 1px solid var(--border-color);
    border-radius: 8px; padding: 6px 8px; transition: all 0.2s;
}
.ind-btn-select-wrap:hover { border-color: rgba(255,255,255,0.3); }
body.light-theme .ind-btn-select-wrap { background: #f8f9fa; border-color: rgba(97,99,101,0.2); }
.ind-btn-select {
    background: transparent !important; border: none !important; color: var(--text-main);
    font-size: 0.85rem; font-weight: 500; padding: 4px 2px; width: 100%; text-align: center;
    cursor: pointer;
}
body.light-theme .ind-btn-select { color: #111; }

/* Fleet size buttons */
.fleet-size-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fleet-size-btn {
    padding: 14px 10px; background: rgba(0,0,0,0.3); border: 1px solid var(--border-color);
    border-radius: 8px; font-size: 0.9rem; font-weight: 600; color: var(--text-main);
    cursor: pointer; transition: all 0.2s; text-align: center;
}
.fleet-size-btn:hover { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.05); }
.fleet-size-btn.selected { border-color: #FA4616; background: rgba(250,70,22,0.15); color: #FA4616; font-weight: 700; }
body.light-theme .fleet-size-btn { background: #f8f9fa; border-color: rgba(97,99,101,0.2); color: #111; }
body.light-theme .fleet-size-btn:hover { background: #e9ecef; }
body.light-theme .fleet-size-btn.selected { background: rgba(250,70,22,0.15); border-color: #FA4616; color: #FA4616; }

/* Country searchable dropdown */
.country-search-wrap { position: relative; }
.country-dropdown {
    display: none; position: fixed; max-height: 200px; overflow-y: auto;
    background: var(--panel-bg); border: 1px solid #FA4616; border-top: none;
    z-index: 2100; box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.country-dropdown.open { display: block; }
.country-option {
    padding: 10px 14px; font-size: 0.85rem; color: var(--text-main);
    cursor: pointer; transition: background 0.15s;
}
.country-option:hover { background: rgba(250,70,22,0.1); }
body.light-theme .country-dropdown { background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
body.light-theme .country-option { color: #111; }
body.light-theme .country-option:hover { background: rgba(250,70,22,0.06); }

/* Inputs */
.quiz-input-group { margin-bottom: 20px; }
.quiz-input-group label { display: block; margin-bottom: 8px; font-size: 0.85rem; font-weight: 600; color: #B0B0B0; }
body.light-theme .quiz-input-group label { color: #444444; }
.quiz-input, .quiz-select {
    width: 100%; box-sizing: border-box; padding: 12px 15px; border-radius: 8px;
    background: rgba(0,0,0,0.4); border: 1px solid var(--border-color);
    color: var(--text-main); 
    font-size: 16px !important;
    font-family: inherit; transition: border-color 0.3s;
}
.quiz-input:focus, .quiz-select:focus { outline: none; border-color: #FA4616; }
body.light-theme .quiz-input, body.light-theme .quiz-select { background: #fff; border-color: rgba(97,99,101,0.3); color: #111; }
.quiz-select option { background: var(--panel-bg); color: var(--text-main); }
body.light-theme .quiz-select option { background: #fff; color: #111; }

.quiz-radio-group { display: flex; flex-direction: column; gap: 10px; }
.quiz-radio {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    background: rgba(0,0,0,0.3); padding: 12px 15px; border-radius: 8px;
    border: 1px solid var(--border-color); transition: all 0.2s; font-size: 0.95rem;
}
.quiz-radio:hover { background: rgba(255,255,255,0.05); }
.quiz-radio input[type="radio"] { accent-color: #FA4616; width: 16px; height: 16px; cursor: pointer; }
body.light-theme .quiz-radio { background: #f8f9fa; border-color: rgba(97,99,101,0.2); color: #111; }

.quiz-actions {
    display: flex; justify-content: space-between; margin-top: 30px; gap: 15px;
}
.quiz-btn-prev {
    background: transparent; border: 1px solid var(--border-color); color: var(--text-muted);
    padding: 12px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.quiz-btn-prev:hover { background: rgba(255,255,255,0.05); color: var(--text-main); }
.quiz-btn-next, .quiz-btn-submit {
    flex: 1; border: none;
    padding: 12px 20px; border-radius: 8px; font-weight: 700; font-size: 1rem;
    cursor: pointer; transition: transform 0.15s, background 0.2s; text-align: center;
}
.quiz-btn-next { background: #ffffff; color: #111111; }
.quiz-btn-next:hover { background: #e9ecef; transform: translateY(-1px); }
.quiz-btn-submit { background: #FA4616; color: #fff; }
.quiz-btn-submit:hover { background: #e03f14; transform: translateY(-1px); }
body.light-theme .quiz-btn-prev { border-color: rgba(97,99,101,0.3); color: #555; }
body.light-theme .quiz-btn-prev:hover { background: rgba(0,0,0,0.05); color: #111; }
body.light-theme .quiz-btn-next { border: 1px solid rgba(97,99,101,0.3); background: #ffffff; color: #111111; }
body.light-theme .quiz-btn-next:hover { background: #f8f9fa; }

/* Banner & Success */
.pdf-banner {
    display: flex; align-items: center; gap: 15px; padding: 15px;
    background: linear-gradient(135deg, rgba(250,70,22,0.15), rgba(250,70,22,0.05));
    border: 1px solid rgba(250,70,22,0.3); border-radius: 10px; margin-bottom: 25px;
}
body.light-theme .pdf-banner { background: linear-gradient(135deg, rgba(250,70,22,0.1), #fff); }
.pdf-icon { font-size: 2rem; line-height: 1; }
.pdf-text strong { display: block; color: #FA4616; font-size: 0.95rem; margin-bottom: 4px; }
.pdf-text span { font-size: 0.8rem; color: #B0B0B0; }
body.light-theme .pdf-text span { color: #555555; }

.quiz-success { text-align: center; padding: 20px 10px; }
.success-icon { font-size: 4rem; color: #FA4616; margin-bottom: 15px; animation: bounceIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1.5); }
.quiz-success h2 { margin: 0 0 10px 0; color: var(--text-main); }
.quiz-success p { color: #B0B0B0; font-size: 0.95rem; line-height: 1.5; margin-bottom: 20px; }
body.light-theme .quiz-success h2 { color: #111; }
body.light-theme .quiz-success p { color: #555555; }
@keyframes bounceIn { 0% { transform: scale(0); } 100% { transform: scale(1); } }

.quiz-success-summary {
    font-size: 0.85rem; color: var(--text-muted); line-height: 1.5;
    margin-bottom: 20px; padding: 12px; background: rgba(255,255,255,0.05);
    border-radius: 8px; border: 1px solid var(--border-color);
}
body.light-theme .quiz-success-summary { background: rgba(0,0,0,0.03); }

.quiz-submit-error {
    color: var(--alert-red); font-size: 0.8rem; text-align: center;
    padding: 8px; margin-bottom: 10px;
}

/* intl-tel-input overrides for dark theme */
.iti { width: 100%; }
.iti__selected-dial-code { color: var(--text-main); }
.iti__country-list { background: var(--panel-bg); border-color: var(--border-color); }
.iti__country-list .iti__country:hover { background: rgba(255,255,255,0.1); }
.iti__country-list .iti__country-name, .iti__country-list .iti__dial-code { color: var(--text-main); }
body.light-theme .iti__country-list { background: #fff; }
body.light-theme .iti__country-list .iti__country:hover { background: #f0f0f0; }

/* ----------------------------------------
   TABLET RESPONSIVENESS (Landscape & Medium Screens)
---------------------------------------- */
@media (max-width: 1150px) and (min-width: 851px) {
    .control-panel { width: 300px; }
    .panel-scroll-area { padding: 20px; }
    .dashboard-layout { padding: 15px; gap: 15px; }
    .result-card { padding: 20px 15px; }
    .card-value { font-size: 1.6rem; height: 35px; margin-bottom: 8px; }
    .result-card.big .card-value { font-size: 2.1rem; }
    .card-header-wrapper { height: 32px; margin-bottom: 4px; }
    .card-label { font-size: 0.65rem; }
    .card-desc { font-size: 0.75rem; min-height: 48px; }
    .logo { font-size: 1rem; }
    .nav-logo-img { height: 32px; }
    .nav-btn, .nav-btn-faq { padding: 8px 12px; font-size: 0.75rem; }
}

/* ----------------------------------------
   MOBILE RESPONSIVENESS & BOTTOM SHEET
---------------------------------------- */
.mobile-handle { display: none; }
.mobile-page-header { display: none; }

@media (max-width: 850px) {
    body, html { overflow: auto; height: auto; }

    body.modal-open, html.modal-open { overflow: hidden; }

    .dashboard-layout {
        flex-direction: column;
        padding: 15px;
        padding-bottom: 20px; 
        overflow-y: auto;
        height: auto;
        min-height: 0;
    }

    .app-container { height: auto; min-height: 100dvh; }

    .mobile-page-header {
        display: block;
        text-align: center;
        margin-bottom: 15px;
    }
    .mobile-page-header h1 { font-size: 1.4rem; margin: 0 0 5px 0; letter-spacing: -0.5px; color: var(--text-main); }
    .mobile-page-header p { font-size: 0.95rem; color: #C0C0C0; margin: 0; line-height: 1.4; }
    body.light-theme .mobile-page-header h1 { color: #111; }
    body.light-theme .mobile-page-header p { color: #555555; }

    .main-content { flex: none; }

    .map-widget { height: 350px; flex: none; }

    .widget-header { height: 100%; padding: 0; background: none; }
    body.light-theme .widget-header { background: none; }
    .widget-header::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 80px; background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent); z-index: 1; }
    .widget-header::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 80px; background: linear-gradient(to top, rgba(0,0,0,0.6), transparent); z-index: 1; }
    body.light-theme .widget-header::before { background: linear-gradient(to bottom, rgba(255,255,255,0.9), transparent); }
    body.light-theme .widget-header::after { background: linear-gradient(to top, rgba(255,255,255,0.9), transparent); }

    .accuracy-badge { position: absolute; top: 15px; left: 50%; transform: translateX(-50%); z-index: 2; width: max-content; }
    .widget-title { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); width: 100%; text-align: center; z-index: 2; }
    
    .map-center-toast {
        font-size: 0.85rem; padding: 12px 20px; gap: 8px;
        white-space: normal;
    }

    .results-row { flex-direction: column; gap: 15px; }

    /* Bottom Sheet Drawer */
    .control-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 80vh;
        border-radius: 24px 24px 0 0;
        transform: translateY(calc(100% - 70px));
        z-index: 1000;
        margin: 0;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.6);
        transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
        border-left: none;
        border-right: none;
        border-bottom: none;
        overflow: hidden;
    }
    body.light-theme .control-panel { box-shadow: 0 -10px 40px rgba(0,0,0,0.15); }

    .control-panel.expanded { transform: translateY(0); }
    
    @keyframes peekAttention {
        0% { transform: translateY(calc(100% - 70px)); }
        20% { transform: translateY(calc(100% - 95px)); }
        40% { transform: translateY(calc(100% - 70px)); }
        60% { transform: translateY(calc(100% - 82px)); }
        80% { transform: translateY(calc(100% - 70px)); }
        100% { transform: translateY(calc(100% - 70px)); }
    }
    .control-panel.peek-attention {
        animation: peekAttention 1.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    @keyframes handleGlow {
        0%, 100% { background-color: rgba(0,0,0,0.2); box-shadow: inset 0 0 0 rgba(250,70,22,0); }
        40% { background-color: rgba(250, 70, 22, 0.08); box-shadow: inset 0 0 15px rgba(250,70,22,0.08); }
    }
    .control-panel.peek-attention .mobile-handle {
        animation: handleGlow 1.8s ease-in-out;
    }
    
    @keyframes handleGlowLight {
        0%, 100% { background-color: rgba(255,255,255,0.4); box-shadow: inset 0 0 0 rgba(250,70,22,0); }
        40% { background-color: rgba(250, 70, 22, 0.05); box-shadow: inset 0 0 15px rgba(250,70,22,0.05); }
    }
    body.light-theme .control-panel.peek-attention .mobile-handle {
        animation: handleGlowLight 1.8s ease-in-out;
    }

    .mobile-handle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 70px;
        cursor: pointer;
        border-bottom: 1px solid var(--border-color);
        background: rgba(0,0,0,0.2);
        border-radius: 24px 24px 0 0;
        flex-shrink: 0;
    }
    body.light-theme .mobile-handle { background: rgba(255,255,255,0.4); }
    .handle-bar { width: 40px; height: 5px; border-radius: 3px; background: #FA4616; margin-bottom: 6px; }
    .handle-text { font-size: 0.85rem; font-weight: 700; color: var(--text-main); text-transform: uppercase; letter-spacing: 1px; }

    .panel-scroll-area {
        height: calc(100% - 70px);
        padding: 20px;
        overflow-y: auto;
    }

    /* Larger touch targets */
    .sys-btn { padding: 16px 18px; }
    .sys-title { font-size: 1.05rem; }
    .sys-sub { font-size: 0.85rem; }
    .input-group label { font-size: 1rem; margin-bottom: 12px; }
    input[type=range] { height: 6px; }
    input[type=range]::-webkit-slider-thumb { width: 24px; height: 24px; }
    .checkbox-container { font-size: 1rem; padding-left: 36px; min-height: 24px; display: flex; align-items: center; flex-wrap: wrap; }
    .checkmark { height: 24px; width: 24px; }
    .checkbox-container .checkmark:after { left: 8px; top: 3px; width: 6px; height: 14px; border-width: 0 3px 3px 0; }
    .checkbox-desc { font-size: 0.85rem; width: 100%; display: block; margin-top: 4px; }

    /* Mobile Calculate button */
    .mobile-calc-btn {
        display: block;
        width: 100%;
        padding: 16px;
        background: #FA4616;
        color: #fff;
        border: none;
        border-radius: 8px;
        font-size: 1.1rem;
        font-weight: 700;
        margin-top: 24px;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(250,70,22,0.3);
        transition: transform 0.15s, background 0.3s;
        letter-spacing: 0.3px;
    }
    .mobile-calc-btn:active { transform: scale(0.97); background: #e03f14; }

    /* App Footer on Mobile */
    .app-footer {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
        padding: 20px 15px;
        padding-bottom: 90px;
    }
    .app-footer-left {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        flex: none;
        min-width: unset;
    }
    .app-footer-note {
        flex: none;
        text-align: center;
    }
    .app-footer-actions {
        display: none;
    }
    .app-footer-right {
        flex-wrap: wrap;
        justify-content: center;
        line-height: 1.6;
        padding-top: 0;
    }

    /* Top Nav Adjustments */
    .top-nav { padding: 10px 15px; }
    .logo-text { display: none; }
    .nav-btn { padding: 8px 12px; font-size: 0.75rem; }
    .nav-btn-faq { padding: 8px 12px; font-size: 0.75rem; }

    /* FAQ modal on mobile */
    .faq-overlay, .quiz-overlay { padding-top: 20px; align-items: flex-start; }
    .faq-box, .quiz-box { max-height: calc(100dvh - 40px); width: 95%; }

    /* Mobile Tooltip Constraints */
    .card-header-wrapper {
        position: relative;
    }
    .info-icon {
        position: static;
    }
    .tooltip-box, .icon-left .tooltip-box, .icon-center .tooltip-box, .icon-right .tooltip-box {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: none !important;
        bottom: 100% !important;
        margin-bottom: 5px !important;
        transform: translateY(5px) !important;
        white-space: normal;
        text-align: left;
    }
    .info-icon:hover .tooltip-box, .icon-left:hover .tooltip-box, .icon-center:hover .tooltip-box, .icon-right:hover .tooltip-box {
        transform: translateY(0) !important;
    }
    .tooltip-box::after, .icon-left .tooltip-box::after, .icon-center .tooltip-box::after, .icon-right .tooltip-box::after {
        display: none !important;
    }
}

/* ----------------------------------------
   Trusted Brands Map Overlay
---------------------------------------- */
.trusted-brands {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 0 15px 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 70%, transparent 100%);
    z-index: 10;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}
body.light-theme .trusted-brands {
    background: linear-gradient(to top, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.7) 70%, transparent 100%);
}
.trusted-brands.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.trusted-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 600;
}
body.light-theme .trusted-label {
    color: #666;
}

.trusted-marquee {
    width: 100%;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.trusted-track {
    display: flex;
    width: max-content;
    animation: marqueeScroll 35s linear infinite;
    gap: 40px;
    padding: 0 20px;
}
.trusted-track:hover {
    animation-play-state: paused;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.brand-item {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.7;
    transition: opacity 0.3s, filter 0.3s;
    filter: grayscale(100%);
    cursor: default;
}
.brand-item:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.brand-logo {
    font-size: 1.15rem;
    color: #fff;
}
body.light-theme .brand-logo {
    color: #111;
}

.brand-country {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: -apple-system, sans-serif;
    background: rgba(255,255,255,0.1);
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.05);
}
body.light-theme .brand-country {
    background: rgba(0,0,0,0.04);
    color: #555;
    border-color: rgba(0,0,0,0.05);
}

/* ----------------------------------------
   Trusted Brands Map Overlay Mobile Adjustments
---------------------------------------- */
@media (max-width: 850px) {
    .map-widget.omnicomm-active .widget-title {
        opacity: 0;
        pointer-events: none;
    }
    .trusted-brands {
        padding: 10px 0 15px 0;
    }
    .brand-logo {
        font-size: 0.95rem;
    }
    .trusted-label {
        font-size: 0.65rem;
        margin-bottom: 8px;
    }
    .trusted-track {
        gap: 25px;
    }
    
    /* Enhance mobile visibility & prevent tap-to-pause */
    .trusted-track:hover {
        animation-play-state: running;
    }
    .brand-item {
        opacity: 0.95;
        filter: grayscale(15%);
    }
    .brand-item:hover {
        opacity: 0.95;
        filter: grayscale(15%);
    }
}