/* EASY REPAIR Verwaltung
   Gestaltung wie myeasyrepair.de: hell, Inter, kräftige Großbuchstaben-Überschriften,
   weiße Karten mit feinem Rand, kleine Pillen-Labels, Navy als Hauptfarbe. */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-display: swap;
}

:root {
  /* Markenfarben der Website */
  --navy-deep: #101826;
  --navy: #16305c;
  --navy-hover: #0d2444;
  --navy-soft: #2c4a7c;
  --navy-light: #93a8cf;
  --navy-tint: #eef2f9;
  --amber: #d97706;
  --amber-tint: #fdf3e3;
  --green: #075e54;

  --ink: #141414;
  --ink-soft: #334155;
  --muted: #566072;
  --bg: #f7f7f7;
  --surface: #ffffff;
  --line: #e2e7ef;
  --line-strong: #cfd6e2;
  --danger: #b42318;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 38, .05);
  --shadow-md: 0 8px 24px rgba(16, 24, 38, .08);
  --shadow-lg: 0 24px 64px rgba(16, 24, 38, .22);
  --head-h: 72px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.55 var(--sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-hover); }
p { margin: 0 0 .75rem; }
code { font-family: var(--mono); font-size: .88em; background: var(--navy-tint); color: var(--navy); padding: 1px 6px; border-radius: 5px; }
[hidden] { display: none !important; }

h1, h2, h3 { font-weight: 800; letter-spacing: -.02em; line-height: 1.08; margin: 0; color: var(--navy-deep); }
h1 { font-size: clamp(1.45rem, 1.2rem + .9vw, 1.9rem); text-transform: uppercase; }
h2 { font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; margin: 1.6rem 0 .7rem; }
h2:first-child { margin-top: 0; }

.muted { color: var(--muted); font-size: .92em; }
.pre { white-space: pre-wrap; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-weight: 500; letter-spacing: .01em; }
.icon { flex: none; }

:focus-visible { outline: 3px solid rgba(44, 74, 124, .35); outline-offset: 2px; border-radius: 6px; }

/* Kleine Pillen-Labels wie „SMARTPHONE-REPARATUR IN WALDKRAIBURG“ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  color: var(--navy-soft); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-size: .88rem; font-weight: 600; color: var(--ink-soft);
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--st, var(--navy)); box-shadow: 0 0 0 3px var(--st-bg, var(--navy-tint)); }
.chip b { color: var(--navy-deep); font-weight: 800; font-variant-numeric: tabular-nums; }

/* EASYREPAIR-Schriftzug */
img.wordmark { display: block; width: auto; height: 20px; max-width: 100%; }
.brand img.wordmark { height: 19px; }
.guest .brand-mark img.wordmark { width: 220px; max-width: 60%; height: auto; }
.public-brand img.wordmark { height: 21px; }

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

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 28px; height: var(--head-h); max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand small { color: var(--muted); font-size: .78rem; font-weight: 600; letter-spacing: .02em; padding-top: 2px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px;
  color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.nav a:hover { background: var(--bg); color: var(--navy-deep); }
.nav a[aria-current="page"] { background: var(--navy-tint); color: var(--navy); }

.head-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.search-trigger {
  display: inline-flex; align-items: center; gap: 10px; height: 42px; min-width: 250px; padding: 0 8px 0 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
  color: var(--muted); font: 500 .95rem var(--sans); cursor: pointer; text-align: left;
}
.search-trigger:hover { border-color: var(--line-strong); background: #fff; color: var(--ink-soft); }
.search-trigger span { flex: 1; }
.kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px;
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; background: #fff;
  color: var(--muted); font: 600 .72rem var(--sans);
}
.icon-btn {
  display: none; align-items: center; justify-content: center; width: 42px; height: 42px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink-soft); cursor: pointer;
}

.account { position: relative; }
.account summary {
  list-style: none; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; background: var(--navy-tint); color: var(--navy);
  font-weight: 800; font-size: .95rem; cursor: pointer; text-transform: uppercase;
}
.account summary::-webkit-details-marker { display: none; }
.account[open] summary { box-shadow: 0 0 0 3px rgba(44, 74, 124, .2); }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: 260px; padding: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-md);
}
.account-menu .who { padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu a, .account-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--ink-soft); font: 500 .93rem var(--sans); text-decoration: none; cursor: pointer; text-align: left;
}
.account-menu a:hover, .account-menu button:hover { background: var(--bg); color: var(--navy-deep); }
.account-menu form { margin: 0; }

.main { max-width: 1320px; margin: 0 auto; padding: clamp(22px, 3.4vw, 44px) clamp(16px, 3vw, 32px) 64px; }
.tabbar, .foot-account { display: none; }

@media (max-width: 1080px) {
  .search-trigger { min-width: 0; }
  .search-trigger span, .search-trigger .kbd { display: none; }
  .search-trigger { width: 42px; padding: 0; justify-content: center; }
}

@media (max-width: 860px) {
  :root { --head-h: 60px; }
  .nav, .head-actions .btn, .brand small { display: none; }
  .topbar-in { gap: 12px; }
  .app { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: flex; position: fixed; inset: auto 0 0 0; z-index: 40;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 56px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600;
  }
  .tabbar a[aria-current="page"] { color: var(--navy); }
  .tabbar a.new .icon { width: 44px; height: 44px; padding: 10px; border-radius: 14px; background: var(--navy); color: #fff; box-shadow: 0 6px 16px rgba(22, 48, 92, .3); }
  .tabbar a.new { gap: 0; }
  .tabbar a.new span { display: none; }
  .foot-account {
    display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center;
    margin-top: 44px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted);
  }
  .foot-account form { margin: 0; }
  .foot-account button { background: none; border: 0; padding: 0; color: var(--navy); font: inherit; text-decoration: underline; cursor: pointer; }
  .account { display: none; }
}

/* Anmeldung */
.guest { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 20% 0%, #fff 0%, var(--bg) 60%); }
.guest .main { max-width: 440px; padding: 0; width: 100%; }
.guest .card.narrow { margin: 0; padding: 34px 30px; border-radius: 20px; box-shadow: var(--shadow-md); }
.guest .brand-mark { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.guest h1 { font-size: 1.5rem; margin-bottom: 14px; }
.guest .btn { width: 100%; justify-content: center; margin-top: 6px; }

/* ---------- Seitenkopf ---------- */

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; margin-bottom: 26px; }
.page-head .eyebrow { margin-bottom: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 24px; margin-bottom: 28px; }
.hero .eyebrow { margin-bottom: 16px; }
.hero p { margin: 12px 0 0; color: var(--muted); font-size: 1.05rem; max-width: 52ch; }

.doc-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 26px; }
.doc-head .no { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.doc-head h1 { margin-bottom: 12px; }
.doc-head .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 18px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; }
.back:hover { color: var(--navy); }

/* ---------- Bedienelemente ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px;
  background: var(--navy); color: #fff; font: 700 .9rem/1 var(--sans); text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 4px 12px rgba(22, 48, 92, .18);
  transition: background .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: var(--navy-hover); color: #fff; box-shadow: 0 6px 18px rgba(22, 48, 92, .26); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #fff; color: var(--navy-deep); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn.secondary:hover { background: var(--bg); color: var(--navy-deep); border-color: var(--navy-light); }
.btn.green { background: var(--green); box-shadow: 0 4px 12px rgba(7, 94, 84, .2); }
.btn.green:hover { background: #0a7a6c; }
.btn.danger { background: #fff; color: var(--danger); border-color: #f1c4bf; box-shadow: none; }
.btn.danger:hover { background: #fdf0ef; color: var(--danger); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: .84rem; border-radius: 9px; }
.btn .done { color: #86efac; }
.btn.secondary .done { color: #15803d; }

label { display: block; font-size: .88rem; font-weight: 600; color: var(--ink-soft); }
label.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; font-size: .97rem; color: var(--ink); }
label.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--navy); flex: none; }

input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], input[type=number], input[type=date], input[type=month], input[type=url], select, textarea {
  display: block; width: 100%; min-height: 48px; margin-top: 7px; padding: 11px 14px;
  border: 1px solid var(--line-strong); border-radius: 12px;
  background: #fff; color: var(--ink); font: 500 1rem/1.4 var(--sans);
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #9aa3b2; font-weight: 400; }
input:hover, select:hover, textarea:hover { border-color: var(--navy-light); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 0; border-color: var(--navy-soft); box-shadow: 0 0 0 4px rgba(44, 74, 124, .14); }

.stack > * + * { margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 16px 18px; }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.grid2.top { align-items: start; }
fieldset.card > :not(legend) + :not(legend), .grid2 + .stack, .grid2 + label, label + .grid2 { margin-top: 16px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px 26px; margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
fieldset.card { min-width: 0; }
.card.narrow, .card.form-narrow { max-width: 540px; }
legend { float: left; width: 100%; padding: 0; margin: 0 0 16px; font-weight: 800; font-size: 1.05rem; color: var(--navy-deep); }
fieldset.card > :not(legend) { clear: both; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-title h2 { margin: 0; }

.flash { display: flex; gap: 10px; padding: 13px 16px; border-radius: 12px; margin-bottom: 18px; border: 1px solid; font-weight: 600; font-size: .95rem; }
.flash-success { background: #ecfdf3; border-color: #abefc6; color: #085d3a; }
.flash-info { background: var(--navy-tint); border-color: #c7d4ea; color: var(--navy); }
.flash-warning { background: var(--amber-tint); border-color: #f5d29a; color: #7a3e04; }
.flash-error { background: #fef3f2; border-color: #fecdca; color: #912018; }

/* Suchfeld auf den Seiten */
.search { position: relative; flex: 1 1 220px; min-width: 0; }
.search .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { margin-top: 0; padding-left: 46px; min-height: 46px; border-radius: 12px; box-shadow: var(--shadow-sm); }
.search .kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.searchbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.searchbar select { width: auto; flex: 0 1 200px; margin-top: 0; min-height: 46px; border-radius: 12px; }
.searchbar .btn { min-height: 46px; border-radius: 12px; }

/* ---------- Status ---------- */

.st-angenommen     { --st: #2c4a7c; --st-bg: #e8eef8; --st-fg: #16305c; }
.st-diagnose       { --st: #6d4fc2; --st-bg: #efeafb; --st-fg: #4a2f99; }
.st-wartet_auf_teil{ --st: #d97706; --st-bg: #fdf3e3; --st-fg: #92400e; }
.st-in_reparatur   { --st: #0e7490; --st-bg: #e3f4f8; --st-fg: #0b5266; }
.st-fertig         { --st: #15803d; --st-bg: #e7f6ec; --st-fg: #14532d; }
.st-abgeholt       { --st: #7c8696; --st-bg: #eef0f4; --st-fg: #475266; }
.st-storniert      { --st: #b42318; --st-bg: #fdecea; --st-fg: #912018; }

.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px;
  background: var(--st-bg, #eef0f4); color: var(--st-fg, #475266); font-size: .8rem; font-weight: 700; white-space: nowrap; vertical-align: middle;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--st, #7c8696); }

/* ---------- Werkbank ---------- */

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(272px, 82vw); gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 12px; margin: 0 -2px; }
@media (min-width: 760px) { .board { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); overflow: visible; } }

.lane { scroll-snap-align: start; min-width: 0; background: #eff1f5; border-radius: 18px; padding: 12px; }
.lane-head { display: flex; align-items: center; gap: 9px; padding: 4px 6px 12px; font-weight: 700; font-size: .92rem; color: var(--navy-deep); }
.lane-head::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--st); box-shadow: 0 0 0 3px var(--st-bg); }
.lane-count { margin-left: auto; min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; color: var(--st-fg); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; font-size: .8rem; font-weight: 700; }
.lane-empty { padding: 18px 12px; border: 1.5px dashed #d3d9e4; border-radius: 12px; color: var(--muted); font-size: .88rem; text-align: center; }
.lane .tag + .tag { margin-top: 10px; }

.tags { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }

.tag {
  display: block; background: #fff; color: var(--ink); text-decoration: none;
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.tag:hover { border-color: var(--navy-light); color: var(--ink); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.tag-top { display: flex; align-items: center; gap: 8px; padding: 12px 14px 0; }
.tag-hole { display: none; }
.tag-no { font-family: var(--mono); font-weight: 500; font-size: .78rem; color: var(--navy-soft); background: var(--navy-tint); padding: 2px 7px; border-radius: 6px; }
.tag-age { margin-left: auto; font-size: .78rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tag-age.late { color: #b45309; }
.tag-body { display: block; padding: 10px 14px 12px; }
.tag-device { display: block; font-weight: 800; font-size: 1.02rem; line-height: 1.25; color: var(--navy-deep); letter-spacing: -.01em; }
.tag-issue { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.tag-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: .88rem; }
.tag-foot .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ink-soft); }
.tag-foot .num { font-weight: 800; color: var(--navy-deep); }

/* ---------- Tabellen ---------- */

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 18px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
th { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: #fafbfc; white-space: nowrap; }
tbody tr { transition: background .1s; }
tbody tr:hover td { background: #f8fafc; }
tr:last-child td { border-bottom: 0; }
th.num { text-align: right; }
td.num { font-weight: 700; color: var(--navy-deep); }
td a.mono { font-size: .86rem; color: var(--navy-soft); background: var(--navy-tint); padding: 3px 8px; border-radius: 6px; text-decoration: none; }
td a.mono:hover { background: #dfe7f5; }
td strong { font-weight: 700; }

/* ---------- Auftrag ---------- */

.split { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; margin-bottom: 20px; }
@media (min-width: 1000px) { .split { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.split > .card { margin-bottom: 0; }

.facts { margin: 0; display: grid; gap: 0; }
.facts > div { display: grid; grid-template-columns: 1fr; gap: 3px; padding: 14px 0; border-top: 1px solid var(--line); }
.facts > div:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 560px) { .facts > div { grid-template-columns: 160px 1fr; gap: 18px; } }
.facts dt { color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding-top: 2px; }
.facts dd { margin: 0; }
.facts .big { font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em; color: var(--navy-deep); font-variant-numeric: tabular-nums; }
.contact { display: inline-flex; align-items: center; gap: 8px; margin: 6px 10px 0 0; padding: 6px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); text-decoration: none; font-size: .9rem; font-weight: 600; }
.contact:hover { background: var(--navy-tint); border-color: #c7d4ea; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 24px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.timeline li { position: relative; padding: 0 0 18px 8px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -24px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--st); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line-strong); }
.timeline strong { font-weight: 700; color: var(--navy-deep); }
.timeline .when { color: var(--muted); font-size: .85rem; margin-left: 8px; }
.timeline .note { display: block; margin-top: 3px; color: var(--ink-soft); }
.timeline .sent { display: inline-flex; align-items: center; gap: 4px; color: #15803d; font-size: .82rem; font-weight: 600; margin-left: 8px; }

.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 12px 0; border-top: 1px solid var(--line); }
.plain li:first-child { border-top: 0; padding-top: 0; }
.plain .row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 3px; }
.plain a.mono { font-size: .84rem; text-decoration: none; color: var(--navy-soft); background: var(--navy-tint); padding: 2px 7px; border-radius: 6px; }

details.card summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-weight: 800; font-size: 1.05rem; color: var(--navy-deep); list-style: none; }
details.card summary::-webkit-details-marker { display: none; }
details.card summary::after { content: "+"; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); font-weight: 600; color: var(--muted); }
details.card[open] summary::after { content: "–"; }
details.card[open] summary { margin-bottom: 20px; }

/* ---------- Suchfenster ---------- */

.palette-backdrop {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-start; justify-content: center;
  padding: min(12vh, 110px) 16px 16px; background: rgba(16, 24, 38, .42);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.palette {
  display: flex; flex-direction: column; width: 100%; max-width: 640px; max-height: min(76vh, 680px);
  background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden;
  animation: pal-in .14s ease-out;
}
@keyframes pal-in { from { opacity: 0; transform: translateY(-6px) scale(.985); } to { opacity: 1; transform: none; } }
.palette-head { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.palette-head .icon { color: var(--muted); }
.palette-head input { flex: 1; min-height: 62px; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; font-size: 1.1rem; font-weight: 600; color: var(--navy-deep); }
.palette-head input:focus-visible { box-shadow: none; }
.palette-close { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; font-size: 1.3rem; line-height: 1; }
.palette-close:hover { background: var(--bg); color: var(--ink); }
.palette-body { flex: 1; overflow-y: auto; padding: 8px 10px 12px; overscroll-behavior: contain; }
.pal-group { margin-top: 8px; }
.pal-group-title { display: flex; justify-content: space-between; padding: 8px 10px 6px; font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pal-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; margin-top: 4px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  color: var(--ink); text-decoration: none; cursor: pointer;
}
.pal-item:hover { border-color: var(--line-strong); color: var(--ink); }
.pal-item[aria-selected="true"] { border-color: var(--navy-light); background: #f6f8fc; box-shadow: 0 0 0 3px rgba(44, 74, 124, .1); }
.pal-ico { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--navy-tint); color: var(--navy); }
.pal-main { flex: 1; min-width: 0; }
.pal-title { display: block; font-weight: 700; color: var(--navy-deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-sub { display: block; margin-top: 1px; font-size: .85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.pal-price { font-weight: 800; color: var(--navy-deep); font-variant-numeric: tabular-nums; }
.pal-empty { padding: 34px 16px; text-align: center; color: var(--muted); }
.pal-empty b { display: block; color: var(--navy-deep); margin-bottom: 4px; }
.palette-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 10px 16px; border-top: 1px solid var(--line); background: #fafbfc; font-size: .78rem; color: var(--muted); }
.palette-foot span { display: inline-flex; align-items: center; gap: 6px; }
.palette-foot .kbd { height: 20px; min-width: 20px; font-size: .68rem; }
mark { background: #fdecc8; color: inherit; border-radius: 3px; padding: 0 1px; }
body.pal-open { overflow: hidden; }
@media (max-width: 640px) {
  .palette-backdrop { padding: 0; align-items: stretch; }
  .palette { max-width: none; max-height: none; border-radius: 0; }
  .palette-foot { display: none; }
  .pal-side .pill { display: none; }
  .pal-ico { width: 32px; height: 32px; }
}
@media (max-width: 860px) { .search .kbd { display: none; } }


/* Kundenfelder */
.grid-zip { display: grid; grid-template-columns: 140px 1fr; gap: 16px 18px; }
@media (min-width: 760px) { .grid-zip { grid-template-columns: 140px minmax(0, calc(50% - 158px)); } }
.biz-toggle { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfc; }
.pill.biz { --st: var(--navy-soft); --st-bg: var(--navy-tint); --st-fg: var(--navy); font-size: .72rem; padding: 2px 8px 2px 7px; }
.stack > .grid2 + .grid-zip, .grid2 + .grid-zip { margin-top: 16px; }

/* ---------- Reparatur-Auswahl aus der Preisliste ---------- */

.picker { margin-bottom: 18px; }
.picker .search input { min-height: 54px; }
.picker-hits { display: grid; gap: 6px; margin-top: 8px; }
.picker-hits:empty { display: none; }
.picker-hit {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  font: inherit; text-align: left; cursor: pointer;
}
.picker-hit b { font-weight: 700; color: var(--navy-deep); }
.picker-hit span { color: var(--muted); font-size: .86rem; }
.picker-hit[aria-selected="true"] { border-color: var(--navy-light); background: #f6f8fc; box-shadow: 0 0 0 3px rgba(44, 74, 124, .1); }
.picker-empty { margin: 8px 2px 0; color: var(--muted); font-size: .9rem; }

.picker-panel { border: 1px solid var(--line); border-radius: 16px; background: #fafbfc; padding: 14px; }
.picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 4px 12px; }
.picker-brand { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--navy-soft); }
.picker-title { display: block; font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; color: var(--navy-deep); }
.picker-repairs { display: grid; gap: 8px; }
@media (min-width: 900px) { .picker-repairs { grid-template-columns: 1fr 1fr; } }
.picker-repair { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.picker-repair.single { padding: 0; border: 0; background: none; }
.picker-repair-name { padding: 2px 4px 8px; font-weight: 700; color: var(--navy-deep); font-size: .95rem; }
.picker-variants { display: grid; gap: 6px; }
.picker-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font: 600 .93rem var(--sans); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .12s, background .12s;
}
.picker-repair.single .picker-opt { border-radius: 12px; min-height: 52px; font-weight: 700; color: var(--navy-deep); }
.picker-opt:hover { border-color: var(--navy-light); }
.picker-opt[aria-pressed="true"] { border-color: var(--navy); background: var(--navy-tint); box-shadow: inset 0 0 0 1px var(--navy); }
.picker-opt[aria-pressed="true"] .picker-opt-label::before { content: "✓"; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 8px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .7rem; vertical-align: 1px; }
.picker-opt-label em { margin-left: 8px; padding: 2px 7px; border-radius: 999px; background: var(--amber-tint); color: #92400e; font-style: normal; font-size: .7rem; font-weight: 700; }
.picker-opt-price { flex: none; font-weight: 800; color: var(--navy-deep); font-variant-numeric: tabular-nums; }
.picker-opt-price.none { font-weight: 600; color: var(--muted); font-size: .86rem; }

.picker-cart { margin-top: 14px; border: 1px solid var(--navy-light); border-radius: 16px; background: #fff; overflow: hidden; }
.picker-cart-head { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--navy-tint); font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--navy); }
.picker-cart-head span:last-child { text-transform: none; letter-spacing: 0; font-size: .95rem; font-weight: 800; color: var(--navy-deep); }
.picker-cart ul { list-style: none; margin: 0; padding: 0; }
.picker-cart li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
.picker-cart li:first-child { border-top: 0; }
.picker-line { flex: 1; min-width: 0; }
.picker-line b { display: block; font-weight: 700; color: var(--navy-deep); }
.picker-line span { display: block; font-size: .85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
input.picker-price { width: 110px; min-height: 40px; margin: 0; padding: 8px 10px; text-align: right; font-weight: 700; border-radius: 10px; }
.picker-remove { flex: none; width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-size: 1.3rem; cursor: pointer; }
.picker-remove:hover { background: #fef3f2; color: var(--danger); }
.picker-status { margin: 10px 2px 0; font-size: .8rem; color: var(--muted); }

/* Positionen in Auftrag und Schein */
.items { list-style: none; margin: 0; padding: 0; }
.items li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 4px 0; }
.items li + li { border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 4px; }
.items b { font-weight: 700; }
.items .muted { display: block; font-size: .86rem; }
.items .num { font-weight: 800; color: var(--navy-deep); }

/* ---------- Schein ---------- */

.paper { max-width: 840px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(22px, 4vw, 44px); margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.paper-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 24px; padding-bottom: 22px; border-bottom: 2px solid var(--navy-deep); margin-bottom: 22px; }
.paper-head h1 { font-size: 1.6rem; margin-bottom: 8px; }
.paper-head .no { color: var(--navy-soft); font-size: .95rem; }
.paper-head .biz { text-align: right; font-size: .9rem; line-height: 1.5; color: var(--ink-soft); }
.paper-head .biz img.wordmark { height: 22px; margin: 0 0 8px auto; }
.paper .facts > div { padding: 10px 0; }
.terms { margin: 24px 0 0; padding-left: 1.2rem; font-size: .88rem; color: var(--ink-soft); }
.terms li + li { margin-top: 4px; }
.sign { margin-top: 36px; max-width: 400px; }
.sig-line { border-bottom: 1.5px solid var(--ink); height: 78px; }
.sig-img { display: block; max-width: 100%; height: 96px; object-fit: contain; object-position: left bottom; border-bottom: 1.5px solid var(--ink); }

.cutoff { margin-top: 36px; padding-top: 14px; border-top: 2px dashed #aab4c4; position: relative; }
.cutoff > .icon { position: absolute; top: -13px; left: 14px; background: #fff; padding: 0 6px; color: var(--muted); width: 32px; height: 26px; }
.cut-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; max-width: 480px; margin-top: 10px; padding: 10px 14px; border: 1.5px solid var(--ink); border-radius: var(--r-sm); }
.cut-tag .tag-hole { display: block; flex: none; width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--ink); }
.cut-tag b { font-weight: 800; }

.sigpad {
  display: block; width: 100%; max-width: 700px; height: auto; aspect-ratio: 700 / 220; margin-bottom: 16px;
  background: #fbfcfe; border: 2px dashed var(--line-strong); border-radius: 14px; touch-action: none; cursor: crosshair;
}

/* ---------- Druck ---------- */

@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 11.5pt; }
  .app { padding: 0; }
  .topbar, .tabbar, .no-print, .flash, .foot-account, .palette-backdrop { display: none !important; }
  .main { padding: 0; max-width: none; }
  .paper { border: 0; box-shadow: none; border-radius: 0; padding: 0; max-width: none; }
  a { color: inherit; text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ======================================================================
   Version 4: Kostenvoranschlag, Auswertung, Kundenkommunikation, Garantie
   ====================================================================== */

.small { font-size: .84rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hint { display: block; margin-top: 6px; font-size: .8rem; font-weight: 500; color: var(--muted); }
.stack-cards { display: grid; gap: 20px; align-content: start; }
.stack-cards > .card { margin-bottom: 0; }
.inline-form { margin: 10px 0 0; }
.status-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.status-row form { margin: 0; }

.est-offen      { --st: #2c4a7c; --st-bg: #e8eef8; --st-fg: #16305c; }
.est-angenommen { --st: #15803d; --st-bg: #e7f6ec; --st-fg: #14532d; }
.est-abgelehnt  { --st: #7c8696; --st-bg: #eef0f4; --st-fg: #475266; }

/* Umschalter Reparatur / Versicherung */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.segmented label { position: relative; display: block; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; }
.segmented span { display: block; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; }
.segmented b { display: block; font-weight: 700; color: var(--navy-deep); }
.segmented small { color: var(--muted); font-weight: 500; }
.segmented input:checked + span { border-color: var(--navy); background: var(--navy-tint); box-shadow: inset 0 0 0 1px var(--navy); }
.segmented input:focus-visible + span { outline: 3px solid rgba(44, 74, 124, .35); outline-offset: 2px; }

/* KVA senden */
.send-grid, .wa-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.mail-row { display: flex; gap: 8px; margin: 12px 0 8px; }
.mail-row input { margin: 0; min-height: 40px; flex: 1; min-width: 0; }
.copy-row { display: flex; gap: 6px; margin-top: 6px; }
.copy-row input { margin: 0; min-height: 34px; flex: 1; min-width: 0; font-size: .82rem; padding: 6px 10px; border-radius: 9px; color: var(--muted); }
.status-link { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.btn.green.small { box-shadow: none; }

/* Freie Position im Auswahlfeld */
.picker-free { margin-top: 10px; }
.free-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.free-row input { margin: 0; min-height: 40px; }
.free-row input[data-free-name] { flex: 1 1 220px; }
.free-row input[data-free-price] { flex: 0 0 110px; text-align: right; }

/* Garantie */
.warranty { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 2px 9px 2px 7px; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.items .warranty { display: inline-flex; }
.warranty.on { background: #e7f6ec; color: #14532d; }
.warranty.off { background: #eef0f4; color: #475266; }

/* Abholerinnerung auf der Übersicht */
.reminder-card { border-color: #f5d29a; background: linear-gradient(0deg, #fff, #fffaf1); }
.reminder-card h2 { display: inline-flex; align-items: center; gap: 8px; }
.reminder-card h2 .icon { color: var(--amber); }
.reminder-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.reminder-row > div:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.reminder-row .actions { gap: 6px; }
.reminder-row .inline-form { margin: 0; }

/* QR-Code auf dem Annahmeschein */
.qr-box { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.qr { flex: none; width: 96px; height: 96px; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-box b { display: block; margin-bottom: 2px; }
.qr-box p { margin: 0; font-size: .86rem; }

/* Mehr-Menü (Handy) */
.more-list { display: grid; gap: 10px; }
.more-list a { display: flex; align-items: center; gap: 14px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); }
.more-list a .icon { color: var(--navy); }
.more-list b { display: block; color: var(--navy-deep); }
.more-list small { color: var(--muted); }

/* Navigation: etwas enger, damit fünf Punkte passen */
.nav a { padding: 0 12px; font-size: .92rem; }
@media (max-width: 1240px) { .nav a { padding: 0 9px; font-size: .88rem; } .topbar-in { gap: 18px; } }
.btn { white-space: nowrap; }
@media (max-width: 1480px) {
  .search-trigger { min-width: 0; width: 42px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger .kbd { display: none; }
}
@media (max-width: 1080px) { .brand small { display: none; } }

/* ---------- Statusseite für Kunden ---------- */
.public { min-height: 100vh; background: radial-gradient(1200px 600px at 20% 0%, #fff 0%, var(--bg) 60%); }
.public-main { max-width: 560px; margin: 0 auto; padding: 28px 16px 40px; }
.public-card { padding: 28px 26px; border-radius: 20px; box-shadow: var(--shadow-md); }
.public-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.public-card h1 { font-size: 1.45rem; margin: 12px 0 4px; }
.public-device { color: var(--muted); font-weight: 600; margin-bottom: 18px; }
.public-ready { padding: 14px 16px; border-radius: 12px; background: #ecfdf3; border: 1px solid #abefc6; margin-bottom: 12px; }
.public-ready p { margin: 0 0 4px; }
.public-price b { font-size: 1.15rem; }
.public-contact { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.public-foot { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 18px; }
.steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: s; }
.steps li { position: relative; padding-top: 14px; font-size: .78rem; font-weight: 600; color: var(--muted); text-align: center; }
.steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 99px; background: var(--line); }
.steps li.done::before { background: var(--navy-light); }
.steps li.now::before { background: var(--navy); }
.steps li.now { color: var(--navy-deep); }

/* ---------- Auswertung ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; padding: 16px 18px; }
.chips-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); font-size: .86rem; font-weight: 600; text-decoration: none; }
.fchip:hover { border-color: var(--navy-light); color: var(--navy-deep); }
.fchip[aria-current="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.filter-form label { font-size: .76rem; }
.filter-form input, .filter-form select { min-height: 38px; margin-top: 4px; padding: 6px 10px; border-radius: 10px; font-size: .9rem; width: auto; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tiles-hero { grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(160px, 1fr)); }
@media (max-width: 900px) { .tiles-hero { grid-template-columns: 1fr 1fr; } .tiles-hero .hero-tile { grid-column: 1 / -1; } }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); min-width: 0; }
.tile-label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.tile-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; color: var(--navy-deep); }
.hero-value { font-size: clamp(2rem, 1.5rem + 1.6vw, 3rem); font-weight: 800; letter-spacing: -.03em; color: var(--navy-deep); line-height: 1.05; }
.hero-tile { background: linear-gradient(160deg, #fff 0%, #f3f6fb 100%); }
.tile-foot { margin-top: auto; padding-top: 6px; font-size: .8rem; color: var(--muted); }
.tile-delta { font-size: .8rem; font-weight: 700; }
.tile-delta span { font-weight: 500; color: var(--muted); }
.up-good, .down-good { color: #15803d; }
.up-bad, .down-bad { color: #b42318; }
.flat { color: var(--muted); font-weight: 500; }

.chart-card { overflow: hidden; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: .82rem; color: var(--ink-soft); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.key.cur { background: var(--navy); }
.key.cmp { background: #a9bad8; }
.chart { display: block; width: 100%; height: 260px; }
.chart .grid { stroke: #edf0f5; stroke-width: 1; }
.chart .axis { stroke: #cfd6e2; stroke-width: 1; }
.chart .tick { fill: var(--muted); font: 500 11px var(--sans); font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--navy); }
.chart .bar.cmp { fill: #a9bad8; }
.chart .hit { fill: transparent; }
.chart .hit:hover { fill: rgba(22, 48, 92, .05); }
.table-view { margin-top: 10px; }
.table-view summary { cursor: pointer; font-size: .84rem; font-weight: 600; color: var(--navy); }
.table-view .table-wrap { margin-top: 10px; max-height: 360px; overflow: auto; }

.grid-2col { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 20px; }
@media (min-width: 900px) { .grid-2col { grid-template-columns: 1fr 1fr; } }
.grid-2col > .card { margin-bottom: 0; }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rank-head { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; }
.rank-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-val { font-weight: 800; color: var(--navy-deep); font-variant-numeric: tabular-nums; }
.rank-track { height: 8px; margin: 5px 0 3px; background: #eef1f6; border-radius: 99px; overflow: hidden; }
.rank-track span { display: block; height: 100%; background: var(--navy); border-radius: 99px; }
.rank-sub { font-size: .76rem; color: var(--muted); }
.muted-row .rank-track span { background: #a9bad8; }
.muted-row .rank-name { color: var(--muted); }

/* Heatmap: eine Farbe von hell nach dunkel */
.heat.h0 { background: #f4f6fa; color: var(--muted); }
.heat.h1 { background: #dfe6f2; color: var(--navy-deep); }
.heat.h2 { background: #bccae2; color: var(--navy-deep); }
.heat.h3 { background: #8ea4cb; color: #fff; }
.heat.h4 { background: #52709f; color: #fff; }
.heat.h5 { background: #16305c; color: #fff; }
.legend.scale { gap: 4px; font-weight: 500; color: var(--muted); }
.legend.scale .heat { display: inline-block; width: 18px; height: 12px; border-radius: 3px; }
.heatmap { display: grid; grid-template-columns: 34px repeat(var(--cols), minmax(24px, 1fr)); gap: 3px; overflow-x: auto; }
.heatmap > span { display: grid; place-items: center; min-height: 28px; border-radius: 5px; font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hm-hour, .hm-day { color: var(--muted); font-weight: 600 !important; background: none; }

.matrix td, .matrix th { padding: 8px 10px; }
.matrix td small, .matrix th small { display: block; font-size: .7rem; font-weight: 600; }
.matrix .cell { display: inline-block; min-width: 82px; padding: 4px 8px; border-radius: 7px; text-decoration: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.matrix .cell:hover { outline: 2px solid var(--navy); outline-offset: 1px; }
.matrix tfoot th { background: #fafbfc; color: var(--navy-deep); text-transform: none; letter-spacing: 0; font-size: .86rem; }

.pipeline { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pipe { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.pipe b { font-size: 1.4rem; font-weight: 800; color: var(--navy-deep); }
.pipe.total { background: var(--navy-tint); border-color: #c7d4ea; }

@media print {
  .filters, .table-view summary { display: none !important; }
}

/* Einkaufspreis und Marge in der Reparatur-Auswahl (standardmäßig verborgen) */
.ek-toggle { margin-left: 8px; padding: 1px 7px; border: 1px solid #c7d4ea; border-radius: 6px; background: #fff; color: var(--navy); font: 700 .68rem var(--sans); letter-spacing: .04em; cursor: pointer; vertical-align: 1px; }
.ek-toggle[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.picker-ek { display: none; flex-direction: column; align-items: flex-end; gap: 2px; }
.picker.show-ek .picker-ek { display: flex; }
.picker-ek input { width: 96px; min-height: 34px; margin: 0; padding: 6px 8px; text-align: right; font-size: .84rem; border-radius: 9px; background: #fafbfc; }
.picker-ek small { font-size: .72rem; font-weight: 700; white-space: nowrap; }
.picker-ek small.pos { color: #15803d; }
.picker-ek small.neg { color: #b42318; }
@media (max-width: 640px) { .picker-cart li { flex-wrap: wrap; } .picker-line { flex-basis: 100%; } }

/* Bestseller-Tabellen */
.sub-h { margin: 22px 0 10px; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.card-title + .sub-h { margin-top: 4px; }
.sort-nav .fchip { height: 30px; font-size: .8rem; }
.rank-table td { padding: 10px 14px; }
.rank-table td:first-child { min-width: 220px; }
.rank-table .rank-name { display: block; white-space: normal; }
.rank-table .rank-track { display: block; height: 5px; margin: 6px 0 0; max-width: 260px; }
.mpill { display: inline-block; min-width: 52px; padding: 2px 8px; border-radius: 999px; background: #eef1f6; color: var(--ink-soft); font-weight: 700; font-size: .8rem; text-align: center; }
.mpill.low { background: #fdecea; color: #912018; }
.mpill.high { background: #e7f6ec; color: #14532d; }
.tiles-profit .tile:first-child .tile-value { color: #14532d; }

/* ---------- v6: Lager, Bestellungen, Rechnungen ---------- */
.ps-entwurf, .inv-entwurf { --st: #7c8696; --st-bg: #eef0f4; --st-fg: #475266; }
.ps-bestellt, .inv-offen   { --st: #d97706; --st-bg: #fdf3e3; --st-fg: #92400e; }
.ps-geliefert, .inv-bezahlt { --st: #15803d; --st-bg: #e7f6ec; --st-fg: #14532d; }
.ps-storniert, .inv-storniert { --st: #b42318; --st-bg: #fdecea; --st-fg: #912018; }
.inv-storno { --st: #6d4fc2; --st-bg: #efeafb; --st-fg: #4a2f99; }

.lvl { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 24px; padding: 0 8px; border-radius: 999px; font-size: .82rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.lvl-ok { background: #e7f6ec; color: #14532d; }
.lvl-low { background: #fdf3e3; color: #92400e; }
.lvl-empty { background: #fdecea; color: #912018; }
.doc-head .meta .lvl { height: 26px; padding: 0 11px; }

a.tile-link { text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
a.tile-link:hover { border-color: var(--navy-light); box-shadow: var(--shadow-md); }
.tile-value.warn { color: #b45309; }

.empty-card h2 { margin-top: 0; }
.plain-list { list-style: none; margin: 0 0 12px; padding: 0; }
.plain-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.plain-list li:last-child { border-bottom: 0; }
.plain-list li > span:first-child { min-width: 0; flex: 1 1 220px; }
.plain-list form { margin: 0; }
.plain-list a.mono { font-size: .84rem; text-decoration: none; color: var(--navy-soft); background: var(--navy-tint); padding: 2px 7px; border-radius: 6px; }
.row-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.parts-card h2 { margin-bottom: 8px; }
.more-parts { margin-top: 6px; }
.more-parts summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--navy-soft); padding: 6px 0; }
.more-parts .inline-form { margin-top: 10px; flex-wrap: wrap; align-items: flex-end; }
.more-parts .inline-form label { flex: 1 1 180px; font-size: .82rem; }
.suggest-card { margin-bottom: 18px; border-color: #f5d29a; background: linear-gradient(180deg, #fffaf0 0%, #fff 70%); }
.suggest-card .card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.suggest-card .card-title h2 { margin: 0; }
.suggest-card .card-title form { margin: 0; }

.flat-table { box-shadow: none; margin-bottom: 14px; }
.flat-table th, .flat-table td { padding: 10px 12px; }
.flat-table tfoot th { background: #fafbfc; color: var(--navy-deep); }
input.qty-input { display: inline-block; width: 76px; min-height: 36px; margin: 0; padding: 4px 8px; text-align: right; border-radius: 8px; }
.copy-text { width: 100%; font-size: .85rem; line-height: 1.5; resize: vertical; }
.copy-row:has(.copy-text) { align-items: flex-start; }

.import-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; position: sticky; top: calc(var(--head-h) + 8px); z-index: 5; }
.import-bar .search { flex: 1 1 280px; }
.import-bar label { font-size: .82rem; }
.import-bar input[type="number"] { width: 90px; min-height: 40px; }
.check-col { width: 44px; text-align: center; }
.check-col input { width: 18px; height: 18px; }
tr.group-row th { background: var(--navy-tint); color: var(--navy); font-size: .78rem; padding: 8px 18px; }

/* Rechnungsentwurf */
.grid-zip.inner { grid-template-columns: 110px 1fr; gap: 16px 14px; }
.inv-rows { display: grid; gap: 8px; margin-top: 18px; }
.inv-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 2fr) 76px 120px 110px 36px; gap: 8px; align-items: center; }
.inv-row input { min-height: 40px; margin-top: 0; padding: 8px 10px; border-radius: 10px; }
.inv-row-head { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.inv-row-head span:nth-child(n+3) { text-align: right; }
.inv-row [data-inv-qty], .inv-row [data-inv-unit] { text-align: right; }
.inv-total { text-align: right; font-weight: 700; color: var(--navy-deep); font-variant-numeric: tabular-nums; }
.inv-row .icon-btn { display: inline-flex; width: 36px; height: 36px; font-size: 1.2rem; line-height: 1; color: var(--muted); }
.inv-row .icon-btn:hover { color: #b42318; border-color: #fecdca; }
.inv-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.inv-sums { margin: 0 0 0 auto; min-width: 260px; display: grid; gap: 4px; }
.inv-sums div { display: flex; justify-content: space-between; gap: 20px; font-size: .92rem; color: var(--ink-soft); }
.inv-sums dt { color: var(--muted); }
.inv-sums dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.inv-sums .total { margin-top: 4px; padding: 9px 12px; border-radius: 10px; background: var(--navy); color: #fff; }
.inv-sums .total dt { color: #fff; font-weight: 700; }
.inv-sums .total dd { font-weight: 800; }
.sticky-actions { position: sticky; bottom: 0; z-index: 4; padding: 12px 0; background: linear-gradient(180deg, rgba(246, 247, 249, 0) 0%, var(--bg) 35%); }
@media (max-width: 860px) {
  .inv-row { grid-template-columns: 76px minmax(0, 1fr) 36px; }
  .inv-row > label:nth-child(1) { grid-column: 1 / -1; }
  .inv-row > label:nth-child(2) { grid-column: 1 / -1; }
  .inv-row .inv-total { display: none; }
  .inv-row { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .inv-row-head { display: none; }
  .sticky-actions { position: static; padding: 0; background: none; }
}

/* Navigation mit sieben Punkten */
@media (max-width: 1360px) { .nav a { padding: 0 10px; font-size: .88rem; } .topbar-in { gap: 18px; } }
@media (max-width: 1180px) {
  .nav { gap: 0; }
  .nav a { padding: 0 8px; font-size: .84rem; }
  .head-actions .btn { width: 42px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  .head-actions .btn .icon { margin: 0; }
}
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.inline-form label { font-size: .85rem; }
.actions .inline-form, .page-head .inline-form { margin: 0; align-items: center; }
.actions .inline-form select { min-height: 40px; width: auto; }
.card > .inline-form + form, .card > form + form { margin-top: 12px; }
td a.mono { white-space: nowrap; }
@media (max-width: 860px) { .brand img.wordmark { height: 17px; } }

/* ---------- Etiketten ---------- */
.label-page { background: var(--bg); padding: 20px clamp(16px, 3vw, 32px) 40px; }
.label-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; max-width: 900px; }
.label-bar .back { margin: 0 auto 10px 0; }
.label-form { display: flex; flex-wrap: wrap; gap: 10px; }
.label-form label { font-size: .8rem; }
.label-form select, .label-form input { min-height: 40px; margin-top: 4px; padding: 6px 10px; width: auto; }
.label-form input[type=number] { width: 80px; }
.label-hint { max-width: 900px; color: var(--muted); font-size: .85rem; margin: 10px 0 18px; }
.labels { display: flex; flex-wrap: wrap; gap: 14px; }
.label {
  width: var(--lw); height: var(--lh); box-sizing: border-box; padding: 1.6mm 2mm; overflow: hidden;
  display: flex; align-items: center; gap: 2.2mm; background: #fff; color: #000;
  border: 1px dashed #c3cad6; border-radius: 2mm; font-family: var(--sans); line-height: 1.12;
}
.label-qr { flex: none; width: var(--qr); height: var(--qr); }
.label-qr svg { display: block; width: 100%; height: 100%; }
.label-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(var(--u) * .025); }
.label-text > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label-top { display: flex; align-items: center; justify-content: space-between; gap: 2mm; }
.label img.wordmark { height: calc(var(--u) * .1); width: auto; }
.label-no { font-family: var(--mono); font-weight: 700; font-size: calc(var(--u) * .19); letter-spacing: -.02em; }
.label-l1 { font-weight: 800; font-size: calc(var(--u) * .12); }
.label-l2 { font-weight: 600; font-size: calc(var(--u) * .11); }
.label-l3, .label-meta { font-size: calc(var(--u) * .09); }
.label-meta { color: #333; }
.label-name { font-weight: 800; font-size: calc(var(--u) * .12); white-space: normal !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.label-loc { font-weight: 900; font-size: calc(var(--u) * .16); border: .35mm solid #000; border-radius: 1mm; padding: 0 1.2mm; white-space: nowrap; }
.label.compact { flex-direction: column; align-items: stretch; }
.label.compact .label-qr { display: none; }
@media print {
  .label-page { background: #fff; padding: 0; }
  .label-bar, .label-hint { display: none !important; }
  .labels { display: block; }
  .label { border: 0; border-radius: 0; page-break-after: always; break-after: page; margin: 0; }
  .label:last-child { page-break-after: auto; break-after: auto; }
}

/* ---------- v7: Kopfzeile, Kundenbestellungen ---------- */
@media (min-width: 1281px) {
  .search-trigger { min-width: 0; width: auto; padding: 0 8px 0 12px; justify-content: flex-start; }
  .search-trigger span { display: inline; white-space: nowrap; }
  .search-trigger .kbd { display: inline-flex; }
}
.section-tabs { margin: -6px 0 18px; }
.so-offen { --st: #d97706; --st-bg: #fdf3e3; --st-fg: #92400e; }
.so-bestellt { --st: #2c4a7c; --st-bg: #e8eef8; --st-fg: #16305c; }
.so-da { --st: #15803d; --st-bg: #e7f6ec; --st-fg: #14532d; }
.so-abgeholt { --st: #7c8696; --st-bg: #eef0f4; --st-fg: #475266; }
.so-storniert { --st: #b42318; --st-bg: #fdecea; --st-fg: #912018; }
.quick-order { margin-bottom: 20px; }
.quick-order h2 { margin-top: 0; }
.qo-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 14px; }
.qo-grid .qo-item { grid-column: span 4; }
.qo-grid .qo-link { grid-column: span 2; }
.qo-grid input { min-height: 42px; padding: 8px 12px; margin-top: 5px; }
.qo-foot { display: flex; justify-content: flex-end; align-items: center; gap: 18px; margin-top: 14px; }
@media (max-width: 900px) { .qo-grid { grid-template-columns: 1fr 1fr; } .qo-grid .qo-item, .qo-grid .qo-link { grid-column: 1 / -1; } }
.order-lists { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.order-lists .inline-form { margin-top: 8px; }
@media (max-width: 1000px) { .nav a { padding: 0 6px; font-size: .8rem; } .topbar-in { gap: 12px; } }

/* ---------- v8: Artikel, Schnellverkauf, Kundensuche ---------- */
.article-buttons { display: grid; gap: 10px; margin-bottom: 14px; }
.article-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.article-cat { width: 100%; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.article-btn { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 120px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--navy-deep); font: 700 .95rem var(--sans); cursor: pointer; text-align: left; }
.article-btn small { font-weight: 500; font-size: .78rem; color: var(--muted); }
.article-btn:hover { border-color: var(--navy-light); background: var(--navy-tint); }
.article-btn:active { transform: translateY(1px); }
.quick-foot { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 22px; margin-bottom: 14px; }
.quick-foot > label:first-child { flex: 1 1 280px; }
.article-new { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 18px; }
.article-new input { min-height: 42px; margin-top: 5px; padding: 8px 12px; }
@media (max-width: 860px) { .article-new { grid-template-columns: 1fr 1fr; } .article-new label:first-child { grid-column: 1 / -1; } }
.article-table td { padding: 8px 12px; }
.article-row { display: grid; grid-template-columns: 2fr 1fr 110px 110px auto; gap: 8px; align-items: center; }
.article-row input { min-height: 38px; margin: 0; padding: 6px 10px; border-radius: 9px; }
.icon-btn.small-icon { display: inline-flex; width: 34px; height: 34px; border-radius: 9px; font-weight: 700; }
@media (max-width: 860px) { .article-row { grid-template-columns: 1fr 1fr; } .article-row input:first-child, .article-row .row-actions { grid-column: 1 / -1; } }
.combo { position: relative; margin-top: 7px; }
.combo-search input { margin-top: 0; }
.combo-chosen { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; border: 1px solid var(--navy-light); border-radius: 12px; background: var(--navy-tint); }
.combo-name { font-weight: 700; color: var(--navy-deep); }
.combo-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); max-height: 360px; overflow: auto; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-md); }
.combo-hit { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 9px 12px; border: 0; border-radius: 9px; background: none; text-align: left; font: 500 .95rem var(--sans); color: var(--ink); cursor: pointer; }
.combo-hit b { color: var(--navy-deep); }
.combo-hit small { color: var(--muted); font-size: .8rem; }
.combo-hit.active, .combo-hit:hover { background: var(--navy-tint); }
.combo-none { padding: 9px 12px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); margin-top: 4px; }

/* ---------- v10: Zahlung & Wechselgeld ---------- */
.pay-box { display: grid; gap: 12px; margin: 4px 0 14px; }
.pay-full { flex-basis: 100%; }
.pay-methods { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-method input { position: absolute; opacity: 0; pointer-events: none; }
.pay-method span { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.pay-method input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.pay-method input:focus-visible + span { box-shadow: 0 0 0 4px rgba(44, 74, 124, .2); }
.cash { display: grid; grid-template-columns: minmax(160px, 220px) 1fr minmax(200px, 260px); gap: 10px 14px; align-items: end; }
.cash input { font-size: 1.25rem; font-weight: 700; min-height: 50px; }
.cash-quick { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 6px; }
.cash-quick .fchip { cursor: pointer; font: 600 .86rem var(--sans); }
.cash-change { display: flex; flex-direction: column; justify-content: center; min-height: 64px; padding: 8px 16px; border-radius: 12px; background: var(--navy-tint); color: var(--navy-deep); }
.cash-change span { font-size: .8rem; font-weight: 600; color: var(--muted); }
.cash-change b { font-size: 1.6rem; letter-spacing: -.02em; }
.cash-change.ok { background: #e7f6ec; color: #14532d; }
.cash-change.short { background: #fdecea; color: #912018; }
.cash-change:empty { display: none; }
@media (max-width: 860px) { .cash { grid-template-columns: 1fr; } }
