/* Cosanta Intranet – gemeinsames Layout nach Corporate Design 1.0
   Farben: Orange #e84e1b · Dunkelblau #17375f · Hellblau #4f8fcc · Anthrazit #2a363b
   Schrift: Red Hat Display (Headline Bold, Subline Medium, Text Light/Regular) */

@font-face {
  font-family: "Red Hat Display";
  src: url("../fonts/RedHatDisplay-Variable.woff") format("woff");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Display";
  src: url("../fonts/RedHatDisplay-Italic-Variable.woff") format("woff");
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --orange: #e84e1b;
  --orange-dunkel: #c73f12;
  --orange-hell: #fdeee8;
  --dunkelblau: #17375f;
  --dunkelblau-tief: #0d2342;
  --dunkelblau-hell: #e8eef5;
  --hellblau: #4f8fcc;
  --hellblau-hell: #eaf2fa;
  --anthrazit: #2a363b;
  --text: #2a363b;
  --text-leise: #5d6b72;
  --linie: #e1e6ec;
  --linie-stark: #c8d1da;
  --flaeche: #f4f6f9;
  --weiss: #ffffff;
  --erfolg: #2f7a4f;
  --erfolg-hell: #e8f4ed;
  --fehler: #b3261e;
  --fehler-hell: #fbeaea;
  --radius: 10px;
  --radius-klein: 7px;
  --schatten: 0 1px 2px rgba(23, 55, 95, .06), 0 4px 16px rgba(23, 55, 95, .06);
  --schatten-hoch: 0 2px 4px rgba(23, 55, 95, .08), 0 12px 32px rgba(23, 55, 95, .12);
  --fokus: 0 0 0 3px rgba(79, 143, 204, .45);
  --breite: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Red Hat Display", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text);
  background: var(--flaeche);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3, h4 { color: var(--anthrazit); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 19px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--dunkelblau); text-decoration-color: rgba(23, 55, 95, .35); text-underline-offset: 2px; }
a:hover { color: var(--orange); text-decoration-color: currentColor; }
:focus-visible { outline: none; box-shadow: var(--fokus); border-radius: 4px; }
.leise { color: var(--text-leise); }
.klein { font-size: 13px; }
.highlight { color: var(--orange); }
.text-light { font-weight: 300; }
.nur-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 14px; letter-spacing: .02em; }

/* ---------- Kopfzeile ---------- */
.kopf {
  background: linear-gradient(100deg, var(--dunkelblau) 0%, var(--dunkelblau-tief) 100%);
  color: var(--weiss);
  position: relative;
  z-index: 10;  /* Benutzermenü liegt über dem Inhalt; kein overflow:hidden, sonst wird es abgeschnitten */
}
.kopf::after {
  content: "";
  position: absolute; inset: 0;
  background: url("../img/netz.svg") right -120px center / 900px auto no-repeat;
  opacity: .55;
  pointer-events: none;
}
.kopf__innen {
  position: relative; z-index: 1;
  max-width: var(--breite); margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 28px;
}
.kopf__logo { display: flex; align-items: center; flex-shrink: 0; }
.kopf__logo img { height: 34px; width: auto; display: block; }
.kopf__logo:focus-visible { box-shadow: 0 0 0 3px rgba(255,255,255,.6); }
.hauptnav { display: flex; gap: 4px; height: 100%; overflow-x: auto; scrollbar-width: none; }
.hauptnav a {
  display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 100%;
  color: rgba(255, 255, 255, .78); text-decoration: none; font-weight: 500; white-space: nowrap;
  border-bottom: 3px solid transparent; border-top: 3px solid transparent;
}
.hauptnav a:hover { color: var(--weiss); }
.hauptnav a[aria-current="page"] { color: var(--weiss); border-bottom-color: var(--orange); }
.hauptnav svg { width: 17px; height: 17px; opacity: .85; }
.kopf__rechts { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.nutzermenue { position: relative; }
.nutzermenue > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 6px 6px; border-radius: 999px; color: var(--weiss);
}
.nutzermenue > summary::-webkit-details-marker { display: none; }
.nutzermenue > summary:hover { background: rgba(255, 255, 255, .08); }
.nutzermenue__name { font-weight: 500; font-size: 14px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--orange); color: var(--weiss); font-weight: 700; font-size: 13px; letter-spacing: .02em; flex-shrink: 0;
}
.avatar--gross, .person .avatar.avatar--gross { width: 48px; height: 48px; font-size: 17px; }
.avatar svg { width: 16px; height: 16px; }
img.avatar, .person img.avatar { object-fit: cover; background: var(--flaeche); display: block; }
.avatar--riesig, .person .avatar.avatar--riesig { width: 112px; height: 112px; font-size: 36px; }
.nutzermenue > summary img.avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.avatar--blau { background: var(--dunkelblau); }
.nutzermenue__liste {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; z-index: 20;
  background: var(--weiss); color: var(--text); border-radius: var(--radius); box-shadow: var(--schatten-hoch);
  padding: 8px; border: 1px solid var(--linie);
}
.nutzermenue__kopf { padding: 8px 10px 12px; border-bottom: 1px solid var(--linie); margin-bottom: 6px; display: flex; gap: 12px; align-items: center; }
.nutzermenue__liste a.nutzermenue__bild { position: relative; padding: 0; width: auto; flex-shrink: 0; border-radius: 50%; }
.nutzermenue__liste a.nutzermenue__bild:hover { background: none; }
.nutzermenue__bildhinweis { position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--weiss); border: 1px solid var(--linie); display: grid; place-items: center; color: var(--dunkelblau); }
.nutzermenue__liste .nutzermenue__bildhinweis svg { width: 11px; height: 11px; color: var(--dunkelblau); }
.nutzermenue__abmelden { border-top: 1px solid var(--linie); margin-top: 6px; padding-top: 6px; }
.nutzermenue__liste .nutzermenue__abmelden button { color: var(--fehler); }
.nutzermenue__liste .nutzermenue__abmelden button svg { color: var(--fehler); }
.profilbild { display: grid; gap: 16px; justify-items: center; }
.profilbild > form { width: 100%; }
.profilbild .formular__fuss { justify-content: center; }
input[type=file] { font: inherit; font-size: 14px; max-width: 100%; }
.nutzermenue__kopf strong { display: block; }
.nutzermenue__liste a, .nutzermenue__liste button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--radius-klein);
  color: var(--text); text-decoration: none; font: inherit; background: none; border: 0; cursor: pointer; text-align: left;
}
.nutzermenue__liste a:hover, .nutzermenue__liste button:hover { background: var(--flaeche); color: var(--dunkelblau); }
.nutzermenue__liste svg { width: 17px; height: 17px; color: var(--text-leise); }

/* ---------- App-Kopf mit Unternavigation ---------- */
.appkopf { background: var(--weiss); border-bottom: 1px solid var(--linie); }
.appkopf__innen { max-width: var(--breite); margin: 0 auto; padding: 22px 24px 0; }
.appkopf__titel { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.appkopf__titel h1 { margin: 0; font-size: 22px; }
.appkopf__icon {
  width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center;
  background: var(--dunkelblau-hell); color: var(--dunkelblau);
}
.appkopf__icon svg { width: 20px; height: 20px; }
.unternav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.unternav a {
  padding: 10px 14px; color: var(--text-leise); text-decoration: none; font-weight: 500;
  border-bottom: 3px solid transparent; white-space: nowrap;
}
.unternav a:hover { color: var(--dunkelblau); }
.unternav a[aria-current="page"] { color: var(--dunkelblau); border-bottom-color: var(--orange); }

/* ---------- Inhalt ---------- */
.inhalt { flex: 1; width: 100%; max-width: var(--breite); margin: 0 auto; padding: 28px 24px 48px; }
.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.seitenkopf h1, .seitenkopf h2 { margin: 0; }
.seitenkopf p { margin: 4px 0 0; }
.aktionen { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fuss {
  border-top: 1px solid var(--linie); color: var(--text-leise); font-size: 13px; background: var(--weiss);
}
.fuss__innen { max-width: var(--breite); margin: 0 auto; padding: 14px 24px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.karte {
  background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten);
}
.karte__kopf { padding: 16px 20px; border-bottom: 1px solid var(--linie); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.karte__kopf h2, .karte__kopf h3 { margin: 0; }
.karte__inhalt { padding: 20px; }
.karte__inhalt--eng { padding: 0; }
.karte + .karte { margin-top: 20px; }
.karte--schmal { max-width: 620px; }
.raster { display: grid; gap: 20px; }
.raster--2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.raster--seite { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
@media (max-width: 900px) { .raster--seite { grid-template-columns: 1fr; } }
.stapel > * + * { margin-top: 20px; }
.abstand-unten { margin-bottom: 20px; }

/* ---------- Buttons ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--radius-klein); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 14px; line-height: 1.2; cursor: pointer; text-decoration: none;
  background: var(--orange); color: var(--weiss); transition: background-color .15s, border-color .15s, color .15s;
}
.knopf:hover { background: var(--orange-dunkel); color: var(--weiss); }
.knopf svg { width: 16px; height: 16px; }
.knopf--zweit { background: var(--weiss); color: var(--dunkelblau); border-color: var(--linie-stark); }
.knopf--zweit:hover { background: var(--dunkelblau-hell); color: var(--dunkelblau); border-color: var(--dunkelblau); }
.knopf--blau { background: var(--dunkelblau); }
.knopf--blau:hover { background: var(--dunkelblau-tief); }
.knopf--gefahr { background: var(--weiss); color: var(--fehler); border-color: #e7b7b4; }
.knopf--gefahr:hover { background: var(--fehler-hell); color: var(--fehler); border-color: var(--fehler); }
.knopf--leise { background: transparent; color: var(--dunkelblau); padding: 7px 10px; }
.knopf--leise:hover { background: var(--dunkelblau-hell); color: var(--dunkelblau); }
.knopf--klein { padding: 6px 11px; font-size: 13px; }
.knopf--breit { width: 100%; }
.knopf--icon { padding: 7px; }
.knopf[disabled] { opacity: .5; cursor: not-allowed; }
.inline { display: inline; margin: 0; }

/* ---------- Formulare ---------- */
.formular { display: grid; gap: 16px; }
.formular--2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feld { display: grid; gap: 6px; }
.feld--voll { grid-column: 1 / -1; }
label, .label { font-weight: 500; font-size: 14px; color: var(--anthrazit); }
.pflicht::after { content: " *"; color: var(--orange); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search], input[type=number], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--linie-stark); border-radius: var(--radius-klein);
  font: inherit; color: var(--text); background: var(--weiss);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--hellblau); box-shadow: var(--fokus); }
input[readonly] { background: var(--flaeche); color: var(--text-leise); }
.hilfe { font-size: 13px; color: var(--text-leise); }
.code-eingabe { font-size: 24px; letter-spacing: .35em; text-align: center; font-weight: 600; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; cursor: pointer; }
.checkbox input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--orange); flex-shrink: 0; }
.checkbox small { display: block; color: var(--text-leise); }
fieldset { border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px 16px 16px; margin: 0; }
legend { padding: 0 6px; font-weight: 600; }
.checkliste { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.formular__fuss { display: flex; gap: 10px; justify-content: flex-end; padding-top: 4px; flex-wrap: wrap; }

/* ---------- Meldungen ---------- */
.meldungen { display: grid; gap: 10px; margin-bottom: 20px; }
.meldung {
  padding: 12px 16px; border-radius: var(--radius-klein); border: 1px solid; display: flex; gap: 10px; align-items: flex-start;
}
.meldung svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.meldung--erfolg { background: var(--erfolg-hell); border-color: #bcdcc8; color: #1f5537; }
.meldung--fehler { background: var(--fehler-hell); border-color: #efc2bf; color: #8a1d17; }
.meldung--hinweis { background: var(--orange-hell); border-color: #f6c6b4; color: #8f3210; }
.meldung--info { background: var(--hellblau-hell); border-color: #c4daf0; color: var(--dunkelblau); }

/* ---------- Tabellen ---------- */
.tabelle-wrap { overflow-x: auto; }
table.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th {
  text-align: left; font-weight: 600; font-size: 12.5px; color: var(--text-leise); text-transform: uppercase; letter-spacing: .05em;
  padding: 10px 16px; border-bottom: 1px solid var(--linie); background: #fafbfc; white-space: nowrap;
}
.tabelle td { padding: 12px 16px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle tbody tr:hover { background: #fafbfd; }
.tabelle .rechts { text-align: right; }
.person { display: flex; align-items: center; gap: 12px; }
.person .avatar { width: 32px; height: 32px; font-size: 12px; }
.person a { font-weight: 600; text-decoration: none; }
.person small { display: block; color: var(--text-leise); }
.leer { padding: 32px 20px; text-align: center; color: var(--text-leise); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--flaeche); color: var(--text-leise); white-space: nowrap; border: 1px solid var(--linie);
}
.badge--aktiv { background: var(--erfolg-hell); color: var(--erfolg); border-color: #cfe5d7; }
.badge--gesperrt { background: var(--orange-hell); color: var(--orange-dunkel); border-color: #f7d3c5; }
.badge--inaktiv { background: #eef0f2; color: #6b767c; }
.badge--blau { background: var(--dunkelblau-hell); color: var(--dunkelblau); border-color: #d3deea; }
.badge--hell { background: var(--hellblau-hell); color: #2c6aa6; border-color: #cfe1f2; }
.badge--system::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.badge svg { width: 13px; height: 13px; }

/* ---------- Suche / Filter ---------- */
.filterleiste { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--linie); }
.suchfeld { position: relative; flex: 1; min-width: 220px; }
.suchfeld svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-leise); }
.suchfeld input { padding-left: 34px; }
.filterleiste select { width: auto; }
.seiten { display: flex; gap: 8px; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid var(--linie); }

/* ---------- Definitionslisten ---------- */
.daten { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0; }
.daten dt { color: var(--text-leise); font-size: 14px; }
.daten dd { margin: 0; font-weight: 500; }

/* ---------- Anmeldung ---------- */
.anmeldeseite {
  background: radial-gradient(ellipse at 30% 20%, #1d4675 0%, var(--dunkelblau) 40%, var(--dunkelblau-tief) 100%);
  position: relative; justify-content: center; align-items: center; padding: 24px;
}
.anmeldeseite::before {
  content: ""; position: absolute; inset: 0; background: url("../img/netz.svg") center / cover no-repeat; opacity: .7;
}
.anmeldung { position: relative; width: 100%; max-width: 420px; }
.anmeldung__karte { background: var(--weiss); border-radius: 14px; box-shadow: 0 24px 60px rgba(4, 15, 32, .45); padding: 36px 36px 30px; }
.anmeldung__logo { display: block; height: 58px; width: auto; margin: 0 auto 22px; }
.anmeldung h1 { font-size: 20px; text-align: center; margin-bottom: 4px; }
.anmeldung__unterzeile { text-align: center; color: var(--text-leise); font-weight: 300; margin-bottom: 24px; }
.anmeldung__fuss { text-align: center; color: rgba(255, 255, 255, .7); font-size: 13px; margin-top: 18px; }
.anmeldung .meldungen { margin-bottom: 16px; }
.trenner { display: flex; align-items: center; gap: 12px; color: var(--text-leise); font-size: 13px; margin: 18px 0; }
.trenner::before, .trenner::after { content: ""; flex: 1; height: 1px; background: var(--linie); }
.umschalter { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; text-align: center; font-size: 14px; }
.umschalter button { background: none; border: 0; color: var(--dunkelblau); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Konto / Sicherheit ---------- */
.sicherheitsliste { list-style: none; margin: 0; padding: 0; }
.sicherheitsliste li { display: flex; gap: 14px; align-items: center; padding: 16px 20px; border-top: 1px solid var(--linie); }
.sicherheitsliste li:first-child { border-top: 0; }
.sicherheitsliste__icon { width: 40px; height: 40px; border-radius: 9px; background: var(--dunkelblau-hell); color: var(--dunkelblau); display: grid; place-items: center; flex-shrink: 0; }
.sicherheitsliste__icon svg { width: 20px; height: 20px; }
.sicherheitsliste__text { flex: 1; min-width: 0; }
.sicherheitsliste__text strong, .sicherheitsliste__text > span { display: block; }
.qr { display: block; width: 210px; height: 210px; margin: 0 auto 12px; border: 1px solid var(--linie); border-radius: var(--radius); padding: 6px; background: #fff; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; padding: 16px; background: var(--flaeche); border-radius: var(--radius); margin: 16px 0; }
.codes code { font-size: 16px; font-weight: 600; text-align: center; letter-spacing: .06em; }

/* ---------- Protokoll ---------- */
.aktion { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: var(--flaeche); padding: 2px 6px; border-radius: 4px; }

/* ---------- Fehlerseite ---------- */
.fehlerseite { text-align: center; padding: 60px 20px; }
.fehlerseite__code { font-size: 64px; font-weight: 800; color: var(--orange); line-height: 1; margin-bottom: 8px; }

@media (max-width: 760px) {
  .kopf__innen { gap: 14px; padding: 0 16px; }
  .nutzermenue__name { display: none; }
  .hauptnav a { padding: 0 10px; }
  .hauptnav__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .hauptnav svg { width: 20px; height: 20px; }
  .inhalt { padding: 20px 16px 40px; }
  .appkopf__innen { padding: 18px 16px 0; }
  .anmeldung__karte { padding: 28px 22px 24px; }
}
@media print {
  .kopf, .fuss, .unternav, .aktionen { display: none; }
  body { background: #fff; }
}
