:root {
  --primary: #07a7e3;
  --primary-dark: #0582b1;
  --accent: #f5a623;
  --error: #dc3545;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: 'Segoe UI', system-ui, Arial, sans-serif; background: #eef2f5;
  color: #1d232a; display: flex; flex-direction: column; }
body.an-kaal { background: #fbfaf7; }
.an-main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
a { color: var(--primary-dark); }

/* ── kopbalk (niet op de omroeperpagina zelf) ───────────────────── */
.an-header { background: var(--primary); color: #fff; min-height: 54px; flex-shrink: 0;
  display: flex; align-items: center; gap: 18px; padding: 0 20px; }
.an-brand { display: flex; align-items: center; gap: 12px; }
.an-brand-logo { height: 30px; }
.an-appname { font-size: 1.15rem; font-weight: 700; }
.an-nav { display: flex; gap: 16px; border-left: 1px solid rgba(255,255,255,0.35); padding-left: 16px; }
.an-nav a { color: #fff; text-decoration: none; font-weight: 500; font-size: 0.86rem;
  padding: 4px 2px; border-bottom: 2px solid transparent; }
.an-nav a:hover { border-bottom-color: var(--accent); }
.an-nav .cur { font-weight: 700; font-size: 0.86rem; border-bottom: 2px solid var(--accent); padding: 4px 2px; }
.an-tourney { font-size: 0.88rem; color: #d3f2f8; border-left: 1px solid rgba(255,255,255,0.35);
  padding-left: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.an-tourney-wissel { color: #fff; font-size: 0.74rem; text-decoration: underline;
  margin-left: 8px; opacity: 0.75; }
.an-tourney-wissel:hover { opacity: 1; }
.an-head-right { margin-left: auto; }
.an-user { display: inline-flex; align-items: center; gap: 7px; font-size: 0.86rem;
  font-weight: 600; color: #fff; white-space: nowrap; padding-left: 14px;
  border-left: 1px solid rgba(255,255,255,0.35); }
.an-user svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none;
  stroke: #fff; stroke-width: 1.9; stroke-linecap: round; }

/* ── de omroeperpagina ──────────────────────────────────────────── */
.an-page { flex: 1; display: flex; flex-direction: column; background: #fbfaf7;
  color: #1d232a; min-height: 0; }
.an-testbanner { background: var(--accent); color: #4d3400; text-align: center;
  font-weight: 800; padding: 6px; letter-spacing: 0.08em; flex-shrink: 0; }
.an-top { display: flex; align-items: center; padding: 12px 24px 8px; gap: 18px;
  border-bottom: 2px solid #d9dee3; flex-shrink: 0; }
.an-clock { font-size: 42px; font-weight: 800; font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em; }
.an-clock .sec { color: var(--primary); }
.an-blockmid { flex: 1; text-align: center; }
.an-blocklbl { font-size: 13px; letter-spacing: 0.3em; text-transform: uppercase;
  color: #7c8690; font-weight: 700; }
.an-blockval { font-size: 42px; font-weight: 800; color: #0d6efd; line-height: 1; }
/* Het uur bovenaan vertelt de omroeper waar hij zit: groen is het blok dat
   hij nu hoort af te roepen, grijs is geweest, blauw komt nog. */
.an-blockval.fase-nu      { color: #198754; }
.an-blockval.fase-voorbij { color: #9aa4ad; }
.an-blockval.fase-later   { color: #0d6efd; }
.an-day { font-size: 14px; color: #7c8690; text-align: right; line-height: 1.35; }
/* Kijk je naar een andere dag dan vandaag, dan moet dat opvallen. */
.an-day-d.andere-dag { color: #8a5300; background: #fff5e2; border: 1px solid #f0d9ab;
  border-radius: 20px; padding: 1px 10px; font-weight: 700; display: inline-block; }
.an-day-t { font-weight: 600; color: #5a636c; }
/* Klein weggetje terug, alleen voor wie van de backend komt. Bewust
   onopvallend: de omroeper moet er niet per ongeluk op tikken. */
.an-uitweg { display: inline-block; margin-top: 2px; font-size: 11px;
  color: #aab2b9; text-decoration: none; }
.an-uitweg:hover { color: var(--primary-dark); text-decoration: underline; }

.an-rows { flex: 1; padding: 6px 24px 0; overflow: hidden; min-height: 0; }
.an-rows table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.an-rows td { padding: 14px 8px; font-size: 27px; font-weight: 700;
  border-bottom: 1px solid #e2e6ea; vertical-align: middle;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Twee soorten krapte, elk met hun eigen antwoord. Past een lange teamnaam
   niet op de regel, dan gaat de letter een maatje kleiner; passen negen
   pitches niet onder elkaar, dan gaat de ruimte tussen de rijen eruit. Zo
   blijven de letters zo groot als het scherm toelaat. */
.an-rows.smal    td { font-size: 25px; }
.an-rows.smaller td { font-size: 22px; }
.an-rows.smal    td.ref { font-size: 16px; }
.an-rows.smaller td.ref { font-size: 14px; }
/* De scheidsrechterkolom krimpt op haar eentje: een lange clubnaam daar mag
   de teamnamen — waar het echt om gaat — niet kleiner maken. */
.an-rows.refsmal    td.ref { font-size: 15px; }
.an-rows.refsmaller td.ref { font-size: 13px; }
.an-rows.krap    td { padding: 8px; }
.an-rows.krapper td { padding: 3px 8px; }
.an-rows tr.odd td { background: #f0eee8; }
.an-rows td.pitch { width: 148px; font-weight: 800; }
.an-rows td.vs { width: 26px; text-align: center; color: #9aa0a6; font-weight: 400; }
.an-rows td .fl { width: 37px; height: 24px; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15); vertical-align: middle; margin-right: 6px; }
.an-rows td .ksq { display: inline-block; width: 20px; height: 20px; border-radius: 3px;
  vertical-align: middle; margin-right: 8px; box-shadow: 0 0 0 1px rgba(0,0,0,0.12); }
/* Status van de wedstrijd: klein bolletje + eventueel een minutenchip. */
.an-rows td.stat { width: 92px; text-align: center; padding-left: 0; padding-right: 0;
  overflow: visible; }
.an-rows .st { display: inline-block; width: 13px; height: 13px; border-radius: 50%;
  vertical-align: middle; }
.an-rows .st-wacht { background: transparent; box-shadow: inset 0 0 0 2px #d6dce1; }
.an-rows .st-bezig { background: #198754; box-shadow: 0 0 0 3px rgba(25,135,84,0.18); }
.an-rows .st-laat  { background: #dc3545; box-shadow: 0 0 0 3px rgba(220,53,69,0.18); }
.an-rows .st-klaar { width: auto; height: auto; border-radius: 0; color: #198754;
  font-size: 19px; font-weight: 800; box-shadow: none; }
.an-rows .vtr { display: inline-block; margin-left: 6px; font-size: 13px; font-weight: 800;
  color: #8a5300; background: #fff5e2; border: 1px solid #f0d9ab; border-radius: 20px;
  padding: 1px 7px; vertical-align: middle; }
.an-rows .vtr-laat { color: #8b1a24; background: #faf1f1; border-color: #e3b8bd; }
/* Gespeeld is gespeeld: dat mag naar de achtergrond wijken. */
.an-rows tr.rij-klaar td.team, .an-rows tr.rij-klaar td.ref { opacity: 0.62; }

.an-rows td.ref { width: 188px; font-size: 17px; font-weight: 600; color: #5a636c; }
.an-rows td.ref .fl { width: 24px; height: 16px; }
.an-rows .unresolved { color: #8a939c; font-style: italic; font-weight: 600; }
.an-rows tr.updated td { background: #eef7ee; }
.an-rows tr.updated td.pitch { border-left: 6px solid #198754; }

.an-alerts { flex-shrink: 0; margin: 6px 24px 0; border: 2px solid #e3b8bd;
  border-radius: 10px; background: #faf1f1; padding: 8px 14px; }
.an-alerts-lbl { font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase;
  color: #a94450; font-weight: 800; margin-bottom: 4px; }
.an-alert-row { display: flex; align-items: baseline; gap: 10px; font-size: 17px; padding: 2px 0; }
.an-alert-row .t { font-size: 13px; color: #a94450; width: 52px; flex-shrink: 0; }
.an-alert-row b { color: #8b1a24; }
.an-alert-row.older { opacity: 0.55; font-size: 14px; }

.an-btnbar { flex-shrink: 0; display: flex; align-items: center; padding: 10px 24px 14px; gap: 14px; }
.an-navbtn { border: 2px solid #b9c2cc; border-radius: 12px; background: #fff; font-size: 20px;
  font-weight: 700; color: #3c454e; padding: 12px 30px; font-family: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.an-navbtn:active { background: #eef2f5; }
.an-navbtn:disabled { opacity: 0.35; }
.an-btnmid { flex: 1; text-align: center; font-size: 13px; color: #9aa0a6; }
/* Alleen zichtbaar zolang de browser de app installeerbaar vindt. */
.an-install { border: 1px solid var(--primary); border-radius: 20px; background: #fff;
  color: var(--primary-dark); font: inherit; font-size: 13px; font-weight: 700;
  padding: 7px 14px; cursor: pointer; white-space: nowrap; }
.an-install:hover { background: #eaf7fa; }
.an-legende { display: flex; justify-content: center; gap: 18px; margin-bottom: 6px;
  font-size: 12px; color: #7c8690; }
.an-legende span { display: inline-flex; align-items: center; gap: 6px; }
.an-legende .st { display: inline-block; width: 11px; height: 11px; border-radius: 50%; }
.an-legende .st-bezig { background: #198754; }
.an-legende .st-laat  { background: #dc3545; }
.an-legende .st-klaar { width: auto; height: auto; border-radius: 0; color: #198754;
  font-size: 14px; font-weight: 800; font-style: normal; }
.an-legende .vtr { font-size: 11px; font-weight: 800; font-style: normal; color: #8a5300;
  background: #fff5e2; border: 1px solid #f0d9ab; border-radius: 20px; padding: 0 6px; }
.an-conn { color: var(--error); font-weight: 700; }

/* ── gewone pagina's (keuze, geen toegang, tabletlink) ──────────── */
.an-card { max-width: 720px; margin: 40px auto; padding: 0 20px; }
.an-card h1 { font-size: 1.5rem; margin: 0 0 12px; }
.an-card p { color: #45535f; line-height: 1.6; margin: 0 0 20px; }
.an-voet { font-size: 0.84rem; color: #7b8894; }
.an-warn { color: #8a5300; background: #fff5e2; border: 1px solid #f0d9ab;
  border-radius: 8px; padding: 12px 14px; }
.an-warn-error { color: #8b1a24; background: #faf1f1; border-color: #e3b8bd; }
.btn { display: inline-block; border: none; border-radius: 8px; padding: 11px 20px;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.an-lijst { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.an-kiesknop { width: 100%; text-align: left; cursor: pointer; background: #fff;
  border: 1px solid #d6dee5; border-radius: 10px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 3px; font: inherit;
  text-decoration: none; color: inherit; }
.an-kiesknop:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.an-kiesknop.cur { border-color: var(--primary); border-width: 2px; }
.an-kiesnaam { font-size: 1.02rem; font-weight: 700; color: #1d2c38; }
.an-kiesmeta { font-size: 0.8rem; color: #6b7b88; }

.an-link { display: block; width: 100%; font-family: ui-monospace, Consolas, monospace;
  font-size: 0.9rem; background: #fff; border: 1px solid #d6dee5; border-radius: 8px;
  padding: 12px 14px; word-break: break-all; }

/* ── zelfonderzoek (alleen /Announcer/Diagnose) ─────────────────── */
.an-diag { max-width: 900px; }
.an-diag table { width: 100%; border-collapse: collapse; margin: 8px 0 4px; }
.an-diag td { border-bottom: 1px solid #e2e6ea; padding: 7px 6px; vertical-align: top;
  font-size: 0.86rem; line-height: 1.35; word-break: break-word; }
.an-diag td.d-naam { width: 210px; font-weight: 700; color: #45535f; }
.an-diag td.d-waarde { font-family: ui-monospace, Consolas, monospace; }
.an-diag tr.goed td.d-waarde { color: #146c43; }
.an-diag tr.fout td { background: #faf1f1; }
.an-diag tr.fout td.d-waarde { color: #8b1a24; font-weight: 700; }
