/* Plattformverwaltung – gleiche Formensprache wie die Werbeseite, aber ruhiger:
   hier wird gearbeitet. Dunkle Leiste als Anker, helle Arbeitsfläche, Farbe
   nur für Zustände und die eine Hauptaktion je Seite. Keine Skripte. */

@font-face {
  font-family: 'Archivo';
  src: url('/assets/werbung/archivo.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@view-transition { navigation: auto; }

:root {
  --nacht: #0b0d1a;
  --grund: #f4f4f7;
  --karte: #fff;
  --text: #16182b;
  --leise: #5d6078;
  --linie: #e4e4ec;
  --linie-stark: #cfd0dc;
  --akzent: #4b5fe0;
  --akzent-tief: #3a4bc0;
  --akzent-blass: #eef0fd;
  --violett: #8b5cf6;
  --koralle: #ff6a4d;
  --gefahr: #c2352a;
  --ok: #17804a;
  --verlauf: linear-gradient(100deg, #6d84ff 0%, #a07cff 45%, #ff7a5c 100%);
  --radius: 16px;
  --schatten: 0 1px 2px rgba(22, 24, 43, .05), 0 6px 20px -10px rgba(22, 24, 43, .14);
  --weich: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
body { margin: 0; font: 15.5px/1.55 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--text); background: var(--grund); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-stretch: 110%; letter-spacing: -.02em; line-height: 1.15; }
h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; margin: .2rem 0 1.2rem; }
h2 { font-size: 1.15rem; font-weight: 750; margin: 2.4rem 0 .9rem; }
h3 { font-size: 1.02rem; margin: .1rem 0 .9rem; }
a { color: var(--akzent); text-underline-offset: 3px; }
a:hover { color: var(--akzent-tief); }
:focus-visible { outline: 3px solid #ffb35c; outline-offset: 2px; border-radius: 6px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: #eceef6; padding: .1rem .38rem; border-radius: 6px; }
code.gross { font-size: 1.25rem; padding: .35rem .7rem; -webkit-user-select: all; user-select: all; background: var(--akzent-blass); color: var(--akzent-tief); letter-spacing: .03em; }
pre { background: var(--nacht); color: #e6e7f2; padding: 1.1rem 1.2rem; border-radius: 12px; overflow: auto; white-space: pre-wrap; font-size: .85rem; }
.zeichen { width: 1.9rem; height: 1.9rem; flex: none; }
.ueber { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--violett); }

/* ---------------- Leiste ---------------- */

.leiste {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .7rem max(1.25rem, calc((100% - 1180px) / 2));
  background: rgba(11, 13, 26, .96); color: #fff;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.leiste::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--verlauf); opacity: .8; }
.leiste__marke { display: inline-flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; font-weight: 800; font-stretch: 110%; letter-spacing: -.02em; font-size: 1.05rem; view-transition-name: marke; }
.leiste__marke:hover { color: #fff; }
.leiste__nav { display: flex; gap: .25rem; margin-left: 1rem; }
.leiste__nav a { color: rgba(255, 255, 255, .72); text-decoration: none; padding: .45rem .8rem; border-radius: 999px; font-size: .93rem; font-weight: 550; transition: background .2s, color .2s; }
.leiste__nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.leiste__nav a[aria-current] { color: #fff; background: rgba(255, 255, 255, .14); }
.leiste__ich { margin-left: auto; display: flex; align-items: center; gap: .9rem; }
.ich { display: inline-flex; align-items: center; gap: .5rem; color: #fff; text-decoration: none; font-size: .92rem; }
.ich:hover { color: #fff; }
.ich__bild { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--verlauf); font-weight: 800; color: var(--nacht); }
.ich[aria-current] .ich__bild { box-shadow: 0 0 0 2px #fff; }
.leiste button.leise { background: none; border: 0; color: rgba(255, 255, 255, .7); font: inherit; font-size: .9rem; cursor: pointer; padding: .3rem 0; }
.leiste button.leise:hover { color: #fff; text-decoration: underline; }

/* ---------------- Arbeitsfläche ---------------- */

.inhalt { max-width: 1180px; margin: 0 auto; padding: clamp(1.5rem, 3vw, 2.5rem) 1.25rem 3rem; animation: auftritt .5s var(--weich) both; }
@keyframes auftritt { from { opacity: 0; transform: translateY(8px); } }
.fusszeile { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1.25rem 2.5rem; color: var(--leise); font-size: .82rem; border-top: 1px solid var(--linie); }

.kopfzeile { display: flex; gap: 1rem; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.2rem; }
.kopfzeile h1 { margin-bottom: 0; }
.brot { color: var(--leise); margin: 0 0 .4rem; font-size: .9rem; }
.brot a { color: var(--leise); }

.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr)); gap: .9rem; margin: 1.4rem 0 .4rem; }
.zahl { position: relative; overflow: hidden; background: var(--karte); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--schatten), inset 0 0 0 1px var(--linie); color: var(--leise); font-size: .9rem; }
.zahl span { display: block; font-size: 2rem; font-weight: 800; font-stretch: 112%; letter-spacing: -.03em; color: var(--text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.zahl::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--linie-stark); }
.zahl--gut::before { background: #2fbf71; }
.zahl--laeuft::before { background: #f5b400; }
.zahl--achtung::before { background: var(--koralle); }
.zahl--achtung span { color: #c2412a; }

table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten), inset 0 0 0 1px var(--linie); overflow: hidden; }
th, td { padding: .75rem .95rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--linie); }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--leise); background: #fafafc; font-weight: 700; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #f8f8fd; }
td a { font-weight: 600; text-decoration: none; }
td a:hover { text-decoration: underline; }
td.aktionen { white-space: nowrap; text-align: right; }

.karte { background: var(--karte); border-radius: var(--radius); padding: clamp(1.2rem, 2.5vw, 1.7rem); margin: 0 0 1rem; box-shadow: var(--schatten), inset 0 0 0 1px var(--linie); }
.karte.hinweis { box-shadow: var(--schatten), inset 0 0 0 2px var(--akzent); background: linear-gradient(170deg, #fff 40%, var(--akzent-blass)); }
.raster { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr)); }
.zeile { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .9rem 0; }
.zeile input:not([type=checkbox]) { width: auto; min-width: 16rem; margin: 0; }

/* ---------------- Formulare ---------------- */

label { display: block; margin: 0 0 1rem; font-weight: 650; font-size: .92rem; }
label.inline { display: inline-flex; gap: .4rem; align-items: center; font-weight: 450; margin: 0 .5rem; }
input, select {
  display: block; width: 100%; margin-top: .35rem; padding: .7rem .8rem;
  border: 1px solid var(--linie-stark); border-radius: 10px; font: inherit; font-weight: 450; color: var(--text); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover { border-color: #aeb0c2; }
input:focus, select:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 4px rgba(75, 95, 224, .18); }
input[type=checkbox] { display: inline-block; width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--akzent); box-shadow: none; }
input[type=color] { width: 4.2rem; height: 2.7rem; padding: .2rem; cursor: pointer; }
fieldset { border: 0; border-top: 1px solid var(--linie); margin: 0 0 .6rem; padding: 1.2rem 0 .3rem; }
fieldset:first-of-type { border-top: 0; padding-top: 0; }
legend { font-weight: 750; font-stretch: 108%; padding: 0 .6rem 0 0; color: var(--text); }

button, .knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .68rem 1.15rem; border: 0; border-radius: 10px;
  background: var(--akzent); color: #fff; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none;
  box-shadow: 0 1px 2px rgba(22, 24, 43, .12), inset 0 1px 0 rgba(255, 255, 255, .15);
  transition: background .15s, transform .15s var(--weich), box-shadow .15s;
}
button:hover, .knopf:hover { background: var(--akzent-tief); color: #fff; box-shadow: 0 6px 16px -6px rgba(75, 95, 224, .6); }
button:active, .knopf:active { transform: translateY(1px); }
button.gefahr { background: #fff; color: var(--gefahr); box-shadow: inset 0 0 0 1px #efc1bc; }
button.gefahr:hover { background: var(--gefahr); color: #fff; box-shadow: 0 6px 16px -6px rgba(194, 53, 42, .5); }
form.inline { display: inline-flex; gap: .45rem; align-items: center; margin: 0 .35rem .35rem 0; }
form.inline button { padding: .45rem .8rem; font-size: .86rem; background: #fff; color: var(--text); box-shadow: inset 0 0 0 1px var(--linie-stark); }
form.inline button:hover { background: var(--akzent-blass); color: var(--akzent-tief); box-shadow: inset 0 0 0 1px var(--akzent); }
form.inline button.gefahr { color: var(--gefahr); box-shadow: inset 0 0 0 1px #efc1bc; }
form.inline button.gefahr:hover { background: var(--gefahr); color: #fff; }
form.inline label.inline { margin: 0 .25rem 0 0; font-size: .82rem; }
button.breit { width: 100%; padding-block: .85rem; font-size: 1rem; margin-top: .3rem; }

/* ---------------- Meldungen und Zustände ---------------- */

.meldung { position: relative; padding: .85rem 1rem .85rem 2.6rem; border-radius: 12px; background: var(--akzent-blass); color: #2c3a99; margin: 0 0 1.2rem; font-weight: 550; animation: auftritt .4s var(--weich) both; }
.meldung::before { content: 'i'; position: absolute; left: .9rem; top: .85rem; display: grid; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: currentColor; color: #fff; font-size: .75rem; font-weight: 800; font-style: italic; }
.meldung.fehler { background: #fdeeec; color: #8f2219; }
.meldung.fehler::before { content: '!'; font-style: normal; }
.meldung.ok { background: #e8f6ee; color: #135f37; }
.meldung.ok::before { content: '✓'; font-style: normal; }
.meldung ul { margin: 0; padding-left: 1rem; }

.marke { display: inline-flex; align-items: center; gap: .35rem; padding: .18rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: #ececf2; color: #4a4d63; white-space: nowrap; }
.marke::before { content: ''; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; opacity: .8; }
.marke--aktiv, .marke--fertig, .marke--gueltig { background: #e3f5ea; color: var(--ok); }
.marke--fehler, .marke--dns { background: #fde8e6; color: var(--gefahr); }
.marke--gesperrt { background: #2a2c40; color: #fff; }
.marke--wartet, .marke--laeuft, .marke--neu, .marke--anlegen, .marke--offen { background: #fff4d6; color: #7a5800; }
.marke--laeuft::before, .marke--anlegen::before, .marke--neu::before { animation: pulsieren 1.4s ease-in-out infinite; }
@keyframes pulsieren { 50% { opacity: .2; } }

.klein { font-size: .84rem; color: var(--leise); font-weight: 400; display: block; margin-top: .3rem; }
.leer { color: var(--leise); background: var(--karte); border: 1px dashed var(--linie-stark); border-radius: var(--radius); padding: 1.4rem; text-align: center; }
.qr { margin: 1rem 0; }
.qr img { background: #fff; padding: .6rem; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--linie); }

/* ---------------- Anmeldung ---------------- */

.zugang { display: grid; grid-template-columns: minmax(20rem, 5fr) minmax(0, 7fr); min-height: 100vh; background: #f7f6f2; }
.zugang__buehne {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between; padding: 2.2rem clamp(1.5rem, 4vw, 3.5rem);
  color: #fff; background: radial-gradient(120% 80% at 20% 0%, #1c2050 0%, var(--nacht) 65%);
}
.zugang__buehne::before, .zugang__buehne::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: .55; }
.zugang__buehne::before { width: 60%; aspect-ratio: 1; right: -15%; top: 8%; background: radial-gradient(circle, rgba(79, 107, 255, .8), transparent 65%); animation: treiben 16s ease-in-out infinite alternate; }
.zugang__buehne::after { width: 50%; aspect-ratio: 1; left: -10%; bottom: 5%; background: radial-gradient(circle, rgba(255, 106, 77, .55), transparent 65%); animation: treiben 20s ease-in-out -5s infinite alternate-reverse; }
@keyframes treiben { to { transform: translate(-3vw, 4vh) scale(1.15); } }
.zugang__baender { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.zugang__baender .band { fill: none; stroke: url(#zb); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .8; animation: zeichnen 2.4s var(--weich) .2s forwards; }
.zugang__baender .band--2 { stroke-width: 1.2; opacity: .5; animation-delay: .5s; }
.zugang__baender .funke { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: .07 .93; opacity: 0; filter: drop-shadow(0 0 5px #fff); animation: funkeln 6s linear 2.2s infinite, an .6s ease 2.2s forwards; }
@keyframes zeichnen { to { stroke-dashoffset: 0; } }
@keyframes funkeln { to { stroke-dashoffset: -1; } }
@keyframes an { to { opacity: .85; } }
.zugang__marke { display: inline-flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 800; font-stretch: 110%; font-size: 1.15rem; letter-spacing: -.02em; view-transition-name: marke; }
.zugang__marke:hover { color: #fff; }
.zugang__titel { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 850; font-stretch: 118%; letter-spacing: -.035em; line-height: 1; margin: 0 0 1.6rem; }
.zugang__text ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; color: rgba(255, 255, 255, .72); font-size: .95rem; }
.zugang__text li { display: flex; gap: .6rem; align-items: center; }
.zugang__text li::before { content: '✓'; display: grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; font-size: .7rem; font-weight: 900; color: var(--nacht); background: var(--verlauf); }

.zugang__inhalt { display: flex; flex-direction: column; justify-content: center; padding: 2.5rem clamp(1.25rem, 5vw, 5rem); }
.zugang__inhalt > * { width: 100%; max-width: 27rem; margin-inline: auto; }
.zugang .karte.schmal { background: none; box-shadow: none; padding: 0; margin: 0 auto; animation: auftritt .6s var(--weich) both; }
.zugang h1 { font-size: 2.1rem; margin: 0 0 .4rem; }
.zugang .unter { color: var(--leise); margin: 0 0 1.8rem; }
.zugang .schritt { display: inline-block; margin: 0 0 1rem; padding: .25rem .7rem; border-radius: 999px; background: var(--akzent-blass); color: var(--akzent-tief); font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.zugang input { padding: .85rem .95rem; font-size: 1rem; }
.zugang input[name=code] { font-size: 1.5rem; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.studiohinweis { margin: 2rem 0 0; padding: 1rem 1.1rem; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--linie); font-size: .9rem; color: var(--leise); }
.studiohinweis strong { color: var(--text); display: block; margin-bottom: .15rem; }
.zurueck { margin: 1.2rem 0 0; text-align: center; font-size: .9rem; }
.zugang__fuss { margin-top: 3rem !important; display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; color: var(--leise); }
.zugang__fuss a { color: var(--leise); text-decoration: none; display: inline-block; padding-block: .3rem; }
.zugang__fuss a:hover { color: var(--text); }

/* ---------------- Schmal ---------------- */

@media (max-width: 860px) {
  .leiste { flex-wrap: wrap; gap: .6rem 1rem; }
  .leiste__nav { order: 3; width: 100%; margin: 0; flex-wrap: wrap; }
  .leiste__nav a { white-space: nowrap; padding: .45rem .75rem; }
  .ich__name { display: none; }
  table { display: block; overflow-x: auto; }
  .zugang { grid-template-columns: minmax(0, 1fr); }
  .zugang__buehne { min-height: 12rem; padding: 1.4rem 1.25rem; }
  .zugang__titel { font-size: 1.9rem; margin: 1.4rem 0 0; }
  .zugang__text ul { display: none; }
  .zeile input:not([type=checkbox]) { min-width: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .zugang__baender .band { stroke-dashoffset: 0; }
  .zugang__baender .funke { display: none; }
}

/* Feinschliff */
.leiste button.leise, .leiste button.leise:hover { box-shadow: none; background: none; padding: .3rem 0; }
table + .klein, table + p.klein, .zeile + .klein { margin-top: .9rem; }
.kopfzeile h1 + .marke { margin-right: auto; margin-bottom: .45rem; }
form.karte:not(.schmal) { max-width: 56rem; }
form.karte fieldset { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); column-gap: 1.2rem; }
form.karte legend { padding-bottom: .9rem; }
form.karte > button { margin-top: .6rem; }

/* ---------------- Öffentliche Seiten: Registrierung, Anmelden ---------------- */
.honig { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.adressfeld { display: flex; align-items: stretch; margin-top: .35rem; border: 1px solid var(--linie-stark); border-radius: 10px; background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.adressfeld:focus-within { border-color: var(--akzent); box-shadow: 0 0 0 4px rgba(75, 95, 224, .18); }
.adressfeld input { border: 0; margin: 0; box-shadow: none !important; min-width: 0; flex: 1; }
.adressfeld span { display: flex; align-items: center; padding: 0 .9rem; background: #f4f4f8; color: var(--leise); font-weight: 450; white-space: nowrap; font-size: .92rem; }
.zweispaltig { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 1rem; }
label.haken { display: flex; gap: .6rem; align-items: flex-start; font-weight: 450; font-size: .9rem; color: var(--leise); }
label.haken input { margin-top: .2rem; flex: none; }
.schritt--fertig { background: #e3f5ea !important; color: var(--ok) !important; }
a.knopf.breit { width: 100%; padding-block: .85rem; font-size: 1rem; }
.vergessen { margin-top: 1.2rem; }
.vergessen summary { cursor: pointer; color: var(--akzent); font-weight: 600; font-size: .92rem; }
.vergessen form { margin-top: 1rem; }
button.knopf--zweit, a.knopf--zweit { background: #fff; color: var(--text); box-shadow: inset 0 0 0 1px var(--linie-stark); }
button.knopf--zweit:hover, a.knopf--zweit:hover { background: var(--akzent-blass); color: var(--akzent-tief); }
.studiohinweis a { font-weight: 700; text-decoration: none; }
/* Einrichtung: Schritte leuchten nacheinander auf */
.aufbau { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .7rem; counter-reset: s; }
.aufbau li { position: relative; padding: .8rem 1rem .8rem 3rem; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--linie); color: var(--leise); animation: aufleuchten 1s var(--weich) both; }
.aufbau li::before { content: ''; position: absolute; left: 1rem; top: 50%; width: 1.1rem; height: 1.1rem; margin-top: -.55rem; border-radius: 50%; border: 2px solid var(--linie-stark); border-top-color: var(--akzent); animation: drehen 1s linear infinite; }
.aufbau li:nth-child(1) { animation-delay: 0s; } .aufbau li:nth-child(2) { animation-delay: .4s; } .aufbau li:nth-child(3) { animation-delay: .8s; } .aufbau li:nth-child(4) { animation-delay: 1.2s; }
.aufbau li:first-child { color: var(--text); }
.aufbau li:first-child::before { animation: none; border-color: var(--ok); background: var(--ok); }
.aufbau--fast li:nth-child(2) { color: var(--text); }
.aufbau--fast li:nth-child(2)::before { animation: none; border-color: var(--ok); background: var(--ok); }
@keyframes aufleuchten { from { opacity: 0; transform: translateX(-8px); } }
@keyframes drehen { to { transform: rotate(360deg); } }
@media (max-width: 520px) { .zweispaltig { grid-template-columns: minmax(0, 1fr); } }

/* ---------------- Einstellungen ---------------- */
.einstellungen { display: grid; grid-template-columns: 16rem minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.unternav { position: sticky; top: 5rem; display: grid; gap: .25rem; background: var(--karte); border-radius: var(--radius); padding: .5rem; box-shadow: var(--schatten), inset 0 0 0 1px var(--linie); }
.unternav a { display: block; padding: .6rem .8rem; border-radius: 10px; text-decoration: none; color: var(--text); transition: background .15s; }
.unternav a b { display: block; font-weight: 650; font-size: .93rem; }
.unternav a span { display: block; font-size: .78rem; color: var(--leise); }
.unternav a:hover { background: #f4f4f9; }
.unternav a[aria-current] { background: var(--akzent-blass); box-shadow: inset 3px 0 0 var(--akzent); }
.unternav a[aria-current] b { color: var(--akzent-tief); }
.bereichstitel { margin-top: 0 !important; }
.einstellungen__inhalt form.karte { max-width: none; }
.einstellungen__inhalt fieldset { grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); }
fieldset.einspaltig { grid-template-columns: minmax(0, 1fr) !important; }
.knopfleiste { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .6rem; }
.testmail { display: inline-flex; gap: .4rem; align-items: center; margin-left: auto; }
.testmail input { width: 15rem; margin: 0; }
.zweispaltig { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 1rem; }
@media (max-width: 520px) { .zweispaltig { grid-template-columns: minmax(0, 1fr); } }
.dreispaltig { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr)); gap: 0 1rem; }
.hinweisbox { margin-top: 1rem; background: #fafaff; }
.hinweisbox h3 { margin-top: 0; }
.hinweisbox code { word-break: break-all; }
.stripe-zustand { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: 0 0 1rem; }
.eingabe-kurz { width: 5rem !important; display: inline-block !important; margin: 0 !important; }

/* Schalter statt nackter Häkchen – schneller zu erfassen */
label.schalter { display: flex; gap: .8rem; align-items: flex-start; font-weight: 450; cursor: pointer; margin-bottom: 1rem; }
label.schalter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.schalter__bahn { flex: none; position: relative; width: 2.6rem; height: 1.5rem; border-radius: 999px; background: #d4d5e0; transition: background .2s; margin-top: .05rem; }
.schalter__bahn::after { content: ''; position: absolute; top: .18rem; left: .18rem; width: 1.14rem; height: 1.14rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--weich); }
label.schalter input:checked + .schalter__bahn { background: var(--akzent); }
label.schalter input:checked + .schalter__bahn::after { transform: translateX(1.1rem); }
label.schalter input:focus-visible + .schalter__bahn { outline: 3px solid #ffb35c; outline-offset: 2px; }
label.schalter b { display: block; font-weight: 650; }
.schalter--klein { margin: 0 !important; }
.schalter--klein .schalter__bahn { width: 2.2rem; height: 1.3rem; }
.schalter--klein .schalter__bahn::after { width: .94rem; height: .94rem; }
.schalter--klein input:checked + .schalter__bahn::after { transform: translateX(.9rem); }

/* Tarif-Editor */
.tarifraster { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: 1rem; margin: 1rem 0 1.2rem; }
.tarifkarte { border-radius: 14px; padding: 1.1rem; background: #fbfbfe; box-shadow: inset 0 0 0 1px var(--linie); }
.tarifkarte--hervor { box-shadow: inset 0 0 0 2px var(--akzent); background: #fff; }
.tarifkarte__kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: .9rem; }
.tarifkarte label.haken { margin: 0; }
.tarifkarte__kopf { gap: .6rem; flex-wrap: wrap; }
.tarifkarte__kopf label.haken { display: inline-flex; align-items: center; gap: .4rem; width: auto; flex: none; white-space: nowrap; font-size: .85rem; color: var(--leise); }
.tarifkarte__kopf label.haken input { width: auto; margin: 0; }
.aufklapp { border-top: 1px solid var(--linie); padding-top: .6rem; margin-top: .4rem; }
.aufklapp summary { cursor: pointer; font-weight: 650; font-size: .9rem; padding: .3rem 0; }
.funktionsliste { display: grid; gap: .35rem; padding: .5rem 0; }
.funktionsliste label.haken { font-size: .86rem; color: var(--text); margin: 0; }

/* Abo auf der Mandantenseite */
.abo-kasten__kopf { display: flex; gap: .7rem; align-items: center; margin-bottom: .3rem; font-size: 1.05rem; }
@media (max-width: 860px) {
  .einstellungen { grid-template-columns: minmax(0, 1fr); }
  /* Unternavigation als umbrechende Reiter: alle Bereiche sichtbar, ohne Scrollen */
  .unternav { position: static; display: flex; flex-wrap: wrap; gap: .3rem; padding: .4rem; }
  .unternav a { padding: .5rem .8rem; }
  .unternav a span { display: none; }
  .unternav a[aria-current] { box-shadow: inset 0 0 0 1.5px var(--akzent); }
  .testmail { margin-left: 0; flex-wrap: wrap; width: 100%; }
  .testmail input { width: auto; flex: 1 1 12rem; min-width: 0; }
}

/* ---------------- Abo-Übersicht (Superadmin) ---------------- */

button.zweit, a.zweit { background: #fff; color: var(--text); box-shadow: inset 0 0 0 1px var(--linie-stark); }
button.zweit:hover, a.zweit:hover { background: var(--akzent-blass); color: var(--akzent-tief); box-shadow: inset 0 0 0 1px var(--akzent); }
a.klein-knopf { display: inline-flex; padding: .3rem .7rem; border-radius: 8px; font-size: .8rem; font-weight: 650; text-decoration: none; position: relative; z-index: 2; }

.suche { display: flex; gap: .5rem; align-items: center; }
.suche input { width: 17rem; margin: 0; }
.suche button { padding: .6rem 1rem; }

.zahlen--abos { grid-template-columns: repeat(auto-fit, minmax(min(10.5rem, 100%), 1fr)); }
.zahl small { display: block; margin-top: .25rem; font-size: .78rem; color: var(--leise); }
.zahl span { font-size: 1.7rem; }

.verteilung { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); gap: .4rem 1.4rem; margin: .9rem 0 0; padding: .9rem 1.1rem; background: var(--karte); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--linie); }
.verteilung div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .1rem .7rem; align-items: center; }
.verteilung b { font-size: .9rem; }
.verteilung meter { width: 100%; }
.verteilung .klein { grid-column: 1 / -1; margin: 0; font-size: .78rem; }

.zaehler { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .45rem; margin-left: .35rem; border-radius: 999px; background: #e9eaf3; color: var(--leise); font-size: .8rem; font-weight: 700; vertical-align: .1rem; }

.wichtig { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.wichtig li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem 1rem; align-items: center; padding: .75rem 1rem .75rem 1.25rem; background: var(--karte); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--linie); transition: box-shadow .15s, transform .15s var(--weich); }
.wichtig li:hover { box-shadow: inset 0 0 0 1px var(--akzent), var(--schatten); transform: translateY(-1px); }
.wichtig li::before { content: ''; position: absolute; left: 0; top: .6rem; bottom: .6rem; width: 4px; border-radius: 0 4px 4px 0; background: var(--linie-stark); }
.wichtig__rot::before { background: var(--gefahr) !important; }
.wichtig__gelb::before { background: #f5b400 !important; }
.wichtig__blau::before { background: var(--akzent) !important; }
.wichtig li > a { color: var(--text); font-weight: 550; text-decoration: none; }
.wichtig li .klein { grid-column: 1; margin: 0; }
.wichtig li .klein-knopf { grid-column: 2; grid-row: 1 / span 2; }

.reiter { display: flex; flex-wrap: wrap; gap: .3rem; margin: 2.2rem 0 .2rem; border-bottom: 1px solid var(--linie); }
.reiter a { padding: .6rem .95rem; border-radius: 10px 10px 0 0; color: var(--leise); text-decoration: none; font-weight: 600; font-size: .93rem; margin-bottom: -1px; border-bottom: 2px solid transparent; }
.reiter a span { display: inline-grid; place-items: center; min-width: 1.4rem; padding: 0 .35rem; margin-left: .25rem; border-radius: 999px; background: #ececf2; font-size: .75rem; color: var(--leise); }
.reiter a:hover { color: var(--text); background: #fafaff; }
.reiter a[aria-current] { color: var(--akzent-tief); border-bottom-color: var(--akzent); }
.reiter a[aria-current] span { background: var(--akzent-blass); color: var(--akzent-tief); }
.reiter + h2 { margin-top: 1.4rem; }

.tabellenrahmen { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--schatten), inset 0 0 0 1px var(--linie); background: var(--karte); }
.tabellenrahmen table { box-shadow: none; min-width: 52rem; }
.abotabelle td { vertical-align: top; }
.abotabelle td .klein { margin-top: .15rem; }
.abotabelle td.leer { text-align: center; color: var(--leise); padding: 2rem 1rem; }
th a.sortieren { color: inherit; text-decoration: none; white-space: nowrap; }
th a.sortieren:hover { color: var(--akzent-tief); }
th[aria-sort] { color: var(--akzent-tief); }
td.zahlwert, th.zahlwert { font-variant-numeric: tabular-nums; }

/* Ganze Zeile klickbar ohne JavaScript: der Link im Studionamen spannt sich über die Zeile. */
tr.klickzeile { position: relative; cursor: pointer; }
tr.klickzeile a.zeilenlink::after { content: ''; position: absolute; inset: 0; }
tr.klickzeile:hover { background: #f5f6ff; }
tr.klickzeile:focus-within { outline: 3px solid #ffb35c; outline-offset: -3px; }
.wichtig li a.zeilenlink::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }
tr.zeile--bald td:first-child { box-shadow: inset 4px 0 0 #f5b400; }
tr.zeile--rot td:first-child { box-shadow: inset 4px 0 0 var(--gefahr); }

meter, progress { display: block; width: 100%; max-width: 9rem; height: .5rem; margin: .35rem 0 .1rem; }
progress { appearance: none; border: 0; border-radius: 999px; background: #ececf2; overflow: hidden; }
progress::-webkit-progress-bar { background: #ececf2; border-radius: 999px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, #a07cff, #ff7a5c); border-radius: 999px; }
progress::-moz-progress-bar { background: linear-gradient(90deg, #a07cff, #ff7a5c); border-radius: 999px; }

.aktiv { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.aktiv::before { content: ''; width: .55rem; height: .55rem; border-radius: 50%; background: #c9cad6; }
.aktiv--hoch::before { background: #2fbf71; box-shadow: 0 0 0 3px rgba(47, 191, 113, .18); }
.aktiv--mittel::before { background: #f5b400; }
.aktiv--niedrig::before { background: var(--koralle); }

.schritte { display: inline-flex; gap: 3px; }
.schritte i { width: .9rem; height: .45rem; border-radius: 3px; background: #e2e3ec; }
.schritte i.an { background: var(--akzent); }

/* Einzelansicht */
.abokopf { display: flex; gap: 1.5rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.2rem; }
.abokopf .kopfzeile { margin-bottom: .2rem; justify-content: flex-start; align-items: center; }
.abokopf h1 + .marke { margin: 0; }
.abokopf__unter { margin: 0 0 .2rem; font-size: 1.05rem; font-weight: 600; }
.abokopf__zahl { text-align: right; color: var(--leise); font-size: .9rem; }
.abokopf__zahl span { display: block; font-size: 2.2rem; font-weight: 800; font-stretch: 112%; letter-spacing: -.03em; color: var(--text); line-height: 1.05; }
.abokopf__zahl small { display: block; }
.aboraster { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr)); gap: 1rem; align-items: start; }
.aboraster .karte { margin: 0; }
.aboraster h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--leise); margin-bottom: .8rem; }
dl.werte { margin: 0; display: grid; gap: .55rem; }
dl.werte > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: .8rem; align-items: baseline; }
dl.werte dt { color: var(--leise); font-size: .86rem; }
dl.werte dd { margin: 0; font-weight: 550; }
dl.werte dd .klein { display: inline; margin: 0 0 0 .25rem; }
dl.werte--klein { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--linie); }
.nutzung { display: grid; gap: .55rem; }
.nutzung__zeile { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) auto; gap: .8rem; align-items: center; }
.nutzung__zeile meter { max-width: none; margin: 0; }
.nutzung__zeile .klein { margin: 0; }
.haken-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.haken-liste li { display: flex; gap: .55rem; align-items: center; color: var(--leise); }
.haken-liste li::before { content: ''; flex: none; width: 1.1rem; height: 1.1rem; border-radius: 50%; box-shadow: inset 0 0 0 2px #cfd0dc; }
.haken-liste li.ok { color: var(--text); font-weight: 550; }
.haken-liste li.ok::before { content: '✓'; display: grid; place-items: center; background: var(--ok); color: #fff; font-size: .7rem; font-weight: 800; box-shadow: none; }
.adressen { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.adressen .klein { display: inline; }
.aktionen-karte .zeile { margin: 0 0 .4rem; }
.aktionen-karte select { width: auto; margin: 0; }
.verlauf { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--linie); display: grid; gap: .7rem; }
.verlauf li { position: relative; }
.verlauf li::before { content: ''; position: absolute; left: -1.47rem; top: .45rem; width: .6rem; height: .6rem; border-radius: 50%; background: var(--karte); box-shadow: inset 0 0 0 2px var(--violett); }
.verlauf time { display: inline-block; min-width: 8.5rem; color: var(--leise); font-size: .85rem; font-variant-numeric: tabular-nums; }
.verlauf .klein { display: inline; margin-left: .5rem; }

@media (max-width: 860px) {
  .suche { width: 100%; }
  .suche input { width: 100%; }
  .abokopf__zahl { text-align: left; }
  dl.werte > div, .nutzung__zeile { grid-template-columns: 8rem minmax(0, 1fr); }
  .nutzung__zeile strong { grid-column: 2; }
  .wichtig li { grid-template-columns: minmax(0, 1fr); }
  .wichtig li .klein-knopf { grid-column: 1; grid-row: auto; justify-self: start; }
}
dl.werte dd { min-width: 0; overflow-wrap: anywhere; }
dl.werte dd .marke { white-space: normal; }
.abokopf > div { min-width: 0; }
.abokopf p.klein { overflow-wrap: anywhere; }
details.mehr { margin: .8rem 0 0; }
details.mehr summary { cursor: pointer; color: var(--akzent); font-weight: 600; font-size: .9rem; padding: .3rem 0; }
details.mehr[open] summary { margin-bottom: .6rem; }
.nowrap { white-space: nowrap; }

/* Rechtliches */
textarea { width: 100%; margin: .35rem 0 0; padding: .65rem .8rem; border: 1px solid var(--linie-stark); border-radius: 10px; font: inherit; font-size: .93rem; line-height: 1.5; background: #fff; color: var(--text); resize: vertical; }
textarea:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 4px rgba(75, 95, 224, .18); }
.rechtkarten { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr)); gap: .7rem; margin: 0 0 .8rem; }
.rechtkarte { display: grid; gap: .15rem; padding: .85rem 1rem; border-radius: 12px; background: var(--karte); box-shadow: inset 0 0 0 1px var(--linie); text-decoration: none; color: var(--text); transition: box-shadow .15s, transform .15s var(--weich); }
.rechtkarte:hover { box-shadow: inset 0 0 0 1px var(--akzent), var(--schatten); transform: translateY(-1px); color: var(--text); }
.rechtkarte span { font-size: .78rem; color: var(--leise); overflow-wrap: anywhere; }
.rechtkarte { min-width: 0; }
.rechtkarte b { overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
ul.kompakt { margin: .3rem 0 0; padding-left: 1.1rem; }

/* ---------------- Sehr schmal (Handy hochkant, ab 320 px) ---------------- */
@media (max-width: 520px) {
  dl.werte > div { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .nutzung__zeile { grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .8rem; }
  .nutzung__zeile meter { grid-column: 1 / -1; grid-row: 2; }
  .nutzung__zeile strong { grid-column: 2; grid-row: 1; }
  dd .nowrap, dd code { white-space: normal; overflow-wrap: anywhere; }
  .verlauf time { min-width: 0; display: block; }
  .karte { min-width: 0; }
}
@media (pointer: coarse) {
  .fusszeile a { display: inline-block; padding: .45rem .15rem; }
  th a.sortieren { display: inline-block; padding-block: .4rem; }
}
/* Lange Wörter (Streitbeilegungsverfahren …) dürfen schmale Bildschirme nicht sprengen */
h1, h2, h3, h4, dt, dd, th, td, label, legend { overflow-wrap: break-word; }
@media (max-width: 30rem) { h1, h2, h3, h4, legend { -webkit-hyphens: auto; hyphens: auto; } }
@media (max-width: 400px) {
  .leiste { padding-inline: 1rem; }
  .leiste__marke { font-size: .95rem; gap: .4rem; }
  .leiste__ich { gap: .6rem; }
}

/* Gefahrenzone: Mandant löschen */
details.karte--gefahr { box-shadow: var(--schatten), inset 0 0 0 1px #efc1bc; }
details.karte--gefahr > summary { cursor: pointer; font-weight: 700; color: var(--gefahr); }
details.karte--gefahr[open] > summary { margin-bottom: .8rem; }
details.karte--gefahr ul { margin: .4rem 0 .8rem; padding-left: 1.2rem; }

/* Registrierung über einen Empfehlungslink */
.studiohinweis--empfehlung { margin: 0 0 1.2rem; background: linear-gradient(135deg, rgba(109, 132, 255, .09), rgba(255, 122, 92, .09));
  box-shadow: inset 0 0 0 1px rgba(109, 132, 255, .35); color: var(--text); }
