/* MaterialService Lite – dunkles, ruhiges Design. Eine Akzentfarbe, viel Abstand, große Tippflächen. */
:root {
  --bg: #0b0f13;
  --surface: #121920;
  --surface-2: #19222b;
  --surface-3: #212c36;
  --line: #24303b;
  --ink: #e6edf3;
  --muted: #8b98a5;
  --faint: #5d6b78;
  --accent: #2dd4bf;
  --accent-ink: #04201c;
  --accent-soft: rgba(45, 212, 191, .12);
  --warn: #f5b84a;
  --warn-soft: rgba(245, 184, 74, .12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, .12);
  --radius: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 15px/1.55 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(900px 400px at 85% -120px, rgba(45, 212, 191, .07), transparent 70%);
  background-repeat: no-repeat;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Kopfzeile */
.bar { display: flex; align-items: center; gap: 18px; max-width: 1200px; margin: 0 auto; padding: 18px 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 650; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand em { font-style: normal; color: var(--accent); font-weight: 600; }
.mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.bar nav { display: flex; gap: 4px; margin-left: 8px; }
.bar nav a { color: var(--muted); padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 550; }
.bar nav a:hover { color: var(--ink); text-decoration: none; background: var(--surface-2); }
.bar nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3); color: var(--muted); display: grid; place-items: center; font-size: 11.5px; font-weight: 700; }
.quiet { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px 4px; font-size: 14px; }
.quiet:hover { color: var(--ink); }

/* Allgemeine Bausteine */
.wrap { max-width: 560px; margin: 0 auto; padding: 4px 20px 130px; }
.wide { max-width: 1200px; margin: 0 auto; padding: 4px 20px 60px; }
h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.025em; margin: 18px 0 6px; font-weight: 700; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; margin: 28px 0 12px; }
.lead { color: var(--muted); margin: 0 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.ok { background: var(--accent-soft); color: var(--accent); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--danger-soft); color: var(--danger); }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); appearance: none; -webkit-appearance: none; transition: border-color .15s, box-shadow .15s;
}
select.input {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 20px, calc(100% - 15px) 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px;
}
select.input option { background: var(--surface); }
textarea.input { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; }
.input::placeholder { color: var(--faint); }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.input.sm { height: 38px; border-radius: 10px; padding: 0 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; border: 0;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; white-space: nowrap; transition: filter .15s, transform .05s; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .35; cursor: default; filter: none; transform: none; }
.btn.ghost { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.sm { height: 34px; padding: 0 13px; font-size: 13.5px; border-radius: 10px; }
.btn.block { width: 100%; height: 54px; font-size: 16px; border-radius: 16px; }

.notice { border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; font-size: 14px; }
.notice.error { background: var(--danger-soft); color: var(--danger); }
.notice.ok { background: var(--accent-soft); color: var(--accent); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* Bestellen */
.items { overflow: hidden; margin: 4px 0 18px; }
.item { display: flex; align-items: center; gap: 12px; padding: 13px 14px 13px 16px; border-top: 1px solid var(--line); transition: background .15s; }
.item:first-child { border-top: 0; }
.item[hidden] { display: none; }
.item-name { flex: 1; min-width: 0; }
.item-name strong { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.item-name small { color: var(--muted); font-size: 12.5px; }
.item.off { opacity: .4; }
.item.picked { background: var(--accent-soft); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .04); }
.dot-red { background: #f26b6b; } .dot-yellow { background: #f5c842; } .dot-blue { background: #5b9cf0; } .dot-green { background: #4cc28a; }

.stepper { display: inline-flex; align-items: center; border-radius: 999px; background: var(--surface-2); padding: 3px; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink); }
.stepper button:hover:not(:disabled) { background: var(--surface-3); }
.stepper button:disabled { opacity: .25; cursor: default; }
.stepper input { width: 34px; text-align: center; border: 0; background: transparent; font-weight: 700; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.item.picked .stepper { background: var(--surface-3); }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.segmented { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span { display: block; padding: 8px 15px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); }
.segmented input:checked + span { background: var(--surface-3); color: var(--ink); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); }
.switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; cursor: pointer; margin-left: auto; color: var(--muted); }
.switch input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 999px; background: var(--surface-3); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked { background: var(--danger); }
.switch input:checked::after { transform: translateX(18px); background: #fff; }
.switch:has(input:checked) { color: var(--danger); }
details.more > summary { cursor: pointer; color: var(--muted); font-size: 14px; list-style: none; margin: 6px 0 12px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { color: var(--ink); }

.dock { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 60%, transparent); }
.dock > div { max-width: 520px; margin: 0 auto; }

.done { text-align: center; padding: 70px 0 20px; }
.done-check { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin: 0 auto 20px; font-size: 32px; font-weight: 800; box-shadow: 0 0 0 10px var(--accent-soft); }
.done p { color: var(--muted); margin: 0 0 26px; }
.done .btn { margin: 0 4px; }

/* Listen (Material auf Statusseite und Verlauf) */
.list { list-style: none; margin: 0; padding: 4px 16px; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }

/* Sendungsverfolgung (Statusseite der Station) */
.track-id { color: var(--muted); font-size: 13.5px; margin: 18px 0 10px; }
.track-id strong { color: var(--ink); }
.track { padding: 22px 20px 20px; }
.track h1 { margin: 0 0 4px; font-size: 26px; }
.track .lead { margin: 0; }
.track.delivered h1 { color: var(--accent); }
.track.rejected h1 { color: var(--danger); }
.tracker { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(var(--steps), minmax(0, 1fr)); }
.tracker li { position: relative; display: grid; justify-items: center; text-align: center; gap: 6px; }
/* Verbindungslinie zum vorherigen Schritt */
.tracker li + li::before { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 3px; background: var(--surface-3); z-index: 0; }
.tracker li.is-done + li::before { background: var(--accent); }
.tdot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); color: var(--accent-ink); font-size: 14px; font-weight: 800; border: 3px solid var(--surface); }
.tracker li.is-done .tdot { background: var(--accent); }
.tracker li.is-now .tdot { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.tracker li.is-now .tdot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
.tlabel { font-size: 12px; font-weight: 650; color: var(--faint); line-height: 1.25; padding: 0 2px; hyphens: auto; -webkit-hyphens: auto; }
.tracker.many .tlabel { font-size: 11px; }
.tracker.many .ttime { font-size: 10.5px; }
.tracker li.is-done .tlabel { color: var(--muted); }
.tracker li.is-now .tlabel { color: var(--ink); }
.ttime { font-size: 11.5px; color: var(--faint); min-height: 1em; }
@keyframes pulse { 50% { transform: scale(.55); opacity: .6; } }
.track-log { list-style: none; margin: 0; padding: 6px 16px; }
.track-log li { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 11px 0 11px 18px; border-top: 1px solid var(--line); position: relative; font-size: 14px; }
.track-log li:first-child { border-top: 0; }
.track-log li::before { content: ""; position: absolute; left: 0; top: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); }
.track-log li.latest::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.track-log li.latest span { font-weight: 650; }
.track-log time { color: var(--faint); font-size: 12.5px; line-height: 1.35; }
/* Auf schmalen Bildschirmen stehen die Schritte untereinander, wie bei der Paketverfolgung auf dem Handy. */
@media (max-width: 560px) {
  .track h1 { font-size: 22px; }
  .tracker { grid-template-columns: 1fr; margin-top: 18px; }
  .tracker li { grid-template-columns: 28px 1fr auto; justify-items: start; align-items: center; text-align: left; column-gap: 12px; height: 44px; }
  .tracker li + li::before { top: -22px; right: auto; left: 12.5px; width: 3px; height: 44px; }
  .tracker .tlabel, .tracker.many .tlabel { font-size: 14px; padding: 0; }
  .tracker .ttime, .tracker.many .ttime { font-size: 12px; min-height: 0; }
}

/* Board */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.qcard { display: block; color: var(--ink); padding: 12px 14px; }
.qcard:hover { text-decoration: none; border-color: var(--accent); }
.qtext { margin: 6px 0 0; font-size: 13.5px; color: #cdd6df; overflow-wrap: anywhere; }
.col-head { display: flex; align-items: center; gap: 8px; margin: 10px 4px 12px; }
.col-head h2 { margin: 0; }
.count { background: var(--surface-2); color: var(--ink); border-radius: 999px; padding: 0 9px; font-size: 12px; font-weight: 700; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; margin-bottom: 12px; position: relative; }
.card.urgent { border-color: rgba(248, 113, 113, .45); }
.card.urgent::before { content: ""; position: absolute; left: -1px; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--danger); }
.card-head { display: flex; align-items: baseline; gap: 8px; }
.card-head strong { font-size: 15.5px; font-weight: 650; }
.card-head .meta { margin-left: auto; color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.card ul { list-style: none; margin: 9px 0 0; padding: 0; font-size: 14px; color: #cdd6df; }
.card li { padding: 1px 0; }
.card li b { color: var(--ink); font-weight: 700; display: inline-block; min-width: 28px; }
.card .note { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tag .avatar.sm { width: 18px; height: 18px; font-size: 8px; margin-left: -5px; }
.tag.urgent { background: var(--danger-soft); color: var(--danger); }
.tag.ok { background: var(--accent-soft); color: var(--accent); }
.tag.bad { background: var(--danger-soft); color: var(--danger); }
.mini-steps { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.mini-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; flex: 1; }
.mini-bar i { height: 4px; border-radius: 999px; background: var(--surface-3); }
.mini-bar i.on { background: var(--accent); }
.mini-label { font-size: 12.5px; font-weight: 650; color: var(--accent); white-space: nowrap; }
.actions { display: flex; gap: 8px; margin-top: 13px; flex-wrap: wrap; align-items: center; }
.actions form { display: contents; }
details.reject { margin-left: auto; }
details.reject > summary { list-style: none; cursor: pointer; color: var(--faint); font-size: 13px; padding: 6px 2px; }
details.reject > summary::-webkit-details-marker { display: none; }
details.reject > summary:hover { color: var(--danger); }
details.reject[open] { flex-basis: 100%; margin-left: 0; }
details.reject[open] > summary { display: none; }
.reject-form { display: grid; gap: 8px; }
.empty { color: var(--faint); font-size: 14px; padding: 22px 16px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; }
.foot { color: var(--faint); font-size: 12.5px; margin-top: 18px; }

/* Einstellungen */
.settings { display: grid; gap: 18px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tr:first-child td { border-top: 0; }
.table .num { width: 90px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.add { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.add .input { flex: 1; min-width: 140px; }
.dept { padding: 14px 16px; border-top: 1px solid var(--line); }
.dept:first-child { border-top: 0; }
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; margin: 10px 0; }
.scroll { overflow-x: auto; }

/* Profilbild */
img.avatar { object-fit: cover; padding: 0; }
.avatar.sm { width: 26px; height: 26px; font-size: 10px; flex: none; }
.avatar.lg { width: 84px; height: 84px; font-size: 26px; }
.avatar.station { background: var(--warn-soft); color: var(--warn); }
.me { display: inline-flex; border-radius: 50%; }
.me:hover { box-shadow: 0 0 0 2px var(--accent); }
.profile { padding: 18px; display: grid; gap: 12px; }
.profile-row { display: flex; align-items: center; gap: 18px; }
.profile-row p { margin: 8px 0 0; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Rückfrage */
.thread { display: grid; gap: 10px; margin: 6px 0 10px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 92%; }
.msg.own { flex-direction: row-reverse; margin-left: auto; text-align: right; }
.msg p { margin: 2px 0 0; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--surface-2); font-size: 14px; text-align: left; overflow-wrap: anywhere; }
.msg.own p { background: var(--accent-soft); border-radius: 14px 14px 4px 14px; }
.msg-meta { font-size: 11.5px; color: var(--faint); }
.card details.box { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.card details.box > summary { list-style: none; cursor: pointer; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.card details.box > summary::-webkit-details-marker { display: none; }
.card details.box > summary:hover { color: var(--ink); }
.box-form { display: grid; gap: 8px; margin-top: 8px; }
.adjust-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.adjust-row span { flex: 1; min-width: 0; }
.adjust-row .input { width: 70px; text-align: center; }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.reduced { color: var(--warn); }
.list s { color: var(--faint); margin-right: 6px; }

/* Verlauf */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 10px; }
.toolbar input[type="search"] { flex: 1 1 280px; }
.toolbar select { width: auto; flex: 0 0 auto; }
.toolbar-gap { flex: 1; }
.history { display: grid; gap: 8px; margin-top: 12px; }
.hrow { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.hrow[open] { border-color: var(--surface-3); }
.hrow > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 12px 16px; cursor: pointer; }
.hrow > summary::-webkit-details-marker { display: none; }
.hrow > summary:hover { background: var(--surface-2); border-radius: var(--radius); }
.h-date { width: 64px; flex: none; font-weight: 650; font-size: 14px; display: grid; }
.h-date small { color: var(--faint); font-weight: 500; font-size: 12px; }
.h-main { flex: 1; min-width: 0; display: grid; }
.h-items { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.h-body { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 4px 16px 18px; border-top: 1px solid var(--line); }
.h-body h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 0 8px; }
.facts { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 14px 0 0; font-size: 14px; }
.facts dt { color: var(--faint); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.bad-text { color: var(--danger); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--surface-3); display: grid; gap: 9px; font-size: 14px; }
.timeline li { display: grid; grid-template-columns: 82px 1fr auto; gap: 10px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.timeline time { color: var(--faint); font-size: 12.5px; }
.timeline small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 760px) {
  .h-body { grid-template-columns: 1fr; gap: 0; }
  .hrow > summary { flex-wrap: wrap; gap: 8px 12px; }
  .h-tags { width: 100%; justify-content: flex-start; padding-left: 76px; }
  .timeline li { grid-template-columns: 70px 1fr; }
  .timeline small { grid-column: 2; }
}

/* Anmeldung */
.auth { max-width: 380px; margin: 9vh auto 40px; padding: 0 20px; }
.auth .panel { padding: 24px; }

@media (max-width: 1150px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .board { grid-template-columns: 1fr; }
  .questions { order: -1; }
}
@media (max-width: 560px) {
  .bar { flex-wrap: wrap; gap: 10px; }
  .bar nav { order: 3; width: 100%; margin-left: 0; }
  h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
