/* Eine ruhige Spalte: oben die Ablage als einzige Karte, darunter die Aufträge als Zeilen wie auf einem Kontoauszug. */
:root {
  --paper: #f2f5f4;
  --sheet: #ffffff;
  --ink: #17252a;
  --muted: #586a6e;
  --line: #d3dcda;
  --accent: #0c5b60;
  --accent-ink: #ffffff;
  --accent-soft: #e0eeed;
  --ok: #1d7444; --ok-soft: #e2f2e8;
  --busy: #8a5a00; --busy-soft: #faefd6;
  --bad: #a12f2e; --bad-soft: #f7e3e2;
  --wait: #475b84; --wait-soft: #e5eaf4;
  --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #10181a; --sheet: #172225; --ink: #e2ebe9; --muted: #98a9a8; --line: #2b3a3d;
    --accent: #5db5b2; --accent-ink: #0a1a1b; --accent-soft: #1b3335;
    --ok: #6ccb94; --ok-soft: #163226; --busy: #e6b55a; --busy-soft: #392d14;
    --bad: #ee8a85; --bad-soft: #3b1e1d; --wait: #9db1de; --wait-soft: #1f2739;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.55; }
.wrap {
  max-width: 860px; margin: 0 auto;
  padding: 36px max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px));
  display: grid; gap: 32px;
}
.wrap.schmal { max-width: 440px; }
h1, h2 { text-wrap: balance; margin: 0; }
h1 { font-size: clamp(28px, 4.2vw, 38px); line-height: 1.15; font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: 18px; font-weight: 650; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
.muted { color: var(--muted); margin-top: 6px; }

.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.top-text { display: grid; gap: 10px; max-width: 64ch; min-width: 0; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.lede { color: var(--muted); font-size: 16px; }

.meldung { padding: 12px 14px; border-radius: 8px; border-left: 3px solid var(--ok); background: var(--ok-soft); font-size: 14px; }
.meldung.fehler { border-color: var(--bad); background: var(--bad-soft); }
.meldung.warn { border-color: var(--busy); background: var(--busy-soft); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps li { border-top: 2px solid var(--ink); padding-top: 10px; display: grid; gap: 2px; min-width: 0; }
.steps .n { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.steps b { font-weight: 650; }
.steps span:last-child { color: var(--muted); font-size: 13px; }

.drop { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 16px; }
form { margin: 0; }
#upForm, .login { display: grid; gap: 16px; }
.zone {
  position: relative; display: grid; gap: 4px; justify-items: center; text-align: center;
  padding: 28px 16px; border: 1.5px dashed var(--line); border-radius: 8px; cursor: pointer;
  background: var(--paper); transition: border-color .15s, background-color .15s;
}
.zone:hover, .zone.over { border-color: var(--accent); background: var(--accent-soft); }
.zone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.zone-main { font-weight: 600; }
.zone-main u { color: var(--accent); text-underline-offset: 3px; }
.zone-sub { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 14px; }
.help { font-size: 13px; color: var(--muted); }
.opt { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], select {
  font: inherit; color: var(--ink); background: var(--sheet); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; width: 100%; min-width: 0;
}
input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { margin: 3px 0 0; width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.check span { display: grid; gap: 2px; }
.check b { font-weight: 600; }
.check small { font-size: 13px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.status-msg { font-size: 14px; color: var(--muted); }

.btn {
  display: inline-block; font: inherit; font-weight: 600; font-size: 14px; border-radius: 8px; padding: 9px 16px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); text-decoration: none; line-height: 1.3;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.klein { padding: 5px 10px; font-size: 13px; }
.btn.link { background: none; border: none; padding: 9px 4px; color: var(--muted); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.btn.link.gefahr.bestaetigen { color: var(--bad); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.jobs-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.jobs { list-style: none; margin: 12px 0 0; padding: 0; border-bottom: 1px solid var(--line); }
.job { border-top: 1px solid var(--line); padding: 16px 0; display: grid; gap: 10px; }
.job-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.job-main { display: grid; gap: 2px; min-width: 0; }
.job-file { font-family: var(--font-mono); font-weight: 500; overflow-wrap: anywhere; }
.job-meta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.job-note { font-size: 14px; overflow-wrap: anywhere; }
.job-to { font-size: 14px; }
.job-to .inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.job-to select { width: auto; max-width: 100%; padding: 5px 10px; font-size: 14px; }
.lbl { color: var(--muted); }
.mail-ok { color: var(--ok); }
.mail-bad { color: var(--bad); }
.chip { flex: none; font-size: 12px; font-weight: 650; letter-spacing: 0.02em; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.st-neu { color: var(--wait); background: var(--wait-soft); }
.st-arbeit { color: var(--busy); background: var(--busy-soft); }
.st-fertig { color: var(--ok); background: var(--ok-soft); }
.st-rueck { color: var(--bad); background: var(--bad-soft); }
.badge-warn { justify-self: start; font-size: 12px; font-weight: 650; color: var(--busy); background: var(--busy-soft); padding: 2px 9px; border-radius: 999px; }
.hint { font-size: 14px; color: var(--muted); }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 20px; }
.facts div { min-width: 0; }
.facts dt { font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-family: var(--font-mono); font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.para { font-size: 14px; overflow-wrap: anywhere; }
.para b { font-weight: 650; }
.para.warn { border-left: 3px solid var(--busy); padding-left: 10px; }
.reason { font-size: 14px; border-left: 3px solid var(--bad); padding-left: 10px; white-space: pre-line; overflow-wrap: anywhere; }
.opts { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.opts-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.opts-row input[type="text"] { flex: 1 1 240px; width: auto; }
.job-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.job-actions .inline { display: inline; }
.empty { padding: 28px 0 8px; display: grid; gap: 4px; color: var(--muted); }
.empty b { color: var(--ink); font-weight: 600; }

.staff-list { list-style: none; margin: 12px 0 0; padding: 0; border-bottom: 1px solid var(--line); }
.staff-list li { border-top: 1px solid var(--line); padding: 10px 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; }
.staff-who { display: grid; min-width: 0; }
.staff-who b { font-weight: 600; }
.staff-who span { font-family: var(--font-mono); font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.staff-form { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 12px; align-items: end; }
footer { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.systeminfo { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

@media (max-width: 640px) {
  .steps, .fields, .staff-form { grid-template-columns: 1fr; }
  .drop { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.abmelden { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.angemeldet { font-size: 13px; color: var(--muted); }
.passkey-login { display: grid; gap: 10px; }
.oder { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.oder::before, .oder::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
