/* css/rollen-admin.css — Rollen & Rechte
 *
 * Gehört zu js/rollen-admin.js. Nur Tokens aus css/keeva-ui.css (--k-*).
 *
 * EINE ENTSCHEIDUNG, DIE ERKLÄRUNG BRAUCHT: die Kästchen sind 24 px gross und
 * sitzen in einer 44 px hohen Zeile. 24 px klingt klein — die anklickbare
 * Fläche ist aber die ganze Zeile (`label` umschliesst das Kästchen bzw. das
 * Modul-Raster hat 44 px Zeilenhöhe). Eine Fingerkuppe misst rund 9 mm; die
 * Zeile trifft man, das Kästchen allein nicht.
 *
 * VERLINKUNGEN: js/rollen-admin.js, api/rollenverwaltung.php, DEVLOG 2026-08-02.
 */

/* 40 -> 24, Skala (2026-08-29).
   ⚠ Hier stand kurz 36px — mein Fehler, von Stefan gefunden. 36 ist
   die SCHREIBTISCH-Stufe von --nv-luft-3 (Telefon 24, Tablet 30,
   Schreibtisch 36). Diese Regel hat aber keine Media-Query, sie gilt
   also auch am Telefon — und dort gibt es keine 36. Ein Wert aus
   einer Bildschirmstufe gehoert NUR in ihre Media-Query. */
.ro-huelle { padding: 0 var(--nv-s4) var(--nv-s5); max-width: 780px; margin: 0 auto; }
.ro-laden, .ro-fehler { padding: var(--nv-s8) var(--nv-s4); text-align: center; color: var(--k-text3); font-size: var(--k-fs-body); }
.ro-fehler { color: var(--k-red, #EF4444); }

/* ── Liste ───────────────────────────────────────────────────────────── */
.ro-neu {
  display: flex; align-items: center; justify-content: center; gap: var(--nv-s2);
  width: 100%; min-height: 50px; margin: var(--nv-s1) 0 var(--nv-s4);
  border: 1px dashed var(--k-border-strong, rgba(0,0,0,.2));
  border-radius: var(--k-r-sm, 18px);
  background: transparent; color: var(--k-brand);
  font-family: inherit; font-size: var(--k-fs-body); font-weight: 600; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ro-neu:active { transform: scale(.985); background: var(--k-fill); }
.ro-neu .material-symbols-rounded { font-size: 20px; }

.ro-liste {
  border-radius: var(--k-r-sm, 18px);
  background: var(--k-surface-solid, var(--nv-flaeche-erhoben));
  box-shadow: var(--k-shadow-sm);
  overflow: hidden;
}
.ro-zeile {
  display: flex; align-items: center; gap: var(--nv-s3);
  padding: var(--nv-s3) var(--nv-s4); cursor: pointer;
  border-bottom: 1px solid var(--k-border, rgba(0,0,0,.06));
  -webkit-tap-highlight-color: transparent;
}
.ro-zeile:last-child { border-bottom: none; }
.ro-zeile:active { background: var(--k-fill); }
.ro-zeile--fest { cursor: default; opacity: .72; }
.ro-punkt { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.ro-text { flex: 1; min-width: 0; }
.ro-text b { display: block; font-size: var(--k-fs-body); font-weight: 600; color: var(--k-text); }
.ro-text small { display: block; font-size: var(--k-fs-caption); color: var(--k-text3); margin-top: 1px; }
.ro-marke {
  font-size: var(--k-fs-micro); font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--k-text3); background: var(--k-fill); padding: 2px var(--nv-s2); border-radius: var(--nv-r-marke); /* Nacht 4 (Stefan 21): Marke */
  vertical-align: 2px;
}
.ro-pfeil { color: var(--k-text4); font-size: 20px; }
.ro-hinweis { font-size: var(--k-fs-body); line-height: 1.55; color: var(--k-text3); margin: var(--nv-s4) 2px 0; }

/* ── Karte oben (Name, Rang, Notiz) ──────────────────────────────────── */
.ro-karte {
  background: var(--k-surface-solid, var(--nv-flaeche-erhoben));
  border-radius: var(--k-r-sm, 18px);
  box-shadow: var(--k-shadow-sm);
  padding: var(--nv-s4); margin-bottom: var(--nv-s4);
}
.ro-feld { display: block; margin-bottom: var(--nv-s3); }
.ro-feld span {
  display: block; font-size: var(--k-fs-caption); font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--k-text3); margin-bottom: var(--nv-s2);
}
.ro-feld input, .ro-feld select {
  width: 100%; box-sizing: border-box; min-height: 44px;
  padding: var(--nv-s3) var(--nv-s4); border-radius: var(--k-r-xs, 14px);
  border: 1px solid var(--k-border-strong, rgba(0,0,0,.15));
  background: var(--k-bg2, var(--nv-flaeche-erhoben)); color: var(--k-text);
  font-family: inherit; font-size: var(--k-fs-body);
}
.ro-klein { font-size: var(--k-fs-body); line-height: 1.55; color: var(--k-text3); margin: 0 0 var(--nv-s3); }

/* ── Blöcke ──────────────────────────────────────────────────────────── */
.ro-block {
  background: var(--k-surface-solid, var(--nv-flaeche-erhoben));
  border-radius: var(--k-r-sm, 18px);
  box-shadow: var(--k-shadow-sm);
  padding: var(--nv-s2) var(--nv-s4) var(--nv-s3); margin-bottom: var(--nv-s4);
}
.ro-block-kopf {
  display: flex; align-items: center; justify-content: space-between; gap: var(--nv-s3);
  padding: var(--nv-s3) 0 var(--nv-s2);
  font-size: var(--k-fs-caption); font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--k-text2);
  border-bottom: 1px solid var(--k-border, rgba(0,0,0,.06));
}
.ro-block-kopf small {
  display: block; font-size: var(--k-fs-caption); font-weight: 500; letter-spacing: 0;
  text-transform: none; color: var(--k-text3); margin-top: 2px;
}
.ro-alle {
  border: none; background: transparent; color: var(--k-brand);
  font-family: inherit; font-size: var(--k-fs-caption); font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; cursor: pointer; padding: var(--nv-s2) var(--nv-s2); min-height: 32px;
}

/* Daten-Rechte: eine Zeile, ein Haken */
.ro-daten-zeile {
  display: flex; align-items: center; gap: var(--nv-s3);
  min-height: 48px; padding: var(--nv-s2) 0;
  border-bottom: 1px solid var(--k-border, rgba(0,0,0,.05));
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ro-daten-zeile:last-child { border-bottom: none; }
.ro-daten-text { flex: 1; min-width: 0; }
.ro-daten-text b { display: block; font-size: var(--k-fs-body); font-weight: 600; color: var(--k-text); }
.ro-daten-text small { display: block; font-size: var(--k-fs-caption); color: var(--k-text3); margin-top: 1px; }

/* Module: Name + zwei Spalten */
.ro-tabelle-kopf,
.ro-modul {
  display: grid;
  grid-template-columns: 1fr 62px 78px;
  align-items: center; gap: var(--nv-s2);
}
.ro-tabelle-kopf {
  padding: var(--nv-s2) 0 var(--nv-s1);
  font-size: var(--k-fs-caption); font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--k-text4);
  text-align: center;
}
.ro-tabelle-kopf span:first-child { text-align: left; }
.ro-modul {
  min-height: 44px;
  border-bottom: 1px solid var(--k-border, rgba(0,0,0,.05));
}
.ro-modul:last-child { border-bottom: none; }
.ro-modul-name {
  display: flex; align-items: center; gap: var(--nv-s2);
  font-size: var(--k-fs-body); color: var(--k-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ro-modul-name .material-symbols-rounded { font-size: 19px; color: var(--k-text3); flex: 0 0 auto; }

/* Kästchen — gross genug, um es zu sehen; die Zeile ist die Trefferfläche. */
.ro-haken {
  width: 24px; height: 24px; margin: 0 auto;
  accent-color: var(--k-brand);
  cursor: pointer;
}

/* ── Fuss ────────────────────────────────────────────────────────────── */
.ro-fuss { display: flex; flex-direction: column; gap: var(--nv-s3); margin-top: 20px; }
.ro-speichern, .ro-loeschen {
  width: 100%; min-height: 50px; border-radius: var(--k-r-full, 9999px);
  border: none; font-family: inherit; font-size: .95rem; font-weight: 700; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ro-speichern { background: var(--k-brand); color:var(--k-text-auf-marke); }
.ro-speichern:active { transform: scale(.985); }
.ro-loeschen {
  background: transparent; color: var(--k-red, #EF4444);
  border: 1px solid var(--k-red, #EF4444);
}

@media (min-width: 1024px) {
  .ro-huelle { max-width: 860px; }
  .ro-tabelle-kopf, .ro-modul { grid-template-columns: 1fr 90px 110px; }
}
