/* NEXLOGISTIC by Andrerer – Oberfläche
   Farbwelt aus dem Logo: Indigo #1E1B4B, Violett #A78BFA, Akzent Magenta #E879F9. */

:root {
  color-scheme: light;
  --bg: #f6f5fb;
  --surface: #ffffff;
  --surface-2: #f2f0fa;
  --surface-3: #e9e6f6;
  --border: #e3e0ef;
  --border-strong: #cfcae4;
  --text: #1b1838;
  --text-2: #3d3962;
  --muted: #6c6890;
  --primary: #6d28d9;
  --primary-hover: #5b21b6;
  --primary-soft: #efeafe;
  --primary-text: #5b21b6;
  --ring: rgba(124, 58, 237, .28);
  --accent: #c026d3;

  --side-bg: #1e1b4b;
  --side-bg-2: #262262;
  --side-text: #c9c4f0;
  --side-muted: #8e88c4;
  --side-active: rgba(167, 139, 250, .18);
  --side-mark: #a78bfa;

  --ok: #15803d;    --ok-bg: #e3f6e9;
  --warn: #a16207;  --warn-bg: #fdf3d7;
  --bad: #b91c1c;   --bad-bg: #fde7e7;
  --info: #1d4ed8;  --info-bg: #e2ebfe;
  --violet: #6d28d9; --violet-bg: #efeafe;
  --neutral: #55527a; --neutral-bg: #eeedf5;

  --shadow-sm: 0 1px 2px rgba(30, 27, 75, .06);
  --shadow: 0 1px 3px rgba(30, 27, 75, .07), 0 6px 18px rgba(30, 27, 75, .05);
  --shadow-lg: 0 20px 50px rgba(30, 27, 75, .22);
  --radius: 12px;
  --radius-sm: 8px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #100e24;
    --surface: #18153a;
    --surface-2: #1f1b46;
    --surface-3: #282354;
    --border: #2d2858;
    --border-strong: #3d3770;
    --text: #eceaff;
    --text-2: #cdc9ef;
    --muted: #a19dc8;
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-soft: rgba(139, 92, 246, .16);
    --primary-text: #c4b5fd;
    --ring: rgba(167, 139, 250, .35);
    --accent: #e879f9;
    --side-bg: #0c0a1f;
    --side-bg-2: #15123a;
    --ok: #4ade80;   --ok-bg: rgba(74, 222, 128, .13);
    --warn: #fbbf24; --warn-bg: rgba(251, 191, 36, .13);
    --bad: #f87171;  --bad-bg: rgba(248, 113, 113, .13);
    --info: #93c5fd; --info-bg: rgba(147, 197, 253, .13);
    --violet: #c4b5fd; --violet-bg: rgba(167, 139, 250, .15);
    --neutral: #b7b3da; --neutral-bg: rgba(183, 179, 218, .12);
    --shadow-sm: none;
    --shadow: 0 1px 0 rgba(255, 255, 255, .02), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #100e24;
  --surface: #18153a;
  --surface-2: #1f1b46;
  --surface-3: #282354;
  --border: #2d2858;
  --border-strong: #3d3770;
  --text: #eceaff;
  --text-2: #cdc9ef;
  --muted: #a19dc8;
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --primary-soft: rgba(139, 92, 246, .16);
  --primary-text: #c4b5fd;
  --ring: rgba(167, 139, 250, .35);
  --accent: #e879f9;
  --side-bg: #0c0a1f;
  --side-bg-2: #15123a;
  --ok: #4ade80;   --ok-bg: rgba(74, 222, 128, .13);
  --warn: #fbbf24; --warn-bg: rgba(251, 191, 36, .13);
  --bad: #f87171;  --bad-bg: rgba(248, 113, 113, .13);
  --info: #93c5fd; --info-bg: rgba(147, 197, 253, .13);
  --violet: #c4b5fd; --violet-bg: rgba(167, 139, 250, .15);
  --neutral: #b7b3da; --neutral-bg: rgba(183, 179, 218, .12);
  --shadow-sm: none;
  --shadow: 0 1px 0 rgba(255, 255, 255, .02), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
}

/* ------------------------------------------------------------------ Grundlagen */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
p { margin: 0 0 10px; }
small, .muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .95em; letter-spacing: .01em; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.boot {
  min-height: 100vh; display: flex; flex-direction: column; gap: 14px;
  align-items: center; justify-content: center; color: var(--muted);
}
.boot img { border-radius: 12px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; transform: scale(.96); } }

/* ------------------------------------------------------------------ Layout */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--side-bg) 0%, var(--side-bg-2) 100%);
  color: var(--side-text); display: flex; flex-direction: column; padding: 18px 12px;
}
.side .brand { display: flex; align-items: center; padding: 4px 10px 18px; }
.side .brand img { height: 34px; width: auto; }
.side .company {
  margin: 0 4px 14px; padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07);
}
.side .company b { display: block; color: #fff; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .company span { font-size: 12px; color: var(--side-muted); }
.nav-group { margin: 14px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--side-muted); }
.nav a {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 8px 12px; margin: 1px 0; border-radius: 8px;
  color: var(--side-text); font-weight: 500; text-decoration: none;
  transition: background .12s, color .12s;
}
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: var(--side-active); color: #fff; }
.nav a.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--side-mark);
}
.nav a .count {
  margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 20px; text-align: center;
  background: rgba(167, 139, 250, .22); color: #e9e4ff; font-size: 11.5px; font-weight: 600; line-height: 20px;
}
.side .foot { margin-top: auto; padding: 14px 4px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.side .user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; color: var(--side-text); }
.side .user:hover { background: rgba(255, 255, 255, .06); text-decoration: none; }
.side .user b { display: block; color: #fff; font-size: 13px; }
.side .user span { font-size: 12px; color: var(--side-muted); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, #a78bfa, #7c3aed); color: #fff; font-weight: 700; font-size: 12.5px;
}
.conn { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--side-muted); padding: 10px 10px 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .15); }
.dot.off { background: #f87171; box-shadow: 0 0 0 3px rgba(248, 113, 113, .15); }
.dot.wait { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, .15); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: none; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--side-bg); color: #fff;
}
.topbar img { height: 26px; }
.topbar .burger { margin-left: auto; }
.content { padding: 26px 32px 60px; max-width: 1380px; width: 100%; }

.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .titles { flex: 1; min-width: 220px; }
.page-head .titles p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; display: flex; gap: 6px; align-items: center; }
.crumb a { color: var(--muted); }

/* ------------------------------------------------------------------ Bausteine */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head h2 { flex: 1; }
.card-body { padding: 16px 18px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .auth-box .card + .card { margin-top: 0; }
.auth-box .card { margin-bottom: 14px; }
h3 > svg.i { vertical-align: -4px; margin-right: 4px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.sep { height: 1px; background: var(--border); margin: 14px 0; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi {
  position: relative; overflow: hidden; padding: 16px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.kpi .label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi .label .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }
.kpi .label .ic svg { width: 16px; height: 16px; }
.kpi .value { margin-top: 10px; font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12.5px; color: var(--muted); }
.kpi.hero { background: linear-gradient(135deg, #2e1065 0%, #4c1d95 55%, #6d28d9 100%); border-color: transparent; color: #fff; }
.kpi.hero .label, .kpi.hero .sub { color: #ddd6fe; }
.kpi.hero .label .ic { background: rgba(255, 255, 255, .14); color: #fff; }
.kpi.hero::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 121, 249, .35), transparent 70%);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: 500 13.5px/1 var(--font); cursor: pointer;
  white-space: nowrap; text-decoration: none; transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg.i { width: 16px; height: 16px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(91, 33, 182, .3); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); border-color: var(--bad); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.lg { height: 44px; padding: 0 18px; font-size: 15px; }
.btn.block { width: 100%; }
.btn.icon { width: 36px; padding: 0; }
.btn.icon.sm { width: 30px; }
.topbar .btn { background: transparent; border-color: rgba(255, 255, 255, .2); color: #fff; }

/* Formulare */
.form { display: grid; gap: 14px; }
.form .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form .cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.form .cols-zip { display: grid; grid-template-columns: 110px minmax(0, 1fr) 90px; gap: 14px; }
.form fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 16px; margin: 0; display: grid; gap: 12px; }
.form legend { padding: 0 6px; font-weight: 650; font-size: 13px; color: var(--text-2); }
.field { display: grid; gap: 5px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.field > small { font-size: 12px; }
input, select, textarea {
  width: 100%; min-width: 0; height: 38px; padding: 0 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: 14px var(--font); transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; min-height: 76px; padding: 9px 11px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--primary); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.search { position: relative; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.search input { padding-left: 34px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.toolbar .search { flex: 1; min-width: 200px; max-width: 360px; }
.toolbar select, .toolbar input[type="date"] { width: auto; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font: 500 12.5px var(--font); cursor: pointer;
}
.chip:hover { border-color: var(--border-strong); }
.chip.on { background: var(--primary-soft); border-color: transparent; color: var(--primary-text); }
.chip .n { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.chip.on .n { color: inherit; }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap;
}
td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover td { background: var(--surface-2); }
td .t1 { font-weight: 600; }
td .t2 { font-size: 12.5px; color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .ic {
  width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 14px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-text);
}
.empty .ic svg { width: 24px; height: 24px; }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* Status-Abzeichen */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 20px;
  font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--neutral-bg); color: var(--neutral);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.violet { background: var(--violet-bg); color: var(--violet); }

.progress { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #7c3aed, #c026d3); }
.progress.over > i { background: var(--bad); }

/* Listen & Touren */
.list > .item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.list > .item:last-child { border-bottom: 0; }
.list > a.item { color: inherit; text-decoration: none; }
.list > a.item:hover { background: var(--surface-2); }
.tour-card { display: block; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: inherit; }
.tour-card:hover { border-color: var(--primary); text-decoration: none; box-shadow: 0 0 0 3px var(--ring); }
.tour-card .top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tour-card .meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin: 8px 0 10px; }
.tour-card .meta span { display: inline-flex; align-items: center; gap: 5px; }
.tour-card .meta svg { width: 14px; height: 14px; }
.tours-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

.stops { counter-reset: stop; }
.stop { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.stop:last-child { border-bottom: 0; }
.stop .n {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-text); font-weight: 700; font-size: 12.5px;
}
.stop.done .n { background: var(--ok-bg); color: var(--ok); }
.stop.fail .n { background: var(--bad-bg); color: var(--bad); }
.stop .body { flex: 1; min-width: 0; }
.stop .body .addr { color: var(--text-2); font-size: 13px; }
.stop .tools { display: flex; gap: 4px; flex: none; }

/* Zeitachse */
.timeline { list-style: none; margin: 0; padding: 4px 0 0; }
.timeline li { position: relative; padding: 0 0 16px 26px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: -6px; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline li::after {
  content: ""; position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--border-strong);
}
.timeline li.cur::after { border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.timeline li b { display: block; font-size: 13.5px; }
.timeline li small { display: block; }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.addr-block { font-size: 13.5px; line-height: 1.55; }
.addr-block b { font-size: 14px; }

.code-box {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px;
  background: var(--surface-2); border: 1px dashed var(--border-strong);
}
.code-box .mono { font-size: 17px; font-weight: 700; letter-spacing: .08em; flex: 1; }

.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--info-bg); color: var(--info); font-size: 13.5px; }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.bad { background: var(--bad-bg); color: var(--bad); }
.alert.violet { background: var(--violet-bg); color: var(--violet); }
.alert svg { margin-top: 1px; }
.alert p { margin: 0; color: inherit; }

/* ------------------------------------------------------------------ Modal & Toast */
.modal-bg {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px 16px; background: rgba(16, 13, 40, .55); backdrop-filter: blur(3px); overflow-y: auto;
  animation: fade .14s ease-out;
}
.modal {
  width: 100%; max-width: 560px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); animation: rise .16s ease-out;
}
.modal.lg { max-width: 820px; }
.modal.sm { max-width: 420px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { flex: 1; font-size: 17px; }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 16px 16px; }
.modal-foot .left { margin-right: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.99); } }

#toast-root { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 380px; padding: 11px 14px;
  border-radius: 10px; background: #1e1b4b; color: #fff; box-shadow: var(--shadow-lg); font-size: 13.5px;
  animation: rise .16s ease-out;
}
.toast.bad { background: #7f1d1d; }
.toast.ok svg { color: #86efac; }

/* ------------------------------------------------------------------ Anmeldung */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-art {
  position: relative; overflow: hidden; padding: 48px; color: #e9e4ff; display: flex; flex-direction: column;
  background:
    radial-gradient(800px 400px at 110% -10%, rgba(232, 121, 249, .28), transparent 60%),
    radial-gradient(600px 500px at -10% 110%, rgba(124, 58, 237, .45), transparent 60%),
    linear-gradient(160deg, #1e1b4b 0%, #2e1065 100%);
}
.auth-art::before {
  content: ""; position: absolute; inset: 0; opacity: .14;
  background-image: linear-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .5) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(circle at 70% 40%, #000, transparent 75%);
}
.auth-art > * { position: relative; }
.auth-art img { height: 44px; width: auto; align-self: flex-start; }
.auth-art .claim { margin-top: auto; max-width: 480px; }
.auth-art h1 { font-size: 34px; line-height: 1.15; color: #fff; letter-spacing: -.02em; }
.auth-art h1 em { font-style: normal; background: linear-gradient(90deg, #c4b5fd, #f0abfc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-art .claim p { margin-top: 14px; color: #c9c2ef; font-size: 15px; }
.auth-art ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.auth-art li { display: flex; gap: 10px; align-items: center; color: #ddd6fe; }
.auth-art li svg { color: #c4b5fd; }
.auth-art .fine { margin-top: 40px; font-size: 12px; color: #9c94d0; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box .logo-m { display: none; height: 34px; margin-bottom: 24px; }
.auth-box h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.auth-box > p { color: var(--muted); margin-bottom: 22px; }
.auth-box .switch { margin-top: 18px; text-align: center; color: var(--muted); }
.auth-box .err { margin-bottom: 14px; }
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 10px; background: var(--surface-2); margin-bottom: 20px; }
.tabs2 button { height: 34px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: 600 13px var(--font); cursor: pointer; }
.tabs2 button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.track-mini { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.track-mini .row input { flex: 1; }

/* Öffentliche Sendungsverfolgung */
.track-page { min-height: 100vh; background: var(--bg); }
.track-head { background: linear-gradient(160deg, #1e1b4b, #2e1065); padding: 22px 24px 90px; }
.track-head .in { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.track-head img { height: 32px; }
.track-body { max-width: 760px; margin: -64px auto 40px; padding: 0 16px; }
.track-status { display: flex; align-items: center; gap: 16px; }
.track-status .big { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); flex: none; }
.track-status .big svg { width: 26px; height: 26px; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 22px 0 6px; }
.steps div { height: 6px; border-radius: 6px; background: var(--surface-3); }
.steps div.on { background: linear-gradient(90deg, #7c3aed, #c026d3); }
.steps-l { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; font-size: 11.5px; color: var(--muted); }

/* Fahrer-Ansicht */
.drive-stop { padding: 16px; }
.drive-stop + .drive-stop { border-top: 1px solid var(--border); }
.drive-stop .row.btns { margin-top: 12px; flex-wrap: wrap; }
.drive-stop .row.btns .btn { flex: 1; min-width: 130px; }

/* ------------------------------------------------------------------ Druck */
#print-root { display: none; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  #app, #modal-root, #toast-root { display: none !important; }
  #print-root { display: block; }
  .doc { color: #111; }
  .doc h1 { font-size: 20pt; }
  .doc table th { background: #f1f0f7 !important; color: #333; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc td, .doc th { padding: 6px 8px; border-bottom: 1px solid #ccc; }
  .ship-label { page-break-after: always; }
}
.doc { font-family: var(--font); }
.doc .doc-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid #6d28d9; padding-bottom: 10px; margin-bottom: 18px; }
.doc .doc-head img { height: 40px; }
.doc .doc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 18px; }
.doc .lbl { font-size: 8.5pt; text-transform: uppercase; letter-spacing: .06em; color: #666; margin-bottom: 3px; }
.doc .sign { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 50px; }
.doc .sign div { border-top: 1px solid #333; padding-top: 4px; font-size: 9pt; color: #444; }
.ship-label {
  width: 100mm; min-height: 150mm; border: 2px solid #000; padding: 4mm; font-family: var(--font); color: #000;
  display: flex; flex-direction: column; gap: 3mm;
}
.ship-label .l-top { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #000; padding-bottom: 2mm; }
.ship-label .l-top img { height: 9mm; }
.ship-label .l-svc { font-size: 20pt; font-weight: 800; }
.ship-label .l-to { font-size: 13pt; line-height: 1.35; border-bottom: 2px solid #000; padding-bottom: 3mm; }
.ship-label .l-to .city { font-size: 18pt; font-weight: 800; }
.ship-label .l-small { font-size: 8.5pt; line-height: 1.35; }
.ship-label .l-bar { text-align: center; margin-top: auto; }
.ship-label .l-bar svg { width: 100%; height: 22mm; }
.ship-label .l-code { font: 700 13pt var(--mono); letter-spacing: .12em; }

/* ------------------------------------------------------------------ Responsiv */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side {
    position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; width: 270px;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .shell.nav-open .side { transform: none; box-shadow: var(--shadow-lg); }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 50; background: rgba(16, 13, 40, .45); }
  .topbar { display: flex; }
  .content { padding: 18px 16px 50px; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-box .logo-m { display: block; }
  .form .cols, .form .cols3 { grid-template-columns: minmax(0, 1fr); }
  .hide-m { display: none !important; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi .value { font-size: 22px; }
  .form .cols-zip { grid-template-columns: 90px minmax(0, 1fr); }
  .form .cols-zip > :last-child { grid-column: 1 / -1; }
  .kv { grid-template-columns: 110px 1fr; }
  .modal-bg { padding: 0; align-items: stretch; }
  .modal { border-radius: 0; min-height: 100%; }
  .modal-foot { border-radius: 0; position: sticky; bottom: 0; }
  .steps-l span:nth-child(even) { visibility: hidden; }
}
