:root{--bg:#0b0d12;--card:#151a24;--card2:#1e2433;--line:#262d3d;--txt:#f1f4fa;--muted:#8d97ad;--ok:#22c55e;--warn:#f59e0b;--crit:#f97316;--over:#ef4444;--acc:#6366f1}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0;background:var(--bg);color:var(--txt);font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;-webkit-tap-highlight-color:transparent}
button,input,select,textarea{font:inherit;color:inherit}
body.idle{cursor:none}

.iconbtn{background:var(--card2);border:0;border-radius:12px;width:44px;height:44px;font-size:1.3rem;cursor:pointer}
.iconbtn:active{filter:brightness(1.4)}

/* Fortschrittsbalken inkl. Minus-Bereich */
.bar{--bar-h:34px;display:flex;height:var(--bar-h);border-radius:999px;overflow:hidden;background:#1d2230;--c:#475569}
.bar-slot{flex:0 0 78%;position:relative;overflow:hidden}
.bar-fill{height:100%;width:0;background:var(--c);transition:width .3s linear}
.bar-over{flex:1;position:relative;border-left:4px solid #fff;background:repeating-linear-gradient(135deg,#2a1216 0 8px,#1d0c10 8px 16px)}
.bar-over::after{content:'MINUS';position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:calc(var(--bar-h)*.38);font-weight:800;letter-spacing:.2em;color:#ffffff55;pointer-events:none}
.bar-ofill{height:100%;width:0;background:var(--over);transition:width .3s linear;position:relative;z-index:1}
.bar[data-s=ok]{--c:var(--ok)}
.bar[data-s=warn]{--c:var(--warn)}
.bar[data-s=crit]{--c:var(--crit)}
.bar[data-s=over]{--c:var(--over)}
.bar[data-s=over] .bar-ofill{animation:flash 1s steps(2) infinite}

.chip{display:inline-block;padding:.35rem .8rem;border-radius:999px;background:var(--card2);font-weight:700;font-size:.95rem}
.chip.late{background:#7c2d12;color:#fed7aa}
.chip.early{background:#14532d;color:#bbf7d0}
.chip.pause{background:#78350f;color:#fde68a}

.btn{border:0;border-radius:14px;background:var(--card2);padding:.9rem 1rem;font-weight:700;cursor:pointer;min-height:52px;font-size:1rem}
.btn:active{filter:brightness(1.3)}
.btn:disabled{opacity:.4;cursor:not-allowed}
.btn.primary{background:var(--acc)}
.btn.danger{background:#b91c1c}
.btn.big{width:100%;font-size:1.15rem}
.btn.huge{width:100%;min-height:84px;font-size:1.3rem;background:#16a34a}
.btn.sm{min-height:40px;padding:.4rem .8rem;font-size:.9rem}

.overlay{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;text-align:center;padding:2rem}
.emergency{background:#b91c1c;animation:emg 1s steps(2) infinite}
.emergency .big{font-size:clamp(3rem,12vw,10rem);font-weight:900;line-height:1}
.emergency p{font-size:clamp(1.5rem,5vw,4rem);font-weight:800;margin:1rem 0 0}
.infoscr{background:#0b0d12}
.infoscr p{font-size:clamp(2rem,7vw,7rem);font-weight:800;margin:0}

body.offline::before{content:'⚠ Verbindung unterbrochen – verbinde neu …';position:fixed;top:0;left:0;right:0;z-index:300;background:#b45309;color:#fff;text-align:center;padding:.3rem;font-size:.9rem}

@keyframes flash{50%{opacity:.45}}
@keyframes emg{50%{background:#7f1d1d}}
