/* R-Workshop – © 2026 Simon Alexander Reichert. Alle Rechte vorbehalten. */
:root {
  /* Helles Design: freundliche Blautöne, blaue Kopfleiste (angelehnt an gewohnte Werkstattsoftware) */
  --bg: #edf3f9; --panel: #ffffff; --panel-2: #f3f8fd; --line: #dce6f0; --line-2: #c3d3e4;
  --text: #13263a; --muted: #52677e; --faint: #8295a9;
  --nav: #ffffff; --nav-text: #24384d; --nav-active: #1565c0; --nav-hover: #e3effc; --nav-head: #7d92a8; --nav-line: #dce6f0; --nav-link: #1a73c9; --nav-icon: #2a86d4;
  --accent: #1a73c9; --accent-weak: #e2effc; --signal: #1fa9e6;
  --top-bg: linear-gradient(90deg, #1d5b98 0%, #2378c4 55%, #2b8fd8 100%); --top-text: #ffffff; --top-input: rgba(255,255,255,.96); --top-line: transparent;
  --kpi-value: #0f4f8f;
  --ok: #1f8a4c; --ok-weak: #e1f4e8; --warn: #b9770e; --warn-weak: #fdf2dc; --bad: #c0392b; --bad-weak: #fbe6e3;
  --st-grey: #7b8794; --st-blue: #2a78d6; --st-orange: #e07a1f; --st-green: #1f9d55; --st-darkgreen: #157a3f; --st-red: #d23c3c; --st-yellow: #c99300; --st-violet: #7b4fd0;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-prev: #c5ccd6;
  --radius: 8px; --shadow: 0 1px 2px rgba(20,60,110,.07), 0 4px 16px rgba(20,60,110,.07);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f151c; --panel: #172029; --panel-2: #1b2631; --line: #26323f; --line-2: #33414f;
  --text: #e4eaf1; --muted: #9aa8b8; --faint: #6f7d8d;
  --nav: #0b1218; --nav-text: #b9c7d3; --nav-active: #ffffff; --nav-hover: #15232e; --nav-head: #6f88a3; --nav-line: rgba(255,255,255,.07); --nav-link: #8fb3d9; --nav-icon: currentColor;
  --top-bg: var(--panel); --top-text: var(--text); --top-input: var(--panel-2); --top-line: var(--line); --kpi-value: var(--text);
  --accent: #3fb3e3; --accent-weak: #10293a; --ok-weak: #15301f; --warn-weak: #36290f; --bad-weak: #3a1a17;
  --st-grey: #6b7785; --st-blue: #3987e5; --st-orange: #d9701c; --st-green: #1f9d55; --st-darkgreen: #1b7f45; --st-red: #d24a4a; --st-yellow: #b58600; --st-violet: #8a6be0;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-prev: #3a4756;
  color-scheme: dark;
}
.logo-for-dark { display: none; }
:root[data-theme="dark"] .logo-for-dark { display: block; }
:root[data-theme="dark"] .logo-for-light { display: none; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
/* nie seitlich wackeln/scrollen (auch nicht als Home-Bildschirm-App am iPhone) */
html, body { overflow-x: clip; overscroll-behavior-x: none; }
@supports not (overflow: clip) { body { overflow-x: hidden; } }
body { touch-action: manipulation; } /* kein Doppeltipp-Zoom */
body { font: 15px/1.55 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
svg:not([width]) { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 13.5px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; }
.hidden { display: none !important; }

/* Layout */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.nav { background: var(--nav); color: var(--nav-text); border-right: 1px solid var(--nav-line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: var(--nav-active); font-weight: 700; font-size: 15px; }
.brand img { width: 30px; height: 30px; }
.nav-group { padding: 10px 10px 0; }
.nav-group > div { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--nav-head); padding: 6px 10px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; color: var(--nav-text); font-weight: 500; }
.nav a:hover { background: var(--nav-hover); text-decoration: none; color: var(--nav-active); }
.nav a.active { background: var(--nav-hover); color: var(--nav-active); box-shadow: inset 3px 0 0 var(--signal); }
.nav a svg { width: 17px; height: 17px; flex: none; opacity: .9; color: var(--nav-icon); }
.nav .badge { margin-left: auto; background: var(--signal); color: #1b1300; border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 700; }
.nav-foot { margin-top: auto; padding: 14px 18px; font-size: 12.5px; border-top: 1px solid var(--nav-line); }
.nav-foot a { padding: 0; display: inline; color: var(--nav-link); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: var(--top-bg); color: var(--top-text); border-bottom: 1px solid var(--top-line); position: sticky; top: 0; z-index: 20; }
.topbar .search { flex: 1; max-width: 460px; position: relative; }
.timer-chip { display: flex; align-items: center; gap: 8px; background: var(--ok-weak); color: var(--ok); border-radius: 20px; padding: 4px 6px 4px 12px; font-weight: 600; font-size: 12.5px; }
.menu-btn { display: none; }
.content { padding: 22px 24px 60px; max-width: 1400px; width: 100%; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .spacer { flex: 1; }
.crumb { font-size: 12px; color: var(--muted); margin-bottom: 4px; }

/* Panels */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.kpi { padding: 14px 16px; }
.kpi .label { color: var(--muted); font-size: 13.5px; font-weight: 500; }
.kpi .value { font-size: 24px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; color: var(--kpi-value); }
.kpi .sub { font-size: 13px; color: var(--muted); }
.kpi.alert .value { color: var(--bad); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel-2); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover td { background: var(--accent-weak); }
.empty { padding: 34px; text-align: center; color: var(--muted); }

/* Forms */
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line-2); border-radius: 6px; padding: 7px 9px; }
textarea { resize: vertical; min-height: 60px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
input[type=checkbox], input[type=radio] { width: auto; flex: none; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text); font-size: 14.5px; }
.check + .check { margin-top: 6px; }
.form { display: grid; gap: 12px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.form > * { grid-column: span 12; }
.c1 { grid-column: span 1 !important; } .c2 { grid-column: span 2 !important; } .c3 { grid-column: span 3 !important; } .c4 { grid-column: span 4 !important; } .c5 { grid-column: span 5 !important; }
.c6 { grid-column: span 6 !important; } .c7 { grid-column: span 7 !important; } .c8 { grid-column: span 8 !important; } .c9 { grid-column: span 9 !important; }
.form-sec { grid-column: span 12; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--faint); padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.signal { background: var(--signal); border-color: var(--signal); color: #241500; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 86%, #000); border-color: color-mix(in srgb, var(--bad) 86%, #000); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }
.icon-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 4px; }
.icon-btn:hover { color: var(--bad); background: var(--bad-weak); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Pills */
.pill { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 10px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill.ok { background: var(--ok-weak); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-weak); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-weak); color: var(--bad); border-color: transparent; }
.pill.info { background: var(--accent-weak); color: var(--accent); border-color: transparent; }
.plate { display: inline-block; font-family: "DIN Alternate", "Arial Narrow", sans-serif; font-weight: 700; letter-spacing: .04em; border: 1.5px solid currentColor; border-left: 6px solid #1d4fa0; border-radius: 3px; padding: 0 6px; font-size: 12.5px; color: var(--text); background: var(--panel); white-space: nowrap; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 8px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* Doc editor */
.items { table-layout: fixed; min-width: 780px; }
.items td { padding: 6px 6px; }
.items th { overflow: hidden; text-overflow: ellipsis; }
.items input, .items select, .items textarea { padding: 5px 7px; font-size: 13px; }
.items .desc { min-height: 30px; margin-top: 4px; font-size: 12px; }
.items col.c-pos { width: 34px; } .items col.c-nr { width: 92px; } .items col.c-qty { width: 78px; } .items col.c-unit { width: 70px; } .items col.c-price { width: 114px; }
.items col.c-disc { width: 58px; } .items col.c-tax { width: 80px; }
#statusSel { width: auto; font-size: 14px; padding: 5px 8px; vertical-align: middle; } .items col.c-total { width: 126px; } .items col.c-del { width: 34px; }
.totals { margin-left: auto; width: 320px; padding: 12px 18px; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; font-variant-numeric: tabular-nums; }
.totals .grand { font-size: 17px; font-weight: 700; border-top: 2px solid var(--text); margin-top: 6px; padding-top: 8px; }
.locked-banner { background: var(--accent-weak); color: var(--accent); padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-weight: 500; display: flex; gap: 8px; align-items: center; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; font-size: 15px; }
.kv > div:nth-child(odd) { color: var(--muted); }

/* Picker */
.picker { position: relative; }
.picker-list { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 2px); background: var(--panel); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: var(--shadow); max-height: 300px; overflow-y: auto; }
.picker-list div { padding: 7px 10px; cursor: pointer; border-bottom: 1px solid var(--line); }
.picker-list div:last-child { border-bottom: 0; }
.picker-list div:hover, .picker-list div.hl { background: var(--accent-weak); }
.picker-list .sub { font-size: 13px; color: var(--muted); }
.search-results { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: var(--shadow); max-height: 70vh; overflow-y: auto; }
.search-results h4 { margin: 0; padding: 8px 12px 4px; font-size: 11px; text-transform: uppercase; color: var(--faint); letter-spacing: .05em; }
.search-results a { display: block; padding: 6px 12px; color: var(--text); }
.search-results a:hover { background: var(--accent-weak); text-decoration: none; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(10,20,30,.45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; }
.modal { background: var(--panel); border-radius: 10px; width: 100%; max-width: 640px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; flex: 1; }
.modal-body { padding: 18px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--panel-2); border-radius: 0 0 10px 10px; }
.modal-foot .left { margin-right: auto; }

#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #1d2a38; color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow); max-width: 380px; font-weight: 500; animation: slide .2s; }
.toast.err { background: var(--bad); }
@keyframes slide { from { transform: translateY(10px); opacity: 0; } }

/* Calendar */
.cal { display: grid; grid-template-columns: 52px repeat(var(--days), minmax(110px, 1fr)); position: relative; overflow-x: auto; }
.cal-head { position: sticky; top: 0; background: var(--panel-2); border-bottom: 1px solid var(--line); padding: 8px; font-weight: 600; font-size: 13.5px; text-align: center; z-index: 2; }
.cal-head.today { color: var(--accent); }
.cal-times { grid-row: 2; }
.cal-time { height: 48px; font-size: 11px; color: var(--faint); text-align: right; padding-right: 6px; transform: translateY(-7px); }
.cal-col { grid-row: 2; position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 48px); cursor: cell; }
.cal-col.today { background-color: color-mix(in srgb, var(--accent-weak) 45%, transparent); }
.appt { position: absolute; left: 3px; right: 3px; border-radius: 5px; padding: 3px 6px; font-size: 12.5px; overflow: hidden; cursor: pointer; color: #10202f; border-left: 4px solid rgba(0,0,0,.25); line-height: 1.3; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.appt b { display: block; font-size: 13px; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); z-index: 3; pointer-events: none; }

/* Charts */
.chart svg { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--accent); } .chart .bar2 { fill: var(--line-2); }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at 70% 20%, #12384c 0%, #0b1218 60%); }
.login { width: 100%; max-width: 380px; padding: 28px; }
.login .logo { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-weight: 700; font-size: 18px; }
.login .logo img { width: 36px; height: 36px; }
.login .form { gap: 14px; }

.thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.thumb { width: 110px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; font-size: 11px; background: var(--panel-2); position: relative; }
.thumb img { width: 100%; height: 80px; object-fit: cover; display: block; }
.thumb .ph { height: 80px; display: grid; place-items: center; color: var(--faint); font-weight: 700; }
.thumb span { display: block; padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb button { position: absolute; top: 3px; right: 3px; background: rgba(0,0,0,.55); color: #fff; border: 0; border-radius: 4px; cursor: pointer; padding: 0 5px; }

@media (max-width: 1100px) { .split { grid-template-columns: minmax(0, 1fr); } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .nav { position: fixed; left: 0; top: 0; width: 250px; z-index: 90; transform: translateX(-100%); transition: transform .2s; }
  .nav.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  /* Menü scrollt für sich – der Hintergrund bleibt stehen (auch am iPhone) */
  .nav { height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  html.nav-lock, html.nav-lock body { overflow: hidden; overscroll-behavior: none; }
  .menu-btn { display: inline-flex; }
  .content { padding: 16px 14px 60px; }
  .topbar { padding: 10px 14px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .form > [class*="c"] { grid-column: span 12 !important; }
  .totals { width: 100%; }
  .hide-sm { display: none; }
}
@media print {
  .nav, .topbar, .btn, .modal-bg { display: none !important; }
  .shell { display: block; } body { background: #fff; }
}
.grid > *, .split > * { min-width: 0; }

/* ===== E-Mail ===== */
.mail-shell { display: grid; grid-template-columns: var(--mf-w, 230px) var(--ml-w, minmax(380px, 1fr)) minmax(0, 1.1fr); height: calc(100vh - 110px); min-height: 480px; overflow: hidden; }
.mail-folders { border-right: 1px solid var(--line); overflow-y: auto; background: var(--panel-2); }
.mail-folders nav a { display: flex; align-items: center; gap: 8px; padding: 7px 14px; color: var(--text); font-weight: 500; }
.mail-folders nav a svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.mail-folders nav a span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-folders nav a b { font-size: 11px; background: var(--accent); color: #fff; border-radius: 9px; padding: 0 6px; }
.mail-folders nav a:hover { background: var(--accent-weak); text-decoration: none; }
.mail-folders nav a.active { background: var(--accent-weak); color: var(--accent); }
.mail-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.mail-read { display: flex; flex-direction: column; min-width: 0; }
.mail-bar { display: flex; gap: 6px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mail-bar input { flex: 1; min-width: 120px; }
.mail-scroll { overflow-y: auto; flex: 1; min-height: 0; }
.mail-frame { width: 100%; height: 62vh; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.mail-text { white-space: pre-wrap; word-wrap: break-word; font: 14px/1.55 var(--font); margin: 0; }
.mail-atts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.mail-att { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 6px; padding: 3px 4px 3px 8px; font-size: 13px; max-width: 100%; }
.mail-att a { display: inline-flex; gap: 5px; align-items: center; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-att svg { width: 14px; height: 14px; flex: none; }
.mail-back { display: none; }
@media (max-width: 980px) {
  .mail-shell { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 150px - env(safe-area-inset-bottom)); }
  .mail-shell > * { display: none; border-right: 0; }
  .mail-shell[data-pane="folders"] .mail-folders, .mail-shell[data-pane="list"] .mail-list, .mail-shell[data-pane="read"] .mail-read { display: flex; flex-direction: column; }
  .mail-back { display: inline-flex; }
  .mail-frame { height: 55vh; }
}

/* ===== Belege & Kontoauszüge ===== */
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; min-width: 80px; margin: 4px 0; }
.progress i { display: block; height: 100%; background: var(--ok); }
.bk-table td { vertical-align: top; }
.bk-page td { background: var(--panel-2); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 12px; }
.bk-line { border-left: 3px solid var(--bad); }
.bk-line.ok { border-left-color: var(--ok); }
.bk-line td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.bk-line.ok td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.bk-text { font-size: 13px; }
.bk-receipts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; align-items: center; }
.bk-tray { display: grid; gap: 10px; max-height: calc(100vh - 220px); overflow-y: auto; }
.bk-card { border: 1px solid var(--line); border-radius: 6px; padding: 10px; background: var(--panel-2); cursor: grab; }
.drop td, .bk-tray.drop { background: var(--accent-weak) !important; outline: 2px dashed var(--accent); }

/* ===== Kalender: ganztägig & Google ===== */
.allday { margin-top: 4px; font-size: 11px; font-weight: 600; text-align: left; padding: 2px 6px; border-radius: 4px; color: #10202f; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gdot { display: inline-block; font-size: 9px; font-weight: 800; background: #fff; color: #4285f4; border-radius: 3px; padding: 0 3px; margin-right: 4px; vertical-align: 1px; }

/* ===== iPhone / Web-App ===== */
.tabbar { display: none; }
@media (max-width: 820px) {
  .topbar { padding-top: max(10px, env(safe-area-inset-top)); }
  .content { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 12px rgba(0,0,0,.06); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; font-size: 10.5px; font-weight: 600; color: var(--muted); background: none; border: 0; font-family: inherit; text-decoration: none; position: relative; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--accent); }
  .tabbar .tb-badge { position: absolute; top: 3px; left: 55%; background: var(--signal); color: #1b1300; border-radius: 8px; font-size: 10px; padding: 0 5px; }
  .nav { padding-top: env(safe-area-inset-top); }
  #toasts { bottom: calc(80px + env(safe-area-inset-bottom)); left: 12px; right: 12px; }
  .modal-bg { padding: max(12px, env(safe-area-inset-top)) 8px calc(12px + env(safe-area-inset-bottom)); }
  input, select, textarea { font-size: 16px; } /* verhindert Zoom beim Antippen am iPhone */
}
@media (display-mode: standalone) { body { overscroll-behavior-y: none; } }

/* ===== Firmenlogo ===== */
.brand.logo { padding: 16px 18px 10px; }
.brand.logo img { width: 100%; height: auto; max-height: 76px; object-fit: contain; }
.brand.logo img.on-white, .login .logo img.on-white { background: #fff; border-radius: 6px; padding: 6px; }
.brand.logo img.on-dark, .login .logo img.on-dark { background: #0b1218; border-radius: 6px; padding: 6px; }
.powered { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; font-size: 12px; color: var(--faint); }
.powered img { width: 16px; height: 16px; }
.powered.sm { justify-content: flex-start; margin-top: 8px; font-size: 11px; }
.powered.sm img { width: 13px; height: 13px; }
.login .logo.big { display: block; text-align: center; margin-bottom: 18px; }
.login .logo.big img { width: 100%; max-width: 300px; height: auto; }
.nav .badge { color: #04161d; }

/* ===== Berichte ===== */
.rep-tabs { display: flex; overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.rep-tabs a { flex: 1; min-width: 120px; text-align: center; padding: 14px 10px; font-weight: 700; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; color: var(--text); border-bottom: 3px solid transparent; white-space: nowrap; }
.rep-tabs a:hover { background: var(--panel-2); text-decoration: none; }
.rep-tabs a.active { background: var(--accent-weak); border-bottom-color: var(--accent); color: var(--accent); }
.rep-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); padding: 10px 12px; margin-bottom: 16px; }
.rep-label { font-size: 15px; padding: 0 6px; min-width: 120px; text-align: center; }
.rep-table .pos { color: var(--ok); font-weight: 600; }
.rep-table .neg { color: var(--bad); font-weight: 600; }
.rep-table tfoot td { border-top: 2px solid var(--text); background: var(--panel-2); }
.rep-open td { background: var(--panel-2); font-style: italic; }
.rep-storno td { text-decoration: line-through; color: var(--faint); }
.rep-neg td { background: var(--bad-weak); }
.pill.purple { background: #ece4fb; color: #6a3fc1; border-color: transparent; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 50; background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: var(--shadow); min-width: 260px; padding: 6px 0; }
.dropdown-menu a { display: flex; gap: 8px; align-items: center; padding: 8px 14px; color: var(--text); }
.dropdown-menu a:hover { background: var(--accent-weak); text-decoration: none; }
.dropdown-menu svg { width: 15px; height: 15px; color: var(--muted); }
.dropdown-menu .sep { border-top: 1px solid var(--line); margin: 6px 0; }
.mini-bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; }
.mini-bars > div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.mini-bars i { display: block; width: 100%; max-width: 46px; background: var(--accent); border-radius: 3px 3px 0 0; }
.mini-bars span { font-size: 10px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; }
.locked-banner svg { width: 18px; height: 18px; flex: none; }
.rep-table td { white-space: nowrap; }
.rep-table td:not(.num) { max-width: 340px; overflow: hidden; text-overflow: ellipsis; }

/* ===== Menü einklappen ===== */
.shell { transition: grid-template-columns .2s; }
.menu-btn { display: inline-flex; }
.brand.logo { position: relative; }
.nav-pin { position: absolute; top: 8px; right: 8px; border: 0; background: transparent; color: var(--nav-head); font-size: 18px; line-height: 1; cursor: pointer; padding: 4px 7px; border-radius: 5px; }
.nav-pin:hover { background: var(--nav-hover); color: var(--nav-active); }
.nav-peek { display: none; }
@media (min-width: 821px) {
  .shell.nav-collapsed { grid-template-columns: minmax(0, 1fr); }
  .shell.nav-collapsed .nav { position: fixed; left: 0; top: 0; bottom: 0; width: 232px; z-index: 95; transform: translateX(-100%); transition: transform .26s cubic-bezier(.22, .61, .36, 1), box-shadow .26s ease; }
  .shell.nav-collapsed.nav-float .nav { transform: none; box-shadow: 8px 0 30px rgba(0,0,0,.25); }
  .shell.nav-collapsed .nav-peek { display: flex; position: fixed; left: 0; top: 0; bottom: 0; width: 12px; z-index: 94; align-items: center; cursor: e-resize; }
  .shell.nav-collapsed .nav-peek span { width: 12px; height: 56px; display: grid; place-items: center; background: var(--accent); color: #fff; border-radius: 0 6px 6px 0; font-size: 12px; opacity: .55; transition: opacity .15s, width .15s; }
  .shell.nav-collapsed .nav-peek:hover span { opacity: 1; width: 16px; }
}
/* ===== Design-Umschalter ===== */
.seg { display: inline-flex; background: var(--nav-hover); border-radius: 7px; padding: 2px; margin-bottom: 10px; }
.seg button { border: 0; background: transparent; color: var(--nav-text); font: inherit; font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 5px; cursor: pointer; }
.seg button.on { background: var(--accent); color: #fff; }
:root:not([data-theme="dark"]) .login-wrap { background: radial-gradient(ellipse at 70% 15%, #d9eef7 0%, #f3f5f8 65%); }
/* ===== Kalender Monat ===== */
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-head { padding: 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.month-day { min-height: 112px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 5px; cursor: cell; overflow: hidden; }
.month-day:nth-child(7n+7) { border-right: 0; }
.month-day.other { background: var(--panel-2); }
.month-day.other .md-num { color: var(--faint); }
.month-day.today .md-num { background: var(--accent); color: #fff; border-radius: 10px; padding: 0 7px; }
.md-num { font-size: 12px; font-weight: 700; display: inline-block; margin-bottom: 3px; }
.md-ev { font-size: 12.5px; padding: 1px 6px; margin-bottom: 2px; border-radius: 4px; background: var(--c); color: #10202f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.md-more { font-size: 11px; color: var(--accent); font-weight: 600; cursor: pointer; }
@media (max-width: 820px) { .month-day { min-height: 70px; } .md-ev { font-size: 10px; padding: 0 3px; } }
.timer-chip.paused { background: var(--warn-weak); color: var(--warn); }
.timer-chip .btn { padding: 3px 9px; }
.worker { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(60px, 2fr) auto; gap: 8px; align-items: center; font-size: 14.5px; padding: 2px 0; }
.worker .bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.worker .bar i { display: block; height: 100%; background: var(--series-1); border-radius: 4px; }
th.sortable-th { cursor: pointer; user-select: none; }
th.sortable-th:hover { color: var(--accent); }
th.sortable-th::after { content: ' ↕'; opacity: .25; font-size: 10px; }
th.sorted[data-dir="asc"]::after { content: ' ▲'; opacity: .9; color: var(--accent); }
th.sorted[data-dir="desc"]::after { content: ' ▼'; opacity: .9; color: var(--accent); }
.art-thumb { width: 54px; height: 42px; border: 1px solid var(--line); border-radius: 6px; padding: 0; overflow: hidden; background: var(--panel-2); cursor: pointer; position: relative; display: grid; place-items: center; color: var(--faint); }
.art-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-thumb span { position: absolute; right: 2px; bottom: 2px; background: rgba(0,0,0,.65); color: #fff; font-size: 10px; border-radius: 4px; padding: 0 4px; }
.art-thumb.empty:hover { color: var(--accent); border-color: var(--accent); }
.gal { display: flex; align-items: center; gap: 8px; }
.gal img { flex: 1; min-width: 0; max-height: 62vh; object-fit: contain; background: #000; border-radius: 6px; }
.gal-nav { border: 0; background: var(--panel-2); color: var(--text); font-size: 28px; width: 40px; height: 64px; border-radius: 6px; cursor: pointer; }
/* ===== Statusfarben ===== */
.pill.solid { border: 0; color: #fff; padding: 3px 9px; font-weight: 700; letter-spacing: .01em; }
.st-grey { background: var(--st-grey); } .st-blue { background: var(--st-blue); } .st-orange { background: var(--st-orange); } .st-green { background: var(--st-green); }
.st-darkgreen { background: var(--st-darkgreen); } .st-red { background: var(--st-red); } .st-yellow { background: var(--st-yellow); } .st-violet { background: var(--st-violet); }
select.st-sel { color: #fff; font-weight: 700; border: 0; }
select.st-sel option { color: var(--text); background: var(--panel); font-weight: 500; }
/* Mail: jede Spalte scrollt für sich (Grid-Elemente brauchen min-height: 0) */
.mail-shell { grid-template-rows: minmax(0, 1fr); height: calc(100vh - 104px); }
.mail-shell > * { min-height: 0; overflow: hidden; }
.mail-folders { overflow-y: auto !important; }
.mail-scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.mail-read .mail-scroll { display: flex; flex-direction: column; }
.mail-frame { flex: 1 0 auto; min-height: 420px; }
@media (max-width: 980px) { .mail-shell { height: calc(100vh - 150px - env(safe-area-inset-bottom)); } }
/* ===== Diagramme ===== */
.chart-box { position: relative; }
.chart { display: block; max-width: 100%; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .base { stroke: var(--line-2); stroke-width: 1; }
.chart .ax { fill: var(--muted); font: 11px var(--font); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit.on { fill: var(--text); fill-opacity: .05; }
.chart .xhair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { fill: var(--series-1); stroke: var(--panel); stroke-width: 2; }
.chart-legend { margin-bottom: 6px; flex-wrap: wrap; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: var(--shadow); padding: 8px 10px; font-size: 12px; min-width: 160px; }
.chart-tip .tt { font-weight: 700; margin-bottom: 4px; }
.chart-tip div:not(.tt) { display: flex; align-items: center; gap: 6px; }
.chart-tip div b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.chart-tip i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.chart-tip .sum { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; font-weight: 600; }
.hbars { display: grid; gap: 6px; }
.hb { display: grid; grid-template-columns: minmax(120px, 260px) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-t { height: 14px; }
.hb-t i { display: block; height: 100%; background: var(--series-1); border-radius: 0 4px 4px 0; }
.hb b { font-variant-numeric: tabular-nums; min-width: 90px; text-align: right; }
@media (min-width: 821px) { .shell.nav-collapsed .content { max-width: none; padding-left: 30px; } }
.rep-tabs a { flex: 1 0 auto; min-width: max-content; padding-left: 16px; padding-right: 16px; }
@media (max-width: 820px) {
  .tc-what { display: none; }
  .timer-chip { padding: 3px 4px 3px 10px; gap: 6px; }
  .timer-chip .btn span.hide-sm { display: none; }
  .topbar .search { min-width: 0; }
  .rep-bar { gap: 6px; }
}

/* Zulassungsschein-Erkennung */
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
input.ocr-hit, select.ocr-hit { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.ocr-text { max-height: 180px; overflow: auto; font-size: 11px; background: var(--bg); padding: 8px; border-radius: 6px; white-space: pre; }

/* Kundenmodus */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); user-select: none; margin-right: 4px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { width: 38px; height: 22px; border-radius: 11px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:checked ~ span { color: var(--accent); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.cust-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-weak); color: var(--accent); border-radius: 20px; padding: 4px 6px 4px 12px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.cust-chip b { background: var(--accent); color: #fff; border-radius: 14px; padding: 2px 10px; font-weight: 600; }
.cust-block { max-width: 520px; }
@media (max-width: 820px) { .cust-chip span { display: none; } }

/* Helles Design: Kopfleiste blau, Eingabefeld darin weiß */
:root:not([data-theme="dark"]) .topbar .search input { background: var(--top-input); border-color: transparent; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
:root:not([data-theme="dark"]) .topbar .menu-btn { color: #fff; }
:root:not([data-theme="dark"]) .topbar .menu-btn:hover { background: rgba(255,255,255,.14); color: #fff; }
:root:not([data-theme="dark"]) .topbar .timer-chip { background: rgba(255,255,255,.95); }
:root:not([data-theme="dark"]) .topbar .cust-chip { background: rgba(255,255,255,.95); border-color: transparent; }
:root:not([data-theme="dark"]) .nav a.active { background: var(--nav-hover); color: var(--nav-active); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
:root:not([data-theme="dark"]) .nav a.active svg { color: var(--nav-active); }
:root:not([data-theme="dark"]) .card-head { background: linear-gradient(180deg, #f6faff, #ffffff); }
:root:not([data-theme="dark"]) .card-head h2 svg { color: var(--accent); }
:root:not([data-theme="dark"]) th { background: #eef5fc; color: #3d5670; }
:root:not([data-theme="dark"]) .kpi { border-top: 3px solid var(--accent); }
:root:not([data-theme="dark"]) .kpi.alert { border-top-color: var(--bad); }
:root:not([data-theme="dark"]) .btn.primary { background: linear-gradient(180deg, #2384de, #1a6fc2); border-color: #1a6fc2; }
:root:not([data-theme="dark"]) .page-head h1 { color: #11365c; }
:root:not([data-theme="dark"]) .nav .badge { color: #fff; }
.cust-card { display: grid; gap: 6px; justify-items: start; }
.cust-card b { display: flex; align-items: center; gap: 6px; color: var(--accent); }

/* Scan-Assistent */
.wiz-modal { max-width: 1060px; }
.wiz-steps { display: flex; gap: 6px; list-style: none; margin: 0 0 16px; padding: 0; counter-reset: s; }
.wiz-steps li { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--panel-2); color: var(--muted); font-weight: 600; font-size: 13px; border: 1px solid var(--line); }
.wiz-steps li b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); color: #fff; font-size: 12px; flex: none; }
.wiz-steps li.on { background: var(--accent-weak); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.wiz-steps li.on b { background: var(--accent); }
.wiz-steps li.done b { background: var(--ok); }
.wiz-start { text-align: center; padding: 18px 10px 8px; }
.wiz-start p { max-width: 460px; margin: 12px auto 16px; }
.wiz-icon svg { width: 54px; height: 54px; color: var(--accent); }
.wiz-prev { max-width: 100%; max-height: 260px; border-radius: 8px; border: 1px solid var(--line); }
.wiz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.wiz-grid > :only-child { grid-column: 1 / -1; }
.wiz-photo { position: sticky; top: 0; }
.wiz-photo summary { font-size: 12px; color: var(--muted); cursor: pointer; margin-bottom: 6px; }
.wiz-photo img { width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; }
.wiz-opts { display: grid; gap: 6px; }
.wiz-opt { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: var(--panel); }
.wiz-opt input { width: auto; margin-top: 3px; }
.wiz-opt > span { display: grid; gap: 1px; }
.wiz-opt.on { border-color: var(--accent); background: var(--accent-weak); }
.wiz-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); position: sticky; bottom: -1px; background: var(--panel); }
@media (max-width: 820px) {
  .wiz-grid { grid-template-columns: 1fr; }
  .wiz-photo { position: static; order: -1; }
  .wiz-steps li { font-size: 0; justify-content: center; } .wiz-steps li b { font-size: 12px; }
  .wiz-steps li.on { font-size: 12px; }
}

/* Kalender verbinden */
.cal-ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cal-way h2 { display: flex; align-items: center; gap: 8px; }
.cal-way h2 svg { color: var(--accent); }
.steps-list { margin: 8px 0 12px; padding-left: 20px; line-height: 1.6; font-size: 13px; }
.sub-qr { display: flex; gap: 14px; align-items: flex-start; }
.sub-qr .qr-box { flex: none; width: 128px; height: 128px; background: #fff; padding: 6px; border-radius: 8px; border: 1px solid var(--line); }
.sub-qr .qr-box svg { width: 100%; height: 100%; display: block; }
.sub-qr .steps-list { margin-top: 0; }
.gdot.ext { color: #5d6b7c; }
@media (max-width: 900px) { .cal-ways { grid-template-columns: 1fr; } .sub-qr { flex-direction: column; } }

/* Menü: besser lesbar, untere Gruppen einklappbar */
.nav a { font-size: 15px; padding: 8px 11px; gap: 11px; }
.nav a svg { width: 18px; height: 18px; }
.nav-group { padding: 8px 10px 0; }
.nav-group > div:first-child:not(.fold-body) { font-size: 11px; }
.nav-fold { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--nav-head); padding: 7px 10px; border-radius: 6px; text-align: left; }
.nav-fold:hover { background: var(--nav-hover); color: var(--nav-active); }
.nav-fold .chev { margin-left: auto; font-size: 15px; transition: transform .15s; }
.nav .fold.open .nav-fold .chev { transform: rotate(90deg); }
.nav .fold .fold-body { display: none; }
.nav .fold.open .fold-body { display: block; }
.nav .fold.open .fold-badge { display: none; }
.nav .fold-badge { margin-left: 6px; text-transform: none; letter-spacing: 0; }
.nav .fold-badge:empty, .nav .fold-badge.hidden { display: none; }
@media (prefers-reduced-motion: reduce) { .nav-fold .chev { transition: none; } }
.nav .nav-foot a { font-size: 12.5px; padding: 0; display: inline; gap: 0; }
.nav .nav-group > .fold-body { text-transform: none; letter-spacing: 0; font-size: inherit; padding: 0; color: inherit; }

/* Kundenbildschirm: Aussehen wählen */
.disp-look { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px; align-items: start; }
.disp-prev { position: sticky; top: 76px; }
.prev-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); background: #0d1b26; box-shadow: var(--shadow); }
.prev-frame iframe { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; pointer-events: none; }
.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 8px; }
.skin-card, .lay-card { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: var(--panel); }
.skin-card input, .lay-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.skin-card.on, .lay-card.on { border-color: var(--accent); background: var(--accent-weak); box-shadow: 0 0 0 1px var(--accent); }
.skin-card:has(input:focus-visible), .lay-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.skin-card > span:last-child { display: grid; line-height: 1.25; }
.skin-card small { color: var(--muted); font-size: 11.5px; }
.skin-sw { flex: none; width: 58px; height: 38px; border-radius: 6px; position: relative; overflow: hidden; border: 1px solid rgba(0,0,0,.12); }
.skin-sw i { position: absolute; left: 5px; height: 7px; width: 30px; border-radius: 2px; }
.skin-sw i:nth-child(1) { top: 7px; } .skin-sw i:nth-child(2) { top: 18px; }
.skin-sw b { position: absolute; right: 5px; top: 7px; width: 14px; height: 18px; border-radius: 3px; }
.skin-sw em { position: absolute; left: 5px; bottom: 5px; width: 20px; height: 3px; border-radius: 2px; }
.lay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.lay-card { flex-direction: column; align-items: stretch; gap: 6px; font-size: 12.5px; font-weight: 600; text-align: center; }
.lay-sk { display: grid; grid-template-rows: 8px 1fr; gap: 3px; aspect-ratio: 16 / 9; background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 4px; }
.sk-top { background: var(--line-2); border-radius: 2px; }
.sk-body { display: grid; gap: 3px; min-height: 0; }
.sk-body > span { display: grid; place-items: center; border-radius: 3px; font-size: 10px; font-weight: 700; color: #fff; }
.sk-L { background: var(--accent); } .sk-S { background: #2b2f36; } .sk-I { background: var(--signal); }
.show-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 14px; margin-top: 8px; }
@media (max-width: 1100px) { .disp-look { grid-template-columns: 1fr; } .disp-prev { position: static; order: -1; } }

/* Reiter in den Beleglisten */
.doc-tabs { margin-bottom: 12px; }
.doc-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; font-size: 14.5px; }
.doc-tabs a svg { width: 16px; height: 16px; opacity: .8; }
.doc-tabs a:hover { color: var(--text); text-decoration: none; }
.doc-tabs a.active svg { opacity: 1; }
.doc-tabs .tab-n { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--line); color: var(--muted); font-size: 12px; line-height: 19px; text-align: center; font-weight: 600; }
.doc-tabs a.active .tab-n { background: var(--accent); color: #fff; }
.doc-tabs a.t-bad .tab-n:not([hidden]) { background: var(--st-red, #d64545); color: #fff; }
.amt { display: inline-flex; align-items: center; gap: 7px; justify-content: flex-end; }
.pay-dot { width: 13px; height: 13px; border-radius: 50%; flex: none; border: 1.5px solid var(--st-green, #2e9d5b);
  background: conic-gradient(var(--st-green, #2e9d5b) var(--f), transparent 0); }
td.due-late { color: var(--st-red, #d64545); font-weight: 600; }

/* Altdaten-Dateien übernehmen */
.leg-drop { display: flex; align-items: center; gap: 14px; padding: 22px; border: 2px dashed var(--line); border-radius: 12px; background: var(--bg-soft, rgba(127,127,127,.05)); }
.leg-drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.leg-drop > svg { width: 30px; height: 30px; color: var(--accent); flex: none; }
.leg-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 16px 0 6px; }
.leg-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.leg-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.leg-st { padding: 2px 9px; border-radius: 10px; font-size: 12.5px; font-weight: 600; background: var(--line); }
.leg-st.st-ok { background: color-mix(in srgb, var(--st-green) 18%, transparent); color: var(--st-green); }
.leg-st.st-pdf_only, .leg-st.st-unmatched, .leg-st.st-not_found { background: color-mix(in srgb, var(--st-orange) 18%, transparent); color: var(--st-orange); }
.leg-st.st-error { background: color-mix(in srgb, var(--st-red) 18%, transparent); color: var(--st-red); }
.leg-list { max-height: 46vh; overflow: auto; border-top: 1px solid var(--line); }
.leg-row { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: start; }
.leg-row .leg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.leg-row.st-ok .leg-name::before, .leg-row.st-duplicate .leg-name::before { content: '✓ '; color: var(--st-green); }
.leg-row.st-unmatched .leg-name::before, .leg-row.st-not_found .leg-name::before, .leg-row.st-pdf_only .leg-name::before { content: '! '; color: var(--st-orange); font-weight: 700; }
.leg-row.st-error .leg-name::before { content: '✕ '; color: var(--st-red); }
.leg-assign { display: block; margin-top: 6px; }
.leg-assign input { max-width: 300px; padding: 5px 8px; }
.leg-sugg { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.warn-text { color: var(--st-orange); }
@media (max-width: 640px) { .leg-row { grid-template-columns: 1fr; gap: 2px; } .leg-drop { flex-direction: column; text-align: center; } }
/* Zulassungsschein am Fahrzeug */
.reg-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.reg-doc > a { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; aspect-ratio: 1.42; background: var(--bg-soft, #f3f5f7); }
.reg-doc img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reg-doc .ph { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-weight: 600; }
.reg-doc .ph svg { width: 28px; height: 28px; }
.reg-doc .small { margin-top: 4px; }

/* WIS/ASRA-Suchfenster */
.wis-veh { margin-bottom: 14px; }
.wis-q { display: block; }
.wis-q span { display: block; font-weight: 600; margin-bottom: 6px; }
.wis-q input { font-size: 16px; padding: 10px 12px; }
.wis-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.chip { border: 1px solid var(--line); background: var(--panel-2, transparent); color: var(--text); border-radius: 14px; padding: 5px 12px; font-size: 14px; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.wis-out { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: var(--panel-2, rgba(127,127,127,.06)); border: 1px solid var(--line); }
.wis-out input { margin: 6px 0 4px; font-weight: 600; }

/* ===== Beleg-Editor (Aufbau wie Rechnung schreiben in einem Zug) ===== */
.crumbs { margin: -4px 0 8px; }
.doc-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 16px 20px; margin-bottom: 14px; position: sticky; top: 0; z-index: 20; }
.doc-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.doc-ic { width: 46px; height: 54px; border-radius: 4px 14px 4px 4px; background: var(--accent-weak); color: var(--accent); display: grid; place-items: center; flex: none; }
.doc-ic svg { width: 22px; height: 22px; }
.doc-id h1 { font-size: 21px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.doc-id .st-sel { width: auto; font-size: 13px; }
.doc-sum { font-size: 17px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.doc-steps { display: flex; align-items: center; gap: 0; }
.doc-step { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 16px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; }
.doc-step svg { width: 16px; height: 16px; }
.doc-step.on { background: var(--accent-weak); color: var(--accent); }
a.doc-step { color: var(--accent); }
a.doc-step:hover { background: var(--panel-2); text-decoration: none; }
.doc-step-line { width: 28px; height: 1.5px; background: var(--line-2); display: inline-block; }
.doc-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.btn.danger-text { color: var(--bad); }
.locked-banner.soft { background: var(--warn-weak); color: var(--warn); }
.doc-sheet { padding: 20px 22px 18px; }
.doc-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.doc-lbl { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.doc-row { margin-top: 20px; }
.doc-meta { row-gap: 10px; }
.doc-meta label { font-size: 13px; }
.pick-btn { width: 100%; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; text-align: left; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; cursor: pointer; color: var(--text); font: inherit; }
.pick-btn svg { grid-row: span 2; width: 20px; height: 20px; color: var(--muted); }
.pick-btn span { font-size: 16.5px; font-weight: 500; }
.pick-btn small { color: var(--faint); font-size: 12.5px; }
.pick-btn:hover, .pick-btn:focus-visible { border-color: var(--accent); background: var(--accent-weak); outline: none; }
.pick-btn:hover svg { color: var(--accent); }
.pick-card { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; background: var(--panel); line-height: 1.55; font-size: 15.5px; }
.pick-card .pc-name { font-weight: 650; font-size: 19px; }
.pc-veh .plate { margin-right: 6px; }
.pc-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.due-pick select, .due-pick input { width: 100%; }
.due-btn { width: 100%; display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; min-height: 38px; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.due-btn span { font-weight: 600; }
.due-btn small { color: var(--faint); flex: 1; }
.due-btn svg { width: 15px; height: 15px; color: var(--muted); }
.due-btn:hover { border-color: var(--accent); }
.ctext { position: relative; }
.ctext textarea { width: 100%; padding-right: 74px; resize: vertical; }
.ctext-tools { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 2px; }
.ctext-tools svg { width: 16px; height: 16px; }
.tpl-list { display: flex; flex-direction: column; gap: 6px; }
.tpl { display: flex; gap: 6px; align-items: center; }
.tpl-use { flex: 1; text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 8px 12px; cursor: pointer; font: inherit; color: var(--text); }
.tpl-use:hover { border-color: var(--accent); }
.tpl-use span { display: block; font-size: 12.5px; color: var(--muted); white-space: pre-wrap; }
.doc-items { margin: 24px -22px 0; border-top: 1px solid var(--line); }
.items-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 22px; }
.items-bar h2 { margin: 0; font-size: 16px; }
.sel-bar { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; font-size: 13px; color: var(--muted); }
.view-menu { padding: 8px 14px; min-width: 240px; }
.view-menu .check { display: flex; padding: 5px 0; }
.items2 { width: 100%; min-width: 900px; border-collapse: collapse; }
.items2 thead th { background: var(--panel-2); text-align: left; font-size: 13.5px; font-weight: 600; color: var(--muted); padding: 9px 6px; border-bottom: 1px solid var(--line); text-transform: none; letter-spacing: 0; white-space: nowrap; }
.items2 th.num { text-align: right; }
.items2 td { padding: 6px; vertical-align: top; border-bottom: 1px solid var(--line); }
.items2 tr.sel td { background: var(--accent-weak); }
.items2 input, .items2 select, .items2 textarea { padding: 7px 9px; font-size: 14.5px; width: 100%; }
.items2 .desc { min-height: 30px; margin-top: 5px; font-size: 13.5px; resize: none; overflow: hidden; color: var(--muted); }
.items2 .c-chk, .items2 .h-chk { width: 44px; text-align: center; padding-left: 14px; }
.items2 .c-chk input { width: 16px; height: 16px; margin-top: 9px; }
.all-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.all-chk input { width: 15px; height: 15px; }
.items2 .h-nr { width: 120px; } .items2 .h-kind { width: 96px; } .items2 .h-qty { width: 84px; } .items2 .h-unit { width: 84px; }
.items2 .h-price { width: 118px; } .items2 .h-disc { width: 78px; } .items2 .h-tax { width: 140px; } .items2 .h-total { width: 112px; } .items2 .h-act { width: 64px; }
.items2 .c-total { padding-top: 13px; font-variant-numeric: tabular-nums; font-weight: 600; }
.items2 .c-act { white-space: nowrap; padding-top: 9px; }
.items2 .c-act .icon-btn { color: var(--faint); }
.items2 .c-act .icon-btn:hover { color: var(--bad); }
.items2 tr.new-row td { background: transparent; border-bottom: 0; }
.items2 .star { display: inline-block; margin-top: 8px; font-weight: 700; color: var(--faint); }
.new-name { position: relative; }
.new-name > svg { position: absolute; left: 9px; top: 9px; width: 15px; height: 15px; color: var(--faint); pointer-events: none; }
.new-name input { padding-left: 30px; }
.new-name .picker-list { min-width: 420px; }
.doc-items .totals { padding-right: 22px; }
.doc-foot { margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.doc-save { display: flex; gap: 12px; align-items: center; margin-top: 14px; }
.doc-extras { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 14px; align-items: start; }
.doc-extras:empty { display: none; }
/* Auswahlfenster Kunde / Fahrzeug */
.pick-search { position: relative; margin-bottom: 10px; }
.pick-search > svg { position: absolute; left: 12px; top: 12px; width: 17px; height: 17px; color: var(--faint); }
.pick-search input { padding: 10px 12px 10px 38px; font-size: 15.5px; }
.pick-list { display: flex; flex-direction: column; gap: 4px; max-height: 52vh; overflow: auto; margin-bottom: 12px; }
.pick-row { display: flex; gap: 12px; justify-content: space-between; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 9px 13px; cursor: pointer; font: inherit; color: var(--text); }
.pick-row:hover, .pick-row.hl, .pick-row:focus-visible { border-color: var(--accent); background: var(--accent-weak); outline: none; }
.pr-main { min-width: 0; }
.pr-main .muted { display: block; font-size: 13.5px; }
.pr-side { text-align: right; flex: none; max-width: 40%; }
@media (max-width: 1100px) {
  .doc-hero { grid-template-columns: 1fr; position: static; }
  .doc-steps { justify-content: flex-start; flex-wrap: wrap; }
  .doc-acts { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .doc-top { grid-template-columns: 1fr; gap: 18px; }
  .doc-sheet { padding: 16px 14px; }
  .doc-items { margin: 20px -14px 0; }
  .items-bar { padding: 12px 14px; }
  .doc-step-line { width: 14px; }
}
.sel-bar[hidden] { display: none; }

/* Kundenbildschirm: Video oder Radio */
.media-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.seg { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 16px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg.on { border-color: var(--accent); background: var(--accent-weak); color: var(--accent); }
.seg:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
#mVideo[hidden], #mRadio[hidden] { display: none; }
.radio-cur { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); margin-bottom: 10px; }
.rc-logo { width: 52px; height: 52px; border-radius: 8px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; font-size: 22px; color: var(--accent); border: 1px solid var(--line); }
.rc-logo img { width: 100%; height: 100%; object-fit: contain; }
.radio-find { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.radio-find input[type=search] { flex: 1; min-width: 240px; }
.radio-find label { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.radio-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; max-height: 360px; overflow: auto; padding: 2px; }
.rs { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding-right: 4px; }
.rs.on { border-color: var(--accent); background: var(--accent-weak); }
.rs-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 7px 8px; text-align: left; cursor: pointer; font: inherit; color: var(--text); }
.rs-logo { width: 34px; height: 34px; border-radius: 6px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--accent); }
.rs-logo img { width: 100%; height: 100%; object-fit: contain; }
.rs-n { min-width: 0; display: flex; flex-direction: column; }
.rs-n b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-n small { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-pick .seg { background: var(--panel); margin: 0; }
.media-pick .seg.on { background: var(--accent-weak); }
.seg { position: relative; }
.seg input { width: 1px !important; height: 1px; left: 0; top: 0; }

/* Auftrag: Vorschläge aus dem Kalender */
.appt-sugg { margin-bottom: 18px; }
.sugg-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.sugg { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 170px; max-width: 260px; text-align: left; border: 1px solid var(--line); background: var(--panel-2); border-radius: 8px; padding: 8px 12px; cursor: pointer; font: inherit; color: var(--text); }
.sugg b { font-size: 13.5px; color: var(--accent); }
.sugg span { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sugg small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sugg:hover, .sugg.on { border-color: var(--accent); background: var(--accent-weak); }

/* Stempeluhr ohne laufende Zeit */
.timer-chip.idle { gap: 8px; }
.timer-chip.idle select { width: auto; max-width: 300px; min-width: 150px; padding: 4px 8px; font-size: 13px; border-radius: 6px; }
@media (max-width: 760px) { .timer-chip.idle select { max-width: 130px; min-width: 0; } }
.timer-chip.idle { background: var(--top-input, #fff); color: var(--text); }

/* Artikel & Lager */
.art-head { display: flex; align-items: center; gap: 18px; margin-bottom: 6px; flex-wrap: wrap; }
.art-head h1 { margin: 0; font-size: 24px; font-weight: 600; }
.art-search { position: relative; flex: 0 1 300px; }
.art-search > svg { position: absolute; left: 11px; top: 10px; width: 17px; height: 17px; color: var(--faint); }
.art-search input { padding-left: 36px; }
.art-tabs { margin-bottom: 12px; }
.art-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.art-count { font-size: 16px; font-weight: 500; margin-left: 8px; }
.art-tbl td { vertical-align: middle; }
.art-tbl .c-chk { width: 40px; text-align: center; }
.art-tbl .c-chk input { width: 16px; height: 16px; }
.art-tbl tr.sel td { background: var(--accent-weak); }
.art-desc { max-width: 520px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-thumb.sm { width: 26px; height: 26px; margin-right: 8px; vertical-align: middle; }
.art-thumb.sm img { width: 26px; height: 26px; }

/* ===== Firmenlogo-Einstellungen ===== */
.logo-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.logo-slot { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--panel-2); }
.logo-slot .hint { margin: 4px 0 8px; }
.logo-prev { width: 170px; height: 74px; flex: none; border-radius: 6px; display: grid; place-items: center; border: 1px dashed var(--line-2); overflow: hidden; }
.logo-prev.light { background: #fff; } .logo-prev.dark { background: #0b1218; }
.logo-prev img { max-width: 156px; max-height: 62px; object-fit: contain; }
.logo-prev span { font-size: 12px; color: #8295a9; }
@media (max-width: 560px) { .logo-slot { flex-direction: column; } .logo-prev { width: 100%; } }

/* schwebende Vorschlagsliste (über Tabellen und Karten) */
.picker-list.floating { position: fixed; right: auto; z-index: 400; max-height: none; overscroll-behavior: contain; }
.picker-list .picker-foot { position: sticky; bottom: 0; background: var(--panel-2); display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 10px; cursor: default; border-top: 1px solid var(--line); }
.picker-list .picker-foot:hover { background: var(--panel-2); }
.picker-list .grp { padding: 6px 10px 4px; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--panel-2); cursor: default; text-transform: none; }
.picker-list .grp:hover { background: var(--panel-2); }

/* Kunde/Fahrzeug direkt im Beleg suchen */
.inline-pick { position: relative; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel); padding: 0 12px; min-height: 48px; }
.inline-pick:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.inline-pick > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.inline-pick input { border: 0 !important; box-shadow: none !important; background: transparent; padding: 12px 0; font-size: 15px; flex: 1; min-width: 0; outline: none; }
.ip-acts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
.link-btn { background: none; border: 0; padding: 2px 0; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.link-btn svg { width: 14px; height: 14px; }
.link-btn:hover { text-decoration: underline; }
.veh-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.veh-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: var(--panel); border-radius: var(--radius); padding: 6px 10px; cursor: pointer; font: inherit; color: var(--text); }
.veh-chip:hover, .veh-chip.on { border-color: var(--accent); background: var(--accent-weak); }
.guess-hint { margin-top: 6px; font-size: 12px; color: var(--warn); display: flex; gap: 5px; align-items: center; }
.guess-hint svg { width: 13px; height: 13px; }
.picker-list.floating > div[data-i] { line-height: 1.35; }
.fin-list { margin: 8px 0 0; padding-left: 18px; } .fin-list li { margin-bottom: 6px; }
.oil-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.oil-facts span { display: block; font-size: 11px; color: var(--muted); } .oil-facts b { font-weight: 600; }
/* Ovoko-Teilesuche in der Positionsleiste */
.ovoko-search { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel); overflow: hidden; margin-left: 6px; height: 36px; }
.ovoko-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.ovoko-search > span { padding: 0 10px; font-size: 12px; font-weight: 700; color: #fff; background: #1f9d55; align-self: stretch; display: flex; align-items: center; }
.ovoko-search input { border: 0 !important; box-shadow: none !important; background: transparent; width: 190px; padding: 6px 8px; outline: none; }
.ovoko-search .icon-btn { margin-right: 2px; }
@media (max-width: 820px) { .ovoko-search { margin: 6px 0 0; flex: 1 1 100%; width: 100%; max-width: 100%; box-sizing: border-box; } .ovoko-search input { flex: 1; width: auto; min-width: 0; } }

/* ===== Lesbarkeit: Kunde/Fahrzeug im Beleg, Übersicht ===== */
.pc-lines { display: grid; gap: 2px; margin-top: 4px; }
.pc-line { display: flex; align-items: center; gap: 8px; color: var(--text); }
.pc-line svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.pc-line a { color: inherit; }
.pc-line a:hover { color: var(--accent); }
.pc-sub { color: var(--muted); }
.pc-veh .pc-name { font-size: 18px; }
.pc-veh .plate { font-size: 14px; }
.doc-left > .doc-lbl + * + .doc-lbl { margin-top: 22px; }
.kpi-stack { display: grid; grid-template-columns: 1fr; gap: 10px; }
.kpi-stack .kpi { padding: 12px 16px; display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 12px; }
.kpi-stack .kpi .label { grid-column: 1; }
.kpi-stack .kpi .value { grid-column: 2; grid-row: 1 / span 2; font-size: 22px; margin: 0; align-self: center; }
.kpi-stack .kpi .sub { grid-column: 1; }
.kpi-stack .kpi .sub:empty { display: none; }
@media (max-width: 1100px) {
  .kpi-stack { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* schmale Kacheln: Bezeichnung, Betrag, Zusatz untereinander statt nebeneinander */
  .kpi-stack .kpi { display: flex; flex-direction: column; gap: 2px; text-align: left; }
  .kpi-stack .kpi .value { order: 2; font-size: 22px; white-space: nowrap; }
  .kpi-stack .kpi .sub { order: 3; }
}
@media (max-width: 700px) {
  .kpi-stack { grid-template-columns: 1fr 1fr; }
  .kpi-stack .kpi { padding: 12px 13px; }
  .kpi-stack .kpi .label { font-size: 13px; line-height: 1.25; }
  .kpi-stack .kpi .value { font-size: clamp(16px, 5.2vw, 21px); }
  .kpi-stack .kpi .sub { font-size: 12px; line-height: 1.3; }
}
/* Telefon- und E-Mail-Links */
.tel-link, .mail-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); text-decoration: none; max-width: 100%; }
.tel-link svg, .mail-link svg { width: 15px; height: 15px; flex: none; opacity: .85; }
.tel-link span, .mail-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tel-link:hover span, .mail-link:hover span { text-decoration: underline; }
.mail-link.muted { color: var(--muted); } .mail-link.muted:hover { color: var(--accent); }
/* Tabellenzelle bleibt Tabellenzelle (sonst verrutschen die Linien) – nur die Links stehen untereinander */
.contact-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.contact-cell > a, .contact-cell > span { display: flex; width: fit-content; }
.contact-cell > * + * { margin-top: 2px; }
.contact-stack { margin-top: 4px; }
.pbx-howto { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; } .pbx-howto summary { cursor: pointer; font-weight: 600; } .pbx-howto ol { margin: 10px 0 4px; padding-left: 20px; line-height: 1.7; }

/* ===== Einstellungen: Bereiche links gruppiert ===== */
.set-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.set-nav { position: sticky; top: 16px; display: grid; gap: 14px; }
.set-grp { display: grid; gap: 2px; }
.set-grp-h { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 0 12px 4px; }
.set-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius); color: var(--text); font-weight: 500; text-decoration: none; }
.set-nav a svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.set-nav a:hover { background: var(--nav-hover); }
.set-nav a.active { background: var(--accent-weak); color: var(--accent); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.set-nav a.active svg { color: var(--accent); }
.set-title { font-size: 19px; margin: 2px 0 12px; }
.set-sel { display: none; }
@media (max-width: 900px) {
  .set-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .set-nav { display: none; }
  .set-sel { display: block; width: 100%; font-size: 16px; padding: 10px 12px; font-weight: 600; }
  .set-title { display: none; }
}
.imp-photos { max-width: 420px; margin: 10px auto 14px; text-align: left; display: grid; gap: 6px; } .imp-photos .bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; } .imp-photos .bar i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.upd-now { display: flex; gap: 16px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); margin-bottom: 14px; } .upd-ver { font-size: 20px; font-weight: 700; }

/* ================= Handy (bis 700 px) ================= */
.tc-pick { display: inline-flex; align-items: center; gap: 8px; position: relative; margin: 0; font: inherit; color: inherit; cursor: pointer; }
.tc-pick svg { width: 16px; height: 16px; flex: none; }
.tc-lbl { display: none; }
@media (max-width: 700px) {
  /* Kopfzeile: Suche breit, Stempeluhr kompakt (Antippen öffnet die Auftragsauswahl des Telefons) */
  .topbar { gap: 8px; }
  .topbar > div[style*="flex:1"] { display: none; }
  .topbar .search { flex: 1 1 auto; max-width: none; }
  .topbar .search input { width: 100%; padding: 9px 10px; }
  .timer-chip.idle { padding: 3px 3px 3px 10px; gap: 6px; }
  .timer-chip.idle .tc-lbl { display: inline; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
  .timer-chip.idle .tc-pick select { position: absolute; inset: -6px; width: auto; max-width: none; min-width: 0; opacity: 0; font-size: 16px; }
  .timer-chip .btn.sm { padding: 6px 9px; }

  /* Reiter: nur Symbol (+ Anzahl), der aktive mit Text – ohne Querscrollen */
  .doc-tabs, .art-tabs { overflow: visible; gap: 0; }
  .doc-tabs a { flex: 1 1 0; justify-content: center; padding: 10px 4px; gap: 5px; min-width: 0; }
  .doc-tabs a > span:not(.tab-n) { display: none; }
  .doc-tabs a.active { flex: 2.4 1 0; }
  .doc-tabs a.active > span:not(.tab-n) { display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .doc-tabs a svg { width: 19px; height: 19px; }
  .rep-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .rep-tabs a { min-width: 0 !important; padding: 11px 6px !important; font-size: 12px; letter-spacing: 0; white-space: normal; }

  /* Import/Export ist Büroarbeit am PC – am Handy ausgeblendet */
  .desk-only { display: none !important; }
  /* Kennzahlen zu zweit nebeneinander */
  .g3:has(> .kpi), .g4:has(> .kpi) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .kpi .value { font-size: 20px; overflow-wrap: anywhere; }
  /* Seitenkopf: Knöpfe umbrechen sauber */
  .page-head { flex-wrap: wrap; gap: 10px; }
  .page-head h1 { font-size: 22px; }
  .page-head .btn-row { width: 100%; }
  .page-head .btn-row .btn.primary { margin-left: auto; }

  /* Tabellen → Karten */
  .table-wrap { overflow-x: auto; }
  .table-wrap:has(> table.stackable) { overflow-x: clip; }
  table.stackable > thead { display: none; }
  table.stackable, table.stackable > tbody { display: block; width: 100%; }
  table.stackable > tbody > tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 8px 16px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.stackable > tbody > tr > td:first-child, table.stackable > tbody > tr > td:has(.btn) { grid-column: 1 / -1; }
  table.stackable > tbody > tr:last-child { border-bottom: 0; }
  table.stackable > tbody > tr > td { display: block; padding: 0; border: 0; min-width: 0; max-width: 100%; text-align: left; white-space: normal; }
  table.stackable > tbody > tr > td:empty, table.stackable > tbody > tr > td.hide-sm { display: none; }
  table.stackable > tbody > tr > td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--faint); margin-bottom: 1px; }
  table.stackable > tbody > tr > td:first-child[data-label]::before { display: none; }
  table.stackable > tbody > tr > td:first-child { font-size: 15.5px; }
  table.stackable > tbody > tr.click:hover td { background: transparent; }
  table.stackable > tbody > tr.click:active { background: var(--accent-weak); }
  table.stackable > tbody > tr > td[style*="box-shadow"] { box-shadow: none !important; }
  table.stackable > tbody > tr:has(> td[style*="box-shadow"]) { border-left: 4px solid var(--accent); }
  table.stackable > tbody > tr > td .btn { margin-top: 2px; }
  table.stackable > tbody > tr > td[colspan] { grid-column: 1 / -1; }

  /* Positionen im Beleg: jede Position als Karte */
  .items2 { min-width: 0; }
  .items2.stackable > tbody > tr[data-i], .items2.stackable > tbody > tr.new-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; position: relative; padding: 12px 12px 14px; }
  .items2.stackable > tbody > tr > td { padding: 0; }
  .items2 td.c-chk { display: none !important; }
  .items2 td.c-name { grid-column: 1 / -1; order: -2; padding-right: 64px !important; }
  .items2 tr.new-row td.c-name { padding-right: 0 !important; }
  .items2 td.c-act { position: absolute; top: 10px; right: 8px; display: flex !important; gap: 2px; }
  .items2 td.c-qty, .items2 td.c-unit, .items2 td.c-price { grid-column: span 2; }
  .items2 td.c-qty { order: 1; } .items2 td.c-unit { order: 2; } .items2 td.c-price { order: 3; } .items2 td.c-disc { order: 4; }
  .items2 td.c-nr { order: 5; } .items2 td.c-kind { order: 6; } .items2 td.c-tax { order: 7; } .items2 td.c-total { order: 9; }
  .items2.stackable > tbody > tr > td[data-label] { display: flex !important; flex-direction: column; justify-content: flex-end; }
  .items2.stackable > tbody > tr > td.c-total { display: block !important; }
  .items2.stackable > tbody > tr > td[data-label]::before { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .items2 td.c-nr, .items2 td.c-kind, .items2 td.c-tax { grid-column: span 2; }
  .items2 td.c-disc { grid-column: span 2; }
  .items2 td.c-total { grid-column: 1 / -1; text-align: right !important; font-weight: 700; font-size: 16px; }
  .items2 td.c-total::before { display: inline !important; margin-right: 8px; }
  .items2 tr.new-row td:empty { display: none; }
  .items2 input, .items2 select { font-size: 16px; }
  .items2 .desc { font-size: 15px; }
  .items-bar { gap: 8px; }
  .items-bar > div[style*="flex:1"] { display: none; }
  .items-bar .btn { flex: 1 1 auto; justify-content: center; }

  /* Belegkopf: Fortschritt kompakter, Knöpfe in voller Breite */
  .doc-hero { gap: 12px; }
  .doc-steps { order: 3; width: 100%; justify-content: flex-start; flex-wrap: nowrap; overflow: hidden; }
  .doc-step { padding: 5px 8px; font-size: 13px; }
  .doc-step-line { width: 12px; }
  .doc-acts { width: 100%; justify-content: stretch; }
  .doc-acts > .btn, .doc-acts > a.btn { flex: 1 1 auto; justify-content: center; }

  /* Kalender: Tagesansicht lesbar */
  .cal-head { font-size: 12.5px; padding: 6px 2px; }
  .appt { font-size: 13px; }
  #cUser { max-width: 46%; }
}

/* ================= Einklappbare Karten (Übersicht: Fälligkeiten) ================= */
.fold-card .fold-head { cursor: pointer; user-select: none; }
.fold-card .fold-head h2 .pill { margin-left: 6px; vertical-align: 2px; }
.fold-card .fold-head .chev { font-size: 20px; line-height: 1; color: var(--muted); margin-left: 6px; transition: transform .15s; display: inline-block; }
.fold-card.open .fold-head .chev { transform: rotate(90deg); }
.fold-card:not(.open) .fold-body { display: none; }
.fold-card:not(.open) .fold-head { border-bottom: 0; }
.fold-card .fold-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .fold-card .fold-head .chev { transition: none; } }

/* ================= Kalender am Handy: Monat & Liste ================= */
.ag-top { display: flex; flex-direction: column; gap: 10px; margin: 2px 0 12px; }
.ag-title { display: flex; align-items: center; gap: 4px; }
.ag-title h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.02em; flex: 1; }
.ag-title h1 span { color: var(--muted); font-weight: 600; }
.ag-title .ag-ib { font-size: 26px; line-height: 1; padding: 4px 12px; }
.ag-tools { display: flex; gap: 8px; align-items: center; }
.ag-tools select { width: auto; flex: 1 1 0; min-width: 0; }
.ag-tools .ag-ib { padding: 8px 11px; }
.ag-tools .ag-ib svg { width: 18px; height: 18px; }
.ag-month { padding: 4px 4px 8px; }
.ag-wd, .ag-week { display: grid; grid-template-columns: 18px repeat(7, minmax(0, 1fr)); align-items: start; }
.ag-wd span { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 0 4px; }
.ag-week { border-top: 1px solid var(--line); }
.ag-kw { font-size: 10px; color: var(--faint); padding-top: 6px; text-align: left; }
.ag-day { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 0 7px; background: none; border: 0; font: inherit; color: var(--text); cursor: pointer; min-height: 58px; border-radius: 10px; -webkit-tap-highlight-color: transparent; }
.ag-day.we .ag-num { color: var(--muted); }
.ag-num { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ag-day.today .ag-num { color: var(--bad); font-weight: 800; }
.ag-day.sel .ag-num { background: var(--text); color: var(--panel); }
.ag-day.today.sel .ag-num { background: var(--bad); color: #fff; }
.ag-bars { display: flex; gap: 2px; height: 6px; width: 78%; justify-content: center; }
.ag-bars i { flex: 1 1 0; max-width: 20px; border-radius: 3px; background: var(--c); }
.ag-list { padding: 0; overflow: hidden; }
.ag-date { padding: 13px 16px; font-weight: 700; font-size: 15px; border-bottom: 1px solid var(--line); }
.ag-ev { display: flex; align-items: stretch; gap: 12px; width: 100%; padding: 12px 16px; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.ag-ev:last-child { border-bottom: 0; }
.ag-ev:active { background: var(--panel-2); }
.ag-ev.done { opacity: .55; }
.ag-bar { width: 4px; border-radius: 2px; background: var(--c); flex: none; }
.ag-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ag-main b { font-size: 16px; overflow-wrap: anywhere; }
.ag-sub { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.ag-time { flex: none; text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; line-height: 1.35; }
.ag-time span { color: var(--muted); }

/* Handy: Seitenkopf der Übersicht in einer Zeile, Menü-Knopf mit Zähler */
@media (max-width: 700px) {
  .page-head .btn-row { align-items: center; }
  .menu-btn { position: relative; }
  .menu-btn .tb-badge { position: absolute; top: 0; right: -4px; background: var(--signal); color: #1b1300; border-radius: 8px; font-size: 10px; font-weight: 700; padding: 0 5px; line-height: 16px; }
}

/* Handy: Dialoge – großes Schließen-Kreuz, Knöpfe gleich groß */
@media (max-width: 700px) {
  .modal-bg { padding: 12px 10px calc(12px + env(safe-area-inset-bottom)); }
  .modal-head { padding: 10px 8px 10px 16px; }
  .modal-head [data-close] { width: 44px; height: 44px; font-size: 20px; display: grid; place-items: center; flex: none; color: var(--muted); border-radius: 10px; }
  .modal-head [data-close]:hover { color: var(--text); background: var(--panel-2); }
  .modal-foot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; }
  .modal-foot > .btn { width: 100%; justify-content: center; min-height: 46px; margin: 0; }
  .modal-foot > button.btn:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; }
  .modal-foot .left { grid-column: 1 / -1; margin: 0 0 4px; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .modal-foot .left:empty { display: none; }
  .modal-foot .left .btn { width: 100%; justify-content: center; min-height: 46px; margin: 0; }
}

/* Kundenbildschirm: Sender in einer .m3u-Liste suchen */
.chan-find { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.chan-list { flex: 1 1 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; }
.chan-list:empty { display: none; }
.chan { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.chan b { font-size: 13.5px; overflow-wrap: anywhere; }
.chan small { color: var(--muted); font-size: 11.5px; }
.chan:hover { border-color: var(--accent); }
.chan.on { border-color: var(--accent); background: var(--accent-weak); }

/* ================= E-Mail (Aufbau wie Thunderbird) ================= */
.mf-top { padding: 12px; display: grid; gap: 8px; }
.mf-top .btn { justify-content: center; }
.mf-acc { display: flex; align-items: center; gap: 8px; padding: 6px 14px 4px; font-weight: 700; font-size: 13px; color: var(--accent); }
.mf-acc svg { width: 16px; height: 16px; flex: none; }
.mf-acc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-folders nav { padding-bottom: 14px; }
.mail-folders nav a { padding: 6px 12px 6px calc(14px + var(--d, 0) * 16px); border-left: 3px solid transparent; font-size: 14px; }
.mail-folders nav a.has-new span { font-weight: 700; }
.mail-folders nav a.active { border-left-color: var(--accent); }
.mail-folders nav a.drop { background: var(--accent); color: #fff; }
.mail-folders nav a.drop svg { color: #fff; }
.mail-qf { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.qf { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.qf svg { width: 14px; height: 14px; }
.qf.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.qf-count { margin-left: auto; white-space: nowrap; }
/* Spalten: Stern | Anhang | Betreff | Von/An | Datum */
.mail-head, .mail-item { display: grid; grid-template-columns: 26px 18px minmax(0, 1.5fr) 22px minmax(0, 1fr) 84px; align-items: center; column-gap: 6px; }
.mail-head { padding: 5px 10px 5px 8px; font-size: 12px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--panel-2); }
.mail-head svg { width: 13px; height: 13px; }
.mail-head .mh-star, .mail-head .mh-att { display: grid; place-items: center; }
.mail-head .mh-date { text-align: right; }
.mail-item { padding: 0 10px 0 8px; min-height: 34px; border-bottom: 1px solid var(--line); cursor: default; user-select: none; font-size: 13.5px; position: relative; }
.mail-item:hover { background: var(--panel-2); }
.mail-item.sel { background: var(--accent-weak); }
.mail-item.cur { box-shadow: inset 3px 0 0 var(--accent); }
.mail-item.unread .mi-subj, .mail-item.unread .mi-from, .mail-item.unread .mi-date { font-weight: 700; color: var(--text); }
.mi-star { width: 26px; height: 26px; display: grid; place-items: center; border: 0; background: none; color: var(--faint); cursor: pointer; border-radius: 6px; padding: 0; }
.mi-star svg { width: 15px; height: 15px; }
.mi-star:hover { color: var(--signal); background: var(--panel); }
.mi-star.on { color: #e8a317; }
.mi-star.on svg { fill: currentColor; }
.mi-att { display: grid; place-items: center; color: var(--muted); }
.mi-att svg { width: 14px; height: 14px; }
.mi-subj, .mi-from { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.mi-from { color: var(--muted); display: flex; align-items: center; gap: 6px; min-width: 0; }
.mh-read { text-align: center; font-size: 10px; color: var(--faint); }
.mi-read { width: 22px; height: 26px; display: grid; place-items: center; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 6px; }
.mi-read i { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); opacity: .45; transition: transform .1s; }
.mail-item.unread .mi-read i { background: #2fa860; opacity: 1; }
.mi-read:hover { background: var(--panel); }
.mi-read:hover i { transform: scale(1.3); }
.mi-read:focus-visible { outline: 2px solid var(--accent); }
.mi-ans { color: var(--muted); margin-right: 4px; }
.mi-cust { font-size: 11px; padding: 0 6px; vertical-align: 1px; }
.mi-date { text-align: right; color: var(--muted); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mail-drag { position: fixed; top: -100px; left: -100px; padding: 6px 12px; background: var(--accent); color: #fff; border-radius: 6px; font-weight: 600; font-size: 13px; }
#msgList:focus { outline: none; }
#msgList:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
/* Lesebereich */
.mail-tools .btn svg { width: 15px; height: 15px; }
.mail-tools .flag-on { color: #e8a317; }
.mail-tools .flag-on svg { fill: currentColor; }
.mail-body { padding: 14px 18px; }
.mail-hdr { padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.mail-hdr h2 { font-size: 18px; margin: 0 0 8px; overflow-wrap: anywhere; }
.mh-grid { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 3px 10px; margin-bottom: 8px; }
.mh-grid > div:nth-child(odd) { color: var(--muted); }
.mh-grid > div { overflow-wrap: anywhere; }
.mail-imgbar { margin: 0 0 6px; }
.mail-attbar { border-top: 1px solid var(--line); padding: 8px 12px 4px; background: var(--panel-2); max-height: 34%; overflow-y: auto; flex: none; }
.mab-h { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.mab-h svg { width: 14px; height: 14px; }
.mail-attbar .mail-atts { margin-bottom: 4px; }
.mail-att .btn.sm { padding: 3px 7px; }
.mail-att .btn svg { width: 14px; height: 14px; }
.mail-att a span { overflow: hidden; text-overflow: ellipsis; }
.mail-multi { margin: auto; text-align: center; padding: 30px 20px; max-width: 420px; }
.mm-n { font-size: 46px; font-weight: 800; color: var(--accent); line-height: 1; }
.mm-t { font-size: 16px; font-weight: 600; margin: 6px 0 18px; }
.mm-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mm-acts .btn { justify-content: center; }
.mail-read:has(.mail-multi) { justify-content: center; }
/* Verschieben-Dialog */
.move-list { margin-top: 10px; max-height: 55vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
.move-h { padding: 8px 12px 4px; font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--panel-2); }
.move-f { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 12px 9px calc(12px + var(--d, 0) * 16px); background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.move-f:last-child { border-bottom: 0; }
.move-f:hover, .move-f:focus-visible { background: var(--accent-weak); outline: none; }
.move-f svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.move-f small { color: var(--muted); }
/* Signaturbild */
.sig-set { display: grid; gap: 10px; }
.sig-prev { padding: 14px; border: 1px dashed var(--line); border-radius: 8px; background: #fff; min-height: 50px; display: flex; align-items: center; }
.sig-prev img { max-width: 100%; height: auto; display: block; }
.sig-w { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.sig-pick { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.sig-pick img { height: auto; max-height: 60px; object-fit: contain; background: #fff; padding: 4px; border-radius: 4px; }
.chk { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
/* mittelbreite Bildschirme: Spalte „Von“ unter den Betreff */
@media (max-width: 1400px) and (min-width: 981px) {
  .mail-shell { grid-template-columns: var(--mf-w, 210px) var(--ml-w, minmax(330px, 1fr)) minmax(0, 1.1fr); }
}
/* Handy/Tablet: Liste zweizeilig */
@media (max-width: 980px) {
  .mail-head { display: none; }
  .mail-qf .qf span { display: none; }
  .mail-qf .qf { padding: 6px 10px; }
  .mail-item { grid-template-columns: 30px minmax(0, 1fr) auto 28px; grid-template-areas: "star from date read" "star subj att read"; padding: 8px 6px 8px 6px; row-gap: 2px; min-height: 58px; }
  .mi-read { grid-area: read; width: 28px; height: 40px; }
  .mi-star { grid-area: star; }
  .mi-from { grid-area: from; font-size: 14.5px; color: var(--text); }
  .mi-subj { grid-area: subj; color: var(--muted); font-size: 13.5px; }
  .mail-item.unread .mi-subj { color: var(--text); }
  .mi-date { grid-area: date; }
  .mi-att { grid-area: att; justify-self: end; }
  .mail-tools .btn > span { display: none; }
  .mail-tools { flex-wrap: nowrap; gap: 2px; padding: 6px; }
  .mail-tools .btn.sm { padding: 6px 8px; }
  .mail-attbar { max-height: 40%; }
  .mm-acts { grid-template-columns: 1fr; }
}
/* Lesebereich schmal: Knöpfe nur als Symbol */
.mail-read { container-type: inline-size; }
@container (max-width: 600px) { .mail-tools .btn > span, .mail-tools [data-a="replyall"] { display: none; } }

/* Spaltenbreiten im E-Mail-Bereich mit der Maus ziehen (Doppelklick = Standard) */
.mail-shell { position: relative; }
.mail-split { position: absolute; top: 0; bottom: 0; width: 10px; cursor: col-resize; z-index: 6; touch-action: none; }
.mail-split::after { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 3px; background: transparent; transition: background .12s; }
.mail-split:hover::after, .mail-split.drag::after { background: var(--accent); }
.mail-shell.resizing, .mail-shell.resizing * { cursor: col-resize !important; user-select: none !important; }
.mail-shell.resizing iframe { pointer-events: none; }
@media (max-width: 980px) { .mail-split { display: none; } }

/* ================= Kalender: Wochenplan (Mo–So × Vormittag/Nachmittag/Abend) ================= */
:root { --pl-vm: #2e75b6; --pl-nm: #333f50; --pl-ab: #222a35; --pl-vm-bg: #e6f0fa; --pl-nm-bg: #e9f2e3; --pl-ab-bg: #dbe8f5; --pl-ganz-bg: #f3f4f6; }
:root[data-theme="dark"] { --pl-vm: #2c6aa3; --pl-nm: #3b4a5e; --pl-ab: #2a3442; --pl-vm-bg: #17283a; --pl-nm-bg: #1a2a20; --pl-ab-bg: #162333; --pl-ganz-bg: #1b222c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --pl-vm: #2c6aa3; --pl-nm: #3b4a5e; --pl-ab: #2a3442; --pl-vm-bg: #17283a; --pl-nm-bg: #1a2a20; --pl-ab-bg: #162333; --pl-ganz-bg: #1b222c; } }
.plan-card { padding: 18px 18px 20px; }
.plan-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.plan-top h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; color: var(--pl-vm); text-transform: uppercase; }
.plan-week { font-size: 13.5px; }
.plan-week span:first-child { color: #5c9c46; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; font-size: 12px; margin-right: 6px; }
.plan { display: grid; grid-template-columns: 120px repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.pl-corner { background: var(--panel); border-bottom: 1px solid var(--line); }
.pl-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 9px 4px; color: #fff; text-align: center; font-size: 12.5px; }
.pl-day b { font-size: 14px; letter-spacing: .04em; }
.pl-day span { opacity: .85; font-variant-numeric: tabular-nums; }
.pl-day .pl-wdl { display: none; }
.pl-day { background: #232c37; }
.pl-day[data-i="1"], .pl-day[data-i="5"] { background: #1f4e79; }
.pl-day[data-i="2"], .pl-day[data-i="4"] { background: #2e75b6; }
.pl-day.today { box-shadow: inset 0 -4px 0 #f0b429; }
.pl-band { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; padding: 10px 6px; border-top: 1px solid rgba(255,255,255,.12); text-align: center; }
.pl-band.pl-vm { background: var(--pl-vm); }
.pl-band.pl-nm { background: var(--pl-nm); }
.pl-band.pl-ab { background: var(--pl-ab); }
.pl-band.pl-ganz { background: var(--panel-2); color: var(--muted); font-size: 11.5px; }
.pl-cell { min-height: 132px; padding: 6px; border-left: 1px solid var(--line); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; cursor: cell; min-width: 0; }
@media (hover: hover) { .pl-cell:hover { outline: 2px solid var(--accent); outline-offset: -2px; } }
.pl-vm-c { background: repeating-linear-gradient(var(--pl-vm-bg) 0 33px, var(--panel) 33px 66px); }
.pl-nm-c { background: repeating-linear-gradient(var(--pl-nm-bg) 0 33px, var(--panel) 33px 66px); }
.pl-ab-c { background: repeating-linear-gradient(var(--pl-ab-bg) 0 33px, var(--panel) 33px 66px); }
.pl-ganz-c { min-height: 44px; background: var(--pl-ganz-bg); }
.pl-cell.today { box-shadow: inset 2px 0 0 #f0b429, inset -2px 0 0 #f0b429; }
.pl-dl { display: none; }
.pl-ev { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 4px 6px 5px 8px; border: 0; border-left: 3px solid var(--c); border-radius: 5px; background: var(--bg); color: #14202d; font: inherit; font-size: 12px; text-align: left; cursor: pointer; min-width: 0; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pl-ev b { font-size: 12.5px; line-height: 1.25; overflow-wrap: anywhere; }
.pl-ev .pl-t { font-weight: 700; font-variant-numeric: tabular-nums; color: #2b3a4a; }
.pl-ev .pl-s { color: #3d4b5a; font-size: 11.5px; overflow-wrap: anywhere; }
.pl-ev.done { opacity: .55; }
.pl-ev:hover { filter: brightness(.96); }
@media (max-width: 1200px) { .plan { grid-template-columns: 92px repeat(7, minmax(0, 1fr)); } .pl-band { font-size: 11px; letter-spacing: .02em; } }
/* Handy: Tag für Tag untereinander */
@media (max-width: 700px) {
  .plan-card { padding: 12px; }
  .plan-top h2 { font-size: 17px; }
  .plan { display: flex; flex-direction: column; border-radius: 8px; }
  .plan > * { order: var(--o, 0); }
  .pl-corner, .pl-band { display: none; }
  .pl-day { flex-direction: row; justify-content: space-between; padding: 10px 14px; }
  .pl-day b { display: none; }
  .pl-day .pl-wdl { display: inline; font-weight: 700; opacity: 1; font-size: 15px; }
  .pl-cell { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: flex-start; padding: 6px 10px 8px; border-left: 0; background: var(--panel); }
  .pl-cell .pl-ev { flex: 1 1 100%; }
  .pl-dl { display: block; flex: 1 1 100%; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
  .pl-vm-c .pl-dl { color: var(--pl-vm); }
  .pl-cell.today { box-shadow: none; }
}
@media print {
  .plan-card { box-shadow: none; border: 0; padding: 0; }
  .plan { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .page-head { display: none; }
  .pl-cell { min-height: 110px; }
}

/* Datums- und Zeitfelder: iPhone gibt ihnen eine Mindestbreite und zentriert den Text – an die anderen Felder angleichen */
input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] { min-width: 0; max-width: 100%; box-sizing: border-box; display: block; -webkit-appearance: none; appearance: none; min-height: 38px; text-align: left; }
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value, input[type="datetime-local"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
@media (max-width: 820px) { input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] { min-height: 44px; } }
/* iPhone vergrößert die Seite beim Antippen von Feldern unter 16 px – danach ließe sie sich seitlich schieben */
@media (max-width: 820px) { .inline-pick input, input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; } }

/* Anmeldung: angemeldet bleiben, Passwort vergessen */
.login-remember { font-size: 14px; color: var(--muted); margin: -2px 0 2px; }
.link-btn { background: none; border: 0; padding: 6px 0 0; color: var(--accent); font: inherit; font-size: 13.5px; cursor: pointer; justify-self: center; }
.link-btn:hover { text-decoration: underline; }
.lock-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 8px; background: var(--bad-weak); color: var(--bad); font-weight: 600; }
.lock-note svg { width: 16px; height: 16px; }

/* Handy: Menü unten in der Leiste (statt oben), Suchfeld ab dem linken Rand, Stempeluhr sauber als Pille */
@media (max-width: 820px) {
  .topbar .menu-btn { display: none !important; }
  .topbar { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .topbar .search { flex: 1 1 auto; min-width: 0; max-width: none; }
  #timerChip { flex: none; min-width: 0; }
  .timer-chip { height: 40px; padding: 4px 4px 4px 12px !important; gap: 6px; border-radius: 999px; box-sizing: border-box; overflow: hidden; }
  .timer-chip .btn.sm, .timer-chip .btn { height: 32px; min-width: 34px; padding: 0 9px !important; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; margin: 0; flex: none; }
  .timer-chip .btn svg { width: 16px; height: 16px; }
  .timer-chip.idle .tc-lbl { max-width: 84px; }
  #tbMenu { position: relative; }
  #tbMenu .tb-badge { left: 56%; }
  /* Seitenkopf: Titel und Hauptknopf in einer Zeile */
  .page-head { flex-wrap: wrap; align-items: center; }
  .page-head .btn-row { width: auto !important; flex: 1 1 auto; justify-content: flex-end; flex-wrap: wrap; }
  .page-head h1 { flex: 0 1 auto; }
}

/* Handy: abgedunkelter Hintergrund hinter dem offenen Menü fängt das Tippen ab */
.nav-backdrop { display: none; }
@media (max-width: 820px) {
  .nav-backdrop { position: fixed; inset: 0; z-index: 89; background: rgba(8, 18, 30, .38); -webkit-tap-highlight-color: transparent; touch-action: none; }
  html.nav-lock .nav-backdrop { display: block; animation: bdIn .15s ease-out; }
  @keyframes bdIn { from { opacity: 0; } to { opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) { html.nav-lock .nav-backdrop { animation: none; } }

/* Handy: Zähler als kleines Abzeichen an der Ecke des Symbols – überlagert nichts mehr */
@media (max-width: 700px) {
  .doc-tabs a { position: relative; padding: 12px 2px 10px; }
  .doc-tabs a:not(.active) .tab-n { position: absolute; top: 3px; left: calc(50% + 5px); min-width: 16px; padding: 0 4px; font-size: 0; line-height: 15px; border-radius: 8px; }
  .doc-tabs a:not(.active) .tab-n::after { content: attr(data-short); font-size: 10px; }
  .doc-tabs a.active .tab-n { font-size: 0; padding: 0 6px; }
  .doc-tabs a.active .tab-n::after { content: attr(data-short); font-size: 12px; }
}

/* Urheberrechtsvermerk */
.copyright { margin-top: 6px; text-align: center; font-size: 11.5px; color: var(--faint); letter-spacing: .01em; }
.copyright.sm { margin-top: 2px; font-size: 11px; text-align: left; }
.login .copyright { margin-top: 4px; }
@media print { .copyright { display: none; } }

/* Menü-Nadel: fixieren je Seite */
.nav-pin svg { width: 16px; height: 16px; display: block; }
.nav-pin.pin-mode { color: var(--accent); background: var(--nav-hover); }
.nav-pin.pin-mode:hover { color: #fff; background: var(--accent); }

/* ================= Menü als Symbolleiste (PC) ================= */
/* Die Leiste liegt immer als feste Ebene links (60 px breit); der Inhalt hat dafür eine eigene Spalte und
   verrutscht beim Aufklappen nicht. Aufklappen = sanftes Verbreitern auf 232 px, die Namen werden dabei sichtbar. */
.rail-logo { display: none; }
@media (min-width: 821px) {
  .shell.nav-collapsed.nav-rail { grid-template-columns: 60px minmax(0, 1fr); }
  .shell.nav-collapsed.nav-rail > .main { grid-column: 2; grid-row: 1; }
  .shell.nav-collapsed.nav-rail .nav-peek { display: none; }
  .shell.nav-collapsed.nav-rail .content { padding-left: 24px; }
  .shell.nav-collapsed.nav-rail .nav {
    position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: 60px; transform: none; z-index: 95;
    overflow-x: hidden; overflow-y: auto; scrollbar-width: none;
    transition: width .26s cubic-bezier(.22, .61, .36, 1), box-shadow .26s ease;
  }
  .shell.nav-collapsed.nav-rail .nav::-webkit-scrollbar { display: none; }
  .shell.nav-collapsed.nav-rail.nav-float .nav { width: 232px; box-shadow: 10px 0 34px rgba(0, 0, 0, .2); scrollbar-width: thin; }
  /* Inhalte haben immer die volle Breite – die Leiste schneidet sie nur ab, darum springt beim Aufklappen nichts */
  .shell.nav-rail .nav > * { width: 232px; box-sizing: border-box; flex: none; }
  .shell.nav-rail .nav-foot { margin-top: auto; }
  .shell.nav-rail .nav a, .shell.nav-rail .nav-fold { white-space: nowrap; }
  .shell.nav-rail .brand.logo { height: 104px; display: flex; align-items: center; position: relative; }
  .shell.nav-rail .brand.logo > :not(.rail-logo) { transition: opacity .2s ease; }
  .shell.nav-rail .rail-logo { display: block; position: absolute; left: 14px; top: 36px; width: 32px; height: 32px; transition: opacity .2s ease; }
  .shell.nav-rail.nav-float .rail-logo { opacity: 0; }
  .shell.nav-rail:not(.nav-float) .brand.logo > :not(.rail-logo) { opacity: 0; pointer-events: none; }
  /* Beschriftungen ein-/ausblenden */
  .shell.nav-rail .nav a > span:not(.badge), .shell.nav-rail .nav-group > div:not(.fold-body), .shell.nav-rail .nav-fold, .shell.nav-rail .nav-foot { transition: opacity .2s ease, color .2s ease; }
  .shell.nav-rail:not(.nav-float) .nav a > span:not(.badge) { opacity: 0; }
  .shell.nav-rail:not(.nav-float) .nav-foot { opacity: 0; pointer-events: none; }
  .shell.nav-rail:not(.nav-float) .nav-group > div:not(.fold-body) { color: transparent; position: relative; }
  .shell.nav-rail:not(.nav-float) .nav-group > div:not(.fold-body)::after { content: ""; position: absolute; left: 10px; width: 20px; top: 50%; border-top: 1px solid var(--nav-line); }
  .shell.nav-rail:not(.nav-float) .nav-fold { color: transparent; position: relative; }
  .shell.nav-rail:not(.nav-float) .nav-fold .chev { color: var(--nav-head); position: absolute; left: 19px; margin: 0; }
  .shell.nav-rail .nav a.active { box-shadow: inset 3px 0 0 var(--signal); }
  /* Zähler: in der schmalen Leiste als Abzeichen am Symbol */
  .shell.nav-rail .nav a { position: relative; }
  .shell.nav-rail:not(.nav-float) .nav .badge { position: absolute; left: 26px; top: 2px; margin: 0; padding: 0 4px; min-width: 15px; font-size: 9.5px; line-height: 15px; text-align: center; }
  .shell.nav-rail:not(.nav-float) .nav-fold .fold-badge { position: absolute; left: 26px; top: 0; color: #04161d; font-size: 9.5px; padding: 0 4px; }
  .shell.nav-rail .nav a { min-height: 39px; }
}
@media (min-width: 821px) and (prefers-reduced-motion: reduce) {
  .shell.nav-collapsed.nav-rail .nav, .shell.nav-rail .nav * { transition: none !important; }
}

/* Drei-Striche-Knopf oben wird nicht mehr gebraucht (PC: Symbolleiste / linker Rand, Handy: „Menü“ unten) – Suche beginnt ganz links */
.topbar .menu-btn { display: none !important; }
@media (min-width: 821px) { .topbar .search { flex: 0 1 560px; max-width: 560px; } }

/* Zulassungs-Erkennung: Hinweis, womit gelesen wurde */
.ocr-note { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--ok); margin: 0 0 8px; }
.ocr-note svg { width: 14px; height: 14px; flex: none; }
.ocr-note.warn { color: var(--warn); }
.ocr-cmp { width: 100%; font-size: 13px; }
.ocr-cmp td, .ocr-cmp th { padding: 5px 8px; vertical-align: top; }
.ocr-cmp td.diff { background: var(--warn-weak); }

/* Belege: Stapel-Scan */
.spin-dot { display: inline-block; width: 10px; height: 10px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
.bk-tools { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.bk-tools .btn { padding: 2px 8px; font-size: 12px; }
.bk-split { grid-template-columns: minmax(0, 1fr) 320px; }
.bk-side { position: sticky; top: 70px; align-self: start; }
@media (max-width: 900px) {
  .bk-split { grid-template-columns: minmax(0, 1fr); }
  .bk-side { position: static; order: -1; }
  .bk-tray { max-height: none; }
}
