/* Partner-CRM Futsal Minerva — Gestaltung nach futsalminerva.ch (theme.css, Logo). */
@font-face { font-family: 'Actor'; src: url(assets/fonts/actor.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Abel'; src: url(assets/fonts/abel.woff2) format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --navy: #001744;
  --blau: #162b90;
  --blau-dunkel: #10226e;
  --gelb: #ffdd2f;
  --gelb-dunkel: #fbd200;
  --hellblau: #75b7dd;
  --hellblau-hg: #e8f3fa;
  --grau: #404042;
  --text: #2a2d3a;
  --text-leise: #6a6f80;
  --linie: #e2e6ef;
  --flaeche: #ffffff;
  --hg: #f3f5fa;
  --gruen: #1d8a56;
  --gruen-hg: #e5f4ec;
  --rot: #d8432f;
  --rot-hg: #fdecea;
  --warn-hg: #fff6cc;

  --f-titel: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-text: Actor, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-label: Abel, "Helvetica Neue", Helvetica, Arial, sans-serif;

  --r: 12px;
  --r-klein: 8px;
  --schatten: 0 1px 2px rgba(0, 23, 68, .06), 0 6px 20px rgba(0, 23, 68, .06);
  --t: 160ms ease;
  --leiste: 248px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--hg); color: var(--text); font: 15px/1.5 var(--f-text); }
a { color: var(--blau); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--hellblau); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-titel); color: var(--blau); margin: 0; }
h1 { font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.8px; }
h2 { font-size: 18px; font-weight: 700; letter-spacing: -.2px; }
h3 { font-size: 15px; font-weight: 700; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Rahmen ---------------------------------------------------------------- */
.app { min-height: 100vh; }
.seitenleiste {
  position: fixed; inset: 0 auto 0 0; width: var(--leiste); display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--navy) 0%, #0a2270 100%); color: #fff; padding: 22px 14px; z-index: 20;
}
.marke { display: flex; align-items: center; gap: 12px; color: #fff; padding: 0 8px 22px; }
.marke:hover { text-decoration: none; }
.marke b { display: block; font: 700 15px/1.1 var(--f-titel); color: var(--gelb); letter-spacing: 1.2px; text-transform: uppercase; }
.marke small { display: block; font: 14px/1.3 var(--f-label); color: #c9d4f0; letter-spacing: .6px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-klein);
  color: #dbe3f7; font: 400 15px/1.2 var(--f-titel); transition: background var(--t), color var(--t);
}
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.nav a[aria-current="page"] { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 3px 0 0 var(--gelb); }
.nav a[aria-current="page"] .icon { color: var(--gelb); }
.nav .nav-trenner { height: 1px; background: rgba(255, 255, 255, .12); margin: 10px 8px; }
.seitenleiste-fuss { margin-top: auto; padding: 0 8px; }
.etikett-prototyp {
  display: inline-block; font: 12px/1 var(--f-label); letter-spacing: .6px; text-transform: uppercase;
  color: #c9d4f0; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: 6px 10px; cursor: help;
}
.inhalt { margin-left: var(--leiste); padding: 32px 40px 64px; max-width: 1360px; outline: none; }
.kopf-mobil, .tabbar { display: none; }

/* Seitenkopf ------------------------------------------------------------- */
.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.oberzeile { font: 14px/1 var(--f-label); text-transform: uppercase; letter-spacing: 1px; color: var(--blau); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.oberzeile a { color: var(--blau); }
.untertitel { color: var(--text-leise); margin-top: 6px; }
.kopf-aktionen { display: flex; gap: 8px; flex-wrap: wrap; }

/* Knöpfe ----------------------------------------------------------------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--blau); background: #fff; color: var(--blau);
  font: 700 14px/1 var(--f-titel); letter-spacing: .2px; cursor: pointer; white-space: nowrap;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t);
}
.knopf:hover { background: var(--hellblau-hg); text-decoration: none; }
.knopf:active { transform: translateY(1px); }
.knopf.haupt-aktion { background: var(--gelb); border-color: var(--gelb); color: var(--navy); }
.knopf.haupt-aktion:hover { background: var(--gelb-dunkel); border-color: var(--gelb-dunkel); }
.knopf.blau { background: var(--blau); color: #fff; }
.knopf.blau:hover { background: var(--blau-dunkel); }
.knopf.leise { border-color: transparent; background: transparent; }
.knopf.leise:hover { background: var(--hellblau-hg); }
.knopf.gefahr { border-color: var(--rot); color: var(--rot); }
.knopf.gefahr:hover { background: var(--rot-hg); }
.knopf.klein { min-height: 32px; padding: 0 12px; font-size: 13px; }
.knopf .icon { width: 16px; height: 16px; }
.icon-knopf {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; border: 0; background: transparent;
  color: var(--text-leise); cursor: pointer; transition: background var(--t), color var(--t);
}
.icon-knopf:hover { background: var(--hellblau-hg); color: var(--blau); }

/* Karten ----------------------------------------------------------------- */
.karte { background: var(--flaeche); border-radius: var(--r); box-shadow: var(--schatten); padding: 20px 22px; min-width: 0; }
.karte-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.karte-kopf .label { margin: 0; }
.label { font: 14px/1.2 var(--f-label); text-transform: uppercase; letter-spacing: 1px; color: var(--blau); }
.raster { display: grid; gap: 20px; }
.raster.zwei { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.raster.profil { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
.raster.links-breit { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.raster.netz { grid-template-columns: minmax(0, 1fr) 300px; margin-bottom: 20px; }
.stapel { display: grid; gap: 20px; min-width: 0; }

/* Kennzahlen ------------------------------------------------------------- */
.kennzahlen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kennzahl { background: #fff; border-radius: var(--r); box-shadow: var(--schatten); padding: 18px 20px; display: block; color: inherit; transition: transform var(--t), box-shadow var(--t); }
a.kennzahl:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0, 23, 68, .08), 0 12px 28px rgba(0, 23, 68, .1); }
.kennzahl .wert { font: 700 34px/1 var(--f-titel); color: var(--blau); letter-spacing: -1px; margin: 10px 0 6px; font-variant-numeric: tabular-nums; }
.kennzahl .wert.datum { font-size: 26px; }
.kennzahl .zusatz { color: var(--text-leise); font-size: 14px; }
.kennzahl.betont { background: linear-gradient(135deg, var(--navy), var(--blau)); color: #fff; }
.kennzahl.betont .label { color: var(--gelb); }
.kennzahl.betont .wert { color: #fff; }
.kennzahl.betont .zusatz { color: #c9d4f0; }

/* Listen / Tabellen ------------------------------------------------------ */
.werkzeuge { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.suche { position: relative; flex: 1 1 260px; max-width: 420px; }
.suche .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-leise); }
.suche input, .werkzeuge .suche input { padding-left: 38px; }
.feld, .werkzeuge select, .werkzeuge input {
  width: 100%; min-height: 40px; border: 1px solid var(--linie); background: #fff; border-radius: var(--r-klein); padding: 8px 12px;
  transition: border-color var(--t), box-shadow var(--t);
}
.werkzeuge select { width: auto; min-width: 150px; padding-right: 30px; }
.feld:focus, .werkzeuge select:focus, .werkzeuge input:focus { outline: none; border-color: var(--blau); box-shadow: 0 0 0 3px rgba(22, 43, 144, .14); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23162b90' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px !important; }
.treffer { color: var(--text-leise); font-size: 14px; margin-left: auto; }

.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th { text-align: left; font: 13px/1.2 var(--f-label); text-transform: uppercase; letter-spacing: .8px; color: var(--text-leise); padding: 0 12px 10px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.tabelle td { padding: 12px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle td.haupt-spalte { min-width: 270px; }
.tabelle tbody tr { transition: background var(--t); }
.tabelle tbody tr.klickbar { cursor: pointer; }
.tabelle tbody tr.klickbar:hover { background: #f7f9fd; }
.tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle th.zahl { text-align: right; }
.name { font: 700 15px/1.3 var(--f-titel); color: var(--text); }
a.name { color: var(--text); }
a.name:hover { color: var(--blau); }
.leise { color: var(--text-leise); font-size: 14px; }
.zeile-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.zeile-person > div { min-width: 0; }

.avatar {
  width: 38px; height: 38px; border-radius: 999px; flex: none; display: grid; place-items: center;
  font: 700 13px/1 var(--f-titel); background: var(--hellblau-hg); color: var(--blau); letter-spacing: .4px;
}
.avatar.firma { border-radius: 10px; background: var(--blau); color: #fff; }
.avatar.gross { width: 64px; height: 64px; font-size: 22px; border-radius: 16px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  font: 13px/1.4 var(--f-label); letter-spacing: .4px; background: var(--hellblau-hg); color: var(--blau);
}
.badge .punkt { width: 8px; height: 8px; border-radius: 99px; background: currentColor; }
.badge.platin { background: #e9ecf3; color: #3e4a66; }
.badge.gold { background: #fff3bf; color: #7a5b00; }
.badge.silber { background: #eef0f3; color: #555c6a; }
.badge.bronze { background: #f7e7da; color: #8a4b1d; }
.badge.haupt { background: var(--navy); color: var(--gelb); }
.badge.gruen { background: var(--gruen-hg); color: var(--gruen); }
.badge.rot { background: var(--rot-hg); color: var(--rot); }
.badge.grau { background: #eef0f3; color: var(--text-leise); }
.badge.warn { background: var(--warn-hg); color: #6b5300; }
.stern { color: var(--gelb-dunkel); }

.liste { list-style: none; margin: 0; padding: 0; }
.liste > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linie); min-width: 0; }
.liste > li:last-child { border-bottom: 0; padding-bottom: 0; }
.liste > li:first-child { padding-top: 0; }
.liste .rechts { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.liste .mitte { min-width: 0; flex: 1; }
.liste .mitte .name, .liste .mitte .leise { overflow-wrap: anywhere; }

.leer { text-align: center; padding: 28px 16px; color: var(--text-leise); }
.leer .icon { width: 28px; height: 28px; color: var(--hellblau); margin-bottom: 8px; }
.leer p { margin: 0 0 12px; }

.angaben { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 16px; margin: 0; }
.angaben dt { font: 14px/1.5 var(--f-label); color: var(--text-leise); text-transform: uppercase; letter-spacing: .6px; }
.angaben dd { margin: 0; overflow-wrap: anywhere; }
.notiz { background: #f7f9fd; border-left: 3px solid var(--hellblau); padding: 10px 14px; border-radius: 0 var(--r-klein) var(--r-klein) 0; white-space: pre-wrap; }

/* Profilkopf ------------------------------------------------------------- */
.profilkopf { display: flex; gap: 18px; align-items: center; min-width: 0; }
.profilkopf .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.sponsorings { display: flex; gap: 4px 6px; flex-wrap: wrap; align-items: center; }
#sponsorings .liste .badge { font-size: 14px; padding: 5px 12px; }

/* Dashboard -------------------------------------------------------------- */
.naechster { background: linear-gradient(135deg, var(--navy) 0%, var(--blau) 100%); color: #fff; border-radius: var(--r); padding: 24px; position: relative; overflow: hidden; }
.naechster::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 221, 47, .28), transparent 70%); }
.naechster .label { color: var(--gelb); }
.naechster h2 { color: #fff; font-size: 24px; margin: 10px 0 4px; }
.naechster .meta { color: #c9d4f0; display: flex; gap: 16px; flex-wrap: wrap; }
.naechster .meta span { display: inline-flex; align-items: center; gap: 6px; }
.naechster .reihe { display: flex; align-items: center; gap: 16px; margin-top: 18px; flex-wrap: wrap; position: relative; z-index: 1; }
.gesichter { display: flex; }
.gesichter .avatar { width: 32px; height: 32px; font-size: 10px; border: 2px solid var(--blau); margin-left: -6px; background: #dfe9fb; }
.gesichter .avatar:first-child { margin-left: 0; }

.balken-liste { display: grid; gap: 12px; }
.balken-zeile { display: grid; grid-template-columns: 92px minmax(0, 1fr) 140px; gap: 12px; align-items: center; font-size: 14px; color: inherit; }
a.balken-zeile:hover { text-decoration: none; }
a.balken-zeile:hover .balken-spur span { background: var(--blau-dunkel); }
.balken-spur { height: 12px; border-radius: 999px; background: #edf0f7; overflow: hidden; }
.balken-spur span { display: block; height: 100%; border-radius: 999px; background: var(--blau); transition: background var(--t); }
.balken-zeile .zahl { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-leise); white-space: nowrap; }
.balken-zeile .zahl b { color: var(--text); font-family: var(--f-titel); }

.level-raster { display: grid; gap: 14px; }
.level-raster .bereich { display: grid; gap: 6px; }
.level-raster .kopf { display: flex; justify-content: space-between; font-size: 14px; }
.stapelbalken { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: #edf0f7; gap: 2px; }
.stapelbalken span { display: block; height: 100%; }
.legende { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--text-leise); }
.legende i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }

/* MiMi ------------------------------------------------------------------- */
.mimi-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 28px; }
.mimi-karte { background: #fff; border-radius: var(--r); box-shadow: var(--schatten); padding: 18px 20px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; color: inherit; transition: transform var(--t), box-shadow var(--t); }
.mimi-karte:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0, 23, 68, .08), 0 12px 28px rgba(0, 23, 68, .1); }
.mimi-karte.naechste { outline: 2px solid var(--gelb); }
.kalenderblatt { width: 58px; border-radius: 10px; overflow: hidden; text-align: center; background: var(--hg); align-self: start; }
.kalenderblatt .monat { background: var(--blau); color: #fff; font: 12px/1 var(--f-label); text-transform: uppercase; letter-spacing: 1px; padding: 5px 0; }
.kalenderblatt .tag { font: 700 24px/1 var(--f-titel); color: var(--blau); padding: 7px 0 3px; }
.kalenderblatt .jahr { font: 11px/1 var(--f-label); color: var(--text-leise); padding-bottom: 6px; }
.mimi-karte h3 { color: var(--text); margin-bottom: 2px; }
.mimi-karte .fuss { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

.statistik { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.statistik > div { background: var(--hg); border-radius: var(--r-klein); padding: 12px 14px; }
.statistik .wert { font: 700 26px/1 var(--f-titel); color: var(--blau); margin-top: 6px; font-variant-numeric: tabular-nums; }

.schalter { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 14px; white-space: nowrap; }
.schalter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.schalter .spur { width: 38px; height: 22px; border-radius: 999px; background: #d5dae6; position: relative; transition: background var(--t); flex: none; }
.schalter .spur::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform var(--t); }
.schalter input:checked + .spur { background: var(--blau); }
.schalter input:checked + .spur.gruen { background: var(--gruen); }
.schalter input:checked + .spur::after { transform: translateX(16px); }
.schalter input:focus-visible + .spur { outline: 3px solid var(--hellblau); outline-offset: 2px; }

.firmengruppe { border-top: 1px solid var(--linie); padding: 14px 0; }
.firmengruppe:first-child { border-top: 0; padding-top: 0; }
.firmengruppe-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.teilnehmer { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px 18px; align-items: center; padding: 8px 0 8px 48px; }

/* Netzwerk --------------------------------------------------------------- */
.netzwerk-flaeche { position: relative; }
.netzwerk-svg { width: 100%; height: auto; display: block; max-height: 640px; }
.netzwerk-svg .kante { stroke: #b9c6e6; stroke-width: 2; transition: stroke var(--t), stroke-width var(--t), opacity var(--t); cursor: pointer; }
.netzwerk-svg .kante:hover, .netzwerk-svg .kante.aktiv { stroke: var(--blau); stroke-width: 3.5; }
.netzwerk-svg .kante-trefferzone { stroke: transparent; stroke-width: 14; cursor: pointer; }
.netzwerk-svg .knoten { cursor: pointer; }
.netzwerk-svg .knoten circle { fill: #fff; stroke: var(--blau); stroke-width: 2.5; transition: fill var(--t), stroke var(--t); }
.netzwerk-svg .knoten.ohne circle { stroke: #ccd3e3; }
.netzwerk-svg .knoten circle.trefferzone, .netzwerk-svg .knoten:hover circle.trefferzone, .netzwerk-svg .knoten.aktiv circle.trefferzone { fill: transparent; stroke: none; }
.netzwerk-svg .knoten.ohne text { fill: #9aa1b2; }
.netzwerk-svg .knoten text { font: 700 15px var(--f-titel); fill: var(--text); }
.netzwerk-svg .knoten .kuerzel { font-size: 12px; fill: var(--blau); }
.netzwerk-svg .knoten:hover circle, .netzwerk-svg .knoten.aktiv circle { fill: var(--gelb); stroke: var(--navy); }
.netzwerk-svg.fokus .kante:not(.aktiv) { opacity: .15; }
.netzwerk-svg.fokus .knoten:not(.aktiv):not(.nachbar) { opacity: .3; }
.hinweis { display: flex; gap: 10px; align-items: flex-start; background: var(--hellblau-hg); color: var(--blau-dunkel); padding: 10px 14px; border-radius: var(--r-klein); font-size: 14px; }
.hinweis .icon { margin-top: 2px; }
.beziehung-art { font: 13px/1.4 var(--f-label); text-transform: uppercase; letter-spacing: .6px; color: var(--blau); }
.paar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.paar .icon { color: var(--hellblau); }

/* Einstellungen ---------------------------------------------------------- */
.chip-liste { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--hg); border: 1px solid var(--linie); font-size: 14px; }
.chip button { width: 24px; height: 24px; border: 0; border-radius: 99px; background: transparent; color: var(--text-leise); cursor: pointer; display: grid; place-items: center; }
.chip button:hover { background: var(--rot-hg); color: var(--rot); }
.chip button:disabled { opacity: .35; cursor: not-allowed; background: transparent; color: var(--text-leise); }
.chip .icon { width: 14px; height: 14px; }
.inline-form { display: flex; gap: 8px; margin-top: 12px; }
.inline-form input { flex: 1; min-width: 0; }

/* Dialog ----------------------------------------------------------------- */
.dialog { border: 0; padding: 0; border-radius: 16px; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: 0 24px 64px rgba(0, 23, 68, .3); color: var(--text); }
.dialog::backdrop { background: rgba(0, 23, 68, .5); backdrop-filter: blur(2px); }
.dialog[open] { animation: auf 180ms ease-out; }
@keyframes auf { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.dialog form { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.dialog-kopf { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 12px; }
.dialog-kopf h2 { font-size: 21px; }
.dialog-inhalt { padding: 8px 24px 20px; overflow: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; align-content: start; }
.dialog-fuss { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px 20px; border-top: 1px solid var(--linie); }
.dialog-fuss .links { margin-right: auto; }
.f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f.breit { grid-column: 1 / -1; }
.f > span { font: 14px/1.2 var(--f-label); text-transform: uppercase; letter-spacing: .6px; color: var(--grau); }
.f > span em { font-style: normal; color: var(--text-leise); text-transform: none; letter-spacing: 0; font-family: var(--f-text); font-size: 13px; }
.f textarea { min-height: 84px; resize: vertical; }
.f .fehler { color: var(--rot); font-size: 13px; display: none; }
.f.ungueltig .feld { border-color: var(--rot); }
.f.ungueltig .fehler { display: block; }
.formhinweis { grid-column: 1 / -1; }
.auswahlliste { grid-column: 1 / -1; max-height: 320px; overflow: auto; border: 1px solid var(--linie); border-radius: var(--r-klein); }
.auswahlliste label { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--linie); cursor: pointer; }
.auswahlliste label:last-child { border-bottom: 0; }
.auswahlliste label:hover { background: #f7f9fd; }
.auswahlliste label.vergeben { opacity: .5; cursor: not-allowed; }
.auswahlliste input[type=radio] { accent-color: var(--blau); width: 18px; height: 18px; }

/* Toast ------------------------------------------------------------------ */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 999px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 12px 32px rgba(0, 23, 68, .35); transition: opacity 180ms ease, transform 180ms ease; z-index: 50; font-family: var(--f-titel); font-size: 14px;
}
.toast .icon { color: var(--gelb); }
.toast.sichtbar { opacity: 1; transform: translate(-50%, 0); }

.nur-mobil { display: none; }

/* App: Offline, Update, Installation ------------------------------------ */
.etikett-offline {
  display: inline-flex; align-items: center; font: 12px/1 var(--f-label); letter-spacing: .6px; text-transform: uppercase;
  color: var(--navy); background: var(--gelb); border-radius: 999px; padding: 6px 10px; margin: 0 6px 8px 0;
}
.etikett-offline[hidden] { display: none; }
.update-leiste {
  position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(560px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 18px; border-radius: 16px;
  background: var(--navy); color: #fff; box-shadow: 0 16px 40px rgba(0, 23, 68, .35);
}
.update-leiste[hidden] { display: none; }
.update-leiste > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.update-leiste b { font-family: var(--f-titel); color: var(--gelb); }
.update-leiste span { color: #c9d4f0; }
.update-leiste .knopf.leise { color: #fff; }
.update-leiste .knopf.leise:hover { background: rgba(255, 255, 255, .1); }
.app-hinweis {
  display: flex; align-items: center; gap: 12px; margin: -8px 0 18px; padding: 12px 8px 12px 14px; border-radius: var(--r);
  background: #fff; box-shadow: var(--schatten); border-left: 4px solid var(--gelb);
}
.app-hinweis .mitte { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
.app-hinweis .mitte b { font-family: var(--f-titel); color: var(--blau); font-size: 15px; }
.app-hinweis .mitte span { color: var(--text-leise); }
.app-hinweis .mitte a { font-family: var(--f-titel); font-weight: 700; align-self: flex-start; padding: 6px 0 0; }
.app-hinweis-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--navy); color: var(--gelb); flex: none; }
.app-hinweis-icon .icon { width: 22px; height: 22px; }
.schritte { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.schritte .icon { width: 16px; height: 16px; vertical-align: -3px; color: var(--blau); }
.app-status { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--f-titel); }
.app-status.gruen { color: var(--gruen); }
.speicher-liste { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; color: var(--text); }
.speicher-liste b { font-family: var(--f-titel); }
#app { scroll-margin-top: 84px; }

/* Mittlere Breite -------------------------------------------------------- */
@media (max-width: 1180px) {
  .kennzahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .raster.profil, .raster.zwei, .raster.links-breit, .raster.netz { grid-template-columns: minmax(0, 1fr); }
}

/* Mobil ------------------------------------------------------------------ */
@media (max-width: 860px) {
  body { font-size: 15px; }
  .seitenleiste { display: none; }
  .kopf-mobil {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20;
    padding: calc(10px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) 10px calc(14px + env(safe-area-inset-left));
    background: linear-gradient(90deg, var(--navy), #0a2270); color: #fff;
  }
  .kopf-mobil .marke { padding: 0; gap: 10px; }
  .kopf-mobil .marke b { font-size: 13px; }
  .kopf-mobil .marke small { font-size: 13px; }
  .kopf-mobil .etikett-prototyp { margin-left: auto; font-size: 11px; padding: 5px 8px; }
  .kopf-knopf { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -6px; border-radius: 99px; color: #dbe3f7; flex: none; }
  .kopf-mobil .etikett-offline { margin: 0 0 0 auto; font-size: 11px; padding: 5px 8px; }
  .kopf-mobil .etikett-offline:not([hidden]) + .etikett-prototyp { margin-left: 0; }
  .kopf-knopf[aria-current="page"] { color: var(--gelb); background: rgba(255, 255, 255, .1); }
  .inhalt { margin-left: 0; padding: 20px calc(16px + env(safe-area-inset-right)) calc(100px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left)); }
  h1 { font-size: 26px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: #fff; border-top: 1px solid var(--linie); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0, 23, 68, .06);
  }
  .tabbar { padding-left: calc(4px + env(safe-area-inset-left)); padding-right: calc(4px + env(safe-area-inset-right)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 50px; padding: 6px 0; color: var(--text-leise); font: 12px/1 var(--f-titel); border-radius: 10px; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a[aria-current="page"] { color: var(--blau); background: var(--hellblau-hg); }
  .tabbar .icon { width: 22px; height: 22px; }
  .kennzahlen { gap: 10px; }
  .kennzahl { padding: 14px; }
  .kennzahl .wert { font-size: 28px; }
  .kennzahl .wert.datum { font-size: 20px; }
  .karte { padding: 16px; }
  .seitenkopf { margin-bottom: 18px; align-items: flex-start; }
  .seitenkopf .kopf-aktionen { width: 100%; }
  .seitenkopf .kopf-aktionen .knopf { flex: 1; }
  .werkzeuge select { flex: 1 1 140px; min-width: 0; }
  .suche { max-width: none; flex-basis: 100%; }
  .treffer { margin-left: 0; }
  .nur-desktop { display: none !important; }
  .nur-mobil { display: initial; }

  /* Tabellen werden zu Karten */
  .tabelle.karten thead { display: none; }
  .tabelle.karten, .tabelle.karten tbody { display: block; }
  .tabelle.karten tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 14px 0; border-bottom: 1px solid var(--linie); }
  .tabelle.karten tr:last-child { border-bottom: 0; }
  .tabelle.karten td { display: block; padding: 0; border: 0; }
  .tabelle.karten td { grid-column: 1 / -1; min-width: 0; }
  .tabelle.karten td.zahl { grid-column: auto; }
  .tabelle.karten td.zahl { text-align: left; }
  .tabelle.karten td[data-label]::before { content: attr(data-label) ": "; color: var(--text-leise); font-family: var(--f-label); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }

  .angaben { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .angaben dd { margin-bottom: 10px; }
  .profilkopf { gap: 14px; align-items: flex-start; }
  .avatar.gross { width: 52px; height: 52px; font-size: 18px; }
  .balken-zeile { grid-template-columns: 70px minmax(0, 1fr); }
  .balken-zeile .zahl { grid-column: 2; text-align: left; margin-top: -6px; }
  .teilnehmer { grid-template-columns: auto auto 1fr; padding-left: 0; gap: 8px 14px; }
  .teilnehmer .icon-knopf { justify-self: end; }
  .schalter { font-size: 13px; }
  .teilnehmer .person { grid-column: 1 / -1; }
  .statistik .wert { font-size: 22px; }
  .statistik > div { padding: 10px; min-width: 0; }
  .statistik .label, .kennzahl .label { letter-spacing: .5px; overflow-wrap: anywhere; }

  .dialog { width: 100vw; max-width: 100vw; height: 100%; height: 100dvh; max-height: 100%; max-height: 100dvh; margin: 0; border-radius: 0; }
  .dialog form { max-height: 100%; height: 100%; }
  .dialog-inhalt { grid-template-columns: minmax(0, 1fr); flex: 1; padding: 8px 16px 20px; }
  .dialog-kopf { padding: calc(16px + env(safe-area-inset-top)) 16px 8px; }
  .dialog-fuss { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .dialog-fuss .knopf { flex: 1; }
  .dialog-fuss .links { flex-basis: 100%; order: 3; }
  .toast { bottom: calc(88px + env(safe-area-inset-bottom)); max-width: calc(100vw - 24px); }
  .update-leiste { bottom: calc(80px + env(safe-area-inset-bottom)); flex-wrap: wrap; padding: 12px; }
  .update-leiste > div { flex-basis: 100%; padding: 0 4px 4px; }
  .update-leiste .knopf { flex: 1; }

  /* Touch-Ziele mindestens 44 px, Eingaben 16 px (sonst zoomt iOS beim Antippen) */
  .knopf { min-height: 44px; }
  .knopf.klein { min-height: 40px; padding: 0 14px; font-size: 14px; }
  .icon-knopf { width: 44px; height: 44px; }
  .icon-knopf .icon { width: 20px; height: 20px; }
  .feld, .werkzeuge select, .werkzeuge input, .inline-form input { min-height: 44px; font-size: 16px; }
  .chip { padding: 2px 2px 2px 12px; }
  .chip button { width: 40px; height: 40px; }
  .schalter { min-height: 44px; }
  .liste .rechts { gap: 0; }
  .karte-kopf { flex-wrap: wrap; }
  a.leise { display: inline-flex; align-items: center; min-height: 36px; }
  .auswahlliste label { min-height: 56px; }
  .auswahlliste { max-height: none; }
  .app-hinweis { margin-top: -6px; }
}

/* Sehr kleine Smartphones (ab 360 px) */
@media (max-width: 380px) {
  .kopf-mobil .marke small { display: none; }
  .kopf-mobil .marke img { width: 30px; height: 30px; }
  .inhalt { padding-left: calc(12px + env(safe-area-inset-left)); padding-right: calc(12px + env(safe-area-inset-right)); }
  .karte { padding: 14px; }
  .kennzahl { padding: 12px; }
  .kennzahl .wert { font-size: 26px; }
  .kennzahl .wert.datum { font-size: 17px; }
  h1 { font-size: 24px; }
  .tabbar a { font-size: 11px; }
  .teilnehmer { gap: 4px 10px; }
}

/* Installierte App: kein Rand oben über der Statusleiste vergessen */
@media (display-mode: standalone) {
  .seitenleiste { padding-top: calc(22px + env(safe-area-inset-top)); }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
