@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root {
    --rtv-bg: #070c17;
    --rtv-bg-soft: #0c1525;
    --rtv-bg-card: rgba(11, 19, 34, 0.88);
    --rtv-accent: #4f6fff;
    --rtv-accent-hover: #3d57e8;
    --rtv-accent-light: rgba(79, 111, 255, 0.12);
    --rtv-success: #22c55e;
    --rtv-danger: #f87171;
    --rtv-warning: #fb923c;
    --rtv-text: #e2e8f0;
    --rtv-text-muted: #6b7c93;
    --rtv-border: rgba(79, 111, 255, 0.14);
    --rtv-signal: #f59e0b;
    --rtv-signal-light: rgba(245, 158, 11, 0.1);
    --rtv-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
    --rtv-shadow-md: 0 16px 48px rgba(0, 0, 0, 0.65), 0 4px 16px rgba(0, 0, 0, 0.4);
    --rtv-radius-sm: 10px;
    --rtv-radius-md: 18px;
    --rtv-radius-lg: 28px;
    --rtv-font-body: "Manrope", "Segoe UI", sans-serif;
    --rtv-font-display: "Sora", "Segoe UI", sans-serif;
    --rtv-font-mono: "Space Mono", monospace;
    /* Accents deep-search */
    --ds-purple: #a78bfa;
    --ds-cyan: #38bdf8;
    --ds-glow: rgba(79, 111, 255, 0.28);
}

* { box-sizing: border-box; }

/* Override Bootstrap body defaults for dark theme */
:root {
    --bs-body-bg: transparent;
    --bs-body-color: #e2e8f0;
    --bs-border-color: rgba(79, 111, 255, 0.14);
    --bs-emphasis-color-rgb: 226, 232, 240;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: var(--rtv-text);
    background:
        radial-gradient(ellipse 65% 45% at 15% 8%, rgba(79, 111, 255, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse 45% 55% at 85% 88%, rgba(167, 139, 250, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 50% 35% at 55% 35%, rgba(56, 189, 248, 0.03) 0%, transparent 50%),
        var(--rtv-bg);
    font-family: var(--rtv-font-body);
    line-height: 1.55;
}

main { flex: 1; }

a { color: var(--rtv-accent); }
a:hover { color: var(--rtv-accent-hover); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--rtv-font-display);
    color: var(--rtv-text);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 3vw, 2.9rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 2.2vw, 2.2rem); font-weight: 700; }

.text-muted { color: var(--rtv-text-muted) !important; }

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

.reveal { animation: reveal-up 650ms ease both; }
.reveal-delay-1 { animation-delay: 80ms; }
.reveal-delay-2 { animation-delay: 180ms; }

.page-header { margin-bottom: 1.4rem; }
.page-subtitle { max-width: 680px; margin-bottom: 0; color: var(--rtv-text-muted); }

.content-shell {
    background: var(--rtv-bg-card);
    border: 1px solid var(--rtv-border);
    border-radius: var(--rtv-radius-md);
    box-shadow: var(--rtv-shadow);
    padding: clamp(1.25rem, 3vw, 2rem);
    backdrop-filter: blur(8px);
}

/* ─── Navbar ─── */
.navbar {
    background: rgba(7, 12, 23, 0.88) !important;
    border-bottom: 1px solid var(--rtv-border);
    backdrop-filter: blur(14px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    padding: 0.7rem 0;
}

.navbar-brand {
    font-family: var(--rtv-font-display);
    font-weight: 700;
    font-size: 1.08rem;
    color: var(--rtv-text) !important;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.brand-dot {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, var(--rtv-accent), var(--ds-purple));
    border-radius: 999px;
    box-shadow: 0 0 0 5px rgba(79, 111, 255, 0.18);
    flex-shrink: 0;
}

.navbar-nav .nav-link {
    color: var(--rtv-text-muted) !important;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.38rem 0.82rem !important;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--rtv-text) !important;
    background: rgba(79, 111, 255, 0.1);
}

.nav-link.active {
    color: var(--rtv-text) !important;
    background: rgba(79, 111, 255, 0.14);
}

.nav-avatar {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--rtv-accent), var(--ds-purple));
    color: #fff;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(79, 111, 255, 0.3);
}

.nav-email { color: var(--rtv-text-muted) !important; font-size: 0.82rem; }

.navbar-toggler {
    border: 1px solid var(--rtv-border);
    border-radius: 9px;
    padding: 0.35rem 0.5rem;
    color: var(--rtv-text-muted);
    background: rgba(79, 111, 255, 0.06);
}

.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(79, 111, 255, 0.2); }

.dropdown-menu {
    background: var(--rtv-bg-soft);
    border: 1px solid var(--rtv-border);
    border-radius: 14px;
    box-shadow: var(--rtv-shadow-md);
    padding: 0.45rem;
    min-width: 210px;
}

.dropdown-item {
    color: var(--rtv-text);
    border-radius: 9px;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
}

.dropdown-item:hover { background: rgba(79, 111, 255, 0.1); color: var(--rtv-text); }
.dropdown-item.text-danger { color: var(--rtv-danger) !important; }
.dropdown-item.text-danger:hover { background: rgba(248, 113, 113, 0.1); }
.dropdown-divider { border-color: var(--rtv-border); margin: 0.35rem 0; }
.dropdown-item-text { padding: 0.42rem 0.75rem; color: var(--rtv-text-muted); font-size: 0.82rem; }

/* ─── Hero ─── */
.hero-panel {
    position: relative;
    overflow: hidden;
    border-radius: var(--rtv-radius-lg);
    padding: clamp(1.6rem, 4vw, 3.2rem);
    margin-bottom: 1.6rem;
    color: #f5fbfd;
    background: linear-gradient(135deg, #0b1e2c 0%, #0e2d3e 48%, #133a4e 100%);
    border: 1px solid rgba(79, 111, 255, 0.18);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255,255,255,0.03);
}

.hero-panel::before, .hero-panel::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.hero-panel::before {
    width: 350px;
    height: 350px;
    top: -140px;
    right: -80px;
    background: radial-gradient(circle, rgba(79, 111, 255, 0.22) 0%, transparent 72%);
}

.hero-panel::after {
    width: 250px;
    height: 250px;
    bottom: -100px;
    left: -80px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.2) 0%, transparent 72%);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.9rem;
    padding: 0.33rem 0.72rem;
    border-radius: 999px;
    background: rgba(79, 111, 255, 0.14);
    border: 1px solid rgba(79, 111, 255, 0.3);
    font-family: var(--rtv-font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 400;
    color: var(--ds-cyan);
}

.hero-title {
    margin-bottom: 0.95rem;
    color: #f5fbfd;
    max-width: 760px;
    line-height: 1.14;
}

.hero-accent { color: #ffd494; }

.hero-subtitle {
    max-width: 670px;
    margin-bottom: 1.4rem;
    color: rgba(245, 253, 255, 0.8);
    font-size: 1rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.2rem; }
.hero-actions .btn { min-width: 210px; }

.hero-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.hero-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.62rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(245, 253, 255, 0.82);
    font-family: var(--rtv-font-mono);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.06em;
}

/* ─── Demo section ─── */
.demo-section {
    margin-bottom: 1.6rem;
}

.demo-header {
    text-align: center;
    margin-bottom: 1.8rem;
}

.demo-kicker-wrap { margin-bottom: 0.8rem; }

.demo-kicker {
    display: inline-block;
    font-family: var(--rtv-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ds-cyan);
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.demo-title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--rtv-text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.demo-subtitle {
    color: var(--rtv-text-muted);
    font-size: 0.95rem;
    max-width: 540px;
    margin: 0 auto;
}

.demo-grid {
    display: grid;
    grid-template-columns: 57fr 43fr;
    gap: 18px;
    align-items: stretch;
}

.demo-video-wrap {
    position: relative;
    border-radius: var(--rtv-radius-md);
    overflow: hidden;
    border: 1px solid var(--rtv-border);
    background: #000;
    box-shadow: var(--rtv-shadow-md);
    min-height: 280px;
}

.demo-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.demo-video-badge {
    position: absolute;
    bottom: 14px;
    left: 14px;
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(7, 12, 23, 0.82);
    border: 1px solid var(--rtv-border);
    border-radius: 999px;
    padding: 5px 12px;
    font-family: var(--rtv-font-mono);
    font-size: 0.7rem;
    color: var(--rtv-text-muted);
    letter-spacing: 0.05em;
    backdrop-filter: blur(6px);
}

/* Pulse dot */
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ds-cyan);
    animation: pulse-anim 1.4s ease-in-out infinite;
    flex-shrink: 0;
}

.pulse-dot-sm {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ds-cyan);
    animation: pulse-anim 1.4s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-anim {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.65); }
}

/* Demo panel */
.demo-panel {
    background: var(--rtv-bg-card);
    border: 1px solid var(--rtv-border);
    border-radius: var(--rtv-radius-md);
    overflow: hidden;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
}

.demo-panel-header {
    padding: 13px 18px;
    border-bottom: 1px solid var(--rtv-border);
    background: rgba(11, 19, 34, 0.95);
    display: flex;
    align-items: center;
    gap: 9px;
}

.demo-panel-title {
    font-family: var(--rtv-font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ds-cyan);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    flex: 1;
}

.demo-steps {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.demo-step {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.demo-step.visible { opacity: 1; transform: translateY(0); }

.demo-step-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    margin-top: 1px;
}

.demo-step-icon.pending { background: rgba(107, 124, 147, 0.12); color: var(--rtv-text-muted); }
.demo-step-icon.active { background: rgba(79, 111, 255, 0.14); color: var(--rtv-accent); animation: icon-pulse 1.2s ease-in-out infinite; }
.demo-step-icon.done { background: rgba(56, 189, 248, 0.1); color: var(--ds-cyan); }

@keyframes icon-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 111, 255, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(79, 111, 255, 0); }
}

.demo-step-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--rtv-text);
    margin-bottom: 2px;
    line-height: 1.3;
}

.demo-step-label.muted { color: var(--rtv-text-muted); }

.demo-step-detail {
    font-family: var(--rtv-font-mono);
    font-size: 0.7rem;
    color: var(--rtv-text-muted);
    line-height: 1.4;
}

/* Demo progress bar */
.demo-progress-wrap {
    padding: 0 18px 14px;
}

.demo-progress-bg {
    height: 2px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 2px;
    overflow: hidden;
}

.demo-progress-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--rtv-accent), var(--ds-purple), var(--ds-cyan));
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

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

/* Demo result */
.demo-result {
    border-top: 1px solid var(--rtv-border);
    padding: 14px 18px 16px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    flex: 1;
}

.demo-result.visible { opacity: 1; transform: translateY(0); }

.demo-result-family-label {
    font-family: var(--rtv-font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rtv-text-muted);
    margin-bottom: 3px;
}

.demo-result-family {
    font-family: var(--rtv-font-display);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.demo-family-badge {
    font-family: var(--rtv-font-mono);
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 5px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.demo-bars { display: flex; flex-direction: column; gap: 7px; }

.demo-bar-row {
    display: grid;
    grid-template-columns: 80px 1fr 40px;
    align-items: center;
    gap: 8px;
}

.demo-bar-label {
    font-family: var(--rtv-font-mono);
    font-size: 0.68rem;
    color: var(--rtv-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.demo-bar-bg {
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.demo-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-bar-val {
    font-family: var(--rtv-font-mono);
    font-size: 0.68rem;
    color: var(--rtv-text-muted);
    text-align: right;
}

/* ─── Feature grid ─── */
.feature-grid { margin-bottom: 1.6rem; }

.feature-card {
    background: var(--rtv-bg-card);
    border: 1px solid var(--rtv-border);
    border-radius: var(--rtv-radius-md);
    box-shadow: var(--rtv-shadow);
    height: 100%;
    backdrop-filter: blur(6px);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(79, 111, 255, 0.35);
    box-shadow: var(--rtv-shadow-md), 0 0 30px rgba(79, 111, 255, 0.07);
}

.feature-card .card-body { padding: 1.35rem; }

.feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
}

.feature-icon-accent { background: rgba(79, 111, 255, 0.14); color: var(--rtv-accent); }
.feature-icon-success { background: rgba(34, 197, 94, 0.1); color: var(--rtv-success); }
.feature-icon-muted { background: rgba(107, 124, 147, 0.1); color: var(--rtv-text-muted); }
.feature-text { color: var(--rtv-text-muted); font-size: 0.9rem; margin-bottom: 1.15rem; }

/* ─── Stats panel ─── */
.stats-panel {
    background: var(--rtv-bg-card);
    border: 1px solid var(--rtv-border);
    border-radius: var(--rtv-radius-md);
    box-shadow: var(--rtv-shadow);
    padding: clamp(1rem, 2.6vw, 1.6rem);
    backdrop-filter: blur(6px);
}

.stat-card { text-align: center; padding: 0.75rem; }

.stat-value {
    font-family: var(--rtv-font-display);
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 800;
    color: var(--rtv-accent);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 0.3rem;
}

.stat-label {
    color: var(--rtv-text-muted);
    font-family: var(--rtv-font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 400;
}

/* ─── Cards ─── */
.card {
    background: var(--rtv-bg-card);
    border: 1px solid var(--rtv-border);
    border-radius: var(--rtv-radius-md);
    box-shadow: var(--rtv-shadow);
    backdrop-filter: blur(6px);
}

.card-header {
    background: rgba(7, 12, 23, 0.6) !important;
    border-bottom: 1px solid var(--rtv-border) !important;
    color: var(--rtv-text) !important;
    font-weight: 700;
    border-radius: var(--rtv-radius-md) var(--rtv-radius-md) 0 0 !important;
    padding: 0.92rem 1.2rem;
}

.metric-label {
    color: var(--rtv-text-muted);
    font-family: var(--rtv-font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 400;
}

/* ─── Buttons ─── */
.btn {
    border-radius: 11px;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.56rem 1rem;
}

.btn-sm { border-radius: 9px; }

.btn-primary {
    background: linear-gradient(135deg, var(--rtv-accent), #6d50ff);
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(79, 111, 255, 0.3);
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, var(--rtv-accent-hover), #5a3dee);
    border-color: transparent;
    box-shadow: 0 6px 24px rgba(79, 111, 255, 0.45);
    transform: translateY(-1px);
}

.btn-light {
    background: rgba(255, 255, 255, 0.95);
    color: #0a1628;
    border-color: transparent;
}

.btn-light:hover {
    background: #fff;
    color: #000;
    border-color: transparent;
}

.btn-outline-light {
    color: rgba(245, 253, 255, 0.9);
    border-color: rgba(245, 253, 255, 0.3);
    background: transparent;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(245, 253, 255, 0.6);
}

.btn-outline-primary {
    color: var(--rtv-accent);
    border-color: rgba(79, 111, 255, 0.35);
    background: transparent;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    color: #fff;
    background: var(--rtv-accent);
    border-color: var(--rtv-accent);
}

.btn-outline-secondary {
    color: var(--rtv-text-muted);
    border-color: var(--rtv-border);
    background: transparent;
}

.btn-outline-secondary:hover, .btn-outline-secondary:focus {
    color: var(--rtv-text);
    border-color: rgba(79, 111, 255, 0.3);
    background: rgba(79, 111, 255, 0.06);
}

.btn-success {
    background: linear-gradient(135deg, var(--rtv-success), #16a34a);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.25);
}

.btn-success:hover, .btn-success:focus {
    background: linear-gradient(135deg, #16a34a, #15803d);
    border-color: transparent;
}

/* ─── Forms ─── */
.form-control, .form-select {
    background-color: rgba(7, 12, 23, 0.7);
    border: 1px solid var(--rtv-border);
    border-radius: 10px;
    color: var(--rtv-text);
    font-size: 0.95rem;
    padding: 0.58rem 0.75rem;
}

.form-control::placeholder { color: var(--rtv-text-muted); }

.form-control:focus, .form-select:focus {
    border-color: rgba(79, 111, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(79, 111, 255, 0.14);
    background-color: rgba(7, 12, 23, 0.85);
    color: var(--rtv-text);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236b7c93' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.form-select option { background: #0c1525; color: var(--rtv-text); }

.form-label { color: var(--rtv-text); font-weight: 700; font-size: 0.9rem; margin-bottom: 0.45rem; }
.form-text { color: var(--rtv-text-muted) !important; }

/* ─── Drop zone ─── */
.drop-zone {
    border: 2px dashed rgba(79, 111, 255, 0.25);
    border-radius: var(--rtv-radius-md);
    background: rgba(79, 111, 255, 0.03);
    transition: border-color 0.24s ease, background 0.24s ease, transform 0.24s ease;
    cursor: pointer;
    padding: clamp(2rem, 4vw, 2.8rem);
    text-align: center;
}

.drop-zone:hover, .drop-zone.border-primary, .drop-zone.is-dragover {
    border-color: rgba(79, 111, 255, 0.55);
    background: rgba(79, 111, 255, 0.07);
    transform: translateY(-2px);
}

.drop-zone .drop-icon { color: var(--rtv-text-muted); margin-bottom: 0.8rem; }
.drop-zone.border-primary .drop-icon, .drop-zone.is-dragover .drop-icon { color: var(--rtv-accent); }

/* ─── Tables ─── */
.table {
    color: var(--rtv-text);
    margin-bottom: 0;
    --bs-table-bg: transparent;
    --bs-table-bg-type: transparent;
    --bs-table-color: var(--rtv-text);
    --bs-table-color-type: var(--rtv-text);
    --bs-table-border-color: var(--rtv-border);
    --bs-table-striped-bg: rgba(79, 111, 255, 0.04);
    --bs-table-striped-color: var(--rtv-text);
    --bs-table-hover-bg: rgba(79, 111, 255, 0.07);
    --bs-table-hover-color: var(--rtv-text);
}

.table thead th {
    font-family: var(--rtv-font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rtv-text-muted);
    border-bottom: 1px solid var(--rtv-border) !important;
}

.table td { border-color: var(--rtv-border); vertical-align: middle; }

.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: rgba(79, 111, 255, 0.04);
    color: var(--rtv-text);
}

.table-hover tbody tr:hover > * {
    --bs-table-accent-bg: rgba(79, 111, 255, 0.07);
    color: var(--rtv-text);
}

.table-success {
    --bs-table-bg: rgba(34, 197, 94, 0.08);
    --bs-table-color: var(--rtv-text);
}

/* ─── Progress ─── */
.progress { background-color: rgba(255, 255, 255, 0.06); border-radius: 999px; }
.progress-bar { background-color: var(--rtv-accent); border-radius: 999px; }

/* ─── Badges ─── */
.badge { font-weight: 700; border-radius: 7px; }

.confidence-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(79, 111, 255, 0.12);
    color: var(--rtv-accent);
    border: 1px solid rgba(79, 111, 255, 0.25);
    border-radius: 999px;
    padding: 4px 13px;
    font-family: var(--rtv-font-mono);
    font-size: 0.82rem;
    font-weight: 700;
}

/* ─── Alerts ─── */
.alert { border-radius: 12px; }

.alert-danger {
    background-color: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.25);
    color: #fca5a5;
}

.alert-info {
    background-color: rgba(79, 111, 255, 0.08);
    border-color: rgba(79, 111, 255, 0.25);
    color: #93b4fe;
}

/* ─── Auth ─── */
.auth-card {
    background: var(--rtv-bg-card);
    border: 1px solid var(--rtv-border);
    border-radius: 22px;
    padding: clamp(1.4rem, 3.5vw, 2rem);
    box-shadow: var(--rtv-shadow-md);
    backdrop-filter: blur(10px);
}

.auth-card h2 { font-size: 1.5rem; }

/* ─── Result ─── */
.result-vehicle-name {
    font-family: var(--rtv-font-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--rtv-text);
    margin-bottom: 0.24rem;
}

.result-img-wrap {
    background: rgba(79, 111, 255, 0.04);
    border: 1px solid var(--rtv-border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.result-img-preview {
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    border-radius: 14px;
}

/* Top-3 confidence bars */
.top3-bar-row {
    display: grid;
    grid-template-columns: 100px 1fr 48px;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.top3-bar-row:first-child { padding-top: 0; }

.top3-bar-label {
    font-family: var(--rtv-font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--rtv-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top3-bar-label.top3-first { color: var(--rtv-success); }

.top3-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}

.top3-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.top3-bar-fill.bar-success { background: linear-gradient(90deg, var(--rtv-success), #4ade80); }
.top3-bar-fill.bar-accent  { background: linear-gradient(90deg, var(--rtv-accent), #818cf8); }
.top3-bar-fill.bar-muted   { background: rgba(107, 124, 147, 0.4); }

.top3-bar-val {
    font-family: var(--rtv-font-mono);
    font-size: 0.78rem;
    color: var(--rtv-text-muted);
    text-align: right;
    font-weight: 700;
}

/* ─── Footer ─── */
.footer {
    margin-top: auto;
    background: rgba(7, 12, 23, 0.85);
    border-top: 1px solid var(--rtv-border);
    backdrop-filter: blur(8px);
    padding: 1rem 0;
}

.footer small { color: var(--rtv-text-muted); }

/* ─── Pagination ─── */
.page-link {
    color: var(--rtv-accent);
    background-color: var(--rtv-bg-card);
    border-color: var(--rtv-border);
    border-radius: 8px;
    margin: 0 2px;
}

.page-link:hover {
    background-color: rgba(79, 111, 255, 0.1);
    border-color: rgba(79, 111, 255, 0.3);
    color: var(--rtv-accent);
}

.page-item.active .page-link {
    background-color: var(--rtv-accent);
    border-color: var(--rtv-accent);
}

/* ─── Spinner ─── */
.spinner-border { color: var(--rtv-accent) !important; }

/* ─── Contribute review ─── */
.review-group {
    background: var(--rtv-bg-card);
    border: 1px solid var(--rtv-border);
    border-radius: var(--rtv-radius-md);
    box-shadow: var(--rtv-shadow);
}

.review-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }

.review-group-header {
    padding: 0.9rem 1.2rem;
    background: rgba(7, 12, 23, 0.6);
    border-bottom: 1px solid var(--rtv-border);
}

.review-cls-name { font-family: var(--rtv-font-display); font-weight: 700; font-size: 0.95rem; color: var(--rtv-text); }

.review-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(79, 111, 255, 0.12);
    color: var(--rtv-accent);
    font-family: var(--rtv-font-mono);
    font-size: 0.7rem;
    font-weight: 700;
}

.review-img-card {
    background: var(--rtv-bg-soft);
    border: 1px solid var(--rtv-border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.review-img-card:hover { border-color: rgba(79, 111, 255, 0.35); box-shadow: 0 6px 18px rgba(0,0,0,0.4); }
.review-img-wrap { position: relative; height: 200px; overflow: hidden; background: #0a121f; }
.review-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.review-img-meta { padding: 7px 9px 5px; }
.review-img-user { font-size: 0.78rem; font-weight: 700; color: var(--rtv-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-img-date { font-size: 0.72rem; color: var(--rtv-text-muted); }
.review-img-notes { font-size: 0.72rem; color: var(--rtv-text-muted); font-style: italic; margin-top: 3px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.review-img-actions { display: flex; border-top: 1px solid var(--rtv-border); }

.review-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    transition: background 0.18s ease, color 0.18s ease;
}

.review-btn + .review-btn { border-left: 1px solid var(--rtv-border); }
.review-btn-approve { color: var(--rtv-success); }
.review-btn-approve:hover { background: rgba(34, 197, 94, 0.1); }
.review-btn-reject { color: var(--rtv-danger); }
.review-btn-reject:hover { background: rgba(248, 113, 113, 0.1); }

.review-empty-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: rgba(34, 197, 94, 0.1);
    color: var(--rtv-success);
    display: flex; align-items: center; justify-content: center;
}

/* ─── Dataset review ─── */
.dataset-card {
    cursor: pointer; position: relative;
    transition: transform 0.25s cubic-bezier(.4,0,.2,1), border-color 0.25s ease, opacity 0.3s ease, box-shadow 0.25s ease;
}
.dataset-card:active { transform: scale(0.97); }
.dataset-card.rejected {
    border-color: var(--rtv-danger) !important;
    opacity: 0.35;
    transform: scale(0.95);
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.4), inset 0 0 20px rgba(248, 113, 113, 0.08);
}
.dataset-card.rejected .dataset-reject-overlay { opacity: 1; }
.dataset-card.rejected .review-img-wrap img { filter: grayscale(0.6) brightness(0.7); transition: filter 0.3s ease; }
.dataset-reject-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(248, 113, 113, 0.2);
    color: var(--rtv-danger);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.dataset-reject-overlay svg {
    filter: drop-shadow(0 0 8px rgba(248, 113, 113, 0.6));
}
.dataset-class-list { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.dataset-class-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    background: var(--rtv-bg-soft);
    border: 1px solid var(--rtv-border);
    border-radius: 10px;
    color: var(--rtv-text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.dataset-class-item:hover { border-color: var(--rtv-accent); background: rgba(79, 111, 255, 0.06); color: var(--rtv-text); }
.dataset-class-name { font-family: var(--rtv-font-mono); }
.dataset-review-toolbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 1050;
    padding: 0.8rem 0;
    background: rgba(7, 12, 23, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--rtv-border);
    font-weight: 600; font-size: 0.9rem;
    color: var(--rtv-text);
}

/* ─── Error pages ─── */
.error-page {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: clamp(3rem, 8vw, 6rem) 1rem;
}

.error-code {
    font-family: var(--rtv-font-display);
    font-size: clamp(5rem, 15vw, 9rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--rtv-accent) 0%, var(--ds-purple) 60%, var(--ds-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.3rem;
}

.error-icon {
    width: 64px; height: 64px; border-radius: var(--rtv-radius-md);
    display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1.4rem;
}

.error-icon-accent { background: rgba(79, 111, 255, 0.12); color: var(--rtv-accent); }
.error-icon-warning { background: var(--rtv-signal-light); color: var(--rtv-signal); }
.error-title { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; margin-bottom: 0.6rem; }
.error-desc { max-width: 420px; color: var(--rtv-text-muted); font-size: 1rem; margin-bottom: 1.8rem; }

.error-detail {
    display: inline-block; padding: 0.3rem 0.8rem; border-radius: 999px;
    background: rgba(107, 124, 147, 0.1); color: var(--rtv-text-muted);
    font-family: var(--rtv-font-mono); font-size: 0.72rem;
    letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 1.8rem;
}

/* ─── Drop zone preview ─── */
.drop-zone-preview {
    max-height: 280px;
    object-fit: contain;
    border-radius: 12px;
    width: 100%;
}

.drop-zone.has-preview {
    padding: 1rem;
}

.drop-zone.has-preview .drop-icon,
.drop-zone.has-preview .drop-zone-text,
.drop-zone.has-preview #select-btn {
    display: none;
}

/* ─── History cards grid ─── */
.history-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 991px) {
    .history-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
    .history-grid { grid-template-columns: 1fr; }
}

.history-card {
    background: var(--rtv-bg-card);
    border: 1px solid var(--rtv-border);
    border-radius: var(--rtv-radius-md);
    box-shadow: var(--rtv-shadow);
    padding: 1.1rem 1.2rem;
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.history-card:hover {
    transform: translateY(-3px);
    border-color: rgba(79, 111, 255, 0.35);
    box-shadow: var(--rtv-shadow-md), 0 0 24px rgba(79, 111, 255, 0.06);
}

.history-card.expanded {
    border-color: rgba(79, 111, 255, 0.4);
}

.history-vehicle-name {
    font-family: var(--rtv-font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--rtv-text);
    margin-bottom: 0.45rem;
}

.history-family-badge {
    display: inline-block;
    font-family: var(--rtv-font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 6px;
    margin-bottom: 0.7rem;
}

.family-chars { background: rgba(251, 146, 60, 0.14); color: var(--rtv-warning); border: 1px solid rgba(251, 146, 60, 0.3); }
.family-ifv   { background: rgba(79, 111, 255, 0.12); color: var(--rtv-accent); border: 1px solid rgba(79, 111, 255, 0.25); }
.family-apc   { background: rgba(34, 197, 94, 0.1); color: var(--rtv-success); border: 1px solid rgba(34, 197, 94, 0.25); }

.history-conf-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
}

.history-conf-row .progress {
    flex: 1;
    height: 6px;
}

.history-conf-val {
    font-family: var(--rtv-font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--rtv-text);
    white-space: nowrap;
    min-width: 42px;
    text-align: right;
}

.history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-date {
    font-size: 0.78rem;
    color: var(--rtv-text-muted);
}

.history-model {
    font-family: var(--rtv-font-mono);
    font-size: 0.72rem;
    color: var(--rtv-text-muted);
}

/* History detail (accordion) */
.history-detail {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--rtv-border);
}

.history-detail-title {
    font-family: var(--rtv-font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rtv-text-muted);
    margin-bottom: 0.5rem;
}

.history-detail-empty {
    font-size: 0.82rem;
    color: var(--rtv-text-muted);
    font-style: italic;
}

/* ─── Misc ─── */
.file-card {
    background: var(--rtv-bg-soft);
    border: 1px solid var(--rtv-border);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 9px;
}

.file-card img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }

#previous-result-zone .card { background: rgba(11, 19, 34, 0.5); }
#previous-result-zone .table td { color: var(--rtv-text-muted); }

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
::-webkit-scrollbar-thumb { background: rgba(79, 111, 255, 0.25); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(79, 111, 255, 0.45); }

/* ─── Bootstrap dark overrides ─── */
.navbar-collapse { background: transparent; }

@media (max-width: 991px) {
    .navbar-collapse.collapse.show,
    .navbar-collapse.collapsing {
        background: rgba(7, 12, 23, 0.97);
        border-radius: 14px;
        border: 1px solid var(--rtv-border);
        margin-top: 8px;
        padding: 0.5rem;
    }
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(2);
    opacity: 0.5;
}
.btn-close:hover { opacity: 0.9; }

.modal-content {
    background: var(--rtv-bg-soft);
    border: 1px solid var(--rtv-border);
}

.input-group-text {
    background: rgba(7, 12, 23, 0.6);
    border: 1px solid var(--rtv-border);
    color: var(--rtv-text-muted);
}

/* ─── Tactical HUD Global ─── */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(79, 111, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 111, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}

body > * { position: relative; z-index: 1; }

/* Tactical corner markers */
.tac-card {
    position: relative;
    overflow: visible;
}

.tac-corner {
    position: absolute;
    width: 14px;
    height: 14px;
    pointer-events: none;
    z-index: 2;
}

.tac-corner-tl { top: -1px; left: -1px; border-top: 2px solid var(--rtv-accent); border-left: 2px solid var(--rtv-accent); }
.tac-corner-tr { top: -1px; right: -1px; border-top: 2px solid var(--rtv-accent); border-right: 2px solid var(--rtv-accent); }
.tac-corner-bl { bottom: -1px; left: -1px; border-bottom: 2px solid var(--rtv-accent); border-left: 2px solid var(--rtv-accent); }
.tac-corner-br { bottom: -1px; right: -1px; border-bottom: 2px solid var(--rtv-accent); border-right: 2px solid var(--rtv-accent); }

/* Scanline effect for analyzed images */
.tac-scanline {
    position: relative;
    overflow: hidden;
}

.tac-scanline::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(79, 111, 255, 0.03) 3px,
        rgba(79, 111, 255, 0.03) 4px
    );
    z-index: 3;
}

/* Scanning animation for loading state */
.tac-scanning::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--rtv-accent) 50%, transparent 100%);
    box-shadow: 0 0 12px 2px rgba(79, 111, 255, 0.4);
    z-index: 4;
    animation: tac-scan 2s ease-in-out infinite;
}

@keyframes tac-scan {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Target lock animation for results */
.tac-target-lock {
    position: relative;
}

.tac-target-lock::before {
    content: "";
    position: absolute;
    inset: -4px;
    border: 1px solid transparent;
    border-radius: inherit;
    pointer-events: none;
    z-index: 2;
    animation: tac-lock 0.4s ease-out forwards;
}

@keyframes tac-lock {
    0% { border-color: transparent; inset: 20px; opacity: 0; }
    60% { border-color: var(--rtv-accent); inset: -6px; opacity: 1; }
    100% { border-color: rgba(79, 111, 255, 0.3); inset: -4px; opacity: 1; }
}

/* Crosshair on analyzed image */
.tac-crosshair::before,
.tac-crosshair::after {
    content: "";
    position: absolute;
    background: rgba(79, 111, 255, 0.2);
    z-index: 4;
    pointer-events: none;
}

.tac-crosshair::before {
    top: 50%;
    left: 10%;
    right: 10%;
    height: 1px;
    transform: translateY(-50%);
}

.tac-crosshair::after {
    left: 50%;
    top: 10%;
    bottom: 10%;
    width: 1px;
    transform: translateX(-50%);
}

/* HUD data label (top-right overlay on images) */
.tac-hud-label {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(7, 12, 23, 0.82);
    border: 1px solid rgba(79, 111, 255, 0.25);
    border-radius: 6px;
    font-family: var(--rtv-font-mono);
    font-size: 0.68rem;
    color: var(--rtv-accent);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
}

/* ─── Vehicles Encyclopedia ─── */
.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.vehicle-card {
    background: var(--rtv-bg-card);
    border: 1px solid var(--rtv-border);
    border-radius: var(--rtv-radius-sm);
    padding: 1.2rem;
    backdrop-filter: blur(6px);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.vehicle-card:hover {
    transform: translateY(-3px);
    border-color: rgba(79, 111, 255, 0.35);
    box-shadow: var(--rtv-shadow-md), 0 0 24px rgba(79, 111, 255, 0.06);
}

.vehicle-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--rtv-border);
}

.vehicle-name {
    font-family: var(--rtv-font-display);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--rtv-text);
    letter-spacing: -0.02em;
}

.vehicle-origin {
    font-family: var(--rtv-font-mono);
    font-size: 0.7rem;
    color: var(--rtv-text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.vehicle-specs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 1rem;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.spec-key {
    font-family: var(--rtv-font-mono);
    font-size: 0.72rem;
    color: var(--rtv-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

.spec-val {
    font-family: var(--rtv-font-mono);
    font-size: 0.82rem;
    color: var(--rtv-text);
    font-weight: 700;
    text-align: right;
}

.vehicle-confusions {
    padding-top: 0.75rem;
    border-top: 1px solid var(--rtv-border);
}

.vehicle-confusions .metric-label {
    display: block;
    margin-bottom: 0.4rem;
}

.confusion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.confusion-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-family: var(--rtv-font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(248, 113, 113, 0.1);
    color: var(--rtv-danger);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.confusion-tag-none {
    background: rgba(107, 124, 147, 0.08);
    color: var(--rtv-text-muted);
    border-color: rgba(107, 124, 147, 0.15);
    font-weight: 400;
    font-style: italic;
}

/* Family section icons */
.family-section-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.family-section-chars { background: rgba(251, 146, 60, 0.12); color: var(--rtv-warning); }
.family-section-ifv { background: rgba(79, 111, 255, 0.12); color: var(--rtv-accent); }
.family-section-apc { background: rgba(34, 197, 94, 0.1); color: var(--rtv-success); }

/* Tactical nav pills for vehicle page */
.tac-pill { border-radius: 999px; font-family: var(--rtv-font-mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.tac-pill-chars:hover { border-color: var(--rtv-warning); color: var(--rtv-warning); background: rgba(251, 146, 60, 0.08); }
.tac-pill-ifv:hover { border-color: var(--rtv-accent); color: var(--rtv-accent); background: rgba(79, 111, 255, 0.08); }
.tac-pill-apc:hover { border-color: var(--rtv-success); color: var(--rtv-success); background: rgba(34, 197, 94, 0.08); }

/* ─── Radial Gauge (Analyze HUD) ─── */
.radial-gauge {
    position: relative;
    width: 110px;
    height: 110px;
    flex-shrink: 0;
}

.radial-gauge svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.radial-gauge-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 6;
}

.radial-gauge-fill {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.radial-gauge-fill.gauge-family { stroke: var(--rtv-accent); filter: drop-shadow(0 0 6px rgba(79, 111, 255, 0.4)); }
.radial-gauge-fill.gauge-sub { stroke: var(--ds-cyan); filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.4)); }
.radial-gauge-fill.gauge-high { stroke: var(--rtv-success); filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.4)); }

.radial-gauge-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.radial-gauge-pct {
    font-family: var(--rtv-font-display);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--rtv-text);
    line-height: 1;
}

.radial-gauge-text {
    font-family: var(--rtv-font-mono);
    font-size: 0.58rem;
    color: var(--rtv-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 2px;
}

/* ─── Analyze HUD layout ─── */
.analyze-hud {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 420px;
}

.analyze-hud-image {
    position: relative;
    background: rgba(7, 12, 23, 0.6);
    border-right: 1px solid var(--rtv-border);
    border-radius: var(--rtv-radius-md) 0 0 var(--rtv-radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.analyze-hud-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 450px;
}

.analyze-hud-data {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    border-radius: 0 var(--rtv-radius-md) var(--rtv-radius-md) 0;
}

.analyze-hud-section {
    margin-bottom: 1.2rem;
}

.analyze-hud-section:last-child { margin-bottom: 0; }

.analyze-gauges {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.analyze-vehicle-id {
    text-align: center;
    margin-bottom: 1rem;
}

.analyze-vehicle-family {
    font-family: var(--rtv-font-mono);
    font-size: 0.7rem;
    color: var(--rtv-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.3rem;
}

.analyze-vehicle-name {
    font-family: var(--rtv-font-display);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--rtv-text);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

@media (max-width: 767px) {
    .analyze-hud {
        grid-template-columns: 1fr;
    }
    .analyze-hud-image {
        border-right: none;
        border-bottom: 1px solid var(--rtv-border);
        border-radius: var(--rtv-radius-md) var(--rtv-radius-md) 0 0;
        min-height: 220px;
    }
    .analyze-hud-data {
        border-radius: 0 0 var(--rtv-radius-md) var(--rtv-radius-md);
    }
    .vehicles-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Animations ─── */
@keyframes reveal-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive ─── */
@media (max-width: 991px) {
    .hero-actions .btn { min-width: 170px; }
    .feature-card .card-body { padding: 1.1rem; }
    .navbar-nav .nav-link { padding: 0.5rem 0.74rem !important; }
    .demo-grid { grid-template-columns: 1fr; }
    .demo-video-wrap { min-height: 220px; max-height: 340px; }
}

@media (max-width: 767px) {
    .hero-panel { border-radius: 22px; margin-bottom: 1.2rem; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { width: 100%; }
    .hero-title { font-size: clamp(1.8rem, 7vw, 2.3rem); }
    .content-shell { border-radius: 14px; padding: 1rem; }
    .auth-card { border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0ms !important;
    }
}

/* ═══════════════════════════════════════════════════
   HOMEPAGE REDESIGN — HERO 3D + SCROLL REVEAL
   ═══════════════════════════════════════════════════ */

/* ─── page-home: transparent navbar over hero ─── */
.page-home .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(7, 12, 23, 0) !important;
    border-bottom: 1px solid transparent;
    backdrop-filter: none;
    box-shadow: none;
    transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
}

.page-home .navbar.scrolled {
    background: rgba(7, 12, 23, 0.92) !important;
    border-bottom: 1px solid var(--rtv-border);
    backdrop-filter: blur(14px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

.page-home main {
    padding-top: 2rem !important;
}

/* ─── Hero 3D section ─── */
.hero-3d {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 50% 20%, rgba(79, 111, 255, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 30% 70%, rgba(167, 139, 250, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 75% 50%, rgba(56, 189, 248, 0.05) 0%, transparent 50%),
        var(--rtv-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Grid overlay */
.hero-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(79, 111, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 111, 255, 0.055) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black 20%, transparent 80%);
}

/* Scanlines */
.hero-scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(79, 111, 255, 0.018) 3px,
        rgba(79, 111, 255, 0.018) 4px
    );
}

/* Three.js canvas — sits on top, transparent background */
#drone-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    pointer-events: none;
    display: block;
}

/* Text content — behind the canvas */
.hero-3d-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1.5rem;
    pointer-events: none;
}

.hero-3d-content .btn {
    pointer-events: all;
}

/* Kicker */
.hero-3d-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.4rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(79, 111, 255, 0.12);
    border: 1px solid rgba(79, 111, 255, 0.28);
    font-family: var(--rtv-font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ds-cyan);
    animation: reveal-up 0.8s ease both;
}

.hero-kicker-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ds-cyan);
    animation: pulse-anim 1.4s ease-in-out infinite;
    flex-shrink: 0;
}

.hero-kicker-sep { opacity: 0.4; }

/* Main title */
.hero-3d-title {
    font-family: var(--rtv-font-display);
    font-size: clamp(3.8rem, 9vw, 8rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 1.2rem;
    animation: reveal-up 0.8s 0.1s ease both;
}

.hero-3d-title-line {
    color: rgba(226, 232, 240, 0.92);
}

.hero-3d-title-accent {
    background: linear-gradient(135deg, #4f6fff 0%, #a78bfa 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtitle */
.hero-3d-sub {
    font-size: clamp(0.95rem, 1.6vw, 1.15rem);
    color: rgba(226, 232, 240, 0.55);
    max-width: 520px;
    margin-bottom: 2rem;
    line-height: 1.6;
    animation: reveal-up 0.8s 0.2s ease both;
}

/* CTA buttons */
.hero-3d-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    justify-content: center;
    animation: reveal-up 0.8s 0.3s ease both;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.72rem 1.6rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f6fff 0%, #6d50ff 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    box-shadow: 0 4px 20px rgba(79, 111, 255, 0.4), 0 0 0 1px rgba(79, 111, 255, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(79, 111, 255, 0.55), 0 0 0 1px rgba(79, 111, 255, 0.5);
    color: #fff;
}

.btn-hero-ghost {
    display: inline-flex;
    align-items: center;
    padding: 0.72rem 1.6rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(226, 232, 240, 0.85);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(6px);
}

.btn-hero-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
    transform: translateY(-2px);
}

/* Tactical corner markers */
.hero-corner {
    position: absolute;
    width: 18px;
    height: 18px;
    pointer-events: none;
    z-index: 4;
}

.hero-corner-tl { top: 24px; left: 24px; border-top: 2px solid rgba(79, 111, 255, 0.5); border-left: 2px solid rgba(79, 111, 255, 0.5); }
.hero-corner-tr { top: 24px; right: 24px; border-top: 2px solid rgba(79, 111, 255, 0.5); border-right: 2px solid rgba(79, 111, 255, 0.5); }
.hero-corner-bl { bottom: 24px; left: 24px; border-bottom: 2px solid rgba(79, 111, 255, 0.5); border-left: 2px solid rgba(79, 111, 255, 0.5); }
.hero-corner-br { bottom: 24px; right: 24px; border-bottom: 2px solid rgba(79, 111, 255, 0.5); border-right: 2px solid rgba(79, 111, 255, 0.5); }

/* HUD badge top-right */
.hero-hud-badge {
    position: absolute;
    top: 28px;
    right: 52px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    background: rgba(7, 12, 23, 0.72);
    border: 1px solid rgba(79, 111, 255, 0.25);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.hero-hud-text {
    font-family: var(--rtv-font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ds-cyan);
}

/* Scroll hint */
.hero-scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: reveal-up 1s 0.8s ease both;
}

.hero-scroll-label {
    font-family: var(--rtv-font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(107, 124, 147, 0.6);
}

.hero-scroll-line {
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, rgba(79, 111, 255, 0.5), transparent);
    animation: scroll-line 1.8s ease-in-out infinite;
}

@keyframes scroll-line {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6) translateY(-4px); }
    50% { opacity: 1; transform: scaleY(1) translateY(0); }
}

/* ─── Scroll reveal ─── */
.scroll-reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Tagline section ─── */
.tagline-section {
    text-align: center;
    padding: clamp(2.5rem, 5vw, 4rem) 0;
    margin-bottom: 0.5rem;
}

.tagline-eyebrow {
    display: inline-block;
    font-family: var(--rtv-font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rtv-text-muted);
    margin-bottom: 1.2rem;
    padding: 0.28rem 0.85rem;
    border-radius: 999px;
    background: rgba(107, 124, 147, 0.08);
    border: 1px solid rgba(107, 124, 147, 0.14);
}

.tagline-heading {
    font-family: var(--rtv-font-display);
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--rtv-text);
    margin-bottom: 1.2rem;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.tagline-accent {
    background: linear-gradient(135deg, #4f6fff 0%, #a78bfa 55%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline-body {
    font-size: 1.05rem;
    color: var(--rtv-text-muted);
    max-width: 620px;
    margin: 0 auto 1.6rem;
    line-height: 1.7;
}

.tagline-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tagline-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: rgba(79, 111, 255, 0.08);
    border: 1px solid rgba(79, 111, 255, 0.18);
    color: var(--rtv-accent);
    font-family: var(--rtv-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    font-weight: 400;
}

/* ─── Navbar scroll fix for page-home ─── */
@media (max-width: 991px) {
    .page-home .hero-hud-badge { display: none; }
    .page-home .hero-corner { width: 12px; height: 12px; }

    .hero-3d-title {
        font-size: clamp(2.8rem, 12vw, 5rem);
    }
}

@media (max-width: 575px) {
    .hero-3d-actions { flex-direction: column; align-items: stretch; }
    .btn-hero-primary, .btn-hero-ghost { justify-content: center; }
    .hero-scroll-hint { display: none; }
}

/* ─── demo-bar styles (see original definitions above) ─── */
