/* Arbeitszeiterfassung – Gestaltung im Stil der FairAssist-App:
   Anthrazit-Flächen, Apple-Systemschrift bzw. Inter, Blau als Akzent,
   Grün/Orange/Rot als Status (läuft / Pause / Fehler). Nur dunkles Design. */

:root {
  --bg: #1c1c1e;
  --bg-2: #161718;
  --surface: #2c2c2e;
  --raised: #3a3a3c;
  --raised-2: #48484a;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --faint: #6e6e73;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --fill: rgba(118, 118, 128, 0.18);
  --fill-strong: rgba(118, 118, 128, 0.26);
  --glass: rgba(44, 44, 46, 0.72);
  --glass-strong: rgba(36, 36, 38, 0.88);
  --accent: #0a84ff;
  --accent-hover: #409cff;
  --accent-soft: rgba(10, 132, 255, 0.16);
  --go: #30d158;
  --go-ink: #052e12;
  --hold: #ff9f0a;
  --hold-ink: #2b1a00;
  --pause: #00E5FF;
  --pause-ink: #00262b;
  --live: #39FF14;
  --stop: #ff453a;
  --focus: #0a84ff;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Inter", system-ui, sans-serif;
  --cond: var(--font);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
::selection { background: rgba(10, 132, 255, 0.45); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: 30px; letter-spacing: -0.03em; }
h2 { font-size: 18px; letter-spacing: -0.02em; }
h3 { font-size: 15px; font-weight: 650; letter-spacing: -0.015em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--go); }
.neg { color: #ff6961; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh;
  background: linear-gradient(to right, var(--bg-2) 247px, var(--line) 247px 248px, var(--bg) 248px); }
.rail {
  background: var(--bg-2);
  padding: 18px 12px 12px;
  align-self: start;
  display: flex; flex-direction: column; gap: 1px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: block; padding: 2px 6px 22px 4px; border-radius: var(--radius); }
.brand .crewlogo { display: block; width: 100%; max-width: 216px; height: auto; }
.crewlogo path, .crewlogo rect { transition: stroke .35s, fill .35s; }
.brand-icon { width: 40px; height: 40px; flex: none; display: block; }
.brand b { font-size: 15px; font-weight: 650; display: block; line-height: 1.2; letter-spacing: -0.02em; hyphens: auto; overflow-wrap: anywhere; }
.brand span { display: inline-block; margin-top: 3px; font-size: 11px; font-weight: 600; color: var(--faint); background: rgba(255, 255, 255, 0.08); padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
.nav-label { font-size: 11px; font-weight: 600; color: var(--faint); padding: 14px 12px 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; border-radius: var(--radius); margin-bottom: 1px;
  text-decoration: none; color: var(--ink); font-weight: 500;
}
.nav a:hover { background: rgba(255, 255, 255, 0.05); }
.nav a.on { background: rgba(255, 255, 255, 0.09); }
.nav svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.nav a.on svg { color: var(--accent); }
.nav .badge { margin-left: auto; }
.rail .me { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.rail .me a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; }
.rail .me a:hover { background: rgba(255, 255, 255, 0.05); }
.rail .me b { font-weight: 550; font-size: 13px; }
.rail .me .muted { font-size: 11.5px; color: var(--faint); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(160deg, #636366, #48484a); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
main { padding: 34px clamp(16px, 4vw, 40px) 60px; max-width: 1280px; width: 100%; min-width: 0; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.head p { margin: 4px 0 0; color: var(--muted); }
.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.tabbar { display: none; }
.mtop { display: none; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; background: var(--bg); }
  .rail { display: none; }
  .mtop {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 25;
    padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
    background: var(--glass-strong);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
  }
  .mtop .crewlogo { display: block; height: 42px; width: auto; }
  .mtop .avatar { text-decoration: none; color: var(--ink); width: 34px; height: 34px; }
  main { padding: 18px 16px 100px; }
  h1 { font-size: 26px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--glass-strong);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--line-strong);
    padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  }
  .tabbar a, .tabbar button {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 0 7px; font-size: 10.5px; font-weight: 550; text-decoration: none; color: var(--faint);
    background: none; border: 0; cursor: pointer;
  }
  .tabbar a.on { color: var(--accent); }
  .tabbar svg { width: 24px; height: 24px; }
}

/* ---------- Bausteine ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}
.panel + .panel { margin-top: 16px; }
.panel > h2, .panel > h3 { margin-bottom: 14px; }
.panel > h2 { font-size: 17px; font-weight: 650; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; align-items: stretch; }
.grid2 > .panel + .panel { margin-top: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 34px; padding: 0 14px;
  border-radius: var(--radius); border: 0;
  background: var(--raised); color: var(--ink);
  font-weight: 550; font-size: 13px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, transform .05s, opacity .15s;
}
.btn:hover { background: var(--raised-2); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.go { background: var(--go); color: var(--go-ink); }
.btn.go:hover { background: #4ade80; }
.btn.hold { background: var(--pause); color: var(--pause-ink); }
.btn.hold:hover { background: #5ff0ff; }
.btn.danger { background: rgba(255, 69, 58, 0.16); color: #ff6961; }
.btn.danger:hover { background: rgba(255, 69, 58, 0.26); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.btn.ghost.danger { color: #ff6961; }
.btn.small { min-height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn svg { width: 16px; height: 16px; display: block; flex: none; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; background: none; border: 0; padding: 0; border-radius: var(--radius); cursor: pointer; color: var(--muted); }
.icon-btn:hover { color: var(--ink); background: rgba(255, 255, 255, 0.07); }
.icon-btn svg { width: 18px; height: 18px; display: block; }
@media (max-width: 860px) {
  .btn { min-height: 40px; font-size: 14px; }
  .btn.small { min-height: 34px; font-size: 13px; }
  .icon-btn { width: 40px; height: 40px; }
}

label.f { display: flex; flex-direction: column; gap: 6px; }
label.f > span, .f > span { font-size: 12px; font-weight: 550; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
input[type=datetime-local], input[type=time], input[type=month], select, textarea {
  width: 100%; min-height: 36px; padding: 0 11px;
  border: 1px solid transparent; border-radius: var(--radius);
  background: var(--fill); outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
textarea { min-height: 72px; padding: 9px 11px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25); background: var(--fill-strong); }
input::placeholder, textarea::placeholder { color: var(--faint); }
select option, select optgroup { background: var(--surface); color: var(--ink); }
@media (max-width: 860px) { input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input[type=month], select { min-height: 42px; font-size: 16px; } }
.form { display: grid; gap: 14px; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 13.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* Auswahl-Chips (Wochentage, Farben, Team, Status, Pausendauer) */
.days-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.days-pick label { position: relative; }
.days-pick input { position: absolute; opacity: 0; pointer-events: none; }
.days-pick span { display: inline-block; min-width: 40px; text-align: center; padding: 6px 0; border-radius: 14px; cursor: pointer; background: rgba(118, 118, 128, 0.2); color: var(--muted); font-size: 12.5px; font-weight: 550; transition: background .15s, color .15s; }
.days-pick span:hover { color: var(--ink); }
.days-pick input:checked + span { background: var(--ink); color: #1c1c1e; }
.days-pick input:disabled + span { opacity: .35; cursor: default; }
.days-pick input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.days-pick input[name=color] + span { border-radius: 10px; }
.days-pick input[name=color]:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }

.badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 8px;
  border-radius: 11px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: rgba(255, 255, 255, 0.08); color: var(--muted);
}
.badge.warn { background: rgba(255, 159, 10, 0.18); color: #ffb340; }
.nav .badge.warn { background: var(--hold); color: var(--hold-ink); }
.badge.go { background: rgba(48, 209, 88, 0.14); color: #4ade80; }
.badge.stop { background: rgba(255, 69, 58, 0.16); color: #ff8a80; }

/* Job- und Abwesenheits-Plakette (Farbpunkt + Name) */
.tape {
  --c: #8e8e93;
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%; height: 24px;
  padding: 0 10px 0 8px; border-radius: 7px;
  background: rgba(255, 255, 255, 0.07); color: var(--ink);
  font-size: 12.5px; font-weight: 600; line-height: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
}
.tape::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.tape small { font-weight: 500; font-size: 12px; color: var(--muted); }
.tape.big { height: 36px; padding: 0 14px 0 12px; border-radius: 10px; font-size: 15px; font-weight: 650; background: rgba(255, 255, 255, 0.10); }
.tape.big::before { width: 13px; height: 13px; }
.tape.big small { font-size: 13px; }
.tape.abs-urlaub { --c: #0a84ff; background: rgba(10, 132, 255, 0.16); color: #9ccaff; }
.tape.abs-abfeiern { --c: #bf5af2; background: rgba(191, 90, 242, 0.16); color: #dcaaf7; }
.tape.abs-krank { --c: #ff453a; background: rgba(255, 69, 58, 0.16); color: #ff9f99; }
.tape.abs-sonstiges { --c: #8e8e93; }

table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--faint); padding: 10px 14px; border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
table.list td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list td.r, table.list th.r { text-align: right; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: rgba(255, 255, 255, 0.03); }
.panel > .scroll-x, .panel > table.list { margin-inline: -8px; }
.scroll-x { overflow-x: auto; }

.empty { padding: 48px 20px; text-align: center; color: var(--muted); }

/* ---------- Stempeluhr ---------- */
.clock { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .clock { grid-template-columns: minmax(0, 1fr); } }
.clock > * { min-width: 0; }
.stage {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px clamp(16px, 3vw, 28px) 26px; position: relative; overflow: hidden;
}
.cue { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 13px; color: var(--muted);
  background: rgba(255, 255, 255, 0.05); padding: 6px 12px 6px 10px; border-radius: 16px; }
.cue i { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }
.cue.arbeit { color: #6ee7a0; background: rgba(48, 209, 88, 0.12); }
.cue.arbeit i { background: var(--go); box-shadow: 0 0 10px var(--go); }
.cue.pause { color: #8ff4ff; background: rgba(0, 229, 255, 0.12); }
.cue.pause i { background: var(--pause); box-shadow: 0 0 10px var(--pause); }
@media (prefers-reduced-motion: no-preference) {
  .cue.pause i { animation: blink 1.6s ease-in-out infinite; }
}
@keyframes blink { 50% { opacity: .35; } }
.bigtime {
  font-weight: 700;
  font-size: clamp(64px, 12vw, 112px); line-height: 1; letter-spacing: -0.045em;
  margin: 18px 0 4px; font-variant-numeric: tabular-nums;
}
.bigtime .sec { font-size: .36em; font-weight: 600; color: var(--faint); margin-left: 8px; letter-spacing: -0.02em; }
.stage .meta { display: flex; gap: 0; flex-wrap: wrap; margin: 16px 0 20px; background: rgba(255, 255, 255, 0.04); border-radius: var(--radius-md); overflow: hidden; }
.stage .meta > div { flex: 1; padding: 10px 14px; font-size: 12px; color: var(--muted); }
.stage .meta > div + div { border-left: 1px solid var(--line); }
.stage .meta b { color: var(--ink); font-size: 17px; display: block; font-weight: 650; margin-top: 2px; }
.stage .current { margin: 10px 0 4px; }
.stamp-actions { display: grid; gap: 10px; }
.stamp-actions .btn { min-height: 48px; font-size: 15px; border-radius: 12px; }
.stamp-actions .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn.stamp { min-height: 64px; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; border-radius: 14px; }
.jobpick { display: grid; gap: 12px; margin-bottom: 14px; }
.jobpick .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .jobpick .row { grid-template-columns: 1fr; } }

.timeline { display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.tl-item:last-child { border-bottom: 0; }
.tl-item .t { font-size: 14px; font-weight: 650; }
.tl-item .d { text-align: right; font-weight: 650; }
.tl-item .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ---------- Zeitkonto ---------- */
.ledger { width: 100%; border-collapse: separate; border-spacing: 0; background: rgba(255, 255, 255, 0.04); border-radius: var(--radius-md); overflow: hidden; }
.ledger td { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ledger td:first-child { color: var(--muted); }
.ledger td:last-child { text-align: right; font-weight: 650; font-size: 15px; white-space: nowrap; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger tr.sum td { background: rgba(255, 255, 255, 0.04); padding-block: 13px; }
.ledger tr.sum td:first-child { color: var(--ink); font-weight: 600; }
.ledger tr.sum td:last-child { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; }
.panel > .ledger + h3 { margin-top: 22px !important; }

.weekbars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 180px; margin: 4px 0 6px; }
.wb { display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; height: 100%; gap: 6px; text-align: center; }
.wb .bar { position: relative; flex: 1; display: flex; align-items: flex-end; }
.wb .fill { width: 100%; background: var(--accent); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.wb .fill.over { background: var(--go); }
.wb .soll { position: absolute; left: -3px; right: -3px; border-top: 1.5px dashed rgba(255, 255, 255, 0.35); z-index: 1; }
.wb .lbl { font-size: 11.5px; color: var(--faint); }
.wb .val { font-weight: 650; font-size: 12.5px; }
.wb.today .lbl { color: var(--accent); font-weight: 700; }

/* ---------- Kalender ---------- */
.cal { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--line); gap: 1px; }
.cal .hd { background: var(--surface); padding: 9px 8px; font-size: 11.5px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .03em; }
.cal .kw { background: var(--surface); padding: 8px 6px; font-size: 11px; color: var(--faint); display: flex; flex-direction: column; justify-content: space-between; }
.cal .kw b { font-size: 15px; color: var(--ink); font-weight: 650; }
.day {
  background: #242426; min-height: 112px; padding: 7px 8px; display: flex; flex-direction: column; gap: 4px;
  cursor: pointer; text-align: left; border: 0; border-radius: 0; position: relative; color: var(--ink);
  transition: background .12s;
}
.day:hover { background: #2c2c2e; }
.day.out { background: #1f1f21; }
.day.out > * { opacity: .4; }
.day.we { background: #202022; }
.day.hol { background: #2a2620; }
.day.today .dn > span:first-child { background: var(--accent); color: #fff; border-radius: 11px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0 6px; margin: -2px 0 0 -3px; }
.day.sel { box-shadow: inset 0 0 0 2px var(--accent); background: #2c2c2e; }
.day .dn { display: flex; justify-content: space-between; align-items: baseline; font-weight: 650; font-size: 13px; }
.day .dn .warn { color: var(--hold); font-size: 12px; }
.day .hname { font-size: 11px; color: #ffb340; line-height: 1.15; }
.day .tape { height: 20px; font-size: 11.5px; padding: 0 7px 0 6px; border-radius: 6px; }
.day .tape::before { width: 7px; height: 7px; }
.day .h { margin-top: auto; text-align: right; font-weight: 650; font-size: 14px; }
.day .h small { font-size: 11px; font-weight: 600; }
@media (max-width: 700px) {
  .cal { grid-template-columns: 34px repeat(7, minmax(0, 1fr)); border-radius: var(--radius-md); }
  .cal .hd { padding: 7px 4px; font-size: 10.5px; }
  .cal .kw { padding: 6px 2px; font-size: 10px; }
  .cal .kw span { display: none; }
  .day { min-height: 70px; padding: 4px; }
  .day .tape, .day .hname { display: none; }
  .day .dots { display: flex !important; }
  .day .h { font-size: 12px; }
  .day .h small { display: block; font-size: 10px; }
}
.day .dots { display: none; gap: 3px; flex-wrap: wrap; }
.day .dots i { width: 7px; height: 7px; border-radius: 50%; display: block; }

.monthnav { display: flex; align-items: center; gap: 4px; }
.monthnav b { font-size: 17px; font-weight: 650; min-width: 140px; text-align: center; letter-spacing: -0.02em; }
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; margin: 0 0 16px; }
.totals > div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.totals span { font-size: 12px; color: var(--muted); font-weight: 600; display: block; }
.totals b { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; display: block; margin-top: 2px; }

.daypanel { margin-top: 16px; }
.warnlist { margin: 0 0 14px; padding: 10px 13px; border-radius: 10px; background: rgba(255, 159, 10, 0.1); color: #ffcc80; font-size: 13px; }
.warnlist b { color: #ffb340; }
.warnlist div + div { margin-top: 4px; }

/* ---------- Team ---------- */
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #6ee7a0; margin-bottom: 4px; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--go); box-shadow: 0 0 8px var(--go); }
.live.p { color: #8ff4ff; }
.live.p i { background: var(--pause); box-shadow: 0 0 8px var(--pause); }

/* ---------- Fenster & Meldungen ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; z-index: 50; overflow-y: auto; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; width: min(560px, 100%); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: pop .2s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pop { from { transform: scale(0.96); opacity: 0; } }
.modal header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 16px 6px 22px; }
.modal header h2 { font-size: 18px; }
.modal .body { padding: 12px 22px 8px; }
.modal footer { display: flex; justify-content: space-between; gap: 8px; padding: 14px 22px 20px; flex-wrap: wrap; }
.modal footer .right { display: flex; gap: 8px; margin-left: auto; }
.toast {
  position: fixed; left: 50%; top: max(18px, env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 100;
  background: var(--glass-strong); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-strong); color: var(--ink);
  padding: 10px 18px; border-radius: 22px; box-shadow: var(--shadow);
  font-weight: 550; font-size: 13px; max-width: calc(100% - 32px);
  animation: drop .25s cubic-bezier(.2, .9, .3, 1.2);
}
.toast.err { color: #ff8a80; }
@keyframes drop { from { transform: translate(-50%, -10px); opacity: 0; } }

.breaks-ed { display: grid; gap: 8px; }
.breaks-ed .br { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }

/* ---------- Anmeldung ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-items: center; padding: 24px max(16px, env(safe-area-inset-left, 0px));
  background: radial-gradient(1200px 600px at 50% -10%, #2c2c2e 0%, var(--bg) 60%); }
.auth-card { width: min(380px, 100%); text-align: center; }
.auth-card .logo { width: min(300px, 100%); height: auto; margin: 0 auto 26px; display: block; }
.auth-card .co { font-size: 13px; color: var(--muted); font-weight: 550; margin-bottom: 6px; }
.auth-card h1 { font-size: 28px; margin: 0 0 6px; }
.auth-card p { color: var(--muted); margin: 0 0 28px; }
.auth-card form { text-align: left; }
.auth-card input, .auth-card select { min-height: 40px; font-size: 15px; }
.auth-card .btn { width: 100%; min-height: 42px; font-size: 15px; border-radius: 10px; margin-top: 4px; }
.auth .err { color: #ff8a80; font-size: 13px; min-height: 18px; }

/* Mehr-Menü (mobil) */
.sheet { display: grid; gap: 2px; }
.sheet a { display: flex; gap: 12px; align-items: center; padding: 12px 10px; text-decoration: none; border-radius: 10px; font-weight: 500; }
.sheet a:hover { background: rgba(255, 255, 255, 0.06); }
.sheet svg { width: 20px; height: 20px; color: var(--muted); }

/* Zeitkonto-Kopf mit Wochen-Blättern */
.weekhead { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.weekhead h2 { font-size: 17px; font-weight: 650; }
.weekhead .monthnav { gap: 2px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Team-Tabelle: Namen und Zahlen nicht umbrechen, Tabelle scrollt bei Platzmangel */
.team-tbl td, .team-tbl th { white-space: nowrap; padding-inline: 10px; }
.team-tbl td:first-child { min-width: 150px; }
.team-tbl .who { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.team-tbl .who .icon-btn { opacity: .7; }
.team-tbl tr:hover .who .icon-btn { opacity: 1; }

/* Stempeluhr: großes Logo statt Überschrift – zeigt den Stempelstatus deutlich */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.clockhead { margin: 0 0 22px; }
.clockhead .crewlogo { display: block; width: min(440px, 100%); height: auto; }
.clockhead p { margin: 6px 0 0 4px; }
@media (max-width: 860px) {
  .clockhead { margin: 2px 0 18px; }
  .clockhead .crewlogo { width: 100%; max-width: 420px; }
  body[data-view="stempeln"] .mtop { display: none; }
  body[data-view="stempeln"] main { padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
}
.tl-item > * { min-width: 0; }
@media (max-width: 480px) { .tl-item { grid-template-columns: 74px minmax(0, 1fr) auto; gap: 8px; } }

/* Pausen bestätigen */
.pz { margin-bottom: 16px; border-color: rgba(0, 229, 255, 0.35); }
.pz h2 { font-size: 17px; font-weight: 650; }
.pz-list { display: grid; }
.pz-row { display: grid; grid-template-columns: minmax(140px, 1.1fr) auto minmax(90px, auto) auto; gap: 10px 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.pz-row:first-child { border-top: 0; }
.pz-day { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pz-auto { align-self: flex-start; margin-top: 3px; font-size: 11.5px; font-weight: 600; color: #8ff4ff; background: rgba(0, 229, 255, 0.12); padding: 2px 8px; border-radius: 6px; }
.pz-ctrl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pz-pick span { min-width: 54px; padding: 7px 0; }
.pz-min { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.pz-min input { width: 72px; min-height: 34px; text-align: right; }
.pz-sum { display: flex; flex-direction: column; align-items: flex-end; }
.pz-sum b { font-size: 16px; }
.pz-warn { color: #ffb340; min-height: 1em; }
.pz-note { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 13px; border-radius: 10px; background: rgba(0, 229, 255, 0.10); color: #b8f8ff; }
.dn-flags { display: inline-flex; align-items: center; gap: 5px; }
.pzdot { width: 8px; height: 8px; border-radius: 50%; background: var(--pause); box-shadow: 0 0 6px var(--pause); }
@media (max-width: 760px) {
  .pz-row { grid-template-columns: 1fr auto; }
  .pz-ctrl { grid-column: 1 / -1; order: 3; }
  .pz-row [data-ok] { grid-column: 1 / -1; order: 4; min-height: 40px; }
  .pz-sum { order: 2; }
}

/* Fenster auf dem Handy: Felder untereinander, nichts ragt über den Rand */
.modal input, .modal select, .modal textarea { min-width: 0; max-width: 100%; }
.form .row > * { min-width: 0; }
@media (max-width: 560px) {
  .modal-bg { padding: 12px 10px; align-items: flex-start; }
  .modal header { padding: 16px 12px 4px 18px; }
  .modal .body { padding: 10px 18px 6px; }
  .modal footer { padding: 12px 18px 18px; }
  .modal .form .row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .breaks-ed .br { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "von x" "bis x"; gap: 6px 8px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); }
  .breaks-ed .br [data-bs] { grid-area: von; }
  .breaks-ed .br [data-be] { grid-area: bis; }
  .breaks-ed .br [data-rm] { grid-area: x; align-self: center; }
  input[type=datetime-local] { font-size: 15px; }
}

/* Job-Auswahl beim Stempeln */
.jobfield { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 46px; padding: 6px 10px 6px 12px; border-radius: var(--radius); border: 1px solid transparent; background: var(--fill); color: var(--ink); text-align: left; cursor: pointer; }
.jobfield:hover { background: var(--fill-strong); }
.jf-val { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.jf-chev svg { width: 18px; height: 18px; color: var(--muted); display: block; }
.jf-new { font-size: 11px; font-weight: 700; color: #8ff4ff; background: rgba(0, 229, 255, 0.14); padding: 2px 7px; border-radius: 6px; }
.jp { display: grid; gap: 10px; }
.jp-list { display: grid; gap: 2px; max-height: min(55vh, 460px); overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.jp-h { font-size: 11.5px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .03em; padding: 10px 4px 4px; }
.jp-item { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; padding: 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.jp-item:hover, .jp-item:focus-visible { background: rgba(255, 255, 255, 0.06); }
.jp-item.on { background: rgba(10, 132, 255, 0.16); }
.jp-new { flex-direction: row; align-items: center; gap: 10px; background: rgba(48, 209, 88, 0.12); color: #6ee7a0; font-weight: 550; }
.jp-new svg { width: 18px; height: 18px; flex: none; }
.jp-new b { color: var(--ink); }

/* Überstunden-Anzeige neben dem Stempelstatus */
.cue-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ot-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); color: var(--muted); font-size: 12.5px; font-weight: 550; text-decoration: none; white-space: nowrap; }
.ot-pill b { font-weight: 700; color: var(--ink); }
.ot-pill.pos b { color: var(--go); }
.ot-pill.neg b { color: #ff6961; }
.ot-pill:hover { background: rgba(255, 255, 255, 0.09); }

.ot-s { display: none; }
.cue-row { flex-wrap: nowrap; }
.cue-row .cue { min-width: 0; overflow: hidden; }
.cue-row .cue span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) {
  .ot-l { display: none; }
  .ot-s { display: inline; }
  .cue-row .cue, .ot-pill { font-size: 12px; padding: 6px 10px; }
}
