:root {
  /* ── Farbpalette des Portals ── */
  --primary:        #0067ff;
  --primary-hover:  #005ee9;
  --ink:            #0f172a;
  --ink-dim:        #364151;
  --cyan:           #e7f6ff;
  --white:          #ffffff;
  --outline:        #d1dae5;
  --dark:           #070614;

  --blue-bg:        #eff2ff;
  --outline-soft:   #e5e9f0;
  --rot:            #b91c1c;
  --gruen:          #16a34a;

  /* ── Eisenbahn-Akzente (Oberleitung, Signal) ── */
  --wire:           rgba(158,197,255,0.42);
  --wire-soft:      rgba(158,197,255,0.26);
  --signal-green:   #16a34a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: 'Poppins', 'Helvetica', system-ui, sans-serif;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: 'Inter', 'Helvetica', system-ui, sans-serif;
  letter-spacing: -0.02em;
  margin: 0;
}

a { text-decoration: none; }

/* ── Dunkles Hero-Band ─────────────────────────────────── */
.topband {
  position: relative;
  background:
    radial-gradient(900px 420px at 88% -20%, rgba(0,103,255,0.28) 0%, transparent 60%),
    radial-gradient(700px 380px at 5% 0%, rgba(0,103,255,0.12) 0%, transparent 55%),
    linear-gradient(180deg, var(--ink) 0%, var(--dark) 100%);
  color: var(--white);
  padding-bottom: 96px;
}

.nav {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px clamp(20px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav .logo { height: 34px; width: auto; display: block; }

/* Oberleitung als eigenes Band unter der Menüleiste (Maste + Fahrdraht) */
.ol-band {
  max-width: 1180px;
  margin: 4px auto 0;
  padding: 0 clamp(20px, 5vw, 64px);
}
.ol-band svg { display: block; width: 100%; height: 82px; }

/* Schriftzug statt Firmenlogo */
.wortmarke {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: 'Inter', sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
}
.rail-ico { width: 20px; height: 20px; flex: 0 0 auto; color: #9ec5ff; }
.wortmarke.hell .rail-ico { width: 16px; height: 16px; }
.wortmarke .endung { color: #9ec5ff; font-weight: 600; }
.wortmarke.hell { font-size: 16px; color: rgba(255,255,255,0.9); }
.nav-rechts { display: flex; align-items: center; gap: 18px; }
.nav .site-link,
.nav .nav-name {
  color: rgba(255,255,255,0.78);
  font-size: 13.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .15s ease;
}
.nav .site-link:hover { color: var(--white); }
.nav button.link {
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: inherit; font-size: 13.5px; font-weight: 500;
  color: rgba(255,255,255,0.78);
}
.nav button.link:hover { color: var(--white); }

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 5vw, 64px) 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: start;
}
.hero-inner { max-width: 760px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9ec5ff;
  border: 1px solid rgba(158,197,255,0.35);
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal-green);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.22);
}
.hero h1 {
  font-size: clamp(30px, 5.2vw, 50px);
  font-weight: 800;
  line-height: 1.06;
  color: var(--white);
}
.hero .claim {
  font-family: 'Inter', sans-serif;
  font-size: clamp(15px, 2.2vw, 19px);
  font-weight: 500;
  color: #9ec5ff;
  margin-top: 14px;
}
.hero p.lead {
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.6;
  color: rgba(255,255,255,0.82);
  margin-top: 18px;
  max-width: 620px;
}

/* ── Anmeldekarte ──────────────────────────────────────── */
.loginbox {
  background: var(--white);
  color: var(--ink);
  border-radius: 18px;
  padding: 26px 24px;
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.35);
  min-width: 260px;
}
.loginbox h2 { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.loginbox label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-dim);
  margin: 12px 0 6px;
}
.loginbox input,
.dlg-inhalt input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--outline);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
}
.loginbox input:focus,
.dlg-inhalt input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}

.btn-primary {
  margin-top: 18px;
  width: 100%;
  padding: 11px 16px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-primary.schmal { width: auto; margin-top: 0; padding: 10px 18px; }

.btn-sekundaer {
  padding: 9px 16px;
  border: 1px solid var(--outline);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-sekundaer:hover { border-color: var(--primary); color: var(--primary); }

.fehler  { color: var(--rot);   font-size: 13.5px; margin: 12px 0 0; }
.erfolg  { color: var(--gruen); font-size: 13.5px; margin: 12px 0 0; }

/* ── Kacheln ───────────────────────────────────────────── */
main {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: -72px auto 0;
  padding: 0 clamp(20px, 5vw, 64px) 48px;
  position: relative;
  z-index: 2;
}

.hinweis {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #7c2d12;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 14px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 30px 4px 16px;
}
.section-label::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--signal-green);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.15);
  flex: 0 0 auto;
}
.section-label:first-child { margin-top: 0; }

/* ── Bereiche (Stufe 1) ────────────────────────────────── */
.kat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.kat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--outline-soft);
  border-radius: 16px;
  padding: 24px 24px 20px;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  overflow: hidden;
}
.kat-card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--accent, var(--primary));
}
.kat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
  border-color: var(--outline);
}
.kat-card:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.kat-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 14px;
  background: var(--accent-bg, var(--blue-bg));
  color: var(--accent, var(--primary));
  margin-bottom: 16px;
}
.kat-ico svg { width: 28px; height: 28px; }
.kat-titel { font-family: 'Inter', sans-serif; font-size: 19px; font-weight: 700; color: var(--ink); }
.kat-sub { font-size: 13px; line-height: 1.5; color: var(--ink-dim); margin-top: 5px; }
.kat-fuss {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  margin-top: 18px;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 13.5px;
  color: var(--accent, var(--primary));
}
.kat-fuss .arrow { transition: transform .2s ease; }
.kat-card:hover .kat-fuss .arrow { transform: translateX(4px); }

/* Kopf mit Zurück (Stufe 2) */
.kat-kopf { display: flex; align-items: center; gap: 14px; margin: 0 2px 20px; }
.zurueck {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--white); border: 1px solid var(--outline); border-radius: 999px;
  padding: 7px 15px; cursor: pointer;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 13px; color: var(--ink-dim);
}
.zurueck:hover { border-color: var(--primary); color: var(--primary); }
.zurueck .pfeil-l { font-size: 15px; line-height: 1; }
.kat-kopf-titel { font-family: 'Inter', sans-serif; font-size: 18px; font-weight: 700; color: var(--ink); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--outline-soft);
  border-radius: 12px;
  padding: 16px 16px 14px;
  color: inherit;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
  overflow: hidden;
  cursor: pointer;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent, var(--primary));
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
  border-color: var(--outline);
}
.card:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.card.laeuft { opacity: .7; cursor: progress; }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 9px;
  border-radius: 10px;
  background: var(--accent-bg, var(--blue-bg));
  color: var(--accent, var(--primary));
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-bottom: 11px;
}

.card h2 { font-size: 16.5px; font-weight: 700; line-height: 1.2; }
.card .subtitle { font-size: 12px; color: var(--ink-dim); margin-top: 2px; font-weight: 500; }
.card p.desc {
  font-size: 12.5px; line-height: 1.45; color: var(--ink-dim); margin: 8px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Merkmal-Pills entfernt – halten die Kacheln ruhig */
.feature-list { display: none; }

.card-cta {
  margin-top: 12px;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 13px;
  color: var(--accent, var(--primary));
}
.card-cta .arrow { transition: transform .2s ease; }
.card:hover .card-cta .arrow { transform: translateX(4px); }
.card .sso-hinweis { margin-top: 10px; font-size: 12.5px; color: var(--ink-dim); }

.status {
  position: absolute; top: 14px; right: 14px;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 600; color: var(--gruen);
}
.status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gruen); box-shadow: 0 0 0 3px rgba(22,163,74,0.15);
}
.status.aus { color: #9ca3af; }
.status.aus .dot { background: #9ca3af; box-shadow: 0 0 0 3px rgba(156,163,175,0.18); }

/* ── Konto-Dialog ──────────────────────────────────────── */
dialog {
  border: none;
  border-radius: 18px;
  padding: 0;
  width: min(520px, 92vw);
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.4);
  color: var(--ink);
}
dialog::backdrop { background: rgba(7, 6, 20, 0.55); }
.dlg-kopf {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--outline-soft);
}
.dlg-kopf h2 { font-size: 19px; font-weight: 700; }
.dlg-zu {
  background: none; border: none; font-size: 18px; cursor: pointer; color: var(--ink-dim);
}
.dlg-inhalt { padding: 8px 24px 24px; }
.dlg-block { padding: 18px 0; border-bottom: 1px solid var(--outline-soft); }
.dlg-block:last-child { border-bottom: none; }
.dlg-block h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.dlg-text { font-size: 14px; line-height: 1.6; color: var(--ink-dim); margin: 0 0 14px; }
.zeile { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.zeile input { max-width: 160px; }
.feldgruppe { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.feldgruppe input { max-width: 320px; }
.qr { margin: 4px 0 12px; }
.qr svg { width: 168px; height: 168px; display: block; }
.geheimnis code {
  font-size: 13px; background: var(--blue-bg); padding: 6px 10px;
  border-radius: 8px; letter-spacing: 0.08em; word-break: break-all;
}

/* ── Footer ────────────────────────────────────────────── */
footer {
  position: relative;
  background: var(--ink);
  color: rgba(255,255,255,0.75);
  margin-top: auto;
  border-top: 2px solid var(--wire);
}
/* Gleis entlang der Fußzeile: zwei Schienen mit Schwellen */
footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 6px;
  height: 11px;
  background: repeating-linear-gradient(90deg, var(--wire-soft) 0 3px, transparent 3px 22px);
  border-bottom: 2px solid rgba(158,197,255,0.20);
  pointer-events: none;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px clamp(20px, 5vw, 64px);
  display: flex; flex-wrap: wrap; gap: 10px 24px;
  align-items: center; justify-content: space-between;
  font-size: 13px;
}
footer img.logo { height: 26px; width: auto; opacity: 0.92; }
footer a { color: rgba(255,255,255,0.75); }
footer a:hover { color: var(--white); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .loginbox { max-width: 420px; }
}
@media (max-width: 560px) {
  .nav .site-link span.txt { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Betreiberansicht (betrieb.html) — Landkarte der Dienste
   ══════════════════════════════════════════════════════════════════════════ */

.topband.schmal .hero.kompakt { padding-block: 28px 40px; }
.hero.kompakt .hero-inner { max-width: 62ch; }
.hero.kompakt h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 10px; }

.betriebseite main { max-width: 1180px; margin: 0 auto; padding: 26px 20px 60px; }

.hinweis-mitte {
  max-width: 1180px; margin: 40px auto; padding: 0 20px;
  text-align: center; color: #5b6b78;
}

/* Zahlenleiste */
.bilanz {
  display: grid; gap: 12px; margin-bottom: 22px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}
.bz {
  background: #fff; border: 1px solid #e2e9ef; border-radius: 12px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 2px;
}
.bz-wert { font-size: 24px; font-weight: 700; color: #14293d; font-family: Poppins, Inter, sans-serif; }
.bz-name { font-size: 12.5px; color: #6b7c8a; }
.bz.warn { border-color: #f0c2bc; background: #fdf6f5; }
.bz.warn .bz-wert { color: #a4291d; }

.betrieb-kopf {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 18px;
}
.stand { margin: 0; font-size: 12.5px; color: #7b8b98; }

.gruppe { margin-bottom: 34px; }
.gruppe-kopf { margin-bottom: 12px; }
.gruppe-kopf h2 {
  margin: 0 0 3px; font-size: 17px; color: #14293d;
  font-family: Poppins, Inter, sans-serif;
}
.gruppe-text { margin: 0; font-size: 13px; color: #7b8b98; }

.dienste { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }

.dienst {
  background: #fff; border: 1px solid #e2e9ef; border-radius: 14px;
  padding: 16px 18px 15px; display: flex; flex-direction: column; gap: 8px;
}
.dienst.gestoert { border-color: #f0c2bc; background: #fdf8f7; }

.d-kopf { display: flex; align-items: flex-start; gap: 10px; }
.d-titel { flex: 1 1 auto; min-width: 0; }
.d-titel h3 {
  margin: 0; font-size: 15.5px; color: #14293d;
  font-family: Poppins, Inter, sans-serif; font-weight: 600;
}
.d-url { font-size: 12.5px; color: #0067ff; text-decoration: none; word-break: break-all; }
.d-url:hover { text-decoration: underline; }
.d-url.leer { color: #9aa8b4; }

.ampel { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; }
.ampel.gruen { background: #2e9e63; box-shadow: 0 0 0 3px #2e9e6322; }
.ampel.rot   { background: #c0392b; box-shadow: 0 0 0 3px #c0392b22; }
.ampel.grau  { background: #c3ced8; }

.marke {
  font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  background: #eef4fb; color: #3d6491; border-radius: 9px; padding: 2px 8px;
  align-self: flex-start; white-space: nowrap;
}

.d-zweck  { margin: 0; font-size: 13.5px; color: #3f5666; line-height: 1.45; }
.d-nutzer { margin: 0; font-size: 12.5px; color: #7b8b98; }

.steckbrief {
  border-top: 1px solid #eef2f6; padding-top: 9px;
  display: flex; flex-direction: column; gap: 3px;
}
.sb-zeile { display: flex; gap: 10px; font-size: 12.5px; }
.sb-name { color: #8e9ca8; flex: none; width: 108px; }
.sb-wert { color: #3f5666; word-break: break-word; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }

.d-bemerkung {
  margin: 0; font-size: 12.5px; color: #7b6a45; line-height: 1.45;
  background: #fdfaf2; border-left: 3px solid #e6d3a3; padding: 7px 10px; border-radius: 0 7px 7px 0;
}

@media (max-width: 620px) {
  .sb-zeile { flex-direction: column; gap: 0; }
  .sb-name { width: auto; }
}

/* Ergebnisliste beim Setzen des Passworts in allen Anwendungen */
.ergebnisliste {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
}
.ergebnisliste li { color: var(--ink-dim); }
.ergebnisliste li.ok { color: var(--gruen); }
.ergebnisliste li.schlecht { color: var(--rot); }
