/* ============================================
   SCANCAR — Professional Design System
   ============================================ */

:root {
    --bg-primary: #0a0f1c;
    --bg-secondary: #111827;
    --bg-card: #1a2236;
    --bg-card-hover: #1f2a40;
    --border: rgba(255,255,255,0.06);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #00d4ff;
    --accent-dark: #0099cc;
    --accent-glow: rgba(0,212,255,0.15);
    --green: #00e68a;
    --green-bg: rgba(0,230,138,0.1);
    --orange: #ff9f43;
    --orange-bg: rgba(255,159,67,0.1);
    --red: #ff6b6b;
    --red-bg: rgba(255,107,107,0.1);
    --gold: #ffd700;
    --purple: #a78bfa;
    --pink: #f472b6;
    --teal: #2dd4bf;
    --cyan: #22d3ee;
    --emerald: #34d399;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --navbar-height: 72px;
}

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

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.hidden { display: none !important; }

.highlight { color: var(--accent); }

/* ============================================
   SPLASH SCREEN
   ============================================ */

.splash {
    position: fixed; inset: 0; z-index: 1000;
    background: var(--bg-primary);
    display: flex; align-items: center; justify-content: center;
    animation: splashFadeOut 0.5s ease 2.5s forwards;
}

.splash-content { text-align: center; }

.splash-logo {
    animation: logoPulse 1.5s ease infinite;
    margin-bottom: 20px;
}

.splash-title {
    font-size: 42px; font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.splash-tagline {
    color: var(--text-secondary);
    font-size: 15px; font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 40px;
}

.splash-loader {
    width: 200px; height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    margin: 0 auto;
    overflow: hidden;
}

.loader-bar {
    width: 0; height: 100%;
    background: linear-gradient(90deg, var(--accent), #00ff88);
    border-radius: 10px;
    animation: loaderFill 2.2s ease forwards;
}

@keyframes loaderFill { to { width: 100%; } }
@keyframes logoPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes splashFadeOut { to { opacity: 0; pointer-events: none; visibility: hidden; } }

/* ============================================
   APP & HEADER
   ============================================ */

.app {
    height: 100%;
    display: flex; flex-direction: column;
    padding-top: var(--safe-top);
}

.header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px;
    background: rgba(10,15,28,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    flex-shrink: 0;
}

.header-left {
    display: flex; align-items: center; gap: 10px;
}

.header-title {
    font-size: 20px; font-weight: 800;
    letter-spacing: -0.5px;
}

.header-right {
    display: flex; gap: 4px;
}

.btn-icon {
    background: none; border: none;
    color: var(--text-secondary);
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:active {
    background: rgba(255,255,255,0.05);
    transform: scale(0.92);
}

/* ============================================
   VIEWS
   ============================================ */

.view {
    display: none;
    flex: 1;
    overflow: hidden;
}

.view.active { display: flex; flex-direction: column; }

/* ============================================
   SCAN VIEW
   ============================================ */

.scan-view {
    position: relative;
}

.camera-container {
    flex: 1;
    position: relative;
    background: #000;
    overflow: hidden;
}

#camera {
    width: 100%; height: 100%;
    object-fit: cover;
}

.scan-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.65) 100%);
}

.scan-frame {
    width: 320px; height: 100px;
    position: relative;
}

.corner {
    position: absolute; width: 24px; height: 24px;
    border-color: var(--accent);
    border-style: solid;
    border-width: 0;
}

.corner.tl { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; border-radius: 6px 0 0 0; }
.corner.tr { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; border-radius: 0 6px 0 0; }
.corner.bl { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; border-radius: 0 0 0 6px; }
.corner.br { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; border-radius: 0 0 6px 0; }

.scan-line {
    position: absolute;
    top: 0; left: 10px; right: 10px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: scanMove 2s ease-in-out infinite;
    box-shadow: 0 0 15px var(--accent);
}

@keyframes scanMove {
    0%, 100% { top: 5px; }
    50% { top: calc(100% - 5px); }
}

.plate-guide {
    position: absolute;
    bottom: -40px; left: 50%;
    transform: translateX(-50%);
    display: flex; align-items: center; gap: 8px;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    white-space: nowrap;
}

.camera-controls {
    position: absolute;
    bottom: 24px; left: 0; right: 0;
    display: flex; align-items: center; justify-content: center;
    gap: 36px;
    padding: 0 24px;
}

.btn-flash, .btn-gallery {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.2s;
}

.btn-flash:active, .btn-gallery:active {
    transform: scale(0.9);
    background: rgba(255,255,255,0.2);
}

.btn-capture {
    background: none; border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-capture:active { transform: scale(0.9); }

.capture-ring {
    width: 72px; height: 72px;
    border: 3px solid white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    padding: 4px;
}

.capture-inner {
    width: 100%; height: 100%;
    background: var(--accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 30px rgba(0,212,255,0.4);
}

/* MANUAL INPUT */

.manual-input {
    padding: 16px 20px;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.input-divider {
    text-align: center;
    margin-bottom: 14px;
}

.input-divider span {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.plate-input-container { }

.plate-input-wrapper {
    display: flex;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.3s;
}

.plate-input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.plate-country {
    display: flex; align-items: center;
    padding: 0 6px 0 12px;
    border-right: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
}

.plate-country select {
    background: none; border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    padding: 4px;
}

.plate-input {
    flex: 1;
    background: none; border: none;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 14px 16px;
    outline: none;
    font-family: 'Inter', monospace;
}

.plate-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 2px;
}

.btn-search {
    display: flex; align-items: center; justify-content: center;
    background: var(--accent);
    border: none;
    color: white;
    width: 52px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-search:active { background: var(--accent-dark); }

.europe-badge {
    padding: 10px 20px 14px;
    text-align: center;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.europe-badge span {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* ============================================
   LOADING VIEW
   ============================================ */

.loading-view {
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}

.loading-content {
    text-align: center;
    padding: 40px 24px;
}

.loading-plate {
    display: inline-block;
    background: white;
    color: #1a1a2e;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 4px;
    padding: 10px 28px;
    border-radius: 8px;
    border: 2px solid #ddd;
    margin-bottom: 40px;
    position: relative;
    font-family: 'Inter', monospace;
}

.loading-plate::before {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 28px;
    background: #003399;
    border-radius: 6px 0 0 6px;
}

.loading-spinner {
    width: 80px; height: 80px;
    margin: 0 auto 24px;
    position: relative;
    display: flex; align-items: center; justify-content: center;
}

.spinner-ring {
    position: absolute; inset: 0;
    border: 3px solid rgba(255,255,255,0.05);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 32px;
    animation: textPulse 1.5s ease infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.loading-steps {
    display: flex; flex-direction: column;
    gap: 16px;
    max-width: 240px;
    margin: 0 auto;
}

.step {
    display: flex; align-items: center; gap: 12px;
    opacity: 0.3;
    transition: all 0.5s;
}

.step.active { opacity: 1; }
.step.done { opacity: 0.6; }

.step-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
    transition: all 0.5s;
}

.step.active .step-dot {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.step.done .step-dot {
    background: var(--green);
}

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

/* ============================================
   RESULT VIEW
   ============================================ */

.result-view {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(var(--navbar-height) + var(--safe-bottom) + 16px);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    position: sticky; top: 0;
    background: rgba(10,15,28,0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 50;
    border-bottom: 1px solid var(--border);
}

.btn-back {
    display: flex; align-items: center; gap: 4px;
    background: none; border: none;
    color: var(--accent);
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
}

.btn-share {
    background: rgba(255,255,255,0.05);
    border: none;
    color: var(--text-secondary);
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}

/* VEHICLE HERO */

.vehicle-hero {
    padding: 24px 20px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    text-align: center;
}

.vehicle-image-container {
    margin-bottom: 16px;
}

.vehicle-image {
    width: 180px; height: 90px;
    margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.02);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.vehicle-main-info { margin-bottom: 20px; }

.vehicle-plate-badge {
    display: inline-block;
    background: white;
    color: #0a0f1c;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 3px;
    padding: 6px 20px;
    border-radius: 6px;
    margin-bottom: 12px;
    position: relative;
    padding-left: 36px;
    font-family: 'Inter', monospace;
}

.vehicle-plate-badge::before {
    content: 'F';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 24px;
    background: #003399;
    color: white;
    font-size: 10px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px 0 0 6px;
}

.vehicle-name {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.vehicle-variant {
    color: var(--text-secondary);
    font-size: 14px;
}

/* SCORE */

.score-container { margin-top: 8px; }

.score-circle {
    width: 120px; height: 120px;
    margin: 0 auto 8px;
    position: relative;
}

.score-circle svg { width: 100%; height: 100%; }

.score-value {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    flex-direction: row;
    gap: 2px;
}

.score-number {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.score-max {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 10px;
}

.score-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--green);
}

/* ============================================
   SECTIONS
   ============================================ */

.result-sections {
    padding: 8px 16px;
    display: flex; flex-direction: column;
    gap: 10px;
}

.section {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.section-header:active { background: var(--bg-card-hover); }

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

.section-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.section-icon.blue { background: rgba(0,212,255,0.12); color: var(--accent); }
.section-icon.purple { background: rgba(167,139,250,0.12); color: var(--purple); }
.section-icon.orange { background: var(--orange-bg); color: var(--orange); }
.section-icon.green { background: var(--green-bg); color: var(--green); }
.section-icon.teal { background: rgba(45,212,191,0.12); color: var(--teal); }
.section-icon.gold { background: rgba(255,215,0,0.12); color: var(--gold); }
.section-icon.red { background: var(--red-bg); color: var(--red); }
.section-icon.cyan { background: rgba(34,211,238,0.12); color: var(--cyan); }
.section-icon.pink { background: rgba(244,114,182,0.12); color: var(--pink); }
.section-icon.emerald { background: rgba(52,211,153,0.12); color: var(--emerald); }

.section-header h3 {
    font-size: 15px;
    font-weight: 600;
}

.chevron {
    color: var(--text-muted);
    transition: transform 0.3s;
    flex-shrink: 0;
}

.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 16px;
}

.section-content.open {
    max-height: 2000px;
    padding: 0 16px 16px;
}

/* INFO GRID */

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius-xs);
    overflow: hidden;
    margin-bottom: 12px;
}

.info-item {
    display: flex; flex-direction: column;
    gap: 3px;
    padding: 12px;
    background: var(--bg-card);
}

.info-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.info-value.green { color: var(--green); }
.info-value.mono { font-family: monospace; font-size: 12px; }
.info-value.bold { font-weight: 800; color: var(--accent); }
.orange-text { color: var(--orange) !important; }
.red-text { color: var(--red) !important; }

/* STATUS CARDS */

.status-cards {
    display: flex; flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.status-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid;
}

.status-card.good {
    background: rgba(0,230,138,0.05);
    border-color: rgba(0,230,138,0.15);
}

.status-card.bad {
    background: rgba(255,107,107,0.05);
    border-color: rgba(255,107,107,0.15);
}

.status-icon {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.status-card.good .status-icon { background: var(--green-bg); color: var(--green); }
.status-card.bad .status-icon { background: var(--red-bg); color: var(--red); }

.status-info { display: flex; flex-direction: column; }
.status-title { font-size: 14px; font-weight: 600; }
.status-desc { font-size: 12px; color: var(--text-muted); }

/* CT STATUS */

.ct-status {
    display: flex; align-items: center; gap: 12px;
    padding: 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.ct-status.favorable { background: var(--green-bg); }
.ct-status.defavorable { background: var(--red-bg); }

.ct-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.favorable .ct-badge { background: var(--green); color: #0a0f1c; }
.defavorable .ct-badge { background: var(--red); color: white; }

.ct-date { font-size: 13px; color: var(--text-secondary); }

/* Histovec integration */
.histovec-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}
.histovec-step-num {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--green);
    color: #0a0f1c;
    font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.histovec-step-text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.histovec-step-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.histovec-step-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.histovec-btn-sm {
    padding: 6px 12px;
    background: var(--green);
    color: #0a0f1c;
    border-radius: 20px;
    font-size: 12px; font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
}
.histovec-btn-sm:hover { opacity: 0.85; }
.histovec-paste-area {
    display: flex; gap: 8px;
    margin-bottom: 6px;
}
.histovec-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    min-width: 0;
}
.histovec-input:focus { border-color: var(--green); }
.histovec-input::placeholder { color: var(--text-secondary); font-size: 12px; }
.histovec-open-btn {
    padding: 10px 16px;
    background: var(--green);
    color: #0a0f1c;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
.histovec-open-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.histovec-open-btn:not(:disabled):hover { opacity: 0.85; }
.histovec-error { font-size: 12px; color: var(--red); margin-bottom: 8px; }
.histovec-error.hidden { display: none; }

/* CRIT'AIR */

.critair-badge {
    display: inline-flex;
    align-items: center; gap: 8px;
    padding: 10px 20px;
    border-radius: 30px;
    margin-bottom: 16px;
    font-weight: 700;
}

.critair-number { font-size: 24px; }
.critair-label { font-size: 13px; color: var(--text-secondary); }

.critair-1 { background: rgba(167,139,250,0.15); color: var(--purple); }
.critair-2 { background: rgba(255,215,0,0.15); color: var(--gold); }
.critair-3 { background: var(--orange-bg); color: var(--orange); }

/* PRICE DISPLAY */

.price-display {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(0,255,136,0.08));
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0,212,255,0.15);
    margin-bottom: 16px;
}

.price-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.price-range {
    display: block;
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

.price-source {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

/* RATING BARS */

.rating-bars {
    display: flex; flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.rating-item {
    display: flex; align-items: center; gap: 10px;
}

.rating-label {
    width: 120px;
    font-size: 13px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.rating-bar {
    flex: 1; height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    overflow: hidden;
}

.rating-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--green));
    border-radius: 10px;
    transition: width 1s ease;
}

.rating-score {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    width: 36px;
    text-align: right;
}

/* PROS & CONS */

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.pros, .cons {
    padding: 14px;
    border-radius: var(--radius-sm);
}

.pros { background: var(--green-bg); }
.cons { background: var(--orange-bg); }

.pros h4, .cons h4 {
    font-size: 13px;
    margin-bottom: 10px;
}

.pros ul, .cons ul {
    list-style: none;
    display: flex; flex-direction: column;
    gap: 6px;
}

.pros li, .cons li {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* TIMELINE */

.timeline {
    display: flex; flex-direction: column;
    gap: 0;
    margin-bottom: 16px;
    padding-left: 4px;
}

.timeline-item {
    display: flex; align-items: flex-start; gap: 16px;
    padding: 14px 0;
    border-left: 2px solid rgba(255,255,255,0.08);
    padding-left: 20px;
    position: relative;
}

.timeline-item.soon { border-left-color: var(--orange); }

.timeline-dot {
    position: absolute; left: -6px; top: 18px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}

.timeline-item.soon .timeline-dot {
    background: var(--orange);
    box-shadow: 0 0 8px var(--orange);
}

.timeline-content {
    display: flex; flex-direction: column; gap: 2px;
}

.timeline-km { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.timeline-action { font-size: 13px; color: var(--text-secondary); }
.timeline-cost { font-size: 13px; font-weight: 600; color: var(--orange); }

/* COMPARISON */

.comparison-card {
    display: flex; align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.comparison-item {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius-sm);
    text-align: center;
    display: flex; flex-direction: column; gap: 4px;
}

.comparison-item.current { background: rgba(255,255,255,0.04); }
.comparison-item.electric { background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.2); }

.comparison-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.comparison-name { font-size: 14px; font-weight: 600; }
.comparison-cost { font-size: 13px; color: var(--text-secondary); }
.comparison-vs { font-size: 12px; color: var(--text-muted); font-weight: 700; }

.savings-highlight {
    text-align: center;
    padding: 12px;
    background: rgba(52,211,153,0.1);
    border-radius: var(--radius-sm);
}

.savings-amount {
    font-size: 16px;
    font-weight: 700;
    color: var(--emerald);
}

/* ALERT CARDS */

.alert-card {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.alert-card.warning { background: var(--orange-bg); }
.alert-card.warning svg { color: var(--orange); flex-shrink: 0; }
.alert-card.info { background: rgba(0,212,255,0.08); }
.alert-card.info svg { color: var(--accent); flex-shrink: 0; }

/* AFFILIATE CARDS */

.affiliate-card {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(0,212,255,0.06), rgba(0,255,136,0.06));
    border: 1px solid rgba(0,212,255,0.12);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
}

.affiliate-card:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, rgba(0,212,255,0.1), rgba(0,255,136,0.1));
}

.affiliate-icon { font-size: 24px; }
.affiliate-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.affiliate-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.affiliate-desc { font-size: 12px; color: var(--text-muted); }
.affiliate-arrow { color: var(--accent); font-size: 20px; font-weight: 300; }

/* PAYWALL MODAL */

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

#scancar-purchase-modal {
    animation: slideUp 0.3s ease;
}

#scancar-purchase-modal [data-plan] {
    transition: all 0.3s ease;
}

#scancar-purchase-modal [data-plan]:hover {
    transform: translateY(-2px);
    border-color: rgba(0,212,255,0.6) !important;
}

#scancar-purchase-modal [data-plan]:active {
    transform: translateY(-1px);
}

/* FOOTER ACTIONS */

.result-footer {
    padding: 16px 20px;
    display: flex; gap: 10px;
}

.btn-primary {
    flex: 1;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--accent);
    color: white;
    border: none;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary:active { transform: scale(0.97); background: var(--accent-dark); }

.btn-secondary {
    flex: 1;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-secondary:active { transform: scale(0.97); background: rgba(255,255,255,0.08); }

/* AD BANNER */

.ad-banner {
    margin: 8px 16px 16px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
}

.ad-label {
    display: block;
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.ad-content {
    font-size: 14px;
    color: var(--accent);
    font-weight: 500;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--navbar-height);
    padding-bottom: var(--safe-bottom);
    background: rgba(10,15,28,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    z-index: 200;
}

.nav-item {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 4px;
    background: none; border: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    font-family: inherit;
}

.nav-item.active { color: var(--accent); }
.nav-item:active { transform: scale(0.9); }

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section {
    animation: fadeInUp 0.5s ease backwards;
}

.section:nth-child(1) { animation-delay: 0.05s; }
.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.15s; }
.section:nth-child(4) { animation-delay: 0.2s; }
.section:nth-child(5) { animation-delay: 0.25s; }
.section:nth-child(6) { animation-delay: 0.3s; }
.section:nth-child(7) { animation-delay: 0.35s; }
.section:nth-child(8) { animation-delay: 0.4s; }
.section:nth-child(9) { animation-delay: 0.45s; }

/* ============================================
   PAGE VIEWS (History, Alerts, Profile)
   ============================================ */

.history-view,
.alerts-view,
.profile-view {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(var(--navbar-height) + var(--safe-bottom) + 16px);
}

.page-header {
    padding: 24px 20px 16px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.page-header h2 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.page-content {
    padding: 0 16px;
}

/* EMPTY STATE */

.empty-state {
    text-align: center;
    padding: 60px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 14px;
}

/* HISTORY ITEMS */

.history-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:active {
    transform: scale(0.98);
    background: var(--bg-card-hover);
}

.history-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.history-item-icon.car-bg { background: rgba(0,212,255,0.1); }
.history-item-icon.moto-bg { background: rgba(167,139,250,0.1); }
.history-item-icon.van-bg { background: rgba(255,159,67,0.1); }

.history-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.history-item-name {
    font-size: 15px;
    font-weight: 600;
}

.history-item-plate {
    font-size: 12px;
    color: var(--text-muted);
    font-family: monospace;
    letter-spacing: 1px;
}

.history-item-date {
    font-size: 11px;
    color: var(--text-muted);
}

.history-item-score {
    font-size: 18px;
    font-weight: 800;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.history-clear {
    text-align: center;
    margin-top: 16px;
}

.btn-clear {
    background: none;
    border: 1px solid rgba(255,107,107,0.3);
    color: var(--red);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-clear:active {
    background: rgba(255,107,107,0.1);
    transform: scale(0.97);
}

/* ALERT ITEMS */

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.alert-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.alert-item-icon.green-bg { background: var(--green-bg); }
.alert-item-icon.orange-bg { background: var(--orange-bg); }
.alert-item-icon.red-bg { background: var(--red-bg); }

.alert-item-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.alert-item-title {
    font-size: 14px;
    font-weight: 600;
}

.alert-item-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.alert-item-time {
    font-size: 11px;
    color: var(--text-muted);
}

/* PROFILE */

.profile-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(0,255,136,0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-name {
    font-size: 18px;
    font-weight: 700;
}

.profile-plan {
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
}

.settings-group {
    margin-bottom: 20px;
}

.settings-title {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 4px;
    margin-bottom: 10px;
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 4px;
}

.stat-item {
    text-align: center;
    padding: 20px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-number {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.settings-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.setting-item:last-child { border-bottom: none; }

.setting-value {
    color: var(--text-muted);
    font-size: 13px;
}

.toggle {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle.active {
    background: var(--accent);
}

.toggle::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

.toggle.active::after {
    transform: translateX(20px);
}

.setting-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.setting-link:active {
    background: var(--bg-card-hover);
}

.app-footer-info {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-copy {
    margin-top: 8px;
    opacity: 0.5;
}

/* ============================================
   INLINE AD BANNERS
   ============================================ */

.ad-banner-inline {
    margin: 6px 0;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    position: relative;
}

.ad-banner-inline .ad-label {
    position: absolute;
    top: 8px; right: 12px;
    margin-bottom: 0;
}

.ad-content-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ad-sponsor {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

.ad-content-inline span {
    flex: 1;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.ad-cta {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius-xs);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: all 0.2s;
}

.ad-cta:active {
    transform: scale(0.95);
    background: var(--accent-dark);
}

/* ============================================
   INTERSTITIAL AD
   ============================================ */

.interstitial {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.interstitial-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px 24px;
    max-width: 340px;
    width: 100%;
    position: relative;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.interstitial-badge {
    position: absolute;
    top: 12px; left: 16px;
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.interstitial-close {
    position: absolute;
    top: 10px; right: 12px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--text-secondary);
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.interstitial-close:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

.interstitial-body {
    padding-top: 12px;
}

.interstitial-sponsor {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
}

.interstitial-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.interstitial-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
}

.interstitial-cta {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, var(--accent), #0099ff);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.interstitial-cta:active {
    transform: scale(0.97);
}

.interstitial-timer {
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   PARTNERS SECTION
   ============================================ */

.partners-section {
    padding: 20px 16px;
    text-align: center;
}

.partners-label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 14px;
}

.partners-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.partner-tag {
    padding: 6px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   RAPPORT COMPLET — LOCKED STATE
   ============================================ */

.locked-header { cursor: pointer; }
.locked-header .premium-badge {
    font-size: 10px; font-weight: 700; color: #fbbf24;
    background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.3);
    padding: 2px 8px; border-radius: 20px; margin-left: 8px;
}
.section-icon.gold { background: rgba(251,191,36,0.12); color: #fbbf24; }
.lock-icon { color: #fbbf24 !important; }

.report-locked-preview { text-align: center; padding: 8px 0; }
.locked-items { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; text-align: left; }
.locked-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--text-secondary);
    padding: 8px 12px; background: var(--bg-secondary);
    border-radius: 8px; border: 1px solid var(--border);
}
.locked-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    flex-shrink: 0;
}

.unlock-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 16px 24px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000; font-weight: 700; font-size: 15px;
    border: none; border-radius: 12px; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(251,191,36,0.3);
}
.unlock-btn:active { transform: scale(0.97); }
.unlock-btn svg { fill: #000; stroke: none; }

.unlock-hint { font-size: 12px; color: var(--text-muted); margin-top: 10px; }

.subsection-title {
    font-size: 14px; font-weight: 600; color: var(--text-primary);
    margin: 20px 0 12px; padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ============================================
   REWARDED VIDEO AD OVERLAY
   ============================================ */

.rewarded-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,0.95);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.rewarded-overlay.hidden { display: none; }

.rewarded-content {
    width: 100%; max-width: 400px;
    background: #111; border-radius: 16px;
    overflow: hidden;
}
.rewarded-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; background: #1a1a1a;
}
.rewarded-badge {
    font-size: 11px; font-weight: 600; color: #fbbf24;
    background: rgba(251,191,36,0.15); padding: 3px 10px;
    border-radius: 20px;
}
.rewarded-timer {
    font-size: 14px; font-weight: 700; color: #fff;
    background: #e11d48; padding: 4px 12px; border-radius: 20px;
}

.rewarded-video-area { position: relative; padding: 40px 20px; text-align: center; }
.rewarded-fake-video {
    position: relative; display: flex; flex-direction: column;
    align-items: center; gap: 20px;
}
.rewarded-play-icon {
    width: 80px; height: 80px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    animation: pulse-play 2s infinite;
}
@keyframes pulse-play {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}
.rewarded-progress-bar {
    width: 100%; height: 6px; background: #333;
    border-radius: 3px; overflow: hidden;
}
.rewarded-progress-fill {
    height: 100%; width: 0%; background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 3px; transition: width 1s linear;
}
.rewarded-sponsor-overlay { margin-top: 20px; }
.rewarded-sponsor-logo { height: 30px; margin-bottom: 10px; filter: brightness(0) invert(1); }
.rewarded-sponsor-text { font-size: 16px; font-weight: 600; color: #fff; margin: 0; }
.rewarded-sponsor-sub { font-size: 13px; color: #94a3b8; margin: 4px 0 0; }

.rewarded-footer { padding: 16px; text-align: center; background: #1a1a1a; }
.rewarded-info { font-size: 12px; color: #94a3b8; margin: 0 0 8px; }
.rewarded-skip {
    background: linear-gradient(135deg, #00d4ff, #0099ff);
    color: #fff; font-weight: 700; font-size: 14px;
    border: none; padding: 12px 24px; border-radius: 10px;
    cursor: pointer; width: 100%;
}
.rewarded-skip.hidden { display: none; }

/* Report unlocked state */
#fullReportSection.unlocked .locked-header .lock-icon { display: none; }
#fullReportSection.unlocked .premium-badge { background: rgba(0,230,138,0.12); color: #00e68a; border-color: rgba(0,230,138,0.3); }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (min-width: 768px) {
    .app { max-width: 430px; margin: 0 auto; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
    .navbar { max-width: 430px; left: 50%; transform: translateX(-50%); }
    .result-header { max-width: 430px; }
    .info-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 360px) {
    .scan-frame { width: 280px; height: 85px; }
    .plate-input { font-size: 17px; letter-spacing: 2px; }
    .vehicle-name { font-size: 22px; }
    .price-range { font-size: 24px; }
    .pros-cons { grid-template-columns: 1fr; }
}

/* ===== CARVERTICAL RAPPORT ===== */
.cv-report { padding: 4px 0; }
.cv-header {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: var(--green);
    margin-bottom: 14px;
}
.cv-vin { margin-left: auto; font-size: 11px; color: var(--text-secondary); font-family: monospace; }

.cv-status-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 8px; margin-bottom: 16px;
}
.cv-status-item {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500;
}
.cv-status-ok   { background: rgba(0,230,138,0.08); border: 1px solid rgba(0,230,138,0.2); }
.cv-status-warn { background: rgba(255,107,107,0.08); border: 1px solid rgba(255,107,107,0.2); }
.cv-status-label { color: var(--text-primary); }

.cv-badge {
    padding: 3px 8px; border-radius: 20px;
    font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.cv-ok   { background: var(--green); color: #0a0f1c; }
.cv-warn { background: var(--red);   color: white; }
.cv-ok-text   { color: var(--green); }
.cv-warn-text { color: var(--red); }

.cv-section { margin-bottom: 16px; }
.cv-section-title {
    font-size: 13px; font-weight: 600; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin: 0 0 8px;
}
.cv-km-last {
    font-size: 22px; font-weight: 700; color: var(--text-primary);
    margin-bottom: 8px;
}
.cv-km-date { font-size: 13px; font-weight: 400; color: var(--text-secondary); margin-left: 8px; }

.cv-table {
    width: 100%; border-collapse: collapse;
    font-size: 12px; color: var(--text-secondary);
}
.cv-table th {
    text-align: left; padding: 4px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary); font-weight: 600;
}
.cv-table td { padding: 5px 6px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.cv-source { font-style: italic; }

.cv-ct-last {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    font-size: 13px; margin-bottom: 8px;
}
.cv-defects { font-size: 12px; color: var(--text-secondary); }

.cv-list { list-style: none; padding: 0; margin: 0; }
.cv-list-item { padding: 6px 0; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.05); }

.cv-owners-count { font-size: 14px; color: var(--text-primary); margin: 0; }

.cv-powered { font-size: 11px; color: var(--text-secondary); text-align: right; margin-top: 12px; margin-bottom: 0; }

/* Loading */
.cv-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; }
.cv-spinner {
    width: 28px; height: 28px;
    border: 3px solid rgba(0,230,138,0.2);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: cv-spin 0.8s linear infinite;
}
@keyframes cv-spin { to { transform: rotate(360deg); } }
.cv-loading p { font-size: 13px; color: var(--text-secondary); margin: 0; }

/* Pending / Error */
.cv-pending { text-align: center; padding: 20px 16px; }
.cv-pending-icon { font-size: 32px; margin-bottom: 8px; }
.cv-pending-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 0 0 6px; }
.cv-pending-desc { font-size: 13px; color: var(--text-secondary); margin: 0; }
.cv-error { padding: 12px; background: rgba(255,107,107,0.08); border-radius: var(--radius-sm); font-size: 13px; color: var(--red); }

/* ============================================
   MENU OVERLAY (bouton ⋮)
   ============================================ */

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1100;
    display: flex;
    align-items: flex-end;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.menu-overlay.hidden { display: none; }

.menu-sheet {
    background: #1a2236;
    border-radius: 20px 20px 0 0;
    width: 100%;
    padding: 10px 0 calc(env(safe-area-inset-bottom, 0px) + 24px);
    animation: menuSlideUp 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-top: 1px solid rgba(255,255,255,0.07);
}

@keyframes menuSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.menu-handle {
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,0.18);
    border-radius: 2px;
    margin: 6px auto 14px;
}

.menu-nav {
    display: flex;
    flex-direction: column;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 24px;
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: background 0.12s;
    text-align: left;
}
.menu-item:hover,
.menu-item:active { background: rgba(255,255,255,0.06); }
.menu-item svg { flex-shrink: 0; opacity: 0.7; }

.menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 6px 0;
}
