:root {
    --ink: #0b0e13;
    --ink-2: #141922;
    --ink-3: #1f2633;
    --paper: #f6f5f1;
    --card: #ffffff;
    --line: #e4e2db;
    --text: #151821;
    --muted: #6b7080;
    --accent: #c8f04a;
    --accent-ink: #1a2300;
    --accent-soft: #f1fbd2;
    --danger: #d43c3c;
    --wheel: #ffffff;
    --r: 16px;
    --shadow: 0 1px 2px rgba(11, 14, 19, .04), 0 8px 24px -12px rgba(11, 14, 19, .18);
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --display: 'Sora', 'Inter', system-ui, sans-serif;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; }
h1, h2 { font-family: var(--display); letter-spacing: -.02em; margin: 0; }
small { font-size: .8em; color: var(--muted); font-weight: 400; }
[hidden] { display: none !important; }

/* ───────── layout ───────── */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: 100vh; }

/* ───────── hero ───────── */
.hero {
    position: sticky; top: 0; height: 100vh; height: 100dvh; align-self: start; overflow: hidden; color: #e9ecf2;
    background:
        radial-gradient(900px 500px at 110% -10%, rgba(200, 240, 74, .18), transparent 60%),
        radial-gradient(700px 600px at -20% 110%, rgba(84, 120, 255, .16), transparent 60%),
        var(--ink);
}
.hero::after { /* jemná "cesta" */
    content: ''; position: absolute; inset: auto -10% -40px -10%; height: 220px;
    background: repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 60px, transparent 60px 120px);
    transform: perspective(300px) rotateX(70deg); transform-origin: bottom; pointer-events: none;
    mask-image: linear-gradient(to top, #000, transparent);
}
.hero-inner { position: relative; z-index: 1; height: 100%; overflow-y: auto; padding: 40px clamp(24px, 4vw, 56px); display: flex; flex-direction: column; gap: 28px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 600 15px var(--display); }
.brand .dim { color: #8a93a6; font-weight: 500; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; }

.hero h1 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; color: #fff; margin-top: auto; }
.hero h1 em { font-style: normal; color: var(--accent); }
.intro { color: #aab2c3; max-width: 46ch; margin: -8px 0 0; font-size: 16px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 14px; align-items: baseline; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
.steps b { font: 700 12px var(--display); color: var(--accent); }
.steps small { display: block; color: #7d869a; }

.recent-title { margin: 0 0 12px; font: 600 15px/1.4 var(--display); letter-spacing: 0; color: #fff; }
.recent-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.recent-list li { --wheel: var(--ink-2); display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.recent-list .car-svg { width: 40px; height: 18px; margin: 0; color: var(--accent); grid-row: span 2; }
.recent-name { font-size: 14px; font-weight: 500; line-height: 1.3; color: #fff; }
.recent-year { font: 600 13px var(--display); color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0; background: rgba(255,255,255,.08); border-radius: 12px; overflow: hidden; }
.stats div { background: var(--ink-2); padding: 12px 14px; }
.stats dt { font-size: 11px; color: #7d869a; text-transform: uppercase; letter-spacing: .08em; }
.stats dd { margin: 2px 0 0; font: 600 15px var(--display); color: #fff; }

/* ───────── panel / form ───────── */
.panel { padding: 40px clamp(16px, 4vw, 64px) 24px; }
.lead-form, .thanks { max-width: 760px; margin: 0 auto; }

.form-head { margin-bottom: 20px; }
.eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.form-head h2 { font-size: clamp(24px, 2.4vw, 32px); }
.progress { margin-top: 16px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #9fd21a, var(--accent)); transition: width .4s cubic-bezier(.2,.8,.2,1); }

.block { border: 1px solid var(--line); background: var(--card); border-radius: var(--r); padding: 20px; margin: 0 0 16px; box-shadow: var(--shadow); min-width: 0; }
.block legend { float: left; width: 100%; display: flex; align-items: center; gap: 10px; font: 600 17px var(--display); margin-bottom: 16px; padding: 0; }
.block legend + * { clear: both; }
.num { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; background: var(--ink); color: var(--accent); }

/* model cards */
.models { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.model { position: relative; cursor: pointer; }
.model input { position: absolute; opacity: 0; pointer-events: none; }
.model-card {
    position: relative; display: flex; flex-direction: column; gap: 2px; height: 100%;
    padding: 12px; border-radius: 12px; border: 1.5px solid var(--line); background: #fbfaf7;
    transition: border-color .15s, transform .15s, background .15s, box-shadow .15s;
}
.model:hover .model-card { border-color: #c9c6bc; transform: translateY(-1px); }
.car-svg { width: 100%; height: 42px; color: #2a303d; margin-bottom: 6px; transition: color .2s, transform .3s; }
.model-brand { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.model-name { font: 600 14px/1.25 var(--display); }
.model-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: auto; padding-top: 6px; font-size: 12px; }
.tag { color: var(--muted); }
.from { font-weight: 600; }
.tick { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; transition: .15s; }
.model input:checked + .model-card { border-color: var(--ink); background: var(--card); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.model input:checked + .model-card .car-svg { color: var(--ink); transform: translateX(3px); }
.model input:checked + .model-card .tick { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%231a2300' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; border-color: var(--accent); }
.model input:focus-visible + .model-card { outline: 2px solid var(--ink); outline-offset: 2px; }

/* fields */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field { margin-top: 12px; }
.field label, .budget-top label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
input:not([type]), input[type=text], input[type=tel], input[type=email], select, textarea {
    width: 100%; font: inherit; color: inherit; padding: 11px 13px; border-radius: 10px;
    border: 1.5px solid var(--line); background: #fbfaf7; transition: border-color .15s, box-shadow .15s, background .15s;
}
select { appearance: none; background: #fbfaf7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%236b7080' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") right 10px center/18px no-repeat; padding-right: 36px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 84px; }

.sublabel { margin: 18px 0 8px; font-size: 13px; font-weight: 500; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 8px 14px; border-radius: 99px; border: 1.5px solid var(--line); background: #fbfaf7; font-size: 14px; cursor: pointer; transition: .15s; user-select: none; }
.chip span:hover { border-color: #c9c6bc; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

/* budget */
.budget { padding: 16px; border-radius: 12px; background: var(--ink); color: #fff; }
.budget-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.budget-top label { color: #aab2c3; margin: 0; }
.budget output { font: 700 clamp(26px, 3vw, 34px) var(--display); color: var(--accent); letter-spacing: -.02em; }
input[type=range] { --p: 20%; width: 100%; margin: 14px 0 6px; height: 28px; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent) var(--p), var(--ink-3) var(--p)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent) var(--p), var(--ink-3) var(--p)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #fff; border: 5px solid var(--accent); box-shadow: 0 2px 10px rgba(0,0,0,.4); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 5px solid var(--accent); }
input[type=range]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.budget-scale { display: flex; justify-content: space-between; font-size: 12px; color: #7d869a; }
.budget-hint { margin: 8px 0 0; font-size: 13px; color: #ffd27a; min-height: 0; }
.budget-hint:empty { display: none; }
.budget-note { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--ink-3); font-size: 13px; line-height: 1.5; color: #aab2c3; }
.budget-note b { color: #fff; font-weight: 600; }

/* switch + consent */
.switch { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; cursor: pointer; font-size: 14px; }
.switch input { position: absolute; opacity: 0; }
.switch-ui { width: 40px; height: 24px; border-radius: 99px; background: var(--line); position: relative; transition: .2s; flex: none; }
.switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: .2s; }
.switch input:checked + .switch-ui { background: var(--ink); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); background: var(--accent); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--ink); outline-offset: 2px; }

.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 13px; color: var(--muted); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }

/* submit */
.submit-row { position: sticky; bottom: 0; padding: 16px 0 8px; background: linear-gradient(to top, var(--paper) 70%, transparent); }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
    padding: 17px 24px; border: 0; border-radius: 14px; cursor: pointer; text-decoration: none;
    font: 600 16px var(--display); color: var(--accent-ink); background: var(--accent);
    box-shadow: 0 10px 30px -10px rgba(150, 200, 20, .8); transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn svg { width: 20px; height: 20px; transition: transform .2s; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn:hover svg { transform: translateX(4px); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn:disabled { opacity: .7; cursor: progress; }
.btn.loading svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-ghost { background: var(--ink); color: #fff; box-shadow: none; width: auto; }
.btn-small { width: auto; padding: 10px 16px; font-size: 14px; box-shadow: none; }
.fine { text-align: center; font-size: 12px; color: var(--muted); margin: 10px 0 0; }

.err { color: var(--danger); font-size: 13px; margin: 6px 0 0; font-weight: 500; }
.err:empty { display: none; }
.form-err { text-align: center; }

.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* thanks */
.thanks { text-align: center; padding: 12vh 0; outline: none; animation: rise .5s cubic-bezier(.2,.8,.2,1); }
.thanks h2 { font-size: 32px; margin: 20px 0 10px; }
.thanks p { color: var(--muted); max-width: 44ch; margin: 0 auto 28px; font-size: 16px; }
.thanks-badge { width: 72px; height: 72px; margin: 0 auto; border-radius: 22px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 16px 40px -14px rgba(150, 200, 20, .9); }
.thanks-badge svg { width: 36px; height: 36px; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 0 0; }

/* ───────── responsive ───────── */
@media (max-width: 1180px) { .models { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
    .split { grid-template-columns: 1fr; }
    .hero { position: relative; height: auto; }
    .hero-inner { height: auto; padding: 24px 16px 32px; gap: 20px; }
    .hero h1 { margin-top: 12px; }
    .steps, .stats { display: none; }
    .panel { padding: 24px 16px; }
}
@media (max-width: 560px) {
    .recent-list li { grid-template-columns: 30px 1fr; grid-template-rows: auto auto; column-gap: 8px; row-gap: 0; padding: 7px 10px; }
    .recent-list .car-svg { width: 30px; height: 14px; grid-row: span 2; }
    .recent-name { font-size: 13px; }
    .recent-year { font-size: 12px; }
    .grid-2 { grid-template-columns: 1fr; }
    .block { padding: 16px; }
    .models { gap: 8px; }
    .model-card { padding: 10px; }
    .car-svg { height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ───────── admin ───────── */
.admin .admin-wrap { max-width: 1100px; margin: 0 auto; padding: 32px 16px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.admin-head h1 { font-size: 26px; }
.admin-head p { margin: 2px 0 0; color: var(--muted); }
.pills { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 4px; }
.pills a { white-space: nowrap; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--text); text-decoration: none; font-size: 14px; }
.pills a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.lead { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.lead.st-novy { border-left-color: var(--accent); }
.lead.st-kontaktovany { border-left-color: #6aa5ff; }
.lead.st-ponuka { border-left-color: #ffb547; }
.lead.st-uzavrety { border-left-color: #2fb36d; }
.lead.st-zruseny { opacity: .55; }
.lead-main { min-width: 0; }
.lead-top { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.lead-contact { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 8px; font-size: 14px; }
.lead-contact a { color: var(--text); font-weight: 500; }
.lead-car { display: flex; flex-wrap: wrap; gap: 6px; }
.lead-car .tag { background: var(--accent-soft); color: var(--accent-ink); padding: 2px 10px; border-radius: 99px; font-size: 13px; }
.lead-spec { margin: 8px 0 0; font-size: 14px; color: #3b4150; }
.lead-note { margin: 8px 0 0; padding: 8px 12px; background: var(--paper); border-radius: 8px; font-size: 14px; white-space: pre-line; }
.lead-status select { width: auto; padding: 8px 34px 8px 10px; font-size: 14px; }
.muted { color: var(--muted); font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }
@media (max-width: 640px) { .lead { flex-direction: column; } }
