:root {
  --bg: #f4f5f9; --panel: #fff; --text: #1b2130; --muted: #6b7385; --line: #e3e6ee;
  --side: #161a2b; --side-text: rgba(255,255,255,.72); --side-active: rgba(255,255,255,.09);
  --accent: #5b4cf0; --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--panel)); --ok: #18a058; --ok-soft: #e4f6ec;
  --warn: #d98a00; --warn-soft: #fff4dc; --bad: #d63c3c; --bad-soft: #fde8e8;
  --head: #fafbfd; --hover: color-mix(in srgb, var(--accent) 5%, var(--panel)); --group: #f4f5fa; --chip: #eef0f6; --field: #fff; --hover-line: #c8cdda;
  --radius: 8px; --shadow: 0 1px 2px rgba(20,25,45,.06), 0 2px 8px rgba(20,25,45,.05);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0f1220; --panel: #181c2e; --text: #e6e8f0; --muted: #9298ad; --line: #2a2f45;
  --ok-soft: #12321f; --warn-soft: #3a2b0c; --bad-soft: #3d1717;
  --head: #1d2236; --group: #1d2236; --chip: #262b42; --field: #12162a; --hover-line: #3a4060;
  --shadow: 0 1px 2px rgba(0,0,0,.3);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 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: #1b2130; 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: linear-gradient(135deg, #161a2b, #2b2464); 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; }
