/* Winterdienst Algermissen – „Liquid Glass“-Oberfläche
   Mehrschichtige, lichtbrechende Glasflächen über einer ruhigen Winterszene.
   Hell/Dunkel automatisch; manuell über data-theme am <html>. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --tap: 52px;
  --gutter: clamp(16px, 3.2vw, 32px);
  --ease: cubic-bezier(.2, .8, .2, 1);

  --bg-1: #e9f2fb;
  --bg-2: #cfe1f4;
  --bg-3: #e3e4f6;
  --orb-a: #9fd3ff;
  --orb-b: #c8b9ff;
  --orb-c: #9ff0e4;

  --glass: rgba(255, 255, 255, .42);
  --glass-strong: rgba(255, 255, 255, .64);
  --glass-tint: rgba(255, 255, 255, .22);
  --glass-stroke: rgba(255, 255, 255, .72);
  --glass-edge: rgba(255, 255, 255, .95);
  --glass-shade: rgba(28, 52, 90, .16);
  --glass-shadow: 0 1px 1px rgba(20, 40, 80, .06), 0 12px 40px -8px rgba(20, 40, 80, .22);
  --hairline: rgba(30, 50, 80, .10);

  --text: #0d1b2e;
  --text-2: #3b4b62;
  --muted: #6a7a91;
  --accent: #0a7aff;
  --accent-2: #4cc3ff;
  --accent-ink: #ffffff;
  --ok: #1fa956;
  --ok-bg: rgba(48, 209, 88, .16);
  --warn: #c76a00;
  --warn-bg: rgba(255, 159, 10, .18);
  --bad: #d92d20;
  --bad-bg: rgba(255, 69, 58, .14);
  --info-bg: rgba(10, 122, 255, .12);
  --focus: 0 0 0 3px rgba(10, 122, 255, .35);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-1: #07101e;
    --bg-2: #0d1b31;
    --bg-3: #121735;
    --orb-a: #1f5fae;
    --orb-b: #4b2f8f;
    --orb-c: #0f6d6a;
    --glass: rgba(28, 40, 64, .46);
    --glass-strong: rgba(36, 50, 78, .70);
    --glass-tint: rgba(255, 255, 255, .05);
    --glass-stroke: rgba(255, 255, 255, .14);
    --glass-edge: rgba(255, 255, 255, .28);
    --glass-shade: rgba(0, 0, 0, .35);
    --glass-shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 18px 50px -10px rgba(0, 0, 0, .6);
    --hairline: rgba(255, 255, 255, .08);
    --text: #eef4ff;
    --text-2: #c2cee2;
    --muted: #8a9ab3;
    --accent: #3d9bff;
    --accent-2: #6fd5ff;
    --ok: #3ddc84;
    --warn: #ffb340;
    --bad: #ff6b60;
    --info-bg: rgba(61, 155, 255, .18);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg-1: #07101e; --bg-2: #0d1b31; --bg-3: #121735;
  --orb-a: #1f5fae; --orb-b: #4b2f8f; --orb-c: #0f6d6a;
  --glass: rgba(28, 40, 64, .46); --glass-strong: rgba(36, 50, 78, .70); --glass-tint: rgba(255, 255, 255, .05);
  --glass-stroke: rgba(255, 255, 255, .14); --glass-edge: rgba(255, 255, 255, .28); --glass-shade: rgba(0, 0, 0, .35);
  --glass-shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 18px 50px -10px rgba(0, 0, 0, .6);
  --hairline: rgba(255, 255, 255, .08);
  --text: #eef4ff; --text-2: #c2cee2; --muted: #8a9ab3;
  --accent: #3d9bff; --accent-2: #6fd5ff; --ok: #3ddc84; --warn: #ffb340; --bad: #ff6b60;
  --info-bg: rgba(61, 155, 255, .18);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg-1);
  background-image:
    radial-gradient(1200px 700px at 10% -10%, var(--bg-2), transparent 60%),
    radial-gradient(900px 700px at 110% 20%, var(--bg-3), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
h1 { font-size: clamp(28px, 4.4vw, 38px); font-weight: 700; }
h2 { font-size: 21px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.noscript { padding: 24px; text-align: center; }

/* --- Szene ------------------------------------------------------------------ */
.scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .7; animation: drift 28s var(--ease) infinite alternate; }
.orb-a { width: 46vmax; height: 46vmax; left: -12vmax; top: -10vmax; background: var(--orb-a); }
.orb-b { width: 38vmax; height: 38vmax; right: -10vmax; top: 18vh; background: var(--orb-b); animation-duration: 34s; }
.orb-c { width: 34vmax; height: 34vmax; left: 20vw; bottom: -16vmax; background: var(--orb-c); animation-duration: 40s; }
@keyframes drift { to { transform: translate3d(6vmax, 4vmax, 0) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } * { transition: none !important; } }

/* --- Glas ------------------------------------------------------------------- */
.glass {
  position: relative;
  background: linear-gradient(145deg, var(--glass-strong), var(--glass) 45%, var(--glass-tint));
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid var(--glass-stroke);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge), inset 0 -1px 0 var(--glass-shade);
  isolation: isolate;
}
/* Glanzkante oben links – der „Liquid“-Lichtreflex */
.glass::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 60% at 0% 0%, rgba(255, 255, 255, .55), transparent 55%);
  opacity: .55;
  pointer-events: none;
  z-index: -1;
  mix-blend-mode: soft-light;
}
.glass-sub {
  background: var(--glass-tint);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
}

/* --- Layout ------------------------------------------------------------------ */
.app { max-width: 1180px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 12px) var(--gutter) calc(env(safe-area-inset-bottom) + 120px); }
.boot { margin: 30vh auto 0; max-width: 360px; padding: 22px; text-align: center; color: var(--muted); }
.topbar { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 16px; margin-bottom: 22px; border-radius: 999px; position: sticky; top: calc(env(safe-area-inset-top) + 10px); z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; color: var(--text); min-width: 0; }
.brand img { width: 30px; height: 30px; border-radius: 9px; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.userchip { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border-radius: 999px; text-decoration: none; color: var(--text); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--accent)); box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.userchip .who { display: none; line-height: 1.15; }
.userchip .who small { color: var(--muted); display: block; font-size: 12px; }
@media (min-width: 720px) { .userchip .who { display: block; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 4px 18px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.grid > *, .fields > *, .stack > * { min-width: 0; }
input, select, textarea { min-width: 0; max-width: 100%; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.card { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.tight { gap: 6px; }
p > svg[class=""] { width: 18px; height: 18px; vertical-align: -3px; color: var(--accent); }
.sep { height: 1px; background: var(--hairline); margin: 6px 0; border: 0; }

/* --- Tab-Leiste (schwebend) -------------------------------------------------- */
.tabbar {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 14px); transform: translateX(-50%);
  display: flex; gap: 4px; padding: 6px; border-radius: 999px; z-index: 30;
  max-width: calc(100vw - 24px);
}
.tab {
  display: grid; justify-items: center; gap: 2px; min-width: 66px; padding: 8px 12px 6px; border-radius: 999px;
  color: var(--text-2); text-decoration: none; font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  transition: background .25s var(--ease), color .25s var(--ease), transform .2s var(--ease);
}
.tab svg { width: 24px; height: 24px; }
.tab:active { transform: scale(.94); }
.tab.on { color: var(--accent); background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.35)); box-shadow: inset 0 1px 0 #fff, 0 2px 10px rgba(10, 80, 180, .15); }
:root[data-theme="dark"] .tab.on { background: rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tab.on { background: rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); } }
@media (max-width: 480px) {
  .tabbar { left: 10px; right: 10px; transform: none; max-width: none; }
  .tab { flex: 1 1 0; min-width: 0; padding: 8px 2px 6px; font-size: 10px; }
  .tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* --- Buttons ---------------------------------------------------------------- */
.btn {
  --b: var(--glass-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--glass-stroke); background: linear-gradient(180deg, var(--glass-strong), var(--glass));
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--glass-edge), 0 2px 8px rgba(20,40,80,.10);
  font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), filter .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: scale(.97); }
.btn:focus-visible, .chip:focus-visible, .tab:focus-visible, .st-row:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; box-shadow: var(--focus); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.primary { color: var(--accent-ink); border-color: rgba(255,255,255,.35); background: linear-gradient(180deg, var(--accent-2) -40%, var(--accent) 70%); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 6px 18px -4px rgba(10, 100, 230, .55); }
.btn.ok { color: #fff; border-color: rgba(255,255,255,.35); background: linear-gradient(180deg, #4ee08a -40%, #1fa956 75%); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 6px 18px -4px rgba(20, 160, 80, .5); }
.btn.danger { color: var(--bad); }
.btn.big { min-height: var(--tap); padding: 0 24px; font-size: 17px; }
.btn.icon { padding: 0; width: 44px; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

.hero-cta {
  display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: var(--radius-xl);
  text-decoration: none; color: #fff; overflow: hidden; position: relative;
  background: linear-gradient(135deg, #5ac8fa, #0a6cf0 55%, #3a3fd8);
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 18px 40px -12px rgba(10, 90, 220, .55);
  transition: transform .2s var(--ease);
}
.hero-cta:active { transform: scale(.985); }
.hero-cta::after { content: ""; position: absolute; inset: -40% -10% auto auto; width: 70%; height: 140%; background: radial-gradient(closest-side, rgba(255,255,255,.35), transparent); transform: rotate(18deg); }
.hero-cta .ic { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid rgba(255,255,255,.65); flex: none; }
.hero-cta .ic svg { width: 32px; height: 32px; stroke-width: 1.7; }
.hero-cta strong { display: block; font-size: 20px; letter-spacing: -.01em; }
.hero-cta span { opacity: .9; }

/* --- Formulare ----------------------------------------------------------------- */
label.f { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=time], input[type=datetime-local], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--hairline); background: var(--glass-strong); color: var(--text);
  box-shadow: inset 0 1px 2px rgba(20,40,80,.06); font-size: 16px; -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 34px; }
textarea { min-height: 96px; resize: vertical; }
.time-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper output { min-width: 82px; text-align: center; font-weight: 700; font-size: 18px; }
svg[class=""] { width: 20px; height: 20px; flex: none; }
.calc { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--info-bg); }
.calc svg { width: 24px; height: 24px; color: var(--accent); }
.calc strong { font-size: 26px; letter-spacing: -.02em; }
.err { color: var(--bad); font-size: 14px; min-height: 1em; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--hairline); background: var(--glass-tint); font-weight: 600; color: var(--text-2);
  transition: background .2s var(--ease), color .2s, transform .15s var(--ease), box-shadow .2s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.chip svg { width: 20px; height: 20px; }
.chip:active { transform: scale(.96); }
.chip.on { color: var(--accent-ink); border-color: rgba(255,255,255,.4); background: linear-gradient(180deg, var(--accent-2) -50%, var(--accent)); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 4px 14px -4px rgba(10,100,230,.5); }
.chip.big { min-height: 64px; padding: 0 20px; font-size: 16px; border-radius: 20px; }
.chip .count { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: rgba(0,0,0,.08); }
.chip.on .count { background: rgba(255,255,255,.25); }

/* Stationen */
.st-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.st-tools input { flex: 1 1 200px; }
.st-list { display: grid; gap: 8px; }
.st-row {
  display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 16px; border-radius: var(--radius-md); cursor: pointer;
  background: var(--glass-tint); border: 1px solid var(--hairline); text-align: left; width: 100%;
  transition: background .2s var(--ease), border-color .2s, transform .12s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.st-row:active { transform: scale(.99); }
.st-row .tick { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center; transition: all .2s var(--ease); }
.st-row .tick svg { width: 18px; height: 18px; opacity: 0; transform: scale(.4); transition: all .2s var(--ease); color: #fff; }
.st-row.on { background: var(--ok-bg); border-color: rgba(48, 209, 88, .45); }
.st-row.on .tick { border-color: transparent; background: linear-gradient(180deg, #4ee08a, #1fa956); box-shadow: 0 3px 10px -2px rgba(20,160,80,.6); }
.st-row.on .tick svg { opacity: 1; transform: scale(1); }
.st-row .name { flex: 1; font-weight: 550; }
.st-row .meta { font-size: 12px; color: var(--muted); }
.st-row[disabled] { cursor: default; }

/* Fortschritt */
.progress { height: 8px; border-radius: 999px; background: var(--hairline); overflow: hidden; }
.progress > i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .5s var(--ease); }
.progress.ok > i { background: linear-gradient(90deg, #6ee7a0, var(--ok)); }
.ring { width: 64px; height: 64px; flex: none; }
.ring circle { fill: none; stroke-width: 7; }
.ring .bg { stroke: var(--hairline); }
.ring .fg { stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .6s var(--ease); }
.ring.ok .fg { stroke: var(--ok); }
.ring text { font-size: 15px; font-weight: 700; fill: var(--text); text-anchor: middle; dominant-baseline: central; }

/* Listen */
.list { display: grid; gap: 10px; }
.item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius-lg);
  text-decoration: none; color: var(--text); transition: transform .15s var(--ease);
}
.item:active { transform: scale(.99); }
.item .when { text-align: center; min-width: 58px; }
.item .when b { display: block; font-size: 20px; letter-spacing: -.02em; }
.item .when small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.item .what b { display: block; }
.item .what span { color: var(--text-2); font-size: 14px; }
.item .side { text-align: right; display: grid; gap: 6px; justify-items: end; }
.item .hours { font-weight: 700; font-size: 18px; }
@media (max-width: 520px) { .item { grid-template-columns: auto 1fr; } .item .side { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; } }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; background: var(--info-bg); color: var(--accent); white-space: nowrap; }
.pill.entwurf { background: var(--warn-bg); color: var(--warn); }
.pill.abgeschlossen { background: var(--info-bg); color: var(--accent); }
.pill.freigegeben { background: var(--ok-bg); color: var(--ok); }
.pill.storniert, .pill.fehler { background: var(--bad-bg); color: var(--bad); }
.pill.neutral { background: var(--hairline); color: var(--text-2); }
.pill svg { width: 14px; height: 14px; }

.empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 42px; height: 42px; opacity: .6; margin-bottom: 8px; }

/* Kennzahlen */
.kpi { padding: 18px 20px; }
.kpi small { color: var(--muted); font-weight: 600; display: block; }
.kpi b { font-size: 30px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--text-2); margin-left: 4px; }

/* Tabellen */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; padding: 8px 10px; }
.t td { padding: 12px 10px; border-top: 1px solid var(--hairline); vertical-align: middle; }
.t td.n, .t th.n { text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); width: var(--w, 0%); min-width: 4px; }

/* Segment-Umschalter */
.seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; padding: 4px; gap: 4px; border-radius: 999px; background: var(--glass-tint); border: 1px solid var(--hairline); }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font-weight: 600; color: var(--text-2); cursor: pointer; min-height: 36px; }
.seg button.on { background: var(--glass-strong); color: var(--text); box-shadow: inset 0 1px 0 var(--glass-edge), 0 2px 8px rgba(20,40,80,.12); }

/* Aktionsleiste unten im Formular */
.actionbar { position: sticky; bottom: calc(env(safe-area-inset-bottom) + 92px); z-index: 25; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 10px; border-radius: 999px; margin-top: 18px; }
.actionbar .info { margin-right: auto; padding-left: 10px; display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; }
@media (max-width: 640px) {
  .actionbar { border-radius: var(--radius-lg); }
  .actionbar .info { width: 100%; padding: 2px 6px; }
  .actionbar.many { position: static; justify-content: stretch; }
  .actionbar.many .btn { flex: 1 1 40%; }
}

/* Login */
.login { max-width: 420px; margin: 9vh auto 0; padding: 34px 28px 28px; }
.login .logo { width: 72px; height: 72px; border-radius: 20px; display: block; margin: 0 auto 16px; box-shadow: 0 12px 30px -8px rgba(10,100,230,.5); }
.login h1 { text-align: center; font-size: 28px; }
.login p.sub { text-align: center; color: var(--text-2); margin: 6px 0 22px; }

/* Toasts & Modal */
.toasts { position: fixed; top: calc(env(safe-area-inset-top) + 14px); left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; width: min(92vw, 460px); }
.toast { padding: 14px 18px; border-radius: 18px; font-weight: 600; animation: pop .35s var(--ease); }
.toast.bad { color: var(--bad); }
.toast.ok { color: var(--ok); }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.modal-bg { position: fixed; inset: 0; z-index: 90; background: rgba(10, 20, 40, .28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal { width: min(100%, 560px); max-height: 86dvh; overflow: auto; padding: 24px; animation: pop .3s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 13.5px; word-break: break-all; padding: 12px 14px; border-radius: 12px; background: var(--glass-tint); border: 1px solid var(--hairline); user-select: all; }

.timeline { display: grid; gap: 10px; }
.timeline .ev { padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--glass-tint); border-radius: 0 12px 12px 0; font-size: 14px; }
.timeline .ev b { display: block; }
.offline-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-size: 12.5px; font-weight: 700; }
.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.section-title .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: var(--accent); background: var(--info-bg); }
.hidden { display: none !important; }
/* Stoppuhr */
.timer-panel { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 16px; }
.timer-panel .muted { flex: 1 1 220px; }
.timer-read { display: flex; align-items: center; gap: 12px; }
.timer-read b { display: block; font-size: 18px; }
.timer-read .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(48,209,88,.6); animation: pulse 1.8s infinite; flex: none; }
.timer-panel.paused .dot { background: var(--warn); animation: none; }
.timer-panel.running { border-color: rgba(48,209,88,.45); background: var(--ok-bg); }
.timer-panel.paused { border-color: rgba(255,159,10,.45); background: var(--warn-bg); }
.run-card .timer-panel { margin-bottom: 0; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(48,209,88,0); } 100% { box-shadow: 0 0 0 0 rgba(48,209,88,0); } }
@media (prefers-reduced-motion: reduce) { .timer-read .dot { animation: none; } }

/* Zwei-Faktor */
.login.wide { max-width: 560px; }
/* Piktogramm in Glasring (Strichgrafik in Akzentfarbe – keine farbige Kachel) */
.login-icon { width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; color: var(--accent);
  background: var(--glass-tint); border: 1.5px solid var(--glass-stroke); box-shadow: inset 0 1px 0 var(--glass-edge), 0 10px 26px -12px rgba(20,40,80,.35); }
.login-icon.ok { color: var(--ok); }
.login-icon svg { width: 40px; height: 40px; stroke-width: 1.6; }
.brand-mark { display: grid; place-items: center; color: var(--accent); }
.brand-mark svg { width: 26px; height: 26px; stroke-width: 1.8; }
.inl svg { width: 14px; height: 14px; vertical-align: -2px; color: var(--muted); }
input.otp { font-size: 26px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.steps { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 16px; }
.steps li { padding-left: 4px; }
.steps li > b { display: block; margin-bottom: 4px; }
.steps li > span { display: block; margin-bottom: 8px; }
.qr-wrap { margin: 10px 0; padding: 10px; width: fit-content; border-radius: 18px; background: #fff; box-shadow: 0 6px 20px -8px rgba(20,40,80,.35); }
.qr-wrap svg { display: block; width: 200px; height: 200px; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.codes code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 16px; letter-spacing: .06em; text-align: center; padding: 10px; border-radius: 12px; background: var(--glass-tint); border: 1px solid var(--hairline); user-select: all; }
label.check { gap: 10px; font-weight: 600; color: var(--text-2); margin: 6px 0 12px; }
label.check input { width: 22px; height: 22px; accent-color: var(--accent); }
@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; inset: 0; background: #fff; color: #000; box-shadow: none; }
  .print-area button, .print-area .row, .print-area label.check { display: none !important; }
}
.open-st { display: flex; align-items: flex-start; gap: 8px; }
.open-st svg { width: 16px; height: 16px; margin-top: 2px; color: var(--muted); }
.open-st.done svg { color: var(--ok); }
.btn.icon svg { width: 20px; height: 20px; }

/* Schicht: Stopps */
.stops { display: grid; gap: 10px; }
.stop { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 18px; }
.stop-main { display: flex; align-items: flex-start; gap: 12px; min-width: 0; flex: 1 1 260px; }
.stop-name { display: grid; gap: 2px; min-width: 0; }
.stop-name b { font-size: 16px; overflow-wrap: anywhere; }
.stop-ctrl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.stop-ctrl .chips { flex-wrap: nowrap; }
.stop-ctrl .chip { min-height: 44px; }
.stop.aktiv { border-color: rgba(255,159,10,.55); background: var(--warn-bg); }
.stop.erledigt { border-color: rgba(48,209,88,.4); background: var(--ok-bg); }
.stop .pill { flex: none; text-transform: capitalize; }
.hint-line { display: flex; align-items: center; gap: 6px; margin: 0; }
.hint-line svg { width: 16px; height: 16px; flex: none; color: var(--warn); }
.hero-cta.run { background: linear-gradient(135deg, #1fa956, #0b7a3e); }
.open-list { display: grid; gap: 10px; max-height: 40vh; overflow: auto; margin: 8px 0 14px; }
.seg.tri { flex-wrap: nowrap; padding: 3px; gap: 2px; }
.seg.tri button { padding: 6px 10px; min-height: 34px; min-width: 40px; }
.tour-edit input[type=text] { width: 100%; min-width: 160px; }
.pill-link { cursor: pointer; text-decoration: none; }
.pill-link:hover, .pill-link:focus-visible { text-decoration: underline; filter: brightness(1.05); }
.ticket-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.mat-row { flex-wrap: nowrap; }
.mat-row .check { min-width: 110px; }
.mat-row input[type=number] { width: 7.5rem; }
svg.up { transform: rotate(90deg); }
svg.down { transform: rotate(-90deg); }
@media (max-width: 560px) {
  .stop-ctrl { width: 100%; justify-content: space-between; }
}
.modal:has(#tz) { width: min(100%, 680px); }
#tz .t input[type=time] { min-width: 0; width: 120px; }

/* Benutzer: Auswahl und Sammelaktionen */
.bulkbar { position: sticky; top: 84px; z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; border-radius: 18px; }
.bulkbar[hidden] { display: none; }
.bulkbar select { width: auto; min-width: 0; }
.t th.sel, .t td.sel { width: 36px; text-align: center; }
.t .sel input { width: 20px; height: 20px; }

/* OAuth-Zustimmung */
.consent { list-style: none; padding: 0; margin: 8px 0 14px; display: grid; gap: 8px; text-align: left; }
.consent li { display: flex; gap: 10px; align-items: flex-start; }
.consent svg { width: 20px; height: 20px; flex: none; color: var(--ok); margin-top: 2px; }
