/* Layout: Druckbogen. Dunkle Kopfleiste, darunter Bogen auf Sand mit Passermarken. Jede Leistung trägt die Farbe ihres sevDesk-Nummernkreises. Der laufende Timer ist die eine laute Fläche. */

/* Schriften lokal (DSGVO): variable Fonts, Subsets latin + latin-ext */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(fonts/archivo-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(fonts/archivo-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; font-style: italic; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(fonts/archivo-italic-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Archivo"; font-style: italic; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(fonts/archivo-italic-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/bricolage-grotesque-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/bricolage-grotesque-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --sand: #F3ECE6;
  --paper: #FFFDFB;
  --ink: #1A1614;
  --grey: #6B6460;
  --label: #8A827C;
  --line: #E4D9D1;
  --tint: #F8F2EE;
  --bar: #1A1614;
  --bar-fg: #F4EDE8;
  --bar-dim: #9C918B;
  --bernstein: #C67F2E;
  --petrol: #1E6B72;
  --pflaume: #6E3A5E;
  --rose: #E5B8AE;
  --signal: #F2C230;
  --slate: #4A5560;
  --ok: #2E7653;
  --bad: #B83A2A;
  --k1: var(--slate); --k2: var(--pflaume); --k3: #2F4C6E; --k4: var(--petrol); --k5: var(--bernstein); --k6: #8B7A1E; --k7: #7A6A5E; --k8: #8A827C;
  --f-display: "Bricolage Grotesque", "Archivo", system-ui, sans-serif;
  --f-ui: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sand: #141110; --paper: #1E1917; --ink: #F4EDE8; --grey: #ADA39C; --label: #8E847E; --line: #342C28; --tint: #262019;
    --bar: #0C0A09; --bar-fg: #F4EDE8; --bar-dim: #8E847E;
    --bernstein: #E39C4D; --petrol: #62B3BB; --pflaume: #CF90BB; --rose: #7E524A; --signal: #F2C230; --slate: #9DAAB6;
    --ok: #6CC596; --bad: #EE7A69; --k3: #8AA8CC; --k6: #D6C25A; --k7: #BBA899; --k8: #8E847E;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --sand: #141110; --paper: #1E1917; --ink: #F4EDE8; --grey: #ADA39C; --label: #8E847E; --line: #342C28; --tint: #262019;
  --bar: #0C0A09; --bar-fg: #F4EDE8; --bar-dim: #8E847E;
  --bernstein: #E39C4D; --petrol: #62B3BB; --pflaume: #CF90BB; --rose: #7E524A; --signal: #F2C230; --slate: #9DAAB6;
  --ok: #6CC596; --bad: #EE7A69; --k3: #8AA8CC; --k6: #D6C25A; --k7: #BBA899; --k8: #8E847E;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--sand); color: var(--ink); font-family: var(--f-ui); font-size: 15px; line-height: 1.45; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--bernstein); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.wide { font-stretch: 125%; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; font-weight: 600; }

/* Kopf */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bar); color: var(--bar-fg); }
.top-in { max-width: 1180px; margin: 0 auto; padding-inline: 16px; padding-block: 12px; display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; }
.mark { font-family: var(--f-display); font-weight: 700; font-size: 26px; letter-spacing: -0.035em; line-height: 1; white-space: nowrap; }
.mark .amp { color: var(--bernstein); font-family: var(--f-ui); font-style: italic; font-weight: 500; font-stretch: 80%; margin: 0 1px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 8px 12px; border-radius: 999px; color: var(--bar-dim); font-weight: 500; font-size: 15px; font-stretch: 100%; transition: font-stretch .25s, color .2s, background .2s; }
.tabs button:hover { color: var(--bar-fg); font-stretch: 118%; }
.tabs button[aria-selected="true"] { color: var(--bar); background: var(--bar-fg); font-weight: 650; }
.people { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.people span { color: var(--bar-dim); font-size: 12px; margin-right: 4px; }
.av { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid transparent; background: rgba(255,255,255,.08); color: var(--bar-fg); font-size: 11px; font-weight: 700; letter-spacing: .02em; display: inline-grid; place-items: center; padding: 0; }
.av[aria-pressed="true"] { background: var(--bernstein); color: #1A1614; }
.av:hover { border-color: var(--bar-dim); }

main { max-width: 1180px; margin: 0 auto; padding-inline: 16px; padding-block: 28px 130px; display: flex; flex-direction: column; gap: 36px; }
h1 { font-family: var(--f-display); font-weight: 700; font-size: clamp(34px, 6vw, 58px); letter-spacing: -0.045em; line-height: .95; margin: 0; text-wrap: balance; }
h1 em { font-style: normal; color: var(--bernstein); }
h2 { font-family: var(--f-display); font-weight: 650; font-size: 21px; letter-spacing: -0.02em; margin: 0; line-height: 1.15; }
.lead { color: var(--grey); margin: 10px 0 0; max-width: 62ch; }
.hint { font-size: 13px; color: var(--grey); }

/* Bogen mit Passermarken */
.sheet { position: relative; background: var(--paper); border-radius: 4px; padding: 26px; min-width: 0; box-shadow: 0 1px 0 var(--line), 0 12px 30px -22px rgba(26,22,20,.35); }
.sheet::before, .sheet::after { content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none; }
.sheet::before { top: -7px; left: -7px; border-top: 1px solid var(--label); border-left: 1px solid var(--label); }
.sheet::after { bottom: -7px; right: -7px; border-bottom: 1px solid var(--label); border-right: 1px solid var(--label); }
.sheet-label { position: absolute; top: -18px; left: 14px; font-size: 10px; color: var(--label); font-stretch: 125%; letter-spacing: .08em; text-transform: uppercase; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: end; }
@media (max-width: 760px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.stats { display: flex; gap: 28px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-family: var(--f-display); font-weight: 600; font-size: 34px; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .wide { color: var(--label); }

.grid2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 26px; align-items: start; }
@media (max-width: 880px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }

/* Timer */
.timer { display: flex; flex-direction: column; gap: 20px; transition: background .3s, color .3s; }
.timer.running { background: var(--bar); color: var(--bar-fg); }
.timer.running .hint, .timer.running .wide, .timer.running .gauge-top { color: var(--bar-dim); }
.timer.running .gauge-top b { color: var(--bar-fg); }
.timer.running .ticks { background: repeating-linear-gradient(90deg, rgba(255,255,255,.14) 0 1px, transparent 1px var(--tick, 10%)), rgba(255,255,255,.07); }
.step { display: flex; flex-direction: column; gap: 10px; }
.step > .wide { color: var(--label); display: flex; gap: 10px; align-items: baseline; }
.step > .wide i { font-style: normal; color: var(--bernstein); }
.clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 8px; }
.cl { text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; transition: border-color .15s, transform .15s; min-width: 0; }
.cl b { font-weight: 600; font-size: 14px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl small { color: var(--label); font-size: 12px; }
.cl:hover { border-color: var(--grey); }
.cl[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.cl[aria-pressed="true"] small { color: var(--rose); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { --k: var(--k8); border: 1.5px solid var(--line); background: var(--paper); border-radius: 999px; padding: 7px 14px 7px 8px; display: inline-flex; gap: 9px; align-items: center; font-weight: 550; font-size: 14px; transition: font-stretch .2s, border-color .15s; }
.chip:hover { border-color: var(--k); font-stretch: 108%; }
.chip .nr { font-size: 11px; font-weight: 700; font-stretch: 85%; background: var(--k); color: var(--paper); border-radius: 999px; padding: 2px 7px; font-variant-numeric: tabular-nums; }
.chip.proj .nr { border-radius: 3px; }
.chip[aria-pressed="true"] { border-color: var(--k); background: var(--k); color: var(--paper); }
.chip[aria-pressed="true"] .nr { background: var(--paper); color: var(--k); }
.gauge { display: flex; flex-direction: column; gap: 8px; }
.gauge-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--grey); }
.gauge-top b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ticks { position: relative; height: 18px; border-radius: 3px; background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px var(--tick, 10%)), var(--tint); overflow: hidden; }
.ticks i { position: absolute; inset: 0 auto 0 0; background: var(--k, var(--petrol)); border-radius: 3px 0 0 3px; }
.ticks i.over { background: repeating-linear-gradient(135deg, var(--bernstein) 0 6px, color-mix(in srgb, var(--bernstein) 70%, var(--paper)) 6px 12px); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 11px; font-weight: 600; color: var(--label); font-stretch: 125%; text-transform: uppercase; letter-spacing: .06em; }
.field input, .field select { border: 1px solid var(--line); background: var(--tint); border-radius: 6px; padding: 10px 11px; width: 100%; min-width: 0; }
.clockrow { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; border-top: 1px dashed var(--line); }
.timer.running .clockrow { border-color: rgba(255,255,255,.18); }
.clock { font-family: var(--f-ui); font-weight: 200; font-stretch: 70%; font-size: clamp(56px, 11vw, 104px); letter-spacing: -0.03em; line-height: .85; font-variant-numeric: tabular-nums; }
.timer.running .clock { color: var(--signal); font-weight: 300; }
@media (prefers-reduced-motion: no-preference) { .timer.running .clock { animation: breathe 4s ease-in-out infinite; } }
@keyframes breathe { 50% { font-stretch: 82%; } }
.running-what { font-family: var(--f-display); font-size: 26px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; }
.running-what small { display: block; font-family: var(--f-ui); font-size: 14px; font-weight: 500; color: var(--bar-dim); letter-spacing: 0; margin-top: 6px; }
.btn { border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 10px 18px; font-weight: 650; transition: font-stretch .2s; }
.btn:hover { font-stretch: 112%; }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.go { background: var(--bernstein); border-color: var(--bernstein); color: #1A1614; font-size: 17px; padding: 14px 26px; }
.btn.stop { background: var(--signal); border-color: var(--signal); color: #1A1614; font-size: 17px; padding: 14px 26px; }
.btn.small { padding: 6px 12px; font-size: 13px; border-width: 1px; }
.btn.ghost { border-color: transparent; background: none; color: var(--grey); }
.btn.ghost:hover { color: var(--ink); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
details.more summary { cursor: pointer; font-size: 13px; color: var(--grey); }
.timer.running details.more { display: none; }

/* Zeiten */
.day { display: flex; flex-direction: column; }
.day-h { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 6px; }
.day-h b { font-family: var(--f-display); font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.entry { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.entry .k { align-self: stretch; border-radius: 2px; background: var(--k, var(--k8)); }
.entry .what { min-width: 0; }
.entry .what b { font-weight: 600; }
.entry .what span { color: var(--grey); display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry .dur { text-align: right; white-space: nowrap; font-weight: 600; }
.entry .dur small { display: block; color: var(--label); font-size: 11px; font-weight: 500; }
.lock { font-size: 11px; color: var(--ok); font-weight: 700; font-stretch: 115%; text-transform: uppercase; letter-spacing: .05em; }
.empty { color: var(--grey); font-size: 14px; padding: 14px 0; }

/* Aufgaben */
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: none; padding: 8px 16px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .board { grid-template-columns: minmax(0, 1fr); } }
.col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.col-h { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.col-h.late { border-color: var(--bad); color: var(--bad); }
.col-h b { font-family: var(--f-display); font-size: 18px; font-weight: 650; }
.card { --k: var(--k8); background: var(--paper); border-radius: 4px; padding: 12px 12px 12px 14px; display: flex; flex-direction: column; gap: 8px; border-left: 4px solid var(--k); box-shadow: 0 1px 0 var(--line); }
.card .t { font-weight: 600; line-height: 1.25; }
.card.done .t { text-decoration: line-through; color: var(--grey); font-weight: 500; }
.card .sub { font-size: 12px; color: var(--grey); }
.card-foot { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.status { border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 700; font-stretch: 110%; text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; background: var(--tint); }
.status.s1 { background: var(--signal); border-color: var(--signal); color: #1A1614; }
.status.s2 { background: var(--ok); border-color: var(--ok); color: var(--paper); }
.due { font-size: 12px; color: var(--grey); font-variant-numeric: tabular-nums; }
.due.late { color: var(--bad); font-weight: 700; }
.ini { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--paper); display: inline-grid; place-items: center; font-size: 9px; font-weight: 700; }
.newtask { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
@media (max-width: 960px) { .newtask { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .newtask .field:first-child { grid-column: 1 / -1; } }

/* Kunden & Leistungen */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 30px 26px; }
.c-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.c-h small { font-size: 13px; color: var(--grey); white-space: nowrap; font-variant-numeric: tabular-nums; }
.svc { --k: var(--k8); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 10px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; align-items: center; }
.svc .nr { font-size: 11px; font-weight: 700; font-stretch: 85%; background: var(--k); color: var(--paper); border-radius: 999px; padding: 2px 7px; font-variant-numeric: tabular-nums; }
.svc.proj .nr { border-radius: 3px; }
.svc .meta { color: var(--grey); font-size: 12px; display: block; }
.svc .val { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.svc .val.over { color: var(--bernstein); }
.svc .ticks { grid-column: 1 / -1; height: 10px; }
.tag { font-size: 10px; font-weight: 700; font-stretch: 115%; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; background: var(--tint); color: var(--grey); white-space: nowrap; }
.tag.done { background: var(--ok); color: var(--paper); }
.tag.warn { background: var(--bernstein); color: #1A1614; }
.tag.billed { background: var(--petrol); color: var(--paper); }
.tag.neu { background: var(--signal); color: #1A1614; }
.cat { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 22px 26px; }
.cat-k { --k: var(--k8); display: flex; flex-direction: column; }
.cat-k h3 { margin: 0 0 6px; font-family: var(--f-display); font-size: 17px; font-weight: 650; display: flex; gap: 10px; align-items: center; padding-bottom: 8px; border-bottom: 2px solid var(--k); }
.cat-k h3 span { font-family: var(--f-ui); font-size: 11px; font-weight: 700; color: var(--k); font-stretch: 110%; }
.art { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.art .n { color: var(--k); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; }
.art .p { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--grey); font-size: 13px; }
.art.used .nm { font-weight: 600; }

/* Abrechnung */
.sumrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 22px; }
.sum b { display: block; font-family: var(--f-display); font-size: clamp(30px, 4.6vw, 44px); font-weight: 650; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; margin: 6px 0 4px; }
.sum b.accent { color: var(--bernstein); }
.sum .wide { color: var(--label); }
.invs { display: flex; flex-direction: column; gap: 40px; }
.inv { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 26px; align-items: start; }
@media (max-width: 900px) { .inv { grid-template-columns: minmax(0, 1fr); } }
.doc { font-size: 13.5px; }
.doc-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.doc-mark { font-family: var(--f-display); font-weight: 700; font-size: 22px; letter-spacing: -0.035em; }
.doc-mark .amp { color: var(--bernstein); font-family: var(--f-ui); font-style: italic; font-weight: 500; font-stretch: 80%; }
.doc-meta { text-align: right; font-size: 12px; color: var(--grey); line-height: 1.6; }
.doc-hello { font-family: var(--f-display); font-size: 22px; font-weight: 650; letter-spacing: -0.02em; margin: 0 0 4px; }
.doc-intro { color: var(--grey); margin: 0 0 16px; }
.tbl-wrap { overflow-x: auto; }
table.lines { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.lines th { text-align: right; font-size: 10px; font-weight: 700; font-stretch: 115%; text-transform: uppercase; letter-spacing: .05em; color: var(--label); padding: 6px 8px; border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
table.lines td { text-align: right; padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: top; }
table.lines th:nth-child(2), table.lines td:nth-child(2) { text-align: left; white-space: normal; min-width: 180px; }
table.lines th:first-child, table.lines td:first-child { padding-left: 0; text-align: left; }
table.lines td:last-child, table.lines th:last-child { padding-right: 0; }
table.lines td small { display: block; color: var(--grey); font-size: 12px; }
table.lines td .nr { font-weight: 700; color: var(--k, var(--grey)); }
table.lines tr.extra td { background: color-mix(in srgb, var(--bernstein) 10%, transparent); }
table.lines tr.extra td:nth-child(2) b { color: var(--bernstein); }
table.lines tr.sumline td { border-bottom: 0; padding-top: 6px; padding-bottom: 2px; color: var(--grey); }
table.lines tr.grand td { border-top: 1.5px solid var(--ink); border-bottom: 0; font-weight: 700; font-size: 15px; color: var(--ink); padding-top: 10px; }
.doc-foot { margin-top: 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; color: var(--grey); font-size: 12px; }
.doc-foot .undso { font-family: var(--f-display); font-size: 20px; font-weight: 650; color: var(--ink); letter-spacing: -0.02em; }
.side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 90px; }
.side h2 { font-size: 24px; }
.side .state { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--grey); }
.side .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--label); }
.side .dot.open { background: var(--bernstein); }
.side .dot.done { background: var(--ok); }
.side .big { font-family: var(--f-display); font-size: 34px; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.side .info { font-size: 13px; color: var(--grey); border-left: 3px solid var(--rose); padding-left: 12px; }
details.detail summary { cursor: pointer; font-size: 13px; color: var(--grey); margin-top: 14px; }
details.detail .entry { font-size: 13px; }

.note { font-size: 13px; color: var(--grey); border-left: 3px solid var(--signal); padding: 2px 0 2px 14px; max-width: 86ch; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

/* Leiste & Toast */
.runbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--signal); color: #1A1614; padding-bottom: env(safe-area-inset-bottom, 0px); }
.runbar-in { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.runbar .dot { width: 10px; height: 10px; border-radius: 50%; background: #1A1614; flex: none; }
@media (prefers-reduced-motion: no-preference) { .runbar .dot { animation: pulse 1.4s ease-in-out infinite; } }
@keyframes pulse { 50% { opacity: .25; } }
.runbar .rtext { min-width: 0; flex: 1; font-size: 14px; font-weight: 600; }
.runbar .rtext span { font-weight: 500; opacity: .7; }
.runbar .rclock { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 20px; font-stretch: 80%; }
.runbar button { border: 1.5px solid #1A1614; background: #1A1614; color: var(--signal); border-radius: 999px; padding: 6px 14px; font-weight: 700; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 82px; background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; z-index: 7; max-width: calc(100% - 32px); }
.proto { font-size: 12px; color: var(--label); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (prefers-reduced-motion: no-preference) {
  main > * { animation: rise .45s cubic-bezier(.2,.7,.2,1) both; }
  main > *:nth-child(2) { animation-delay: .05s; } main > *:nth-child(3) { animation-delay: .1s; } main > *:nth-child(4) { animation-delay: .15s; }
}
@keyframes rise { from { transform: translateY(8px); } to { transform: none; } }

/* Projektraum (Chat) */
.chatbtn { border: 1px solid var(--line); background: var(--tint); border-radius: 999px; font-size: 11px; font-weight: 700; padding: 3px 9px; color: var(--grey); font-stretch: 105%; }
.chatbtn:hover { color: var(--ink); border-color: var(--grey); }
.chatbtn b { color: var(--bernstein); }
.drawer-bg { position: fixed; inset: 0; background: rgba(26,22,20,.38); z-index: 8; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--paper); z-index: 9; display: flex; flex-direction: column; box-shadow: -20px 0 40px -20px rgba(0,0,0,.35); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
@media (prefers-reduced-motion: no-preference) { .drawer { animation: slidein .28s cubic-bezier(.2,.7,.2,1); } }
@keyframes slidein { from { transform: translateX(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.dr-head { padding: 20px 20px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.dr-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dr-top h2 { font-size: 22px; }
.dr-top .wide { color: var(--label); display: block; margin-bottom: 4px; }
.dr-team { display: flex; flex-wrap: wrap; gap: 6px; }
.dr-team span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; background: var(--tint); border-radius: 999px; padding: 3px 10px 3px 3px; }
.dr-team .ini { width: 22px; height: 22px; font-size: 8px; }
.dr-tasks { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.dr-tasks div { display: flex; justify-content: space-between; gap: 8px; color: var(--grey); }
.dr-tasks b { color: var(--ink); font-weight: 600; }
.msgs { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; background: var(--sand); }
.msg { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; max-width: 92%; }
.msg .ini { width: 28px; height: 28px; font-size: 9px; }
.msg .bubble { background: var(--paper); border-radius: 4px 14px 14px 14px; padding: 9px 12px; box-shadow: 0 1px 0 var(--line); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.msg .meta { font-size: 11px; color: var(--label); margin-bottom: 3px; }
.msg.me { margin-left: auto; grid-template-columns: minmax(0, 1fr) 28px; }
.msg.me .ini { order: 2; background: var(--bernstein); color: #1A1614; }
.msg.me .bubble { border-radius: 14px 4px 14px 14px; background: var(--ink); color: var(--paper); }
.msg.me .meta { text-align: right; }
.msg.sys { max-width: 100%; display: block; text-align: center; font-size: 12px; color: var(--grey); }
.mention { font-weight: 700; color: var(--bernstein); }
.msg.me .mention { color: var(--signal); }
.chatf { display: flex; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line); background: var(--paper); }
.chatf input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--tint); border-radius: 999px; padding: 10px 14px; }
.chatf .hint { display: block; }

/* Kundenbericht */
.rep { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start; }
@media (max-width: 920px) { .rep { grid-template-columns: minmax(0, 1fr); } }
.rep-doc { padding: clamp(22px, 4vw, 44px); display: flex; flex-direction: column; gap: 26px; }
.rep-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.rep-title { font-family: var(--f-display); font-weight: 700; font-size: clamp(30px, 5vw, 46px); letter-spacing: -0.04em; line-height: .95; margin: 0; }
.rep-title small { display: block; font-family: var(--f-ui); font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; font-stretch: 125%; color: var(--label); margin-bottom: 10px; }
.rep-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 18px; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--line); padding: 16px 0; }
.rep-kpis b { display: block; font-family: var(--f-display); font-size: 34px; font-weight: 650; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; margin-top: 6px; }
.rep-kpis .wide { color: var(--label); }
.rep-note { font-size: 15px; line-height: 1.55; border-left: 3px solid var(--bernstein); padding-left: 16px; white-space: pre-wrap; max-width: 68ch; }
.rep-note .from { display: block; font-size: 12px; color: var(--label); margin-top: 8px; }
.weeks { display: flex; align-items: flex-end; gap: 10px; height: 120px; padding-top: 8px; }
.wk { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.wk .wcol { width: 100%; max-width: 64px; border-radius: 4px 4px 0 0; display: flex; flex-direction: column-reverse; overflow: hidden; background: var(--tint); }
.wk .wcol i { display: block; width: 100%; }
.wk small { font-size: 11px; color: var(--label); white-space: nowrap; }
.wk b { font-size: 12px; font-variant-numeric: tabular-nums; }
.rep-svc { --k: var(--k8); display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.rep-svc-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.rep-svc-h h3 { margin: 0; font-family: var(--f-display); font-size: 19px; font-weight: 650; display: flex; align-items: center; gap: 10px; }
.rep-svc-h h3 .nr { font-family: var(--f-ui); font-size: 11px; font-weight: 700; background: var(--k); color: var(--paper); border-radius: 999px; padding: 2px 8px; }
.rep-svc-h span { font-variant-numeric: tabular-nums; font-weight: 600; }
.acts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.acts li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; border-bottom: 1px dashed var(--line); }
.acts li:last-child { border-bottom: 0; }
.acts li span:last-child { color: var(--grey); white-space: nowrap; font-variant-numeric: tabular-nums; }
.acts li small { color: var(--label); margin-left: 6px; }
.rep-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; border-top: 1.5px solid var(--ink); padding-top: 14px; font-size: 12px; color: var(--grey); }
.rep-foot .undso { font-family: var(--f-display); font-size: 20px; font-weight: 650; color: var(--ink); }
.ctrl { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 90px; }
.ctrl textarea { border: 1px solid var(--line); background: var(--tint); border-radius: 6px; padding: 10px 11px; width: 100%; min-height: 120px; resize: vertical; font: inherit; color: inherit; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
table.detail-t { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.detail-t th { text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--label); padding: 5px 6px; border-bottom: 1.5px solid var(--ink); }
table.detail-t td { padding: 5px 6px; border-bottom: 1px solid var(--line); }
table.detail-t td:last-child, table.detail-t th:last-child { text-align: right; }

/* Arbeitszeit */
.clockcard { display: flex; flex-direction: column; gap: 16px; transition: background .3s, color .3s; }
.clockcard.running { background: var(--bar); color: var(--bar-fg); }
.clockcard.running .hint, .clockcard.running .wide { color: var(--bar-dim); }
.clockcard.running .clock { color: var(--signal); font-weight: 300; }
.clockcard.running .hint b { color: var(--bar-fg); }
.cc-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.cc-top .wide { color: var(--label); display: block; margin-bottom: 8px; }
.cc-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.clockcard .btn.go, .clockcard .btn.stop { font-size: 17px; padding: 14px 28px; }
.clockcard.running .btn:not(.stop) { background: transparent; color: var(--bar-fg); border-color: var(--bar-dim); }
.tl { display: flex; flex-direction: column; gap: 4px; }
.tl-bar { position: relative; height: 22px; background: var(--tint); border-radius: 4px; overflow: hidden; }
.clockcard.running .tl-bar { background: rgba(255,255,255,.08); }
.tl-bar i { position: absolute; top: 0; bottom: 0; background: var(--petrol); border-radius: 3px; }
.tl-bar i.live { background: repeating-linear-gradient(135deg, var(--signal) 0 6px, color-mix(in srgb, var(--signal) 70%, transparent) 6px 12px); }
.tl-ticks { position: relative; height: 14px; font-size: 10px; color: var(--label); }
.tl-ticks span { position: absolute; transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.warnline { font-size: 13px; color: var(--bad); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.warnline::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); flex: none; }
.clockcard.running .warnline { color: var(--rose); }
table.att { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.att th { text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-stretch: 115%; color: var(--label); padding: 6px 8px; border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
table.att td { padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.att th:first-child, table.att td:first-child { padding-left: 0; }
table.att tr.off td { color: var(--label); background: color-mix(in srgb, var(--tint) 60%, transparent); }
table.att tr.today td { background: color-mix(in srgb, var(--signal) 14%, transparent); }
table.att td.neg { color: var(--bad); font-weight: 600; }
table.att td.pos { color: var(--ok); font-weight: 600; }
.stw { display: inline-flex; gap: 6px; flex-wrap: wrap; }
table.att .ini { width: 24px; height: 24px; font-size: 9px; vertical-align: middle; }
.tag.miss { background: var(--bad); color: var(--paper); }
.liveDot { font-size: 11px; font-weight: 700; color: var(--ok); }
.liveDot::before { content: "● "; }
.negc { color: var(--bad) !important; }
table.staff input.sf:not([type=checkbox]) { border: 1px solid var(--line); background: var(--tint); border-radius: 5px; padding: 6px 8px; width: 100%; min-width: 70px; }
table.staff td:nth-child(2) input { min-width: 200px; }
.newperson { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.newperson .field:first-child { flex: 1 1 200px; }
.newperson .field:nth-child(2) { width: 110px; }
.logline { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--grey); }
.logline b { color: var(--ink); }
.dayf { padding: 20px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.segs { display: flex; flex-direction: column; gap: 8px; }
.segrow { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }

/* Echtbetrieb: Login, Verwaltung, Formulare */
body { margin: 0; }
main.login { max-width: 460px; min-height: 70vh; display: flex; align-items: center; }
.loginbox { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.errline { margin: 0; color: var(--bad); font-weight: 600; font-size: 14px; }
.people span#who { color: var(--bar-dim); font-size: 12px; }
.menu { position: absolute; right: 16px; top: 64px; background: var(--paper); color: var(--ink); border-radius: 8px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.35); padding: 8px; display: flex; flex-direction: column; min-width: 220px; z-index: 20; }
.menu button { background: none; border: 0; text-align: left; padding: 10px 12px; border-radius: 6px; font-weight: 500; }
.menu button:hover { background: var(--tint); }
.menu .who2 { padding: 8px 12px 10px; font-size: 13px; color: var(--grey); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; align-items: end; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; padding: 12px 0 4px; border-top: 1px dashed var(--line); margin-top: 8px; }
.inline-form .field { flex: 1 1 110px; }
.inline-form .field.wide2 { flex: 2 1 200px; }
.svc .acts2, .client-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; grid-column: 1 / -1; }
table.att input, table.att select { border: 1px solid var(--line); background: var(--tint); border-radius: 5px; padding: 6px 8px; width: 100%; min-width: 60px; font: inherit; }
table.att td.nowrap { white-space: nowrap; }
.daychips { display: inline-flex; gap: 3px; }
.daychips label { font-size: 11px; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.pillnote { font-size: 12px; color: var(--grey); }
.empty-big { padding: 30px 0; text-align: center; color: var(--grey); }
.loading { opacity: .6; pointer-events: none; }
.inline-form .field:has(input[type=date]) { flex: 0 1 180px; }
.svc .acts2 .btn.ghost { padding: 2px 8px; }
