/* Badewannendoktor Zeiterfassung – Thema „Emaille & Fliesen“ */
@font-face {
  font-family: "Bricolage"; src: url("/static/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800; font-display: swap;
}
:root {
  --brand: #0a3d62;          /* Tiefwasser – per BRAND_PRIMARY überschreibbar */
  --accent: #e8a317;
  --water: #1e88c8;
  --water-soft: #e3f1fa;
  --enamel: #fbfcfd;
  --grout: #e7edf2;
  --grout-dark: #d5dee6;
  --text: #16212c;
  --muted: #627181;
  --line: #e1e8ee;
  --duck: #ffc93c;
  --ok: #1f9d6b; --ok-bg: #e4f6ee;
  --warn: #9a6400; --warn-bg: #fff4d9;
  --bad: #d64545; --bad-bg: #fdeaea;
  --info: #1e6fa8; --info-bg: #e6f1fa;
  --display: "Bricolage", ui-sans-serif, system-ui, sans-serif;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r-tile: 18px; --r-card: 22px; --r-ctl: 9px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--text); background: radial-gradient(1200px 500px at 85% -10%, #dcebf6 0%, transparent 60%), #eef2f6; background-attachment: fixed; }
a { color: var(--water); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.015em; font-weight: 700; }
h1 { font-size: 1.75rem; margin: 0; line-height: 1.15; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
h3 { font-size: .98rem; margin: .5rem 0 .25rem; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; } .neg { color: var(--bad); } .warn-text { color: var(--warn); } .note { color: var(--info); }
.top-gap { margin-top: 1rem; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--water) 55%, transparent); outline-offset: 2px; }

/* Kopfzeile: hell, gläsern */
.topbar { background: rgba(251,252,253,.82); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  color: var(--text); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(10,61,98,.08); }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: .55rem 16px; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: .65rem; color: var(--brand); text-decoration: none; }
.logo img { height: 34px; }
.logo-mark { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--brand); }
.logo-mark svg { width: 25px; height: 25px; }
.logo-mark.big { width: 64px; height: 64px; border-radius: 20px; }
.logo-mark.big svg { width: 42px; height: 42px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-text strong { font-family: var(--display); font-size: 1.08rem; font-weight: 750; letter-spacing: -.02em; }
.logo-text small { color: var(--muted); font-size: .78rem; }
.mainnav { display: flex; gap: .2rem; flex: 1; flex-wrap: wrap; align-items: center; }
.mainnav > a, .navmenu summary { color: #3c4a58; text-decoration: none; padding: .45rem .85rem; border-radius: 99px; cursor: pointer; list-style: none; font-weight: 600; font-size: .93rem; }
.navmenu summary::-webkit-details-marker { display: none; }
.mainnav > a:hover, .navmenu summary:hover { background: rgba(10,61,98,.06); }
.mainnav > a.on, .navmenu.on summary { background: var(--brand); color: #fff; }
.navmenu { position: relative; }
.navmenu-list { position: absolute; top: 2.6rem; left: 0; background: var(--enamel); border-radius: 14px; box-shadow: 0 16px 40px rgba(10,61,98,.18); padding: .35rem; min-width: 230px; }
.navmenu-list a { display: block; padding: .5rem .75rem; color: var(--text); text-decoration: none; border-radius: 9px; }
.navmenu-list a:hover { background: var(--grout); }
.userbox { display: flex; align-items: center; gap: .8rem; }
.userbox .who { text-align: right; line-height: 1.15; font-weight: 600; }
.userbox .who small { color: var(--muted); display: block; font-size: .74rem; font-weight: 500; }
.linkbtn { background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; padding: 0; }

.container { max-width: 1240px; margin: 0 auto; padding: 1.4rem 16px 3rem; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 1.5rem 16px 2rem; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin: .25rem 0 1.1rem; }

/* Flächen */
.card { background: var(--enamel); border-radius: var(--r-card); padding: 1.25rem 1.35rem; margin-bottom: 1rem; box-shadow: 0 1px 2px rgba(16,40,64,.05), 0 10px 30px rgba(16,40,64,.05); }
.card.narrow { max-width: 520px; margin: 3rem auto; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.card-head h2 { margin: 0; }
.card-alert { box-shadow: inset 4px 0 0 var(--accent), 0 1px 0 var(--grout-dark); }
.card-live { padding-top: 1.4rem; }
.card.inactive { opacity: .6; }
.card-admin { box-shadow: inset 4px 0 0 var(--bad), 0 1px 0 var(--grout-dark); }
.card-admin summary { cursor: pointer; }

/* Cockpit (Startseite) */
.cockpit { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.1rem; align-items: start; }
.cockpit-side { position: sticky; top: 76px; }
.side-link { margin: .25rem .25rem 0; font-size: .9rem; }

.hero { --act: #1e88c8; position: relative; overflow: hidden; color: #fff; border-radius: 26px; padding: 1.25rem 1.4rem 1.3rem; margin-bottom: 1rem;
  background:
    radial-gradient(600px 260px at 100% 0%, color-mix(in srgb, var(--act) 55%, transparent) 0%, transparent 70%),
    radial-gradient(500px 300px at -10% 120%, rgba(30,136,200,.45) 0%, transparent 70%),
    linear-gradient(160deg, #0d4a74 0%, #0a3d62 45%, #072b46 100%);
  box-shadow: 0 18px 40px rgba(10,61,98,.28); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: linear-gradient(180deg, #000, transparent 80%); }
.hero > * { position: relative; z-index: 1; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.hero-chip { display: inline-flex; align-items: center; gap: .45rem; font-size: .82rem; font-weight: 600; padding: .28rem .75rem; border-radius: 99px; background: rgba(255,255,255,.12); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #6ee7b7; box-shadow: 0 0 0 0 rgba(110,231,183,.7); animation: ping 2s infinite; }
.hero-total { font-size: .85rem; color: rgba(255,255,255,.75); }
.hero-total b { color: #fff; font-family: var(--display); font-weight: 650; font-size: 1rem; margin-left: .25rem; }
.hero-body { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin: 1.4rem 0 1.1rem; }
.hero h1 { font-size: 2.1rem; font-weight: 750; letter-spacing: -.03em; margin: 0; color: #fff; }
.hero-sub { color: rgba(255,255,255,.72); font-size: .95rem; margin: .2rem 0 0; display: block; }
.hero-act { display: flex; align-items: center; gap: .9rem; }
.hero-ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--act); box-shadow: 0 8px 20px color-mix(in srgb, var(--act) 45%, transparent); flex: none; }
.hero-ico svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hero-timer { font-family: var(--display); font-size: clamp(3rem, 7vw, 4.6rem); font-weight: 700; letter-spacing: -.04em; line-height: .9; font-variant-numeric: tabular-nums; }
.timeline { position: relative; height: 14px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.tl-seg { position: absolute; top: 0; bottom: 0; background: var(--c); border-right: 2px solid #0a3d62; }
.tl-seg.tl-pause { background: repeating-linear-gradient(45deg, rgba(255,201,60,.9) 0 5px, rgba(255,201,60,.45) 5px 10px); }
.tl-seg.tl-live { animation: glow 2s ease-in-out infinite; }
.timeline-scale { display: flex; justify-content: space-between; font-size: .75rem; color: rgba(255,255,255,.6); margin-top: .3rem; }
.hero-undo { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-top: 1rem;
  background: rgba(255,201,60,.16); border: 1px solid rgba(255,201,60,.45); border-radius: 16px; padding: .55rem .55rem .55rem .9rem; }
.hero-undo span { color: #ffe6a3; } .hero-undo strong { color: #fff; }
.hero-pause-box { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-top: 1rem; padding: .7rem .8rem; border-radius: 16px; background: rgba(255,255,255,.1); }
.hero-pause-box p { margin: 0; flex: 1; min-width: 180px; color: rgba(255,255,255,.85); }
.hero-pause-box p strong { color: #fff; }
.duck-mini { width: 46px; height: 46px; flex: none; animation: bob 2.6s ease-in-out infinite; }
.hero-stop { display: flex; justify-content: flex-end; align-items: center; gap: .9rem; flex-wrap: wrap; margin-top: 1.1rem; }
.hero-reminder { font-size: .85rem; color: #ffe6a3; flex: 1; min-width: 200px; }
.btn-stop { background: #fff; color: #b42318; border-color: #fff; font-weight: 700; padding: .6rem 1.2rem; }
.btn-stop:hover { background: #fff; color: #8f1a12; box-shadow: 0 6px 18px rgba(0,0,0,.18); }

/* Tätigkeits-Kacheln */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: .7rem; }
.tile { --c: #1e88c8; position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: .9rem;
  min-height: 112px; padding: .9rem .95rem; border: 0; border-radius: var(--r-tile); cursor: pointer; text-align: left;
  background: var(--enamel); color: var(--text); font: inherit;
  box-shadow: 0 1px 2px rgba(16,40,64,.06), 0 6px 18px rgba(16,40,64,.05), inset 0 0 0 1px rgba(16,40,64,.04);
  transition: transform .12s ease, box-shadow .18s ease; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16,40,64,.06), 0 14px 28px rgba(16,40,64,.1), inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent); }
.tile:active { transform: translateY(0) scale(.98); }
.tile-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 13%, #fff); color: var(--c); transition: transform .2s; }
.tile-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tile:hover .tile-ico { transform: scale(1.06) rotate(-4deg); }
.tile-label { font-family: var(--display); font-weight: 650; font-size: 1.02rem; letter-spacing: -.015em; line-height: 1.15; }
.tile-state { position: absolute; top: .8rem; right: .85rem; font-size: .72rem; font-weight: 700; padding: .12rem .5rem; border-radius: 99px; background: rgba(255,255,255,.25); color: #fff; }
.tile.on { background: var(--c); color: #fff; cursor: default; transform: none;
  box-shadow: 0 12px 26px color-mix(in srgb, var(--c) 40%, transparent); }
.tile.on .tile-ico { background: rgba(255,255,255,.2); color: #fff; }
.tile-ico.mini { width: 28px; height: 28px; border-radius: 9px; display: inline-grid; vertical-align: middle; margin-right: .5rem; }
.tile-ico.mini svg { width: 16px; height: 16px; }
.free-entry { margin-top: .8rem; background: var(--enamel); border-radius: var(--r-tile); padding: .75rem .95rem; box-shadow: 0 1px 2px rgba(16,40,64,.05); }
.free-entry summary { cursor: pointer; font-weight: 650; color: #3c4a58; list-style: none; }
.free-entry summary::-webkit-details-marker { display: none; }
.free-entry .row-form { margin-top: .7rem; }

/* Heute-Spalte */
.side-card { padding: 1.1rem 1.15rem; }
.today-list { list-style: none; margin: 0; padding: 0; position: relative; }
.today-list::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.today-list li { --c: #1e88c8; position: relative; display: flex; align-items: flex-start; gap: .7rem; padding: .45rem 0; }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); border: 3px solid var(--enamel); box-shadow: 0 0 0 1px var(--line); flex: none; margin-top: .2rem; z-index: 1; }
.today-list li.is-live .tl-dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }
.today-list li.is-pause .today-name { color: var(--muted); }
.today-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.today-name { font-weight: 600; line-height: 1.25; }
.today-time { font-size: .8rem; color: var(--muted); }
.today-dur { font-family: var(--display); font-weight: 650; font-variant-numeric: tabular-nums; font-size: .92rem; }
.today-list li.is-live .today-dur { color: var(--water); }

@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(110,231,183,.6) } 80%, 100% { box-shadow: 0 0 0 8px rgba(110,231,183,0) } }
@keyframes glow { 0%, 100% { filter: brightness(1) } 50% { filter: brightness(1.35) } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg) } 50% { transform: translateY(-4px) rotate(4deg) } }

/* Formulare */
label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; font-weight: 600; color: #34414e; }
label small { font-weight: 400; }
input, select, textarea { font: inherit; font-size: .95rem; padding: .55rem .65rem; border: 1px solid #cfd9e2; border-radius: var(--r-ctl); background: #fff; color: var(--text); width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--water) 30%, transparent); border-color: var(--water); }
textarea { resize: vertical; }
label.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; }
label.check input { width: auto; accent-color: var(--water); }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: .75rem .9rem .9rem; margin: 0; }
legend { font-weight: 700; font-size: .85rem; padding: 0 .35rem; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: .8rem; }
.stack.compact { gap: .35rem; }
.row-form { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.row-form label { min-width: 120px; }
.row-form .grow { flex: 1; min-width: 200px; }
.row-form.compact { gap: .4rem; align-items: center; }
.row-form.compact input, .row-form.compact select { width: auto; }
.grid2, .grid3, .grid4 { display: grid; gap: .8rem; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.hint { margin: 0 0 .5rem; font-size: .85rem; color: var(--info); background: var(--info-bg); padding: .45rem .65rem; border-radius: 8px; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.check-list { display: flex; flex-direction: column; gap: .35rem; }
.check-list .check { font-weight: 400; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 600; font-size: .92rem;
  padding: .55rem 1rem; border-radius: 99px; border: 1px solid #cfd9e2; background: #fff; color: var(--text); text-decoration: none; cursor: pointer; transition: filter .12s, background .12s; }
.btn:hover { background: var(--grout); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand); filter: brightness(1.15); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: var(--bad); filter: brightness(1.06); }
.btn-ghost { background: transparent; }
.btn-small { padding: .32rem .7rem; font-size: .82rem; }
.btn-lg { padding: .75rem 1.6rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn-undo { background: var(--accent); border-color: var(--accent); color: #fff; font-size: 1rem; padding: .6rem 1.2rem; }
.btn-undo:hover { background: var(--accent); filter: brightness(1.06); }

/* Meldungen */
.flash { padding: .75rem 1rem; border-radius: 12px; margin-bottom: 1rem; white-space: pre-line; }
.flash ul { margin: .35rem 0 0 1.1rem; padding: 0; white-space: normal; }
.flash-ok { background: var(--ok-bg); color: #10603f; }
.flash-error { background: var(--bad-bg); color: #8f2222; }
.flash-warn { background: var(--warn-bg); color: #6f4800; }
.flash-info { background: var(--info-bg); color: #164f7a; }
.block-link { display: block; text-decoration: none; }

/* Tabellen */
.table-wrap { overflow-x: auto; margin: 0 -.2rem; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .8rem; color: var(--muted); font-weight: 600; padding: .45rem .55rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .6rem .55rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table.small td { padding: .35rem .55rem; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.row-pause td { color: var(--muted); }
.row-live td { background: var(--water-soft); }
.row-live td:first-child { border-radius: 8px 0 0 8px; } .row-live td:last-child { border-radius: 0 8px 8px 0; }
.row-free td { background: #f7f9fb; }
tr.row-removed td { opacity: .45; text-decoration: line-through; }
tr.row-removed td:last-child { opacity: 1; text-decoration: none; }
.inline-edit summary { cursor: pointer; color: var(--water); font-size: .85rem; }
.inline-edit form { margin-top: .5rem; min-width: 240px; }
pre.report { background: var(--grout); padding: .8rem; border-radius: 12px; white-space: pre-wrap; font-size: .9rem; margin: .5rem 0; }
ul.plain { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }

.badge { display: inline-block; font-size: .74rem; font-weight: 650; padding: .14rem .55rem; border-radius: 99px; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); } .badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); } .badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: var(--grout); color: var(--muted); }
.status { font-size: .8rem; font-weight: 650; padding: .16rem .6rem; border-radius: 99px; background: var(--grout); }
.status-LAUFEND { background: var(--water-soft); color: var(--brand); }
.status-STOPPED_AWAITING_REPORT { background: var(--bad-bg); color: var(--bad); }
.status-ABGESCHLOSSEN { background: var(--grout); color: #34414e; }
.status-KORREKTUR_DURCH_PRUEFER { background: var(--warn-bg); color: var(--warn); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .4rem; }
.dot-ok { background: var(--ok); } .dot-warn { background: #e0a100; } .dot-bad { background: var(--bad); }
.remove-chk { color: var(--muted); white-space: nowrap; font-weight: 500; }

.tabs { display: flex; gap: .25rem; flex-wrap: wrap; background: var(--grout); padding: 3px; border-radius: 99px; }
.tabs a { padding: .3rem .75rem; border-radius: 99px; text-decoration: none; color: var(--muted); font-size: .85rem; font-weight: 600; }
.tabs a.on { background: var(--enamel); color: var(--brand); box-shadow: 0 1px 2px rgba(10,61,98,.12); }

/* Kennzahlen & Diagramme */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.kpi { background: var(--grout); border-radius: 12px; padding: .65rem .8rem; }
.kpi span { display: block; font-size: .78rem; color: var(--muted); }
.kpi strong { font-family: var(--display); font-size: 1.3rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.chart { width: 100%; max-width: 760px; height: auto; margin-top: .75rem; display: block; }
.c-label { font-size: 12px; fill: var(--text); }
.c-val, .c-leg { font-size: 11px; fill: var(--muted); }
.c-exp { fill: #d3e3f0; } .c-range { fill: #e8f1f8; }
.c-act { fill: var(--brand); } .c-act.over { fill: var(--accent); }
.c-grid { stroke: var(--line); }
polyline { fill: none; stroke-width: 2.25; }
.t-total { stroke: #9aa7b6; fill: #9aa7b6; } polyline.t-total { fill: none; }
.t-act { stroke: var(--brand); fill: var(--brand); } polyline.t-act { fill: none; }
.t-exp { stroke: var(--accent); fill: var(--accent); stroke-dasharray: 5 4; } polyline.t-exp { fill: none; } circle.t-exp { stroke-dasharray: 0; }
.leg { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin: 0 .25rem 0 .75rem; }
.t-total-l { background: #9aa7b6; } .t-act-l { background: var(--brand); } .t-exp-l { background: var(--accent); }
.ampel { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 1rem; }
.ampel-day { width: 30px; height: 28px; display: grid; place-items: center; border-radius: 7px; font-size: .74rem; font-weight: 700; color: #fff; }
.ampel-ok { background: var(--ok); } .ampel-warn { background: #e0a100; } .ampel-bad { background: var(--bad); } .ampel-abs { background: #aab4c0; }

/* Anmeldung */
.auth { max-width: 400px; margin: 4rem auto 0; }
.auth-brand { text-align: center; margin-bottom: 1.25rem; }
.auth-brand img { max-height: 64px; }
.auth-brand h1 { margin-top: .7rem; } .auth-brand p { margin: .15rem 0 0; color: var(--muted); }
.auth-card { display: flex; flex-direction: column; gap: .9rem; padding: 1.6rem; }

/* Mengenabfrage nach Tätigkeitsende */
.card-details { --c: var(--accent); background: var(--enamel); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 45%, transparent), 0 14px 30px rgba(16,40,64,.08); }
.details-head { display: flex; align-items: center; gap: .75rem; }
.details-head > div { display: flex; flex-direction: column; }
.ico-chip { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); flex: none; }
.ico-chip svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.details-head { margin-bottom: .8rem; }
.details-row { display: flex; gap: .9rem; align-items: flex-end; flex-wrap: wrap; }
.details-row .grow { flex: 1; min-width: 220px; }
.details-q { flex-basis: 100%; font-weight: 650; font-size: .9rem; margin-bottom: -.4rem; }
.stepper { display: inline-flex; align-items: stretch; }
.stepper input { width: 80px; text-align: center; font-family: var(--display); font-size: 1.25rem; font-weight: 700; border-radius: 0; }
.stepper .btn { border-radius: 0; font-size: 1.15rem; padding: 0 .95rem; }
.stepper .btn:first-child { border-radius: 99px 0 0 99px; }
.stepper .btn:last-child { border-radius: 0 99px 99px 0; }

/* Tagesabschluss */
.close-table td { vertical-align: middle; }
.close-table .t-in { width: 108px; padding: .35rem .45rem; }
.close-table .q-in { width: 80px; padding: .35rem .45rem; }
.close-table .q-in.missing { border-color: var(--accent); background: #fffaf0; }
.qty-cell { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.parts-cell { display: flex; flex-direction: column; gap: .3rem; }
.sticky-actions { position: sticky; bottom: 0; background: var(--grout); padding: .8rem 0; z-index: 5; }

/* Pause: Wanne läuft voll */
.tub-box { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: 1.1rem; padding: .9rem 1rem; border-radius: 18px; background: rgba(255,255,255,.08); }
.tub { width: 240px; max-width: 100%; height: auto; flex: none; overflow: visible; }
.tub-tap { fill: none; stroke: #c9d6e2; stroke-width: 6; stroke-linecap: round; }
.tub-stream { stroke: #7cc6f0; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 6 6; animation: stream .5s linear infinite; }
.tub-wave { fill: #2aa0e4; animation: tubwave 3s linear infinite; }
.tub-bubble { fill: rgba(255,255,255,.7); animation: rise 3s ease-in infinite; }
.tub-bubble.b2 { animation-delay: 1s; } .tub-bubble.b3 { animation-delay: 2s; }
.tub-rim { stroke: #fff; stroke-width: 7; stroke-linecap: round; }
.tub-body { fill: none; stroke: #fff; stroke-width: 5; }
.tub-feet { stroke: #fff; stroke-width: 5; stroke-linecap: round; }
.tub-foam { fill: #fff; opacity: 0; transition: opacity 1s; }
.tub-foam circle { animation: foam 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.tub-foam circle:nth-child(2n) { animation-delay: .6s; }
.tub-box.is-full .tub-foam { opacity: 1; }
.tub-box.is-full .tub-stream { stroke: #ffc93c; }
.tub-text { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: .2rem; }
.tub-text strong { font-family: var(--display); font-size: 1.3rem; font-weight: 700; color: #fff; }
.tub-text span { color: rgba(255,255,255,.8); }
.tub-text small { color: rgba(255,255,255,.6); margin-top: .2rem; }
.btn-end { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35); font-weight: 700; padding: .5rem 1.05rem; }
.btn-end:hover { background: rgba(255,255,255,.24); }
.hero-right { display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }
@keyframes tubwave { from { transform: translateX(0) } to { transform: translateX(-80px) } }
@keyframes stream { to { stroke-dashoffset: -12 } }
@keyframes rise { 0% { transform: translateY(40px); opacity: 0 } 30% { opacity: 1 } 100% { transform: translateY(-10px); opacity: 0 } }
@keyframes foam { 0%, 100% { transform: scale(1) } 50% { transform: scale(1.15) } }

/* Mengenabfrage-Dialog */
.details-dialog { --c: var(--water); width: min(520px, calc(100% - 24px)); border: 0; padding: 0; border-radius: 26px; background: var(--enamel); color: var(--text);
  box-shadow: 0 30px 80px rgba(7,43,70,.45); }
.details-dialog[open] { animation: dlg-in .22s cubic-bezier(.2,.9,.3,1.2); }
.details-dialog::backdrop { background: rgba(7,43,70,.55); backdrop-filter: blur(4px); }
.details-form { display: flex; flex-direction: column; gap: 1rem; padding: 1.4rem 1.4rem 1.2rem; border-top: 6px solid var(--c); }
.dlg-head { display: flex; gap: .9rem; align-items: flex-start; }
.dlg-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--c); color: #fff; flex: none;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--c) 40%, transparent); }
.dlg-ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dlg-kicker { font-size: .85rem; color: var(--muted); font-weight: 600; }
.dlg-head h2 { font-size: 1.45rem; margin: .1rem 0 0; line-height: 1.2; }
.dlg-fields { display: flex; flex-direction: column; gap: .9rem; }
.dlg-field { display: flex; flex-direction: column; gap: .45rem; align-items: flex-start; }
.dlg-label { font-weight: 700; font-size: .95rem; }
.stepper.big input { width: 110px; height: 58px; font-size: 1.8rem; }
.stepper.big .btn { font-size: 1.5rem; padding: 0 1.2rem; }
.quick { display: flex; gap: .35rem; flex-wrap: wrap; }
.quick-btn { font: inherit; font-weight: 650; min-width: 42px; padding: .35rem .6rem; border-radius: 99px; border: 1px solid #cfd9e2; background: #fff; cursor: pointer; }
.quick-btn:hover { border-color: var(--c); color: var(--c); }
.dlg-note { font-size: .85rem; }
.dlg-actions { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; align-items: center; }
.dlg-foot { margin: 0; font-size: .82rem; color: var(--muted); }
.hero-open { display: block; margin-top: .9rem; padding: .6rem .9rem; border-radius: 14px; background: rgba(232,163,23,.2); border: 1px solid rgba(255,201,60,.55); color: #ffe6a3; text-decoration: none; }
.hero-open b { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 99px; background: var(--duck); color: #3e2c00; margin-right: .35rem; font-size: .85rem; }
.hero-open:hover { background: rgba(232,163,23,.3); }
@keyframes dlg-in { from { transform: translateY(14px) scale(.97); opacity: 0 } to { transform: none; opacity: 1 } }
@media (max-width: 560px) {
  .details-dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 24px 24px 0 0; }
  .dlg-actions .btn { width: 100%; }
  .dlg-actions { flex-direction: column-reverse; }
}

@media (max-width: 1000px) {
  .cockpit { grid-template-columns: 1fr; }
  .cockpit-side { position: static; }
}
@media (max-width: 800px) {
  .grid3, .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .userbox .who { display: none; }
  .timer-big { font-size: 2.3rem; }
}
@media (max-width: 560px) {
  .grid2, .grid3, .grid4 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .row-form > * { flex: 1 1 100%; }
  .row-form.compact > * { flex: 0 0 auto; }
  .topbar-inner { gap: .5rem; }
  .mainnav { order: 3; flex-basis: 100%; }
  .btn-lg, .btn-undo { width: 100%; }
  .stop-form { justify-content: stretch; }
  .card { padding: 1rem; border-radius: 16px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .tile { min-height: 96px; padding: .8rem; }
  .hero { padding: 1.05rem 1.05rem 1.1rem; border-radius: 22px; }
  .hero h1 { font-size: 1.6rem; }
  .hero-body { margin: 1rem 0 .9rem; }
  .hero-stop .btn-stop { width: 100%; }
  .hero-right { align-items: stretch; width: 100%; }
  .btn-end { width: 100%; }
  .tub { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input[type=number] { -moz-appearance: textfield; appearance: textfield; }
