/* === Schulio design system =====================================
 *
 * FARB-SYSTEM (alle Brand-Farben via _Layout.cshtml gesetzt, on-* per
 * WCAG-Luminanz automatisch berechnet):
 *
 *   --schulio-primary           Identitaet. Grosse gefaerbte Flaechen:
 *                               Header, Footer, .btn Default, Card-Border
 *                               im Fokus, Selected-State im Form-Builder.
 *   --schulio-on-primary        Auto-Kontrast-Text auf Primary.
 *   --schulio-on-primary-muted  Sekundaerer Text auf Primary (Sub-Labels).
 *
 *   --schulio-secondary         Zustandsfarbe. Alles was "Primary aber
 *                               aktiver/getroffen": Hover/Active von Buttons,
 *                               Selected-Indikator in Navigation, Focus-Glow,
 *                               .nav-pills .nav-link.active.
 *   --schulio-on-secondary      Auto-Kontrast-Text auf Secondary.
 *
 *   --schulio-accent            Aufmerksamkeit. Pop-Farbe fuer "schau hier!":
 *                               CTA (Registrieren), Badges, Activity-Banner,
 *                               .btn.accent.
 *   --schulio-on-accent         Auto-Kontrast-Text auf Accent.
 *
 *   --schulio-heading           Headings (h1-h3) auf weissem Background.
 *                               CI-Regel: Primary wenn lesbar, sonst Accent
 *                               wenn lesbar, sonst Slate #0f172a. Secondary
 *                               ist NICHT Teil dieser Text-Kette.
 *   --schulio-link              Inline-Links auf weissem Background.
 *                               Gleiche Logik, Fallback: Blue-700 #1d4ed8.
 *
 * Regel: Brand-Farben werden NIE hardcoded — entweder var(--schulio-*) oder
 * die on-* / heading / link Auto-Variablen. Neutralfarben (Slate, Gray) duerfen
 * direkt rein.
 *
 *   --schulio-action            Aktionsfarbe fuer Buttons, aktive Navigation,
 *                               Fokus-Ringe. Im Layout aus Primary/PrimaryAccent
 *                               gewaehlt, so dass sie sich IMMER klar vom weissen
 *                               Grund abhebt (auch bei sehr hellen CI-Farben).
 *   --schulio-on-action         Auto-Kontrast-Text auf Action.
 * ================================================================= */

/* --- Design-Tokens (neutral, markenunabhaengig) ----------------- */
:root {
    --ui-bg:            #f5f6f8;   /* Seitenhintergrund im Admin */
    --ui-surface:       #ffffff;
    --ui-surface-2:     #f8fafc;   /* Tabellenkoepfe, Panels */
    --ui-border:        #e3e6eb;
    --ui-border-strong: #cfd4dc;
    --ui-text:          #0f172a;
    --ui-text-2:        #334155;
    --ui-muted:         #64748b;
    --ui-faint:         #94a3b8;
    --ui-radius-sm:     6px;
    --ui-radius:        10px;
    --ui-radius-lg:     14px;
    --ui-shadow-sm:     0 1px 2px rgba(16, 24, 40, .05);
    --ui-shadow:        0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
    --ui-shadow-lg:     0 12px 32px -12px rgba(16, 24, 40, .22);
    --ui-ring:          0 0 0 3px color-mix(in srgb, var(--schulio-action, #2d5fb8) 22%, transparent);
    --ui-success:       #15803d;
    --ui-warning:       #b45309;
    --ui-danger:        #dc2626;
}

* { box-sizing: border-box; }

/* Keine feste Hoehe auf html/body: sticky Elemente (Topbar, Admin-Seitenmenue, Editor-
   Kopfleisten) kleben nur innerhalb ihres Elternelements — ein auf 100% fixierter body
   endet nach einer Bildschirmhoehe, danach scrollte die Topbar weg. Den Viewport fuellt
   body ueber min-height (siehe unten). */

body {
    margin: 0;
    /* Sticky-Footer per Flex: body fuellt den Viewport, main waechst auf
       1fr, der Footer sitzt automatisch am Ende. Kein min-height-Hack mehr
       der auf iOS Safari ueberschiesst (100vh ignoriert die URL-Leiste). */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #0f172a;
    background: #ffffff;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; width: 100%; box-sizing: border-box; }
main.container {
    padding-top: 2rem; padding-bottom: 4rem;
    flex: 1 0 auto;
    /* In Flex-Column waere align-self: stretch der Default, aber Safari/iPad
       behandelt das in Kombination mit max-width unzuverlaessig — der
       Container schrumpft auf Content-Breite. width: 100% + align-self
       stretch erzwingt die volle Cross-Achse, max-width capt es bei 1120. */
    align-self: stretch;
    width: 100%;
}
footer.footer { flex-shrink: 0; }

/* --- typography ------------------------------------------------- */

h1, h2, h3, h4 { color: var(--schulio-heading); line-height: 1.25; margin: 0 0 .8rem; font-weight: 600; }
h1 { font-size: 1.85rem; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; margin-top: 2rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: .95rem; color: #0f172a; }   /* h4 immer Slate — soll dezent bleiben */

/* Body-Scroll-Lock waehrend Mobile-Burger offen ist. */
body.mobile-nav-open { overflow: hidden; }

p { margin: 0 0 1rem; }
small, .muted { color: #64748b; }

a { color: var(--schulio-link); text-decoration: none; transition: color .15s; }
a:hover { text-decoration: underline; }

code { background: #eef2f7; padding: .1em .35em; border-radius: 4px; font-size: .9em; }

/* --- topbar / footer ------------------------------------------- */

.topbar {
    background: var(--schulio-primary);
    border-bottom: 1px solid color-mix(in srgb, var(--schulio-primary) 80%, black);
    color: var(--schulio-on-primary);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}
.brand {
    display: inline-flex;
    gap: .65rem;
    align-items: center;
    font-weight: 700;
    color: var(--schulio-on-primary);
    font-size: 1.05rem;
}
.brand:hover { text-decoration: none; color: var(--schulio-on-primary); }
.brand img { height: 32px; max-width: 140px; object-fit: contain; }

/* Mobile-Burger: nur auf <= 720px sichtbar (siehe Media-Query weiter unten). */
.nav-burger {
    display: none;
    appearance: none;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    width: 2.6rem; height: 2.6rem;
    padding: 0;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}
.nav-burger:hover { background: color-mix(in srgb, var(--schulio-on-primary) 12%, transparent); }
.nav-burger:focus-visible { outline: 2px solid var(--schulio-accent); outline-offset: 2px; }
.nav-burger-bar {
    display: block;
    width: 22px; height: 2px;
    background: var(--schulio-on-primary); border-radius: 2px;
    transition: transform .18s ease, opacity .12s;
}
.nav-burger.is-open .nav-burger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open .nav-burger-bar:nth-child(2) { opacity: 0; }
.nav-burger.is-open .nav-burger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* Platform-Mark im Header: etwas kleiner als die volle 32px Tenant-Logo-Hoehe,
   damit "Schulio" daneben gut atmet. */
.brand img.brand-platform-mark { height: 28px; width: 28px; max-width: 28px; }
/* Topnav: alle Einträge auf gleicher Text-Baseline statt zentriert. So liegen
   die Buchstaben-Linien aller Items exakt übereinander, unabhängig davon ob
   ein Item eine größere Badge oder ein Icon enthält. */
.topnav { display: flex; align-items: center; gap: 1.3rem; line-height: 1.4; }
.topnav a,
.topnav .topnav-dropdown-label {
    color: var(--schulio-on-primary-muted);
    font-weight: 500;
    font-size: .95rem;
}
.topnav a:hover,
.topnav .topnav-dropdown-label:hover { color: var(--schulio-on-primary); text-decoration: none; }
/* CTA = primaere Aktions-Highlight in der Topnav. Auf primary-Header die
   Akzentfarbe einsetzen, damit der Button visuell rausspringt. */
.topnav .cta {
    background: var(--schulio-accent);
    color: var(--schulio-on-accent);
    padding: .45rem .9rem;
    border-radius: 6px;
    font-weight: 600;
}
.topnav .cta:hover {
    background: color-mix(in srgb, var(--schulio-accent) 85%, black);
    color: var(--schulio-on-accent);
}
.inline-form { display: inline; margin: 0; }
.linkish { background: none; border: none; cursor: pointer; font: inherit; padding: 0; color: #475569; }
.linkish:hover { color: var(--schulio-link); }

.footer {
    border-top: 1px solid color-mix(in srgb, var(--schulio-primary) 80%, black);
    background: var(--schulio-primary);
    padding: 1.6rem 0;
    color: var(--schulio-on-primary-muted);
    font-size: .85rem;
}
.footer a { color: var(--schulio-on-primary); }
.footer a:hover { color: var(--schulio-on-primary); text-decoration: underline; }

/* --- flash messages -------------------------------------------- */

.flash {
    display: flex; align-items: center; gap: .6rem;
    padding: .75rem 1rem;
    border-radius: var(--ui-radius);
    margin-bottom: 1.5rem;
    font-weight: 500;
    border: 1px solid;
    box-shadow: var(--ui-shadow-sm);
    animation: flash-in .25s ease-out;
}
.flash > span { flex: 1; }
.flash > .icon { width: 1.15rem; height: 1.15rem; }
.flash-close {
    background: none; border: none; cursor: pointer; color: inherit; opacity: .6;
    padding: .2rem; border-radius: 6px; line-height: 0;
}
.flash-close:hover { opacity: 1; background: rgba(0,0,0,.06); }
.flash.success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.flash.error   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.flash.info    { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.flash.warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* --- cards / grid ---------------------------------------------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Kompakte Karten-Variante fuer die Admin-Tabs: Icon links neben dem Text,
   einheitliche Hoehe und Breite ueber alle Karten — gibt dem Grid optisch
   Ruhe, auch wenn Beschreibungstexte unterschiedlich lang sind. */

.card.card--compact {
    display: flex; align-items: center; gap: .85rem;
    padding: 1rem 1.1rem;
    min-height: 96px;       /* gleiche Mindesthoehe → ruhigeres Bild */
}
.card.card--compact > div { flex: 1; min-width: 0; }
.card.card--compact .card-icon {
    width: 32px; height: 32px;
    flex-shrink: 0;
    margin: 0;
    color: var(--schulio-link);
}
.card.card--compact h3 {
    margin: 0 0 .2rem;
    font-size: 1rem;
    line-height: 1.25;
}
.card.card--compact p {
    margin: 0;
    font-size: .85rem;
    color: #64748b;
    line-height: 1.35;
}
/* Compact summary banner on /Admin for non-global admins:
   shows the tenants they administer, with a visual cue for cascaded scope. */

.card {
    display: block;
    padding: 1.25rem;
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    box-shadow: var(--ui-shadow-sm);
    color: inherit;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
a.card:hover {
    border-color: color-mix(in srgb, var(--schulio-action) 45%, var(--ui-border));
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--ui-shadow-lg);
}
.card h3 { margin: 0 0 .4rem; color: var(--schulio-link); }
.card p { margin: 0; color: #64748b; font-size: .92rem; }

/* --- data tables ----------------------------------------------- */

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    box-shadow: var(--ui-shadow-sm);
    overflow: hidden;
    font-size: .93rem;
}
.data-table th, .data-table td {
    padding: .75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eef0f4;
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table th {
    background: var(--ui-surface-2);
    font-size: .74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--ui-muted);
    white-space: nowrap;
}
.data-table tbody tr { transition: background-color .12s; }
.data-table tbody tr:hover { background: #f9fafb; }
/* Ganze Zeile klickbar (data-href) — JS navigiert, Links/Buttons darin behalten Vorrang. */
.data-table tbody tr[data-href] { cursor: pointer; }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }

.data-table .row-actions { justify-content: flex-end; }

/* --- buttons --------------------------------------------------- */

/* Primaer-Button nutzt die Aktionsfarbe (immer kontraststark), nicht direkt
   Primary — sonst waeren Buttons bei sehr hellen CI-Farben kaum sichtbar.
   Hover dunkelt die Aktionsfarbe ab, statt auf Secondary zu springen
   (Secondary ist oft eine Pastell-/Komplementaerfarbe). */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 2.5rem;
    padding: .55rem 1.05rem;
    border-radius: 8px;
    border: 1px solid var(--schulio-action);
    background: var(--schulio-action);
    color: var(--schulio-on-action);
    font: inherit;
    font-size: .94rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: var(--ui-shadow-sm);
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
    line-height: 1.1;
}
.btn:hover {
    background: color-mix(in srgb, var(--schulio-action) 86%, black);
    border-color: color-mix(in srgb, var(--schulio-action) 86%, black);
    color: var(--schulio-on-action);
    text-decoration: none;
}
.btn:focus-visible { outline: none; box-shadow: var(--ui-ring); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn.secondary {
    background: var(--ui-surface);
    color: var(--ui-text-2);
    border-color: var(--ui-border-strong);
}
.btn.secondary:hover { background: var(--ui-surface-2); color: var(--ui-text); border-color: #b8bfca; }
.btn.danger { background: var(--ui-danger); border-color: var(--ui-danger); color: #fff; }
.btn.danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
/* Dezente Danger-Variante fuer Tabellenzeilen: erst beim Hover rot. */
.btn.danger-soft { background: var(--ui-surface); color: var(--ui-danger); border-color: var(--ui-border-strong); }
.btn.danger-soft:hover { background: #fef2f2; color: #b91c1c; border-color: #fca5a5; }
.btn.success { background: var(--ui-success); border-color: var(--ui-success); color: #fff; }
.btn.success:hover { background: #166534; border-color: #166534; color: #fff; }
.btn.small { min-height: 2rem; padding: .35rem .7rem; font-size: .82rem; border-radius: 7px; }
.btn.large { min-height: 3rem; padding: .75rem 1.4rem; font-size: 1rem; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--schulio-link); box-shadow: none; }
.btn.ghost:hover { background: color-mix(in srgb, var(--schulio-action) 8%, transparent); color: var(--schulio-link); }

/* Akzent-Button: nutzt die Akzentfarbe (z.B. fuer Highlight-CTAs ausserhalb
   der Topnav). Textfarbe automatisch passend per --schulio-on-accent. */
.btn.accent { background: var(--schulio-accent); border-color: var(--schulio-accent); color: var(--schulio-on-accent); }
.btn.accent:hover {
    background: color-mix(in srgb, var(--schulio-accent) 85%, black);
    border-color: color-mix(in srgb, var(--schulio-accent) 85%, black);
    color: var(--schulio-on-accent);
}

/* --- forms ----------------------------------------------------- */

/* Basis-Stil fuer ALLE Eingabefelder — auch ausserhalb von .form-row
   (Menue-Editor, Inline-Editoren, Dialoge). Element-Selektoren mit niedriger
   Spezifitaet: komponentenspezifische Regeln (Quill, Toolbar) gewinnen. */
input[type=text], input[type=email], input[type=password], input[type=url],
input[type=tel], input[type=search], input[type=number], input[type=date],
input[type=datetime-local], input[type=time], select, textarea {
    font: inherit;
    color: var(--ui-text);
    background-color: var(--ui-surface);
    border: 1px solid var(--ui-border-strong);
    border-radius: 8px;
    padding: .5rem .7rem;
    transition: border-color .15s, box-shadow .15s;
}
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus, input[type=url]:focus,
input[type=tel]:focus, input[type=search]:focus, input[type=number]:focus, input[type=date]:focus,
input[type=datetime-local]:focus, input[type=time]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--schulio-action);
    box-shadow: var(--ui-ring);
}
input[readonly], textarea[readonly] { background-color: var(--ui-surface-2); color: var(--ui-text-2); }
input:disabled, select:disabled, textarea:disabled { background-color: #f1f5f9; color: var(--ui-muted); cursor: not-allowed; }

.form-card {
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    box-shadow: var(--ui-shadow-sm);
    padding: 1.75rem 2rem;
    /* Volle Container-Breite — admin-Formulare mit Branding-Vorschau,
       Logo-Slots, Adress-Grids etc. brauchen den Platz. */
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.form-grid > .form-row.full,
.form-grid > fieldset,
.form-grid > .actions { grid-column: 1 / -1; }

.form-row { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.1rem; }
.form-row label {
    font-weight: 500;
    color: #334155;
    font-size: .9rem;
}
.form-row input[type=text],
.form-row input[type=email],
.form-row input[type=password],
.form-row input[type=url],
.form-row input[type=tel],
.form-row input[type=search],
.form-row input[type=datetime-local],
.form-row input[type=date],
.form-row input[type=number],
.form-row input[type=file],
.form-row select,
.form-row textarea {
    padding: .55rem .7rem;
    border: 1px solid var(--ui-border-strong);
    border-radius: 8px;
    font: inherit;
    line-height: 1.4;
    box-sizing: border-box;
    background-color: #fff;
    color: #0f172a;
    transition: border-color .15s, box-shadow .15s;
}
.form-row input[readonly], .form-row textarea[readonly] { background-color: var(--ui-surface-2); color: var(--ui-text-2); }
/* Date/Time-Inputs sind im Browser-Default hoeher als Text-Inputs (Picker-
   Widget). Mit fixer Hoehe + matching Padding bleibt die Zeile bündig zu
   den Geschwistern in der gleichen form-row Reihe. */
.form-row input[type=text],
.form-row input[type=email],
.form-row input[type=password],
.form-row input[type=url],
.form-row input[type=tel],
.form-row input[type=search],
.form-row input[type=datetime-local],
.form-row input[type=date],
.form-row input[type=number],
.form-row select {
    height: 2.5rem;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--schulio-action);
    box-shadow: var(--ui-ring);
}
.form-row textarea { min-height: 5rem; resize: vertical; font-family: inherit; }
.form-row input[type=color] {
    width: 3.4rem;
    height: 2.4rem;
    padding: 2px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
}
.form-row .help { color: #64748b; font-size: .82rem; }
.form-row .field-validation-error { color: #dc2626; font-size: .82rem; }
.form-row.checkbox { flex-direction: row; align-items: center; gap: .5rem; }
.form-row.checkbox label { margin: 0; }
input[type=checkbox] { width: 1.05rem; height: 1.05rem; accent-color: var(--schulio-link); }

fieldset {
    border: 1px solid #e6e8ee;
    border-radius: 10px;
    padding: 1rem 1.25rem .25rem;
    margin: 0 0 1.5rem;
    background: #fafbfc;
}
fieldset > legend {
    font-weight: 600;
    padding: 0 .5rem;
    color: var(--schulio-link);
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.actions {
    margin-top: 1rem;
    display: flex;
    gap: .6rem;
    align-items: center;
    flex-wrap: wrap;
}

.validation-summary-errors {
    background: #fef2f2;
    color: #991b1b;
    padding: .8rem 1rem;
    border-radius: 8px;
    border: 1px solid #fecaca;
    margin-bottom: 1.5rem;
}
.validation-summary-errors ul { margin: 0; padding-left: 1.2rem; }

/* --- pills / badges -------------------------------------------- */

.pill {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 500;
    background: #eef2ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}
.pill.draft     { background: #f3f4f6; color: #374151; border-color: #e5e7eb; }
.pill.open      { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.pill.editonly  { background: #fef9c3; color: #854d0e; border-color: #fde68a; }
.pill.upcoming  { background: #e0f2fe; color: #075985; border-color: #bae6fd; }
.pill.applicants { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }
.process-hint { margin: .5rem 0 0; }
.pill.closed    { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

.pill.notpublic { background: #f3f4f6; color: #64748b; border-color: #e5e7eb; }

/* --- public landing page -------------------------------------- */

.landing-logo {
    display: flex;
    justify-content: center;
    margin: .5rem 0 2rem;
}
.landing-logo img {
    width: 100%;
    max-width: 800px;
    height: auto;
    object-fit: contain;
    display: block;
}
/* Flush-Variante: nutzt negatives margin-top, um das padding-top von
   main.container (2rem) zu absorbieren — das Logo sitzt damit direkt
   unter der Topbar ohne weisse Lücke. */
.landing-logo.landing-logo--flush {
    margin-top: -2rem;
    margin-bottom: 1.25rem;
}

/* === Mobile / responsive ====================================== */

/* Tables: scroll on tablet, card layout on phone */
@media (max-width: 1080px) {
    .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 720px) {
    /* Convert data tables to a card-per-row layout */
    .data-table,
    .data-table thead,
    .data-table tbody,
    .data-table tr,
    .data-table th,
    .data-table td { display: block; width: auto; }
    .data-table { overflow: visible; border: none; background: transparent; border-radius: 0; }
    .data-table thead { position: absolute; left: -9999px; }
    .data-table tbody tr {
        margin-bottom: .8rem;
        padding: .85rem 1rem;
        background: #fff;
        border: 1px solid #e6e8ee;
        border-radius: 10px;
    }
    .data-table tbody tr:hover { background: #fff; }
    .data-table td {
        padding: .25rem 0;
        border: none;
        font-size: .92rem;
    }
    .data-table td::before {
        content: attr(data-label);
        display: block;
        font-size: .7rem;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: #64748b;
        font-weight: 600;
        margin-bottom: .1rem;
    }
    .data-table td:empty,
    .data-table td:has(.row-actions:empty) { display: none; }
    .data-table td .row-actions {
        margin-top: .35rem; flex-wrap: wrap; gap: .35rem;
    }
    .data-table td:last-child {
        border-top: 1px solid #f1f5f9;
        margin-top: .5rem;
        padding-top: .55rem;
    }
    .data-table td:last-child::before { display: none; }

    /* Form field grid collapses */
    .form-fields-grid > * { grid-column: 1 / -1 !important; }

    /* Top-bar: groesser, Burger statt Inline-Nav.
       Brand-Logo + Schriftgroesse spuerbar groesser, mehr Vertical-Space. */
    .topbar-inner {
        height: auto;
        min-height: 72px;
        padding: .65rem 1rem;
        gap: .5rem;
        position: relative;   /* Ankerpunkt fuer absolut positioniertes .topnav */
    }
    .brand { font-size: 1.2rem; gap: .55rem; }
    .brand img { height: 40px; max-width: 160px; }
    .brand img.brand-platform-mark { height: 34px; width: 34px; max-width: 34px; }

    .nav-burger { display: inline-flex; }

    /* Topnav als Full-Screen-Overlay unter dem sticky Header. Header bleibt
       sichtbar/fix, der gesamte Rest unter ihm gehoert dem Menue. Innen
       scrollbar fuer lange Menues. body bekommt overflow:hidden waehrend
       offen ist (siehe JS). */
    .topnav {
        position: fixed;
        top: 72px; left: 0; right: 0; bottom: 0;
        flex-direction: column; align-items: stretch;
        background: #fff;
        gap: 0;
        padding: 0 0 1rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        display: none;
        z-index: 49;   /* knapp unter dem sticky Header (z=50) */
    }
    .topbar-inner[data-open="1"] .topnav { display: flex; }
    .topnav > a,
    .topnav > .topnav-dropdown > a,
    .topnav > .topnav-dropdown > .topnav-dropdown-label {
        display: block;
        padding: .9rem 1.25rem;
        font-size: 1.05rem;
        font-weight: 500;
        color: #0f172a;
        border-bottom: 1px solid #f1f5f9;
    }
    .topnav > a:active,
    .topnav-dropdown-menu a:active { background: #eef2ff; }
    .topnav .cta {
        margin: .8rem 1rem .4rem;
        text-align: center;
        padding: .9rem 1rem;
        font-size: 1.05rem;
        border-radius: 8px;
    }

    /* Dropdowns inline ausgeklappt. Label ("Konto") = normaler Top-Level-
       Eintrag in voller Breite, visuell gleichwertig zu "Start" / "Administration".
       Children volle Breite, leicht eingerueckt mit Akzent-Leiste links und
       dezentem Hintergrund, um Hierarchie zu zeigen ohne aufdringlich zu sein.

       WICHTIG: !important auf display/width — die Desktop-Regeln stehen
       WEITER UNTEN in der Datei (Block "Topnav-Dropdown Desktop" um Zeile
       1850) und gewinnen sonst trotz Media-Query (gleiche Specificity, spaeter). */
    .topnav-dropdown { display: block !important; }
    .topnav > .topnav-dropdown > .topnav-dropdown-label,
    .topnav > .topnav-dropdown > a {
        display: flex !important;
        align-items: center !important;
        gap: .4rem;
        width: 100% !important;
        padding: .9rem 1.25rem;
        font-size: 1.05rem;
        font-weight: 500;
        color: #0f172a;
        background: transparent;
        text-transform: none;
        letter-spacing: normal;
        border-bottom: 1px solid #f1f5f9;
        cursor: pointer;
    }
    .topnav > .topnav-dropdown > .topnav-dropdown-label:active,
    .topnav > .topnav-dropdown > a:active { background: #eef2ff; }

    .topnav-dropdown-menu {
        position: static !important;
        left: auto !important; top: auto !important;
        box-shadow: none !important;
        border: none !important;
        background: #f8fafc !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
        visibility: visible !important;
        min-width: 0 !important;
        width: 100% !important;
        border-bottom: 1px solid #e2e8f0 !important;
        border-radius: 0 !important;
    }
    .topnav-dropdown-menu a,
    .topnav-dropdown-menu .dropdown-link {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: .5rem;
        width: 100% !important;
        padding: .8rem 1.25rem .8rem 2rem !important;
        font-size: 1rem;
        font-weight: 500;
        color: #1f2937;
        border: none;
        border-bottom: 1px solid #e2e8f0;
        border-left: 3px solid transparent;
        text-align: left;
        background: transparent;
    }
    .topnav-dropdown-menu a:last-child,
    .topnav-dropdown-menu > form:last-child .dropdown-link { border-bottom: none; }
    .topnav-dropdown-menu a:active,
    .topnav-dropdown-menu .dropdown-link:active {
        background: #eef2ff;
        border-left-color: var(--schulio-link);
    }
    .topnav-dropdown-menu .dropdown-form {
        display: block; margin: 0; padding: 0;
        border: none; background: transparent; box-shadow: none;
    }

    .topnav-dropdown-menu .topnav-badge.inline,
    .topnav > .topnav-dropdown > .topnav-dropdown-label .topnav-badge {
        display: inline-block;
        background: var(--schulio-primary); color: #fff;
        border-radius: 999px; padding: .05rem .45rem;
        font-size: .72rem; margin-left: auto;
    }
    .topnav .caret { display: none; }

    /* Footer address blocks stack */
    .footer-addr { gap: .75rem; }

    /* Containers tighter */
    .container { padding: 0 1rem; }
    main.container { padding-top: 1.25rem; padding-bottom: 2.5rem; }
    .form-card { padding: 1rem; }

    /* Page-header stays vertical */
    .page-header { gap: .5rem; }
    .page-header h1 { font-size: 1.4rem; }

    /* Process / school cards single column */
    .card-grid { grid-template-columns: 1fr; }
    .school-grid { grid-template-columns: 1fr; }

}

/* === end mobile ============================================== */

/* Fields that are members of a group: small accent stripe on the left edge */

.span-1  { grid-column: span 1; }   .span-2  { grid-column: span 2; }
.span-3  { grid-column: span 3; }   .span-4  { grid-column: span 4; }
.span-5  { grid-column: span 5; }   .span-6  { grid-column: span 6; }
.span-7  { grid-column: span 7; }   .span-8  { grid-column: span 8; }
.span-9  { grid-column: span 9; }   .span-10 { grid-column: span 10; }
.span-11 { grid-column: span 11; }  .span-12 { grid-column: span 12; }

/* --- public form rendering (12-col grid) ---------------------- */

.form-fields-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: .9rem 1rem; }
.form-fields-grid .form-row { margin-bottom: 0; }

.form-fields-grid h2.section-heading { grid-column: 1 / -1; margin: 1rem 0 .25rem; color: var(--schulio-link); }
.form-fields-grid p.section-description { grid-column: 1 / -1; color: #475569; margin: 0; }

/* --- field editor (legacy inline rows, kept for compat) ------- */

#fields-list:empty + .actions::before {
    content: "Noch keine Felder. Mit „Feld hinzufügen" beginnen oder eine Vorlage anwenden.";
    color: #64748b;
    font-style: italic;
    display: block;
    padding: 1rem 0;
}

/* --- parent group link / school cards (public) ---------------- */

.tenant-parent-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .8rem;
    background: #fff;
    border: 1px solid #e6e8ee;
    border-radius: 999px;
    color: #475569;
    font-size: .9rem;
    margin: 0 0 1.25rem;
}
/* Position-Varianten — gesteuert vom Branding-Editor.
   „Bündig" (.pos-left / .pos-right) = Pille per z-index ueber dem Logo,
   ohne sichtbare Luecke zwischen Topnav und Logo.
   „Mit Abstand" (.pos-left-spaced / .pos-right-spaced) = Pille zwischen
   Topnav und Logo, schiebt das Logo aktiv nach unten. */
.tenant-parent-link.pos-left-spaced  { margin: .5rem 0 .75rem 1rem; }
.tenant-parent-link.pos-right-spaced { margin: .5rem 1rem .75rem auto; display: flex; width: max-content; }

/* Overlay-Variante: absolute Position ueber dem Logo, oben links/rechts. */
.landing-area { position: relative; }
.tenant-parent-link--overlay {
    position: absolute;
    top: .65rem;
    z-index: 5;
    margin: 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}
.tenant-parent-link--overlay.pos-left  { left: 1rem; }
.tenant-parent-link--overlay.pos-right { right: 1rem; }
.tenant-parent-link a { color: var(--schulio-link); display: inline-flex; align-items: center; gap: .25rem; }
.tenant-parent-link a:hover { text-decoration: underline; }

.school-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin: 1rem 0 2rem;
}
.school-card {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid #e6e8ee;
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    transition: border-color .15s, transform .15s, box-shadow .15s;
    border-left: 4px solid var(--card-accent, var(--schulio-primary));
}
.school-card:hover {
    border-color: var(--card-accent, var(--schulio-primary));
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px -8px rgba(15, 23, 42, .12);
}
.school-card-logo {
    width: 56px; height: 56px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: #f8fafc;
    border-radius: 10px;
    color: var(--card-accent, var(--schulio-primary));
}
.school-card-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.school-card-logo .icon { width: 1.8rem; height: 1.8rem; }
.school-card-body { flex: 1; min-width: 0; }
.school-card-body h3 { margin: 0 0 .25rem; color: #0f172a; font-size: 1.05rem; }
.school-card-body p {
    margin: 0 0 .5rem; color: #64748b; font-size: .9rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.school-card-link {
    color: var(--card-accent, var(--schulio-primary));
    font-size: .85rem;
    display: inline-flex; align-items: center; gap: .25rem;
    font-weight: 500;
}
/* Pille in der Schul-Kachel, die meldet, ob diese Schule aktuell offene
   Anmeldeverfahren hat. Faerbung nimmt --card-accent, damit jede Schule in
   ihrer eigenen Primaerfarbe aufblitzt. */
.school-card-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    margin: 0 0 .5rem;
    padding: .15rem .55rem;
    background: color-mix(in srgb, var(--card-accent, var(--schulio-primary)) 12%, white);
    color: var(--card-accent, var(--schulio-primary));
    border: 1px solid color-mix(in srgb, var(--card-accent, var(--schulio-primary)) 30%, white);
    border-radius: 999px;
    font-size: .78rem; font-weight: 600;
}
.school-card-badge .icon { width: .9em; height: .9em; }

/* --- process list (public) ------------------------------------ */

.process-actions {
    display: flex; flex-wrap: wrap; gap: .5rem;
    margin-top: .9rem;
}

.process-list { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .8rem; }
.process-list li {
    background: #fff;
    border: 1px solid #e6e8ee;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}
.process-list li strong { font-size: 1.05rem; }
.process-list .meta { color: #64748b; font-size: .9rem; margin-top: .25rem; }

/* --- quill overrides ------------------------------------------- */

.ql-container.ql-snow { border-radius: 0 0 7px 7px; border-color: #d1d5db; min-height: 10rem; font-family: inherit; font-size: 1rem; }
.ql-toolbar.ql-snow  { border-radius: 7px 7px 0 0; border-color: #d1d5db; background: #fafbfc; }
.ql-editor { min-height: 10rem; line-height: 1.55; }
/* Headings inside Quill editor preview adopt branding colors */
.ql-editor h1 { color: var(--schulio-link); font-size: 1.7rem; font-weight: 700; margin: .6em 0 .3em; line-height: 1.2; }
.ql-editor h2 { color: var(--schulio-link); font-size: 1.3rem; font-weight: 600; margin: .8em 0 .3em; }
.ql-editor h3 { color: var(--schulio-heading); font-size: 1.05rem; font-weight: 600; margin: .8em 0 .25em; }
.ql-editor img { max-width: 100%; height: auto; border-radius: 6px; margin: .25rem 0; cursor: pointer; }
.ql-editor a { color: var(--schulio-link); text-decoration: underline; }

/* WYSIWYG-Tabelle: sichtbarer Rahmen, kompaktes Padding, bleibt fluide. */
.ql-editor table.wysiwyg-table,
.ql-editor table {
    border-collapse: collapse;
    width: 100%;
    margin: .5rem 0;
    table-layout: fixed;
}
.ql-editor table th, .ql-editor table td {
    border: 1px solid #cbd5e1;
    padding: .35rem .5rem;
    vertical-align: top;
    word-wrap: break-word;
}
.ql-editor table th {
    background: #f1f5f9;
    font-weight: 600;
    text-align: left;
}
.cms-body table, .legal-body table {
    border-collapse: collapse;
    width: 100%;
    margin: .75rem 0;
}
.cms-body table th, .cms-body table td,
.legal-body table th, .legal-body table td {
    border: 1px solid #cbd5e1;
    padding: .4rem .55rem;
    vertical-align: top;
}
.cms-body table th, .legal-body table th { background: #f1f5f9; text-align: left; }

/* Image-Resize-Overlay: 4 Ecken-Handles um das geklickte Bild. */

.wysiwyg-img-handle-nw { top: -6px;    left: -6px;   cursor: nwse-resize; }
.wysiwyg-img-handle-ne { top: -6px;    right: -6px;  cursor: nesw-resize; }
.wysiwyg-img-handle-sw { bottom: -6px; left: -6px;   cursor: nesw-resize; }
.wysiwyg-img-handle-se { bottom: -6px; right: -6px;  cursor: nwse-resize; }

/* --- small helpers --------------------------------------------- */

.breadcrumb { color: #64748b; font-size: .9rem; margin-bottom: .5rem; }
.breadcrumb a { color: #64748b; }
.breadcrumb a:hover { color: var(--schulio-link); }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-header h1 { margin: 0; }
.page-header .actions { margin-top: 0; }
.row-actions { display: flex; gap: .4rem; }

.data-table th a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .25rem; }
.data-table th a:hover { color: var(--schulio-link); }

@media (max-width: 720px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-card { padding: 1.25rem; }
    .topnav { gap: .8rem; }
    h1 { font-size: 1.55rem; }
}

/* --- icons ------------------------------------------------------ */

.icon {
    width: 1.05em; height: 1.05em;
    display: inline-block;
    vertical-align: -0.18em;
    flex-shrink: 0;
}
.btn .icon { width: 1.05em; height: 1.05em; }
.btn.small .icon { width: 1em; height: 1em; }
.icon-only {
    padding: .35rem !important;
    line-height: 0;
    aspect-ratio: 1;
    justify-content: center;
}
.icon-only .icon { width: 1.05rem; height: 1.05rem; vertical-align: middle; }
.card-icon {
    width: 1.8rem; height: 1.8rem;
    color: var(--schulio-link);
    margin-bottom: .35rem;
}

/* "aus Profil"-Hinweis unter Auto-Feldern: Schloss-Icon im selben Line-Style
   wie die anderen Icons (statt Emoji), in muted-Farbe. */
.auto-key-hint {
    display: inline-flex; align-items: center; gap: .25rem;
    color: #64748b;
}
.auto-key-hint .icon { width: .9em; height: .9em; opacity: .7; }
.auto-key-hint-empty { color: #b45309; }
.auto-key-hint-empty .icon { opacity: .9; }

/* Section-Headings mit Inline-Action (z.B. "Verwalten" bei EB-Sektionen). */
.section-heading.with-action {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 1rem;
}
.section-heading .section-action {
    font-size: .85rem; font-weight: 500;
    display: inline-flex; align-items: center; gap: .3rem;
    color: var(--schulio-link); text-decoration: none;
    padding: .25rem .6rem; border: 1px solid #cbd5e1; border-radius: 6px;
    background: #fff;
}
.section-heading .section-action:hover {
    border-color: var(--schulio-link);
    background: color-mix(in srgb, var(--schulio-primary) 8%, white);
}
.section-heading .section-action .icon { width: 1em; height: 1em; }

/* Erziehungsberechtigte: Mode-Auswahl als 3 klickbare Karten + Person-Karten. */
.eb-mode-tiles {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 720px) { .eb-mode-tiles { grid-template-columns: 1fr; } }
.eb-mode-tile {
    position: relative;
    display: flex; flex-direction: column; gap: .25rem;
    padding: 1rem;
    border: 2px solid #e2e8f0; border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.eb-mode-tile:hover { border-color: #cbd5e1; }
.eb-mode-tile.active {
    border-color: var(--schulio-link);
    background: color-mix(in srgb, var(--schulio-primary) 6%, white);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--schulio-primary) 18%, transparent);
}
.eb-mode-tile input[type=radio] {
    position: absolute; opacity: 0; pointer-events: none;
}
.eb-mode-icon { font-size: 1.6rem; line-height: 1; }
.eb-mode-title { font-weight: 600; color: #0f172a; }
.eb-mode-desc { font-size: .82rem; color: #64748b; }

.eb-person-card {
    margin: 0 0 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid #e2e8f0; border-radius: 10px;
    background: #fafbfc;
}
.eb-person-card legend {
    padding: 0 .5rem; font-weight: 600; color: #0f172a;
}
.eb-shared-addr {
    margin: 0 0 1rem;
    padding: 1rem 1.25rem;
    border: 1px dashed var(--schulio-primary);
    border-radius: 10px;
    background: color-mix(in srgb, var(--schulio-primary) 4%, white);
}
.eb-shared-addr legend { color: var(--schulio-link); font-weight: 600; padding: 0 .5rem; }

/* Wizard-Schrittanzeige (Registrierungs-Wizard). */
.wizard-steps {
    list-style: none; padding: 0; margin: 0 0 1.5rem;
    display: flex; gap: .5rem; flex-wrap: wrap;
}
.wizard-steps li {
    display: flex; align-items: center; gap: .5rem;
    padding: .5rem .9rem;
    border-radius: 999px;
    background: #f1f5f9; color: #64748b;
    font-size: .9rem;
}
.wizard-steps li.current { background: var(--schulio-primary); color: #fff; font-weight: 600; }
.wizard-steps li.done    { background: #dcfce7; color: #166534; }
.wizard-steps li .num {
    display: inline-flex; width: 1.5em; height: 1.5em; border-radius: 50%;
    background: rgba(255,255,255,.25); align-items: center; justify-content: center;
    font-weight: 700;
}
.wizard-steps li.todo    .num { background: #e2e8f0; color: #475569; }
.wizard-steps li.done    .num { background: #bbf7d0; color: #166534; }

/* Plattform-Root Hero (wenn kein Tenant aufgeloest wurde). */
.platform-hero {
    max-width: 540px; margin: 3rem auto; text-align: center;
}
.platform-hero-logo { max-width: 320px; width: 100%; height: auto; }
.platform-hero-tagline {
    margin: 1.25rem 0 .5rem; font-size: 1.15rem; color: #0f172a;
}
.platform-hero-note { color: #64748b; }

/* Footer-Navigation aus dem Menue-Editor (Place=Footer). Horizontale
   Linkleiste ueber den Pflicht-Links Impressum/AGB/Datenschutz. */
.footer-nav {
    display: flex; flex-wrap: wrap; gap: 1.2rem;
    margin: 1rem 0 .5rem;
    font-size: .9rem;
}
.footer-nav a { color: inherit; text-decoration: none; opacity: .85; }
.footer-nav a:hover { opacity: 1; text-decoration: underline; }

/* Footer address block */
.footer-addr {
    display: flex; flex-wrap: wrap; gap: 1.25rem 2rem;
    margin-bottom: .75rem;
}
.footer-addr address { font-style: normal; font-size: .9rem; line-height: 1.5; color: var(--schulio-on-primary-muted); }
.footer-addr strong { color: var(--schulio-on-primary); }
.footer-parent { font-size: .9rem; color: var(--schulio-on-primary-muted); margin: .5rem 0; display: inline-flex; align-items: center; gap: .35rem; }
.footer-parent a { color: var(--schulio-on-primary); font-weight: 500; }
.footer-legal { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .85rem; margin-top: .5rem; }
.footer-legal a { color: var(--schulio-on-primary-muted); }
.footer-legal a:hover { color: var(--schulio-on-primary); }
/* Copyright + "betrieben mit Schulio"-Link: gleiche Farbtoene wie die
   legal-Links daneben, damit der Footer als ein Block wirkt und nicht
   die Brand-Farbe leakt. */
.footer-credit { color: var(--schulio-on-primary-muted); }
.footer-credit-link {
    color: var(--schulio-on-primary-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.footer-credit-link:hover { color: var(--schulio-on-primary); }

/* About-Page: schmale zentrierte Karte. Bewusst minimal — Logo, Name,
   Version mit Kanal-Badge, Build-Datum, Copyright, kurzer Hinweis. */
.about-card {
    max-width: 32rem;
    margin: 3rem auto;
    padding: 2.2rem 2rem;
    background: #fff;
    border: 1px solid #e6e8ee;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.about-mark {
    width: 72px; height: 72px;
    margin: 0 auto .5rem;
    display: block;
}
.about-name {
    margin: 0 0 .25rem;
    font-size: 1.9rem;
    color: var(--schulio-heading);
    font-weight: 700;
    letter-spacing: -0.01em;
}
.about-tagline {
    margin: 0 0 1.6rem;
    color: #64748b;
    font-size: .95rem;
}
.about-version {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .9rem;
    background: #f8fafc;
    border: 1px solid #e6e8ee;
    border-radius: 999px;
    font-size: 1rem;
}
.about-version strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.about-builddate {
    margin: .55rem 0 0;
    color: #64748b;
    font-size: .85rem;
}
.about-copyright {
    margin: 1.6rem 0 0;
    color: #475569;
    font-size: .85rem;
}
.about-note {
    margin: 1.2rem 0 0;
    padding-top: 1.2rem;
    border-top: 1px solid #f1f5f9;
    color: #94a3b8;
    font-size: .8rem;
    line-height: 1.5;
}

.legal-body { max-width: 760px; }
.legal-body h2 { margin-top: 1.5rem; }

/* === Identity UI (Bootstrap) restyling ========================= */
/* The default Identity scaffold ships Bootstrap markup. We map its
   classes onto the Schulio look without scaffolding every page. */

main.container > .row { display: block; }
main.container > .row > [class*=" col-"],
main.container > .row > [class^="col-"] {
    width: 100%; max-width: 460px; margin: 0 auto; padding: 0;
}

/* Wrap auth forms into a card */
form#account, form#login-form, form#register-form,
form[action*="/Account/Login"], form[action*="/Account/Register"],
form[action*="/Account/ForgotPassword"], form[action*="/Account/ResetPassword"],
form[action*="/Account/Manage"] {
    background: #fff;
    border: 1px solid #e6e8ee;
    border-radius: 12px;
    padding: 1.75rem 2rem;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
}

/* Floating labels → normal stacked labels */
.form-floating { position: static; margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: .35rem; }
.form-floating > label {
    position: static !important;
    transform: none !important;
    padding: 0 !important;
    height: auto !important;
    pointer-events: auto !important;
    color: #334155;
    font-weight: 500;
    font-size: .9rem;
    background: transparent !important;
    order: -1;
}
.form-floating > .form-control,
.form-floating > .form-control-plaintext { height: auto !important; padding: .55rem .7rem !important; }

/* Generic Bootstrap inputs */
.form-control, .form-select {
    width: 100%;
    padding: .55rem .7rem;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    font: inherit;
    background: #fff;
    color: #0f172a;
    transition: border-color .15s, box-shadow .15s;
    line-height: 1.4;
}
.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--schulio-link);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--schulio-primary) 18%, transparent);
}
.form-label { display: block; margin-bottom: .35rem; color: #334155; font-weight: 500; font-size: .9rem; }
.form-text  { color: #64748b; font-size: .82rem; margin-top: .25rem; display: block; }

/* Checkboxes (RememberMe etc.) */
.form-check { display: flex; align-items: center; gap: .5rem; margin: .25rem 0 1rem; padding: 0; }
.form-check-input { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--schulio-link); }
.form-check-label { color: #334155; font-size: .92rem; }
.checkbox { margin: .25rem 0 1rem; }
.checkbox > label { display: inline-flex; align-items: center; gap: .5rem; font-size: .92rem; color: #334155; }

/* Bootstrap buttons (Identity-UI) → Schulio buttons.
   Bewusst NUR .btn-primary: frueher griff die Regel auf jeden Submit-Button
   (button[type=submit].btn) und machte damit auch .secondary/.danger-Buttons
   zu Primaer-Buttons in der (evtl. sehr hellen) Primary-Farbe. */
.btn-primary, .btn-lg.btn-primary {
    background: var(--schulio-action) !important;
    border: 1px solid var(--schulio-action) !important;
    color: var(--schulio-on-action) !important;
    padding: .6rem 1.1rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    width: auto !important;
    line-height: 1.1 !important;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.btn-primary:hover {
    background: color-mix(in srgb, var(--schulio-action) 86%, black) !important;
    border-color: color-mix(in srgb, var(--schulio-action) 86%, black) !important;
    color: var(--schulio-on-action) !important;
}
.btn-link { color: var(--schulio-link); text-decoration: none; }
.btn-link:hover { color: var(--schulio-link); text-decoration: underline; filter: brightness(.9); }

/* Submit buttons that span full width in Identity defaults */
.w-100 { width: 100% !important; }
form#account button[type=submit].w-100,
form#login-form button[type=submit].w-100,
form#register-form button[type=submit].w-100 {
    margin-top: .5rem;
}

/* Validation messages */
.text-danger, .field-validation-error { color: #dc2626 !important; font-size: .82rem; }
[data-valmsg-summary="true"]:not(:empty),
.validation-summary-errors:not(:empty) {
    background: #fef2f2;
    color: #991b1b;
    padding: .8rem 1rem;
    border-radius: 8px;
    border: 1px solid #fecaca;
    margin-bottom: 1.25rem;
}
/* Leere Validation-Summaries verstecken — sonst leere Kacheln auf z.B.
   Identity/Konto-Forms (validation-summary-valid Class kommt von der
   Tag-Helper-Output wenn keine Fehler vorliegen). */
.validation-summary-valid { display: none; }
[data-valmsg-summary="true"] ul, .validation-summary-errors ul { margin: 0; padding-left: 1.2rem; }

/* Section dividers (h2 inside auth forms) */
form h1, form > h1, main.container > h1 {
    margin-bottom: 1.25rem;
}
main.container > h2:not(:first-child),
form h2, form > h2 {
    margin-top: 0;
    font-size: 1.15rem;
    color: var(--schulio-link);
}

/* "Or" divider + external providers (if any) */
hr { border: none; border-top: 1px solid #e6e8ee; margin: 1.5rem 0; }

/* Manage area layout (Konto-Verwaltung) */
.manage-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    align-items: start;
}
.manage-sidebar {
    background: #fff;
    border: 1px solid #e6e8ee;
    border-radius: 10px;
    padding: .6rem;
}
.manage-content {
    background: #fff;
    border: 1px solid #e6e8ee;
    border-radius: 12px;
    padding: 1.75rem 2rem;
    min-width: 0;
}
.manage-content h3,
.manage-content h2 { margin-top: 0; color: var(--schulio-link); }
.manage-content form { background: transparent; border: none; padding: 0; box-shadow: none; }
@media (max-width: 720px) {
    .manage-grid { grid-template-columns: 1fr; gap: 1rem; }
    .manage-content { padding: 1.25rem; }
}

/* Manage / left side nav (Konto-Verwaltung) */
.nav-pills { display: flex; flex-direction: column; gap: .2rem; padding: 0; margin: 0 0 1.5rem; list-style: none; }
.nav-pills .nav-link {
    display: block;
    padding: .5rem .8rem;
    border-radius: 7px;
    color: #334155;
    text-decoration: none;
    font-weight: 500;
    font-size: .92rem;
}
.nav-pills .nav-link:hover { background: color-mix(in srgb, var(--schulio-secondary) 10%, white); color: var(--schulio-link); text-decoration: none; }
.nav-pills .nav-link.active {
    background: var(--schulio-secondary);
    color: var(--schulio-on-secondary);
}

/* Tight spacing for stacked rows in Manage */
main.container > .row > .col-md-3,
main.container > .row > .col-md-9 {
    max-width: none;
}
@media (min-width: 900px) {
    main.container > .row:has(> .col-md-3) {
        display: grid;
        grid-template-columns: 220px 1fr;
        gap: 2rem;
        max-width: 960px;
        margin: 0 auto;
    }
}

/* External logins list */
.btn-outline-primary, .btn-outline-secondary {
    background: #fff;
    color: #334155;
    border: 1px solid #d1d5db;
    padding: .55rem 1rem;
    border-radius: 7px;
    font: inherit;
    cursor: pointer;
}
.btn-outline-primary:hover, .btn-outline-secondary:hover {
    background: #f8fafc; border-color: #cbd5e1; color: #0f172a;
}

/* ===== Topnav-Dropdown ===== */
.topnav-dropdown { position: relative; display: inline-block; }
/* Dropdown-Label im Topnav muss exakt wie ein normaler <a>-Eintrag wirken:
   gleiche Farbe, gleiche Font-Größe, gleicher Hover. Sonst „sticht" Konto
   optisch raus, weil es als <span> gerendert wird. */
.topnav-dropdown > a,
.topnav-dropdown > .topnav-dropdown-label {
    /* align-items: baseline lässt den Konto-Text exakt auf der gleichen Linie
       liegen wie die Geschwister-Links — die Badge richtet sich an dieser
       Baseline aus und ragt nur nach oben/unten in Pillen-Form. */
    display: inline-flex; align-items: baseline; gap: .35rem;
    color: var(--schulio-on-primary-muted); font-weight: 500; font-size: .95rem;
    cursor: pointer;
    line-height: 1.4;
}
.topnav-dropdown > a:hover,
.topnav-dropdown > .topnav-dropdown-label:hover { color: var(--schulio-on-primary); }
.topnav-dropdown .caret { font-size: .6em; opacity: .55; margin-left: .15rem; }
.topnav-dropdown-menu {
    position: absolute; left: 0; top: 100%;
    min-width: 200px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    padding: .35rem 0;
    display: none;
    z-index: 1000;
}
.topnav-dropdown:hover .topnav-dropdown-menu,
.topnav-dropdown:focus-within .topnav-dropdown-menu { display: block; }
.topnav-dropdown-menu a {
    display: block; padding: .45rem .85rem;
    color: #0f172a; text-decoration: none;
    font-size: .95rem;
}
.topnav-dropdown-menu a:hover { background: #f1f5f9; color: var(--schulio-link); }
/* Dropdown items can be mixed link + form (e.g. Logout) — make them visually
   consistent so the form-button looks like another link. */
.topnav-dropdown-menu a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.topnav-dropdown-menu .dropdown-form { margin: 0; padding: 0; }
.topnav-dropdown-menu .dropdown-link {
    display: block; width: 100%; text-align: left;
    background: none; border: 0; cursor: pointer;
    padding: .45rem .85rem; font: inherit; color: #0f172a;
}
.topnav-dropdown-menu .dropdown-link:hover { background: #f1f5f9; color: var(--schulio-link); }
.topnav-dropdown.account-dropdown > .topnav-dropdown-menu { right: 0; left: auto; }

/* Konto-Pille im Header: dezent abgesetzt mit weichem Hintergrund + Avatar-
   Icon. Macht den persoenlichen Bereich auf den ersten Blick erkennbar,
   ohne das uebrige Topnav-Bild zu erschlagen. */
.topnav-dropdown.account-dropdown > .topnav-dropdown-label {
    align-items: center;
    gap: .4rem;
    padding: .25rem .55rem .25rem .4rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--schulio-on-primary) 10%, transparent);
    transition: background .12s;
}
.topnav-dropdown.account-dropdown > .topnav-dropdown-label:hover {
    background: color-mix(in srgb, var(--schulio-on-primary) 18%, transparent);
}
.account-icon {
    width: 1.2rem; height: 1.2rem;
    flex: 0 0 auto;
    opacity: .9;
}
@media (max-width: 720px) {
    /* Auf Mobile sind alle Topnav-Eintraege ohnehin volle Breite — die Pille
       wuerde dort wie ein doppeltes Highlight wirken. Wir blenden das
       Hintergrund-Tinting aus und lassen nur das Icon stehen. */
    .topnav-dropdown.account-dropdown > .topnav-dropdown-label {
        background: transparent !important;
        padding: .9rem 1.25rem !important;
        border-radius: 0 !important;
    }
    .account-icon { width: 1.3rem; height: 1.3rem; }
}
/* Notification badge — small pill aligned to the text baseline of its sibling.
   Padding-only (no fixed height) so the badge never pushes the line-height of
   the wrapping topnav-label past a plain link's. */
.topnav-badge {
    display: inline-block;
    padding: .05em .55em;
    border-radius: 999px;
    background: var(--schulio-accent);
    color: #1f2937;
    font-size: .72rem; font-weight: 700;
    line-height: 1.3;
    vertical-align: baseline;
}
.topnav-badge.inline { background: color-mix(in srgb, var(--schulio-primary) 18%, transparent); color: var(--schulio-link); }

/* ===== Einheitliche Table-Toolbar =================================
   Eine Toolbar pro Liste: Suchfeld | Sort | Filter-Toggle | Apply.
   Filter-Felder leben in einem ausklappbaren Panel darunter; angewandte
   Filter erscheinen als Chips mit X.
*/
.table-toolbar-form {
    margin: 1rem 0;
}

/* Filter-Panel: ausklappbar unter der Toolbar */
.table-filter-panel {
    display: none;
    background: #fff;
    border: 1px solid #e2e8f0; border-top: none;
    border-radius: 0 0 10px 10px;
    margin-top: -1px;
    padding: 1rem;
}
.table-filter-panel.open { display: block; }
.table-filter-panel .form-grid { margin: 0; }

/* Server-side Pagination footer fuer Admin-Listen. */
.pagination {
    display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
    padding: .75rem 0 0;
    border-top: 1px solid #e2e8f0;
    margin-top: .5rem;
    font-size: .9rem;
}
.pagination.empty { justify-content: center; border-top: none; padding-top: 1.5rem; }
.pagination-summary { white-space: nowrap; }
.pagination-controls { display: flex; align-items: center; gap: .5rem; }
.pagination-pages { white-space: nowrap; min-width: 100px; text-align: center; color: #475569; }
.pagination-size { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.pagination .btn.disabled { pointer-events: none; opacity: .4; }

/* Banner auf der Teilnehmen-Page (Mode 3): bestehende Anmeldungen der
   eigenen Kinder zum Weiter-Ausfuellen. */
.continue-existing {
    background: color-mix(in srgb, var(--schulio-primary) 8%, white);
    border-left: 3px solid var(--schulio-primary);
    border-radius: 0 6px 6px 0;
    padding: .65rem .9rem;
    margin: 0 0 1rem;
    font-size: .92rem;
}
.continue-existing strong { display: block; margin-bottom: .45rem; }
.continue-existing-list { display: flex; flex-wrap: wrap; gap: .4rem; }

/* Suggested-process cards on /eltern/anmeldungen — only shown on platform root */
.suggestion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: .5rem;
}
.suggestion-card {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    text-decoration: none;
    color: inherit;
    transition: border-color .12s, transform .12s, box-shadow .12s;
}
.suggestion-card:hover {
    border-color: var(--schulio-link);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .06);
}
.suggestion-card-meta {
    display: flex; gap: .5rem; align-items: center;
    font-size: .82rem; margin-bottom: .35rem;
}
.suggestion-card h3 { margin: 0 0 .35rem; font-size: 1rem; }
.suggestion-card-deadline { margin: .35rem 0; font-size: .85rem; }
.suggestion-card-cta {
    display: inline-block;
    margin-top: .5rem;
    font-size: .9rem; font-weight: 500;
    color: var(--schulio-link);
}

/* Homepage banner that nudges the user toward unfinished registrations. */
.user-activity-banner {
    display: flex; align-items: center; gap: .85rem;
    padding: .75rem 1rem;
    margin: 0 0 1.25rem;
    background: color-mix(in srgb, var(--schulio-accent) 16%, white);
    border-left: 4px solid var(--schulio-accent);
    border-radius: 0 8px 8px 0;
}
.user-activity-banner .icon { width: 22px; height: 22px; color: #92400e; flex-shrink: 0; }
.user-activity-banner > div { flex: 1; }
.user-activity-banner strong { color: #111827; }
.user-activity-banner .btn { flex-shrink: 0; }

/* Transparente Gruppe im Teilnehmen-Formular: kein Rahmen, kein margin,
   nur logischer Block fuer gemeinsames Conditional-Show. */
.form-group.form-group-transparent {
    border: none; padding: 0; margin: 0;
    background: transparent;
}

/* === Tenant-Picker ============================================= *
 * Ersetzt grosse vorbefuellte <select>-Dropdowns durch einen Trigger
 * + Dialog mit Such-Eingabe und seitenweisem Nachladen. Verwendet in
 * Listen-Toolbars (Schools/Processes/Students Index) und bald auch
 * in Create/Edit-Formularen.
 * ================================================================ */
.tenant-picker {
    display: inline-block;
    position: relative;
    min-width: 12rem;
    width: 100%;            /* full column width im form-grid Kontext */
    box-sizing: border-box;
}

/* 2FA: Wiederherstellungs-Codes als Raster von Code-Chips */
.recovery-codes {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: .4rem; margin: 1rem 0; max-width: 32rem;
}
.recovery-codes code {
    display: block; text-align: center; padding: .4rem .5rem;
    background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .05em;
}
.authenticator-steps { padding-left: 1.2rem; }
.authenticator-steps > li { margin-bottom: 1rem; }
.authenticator-steps kbd {
    background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 6px;
    padding: .25rem .5rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .08em; user-select: all;
}

/* Einheitlicher Zurueck-Button in der Breadcrumb-Leiste (per JS injiziert) */
.breadcrumb-back {
    display: inline-flex; align-items: center; gap: .2rem;
    margin-right: .6rem; padding: .12rem .55rem;
    font-size: .85rem; line-height: 1.4; cursor: pointer;
    background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 6px; color: #334155;
}
.breadcrumb-back:hover { background: #e2e8f0; }

/* ===== WYSIWYG-Tabellen (Phase 3) ===== */
/* Per-Klasse-Styling, unabhaengig vom Container (Editor UND oeffentliche Ansicht),
   damit Rahmen/Zellfarben ueberall gleich aussehen. */
table.wysiwyg-table { border-collapse: collapse; width: 100%; margin: .5rem 0; }
table.wysiwyg-table td, table.wysiwyg-table th {
    border: 1px solid #cbd5e1; padding: .35rem .5rem; vertical-align: top; word-wrap: break-word;
}
table.wysiwyg-table th { background: #f1f5f9; font-weight: 600; text-align: left; }
/* Rahmen-Toggle (schwebende Toolbar) */
table.wysiwyg-table.no-border,
table.wysiwyg-table.no-border td,
table.wysiwyg-table.no-border th { border: none; }

/* =================================================================
 * DESIGN-REFRESH 2026-10: Panels, Leerzustaende, Status (die Administration hat
 * ihr eigenes Design auf MatUi: wwwroot/css/admin.css)
 * ================================================================= */

/* Seitenkopf: Titel links, Aktionen rechts; Untertitel dezent. */
.page-header { align-items: flex-end; margin-bottom: 1.4rem; }
.page-header p.muted { margin: .3rem 0 0; }
.page-header .actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Panel = Karte mit Kopfzeile, fuer Dashboard-Listen und Detailseiten. */
.panel {
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    box-shadow: var(--ui-shadow-sm);
    margin-bottom: 1.25rem;
    min-width: 0;
}

.panel .data-table { border: none; border-radius: 0; box-shadow: none; }
.panel .data-table th:first-child, .panel .data-table td:first-child { padding-left: 1.2rem; }
.panel .data-table th:last-child, .panel .data-table td:last-child { padding-right: 1.2rem; }

/* Leerzustand: freundlicher Hinweis statt leerer Tabelle. */
.empty-state { text-align: center; padding: 2.25rem 1.5rem; color: var(--ui-muted); }
.empty-state > .icon { width: 2.2rem; height: 2.2rem; color: var(--ui-faint); margin-bottom: .5rem; }
.empty-state h3 { color: var(--ui-text); margin: 0 0 .3rem; font-size: 1rem; }
.empty-state p { margin: 0 auto; max-width: 32rem; font-size: .9rem; }
.empty-state .actions { justify-content: center; }

/* Status-Pillen fuer Anmeldungen (einheitlich in Admin- und Eltern-Ansichten). */
.pill { white-space: nowrap; }

/* --- Anmeldungs-Verwaltung: Status-Reiter, Filterleiste, Sammelaktionen --- */

.data-table .col-check { width: 2.5rem; padding-right: 0; }
.data-table tr.is-selected { background: color-mix(in srgb, var(--schulio-action) 6%, white); }

/* --- Anmeldungs-Detail ------------------------------------------------ */

.warn-text { color: var(--ui-warning) !important; margin: .1rem 0 .4rem; font-size: .82rem; }

.callout {
    padding: .85rem 1.1rem; border-radius: var(--ui-radius); margin-bottom: 1.25rem;
    border: 1px solid; font-size: .93rem;
}
.callout p { margin: .25rem 0 0; white-space: pre-line; }
.callout-info    { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.callout-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.callout-danger  { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.callout-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* Druckansicht: nur die Daten, ohne Navigation. */
@media print {
    .topbar, .footer, .breadcrumb, .page-header .actions, .flash { display: none !important; }

    .panel { box-shadow: none; break-inside: avoid; }
}

/* Bootstrap-Varianten aus der Identity-UI auf das Schulio-Button-System mappen. */
.btn.btn-danger { background: var(--ui-danger); border-color: var(--ui-danger); color: #fff; }
.btn.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.btn.btn-link { background: transparent; border-color: transparent; color: var(--schulio-link); box-shadow: none; }

/* --- Editor-Layout (Inhaltsseiten u.a.): Kopfleiste + Arbeitsflaeche + Einstellungsspalte --- */

kbd {
    display: inline-block; padding: .05rem .4rem; border: 1px solid var(--ui-border-strong); border-bottom-width: 2px;
    border-radius: 5px; background: var(--ui-surface); font: 600 .75rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ui-text-2);
}

.editor-side .help, .panel .help { color: var(--ui-muted); font-size: .8rem; display: block; margin: .35rem 0 0; }

/* --- Eltern: "Meine Anmeldungen" als Statuskarten, Formular-Abschluss --- */
.reg-cards { display: flex; flex-direction: column; gap: .85rem; margin-bottom: 1.5rem; }
.reg-card {
    display: flex; gap: 1.25rem; align-items: flex-start; justify-content: space-between;
    padding: 1.1rem 1.25rem; background: var(--ui-surface);
    border: 1px solid var(--ui-border); border-left: 4px solid var(--ui-border-strong);
    border-radius: var(--ui-radius-lg); box-shadow: var(--ui-shadow-sm);
}

.reg-card-main { min-width: 0; flex: 1; }
.reg-card-top { display: flex; align-items: center; gap: .6rem; font-size: .85rem; margin-bottom: .35rem; flex-wrap: wrap; }
.reg-card h3 { margin: 0 0 .25rem; font-size: 1.05rem; color: var(--ui-text); }
.reg-card h3 .muted { font-weight: 500; }
.reg-card-explain { margin: 0 0 .5rem; color: var(--ui-text-2); font-size: .92rem; }
.reg-card-meta { margin: 0; font-size: .8rem; }
.reg-card .callout { margin: .25rem 0 .6rem; }
.reg-card-actions { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; flex-shrink: 0; }
@media (max-width: 640px) {
    .reg-card { flex-direction: column; }
    .reg-card-actions { flex-direction: row; align-items: center; width: 100%; }
}
.status-callout { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.status-callout p { flex-basis: 100%; margin: .2rem 0 0; }
.form-submit-bar {
    margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px solid var(--ui-border);
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.form-submit-bar > p { margin: 0; font-size: .85rem; max-width: 34rem; }
.form-submit-bar .actions { margin: 0; }

/* Gesperrte (aus dem Profil uebernommene) Felder klar als nicht editierbar zeigen. */
.form-row input:disabled, .form-row select:disabled, .form-row textarea:disabled {
    background-color: var(--ui-surface-2); color: var(--ui-text-2); border-color: var(--ui-border); cursor: not-allowed;
}

/* Fehlerseite (404/403/500) */
.error-page { max-width: 34rem; margin: 3rem auto; text-align: center; }
.error-code { font-size: 4.5rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: color-mix(in srgb, var(--schulio-action) 25%, #e2e8f0); margin-bottom: .75rem; }
.error-page h1 { margin-bottom: .5rem; }
.error-page .actions { justify-content: center; margin-top: 1.5rem; }
.error-ref { font-size: .8rem; }

/* Eltern-Startseite */
.parent-cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 1.5rem; }
.parent-cards .card h3 { color: var(--ui-text); }
a.reg-card-link { color: inherit; align-items: center; }
a.reg-card-link:hover { text-decoration: none; border-color: color-mix(in srgb, var(--schulio-action) 40%, var(--ui-border)); box-shadow: var(--ui-shadow-lg); }
.reg-card-chevron { color: var(--ui-faint); width: 1.2rem; height: 1.2rem; flex-shrink: 0; }
@media (max-width: 720px) {

    .page-header .actions { width: 100%; }
}


/* --- Schulgruppen-Startseite: Kopfbereich, Filter, Schul-Kacheln --------------------------- */
.group-hero {
    display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 1.5rem; align-items: stretch;
    margin: 0 0 2.25rem;
}
.group-hero-main {
    padding: 1.75rem 2rem; border-radius: var(--ui-radius-lg);
    background: linear-gradient(135deg, color-mix(in srgb, var(--schulio-primary) 16%, white), var(--ui-surface) 70%);
    border: 1px solid color-mix(in srgb, var(--schulio-primary) 28%, var(--ui-border));
}
.group-hero-logo { display: block; max-width: min(420px, 100%); max-height: 120px; width: auto; height: auto; margin: 0 0 1.1rem; mix-blend-mode: multiply; }
.group-hero h1 { margin: 0 0 .6rem; font-size: 2rem; letter-spacing: -.02em; }
.group-hero-text { margin: 0; color: var(--ui-text-2); font-size: 1.02rem; max-width: 62ch; }
.group-hero-text p:last-child { margin-bottom: 0; }
.group-hero-facts {
    display: flex; flex-direction: column; gap: .75rem; padding: 1.4rem;
    background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: var(--ui-radius-lg); box-shadow: var(--ui-shadow);
}
.group-fact { display: flex; align-items: baseline; gap: .6rem; padding-bottom: .7rem; border-bottom: 1px solid var(--ui-border); }
.group-fact strong { font-size: 1.9rem; line-height: 1; color: var(--ui-text); font-variant-numeric: tabular-nums; }
.group-fact span { color: var(--ui-muted); font-size: .92rem; }
.group-fact.is-open strong { color: var(--ui-success); }
.group-hero-facts .btn { margin-top: auto; width: 100%; }
.group-hero-login { text-align: center; font-size: .88rem; }

.group-toolbar { display: flex; align-items: center; gap: .75rem 1.25rem; flex-wrap: wrap; margin: 0 0 1rem; }
.group-toolbar h2 { margin: 0; margin-right: auto; font-size: 1.3rem; }
.group-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.group-chip {
    display: inline-flex; align-items: center; gap: .4rem; min-height: 2.25rem; padding: .3rem .85rem;
    border: 1px solid var(--ui-border-strong); border-radius: 999px; background: var(--ui-surface);
    font: inherit; font-size: .88rem; color: var(--ui-text-2); cursor: pointer;
}
.group-chip span { color: var(--ui-faint); font-variant-numeric: tabular-nums; }
.group-chip:hover { border-color: var(--schulio-action); }
.group-chip.is-active { background: var(--schulio-action); border-color: var(--schulio-action); color: var(--schulio-on-action); }
.group-chip.is-active span { color: inherit; opacity: .75; }
.group-open-only { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; color: var(--ui-text-2); cursor: pointer; }

.group-schools { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.1rem; margin: 0 0 2.5rem; }
.group-school {
    display: flex; flex-direction: column; overflow: hidden; color: inherit; text-decoration: none;
    background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: var(--ui-radius-lg); box-shadow: var(--ui-shadow-sm);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.group-school:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--gs-accent); box-shadow: 0 10px 26px -12px rgba(15, 23, 42, .28); }
.group-school:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gs-accent) 45%, transparent); }
.group-school[hidden] { display: none; }
.group-school-head {
    display: flex; align-items: center; justify-content: center; height: 132px; padding: 1rem 1.25rem;
    background: var(--gs-head); border-bottom: 3px solid var(--gs-accent);
}
.group-school-head img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.group-school-head .icon { width: 2.6rem; height: 2.6rem; color: var(--gs-accent-text); }
.group-school-body { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.15rem .4rem; flex: 1; }
.group-school-name { font-weight: 650; font-size: 1.06rem; line-height: 1.3; color: var(--ui-text); }
.group-school-type { font-size: .8rem; font-weight: 600; letter-spacing: .02em; color: var(--gs-accent-text); }
.group-school-addr { font-size: .86rem; color: var(--ui-muted); }
.group-school-open, .group-school-closed, .group-school-next { display: inline-flex; align-items: center; gap: .35rem; margin-top: .35rem; font-size: .84rem; align-self: flex-start; }
.group-school-open {
    padding: .2rem .6rem; border-radius: 999px; font-weight: 600;
    color: #166534; background: #dcfce7; border: 1px solid #bbf7d0;
}
.group-school-open .icon { width: .95em; height: .95em; }
.group-school-closed { color: var(--ui-faint); }
.group-school-next { padding: .2rem .6rem; border-radius: 999px; font-weight: 600; color: #1e40af; background: #dbeafe; border: 1px solid #bfdbfe; }
.group-school-next .icon { width: .95em; height: .95em; }
.group-school-foot { padding: .6rem 1.15rem 1rem; }
.group-school-cta { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; font-size: .92rem; color: var(--gs-accent-text); }
.group-school-cta .icon { width: 1em; height: 1em; transition: transform .15s; }
.group-school:hover .group-school-cta .icon { transform: translateX(3px); }
.group-empty { margin: -1.5rem 0 2.5rem; }

@media (max-width: 860px) {
    .group-hero { grid-template-columns: 1fr; }
    .group-hero-main { padding: 1.35rem 1.25rem; }
    .group-hero h1 { font-size: 1.6rem; }
    .group-hero-facts { flex-direction: row; flex-wrap: wrap; align-items: center; }
    .group-fact { border-bottom: 0; padding-bottom: 0; margin-right: 1rem; }
    .group-hero-facts .btn { margin-top: 0; width: auto; flex: 1 1 100%; }
}

/* ==================================================================
   PWA / Mobile: Safe-Area + Touch-Optimierung
   (installierter Modus, Notch, Home-Indikator). viewport-fit=cover im
   _Layout macht env(safe-area-inset-*) wirksam; bei dunkler Header-Farbe
   laeuft die Topbar unter die iOS-Statusleiste (black-translucent).
   Zoomen bleibt erlaubt (kein maximum-scale) — nur ungewolltes Zoomen
   (Doppeltipp, Fokus-Zoom auf kleine Eingabefelder) wird vermieden.
   ================================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, input, select, textarea, label, summary, [role="button"] { touch-action: manipulation; }
a, button, summary, [role="button"] { -webkit-tap-highlight-color: rgba(15, 23, 42, .08); }

.topbar {
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}
.footer {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: calc(1.6rem + env(safe-area-inset-bottom, 0px));
}
main.container {
    padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
}

@media (max-width: 720px) {
    main.container {
        padding-left: max(1rem, env(safe-area-inset-left, 0px));
        padding-right: max(1rem, env(safe-area-inset-right, 0px));
    }
    /* Vollbild-Menue beginnt unter Header + Statusleiste, endet ueber dem Home-Indikator. */
    .topnav {
        top: calc(72px + env(safe-area-inset-top, 0px));
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    }
}

/* iOS zoomt beim Fokus in Felder mit Schrift < 16px — auf Touch-Geraeten mindestens 16px. */
@media (pointer: coarse) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
    select,
    textarea { font-size: max(16px, 1em); }
}

/* ===== Listen-Toolbar im Eltern-Bereich (_PublicListToolbar) =====
   Suchfeld links, Sortierung rechts; darunter die Liste, dann die Pagination,
   dann die Aktionen (linksbuendig, positiv vor negativ: .list-actions). */
.list-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem;
    margin: 1rem 0;
}
.list-toolbar-search { position: relative; flex: 1 1 16rem; max-width: 26rem; }
.list-toolbar-search .icon {
    position: absolute; left: .65rem; top: 50%; transform: translateY(-50%);
    width: 1rem; height: 1rem; color: #64748b; pointer-events: none;
}
.list-toolbar-search input[type=search] { width: 100%; padding-left: 2.1rem; box-sizing: border-box; }
.list-toolbar-spacer { flex: 1 1 auto; }
.list-toolbar-sort { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-weight: 400; }
.list-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1rem; }

/* ---- Aktuelles (oeffentlich) ---- */
.news-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; margin: 1rem 0 1.5rem; }
.news-card {
    display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; background: var(--ui-surface, #fff);
    border: 1px solid var(--ui-border, #e5e7eb); color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s;
}
.news-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); transform: translateY(-2px); }
.news-card__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.news-card__body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .4rem; }
.news-card__date { font-size: .8rem; color: #6b7280; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.news-card__title { margin: 0; font-size: 1.1rem; line-height: 1.3; color: var(--schulio-link, inherit); }
.news-card__teaser { margin: 0; color: #4b5563; font-size: .92rem; line-height: 1.5; }
.landing-news { margin: 2rem 0; }
.landing-news__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.landing-news__head h2 { margin: 0; }
.news-pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1rem 0 2rem; }
.news-article__img { width: 100%; max-height: 460px; object-fit: cover; border-radius: 12px; margin: .5rem 0 1rem; }
.news-article__lead { font-size: 1.15rem; color: #374151; line-height: 1.55; }

/* ---- Mehrseitige Formulare (form-stepper.js) ---- */
.form-stepper { list-style: none; display: flex; gap: .5rem; padding: 0; margin: 1.5rem 0 1rem; counter-reset: none; overflow-x: auto; }
.form-stepper li { flex: 1 1 0; min-width: 8rem; }
.form-stepper button {
    width: 100%; display: flex; align-items: center; gap: .55rem; padding: .55rem .7rem; border: 0; border-top: 3px solid var(--ui-border, #e5e7eb);
    background: none; text-align: left; font: inherit; color: #6b7280; cursor: pointer;
}
.form-stepper button:disabled { cursor: default; opacity: .7; }
.form-stepper__num {
    flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center;
    font-weight: 700; font-size: .85rem; background: var(--ui-border, #e5e7eb); color: #374151;
}
.form-stepper__title { font-size: .88rem; line-height: 1.25; }
.form-stepper li.is-done button { border-top-color: var(--schulio-action, #2563eb); }
.form-stepper li.is-done .form-stepper__num { background: var(--schulio-action, #2563eb); color: #fff; }
.form-stepper li.is-active button { border-top-color: var(--schulio-action, #2563eb); color: #111827; font-weight: 600; }
.form-stepper li.is-active .form-stepper__num { background: var(--schulio-action, #2563eb); color: #fff; }
.form-step-pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1.5rem 0 .5rem; }
.form-step-pager [data-step-next] { margin-left: auto; }
.form-step-pager [data-step-info] { font-size: .88rem; }
.form-fields-grid > .form-step-break:first-child { margin-top: 0; }
.form-row.is-missing input, .form-row.is-missing select, .form-row.is-missing textarea { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }
.form-row.is-missing::after { content: "Bitte ausfüllen."; color: #dc2626; font-size: .82rem; }
@media (max-width: 640px) { .form-stepper__title { display: none; } .form-stepper li { min-width: 0; } }
.form-step[hidden], .form-step-pager [hidden], .form-submit-bar [hidden] { display: none !important; }

/* ---- Wer hat Zugriff? (Person bearbeiten) ---- */
.access-card { margin-top: 1.5rem; }
.access-card h2 { margin-top: 0; }
.access-list { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: .6rem; }
.access-list li { display: flex; align-items: center; gap: .75rem; padding: .65rem .8rem; border: 1px solid var(--ui-border, #e5e7eb); border-radius: 10px; }
.access-list li > span { flex: 1; }
.access-list li .pill { margin-left: .4rem; }
.access-pending { background: var(--ui-surface-2, #f8fafc); }
.invite-form { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.invite-form .form-row { flex: 1 1 260px; margin: 0; }
.invite-link { display: flex; gap: .5rem; align-items: center; margin-top: .4rem; flex-wrap: wrap; }
.invite-link code { overflow-wrap: anywhere; }

/* ==================================================================
   Schulkatalog (/schulen): Filter links, Karten rechts (Karten-Stil wie
   die Schulen der Gruppen-Startseite).
   ================================================================== */
.catalog-head { margin: 1.5rem 0 1.25rem; }
.catalog-head h1 { margin: 0; }
.catalog-head p { margin: .3rem 0 0; }
.catalog { display: grid; grid-template-columns: 17rem 1fr; gap: 1.75rem; align-items: start; margin-bottom: 3rem; }
.catalog-filters { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 1rem; }
.catalog-filter { display: flex; flex-direction: column; gap: .35rem; margin: 0; padding: .9rem 1rem; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-lg); background: var(--ui-surface); }
.catalog-filter > label:first-child, .catalog-filter legend { font-weight: 650; font-size: .92rem; }
.catalog-filter legend { padding: 0 .3rem; margin-left: -.3rem; }
.catalog-filter input:not([type=checkbox]), .catalog-filter select { width: 100%; }
.catalog-sub { font-size: .85rem; color: var(--ui-muted); margin-top: .3rem; }
.catalog-check { display: flex; align-items: center; gap: .45rem; font-size: .9rem; cursor: pointer; }
.catalog-count { margin-left: auto; font-size: .78rem; color: var(--ui-faint); }
.catalog-locate { align-self: flex-start; }
.catalog-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.catalog-summary { margin: 0 0 1rem; color: var(--ui-muted); }
.catalog-empty { padding: 1.5rem; border: 1px dashed var(--ui-border-strong); border-radius: var(--ui-radius-lg); color: var(--ui-muted); }
.catalog-cards { margin-bottom: 1rem; }
.catalog-card .group-school-head { position: relative; }
.catalog-distance {
    position: absolute; top: .6rem; right: .6rem; padding: .15rem .55rem; border-radius: 999px;
    font-size: .8rem; font-weight: 650; background: rgba(255,255,255,.92); color: #0f172a; box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.catalog-summary-text { font-size: .88rem; color: var(--ui-text); margin-top: .2rem; }
.catalog-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.catalog-chip { font-size: .75rem; padding: .12rem .5rem; border-radius: 999px; background: var(--ui-surface-2); border: 1px solid var(--ui-border); color: var(--ui-muted); }
.catalog-chip--more { font-weight: 600; }
.catalog-attribution { font-size: .8rem; }
@media (max-width: 860px) {
    .catalog { grid-template-columns: 1fr; }
    .catalog-filters { position: static; }
}

/* ==================================================================
   Plattform-Startseite (ohne Mandant): Suche, Kennzahlen, Schulen,
   Schulformen, „So funktioniert's“. Karten = .group-school (_SchoolCard).
   ================================================================== */
.home-hero {
    display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 2rem; align-items: center;
    margin: 1.5rem 0 2.5rem; padding: 2.25rem 2.5rem;
    border: 1px solid color-mix(in srgb, var(--schulio-primary) 14%, var(--ui-border));
    border-radius: 20px;
    background:
        radial-gradient(circle at 100% 0, color-mix(in srgb, var(--schulio-accent, var(--schulio-primary)) 16%, transparent) 0, transparent 45%),
        linear-gradient(135deg, color-mix(in srgb, var(--schulio-primary) 9%, white), #fff 70%);
}
.home-hero__logo { width: 190px; height: auto; display: block; margin-bottom: 1.1rem; }
.home-hero h1 { margin: 0 0 .6rem; font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.15; letter-spacing: -.01em; }
.home-hero__lead { margin: 0 0 1.4rem; max-width: 46rem; color: var(--ui-text-2); font-size: 1.05rem; line-height: 1.55; }
.home-search {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; max-width: 40rem;
    padding: .4rem .4rem .4rem 1rem; background: #fff;
    border: 1px solid var(--ui-border-strong); border-radius: 999px; box-shadow: var(--ui-shadow-lg);
}
.home-search:focus-within { border-color: var(--schulio-action); box-shadow: var(--ui-shadow-lg), var(--ui-ring); }
.home-search > .icon { color: var(--ui-faint); flex: none; }
.home-search > .ac { flex: 1 1 12rem; min-width: 0; }
.home-search input[type=search] {
    flex: 1 1 12rem; min-width: 0; border: 0; outline: 0; background: transparent; box-shadow: none;
    font-size: 1.02rem; padding: .55rem .25rem;
}
.home-search .btn { margin: 0; border-radius: 999px; }
.home-facts { display: flex; flex-direction: column; gap: .75rem; }
.home-fact {
    display: flex; align-items: baseline; gap: .6rem; padding: .85rem 1rem;
    background: #fff; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-lg);
    color: inherit; text-decoration: none; box-shadow: var(--ui-shadow-sm);
}
a.home-fact:hover { border-color: var(--schulio-action); }
.home-fact strong { font-size: 1.9rem; line-height: 1; color: var(--ui-text); font-variant-numeric: tabular-nums; }
.home-fact span { color: var(--ui-muted); font-size: .92rem; }
.home-fact.is-open strong { color: var(--ui-success); }

.home-section { margin: 0 0 2.5rem; }
.home-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 0 0 1rem; }
.home-section__head h2 { margin: 0; font-size: 1.35rem; }
.home-schools { margin-bottom: 0; }

.home-forms { display: flex; flex-wrap: wrap; gap: .5rem; }
.home-form {
    display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1rem;
    border: 1px solid var(--ui-border-strong); border-radius: 999px; background: #fff;
    color: var(--ui-text-2); text-decoration: none; font-size: .95rem;
}
.home-form span { color: var(--ui-faint); font-variant-numeric: tabular-nums; font-size: .85rem; }
.home-form:hover { border-color: var(--schulio-action); color: var(--ui-text); }

.home-steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; }
.home-steps li {
    counter-increment: step; position: relative; display: flex; flex-direction: column; gap: .35rem;
    padding: 1.2rem 1.2rem 1.25rem; background: #fff; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-lg);
}
.home-steps li::before {
    content: counter(step); position: absolute; top: 1rem; right: 1.1rem;
    font-size: 2rem; font-weight: 700; line-height: 1; color: var(--ui-border-strong);
}
.home-steps .icon {
    width: 2.4rem; height: 2.4rem; padding: .55rem; border-radius: 12px;
    background: color-mix(in srgb, var(--schulio-action) 12%, white); color: var(--schulio-action); margin-bottom: .35rem;
}
.home-steps strong { font-size: 1.05rem; color: var(--ui-text); }
.home-steps span { color: var(--ui-muted); font-size: .93rem; line-height: 1.5; }
.home-cta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1.25rem 0 0; }
.home-cta .btn { margin: 0; }

@media (max-width: 860px) {
    .home-hero { grid-template-columns: 1fr; padding: 1.5rem 1.25rem; gap: 1.25rem; margin-top: .75rem; }
    .home-facts { flex-direction: row; flex-wrap: wrap; }
    .home-facts { flex-wrap: nowrap; gap: .5rem; }
    .home-fact { flex: 1 1 0; min-width: 0; flex-direction: column; gap: .25rem; padding: .7rem .75rem; }
    .home-fact strong { font-size: 1.5rem; }
    .home-fact span { font-size: .8rem; line-height: 1.25; }
    .home-steps { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .home-search { border-radius: var(--ui-radius-lg); padding: .5rem; }
    .home-search > .icon { display: none; }
    .home-search > .ac { flex-basis: 100%; position: relative; } /* Liste direkt unter dem Feld, nicht unter den Knoepfen */
    .home-search input[type=search] { flex-basis: 100%; padding: .55rem .6rem; border: 1px solid var(--ui-border); border-radius: var(--ui-radius); }
    .home-search .btn { flex: 1 1 auto; border-radius: var(--ui-radius); }
}

/* Vorschlagsliste fuer das Suchfeld (Schulgruppen, Schulen, Orte) — ersetzt das Browser-datalist. */
.ac { position: relative; }
.ac input[type=search] { width: 100%; }
.ac-list {
    position: absolute; z-index: 40; /* unter dem sticky Header (z=50) */ top: calc(100% + .45rem); left: 0; min-width: 100%; width: max(100%, 22rem); max-width: calc(100vw - 2rem);
    margin: 0; padding: .35rem; list-style: none; background: var(--ui-surface);
    border: 1px solid var(--ui-border); border-radius: var(--ui-radius-lg); box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
    max-height: min(26rem, 70vh); overflow-y: auto;
}
.home-search { position: relative; }
.home-search > .ac { position: static; }
.home-search .ac-list { left: 0; right: 0; width: auto; }
.ac-head { padding: .45rem .6rem .25rem; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ui-faint); }
.ac-item { display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem; border-radius: var(--ui-radius); cursor: pointer; }
.ac-item.is-active, .ac-item:hover { background: #f1f5f9; }
.ac-item__ic {
    flex: none; width: 2.1rem; height: 2.1rem; display: grid; place-items: center; overflow: hidden;
    border-radius: .55rem; background: #f1f5f9; color: var(--ui-muted); border: 1px solid var(--ui-border);
}
.ac-item__ic img { width: 100%; height: 100%; object-fit: contain; padding: .2rem; background: #fff; }
.ac-item--group .ac-item__ic { background: var(--schulio-action, #2d5fb8); color: #fff; border-color: transparent; }
.ac-item__txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ac-item__label { font-weight: 600; color: var(--ui-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-item__label mark { background: none; color: var(--schulio-action, #2d5fb8); }
.ac-item__detail { font-size: .8rem; color: var(--ui-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-item__go { margin-left: auto; flex: none; color: var(--ui-faint); }

/* Kontakt außerhalb der Anmeldezeit */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-intro { white-space: pre-line; }
.contact-offer {
    display: flex; gap: 1rem; align-items: flex-start; margin: 1.25rem 0; padding: 1rem 1.25rem;
    border: 1px solid var(--ui-border, #e2e8f0); border-radius: 12px; background: var(--ui-surface-2, #f8fafc);
}
.contact-offer > .icon { width: 1.6rem; height: 1.6rem; flex: none; margin-top: .15rem; color: var(--brand-accent, #2d5fb8); }
.contact-offer h2 { margin: 0 0 .25rem; font-size: 1.1rem; }
.contact-offer p { margin: 0 0 .75rem; }
