@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(/fonts/inter-regular.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(/fonts/inter-medium.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(/fonts/inter-semibold.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(/fonts/inter-bold.woff2) format("woff2"); }
:root {
  --bg: #eef1f5; --panel: #fff; --text: #13233a; --muted: #5d6b80; --line: #dde3eb; --navy: #0c2340;
  --side: #0c2340; --side-text: rgba(255,255,255,.72); --side-active: rgba(255,255,255,.09); --side-strong: #fff;
  --accent: #0f8b8d; --accent-soft: color-mix(in srgb, var(--accent) 10%, var(--panel)); --ok: #15803d; --ok-soft: #e7f6ec;
  --warn: #b45309; --warn-soft: #fef3e2; --bad: #dc2626; --bad-soft: #fdecec;
  --head: #f3f6f9; --hover: color-mix(in srgb, var(--accent) 4%, var(--panel)); --group: #f3f6f9; --chip: #e9eef4; --field: #fff; --hover-line: #cbd2dc;
  --radius: 6px; --shadow: 0 1px 2px rgba(12,35,64,.08);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b1422; --panel: #12203a; --text: #e6ebf2; --navy: #e6ebf2; --muted: #93a1b5; --line: #22324d;
  --ok: #34c06a; --ok-soft: #10291b; --warn: #f0a340; --warn-soft: #33240a; --bad: #f05252; --bad-soft: #3a1414;
  --head: #162744; --group: #162744; --chip: #1d2f4f; --field: #0e1a2f; --hover-line: #36507a;
  --shadow: none;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; font-weight: 650; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 650; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* Layout */
.layout { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); color: var(--side-text); padding: 16px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; padding: 4px 8px 20px; }
.brand svg { width: 28px; height: 28px; }
.nav a { display: flex; align-items: center; gap: 10px; color: var(--side-text); padding: 9px 10px; border-radius: 7px; margin-bottom: 2px; font-weight: 500; }
.nav a:hover { background: var(--side-active); text-decoration: none; color: #fff; }
.nav a.active { background: var(--accent); color: #fff; }
.nav svg { width: 18px; height: 18px; flex: none; }
.side-foot { margin-top: auto; font-size: 12px; padding: 8px 10px; border-top: 1px solid #2a3050; }
.side-foot button { background: none; border: 0; color: var(--side-text); padding: 0; cursor: pointer; text-decoration: underline; font: inherit; }
.main { padding: 22px 28px 60px; min-width: 0; }
.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 & grid */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.panel + .panel { margin-top: 16px; }
.panel.flush { padding: 0; overflow-x: auto; }
.split > *, .grid > * { min-width: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat .v { font-size: 24px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.split { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }

/* Buttons & forms */
button, .btn { font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 7px 12px; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
button:hover, .btn:hover { border-color: var(--hover-line); text-decoration: none; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover { filter: brightness(.92); background: var(--accent); }
.danger { color: var(--bad); }
.ghost { border-color: transparent; background: transparent; }
.icon-btn { padding: 4px 7px; }
input, select, textarea { font: inherit; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; background: var(--field); color: var(--text); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
input[type=checkbox], input[type=radio] { width: auto; }
textarea { min-height: 70px; resize: vertical; }
label { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input[type=search] { max-width: 280px; }
.toolbar input[type=date] { width: auto; }
.toolbar select { width: auto; }
.check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); font-weight: 500; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--line); background: var(--head); white-space: nowrap; }
td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--hover); }
tr.group td { background: var(--group); font-weight: 650; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
tr.sub td:first-child { padding-left: 28px; }
td input { padding: 4px 6px; }
td input.qty { width: 70px; text-align: right; }
td input.price { width: 90px; text-align: right; }
.thumb { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; background: var(--chip); display: inline-block; vertical-align: middle; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--chip); color: var(--muted); white-space: nowrap; }
.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-warn { background: var(--warn-soft); color: var(--warn); }
.b-bad { background: var(--bad-soft); color: var(--bad); }
.b-accent { background: var(--accent-soft); color: var(--accent); }
.avail { font-weight: 700; }
.avail.ok { color: var(--ok); } .avail.warn { color: var(--warn); } .avail.bad { color: var(--bad); }
.st-konzept { background: var(--chip); color: var(--muted); }
.st-option { background: var(--warn-soft); color: var(--warn); }
.st-bestaetigt { background: var(--ok-soft); color: var(--ok); }
.st-vorbereitet { background: color-mix(in srgb, #1f6fd1 14%, var(--panel)); color: #3b82f6; }
.st-unterwegs { background: var(--accent-soft); color: var(--accent); }
.st-zurueck { background: color-mix(in srgb, #128074 14%, var(--panel)); color: #14a090; }
.st-storniert { background: var(--bad-soft); color: var(--bad); }

/* Tree */
.tree a { display: flex; justify-content: space-between; padding: 6px 8px; border-radius: 6px; color: var(--text); }
.tree a:hover { background: var(--hover); text-decoration: none; }
.tree a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tree .lvl1 { padding-left: 22px; } .tree .lvl2 { padding-left: 36px; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Planer */
.planner { overflow: auto; max-height: calc(100vh - 210px); }
.planner table { border-collapse: separate; border-spacing: 0; }
.planner th, .planner td { padding: 5px 4px; text-align: center; font-size: 12px; border-bottom: 1px solid var(--line); }
.planner th:first-child, .planner td:first-child { position: sticky; left: 0; background: var(--panel); text-align: left; min-width: 230px; z-index: 1; border-right: 1px solid var(--line); padding-left: 10px; }
.planner thead th { position: sticky; top: 0; z-index: 2; }
.planner thead th:first-child { z-index: 3; }
.planner .we { background: var(--group); }
.planner .today { box-shadow: inset 0 -2px var(--accent); }
.cell { display: block; border-radius: 4px; padding: 3px 0; font-weight: 650; min-width: 30px; }
.c-full { background: var(--ok-soft); color: var(--ok); }
.c-part { background: var(--warn-soft); color: var(--warn); }
.c-none { background: var(--chip); color: var(--muted); }
.c-neg { background: var(--bad); color: #fff; }
.bars { display: flex; gap: 2px; align-items: flex-end; height: 70px; }
.bars div { flex: 1; border-radius: 2px 2px 0 0; min-height: 2px; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(15,18,35,.45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow: auto; }
.modal { background: var(--panel); border-radius: 12px; width: 100%; max-width: 640px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { max-width: 900px; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-head h2 { margin: 0; flex: 1; }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
#toast { position: fixed; bottom: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #0f172a; color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); max-width: 380px; }
.toast.err { background: #b91c1c; color: #fff; font-size: 15px; cursor: pointer; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; background: #0c2340; padding: 16px; }
.login .panel { width: 100%; max-width: 380px; padding: 28px; }
.login .brand { color: var(--text); padding: 0 0 18px; }

/* Scanner */
.scan { display: flex; gap: 8px; align-items: center; }
.scan input { font-size: 18px; padding: 10px 12px; }
.scan-log { margin-top: 10px; max-height: 220px; overflow: auto; font-size: 13px; }
.scan-log div { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.progress { height: 8px; background: var(--chip); border-radius: 99px; overflow: hidden; }
.progress div { height: 100%; background: var(--ok); }

.empty { text-align: center; color: var(--muted); padding: 30px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; }
.kv div:nth-child(odd) { color: var(--muted); }
.img-box { width: 100%; aspect-ratio: 4/3; background: var(--chip); border-radius: 8px; display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.img-box img { width: 100%; height: 100%; object-fit: cover; }
.dropdown { position: relative; }
.results { position: absolute; left: 0; right: 0; top: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,.12); max-height: 340px; overflow: auto; z-index: 20; }
.results div { padding: 8px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.results div:hover, .results div.sel { background: var(--accent-soft); }

/* Druck: Angebot / Packliste */
.print-only { display: none; }
@media print {
  .sidebar, .no-print, .tabs, #toast { display: none !important; }
  .layout { display: block; }
  .main { padding: 0; }
  .panel { border: 0; box-shadow: none; padding: 0; }
  .print-only { display: block; }
  body { background: #fff; color: #000; font-size: 12px; }
  [data-theme="dark"] { --panel: #fff; --text: #111; --muted: #555; --line: #ddd; --head: #f4f4f4; --group: #f4f4f4; --chip: #eee; --field: #fff; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 8px; }
  .brand { padding: 0 10px 0 4px; }
  .nav { display: flex; }
  .nav a span { display: none; }
  .side-foot { display: none; }
  .main { padding: 16px; }
  .toolbar input[type=search] { max-width: none; }
  .split .tree { max-height: 180px; overflow: auto; }
  .g2, .g3, .split, .form-grid { grid-template-columns: 1fr; }
}

/* Logo, Farben, Kalender, Etiketten */
.brand img { max-height: 32px; max-width: 150px; object-fit: contain; }
.login .brand img { max-height: 44px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; background: var(--accent); }
input[type=color] { padding: 2px; height: 36px; width: 70px; cursor: pointer; }
.colors { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.colors button { width: 26px; height: 26px; border-radius: 50%; padding: 0; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 110px; padding: 4px; min-width: 0; background: var(--panel); }
.cal .dow { min-height: 0; text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--head); padding: 6px; }
.cal .out { background: var(--group); }
.cal .out .dnum { opacity: .45; }
.cal .dnum { font-size: 12px; font-weight: 600; color: var(--muted); padding: 2px 4px; }
.cal .is-today .dnum { background: var(--accent); color: #fff; border-radius: 99px; display: inline-block; min-width: 22px; text-align: center; }
.ev { display: block; font-size: 12px; padding: 2px 6px; border-radius: 4px; margin-top: 2px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none !important; }
.ev.dim { opacity: .55; }
.labels { display: grid; grid-template-columns: repeat(3, 70mm); gap: 0; }
.label { width: 70mm; height: 37mm; padding: 3mm 4mm; border: 1px dashed var(--line); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: #fff; color: #000; }
.label .ln { font-weight: 700; font-size: 11pt; line-height: 1.15; max-height: 2.4em; overflow: hidden; }
.label .lm { font-size: 8pt; color: #333; }
.label svg { width: 100%; height: 13mm; display: block; }
.label .lc { font-family: ui-monospace, monospace; font-size: 9pt; text-align: center; letter-spacing: .08em; }
.labels-wrap { overflow-x: auto; }
.lbl-sel { width: 30px; }
@media print {
  .labels-page .label { border: 0; }
  .labels-page .labels { margin: 0; }
  .cal-page .cal > div { min-height: 80px; }
  .cal-page .ev { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
[data-side="light"] { --side-text: rgba(20,25,45,.72); --side-active: rgba(20,25,45,.07); }
[data-side="light"] .brand, [data-side="light"] .nav a:hover { color: #1b2130; }
[data-side="light"] .side-foot { border-top-color: rgba(20,25,45,.12); }
[data-side="light"] .sidebar { border-right: 1px solid var(--line); }
.conflict { color: var(--bad); font-size: 12px; }
/* v4: Crew, Belege, Portal */
.nav-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .55; padding: 12px 10px 4px; }
.sidebar { overflow-y: auto; }
.stars { color: #e3a008; letter-spacing: 1px; white-space: nowrap; }
.stars span { color: var(--line); }
tr.dim td { opacity: .5; }
input.grp { width: 120px; }
input.time { width: 92px; padding-left: 4px; padding-right: 4px; }
.lexrow { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.bar { background: var(--chip); border-radius: 4px; height: 10px; overflow: hidden; }
.bar > div { background: var(--accent); height: 100%; }
.cp { display: block; font-size: 11px; line-height: 1.3; padding: 2px 4px; border-radius: 4px; margin: 1px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; color: #fff; background: var(--c, var(--accent)); text-align: left; }
span.cp { display: inline-block; vertical-align: middle; }
a.cp:hover { text-decoration: none; filter: brightness(1.1); }
.cp.st-zugesagt { box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.cp.st-angefragt { background: repeating-linear-gradient(135deg, var(--c), var(--c) 5px, color-mix(in srgb, var(--c) 55%, #fff) 5px, color-mix(in srgb, var(--c) 55%, #fff) 10px); }
.cp.st-geplant { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--c); }
.cp.abs { background: var(--chip); color: var(--muted); }
.crewplan td { min-width: 70px; vertical-align: top; }
.crewplan td.clash { background: var(--bad-soft) !important; }
.my { min-height: 100vh; background: var(--bg); }
.my-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--side); color: var(--side-text); position: sticky; top: 0; z-index: 5; }
.my-head .brand { margin: 0; }
.my-head button { background: none; border: 1px solid currentColor; color: inherit; }
.my .main { max-width: 900px; margin: 0 auto; }
.my h2 { margin-top: 18px; }
.panel.assign { margin-bottom: 10px; }
.public { min-height: 100vh; background: var(--bg); padding: 20px 16px; }
.public .doc { margin: 0 auto; }
.doc tr.group td { text-transform: none; font-size: 13px; color: var(--text); }
@media (max-width: 700px) { .my .toolbar input { min-width: 0; } .cp { max-width: 70px; } }
@media print { .public { padding: 0; } .doc { box-shadow: none; border: 0; } }
.my-head .brand { padding: 0; }
select[data-f="status"] { min-width: 115px; }
input.time { width: 110px; }
td:first-child .conflict { min-width: 170px; }
.toolbar .dropdown input, #pick { width: 100%; max-width: none; }
/* v5: Casepilot Rental (Plattform, Rollen) */
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand small { font-size: 11px; font-weight: 500; opacity: .7; }
.brand svg { flex: none; }
.trial { display: block; text-decoration: none; background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 6px 8px; margin-bottom: 8px; font-weight: 600; }
.st-gesperrt { background: color-mix(in srgb, #dc2626 14%, var(--panel)); color: #dc2626; }
.center { text-align: center; }
.doc-legal { margin-top: 28px; padding-top: 10px; border-top: 1px solid var(--line); line-height: 1.5; }
/* v9: Scanner-Seite / Web-App */
.scanner { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 10px; }
.seg button span { font-size: 11px; color: var(--muted); font-weight: 400; }
.seg button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg button.on span { color: #fff; opacity: .85; }
#proj { width: 100%; font-size: 16px; padding: 10px; }
.camwrap { position: relative; background: #0b0d14; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; border: 3px solid transparent; }
.camwrap video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.camwrap .aim { position: absolute; left: 12%; right: 12%; top: 32%; bottom: 32%; border: 2px solid rgba(255,255,255,.75); border-radius: 10px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); display: none; }
.camwrap.live .aim { display: block; }
.camwrap button.big { position: relative; z-index: 2; font-size: 17px; padding: 14px 22px; }
.camwrap.live button.big { position: absolute; bottom: 10px; font-size: 13px; padding: 7px 12px; background: rgba(0,0,0,.55); border-color: transparent; color: #fff; }
.camwrap.ok { animation: flashok .6s; } .camwrap.err { animation: flasherr .8s; }
@keyframes flashok { 0% { border-color: #16a34a; } 100% { border-color: transparent; } }
@keyframes flasherr { 0% { border-color: #dc2626; } 100% { border-color: transparent; } }
.scanner .scan input { flex: 1; font-size: 16px; }
.found { display: flex; gap: 12px; align-items: center; color: var(--text); text-decoration: none; border-left: 5px solid #16a34a; }
.found.warn { border-left-color: #d97706; } .found.err { border-left-color: #dc2626; color: #b91c1c; }
.found img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.found-n { font-size: 20px; font-weight: 700; margin-top: 4px; }
.scan-log .bad { color: var(--bad); } .scan-log .good { color: var(--muted); }
@media (max-width: 900px) { .main { padding: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); } .sidebar { padding-top: calc(8px + env(safe-area-inset-top)); } }
@media (max-width: 600px) { .sidebar .brand span { display: none; } }

/* Stempeluhr */
.clock { text-align: center; padding: 20px 16px; border-top: 4px solid var(--border, #e5e7eb); }
.clock.is-on { border-top-color: #16a34a; }
.clock.is-pause { border-top-color: #f59e0b; }
.clock-state { font-weight: 600; color: var(--muted, #6b7280); }
.clock.is-on .clock-state { color: #16a34a; }
.clock.is-pause .clock-state { color: #b45309; }
.clock-time { font-size: 52px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 1px; margin: 6px 0 10px; }
.clock select { max-width: 360px; margin: 12px auto 0; display: block; }
.clock-btns { display: flex; gap: 12px; justify-content: center; margin: 16px 0 6px; flex-wrap: wrap; }
.clock-btns button.big { font-size: 19px; padding: 16px 26px; min-width: 150px; justify-content: center; border-radius: 12px; }
.clock-btns button.go { background: #16a34a; border-color: #16a34a; color: #fff; min-width: 220px; font-size: 22px; padding: 20px 30px; }
.clock-sum { display: flex; gap: 22px; justify-content: center; margin-top: 12px; font-size: 14px; }
.clock-list { max-width: 360px; margin: 10px auto 0; font-size: 14px; text-align: left; }
.clock-list div { display: flex; gap: 8px; padding: 4px 0; border-top: 1px solid var(--border, #e5e7eb); }
.clock-list b { margin-left: auto; }
.clock-page { max-width: 520px; margin: 0 auto 14px; }
@media (max-width: 600px) { .clock-time { font-size: 44px; } .clock-btns button.big { flex: 1; min-width: 0; } }
.clock-btns button.danger { background: var(--bad, #dc2626); border-color: var(--bad, #dc2626); color: #fff; }
.clock-btns #cpause:not(.primary) { background: #f59e0b; border-color: #f59e0b; color: #fff; }

/* Etiketten mit Logo und QR-Code */
.label .lhead { display: flex; gap: 2mm; align-items: flex-start; justify-content: space-between; }
.label .llogo { max-height: 8mm; max-width: 20mm; object-fit: contain; flex: none; }
.label.qr { flex-direction: row; align-items: center; gap: 3mm; justify-content: flex-start; }
.label .qrbox { position: relative; width: 29mm; height: 29mm; flex: none; }
.label .qrbox svg { width: 100%; height: 100%; }
.label .qrlogo { position: absolute; left: 50%; top: 50%; width: 22%; height: 22%; transform: translate(-50%, -50%); object-fit: contain; background: #fff; padding: .6mm; border-radius: .8mm; box-sizing: content-box; }
.label .qrtext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1mm; align-self: stretch; justify-content: center; }
.label .qrtext .llogo { max-height: 7mm; max-width: 24mm; align-self: flex-start; margin-bottom: 1mm; }
.label.qr .lc { text-align: left; }
.my .grid.g2 > .panel { align-self: start; }

/* Arbeitszeiten im Projekt */
.zpick { display: flex; flex-wrap: wrap; gap: 6px 16px; max-height: 180px; overflow: auto; padding: 6px 0; }
tr.sum td { border-top: 2px solid var(--line); }

/* Stempel-Terminal (Tablet) */
.term { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }
.term-top { display: flex; align-items: center; gap: 14px; padding: 12px 18px; background: var(--side); color: var(--side-text); }
.term-top .brand { margin: 0; padding: 0; }
.term-top button { background: none; border: 1px solid currentColor; color: inherit; }
.term-clock { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.term-box { width: min(420px, calc(100% - 32px)); margin: 24px auto; text-align: center; }
.term-box.wide { width: min(560px, calc(100% - 32px)); }
.term-box h1 { font-size: 28px; margin: 0 0 12px; }
.term-disp { font-size: 40px; letter-spacing: 8px; font-weight: 700; background: var(--panel, #fff); border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-height: 40px; font-variant-numeric: tabular-nums; }
.term-msg { margin: 12px 0; color: var(--muted); min-height: 1.4em; }
.term-msg.err { color: var(--bad, #dc2626); font-weight: 600; }
.term-msg.good { color: #16a34a; font-weight: 600; font-size: 18px; }
.tpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 8px; }
.tpad button { font-size: 30px; padding: 20px 0; border-radius: 14px; justify-content: center; font-weight: 600; }
.tpad button.ok { background: #16a34a; border-color: #16a34a; color: #fff; font-size: 24px; }
.tpad button.clr { font-size: 24px; }
.term-rfid { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.term-back { margin-top: 18px; font-size: 18px; padding: 12px 30px; }

/* Eigene Stempel-App */
.sapp { min-height: 100vh; background: var(--bg); }
.sapp-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: #16a34a; color: #fff; position: sticky; top: 0; z-index: 5; }
.sapp-head img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.sapp-head b { display: block; font-size: 17px; }
.sapp-head small { display: block; opacity: .85; font-size: 12px; }
.sapp-head button { background: none; border: 1px solid rgba(255,255,255,.7); color: #fff; }
.sapp main { max-width: 520px; margin: 0 auto; padding: 18px 16px 30px; }
.sapp-hello { font-size: 22px; font-weight: 700; margin: 4px 0 12px; }
.sapp-login .sapp-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 20px; }
.sapp-login .sapp-logo img { width: 72px; height: 72px; border-radius: 18px; }
.sapp-login .primary { background: #16a34a; border-color: #16a34a; }

/* Buchhaltung */
.acc-sub { margin-top: -8px; }
.acc-sub a { padding: 6px 12px; font-size: 13px; }
.acc-hint { background: var(--warn-soft); color: var(--text); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }
a.stat { color: inherit; display: block; }
a.stat:hover { text-decoration: none; border-color: var(--hover-line); }
.acc-chart { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 6px; }
.acc-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.acc-col small { font-size: 11px; color: var(--muted); margin-top: 4px; }
.acc-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.acc-bar { width: 42%; max-width: 14px; border-radius: 3px 3px 0 0; min-height: 1px; }
.acc-bar.rev, .acc-dot.rev { background: var(--accent); }
.acc-bar.exp, .acc-dot.exp { background: var(--hover-line); }
.acc-legend { display: flex; gap: 14px; margin-top: 8px; }
.acc-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: baseline; }
.acc-zipcity > div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.acc-items { overflow-x: auto; }
.acc-items table { width: 100%; min-width: 820px; }
.acc-items td { vertical-align: top; padding: 6px 4px; }
.acc-items th { padding: 6px 4px; }
.acc-items input, .acc-items select, .acc-items textarea { width: 100%; }
.acc-items td:nth-child(3), .acc-items td:nth-child(6) { width: 80px; }
.acc-items td:nth-child(4) { width: 90px; }
.acc-items td:nth-child(5) { width: 120px; }
.acc-items td:nth-child(7) { width: 86px; }
.acc-items textarea { margin-top: 4px; min-height: 30px; resize: vertical; font-size: 12px; color: var(--muted); }
.acc-mv { width: 26px; }
.acc-mv button { display: block; padding: 0 4px; font-size: 9px; line-height: 14px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.acc-mv button:hover { color: var(--accent); }
.acc-text { font-weight: 650; }
.acc-textrow td { background: var(--group); }
.acc-ded td { background: var(--accent-soft); }
.acc-b { font-weight: 600; padding-top: 12px !important; }
.acc-totals { display: flex; justify-content: flex-end; margin: 10px 0 14px; }
.acc-totals table { min-width: 320px; }
.acc-totals td { padding: 4px 8px; }
tr.acc-sum td { font-weight: 700; border-top: 2px solid var(--text); font-size: 15px; }
.acc-view { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.acc-pdf { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: sticky; top: 12px; }
.acc-pdf iframe { width: 100%; height: calc(100vh - 140px); min-height: 560px; border: 0; display: block; }
.acc-pdfmodal { width: 100%; height: 72vh; border: 1px solid var(--line); border-radius: 6px; }
.acc-side .panel + .panel { margin-top: 12px; }
.acc-kv td { padding: 5px 6px; vertical-align: top; }
.acc-kv td:first-child { color: var(--muted); width: 100px; font-size: 12px; }
.acc-log td { padding: 4px 6px; }
details.panel > summary { cursor: pointer; }
details.panel[open] > summary { margin-bottom: 10px; }
.acc-accounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.acc-accounts .stat.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.acc-purpose { max-width: 380px; word-break: break-word; }
.acc-txbox { background: var(--group); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; }
.acc-opt { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.acc-opt input[type=radio] { width: auto; }
.acc-newentry { padding-left: 24px; margin-top: 6px; }
.acc-texts { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 8px; }
.acc-texts summary { cursor: pointer; font-weight: 600; }
.acc-texts[open] summary { margin-bottom: 8px; }
.acc-dun { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 6px; margin-bottom: 10px; }
.acc-mini { width: 100%; margin-top: 6px; }
.acc-mini td { padding: 5px 6px; border-top: 1px solid var(--line); }
form.panel h2:not(:first-child) { margin-top: 20px; }
/* Briefpapier-Editor */
.acc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 430px); gap: 16px; align-items: start; }
.acc-lpage-wrap { position: sticky; top: 12px; min-width: 0; }
.acc-lpage { position: relative; background: #fff center/100% 100% no-repeat; box-shadow: 0 2px 14px rgba(0,0,0,.18); color: #222; overflow: hidden; touch-action: none; user-select: none; font-family: Helvetica, Arial, sans-serif; margin: 0 auto; }
.acc-lb { position: absolute; border: 1px dashed rgba(91,76,240,.55); background: rgba(91,76,240,.06); cursor: move; line-height: 1.25; padding: 1px 2px; }
.acc-lb:hover, .acc-lb.drag { border-style: solid; background: rgba(91,76,240,.12); z-index: 2; }
.acc-lbin { overflow: hidden; }
.acc-lb img { max-width: 100%; max-height: 100%; display: block; margin-left: auto; }
.acc-lb-logo .acc-lbin { height: 100%; display: flex; justify-content: flex-end; align-items: flex-start; }
.acc-lb-sender { text-decoration: underline; white-space: nowrap; }
.acc-lb-info table { width: 100%; border-collapse: collapse; }
.acc-lb-info td { padding: 0; border: 0; }
.acc-lb-info td:last-child { text-align: right; }
.acc-lb em, .acc-lline em { position: absolute; top: -15px; left: -1px; font: 600 10px/1 system-ui, sans-serif; font-style: normal; color: #fff; background: var(--accent); padding: 2px 4px; border-radius: 3px 3px 0 0; white-space: nowrap; opacity: 0; pointer-events: none; }
.acc-lb:hover em, .acc-lb.drag em, .acc-lline:hover em, .acc-lline.drag em { opacity: 1; }
.acc-rs { position: absolute; right: -4px; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.acc-rs::after { content: ''; position: absolute; right: 2px; top: 50%; width: 4px; height: 14px; margin-top: -7px; background: var(--accent); border-radius: 2px; }
.acc-lline { position: absolute; border-top: 2px dashed var(--accent); cursor: ns-resize; padding-top: 2px; font-weight: 700; }
.acc-lfoot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; color: #555; cursor: ns-resize; }
.acc-lmargin { position: absolute; top: 0; bottom: 0; border-left: 1px dotted rgba(0,0,0,.18); pointer-events: none; }
.acc-fold { position: absolute; left: 3px; width: 12px; border-top: 1px solid #888; pointer-events: none; }
.acc-fold.hole { width: 18px; }
.acc-ph { display: inline-block; border: 1px solid #bbb; color: #888; padding: 2px 8px; font-size: 11px; }
.acc-lctl input[type=number] { width: 64px; padding: 4px 6px; }
.acc-ltab { width: 100%; }
.acc-ltab td, .acc-ltab th { padding: 3px 3px; font-size: 12px; }
.acc-bgrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.acc-bgrow b { width: 90px; }
.acc-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.acc-seg button { border: 0; border-radius: 0; }
.acc-seg button.active { background: var(--accent); color: #fff; }
@media (max-width: 1100px) { .acc-view, .acc-layout { grid-template-columns: 1fr; } .acc-pdf, .acc-lpage-wrap { position: static; } }
@media print { .acc-view { display: block; } .acc-pdf { display: none; } }
.grid > .panel + .panel { margin-top: 0; }
.acc-ltab { table-layout: fixed; }
.acc-ltab th:first-child, .acc-ltab td:first-child { width: 31%; }
.acc-ltab th:nth-child(2) { width: 13%; }
.acc-lctl .acc-ltab input[type=number] { width: 100%; min-width: 0; padding: 4px; }
.acc-drop { outline: 3px dashed var(--accent); outline-offset: -8px; }
.acc-ph { margin: 6px 0 12px; }
.acc-ph p { margin: 0 0 6px; }
.acc-ph > div { display: flex; flex-wrap: wrap; gap: 6px; }
.acc-chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--chip); color: var(--text); cursor: pointer; opacity: 1; }
.acc-chip:hover { border-color: var(--accent); }

/* v36: Design 2026 "Navy Klassik" */
.sidebar { padding: 0 0 12px; border-right: 1px solid transparent; }
.brand { color: var(--side-strong); background: rgba(0,0,0,.18); padding: 18px 18px !important; margin-bottom: 10px; }
.nav { padding: 0 10px; }
.nav-sec { padding-left: 20px; }
.nav a { padding: 8px 10px; border-radius: 4px; font-size: 13.5px; }
.nav a:hover { color: var(--side-strong); }
.nav a.active { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 60%, #fff); }
.nav-sec { opacity: 1; font-weight: 600; color: color-mix(in srgb, var(--accent) 45%, #fff); }
.side-foot { border-top-color: rgba(255,255,255,.12); margin: 0 10px; }
[data-side="light"] { --side-text: #475569; --side-active: #f1f5f9; --side-strong: #0f172a; }
[data-side="light"] .brand { background: transparent; }
[data-side="light"] .brand, [data-side="light"] .nav a:hover { color: #0f172a; }
[data-side="light"] .nav a.active { background: var(--accent-soft); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
[data-side="light"] .nav-sec { color: #94a3b8; }
.main { padding: 26px 32px 60px; }
.main > .crumb:first-child { margin: -26px -32px 0; padding: 12px 32px 0; background: var(--panel); }
.main > .page-head:first-child, .main > .crumb:first-child + .page-head { margin: -26px -32px 22px; padding: 16px 32px; background: var(--panel); border-bottom: 1px solid var(--line); }
.main > .crumb:first-child + .page-head { margin-top: 0; padding-top: 4px; }
@media (max-width: 900px) { .main { padding: 20px 16px 60px; } .main > .crumb:first-child { margin: -20px -16px 0; padding: 10px 16px 0; } .main > .page-head:first-child, .main > .crumb:first-child + .page-head { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; } .main > .page-head:first-child { margin-top: -20px; } }
h1 { font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.stat { border-top: 3px solid var(--accent); border-radius: 6px; padding: 14px 16px; }
.stat .l { font-size: 11px; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .v { font-size: clamp(18px, 1.5vw, 26px); font-weight: 650; color: var(--navy); margin-top: 2px; white-space: nowrap; }
td.right, th.right, .stat .v, .num { font-variant-numeric: tabular-nums; }
th { background: var(--head); color: var(--navy); font-size: 11px; }
button, .btn { border-radius: 5px; font-weight: 500; }
.tabs { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; }
.badge { border-radius: 4px; }
.login .panel { border-top: 3px solid var(--accent); border-radius: 8px; box-shadow: 0 12px 32px rgba(12,35,64,.25); }
.login .brand { background: none; padding: 0 0 18px !important; margin: 0; }
@media (max-width: 900px) { .layout { grid-template-rows: auto 1fr; } .sidebar { padding: calc(8px + env(safe-area-inset-top)) 8px 8px; } .sidebar .brand { background: none; padding: 0 10px 0 4px !important; margin: 0; } .nav { padding: 0; } .nav-sec { display: none; } }
