* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0d0f14; --panel: #171a22; --panel2: #1f2330; --line: #2a2f3d;
  --txt: #e8eaf0; --muted: #8a90a2; --accent: #5b8cff; --accent2: #7c5bff;
  --ok: #2ecc71; --warn: #f5a623; --bad: #ff4d5e; --gold: #c9a961;
}
html, body { background: var(--bg); color: var(--txt);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100%; }
body { padding-bottom: 50px; }

header { display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 18px; background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { height: 38px; filter: drop-shadow(0 0 8px rgba(91,140,255,.55)); }
.brand .brandtxt { font-size: 19px; }
.brand .brandtxt b { font-weight: 800; color: var(--accent); text-shadow: 0 0 10px rgba(91,140,255,.5); }
.abendinfo { margin-left: auto; color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); font-size: 13px; } small.muted { font-size: 11px; }

.tabs { display: flex; gap: 2px; padding: 8px 12px 0; background: var(--panel);
  border-bottom: 1px solid var(--line); position: sticky; top: 63px; z-index: 9; overflow-x: auto; }
.tabs button { background: transparent; color: var(--muted); border: 0;
  padding: 11px 16px; font-size: 14px; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--txt); border-bottom-color: var(--accent); }

main { padding: 16px; max-width: 1150px; margin: 0 auto; }
.tab { display: none; } .tab.active { display: block; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; margin-bottom: 14px; }
.panel h2 { font-size: 16px; margin-bottom: 8px; }
.sub { font-size: 13px; color: var(--muted); margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .4px; }
.lbl { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

input, select, textarea { background: var(--panel2); border: 1px solid var(--line); color: var(--txt);
  padding: 9px 11px; border-radius: 8px; font-size: 14px; width: 100%; }
select, .row input { width: auto; flex: 1; min-width: 120px; }
.btn { background: var(--panel2); color: var(--txt); border: 1px solid var(--line);
  padding: 9px 15px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-stop { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.formgrid label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 4px; }
.formgrid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .formgrid { grid-template-columns: 1fr; } }

.anwesend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: 8px; }
.dame-chip { background: var(--panel2); border: 2px solid var(--line); border-radius: 10px;
  padding: 8px; text-align: center; cursor: pointer; }
.dame-chip.on { border-color: var(--ok); background: rgba(46,204,113,.12); }
.dame-chip img, .dame-chip .ph { width: 54px; height: 54px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 4px; display: block; background: var(--line); }
.dame-chip .ph { display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--muted); }
.dame-chip .nm { font-size: 12px; font-weight: 600; }

.checks { display: flex; flex-wrap: wrap; gap: 6px; max-height: 130px; overflow: auto; }
.checks label { display: flex; align-items: center; gap: 5px; background: var(--panel2);
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; font-size: 13px; cursor: pointer; }
.checks input { width: auto; flex: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 12px; }
.card { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.card img, .card .ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--line); margin-bottom: 8px; }
.card .ph { display: flex; align-items: center; justify-content: center; font-size: 34px; color: var(--muted); }
.card h3 { font-size: 15px; } .card .meta { font-size: 12px; color: var(--muted); margin: 4px 0 8px; }

.item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--panel2);
  border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; font-size: 14px; }
.item .grow { flex: 1; } .item .badge { font-size: 11px; color: var(--gold); }
.item .timer { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 700; }

table { width: 100%; border-collapse: collapse; }
.abr-wrap { overflow-x: auto; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 600; }
td.sum { font-weight: 800; color: var(--ok); font-size: 15px; }
.plus { color: var(--ok); } .minus { color: var(--bad); }
.betreiber-box { margin-top: 14px; padding: 12px; background: var(--panel2); border: 1px solid var(--gold);
  border-radius: 10px; font-size: 14px; }

.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex;
  align-items: center; justify-content: center; padding: 18px; z-index: 50; }
.overlay[hidden] { display: none; }
.sheet { background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; max-width: 460px; width: 100%; max-height: 88vh; overflow: auto; position: relative; }
.sheet .close { position: absolute; top: 14px; right: 14px; background: var(--panel2);
  border: 1px solid var(--line); color: var(--txt); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; }
.sheet h2 { margin-bottom: 6px; }
