/* ── Sputnik Protokoll — Bodenstation-Ästhetik ─────────────────────────── */

@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('vendor/fonts/bebas-neue-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2212;
}
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('vendor/fonts/bebas-neue-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB;
}

:root {
  --bg: #0B0E14;
  --panel: #12161F;
  --panel-2: #171C28;
  --line: rgba(242, 179, 61, .18);
  --line-dim: rgba(255, 255, 255, .07);
  --gold: #F2B33D;
  --gold-dim: rgba(242, 179, 61, .55);
  --ink: #E8E4D8;
  --ink-dim: #8B8FA3;
  --red: #E4574F;
  --green: #5FBF77;
  --amber: #E8A33D;
  --display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --tabbar-h: 62px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  background:
    radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 9%,  rgba(255,255,255,.25) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 43%, rgba(242,179,61,.30) 50%, transparent 51%),
    radial-gradient(1px 1px at 31% 71%, rgba(255,255,255,.22) 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 62%, rgba(255,255,255,.30) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 8% 88%,  rgba(255,255,255,.18) 50%, transparent 51%),
    linear-gradient(180deg, #0D111A 0%, var(--bg) 40%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: -apple-system, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}

[v-cloak] { display: none; }

.gold { color: var(--gold); }

/* ── Header ── */
.hdr {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 10px;
  background: linear-gradient(180deg, rgba(11,14,20,.97) 75%, rgba(11,14,20,0));
  border-bottom: 1px solid var(--line);
}
.hdr-title { display: flex; align-items: center; gap: 9px; }
.hdr-logo {
  height: 34px; width: auto;
  filter: drop-shadow(0 0 8px rgba(242,179,61,.45));
}
.hdr h1 {
  font-family: var(--display);
  font-size: 28px; letter-spacing: .06em; font-weight: 400;
  line-height: 1;
}
.hdr h1 .gold { margin-left: 6px; }

.hdr-status {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-dim);
  text-transform: uppercase; letter-spacing: .08em;
}
.hdr-status .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
}
.hdr-status.pending .dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); animation: pulse 1.2s infinite; }
.hdr-status.offline .dot { background: var(--red); box-shadow: 0 0 8px var(--red); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ── Banner / Toast ── */
.banner {
  margin: 10px 16px 0; padding: 9px 12px;
  border-radius: 8px; font-size: 13px; line-height: 1.4;
}
.banner.warn { background: rgba(232,163,61,.12); border: 1px solid rgba(232,163,61,.4); color: var(--amber); }
.banner.err  { background: rgba(228,87,79,.12);  border: 1px solid rgba(228,87,79,.4);  color: #F0A09B; }
.banner code { font-family: var(--mono); }

/* ── Views ── */
.view { padding: 14px 16px 24px; max-width: 640px; margin: 0 auto; }
.view-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold-dim); margin-bottom: 12px;
}
.empty { color: var(--ink-dim); text-align: center; padding: 42px 0; font-size: 14px; }
.sect {
  font-family: var(--display); font-weight: 400; font-size: 20px;
  letter-spacing: .08em; color: var(--ink);
  margin: 20px 0 10px; padding-bottom: 4px;
  border-bottom: 1px dashed var(--line);
}

/* ── Rangliste ── */
.board { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.board-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line-dim);
  border-radius: 12px; padding: 12px 14px;
  animation: rise .25s ease both;
}
.board li:nth-child(2) { animation-delay: .03s; }
.board li:nth-child(3) { animation-delay: .06s; }
.board li:nth-child(n+4) { animation-delay: .09s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.board-card.rank-1 {
  border-color: var(--gold);
  background: linear-gradient(120deg, rgba(242,179,61,.14), var(--panel) 55%);
  box-shadow: 0 0 22px rgba(242,179,61,.14);
}
.board-card.rank-2 { border-color: rgba(200,204,216,.45); }
.board-card.rank-3 { border-color: rgba(196,132,72,.5); }

.board-rank {
  font-family: var(--display); font-size: 30px; width: 34px;
  text-align: center; color: var(--ink-dim); flex-shrink: 0;
}
.rank-1 .board-rank { color: var(--gold); }
.rank-2 .board-rank { color: #C8CCD8; }
.rank-3 .board-rank { color: #C48448; }

.board-main { flex: 1; min-width: 0; }
.board-name {
  font-family: var(--display); font-size: 24px; letter-spacing: .05em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.board-sub { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 3px; }
.board-chip { font-family: var(--mono); font-size: 11.5px; color: var(--ink-dim); }

.board-pts { text-align: right; flex-shrink: 0; }
.board-pts-num {
  font-family: var(--display); font-size: 34px; line-height: 1; color: var(--gold);
}
.board-pts-lbl { font-family: var(--mono); font-size: 9px; letter-spacing: .25em; color: var(--ink-dim); }
/* Bei Getraenken die Anzahl als Zweitzahl unter den Punkten. */
.board-pts-alt { font-family: var(--mono); font-size: 10px; color: var(--ink-dim); margin-top: 2px; }

/* Drei Bestenlisten untereinander: keine uebergreifende Wertung. */
.board-sect + .board-sect { margin-top: 26px; }
.board-sect .sect { margin-top: 0; }
.empty.small { padding: 16px 0; font-size: 13px; }
/* Wer in dieser Kategorie noch nichts hat, steht nicht in der Liste, sondern hier. */
.board-rest {
  margin-top: 8px; text-align: right;
  font-family: var(--mono); font-size: 11px; color: var(--ink-dim);
}

/* ── Personen-Chips ── */
.person-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.person-chip {
  font-family: var(--display); font-size: 17px; letter-spacing: .05em;
  color: var(--ink); background: var(--panel);
  border: 1px solid var(--line-dim); border-radius: 999px;
  padding: 6px 15px 5px; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.person-chip.sel {
  color: #14100A; background: var(--gold); border-color: var(--gold);
  box-shadow: 0 0 14px rgba(242,179,61,.35);
}

/* ── Buchungs-Kacheln ── */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--panel-2); border: 1px solid var(--line-dim);
  border-radius: 12px; padding: 14px 6px 10px;
  color: var(--ink); cursor: pointer;
  transition: transform .08s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.tile:active { transform: scale(.94); }
.tile.flash { border-color: var(--gold); box-shadow: 0 0 16px rgba(242,179,61,.4); }
.tile-icon { font-size: 30px; line-height: 1; }
.tile-name { font-family: var(--display); font-size: 16px; letter-spacing: .05em; text-align: center; }
.tile-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-dim); }
.tile-meta b { color: var(--gold); font-weight: 600; }

/* ── Strichliste ── */
.tally-rows { display: flex; flex-direction: column; margin-top: 10px; }
.tally-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 2px; border-bottom: 1px solid var(--line-dim);
}
.tally-row.zero { opacity: .45; }
.tally-icon { font-size: 20px; width: 26px; text-align: center; flex-shrink: 0; }
.tally-name { font-family: var(--display); font-size: 17px; letter-spacing: .04em; width: 34%; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tally-marks { flex: 1; display: flex; flex-wrap: wrap; gap: 7px 9px; align-items: center; min-height: 20px; }
.tally-zero { color: var(--ink-dim); font-family: var(--mono); }

.tg { position: relative; display: inline-flex; gap: 3px; padding: 1px 1px; }
.tg i { display: block; width: 2px; height: 16px; background: var(--ink); border-radius: 1px; }
.tg.five::after {
  content: ''; position: absolute; left: -2px; right: -2px; top: 50%;
  height: 2px; background: var(--gold); border-radius: 1px;
  transform: rotate(-24deg);
}
.tally-n {
  font-family: var(--display); font-size: 19px; color: var(--gold);
  width: 30px; text-align: right; flex-shrink: 0;
}
.btn-minus {
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  background: transparent; border: 1px solid rgba(228,87,79,.5);
  color: var(--red); font-size: 20px; line-height: 1; cursor: pointer;
}
.btn-minus:disabled { opacity: .25; cursor: default; }
.btn-minus:not(:disabled):active { background: rgba(228,87,79,.15); }
.tally-sum {
  margin-top: 14px; display: flex; justify-content: flex-end; flex-wrap: wrap;
  gap: 8px 18px; font-size: 15px; color: var(--ink-dim);
}
.tally-sum b { font-family: var(--display); font-size: 20px; letter-spacing: .04em; }
.tally-tot { display: inline-flex; align-items: baseline; gap: 5px; }
.tally-tot em { font-style: normal; font-family: var(--mono); font-size: 11px; }

/* ── Rückdatieren ── */
.backdate {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 8px 12px;
  border: 1px dashed var(--line-dim); border-radius: 10px;
  font-size: 13px; color: var(--ink-dim);
}
.backdate.on { border-color: var(--amber); background: rgba(232,163,61,.07); }
.bd-toggle { font-size: 13px; cursor: pointer; }
.bd-time { padding: 4px 8px; font-size: 15px; font-family: var(--mono); }
.bd-hint { font-size: 12px; color: var(--amber); }

/* ── Verlauf ── */
.log-rows { display: flex; flex-direction: column; }
.log-hour {
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold-dim);
  margin: 16px 0 4px; padding-bottom: 3px;
  border-bottom: 1px dashed var(--line);
}
.log-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 2px; border-bottom: 1px solid var(--line-dim);
  font-size: 14.5px;
}
.log-row.gone { opacity: .4; }
.log-row.gone .log-txt { text-decoration: line-through; }
.log-row.gone .log-txt em { text-decoration: none; }
.log-time { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); width: 40px; flex-shrink: 0; }
.log-icon { font-size: 17px; flex-shrink: 0; }
.log-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-txt b { font-family: var(--display); font-weight: 400; font-size: 16px; letter-spacing: .04em; }
.log-txt em { font-style: normal; font-size: 11.5px; color: var(--red); margin-left: 6px; }
.log-pts { font-family: var(--display); font-size: 16px; color: var(--gold); flex-shrink: 0; width: 32px; text-align: right; }
.log-row .btn-minus { width: 30px; height: 30px; font-size: 17px; }
.btn-minus-ph { width: 30px; flex-shrink: 0; }

/* ── Admin ── */
.admin-login { display: flex; flex-direction: column; gap: 10px; max-width: 320px; margin: 30px auto; }
input, select {
  background: var(--panel); border: 1px solid var(--line-dim);
  color: var(--ink); border-radius: 8px; padding: 9px 10px; font-size: 15px;
  font-family: inherit; min-width: 0;
}
input:focus, select:focus { outline: none; border-color: var(--gold-dim); }
.admin-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.admin-row { display: flex; gap: 6px; align-items: center; }
.admin-row input:not(.w-s) { flex: 1; }
.w-s { width: 58px; flex-shrink: 0; }
/* Platzhalter, wo bei Essen/Aktionen kein Punktefeld steht — haelt die Spalten in Reihe. */
.admin-na { text-align: center; color: var(--ink-dim); font-family: var(--mono); font-size: 13px; }
.chk { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-dim); white-space: nowrap; }
.admin-actions { display: flex; gap: 10px; margin-top: 22px; }

.btn {
  display: inline-block; background: var(--panel-2); color: var(--ink);
  border: 1px solid var(--line-dim); border-radius: 8px;
  padding: 9px 16px; font-size: 14px; cursor: pointer;
  text-decoration: none; font-family: inherit; text-align: center;
}
.btn:active { transform: scale(.97); }
.gold-btn { background: var(--gold); color: #14100A; border-color: var(--gold); font-weight: 600; }
.gold-btn:disabled { opacity: .5; }

/* ── Tabbar ── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(13, 16, 24, .96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px;
  background: none; border: none; cursor: pointer;
  color: var(--ink-dim); font-family: var(--mono); font-size: 9px;
  letter-spacing: .06em; text-transform: uppercase;
  position: relative; -webkit-tap-highlight-color: transparent;
}
.tabbar button .tab-ic { font-size: 20px; filter: grayscale(1) opacity(.6); }
.tabbar button.on { color: var(--gold); }
.tabbar button.on .tab-ic { filter: none; }
.tabbar button.on::before {
  content: ''; position: absolute; top: 0; left: 22%; right: 22%;
  height: 2px; background: var(--gold); border-radius: 0 0 2px 2px;
  box-shadow: 0 0 8px rgba(242,179,61,.6);
}

@media (min-width: 560px) {
  .hdr h1 { font-size: 32px; }
  .hdr-status-txt { font-size: 12px; }
}
@media (max-width: 380px) {
  .hdr-status-txt { display: none; }
}
