/* Stempeluhr – iOS-Design (hell/dunkel, Safe Areas, Bottom-Sheets) */

:root {
  --bg: #f2f2f7;
  --card: #ffffff;
  --card2: #f2f2f7;
  --elev: #ffffff;
  --text: #000000;
  --text2: rgba(60, 60, 67, .6);
  --text3: rgba(60, 60, 67, .3);
  --sep: rgba(60, 60, 67, .2);
  --fill: rgba(120, 120, 128, .12);
  --fill2: rgba(120, 120, 128, .24);
  --bar: rgba(249, 249, 249, .9);
  --blue: #007aff;
  --green: #34c759;
  --red: #ff3b30;
  --orange: #ff9500;
  --yellow: #ffcc00;
  --purple: #af52de;
  --pink: #ff2d55;
  --teal: #30b0c7;
  --indigo: #5856d6;
  --gray: #8e8e93;
  --accent: var(--blue);
  --r: 12px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --tabh: 50px;
  --menu: #ffffff;
  --menu-hover: rgba(120, 120, 128, .16);
  --menu-shadow: 0 18px 50px rgba(0, 0, 0, .18), 0 4px 14px rgba(0, 0, 0, .08);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #000000;
  --card: #1c1c1e;
  --card2: #2c2c2e;
  --elev: #2c2c2e;
  --text: #ffffff;
  --text2: rgba(235, 235, 245, .6);
  --text3: rgba(235, 235, 245, .3);
  --sep: rgba(84, 84, 88, .6);
  --fill: rgba(118, 118, 128, .24);
  --fill2: rgba(118, 118, 128, .36);
  --bar: rgba(22, 22, 23, .88);
  --blue: #0a84ff;
  --green: #30d158;
  --red: #ff453a;
  --orange: #ff9f0a;
  --yellow: #ffd60a;
  --purple: #bf5af2;
  --pink: #ff375f;
  --teal: #40c8e0;
  --indigo: #5e5ce6;
  --menu: #2c2c2e;
  --menu-hover: rgba(255, 255, 255, .1);
  --menu-shadow: 0 18px 50px rgba(0, 0, 0, .55), 0 0 0 .5px rgba(255, 255, 255, .08);
  color-scheme: dark;
}
[data-accent="green"] { --accent: var(--green); }
[data-accent="orange"] { --accent: var(--orange); }
[data-accent="purple"] { --accent: var(--purple); }
[data-accent="pink"] { --accent: var(--pink); }
[data-accent="red"] { --accent: var(--red); }
[data-accent="teal"] { --accent: var(--teal); }
[data-accent="indigo"] { --accent: var(--indigo); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -.01em;
  overscroll-behavior-y: none;
}
body.noscroll { overflow: hidden; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
code { font-family: ui-monospace, Menlo, monospace; font-size: .9em; background: var(--fill); padding: 1px 5px; border-radius: 5px; }
h2, h3 { margin: 0 0 8px; }
h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
p { margin: 6px 0; }
.ic { width: 22px; height: 22px; flex: none; }
.muted { color: var(--text2); }
.small { font-size: 15px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.strong { font-weight: 600; }
.wrap { white-space: normal !important; }
.neg, .t-red { color: var(--red) !important; }
.pos { color: var(--green); }
.t-orange { color: var(--orange); }
.print-only { display: none; }

/* ── Navigation ── */
.nav {
  position: sticky; top: 0; z-index: 20;
  padding-top: var(--sat);
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--sep);
}
.nav-inner {
  height: 44px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 calc(4px + var(--sar)) 0 calc(4px + var(--sal));
}
.nav-title { margin: 0; font-size: 17px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw; }
.nav-left { justify-self: start; }
.nav-right { justify-self: end; display: flex; }
.nav-btn { display: inline-flex; align-items: center; gap: 0; color: var(--accent); background: none; border: 0; padding: 8px 10px; font-size: 17px; min-height: 44px; }
.nav-btn .ic { width: 24px; height: 24px; }
.offline-bar { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; padding: 4px 12px; background: var(--orange); color: #fff; }
.offline-bar .ic { width: 15px; height: 15px; }
.offline-bar .link { color: #fff; text-decoration: underline; font-size: 13px; padding: 0 4px; }

.view {
  max-width: 720px; margin: 0 auto;
  padding: 14px calc(16px + var(--sar)) calc(var(--tabh) + var(--sab) + 28px) calc(16px + var(--sal));
  transition: opacity .15s;
}
.view.loading { opacity: .45; pointer-events: none; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex;
  padding: 0 var(--sar) var(--sab) var(--sal);
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--sep);
}
.tab { flex: 1; position: relative; height: var(--tabh); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--gray); font-size: 10px; font-weight: 500; }
.tab .ic { width: 26px; height: 26px; }
.tab.on { color: var(--accent); }

/* ── Karten, Gruppen, Zeilen ── */
.card { display: block; background: var(--card); border-radius: var(--r); padding: 16px; margin: 0 0 14px; color: var(--text); border: 0; width: 100%; text-align: left; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.card-head h3 { margin: 0; min-width: 0; }
.group-title { font-size: 13px; text-transform: uppercase; letter-spacing: .02em; color: var(--text2); margin: 22px 16px 7px; }
.group { background: var(--card); border-radius: var(--r); overflow: hidden; margin-bottom: 8px; }
.group.flat { border-radius: 0; background: none; margin: 8px -16px -16px; border-top: .5px solid var(--sep); }
.group > * { position: relative; }
.group > :not(:first-child)::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep); pointer-events: none; }
.group-foot { font-size: 13px; color: var(--text2); margin: 6px 16px 16px; }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 10px 16px;
  background: none; border: 0; color: var(--text); text-align: left; font-size: 17px;
}
div.row { cursor: default; }
button.row:active, a.row:active { background: var(--fill); }
.row.muted { color: var(--text2); }
.row-icon { width: 30px; height: 30px; border-radius: 7px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.row-icon .ic { width: 18px; height: 18px; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 14px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-val { color: var(--text2); white-space: nowrap; display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.row-val.strong { color: var(--text); }
.row-val .ic { color: var(--accent); }
.chev { color: var(--text3); display: flex; flex: none; }
.chev .ic { width: 17px; height: 17px; }
.badge { background: var(--red); color: #fff; border-radius: 10px; font-size: 13px; font-weight: 600; padding: 1px 7px; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 5px; background: var(--fill); color: var(--text2); vertical-align: middle; margin-left: 4px; }
.tag.green { background: rgba(52, 199, 89, .16); color: var(--green); }
.tag.orange { background: rgba(255, 149, 0, .16); color: var(--orange); }
.tag.red { background: rgba(255, 59, 48, .14); color: var(--red); }
.tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
.tags .tag { margin-left: 0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; flex: none; }
.dot.lg { width: 14px; height: 14px; margin: 0; }
.empty { text-align: center; color: var(--text2); padding: 28px 16px; }
.empty .ic { width: 40px; height: 40px; opacity: .5; }
.empty p { margin: 8px 0 0; }
.hint { font-size: 14px; color: var(--text2); margin: 10px 4px; }
.note-line { background: var(--card); border-radius: var(--r); padding: 10px 16px; margin-bottom: 8px; font-size: 15px; }
.note-line.btnlike { display: block; width: 100%; border: 0; text-align: left; color: var(--text); }
.note-line.btnlike:active { background: var(--fill); }
.error-card { border-left: 4px solid var(--red); }

/* ── Formulare ── */
.field { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 5px 16px; }
.field > span:first-child { flex: none; max-width: 52%; }
.field > .val { margin-left: auto; color: var(--text2); text-align: right; font-size: 16px; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.field select, .field textarea {
  flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 6px 0;
  font-size: 17px; text-align: right; color: var(--text2);
  -webkit-appearance: none; appearance: none; border-radius: 0;
}
.field select { color: var(--accent); text-align-last: right; }
label.field:has(.dd) { cursor: pointer; }
.field input::-webkit-date-and-time-value { text-align: right; }
.field input[type="date"], .field input[type="time"] { min-height: 34px; color: var(--accent); }
.field input:focus, .field textarea:focus { color: var(--text); }
.field.col { flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 16px; }
.field.col > span:first-child { max-width: none; font-size: 13px; color: var(--text2); }
.field.col textarea { text-align: left; color: var(--text); resize: vertical; min-height: 44px; }
.field .seg { margin: 0 0 0 auto; flex: 0 1 220px; }
input::placeholder, textarea::placeholder { color: var(--text3); }
input.switch {
  -webkit-appearance: none; appearance: none; flex: none; position: relative; margin: 0 0 0 auto;
  width: 51px; height: 31px; border-radius: 16px; background: var(--fill2); transition: background .2s; cursor: pointer;
}
input.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .25); transition: transform .2s; }
input.switch:checked { background: var(--green); }
input.switch:checked::after { transform: translateX(20px); }
input.switch:disabled { opacity: .45; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 12px 4px; font-size: 16px; }
.check-row input.switch { margin: 0; }
.form-err { color: var(--red); font-size: 15px; min-height: 20px; margin-top: 8px; text-align: center; }
.icon-btn { background: none; border: 0; color: var(--accent); padding: 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; min-width: 40px; min-height: 40px; }
.icon-btn.danger { color: var(--red); }
.icon-btn:active { background: var(--fill); }
.search { display: flex; align-items: center; gap: 6px; background: var(--fill); border-radius: 10px; padding: 0 10px; color: var(--text2); flex: 1; margin-bottom: 12px; }
.search .ic { width: 18px; height: 18px; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 9px 0; font-size: 17px; color: var(--text); -webkit-appearance: none; }
.search-row { display: flex; gap: 8px; align-items: flex-start; }

/* ── Auswahlmenüs ── */
select.dd-native { display: none !important; }
.dd {
  display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px;
  margin: -4px -8px -4px auto; max-width: 72%; min-width: 0; min-height: 36px; padding: 6px 8px 6px 12px;
  border: 0; border-radius: 10px; background: transparent; color: var(--accent);
  font-size: 17px; text-align: right; cursor: pointer;
  transition: background .18s, transform .12s;
}
.dd:hover { background: var(--fill); }
.dd:active, .dd.open { background: var(--fill2); }
.dd:active { transform: scale(.97); }
.dd:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dd:disabled { opacity: .45; cursor: default; }
.dd.empty .dd-val { color: var(--text2); }
.dd-val { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-chev { width: 15px; height: 15px; flex: none; opacity: .75; transition: transform .2s; }
.dd.open .dd-chev { transform: scale(1.12); opacity: 1; }
.dd-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .15); }
.dd-dot.lg { width: 14px; height: 14px; }
.dd-ico { flex: none; font-size: 18px; line-height: 1; width: 24px; text-align: center; }
/* Knopf als Pille, z. B. Projektfilter */
.dd.chip {
  margin: 0 0 12px; max-width: 46%; min-height: 40px; padding: 0 12px 0 14px;
  background: var(--fill); font-size: 15px; font-weight: 600; border-radius: 20px;
}
.dd.chip:hover { background: var(--fill2); }
/* Großes Feld beim Einstempeln */
.stamp-field .dd { font-weight: 600; margin-right: -6px; }

.dd-layer { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 60; }
.dd-backdrop { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .12); opacity: 0; transition: opacity .2s; }
.dd-layer.open .dd-backdrop { opacity: 1; }
.dd-menu {
  position: fixed; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 14px; background: var(--menu); box-shadow: var(--menu-shadow);
  opacity: 0; transform: scale(.82) translateY(-4px);
  transition: transform .26s cubic-bezier(.2, 1, .3, 1.15), opacity .16s ease-out;
}
.dd-menu:focus { outline: none; }
.dd-layer.open .dd-menu { opacity: 1; transform: none; }
.dd-layer.closing .dd-menu { transition: transform .16s ease-in, opacity .14s ease-in; transform: scale(.92); opacity: 0; }
.dd-title {
  flex: none; padding: 11px 16px 9px; font-size: 13px; font-weight: 500; color: var(--text2);
  border-bottom: .5px solid var(--sep); text-align: center;
}
.dd-list { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px 0; }
.dd-item {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px;
  padding: 9px 16px 9px 10px; border: 0; background: none; color: var(--text);
  font-size: 17px; text-align: left; cursor: pointer; transition: background .12s;
}
.dd-item + .dd-item::before { content: ""; position: absolute; top: 0; left: 40px; right: 0; border-top: .5px solid var(--sep); }
.dd-item:hover, .dd-item:focus-visible { background: var(--menu-hover); outline: none; }
.dd-item:hover::before, .dd-item:hover + .dd-item::before, .dd-item:focus-visible::before, .dd-item:focus-visible + .dd-item::before { opacity: 0; }
.dd-item:active, .dd-item.picked { background: var(--fill2); }
.dd-item:disabled { opacity: .4; cursor: default; }
.dd-check { flex: none; width: 22px; display: flex; justify-content: center; color: var(--accent); opacity: 0; transform: scale(.6); transition: opacity .15s, transform .2s; }
.dd-check .ic { width: 18px; height: 18px; stroke-width: 2.6; }
.dd-item.on .dd-check { opacity: 1; transform: none; }
.dd-item.on .dd-label { font-weight: 600; }
.dd-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dd-label { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; overflow-wrap: anywhere; }
.dd-text small { font-size: 13px; line-height: 1.25; color: var(--text2); white-space: normal; }
@media (prefers-reduced-motion: reduce) {
  .dd-menu, .dd-layer.closing .dd-menu { transition: opacity .12s; transform: none; }
}
.color-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; justify-content: flex-end; }
.color-pick label { position: relative; }
.color-pick input { position: absolute; opacity: 0; pointer-events: none; }
.color-pick i { display: block; width: 26px; height: 26px; border-radius: 50%; border: 3px solid transparent; box-shadow: 0 0 0 1px var(--sep); }
.color-pick input:checked + i { border-color: var(--card); box-shadow: 0 0 0 2px var(--text); }
.week-hours { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week-hours label { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.week-hours small { font-size: 12px; color: var(--text2); }
.week-hours input { width: 100%; text-align: center !important; padding: 7px 0 !important; border-radius: 8px !important; background: var(--fill) !important; color: var(--text) !important; font-size: 16px !important; }
.break-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 16px; }
.break-row span { color: var(--text2); font-size: 15px; }
.break-row input { flex: 1; min-width: 0; border: 0; background: var(--fill); border-radius: 8px; padding: 8px; font-size: 17px; text-align: center; color: var(--text); -webkit-appearance: none; appearance: none; }
.breaks:empty { display: none; }
.hol-row { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; }
.hol-row input[name="hd"] { width: 34%; }
.hol-row input[name="hn"] { flex: 1; }
.hol-row input[name="hd"], .hol-row input[name="hn"] { min-width: 0; border: 0; background: var(--fill); border-radius: 8px; padding: 8px; font-size: 16px; color: var(--text); }
.half-lbl { font-size: 15px; display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.hol-list:empty { display: none; }
.hol-preview { display: grid; gap: 6px; margin-top: 10px; font-size: 15px; }
.hol-preview div { display: flex; justify-content: space-between; gap: 10px; }
.hol-preview span { color: var(--text2); }
details summary { cursor: pointer; font-weight: 600; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px;
  border: 0; border-radius: 14px; background: var(--accent); color: #fff; font-size: 17px; font-weight: 600;
  text-decoration: none; transition: transform .1s, opacity .2s; -webkit-user-select: none; user-select: none;
}
.btn:active { transform: scale(.97); opacity: .85; }
.btn:disabled { opacity: .5; }
.btn.block { display: flex; width: 100%; margin: 10px 0; }
.btn.plain { background: var(--fill); color: var(--accent); }
.btn.small { min-height: 38px; font-size: 15px; padding: 0 14px; border-radius: 10px; }
.btn.green { background: var(--green); }
.btn.red { background: var(--red); }
.btn.orange { background: var(--orange); }
.btn.danger-plain { background: var(--fill); color: var(--red); }
.btn .ic { width: 20px; height: 20px; }
.btn-row { display: flex; gap: 10px; margin: 8px 0; }
.btn-row > .btn { flex: 1; min-width: 0; }
.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-grid .btn:last-child:nth-child(odd) { grid-column: span 2; }
.link { background: none; border: 0; color: var(--accent); font-size: 17px; padding: 8px; }
.link.strong { font-weight: 600; }
.link.inline { padding: 4px 0 0; font-size: 15px; font-weight: 600; }
.link-ph { width: 60px; }
.seg { display: flex; background: var(--fill); border-radius: 9px; padding: 2px; margin: 0 0 14px; }
.seg button { flex: 1; border: 0; background: none; padding: 7px 4px; font-size: 14px; font-weight: 500; border-radius: 7px; color: var(--text); white-space: nowrap; }
.seg button.on { background: var(--elev); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 0 1px rgba(0, 0, 0, .1); font-weight: 600; }
[data-theme="dark"] .seg button.on { background: #636366; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 0; border-radius: 16px; background: var(--card); padding: 6px 12px; font-size: 14px; color: var(--text); }
.chip b { color: var(--text2); margin-left: 2px; }
.chip.on { background: var(--accent); color: #fff; }
.chip.on b { color: rgba(255, 255, 255, .8); }

/* ── Avatare ── */
.avatar { width: 36px; height: 36px; border-radius: 50%; color: #fff; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex: none; letter-spacing: 0; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.lg { width: 52px; height: 52px; font-size: 19px; }
.avatar.xl { width: 76px; height: 76px; font-size: 28px; }
.av-wrap { position: relative; display: inline-flex; }
.st-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--gray); }
.av-wrap .st-dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border: 2px solid var(--card); }
.st-dot.st-in { background: var(--green); }
.st-dot.st-break { background: var(--orange); }
.st-dot.st-absent { background: var(--purple); }
.profile-card { display: flex; align-items: center; gap: 14px; }
.profile-card div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.profile-card b { font-size: 20px; }
.profile-card span { color: var(--text2); font-size: 15px; }
.profile-head { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 4px 0 14px; text-align: center; }
.profile-head b { font-size: 21px; }

/* ── Start ── */
.hero { text-align: center; margin: 4px 0 16px; }
.greet { font-size: 15px; color: var(--text2); font-weight: 500; }
.clock { font-size: 58px; font-weight: 200; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.date { font-size: 15px; color: var(--text2); }
.banner { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; margin-bottom: 12px; border-radius: var(--r); background: var(--card); color: var(--text); font-size: 15px; border-left: 4px solid var(--b, var(--accent)); }
.banner > .ic, .banner > :first-child { flex: none; }
.banner > div { flex: 1; }
.banner.red { --b: var(--red); }
.banner.orange { --b: var(--orange); }
.banner.blue { --b: var(--blue); }
.banner.accent { --b: var(--accent); }
.ann { position: relative; border-left: 4px solid var(--pink); }
.ann h3 { padding-right: 28px; }
.ann p { white-space: pre-line; font-size: 15px; }
.ann-x { position: absolute; top: 6px; right: 6px; color: var(--text2); }
.ann-pin { position: absolute; top: 12px; right: 44px; }
.status-card { text-align: center; }
.status-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 14px; font-size: 14px; font-weight: 600; background: var(--fill); }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.green { color: var(--green); background: rgba(52, 199, 89, .14); }
.pill.orange { color: var(--orange); background: rgba(255, 149, 0, .14); }
.pill.gray { color: var(--gray); }
.st-in .pill i, .st-break .pill i { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.big-timer { font-size: 50px; font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin: 10px 0 0; }
.proj-line { margin-top: 8px; font-size: 15px; display: inline-flex; align-items: center; background: var(--fill); padding: 4px 12px; border-radius: 12px; }
.break-live { margin-top: 10px; color: var(--orange); font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.break-live .ic { width: 18px; height: 18px; }
.warn-line { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 149, 0, .14); color: var(--orange); font-size: 14px; font-weight: 600; }
.stamp-area { margin-top: 16px; text-align: left; }
.btn.stamp { width: 100%; min-height: 66px; font-size: 21px; border-radius: 18px; }
.btn.stamp .ic { width: 24px; height: 24px; }
.stamp-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--fill); border-radius: 12px; padding: 0 12px; margin-bottom: 8px; min-height: 48px; cursor: pointer; }
.stamp-field > span { color: var(--text2); font-size: 15px; }
.stamp-note { width: 100%; border: 0; border-radius: 12px; background: var(--fill); padding: 12px; font-size: 17px; margin-bottom: 10px; color: var(--text); outline: none; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.tile { background: var(--card); border-radius: var(--r); padding: 12px 14px; min-width: 0; }
.tile-label { font-size: 13px; color: var(--text2); font-weight: 500; }
.tile-value { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-sub { font-size: 12px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.neg .tile-value { color: var(--red); }
.tile.pos .tile-value { color: var(--green); }
.timeline { margin: 4px 0 2px; }
.tl-track { position: relative; height: 22px; border-radius: 6px; background: var(--fill); overflow: hidden; }
.tl-work { position: absolute; top: 0; bottom: 0; background: var(--accent); }
.tl-break { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, var(--orange), var(--orange) 4px, rgba(255, 149, 0, .6) 4px, rgba(255, 149, 0, .6) 8px); }
.tl-now { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--red); }
.tl-ticks { position: relative; height: 16px; font-size: 11px; color: var(--text2); }
.tl-ticks span { position: absolute; transform: translateX(-50%); top: 2px; }
.tl-empty { color: var(--text2); font-size: 15px; padding: 6px 0; }
.tl-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text2); margin-top: 4px; }
.tl-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.lg-work { background: var(--accent); }
.lg-break { background: var(--orange); }
.week-bars { display: flex; gap: 6px; align-items: flex-end; }
.wbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; color: var(--text2); }
.wbar small { font-size: 10px; min-height: 12px; }
.wbar-track { position: relative; width: 100%; height: 90px; background: var(--fill); border-radius: 6px; overflow: hidden; }
.wbar-fill { position: absolute; left: 0; right: 0; bottom: 0; background: var(--accent); border-radius: 6px 6px 0 0; }
.wbar-fill.done { background: var(--green); }
.wbar-target { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--text2); }
.wbar.today span { color: var(--accent); font-weight: 700; }
/* ── Zeiten ── */
.month-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.month-title { border: 0; background: none; font-size: 20px; font-weight: 700; color: var(--text); padding: 6px 10px; text-align: center; }
.sum-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.sum-chip { background: var(--card); border-radius: 10px; padding: 8px 10px; text-align: center; min-width: 0; }
.sum-chip span { display: block; font-size: 12px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sum-chip b { font-size: 17px; font-variant-numeric: tabular-nums; }
.sum-chip.neg b { color: var(--red); }
.sum-chip.pos b { color: var(--green); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd { text-align: center; font-size: 12px; color: var(--text2); font-weight: 600; padding: 2px 0; }
.cal-cell {
  position: relative; min-height: 52px; border: 0; border-radius: 10px; background: var(--card); color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 5px 2px 7px; overflow: hidden;
}
.cal-cell.out { background: none; color: var(--text3); }
.cal-cell.free { background: var(--card2); }
[data-theme="dark"] .cal-cell.free { background: #111113; }
.cal-cell.future .val { opacity: .7; }
.cal-cell .num { font-size: 15px; font-weight: 600; width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 50%; }
.cal-cell.today .num { background: var(--red); color: #fff; }
.cal-cell.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-cell.hol .num { color: var(--red); }
.cal-cell.today.hol .num { color: #fff; }
.cal-cell .val { font-size: 11px; color: var(--text2); font-variant-numeric: tabular-nums; line-height: 1.3; white-space: nowrap; }
.cal-cell .abs-bar { position: absolute; left: 6px; right: 6px; bottom: 3px; height: 3px; border-radius: 2px; }
.cal-cell .dot-neg { position: absolute; top: 5px; right: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.cal-cell.warn { box-shadow: inset 0 0 0 2px var(--orange); }
.day-sum { text-align: center; font-size: 15px; color: var(--text2); margin: 8px 0; }
.day-sum b { color: var(--text); }
.entry { align-items: stretch !important; }
.entry-bar { width: 4px; border-radius: 2px; flex: none; }
.entry .row-val { align-self: center; }
.list-sum { margin: 0 4px 6px; }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.meta-grid > div { background: var(--card); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.card .meta-grid > div { background: var(--fill); }
.meta-grid span { display: block; font-size: 12px; color: var(--text2); }
.meta-grid b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.meta-loc { font-size: 14px; margin: -4px 4px 10px; }

/* ── Abwesenheiten ── */
.vac-card { display: flex; align-items: center; gap: 18px; }
.ring { position: relative; width: 112px; height: 112px; flex: none; }
.ring svg { width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: var(--fill); stroke-width: 9; }
.ring-fg { fill: none; stroke: var(--green); stroke-width: 9; stroke-linecap: round; }
.ring-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-txt b { font-size: 26px; }
.ring-txt small { font-size: 11px; color: var(--text2); }
.vac-list { flex: 1; display: grid; gap: 4px; font-size: 15px; min-width: 0; }
.vac-list div { display: flex; justify-content: space-between; gap: 8px; }
.vac-list span { color: var(--text2); }
.abs-ico { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; flex: none; }
.calc-line { font-size: 14px; color: var(--accent); font-weight: 600; margin: -2px 16px 8px; min-height: 18px; }
.sheet-status { font-size: 14px; color: var(--text2); margin-bottom: 10px; }

/* ── Berichte ── */
.range-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.range-row input { flex: 1; min-width: 0; border: 0; background: var(--card); border-radius: 10px; padding: 10px; font-size: 16px; color: var(--accent); -webkit-appearance: none; appearance: none; }
.range-row span { color: var(--text2); }
.chart { width: 100%; height: auto; display: block; }
.ch-grid { stroke: var(--sep); stroke-width: .5; }
.ch-ylab { fill: var(--text2); font-size: 9px; text-anchor: end; }
.ch-xlab { fill: var(--text2); font-size: 9px; text-anchor: middle; }
.ch-bar { fill: var(--accent); }
.ch-bar.done { fill: var(--green); }
.ch-credit { fill: var(--teal); opacity: .55; }
.ch-target { stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 3 2; opacity: .55; }
.chart-legend { display: flex; gap: 14px; justify-content: center; font-size: 12px; color: var(--text2); margin-top: 6px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.lg-bar { background: var(--accent); }
.lg-credit { background: var(--teal); opacity: .55; }
.lg-target { border-top: 2px dashed var(--text); height: 0 !important; border-radius: 0 !important; opacity: .55; vertical-align: 3px !important; }
.pbar { margin-bottom: 10px; }
.pbar-top { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; margin-bottom: 4px; }
.pbar-top span { display: flex; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar-top b { white-space: nowrap; font-weight: 600; }
.pbar-track { display: block; height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.pbar-track > * { display: block; height: 100%; border-radius: 4px; }
.pbar-track.sm { height: 5px; margin-top: 5px; }
.table-card { padding: 4px 0; overflow-x: auto; }
.rtable { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.rtable th, .rtable td { padding: 7px 8px; text-align: right; white-space: nowrap; border-bottom: .5px solid var(--sep); }
.rtable th:first-child, .rtable td:first-child { text-align: left; padding-left: 14px; }
.rtable th:last-child, .rtable td:last-child { padding-right: 14px; }
.rtable th { font-size: 12px; color: var(--text2); font-weight: 600; text-transform: uppercase; }
.rtable tr.free td { color: var(--text2); }
.rtable tr.today td { background: var(--fill); }
.rtable tr:last-child td { border-bottom: 0; }

/* ── Mehr ── */
.accent-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; justify-content: flex-end; }
.accent-pick button { width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--sep); padding: 0; flex: none; }
.accent-pick button.on { box-shadow: 0 0 0 2px var(--text); }
.feat { min-height: 40px; }
.feat-n { flex: none; min-width: 28px; height: 22px; border-radius: 6px; background: var(--fill); color: var(--text2); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.about-logo { width: 84px; height: 84px; border-radius: 19px; }
.audit .row-sub.wrap { color: var(--text); font-size: 14px; }

/* ── Anmeldung ── */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: calc(24px + var(--sat)) 16px calc(24px + var(--sab)); }
.login-card { width: 100%; max-width: 400px; text-align: center; }
.login-card h1 { margin: 10px 0 2px; font-size: 30px; }
.login-logo { width: 88px; height: 88px; border-radius: 20px; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); }
.login-form { margin-top: 22px; text-align: left; }
.login-form .field > span:first-child { width: 96px; }
.login-form .field input { text-align: left !important; color: var(--text) !important; }

/* ── Sheets ── */
.sheet-wrap { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 50; }
.sheet-backdrop { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .4); opacity: 0; transition: opacity .25s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 720px;
  max-height: calc(100% - var(--sat) - 16px); display: flex; flex-direction: column;
  background: var(--bg); border-radius: 14px 14px 0 0; transform: translateY(100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .15);
}
.sheet-wrap.open .sheet { transform: none; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--fill2); margin: 6px auto 0; flex: none; }
.sheet-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 2px 6px; flex: none; }
.sheet-head > :first-child { justify-self: start; }
.sheet-head > :last-child { justify-self: end; }
.sheet-title { font-weight: 600; font-size: 17px; text-align: center; max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 6px calc(16px + var(--sar)) calc(28px + var(--sab)) calc(16px + var(--sal)); }
.sheet.busy { pointer-events: none; }
.sheet.busy .sheet-head button[type="submit"] { opacity: .35; }

/* ── Dialoge & Toasts ── */
.dlg-wrap { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0, 0, 0, .4); opacity: 0; transition: opacity .2s; }
.dlg-wrap.open { opacity: 1; }
.dlg { width: 280px; max-width: 100%; border-radius: 14px; overflow: hidden; text-align: center; background: var(--elev); transform: scale(1.08); transition: transform .2s; }
.dlg-wrap.open .dlg { transform: none; }
.dlg-body { padding: 19px 16px 16px; }
.dlg-title { font-size: 17px; font-weight: 600; }
.dlg-text { font-size: 13px; margin-top: 4px; white-space: pre-line; }
.dlg-input { width: 100%; margin-top: 14px; padding: 8px 10px; border: .5px solid var(--sep); border-radius: 8px; background: var(--card); font-size: 16px; color: var(--text); outline: none; resize: vertical; }
.dlg-btns { display: flex; border-top: .5px solid var(--sep); }
.dlg-btns button { flex: 1; border: 0; background: none; padding: 12px 8px; color: var(--accent); font-size: 17px; }
.dlg-btns button + button { border-left: .5px solid var(--sep); }
.dlg-btns.stack { flex-direction: column; }
.dlg-btns.stack button + button { border-left: 0; border-top: .5px solid var(--sep); }
.dlg-btns .strong { font-weight: 600; }
.dlg-btns .danger { color: var(--red); }
.dlg-btns button:active { background: var(--fill); }
#toasts { position: fixed; top: calc(var(--sat) + 8px); left: 0; right: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 16px; pointer-events: none; }
.toast { max-width: 480px; padding: 12px 16px; border-radius: 14px; background: var(--elev); color: var(--text); box-shadow: 0 10px 30px rgba(0, 0, 0, .2); font-size: 15px; font-weight: 500; border-left: 4px solid var(--green); transform: translateY(-16px); opacity: 0; transition: transform .25s, opacity .25s; }
.toast.show { transform: none; opacity: 1; }
.toast.err { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--orange); }
.toast.info { border-left-color: var(--accent); }

/* ── Größere Bildschirme ── */
@media (min-width: 600px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .clock { font-size: 72px; }
}

/* ── Drucken ── */
@media print {
  :root, [data-theme="dark"] { --bg: #fff; --card: #fff; --text: #000; --text2: #444; --fill: #f2f2f2; --sep: #ccc; }
  html, body { background: #fff !important; color: #000 !important; }
  .nav, .tabbar, .no-print, .seg, .picker, .btn, #toasts, #sheets, .offline-bar { display: none !important; }
  .print-only { display: block !important; }
  .view { padding: 0; max-width: none; }
  .card, .tile { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .rtable { font-size: 11px; }
  .print-head h2 { margin: 0 0 4px; }
}
