/* Hyperion Edge — S.A.R.A. Benutzerverwaltung. Farben wie Chatseite. */
:root {
  --he-background: #080d1a;
  --he-surface: #0e1528;
  --he-surface-container: #17223f;
  --he-surface-high: #1f2c4f;
  --he-outline: #2c3a62;
  --he-on-surface: #e6ebf7;
  --he-on-surface-variant: #a3aecb;
  --he-primary: #7ea3ff;
  --he-on-primary: #08132f;
  --he-error: #ff8a8a;
  --he-ok: #6fd6a2;
  --he-warn: #f2c66d;
  --he-radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--he-background);
  color: var(--he-on-surface);
  font: 15px/1.5 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  min-height: 100vh;
}
.material-symbols-outlined { font-size: 20px; line-height: 1; vertical-align: middle; }

.hv-kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 24px; border-bottom: 1px solid var(--he-outline); background: var(--he-surface);
  flex-wrap: wrap;
}
.hv-marke { display: flex; align-items: center; gap: 14px; }
.hv-marke img { height: 36px; width: auto; }
.hv-teiler { width: 1px; height: 28px; background: var(--he-outline); }
.hv-marke-name { font-weight: 600; letter-spacing: .12em; }
.hv-nav { display: flex; align-items: center; gap: 16px; }
.hv-sprachwahl { display: flex; border: 1px solid var(--he-outline); border-radius: 999px; overflow: hidden; }
.hv-sprachwahl button {
  background: none; border: 0; color: var(--he-on-surface-variant); padding: 4px 12px;
  font: inherit; font-size: 13px; cursor: pointer;
}
.hv-sprachwahl button[aria-pressed="true"] { background: var(--he-surface-high); color: var(--he-on-surface); }
.hv-link {
  color: var(--he-primary); text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px;
}
.hv-link:hover { text-decoration: underline; }

.hv-inhalt { max-width: 1080px; margin: 0 auto; padding: 32px 24px 64px; display: grid; gap: 24px; }
.hv-inhalt > * { min-width: 0; }
.hv-seitentitel { margin: 0; font-size: 26px; font-weight: 600; }
.hv-karte {
  background: var(--he-surface-container); border: 1px solid var(--he-outline);
  border-radius: var(--he-radius); padding: 24px;
}
.hv-karte h1 { margin: 0 0 12px; font-size: 22px; font-weight: 600; }
.hv-karte h2 { margin: 0 0 16px; font-size: 17px; font-weight: 600; }
.hv-schmal { max-width: 440px; width: 100%; margin: 24px auto 0; }
.hv-karte-kopf { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.hv-karte-kopf h2 { margin: 0; }
.hv-anzahl { color: var(--he-on-surface-variant); font-weight: 400; }
.hv-hinweis { color: var(--he-warn); margin: 0 0 16px; }
.hv-klein { color: var(--he-on-surface-variant); font-size: 13px; margin: 0; }

.hv-formular { display: grid; gap: 10px; }
.hv-formular label { font-size: 13px; color: var(--he-on-surface-variant); display: block; margin-bottom: 4px; }
.hv-raster { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; align-items: end; }
.hv-raster .hv-meldung, .hv-raster .hv-check { grid-column: 1 / -1; }
input[type="text"], input:not([type]), input[type="email"], input[type="password"], input[type="search"],
input[type="date"] {
  width: 100%; background: var(--he-surface); color: var(--he-on-surface);
  border: 1px solid var(--he-outline); border-radius: 8px; padding: 10px 12px; font: inherit;
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--he-primary); outline-offset: 2px; }
#hv-startpw { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .04em; }
#hv-suche { max-width: 260px; }
.hv-zeile { display: flex; gap: 8px; }
.hv-zeile input { flex: 1; min-width: 0; }
.hv-check { display: flex; align-items: center; gap: 10px; }
.hv-check label { margin: 0; color: var(--he-on-surface); font-size: 14px; }
.hv-check input { width: 18px; height: 18px; accent-color: var(--he-primary); }

.hv-knopf {
  background: var(--he-primary); color: var(--he-on-primary); border: 0; border-radius: 8px;
  padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.hv-knopf:hover { filter: brightness(1.08); }
.hv-knopf:disabled { opacity: .6; cursor: wait; }
.hv-knopf-leise { background: transparent; color: var(--he-primary); border: 1px solid var(--he-outline); font-weight: 500; }
.hv-knopf-gefahr { background: var(--he-error); color: #2a0808; }

.hv-meldung { margin: 0; color: var(--he-error); font-size: 14px; }
.hv-meldung.hv-ok { color: var(--he-ok); }

.hv-tabelle-wrap { overflow-x: auto; }
.hv-tabelle { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; }
.hv-tabelle th {
  text-align: left; font-weight: 500; color: var(--he-on-surface-variant); font-size: 12px;
  text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--he-outline);
}
.hv-tabelle td { padding: 12px 10px; border-bottom: 1px solid rgb(44 58 98 / .5); vertical-align: middle; }
.hv-tabelle tr:last-child td { border-bottom: 0; }
.hv-name { font-weight: 500; }
.hv-mail { color: var(--he-on-surface-variant); font-size: 13px; word-break: break-all; }
.hv-datum { color: var(--he-on-surface-variant); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hv-tabelle .hv-rechts { text-align: right; }
.hv-aktionen { white-space: nowrap; }
.hv-leer { color: var(--he-on-surface-variant); text-align: center; padding: 24px; }

.hv-chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--he-outline); white-space: nowrap;
}
.hv-rolle-admin { color: var(--he-primary); border-color: rgb(126 163 255 / .5); }
.hv-rolle-verwalter { color: #c4b2ff; border-color: rgb(196 178 255 / .45); }
.hv-rolle-nutzer { color: var(--he-on-surface-variant); }
.hv-status-aktiv { color: var(--he-ok); border-color: rgb(111 214 162 / .45); }
.hv-status-gesperrt { color: var(--he-error); border-color: rgb(255 138 138 / .45); }
.hv-status-start { color: var(--he-warn); border-color: rgb(242 198 109 / .45); }

.hv-icon {
  background: none; border: 1px solid transparent; color: var(--he-on-surface-variant);
  border-radius: 8px; padding: 6px; cursor: pointer; margin-left: 2px;
}
.hv-icon:hover { color: var(--he-on-surface); border-color: var(--he-outline); background: var(--he-surface); }
.hv-icon-gefahr:hover { color: var(--he-error); }

.hv-dialog-hg {
  position: fixed; inset: 0; background: rgb(4 7 15 / .7); display: grid; place-items: center; padding: 16px; z-index: 10;
}
.hv-dialog-hg[hidden] { display: none; }
.hv-dialog {
  background: var(--he-surface-container); border: 1px solid var(--he-outline); border-radius: var(--he-radius);
  padding: 24px; max-width: 480px; width: 100%; display: grid; gap: 16px;
}
.hv-dialog p { margin: 0; }
.hv-zugang {
  margin: 0; background: var(--he-surface); border: 1px solid var(--he-outline); border-radius: 8px;
  padding: 12px; font-size: 13px; white-space: pre-wrap; word-break: break-all;
}
.hv-zugang:empty { display: none; }
.hv-dialog-knoepfe { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .hv-kopf, .hv-inhalt { padding-left: 16px; padding-right: 16px; }
  .hv-karte { padding: 18px; }
  #hv-suche { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
select#hv-abo {
  width: 100%; background: var(--he-surface); color: var(--he-on-surface);
  border: 1px solid var(--he-outline); border-radius: 8px; padding: 10px 12px; font: inherit;
}
.hv-abo-365 { color: #c4b2ff; border-color: rgb(196 178 255 / .45); }
.hv-abo-360 { color: var(--he-primary); border-color: rgb(126 163 255 / .45); }

/* Laufzeit des Abos (Datumsfelder, Anzeige in der Liste) */
input[type="date"] { color-scheme: dark; min-height: 44px; }
.hv-laufzeit { white-space: nowrap; word-break: normal; margin-top: 4px; }
.hv-raster .hv-voll { grid-column: 1 / -1; margin: -8px 0 0; }

/* Seite /ausgaben */
.hv-ablage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer;
  padding: 32px 16px; border: 2px dashed var(--he-outline); border-radius: var(--he-radius); }
.hv-ablage .material-symbols-outlined { font-size: 40px; color: var(--he-primary); }
.hv-ablage input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.hv-ablage:focus-within, .hv-ablage-aktiv { border-color: var(--he-primary); background: var(--he-surface-high); }
.hv-upload { margin-top: 16px; padding: 16px; border: 1px solid var(--he-outline); border-radius: var(--he-radius); }
.hv-upload-kopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; word-break: break-all; }
.hv-upload-kopf .material-symbols-outlined { color: var(--he-primary); }
.hv-upload .hv-meldung:empty { display: none; }
.hv-formular select.hv-auswahl, .hv-formular input[type="number"] { width: 100%; background: var(--he-surface); color: var(--he-on-surface);
  border: 1px solid var(--he-outline); border-radius: 8px; padding: 10px 12px; font: inherit; min-height: 44px; margin-top: 4px; }
.hv-knopfzeile { display: flex; gap: 12px; flex-wrap: wrap; }
.hv-alle { margin-top: 16px; }
.hv-stand { white-space: normal; margin-top: 4px; }

/* Verwaltungsbereich: Reiter unter dem Kopf */
.hv-bereich {
  display: flex; gap: 4px; padding: 0 24px; background: var(--he-surface);
  border-bottom: 1px solid var(--he-outline); overflow-x: auto;
}
.hv-bereich a {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; white-space: nowrap;
  color: var(--he-on-surface-variant); text-decoration: none; font-size: 14px; border-bottom: 2px solid transparent;
}
.hv-bereich a:hover { color: var(--he-on-surface); }
.hv-bereich a[aria-current="page"] { color: var(--he-on-surface); border-bottom-color: var(--he-primary); font-weight: 500; }

/* Uebersicht */
.hv-inhalt.hv-breit { max-width: 1280px; }
.hv-ohne-rand { margin: 0; }
.hv-unter { margin: -10px 0 14px; }
.hv-karte h3 { margin: 20px 0 10px; font-size: 14px; font-weight: 600; color: var(--he-on-surface-variant); }
.hv-knopf .material-symbols-outlined { font-size: 18px; margin-right: 6px; }
input[type="number"] {
  background: var(--he-surface); color: var(--he-on-surface); border: 1px solid var(--he-outline);
  border-radius: 8px; padding: 10px 12px; font: inherit; width: 100%;
}
.hv-standard { max-width: 640px; margin-bottom: 16px; }
.hv-standard .hv-zeile { align-items: center; flex-wrap: wrap; }
.hv-standard .hv-zeile input { flex: 0 0 120px; }
.hv-standard .hv-ok { color: var(--he-ok); }
#hv-nsuche { max-width: 260px; }
.hv-dialog form { display: grid; gap: 10px; }
.hv-dialog-titel { font-weight: 600; }

.hv-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.hv-kachel {
  background: var(--he-surface-container); border: 1px solid var(--he-outline); border-radius: var(--he-radius);
  padding: 16px 18px; display: grid; gap: 4px; align-content: start;
}
.hv-kachel-titel { display: flex; align-items: center; gap: 8px; color: var(--he-on-surface-variant); font-size: 13px; }
.hv-kachel-titel .material-symbols-outlined { color: var(--he-primary); font-size: 18px; }
.hv-kachel-wert { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hv-kachel-warn { border-color: rgb(242 198 109 / .55); }
.hv-kachel-warn .hv-kachel-titel .material-symbols-outlined { color: var(--he-warn); }

.hv-raster2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 24px; }
.hv-raster2 > * { min-width: 0; }

.hv-segment { display: inline-flex; border: 1px solid var(--he-outline); border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.hv-segment button {
  background: none; border: 0; color: var(--he-on-surface-variant); padding: 6px 14px; font: inherit; font-size: 13px; cursor: pointer;
}
.hv-segment button[aria-pressed="true"] { background: var(--he-surface-high); color: var(--he-on-surface); }
.hv-diagramm svg { width: 100%; height: 220px; display: block; }
.hv-balken { fill: var(--he-primary); opacity: .85; }
.hv-balken:hover { opacity: 1; fill: #a9c2ff; }
.hv-gitter { stroke: var(--he-outline); stroke-dasharray: 4 4; stroke-width: 1; vector-effect: non-scaling-stroke; }
.hv-achse { fill: var(--he-on-surface-variant); font-size: 12px; }

.hv-rangliste { margin: 0; padding: 0; list-style: none; counter-reset: rang; display: grid; gap: 2px; }
.hv-rangliste li {
  counter-increment: rang; display: flex; gap: 10px; align-items: baseline; padding: 7px 0;
  border-bottom: 1px solid rgb(44 58 98 / .5); font-size: 14px;
}
.hv-rangliste li:last-child { border-bottom: 0; }
.hv-rangliste li::before { content: counter(rang); color: var(--he-on-surface-variant); font-size: 12px; min-width: 1.4em; text-align: right; }
.hv-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hv-anzahl-chip { color: var(--he-on-surface-variant); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hv-themen { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.hv-themen li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; font-size: 14px;
  background: linear-gradient(90deg, rgb(126 163 255 / .18) var(--anteil), transparent var(--anteil));
}
.hv-themen .material-symbols-outlined { font-size: 16px; }

.hv-fortschritt { height: 4px; border-radius: 2px; background: var(--he-surface-high); margin-top: 6px; max-width: 140px; overflow: hidden; }
.hv-fortschritt span { display: block; height: 100%; background: var(--he-ok); }
.hv-fortschritt.hv-fast span { background: var(--he-warn); }
.hv-fortschritt.hv-voll-rot span { background: var(--he-error); }

.hv-werte { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0; font-size: 14px; }
.hv-werte dt { color: var(--he-on-surface-variant); }
.hv-werte dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.hv-meldungen { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; }
.hv-meldungen li { overflow-wrap: anywhere; }
.hv-meldungen .hv-klein { display: block; margin-top: 2px; }
.hv-meldungen code { font-size: 12px; }

@media (max-width: 640px) {
  .hv-bereich { padding: 0 8px; }
  .hv-raster2 { grid-template-columns: 1fr; }
  #hv-nsuche { max-width: none; }
}

/* Uebersicht: Benachrichtigungen */
.hv-schmal-tabelle { min-width: 480px; }
.hv-tabelle .hv-mitte, .hv-tabelle th.hv-mitte { text-align: center; }
.hv-tabelle input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--he-primary); }
.hv-adresse-neu { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.hv-adresse-neu input[type="email"] { flex: 1 1 240px; width: auto; }
.hv-adresse-neu .hv-check { gap: 6px; }
#hv-meldungen .hv-knopfzeile { margin-top: 8px; }
#hv-meldungen > div > p { margin: 10px 0 0; }
.hv-ok-text { color: var(--he-ok); margin-bottom: 12px; }
.hv-pruefliste { margin: 12px 0; padding: 0; list-style: none; display: grid; gap: 8px 24px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.hv-pruefliste li { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.hv-pruefliste .hv-chip { min-width: 96px; text-align: center; }
.hv-pruefliste .hv-klein { display: block; }
