:root {
  --blue-950: #081B3D;
  --blue-900: #0D2B5E;
  --blue-800: #123A7C;
  --blue-700: #1747A6;
  --blue-600: #1F5ADB;
  --blue-100: #DCE7FB;
  --blue-50: #EEF3FD;
  --orange: #F47A1F;
  --orange-600: #DE650B;
  --orange-100: #FFE3CC;
  --orange-50: #FFF4EA;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #64748B;
  --line: #E4E8EF;
  --bg: #F3F5F9;
  --card: #FFFFFF;
  --green: #15803D;
  --green-50: #E8F7EE;
  --red: #C62828;
  --red-50: #FDEDED;
  --r: 16px;
  --r-sm: 11px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 20px rgba(15, 23, 42, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #E4E9F1;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

#app {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px rgba(15, 23, 42, .10);
}
#app.wide { max-width: none; box-shadow: none; }

/* ---------- Kopfzeile ---------- */
.top {
  background: linear-gradient(160deg, var(--blue-900), var(--blue-800));
  color: #fff;
  padding: 12px 14px 14px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.top-row { display: flex; align-items: center; gap: 10px; min-height: 42px; }
.top-title { flex: 1; min-width: 0; }
.top-title .t { font-weight: 700; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-title .s { font-size: 12.5px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .10); color: #fff; }
.icon-btn:active { background: rgba(255, 255, 255, .2); }
.icon-btn.ghost { background: transparent; color: var(--ink); }
.brand-mini svg { width: 38px; height: 38px; display: block; }

.progress { display: flex; gap: 6px; margin-top: 12px; }
.progress span { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .18); }
.progress span.on { background: var(--orange); }
.progress-labels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; font-size: 10px; margin-top: 6px; text-align: center; }
.progress-labels span { opacity: .6; }
.progress-labels b { color: #fff; font-weight: 700; }

/* ---------- Avatare ---------- */
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: var(--blue-50); color: var(--blue-700);
}
.avatar.erfasser { background: var(--blue-100); color: var(--blue-800); }
.avatar.pruefer { background: var(--orange-100); color: var(--orange-600); }
.avatar.admin { background: #E2E8F0; color: var(--ink-2); }
.avatar.sm { width: 38px; height: 38px; font-size: 13px; background: rgba(255, 255, 255, .14); color: #fff; }
.avatar.lg { width: 76px; height: 76px; font-size: 24px; }

/* ---------- Layout ---------- */
.pad { padding: 16px; flex: 1; }
.pad.has-footer { padding-bottom: 110px; }
.muted { color: var(--muted); }
.center { text-align: center; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
.group-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin: 20px 4px 8px;
}
.group-label:first-child { margin-top: 4px; }
.group-label .icon { width: 14px; height: 14px; color: var(--orange); fill: var(--orange); stroke: var(--orange); }
.group-label .grow { flex: 1; }
.group-label .link { text-transform: none; letter-spacing: 0; font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 24px 0; }

.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.link { color: var(--blue-600); font-weight: 600; }
.link:disabled { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 20px; border-radius: 14px; font-weight: 700; font-size: 15.5px;
  transition: transform .08s ease, background .15s ease, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn.block { width: 100%; }
.btn.primary { background: var(--orange); color: #fff; box-shadow: 0 6px 16px rgba(244, 122, 31, .32); }
.btn.primary:active { background: var(--orange-600); }
.btn.blue { background: var(--blue-700); color: #fff; }
.btn.outline { background: #fff; color: var(--blue-700); box-shadow: inset 0 0 0 1.5px var(--blue-100); }
.btn.danger-outline { background: #fff; color: var(--red); box-shadow: inset 0 0 0 1.5px #F5C9C9; }
.btn:disabled { opacity: .4; box-shadow: none; pointer-events: none; }
.btn .icon { width: 19px; height: 19px; }

/* ---------- Login ---------- */
.hero {
  background: radial-gradient(120% 90% at 100% 0%, var(--blue-700) 0%, var(--blue-900) 55%, var(--blue-950) 100%);
  color: #fff; padding: 44px 24px 52px; position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
}
.hero::after {
  content: ""; position: absolute; right: -60px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 122, 31, .45), rgba(244, 122, 31, 0) 70%);
}
.hero .logo svg { width: 52px; height: 52px; display: block; }
.hero-txt { position: relative; z-index: 1; }
.hero h1 { font-size: 28px; line-height: 1; letter-spacing: -.01em; }
.hero p { margin: 2px 0 0; line-height: 1.25; opacity: .75; font-size: 15px; }
.sheet-panel { background: var(--bg); border-radius: 24px 24px 0 0; margin-top: -24px; padding: 24px 16px 32px; position: relative; z-index: 1; flex: 1; }
.sheet-panel h2 { font-size: 21px; }
.sheet-panel > .muted { margin: 4px 0 0; }

.person {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow);
}
.person:active { background: var(--blue-50); }
.pn { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pn b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn small { color: var(--muted); font-size: 13px; }
.person > .icon, .row-card > .icon { color: #A3AEC0; }
.demo-note { margin-top: 24px; font-size: 12.5px; color: var(--muted); background: #fff; border: 1px dashed #CBD3E1; border-radius: 12px; padding: 10px 12px; }

/* ---------- PIN ---------- */
.pin-wrap { flex: 1; display: flex; flex-direction: column; padding: 16px 20px 28px; background: #fff; }
.pin-head { text-align: center; margin-top: 24px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pin-head h2 { margin-top: 10px; font-size: 22px; }
.pin-head p { margin: 0; }
.dots { display: flex; gap: 16px; margin: 26px 0 10px; }
.dot { width: 15px; height: 15px; border-radius: 50%; border: 2px solid #C7D0DE; transition: all .12s; }
.dot.on { background: var(--blue-700); border-color: var(--blue-700); transform: scale(1.1); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: auto auto 0; width: 100%; max-width: 300px; }
.key { height: 66px; border-radius: 20px; background: var(--bg); font-size: 25px; font-weight: 600; display: grid; place-items: center; }
.key:active { background: var(--blue-100); }
.key .icon { width: 26px; height: 26px; }
.pin-wrap .demo-note { margin-top: 18px; text-align: center; border: 0; background: none; }

/* ---------- KW ---------- */
.hello { margin: 4px 4px 14px; }
.hello h2 { font-size: 23px; }
.hello p { margin: 2px 0 0; }
.week-hero {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
  color: #fff; border-radius: 20px; padding: 18px; position: relative; overflow: hidden;
  box-shadow: 0 12px 28px rgba(13, 43, 94, .25);
}
.week-hero::before {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}
.week-hero .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .75; font-weight: 600; }
.week-hero .kw { font-size: 44px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin-top: 4px; }
.week-hero .rng { opacity: .85; margin-top: 2px; }
.week-hero .chips { margin: 14px 0 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.week-hero .badge { background: rgba(255, 255, 255, .14); color: #fff; }
.week-row {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow);
}
.week-row:active { background: var(--blue-50); }
.kw-box { width: 52px; height: 52px; border-radius: 13px; background: var(--blue-50); color: var(--blue-800); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.kw-box small { font-size: 10px; font-weight: 700; letter-spacing: .06em; opacity: .7; }
.kw-box b { font-size: 20px; line-height: 1; font-weight: 800; }
.week-row .pn .chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }

.alert {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%;
  background: var(--red-50); color: var(--red); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px;
}
.alert b { display: block; }
.alert span { color: var(--ink-2); font-size: 13.5px; }
.alert.info { background: var(--blue-50); color: var(--blue-700); }
.alert.ok { background: var(--green-50); color: var(--green); }
.alert.warn { background: var(--orange-50); color: var(--orange-600); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.badge.gray { background: #EEF1F5; color: var(--ink-2); }
.badge.orange { background: var(--orange-50); color: var(--orange-600); }
.badge.red { background: var(--red-50); color: var(--red); }
.badge.green { background: var(--green-50); color: var(--green); }
.badge.blue { background: var(--blue-50); color: var(--blue-700); }

/* ---------- Suche & Listen ---------- */
.search { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 0 14px; height: 50px; box-shadow: var(--shadow); color: var(--muted); }
.search input { flex: 1; border: 0; outline: 0; background: none; font-size: 16px; color: var(--ink); min-width: 0; }
#list { margin-top: 14px; }
.search:focus-within { box-shadow: 0 0 0 2px var(--blue-600), var(--shadow); }

.row-card {
  display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 14px;
  padding: 12px 8px 12px 12px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: pointer;
}
.row-card:active { background: var(--blue-50); }
.row-card.sel { box-shadow: 0 0 0 2px var(--blue-600), var(--shadow); background: #FBFCFF; }
.nr { flex: none; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 12.5px; color: var(--blue-700); background: var(--blue-50); border-radius: 9px; padding: 8px 8px; min-width: 78px; text-align: center; }
.rc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rc-main b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-main small { color: var(--muted); font-size: 13px; }
.rc-main .badge { align-self: flex-start; margin-top: 4px; }
.star { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #B7C0CE; flex: none; }
.star:active { background: var(--orange-50); }
.star .icon { width: 22px; height: 22px; }
.star.on { color: var(--orange); }
.star.on .icon { fill: var(--orange); }
.check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #C7D0DE; flex: none; display: grid; place-items: center; color: #fff; }
.check .icon { width: 15px; height: 15px; stroke-width: 3; opacity: 0; }
.sel .check { background: var(--blue-600); border-color: var(--blue-600); }
.sel .check .icon { opacity: 1; }

.chip-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: #fff; color: var(--blue-700); font-weight: 650; font-size: 13.5px; box-shadow: inset 0 0 0 1.5px var(--blue-100); }
.chip-btn .icon { width: 16px; height: 16px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; }

/* ---------- Fußleiste ---------- */
.footer {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 440px; z-index: 30;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 14px;
}
.footer .sum { display: flex; flex-direction: column; line-height: 1.15; }
.footer .sum small { color: var(--muted); font-size: 12px; }
.footer .sum b { font-size: 19px; font-variant-numeric: tabular-nums; }
.footer .btn { flex: 1; }

/* ---------- Zeiten ---------- */
.ctx { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); margin-bottom: 12px; }
.ctx .rc-main b { font-size: 14.5px; }
.std {
  background: var(--blue-50); border-radius: var(--r); padding: 14px; margin-bottom: 14px;
  border: 1px solid var(--blue-100);
}
.std-h { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--blue-800); font-size: 14px; }
.std-h .icon { width: 18px; height: 18px; }
.std-h small { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 12px; }
.times { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 10px; }
.times label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.times label span { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding-left: 2px; }
.times input, .times select {
  width: 100%; height: 44px; border-radius: 11px; border: 1.5px solid var(--line); background: #fff;
  padding: 0 8px; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; outline: 0;
  -webkit-appearance: none; appearance: none; text-align: center;
}
.times input:focus, .times select:focus { border-color: var(--blue-600); }
.times input[type="time"] { position: relative; padding: 0 4px; }
.times input[type="time"]::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; opacity: 0; cursor: pointer; }
.times input[type="time"]::-webkit-datetime-edit { display: flex; justify-content: center; }
.times input[type="time"]::-webkit-datetime-edit-fields-wrapper { padding: 0; }
.std .btn { margin-top: 12px; height: 44px; font-size: 14.5px; }

.ma-card { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; }
.ma-card.open { box-shadow: 0 0 0 2px var(--blue-100), var(--shadow); }
.ma-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; }
.ma-head > .icon { color: #A3AEC0; transition: transform .2s; }
.ma-card.open .ma-head > .icon { transform: rotate(90deg); }
.tot { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--blue-800); background: var(--blue-50); border-radius: 9px; padding: 5px 9px; font-size: 14px; white-space: nowrap; }
.ma-body { border-top: 1px solid var(--line); }
.day { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.day:last-child { border-bottom: 0; }
.day-l { width: 44px; flex: none; display: flex; flex-direction: column; padding-top: 6px; }
.day-l b { font-size: 15px; }
.day-l small { color: var(--muted); font-size: 12px; }
.day-r { flex: 1; min-width: 0; }
.day-top { display: flex; align-items: center; gap: 8px; }
.day-h { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.day .times { margin-top: 8px; }
.day:not(.work) { background: #FAFBFC; }
.pill-select {
  height: 34px; border-radius: 999px; border: 0; padding: 0 30px 0 12px; font-weight: 700; font-size: 13px; outline: 0;
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px;
}
.st-work { background-color: var(--blue-50); color: var(--blue-700); }
.st-frei { background-color: #EEF1F5; color: var(--ink-2); }
.st-urlaub { background-color: var(--green-50); color: var(--green); }
.st-krank { background-color: var(--red-50); color: var(--red); }
.st-sw { background-color: var(--orange-50); color: var(--orange-600); }
.ma-foot { padding: 10px 14px 14px; border-top: 1px solid var(--line); display: flex; justify-content: center; }
.ma-foot .link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.ma-foot .icon { width: 16px; height: 16px; }

/* ---------- Übersicht / Bestätigung ---------- */
.sum-head { padding: 16px; }
.sum-head .row { display: flex; align-items: center; gap: 12px; }
.sum-head .meta { display: flex; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.sum-head .meta div { flex: 1; }
.sum-head .meta small { display: block; color: var(--muted); font-size: 12px; }
.sum-head .meta b { font-size: 18px; font-variant-numeric: tabular-nums; }

.timeline { display: flex; align-items: flex-start; margin: 16px 2px 4px; }
.tl-step { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; font-size: 11.5px; color: var(--muted); gap: 6px; }
.tl-step::before { content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.tl-step:first-child::before { display: none; }
.tl-step.done::before, .tl-step.cur::before { background: var(--blue-600); }
.tl-dot { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; position: relative; z-index: 1; color: var(--muted); font-weight: 700; font-size: 13px; }
.tl-step.done .tl-dot { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.tl-step.cur .tl-dot { border-color: var(--orange); color: var(--orange); box-shadow: 0 0 0 4px var(--orange-50); }
.tl-step.done, .tl-step.cur { color: var(--ink-2); font-weight: 600; }
.tl-dot .icon { width: 16px; height: 16px; stroke-width: 3; }
.tl-step small { font-weight: 500; color: var(--muted); font-size: 10.5px; margin-top: -4px; }

.sum-list { margin-top: 12px; }
.sum-row { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sum-row:last-child { border-bottom: 0; }
.sum-row .top-line { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; }
.sum-row .avatar { width: 34px; height: 34px; font-size: 12px; }
.strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 10px; }
.cell { background: var(--blue-50); border-radius: 8px; padding: 5px 2px; text-align: center; font-variant-numeric: tabular-nums; }
.cell small { display: block; font-size: 10px; color: var(--muted); font-weight: 600; }
.cell b { font-size: 12.5px; }
.cell.frei { background: #F3F5F8; color: #9AA5B5; }
.cell.urlaub { background: var(--green-50); color: var(--green); }
.cell.krank { background: var(--red-50); color: var(--red); }
.cell.sw { background: var(--orange-50); color: var(--orange-600); }
.detail { margin-top: 10px; font-size: 13px; color: var(--ink-2); display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; background: #FAFBFC; border-radius: 10px; padding: 10px 12px; font-variant-numeric: tabular-nums; }
.detail .r { text-align: right; font-weight: 700; }

.choose { display: flex; gap: 8px; margin-top: 8px; }
.choose button { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); text-align: left; }
.choose button .avatar { width: 34px; height: 34px; font-size: 12px; }
.choose button.on { box-shadow: inset 0 0 0 2px var(--blue-600); background: #FBFCFF; }
.choose button b { font-size: 14px; font-weight: 650; }

.confirm-box { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: 14px; padding: 14px; margin: 16px 0 12px; box-shadow: var(--shadow); cursor: pointer; text-align: left; width: 100%; }
.confirm-box .check { border-radius: 8px; margin-top: 1px; }
.confirm-box.sel { box-shadow: 0 0 0 2px var(--blue-600), var(--shadow); }
.confirm-box span { font-size: 14px; color: var(--ink-2); }
.confirm-box span b { color: var(--ink); display: block; margin-bottom: 2px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
textarea { width: 100%; min-height: 96px; border-radius: 14px; border: 1.5px solid var(--line); padding: 12px; font-size: 15px; outline: 0; resize: vertical; background: #fff; }
textarea:focus { border-color: var(--blue-600); }

/* ---------- Erfolg ---------- */
.done-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px 24px; gap: 10px; background: #fff; }
.done-icon { width: 96px; height: 96px; border-radius: 50%; background: var(--green-50); color: var(--green); display: grid; place-items: center; margin-bottom: 10px; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.done-icon .icon { width: 48px; height: 48px; stroke-width: 2.6; }
.done-wrap h2 { font-size: 25px; }
.done-wrap p { margin: 0 0 18px; color: var(--muted); max-width: 300px; }
.done-wrap .stack { width: 100%; max-width: 340px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- Tabs ---------- */
.tabs { display: flex; background: #E7EBF2; border-radius: 13px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.tabs button { flex: 1; height: 38px; border-radius: 10px; font-weight: 650; font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }
.tabs .count { background: var(--orange); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }

.inbox-card { display: block; width: 100%; text-align: left; background: #fff; border-radius: var(--r); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.inbox-card:active { background: var(--blue-50); }
.inbox-card .row { display: flex; align-items: center; gap: 10px; }
.inbox-card .facts { display: flex; gap: 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.inbox-card .facts b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Menü & Toast ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(8, 27, 61, .45); z-index: 50; animation: fade .15s; }
.menu { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 440px; background: #fff; border-radius: 22px 22px 0 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); z-index: 51; animation: up .2s ease-out; }
.menu .grab { width: 40px; height: 5px; border-radius: 5px; background: #D5DBE5; margin: 0 auto 14px; }
.menu .who { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.menu-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 4px; font-weight: 600; text-align: left; border-radius: 10px; }
.menu-item:active { background: var(--bg); }
.menu-item.red { color: var(--red); }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translate(-50%, 100%); } }

.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: var(--blue-950); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 60; box-shadow: 0 10px 30px rgba(8, 27, 61, .3); animation: toast 2.4s forwards; white-space: nowrap; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 10px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* ---------- Buchhaltung (Desktop) ---------- */
.adm { display: flex; min-height: 100vh; background: var(--bg); }
.adm-side { width: 248px; flex: none; background: linear-gradient(180deg, var(--blue-900), var(--blue-950)); color: #fff; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.adm-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; }
.adm-brand svg { width: 36px; height: 36px; }
.adm-brand b { font-size: 18px; display: block; }
.adm-brand small { opacity: .65; font-size: 12px; }
.adm-nav { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 11px; color: rgba(255, 255, 255, .72); font-weight: 600; text-align: left; width: 100%; }
.adm-nav:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.adm-nav.on { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 3px 0 0 var(--orange); }
.adm-nav .soon { margin-left: auto; font-size: 10px; background: rgba(244, 122, 31, .25); color: #FFC596; padding: 2px 6px; border-radius: 6px; }
.adm-side .spacer { flex: 1; }
.adm-main { flex: 1; min-width: 0; padding: 28px 32px 48px; }
.adm-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.adm-head h1 { font-size: 26px; }
.adm-head p { margin: 2px 0 0; color: var(--muted); }
.adm-head .grow { flex: 1; }
.wk-switch { display: flex; align-items: center; gap: 4px; background: #fff; border-radius: 12px; padding: 4px; box-shadow: var(--shadow); }
.wk-switch button { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-2); }
.wk-switch button:hover { background: var(--bg); }
.wk-switch span { padding: 0 10px; font-weight: 700; min-width: 170px; text-align: center; }
.wk-switch span small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi { background: #fff; border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.kpi b { display: block; font-size: 28px; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi.accent { background: linear-gradient(135deg, var(--orange), var(--orange-600)); color: #fff; }
.kpi.accent small { color: rgba(255, 255, 255, .85); }
.panel { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); overflow-x: auto; margin-bottom: 22px; }
.panel-h { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); position: sticky; left: 0; }
.panel-h h3 { font-size: 16px; flex: 1; }
.panel-h .btn { height: 40px; font-size: 14px; padding: 0 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px 14px; background: #FAFBFC; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .nr { min-width: 0; padding: 4px 8px; display: inline-block; }
tbody tr:hover { background: #FBFCFE; }
tfoot td { font-weight: 800; background: #FAFBFC; }
.placeholder { padding: 28px 18px; color: var(--muted); text-align: center; }
.tag-soon { font-size: 11px; font-weight: 700; color: var(--orange-600); background: var(--orange-50); border-radius: 6px; padding: 2px 7px; margin-left: 8px; vertical-align: middle; }

@media (max-width: 900px) {
  .adm { flex-direction: column; }
  .adm-side { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap; padding: 12px; }
  .adm-brand { padding: 0 8px 0 0; }
  .adm-side .spacer { display: none; }
  .adm-nav { width: auto; }
  .adm-main { padding: 18px 14px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .panel { overflow-x: auto; }
}

/* ---------- Stammdaten-Verwaltung ---------- */
.panel-h .search.sm { height: 40px; box-shadow: inset 0 0 0 1.5px var(--line); width: 300px; flex: none; border-radius: 11px; }
.panel-h .search.sm input { font-size: 14px; }
.panel-h .grow { flex: 1; }
.seg { display: flex; background: #EEF1F5; border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { height: 34px; padding: 0 12px; border-radius: 9px; font-weight: 650; font-size: 13px; color: var(--muted); white-space: nowrap; }
.seg button span { font-size: 11.5px; opacity: .7; margin-left: 2px; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }
.row-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 9px; color: var(--blue-700); font-weight: 650; font-size: 13px; }
.row-btn:hover { background: var(--blue-50); }
.row-btn .icon { width: 15px; height: 15px; }
tr.off td { color: var(--muted); }
tr.off td b { font-weight: 600; }
.modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 51;
  width: calc(100% - 32px); max-width: 480px; background: #fff; border-radius: 20px; padding: 24px;
  box-shadow: 0 30px 80px rgba(8, 27, 61, .35); animation: fade .15s;
}
.modal h3 { font-size: 20px; }
.modal > .muted { margin: 6px 0 0; font-size: 13.5px; }
.fields { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld span { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.fld input { height: 46px; border-radius: 11px; border: 1.5px solid var(--line); padding: 0 12px; font-size: 15px; outline: 0; background: #fff; }
.fld input:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--blue-50); }
.err { color: var(--red); font-size: 13.5px; font-weight: 600; min-height: 20px; margin-top: 10px; }
.modal-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.modal-actions .grow { flex: 1; }
.modal-actions .btn { height: 44px; font-size: 14.5px; padding: 0 16px; }
@media (max-width: 900px) { .panel-h { flex-wrap: wrap; } .panel-h .search.sm { width: 100%; } }
.fld select { height: 46px; border-radius: 11px; border: 1.5px solid var(--line); padding: 0 12px; font-size: 15px; outline: 0; background: #fff; }
.fld select:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--blue-50); }
.fld select:disabled { background: var(--bg); color: var(--muted); }
.fld .hint { font-size: 12px; color: var(--muted); }
.demo-note.pin-err { color: var(--red); font-weight: 700; }
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--blue-600); font-weight: 650; font-size: 13.5px; margin-bottom: 6px; }
.crumb .icon { width: 16px; height: 16px; }
.crumb:hover { text-decoration: underline; }
.name-link { font-weight: 700; text-align: left; color: var(--ink); }
.name-link:hover { color: var(--blue-600); text-decoration: underline; }
.kpi small + b + small, .kpi b + small { display: block; margin-top: 2px; }

/* ---------- Anpassungen durch den Polier ---------- */
.cell.chg { box-shadow: inset 0 0 0 2px var(--orange); background: var(--orange-50); color: var(--orange-600); }
.changes { margin-top: 12px; padding: 14px; border-left: 4px solid var(--orange); }
.changes-h { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--orange-600); margin-bottom: 6px; }
.changes-h .icon { width: 17px; height: 17px; }
.chg-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.chg-row:first-of-type { border-top: 0; }
.chg-row span { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chg-row s { color: var(--muted); }
.chg-row em { font-style: normal; font-weight: 700; color: var(--ink); }
.avatar.chef { background: var(--blue-900); color: #fff; }
.cell.chgc { box-shadow: inset 0 0 0 2px var(--blue-600); background: var(--blue-100); color: var(--blue-800); }
.changes.chef { border-left-color: var(--blue-600); }
.changes.chef .changes-h { color: var(--blue-700); }
.changes-h small { margin-left: auto; font-weight: 500; color: var(--muted); font-size: 12px; }
.week-switch { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 14px; padding: 6px; box-shadow: var(--shadow); margin-bottom: 12px; }
.week-switch > div { flex: 1; text-align: center; display: flex; flex-direction: column; }
.week-switch b { font-size: 18px; }
.week-switch small { color: var(--muted); font-size: 12.5px; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.mini-kpis div { background: #fff; border-radius: 12px; padding: 8px 10px; box-shadow: var(--shadow); }
.mini-kpis small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; }
.mini-kpis b { font-size: 15px; font-variant-numeric: tabular-nums; }
.inbox-card .facts { align-items: center; flex-wrap: wrap; gap: 8px 16px; }

/* Nachfragen der Buchhaltung */
.ask-card { padding: 14px; margin-bottom: 12px; border-left: 4px solid var(--orange); }
.ask-h { display: flex; align-items: center; gap: 10px; }
.ask-h .avatar { width: 34px; height: 34px; font-size: 12px; }
.ask-h .pn { display: flex; flex-direction: column; }
.ask-h small { color: var(--muted); font-size: 12.5px; }
.ask-about { margin-top: 12px; font-size: 13.5px; color: var(--ink-2); }
.ask-text { margin: 6px 0 10px; font-size: 15px; line-height: 1.45; }
.ask-card textarea { min-height: 72px; margin-top: 10px; }
.ask-where { display: flex; flex-direction: column; gap: 4px; background: var(--bg, #F3F5F9); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.ask-where small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.stand { display: inline-flex; align-items: baseline; gap: 7px; font-size: 13px; }
.stand::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); transform: translateY(-1px); }
.stand.red::before { background: var(--red, #C62828); }
.stand.orange::before { background: var(--orange); }
.stand.green::before { background: var(--green); }
.stand.gray::before { background: #9AA4B2; }
.ask-cell { max-width: 340px; white-space: normal !important; }
.ask-ans { margin-top: 8px; padding: 8px 10px; background: var(--blue-50); border-radius: 10px; font-size: 13px; }
.modal select { height: 44px; border-radius: 12px; border: 1.5px solid var(--line); padding: 0 10px; font-size: 15px; background: #fff; }
.modal textarea { min-height: 84px; }

/* Polier: selbst erfassen */
.erf-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: linear-gradient(160deg, var(--blue-900), var(--blue-700)); color: #fff; border-radius: var(--r); padding: 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.erf-card .pn { flex: 1; display: flex; flex-direction: column; }
.erf-card small { opacity: .75; font-size: 12.5px; }
.erf-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--orange); display: grid; place-items: center; }
.erf-ic .icon { width: 22px; height: 22px; }
