/* Hornberger Cockpit — Skoda CI inspired */

:root {
  /* Skoda brand */
  --green: #4BA82E;
  --green-dark: #0E3A2F;
  --copper: #C87B3F;
  /* Surfaces */
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --border: #E5E7EB;
  /* Text */
  --text: #111827;
  --text-soft: #374151;
  --text-muted: #6B7280;
  /* Status colors */
  --status-verfuegbar: var(--green);
  --status-reserviert: var(--copper);
  --status-aufbereitung: #6366F1;
  --status-im_einkauf: #6B7280;
  --status-bereit: #0EA5E9;
  --status-verkauft: var(--green-dark);
  --status-ausgeliefert: var(--green-dark);
  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--text); margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.strong { font-weight: 600; }

/* TOP BAR */
.topbar {
  background: var(--green-dark);
  color: #fff;
  border-bottom: 3px solid var(--green);
  box-shadow: var(--shadow-sm);
}
.topbar-inner {
  max-width: 1400px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 32px;
}
.brand {
  display: flex; align-items: center; gap: 14px;
  color: #fff; text-decoration: none;
}
.brand-skoda {
  height: 22px; width: auto; display: block;
  color: #fff;
}
.brand-divider {
  width: 1px; height: 28px;
  background: rgba(255,255,255,0.18);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; letter-spacing: 0.08em; font-size: 15px; }
.brand-sub { font-size: 10px; opacity: 0.7; letter-spacing: 0.12em; text-transform: uppercase; }
.topnav { display: flex; gap: 4px; flex: 1; }
.navlink {
  padding: 8px 14px;
  color: rgba(255,255,255,0.75);
  border-radius: var(--radius-sm);
  font-weight: 500;
  text-decoration: none;
}
.navlink:hover { color: #fff; background: rgba(255,255,255,0.08); text-decoration: none; }
.navlink.active { color: #fff; background: rgba(255,255,255,0.12); }
.user-chip { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.85); font-size: 14px; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--copper); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}

/* CONTAINER */
.container { max-width: 1400px; margin: 0 auto; padding: 28px 24px 48px; flex: 1; width: 100%; }

/* PAGE HEAD */
.page-head {
  display: flex; align-items: end; justify-content: space-between;
  margin-bottom: 24px; gap: 16px;
}
.page-actions { display: flex; gap: 8px; }
.breadcrumbs { display: flex; gap: 8px; align-items: center; color: var(--text-muted); margin-bottom: 8px; font-size: 13px; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px; cursor: pointer;
  border: 1px solid transparent; text-decoration: none;
  transition: all 0.15s;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: #3d8a26; text-decoration: none; }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--bg); }

/* KPI GRID */
.kpi-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 28px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--border);
}
.kpi-card.accent-green::before { background: var(--green); }
.kpi-card.accent-copper::before { background: var(--copper); }
.kpi-card.accent-dark::before { background: var(--green-dark); }
.kpi-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); font-weight: 600; }
.kpi-value { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 4px; color: var(--text); }
.kpi-foot { font-size: 12px; }

/* CARDS */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.card-head h2 { font-size: 17px; }
.link { color: var(--green-dark); font-weight: 500; font-size: 14px; }

/* TABLE */
.ztab { width: 100%; border-collapse: collapse; }
.ztab th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.ztab td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ztab tbody tr:hover { background: #fafafa; }
.ztab tbody tr:last-child td { border-bottom: 0; }
.ztab .num { text-align: right; font-variant-numeric: tabular-nums; }

/* STATUS PILLS */
.status, .status-pill {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  background: #F3F4F6; color: var(--text-muted);
}
.status-verfuegbar { background: #DCFCE7; color: #166534; }
.status-reserviert { background: #FED7AA; color: #9A3412; }
.status-aufbereitung { background: #E0E7FF; color: #3730A3; }
.status-im_einkauf { background: #E5E7EB; color: #374151; }
.status-bereit { background: #DBEAFE; color: #1E40AF; }
.status-verkauft, .status-ausgeliefert { background: #0E3A2F; color: #fff; }
.status-neu { background: #DBEAFE; color: #1E40AF; }
.status-qualifiziert { background: #E0E7FF; color: #3730A3; }
.status-angebot { background: #FED7AA; color: #9A3412; }
.status-probefahrt { background: #FDE68A; color: #92400E; }
.status-verhandlung { background: #FCD34D; color: #78350F; }
.status-gewonnen { background: var(--green); color: #fff; }
.status-verloren { background: #FECACA; color: #991B1B; }

/* FILTER CHIPS */
.filterbar { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.chip {
  padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-soft); font-size: 13px; font-weight: 500;
  text-decoration: none;
}
.chip:hover { background: var(--bg); text-decoration: none; }
.chip.active { background: var(--green-dark); color: #fff; border-color: var(--green-dark); }

/* CAR CARDS GRID */
.cars-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.car-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none; color: var(--text);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.car-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.car-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--bg); overflow: hidden; }
.car-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 72px; font-weight: 800; color: var(--border);
}
.car-thumb .status-pill { position: absolute; top: 12px; left: 12px; }
.car-body { padding: 14px 16px 16px; }
.car-title { font-weight: 700; font-size: 16px; }
.car-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; min-height: 18px; }
.car-meta { display: flex; gap: 12px; margin: 10px 0; color: var(--text-muted); font-size: 13px; }
.car-price { font-weight: 800; font-size: 18px; color: var(--green-dark); }

/* DETAIL */
.detail-layout { display: grid; grid-template-columns: 1fr 360px; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1000px) { .detail-layout { grid-template-columns: 1fr; } }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg); }
.gallery img:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.gallery-placeholder {
  grid-column: 1 / -1; aspect-ratio: 16 / 9;
  background: var(--bg); border-radius: var(--radius); border: 2px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.detail-side .card { margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--text-muted); font-size: 13px; }
.kv dd { margin: 0; font-weight: 500; }
.big-price { font-size: 32px; font-weight: 800; color: var(--green-dark); letter-spacing: -0.02em; }

/* TIMELINE */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 12px 140px max-content 1fr; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.tl-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; align-self: center; }
.tl-date { color: var(--text-muted); font-size: 13px; }
.tl-typ { font-weight: 600; }
.tl-note { color: var(--text-muted); }

/* EMPTY STATE */
.empty, .empty-state {
  background: var(--surface); border: 2px dashed var(--border);
  border-radius: var(--radius); padding: 48px 24px; text-align: center;
  color: var(--text-muted);
}
.empty-state h2 { color: var(--text); margin-bottom: 8px; }
.empty-state .btn { margin-top: 16px; }

/* BADGE */
.badge {
  display: inline-block; padding: 2px 8px;
  background: var(--copper); color: #fff;
  border-radius: var(--radius-pill); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* SETTINGS */
.settings-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.settings-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start;
  text-decoration: none; color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.settings-card:hover { border-color: var(--green); text-decoration: none; box-shadow: var(--shadow-sm); }
.settings-icon { font-size: 28px; line-height: 1; }
.settings-title { font-weight: 700; font-size: 15px; }
.settings-desc { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* MARGE / KV */
.kv-hr { border: 0; border-top: 1px solid var(--border); margin: 10px 0 8px; }
.marge-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; }
.marge-row span { color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; font-size: 12px; }
.marge-row strong { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.marge-row strong.pos { color: var(--green); }
.marge-row strong.neg { color: #B91C1C; }

/* FORMS */
.form-stack .card { margin-bottom: 16px; }
.form-stack .card h2 { font-size: 16px; margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px 16px; }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 4px; }
.field.full { grid-column: 1 / -1; }
.field > span { font-size: 12px; font-weight: 600; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.field > span em { color: var(--green); font-style: normal; font-weight: 800; }
.field input[type="text"],
.field input[type="date"],
.field input[type="number"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  padding: 9px 12px;
  font: inherit;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(75, 168, 46, 0.15);
}
.field input::placeholder,
.field textarea::placeholder {
  color: #B0B6BE;
  font-style: italic;
  opacity: 0.7;
}
.field textarea { resize: vertical; font-family: inherit; }
.field input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.04em; text-transform: uppercase; }
.input-suffix { position: relative; display: flex; align-items: stretch; }
.input-suffix input { padding-right: 44px; }
.input-suffix .suffix {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 13px; font-weight: 600; pointer-events: none;
}

.form-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  position: sticky; bottom: 0;
  background: linear-gradient(to top, var(--bg) 80%, transparent);
}

/* LOGIN PAGE */
.login-body {
  min-height: 100vh; margin: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0E3A2F 0%, #1a5040 50%, #4BA82E 200%);
  padding: 24px;
}
.login-card {
  background: var(--surface); border-radius: 16px;
  padding: 36px 32px; max-width: 420px; width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
}
.login-brand { text-align: center; margin-bottom: 24px; }
.login-brand h1 { font-size: 22px; margin: 14px 0 6px; color: var(--green-dark); }
.login-btn {
  width: 100%; padding: 14px 18px; font-size: 15px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 12px;
}
.login-foot { text-align: center; margin-top: 24px; margin-bottom: 0; }

/* LOGOUT IN NAV */
.user-chip a.logout { color: rgba(255,255,255,0.6); font-size: 12px; margin-left: 8px; }
.user-chip a.logout:hover { color: #fff; }

/* USER-TABLE */
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-avatar.small { width: 28px; height: 28px; font-size: 11px; }
.badge-role { display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; background: var(--bg); color: var(--text-soft); border: 1px solid var(--border); }
.badge-role-admin { background: var(--green-dark); color: #fff; border-color: var(--green-dark); }
.badge-role-gf { background: var(--copper); color: #fff; border-color: var(--copper); }
.badge-role-buchhaltung { background: #6366F1; color: #fff; border-color: #6366F1; }
.badge-role-verkaeufer { background: var(--green); color: #fff; border-color: var(--green); }
.badge-role-werkstatt { background: #0EA5E9; color: #fff; border-color: #0EA5E9; }
.badge-role-readonly { background: #9CA3AF; color: #fff; border-color: #9CA3AF; }

/* Status mini buttons in row */
.btn-mini-row { padding: 4px 10px; font-size: 12px; }

/* Zahlungsstatus colors */
.status-offen { background: #FECACA; color: #991B1B; }
.status-anzahlung_da { background: #FEF3C7; color: #92400E; }
.status-teil_bezahlt { background: #FED7AA; color: #9A3412; }
.status-voll_bezahlt { background: #DCFCE7; color: #166534; }

/* HTMX */
.htmx-indicator { opacity: 0; transition: opacity 0.2s; }
.htmx-request .htmx-indicator { opacity: 1; }
.htmx-request.htmx-indicator { opacity: 1; }
button[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ALERTS */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 500; }
.alert-success { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
.alert-error { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }

/* SEARCH + CHECK */
.searchbar { display: flex; gap: 8px; margin-bottom: 16px; }
.searchbar input[type="search"] {
  flex: 1; padding: 9px 14px; font: inherit;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
}
.searchbar input[type="search"]:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(75,168,46,0.15);
}
.field.check {
  display: flex; flex-direction: row; align-items: center; gap: 10px;
}
.field.check > span { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; color: var(--text); }
.field.check input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--green);
}

/* UPLOAD / BILDER */
.dropzone {
  display: block; padding: 36px 20px;
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
}
.dropzone:hover, .dropzone.drag { border-color: var(--green); background: rgba(75, 168, 46, 0.05); }
.dz-icon { font-size: 48px; line-height: 1; margin-bottom: 8px; }
.dz-title { font-weight: 700; font-size: 16px; }
.dz-sub { color: var(--text-soft); margin-top: 4px; }
.dz-hint { margin-top: 6px; }
.dz-submit { display: flex; gap: 12px; align-items: center; justify-content: flex-end; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.hidden { display: none !important; }

.bilder-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.bild-tile {
  position: relative; aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}
.bild-tile.is-haupt { border-color: var(--green); box-shadow: 0 0 0 2px rgba(75,168,46,0.2); }
.bild-tile img { width: 100%; height: 100%; object-fit: cover; }
.haupt-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--green); color: #fff;
  padding: 3px 8px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.bild-actions {
  position: absolute; top: 8px; right: 8px;
  display: flex; gap: 4px; opacity: 0; transition: opacity 0.15s;
}
.bild-tile:hover .bild-actions { opacity: 1; }
.btn-mini {
  width: 28px; height: 28px; border: 0; border-radius: 6px;
  background: rgba(255,255,255,0.92); color: var(--text);
  cursor: pointer; font-size: 14px; line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.btn-mini.danger { color: #B91C1C; }
.btn-mini:hover { background: #fff; }
form.inline { display: inline; margin: 0; padding: 0; }

/* KANBAN */
.kanban-scroll { overflow-x: auto; padding-bottom: 16px; margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
.kanban { display: flex; gap: 12px; min-width: max-content; }
.kb-col {
  width: 280px; flex-shrink: 0;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 200px);
}
.kb-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 1;
  border-radius: var(--radius) var(--radius) 0 0;
}
.kb-icon { font-size: 18px; }
.kb-head h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-soft); font-weight: 700; flex: 1; }
.kb-count {
  background: var(--surface); padding: 2px 8px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700; color: var(--text-muted); border: 1px solid var(--border);
}
.kb-body {
  flex: 1; overflow-y: auto;
  padding: 8px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 100px;
}
.kb-body.drop { background: rgba(75, 168, 46, 0.08); outline: 2px dashed var(--green); outline-offset: -4px; }
.kb-card {
  display: block; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; cursor: grab;
  text-decoration: none; color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s, box-shadow 0.1s;
}
.kb-card:hover { box-shadow: var(--shadow); text-decoration: none; transform: translateY(-1px); }
.kb-card.dragging { opacity: 0.4; cursor: grabbing; }
.kb-card-head { display: flex; justify-content: space-between; margin-bottom: 4px; }
.kb-lead-id { font-family: ui-monospace, monospace; font-size: 11px; color: var(--text-muted); }
.kb-prob {
  background: var(--green); color: #fff; font-size: 11px;
  padding: 1px 7px; border-radius: var(--radius-pill); font-weight: 700;
}
.kb-card-title { font-weight: 700; font-size: 14px; line-height: 1.3; }
.kb-card-fz { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.kb-card-wunsch { margin-top: 4px; font-size: 11px; }
.kb-card-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.kb-card-eur { font-weight: 800; color: var(--green-dark); font-size: 13px; }

@media (max-width: 720px) {
  .kanban-scroll { margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
  .kb-col { width: 240px; }
}

/* WIZARD */
.wizard { max-width: 720px; margin: 0 auto; }
.wizard-progress {
  display: flex; gap: 8px; margin-bottom: 24px;
  border-bottom: 1px solid var(--border); padding-bottom: 12px;
}
.wizard-progress .step {
  flex: 1; display: flex; align-items: center; gap: 8px;
  padding: 6px 0; color: var(--text-muted); font-weight: 600; font-size: 13px;
  letter-spacing: 0.03em; text-transform: uppercase;
}
.wizard-progress .step > span {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg); border: 1px solid var(--border); color: var(--text-muted);
  font-weight: 800; font-size: 13px;
}
.wizard-progress .step.active { color: var(--text); }
.wizard-progress .step.active > span { background: var(--green); color: #fff; border-color: var(--green); }
.wizard-progress .step.done > span { background: var(--green-dark); color: #fff; border-color: var(--green-dark); }
.wizard-progress .step.done > span::before { content: "✓"; }
.wizard-progress .step.done > span > * { display: none; }

.wizard-step { display: none; }
.wizard-step.active { display: block; animation: fade-in 0.2s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.wizard-head { margin-bottom: 18px; }
.wizard-head h1 { font-size: 24px; margin-bottom: 4px; }
.wizard-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 18px 0 8px; border-top: 1px solid var(--border); margin-top: 16px; }
.wizard-actions .btn { min-width: 130px; }

.vin-input { font-size: 18px; letter-spacing: 3px; text-transform: uppercase; padding: 14px 16px; }
.vin-feedback { margin: 10px 0; font-size: 14px; min-height: 22px; }
.vin-feedback .ok { color: var(--green); font-weight: 600; }
.vin-feedback .warn { color: #B91C1C; font-weight: 600; }

@media (max-width: 600px) {
  .wizard-progress .step { font-size: 11px; gap: 6px; }
  .wizard-progress .step > span { width: 24px; height: 24px; font-size: 12px; }
  .wizard-head h1 { font-size: 20px; }
  .wizard-actions { flex-direction: column-reverse; }
  .wizard-actions .btn { width: 100%; }
}

/* MOBILE TUNING */
@media (max-width: 720px) {
  .topbar-inner { padding: 10px 14px; gap: 12px; flex-wrap: wrap; }
  .topnav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .topnav::-webkit-scrollbar { height: 4px; }
  .navlink { white-space: nowrap; padding: 6px 10px; font-size: 14px; }
  .brand-sub { display: none; }
  .user-chip .user-name { display: none; }
  .container { padding: 16px 14px 80px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-actions { flex-wrap: wrap; }
  .btn { padding: 11px 16px; }
  h1 { font-size: 22px; }
  .kpi-value { font-size: 26px; }
  .kpi-grid { gap: 12px; }
  .cars-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .car-body { padding: 10px 12px 12px; }
  .car-title { font-size: 14px; }
  .car-price { font-size: 16px; }
  .ztab { font-size: 13px; }
  .ztab th, .ztab td { padding: 8px 6px; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .btn { flex: 1; min-width: 120px; }
}
@media (max-width: 480px) {
  .cars-grid { grid-template-columns: 1fr; }
}

/* FOOTER */
.footer {
  border-top: 1px solid var(--border); background: var(--surface);
  padding: 12px 24px; color: var(--text-muted); font-size: 13px;
  display: flex; justify-content: space-between; align-items: center;
}

/* Checkbox-Grid (Form + Filter) */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px 16px;
}
.ckbox { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; font-size: 14px; }
.ckbox input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--green-skoda, #4BA82E); cursor: pointer; }
.ckbox span { user-select: none; }

/* Filter-Panel */
.filter-panel { display: none; background: var(--bg-soft, #F7F8FA); border: 1px solid var(--border, #E5E7EB); border-radius: var(--radius-sm, 8px); padding: 16px; margin-bottom: 16px; }
.filter-panel.open { display: block; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.filter-ausst-details { margin-top: 16px; border-top: 1px solid var(--border, #E5E7EB); padding-top: 12px; }
.filter-ausst-details summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.chip-divider { display: inline-block; width: 1px; background: var(--border, #E5E7EB); height: 20px; margin: 0 6px; vertical-align: middle; }

/* Tag-Liste (Ausstattungs-Codes) */
.taglist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { background: #E5F4DD; color: #1A5E0E; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }

/* Fahrzeug-Suche: Sidebar + Treffer */
.suche-layout { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .suche-layout { grid-template-columns: 1fr; } }
.suche-sidebar { background: var(--bg-soft, #F7F8FA); border: 1px solid var(--border, #E5E7EB); border-radius: 10px; padding: 16px; align-self: start; }
.suche-sidebar-head { position: sticky; top: 8px; background: var(--bg-soft, #F7F8FA); padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border, #E5E7EB); z-index: 1; }
.suche-sidebar .field { margin-bottom: 10px; display: block; }
.suche-sidebar .field label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 4px; font-weight: 500; }
.suche-sidebar .field input, .suche-sidebar .field select { width: 100%; }
.suche-sidebar .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checkbox-grid-narrow { grid-template-columns: 1fr; gap: 2px; }
.checkbox-grid-narrow .ckbox { font-size: 13px; padding: 2px 0; }
.cars-grid-suche { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.car-card-suche { display: flex; flex-direction: column; }
.car-card-suche .car-card-link { display: flex; flex-direction: column; text-decoration: none; color: inherit; flex: 1; }
.card-assign-form { padding: 0 12px 12px; }
.btn-block { width: 100%; }
