/* =========================================================
   Autoverleih - Gestaltung / التصميم
   Ein Stylesheet für Kunden-App und Verwaltung.
   Hell/Dunkel automatisch, Links-nach-rechts und Rechts-nach-links.
   ========================================================= */

:root {
  /* Farben - hell */
  --ground:      #f4f6f4;
  --surface:     #ffffff;
  --surface-2:   #eef1ef;
  --surface-3:   #e4e8e5;
  --line:        #d9ded9;
  --line-strong: #c3cac4;

  --ink:         #16211f;
  --ink-2:       #46534f;
  --ink-3:       #5c6a66;

  --brand:       #14504a;
  --brand-ink:   #ffffff;
  --brand-soft:  #e3efea;
  --brand-2:     #1c6f66;

  --accent:      #b8801f;
  --accent-soft: #f7edd8;

  --ok:          #2c6e4f;
  --ok-soft:     #e0f0e6;
  --warn:        #9a6712;
  --warn-soft:   #f9eed6;
  --info:        #2a5a86;
  --info-soft:   #e2ecf5;
  --danger:      #9c3a33;
  --danger-soft: #f8e5e2;
  --muted-soft:  #e7eaea;

  /* Schrift auf farbigen Flaechen (Kalenderbalken, rote Schaltflaechen).
     Die Statusfarben sind hell gedeckt dunkel, dunkel gedeckt hell -
     die Tinte muss also mitwechseln, sonst steht heller Text auf hell. */
  --status-ink:  #ffffff;
  --danger-btn:  #9c3a33;

  --radius:   12px;
  --radius-s: 8px;
  --radius-l: 18px;
  --shadow:   0 1px 2px rgba(16,33,31,.06), 0 8px 24px -12px rgba(16,33,31,.18);
  --shadow-l: 0 2px 6px rgba(16,33,31,.08), 0 24px 48px -20px rgba(16,33,31,.30);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          "Noto Sans", "Noto Sans Arabic", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --header-h: 60px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --ground:      #0e1513;
    --surface:     #16201d;
    --surface-2:   #1d2926;
    --surface-3:   #253430;
    --line:        #2b3a36;
    --line-strong: #3a4d48;

    --ink:         #e8efec;
    --ink-2:       #adbcb7;
    --ink-3:       #83938e;

    --brand:       #4fb3a4;
    --brand-ink:   #06201c;
    --brand-soft:  #1b3833;
    --brand-2:     #6ecabb;

    --accent:      #e0ab55;
    --accent-soft: #33291a;

    --ok:          #63c294;
    --ok-soft:     #16311f;
    --warn:        #dcb05c;
    --warn-soft:   #322916;
    --info:        #74b0e0;
    --info-soft:   #16283a;
    --danger:      #c8564b;
    --danger-soft: #33201d;
    --muted-soft:  #22302c;

    --status-ink:  #0e1513;
    /* Etwas dunkler als --danger: Weiss auf #c8564b erreicht nur 4,3:1 */
    --danger-btn:  #a63f35;

    --shadow:   0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.7);
    --shadow-l: 0 2px 6px rgba(0,0,0,.45), 0 24px 48px -20px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --ground:      #0e1513;
  --surface:     #16201d;
  --surface-2:   #1d2926;
  --surface-3:   #253430;
  --line:        #2b3a36;
  --line-strong: #3a4d48;
  --ink:         #e8efec;
  --ink-2:       #adbcb7;
  --ink-3:       #83938e;
  --brand:       #4fb3a4;
  --brand-ink:   #06201c;
  --brand-soft:  #1b3833;
  --brand-2:     #6ecabb;
  --accent:      #e0ab55;
  --accent-soft: #33291a;
  --ok:          #63c294;
  --ok-soft:     #16311f;
  --warn:        #dcb05c;
  --warn-soft:   #322916;
  --info:        #74b0e0;
  --info-soft:   #16283a;
  --danger:      #c8564b;
  --danger-soft: #33201d;
  --muted-soft:  #22302c;
  --status-ink:  #0e1513;
  --danger-btn:  #a63f35;
  --shadow:   0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.7);
  --shadow-l: 0 2px 6px rgba(0,0,0,.45), 0 24px 48px -20px rgba(0,0,0,.8);
  color-scheme: dark;
}

/* ------------------------------ Basis ------------------------------ */

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

[dir='rtl'] { font-size: 15.5px; }

h1, h2, h3, h4 { margin: 0; text-wrap: balance; letter-spacing: -.015em; line-height: 1.2; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 650; }
p  { margin: 0 0 10px; }
a  { color: var(--brand); }

.eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  font-weight: 700; color: var(--ink-3);
}
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.tnum  { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
[dir='rtl'] .right { text-align: left; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ------------------------------ Layout ----------------------------- */

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 18px; }

.stack   { display: flex; flex-direction: column; gap: 14px; }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
.row     { display: flex; align-items: center; gap: 10px; }
.row-wrap{ display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread  { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow    { flex: 1 1 auto; min-width: 0; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cars { grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* ----------------------------- Kopfzeile --------------------------- */

.appbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.appbar-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 14px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 700; letter-spacing: -.02em; font-size: 16px;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center; flex: none;
  overflow: hidden;
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-lockup { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { height: 36px; width: auto; max-width: 200px; display: block; object-fit: contain; object-position: left center; }
.brand-logo--dark { display: none; }
html.dark .brand-logo--light { display: none; }
html.dark .brand-logo--dark { display: block; }

.navlinks {
  display: flex; gap: 2px; margin-inline-start: 10px;
  flex: 1 1 auto; min-width: 0; overflow-x: auto;
  scrollbar-width: thin; scroll-behavior: smooth;
  /* Ein weicher Rand zeigt an, dass rechts noch etwas kommt */
  mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent);
}
[dir='rtl'] .navlinks { mask-image: linear-gradient(to left, #000 calc(100% - 22px), transparent); }
.navlinks::-webkit-scrollbar { height: 4px; }
.navlinks::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.navlink {
  padding: 7px 10px; border-radius: 9px; font-size: 13.5px; font-weight: 550;
  color: var(--ink-2); text-decoration: none; background: none; border: 0;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.navlink:hover { background: var(--surface-2); color: var(--ink); }
.navlink.active { background: var(--brand-soft); color: var(--brand); }

@media (max-width: 760px) {
  .navlinks { display: none; }
}

/* Untere Navigation auf dem Handy */
.tabbar {
  display: none;
  position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.tabbar-inner { display: flex; }
.tabbtn {
  flex: 1; border: 0; background: none; font-family: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 2px; border-radius: 10px; color: var(--ink-3); font-size: 11px; font-weight: 600;
}
.tabbtn svg { width: 21px; height: 21px; }
.tabbtn.active { color: var(--brand); background: var(--brand-soft); }
@media (max-width: 760px) {
  .tabbar { display: block; }
  /* Genug Luft unter dem Inhalt, damit die feste Leiste unten nichts
     verdeckt. Die Regel muss stärker sein als .wrap, sonst greift sie nicht. */
  main .wrap, main.wrap { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  main { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}

/* ----------------------------- Flaechen ---------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.card-flush { padding: 0; overflow: hidden; }
.card-pad { padding: 16px; }
.card h3 + .muted { margin-top: 2px; }

.section { margin: 22px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

.divider { height: 1px; background: var(--line); margin: 14px 0; border: 0; }

/* ---------------------------- Bedienung ---------------------------- */

.btn {
  font: inherit; font-weight: 600; font-size: 14px;
  padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  justify-content: center; white-space: nowrap; text-decoration: none;
  transition: background .12s ease, border-color .12s ease, transform .06s ease;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
/* Nicht ueber die Deckkraft ausgrauen: "Weiter" landete damit bei rund
   2:1 und war kaum noch lesbar. Stattdessen ein eigener ruhiger Farbsatz. */
.btn:disabled {
  cursor: not-allowed;
  background: var(--surface-2); color: var(--ink-3); border-color: var(--line);
}
.btn svg { width: 17px; height: 17px; flex: none; }

.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-primary:disabled { background: var(--surface-3); color: var(--ink-3); border-color: var(--line-strong); }
.btn-ghost { background: none; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--danger-btn); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-block { width: 100%; }
.btn-s { padding: 6px 11px; font-size: 13px; border-radius: 8px; min-height: 38px; }
.btn-l { padding: 13px 22px; font-size: 15.5px; border-radius: 12px; }

/* ---------------------------- Formulare ---------------------------- */

.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); }

input[type='text'], input[type='email'], input[type='password'], input[type='number'],
input[type='date'], input[type='datetime-local'], input[type='tel'], input[type='search'],
select, textarea {
  font: inherit; font-size: 14.5px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  width: 100%;
  min-width: 0;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
textarea { resize: vertical; min-height: 74px; }
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
                    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-inline-end: 32px;
}
/* Nur die Seite spiegeln, nicht die Pfeilrichtung: der Pfeil zeigt
   auch in der arabischen Ansicht nach unten. */
[dir='rtl'] select {
  background-position: 17px 50%, 12px 50%;
}
input[type='checkbox'], input[type='radio'] { width: auto; accent-color: var(--brand); }

.check { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; cursor: pointer; }
.check input { margin-top: 3px; }

.segmented {
  display: inline-flex; background: var(--surface-2); border-radius: 10px;
  padding: 3px; gap: 2px; border: 1px solid var(--line);
}
.segmented button {
  font: inherit; font-size: 13px; font-weight: 600; border: 0; background: none;
  color: var(--ink-2); padding: 6px 13px; border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.segmented button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ------------------------------ Marken ----------------------------- */

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 650; white-space: nowrap;
  background: var(--muted-soft); color: var(--ink-2);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-ok      { background: var(--ok-soft);     color: var(--ok); }
.chip-warn    { background: var(--warn-soft);   color: var(--warn); }
.chip-info    { background: var(--info-soft);   color: var(--info); }
.chip-danger  { background: var(--danger-soft); color: var(--danger); }
.chip-brand   { background: var(--brand-soft);  color: var(--brand); }
.chip-accent  { background: var(--accent-soft); color: var(--accent); }

.badge-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--danger-btn); color: #fff; font-size: 11px; font-weight: 700;
  display: inline-grid; place-items: center;
}

/* --------------------------- Fahrzeugkarte -------------------------- */

.car-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.car-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.car-photo {
  aspect-ratio: 16 / 9; background: var(--surface-2);
  position: relative; overflow: hidden;
}
.car-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.car-photo .chip { position: absolute; top: 10px; inset-inline-start: 10px; backdrop-filter: blur(4px); }
/* Platzhalter, wenn zu einem Fahrzeug kein Bild vorliegt oder es nicht
   geladen werden kann. Ohne ihn bliebe an der Stelle ein leeres Feld -
   oder, schlimmer, das Bruchstück-Symbol des Browsers. */
.photo-empty {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--ink-3);
  border-radius: 9px; flex: none;
}
.car-body { padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.car-title { font-weight: 650; font-size: 15.5px; letter-spacing: -.01em; }
.car-specs { display: flex; flex-wrap: wrap; gap: 5px 12px; font-size: 12.5px; color: var(--ink-3); }
.car-price { display: flex; align-items: baseline; gap: 6px; margin-top: auto; }
.car-price .amount { font-size: 21px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.car-price .per { font-size: 12.5px; color: var(--ink-3); }
.car-price .was { font-size: 13px; color: var(--ink-3); text-decoration: line-through; }

/* ------------------------------ Tabelle ---------------------------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td {
  padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.data th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-3); font-weight: 700; white-space: nowrap;
  background: var(--surface-2); position: sticky; top: 0;
}
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.num, table.data th.num { text-align: end; font-variant-numeric: tabular-nums; }
table.data tr:last-child td { border-bottom: 0; }
.clickable { cursor: pointer; }

/* ----------------------------- Kennzahl ---------------------------- */

.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 15px;
  display: flex; flex-direction: column; gap: 3px;
}
.stat .label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; }
.stat .value { font-size: 25px; font-weight: 700; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12.5px; color: var(--ink-3); }
.stat.accent { border-inline-start: 3px solid var(--brand); }
.stat.warn   { border-inline-start: 3px solid var(--warn); }
.stat.danger { border-inline-start: 3px solid var(--danger); }

/* ------------------------------ Balken ----------------------------- */

.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 1.1fr) 3fr auto; gap: 10px; align-items: center; font-size: 13px; }
.bar-track { display: block; height: 9px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--brand); border-radius: 99px; min-width: 2px; }
.bar-row .num { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

.spark { display: flex; align-items: stretch; gap: 3px; height: 84px; }
.spark div {
  flex: 1; min-width: 3px; height: 100%; background: var(--surface-2);
  border-radius: 3px 3px 0 0; position: relative;
}
.spark div .top {
  position: absolute; inset-inline: 0; bottom: 0;
  background: var(--brand); border-radius: 3px 3px 0 0; min-height: 3px;
}

/* ------------------------------ Dialoge ---------------------------- */

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 18, 16, .48);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.sheet {
  background: var(--surface); border-radius: var(--radius-l);
  box-shadow: var(--shadow-l); width: min(640px, 100%);
  max-height: calc(100dvh - 40px); display: flex; flex-direction: column;
  animation: rise .2s cubic-bezier(.2,.8,.3,1);
  border: 1px solid var(--line);
}
.sheet-wide { width: min(920px, 100%); }
.sheet-head {
  padding: 16px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: sticky; top: 0; background: var(--surface); border-radius: var(--radius-l) var(--radius-l) 0 0;
}
.sheet-body { padding: 18px; overflow-y: auto; }
.sheet-foot {
  padding: 14px 18px; border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
  background: var(--surface); border-radius: 0 0 var(--radius-l) var(--radius-l);
}
.iconbtn {
  border: 0; background: none; padding: 7px; border-radius: 9px; cursor: pointer;
  color: var(--ink-2); display: inline-grid; place-items: center; font-family: inherit;
  vertical-align: middle;
  /* Genug Fläche zum Treffen mit dem Daumen */
  min-width: 40px; min-height: 40px;
}
.iconbtn:hover { background: var(--surface-2); color: var(--ink); }
.iconbtn svg { width: 19px; height: 19px; }

@media (max-width: 620px) {
  .sheet-backdrop { padding: 0; align-items: flex-end; }
  .sheet { width: 100%; max-height: 94dvh; border-radius: var(--radius-l) var(--radius-l) 0 0; }
  .sheet-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}

/* ----------------------------- Meldungen --------------------------- */

.toasts {
  position: fixed; z-index: 200; bottom: 18px; inset-inline-end: 18px;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
  max-width: min(380px, calc(100vw - 36px));
}
.toast {
  background: var(--surface); border: 1px solid var(--line); border-inline-start: 3px solid var(--brand);
  border-radius: 10px; padding: 11px 14px; box-shadow: var(--shadow-l);
  font-size: 14px; animation: rise .2s ease; pointer-events: auto;
}
.toast.error { border-inline-start-color: var(--danger); }
.toast.ok { border-inline-start-color: var(--ok); }
@media (max-width: 620px) { .toasts { bottom: 84px; inset-inline: 12px; max-width: none; } }

.notice {
  padding: 11px 13px; border-radius: 10px; font-size: 13.5px;
  background: var(--info-soft); color: var(--info);
  border: 1px solid color-mix(in srgb, var(--info) 22%, transparent);
}
.notice-warn   { background: var(--warn-soft);   color: var(--warn);
                 border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.notice-danger { background: var(--danger-soft); color: var(--danger);
                 border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.notice-ok     { background: var(--ok-soft);     color: var(--ok);
                 border-color: color-mix(in srgb, var(--ok) 22%, transparent); }

.empty {
  text-align: center; padding: 46px 18px; color: var(--ink-3);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.empty svg { width: 40px; height: 40px; opacity: .5; }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%; animation: shimmer 1.3s ease infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ------------------------------ Schritte --------------------------- */

.steps { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.step {
  display: flex; align-items: center; gap: 7px; font-size: 12.5px;
  color: var(--ink-3); font-weight: 600;
}
.step .n {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); color: var(--ink-3); font-size: 11.5px; font-weight: 700; flex: none;
}
.step.done .n { background: var(--brand-soft); color: var(--brand); }
.step.current { color: var(--ink); }
.step.current .n { background: var(--brand); color: var(--brand-ink); }
.step-sep { flex: 1; height: 1px; background: var(--line); min-width: 12px; }

/* ------------------------- Preisaufstellung ------------------------ */

.pricelist { display: flex; flex-direction: column; gap: 7px; font-size: 14px; }
.pricelist .line { display: flex; justify-content: space-between; gap: 12px; }
.pricelist .line .v { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pricelist .line.minus .v { color: var(--ok); }
.pricelist .line.plus .v { color: var(--warn); }
.pricelist .total {
  display: flex; justify-content: space-between; gap: 12px;
  border-top: 2px solid var(--line-strong); padding-top: 9px; margin-top: 3px;
  font-size: 18px; font-weight: 700;
}
.pricelist .total .v { font-variant-numeric: tabular-nums; }

/* ------------------------------ Kalender --------------------------- */

.cal-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cal { min-width: 760px; }
.cal-head, .cal-row { display: grid; grid-template-columns: 190px 1fr; }
@media (max-width: 760px) {
  .cal-head, .cal-row { grid-template-columns: 116px 1fr; }
  .cal-label { padding: 8px; font-size: 12px; }
}
.cal-head { position: sticky; top: 0; background: var(--surface-2); z-index: 2; border-bottom: 1px solid var(--line); }
.cal-label {
  padding: 9px 12px; border-inline-end: 1px solid var(--line); font-size: 13px;
  /* Bleibt beim Blättern nach rechts stehen - sonst weiß niemand mehr,
     zu welchem Fahrzeug die Balken gehören. */
  position: sticky; inset-inline-start: 0; z-index: 1; background: var(--surface);
}
.cal-head .cal-label { background: var(--surface-2); }
.cal-days { display: grid; }
.cal-day {
  text-align: center; font-size: 10.5px; padding: 6px 2px; color: var(--ink-3);
  border-inline-end: 1px solid var(--line); font-weight: 600; line-height: 1.25;
}
.cal-day.weekend { background: color-mix(in srgb, var(--ink-3) 7%, transparent); }
.cal-row { border-bottom: 1px solid var(--line); }
.cal-row:last-child { border-bottom: 0; }
.cal-track { position: relative; display: grid; min-height: 42px; height: 100%; }
.cal-cell { border-inline-end: 1px solid var(--line); }
.cal-cell.weekend { background: color-mix(in srgb, var(--ink-3) 5%, transparent); }
.cal-bar {
  position: absolute; top: 7px; height: 28px; border-radius: 7px; text-overflow: ellipsis;
  font-size: 11.5px; font-weight: 650; color: var(--status-ink);
  display: flex; align-items: center; padding: 0 8px; overflow: hidden;
  white-space: nowrap; cursor: pointer; border: 1px solid rgba(0,0,0,.12);
  /* Der Balken ist eine echte Schaltfläche - Schrift und Ausrichtung des
     Browsers würden sonst durchschlagen. */
  font-family: inherit; text-align: start;
}
/* Dieselben Merkmale wie die Zeichen in der Legende darueber. Vorher waren
   die Balken fest verdrahtet - in der dunklen Darstellung sagten Legende und
   Balken sichtbar Verschiedenes. */
.cal-bar.pending   { background: var(--warn); }
.cal-bar.confirmed { background: var(--info); }
.cal-bar.active    { background: var(--brand); }
.cal-bar.completed { background: var(--ink-3); }

/* ----------------------------- Zahlung ----------------------------- */

.paymethods { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; }
.paymethod {
  border: 1px solid var(--line-strong); border-radius: 11px; padding: 12px;
  background: var(--surface); cursor: pointer; text-align: start;
  display: flex; align-items: center; gap: 9px; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--ink);
}
.paymethod:hover { border-color: var(--brand); }
.paymethod.selected { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.paymethod .mark { width: 30px; height: 20px; border-radius: 4px; background: var(--surface-3); flex: none; display:grid; place-items:center; font-size:9px; font-weight:800; letter-spacing:.02em; }

/* --------------------------- Anmeldeseite -------------------------- */

.auth-wrap {
  min-height: 100dvh; display: grid; place-items: center; padding: 20px;
}
.auth-card { width: min(420px, 100%); }

/* ------------------------------ Drucken ---------------------------- */

/* Gedruckt wird immer auf weißem Papier. Vorher wurde nur der Seitengrund
   auf Weiß gesetzt, während Schrift und Karten aus der dunklen Darstellung
   kamen - das Ergebnis war weiß auf weiß, also ein fast leeres Blatt.
   Deshalb bekommt der gesamte Farbsatz hier den hellen Stand zurück. */
@media print {
  :root,
  :root[data-theme='dark'],
  :root[data-theme='light'] {
    --ground:      #ffffff;
    --surface:     #ffffff;
    --surface-2:   #f2f4f2;
    --surface-3:   #e6eae7;
    --line:        #c8cfca;
    --line-strong: #a9b3ae;

    --ink:         #16211f;
    --ink-2:       #33403c;
    --ink-3:       #4c5854;

    --brand:       #14504a;
    --brand-ink:   #ffffff;
    --brand-soft:  #e3efea;
    --brand-2:     #1c6f66;

    --accent:      #8a5f12;
    --accent-soft: #f7edd8;

    --ok:          #245b41;
    --ok-soft:     #e0f0e6;
    --warn:        #7d5410;
    --warn-soft:   #f9eed6;
    --info:        #23486b;
    --info-soft:   #e2ecf5;
    --danger:      #8b2f29;
    --danger-soft: #f8e5e2;
    --muted-soft:  #ebeeed;

    --shadow:   none;
    --shadow-l: none;
    color-scheme: light;
  }

  .appbar, .tabbar, .toasts, .no-print { display: none !important; }
  /* Schaltflächen gehören nicht aufs Papier - die Verweise auf Rechnung
     und Vertrag sehen aber nur aus wie Schaltflächen und müssen bleiben. */
  .btn:not(.print-keep) { display: none !important; }
  .print-keep { border: 0 !important; padding: 0 !important; text-decoration: underline; }

  body { background: #fff; color: var(--ink); }
  .card, .stat, .sheet, .doc-tile, .notice { box-shadow: none; background: #fff; }

  /* Der Dialog liegt beim Drucken im Textfluss, sonst deckt der dunkle
     Hintergrund die ganze Seite ab und nur ein Ausschnitt wird gedruckt. */
  .sheet-backdrop {
    position: static; background: none; padding: 0; overflow: visible; display: block;
  }
  .sheet { width: 100%; max-height: none; border: 0; }
  .sheet-head, .sheet-foot { position: static; border: 0; }
  .sheet-body { overflow: visible; }

  /* Nichts über eine Seitengrenze hinweg zerreißen */
  table, tr, td, th, .card, .stat, .signature-box, .doc-tile, .pricelist {
    break-inside: avoid;
  }
  thead { display: table-header-group; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* --------------------- Schmale Bildschirme, Kopfzeile --------------------- */
@media (max-width: 700px) {
  .brand span:not(.brand-mark) { display: none; }
  #newBookingBtn span { display: none; }
  #newBookingBtn { padding: 8px 10px; }
  .appbar-inner { gap: 8px; }
}

/* ----------------- Unterschrift, Fotos, Tankanzeige ----------------- */

/* Das Unterschriftsfeld ist immer hell: unterschrieben wird auf Papier.
   So sieht der Kunde beim Unterschreiben genau das, was später im
   Vertrag steht - auch wenn die Oberfläche dunkel eingestellt ist. */
.signature-box {
  position: relative;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  height: 150px;
  overflow: hidden;
}
.signature-canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.signature-hint {
  position: absolute; inset: 0; display: grid; place-items: center;
  /* Das Feld ist bewusst immer hell (siehe oben), deshalb steht die Farbe
     hier fest. #6d7a76 erreichte auf Weiss nur 4,47:1 - jetzt sind es 5,7:1. */
  color: #5c6a66; font-size: 13.5px; pointer-events: none;
}
.signature-clear { position: absolute; top: 7px; inset-inline-end: 7px; }

.photo-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-thumb { position: relative; width: 86px; height: 66px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-remove {
  position: absolute; top: 3px; inset-inline-end: 3px;
  width: 20px; height: 20px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(10, 20, 18, .68); color: #fff; font-size: 14px; line-height: 1;
  display: grid; place-items: center; font-family: inherit;
}

.fuel-range { accent-color: var(--brand); }

/* ------------------------ Auswahlkarten ---------------------------- */

.option-card {
  display: flex; gap: 11px; align-items: flex-start;
  border: 1px solid var(--line-strong); border-radius: 11px; padding: 12px 13px;
  background: var(--surface); cursor: pointer; text-align: start; width: 100%;
  font: inherit; color: var(--ink);
}
.option-card:hover { border-color: var(--brand); }
.option-card.selected { border-color: var(--brand); background: var(--brand-soft); }
.option-card .mark {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong);
  flex: none; margin-top: 2px; display: grid; place-items: center;
}
.option-card.selected .mark { border-color: var(--brand); }
.option-card.selected .mark::after {
  content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--brand);
}
.option-card .price { margin-inline-start: auto; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* --------------------------- Dokumentkacheln ------------------------ */

.doc-tile {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; display: flex; flex-direction: column; gap: 9px; background: var(--surface);
}
.doc-preview {
  height: 108px; border-radius: 9px; background: var(--surface-2);
  display: grid; place-items: center; overflow: hidden; color: var(--ink-3);
}
.doc-preview img { width: 100%; height: 100%; object-fit: cover; }
.doc-preview svg { width: 34px; height: 34px; }
.empty svg { width: 40px; height: 40px; }

/* Weitere Bereiche auf dem Handy ("Mehr") */
.morelist { display: grid; gap: 6px; }
.morelink {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 14px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15px;
  font-weight: 550; cursor: pointer; text-align: start; min-height: 46px;
}
.morelink:hover { background: var(--surface-2); }
.morelink svg { width: 20px; height: 20px; flex: none; }

/* Fehlendes Pflichtfeld deutlich markieren */
.field-error, input.field-error, select.field-error, textarea.field-error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 16%, transparent);
}

/* ----------------------- Nur für Vorlesesoftware -------------------- */

/* Ein Feld, das nicht zu sehen, aber weiter bedienbar ist.
   Dateifelder waren vorher mit "hidden" versteckt - damit fallen sie aus
   der Tab-Reihenfolge und Fotoaufnahme, Nachweis-Upload, Logo und
   CSV-Einlesen waren ohne Maus überhaupt nicht zu erreichen. */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* Der Fokusrahmen erscheint an der sichtbaren Beschriftung */
label:has(> .visually-hidden:focus-visible),
label:has(.visually-hidden:focus-visible) {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Sprungmarke: erster Halt mit der Tabulatortaste, führt zum Inhalt */
.skiplink {
  position: absolute; inset-inline-start: -9999px; top: 0; z-index: 300;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 0 0 var(--radius-s) 0;
  padding: 10px 16px; font-weight: 650; text-decoration: none;
}
.skiplink:focus {
  inset-inline-start: 0;
}

/* Richtungsabhängige Symbole in der arabischen Ansicht spiegeln */
[dir='rtl'] .icon-flip { transform: scaleX(-1); }

/* ---------------- Rollbare Bereiche mit der Tastatur ---------------- */

/* Der Kalender ist 760 px breit - auf dem Handy sind die rechten Spalten
   ohne Zeigegerät sonst nicht erreichbar (WCAG 2.1.1). */
.table-scroll:focus-visible, .cal-scroll:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

/* --------------- Zustände nicht nur über die Farbe ------------------ */

/* Die gewählte Zahlungsart war nur an Rand- und Flächenfarbe zu erkennen.
   Ein Häkchen und ein kräftigerer Rand sagen dasselbe ohne Farbe.
   Die Auswahlkarte trägt mit dem gefüllten Punkt bereits ein solches Zeichen. */
.paymethod.selected::after {
  content: '✓';
  margin-inline-start: auto;
  font-weight: 800;
}
.paymethod.selected, .option-card.selected { border-width: 2px; }

/* Ungelesene Benachrichtigungen: Rand plus Wortmarke */
.unread-dot {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; color: var(--brand);
  text-transform: uppercase; letter-spacing: .06em;
}

/* ---------------- RENTARVO Footer + Legal Center ---------------- */

.legal-body { background: var(--ground); color: var(--ink); }
.legal-top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.legal-top__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1120px; margin: 0 auto; padding: 12px 24px;
}
.legal-brand { font-weight: 750; letter-spacing: .08em; text-decoration: none; color: var(--brand); }
.legal-top .brand-lockup .brand-logo { height: 32px; }
.legal-main { max-width: 800px; margin: 0 auto; padding: 8px 24px 48px; }
.legal-main h1 { font-size: 1.75rem; margin: 12px 0 8px; letter-spacing: -.02em; }
.legal-stand { color: var(--ink-3); font-size: 14px; margin-bottom: 18px; }
.legal-doc pre { white-space: pre-wrap; font-family: inherit; font-size: 15.5px; line-height: 1.7; margin: 0; }
.legal-prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 28px 32px;
  margin: 8px 0 20px;
  box-shadow: 0 1px 2px rgb(16 33 31 / .04);
}
.legal-prose h2 { font-size: 1.08rem; margin: 1.55em 0 0.45em; letter-spacing: -.02em; }
.legal-prose h2:first-child { margin-top: 0; }
.legal-prose p { margin: 0 0 0.85em; line-height: 1.68; color: var(--ink-2); }
.legal-prose ul { margin: 0 0 1em; padding-inline-start: 1.2rem; color: var(--ink-2); line-height: 1.55; }
.legal-prose a { color: var(--brand); font-weight: 650; text-underline-offset: 2px; }
.legal-banner {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  color: var(--warn);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 12px;
}
.legal-placeholder {
  font-size: 13.5px;
  color: var(--ink-3);
  border-inline-start: 3px solid var(--accent);
  padding: 6px 12px;
  margin: 0 0 12px;
}
.faq-list { display: grid; gap: 10px; margin: 8px 0 24px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px 12px; }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; font-weight: 650; cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; width: 0.45rem; height: 0.45rem; flex-shrink: 0;
  border-inline-end: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); opacity: .45;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item p { margin: 0 0 8px; color: var(--ink-2); line-height: 1.55; }
.help-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 8px 0 28px; }
.help-cards .legal-card { padding: 20px 18px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.help-cards .legal-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.help-cards .legal-card p { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.cookie-settings-row { margin: 8px 0 20px; }
.legal-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 20px; }
.legal-card {
  display: block; padding: 18px 16px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: inherit;
  box-shadow: 0 1px 2px rgb(16 33 31 / .04);
}
.legal-card:hover, .legal-card:focus-visible { border-color: var(--brand); }
.legal-card h2 { font-size: 1rem; margin: 0; letter-spacing: -.01em; }
.legal-form { display: flex; flex-direction: column; gap: 12px; padding: 20px; margin-top: 16px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.legal-main--fleet { max-width: 1120px; }
.legal-main--apply { max-width: 1040px; padding-top: 0; }
.legal-back { margin: 8px 0 0; }
.fees-points { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; }
@media (min-width: 720px) {
  .fees-points { grid-template-columns: 1fr 1fr; }
}
.fees-points li {
  padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); box-shadow: 0 1px 2px rgb(16 33 31 / .04);
}
.fees-points strong { display: block; font-size: 1.02rem; letter-spacing: -.01em; }
.fees-points p { margin: 6px 0 0; color: var(--ink-3); line-height: 1.55; }
.fees-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 16px 0 20px; }
.fees-plan { padding: 18px 18px 16px; position: relative; }
.fees-plan--featured { border-color: var(--brand); box-shadow: 0 10px 28px rgb(12 61 51 / .12); }
.fees-badge {
  display: inline-block; margin: 0 0 8px; padding: 3px 8px; border-radius: 999px;
  background: #145c4b; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.fees-commission { margin: 0; font-size: 14px; }
.fees-plan h3 { margin: 0; }
.fees-price { margin: 8px 0 12px; font-size: 1.35rem; font-weight: 750; }
.fees-price span { font-size: 0.85rem; font-weight: 500; color: var(--ink-3); }
.fees-plan ul { margin: 0 0 12px; padding-inline-start: 1.1rem; color: var(--ink-3); }
.apply-body { background: var(--ground); }
.apply-hero {
  position: relative;
  overflow: hidden;
  margin: 8px 0 28px;
  padding: 32px 28px 36px;
  border-radius: 24px;
  background: #071512;
  color: #fff;
}
.apply-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(920px 480px at 88% -8%, #1f8a6e 0%, transparent 58%),
    radial-gradient(720px 420px at -8% 108%, #145c4b 0%, transparent 52%),
    linear-gradient(180deg, rgb(255 255 255 / 0.04), transparent 28%);
  pointer-events: none;
}
.apply-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgb(255 255 255 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 72%);
  pointer-events: none;
}
.apply-hero > * { position: relative; z-index: 1; }
.apply-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgb(255 255 255 / .7);
}
.apply-hero h1 {
  margin: 10px 0 0;
  max-width: 18ch;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: -.03em;
  line-height: 1.15;
  color: #fff;
}
.apply-lead {
  margin: 14px 0 0;
  max-width: 36rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: rgb(255 255 255 / .82);
  overflow-wrap: anywhere;
}
.apply-hero-cta {
  margin-top: 20px;
  background: #fff;
  border-color: #fff;
  color: #0c3d33;
  font-weight: 700;
}
.apply-hero-cta:hover { filter: brightness(0.96); }
.apply-hero--wide h1 { max-width: 28ch; }
.apply-hero-cta2 {
  margin-top: 20px;
  margin-inline-start: 10px;
  background: transparent;
  border-color: rgb(255 255 255 / .45);
  color: #fff;
  font-weight: 650;
}
.apply-hero-cta2:hover { background: rgb(255 255 255 / .08); }
.renter-subnav {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 4px 0 18px;
  padding: 2px 0 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.renter-subnav::-webkit-scrollbar { display: none; }
.renter-subnav a {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.renter-subnav a:hover { color: var(--brand); border-color: var(--brand); }
.renter-subnav a[aria-current="page"] {
  color: var(--brand-ink);
  background: var(--brand);
  border-color: var(--brand);
  font-weight: 700;
}
.renter-status {
  display: grid;
  gap: 14px;
  margin: 8px 0 24px;
}
@media (min-width: 720px) {
  .renter-status { grid-template-columns: 1fr 1fr; }
}
.renter-status section {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.renter-status h3 { margin: 0 0 10px; font-size: 0.95rem; }
.renter-status ul { margin: 0; padding-inline-start: 1.15rem; color: var(--ink-2); }
.renter-status li { margin: 4px 0; }
.renter-note { margin: 20px 0 8px; }
.apply-layout {
  display: grid;
  gap: 28px;
}
@media (min-width: 720px) {
  .apply-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 22rem);
    align-items: start;
  }
}
.apply-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.apply-benefits li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}
.apply-benefits strong { display: block; font-size: 1.02rem; }
.apply-benefits p { margin: 6px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.apply-copy h2 { margin: 28px 0 12px; font-size: 1.15rem; }
.apply-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  counter-reset: apply-step;
}
.apply-steps li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 4px 12px;
  align-items: start;
  counter-increment: apply-step;
}
.apply-steps li::before {
  content: counter(apply-step);
  grid-row: 1 / span 2;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 750;
  font-size: 13px;
  display: grid;
  place-items: center;
}
.apply-steps strong { font-size: 15px; }
.apply-steps span { color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.apply-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
}
@media (min-width: 720px) {
  .apply-form { position: sticky; top: 16px; }
}
.apply-form h2 { margin: 0; font-size: 1.15rem; }
.apply-form-lead, .apply-fine { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.apply-fine { margin-top: 4px; }
.apply-result-ok { color: var(--ok); font-weight: 650; }
.anbieter-cta { margin: 8px 0 20px; }
.anbieter-fleet { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 12px 0 24px; }
.anbieter-fleet a.car-card { text-decoration: none; color: inherit; }
@media (min-width: 640px) {
  .anbieter-fleet { grid-template-columns: 1fr 1fr; }
}
.lead { font-size: 1.05rem; line-height: 1.6; }

.site-footer {
  margin-top: 48px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 40px 24px 28px;
  color: var(--ink);
}
.site-footer a, .footer-linkbtn {
  color: var(--ink-2); text-decoration: none; background: none; border: 0;
  font: inherit; cursor: pointer; padding: 0; text-align: start;
}
.site-footer a:hover, .footer-linkbtn:hover { color: var(--brand); }
.site-footer a:focus-visible, .footer-linkbtn:focus-visible, .site-footer button:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px;
}
.site-footer__logo { font-weight: 750; letter-spacing: .1em; color: var(--brand) !important; font-size: 1.05rem; }
.site-footer__brand .brand-logo { height: 40px; max-width: 220px; }
.site-footer__claim { margin: 8px 0 6px; font-weight: 600; }
.site-footer__desc { color: var(--ink-2); font-size: 14px; max-width: 36rem; line-height: 1.55; }
.site-footer__grid {
  display: grid; gap: 28px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 1120px; margin: 28px auto 0;
}
.site-footer__brand { max-width: 1120px; margin: 0 auto; }
.site-footer__col h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 12px; }
.site-footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer__col a, .site-footer__col .footer-linkbtn { font-size: 14px; }
.footer-cta { font-weight: 700; color: var(--brand) !important; }
.site-footer__trust, .site-footer__pay {
  max-width: 1120px; margin: 28px auto 0; display: flex; flex-wrap: wrap; gap: 10px 18px;
  color: var(--ink-2); font-size: 13px; border-top: 1px solid var(--line); padding-top: 18px;
}
.pay-logo { border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; font-weight: 650; font-size: 12px; }
.site-footer__bottom {
  max-width: 1120px; margin: 22px auto 0; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between;
  font-size: 14px;
}
.site-footer__legalbar { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.site-footer__locale { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.site-footer__locale a[aria-current="true"] { font-weight: 700; color: var(--ink); }
.site-footer--compact { padding: 16px 24px; margin-top: 24px; }
.site-footer details { border-bottom: 1px solid var(--line); }
.site-footer details > summary {
  cursor: pointer; font-weight: 650; padding: 12px 0; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.site-footer details > summary::-webkit-details-marker { display: none; }
.site-footer details > summary::after {
  content: '';
  width: 0.45rem; height: 0.45rem;
  border-inline-end: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-inline-end: 4px;
  opacity: .55;
}
.site-footer details[open] > summary::after { transform: rotate(-135deg); }

@media (max-width: 900px) {
  .site-footer__grid { display: none; }
  .site-footer--mobile-acc { display: block; max-width: 1120px; margin: 20px auto 0; }
}
@media (min-width: 901px) {
  .site-footer--mobile-acc { display: none; }
}

.cookie-banner {
  position: sticky; bottom: 0; z-index: 40;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 16px 20px 20px; box-shadow: var(--shadow-l);
}
.cookie-banner p { max-width: 72rem; margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-panel { display: grid; gap: 8px; margin-top: 12px; font-size: 14px; }

.admin-minifoot {
  padding: 16px 24px 28px; font-size: 13px; color: var(--ink-3);
  display: flex; flex-wrap: wrap; gap: 10px 16px;
}

@media (max-width: 900px) {
  .legal-top__bar { padding: 10px 16px; gap: 8px; }
  .legal-main { padding: 4px 16px 20px; }
  .legal-main h1 { font-size: 1.4rem; }
  .legal-doc pre { font-size: 15px; }
  .legal-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
  .legal-card { padding: 14px 12px; min-height: 44px; }
  .legal-form { padding: 16px; }
  .apply-hero { padding: 22px 18px 24px; margin-bottom: 20px; }
  .apply-form { padding: 18px; }
  .site-footer {
    padding: 28px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  }
  .site-footer details > summary {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .site-footer--mobile-acc a,
  .site-footer--mobile-acc .footer-linkbtn {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
  .site-footer__trust, .site-footer__pay {
    margin-top: 16px;
    padding-top: 14px;
  }
  .site-footer__bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .site-footer__legalbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
  }
  .site-footer__legalbar a,
  .site-footer__legalbar button {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    max-height: 70dvh;
    overflow: auto;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  }
  .cookie-actions { flex-direction: column; }
  .cookie-actions .btn { width: 100%; min-height: 44px; }
  .cookie-panel label {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
}

@media (max-width: 760px) {
  .wrap { padding: 0 12px; }
  .tabbtn { min-height: 48px; padding: 8px 2px; }
  .tabbtn span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  input[type='text'], input[type='email'], input[type='password'], input[type='number'],
  input[type='date'], input[type='datetime-local'], input[type='tel'], input[type='search'],
  select, textarea {
    font-size: 16px;
    min-height: 44px;
  }
  .btn { min-height: 44px; }
  .iconbtn { min-width: 44px; min-height: 44px; }
  table.data { font-size: 13px; }
  table.data th, table.data td { padding: 12px 10px; }
  table.data td { white-space: nowrap; }
  .clickable td { min-height: 44px; }
  .section-head, .spread { flex-wrap: wrap; }
  .admin-minifoot {
    padding: 16px 16px calc(88px + env(safe-area-inset-bottom));
    gap: 8px 14px;
  }
  .admin-minifoot a { min-height: 44px; display: inline-flex; align-items: center; }
  .segmented {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .paymethod { min-height: 48px; }
}

.legal-main--home { max-width: 1120px; padding-top: 0; }
.home-nav {
  display: flex; flex-wrap: wrap; gap: 10px 18px;
  margin: 4px 0 16px; font-weight: 650;
}
.home-nav a { color: var(--ink-2); text-decoration: none; }
.home-nav a:hover { color: var(--brand); }
.home-search {
  margin-top: 22px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  color: #16211f;
}
.home-search__row {
  display: grid;
  gap: 10px;
}
@media (min-width: 860px) {
  .home-search__row {
    grid-template-columns: 1.4fr 1fr 1fr .7fr auto;
    align-items: end;
  }
}
.home-search .field > label { color: #46534f; }
.home-search input {
  background: #f4f6f4;
  color: #16211f;
  border-color: #d9ded9;
}
.home-search__cta { width: 100%; }
.home-trust { margin-top: 8px; }
.home-how {
  list-style: none; padding: 0; margin: 0 0 28px;
  display: grid; gap: 12px;
}
@media (min-width: 720px) {
  .home-how { grid-template-columns: repeat(4, 1fr); }
}
.home-how li {
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.home-how p { margin: 6px 0 0; color: var(--ink-3); line-height: 1.5; }
.home-b2b {
  margin: 8px 0 28px;
  padding: 22px 22px 20px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.crumbs ol {
  display: flex; flex-wrap: wrap; gap: 6px;
  list-style: none; padding: 0; margin: 0 0 16px;
  color: var(--ink-3); font-size: 13px;
}
.crumbs a { color: inherit; }
.crumbs li:not(:last-child)::after {
  content: "→"; margin-inline-start: 6px; opacity: .45;
}
