/* Aussehen 1:1 aus entwurf/index.html übernommen (Farben, Abstände, Layout, Seitenleiste).
   Darunter: Ergänzungen für Blazor, dann die Blazor-Standardstile (Laden, Fehleranzeige). */

/* ---------- Farben (Fluent-Tokens) ---------- */
:root {
  --mica: #eef0f4;
  --mica-tint1: rgba(0, 103, 192, .10);
  --mica-tint2: rgba(160, 90, 200, .08);
  --layer: rgba(255, 255, 255, .55);
  --card: rgba(255, 255, 255, .8);
  --card-hover: rgba(246, 246, 246, .95);
  --solid: #fbfbfb;
  --smoke: rgba(0, 0, 0, .3);
  --stroke: rgba(0, 0, 0, .07);
  --stroke-strong: rgba(0, 0, 0, .14);
  --text: #1b1b1b;
  --text-2: #5d5d5d;
  --text-3: #8a8a8a;
  --accent: #0067c0;
  --accent-text: #ffffff;
  --accent-soft: rgba(0, 103, 192, .09);
  --pos: #0f7b0f;
  --neg: #c42b1c;
  --warn-bg: #fff4ce;
  --warn-text: #5c4400;
  --gold: #d4a017; --silver: #9aa3ad; --bronze: #b0713d;
  --shadow: 0 2px 4px rgba(0,0,0,.04), 0 0 1px rgba(0,0,0,.08);
  --shadow-dialog: 0 32px 64px rgba(0,0,0,.19), 0 2px 21px rgba(0,0,0,.15);
  --input: rgba(255, 255, 255, .9);
  /* Diagrammfarben (validierte Kategorie-Palette, feste Reihenfolge) */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --mica: #1c1f26;
    --mica-tint1: rgba(76, 194, 255, .07);
    --mica-tint2: rgba(170, 110, 220, .06);
    --layer: rgba(255, 255, 255, .035);
    --card: rgba(255, 255, 255, .055);
    --card-hover: rgba(255, 255, 255, .085);
    --solid: #2b2b2b;
    --smoke: rgba(0, 0, 0, .5);
    --stroke: rgba(255, 255, 255, .07);
    --stroke-strong: rgba(255, 255, 255, .14);
    --text: #ffffff;
    --text-2: #c5c5c5;
    --text-3: #9a9a9a;
    --accent: #4cc2ff;
    --accent-text: #000000;
    --accent-soft: rgba(76, 194, 255, .12);
    --pos: #6ccb5f;
    --neg: #ff99a4;
    --warn-bg: #433519;
    --warn-text: #fce100;
    --shadow: 0 2px 4px rgba(0,0,0,.2);
    --input: rgba(255, 255, 255, .06);
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --mica: #1c1f26;
  --mica-tint1: rgba(76, 194, 255, .07);
  --mica-tint2: rgba(170, 110, 220, .06);
  --layer: rgba(255, 255, 255, .035);
  --card: rgba(255, 255, 255, .055);
  --card-hover: rgba(255, 255, 255, .085);
  --solid: #2b2b2b;
  --smoke: rgba(0, 0, 0, .5);
  --stroke: rgba(255, 255, 255, .07);
  --stroke-strong: rgba(255, 255, 255, .14);
  --text: #ffffff;
  --text-2: #c5c5c5;
  --text-3: #9a9a9a;
  --accent: #4cc2ff;
  --accent-text: #000000;
  --accent-soft: rgba(76, 194, 255, .12);
  --pos: #6ccb5f;
  --neg: #ff99a4;
  --warn-bg: #433519;
  --warn-text: #fce100;
  --shadow: 0 2px 4px rgba(0,0,0,.2);
  --input: rgba(255, 255, 255, .06);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  color-scheme: dark;
}

/* ---------- Grundlayout ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* sonst überschreibt z. B. .btn { display: inline-flex } das hidden-Attribut */
html, body { margin: 0; }
body {
  font-family: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  color: var(--text);
  /* Mica-Imitation: ruhige Grundfarbe + weiche Farbschleier */
  background:
    radial-gradient(1200px 700px at 0% 0%, var(--mica-tint1), transparent 60%),
    radial-gradient(900px 600px at 100% 100%, var(--mica-tint2), transparent 60%),
    var(--mica);
  background-attachment: fixed;
  min-height: 100vh;
}
.app { display: flex; min-height: 100vh; }

/* ---------- Seitenleiste (NavigationView) ---------- */
nav {
  width: 260px; flex-shrink: 0;
  padding: 12px 6px;
  display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 8px 14px 24px; font-size: 12px; }
.brand .logo {
  width: 20px; height: 20px; border-radius: 5px;
  background: var(--accent); color: var(--accent-text);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  height: 38px; padding: 0 14px; margin: 0 4px;
  border: 0; border-radius: 5px; background: transparent;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.nav-item:hover, .nav-item.active { background: var(--card); }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 11px; bottom: 11px;
  width: 3px; border-radius: 2px; background: var(--accent);
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-spacer { flex: 1; }
.nav-label { white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pos); margin-left: auto; }

/* ---------- Inhaltsfläche ---------- */
main {
  flex: 1; min-width: 0;
  margin-top: 48px;
  background: var(--layer);
  border: 1px solid var(--stroke);
  border-right: 0; border-bottom: 0;
  border-top-left-radius: 8px;
  padding: 32px 40px 64px;
}
.page { display: none; max-width: 960px; }
.page.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
h1 { font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; font-size: 28px; font-weight: 600; margin: 0 0 4px; }
.subtitle { color: var(--text-2); margin: 0; }
h2 { font-size: 14px; font-weight: 600; margin: 32px 0 10px; }

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.card.pad { padding: 20px 24px; }
.muted { color: var(--text-2); }
.small { font-size: 12px; }

/* ---------- Buttons & Eingaben ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: 4px; border: 1px solid var(--stroke-strong);
  background: var(--card); color: var(--text);
  font: inherit; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--card-hover); }
.btn:active { opacity: .8; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.accent { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.btn.accent:hover { filter: brightness(1.08); }
.btn.subtle { border-color: transparent; background: transparent; }
.btn.subtle:hover { background: var(--card-hover); }
.btn.icon { width: 28px; height: 28px; padding: 0; font-size: 16px; }
.btn.danger { color: var(--neg); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar.end { justify-content: flex-end; margin-top: 16px; }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > span { font-size: 13px; }
input.text, input.num {
  height: 32px; padding: 0 10px;
  border-radius: 4px; border: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke-strong);
  background: var(--input); color: var(--text);
  font: inherit;
}
input.num { width: 96px; text-align: right; font-variant-numeric: tabular-nums; }
input.text:focus, input.num:focus { outline: none; border-bottom: 2px solid var(--accent); }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; white-space: nowrap; vertical-align: middle; }
th { font-weight: 400; font-size: 12px; color: var(--text-2); border-bottom: 1px solid var(--stroke); }
tbody tr + tr td { border-top: 1px solid var(--stroke); }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
tfoot td { border-top: 1px solid var(--stroke-strong); color: var(--text-2); font-size: 13px; }
tfoot b { color: var(--text); font-size: 14px; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.name { font-weight: 600; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--card-hover); }

.person { display: inline-flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 15px; font-weight: 600; flex-shrink: 0;
}

/* Rebuy-Chips */
.chips { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 2px;
  height: 24px; padding: 0 4px 0 9px; border-radius: 12px;
  background: var(--accent-soft); color: var(--text);
  font-size: 12px; font-variant-numeric: tabular-nums;
}
.chip button {
  width: 18px; height: 18px; border: 0; border-radius: 50%; padding: 0;
  background: transparent; color: var(--text-2); cursor: pointer; font-size: 13px; line-height: 1;
}
.chip button:hover { background: var(--stroke-strong); color: var(--text); }
.add-rebuy {
  height: 24px; padding: 0 10px; border-radius: 12px;
  border: 1px dashed var(--stroke-strong); background: transparent;
  color: var(--accent); font: inherit; font-size: 12px; cursor: pointer;
}
.add-rebuy:hover { background: var(--accent-soft); border-style: solid; }

/* ---------- InfoBar ---------- */
.infobar {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; margin-bottom: 16px;
  border-radius: 6px; border: 1px solid var(--stroke);
  background: var(--warn-bg); color: var(--warn-text);
}
.infobar[hidden] { display: none; }

/* ---------- Abrechnung ---------- */
.pay-list { display: grid; gap: 8px; }
.pay { display: grid; grid-template-columns: 1fr 24px 1fr auto 28px; align-items: center; gap: 16px; padding: 14px 20px; }
.pay .arrow { color: var(--text-3); text-align: center; }
.pay .amount { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pay.done { opacity: .5; }
.pay.done .amount { text-decoration: line-through; }
.done-check { width: 20px; height: 20px; accent-color: var(--accent); }
.saldo-strip { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.saldo-strip span { font-variant-numeric: tabular-nums; }

/* ---------- SelectorBar (Register) ---------- */
.tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--stroke); }
.tab {
  position: relative; height: 40px; padding: 0 14px;
  border: 0; background: transparent; color: var(--text-2);
  font: inherit; cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); font-weight: 600; }
.tab.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px;
  height: 3px; border-radius: 2px; background: var(--accent);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- Podest ---------- */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 12px; max-width: 520px; margin: 0 auto; }
.podium .spot { text-align: center; }
.podium .who { font-weight: 600; margin: 8px 0 2px; }
.podium .sum { font-variant-numeric: tabular-nums; font-size: 13px; }
.podium .block {
  margin-top: 10px; border-radius: 6px 6px 0 0;
  display: grid; place-items: center;
  font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif; font-size: 28px; font-weight: 700; color: #fff;
}
.p1 .block { height: 110px; background: linear-gradient(var(--gold), color-mix(in srgb, var(--gold) 70%, #000)); }
.p2 .block { height: 80px;  background: linear-gradient(var(--silver), color-mix(in srgb, var(--silver) 70%, #000)); }
.p3 .block { height: 56px;  background: linear-gradient(var(--bronze), color-mix(in srgb, var(--bronze) 70%, #000)); }
.podium .avatar { width: 48px; height: 48px; font-size: 22px; margin: 0 auto; }

/* ---------- Liniendiagramm ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.legend button {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 12px; border-radius: 15px;
  border: 1px solid var(--stroke-strong); background: transparent;
  color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer;
}
.legend button[aria-pressed="true"] { background: var(--card-hover); color: var(--text); border-color: var(--text-3); }
.legend .key { width: 14px; height: 2px; border-radius: 1px; }
.legend button[aria-pressed="false"] .key { opacity: .3; }
.chart-box { position: relative; }
.chart-box svg { display: block; width: 100%; overflow: visible; }
.chart-box text { font-family: inherit; font-size: 11px; fill: var(--text-2); font-variant-numeric: tabular-nums; }
.grid-line { stroke: var(--stroke); }
.zero-line { stroke: var(--stroke-strong); }
.tooltip {
  position: absolute; pointer-events: none; z-index: 2;
  min-width: 170px; padding: 10px 12px; border-radius: 6px;
  background: var(--solid); border: 1px solid var(--stroke-strong); box-shadow: var(--shadow-dialog);
  font-size: 12px;
}
.tooltip[hidden] { display: none; }
.tooltip .head { color: var(--text-2); margin-bottom: 6px; }
.tooltip .row { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; line-height: 1.7; }
.tooltip .row i { height: 2px; border-radius: 1px; }
.tooltip .row b { text-align: right; font-variant-numeric: tabular-nums; }
.tooltip .row span { color: var(--text-2); order: 3; }
.tooltip .row b { order: 2; }

/* ---------- Gastgeber-Balken ---------- */
.bar-row { display: grid; grid-template-columns: 80px 1fr 24px; gap: 10px; align-items: center; padding: 5px 0; }
.bar-track { height: 8px; border-radius: 4px; background: var(--accent-soft); }
.bar { display: block; height: 8px; border-radius: 4px; background: var(--accent); }
.two-col { display: grid; grid-template-columns: 1fr 260px; gap: 16px; align-items: start; }

.day-detail td { background: var(--accent-soft); }
.day-detail .saldo-strip { white-space: normal; }

/* ---------- Listen (Einstellungs-Karten) ---------- */
.list-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 16px; border: 0; background: transparent;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.list-item:hover { background: var(--card-hover); }
.list-item + .list-item { border-top: 1px solid var(--stroke); }
.card > .list-item:first-child { border-radius: 8px 8px 0 0; }
.card > .list-item:last-child { border-radius: 0 0 8px 8px; }
.list-item .grow { flex: 1; }
.list-item .chev { color: var(--text-3); font-size: 18px; }
.list-item small { color: var(--text-2); display: block; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--stroke); color: var(--text-2); }
.inactive .name, .inactive .avatar { opacity: .45; }


/* ---------- ContentDialog ---------- */
dialog {
  width: min(440px, calc(100vw - 32px)); padding: 0;
  border: 1px solid var(--stroke-strong); border-radius: 8px;
  background: var(--solid); color: var(--text);
  box-shadow: var(--shadow-dialog);
}
dialog::backdrop { background: var(--smoke); }
dialog[open] { animation: pop .18s ease; }
@keyframes pop { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.dlg-body { padding: 24px; }
.dlg-body h3 { font-size: 20px; font-weight: 600; margin: 0 0 16px; }
.dlg-foot {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 20px 24px; background: var(--card); border-top: 1px solid var(--stroke);
  border-radius: 0 0 8px 8px;
}
.dlg-foot .left { margin-right: auto; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.quick .btn { height: 44px; font-size: 16px; font-weight: 600; }
.quick .btn.sel { border: 2px solid var(--accent); background: var(--accent-soft); }

/* Segmentierte Auswahl (Ausgleichsmethode) */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border-radius: 6px; background: var(--stroke); margin: 12px 0 8px; }
.seg button {
  height: 30px; padding: 0 14px; border: 0; border-radius: 4px;
  background: transparent; color: var(--text-2); font: inherit; cursor: pointer;
}
.seg button:hover { color: var(--text); }
.seg button.sel { background: var(--solid); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.diff-table { margin-top: 12px; }
.diff-table td, .diff-table th { padding: 8px 12px; }

/* laufender Pokertag ja/nein */
body:not(.running) .needs-live, body.running .no-live, body:not(.running) .live-dot { display: none; }

/* ---------- Dashboard ---------- */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px; }
.hero .label { font-size: 12px; color: var(--text-2); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.hero .title { font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif; font-size: 22px; font-weight: 600; }
.hero .hint { font-size: 12px; color: var(--text-2); margin-top: 6px; text-align: right; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 0 var(--pos); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.tile .label { color: var(--text-2); font-size: 12px; }
.tile .value { font-size: 20px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile .sub { color: var(--text-2); font-size: 12px; margin-top: 2px; }
.link { border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; padding: 0; }
.link:hover { text-decoration: underline; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 32px 0 10px; }
.section-head h2 { margin: 0; }
.empty { text-align: center; padding: 48px 24px; }
.empty .big { font-size: 40px; margin-bottom: 8px; }
.empty p { color: var(--text-2); margin: 0 0 16px; }

/* ---------- Balkendiagramm Rangliste ---------- */
.rbar { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; height: 34px; }
.rbar .who { display: flex; align-items: center; gap: 8px; overflow: hidden; white-space: nowrap; }
.rbar .who .muted { width: 18px; text-align: right; font-size: 12px; }
.rtrack { position: relative; height: 100%; }
.rtrack .zero { position: absolute; top: 4px; bottom: 4px; width: 1px; background: var(--stroke-strong); }
.rtrack .bar-pos, .rtrack .bar-neg { position: absolute; top: 9px; height: 16px; }
.rtrack .bar-pos { background: var(--s1); border-radius: 0 4px 4px 0; }
.rtrack .bar-neg { background: var(--s8); border-radius: 4px 0 0 4px; }
.rtrack .val { position: absolute; top: 8px; font-size: 12px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rbar:hover .bar-pos, .rbar:hover .bar-neg { filter: brightness(1.15); }
.rbar:hover { background: var(--card-hover); border-radius: 4px; }

/* ---------- Blättern ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--stroke); }
.pager span { color: var(--text-2); font-size: 13px; }

/* Start-Dialog: Spielerauswahl */
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 220px; overflow-y: auto; }
.pick label { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 4px; cursor: pointer; }
.pick label:hover { background: var(--card-hover); }
.pick input { accent-color: var(--accent); width: 16px; height: 16px; }
select.text { height: 32px; padding: 0 8px; border-radius: 4px; border: 1px solid var(--stroke); border-bottom-color: var(--stroke-strong); background: var(--input); color: var(--text); font: inherit; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- schmale Fenster: Seitenleiste nur mit Icons ---------- */
@media (max-width: 860px) {
  nav { width: 60px; }
  .nav-label, .brand span, .live-dot { display: none; }
  .brand { padding-left: 16px; }
  main { padding: 20px 16px 40px; margin-top: 16px; }
  .two-col { grid-template-columns: 1fr; }
  .pay { grid-template-columns: 1fr auto; gap: 8px; }
  .pay .arrow { display: none; }
}

/* =====================================================================
   Ergänzungen für die Web-App (Blazor)
   ===================================================================== */

/* Eine Seite: wie .page.active im Entwurf */
.seite { max-width: 960px; animation: fade .25s ease; }
h1:focus { outline: none; } /* Blazor setzt nach dem Seitenwechsel den Fokus auf h1 */

/* NavLink setzt "active" automatisch – Links sehen aus wie die Knöpfe im Entwurf */
a.nav-item { text-decoration: none; }
.nav-item:focus-visible, .btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* Schmales Fenster: Beschriftung nur unsichtbar machen, damit Screenreader sie weiter vorlesen */
@media (max-width: 860px) {
  .nav-label { display: inline !important; position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* Anmelden (und Fehlermeldung beim Start) */
.anmelde-seite { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.anmelde-karte { width: min(380px, 100%); display: grid; }
.anmelde-karte h1 { margin-bottom: 4px; }
.anmelde-karte .subtitle { margin-bottom: 20px; }
.anmelde-marke { padding: 0 0 20px; }
.btn.breit { width: 100%; height: 36px; }
.fehler-text { color: var(--neg); margin: 0 0 12px; }
.hinweis { margin: 16px 0 0; text-align: center; }

/* Start: wer ist angemeldet */
.konto-karte { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.konto-karte .tag { margin-left: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* Spieler & Gastgeber: zwei gleich breite Spalten (am Handy untereinander) */
.zwei-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.spalten-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.spalten-kopf h2 { margin: 0; }
.list-item.statisch { cursor: default; }
.list-item.statisch:hover { background: transparent; }
.list-item:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.card .leer { margin: 0; padding: 16px; }
.dlg-foot .btn.left { margin-right: auto; }
@media (max-width: 860px) { .zwei-spalten { grid-template-columns: 1fr; } }

/* Laufender Pokertag: Tabelle als Raster – am Handy zweizeilig */
.pt-zeile { display: grid; grid-template-columns: 200px 1fr 120px 36px; gap: 8px 16px; align-items: center; padding: 10px 16px; }
.pt-zeile + .pt-zeile { border-top: 1px solid var(--stroke); }
.pt-kopf { font-size: 12px; color: var(--text-2); }
.pt-fuss { border-top: 1px solid var(--stroke-strong) !important; color: var(--text-2); }
.pt-fuss b { color: var(--text); }
.pt-zeile .r { text-align: right; font-variant-numeric: tabular-nums; }
.pt-weg { display: flex; justify-content: flex-end; }
.chip button { min-width: 22px; min-height: 22px; }
.aktualisiert { margin-top: 8px; }
.leer-karte { text-align: center; padding: 48px 24px; }
.leer-karte .gross { font-size: 40px; margin-bottom: 8px; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 600px) {
  .pt-zeile { grid-template-columns: 1fr auto 36px; grid-template-areas: "name einsatz weg" "rebuys rebuys rebuys"; }
  .pt-name { grid-area: name; } .pt-einsatz { grid-area: einsatz; } .pt-weg { grid-area: weg; } .pt-rebuys { grid-area: rebuys; }
  .pt-kopf { display: none; }
  .pt-fuss { grid-template-columns: 1fr auto; } .pt-fuss > span[aria-hidden] { display: none; }
}

/* Formulare in Fenstern */
select.text {
  height: 32px; padding: 0 8px; border-radius: 4px; border: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke-strong); background: var(--input); color: var(--text); font: inherit;
}
input.text, select.text { width: 100%; }
fieldset.field { border: 0; padding: 0; margin: 0 0 16px; }
fieldset.field legend { font-size: 13px; margin-bottom: 6px; padding: 0; }
.zwei-felder { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auswahl { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; max-height: 240px; overflow-y: auto; }
.auswahl label { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 4px; cursor: pointer; }
.auswahl label:hover { background: var(--card-hover); }
.auswahl input { width: 18px; height: 18px; accent-color: var(--accent); }
.schnellwahl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.schnellwahl .btn { height: 44px; font-size: 16px; font-weight: 600; }

/* Kurzbeschriftung nur am Handy */
.nav-kurz { display: none; }

/* Handy: Seitenleiste wird zur Leiste unten */
@media (max-width: 600px) {
  .app { flex-direction: column; }
  nav {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 10;
    width: auto; height: auto; padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    flex-direction: row; justify-content: space-around; gap: 0;
    background: var(--solid); border-top: 1px solid var(--stroke);
  }
  .brand, .nav-spacer { display: none; }
  .nav-item { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; height: 52px; margin: 0; padding: 4px 2px; justify-content: center; }
  .nav-item .nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .nav-item .nav-kurz { display: block; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .nav-item.thema { flex: 0 0 44px; } /* Hell/Dunkel nur als Symbol */
  .nav-item.konto { display: none; }  /* Abmelden am Handy auf der Startseite */
  .nav-item.active::before { left: 30%; right: 30%; top: auto; bottom: 2px; width: auto; height: 3px; }
  main { margin-top: 0; border-radius: 0; border: 0; padding: 20px 16px 96px; }
}

/* =====================================================================
   Blazor-Standardstile (aus der Vorlage)
   ===================================================================== */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* Abrechnung: Endstände als Raster – am Handy zweizeilig */
.ab-zeile { display: grid; grid-template-columns: 1fr 120px 140px 160px; gap: 8px 16px; align-items: center; padding: 10px 16px; }
.ab-zeile + .ab-zeile { border-top: 1px solid var(--stroke); }
.ab-zeile .r { text-align: right; font-variant-numeric: tabular-nums; }
.ab-zeile input.num { width: 110px; }
.pay .person small { display: block; font-size: 12px; }
@media (max-width: 600px) {
  .ab-zeile { grid-template-columns: 1fr auto; grid-template-areas: "name saldo" "einsatz endstand"; }
  .ab-name { grid-area: name; } .ab-saldo { grid-area: saldo; } .ab-einsatz { grid-area: einsatz; text-align: left !important; } .ab-endstand { grid-area: endstand; }
  .ab-zeile.pt-fuss > span:first-child { display: none; }
  .ab-zeile.pt-fuss { grid-template-areas: "einsatz saldo" "endstand endstand"; }
  .pay { grid-template-columns: 1fr auto; gap: 8px; } .pay .arrow { display: none; }
}
.field.methode { margin: 12px 0 6px; max-width: 320px; }

/* Profilbilder */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.gross { width: 64px; height: 64px; font-size: 26px; }
.bild-bereich { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.bild-knoepfe { display: grid; gap: 6px; justify-items: start; }
.datei-knopf { position: relative; }
.datei-knopf:focus-within { outline: 2px solid var(--text); outline-offset: 2px; }
.datei-feld { position: absolute; width: 1px; height: 1px; opacity: 0; } /* unsichtbar, aber per Tastatur erreichbar */

/* Startseite (Dashboard) */
.seite > .card.hero { margin-bottom: 0; }
a.btn { text-decoration: none; }
a.link { text-decoration: none; }
a.link:hover { text-decoration: underline; }
.tile .value.spitze { display: flex; align-items: center; gap: 10px; }
.avatar.nummer { font-size: 13px; }
.sieger { white-space: nowrap; font-variant-numeric: tabular-nums; }
.konto-karte { margin-top: 32px; }
@media (max-width: 600px) {
  .hero .hint { text-align: left; }
  .list-item { flex-wrap: wrap; }
  .sieger { width: 100%; padding-left: 44px; }
}
