@import url('../fonts/fonts.css?v=1.1.0');

/* ==================================================================
   ZimmerPunkte - Design "Liga"
   Mobil zuerst: alle Grundwerte gelten fuer das Handy, weiter unten
   folgen die Erweiterungen fuer Tablet und grosse Bildschirme.
   ================================================================== */

:root {
  --grund:        #0E1116;
  --flaeche:      #151A23;
  --flaeche-hell: #1B2230;
  --linie:        #262E3C;
  --linie-hell:   #323C4D;
  --text:         #F2F4F7;
  --text-leise:   #96A0AF;
  --text-aus:     #6E7887;
  --akzent:       #FFD23F;
  --akzent-dunkel:#3D3520;
  --gut:          #7DD87D;
  --warnung:      #E08A6E;
  --warnung-tief: #4A2F28;

  --rund:   10px;
  --rund-s: 8px;
  --fokus:  0 0 0 3px rgba(255, 210, 63, .45);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.15; }

a { color: var(--akzent); }
a:hover { color: #FFE480; }

:focus-visible { outline: none; box-shadow: var(--fokus); border-radius: 6px; }

.verborgen { display: none !important; }

.nur-vorleser {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.seite {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------------------------------------------------------------- */
/* Kopfzeile                                                         */
/* ---------------------------------------------------------------- */

.kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.marke {
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-size: 27px;
  letter-spacing: -.02em;
  text-transform: uppercase;
  line-height: 1;
}
.marke span { color: var(--akzent); }

.kopf-titel {
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: -.01em;
}

.kopf-rechts { display: flex; align-items: center; gap: 10px; }
.wer { font-size: 13px; color: var(--text-leise); }

.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-leise);
  font-weight: 600;
}

/* ---------------------------------------------------------------- */
/* Knoepfe und Formularfelder                                        */
/* ---------------------------------------------------------------- */

button, .knopf {
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--rund-s);
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--linie-hell);
  background: var(--flaeche-hell);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:hover, .knopf:hover { border-color: #46536B; }
button:disabled { cursor: not-allowed; color: var(--text-aus); }

.haupt {
  background: var(--akzent);
  color: var(--grund);
  border-color: var(--akzent);
}
.haupt:hover { background: #FFE480; border-color: #FFE480; }
.haupt:disabled { background: var(--flaeche-hell); border-color: var(--linie-hell); color: var(--text-aus); }

.gefahr { color: var(--warnung); border-color: var(--warnung-tief); }

.gross { width: 100%; min-height: 56px; font-size: 17px; letter-spacing: .06em; text-transform: uppercase; }

label { font-size: 13px; color: var(--text-leise); font-weight: 600; }

input[type="text"], input[type="password"], input[type="number"],
input[type="date"], select {
  width: 100%;
  min-height: 48px;
  background: var(--flaeche-hell);
  color: var(--text);
  border: 1px solid var(--linie-hell);
  border-radius: var(--rund);
  padding: 0 12px;
  font-family: inherit;
  font-size: 16px;            /* unter 16px zoomt iOS beim Antippen hinein */
}
input::placeholder { color: var(--text-aus); }

input[type="checkbox"] {
  width: 26px; height: 26px; flex-shrink: 0;
  accent-color: var(--akzent);
  cursor: pointer;
}

.feld { display: flex; flex-direction: column; gap: 6px; }
.reihe { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }

/* ---------------------------------------------------------------- */
/* Menueleiste                                                       */
/* ---------------------------------------------------------------- */

.menue { display: flex; gap: 6px; }
.menue a {
  flex: 1 1 0;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-leise);
  background: var(--flaeche);
  border-radius: var(--rund-s);
  padding: 12px 6px;
  text-decoration: none;
  min-height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.menue a.aktiv { background: var(--akzent); color: var(--grund); font-weight: 700; }

/* ---------------------------------------------------------------- */
/* Rangliste                                                         */
/* ---------------------------------------------------------------- */

.tabellenkopf {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-leise);
  font-weight: 600;
}
/* Eigene Breiten, damit die Beschriftungen genau ueber den Spalten der
   Zeilen sitzen. Frueher wurden hier die Klassen der Zeilen benutzt -
   die bringen aber ihre grosse Schrift mit, wodurch "Platz" ueber
   "Zimmer" gelaufen ist. */
.kopf-platz  { width: 48px; flex-shrink: 0; }
.kopf-zimmer { flex: 1 1 auto; min-width: 0; }
.kopf-punkte { width: 100px; text-align: right; flex-shrink: 0; }

.liste { display: flex; flex-direction: column; gap: 8px; }

.gruppe {
  background: #141A24;
  border: 1px solid var(--akzent-dunkel);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gruppe-kopf { display: flex; align-items: center; gap: 10px; }
.gruppe-platz {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 6px;
  background: var(--akzent);
  color: var(--grund);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-size: 19px;
}
.gruppe-text {
  flex: 1 1 auto;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--akzent); font-weight: 700;
}
.gruppe-punkte { font-family: 'Archivo Black', 'Archivo', sans-serif; font-size: 24px; }

.zeile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--flaeche);
  border-radius: var(--rund);
  padding: 11px 14px;
  min-height: 62px;
}
.gruppe .zeile { background: var(--flaeche-hell); }

.zeile-platz {
  width: 28px; flex-shrink: 0;
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-size: 20px;
  color: var(--text-leise);
}
.zeile-platz.podest { color: var(--akzent); }

.zeile-mitte { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.zeile-name { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.zeile-unter { font-size: 12px; color: var(--text-leise); }
.zeile-unter.serie { color: var(--akzent); }

.zeile-rechts { text-align: right; display: flex; flex-direction: column; gap: 1px; align-items: flex-end; }
.zeile-summe { font-family: 'Archivo Black', 'Archivo', sans-serif; font-size: 21px; }
.zeile-heute { font-size: 12px; font-weight: 600; color: var(--gut); }
.zeile-heute.leer { color: var(--text-leise); font-weight: 400; }

.tendenz { display: inline-flex; align-items: center; gap: 3px; }

.fuss {
  border-top: 1px solid var(--linie);
  padding-top: 14px;
  font-size: 12px;
  color: var(--text-leise);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.leerhinweis {
  background: var(--flaeche);
  border-radius: 12px;
  padding: 24px 18px;
  text-align: center;
  color: var(--text-leise);
}

/* ---------------------------------------------------------------- */
/* Punkteseite                                                       */
/* ---------------------------------------------------------------- */

.waehler {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  min-height: 54px;
  background: var(--flaeche-hell);
  border: 1px solid var(--linie-hell);
  border-radius: var(--rund);
  padding: 0 14px;
  text-align: left;
  font-size: 17px; font-weight: 600;
}
.waehler.entwurf { border-color: var(--akzent-dunkel); }
.waehler-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }

.kategorien { display: flex; flex-direction: column; gap: 8px; }

.kategorie {
  display: flex; align-items: center; gap: 14px;
  background: var(--flaeche);
  border-radius: var(--rund);
  padding: 8px 16px;
  min-height: 64px;
  cursor: pointer;
}
.kategorie.an { background: var(--flaeche-hell); }
.kategorie.gesperrt { cursor: default; }
.kategorie-name { flex: 1 1 auto; font-size: 17px; font-weight: 600; }
.kategorie.aus .kategorie-name { color: var(--text-leise); }
.kategorie-punkte { font-family: 'Archivo Black', 'Archivo', sans-serif; font-size: 18px; color: var(--akzent); }
.kategorie.aus .kategorie-punkte { color: var(--text-aus); }

.hinweis {
  display: flex; align-items: flex-start; gap: 10px;
  border-radius: var(--rund-s);
  padding: 12px;
  font-size: 13px;
  line-height: 1.45;
}
.hinweis.entwurf { background: var(--flaeche-hell); border: 1px solid var(--akzent-dunkel); color: #D8C48A; }
.hinweis.fertig  { background: #16251C; border: 1px solid #2F5538; color: #A8B4A8; }
.hinweis.fehler  { background: #1E1518; border: 1px solid var(--warnung-tief); color: #EDBCAA; }
.hinweis strong { display: block; color: var(--text); margin-bottom: 2px; }
.hinweis.fertig strong { color: var(--gut); }
.hinweis.fehler strong { color: var(--warnung); }

.summe {
  display: flex; align-items: baseline; justify-content: space-between;
  border-top: 1px solid var(--linie);
  padding-top: 12px;
}
.summe-zahl { font-family: 'Archivo Black', 'Archivo', sans-serif; font-size: 34px; }
.summe-zahl small { font-size: 18px; color: var(--text-leise); font-weight: 400; }

.unterknopf { font-size: 12px; color: var(--text-leise); text-align: center; line-height: 1.5; }

.legende { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-leise); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------- */
/* Adminbereich                                                      */
/* ---------------------------------------------------------------- */

.reiter { display: flex; gap: 6px; overflow-x: auto; }
.reiter button {
  flex: 1 0 auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-leise);
  background: var(--flaeche);
  border: none;
  padding: 12px 14px;
}
.reiter button.aktiv { background: var(--akzent); color: var(--grund); font-weight: 700; }

.karte {
  background: var(--flaeche);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.karte.blass { background: #12161D; border: 1px dashed var(--linie); }
.karte-kopf { display: flex; align-items: center; gap: 10px; }
.karte-kopf .titel { flex: 1 1 auto; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.karte-aktionen { display: flex; gap: 8px; flex-wrap: wrap; }
.karte-aktionen button { flex: 1 1 auto; font-size: 13px; font-weight: 600; }

.marke-rolle {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  border-radius: 4px; padding: 5px 9px;
  background: #2A3342; color: #C8D0DC;
}
.marke-rolle.admin { background: var(--akzent); color: var(--grund); }

.zeile-schlank {
  display: flex; align-items: center; gap: 12px;
  background: var(--flaeche);
  border-radius: var(--rund);
  padding: 8px 12px;
  min-height: 58px;
}
.zeile-schlank .name { flex: 1 1 auto; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.zeile-schlank.aus { background: #12161D; border: 1px dashed var(--linie); }
.zeile-schlank.aus .name { color: var(--text-aus); }

.symbolknopf {
  width: 44px; height: 44px; padding: 0; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}

.punktzahl { font-family: 'Archivo Black', 'Archivo', sans-serif; font-size: 20px; color: var(--akzent); }

.protokoll { display: flex; flex-direction: column; gap: 8px; }
.eintrag {
  background: var(--flaeche);
  border-radius: var(--rund);
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 5px;
}
.eintrag.warn { background: #1E1518; border: 1px solid var(--warnung-tief); }
.eintrag-kopf { display: flex; align-items: center; gap: 8px; }
.eintrag-zeit { margin-left: auto; font-size: 12px; color: var(--text-leise); }
.eintrag-text { font-size: 15px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.eintrag-detail { font-size: 12px; color: var(--text-leise); overflow-wrap: anywhere; }

.etikett {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  border-radius: 3px; padding: 3px 7px;
  background: #2A3342; color: #C8D0DC;
}
.etikett.punkte { background: var(--gut); color: var(--grund); }
.etikett.admin  { background: var(--akzent); color: var(--grund); }
.etikett.fehler { background: var(--warnung); color: var(--grund); }

.abschnitt-titel {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-leise); font-weight: 600;
  display: flex; justify-content: space-between; gap: 12px;
}

/* ---------------------------------------------------------------- */
/* Popup                                                             */
/* ---------------------------------------------------------------- */

dialog {
  border: 1px solid var(--linie-hell);
  border-radius: 14px;
  background: var(--flaeche);
  color: var(--text);
  padding: 20px;
  width: min(420px, calc(100vw - 32px));
}
dialog::backdrop { background: rgba(5, 7, 10, .72); }
.dialog-inhalt { display: flex; flex-direction: column; gap: 14px; }
.dialog-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-kopf h2 { font-family: 'Archivo Black', 'Archivo', sans-serif; font-size: 20px; text-transform: uppercase; }

/* ---------------------------------------------------------------- */
/* Kurzmeldung unten                                                 */
/* ---------------------------------------------------------------- */

.meldung {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  background: var(--flaeche-hell);
  border: 1px solid var(--linie-hell);
  border-radius: var(--rund);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  z-index: 60;
}
.meldung.gut { border-color: #2F5538; color: var(--gut); }
.meldung.schlecht { border-color: var(--warnung-tief); color: var(--warnung); }

/* ---------------------------------------------------------------- */
/* Groessere Bildschirme                                             */
/* ---------------------------------------------------------------- */

@media (min-width: 720px) {
  .seite { padding: 32px 28px 48px; gap: 20px; }
  .marke { font-size: 44px; }
  .kopf-titel { font-size: 28px; }
  .tabellenkopf { display: flex; }
  .zeile { padding: 13px 20px; min-height: 70px; }
  .zeile-platz { width: 48px; font-size: 28px; }
  .zeile-name { font-size: 20px; }
  .zeile-summe { font-size: 28px; }
  .gruppe-platz { width: 44px; height: 44px; font-size: 24px; }
  .gruppe-punkte { font-size: 30px; }
  .zwei-spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .menue { max-width: 420px; }
  .reiter button { flex: 0 0 auto; }
}

@media (min-width: 1024px) {
  .marke { font-size: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.seite-inhalt { display: flex; flex-direction: column; gap: 14px; }
