:root {
    --gps-primary: #4b7d9b;
    --gps-primary-hover: #5e9ab8;
    --gps-primary-light: #dce9f0;
    --gps-primary-rgb: 75, 125, 155;
    --gps-accent: #f59e0b;
    --gps-success: #10b981;
    --gps-warning: #f97316;
    --gps-danger: #ef4444;
    --gps-dark: #0f172a;
    --gps-text: #1e293b;
    --gps-muted: #64748b;
    --gps-bg: #f8fafc;
    --gps-surface: #ffffff;
    --gps-border: #e2e8f0;
    --gps-radius: 14px;
    --gps-radius-lg: 20px;
    --gps-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
    --gps-shadow: 0 4px 6px -2px rgba(15, 23, 42, 0.06), 0 12px 24px -8px rgba(15, 23, 42, 0.10);
    --gps-shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, 0.25), 0 8px 24px -8px rgba(15, 23, 42, 0.10);
    --gps-shadow-color: 0 16px 40px -16px rgba(var(--gps-primary-rgb), 0.40);
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--gps-text);
    background: var(--gps-surface);
    font-feature-settings: 'cv11', 'ss01', 'ss03';
    letter-spacing: -0.011em;
}

h1, h2, h3, h4, h5, h6 { letter-spacing: -0.025em; font-weight: 700; }

.public-body { background: var(--gps-surface); }

/* ─── Brand ─── */
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--gps-primary) 0%, var(--gps-primary-hover) 100%);
    color: var(--gps-primary-text);
    border-radius: 10px;
    font-size: 1.05rem;
    box-shadow: 0 6px 18px -6px rgba(var(--gps-primary-rgb), 0.55);
}

/* ─── Buttons ─── */
.btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 0.55rem 1.25rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-width: 1px;
}
.btn-lg { padding: 0.85rem 1.75rem; border-radius: 12px; font-size: 1.05rem; }
.btn-primary {
    --bs-btn-bg: var(--gps-primary);
    --bs-btn-border-color: var(--gps-primary);
    --bs-btn-color: var(--gps-primary-text);
    --bs-btn-hover-bg: var(--gps-primary-hover);
    --bs-btn-hover-border-color: var(--gps-primary-hover);
    --bs-btn-hover-color: var(--gps-primary-text);
    --bs-btn-active-bg: var(--gps-primary-hover);
    --bs-btn-active-border-color: var(--gps-primary-hover);
    --bs-btn-active-color: var(--gps-primary-text);
    box-shadow: 0 6px 18px -6px rgba(var(--gps-primary-rgb), 0.45);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -10px rgba(var(--gps-primary-rgb), 0.55);
}
.btn-primary:active { transform: translateY(0); }
.btn-outline-primary {
    --bs-btn-color: var(--gps-primary);
    --bs-btn-border-color: var(--gps-primary);
    --bs-btn-bg: transparent;
    --bs-btn-hover-bg: var(--gps-primary);
    --bs-btn-hover-color: var(--gps-primary-text);
    --bs-btn-hover-border-color: var(--gps-primary);
    --bs-btn-active-bg: var(--gps-primary);
    --bs-btn-active-color: var(--gps-primary-text);
    --bs-btn-active-border-color: var(--gps-primary);
}

a { color: var(--gps-primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--gps-primary-hover); }

/* ─── Glass navbar ─── */
.navbar.sticky-top {
    background: rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6) !important;
}
.navbar-brand { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.brand-wordmark { font-size: 1.25rem; letter-spacing: -0.025em; text-decoration: none; }
.brand-wordmark strong { font-weight: 700; }
.brand-wordmark span { font-weight: 400; }
.nav-link { font-weight: 500; color: var(--gps-text) !important; padding: 0.5rem 0.9rem !important; border-radius: 8px; transition: all 0.15s; }
.nav-link:hover { color: #000 !important; background: var(--gps-primary); }
.app-navbar .nav-link:hover { color: #000 !important; background: var(--gps-primary); }
.app-navbar .nav-link.active { color: var(--gps-primary-text) !important; background: var(--gps-primary); }

/* ─── Hero ─── */
.hero {
    position: relative;
    padding: 6rem 0 5rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 20%, rgba(var(--gps-primary-rgb), 0.18) 0%, transparent 50%),
        radial-gradient(circle at 85% 80%, rgba(245, 158, 11, 0.12) 0%, transparent 50%),
        linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 80%);
    pointer-events: none;
}
.hero > .container { position: relative; z-index: 2; }
.hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
}
.hero h1 .accent {
    background: linear-gradient(135deg, var(--gps-primary) 0%, var(--gps-primary-hover) 60%, var(--gps-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.hero .lead { font-size: 1.18rem; color: var(--gps-muted); line-height: 1.55; max-width: 540px; }
.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(var(--gps-primary-rgb), 0.10);
    color: var(--gps-primary);
    padding: 0.45rem 0.95rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(var(--gps-primary-rgb), 0.20);
}
.hero-pill .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--gps-success);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

/* Hero visual: stylised phone mockup with floating cards */
.hero-visual {
    position: relative;
    max-width: 520px;
    margin: 0 auto;
}
.hero-visual .phone {
    background: linear-gradient(155deg, #fff 0%, #f1f5f9 100%);
    border-radius: 26px;
    padding: 1rem;
    box-shadow: var(--gps-shadow-lg);
    border: 1px solid var(--gps-border);
    position: relative;
}
.hero-visual .phone-screen {
    aspect-ratio: 9/16;
    max-height: 480px;
    border-radius: 18px;
    background: linear-gradient(180deg, #0a0f1a 0%, #0f1b2d 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Phone status bar */
.ps-statusbar {
    position: relative; z-index: 3;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.55rem 1rem 0.4rem;
    color: rgba(255,255,255,0.9);
    font-size: 0.72rem; font-weight: 600;
}
.ps-dots { display: inline-flex; gap: 3px; }
.ps-dots i { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,0.7); }

/* Map wrap */
.ps-mapwrap { position: relative; flex: 1; overflow: hidden; }
.ps-map { width: 100%; height: 100%; display: block; }
.ps-map .ps-trace {
    stroke-dashoffset: 0;
    animation: ps-trace-dash 1.4s linear infinite;
    filter: drop-shadow(0 0 6px rgba(204,255,3,0.55));
}
@keyframes ps-trace-dash {
    to { stroke-dashoffset: -22; }
}

/* Cars */
.ps-car {
    position: absolute;
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #0a0a0a; font-size: 0.7rem;
    background: var(--gps-primary);
    border: 2px solid #0a0f1a;
    box-shadow: 0 0 0 2px var(--gps-primary), 0 4px 10px rgba(0,0,0,0.45);
    z-index: 2;
}
.ps-car.stopped { background: #f59e0b; box-shadow: 0 0 0 2px #f59e0b, 0 4px 10px rgba(0,0,0,0.45); }
.ps-car-1 { top: 0; left: 0; transform: translate(-50%, -50%) rotate(0deg); will-change: top, left, transform; }
.ps-car-1 i { transform: rotate(0deg); }
.ps-car-2 { top: 62%; left: 24%; transform: rotate(-50deg); background: #60a5fa; box-shadow: 0 0 0 2px #60a5fa, 0 4px 10px rgba(0,0,0,0.45); color: #fff; }
.ps-car-3 { top: 18%; left: 28%; }
.ps-car-3 i { font-size: 0.55rem; }

.ps-pulse {
    position: absolute;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(204,255,3,0.35);
    animation: ps-pulse-anim 2s ease-out infinite;
    z-index: 1;
    pointer-events: none;
}
.ps-car-1-pulse {
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    will-change: top, left;
    animation: ps-pulse-anim 2s ease-out infinite;
}
@keyframes ps-pulse-anim {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}

/* POI markers */
.ps-poi {
    position: absolute;
    width: 22px; height: 22px;
    border-radius: 6px;
    background: rgba(255,255,255,0.92);
    color: #0f172a;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
    z-index: 1;
}
.ps-poi-home { top: 75%; left: 70%; }
.ps-poi-work { top: 12%; left: 70%; }

/* Bottom card */
.ps-bottom {
    position: relative; z-index: 3;
    padding: 0.6rem 0.7rem 0.85rem;
    display: flex; flex-direction: column; gap: 0.4rem;
}
.ps-bottom-row {
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 0.55rem 0.7rem;
    display: flex; align-items: center; gap: 0.6rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.ps-bottom-icon.ps-bottom-icon-zone {
    background: linear-gradient(135deg, var(--gps-primary), var(--gps-primary-hover));
}
.ps-bottom-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--gps-primary);
    color: var(--gps-primary-text);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem;
    flex-shrink: 0;
}
.ps-bottom-text { flex: 1; min-width: 0; line-height: 1.15; }
.ps-bottom-text strong { display: block; font-size: 0.78rem; color: #0f172a; font-weight: 700; letter-spacing: -0.01em; }
.ps-bottom-text span { font-size: 0.68rem; color: #64748b; }
.ps-bottom-badge {
    background: #0a0a0a; color: var(--gps-primary);
    font-size: 0.58rem; font-weight: 700; letter-spacing: 0.08em;
    padding: 0.18rem 0.4rem; border-radius: 100px;
    display: inline-flex; align-items: center; gap: 0.25rem;
}
.ps-bottom-badge::before {
    content: '';
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--gps-primary);
    box-shadow: 0 0 6px var(--gps-primary);
    animation: bento-blink 1.4s ease-in-out infinite;
}
.hero-visual .floating-card {
    position: absolute;
    background: #fff;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    box-shadow: var(--gps-shadow-lg);
    border: 1px solid var(--gps-border);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    animation: float 6s ease-in-out infinite;
}
.hero-visual .floating-card.fc-1 { top: 10%; left: -14%; animation-delay: 0s; }
.hero-visual .floating-card.fc-2 { top: 48%; right: -12%; animation-delay: -2s; }
.hero-visual .floating-card.fc-3 { bottom: 26%; left: -18%; animation-delay: -4s; }

/* Hero data widgets (replace floating-card pattern with richer cards on the side) */
.hero-widget {
    position: absolute;
    width: 200px;
    background: linear-gradient(180deg, rgba(15,23,42,0.92) 0%, rgba(10,15,26,0.92) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 0.85rem 1rem 0.9rem;
    box-shadow: 0 18px 40px -16px rgba(0,0,0,0.55);
    color: #f1f5f9;
    animation: float 6s ease-in-out infinite;
}
.hero-widget.hw-trip { top: 6%; right: -16%; }
.hero-widget.hw-speed { bottom: 14%; left: -16%; animation-delay: -3s; }
.hero-widget.hw-fuel { top: 38%; right: -16%; animation-delay: -2s; }
.hero-widget.hw-mileage { top: 70%; right: -16%; animation-delay: -4s; }

.hw-trend-down { color: #f59e0b !important; }
.hw-fuel-avg { display: flex; justify-content: space-between; align-items: baseline; margin-top: 0.4rem; padding-top: 0.45rem; border-top: 1px solid rgba(255,255,255,0.07); }
.hw-fuel-avg span { font-size: 0.7rem; color: #94a3b8; }
.hw-fuel-avg strong { font-size: 0.95rem; color: #fff; font-weight: 700; }
.hw-fuel-avg em { font-size: 0.7rem; color: #94a3b8; font-style: normal; font-weight: 500; margin-left: 0.15rem; }

.hw-mileage-bar { margin-top: 0.55rem; height: 5px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; position: relative; }
.hw-mileage-fill { height: 100%; background: linear-gradient(90deg, var(--gps-primary), #6dd400); border-radius: 4px; }
.hw-mileage-note { display: block; margin-top: 0.45rem; font-size: 0.7rem; color: #94a3b8; }
.hw-mileage-note strong { color: var(--gps-primary); font-weight: 700; }
.hw-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.45rem; }
.hw-eyebrow { font-size: 0.68rem; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; display: inline-flex; align-items: center; gap: 0.3rem; }
.hw-eyebrow i { color: var(--gps-primary); font-size: 0.7rem; }
.hw-trend { font-size: 0.7rem; font-weight: 700; color: var(--gps-primary); display: inline-flex; align-items: center; gap: 0.25rem; }
.hw-status { font-size: 0.65rem; font-weight: 600; color: var(--gps-primary); display: inline-flex; align-items: center; gap: 0.3rem; }
.hw-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gps-primary); box-shadow: 0 0 6px var(--gps-primary); animation: bento-blink 1.4s ease-in-out infinite; }
.hw-value { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.02em; color: #fff; line-height: 1.1; }
.hw-value span { font-size: 0.78rem; color: #94a3b8; font-weight: 500; margin-left: 0.2rem; }
.hw-spark { width: 100%; height: 30px; margin-top: 0.4rem; display: block; }
.hw-meter { margin-top: 0.55rem; height: 4px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; }
.hw-meter-fill { height: 100%; background: linear-gradient(90deg, var(--gps-primary), #6dd400); border-radius: 4px; }
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
.fc-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    flex-shrink: 0;
}
.fc-text { font-size: 0.82rem; line-height: 1.2; }
.fc-text strong { display: block; color: var(--gps-text); font-weight: 600; }
.fc-text span { color: var(--gps-muted); font-size: 0.75rem; }

@media (max-width: 991px) {
    .hero { padding: 4rem 0 3rem; }
    .hero-visual { margin-top: 3rem; max-width: 380px; }
    .hero-visual .floating-card.fc-1 { left: -4%; }
    .hero-visual .floating-card.fc-2 { right: -2%; }
}

/* ─── Section spacing & headings ─── */
.section { padding: 5rem 0; }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: clamp(1.85rem, 3.5vw, 2.5rem); font-weight: 800; letter-spacing: -0.03em; color: var(--gps-text); }
.section-title p { font-size: 1.1rem; color: var(--gps-muted); max-width: 600px; margin: 0.75rem auto 0; }
html.dark .section-title h2 { color: #fff; }
html.dark .section-title p { color: #cbd5e1; }
.section-tag {
    display: inline-block;
    background: var(--gps-primary);
    color: var(--gps-primary-text);
    padding: 0.35rem 0.95rem;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.85rem;
}

/* ─── Feature cards ─── */
.feature-card {
    background: #fff;
    border: 1px solid var(--gps-border);
    border-radius: var(--gps-radius);
    padding: 1.85rem;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(var(--gps-primary-rgb), 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--gps-shadow-lg);
    border-color: rgba(var(--gps-primary-rgb), 0.30);
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--gps-primary-light) 0%, rgba(var(--gps-primary-rgb), 0.20) 100%);
    color: var(--gps-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
    margin-bottom: 1.25rem;
    transition: transform 0.3s;
}
.feature-card:hover .feature-icon { transform: scale(1.08) rotate(-3deg); }
.feature-card h5 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.94rem; color: var(--gps-muted); line-height: 1.55; }

/* ─── Legal pages ─── */
.legal-page { max-width: 820px; margin: 0 auto; padding: 3.5rem 1.25rem 5rem; }
.legal-head { text-align: center; margin-bottom: 2.5rem; }
.legal-head h1 { font-size: clamp(2rem, 3.5vw, 2.75rem); font-weight: 800; letter-spacing: -0.03em; margin: 1rem 0 0.6rem; color: var(--gps-text); }
.legal-meta { color: var(--gps-muted); font-size: 0.92rem; margin: 0; }
.legal-lead { font-size: 1.08rem; color: var(--gps-muted); line-height: 1.65; margin: 0 0 2rem; padding: 1.1rem 1.25rem; border-left: 3px solid var(--gps-primary); background: rgba(var(--gps-primary-rgb), 0.06); border-radius: 0 12px 12px 0; }
.legal-page h2 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.015em; margin: 2.5rem 0 0.8rem; color: var(--gps-text); }
.legal-page h3 { font-size: 1.05rem; font-weight: 700; margin: 1.4rem 0 0.5rem; color: var(--gps-text); }
.legal-page p { color: var(--gps-text); line-height: 1.7; margin: 0 0 0.9rem; }
.legal-page ul, .legal-page ol { padding-left: 1.5rem; line-height: 1.75; color: var(--gps-text); margin: 0 0 1.1rem; }
.legal-page li { margin-bottom: 0.4rem; }
.legal-page li ul { margin: 0.45rem 0 0.6rem; }
.legal-page code { font-size: 0.85em; background: rgba(var(--gps-primary-rgb), 0.10); color: var(--gps-text); padding: 0.1em 0.4em; border-radius: 5px; }
.legal-page a { color: var(--gps-primary); }
.legal-page a:hover { text-decoration: underline; }

.legal-toc {
    background: rgba(var(--gps-primary-rgb), 0.05);
    border: 1px solid rgba(var(--gps-primary-rgb), 0.18);
    border-radius: 16px;
    padding: 1.25rem 1.5rem 1.25rem 2.25rem;
    margin: 0 0 2rem;
}
.legal-toc-eyebrow { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: var(--gps-primary); margin: 0 0 0.55rem; padding-left: 0; }
.legal-toc ol { margin: 0; padding-left: 1rem; columns: 2; column-gap: 1.5rem; }
.legal-toc li { break-inside: avoid; margin-bottom: 0.3rem; }
.legal-toc a { color: var(--gps-text); font-size: 0.92rem; }
.legal-toc a:hover { color: var(--gps-primary); }

.legal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem; margin: 0.85rem 0 1.5rem; }
.legal-card { background: rgba(15,23,42,0.04); border: 1px solid var(--gps-border); border-radius: 12px; padding: 0.85rem 1rem; }
.legal-card-name { font-weight: 700; font-size: 0.95rem; color: var(--gps-text); margin: 0 0 0.25rem; }
.legal-card-desc { font-size: 0.85rem; color: var(--gps-muted); margin: 0; line-height: 1.5; }
.legal-pill { display: inline-block; background: rgba(var(--gps-primary-rgb), 0.15); color: var(--gps-primary); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 100px; margin-left: 0.4rem; vertical-align: middle; }

/* Tiny edit/toggle button (used on dashboard cards) */
.btn-edit-tiny {
    width: 28px; height: 28px; border-radius: 7px;
    border: 1px solid var(--gps-border); background: transparent;
    color: var(--gps-muted);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.78rem; cursor: pointer; transition: all 0.15s;
    flex-shrink: 0;
}
.btn-edit-tiny:hover { background: #0a0a0a; color: var(--gps-primary); border-color: #0a0a0a; }
html.dark .btn-edit-tiny { border-color: rgba(255,255,255,0.12); color: #94a3b8; }
html.dark .btn-edit-tiny:hover { background: var(--gps-primary); color: #0a0a0a; border-color: var(--gps-primary); }

/* Device table — name link with proper contrast */
.devices-name-link {
    color: var(--gps-text) !important;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}
.devices-name-link:hover { color: var(--gps-primary) !important; text-decoration: underline; }
html.dark .devices-name-link { color: #e2e8f0 !important; }
html.dark .devices-name-link:hover { color: var(--gps-primary) !important; }

/* Fleet rollup on dashboard */
.fleet-rollup { background: linear-gradient(180deg, #fff 0%, rgba(204,255,3,0.02) 100%); }
.fr-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.85rem; }
.fr-card { display: flex; align-items: center; gap: 0.7rem; padding: 0.85rem; background: rgba(15,23,42,0.03); border: 1px solid var(--gps-border); border-radius: 12px; }
.fr-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--gps-primary); color: var(--gps-primary-text); display: flex; align-items: center; justify-content: center; font-size: 0.95rem; flex-shrink: 0; }
html.dark .fr-icon { background: var(--gps-primary); color: var(--gps-primary-text); }
.fr-num { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.025em; color: var(--gps-text); line-height: 1.1; }
.fr-num small { font-size: 0.6em; font-weight: 600; color: var(--gps-muted); margin-left: 0.15em; }
.fr-lbl { font-size: 0.72rem; color: var(--gps-muted); margin-top: 0.1rem; }
.fr-card.fr-alert { background: rgba(220,38,38,0.05); border-color: rgba(220,38,38,0.25); }
.fr-card.fr-alert .fr-icon { background: #dc2626 !important; color: #fff !important; }
.fr-card.fr-alert .fr-num { color: #dc2626; }
.fr-card.fr-rating .fr-num { color: var(--gps-text); }
html.dark .fr-card.fr-rating .fr-num { color: #fff; }
html.dark .fleet-rollup { background: linear-gradient(180deg, #131c2c 0%, #0a0f1a 100%); }
html.dark .fr-card { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); }
html.dark .fr-num { color: #fff; }

.fr-rows {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 360px;
    overflow-y: auto;
    margin-right: -0.5rem;
    padding-right: 0.5rem;
}
.fr-rows::-webkit-scrollbar { width: 6px; }
.fr-rows::-webkit-scrollbar-track { background: transparent; }
.fr-rows::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.15); border-radius: 4px; }
.fr-rows::-webkit-scrollbar-thumb:hover { background: rgba(var(--gps-primary-rgb), 0.5); }
html.dark .fr-rows::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }
.fr-row {
    display: grid;
    grid-template-columns: 32px minmax(120px, 0.9fr) minmax(60px, 1.2fr) auto;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    background: rgba(15,23,42,0.02);
    border-radius: 8px;
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
}
.fr-row > * { min-width: 0; }
.fr-row:hover { background: rgba(var(--gps-primary-rgb), 0.06); }
.fr-row-name { font-weight: 600; font-size: 0.9rem; color: var(--gps-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fr-row-bar { height: 6px; background: rgba(15,23,42,0.06); border-radius: 4px; overflow: hidden; position: relative; }
.fr-row-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--gps-primary), #6dd400); border-radius: 4px; transition: width 0.3s; }
.fr-row-rank {
    width: 26px; height: 26px;
    border-radius: 7px;
    background: rgba(15,23,42,0.06);
    color: var(--gps-muted);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    font-variant-numeric: tabular-nums;
}
html.dark .fr-row-rank { background: rgba(255,255,255,0.06); }
.fr-row:nth-of-type(1) .fr-row-rank { background: linear-gradient(135deg, var(--gps-primary), #6dd400); color: var(--gps-primary-text); }
.fr-row:nth-of-type(2) .fr-row-rank { background: linear-gradient(135deg, #cbd5e1, #94a3b8); color: #0f172a; }
.fr-row:nth-of-type(3) .fr-row-rank { background: linear-gradient(135deg, #f59e0b, #b45309); color: #fff; }

.fr-sort-pills { display: inline-flex; align-items: stretch; background: rgba(15,23,42,0.04); padding: 0.18rem; border-radius: 100px; gap: 0.2rem; height: 32px; }
.fr-sort-pills button { background: transparent; border: 0; padding: 0 0.85rem; font-size: 0.8rem; font-weight: 600; color: var(--gps-muted); border-radius: 100px; cursor: pointer; transition: all 0.15s; line-height: 1; display: inline-flex; align-items: center; white-space: nowrap; }
.fr-sort-pills button:hover { color: var(--gps-text); }
.fr-sort-pills button.active { background: var(--gps-primary); color: var(--gps-primary-text); }
html.dark .fr-sort-pills { background: rgba(255,255,255,0.06); }

/* Match leaderboard search input height to pills (32px) */
.fr-leaderboard input[type="search"].form-control-sm {
    height: 32px;
    padding: 0 0.7rem;
    font-size: 0.8rem;
    border-radius: 100px;
}

.fr-show-all {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.6rem 1rem;
    background: transparent;
    border: 1px dashed var(--gps-border);
    border-radius: 8px;
    color: var(--gps-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.fr-show-all:hover { background: rgba(var(--gps-primary-rgb), 0.06); border-color: rgba(var(--gps-primary-rgb), 0.35); color: var(--gps-text); }
.fr-show-all strong { color: var(--gps-primary); }
html.dark .fr-show-all { border-color: rgba(255,255,255,0.12); }

.fr-row-val { text-align: right; font-size: 0.82rem; color: var(--gps-muted); white-space: nowrap; flex-shrink: 0; }
.fr-row-val strong { color: var(--gps-text); font-weight: 700; }
html.dark .fr-row { background: rgba(255,255,255,0.02); }
html.dark .fr-row-name, html.dark .fr-row-val strong { color: #e2e8f0; }
html.dark .fr-row-bar { background: rgba(255,255,255,0.06); }

@media (max-width: 991px) { .fr-grid { grid-template-columns: repeat(3, 1fr); } .fr-row { grid-template-columns: 32px 1fr auto; } .fr-row-bar { display: none; } }
@media (max-width: 575px) { .fr-grid { grid-template-columns: repeat(2, 1fr); } }

/* Device sharing list */
.share-list { display: flex; flex-direction: column; gap: 0.4rem; }
.share-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.55rem 0.7rem; background: rgba(15,23,42,0.03); border-radius: 8px; }
.share-info { flex: 1; min-width: 0; }
.share-info strong { display: block; font-size: 0.88rem; color: var(--gps-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-meta { font-size: 0.75rem; color: var(--gps-muted); }
html.dark .share-row { background: rgba(255,255,255,0.03); }
html.dark .share-info strong { color: #e2e8f0; }

/* Service book year accordions */
.sr-years { display: flex; flex-direction: column; gap: 0.5rem; }
.sr-year {
    background: rgba(15,23,42,0.02);
    border: 1px solid var(--gps-border);
    border-radius: 12px;
    overflow: hidden;
    transition: background 0.2s, border-color 0.2s;
}
.sr-year[open] { background: #fff; border-color: rgba(var(--gps-primary-rgb), 0.35); }
.sr-year-head {
    list-style: none;
    cursor: pointer;
    padding: 0.7rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    user-select: none;
    transition: background 0.15s;
}
.sr-year-head::-webkit-details-marker { display: none; }
.sr-year-head:hover { background: rgba(var(--gps-primary-rgb), 0.05); }
.sr-year-num { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; color: var(--gps-text); font-variant-numeric: tabular-nums; }
.sr-year-meta { display: flex; gap: 0.7rem; align-items: center; flex: 1; flex-wrap: wrap; }
.sr-year-count { font-size: 0.78rem; color: var(--gps-muted); font-weight: 500; }
.sr-year-cost { font-size: 0.85rem; font-weight: 700; color: var(--gps-primary); background: rgba(var(--gps-primary-rgb), 0.12); padding: 0.15rem 0.55rem; border-radius: 100px; font-variant-numeric: tabular-nums; }
.sr-year-chev { font-size: 0.75rem; color: var(--gps-muted); transition: transform 0.25s; }
.sr-year[open] .sr-year-chev { transform: rotate(180deg); color: var(--gps-primary); }
.sr-year .sr-timeline {
    padding: 0.5rem 1rem 1rem 2.4rem;
    animation: sr-year-open 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 480px;
    overflow-y: auto;
}
.sr-year .sr-timeline::-webkit-scrollbar { width: 6px; }
.sr-year .sr-timeline::-webkit-scrollbar-thumb { background: rgba(var(--gps-primary-rgb), 0.3); border-radius: 4px; }
@keyframes sr-year-open {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

html.dark .sr-year { background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.08); }
html.dark .sr-year[open] { background: rgba(255,255,255,0.04); border-color: rgba(var(--gps-primary-rgb), 0.35); }
html.dark .sr-year-num { color: #fff; }

/* Service book (Сервизна книжка) timeline */
.sr-timeline {
    position: relative;
    padding-left: 1.4rem;
}
.sr-timeline::before {
    content: '';
    position: absolute;
    left: 14px; top: 8px; bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, rgba(var(--gps-primary-rgb), 0.3), rgba(var(--gps-primary-rgb), 0.05));
}
.sr-entry {
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem 0.5rem 0.85rem 1.2rem;
    border-bottom: 1px dashed var(--gps-border);
    align-items: flex-start;
    position: relative;
}
.sr-entry .sr-body { min-width: 0; }
.sr-entry:last-child { border-bottom: 0; }
.sr-dot {
    position: absolute;
    left: -1.4rem;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--gps-primary);
    color: var(--gps-text);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem;
    z-index: 1;
    flex-shrink: 0;
}
.sr-body { flex: 1; min-width: 0; }
.sr-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; }
.sr-head strong { font-size: 0.95rem; color: var(--gps-text); }
.sr-date { font-size: 0.8rem; color: var(--gps-muted); font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; }
.sr-meta { display: flex; gap: 0.75rem; flex-wrap: wrap; font-size: 0.78rem; color: var(--gps-muted); }
.sr-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.sr-meta i { font-size: 0.72rem; }
.sr-type { background: rgba(15,23,42,0.05); padding: 0.1rem 0.5rem; border-radius: 100px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.66rem; }
.sr-auto { color: var(--gps-primary); font-weight: 600; }
.sr-auto i { color: var(--gps-primary); }
.sr-desc { font-size: 0.85rem; color: var(--gps-muted); margin: 0.4rem 0 0; line-height: 1.4; padding: 0.4rem 0.7rem; background: rgba(15,23,42,0.03); border-radius: 6px; border-left: 2px solid rgba(var(--gps-primary-rgb), 0.3); }
.sr-del { flex-shrink: 0; }

html.dark .sr-dot { background: #131c2c; }
html.dark .sr-entry { border-bottom-color: rgba(255,255,255,0.06); }
html.dark .sr-head strong { color: #fff; }
html.dark .sr-type { background: rgba(255,255,255,0.06); }
html.dark .sr-desc { background: rgba(255,255,255,0.03); }

/* Maintenance reminders list */
.mr-form { background: rgba(var(--gps-primary-rgb), 0.04); border: 1px solid rgba(var(--gps-primary-rgb), 0.18); border-radius: 12px; padding: 1rem 1.15rem; }
.mr-list { display: flex; flex-direction: column; gap: 0.55rem; }
.mr-item {
    display: flex; align-items: flex-start; gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid var(--gps-border);
    border-radius: 12px;
    border-left-width: 3px;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.mr-item:hover { transform: translateX(2px); box-shadow: 0 8px 18px -12px rgba(15,23,42,0.12); }
.mr-icon { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: rgba(15,23,42,0.05); color: var(--gps-text); font-size: 0.9rem; }
.mr-body { flex: 1; min-width: 0; }
.mr-title { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.25rem; }
.mr-title strong { font-size: 0.95rem; color: var(--gps-text); }
.mr-type { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gps-muted); background: rgba(15,23,42,0.05); padding: 0.1rem 0.5rem; border-radius: 100px; font-weight: 600; }
.mr-meta { display: flex; gap: 0.85rem; flex-wrap: wrap; font-size: 0.78rem; color: var(--gps-muted); }
.mr-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.mr-meta i { color: var(--gps-muted); font-size: 0.75rem; }
.mr-recur i { color: var(--gps-primary); }
.mr-desc { font-size: 0.85rem; color: var(--gps-muted); margin: 0.4rem 0 0; line-height: 1.4; }
.mr-actions { display: flex; gap: 0.35rem; flex-shrink: 0; }
.mr-actions .btn { padding: 0.3rem 0.55rem; }

.mr-item.mr-ok { border-left-color: #cbd5e1; }
.mr-item.mr-due_soon { border-left-color: #f59e0b; background: rgba(245,158,11,0.04); }
.mr-item.mr-due_soon .mr-icon { background: rgba(245,158,11,0.14); color: #f59e0b; }
.mr-item.mr-overdue { border-left-color: #dc2626; background: rgba(220,38,38,0.04); }
.mr-item.mr-overdue .mr-icon { background: rgba(220,38,38,0.14); color: #dc2626; }
.mr-item.mr-completed { opacity: 0.55; }
.mr-item.mr-completed .mr-icon { background: rgba(16,185,129,0.14); color: #10b981; }

html.dark .mr-item { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); }
html.dark .mr-title strong { color: #fff; }
html.dark .mr-type { background: rgba(255,255,255,0.06); }
html.dark .mr-icon { background: rgba(255,255,255,0.05); color: #e2e8f0; }

/* Device stats bar */
.device-stats-bar { padding: 1.2rem 1.4rem 1.4rem; }
.dsb-period { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; gap: 1rem; flex-wrap: wrap; }
.dsb-period-label { font-size: 0.85rem; color: var(--gps-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.dsb-period-switch { display: flex; gap: 0.3rem; background: rgba(15,23,42,0.04); padding: 0.25rem; border-radius: 100px; }
.dsb-pill { padding: 0.35rem 0.75rem; font-size: 0.78rem; font-weight: 600; color: var(--gps-muted); border-radius: 100px; text-decoration: none; transition: all 0.15s; }
.dsb-pill:hover { color: var(--gps-text); background: rgba(15,23,42,0.04); }
.dsb-pill.active { background: var(--gps-primary); color: var(--gps-primary-text); }
.dsb-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.9rem; }
.dsb-card {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.85rem;
    background: rgba(15,23,42,0.03);
    border: 1px solid var(--gps-border);
    border-radius: 12px;
    transition: transform 0.2s, border-color 0.2s;
}
.dsb-card:hover { transform: translateY(-2px); border-color: rgba(var(--gps-primary-rgb), 0.35); }
.dsb-icon {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--gps-primary); color: var(--gps-primary-text);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}
html.dark .dsb-icon { background: var(--gps-primary); color: var(--gps-primary-text); }
.dsb-num { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.025em; color: var(--gps-text); line-height: 1.1; }
.dsb-num small { font-size: 0.6em; font-weight: 600; color: var(--gps-muted); margin-left: 0.15em; }
.dsb-lbl { font-size: 0.72rem; color: var(--gps-muted); margin-top: 0.1rem; }

.dsb-card-alert.has-alert { background: rgba(220,38,38,0.05); border-color: rgba(220,38,38,0.25); }
.dsb-card-alert.has-alert .dsb-icon { background: #dc2626; color: #fff; }
.dsb-card-alert.has-alert .dsb-num { color: #dc2626; }

.dsb-rating-excellent .dsb-icon { background: #10b981; color: #fff; }
.dsb-rating-excellent .dsb-num { background: linear-gradient(135deg, #10b981, #059669); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.dsb-rating-good .dsb-icon { background: var(--gps-primary); color: var(--gps-primary-text); }
.dsb-rating-good .dsb-num { background: linear-gradient(135deg, var(--gps-primary), #6dd400); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.dsb-rating-warning .dsb-icon { background: #f59e0b; color: #fff; }
.dsb-rating-warning .dsb-num { color: #f59e0b; }
.dsb-rating-bad .dsb-icon { background: #dc2626; color: #fff; }
.dsb-rating-bad .dsb-num { color: #dc2626; }
.dsb-rating-na .dsb-icon { background: #94a3b8; color: #fff; }

/* Hint when device has no OBD support */
.dsb-no-obd-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.95rem 1.1rem;
    background: rgba(96,165,250,0.06);
    border: 1px dashed rgba(96,165,250,0.35);
    border-radius: 12px;
}
.dsb-no-obd-icon {
    width: 36px; height: 36px; border-radius: 9px;
    background: #60a5fa; color: #fff;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 1rem;
}
.dsb-no-obd-hint strong { display: block; margin-bottom: 0.15rem; color: var(--gps-text); }
.dsb-no-obd-hint p { color: var(--gps-muted); margin: 0; line-height: 1.5; }
.dsb-no-obd-hint a { color: var(--gps-primary); }
html.dark .dsb-no-obd-hint { background: rgba(96,165,250,0.08); border-color: rgba(96,165,250,0.3); }
html.dark .dsb-no-obd-hint strong { color: #fff; }
.dsb-no-obd-hint a { color: var(--gps-text); text-decoration: underline; font-weight: 600; }
.dsb-no-obd-hint a:hover { color: var(--gps-primary); }
html.dark .dsb-no-obd-hint a { color: #fff; }

/* OBD-specific stat cards */
.dsb-icon-fuel { background: #3b82f6 !important; color: #fff !important; }
.dsb-icon-tank { background: #06b6d4 !important; color: #fff !important; }
.dsb-icon-rpm { background: #8b5cf6 !important; color: #fff !important; }
.dsb-icon-temp { background: #ef4444 !important; color: #fff !important; }
.dsb-icon-obd { background: #0f172a !important; color: var(--gps-primary) !important; }
.dsb-card.dsb-obd-info { opacity: 0.85; }

html.dark .dsb-card { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); }
html.dark .dsb-num { color: #fff; }
html.dark .dsb-period-switch { background: rgba(255,255,255,0.06); }
html.dark .dsb-pill:hover { background: rgba(255,255,255,0.08); color: #fff; }

@media (max-width: 1199px) { .dsb-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575px) { .dsb-grid { grid-template-columns: repeat(2, 1fr); } }

/* Devices catalog */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin: 1rem 0 2.5rem;
}
.dcard {
    position: relative;
    background: #fff;
    border: 1px solid var(--gps-border);
    border-radius: 22px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.3s;
}
.dcard:hover { transform: translateY(-4px); border-color: rgba(var(--gps-primary-rgb), 0.4); box-shadow: 0 24px 50px -24px rgba(var(--gps-primary-rgb), 0.45); }
.dcard-featured { border-color: rgba(var(--gps-primary-rgb), 0.5); box-shadow: 0 14px 36px -18px rgba(var(--gps-primary-rgb), 0.4); }
.dcard-badge {
    position: absolute; top: 14px; right: 14px;
    background: rgba(15,23,42,0.85);
    color: #fff; font-size: 0.65rem;
    text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700;
    padding: 0.3rem 0.65rem; border-radius: 100px;
    z-index: 2;
}
.dcard-badge-pop { background: var(--gps-primary); color: var(--gps-primary-text); }
.dcard-badge-new { background: #60a5fa; color: #fff; }
.dcard-visual {
    background: linear-gradient(180deg, #0a0f1a 0%, #131c2c 100%);
    padding: 1.5rem 1rem 0;
    aspect-ratio: 16 / 11;
}
.dcard-visual svg { width: 100%; height: 100%; display: block; }
.dcard-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.dcard h3 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.025em; margin: 0; color: var(--gps-text); }
.dcard-tagline { color: var(--gps-muted); font-size: 0.93rem; margin: 0; line-height: 1.45; }
.dcard-price { padding: 0.85rem 0; border-top: 1px solid var(--gps-border); border-bottom: 1px solid var(--gps-border); display: flex; flex-direction: column; gap: 0.2rem; }
.dcard-price-num { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.02em; color: var(--gps-text); }
.dcard-price-vat { font-size: 0.78rem; color: var(--gps-muted); }
.dcard-specs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.dcard-specs li { display: flex; align-items: flex-start; gap: 0.55rem; font-size: 0.88rem; color: var(--gps-text); line-height: 1.45; }
.dcard-specs i { color: var(--gps-primary); font-size: 0.8rem; margin-top: 0.25rem; flex-shrink: 0; }
.dcap-block { margin: 0.5rem 0 0; padding-top: 0.85rem; border-top: 1px dashed var(--gps-border); }
.dcap-head { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--gps-muted); margin-bottom: 0.5rem; }
.dcap-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.dcap-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; line-height: 1.35; }
.dcap-row.has { color: var(--gps-text); }
.dcap-row.has i { color: #10b981; flex-shrink: 0; }
.dcap-row.no { color: var(--gps-muted); text-decoration: line-through; opacity: 0.7; }
.dcap-row.no i { color: #cbd5e1; flex-shrink: 0; }
html.dark .dcap-row.has { color: #e2e8f0; }
html.dark .dcap-row.no { color: #64748b; }

.dcard-best { margin-top: 0; font-size: 0.82rem; color: var(--gps-muted); padding-top: 0.85rem; border-top: 1px dashed var(--gps-border); line-height: 1.5; }
.dcard-manual { display: inline-flex; align-items: center; margin-top: 0.55rem; font-size: 0.82rem; font-weight: 600; color: var(--gps-primary); text-decoration: none; transition: opacity 0.15s; }
.dcard-manual:hover { opacity: 0.75; text-decoration: underline; }
.dcard-best strong { color: var(--gps-text); }
html.dark .dcard { background: linear-gradient(180deg, #0f1624 0%, #0a0f1a 100%); border-color: rgba(255,255,255,0.08); }
html.dark .dcard h3, html.dark .dcard-price-num, html.dark .dcard-best strong { color: #fff; }
html.dark .dcard-specs li { color: #cbd5e1; }
html.dark .dcard-price, html.dark .dcard-best { border-color: rgba(255,255,255,0.08); }
@media (max-width: 991px) { .devices-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .devices-grid { grid-template-columns: 1fr; } }

.devices-cta {
    text-align: center;
    padding: 2.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(var(--gps-primary-rgb), 0.10), rgba(96,165,250,0.05));
    border: 1px solid rgba(var(--gps-primary-rgb), 0.28);
    border-radius: 20px;
    margin: 2rem 0;
}
.devices-cta h3 { font-size: 1.45rem; font-weight: 800; margin: 0 0 0.5rem; }
.devices-cta p { color: var(--gps-muted); margin: 0 0 1.25rem; }

.dcompare-wrap { overflow-x: auto; }
.dcompare {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid var(--gps-border);
    border-radius: 16px;
    overflow: hidden;
}
.dcompare th, .dcompare td { padding: 0.85rem 1rem; text-align: left; font-size: 0.92rem; }
.dcompare thead th {
    background: rgba(var(--gps-primary-rgb), 0.06);
    font-weight: 700;
    color: var(--gps-text);
    text-transform: none;
}
.dcompare tbody tr { border-top: 1px solid var(--gps-border); }
.dcompare tbody tr:nth-child(even) { background: rgba(15,23,42,0.02); }
.dcompare td { color: var(--gps-text); }
.dcompare td:first-child { font-weight: 600; color: var(--gps-muted); width: 32%; }
.dcompare .dcompare-featured { background: rgba(var(--gps-primary-rgb), 0.08) !important; }
.dcompare i.ok { color: var(--gps-primary); font-size: 1rem; }
.dcompare i.no { color: #cbd5e1; font-size: 1rem; }
html.dark .dcompare { background: linear-gradient(180deg, #0f1624 0%, #0a0f1a 100%); border-color: rgba(255,255,255,0.08); }
html.dark .dcompare tbody tr:nth-child(even) { background: rgba(255,255,255,0.02); }
html.dark .dcompare td, html.dark .dcompare thead th { color: #e2e8f0; }
html.dark .dcompare td:first-child { color: #94a3b8; }
html.dark .dcompare i.no { color: #475569; }

/* Manual page (FMB920 diagram + steps) */
.manual-diagram {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--gps-border);
    border-radius: 18px;
    padding: 1.25rem;
    margin: 1.25rem 0 2rem;
    overflow-x: auto;
}
.manual-diagram svg { width: 100%; height: auto; min-width: 600px; display: block; }
.manual-diagram-note { margin: 0.85rem 0 0; font-size: 0.85rem; color: var(--gps-muted); text-align: center; }
html.dark .manual-diagram { background: linear-gradient(180deg, #0f1624 0%, #0a0f1a 100%); border-color: rgba(255,255,255,0.08); }

.manual-steps { counter-reset: step; padding: 0; margin: 1.25rem 0 1.75rem; list-style: none; }
.manual-steps > li {
    counter-increment: step;
    position: relative;
    padding: 1.1rem 1.1rem 1.1rem 3.4rem;
    background: rgba(var(--gps-primary-rgb), 0.04);
    border: 1px solid rgba(var(--gps-primary-rgb), 0.15);
    border-radius: 14px;
    margin-bottom: 0.7rem;
    transition: border-color 0.2s, transform 0.2s;
}
.manual-steps > li:hover { border-color: rgba(var(--gps-primary-rgb), 0.4); transform: translateX(2px); }
.manual-steps > li::before {
    content: counter(step);
    position: absolute;
    left: 0.85rem; top: 1rem;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--gps-primary);
    color: var(--gps-primary-text);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px -4px rgba(var(--gps-primary-rgb), 0.6);
}
.manual-steps > li > strong { display: block; margin-bottom: 0.25rem; }
.manual-steps > li ul { padding-left: 1.2rem; margin: 0.4rem 0 0; font-size: 0.9rem; }

.manual-wire { display: inline-block; padding: 0.05em 0.5em; border-radius: 100px; font-weight: 700; font-size: 0.85em; }
.manual-wire.wmr { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.manual-wire.wmk { background: #f1f5f9; color: #0f172a; border: 1px solid #cbd5e1; }
.manual-wire.wmy { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }

.manual-test { counter-reset: tstep; padding: 0; margin: 1rem 0 1.5rem; list-style: none; }
.manual-test > li {
    counter-increment: tstep;
    position: relative;
    padding: 0.85rem 1rem 0.85rem 3rem;
    background: rgba(96,165,250,0.05);
    border: 1px solid rgba(96,165,250,0.2);
    border-radius: 12px;
    margin-bottom: 0.55rem;
}
.manual-test > li::before {
    content: counter(tstep);
    position: absolute;
    left: 0.75rem; top: 0.85rem;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #60a5fa;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 0.82rem;
}
.manual-test > li ul { padding-left: 1.1rem; margin: 0.4rem 0 0; font-size: 0.9rem; }
html.dark .manual-test > li { background: rgba(96,165,250,0.08); border-color: rgba(96,165,250,0.22); }

.manual-preconfig {
    display: flex; align-items: flex-start; gap: 0.85rem;
    padding: 1.1rem 1.25rem;
    background: linear-gradient(135deg, rgba(var(--gps-primary-rgb), 0.12), rgba(var(--gps-primary-rgb), 0.04));
    border: 1px solid rgba(var(--gps-primary-rgb), 0.35);
    border-radius: 14px;
    margin: 0.75rem 0 2rem;
}
.manual-preconfig i { font-size: 1.4rem; color: var(--gps-primary); margin-top: 0.1rem; }
.manual-preconfig strong { display: block; margin-bottom: 0.2rem; }
.manual-preconfig div { line-height: 1.55; color: var(--gps-text); }
html.dark .manual-preconfig div { color: #e2e8f0; }

.manual-faq { display: flex; flex-direction: column; gap: 0.55rem; margin: 1rem 0 1.5rem; }
.manual-faq details {
    background: #fff;
    border: 1px solid var(--gps-border);
    border-radius: 12px;
    transition: border-color 0.2s, background 0.2s;
}
.manual-faq details[open] {
    background: rgba(var(--gps-primary-rgb), 0.05);
    border-color: rgba(var(--gps-primary-rgb), 0.35);
}
.manual-faq summary {
    list-style: none;
    cursor: pointer;
    padding: 0.85rem 1.1rem;
    font-weight: 600;
    color: var(--gps-text);
    display: flex; align-items: center; gap: 0.7rem;
    user-select: none;
}
.manual-faq summary::-webkit-details-marker { display: none; }
.manual-faq summary::before {
    content: '+';
    font-size: 1.2rem; font-weight: 400;
    color: var(--gps-primary);
    transition: transform 0.25s;
    flex-shrink: 0;
}
.manual-faq details[open] summary::before { transform: rotate(45deg); }
.manual-faq details > p { padding: 0 1.1rem 1rem; margin: 0; color: var(--gps-muted); line-height: 1.6; }
html.dark .manual-faq details { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); }
html.dark .manual-faq details[open] { background: rgba(var(--gps-primary-rgb), 0.06); }
html.dark .manual-faq summary { color: #e2e8f0; }
html.dark .manual-steps > li { background: rgba(var(--gps-primary-rgb), 0.06); border-color: rgba(var(--gps-primary-rgb), 0.18); }
html.dark .manual-wire.wmk { background: rgba(255,255,255,0.06); color: #e2e8f0; border-color: rgba(255,255,255,0.15); }

/* Warranty + Shipping highlights */
.ws-highlights { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.85rem; margin: 1.5rem 0 2.25rem; }
.ws-hi {
    background: rgba(var(--gps-primary-rgb), 0.07);
    border: 1px solid rgba(var(--gps-primary-rgb), 0.22);
    border-radius: 14px;
    padding: 1.1rem 0.9rem 0.95rem;
    text-align: center;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.ws-hi:hover { transform: translateY(-3px); border-color: rgba(var(--gps-primary-rgb), 0.5); box-shadow: 0 14px 30px -16px rgba(var(--gps-primary-rgb), 0.4); }
.ws-hi-icon { width: 40px; height: 40px; border-radius: 50%; background: rgba(var(--gps-primary-rgb), 0.18); color: var(--gps-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 0.95rem; margin-bottom: 0.55rem; border: 1px solid rgba(var(--gps-primary-rgb), 0.3); }
.ws-hi-num { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.025em; background: linear-gradient(135deg, var(--gps-primary), #6dd400); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.1; }
.ws-hi-lbl { font-size: 0.78rem; color: var(--gps-muted); margin-top: 0.15rem; }
@media (max-width: 575px) { .ws-highlights { grid-template-columns: repeat(2, 1fr); } }

.ws-shipping-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.85rem; margin: 1rem 0 1.75rem; }
.ws-ship { background: #fff; border: 1px solid var(--gps-border); border-radius: 14px; padding: 1.15rem 1.1rem; transition: transform 0.2s, border-color 0.2s; }
.ws-ship:hover { transform: translateY(-2px); border-color: rgba(var(--gps-primary-rgb), 0.4); }
.ws-ship-head { font-size: 0.85rem; font-weight: 600; color: var(--gps-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.ws-ship-price { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.02em; color: var(--gps-text); margin: 0.3rem 0 0.4rem; }
.ws-ship-note { font-size: 0.82rem; color: var(--gps-muted); line-height: 1.45; }
.ws-ship-highlight { background: linear-gradient(135deg, rgba(var(--gps-primary-rgb), 0.10) 0%, rgba(var(--gps-primary-rgb), 0.03) 100%); border-color: rgba(var(--gps-primary-rgb), 0.35); }
.ws-ship-highlight .ws-ship-price { background: linear-gradient(135deg, var(--gps-primary), #6dd400); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
html.dark .ws-ship { background: linear-gradient(180deg, #0f1624 0%, #0a0f1a 100%); border-color: rgba(255,255,255,0.08); }
html.dark .ws-ship-head, html.dark .ws-ship-note { color: #94a3b8; }
html.dark .ws-ship-price { color: #fff; }
html.dark .ws-hi { background: rgba(var(--gps-primary-rgb), 0.08); border-color: rgba(var(--gps-primary-rgb), 0.28); }
@media (max-width: 700px) { .ws-shipping-grid { grid-template-columns: 1fr; } }

.legal-identity {
    background: rgba(var(--gps-primary-rgb), 0.06);
    border: 1px solid rgba(var(--gps-primary-rgb), 0.18);
    border-radius: 12px;
    padding: 1.15rem 1.4rem 1.15rem 1.4rem;
    margin: 1.25rem 0 1.5rem;
}
.legal-identity > p { margin: 0 0 0.55rem; font-size: 0.9rem; color: var(--gps-text); }
.legal-identity-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.legal-identity-list li { font-size: 0.92rem; color: var(--gps-text); line-height: 1.45; }
.legal-identity-list strong { display: inline-block; min-width: 150px; color: var(--gps-muted); font-weight: 600; }
html.dark .legal-identity { background: rgba(var(--gps-primary-rgb), 0.07); border-color: rgba(var(--gps-primary-rgb), 0.25); }
html.dark .legal-identity-list li, html.dark .legal-identity > p { color: #e2e8f0; }
html.dark .legal-identity-list strong { color: #94a3b8; }
@media (max-width: 575px) {
    .legal-identity-list strong { display: block; min-width: 0; }
}

html.dark .legal-head h1, html.dark .legal-page h2, html.dark .legal-page h3 { color: #fff; }
html.dark .legal-page p, html.dark .legal-page ul, html.dark .legal-page ol { color: #cbd5e1; }
html.dark .legal-page strong { color: #fff; }
html.dark .legal-lead { background: rgba(var(--gps-primary-rgb), 0.08); color: #cbd5e1; }
html.dark .legal-toc { background: rgba(var(--gps-primary-rgb), 0.06); border-color: rgba(var(--gps-primary-rgb), 0.25); }
html.dark .legal-toc a { color: #e2e8f0; }
html.dark .legal-card { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }
html.dark .legal-card-name { color: #fff; }
html.dark .legal-page code { background: rgba(var(--gps-primary-rgb), 0.15); color: var(--gps-primary); }

@media (max-width: 640px) {
    .legal-toc ol { columns: 1; }
    .legal-grid { grid-template-columns: 1fr; }
}

/* ─── Contact page ─── */
.contact-hero {
    padding: 4.5rem 0 5rem;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 25%, rgba(var(--gps-primary-rgb), 0.18) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(96, 165, 250, 0.10) 0%, transparent 50%);
}
.contact-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.03em; margin: 1rem 0 0.85rem; }
.contact-sub { font-size: 1.05rem; color: var(--gps-muted); max-width: 540px; margin: 0 auto; }
.contact-success {
    max-width: 760px; margin: 0 auto 2rem;
    background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(16,185,129,0.05));
    border: 1px solid rgba(16,185,129,0.35);
    color: #047857;
    padding: 0.9rem 1.2rem; border-radius: 14px;
    display: flex; align-items: center; gap: 0.65rem;
    font-weight: 500;
}
.contact-success i { font-size: 1.25rem; }
html.dark .contact-success { color: #6ee7b7; }

.contact-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.5rem; max-width: 1080px; margin: 0 auto; }
@media (max-width: 991px) { .contact-layout { grid-template-columns: 1fr; } }

/* Form card */
.contact-form-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--gps-border);
    border-radius: 24px;
    padding: 2.25rem;
    overflow: hidden;
}
.contact-form-glow {
    position: absolute; top: -120px; right: -120px;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--gps-primary-rgb), 0.25) 0%, transparent 65%);
    pointer-events: none;
    filter: blur(20px);
}
.contact-form-head { margin-bottom: 1.75rem; position: relative; }
.contact-form-head h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); font-weight: 700; letter-spacing: -0.02em; margin: 0.75rem 0 0; }

.contact-form { position: relative; display: flex; flex-direction: column; gap: 1.1rem; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 575px) { .cf-row { grid-template-columns: 1fr; } }

.cf-field { position: relative; }
.cf-input {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.15rem 1rem 0.55rem;
    font-size: 0.98rem;
    color: var(--gps-text);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
.cf-input:focus {
    outline: none;
    border-color: var(--gps-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(var(--gps-primary-rgb), 0.18);
}
.cf-textarea { resize: vertical; min-height: 130px; padding-top: 1.5rem; }
.cf-label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    font-size: 0.95rem;
    color: #94a3b8;
    pointer-events: none;
    transition: transform 0.18s ease, color 0.18s, font-size 0.18s;
    transform-origin: left top;
    background: transparent;
}
.cf-input:focus ~ .cf-label,
.cf-input:not(:placeholder-shown) ~ .cf-label {
    transform: translateY(-12px) scale(0.78);
    color: var(--gps-primary);
    font-weight: 600;
}
.cf-field.has-error .cf-input { border-color: #ef4444; background: rgba(239,68,68,0.04); }
.cf-error { color: #dc2626; font-size: 0.78rem; margin-top: 0.3rem; }

.cf-bottom {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    margin-top: 0.4rem;
}
.cf-captcha {
    display: inline-flex; align-items: center; gap: 0.55rem;
    padding: 0.7rem 1rem;
    background: rgba(var(--gps-primary-rgb), 0.08);
    border: 1px solid rgba(var(--gps-primary-rgb), 0.35);
    border-radius: 100px;
    font-weight: 600;
    color: var(--gps-text);
    font-size: 0.95rem;
}
.cf-captcha i { color: var(--gps-primary); }
.cf-captcha-input {
    width: 50px;
    border: 0;
    background: transparent;
    font-weight: 700;
    font-size: 1rem;
    color: var(--gps-text);
    outline: none;
    text-align: center;
}
.cf-captcha-input::-webkit-outer-spin-button,
.cf-captcha-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cf-captcha-input[type=number] { -moz-appearance: textfield; }
.cf-captcha.has-error { border-color: #ef4444; background: rgba(239,68,68,0.06); }

.btn-cf-submit {
    margin-left: auto;
    background: var(--gps-primary);
    color: var(--gps-primary-text);
    border: 0;
    padding: 0.85rem 1.5rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.98rem;
    display: inline-flex; align-items: center; gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: 0 8px 22px -8px rgba(var(--gps-primary-rgb), 0.6);
}
.btn-cf-submit:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(var(--gps-primary-rgb), 0.8); }
.btn-cf-submit i { transition: transform 0.2s; }
.btn-cf-submit:hover i { transform: translateX(3px); }

/* Side cards */
.contact-side { display: flex; flex-direction: column; gap: 0.85rem; }
.contact-side-card {
    background: #fff;
    border: 1px solid var(--gps-border);
    border-radius: 18px;
    padding: 1.15rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    position: relative;
}
a.contact-side-card:hover { transform: translateY(-2px); border-color: rgba(var(--gps-primary-rgb), 0.35); box-shadow: 0 14px 28px -16px rgba(var(--gps-primary-rgb), 0.45); }
.cs-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(var(--gps-primary-rgb), 0.14); color: var(--gps-primary); display: flex; align-items: center; justify-content: center; font-size: 1.05rem; flex-shrink: 0; border: 1px solid rgba(var(--gps-primary-rgb), 0.25); }
.cs-icon-time { background: rgba(96,165,250,0.12); color: #60a5fa; border-color: rgba(96,165,250,0.25); }
.cs-icon-loc { background: rgba(245,158,11,0.12); color: #f59e0b; border-color: rgba(245,158,11,0.25); }
.cs-body { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; min-width: 0; }
.cs-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gps-muted); font-weight: 600; }
.cs-body strong { font-size: 1rem; font-weight: 700; color: var(--gps-text); letter-spacing: -0.015em; }
.cs-body small { color: var(--gps-muted); font-size: 0.78rem; }
.cs-arrow { color: var(--gps-muted); font-size: 0.78rem; opacity: 0; transition: opacity 0.2s, transform 0.2s; }
a.contact-side-card:hover .cs-arrow { opacity: 1; transform: translateX(2px); }

html.dark .contact-form-card,
html.dark .contact-side-card { background: linear-gradient(180deg, #0f1624 0%, #0a0f1a 100%); border-color: rgba(255,255,255,0.08); }
html.dark .cf-input { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.10); color: #fff; }
html.dark .cf-input:focus { background: rgba(255,255,255,0.07); border-color: var(--gps-primary); }
html.dark .cf-label { color: #94a3b8; }
html.dark .cs-body strong { color: #fff; }
html.dark .cf-captcha-input { color: #fff; }
html.dark .contact-form-head h3 { color: #fff; }

/* ─── Features page hero ─── */
.features-hero {
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 25%, rgba(var(--gps-primary-rgb), 0.20) 0%, transparent 50%),
        radial-gradient(circle at 85% 75%, rgba(96, 165, 250, 0.10) 0%, transparent 50%);
}
.features-hero-inner { text-align: center; max-width: 780px; margin: 0 auto; }
.features-hero h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; margin: 1rem 0 1.25rem; }
.features-hero p { font-size: 1.1rem; color: var(--gps-muted); margin: 0 auto 2.5rem; max-width: 580px; }
.features-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2.5rem; }
.features-stats > div { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 1rem; border-radius: 14px; background: rgba(15,23,42,0.04); border: 1px solid var(--gps-border); }
.features-stats .fs-num { font-size: clamp(1.5rem, 2.5vw, 2.1rem); font-weight: 800; letter-spacing: -0.03em; background: linear-gradient(135deg, var(--gps-primary), #6dd400); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.features-stats .fs-lbl { font-size: 0.78rem; color: var(--gps-muted); font-weight: 500; }

html.dark .features-stats > div { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }

/* Features showcase trio */
.features-showcase {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.fshow {
    position: relative;
    background: #fff;
    border: 1px solid var(--gps-border);
    border-radius: 24px;
    padding: 1.75rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    min-height: 260px;
}
.fshow:hover { transform: translateY(-3px); box-shadow: 0 24px 60px -28px rgba(var(--gps-primary-rgb), 0.55); border-color: rgba(var(--gps-primary-rgb), 0.4); }
.fshow.fshow-lg { grid-column: span 2; flex-direction: row; align-items: stretch; gap: 2rem; min-height: 320px; }
.fshow-body { flex: 1; display: flex; flex-direction: column; gap: 0.65rem; max-width: 440px; }
.fshow h3 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); font-weight: 700; letter-spacing: -0.02em; margin: 0; line-height: 1.15; }
.fshow p { color: var(--gps-muted); font-size: 0.95rem; line-height: 1.55; margin: 0; }
.fshow-list { list-style: none; padding: 0; margin: 0.5rem 0 0; display: flex; flex-direction: column; gap: 0.5rem; }
.fshow-list li { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.9rem; color: var(--gps-text); }
.fshow-list li i { color: var(--gps-primary); font-size: 0.8rem; margin-top: 0.3rem; }

.fshow-visual { position: relative; flex: 1; min-height: 200px; border-radius: 16px; overflow: hidden; }
.fshow-map { background: linear-gradient(180deg, #0a0f1a 0%, #0f1b2d 100%); }
.fshow-map svg { width: 100%; height: 100%; display: block; }
.fshow-map .fshow-trace { animation: ps-trace-dash 1.4s linear infinite; filter: drop-shadow(0 0 8px rgba(204,255,3,0.6)); }
.fshow-live { position: absolute; top: 12px; right: 12px; background: rgba(15,23,42,0.85); color: #fff; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; padding: 0.3rem 0.65rem; border-radius: 100px; backdrop-filter: blur(8px); }
.fshow-dot-main { position: absolute; left: 0; top: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--gps-primary); box-shadow: 0 0 0 3px #0a0f1a, 0 0 0 4px var(--gps-primary), 0 0 24px rgba(204,255,3,0.8); transform: translate(-50%, -50%); will-change: left, top; z-index: 3; }
.fshow-dot-pulse { position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; background: rgba(204,255,3,0.4); transform: translate(-50%, -50%); will-change: left, top; animation: fshow-pulse 2.2s ease-out infinite; z-index: 2; }
@keyframes fshow-pulse {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

.fshow-zones { background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%); display: flex; align-items: center; justify-content: center; }
.fshow-zones svg { width: 80%; height: auto; }
html.dark .fshow-zones { background: linear-gradient(180deg, #0a0f1a 0%, #0f1b2d 100%); }

.fshow-timeline { background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%); padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 0.55rem; justify-content: center; }
.ft-row { display: flex; align-items: center; gap: 0.8rem; font-size: 0.85rem; }
.ft-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ft-dot-go { background: var(--gps-primary); box-shadow: 0 0 0 3px rgba(204,255,3,0.25); }
.ft-dot-stop { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.25); }
.ft-dot-arr { background: #60a5fa; box-shadow: 0 0 0 3px rgba(96,165,250,0.25); }
.ft-time { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--gps-text); min-width: 44px; }
.ft-text { color: var(--gps-muted); }
html.dark .fshow-timeline { background: linear-gradient(180deg, #0a0f1a 0%, #0f1b2d 100%); }
html.dark .ft-time { color: #e2e8f0; }

html.dark .fshow { background: linear-gradient(180deg, #0f1624 0%, #0a0f1a 100%); border-color: rgba(255,255,255,0.08); }
html.dark .fshow h3 { color: #fff; }
html.dark .fshow p, html.dark .fshow-list li { color: #cbd5e1; }

/* Features tile grid (smaller secondary cards) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.feature-tile {
    background: #fff;
    border: 1px solid var(--gps-border);
    border-radius: 18px;
    padding: 1.5rem;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.feature-tile:hover { transform: translateY(-2px); border-color: rgba(var(--gps-primary-rgb), 0.3); box-shadow: 0 14px 30px -16px rgba(var(--gps-primary-rgb), 0.35); }
.feature-tile-icon { width: 42px; height: 42px; border-radius: 12px; background: rgba(var(--gps-primary-rgb), 0.12); color: var(--gps-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; margin-bottom: 0.85rem; border: 1px solid rgba(var(--gps-primary-rgb), 0.25); }
.feature-tile h5 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 0.4rem; }
.feature-tile p { color: var(--gps-muted); font-size: 0.9rem; line-height: 1.55; margin: 0; }
html.dark .feature-tile { background: linear-gradient(180deg, #0f1624 0%, #0a0f1a 100%); border-color: rgba(255,255,255,0.08); }
html.dark .feature-tile h5 { color: #fff; }

/* Features CTA banner */
.features-cta {
    text-align: center;
    padding: 3rem 1.5rem;
    background: linear-gradient(135deg, rgba(var(--gps-primary-rgb), 0.10), rgba(96,165,250,0.06));
    border: 1px solid rgba(var(--gps-primary-rgb), 0.25);
    border-radius: 24px;
}
.features-cta h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.025em; margin: 0 0 0.75rem; }
.features-cta p { color: var(--gps-muted); margin: 0 0 1.5rem; }
html.dark .features-cta { background: linear-gradient(135deg, rgba(var(--gps-primary-rgb), 0.12), rgba(96,165,250,0.05)); }

@media (max-width: 991px) {
    .features-showcase { grid-template-columns: 1fr; }
    .fshow.fshow-lg { grid-column: span 1; flex-direction: column; }
    .fshow-body { max-width: none; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
    .features-stats { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: 1fr; }
}

/* ─── Bento grid (Robinhood-style features) ─── */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 18px;
}
.bento-cell {
    background: #fff;
    border: 1px solid var(--gps-border);
    border-radius: 24px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s, box-shadow 0.35s;
    isolation: isolate;
}
.bento-cell::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(var(--gps-primary-rgb), 0) 0%, rgba(var(--gps-primary-rgb), 0) 60%, rgba(var(--gps-primary-rgb), 0.45) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 0;
}
.bento-cell:hover { transform: translateY(-4px); box-shadow: 0 24px 60px -28px rgba(var(--gps-primary-rgb), 0.55), 0 8px 24px -16px rgba(15,23,42,0.18); }
.bento-cell:hover::before { opacity: 1; }
.bento-cell > * { position: relative; z-index: 1; }
.bento-cell h3 { font-size: clamp(1.55rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: -0.025em; margin: 0; line-height: 1.15; }
.bento-cell h4 { font-size: 1.15rem; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.bento-cell p { color: var(--gps-muted); font-size: 0.95rem; line-height: 1.55; margin: 0; }

/* Big stat number for impact */
.bento-stat {
    font-size: clamp(2.6rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    background: linear-gradient(135deg, var(--gps-primary) 0%, #6dd400 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
}
.bento-stat-label { font-size: 0.85rem; color: var(--gps-muted); font-weight: 500; margin-top: -0.25rem; }

.bento-hero { grid-column: span 8; min-height: 320px; }
.bento-tall { grid-column: span 4; min-height: 320px; }
.bento-wide { grid-column: span 12; min-height: 200px; flex-direction: row; align-items: center; justify-content: space-between; gap: 2rem; }
.bento-feature:not(.bento-hero):not(.bento-wide):not(.bento-tall) { grid-column: span 4; }

.bento-body { display: flex; flex-direction: column; gap: 0.55rem; max-width: 460px; position: relative; z-index: 2; }
.bento-eyebrow {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--gps-primary);
    background: var(--gps-primary-light);
    padding: 0.3rem 0.7rem; border-radius: 100px;
    align-self: flex-start;
}
.bento-icon-chip {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--gps-primary-light); color: var(--gps-primary);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.15rem;
}

/* Map visual inside hero */
.bento-map-vis {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 60% 80% at 75% 70%, rgba(var(--gps-primary-rgb), 0.22) 0%, transparent 60%),
        radial-gradient(circle at 15% 90%, rgba(96, 165, 250, 0.12) 0%, transparent 50%),
        linear-gradient(180deg, transparent 30%, rgba(var(--gps-primary-rgb), 0.06) 100%);
    z-index: 0;
}
.bento-map-vis::after {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(15,23,42,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15,23,42,0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 30%, transparent 80%);
    opacity: 0.6;
}
.bento-map-vis svg { position: absolute; right: 0; bottom: 0; width: 65%; height: 70%; z-index: 1; }
.bento-map-vis svg path { filter: drop-shadow(0 0 6px rgba(var(--gps-primary-rgb), 0.5)); }
.bento-map-dot {
    position: absolute; right: 18%; top: 32%;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--gps-primary);
    box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--gps-primary), 0 0 24px 4px rgba(var(--gps-primary-rgb), 0.7);
    z-index: 3;
}
.bento-map-pulse {
    position: absolute; right: calc(18% - 14px); top: calc(32% - 14px);
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(var(--gps-primary-rgb), 0.4);
    animation: bento-pulse 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    z-index: 2;
}
.bento-map-pulse::before {
    content: '';
    position: absolute; inset: -6px;
    border-radius: 50%;
    background: rgba(var(--gps-primary-rgb), 0.2);
    animation: bento-pulse 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite 0.7s;
}
@keyframes bento-pulse {
    0% { transform: scale(0.5); opacity: 0.9; }
    100% { transform: scale(2.6); opacity: 0; }
}

/* Live-data chip floating in hero */
.bento-live-chip {
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.02em;
    z-index: 3;
}
.bento-live-chip::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--gps-primary);
    box-shadow: 0 0 8px var(--gps-primary);
    animation: bento-blink 1.4s ease-in-out infinite;
}
@keyframes bento-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Phone mock in tall card */
.bento-phone {
    position: relative; align-self: center; margin-top: auto;
    width: 130px; height: 180px;
    border-radius: 22px;
    background: linear-gradient(160deg, #1f2937, #0f172a);
    padding: 10px;
    box-shadow: 0 24px 40px -20px rgba(15,23,42,0.5);
}
.bento-phone-screen {
    width: 100%; height: 100%; border-radius: 14px;
    background: linear-gradient(180deg, #e8eef5 0%, #d8e3f0 100%);
    position: relative; overflow: hidden;
}
.bento-phone-bar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 36px; height: 4px; border-radius: 4px; background: rgba(0,0,0,0.25); }
.bento-phone-pin {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--gps-primary); color: var(--gps-primary-text);
    display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
    box-shadow: 0 0 0 6px rgba(var(--gps-primary-rgb), 0.25);
}

/* Avatars in wide card */
.bento-avatars { display: flex; align-items: center; }
.bento-avatar {
    width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 1.05rem;
    border: 3px solid #fff;
    margin-left: -14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.bento-avatar:first-child { margin-left: 0; }
.bento-avatar-plus { background: var(--gps-primary); color: var(--gps-primary-text); font-size: 0.85rem; }

@media (max-width: 991px) {
    .bento-grid { grid-template-columns: repeat(6, 1fr); }
    .bento-hero { grid-column: span 6; }
    .bento-tall { grid-column: span 6; grid-row: auto; min-height: 280px; }
    .bento-feature:not(.bento-hero):not(.bento-wide):not(.bento-tall) { grid-column: span 3; }
    .bento-wide { grid-column: span 6; flex-direction: column; align-items: flex-start; }
}
@media (max-width: 575px) {
    .bento-grid { grid-template-columns: 1fr; }
    .bento-hero, .bento-tall, .bento-wide,
    .bento-feature:not(.bento-hero):not(.bento-wide):not(.bento-tall) { grid-column: span 1; }
}

/* Bento small-card demos */
.bento-rating-demo { display: flex; align-items: center; gap: 0.65rem; margin-top: auto; padding-top: 0.85rem; }
.bento-rating-score { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; background: linear-gradient(135deg, var(--gps-primary), #6dd400); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.bento-rating-pill { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.3rem 0.7rem; border-radius: 100px; background: rgba(var(--gps-primary-rgb), 0.15); color: var(--gps-primary); border: 1px solid rgba(var(--gps-primary-rgb), 0.3); }

.bento-mr-demo { display: flex; flex-direction: column; gap: 0.45rem; margin-top: auto; padding-top: 0.85rem; }
.bmr-row { display: flex; align-items: center; gap: 0.55rem; font-size: 0.82rem; color: var(--gps-muted); }
.bmr-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.bmr-amber { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.2); }
.bmr-red { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.2); }
html.dark .bmr-row { color: #cbd5e1; }

.bento-obd-demo { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: auto; padding-top: 0.85rem; }
.bobd-chip { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; font-weight: 600; padding: 0.3rem 0.7rem; border-radius: 100px; background: rgba(59,130,246,0.12); color: #3b82f6; border: 1px solid rgba(59,130,246,0.25); }
.bobd-chip i { font-size: 0.7rem; }
html.dark .bobd-chip { background: rgba(59,130,246,0.15); }

/* Bento meta row */
.bento-meta { display: flex; gap: 2rem; margin-top: auto; padding-top: 1rem; }
.bento-meta > div { display: flex; flex-direction: column; gap: 0.15rem; }

/* Dark mode for bento — deeper blacks, more contrast */
html.dark .bento-cell {
    background: linear-gradient(180deg, #0f1624 0%, #0a0f1a 100%);
    border-color: rgba(255,255,255,0.08);
    color: var(--gps-text);
}
html.dark .bento-cell h3, html.dark .bento-cell h4 { color: #fff; }
html.dark .bento-cell p { color: #94a3b8; }
html.dark .bento-eyebrow { background: rgba(var(--gps-primary-rgb), 0.12); color: var(--gps-primary); border: 1px solid rgba(var(--gps-primary-rgb), 0.25); }
html.dark .bento-icon-chip {
    background: linear-gradient(135deg, rgba(var(--gps-primary-rgb), 0.20), rgba(var(--gps-primary-rgb), 0.08));
    color: var(--gps-primary);
    border: 1px solid rgba(var(--gps-primary-rgb), 0.25);
}
html.dark .bento-cell:hover { border-color: rgba(var(--gps-primary-rgb), 0.45); box-shadow: 0 28px 64px -28px rgba(var(--gps-primary-rgb), 0.7), 0 0 0 1px rgba(var(--gps-primary-rgb), 0.15) inset; }
html.dark .bento-map-dot { box-shadow: 0 0 0 3px #0f1624, 0 0 0 4px var(--gps-primary), 0 0 28px 6px rgba(var(--gps-primary-rgb), 0.8); }
html.dark .bento-map-vis::after { background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px); }
html.dark .bento-avatar { border-color: #0f1624; }
html.dark .bento-phone { background: linear-gradient(160deg, #1e293b, #0f172a); }
html.dark .bento-phone-screen { background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%); }
html.dark .bento-stat-label { color: #94a3b8; }

/* ─── Plan cards ─── */
.plan-card {
    background: #fff;
    border: 1px solid var(--gps-border);
    border-radius: var(--gps-radius-lg);
    padding: 2.25rem;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}
.plan-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--gps-shadow-lg);
}
.plan-card.featured {
    border: 2px solid var(--gps-primary);
    box-shadow: var(--gps-shadow-color);
    background: linear-gradient(180deg, rgba(var(--gps-primary-rgb), 0.04) 0%, #fff 30%);
}
.plan-card .plan-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--gps-primary) 0%, var(--gps-primary-hover) 100%);
    color: var(--gps-primary-text);
    padding: 0.35rem 1.25rem;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 8px 16px -4px rgba(var(--gps-primary-rgb), 0.45);
}
.plan-card h3 { font-weight: 800; margin-bottom: 0.3rem; font-size: 1.45rem; }
.plan-card .plan-desc { color: var(--gps-muted); font-size: 0.92rem; margin-bottom: 1.25rem; }
.plan-card .price { font-size: 2.85rem; font-weight: 800; color: var(--gps-dark); letter-spacing: -0.04em; }
.plan-card .price-cycle { color: var(--gps-muted); font-size: 0.95rem; }
.price-vat-flag {
    display: inline-block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--gps-muted);
    background: rgba(15,23,42,0.06);
    padding: 0.1rem 0.45rem;
    border-radius: 100px;
    margin-left: 0.2rem;
    vertical-align: middle;
}
.price-with-vat { font-size: 0.78rem; color: var(--gps-muted); margin-top: 0.3rem; line-height: 1.4; }
.price-with-vat strong { color: var(--gps-text); font-weight: 700; }
html.dark .price-vat-flag { background: rgba(255,255,255,0.08); color: #94a3b8; }
html.dark .price-with-vat strong { color: #e2e8f0; }
.plan-card ul { list-style: none; padding: 0; margin: 1.5rem 0; flex-grow: 1; }
.plan-card ul li {
    padding: 0.55rem 0;
    border-bottom: 1px dashed var(--gps-border);
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.93rem;
}
.plan-card ul li:last-child { border-bottom: 0; }
.plan-card ul li i {
    color: var(--gps-success);
    margin-top: 3px;
    flex-shrink: 0;
}
/* Excluded features: muted + struck so plan differences are obvious */
.plan-card ul li.plan-feature-off { color: var(--gps-muted); }
.plan-card ul li.plan-feature-off span { text-decoration: line-through; opacity: 0.7; }
.plan-card ul li.plan-feature-off i { color: var(--gps-muted) !important; }

/* ─── Auth pages ─── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f5;
    padding: 2rem 1rem;
}
.auth-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--gps-radius-lg);
    padding: 2.5rem 2.25rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    margin: 0 auto;
}
.auth-brand { text-align: center; margin-bottom: 1.75rem; }
.auth-brand .brand-mark { width: 56px; height: 56px; font-size: 1.5rem; margin-bottom: 1rem; border-radius: 14px; }
.auth-brand h1 { font-weight: 700; font-size: 1.5rem; margin-bottom: 0.3rem; letter-spacing: -0.02em; color: #0f172a; }
.auth-brand p { color: #64748b; font-size: 0.95rem; margin: 0; }

/* ─── Forms ─── */
.form-label { font-weight: 500; font-size: 0.92rem; color: var(--gps-text); margin-bottom: 0.4rem; }
.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid var(--gps-border);
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    transition: all 0.15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--gps-primary);
    box-shadow: 0 0 0 4px rgba(var(--gps-primary-rgb), 0.12);
}

/* ─── Footer (Robinhood chartreuse + tradesimple structure) ─── */
.public-footer {
    background: var(--gps-primary);
    color: var(--gps-primary-text);
    padding: 4.5rem 1rem 2rem;
    margin-top: 0;
}
.public-footer .footer-inner { max-width: 1200px; margin: 0 auto; }
.public-footer .footer-brand {
    display: inline-block; color: var(--gps-primary-text);
    text-decoration: none; font-size: 1.4rem;
    letter-spacing: -0.02em; margin-bottom: 2.5rem;
}
.public-footer .footer-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 3rem; margin-bottom: 3rem;
}
@media (max-width: 991.98px) { .public-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; } }
@media (max-width: 575.98px) { .public-footer .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; } }
.public-footer .footer-brand { color: #000 !important; font-weight: 700; }
.public-footer .footer-grid h4 {
    font-size: 0.78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 1.25rem; color: #000;
}
.public-footer .footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.85rem; }
.public-footer .footer-grid a {
    color: #000; text-decoration: none;
    font-size: 0.92rem; font-weight: 500;
}
.public-footer .footer-grid a:hover { text-decoration: underline; }
.public-footer .footer-social {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.5rem; padding: 1.75rem 0;
    border-top: 1px solid rgba(0,0,0,0.15);
    flex-wrap: wrap;
}
.public-footer .footer-contact {
    display: flex; gap: 1.5rem; flex-wrap: wrap;
    font-size: 0.92rem; color: #000; font-weight: 500;
}
.public-footer .footer-contact i { color: #000; }
.public-footer .footer-contact a { color: #000; text-decoration: none; transition: opacity 0.15s; }
.public-footer .footer-contact a:hover { opacity: 0.65; text-decoration: underline; }
.public-footer .footer-social-icons { display: flex; gap: 0.6rem; }
.public-footer .footer-social-icons a {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(0,0,0,0.10); color: #000;
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none; transition: all 0.15s;
}
.public-footer .footer-social-icons a:hover { background: #000; color: var(--gps-primary); }
.public-footer .footer-disclaimer {
    border-top: 1px solid rgba(0,0,0,0.15);
    padding-top: 1.75rem;
}
.public-footer .footer-disclaimer p { line-height: 1.6; color: #000; }
.public-footer .footer-bottom-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.public-footer .footer-bottom-sep { color: rgba(0,0,0,0.45); }
.public-footer .footer-poweredby {
    color: #000;
    text-decoration: none;
    position: relative;
    transition: color 0.18s;
}
.public-footer .footer-poweredby strong { font-weight: 700; border-bottom: 1px solid transparent; transition: border-color 0.18s, color 0.18s; }
.public-footer .footer-poweredby:hover { color: #000; }
.public-footer .footer-poweredby:hover strong { border-bottom-color: #000; }
.public-footer .footer-poweredby::after {
    content: '↗';
    margin-left: 0.25rem;
    display: inline-block;
    transition: transform 0.18s;
}
.public-footer .footer-poweredby:hover::after { transform: translate(2px, -2px); }

/* ─── App / Dashboard layout ─── */
.app-wrapper { min-height: 100vh; background: var(--gps-bg); }
.app-navbar {
    background: #000 !important;
    border-bottom: 1px solid #111;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1020;
}
/* Dashboard top menu uses the admin-sidebar dark palette on light theme too */
.app-navbar .navbar-brand,
.app-navbar .brand-wordmark,
.app-navbar .brand-wordmark:hover { color: #fff !important; }
.app-navbar .brand-wordmark span { color: #94a3b8; }
.app-navbar .nav-link { color: #cbd5e1 !important; }
.app-navbar .nav-link:hover { color: #fff !important; background: rgba(255,255,255,0.06); }
.app-navbar .nav-link.active { color: var(--gps-primary) !important; background: rgba(var(--gps-primary-rgb), 0.12); }
.app-navbar .btn-outline-secondary {
    color: #cbd5e1; border-color: rgba(255,255,255,0.18); background: transparent;
}
.app-navbar .btn-outline-secondary:hover { background: var(--gps-primary); color: #0a0a0a; border-color: var(--gps-primary); }
.app-navbar .lang-switcher { border-color: rgba(255,255,255,0.18); }
.app-navbar .lang-switcher .lang-opt { color: #94a3b8; }
.app-navbar .lang-switcher .lang-opt:hover { color: #fff; }
.app-navbar .lang-switcher .lang-opt.active { background: var(--gps-primary); color: var(--gps-primary-text); }
.app-content { padding: 1.75rem 0 2rem; }
.app-card {
    background: #fff;
    border: 1px solid var(--gps-border);
    border-radius: var(--gps-radius);
    padding: 1.5rem;
    box-shadow: var(--gps-shadow-sm);
    transition: box-shadow 0.2s;
}
.app-card:hover { box-shadow: var(--gps-shadow); }
.app-card h6 { font-weight: 700; letter-spacing: -0.01em; }

.stat-card {
    background: #fff;
    border: 1px solid var(--gps-border);
    border-radius: var(--gps-radius);
    padding: 1.35rem 1.45rem;
    box-shadow: var(--gps-shadow-sm);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--gps-shadow); }
.stat-card .stat-label { color: var(--gps-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.stat-card .stat-value { font-size: 1.95rem; font-weight: 800; color: var(--gps-dark); margin-top: 0.25rem; letter-spacing: -0.03em; }
.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gps-primary-light) 0%, rgba(var(--gps-primary-rgb), 0.20) 100%);
    color: var(--gps-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* ─── Map ─── */
#main-map { height: 60vh; min-height: 400px; border-radius: var(--gps-radius); }
.device-marker {
    background: var(--gps-primary);
    border: 3px solid #fff;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.30);
}

/* ─── Status pills ─── */
.status-pill {
    display: inline-block;
    padding: 0.22rem 0.7rem;
    border-radius: 100px;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.status-online { background: #d1fae5; color: #047857; }
.status-offline { background: #fee2e2; color: #991b1b; }
.status-active { background: var(--gps-primary); color: var(--gps-primary-text); }

/* ─── Tables ─── */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > thead { background: #f8fafc; }
.table > thead th { font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gps-muted); padding: 0.9rem 1rem; border-bottom: 1px solid var(--gps-border); }
.table > tbody > tr > td { padding: 0.9rem 1rem; border-bottom: 1px solid var(--gps-border); vertical-align: middle; }
.table > tbody > tr:hover { background: rgba(var(--gps-primary-rgb), 0.03); }

/* ─── Alerts (Bootstrap override) ─── */
.alert { border-radius: 10px; border: 0; padding: 0.85rem 1.1rem; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }

/* ─── FAQ accordion ─── */
.accordion-item { border-radius: var(--gps-radius) !important; border: 1px solid var(--gps-border); margin-bottom: 0.65rem; overflow: hidden; }
.accordion-button { font-weight: 600; padding: 1.15rem 1.35rem; background: #fff; color: var(--gps-text); border-radius: var(--gps-radius) !important; }
.accordion-button:not(.collapsed) { background: var(--gps-primary-light); color: var(--gps-text); box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 4px rgba(var(--gps-primary-rgb), 0.12); }
.accordion-body { color: var(--gps-muted); line-height: 1.7; padding: 0.85rem 1.35rem 1.35rem; }

/* ─── Mobile bottom navigation ─── */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--gps-border);
    display: flex;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.06);
}
.mobile-bottom-nav .bn-item {
    flex: 1;
    text-align: center;
    padding: 0.65rem 0.25rem 0.55rem;
    color: var(--gps-muted);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    transition: all 0.15s;
}
.mobile-bottom-nav .bn-item i { font-size: 1.3rem; }
.mobile-bottom-nav .bn-item.active { color: var(--gps-primary); }
.mobile-bottom-nav .bn-item.active i { transform: scale(1.08); }

@media (max-width: 767.98px) {
    .app-content { padding-bottom: 5.5rem; }
}

/* ─── Section background variants ─── */
.section-muted { background: var(--gps-bg); }
.section-gradient {
    background:
        radial-gradient(circle at 10% 10%, rgba(var(--gps-primary-rgb), 0.10) 0%, transparent 50%),
        radial-gradient(circle at 90% 90%, rgba(245, 158, 11, 0.06) 0%, transparent 50%),
        var(--gps-surface);
}

/* ─── Dark mode ─── */
html.dark {
    --gps-bg: #0a1119;
    --gps-surface: #0f172a;
    --gps-text: #e2e8f0;
    --gps-muted: #94a3b8;
    --gps-border: #1e293b;
    --gps-dark: #f1f5f9;
}
html.dark body { background: var(--gps-surface); color: var(--gps-text); }
html.dark .public-body { background: var(--gps-surface); }
html.dark .app-wrapper {
    background:
        radial-gradient(circle at 90% 0%, rgba(204,255,3,0.10) 0%, transparent 35%),
        radial-gradient(circle at 0% 100%, rgba(96,165,250,0.06) 0%, transparent 35%),
        #000;
    min-height: 100vh;
}
html.dark body { background: #000; }

/* ─── User dashboard polish (mirror of admin effects) ─── */
.app-content > *,
main > .container > * {
    animation: app-fade-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    /* fill-mode: backwards = apply the FROM state before animation, but after animation
       ends the element reverts to computed style (transform: none). This is critical so
       position:fixed descendants (fullscreen map) can escape the containing block. */
}
.app-content > *:nth-child(1) { animation-delay: 0.02s; }
.app-content > *:nth-child(2) { animation-delay: 0.08s; }
.app-content > *:nth-child(3) { animation-delay: 0.14s; }
.app-content > *:nth-child(4) { animation-delay: 0.20s; }
.app-content > *:nth-child(5) { animation-delay: 0.26s; }
@keyframes app-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.app-wrapper .stat-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.3s;
}
.app-wrapper .stat-card::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--gps-primary), #6dd400);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.app-wrapper .stat-card:hover::after { transform: scaleY(1); }
.app-wrapper .stat-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 18px 42px -22px rgba(var(--gps-primary-rgb), 0.45), 0 6px 14px -8px rgba(0,0,0,0.25);
}
.app-wrapper .stat-card .stat-icon { transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.app-wrapper .stat-card:hover .stat-icon { transform: scale(1.08) rotate(-4deg); }

.app-wrapper .app-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, box-shadow 0.25s;
}
/* cursor-tracked glow on .app-card removed per user request */
.app-wrapper .app-card:hover {
    border-color: rgba(204,255,3,0.25);
    box-shadow: 0 12px 28px -16px rgba(0,0,0,0.35);
}
.app-wrapper .app-card > *:not(.map-fs-toggle) { position: relative; z-index: 1; }
.app-wrapper .app-card.map-fs-wrap,
.app-wrapper .map-fs-wrap.app-card { overflow: hidden; }
.app-wrapper .app-card.map-fs-wrap::before,
.app-wrapper .map-fs-wrap.app-card::before { display: none; }

.app-wrapper .table tbody tr { transition: background 0.18s, box-shadow 0.18s; }
.app-wrapper .table tbody tr:hover {
    background: linear-gradient(90deg, rgba(204,255,3,0.10), transparent 70%) !important;
    box-shadow: inset 3px 0 0 var(--gps-primary);
}

.app-wrapper .app-card > h6 {
    position: relative;
    padding-left: 0.9rem;
}
.app-wrapper .app-card > h6::before {
    content: '';
    position: absolute;
    left: 0; top: 0.15em; bottom: 0.15em;
    width: 3px;
    background: linear-gradient(180deg, var(--gps-primary), #6dd400);
    border-radius: 2px;
}

.app-wrapper .btn-primary {
    transition: transform 0.2s, box-shadow 0.2s;
}
.app-wrapper .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -10px rgba(204,255,3,0.55);
}

/* App navbar accent underline */
html.dark .app-navbar { position: relative; }
html.dark .app-navbar::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(204,255,3,0.45), transparent);
}
html.dark .navbar.sticky-top { background: rgba(0, 0, 0, 0.92) !important; border-bottom-color: rgba(255,255,255,0.06) !important; backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); }
html.dark .navbar-brand, html.dark .navbar-brand:hover { color: #fff !important; }
html.dark .navbar .nav-link { color: rgba(255,255,255,0.85) !important; }
html.dark .navbar .nav-link:hover { color: var(--gps-primary) !important; background: rgba(var(--gps-primary-rgb), 0.12); }
html.dark .navbar .btn-outline-primary { color: #fff; border-color: rgba(255,255,255,0.25); }
html.dark .navbar .btn-outline-primary:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.4); }
html.dark .nav-link { color: var(--gps-text) !important; }
html.dark .nav-link:hover { background: rgba(var(--gps-primary-rgb), 0.20); }
html.dark .app-navbar { background: rgba(0, 0, 0, 0.85) !important; border-bottom-color: rgba(255,255,255,0.06); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); }
html.dark .app-navbar .navbar-brand, html.dark .app-navbar .navbar-brand:hover { color: #fff !important; }
html.dark .app-navbar .nav-link { color: rgba(255,255,255,0.85) !important; }
html.dark .app-navbar .nav-link:hover { color: var(--gps-primary) !important; }
html.dark .app-navbar .nav-link.active { color: var(--gps-primary) !important; background: rgba(var(--gps-primary-rgb), 0.12); }
html.dark .app-card, html.dark .stat-card, html.dark .feature-card, html.dark .plan-card, html.dark .accordion-item, html.dark .accordion-button { background: #131c2c; border-color: var(--gps-border); color: var(--gps-text); }
html.dark .plan-card.featured { background: linear-gradient(180deg, rgba(var(--gps-primary-rgb), 0.10) 0%, #131c2c 40%); }
html.dark .plan-card h3, html.dark .plan-card .price, html.dark .stat-card .stat-value, html.dark .feature-card h5, html.dark .auth-brand h1 { color: #fff; }
html.dark .table > thead { background: #131c2c; }
html.dark .table > thead th { color: var(--gps-muted); border-bottom-color: var(--gps-border); }
html.dark .table { --bs-table-color: #e2e8f0; --bs-table-bg: transparent; color: #e2e8f0; }
html.dark .table > tbody > tr > td { border-bottom-color: var(--gps-border); color: #e2e8f0; }
html.dark .table > tbody > tr > td code { color: #cbd5e1; background: rgba(255,255,255,0.06); }
html.dark .table > tbody > tr > td.text-muted,
html.dark .table > tbody > tr > td .text-muted { color: var(--gps-muted) !important; }
html.dark .table > tbody > tr:hover { background: rgba(var(--gps-primary-rgb), 0.08); }
html.dark .form-control, html.dark .form-select { background: #131c2c; color: var(--gps-text); border-color: var(--gps-border); }
html.dark .form-control::placeholder { color: var(--gps-muted); }
html.dark .form-label { color: var(--gps-text); }
/* Universal dropdown z-index fix — must float over any card/section */
.dropdown-menu { z-index: 1080 !important; }
.dropdown-menu.show { z-index: 1080 !important; }
/* Lift parent navbar so its dropdowns are not clipped by sibling content */
.navbar.sticky-top { z-index: 1040 !important; }
.app-navbar { z-index: 1040; position: sticky; top: 0; }
/* Any container with an open dropdown allows the dropdown to overflow.
   :has() supported in modern browsers; fallback: navbar overflow:visible. */
.app-navbar, .admin-navbar, .navbar { overflow: visible !important; }
.app-card:has(.dropdown.show), .app-card:has(.dropdown-menu.show) { overflow: visible !important; }

html.dark .dropdown-menu { background: #131c2c; border-color: var(--gps-border); }
html.dark .dropdown-item { color: var(--gps-text); }
html.dark .dropdown-item:hover { background: rgba(var(--gps-primary-rgb), 0.18); color: #fff; }
html.dark .accordion-button { color: #e2e8f0; }
html.dark .accordion-button:not(.collapsed) { background: rgba(var(--gps-primary-rgb), 0.14); color: var(--gps-primary); border-bottom: 1px solid rgba(var(--gps-primary-rgb), 0.25); }
html.dark .accordion-button::after { filter: invert(1) hue-rotate(180deg) saturate(2); }
html.dark .accordion-body { color: #cbd5e1; }
html.dark .alert-success { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; }
html.dark .alert-danger { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }
html.dark .alert-warning { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }
html.dark .hero { position: relative; }
html.dark .hero::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 180px;
    background: linear-gradient(180deg, transparent 0%, #000 100%);
    pointer-events: none;
    z-index: 1;
}
html.dark .hero > .container { position: relative; z-index: 2; }
html.dark .hero {
    background:
        radial-gradient(circle at 12% 25%, rgba(var(--gps-primary-rgb), 0.28) 0%, transparent 45%),
        radial-gradient(circle at 88% 75%, rgba(var(--gps-primary-rgb), 0.16) 0%, transparent 55%),
        linear-gradient(180deg, #000 0%, #060a10 100%);
}
html.dark .hero::before { background-image: linear-gradient(rgba(226,232,240,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(226,232,240,0.04) 1px, transparent 1px); }
html.dark .hero h1 { color: #fff; }
html.dark .hero .accent { -webkit-text-fill-color: var(--gps-primary); color: var(--gps-primary); background: none; }
/* Auth pages stay LIGHT even on dark public layout (Robinhood-style clean login). */
html.dark .auth-wrapper {
    background: #f7f7f5;
    color: #0f172a;
}
html.dark .auth-card {
    background: #fff;
    color: #0f172a;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
}
html.dark .auth-card .form-label { color: #475569; }
html.dark .auth-card .form-control { background: #fff; color: #0f172a; border-color: #e2e8f0; }
html.dark .auth-card .form-check-label { color: #475569; }
html.dark .auth-brand h1 { color: #0f172a; }
html.dark .auth-brand p { color: #64748b; }
html.dark .auth-card hr { border-color: #e2e8f0; }
html.dark .auth-card a { color: var(--gps-text); }
html.dark .auth-card .text-center.small { color: #64748b !important; }
html.dark .section { background: #000; }
html.dark .section-muted { background: #000; }
html.dark .section-gradient { background: radial-gradient(circle at 10% 10%, rgba(var(--gps-primary-rgb), 0.18) 0%, transparent 50%), #000; position: relative; }
html.dark .section-gradient::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 160px;
    background: linear-gradient(180deg, #000 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}
html.dark .section-gradient > .container { position: relative; z-index: 2; }
html.dark .public-body { background: #000; }
/* Footer stays chartreuse in dark mode too (Robinhood signature) */
html.dark .btn-outline-secondary { color: var(--gps-text); border-color: var(--gps-border); }
html.dark .btn-outline-secondary:hover { background: var(--gps-border); color: #fff; }
html.dark code { color: #fbb6ce; background: var(--gps-bg); padding: 0.125rem 0.35rem; border-radius: 4px; }
html.dark .mobile-bottom-nav { background: rgba(19, 28, 44, 0.92); border-top-color: var(--gps-border); }
html.dark .text-muted, html.dark .small.text-muted { color: var(--gps-muted) !important; }
html.dark .hero-visual .phone { background: linear-gradient(155deg, #131c2c 0%, #0a1119 100%); border-color: var(--gps-border); }
html.dark .hero-visual .floating-card { background: #131c2c; border-color: var(--gps-border); }
html.dark .fc-text strong { color: #fff; }
html.dark .hero-pill { background: rgba(var(--gps-primary-rgb), 0.20); border-color: rgba(var(--gps-primary-rgb), 0.35); }

/* ─── Shared Leaflet vehicle popup ─── */
.leaflet-popup-pane { z-index: 1100; }
.leaflet-popup-content-wrapper { border-radius: 16px; padding: 0; box-shadow: 0 16px 40px rgba(15,23,42,0.22); }
.leaflet-popup-content { margin: 0.4rem 0.6rem 0.4rem 0.4rem !important; min-width: 280px !important; }
.leaflet-popup-close-button {
    position: absolute !important;
    top: -10px !important;
    right: -10px !important;
    width: 28px !important;
    height: 28px !important;
    background: #0f172a !important;
    color: #fff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(15,23,42,0.35) !important;
    border: 2px solid #fff !important;
    z-index: 1200 !important;
    padding: 0 !important;
    transition: transform 0.15s, background 0.15s !important;
    font-size: 0 !important;
}
.leaflet-popup-close-button:hover { background: var(--gps-primary) !important; color: var(--gps-primary-text) !important; transform: scale(1.08); }
.leaflet-popup-close-button span {
    display: block !important;
    font-size: 22px !important;
    line-height: 24px !important;
    font-weight: 400 !important;
    font-family: Arial, sans-serif !important;
    width: 24px !important;
    height: 24px !important;
    text-align: center !important;
}
html.dark .leaflet-popup-close-button { border-color: #131c2c !important; }
.leaflet-popup-content { margin: 0; min-width: 280px; font-family: 'Inter', sans-serif; }

.veh-popup { padding: 0.85rem 1rem; }
.veh-popup-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.veh-popup-plate { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; color: #0f172a; margin: 0; }
.veh-popup-badges { display: flex; gap: 0.25rem; flex-wrap: wrap; justify-content: flex-end; }
.veh-badge { position: relative; cursor: help; font-size: 0.65rem; font-weight: 600; padding: 0.18rem 0.45rem; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.veh-badge[data-tip]:hover { z-index: 1300; }
.veh-badge.ok { background: #d1fae5; color: #047857; }
.veh-badge.bad { background: #fee2e2; color: #991b1b; }
.veh-badge[data-tip]::after {
    content: attr(data-tip);
    position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
    background: #0f172a; color: #fff; font-size: 0.72rem; font-weight: 500;
    padding: 0.3rem 0.55rem; border-radius: 6px; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity 0.1s ease-out;
    z-index: 1301; text-transform: none; letter-spacing: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.veh-badge[data-tip]:hover::after { opacity: 1; }
.veh-stats { display: flex; gap: 0.85rem; padding: 0.5rem 0; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; margin-bottom: 0.6rem; font-size: 0.8rem; color: #475569; flex-wrap: wrap; }
.veh-stats > div { display: flex; align-items: center; gap: 0.3rem; }
.veh-stats i { color: #64748b; }
.veh-status { font-size: 0.85rem; color: #475569; margin: 0 0 0.35rem; }
.veh-address { font-size: 0.82rem; color: #64748b; margin: 0 0 0.55rem; line-height: 1.4; }
.veh-buttons { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.veh-btn {
    display: inline-flex; align-items: center; gap: 0.3rem;
    font-size: 0.78rem; padding: 0.28rem 0.7rem;
    background: #fff; border: 1px solid var(--gps-border); border-radius: 100px;
    color: var(--gps-text); cursor: pointer; text-decoration: none;
    transition: all 0.15s;
}
.veh-btn:hover { background: var(--gps-primary); color: var(--gps-primary-text); border-color: var(--gps-primary); }
.veh-btn.icon-only { padding: 0; width: 32px; height: 32px; justify-content: center; flex-shrink: 0; }
.veh-btn.icon-only i { margin: 0; }
.veh-btn i { font-size: 0.85rem; }
html.dark .leaflet-popup-content-wrapper { background: #131c2c; color: var(--gps-text); }
html.dark .leaflet-popup-tip { background: #131c2c; }
html.dark .veh-popup-plate { color: #fff; }
html.dark .veh-stats { border-color: var(--gps-border); color: var(--gps-text); }
html.dark .veh-stats i { color: var(--gps-muted); }
html.dark .veh-status, html.dark .veh-address { color: var(--gps-muted); }
html.dark .veh-btn { background: var(--gps-bg); border-color: var(--gps-border); color: var(--gps-text); }

/* ─── Vehicle markers (moving arrow / stopped circle) ─── */
.v-marker { position: relative; display: flex; flex-direction: column; align-items: center; }
.v-marker-icon {
    position: relative;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--mc, #4b7d9b);
    border: 3px solid #fff;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.30);
    z-index: 2;
}
.v-marker-icon::before,
.v-marker-icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: rgba(var(--mc-rgb, 75,125,155), 0.30);
    z-index: -1;
    animation: radar-pulse 2.4s cubic-bezier(0.25, 0.6, 0.4, 1) infinite;
}
.v-marker-icon::after { animation-delay: 1.2s; }
@keyframes radar-pulse {
    0%   { transform: scale(1);   opacity: 0.55; }
    80%  { transform: scale(2.5); opacity: 0; }
    100% { transform: scale(2.5); opacity: 0; }
}
.v-marker.moving .v-marker-icon i {
    transform: rotate(var(--rot, 0deg));
    transition: transform 0.5s ease-out;
    font-size: 1.05rem;
}
.v-marker.stopped .v-marker-icon::before,
.v-marker.stopped .v-marker-icon::after {
    animation-duration: 3.5s;
    background: rgba(var(--mc-rgb, 75,125,155), 0.22);
}
.v-marker.stopped .v-marker-icon::after { animation-delay: 1.75s; }
.v-marker-label {
    margin-top: 4px;
    font-size: 11px; font-weight: 700;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.95);
    padding: 2px 6px; border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.20);
    white-space: nowrap; letter-spacing: 0.01em;
}
html.dark .v-marker-label { background: rgba(19, 28, 44, 0.95); color: #fff; }

/* Cluster marker */
.cluster-marker {
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gps-primary) 0%, var(--gps-primary-hover) 100%);
    color: var(--gps-primary-text); font-weight: 700; font-size: 0.95rem;
    display: flex; align-items: center; justify-content: center;
    border: 3px solid rgba(255,255,255,0.95);
    box-shadow: 0 4px 14px rgba(0,0,0,0.30), 0 0 0 6px rgba(var(--gps-primary-rgb), 0.15);
    cursor: pointer; transition: transform 0.15s;
}
.cluster-marker:hover { transform: scale(1.1); }
.cluster-marker.md { width: 50px; height: 50px; font-size: 1.05rem; box-shadow: 0 4px 14px rgba(0,0,0,0.30), 0 0 0 8px rgba(var(--gps-primary-rgb), 0.20); }
.cluster-marker.lg { width: 58px; height: 58px; font-size: 1.2rem; background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); box-shadow: 0 4px 14px rgba(0,0,0,0.30), 0 0 0 10px rgba(245, 158, 11, 0.20); }
.marker-cluster, .marker-cluster div { background: transparent !important; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background-color: transparent !important; }

/* Fullscreen map */
.map-fs-wrap {
    position: relative;
    /* no transition: fixed positioning can't animate; snap to fullscreen for instant invalidate */
}
.map-fs-wrap.is-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    margin: 0 !important;
    border-radius: 0 !important;
}
.map-fs-wrap.is-fullscreen > .map-fs-target,
.map-fs-wrap.is-fullscreen #main-map,
.map-fs-wrap.is-fullscreen #history-map,
.map-fs-wrap.is-fullscreen #device-map,
.map-fs-wrap.is-fullscreen .leaflet-container {
    height: 100vh !important;
    width: 100vw !important;
    border-radius: 0 !important;
}

body.has-fullscreen-map { overflow: hidden; }
/* Fullscreen map wrap is z-index:9999 — lift modals (e.g. legend) above it
   while a fullscreen map is open, otherwise the modal renders behind it. */
body.has-fullscreen-map .modal { z-index: 10050 !important; }
body.has-fullscreen-map .modal-backdrop { z-index: 10040 !important; }
/* The absolute map buttons (z-index ~1100) would otherwise float over an
   open Bootstrap modal (z-index 1055). Hide them while any modal is open. */
body.modal-open .map-fs-toggle,
body.modal-open .leaflet-control-layers,
body.modal-open .leaflet-control-zoom {
    opacity: 0 !important;
    pointer-events: none !important;
}

.map-fs-toggle {
    position: absolute;
    top: 58px; /* sit just below Leaflet layers control (10 + 40 + 8 gap) */
    right: 10px;
    z-index: 1100; /* above Leaflet controls (1000) */
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #0a0a0a;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    transition: transform 0.12s ease, background 0.15s, color 0.15s, border-color 0.15s;
}
.map-fs-toggle:hover { background: var(--gps-primary); color: var(--gps-primary-text); border-color: var(--gps-primary); }
.map-fs-toggle:active { background: var(--gps-primary-hover, var(--gps-primary)); }
html.dark .map-fs-toggle { background: #131c2c; border-color: rgba(255,255,255,0.15); color: #f1f5f9; }
html.dark .map-fs-toggle:hover { background: var(--gps-primary); color: var(--gps-primary-text); border-color: var(--gps-primary); }

/* Unified Leaflet controls: match map-fs-toggle (40x40, 8px radius, white bg, shadow) */
.leaflet-control-zoom {
    border: 2px solid rgba(0, 0, 0, 0.15) !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18) !important;
    overflow: hidden;
}
/* Layers wrapper: only style border/shadow when expanded (the toggle button has its own) */
.leaflet-control-layers {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 8px !important;
}
.leaflet-control-layers.leaflet-control-layers-expanded {
    background: #ffffff !important;
    border: 2px solid rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18) !important;
    z-index: 1200;
    position: relative;
}
/* Hide stacked buttons (fullscreen, legend) while the layers panel is expanded
   so the panel doesn't visually overlap them. */
.map-fs-wrap:has(.leaflet-control-layers-expanded) .map-fs-toggle { opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.leaflet-bar a,
.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    width: 40px !important;
    height: 40px !important;
    line-height: 38px !important;
    font-size: 1.1rem !important;
    color: #0a0a0a !important;
    background-color: #ffffff !important;
    border: 0 !important;
    border-radius: 0 !important;
    transition: background-color 0.15s, color 0.15s;
}
.leaflet-control-layers-toggle {
    width: 40px !important;
    height: 40px !important;
    line-height: 38px !important;
    font-size: 1.1rem !important;
    color: #0a0a0a !important;
    background-color: #ffffff !important;
    border: 2px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18) !important;
    box-sizing: border-box !important;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.leaflet-bar a:not(:last-child) { border-bottom: 1px solid rgba(0,0,0,0.10) !important; }
.leaflet-bar a:hover,
.leaflet-bar a:focus,
.leaflet-control-zoom-in:hover,
.leaflet-control-zoom-out:hover,
.leaflet-control-layers-toggle:hover {
    background-color: var(--gps-primary) !important;
    color: var(--gps-primary-text) !important;
    border-color: var(--gps-primary) !important;
}
/* When any zoom button is hovered, also highlight the wrapper border for visual unity */
.leaflet-control-zoom:hover { border-color: var(--gps-primary) !important; }
/* Replace Leaflet default layers icon with our Font Awesome icon */
.leaflet-control-layers-toggle {
    background-image: none !important;
    position: relative;
}
.leaflet-control-layers-toggle::before {
    content: '\f5fd'; /* fa-layer-group */
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', FontAwesome;
    font-weight: 900;
    font-size: 1.05rem;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* When expanded, the toggle is hidden by Leaflet; keep the expanded panel clean */
.leaflet-control-layers-expanded .leaflet-control-layers-toggle { display: none; }
.leaflet-control-layers-expanded {
    width: auto !important;
    height: auto !important;
    padding: 0.6rem 0.9rem !important;
    border-radius: 8px !important;
    font-size: 0.85rem;
    background: #ffffff !important;
}
html.dark .leaflet-control-zoom { background: #131c2c !important; border-color: rgba(255,255,255,0.15) !important; }
html.dark .leaflet-control-layers.leaflet-control-layers-expanded { background: #131c2c !important; border-color: rgba(255,255,255,0.15) !important; color: #f1f5f9; }
html.dark .leaflet-bar a,
html.dark .leaflet-control-zoom-in,
html.dark .leaflet-control-zoom-out { background-color: #131c2c !important; color: #f1f5f9 !important; }
html.dark .leaflet-control-layers-toggle { background-color: #131c2c !important; color: #f1f5f9 !important; border-color: rgba(255,255,255,0.15) !important; }
html.dark .leaflet-bar a:not(:last-child) { border-bottom-color: rgba(255,255,255,0.10) !important; }
html.dark .leaflet-bar a:hover,
html.dark .leaflet-bar a:focus,
html.dark .leaflet-control-zoom-in:hover,
html.dark .leaflet-control-zoom-out:hover,
html.dark .leaflet-control-layers-toggle:hover {
    background-color: var(--gps-primary) !important;
    color: var(--gps-primary-text) !important;
    border-color: var(--gps-primary) !important;
}
html.dark .leaflet-control-zoom:hover { border-color: var(--gps-primary) !important; }

/* ─────────────────────────────────────────────────────────────────────
   Mobile responsiveness fixes (≤ ~992px / 375px target)
   ───────────────────────────────────────────────────────────────────── */

/* Admin/data tables live in `.app-card.p-0.overflow-hidden`; the
   `overflow:hidden` clips wide columns on phones (unreachable). Restore
   horizontal scroll for the x-axis only when the card holds a table. */
.app-card.overflow-hidden:has(> table.table),
.app-card.overflow-hidden:has(> .table) {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}
.app-card.overflow-hidden:has(> table.table) > .table,
.app-card.overflow-hidden:has(> .table) > .table {
    min-width: 640px; /* keep columns readable; card scrolls instead of squashing */
}

/* Wiring/manual SVG diagrams were forced to min-width:600px with no
   scroll parent — caused full-page horizontal overflow on manual pages. */
@media (max-width: 767.98px) {
    .manual-diagram { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .manual-diagram svg { min-width: 520px; }
}

/* Onboarding stepper: 3×110px steps + lines overflowed 375px screens. */
@media (max-width: 575.98px) {
    .ob-steps { gap: 0; }
    .ob-step { width: auto; flex: 1 1 0; font-size: 0.7rem; }
    .ob-step span { line-height: 1.15; }
    .ob-line { max-width: 24px; margin-bottom: 22px; }
    .ob-bullet { width: 32px; height: 32px; }
    .ob-cmd code { font-size: 0.78rem; }
}

/* Slightly larger inline-edit tap targets on touch screens. */
@media (hover: none) and (pointer: coarse) {
    .btn-edit-tiny { width: 38px !important; height: 38px !important; }
    .fr-sort-pills { height: 38px; }
    .fr-sort-pills button { padding: 0 0.8rem; }
}

/* ─── Language switcher ─── */
.lang-switcher { display: inline-flex; align-items: stretch; border: 1px solid var(--gps-border); border-radius: 100px; overflow: hidden; height: 31px; }
.lang-switcher .lang-opt {
    display: inline-flex; align-items: center;
    padding: 0 0.7rem; font-size: 0.82rem; font-weight: 700;
    color: var(--gps-muted); text-decoration: none; line-height: 1;
    transition: background 0.15s, color 0.15s;
}
.lang-switcher .lang-opt:hover { color: var(--gps-text); }
.lang-switcher .lang-opt.active { background: var(--gps-primary); color: var(--gps-primary-text); }
html.dark .lang-switcher { border-color: rgba(255,255,255,0.15); }

/* ─── Account switch (impersonation) banner ─── */
.acct-switch-banner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
    background: #0a0a0a; color: #ccff03;
    border: 1px solid rgba(204,255,3,0.4); border-radius: 10px;
    padding: 0.6rem 1rem; margin-bottom: 1rem;
    font-size: 0.9rem; font-weight: 600;
}
.acct-switch-banner button {
    background: #ccff03; color: #0a0a0a; border: 0;
    padding: 0.35rem 0.85rem; border-radius: 100px;
    font-size: 0.82rem; font-weight: 700; cursor: pointer;
    transition: filter 0.15s;
}
.acct-switch-banner button:hover { filter: brightness(1.08); }
