/* ISA Team-Portal — Werte aus dem Entwurf (Claude Design), mit drei Zusaetzen:
   flexible Breite statt min-width 1440, Rechts-nach-links, und Schriften fuer
   die nichtlateinischen Sprachraeume. */

:root {
  --petrol:      #195F7E;
  --petrol-hell: #226FA9;
  --text:        #0B1F27;
  --text-2:      #3A525C;
  --text-3:      #6B818B;
  --text-4:      #93A5AD;
  --text-5:      #A9BAC2;
  --flaeche-1:   #FFFFFF;
  --flaeche-2:   #F8FBFC;
  --flaeche-3:   #F4F8FA;
  --flaeche-4:   #E6EEF2;
  --rand:        #E3EBEF;
  --rand-warm:   #E0D9D0;
  --rand-2:      #CFDEE5;
  --warn-bg:     #FFF6DE;
  --warn-fg:     #8A6A12;
  --fehler-bg:   #FBEEEE;
  --fehler-fg:   #9A3B41;
  --schatten:    0 2px 12px rgba(11,31,39,.07);
  --schatten-hoch: 0 12px 40px rgba(11,31,39,.14);
  --r-s: 8px; --r-m: 12px; --r-l: 16px;

  /* Systemschriften fuer Schriftsysteme, die Cormorant/DM Sans nicht abdecken:
     Arabisch, Hebraeisch, Georgisch, Chinesisch, Japanisch, Koreanisch.
     Selbst ausliefern waere ein Vielfaches an Datenmenge; jedes Betriebssystem
     bringt hier brauchbare Schriften mit. */
  --serif:  'Cormorant Garamond', 'Noto Serif', Georgia, 'Times New Roman', serif;
  --sans:   'DM Sans', 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--flaeche-1);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.55;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; }
h1 { font-size: 56px; letter-spacing: -.01em; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
a { color: var(--petrol); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }

/* ---------- Geruest ---------------------------------------------------- */
.kopf {
  display: flex; align-items: center; gap: 28px;
  padding: 18px 40px; border-bottom: 1px solid var(--rand);
  background: var(--flaeche-1);
  position: sticky; top: 0; z-index: 30;
}
.marke { display: flex; align-items: center; gap: 16px; }
.signet {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--text); display: grid; place-items: center;
  font-family: var(--serif); font-size: 14px; letter-spacing: .5px;
}
.marke-wort { font-family: var(--serif); font-size: 26px; }
.kopf-nav { margin-inline-start: auto; display: flex; align-items: center; gap: 28px; }
.kopf-nav a { color: var(--text-2); font-size: 15px; }
.kopf-nav a.aktiv { color: var(--petrol); text-decoration: underline; text-underline-offset: 6px; }
.abzeichen {
  background: var(--flaeche-3); border: 1px solid var(--rand);
  border-radius: 9999px; padding: 9px 18px; font-size: 14px; color: var(--text-2);
  display: flex; align-items: center; gap: 8px;
}
.abzeichen button {
  background: none; border: 0; color: var(--petrol); font-size: 13px; padding: 0;
}

.rumpf { display: flex; gap: 0; max-width: 1440px; margin: 0 auto; padding: 0 40px; }
.seiten-nav {
  flex: 0 0 260px; padding: 44px 24px 60px 0; border-inline-end: 1px solid var(--rand);
  align-self: flex-start; position: sticky; top: 76px;
}
.inhalt { flex: 1 1 auto; min-width: 0; padding: 44px 0 120px 40px; }
[dir="rtl"] .inhalt { padding: 44px 40px 120px 0; }

.nav-eintrag {
  display: block; width: 100%; text-align: start; border: 0; background: none;
  padding: 10px 14px; border-radius: var(--r-s); color: var(--text-2);
  font-size: 15px; margin-bottom: 2px;
}
.nav-eintrag:hover { background: var(--flaeche-3); }
.nav-eintrag.aktiv { background: var(--flaeche-4); color: var(--petrol); font-weight: 400; }
.nav-eintrag.stufe-2 { padding-inline-start: 28px; font-size: 14px; }
.nav-eintrag.stufe-3 { padding-inline-start: 42px; font-size: 13px; }
.nav-zurueck { display: inline-block; color: var(--text-3); font-size: 14px; margin-bottom: 26px; }

.krume { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-4); margin-bottom: 8px; }
.kopfzeile { display: flex; align-items: flex-start; gap: 24px; }
.kopfzeile h1 { flex: 1 1 auto; }
.sprachmarke { font-size: 14px; color: var(--text-3); white-space: nowrap; padding-top: 18px; }
.sprachmarke b { color: var(--petrol); font-weight: 400; }
.vorspann { color: var(--text-2); font-size: 16px; max-width: 62ch; margin-top: 18px; }

/* ---------- Karten und Tabellen ---------------------------------------- */
.karte {
  background: var(--flaeche-1); border: 1px solid var(--rand);
  border-radius: var(--r-l); box-shadow: var(--schatten); overflow: hidden;
}
.karte + .karte { margin-top: 22px; }
.karte-kopf { padding: 22px 26px 0; }
.karte-leib { padding: 22px 26px 26px; }

table.liste { width: 100%; border-collapse: collapse; }
table.liste th {
  text-align: start; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-4); font-weight: 400; padding: 16px 26px; background: var(--flaeche-2);
  border-bottom: 1px solid var(--rand);
}
table.liste td { padding: 18px 26px; border-bottom: 1px solid var(--rand); vertical-align: top; }
table.liste tr:last-child td { border-bottom: 0; }
table.liste tr.klickbar:hover td { background: var(--flaeche-2); cursor: pointer; }
.zeile-titel { font-size: 17px; }
.zeile-unter { font-size: 14px; color: var(--text-3); margin-top: 3px; }
.zahl { font-variant-numeric: tabular-nums; color: var(--text-3); font-size: 14px; }

.marke-fort {
  display: inline-block; font-size: 13px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.marke-fort.voll { color: var(--petrol); }

.termin { display: flex; gap: 26px; padding: 18px 0; border-bottom: 1px solid var(--rand); }
.termin:last-child { border-bottom: 0; }
.termin-tag { flex: 0 0 78px; }
.termin-tag b { font-family: var(--serif); font-size: 24px; font-weight: 400; display: block; }
.termin-tag span { font-size: 13px; color: var(--text-3); }

/* ---------- Zwei Spalten: Original | eigene Sprache --------------------- */
.paar { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: stretch; }
.paar > div { display: flex; flex-direction: column; }
.paar > div > .orig-text, .paar > div > textarea { flex: 1 1 auto; }
@media (max-width: 1100px) { .paar { grid-template-columns: 1fr; gap: 14px; } }
.feld-titel {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-4); margin-bottom: 8px;
}
.orig-text {
  background: var(--flaeche-3); border: 1px solid var(--rand);
  border-radius: var(--r-m); padding: 14px 16px; white-space: pre-wrap;
  color: var(--text-2); min-height: 48px;
}
.orig-text.leer { color: var(--text-5); font-style: italic; }
textarea.eingabe, input.eingabe {
  width: 100%; background: var(--flaeche-1); border: 1px solid var(--rand-2);
  border-radius: var(--r-m); padding: 14px 16px; color: var(--text);
  font: inherit; resize: vertical;
}
textarea.eingabe:focus, input.eingabe:focus {
  outline: 0; border-color: var(--petrol); box-shadow: 0 0 0 3px var(--flaeche-4);
}
textarea.eingabe.geaendert, input.eingabe.geaendert { border-color: var(--petrol); background: #FCFEFF; }
.feld + .feld { margin-top: 20px; }
.luecke {
  font-size: 13px; color: var(--warn-fg); background: var(--warn-bg);
  border-radius: var(--r-s); padding: 6px 10px; display: inline-block; margin-bottom: 8px;
}

/* Umschalter Original Deutsch | Englisch */
.umschalter { display: inline-flex; gap: 4px; padding: 3px; background: var(--flaeche-3); border: 1px solid var(--rand-warm); border-radius: 9999px; }
.umschalter button {
  border: 0; background: none; border-radius: 9999px; padding: 7px 16px;
  font-size: 14px; color: var(--text-2);
}
.umschalter button.aktiv { background: var(--flaeche-1); color: var(--petrol); box-shadow: var(--schatten); }

.reiter { display: inline-flex; gap: 4px; padding: 3px; background: var(--flaeche-3); border: 1px solid var(--rand-warm); border-radius: 9999px; margin: 24px 0; }
.reiter button { border: 0; background: none; border-radius: 9999px; padding: 9px 20px; font-size: 15px; color: var(--text-2); }
.reiter button.aktiv { background: var(--flaeche-1); color: var(--petrol); box-shadow: var(--schatten); }

/* ---------- Speichern-Leiste (laeuft unten mit) ------------------------- */
.speichern-leiste {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
  background: rgba(255,255,255,.96); border-top: 1px solid var(--rand);
  box-shadow: 0 -4px 20px rgba(11,31,39,.06);
  padding: 14px 40px; display: flex; align-items: center; gap: 18px;
  transform: translateY(110%); transition: transform .18s ease;
}
.speichern-leiste.sichtbar { transform: none; }
.knopf {
  background: var(--petrol); color: #fff; border: 0; border-radius: 9999px;
  padding: 12px 30px; font-size: 15px;
}
.knopf:disabled { background: var(--rand-2); color: var(--text-4); cursor: default; }
.knopf.stumm { background: none; color: var(--text-3); }
.leiste-text { font-size: 14px; color: var(--text-3); }

/* ---------- Zustaende --------------------------------------------------- */
.laedt { color: var(--text-4); font-size: 15px; padding: 40px 0; }
.leer-zustand {
  border: 1px dashed var(--rand-2); border-radius: var(--r-l);
  padding: 34px 30px; color: var(--text-3); background: var(--flaeche-2);
}
.leer-zustand h3 { font-size: 19px; color: var(--text-2); margin-bottom: 8px; }
.meldung {
  border-radius: var(--r-m); padding: 13px 16px; font-size: 14px; margin-bottom: 20px;
}
.meldung.fehler { background: var(--fehler-bg); color: var(--fehler-fg); }
.meldung.hinweis { background: var(--flaeche-4); color: var(--petrol); }
.meldung.warnung { background: var(--warn-bg); color: var(--warn-fg); }

/* ---------- Anmeldung --------------------------------------------------- */
.anmelde-seite { min-height: 100vh; display: grid; place-items: center; background: var(--flaeche-3); padding: 24px; }
.anmelde-karte {
  width: 100%; max-width: 420px; background: var(--flaeche-1);
  border: 1px solid var(--rand); border-radius: var(--r-l);
  box-shadow: var(--schatten-hoch); padding: 40px 36px;
}
.anmelde-karte .signet { width: 52px; height: 52px; font-size: 18px; margin: 0 auto 22px; }
.anmelde-karte h2 { text-align: center; margin-bottom: 8px; }
.anmelde-karte p.unter { text-align: center; color: var(--text-3); font-size: 14px; margin-bottom: 26px; }
.anmelde-karte .knopf { width: 100%; margin-top: 18px; }
.code-feld {
  width: 100%; text-align: center; font-size: 30px; letter-spacing: 12px;
  font-variant-numeric: tabular-nums; padding: 14px 10px;
  border: 1px solid var(--rand-2); border-radius: var(--r-m); background: var(--flaeche-2);
}
.code-feld:focus { outline: 0; border-color: var(--petrol); }
.klein-link { display: block; text-align: center; margin-top: 18px; font-size: 14px; color: var(--text-3); background: none; border: 0; width: 100%; }

/* Sprachwahl fuer das ISA-Team */
.sprachwahl {
  position: absolute; inset-inline-end: 40px; top: 70px; z-index: 50;
  background: #fff; border: 1px solid var(--rand-warm); border-radius: var(--r-l);
  box-shadow: var(--schatten-hoch); padding: 10px; width: 260px;
  max-height: 60vh; overflow: auto;
}
.sprachwahl button { display: block; width: 100%; text-align: start; border: 0; background: none; padding: 8px 12px; border-radius: var(--r-s); font-size: 14px; color: var(--text-2); }
.sprachwahl button:hover { background: var(--flaeche-4); }
.sprachwahl button.aktiv { color: var(--petrol); background: var(--flaeche-4); }

/* ---------- Übersetzungshilfe ------------------------------------------ */
.feld-kopf { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.feld-kopf .feld-titel { margin: 0; }
.ki-knopf {
  margin-inline-start: auto; border: 1px solid var(--rand-2); background: var(--flaeche-1);
  color: var(--petrol); border-radius: 9999px; padding: 4px 14px; font-size: 12px;
  letter-spacing: .02em; line-height: 1.6;
}
.ki-knopf:hover:not(:disabled) { background: var(--flaeche-4); border-color: var(--petrol); }
.ki-knopf:disabled { color: var(--text-4); border-color: var(--rand); cursor: default; }
.ki-hinweis { font-size: 12px; margin-top: 6px; min-height: 1em; color: var(--text-3); }
.ki-hinweis.gut { color: var(--petrol); }
.ki-hinweis.schlecht { color: var(--fehler-fg); }
