/* Zeiterfassung – Gestaltung (angelehnt an Heimkino Hohenborn)
   Samtnacht als Grund, Leinwandlicht als Text, Messing für alles, was man wählen kann. */
:root {
  --night: #1e1a33;
  --night-deep: #16132a;
  --wall: #2a2546;
  --wall-2: #342e55;
  --line: #433c68;
  --screen: #f1ead8;
  --text: #e9e3d2;
  --muted: #a8a1bf;
  --brass: #d9b45f;
  --brass-hi: #ecca7a;
  --brass-ink: #241d0c;
  --ok: #8cc7a4;
  --wait: #e0a54f;
  --no: #e08a94;
  --seat-free: #4d4677;
  --seat-free-hi: #625a93;
  --seat-taken: #2f2a4c;

  --f-display: "Bahnschrift SemiCondensed", "Bahnschrift", "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1080px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 16px/1.55 var(--f-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--brass-hi); text-underline-offset: 3px; }
a:hover { color: var(--screen); }
:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-display); font-stretch: condensed; line-height: 1.1; margin: 0 0 .4em; font-weight: 700; letter-spacing: .005em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Kopfzeile ---------- */
.site-head { border-bottom: 1px solid var(--line); background: var(--night-deep); }
.site-head .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; }
.brand { font-family: var(--f-display); font-stretch: condensed; font-weight: 700; font-size: 1.3rem; color: var(--screen); text-decoration: none; display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand svg { width: 26px; height: 26px; flex: none; }
.nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nav a, .nav button { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 999px; font: inherit; font-size: .95rem; background: none; border: 0; cursor: pointer; }
.nav a:hover, .nav button:hover { background: var(--wall); color: var(--screen); }
.nav a[aria-current="page"] { background: var(--wall-2); color: var(--screen); }

main { flex: 1; }
.site-foot { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--muted); font-size: .9rem; margin-top: 56px; }
.site-foot .wrap { display: flex; gap: 8px 24px; flex-wrap: wrap; justify-content: space-between; }
.site-foot p { margin: 0; }

/* ---------- Knöpfe & Formulare ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .975rem/1 var(--f-body); padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--wall); color: var(--text); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .1s; white-space: nowrap; }
.btn:hover { background: var(--wall-2); border-color: var(--seat-free-hi); color: var(--screen); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brass); border-color: var(--brass); color: var(--brass-ink); }
.btn-primary:hover { background: var(--brass-hi); border-color: var(--brass-hi); color: var(--brass-ink); }
.btn-ok { background: #2f4a3d; border-color: #3f6653; color: #d4f0df; }
.btn-ok:hover { background: #375a48; border-color: var(--ok); color: #fff; }
.btn-no { background: transparent; border-color: #6b3c48; color: var(--no); }
.btn-no:hover { background: #3c2433; border-color: var(--no); color: #ffd8dd; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--wall); border-color: transparent; }
.btn-sm { padding: 7px 12px; font-size: .875rem; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: .9rem; color: var(--muted); }
.field .hint { font-size: .82rem; color: var(--muted); }
input[type="text"], input[type="search"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="datetime-local"], input[type="date"], input[type="time"], input[type="url"], textarea, select {
  width: 100%; font: inherit; color: var(--text); background: var(--night-deep); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(217, 180, 95, .2); }
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brass); }
.row { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.form-error { color: var(--no); font-size: .92rem; margin: 0 0 12px; }

/* ---------- Flächen & Hinweise ---------- */
.panel { background: var(--wall); border: 1px solid var(--line); border-radius: var(--r-md); padding: clamp(18px, 3vw, 28px); }
.notice { border-left: 3px solid var(--brass); padding: 10px 14px; background: rgba(217, 180, 95, .07); border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 0 0 18px; }
.notice.warn { border-color: var(--wait); background: rgba(224, 165, 79, .08); }
.empty-state { padding: 48px 0; text-align: center; color: var(--muted); }
.empty-state h3 { color: var(--text); }
.panel + .panel { margin-top: 24px; }

/* ---------- Anmeldung ---------- */
.page-auth { align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 440px; background: var(--wall); border: 1px solid var(--line); border-radius: var(--r-md); padding: clamp(24px, 5vw, 36px); text-align: center; }
.auth-card form { text-align: left; }
.auth-card form .btn { width: 100%; }
.auth-title { font-size: 2.1rem; color: var(--screen); }
.lede { color: #cdc6dd; }
.login-wrap { max-width: 460px; margin: 48px auto 0; }


/* ---------- Toast ---------- */
.toast-host { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 50; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--screen); color: var(--night); padding: 12px 16px; border-radius: var(--r-sm); font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.35); animation: toast-in .2s ease-out; }
.toast.error { background: #f4c8cd; color: #3a0f18; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Dialog ---------- */
dialog { background: var(--wall); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); }
dialog::backdrop { background: rgba(10, 8, 22, .7); }
.dialog-body { padding: 22px 24px; overflow: auto; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 24px 20px; border-top: 1px solid var(--line); }

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

/* =========================================================
   Verwaltung
   ========================================================= */
.admin-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 18px 0 24px; scrollbar-width: none; }
.admin-tabs button { font: 600 .98rem var(--f-body); color: var(--muted); background: none; border: 0; padding: 12px 14px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.admin-tabs button:hover { color: var(--screen); }
.admin-tabs button[aria-selected="true"] { color: var(--screen); border-bottom-color: var(--brass); }
.count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--brass); color: var(--brass-ink); font-size: .78rem; font-weight: 700; display: inline-grid; place-items: center; }
.count:empty, .count[data-n="0"] { display: none; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 18px; }
.toolbar .spacer { flex: 1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: 600 .88rem var(--f-body); padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.chip:hover { color: var(--screen); border-color: var(--seat-free-hi); }
.chip[aria-pressed="true"] { background: var(--wall-2); color: var(--screen); border-color: var(--seat-free-hi); }

/* ---------- Passwort & Einladung ---------- */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 92px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--wall-2); color: var(--text); font: 600 .8rem var(--f-body); padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.pw-toggle:hover { color: var(--screen); }
.pw-rules { list-style: none; margin: -4px 0 14px; padding: 0; font-size: .88rem; color: var(--muted); display: grid; gap: 3px; }
.pw-rules li span[aria-hidden] { display: inline-block; width: 1.2em; }
.pw-rules li.ok { color: var(--ok); }
.ok-text { color: var(--ok); }
.warn-text { color: var(--wait); }
input[readonly] { opacity: .75; }
.invite-panel { max-width: 520px; }
.form-error ul { margin: 6px 0 0; padding-left: 18px; }

/* Zertifikat */
.cert-info { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 14px 0; font-size: .93rem; }
.cert-info dt { color: var(--muted); }
.cert-info dd { margin: 0; word-break: break-word; }
.cert-info .fp { font-size: .78rem; color: var(--muted); }
/* ---------- Dashboard ---------- */
.kpis { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi { background: var(--wall); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; display: grid; align-content: center; gap: 4px; }
.kpi-main { display: flex; align-items: center; gap: 16px; }
.kpi-value { font-family: var(--f-display); font-stretch: condensed; font-weight: 700; font-size: 2.3rem; line-height: 1; color: var(--screen); font-variant-numeric: tabular-nums; }
.kpi-unit { font-size: .95rem; color: var(--muted); margin-left: 6px; }
.kpi-label { display: block; font-size: .87rem; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.dash-h { font-size: 1.3rem; margin-bottom: 14px; }
.table-scroll { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.dash-table th { text-align: left; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.dash-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dash-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* =========================================================
   Zeiterfassung
   ========================================================= */
:root { --chart-work: #b48c35; --chart-abs: #5a86e0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin: 30px 0 18px; }
.page-head h1 { margin: 0; font-size: clamp(1.9rem, 5vw, 2.8rem); color: var(--screen); }
.page-head p { margin: 4px 0 0; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.in { color: var(--ok); }
.status.pause { color: var(--wait); }
.status.out { color: var(--muted); }
.status.off { color: var(--no); }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--wall-2); color: var(--muted); margin-left: 6px; vertical-align: middle; }
.tag.warn { background: #4a2d23; color: #f2c3a0; }
.tag.hol { background: rgba(217, 180, 95, .14); color: var(--brass-hi); }
.pos { color: var(--ok); }
.neg { color: var(--no); }
.num, .tnum { font-variant-numeric: tabular-nums; }

/* Stempeluhr */
.clock-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.clock-card { text-align: center; padding: clamp(24px, 5vw, 40px) clamp(18px, 4vw, 32px); position: relative; overflow: hidden; }
.clock-card::before { content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 3px; border-radius: 0 0 6px 6px; background: var(--screen); opacity: .55; box-shadow: 0 0 40px 8px rgba(241, 234, 216, .18); }
.clock-now { font-family: var(--f-display); font-stretch: condensed; font-weight: 700; font-size: clamp(3.2rem, 12vw, 5.6rem); line-height: 1; color: var(--screen); font-variant-numeric: tabular-nums; letter-spacing: .01em; text-shadow: 0 0 40px rgba(241, 234, 216, .15); }
.clock-date { color: var(--muted); margin: 8px 0 18px; }
.clock-run { font-family: var(--f-display); font-stretch: condensed; font-size: 1.4rem; color: var(--brass-hi); margin: 14px 0 4px; min-height: 1.6em; font-variant-numeric: tabular-nums; }
.clock-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.clock-actions .btn { min-width: 150px; }
.clock-opts { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; max-width: 460px; margin: 22px auto 0; text-align: left; }
.clock-opts .field { margin: 0; }
.today-list { list-style: none; margin: 0; padding: 0; }
.today-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; font-size: .95rem; }
.today-list .t { font-family: var(--f-display); font-stretch: condensed; font-size: 1.15rem; color: var(--screen); font-variant-numeric: tabular-nums; }
.today-list .p { color: var(--muted); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 6px; }
.week-day { text-align: center; font-size: .82rem; color: var(--muted); }
.week-day .bar { height: 90px; background: rgba(255,255,255,.035); border-radius: 6px; position: relative; overflow: hidden; margin-bottom: 6px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.week-day .bar i { display: block; width: 100%; }
.week-day .bar i.w { background: var(--chart-work); border-radius: 4px 4px 0 0; }
.week-day .bar i.a { background: var(--chart-abs); border-radius: 4px 4px 0 0; }
.week-day .bar i.w + i.a, .week-day .bar i.a + i.w { border-radius: 0; }
.week-day .bar .goal { position: absolute; left: 0; right: 0; border-top: 2px dashed rgba(241, 234, 216, .45); }
.week-day.is-today { color: var(--screen); font-weight: 700; }
.week-day b { display: block; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi-value.small { font-size: 1.8rem; }
.kpi .sub { font-size: .84rem; color: var(--muted); }

/* Meine Zeiten */
.month-nav { display: flex; align-items: center; gap: 8px; }
.month-nav strong { font-family: var(--f-display); font-stretch: condensed; font-size: 1.45rem; color: var(--screen); min-width: 170px; text-align: center; }
.days { list-style: none; margin: 0; padding: 0; }
.day { display: grid; grid-template-columns: 74px minmax(0, 1fr) 190px; gap: 6px 18px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.day.is-off { opacity: .55; }
.day.is-off.has { opacity: 1; }
.day.is-today { background: linear-gradient(90deg, rgba(217, 180, 95, .08), transparent 60%); }
.day .d { font-family: var(--f-display); font-stretch: condensed; line-height: 1.05; color: var(--screen); padding-left: 6px; }
.day .d b { display: block; font-size: 1.7rem; }
.day .d span { font-size: .9rem; color: var(--brass); }
.day .items { display: grid; gap: 6px; min-width: 0; }
.item { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; font-size: .95rem; }
.item .time { font-variant-numeric: tabular-nums; color: var(--screen); font-weight: 600; }
.item .proj { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .88rem; }
.item .proj i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.item .note { color: #cdc6dd; font-size: .88rem; overflow-wrap: anywhere; }
.item .acts { margin-left: auto; display: flex; gap: 4px; }
.day .sum { text-align: right; font-size: .9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.day .sum b { color: var(--screen); font-size: 1.05rem; }
.absence { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: rgba(90, 134, 224, .16); color: #b9cdf5; }
.absence.sick { background: rgba(224, 138, 148, .14); color: #f3c5cb; }
.absence.comp { background: rgba(168, 161, 191, .14); color: var(--text); }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--wall-2); color: var(--screen); }
.icon-btn svg { width: 17px; height: 17px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; background: var(--night-deep); }
.seg button { font: 600 .88rem var(--f-body); color: var(--muted); background: none; border: 0; border-radius: 999px; padding: 7px 13px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--wall-2); color: var(--screen); }

/* Auswertung */
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 22px; }
.filters select, .filters input { width: auto; }
.filters .spacer { flex: 1; }
.chart-panel { margin-bottom: 24px; }
.chart-head { display: flex; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; align-items: baseline; margin-bottom: 10px; }
.chart-head h2 { font-size: 1.3rem; margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .87rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend i.goal { height: 0; width: 16px; border-top: 2px dashed rgba(241, 234, 216, .6); border-radius: 0; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: rgba(255,255,255,.07); }
.chart .axis text { fill: var(--muted); font: 12px var(--f-body); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover { fill: rgba(255,255,255,.04); }
.tip { position: absolute; pointer-events: none; z-index: 5; background: var(--night-deep); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; font-size: .85rem; box-shadow: 0 10px 30px rgba(0,0,0,.4); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }
.tip b { color: var(--screen); display: block; margin-bottom: 2px; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bars li { display: grid; grid-template-columns: minmax(90px, 180px) minmax(0, 1fr) 70px; gap: 12px; align-items: center; font-size: .92rem; }
.bars .name { display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .name i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.bars .track { height: 12px; background: rgba(255,255,255,.04); border-radius: 4px; overflow: hidden; }
.bars .track i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.bars .val { text-align: right; font-variant-numeric: tabular-nums; }
.dash-table tfoot td { font-weight: 700; color: var(--screen); border-top: 2px solid var(--line); border-bottom: 0; }
.dash-table a { color: var(--screen); text-decoration: none; }
.dash-table a:hover { color: var(--brass-hi); }
.dash-table tr.is-inactive td { opacity: .55; }

/* Verwaltung */
.who { display: grid; gap: 2px; }
.who strong { color: var(--screen); }
.who small { color: var(--muted); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.presence { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.presence li { background: var(--wall); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; display: grid; gap: 6px; }
.presence li strong { color: var(--screen); }
.weekdays { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.weekdays label { display: inline-flex; }
.weekdays input { position: absolute; opacity: 0; pointer-events: none; }
.weekdays span { font: 600 .88rem var(--f-body); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); cursor: pointer; }
.weekdays input:checked + span { background: var(--wall-2); border-color: var(--brass); color: var(--screen); }
.weekdays input:focus-visible + span { outline: 2px solid var(--brass-hi); outline-offset: 2px; }
.secret { font: 700 1.25rem/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--night-deep); border: 1px dashed var(--brass); border-radius: var(--r-sm); padding: 12px 14px; text-align: center; color: var(--screen); user-select: all; letter-spacing: .03em; }
.swatch { width: 18px; height: 18px; border-radius: 5px; display: inline-block; vertical-align: middle; margin-right: 8px; }
input[type="color"] { width: 54px; height: 40px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--night-deep); }
.sys-msgs { list-style: none; margin: 0; padding: 0; }
.sys-msgs li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.sys-msgs time { color: var(--muted); font-size: .84rem; margin-right: 8px; }

@media (max-width: 860px) {
  .clock-grid, .dash-grid { grid-template-columns: 1fr; }
  .kpis, .kpis.five, .kpis.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .day { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 4px 10px; padding: 10px 0; }
  .day .sum { font-size: .82rem; }
  .item .acts { margin-left: 0; }
  .day .d b { font-size: 1.4rem; }
  .clock-opts { grid-template-columns: 1fr; }
  .bars li { grid-template-columns: minmax(80px, 120px) minmax(0, 1fr) 60px; }
  .kpi-value { font-size: 1.9rem; }
  .site-head .wrap { gap: 8px; }
  .nav a, .nav button { padding: 7px 9px; font-size: .9rem; }
}
@media print {
  .site-head, .site-foot, .filters, .btn { display: none !important; }
}
.clock-run:empty { min-height: 0; margin: 0; }
.dash-grid > .panel + .panel, .clock-grid > .panel + .panel { margin-top: 0; }
.btn svg { width: 16px; height: 16px; flex: none; }
.status { white-space: nowrap; }
.dash-table td .muted.small { white-space: nowrap; }

/* Handy / iPhone-App: Navigation als Leiste unten */
@media (max-width: 620px) {
  .site-head .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(22, 19, 42, .97); backdrop-filter: blur(8px); border-top: 1px solid var(--line);
    justify-content: space-around; flex-wrap: nowrap; gap: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .site-head .nav a, .site-head .nav button { font-size: .8rem; padding: 9px 7px; }
  .site-head .wrap { min-height: 52px; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .toast-host { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* Auswahl als Segmente (Radio) */
.seg-opt { display: inline-flex; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { font: 600 .88rem var(--f-body); color: var(--muted); border-radius: 999px; padding: 7px 13px; cursor: pointer; }
.seg-opt input:checked + span { background: var(--wall-2); color: var(--screen); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--brass-hi); outline-offset: 2px; }
[hidden] { display: none !important; }
