:root{
  --bg:#07080c; --surface:#12141c; --surface-2:#191c26; --ink:#f4f5f9; --muted:#9298a8;
  --line:rgba(255,255,255,.1); --accent:#2dd9bd; --danger:#ff5a79; --warning:#ffb43c;
  --radius-lg:20px; --radius-md:14px;
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 16px 40px -18px rgba(45,217,189,.35);
}
*{box-sizing:border-box}
body{
  margin:0; min-height:100vh; background:var(--bg); color:var(--ink);
  font-family:Inter,system-ui,-apple-system,sans-serif;
}
h1,h2,h3{ font-family:"Fraunces",Georgia,serif; font-weight:600; margin:0; }
a{ color:inherit }
p{ color:var(--muted); line-height:1.55; margin:0 }
input,select,textarea,button{ font:inherit; color:inherit }
input,select,textarea{
  background:var(--surface-2); border:1px solid var(--line); border-radius:10px;
  padding:10px 12px; width:100%; outline:none;
}
input:focus,select:focus,textarea:focus{ border-color:var(--accent) }
label{ font-size:.85rem; color:var(--muted); display:block; margin-bottom:5px }
.field{ margin-bottom:14px }
button{ cursor:pointer; border:none; border-radius:999px; padding:11px 22px; font-weight:600; }
.btn-primary{ background:var(--accent); color:#06231d; }
.btn-primary:hover{ filter:brightness(1.08) }
.btn-ghost{ background:var(--surface-2); color:var(--ink); border:1px solid var(--line); }
.btn-danger{ background:transparent; color:var(--danger); padding:6px 10px; font-weight:500; font-size:.85rem; }
.error{ color:var(--danger); font-size:.88rem; margin-top:10px; }
.error:empty{ display:none }
.success{ color:var(--accent); font-size:.88rem; margin-top:10px; }
.success:empty{ display:none }
.link-btn{ display:block; width:100%; text-align:center; background:none; border:none; color:var(--muted); font-size:.85rem; margin-top:14px; cursor:pointer; text-decoration:underline; }
.link-btn:hover{ color:var(--ink); }

/* landing */
.landing{
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  padding:40px 16px;
}
.landing-grid{
  display:grid; grid-template-columns:1fr 1fr; gap:48px; max-width:920px; width:100%;
}
.landing-pitch h1{ font-size:clamp(1.9rem,4vw,2.6rem); line-height:1.1; }
.landing-pitch p{ margin-top:16px; font-size:1.02rem; max-width:40ch; }
.landing-pitch ul{ list-style:none; padding:0; margin:24px 0 0; display:flex; flex-direction:column; gap:10px; }
.landing-pitch li{ font-size:.92rem; color:var(--muted); padding-left:22px; position:relative; }
.landing-pitch li::before{ content:"✓"; color:var(--accent); position:absolute; left:0; font-weight:700; }
.auth-card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-lg);
  padding:28px; box-shadow:var(--shadow);
}
.auth-tabs{ display:flex; gap:4px; background:var(--surface-2); border-radius:999px; padding:4px; margin-bottom:22px; }
.auth-tabs button{ flex:1; background:none; border-radius:999px; padding:8px; color:var(--muted); }
.auth-tabs button.active{ background:var(--accent); color:#06231d; }
.account-type-choice{ display:flex; flex-direction:column; gap:8px; }
.account-type-option{
  display:flex; align-items:flex-start; gap:10px; cursor:pointer;
  border:1px solid var(--line); border-radius:12px; padding:10px 12px;
  background:var(--surface-2);
}
.account-type-option:has(input:checked){ border-color:var(--accent); }
.account-type-option input{ width:auto; margin-top:3px; }
.account-type-option strong{ display:block; font-size:.92rem; }
.account-type-option small{ display:block; color:var(--muted); font-size:.8rem; margin-top:2px; line-height:1.4; }

.terms-consent{ display:flex; align-items:flex-start; gap:9px; cursor:pointer; margin:4px 0 16px; }
.terms-consent input{ width:auto; margin-top:3px; flex-shrink:0; }
.terms-consent span{ font-size:.84rem; color:var(--muted); line-height:1.45; }
.terms-consent a{ color:var(--accent); }
@media (max-width:760px){ .landing-grid{ grid-template-columns:1fr; } }

/* pevný header — stejný na všech stránkách */
.site-header{
  position:sticky; top:env(safe-area-inset-top,0px); z-index:40;
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  padding:14px 20px; margin:0 0 24px;
  background:rgba(7,8,12,.78); backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}
.site-header-inner{ max-width:960px; margin:0 auto; width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.brand{ display:flex; align-items:center; gap:12px; font-family:"Fraunces",serif; font-weight:600; font-size:1.2rem; text-decoration:none; color:var(--ink); }
.brand-logo{ height:28px; width:auto; filter:drop-shadow(0 0 10px rgba(59,130,246,.4)); }
.brand-divider{ width:1px; height:22px; background:var(--line); }
.clock{ font-size:.82rem; color:var(--muted); white-space:nowrap; font-variant-numeric:tabular-nums; }

/* app shell */
.app-shell{ max-width:960px; margin:0 auto; padding:0 16px 80px; }
.app-top{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.app-top .who{ display:flex; align-items:center; gap:12px; font-size:.9rem; color:var(--muted); }
.header-left{ display:flex; align-items:center; gap:4px; }

/* hamburger */
.menu-toggle{
  display:flex; flex-direction:column; gap:4px; justify-content:center;
  width:36px; height:36px; background:none; border:none; cursor:pointer; border-radius:8px;
}
.menu-toggle:hover{ background:var(--surface-2); }
.menu-toggle span{ width:18px; height:2px; background:var(--ink); border-radius:2px; }

/* postranní vysouvací menu (navigace + výběr vozidla) */
.drawer-overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:45;
  opacity:0; pointer-events:none; transition:opacity .2s ease;
}
.drawer-overlay.open{ opacity:1; pointer-events:auto; }
.side-drawer{
  position:fixed; top:0; left:0; bottom:0; width:280px; max-width:82vw; z-index:50;
  background:var(--surface); border-right:1px solid var(--line);
  padding:calc(env(safe-area-inset-top,0px) + 18px) 18px 18px;
  overflow-y:auto; transform:translateX(-100%); transition:transform .22s ease;
  display:flex; flex-direction:column; gap:22px;
}
.side-drawer.open{ transform:translateX(0); }
.side-drawer-head{ display:flex; align-items:center; justify-content:space-between; }
.side-drawer-title{ font-family:"Fraunces",serif; font-weight:600; font-size:1.05rem; }
.drawer-close{ background:none; border:none; color:var(--muted); font-size:1.1rem; cursor:pointer; padding:4px; }
.drawer-close:hover{ color:var(--ink); }
.drawer-label{ display:block; font-size:.75rem; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin-bottom:8px; }
.drawer-section .vehicle-bar{ margin-top:12px; }

.view-nav{ display:flex; flex-direction:column; gap:6px; }
.view-nav button, .view-nav a{
  background:none; border:1px solid var(--line); color:var(--muted); text-align:left;
  padding:10px 14px; border-radius:10px; font-size:.92rem; font-weight:500; width:100%;
  text-decoration:none; display:block; box-sizing:border-box; font-family:inherit; cursor:pointer;
}
.view-nav button.active, .view-nav a.active{ background:var(--surface-2); color:var(--ink); border-color:transparent; }
.view-nav a:not(.active):hover{ border-color:var(--accent); color:var(--ink); }
.panel h3{ font-size:.85rem; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin:18px 0 10px; }
.panel h3:first-of-type{ margin-top:4px; }
.plan-badge{
  font-size:.72rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase;
  padding:4px 10px; border-radius:999px; background:var(--surface-2); color:var(--muted);
}
.plan-badge.full{ background:var(--accent); color:#06231d; }

.bell-wrap{ position:relative; }
.bell-btn{
  background:none; border:none; cursor:pointer; position:relative;
  font-size:1.1rem; padding:6px; line-height:1; border-radius:8px;
}
.bell-btn:hover{ background:var(--surface-2); }
.bell-badge{
  position:absolute; top:0; right:0; min-width:16px; height:16px; padding:0 3px;
  border-radius:999px; background:var(--muted); color:#fff;
  font-size:.65rem; font-weight:700; line-height:16px; text-align:center;
}
.bell-badge.expired{ background:var(--danger); }
.bell-panel{
  position:absolute; top:calc(100% + 8px); right:0; z-index:20;
  width:300px; max-width:85vw; max-height:70vh; overflow-y:auto; overscroll-behavior:contain;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-md);
  box-shadow:var(--shadow); padding:14px;
}
/* Na úzkém displeji se absolutní dropdown zavěšený na zvonečku snadno dostane mimo obrazovku
   (podle toho, kam se zvoneček při zalomení headeru zrovna posune) — proto na mobilu
   přepínáme na fixed panel ukotvený k okrajům viewportu, ne k tlačítku samotnému. */
@media (max-width:640px){
  .bell-panel{
    position:fixed; top:calc(env(safe-area-inset-top,0px) + 64px); left:16px; right:16px;
    width:auto; max-width:none; max-height:calc(100vh - env(safe-area-inset-top,0px) - 84px);
  }
}
.bell-panel h3{ font-size:.85rem; margin:0 0 10px; color:var(--ink); }
.bell-item{
  display:flex; justify-content:space-between; gap:8px; align-items:baseline;
  padding:8px 0; border-top:1px solid var(--line); font-size:.85rem;
}
.bell-item:first-of-type{ border-top:none; }
.bell-item .label{ color:var(--ink); }
.bell-item .label small{ display:block; color:var(--muted); font-size:.75rem; }
.bell-item .when{ white-space:nowrap; font-weight:600; }
.bell-item.expired .when{ color:var(--danger); }
.bell-item.expiring .when{ color:var(--warning); }
.tp-lookup{ margin-top:12px; }
.tp-lookup summary{ cursor:pointer; font-size:.86rem; color:var(--accent); font-weight:500; }
.tp-lookup .vin-row{ margin-top:10px; }
.tech-details{ margin:18px 0; }
.tech-details summary{ cursor:pointer; font-size:.88rem; color:var(--muted); font-weight:500; margin-bottom:14px; }
.tech-details[open] summary{ color:var(--ink); }
.tech-details .form-row{ margin-top:14px; }
.vin-row{ display:flex; gap:8px; }
.vin-row input{ flex:1; min-width:19ch; letter-spacing:.04em; }
.vin-row button{ white-space:nowrap; padding:10px 14px; font-size:.85rem; flex:none; }
.hint{ font-size:.8rem; margin-top:6px; }

.vehicle-bar{ display:flex; flex-direction:column; gap:8px; }
.vehicle-bar button{ width:100%; text-align:center; }
.drawer-section select{ width:100%; margin-bottom:4px; }

.panel{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-lg);
  padding:22px; margin-bottom:20px;
}
.panel h2{ font-size:1.1rem; margin-bottom:14px; }
.report-bar{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:16px; }
.report-bar select, .report-bar input{ width:auto; }
.report-bar a{ padding:9px 16px; font-size:.85rem; display:inline-flex; align-items:center; }
.record-list{ display:flex; flex-direction:column; gap:10px; margin-bottom:18px; }
.record{
  display:flex; justify-content:space-between; align-items:flex-start; gap:12px;
  background:var(--surface-2); border-radius:var(--radius-md); padding:12px 14px;
}
.record .main{ font-size:.92rem; }
.record .main strong{ display:block; margin-bottom:2px; }
.record .meta{ color:var(--muted); font-size:.82rem; margin-top:2px; }
.empty-hint{ color:var(--muted); font-size:.88rem; padding:10px 2px; }

.form-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:12px; }
.field-wide{ grid-column:1/-1; }

.preview-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:14px 18px; }
.preview-item .k{ display:block; font-size:.75rem; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin-bottom:2px; }
.preview-item .v{ display:block; font-size:.94rem; color:var(--ink); }
.preview-subtitle{ font-size:1rem; margin:20px 0 4px; border-top:1px solid var(--line); padding-top:16px; }
.form-actions{ margin-top:14px; display:flex; justify-content:flex-end; }

[hidden]{ display:none !important; }
