:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --brand: #0f172a;
  --accent: #16a34a;
  --accent-ink: #ffffff;
  --danger: #dc2626;
  --warn: #d97706;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .18);

  --s-gray: #64748b;    --s-gray-bg: #f1f5f9;
  --s-purple: #7c3aed;  --s-purple-bg: #f3e8ff;
  --s-blue: #2563eb;    --s-blue-bg: #dbeafe;
  --s-orange: #c2410c;  --s-orange-bg: #ffedd5;
  --s-green: #15803d;   --s-green-bg: #dcfce7;
  --s-teal: #0f766e;    --s-teal-bg: #ccfbf1;
  --s-red: #b91c1c;     --s-red-bg: #fee2e2;
  --s-yellow: #a16207;  --s-yellow-bg: #fef9c3;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.boot { padding: 40px; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.shell > div { min-width: 0; }
.sidebar {
  background: var(--brand); color: #e2e8f0; padding: 18px 12px;
  display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 700; color: #fff; }
.brand img { width: 28px; height: 28px; }
.brand small { display: block; font-weight: 400; color: #94a3b8; font-size: 12px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  text-decoration: none; color: #cbd5e1; font-weight: 500;
}
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: rgba(255,255,255,.12); color: #fff; }
.nav svg { width: 18px; height: 18px; flex: none; }
.sidebar .spacer { flex: 1; }
.sidebar .who { padding: 10px 12px; font-size: 13px; color: #94a3b8; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar .who b { color: #e2e8f0; display: block; font-weight: 600; }
.sidebar .who button { background: none; border: 0; color: #94a3b8; padding: 0; margin-top: 4px; cursor: pointer; text-decoration: underline; }

.main { min-width: 0; padding: 22px 28px 60px; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.topbar h1 { margin-right: auto; }
.mobile-bar, .bottom-nav { display: none; }

/* ---------- Komponenten ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-2); background: var(--panel); border-radius: 8px;
  padding: 8px 14px; font-weight: 550; cursor: pointer; text-decoration: none; white-space: nowrap;
  min-height: 38px;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(.95); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.danger { color: var(--danger); border-color: #fecaca; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { padding: 4px 10px; min-height: 30px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg { width: 16px; height: 16px; }

.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: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin-right: auto; }
.card-body { padding: 14px 18px; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }

.stats { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { padding: 14px 16px; text-decoration: none; display: block; }
.stat .n { font-size: 26px; font-weight: 700; margin-top: 2px; }
.stat .l { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; line-height: 1.6;
}
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.c-gray { color: var(--s-gray); background: var(--s-gray-bg); }
.c-purple { color: var(--s-purple); background: var(--s-purple-bg); }
.c-blue { color: var(--s-blue); background: var(--s-blue-bg); }
.c-orange { color: var(--s-orange); background: var(--s-orange-bg); }
.c-green { color: var(--s-green); background: var(--s-green-bg); }
.c-teal { color: var(--s-teal); background: var(--s-teal-bg); }
.c-red { color: var(--s-red); background: var(--s-red-bg); }
.c-yellow { color: var(--s-yellow); background: var(--s-yellow-bg); }
.d-gray { background: var(--s-gray); } .d-purple { background: var(--s-purple); } .d-blue { background: var(--s-blue); }
.d-orange { background: var(--s-orange); } .d-yellow { background: #ca8a04; } .d-green { background: var(--s-green); } .d-teal { background: var(--s-teal); }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; background: #fff;
  min-height: 38px;
}
textarea.input { min-height: 84px; resize: vertical; line-height: 1.45; }
.input:focus { outline: 2px solid #86efac; outline-offset: 0; border-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.search { position: relative; min-width: 220px; }
.search input { padding-left: 34px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 7px 12px; cursor: pointer; font-weight: 550; color: var(--ink-2); }
.seg button.on { background: var(--ink); color: #fff; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 10px 14px; border-bottom: 1px solid var(--line); background: #f8fafc; white-space: nowrap; }
table.list td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: #f8fafc; }
table.list tr:last-child td { border-bottom: 0; }
.empty { padding: 28px; text-align: center; color: var(--ink-3); }

/* ---------- Board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: #e9edf3; border-radius: var(--radius); padding: 10px; min-height: 200px; }
.col.drop { background: #dcfce7; outline: 2px dashed var(--accent); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-weight: 650; font-size: 14px; }
.col-head .count { margin-left: auto; color: var(--ink-2); font-weight: 600; font-size: 13px; }
.ocard {
  background: #fff; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow);
  cursor: pointer; border-left: 4px solid transparent; display: block; text-decoration: none;
}
.ocard:hover { box-shadow: 0 2px 8px rgba(15,23,42,.14); }
.ocard.dragging { opacity: .5; }
.ocard.prio { border-left-color: var(--danger); }
.ocard .top { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--ink-2); }
.ocard .top .num { font-weight: 600; }
.ocard .title { font-weight: 600; margin: 4px 0 2px; }
.ocard .veh { font-size: 13px; color: var(--ink-2); }
.ocard .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.plate { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; border: 1px solid var(--line-2); border-radius: 4px; padding: 0 5px; background: #fff; white-space: nowrap; }
.avatar { width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.chip { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; padding: 1px 7px; border-radius: 5px; background: var(--s-gray-bg); color: var(--ink-2); white-space: nowrap; }
.chip.warn { background: var(--s-orange-bg); color: var(--s-orange); }
.chip.bad { background: var(--s-red-bg); color: var(--s-red); }
.chip.ok { background: var(--s-green-bg); color: var(--s-green); }
.chip.hv { background: #fef3c7; color: #92400e; }
.move-select { display: none; }

/* ---------- Detail ---------- */
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv dd.note { white-space: pre-wrap; }
code { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; background: rgba(255,255,255,.6); padding: 0 3px; border-radius: 3px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { font-size: 12px; color: var(--ink-3); }
.timeline .note { white-space: pre-wrap; }
.statusbar { display: flex; gap: 6px; flex-wrap: wrap; }
.statusbar button { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 5px 12px; cursor: pointer; font-weight: 550; font-size: 13px; color: var(--ink-2); }
.statusbar button.on { border-color: currentColor; font-weight: 700; }
.statusbar button.on.c-gray { background: var(--s-gray-bg); color: var(--s-gray); }
.statusbar button.on.c-purple { background: var(--s-purple-bg); color: var(--s-purple); }
.statusbar button.on.c-blue { background: var(--s-blue-bg); color: var(--s-blue); }
.statusbar button.on.c-orange { background: var(--s-orange-bg); color: var(--s-orange); }
.statusbar button.on.c-green { background: var(--s-green-bg); color: var(--s-green); }
.statusbar button.on.c-yellow { background: var(--s-yellow-bg); color: var(--s-yellow); }
.statusbar button.on.c-teal { background: var(--s-teal-bg); color: var(--s-teal); }
.link { color: var(--s-blue); text-decoration: none; cursor: pointer; background: none; border: 0; padding: 0; font-weight: 550; }
.link:hover { text-decoration: underline; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.list-plain li:last-child { border-bottom: 0; }
.list-plain .grow { flex: 1; min-width: 0; }
.alert { padding: 10px 14px; border-radius: 8px; background: var(--s-yellow-bg); color: #713f12; font-size: 14px; margin-bottom: 12px; }
.alert.info { background: var(--s-blue-bg); color: #1e3a8a; }

/* ---------- Kalender ---------- */
.cal-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.cal-toolbar .range { font-weight: 650; margin: 0 6px; }
.cal { display: grid; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-head { display: contents; }
.cal-head > div { padding: 8px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; text-align: center; background: #f8fafc; }
.cal-head > div.today { color: var(--accent); }
.cal-allday { display: contents; }
.cal-allday > div { border-bottom: 1px solid var(--line); padding: 4px; min-height: 30px; font-size: 12px; border-left: 1px solid var(--line); }
.cal-allday > div:first-child { border-left: 0; color: var(--ink-3); text-align: right; padding-right: 6px; }
.cal-body { display: contents; }
.cal-times { position: relative; }
.cal-times div { position: absolute; right: 6px; font-size: 11px; color: var(--ink-3); transform: translateY(-6px); }
.cal-day { position: relative; border-left: 1px solid var(--line); cursor: copy; }
.cal-day .hour { position: absolute; left: 0; right: 0; border-top: 1px solid #f1f5f9; }
.cal-day.today { background: #f7fef9; }
.cal-ev {
  position: absolute; left: 3px; right: 3px; border-radius: 6px; padding: 3px 6px; font-size: 12px; overflow: hidden;
  color: #fff; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.15); line-height: 1.3;
}
.cal-ev b { display: block; font-weight: 650; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 2; }
.pickup { display: block; background: var(--s-green-bg); color: var(--s-green); border-radius: 4px; padding: 1px 5px; margin-bottom: 2px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Modal & Toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow-y: auto; }
.modal { background: var(--panel); border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 620px; }
.modal.wide { max-width: 820px; }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin-right: auto; }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
.x { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink-2); padding: 4px 8px; }
#toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 14px; max-width: 90vw; }
.toast.err { background: var(--danger); }

.picker { border: 1px solid var(--line-2); border-radius: 8px; max-height: 220px; overflow-y: auto; margin-top: 6px; }
.picker button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: #fff; padding: 8px 10px; cursor: pointer; }
.picker button:hover { background: #f8fafc; }
.picker button:last-child { border-bottom: 0; }
.selected-box { display: flex; align-items: center; gap: 10px; border: 1px solid #bbf7d0; background: #f0fdf4; border-radius: 8px; padding: 8px 12px; }
.selected-box .grow { flex: 1; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--brand); }
.login { width: 100%; max-width: 380px; padding: 28px; }
.login .brand { color: var(--ink); padding: 0 0 20px; font-size: 18px; }
.login .brand small { color: var(--ink-2); }
.login .field { margin-bottom: 14px; }
.error-text { color: var(--danger); font-size: 14px; min-height: 20px; }

/* ---------- Mobil ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .shell { display: block; }
  .sidebar { display: none; }
  .mobile-bar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20;
    background: var(--brand); color: #fff; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top));
  }
  .mobile-bar .brand { padding: 0; margin-right: auto; font-size: 15px; }
  .mobile-bar .btn { min-height: 34px; padding: 6px 12px; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; font-size: 11px; text-decoration: none; color: var(--ink-2); font-weight: 550; }
  .bottom-nav a.active { color: var(--accent); }
  .bottom-nav svg { width: 22px; height: 22px; }
  .main { padding: 14px 12px 90px; }
  .topbar .new-btn { display: none; }
  h1 { font-size: 20px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .grid.cols-2, .grid.cols-3, .form-grid { grid-template-columns: 1fr; }
  .board { grid-auto-flow: row; grid-auto-columns: auto; }
  .col { min-height: 0; }
  .move-select { display: block; margin-top: 8px; }
  .modal-back { padding: 0; align-items: stretch; }
  .modal { border-radius: 0; min-height: 100%; max-width: none; }
  .search { min-width: 0; flex: 1; }
  table.list .hide-sm { display: none; }
  .kv { grid-template-columns: 95px 1fr; }
}

/* ---------- Teile, Dokumente, Notizen ---------- */
.num { text-align: right !important; }
table.parts td { vertical-align: middle; }
table.parts tfoot td { border-top: 2px solid var(--line); border-bottom: 0; background: #f8fafc; }
.calc { font-weight: 650; color: var(--s-green); min-height: 20px; }
.show-sm-only { display: none !important; }
.dropzone { border: 2px dashed transparent; border-radius: 10px; margin: -6px; padding: 6px; transition: background .15s; }
.dropzone.over { border-color: var(--accent); background: #f0fdf4; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 8px; }
.thumb { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #e2e8f0; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-del { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(15, 23, 42, .65); color: #fff; cursor: pointer; font-size: 16px; line-height: 1; opacity: 0; transition: opacity .15s; }
.thumb:hover .thumb-del, .thumb:focus-within .thumb-del { opacity: 1; }
.file-ico { flex: none; width: 40px; height: 46px; border-radius: 6px; background: var(--s-blue-bg); color: var(--s-blue); font-size: 10px; font-weight: 800; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; letter-spacing: .03em; }
.timeline li.is-note { background: #fffbeb; border-radius: 8px; padding: 9px 10px; margin: 6px 0; border-bottom: 0; }
.timeline .del { margin-left: 8px; color: var(--ink-3); font-weight: 500; }
.timeline .del:hover { color: var(--danger); }
.seg.small button { padding: 4px 10px; font-size: 13px; }
@media (max-width: 760px) {
  td.show-sm-only { display: table-cell !important; }
  .btn.show-sm-only { display: inline-flex !important; }
  .thumb-del { opacity: 1; }
  .btn.hide-sm { display: none; }
  .thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.grid > *, .detail-grid > * { min-width: 0; }
.btn.quick { margin-top: 4px; min-height: 26px; padding: 2px 8px; font-size: 12px; }
.chip.info { background: var(--s-blue-bg); color: var(--s-blue); }
.inbox-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inbox-top .grow { flex: 1; min-width: 160px; }
.inbox-item .preview { white-space: pre-wrap; margin-top: 6px; padding: 8px 10px; background: #f8fafc; border-radius: 6px; }

/* ---------- Offerten-Editor ---------- */
.qrows { display: grid; gap: 6px; }
.qrow { display: grid; grid-template-columns: minmax(0, 1fr) 76px 70px 100px 96px 30px; gap: 6px; align-items: center; }
.qrow.qhead { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.qrow.qtext { grid-template-columns: minmax(0, 1fr) 30px; }
.qrow .input { min-height: 34px; padding: 6px 8px; }
.qdesc { display: flex; gap: 6px; align-items: center; min-width: 0; }
.qkind { font-size: 10.5px; font-weight: 700; border-radius: 4px; padding: 1px 5px; flex: none; text-transform: uppercase; letter-spacing: .03em; }
.qkind.arbeit { background: var(--s-blue-bg); color: var(--s-blue); }
.qkind.teil { background: var(--s-orange-bg); color: var(--s-orange); }
.qline { font-variant-numeric: tabular-nums; }
.qtotal { text-align: right; font-weight: 700; margin-top: 10px; font-size: 16px; }
.x.small { font-size: 18px; padding: 2px 6px; }
@media (max-width: 760px) {
  .qrow { grid-template-columns: 1fr 1fr 1fr 30px; }
  .qrow .qdesc { grid-column: 1 / -1; }
  .qrow .qline { display: none; }
  .qrow.qhead { display: none; }
}
.qdoc { font-size: 20px; flex: none; }

/* ---------- Zeiterfassung ---------- */
.timerbar { display: flex; align-items: center; gap: 10px; background: #14532d; color: #fff; padding: 8px 28px; position: sticky; top: 0; z-index: 15; }
.timerbar .tb-info { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; flex: 1; min-width: 0; }
.tb-dot { width: 10px; height: 10px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .7); animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.7); } 70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
.tb-clock { font-weight: 700; font-size: 16px; }
.tb-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .9; }
.tb-stop { background: #fff; color: #14532d; border-color: #fff; }
.timer-big { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.timer-big.on { background: #f0fdf4; border-color: #bbf7d0; }
.card-body .timer-big.on { border-radius: 10px; padding: 12px 14px; border: 1px solid #bbf7d0; }
.timer-big .big, .time-sum .big { font-size: 26px; font-weight: 700; }
.timer-big .btn { min-height: 46px; padding: 10px 20px; font-size: 16px; }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.chip.running { background: #dcfce7; color: #166534; font-weight: 600; }
.time-sum { display: flex; gap: 28px; align-items: flex-end; margin-bottom: 14px; flex-wrap: wrap; }
.day-group { margin-top: 10px; }
.day-head { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 2px solid var(--line); font-size: 14px; }
@media (max-width: 760px) {
  .timerbar { padding: 8px 12px; top: 54px; }
  .bottom-nav { grid-template-columns: repeat(5, 1fr); }
}
.alert.bad { background: var(--s-red-bg); color: #7f1d1d; }
