@font-face { font-family: Onest; font-weight: 400; font-display: swap; src: url(/app/fonts/onest-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Onest; font-weight: 500; font-display: swap; src: url(/app/fonts/onest-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Onest; font-weight: 600; font-display: swap; src: url(/app/fonts/onest-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Onest; font-weight: 700; font-display: swap; src: url(/app/fonts/onest-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Onest; font-weight: 800; font-display: swap; src: url(/app/fonts/onest-latin-800-normal.woff2) format('woff2'); }

:root { --y: #FFD60A; --k: #0A0A0A; --w: #FFFFFF; --g: #555555; --l: #EDEDED; --r: 24px; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--y); color: var(--k); font-family: Onest, system-ui, sans-serif; font-size: 15px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--k); }
:focus-visible { outline: 3px solid var(--k); outline-offset: 2px; }
.boot { padding: 40px; font-weight: 700; }
h1 { margin: 0; font-size: clamp(34px, 5vw, 52px); line-height: 1; font-weight: 800; letter-spacing: -1.6px; }
h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.muted { color: var(--g); }
.small { font-size: 13px; }
.kicker { font-size: 14px; font-weight: 700; }

/* Layout */
.shell { display: flex; min-height: 100vh; align-items: flex-start; }
.side { position: sticky; top: 0; width: 250px; flex: none; padding: 28px 18px; display: flex; flex-direction: column; gap: 4px; min-height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 800; letter-spacing: -0.8px; padding: 0 12px 22px; }
.brand img { width: 36px; height: 36px; }
.nav { text-align: left; padding: 12px 16px; border: 0; border-radius: 22px; background: transparent; font-weight: 600; }
.nav[aria-current="page"] { background: var(--k); color: var(--w); font-weight: 800; }
.nav:hover:not([aria-current="page"]) { background: rgba(0,0,0,.07); }
.side .foot { margin-top: auto; padding: 12px; font-size: 13px; }
.main { flex: 1; min-width: 0; padding: 32px 36px 64px; display: flex; flex-direction: column; gap: 22px; max-width: 1120px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.between { justify-content: space-between; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* Bausteine */
.card { background: var(--w); border-radius: var(--r); padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.card.dark { background: var(--k); color: var(--w); }
.card.dark .accent { color: var(--y); }
.stat { font-size: 32px; line-height: 1; font-weight: 800; letter-spacing: -1px; }
.btn { min-height: 46px; padding: 0 20px; border-radius: 23px; border: 2px solid var(--k); background: var(--k); color: var(--w); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--k); }
.btn.light { background: var(--y); color: var(--k); border-color: var(--y); }
.btn.white { background: var(--w); color: var(--k); border-color: var(--w); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.pill { min-height: 40px; padding: 0 16px; border-radius: 20px; border: 2px solid var(--k); background: transparent; font-weight: 800; }
.pill[aria-pressed="true"] { background: var(--k); color: var(--w); }
.tag { display: inline-block; padding: 3px 10px; border-radius: 12px; background: var(--l); font-size: 12px; font-weight: 700; }
.tag.k { background: var(--k); color: var(--y); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
input, select, textarea { min-height: 46px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--k); background: var(--w); font-weight: 500; }
textarea { min-height: 80px; }
input[type="checkbox"] { min-height: 0; width: 20px; height: 20px; accent-color: var(--k); }
.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 600; }
form.inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; align-items: end; }

/* Tabellen */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--g); font-weight: 700; padding: 8px 10px; border-bottom: 2px solid var(--k); }
td { padding: 12px 10px; border-bottom: 1px solid var(--l); vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot td { font-weight: 800; border-bottom: 0; }
.tablewrap { overflow-x: auto; }

/* Timer */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile { text-align: left; border: 0; border-radius: var(--r); background: var(--w); padding: 20px; display: flex; flex-direction: column; gap: 6px; min-height: 120px; transition: transform .15s ease; }
.tile:hover { transform: translateY(-2px); }
.tile .p { font-size: 18px; font-weight: 800; letter-spacing: -0.4px; }
.tile.on { background: var(--k); color: var(--w); }
.tile.on .t { color: var(--y); font-size: 30px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.runbox { margin-top: 20px; padding: 16px; border-radius: var(--r); background: var(--k); color: var(--w); display: flex; flex-direction: column; gap: 10px; }
.runbox .t { color: var(--y); font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.runbox .item + .item { border-top: 1px solid #2A2A2A; padding-top: 8px; }

/* Dialog & Toast */
.backdrop { position: fixed; inset: 0; background: rgba(10,10,10,.55); display: grid; place-items: center; padding: 20px; z-index: 20; }
.dialog { background: var(--w); border-radius: 28px; padding: 26px; max-width: 440px; width: 100%; display: flex; flex-direction: column; gap: 14px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px); background: var(--k); color: var(--w); padding: 14px 22px; border-radius: 22px; font-weight: 700; transition: transform .25s ease; z-index: 30; max-width: 90vw; }
#toast.show { transform: translateX(-50%) translateY(0); }

/* Anmeldung */
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 16px; }
.login .card { padding: 26px; gap: 14px; }
.code { letter-spacing: 8px; font-size: 26px; font-weight: 800; text-align: center; }

@media (max-width: 820px) {
  .shell { flex-direction: column; }
  .side { position: static; width: 100%; min-height: 0; flex-direction: row; flex-wrap: wrap; padding: 16px; }
  .brand { width: 100%; padding: 0 4px 10px; }
  .side .foot, .runbox { display: none; }
  .main { padding: 8px 16px 48px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.runbox[hidden], [hidden] { display: none !important; }
