:root {
  color-scheme: light;
  --ink: #21231f; --muted: #5d6258; --paper: #f4f3ed; --white: #fffefa;
  --line: #dedfd6; --dark: #191c18; --yellow: #f5ce42; --rust: #8f3428;
  font: 16px/1.5 system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #99710b; outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.top { background: var(--dark); color: #fff; border-bottom: 3px solid var(--yellow); }
.bar { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; min-height: 74px; }
.brand { text-decoration: none; color: #fff; display: inline-flex; align-items: center; gap: 10px; width: fit-content; font-size: 21px; font-weight: 900; letter-spacing: .03em; line-height: .95; }
.demo { justify-self: end; color: var(--yellow); font: 700 11px/1 monospace; letter-spacing: .12em; border: 1px solid #776737; border-radius: 5px; padding: 7px 9px; }
nav { display: flex; gap: 8px; align-items: center; }
nav a { color: #d5d7cb; border-radius: 7px; padding: 9px 13px; font-size: .89rem; font-weight: 650; text-decoration: none; }
nav a:hover, nav a[aria-current] { color: white; background: #363a31; }
main { min-height: 67vh; }
.intro { margin: 39px 0 24px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.kicker { display: block; font: 700 .72rem/1.4 ui-monospace, monospace; letter-spacing: .15em; text-transform: uppercase; }
.intro .kicker, .panel .kicker { color: #655222; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.25rem, 5.3vw, 4.5rem); letter-spacing: -.073em; line-height: 1; margin: 6px 0 10px; }
h2 { font-size: 1.6rem; letter-spacing: -.045em; line-height: 1.15; }
h3 { font-size: 1.04rem; line-height: 1.25; }
.sub, .fine { color: var(--muted); }
.fine { font-size: .83rem; }
.btn { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 44px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { border-color: #888b7c; }
.btn.primary { background: var(--yellow); border-color: var(--yellow); color: #211e11; }
.btn.primary:hover { background: #ffda50; border-color: #9e7d1b; }
.btn.dark { background: var(--dark); border-color: var(--dark); color: #fff; }
.btn.dark:hover { background: #343a2e; }
.btn.text { background: transparent; border-color: transparent; padding-inline: 0; min-height: 40px; text-decoration: underline; text-underline-offset: 3px; }
.notice { padding: 11px 14px; border: 1px solid #e8d99c; border-radius: 8px; background: #fcf4d8; color: #51431e; font-size: .82rem; }
.vehicle-nav { display: flex; align-items: center; gap: 9px; overflow-x: auto; padding: 5px 3px 8px; margin: 14px -3px 7px; }
.vehicle-nav button { flex-shrink: 0; padding: 6px 12px; min-height: 40px; border-radius: 7px; border: 1px solid var(--line); color: var(--ink); background: var(--white); cursor: pointer; font-size: .83rem; font-weight: 700; }
.vehicle-nav button[aria-pressed="true"] { background: #363b31; color: #fff; border-color: #363b31; }
.dashboard { display: grid; grid-template-columns: 1.03fr 1fr; gap: 16px; }
.vehicle, .panel { min-width: 0; border-radius: 15px; padding: 23px; }
.vehicle { background: radial-gradient(ellipse at 75% 35%, #383c2e, #22261f 56%, #191d18); color: #fff; border: 1px solid #30352a; }
.vehicle .kicker { color: var(--yellow); margin-bottom: 7px; }
.vehicle h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); overflow-wrap: anywhere; }
.vehicle .vehicle-meta { color: #c3c7b7; font-size: .84rem; margin-top: 4px; }
.readings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.readings > div { border-top: 1px solid #53584a; padding-top: 9px; }
.readings strong, .limit strong { display: block; font-size: 1.34rem; line-height: 1.25; letter-spacing: -.04em; }
.readings span { color: #c3c7b7; font-size: .79rem; }
.vehicle .btn { width: 100%; margin-top: 13px; color: #fff; background: #34392f; border-color: #5a5e4f; }
.vehicle .btn:hover { background: #454c3d; }
.panel { border: 1px solid var(--line); background: var(--white); }
.service { display: flex; flex-direction: column; gap: 13px; }
.service-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tag { border-radius: 999px; background: #eaf0e3; color: #40553a; padding: 4px 9px; font-size: .73rem; font-weight: 750; }
.tag.warn { background: #faf0cb; color: #614e19; }
.tag.due { background: #fbe8df; color: var(--rust); }
.limits { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.limit { padding: 9px; border: 1px solid #e3e5d8; border-radius: 8px; background: #f5f5ee; min-width: 0; }
.limit span, .limit small { display: block; font-size: .72rem; color: var(--muted); overflow-wrap: anywhere; }
.limit strong { overflow-wrap: anywhere; font-size: clamp(1rem, 2.5vw, 1.35rem); margin: 3px 0; }
.track { background: #e8e9df; border-radius: 8px; height: 7px; overflow: hidden; margin-top: 6px; }
.track span { display: block; background: #d9a91e; height: 100%; }
.service .actions { margin-top: auto; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.log { margin-top: 16px; }
.log-head, .entry { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.log-head { margin-bottom: 10px; }
.entry { border-top: 1px solid var(--line); padding: 12px 0; }
.entry:last-child { padding-bottom: 0; }
.entry time { color: var(--muted); font-size: .83rem; white-space: nowrap; }
.log .fine, .empty .fine { margin-top: 5px; }
.empty { margin-top: 16px; }
.empty .btn { margin-top: 13px; }
footer { border-top: 1px solid var(--line); padding: 14px 0 24px; margin-top: 24px; color: var(--muted); font-size: .75rem; display: flex; gap: 10px; justify-content: space-between; }
footer span:first-child { font-weight: 800; letter-spacing: .09em; }
dialog { width: min(500px, calc(100% - 26px)); max-height: calc(100dvh - 25px); overflow: auto; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; background: var(--white); padding: 21px; box-shadow: 0 24px 80px #14181060; }
dialog::backdrop { background: #161914a6; }
.dialog-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; }
.icon-btn { border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: 8px; cursor: pointer; width: 40px; height: 40px; font-size: 1.3rem; flex-shrink: 0; }
form { display: grid; gap: 12px; }
form label { display: grid; gap: 4px; font-size: .88rem; font-weight: 650; }
form input, form select, form textarea { width: 100%; border: 1px solid #aeb1a4; padding: 8px 10px; min-height: 43px; border-radius: 7px; background: #fff; color: var(--ink); font-size: 1rem; }
form textarea { min-height: 82px; resize: vertical; }
form .fields { display: grid; gap: 9px; grid-template-columns: 1fr 1fr; min-width: 0; }
.error { font-weight: 650; color: var(--rust); font-size: .86rem; }
.toast { position: fixed; z-index: 2; bottom: 12px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 24px); width: max-content; background: #252922; color: #fff; padding: 10px 15px; border-radius: 8px; box-shadow: 0 4px 18px #0003; }
.toast:empty { display: none; }
@media (max-width: 700px) {
  .wrap { width: calc(100% - 28px); }
  .bar { grid-template-columns: 1fr auto; row-gap: 6px; padding-top: 12px; }
  nav { grid-column: 1/-1; grid-row: 2; padding: 5px 0 8px; justify-content: space-between; }
  nav a { flex: 1; text-align: center; }
  .intro { margin: 22px 0 14px; align-items: start; flex-wrap: wrap; }
  .intro h1 { margin-bottom: 6px; }
  .intro .sub { font-size: .89rem; }
  .dashboard { grid-template-columns: 1fr; gap: 11px; }
  .vehicle, .panel { padding: 16px; }
  .service .actions .primary { flex: 1; }
  .entry { align-items: start; flex-wrap: wrap; }
}

.brand img { display: block; width: 108px; height: auto; }
.vehicle-photo { margin: 12px 0 9px; }
.vehicle-photo img { display: block; width: 100%; height: clamp(180px, 25vw, 295px); object-fit: cover; object-position: center 55%; background: #34392f; border: 1px solid #53584a; border-radius: 8px; }
.vehicle-photo figcaption { margin-top: 4px; font-size: .73rem; }
.vehicle-photo a { color: #d6d9c9; text-underline-offset: 3px; }
.features { margin-top: 16px; }
.feature { display: flex; flex-direction: column; gap: 10px; }
.feature .actions { margin-top: auto; }
.feature a { color: inherit; }
.entry-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.entry-meta .btn { min-height: 30px; }
.request-entry > div { min-width: 0; overflow-wrap: anywhere; }
.request-note { white-space: pre-wrap; }
.request-entry .btn { flex-shrink: 0; }
.btn:disabled { opacity: .62; cursor: default; }
form input[type=file] { padding: 5px; font-size: .86rem; }
form input::file-selector-button { padding: 6px 10px; font: inherit; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); color: var(--ink); }
@media(max-width:700px) {
  .brand img { width: 90px; }
  .vehicle-photo img { height: clamp(180px, 57vw, 275px); }
  .features { margin-top: 11px; }
}

.admin-link { color: inherit; }
footer { flex-wrap: wrap; }

.vehicle-options { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; }
.vehicle-options .btn.text { background: transparent; border: 0; margin: 0; width: auto; color: #d6d9c9; font-size: .82rem; }
.vehicle-options .btn.text:hover { background: transparent; color: #fff; }
.personal-photo img { object-fit: contain; height: auto; max-height: 340px; }
.archived-vehicles { margin-top: 16px; }
.archived-vehicles summary { cursor: pointer; font-weight: 750; }
.archived-vehicles .entry:first-of-type { margin-top: 12px; }
form .photo-check { display: flex; align-items: center; gap: 8px; }
form .photo-check input { width: 18px; min-height: 18px; }

.manufacturer-plan { border-top: 1px solid var(--line); padding-top: 9px; }
.manufacturer-plan summary { cursor: pointer; font-weight: 750; }
.manufacturer-plan ul, .service-work { margin: 6px 0; padding-left: 20px; font-size: .84rem; }
.manufacturer-plan a { color: inherit; }

.last-service-fields { display: grid; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }

/* --- Bader Garage mit Kundenkonto --- */
nav[hidden] { display: none; }
.loading { padding: 40px 0; }
.login-panel { max-width: 560px; display: grid; gap: 14px; }
.login-panel form { display: grid; gap: 12px; }
.login-panel .activation { font-size: .92rem; }
.login-done h2 { margin: 0 0 6px; }
.debug-link:empty { display: none; }
.legal-links { margin-top: 14px; }
.legal-links a, .footer-links a { color: inherit; }
.footer-links { display: inline-flex; gap: 14px; flex-wrap: wrap; }
#account-name:empty { display: none; }
.account { max-width: 680px; display: grid; gap: 10px; margin-top: 14px; }
.account h2 { margin: 0; }
.danger-zone { border-color: #e9c9bd; }
.legal { max-width: 760px; }
.legal h2 { margin-top: 26px; }
.legal li { margin: 4px 0; }
.login-done .code-form { margin: 14px 0 8px; }
.login-done .code-form input { font-size: 1.6rem; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }

/* Bader Garage App herunterladen */
.install-banner { display: grid; grid-template-columns: 48px 1fr auto auto; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border: 1px solid #e8d99c; border-radius: 12px; background: #fcf4d8; }
.install-banner[hidden] { display: none; }
.install-banner img { border-radius: 11px; display: block; }
.install-banner strong { display: block; font-size: .95rem; }
.install-banner span { display: block; color: #51431e; font-size: .8rem; margin-top: 2px; }
.install-banner .icon-btn { background: transparent; border-color: transparent; }
@media (max-width: 560px) {
  .install-banner { grid-template-columns: 44px 1fr auto; }
  .install-banner img { width: 44px; height: 44px; }
  .install-banner .btn { grid-column: 1 / -1; grid-row: 2; }
  .install-banner .icon-btn { grid-column: 3; grid-row: 1; }
}
.install-sheet .dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.install-sheet h2 { margin: 0; font-size: 1.25rem; }
.install-sheet > .btn { width: 100%; margin-top: 8px; }
.install-steps { padding-left: 1.3em; margin: 14px 0; display: grid; gap: 12px; }
.install-steps li { line-height: 1.45; }
.install-icon { width: 22px; height: 22px; vertical-align: -5px; margin-left: 4px; color: #1d6fd6; }
.activation-form input[name=code] { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 1.4rem; letter-spacing: .18em; text-transform: uppercase; text-align: center; }
