/* Design "Edel" - Seitengruppe superadmin. Nur aktiv bei DESIGN_STIL == edel (eingebunden in base.html).
   Tokens und Bausteine: design-edel.css, Regeln: SPEZ.md. Jede Regel beginnt mit der Body-Klasse (.seite-sa-*).
   Leitidee: Super-Admin-Seiten sind Arbeitsseiten. Bilder nur auf dem Dashboard (Kennzahlen) und als Kursbild
   (7:5 wie die App liefert) in "Kurse verwalten" / "Kurs bearbeiten". Sonst: ruhige Kacheln, Haarlinien, gleiche Bedienung.

   Body-Klassen (je Template eine):
   super_admin_dashboard -> seite-sa-start        manage_courses -> seite-sa-kurse      edit_course -> seite-sa-kurs-form
   manage_companies      -> seite-sa-firmen       manage_users   -> seite-sa-benutzer   company_settings -> seite-sa-firma
   show_demo_accounts    -> seite-sa-demo-konten  manage_course_chapters -> seite-sa-kapitel
   manage_employee_categories -> seite-sa-kategorien   manage_company_videos -> seite-sa-videos
   admin/sa_groups_index -> seite-sa-gruppen      admin/quiz_management -> seite-sa-tests   admin/manage_quiz -> seite-sa-test
   admin/create_course_test + admin/create_chapter_test -> seite-sa-testform               admin/import_users -> seite-sa-import */


/* =====================================================================================================
   1  Dashboard (super_admin_dashboard)
   ===================================================================================================== */

/* Kennzahl-Bilder ueber die Haken der Basis; Siegel sitzt auf der Bildkante.
   Feste Zuordnung Bild -> Bedeutung (Nachbesserung 19.11.): Firmen = Gebaeudeeingang mit Wachmann (anmeldung),
   Benutzer = Unterweisung (mitarbeiter), Kurse = Tablet (kurse), Abgeschlossen = Zertifikatsmappe (zertifikat).
   Das Flurbild mit Uhr (ausstehend) bleibt "offen/faellig" vorbehalten; keine zwei Tablet-Motive nebeneinander.
   anmeldung ist hochkant (4:5): Fokus 50% 36% zeigt Muetze bis Huefte vor dem Glaseingang (2:1 und Handy 16:9). */
.seite-sa-start { --we-kennbild-anzeige: block; --we-siegel-oben: -22px; --we-siegel-oben-handy: -18px; }
.seite-sa-start .card.border-left-primary { --we-bild: url('/static/img/edel/anmeldung.webp'); --we-bild-fokus: 50% 36%; }
.seite-sa-start .card.border-left-success { --we-bild: url('/static/img/edel/mitarbeiter.webp'); --we-bild-fokus: 50% 22%; }
.seite-sa-start .card.border-left-info    { --we-bild: url('/static/img/edel/kurse.webp'); --we-bild-fokus: 50% 60%; }
.seite-sa-start .card.border-left-warning { --we-bild: url('/static/img/edel/zertifikat.webp'); --we-bild-fokus: 50% 55%; }

/* Schnellzugriff: ruhige Kachel-Links, Symbol als kleines Siegel links, gleiche Reihenfolge und Ziele.
   Nur Optik: Farben der Umriss-Knoepfe (rot/gruen/gelb) trugen keine Bedeutung -> einheitlich Tinte.
   "Demo-Firma erstellen" bleibt als einzige gefuellte Kachel (Primaeraktion). */
.seite-sa-start .card-body > .row:has(> .col-md-3 > a.btn.w-100) { --bs-gutter-x: .75rem; row-gap: .75rem; }
.seite-sa-start .card-body > .row > .col-md-3:has(> a.btn.w-100) { display: flex; margin-bottom: 0 !important; }
html body.seite-sa-start .card-body > .row > .col-md-3 > a.btn.w-100 {
    position: relative; display: flex; align-items: center; justify-content: flex-start; text-align: left;
    min-height: 3.75rem; padding: .7rem .9rem .7rem 3.4rem; white-space: normal; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto;
    font-size: .9375rem; font-weight: 600; line-height: 1.3; border-radius: var(--we-rund);
    background: var(--we-flaeche) !important; color: var(--we-tinte) !important; border: 1px solid var(--we-linie) !important;
}
html body.seite-sa-start .card-body > .row > .col-md-3 > a.btn.w-100 > i {
    position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); margin: 0 !important;
    width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; font-size: .8rem;
    color: var(--we-marke); background: var(--we-papier); border: 1px solid var(--we-linie-stark);
    transition: background-color var(--we-kurz), border-color var(--we-kurz);
}
html body.seite-sa-start .card-body > .row > .col-md-3 > a.btn.w-100:hover,
html body.seite-sa-start .card-body > .row > .col-md-3 > a.btn.w-100:focus-visible {
    border-color: var(--we-tinte) !important; background: var(--we-flaeche) !important; color: var(--we-tinte) !important;
}
html body.seite-sa-start .card-body > .row > .col-md-3 > a.btn.w-100:hover > i { background: var(--we-marke-zart); border-color: var(--we-marke); }
html body.seite-sa-start .card-body > .row > .col-md-3 > a.btn-primary.w-100 {
    background: var(--we-marke) !important; color: var(--we-hell) !important; border-color: var(--we-marke) !important;
}
html body.seite-sa-start .card-body > .row > .col-md-3 > a.btn-primary.w-100 > i {
    color: var(--we-hell); background: transparent; border-color: rgba(255, 254, 252, .45);
}
html body.seite-sa-start .card-body > .row > .col-md-3 > a.btn-primary.w-100:hover,
html body.seite-sa-start .card-body > .row > .col-md-3 > a.btn-primary.w-100:focus-visible {
    background: var(--we-marke) !important; color: var(--we-hell) !important; box-shadow: inset 0 0 0 999px rgba(0, 0, 0, .16);
}
html body.seite-sa-start .card-body > .row > .col-md-3 > a.btn-primary.w-100:hover > i { background: transparent; border-color: rgba(255, 254, 252, .7); }
/* Tablet und schmale Desktops: 2 Kacheln je Zeile (4 waeren zu schmal fuer die Beschriftung) */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .seite-sa-start .card-body > .row > .col-md-3:has(> a.btn.w-100) { flex: 0 0 50%; max-width: 50%; }
}
@media (max-width: 767.98px) {
    /* mit Bild sitzt das Siegel auf der Bildkante: kein Extra-Platz oben noetig (wie Firmen-Dashboard) */
    .seite-sa-start .row > div > .card[class*="border-left-"] .col.mr-2 { padding-top: .6rem; }
    .seite-sa-start .card-body > .row:has(> .col-md-3 > a.btn.w-100) { row-gap: .5rem; }
    html body.seite-sa-start .card-body > .row > .col-md-3 > a.btn.w-100 { min-height: 3.125rem; padding-top: .55rem; padding-bottom: .55rem; }
    html body.seite-sa-start .table td > .d-flex > img,
    html body.seite-sa-start .table td > .d-flex > div.bg-light { width: 4.5rem !important; margin-right: .7rem !important; }
}

/* Firmen | Neueste Kurse: ab 1200 px 5:7 statt 6:6, damit die Kurstabelle (Bild + Titel + Status) ohne
   Scrollen passt. Gleiche Reihenfolge, gleiche Seiten. */
@media (min-width: 1200px) {
    .seite-sa-start main > .row:has(> .col-lg-6) > .col-lg-6:first-child { flex: 0 0 41.6667%; max-width: 41.6667%; }
    .seite-sa-start main > .row:has(> .col-lg-6) > .col-lg-6:last-child { flex: 0 0 58.3333%; max-width: 58.3333%; }
}
/* Kursbild in "Neueste Kurse": 7:5 wie die App liefert (Inline-Groesse nur mit !important), ungefiltert */
html body.seite-sa-start .table td > .d-flex > img,
html body.seite-sa-start .table td > .d-flex > div.bg-light {
    flex: 0 0 auto; width: 5.25rem !important; height: auto !important; aspect-ratio: 7 / 5; object-fit: cover;
    border-radius: var(--we-rund-klein) !important; box-shadow: none !important; margin-right: .85rem !important;
    outline: 1px solid rgba(27, 31, 39, .08); outline-offset: -1px;
}
/* Kurstitel bewusst ohne text-wrap: balance - das setzte bei "Erste Hilfe – Auffrischung" den Gedankenstrich an den Zeilenanfang */
.seite-sa-start .table td > .d-flex > span { color: var(--we-tinte); font-weight: 600; line-height: 1.35; }

/* Firmen | Neueste Kurse: Namen nicht in drei Zeilen zerreissen (Zeilen wurden ~90 px hoch).
   Schmale Spalten (Domain/Status/Benutzer bzw. Typ/Status) ohne Umbruch und nur so breit wie ihr Inhalt,
   der Name bekommt den Rest, Firmennamen umbrechen ausgewogen (balance).
   Firma in "Neueste Kurse" ist Nebenangabe: 0,875 rem, ab 1440 px mind. 9,5 rem breit
   ("Demo Objektschutz" passt in eine Zeile, hoechstens zwei Zeilen). 11 rem wuerde bei 1440 px die Kurstabelle
   seitlich scrollen lassen (Titel-Spalte braucht Bild + "Roentgenbildauswertung"), darum bewusst schmaler.
   Unter 1440 px keine Mindestbreite, sonst scrollt die Tabelle mehr als vorher (gemessen 1200-1920 px). */
.seite-sa-start main > .row:has(> .col-lg-6) .table td { line-height: 1.35; }
.seite-sa-start main > .row:has(> .col-lg-6) > .col-lg-6:first-child .table :is(th, td):is(:nth-child(2), :nth-child(3), :nth-child(4)),
.seite-sa-start main > .row:has(> .col-lg-6) > .col-lg-6:last-child .table :is(th, td):is(:nth-child(2), :nth-child(4)) {
    width: 1%; white-space: nowrap;
}
.seite-sa-start main > .row:has(> .col-lg-6) > .col-lg-6:first-child .table td:first-child { text-wrap: balance; }
.seite-sa-start main > .row:has(> .col-lg-6) > .col-lg-6:last-child .table td:nth-child(3) {
    font-size: .875rem; color: var(--we-text); text-wrap: balance;
}
@media (min-width: 1440px) {
    .seite-sa-start main > .row:has(> .col-lg-6) > .col-lg-6:last-child .table :is(th, td):nth-child(3) { min-width: 9.5rem; }
}


/* =====================================================================================================
   2  Kurse verwalten (manage_courses): Kursbild-Vorschau 7:5, ruhige Werkzeugleiste
   ===================================================================================================== */
html body.seite-sa-kurse .table td > .d-flex > img,
html body.seite-sa-kurse .table td > .d-flex > div.bg-light {
    flex: 0 0 auto; width: 5.6rem !important; height: auto !important; aspect-ratio: 7 / 5; object-fit: cover;
    border-radius: var(--we-rund-klein) !important; box-shadow: none !important; margin-right: .85rem !important;
    outline: 1px solid rgba(27, 31, 39, .08); outline-offset: -1px;
}
.seite-sa-kurse .table td > .d-flex > div:last-child { min-width: 0; line-height: 1.4; }
.seite-sa-kurse .table td > .d-flex > div:last-child > strong { color: var(--we-tinte); font-weight: 600; }
.seite-sa-kurse .table > :not(caption) > * > * { padding-left: .6rem; padding-right: .6rem; }
.seite-sa-kurse .table td:nth-child(4) { white-space: nowrap; }
.seite-sa-kurse .table td:nth-child(3) { font-size: .9375rem; }
.seite-sa-kurse .table td .btn-group-sm > .btn { padding-left: .6rem; padding-right: .6rem; }
/* Werkzeugleiste im Kartenkopf: gleichmaessiger Abstand statt me-2, ruhige Umriss-Knoepfe (Farben trugen keine Bedeutung) */
.seite-sa-kurse .card-header > .d-flex { flex-wrap: wrap; gap: .75rem 1rem; }
.seite-sa-kurse .card-header > .d-flex > div:last-child { display: flex; flex-wrap: wrap; gap: .5rem; }
html body.seite-sa-kurse .card-header > .d-flex > div:last-child > .btn {
    margin-right: 0 !important; background: var(--we-flaeche); color: var(--we-tinte); border-color: var(--we-linie-stark);
}
html body.seite-sa-kurse .card-header > .d-flex > div:last-child > .btn > i { color: var(--we-marke); }
html body.seite-sa-kurse .card-header > .d-flex > div:last-child > .btn:hover {
    background: var(--we-flaeche-2); border-color: var(--we-tinte); color: var(--we-tinte);
}
@media (max-width: 767.98px) {
    html body.seite-sa-kurse .table td > .d-flex > img,
    html body.seite-sa-kurse .table td > .d-flex > div.bg-light { width: 4.5rem !important; margin-right: .7rem !important; }
    .seite-sa-kurse .card-header > .d-flex > div:last-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    .seite-sa-kurse .card-header > .d-flex > div:last-child > .btn { white-space: normal; overflow-wrap: anywhere; }
}


/* =====================================================================================================
   3  Kurs bearbeiten (edit_course): "Aktuelles Bild" als 7:5-Vorschau (so sehen es die Mitarbeiter)
   ===================================================================================================== */
html body.seite-sa-kurs-form .alert.alert-info:has(img) {
    background: var(--we-flaeche-2); color: var(--we-text); border-left-color: var(--we-linie-stark);
}
html body.seite-sa-kurs-form .alert.alert-info:has(img) img {
    display: block; width: 10.5rem !important; max-width: 100%; height: auto !important; aspect-ratio: 7 / 5; object-fit: cover;
    border-radius: var(--we-rund-klein) !important; margin-top: .6rem !important;
    outline: 1px solid rgba(27, 31, 39, .08); outline-offset: -1px;
}


/* =====================================================================================================
   4  Breite Register-Tabellen (Firmen, Benutzer, Kurse): Scroll-Schatten auch am Desktop,
      damit man sieht, dass rechts noch Spalten (z. B. Aktionen) folgen. Gleiche Technik wie die Basis am Handy.
   ===================================================================================================== */
@media (min-width: 768px) {
    .seite-sa-firmen .table-responsive,
    .seite-sa-benutzer .table-responsive,
    .seite-sa-kurse .table-responsive,
    .seite-sa-videos .table-responsive {
        background:
            linear-gradient(to right, var(--we-flaeche) 30%, rgba(255, 254, 252, 0)) left center / 2rem 100% no-repeat local,
            linear-gradient(to left, var(--we-flaeche) 30%, rgba(255, 254, 252, 0)) right center / 2rem 100% no-repeat local,
            radial-gradient(farthest-side at 0 50%, rgba(27, 31, 39, .18), transparent) left center / .7rem 100% no-repeat scroll,
            radial-gradient(farthest-side at 100% 50%, rgba(27, 31, 39, .18), transparent) right center / .7rem 100% no-repeat scroll;
    }
}


/* =====================================================================================================
   5  Seiten ohne Standard-Seitenkopf (Quiz-Management, Quiz verwalten, Mitarbeiter-Import):
      Titel-Look der Basis nachziehen (Serif-Titel, Haarlinie, Markenstrich), Container buendig mit den anderen Seiten
   ===================================================================================================== */
html body.seite-sa-tests main > .container,
html body.seite-sa-test main > .container,
html body.seite-sa-import main > .container { max-width: none; padding-left: 0; padding-right: 0; margin-top: 0 !important; }
.seite-sa-tests main > .container > .row:first-child,
.seite-sa-test main > .container > .row:first-child {
    position: relative; margin: 0 0 1.75rem; padding: 1.6rem 0 1.1rem; border-bottom: 1px solid var(--we-linie-stark);
}
.seite-sa-tests main > .container > .row:first-child > .col-12,
.seite-sa-test main > .container > .row:first-child > .col-12 { padding-left: 0; padding-right: 0; }
.seite-sa-tests main > .container > .row:first-child::after,
.seite-sa-test main > .container > .row:first-child::after,
.seite-sa-import main > .container > h2:first-child + p.text-muted::after {
    content: ''; position: absolute; left: 0; bottom: -2px; width: 56px; height: 3px; background: var(--we-marke);
}
.seite-sa-tests main > .container > .row:first-child h2,
.seite-sa-test main > .container > .row:first-child h2,
.seite-sa-import main > .container > h2:first-child {
    font-size: clamp(1.75rem, 1.35rem + 1.2vw, 2.4rem); margin: 0; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto;
}
.seite-sa-tests main > .container > .row:first-child h2 + p.text-muted,
.seite-sa-test main > .container > .row:first-child h2 + p.text-muted { margin: .45rem 0 0; }
.seite-sa-import main > .container > h2:first-child { padding-top: 1.6rem; }
.seite-sa-import main > .container > h2:first-child + p.text-muted {
    position: relative; margin: .45rem 0 1.75rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--we-linie-stark);
}
@media (prefers-reduced-motion: no-preference) {
    .seite-sa-tests main > .container > .row:first-child,
    .seite-sa-test main > .container > .row:first-child { animation: we-auf .36s var(--we-ease) both; }
}
@media (max-width: 767.98px) {
    .seite-sa-tests main > .container > .row:first-child,
    .seite-sa-test main > .container > .row:first-child { padding-top: 1.25rem; margin-bottom: 1.25rem; }
    .seite-sa-tests main > .container > .row:first-child h2,
    .seite-sa-test main > .container > .row:first-child h2,
    .seite-sa-import main > .container > h2:first-child { font-size: 1.6rem; }
    .seite-sa-import main > .container > h2:first-child { padding-top: 1.25rem; }
    .seite-sa-import main > .container > h2:first-child + p.text-muted { margin-bottom: 1.25rem; }
}
/* Import: Bootstrap-4-Reste (label ohne Klasse, .form-control-file) wie die uebrigen Felder */
.seite-sa-import form label:not(.form-check-label) { display: inline-block; font-size: .9375rem; font-weight: 600; color: var(--we-tinte); margin-bottom: .35rem; }
html body.seite-sa-import input[type="file"].form-control-file {
    display: block; width: 100%; max-width: 100%; min-height: 2.625rem; padding: .35rem .45rem; color: var(--we-text);
    background: #fff; border: 1px solid var(--we-rahmen); border-radius: var(--we-rund-klein);
}
html body.seite-sa-import input[type="file"].form-control-file::file-selector-button {
    margin-right: .75rem; padding: .4rem .8rem; min-height: 2.25rem; font: inherit; font-weight: 600; color: var(--we-tinte);
    background: var(--we-flaeche-2); border: 1px solid var(--we-linie-stark); border-radius: 6px; cursor: pointer;
}
html body.seite-sa-import input[type="file"].form-control-file:focus-visible { border-color: var(--we-marke); box-shadow: 0 0 0 3px var(--we-marke-ring); outline: 0; }
@media (max-width: 767.98px) {
    html body.seite-sa-import input[type="file"].form-control-file { min-height: 44px; }
}


/* Test-Formulare: Titel "Test erstellen/bearbeiten" ist ein langes Wort. Im Flex-Titel der Basis senkt
   overflow-wrap:break-word die Mindestbreite nicht -> bei 130-160 % Schrift stand die Seite am Handy bis 110 px ueber.
   "anywhere" darf das Wort im Notfall umbrechen (Silbentrennung zuerst, lang="de"). */
html body.seite-sa-testform main > .d-flex.border-bottom h1 { overflow-wrap: anywhere; }
/* Am Handy waechst der Titel mit der Schrift bis zur Bildschirmbreite mit (bei 100 % unveraendert 1,6 rem),
   damit "erstellen/bearbeiten" auch bei 130-160 % in eine Zeile passt statt mitten im Wort zu brechen. */
@media (max-width: 767.98px) {
    html body.seite-sa-testform main > .d-flex.border-bottom h1 { font-size: min(1.6rem, 7vw); }
}


/* =====================================================================================================
   6  Kapitel verwalten: Zusammenfassung als ruhige Kennzahl-Kacheln (Zahl bleibt ueber der Beschriftung wie live)
   ===================================================================================================== */
.seite-sa-kapitel .row:has(> .col-md-3 > .card.bg-light) { --bs-gutter-x: .75rem; row-gap: .75rem; }
html body.seite-sa-kapitel .row > .col-md-3 > .card.bg-light { background: var(--we-flaeche) !important; height: 100%; }
html body.seite-sa-kapitel .row > .col-md-3 > .card.bg-light > .card-body { text-align: left !important; padding: 1rem 1.15rem; }
html body.seite-sa-kapitel .row > .col-md-3 > .card.bg-light > .card-body > .card-title {
    font-family: var(--we-serif); font-size: 2rem; font-weight: 500; line-height: 1.05; color: var(--we-tinte);
    font-variant-numeric: lining-nums tabular-nums; margin: 0 0 .3rem;
}
html body.seite-sa-kapitel .row > .col-md-3 > .card.bg-light > .card-body > .card-text { font-size: .9rem; font-weight: 600; margin: 0; }
@media (max-width: 767.98px) {
    .seite-sa-kapitel .row > .col-md-3:has(> .card.bg-light) { flex: 0 0 50%; max-width: 50%; }
    html body.seite-sa-kapitel .row > .col-md-3 > .card.bg-light > .card-body > .card-title { font-size: 1.75rem; }
}


/* =====================================================================================================
   7  Gruppen-Uebersicht und Firmen-Videos: nichts steht seitlich ueber
   ===================================================================================================== */
.seite-sa-gruppen .list-group-item { padding: 1rem .25rem; }
.seite-sa-gruppen .list-group-item > .d-flex { flex-wrap: wrap; gap: .75rem 1rem; }
.seite-sa-gruppen .list-group-item > .d-flex > div:first-child { flex: 1 1 18rem; min-width: 0; }
.seite-sa-gruppen .list-group-item > .d-flex > div:first-child > .fw-bold {
    font-family: var(--we-serif); font-size: 1.15rem; font-weight: 560 !important; color: var(--we-tinte); line-height: 1.3;
}
html body.seite-sa-gruppen .list-group-item .badge.bg-light {
    white-space: normal; text-align: left; font-weight: 500; border-color: var(--we-linie) !important;
}
.seite-sa-videos .list-group-item { gap: .75rem; }
.seite-sa-videos .list-group-item > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.seite-sa-videos .table .btn-group { flex-wrap: wrap; }
/* Etikett "Kein Video zugewiesen" darf umbrechen, damit "Bearbeiten" in der Karte sichtbar bleibt */
html body.seite-sa-videos .table td > .badge { white-space: normal; text-align: left; }
.seite-sa-videos .table > :not(caption) > * > * { padding-left: .6rem; padding-right: .6rem; }
.seite-sa-videos .table td:last-child { white-space: nowrap; }


/* Firmen-Einstellungen, Karte "Vorschau": Firmenname steht in der rohen Firmenfarbe (Inline-Stil, live so).
   Als grosser Schriftzug (>= 24 px) gilt AA-Grosstext 3:1 -> #007bff 3,95, #729f32 3,1, #004070/#0b3d6e weit darueber. */
.seite-sa-firma .card-body > .text-center > h6[style] {
    font-family: var(--we-serif); font-size: 1.5rem; font-weight: 560; line-height: 1.25; letter-spacing: -.01em;
    margin: .25rem 0 .35rem; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto;
}
.seite-sa-firma .card-body > .text-center > img[alt="Logo"] { max-width: 100%; height: auto; max-height: 60px; }


/* =====================================================================================================
   8  Schluessel und Formate (<code>): ruhiges Etikett in Tinte statt Bootstrap-Pink; farbige code-Elemente
      (Benutzername, Passwort auf Demo-Konten) behalten ihre Farbe
   ===================================================================================================== */
.seite-sa-kategorien code:not([class*="text-"]),
.seite-sa-testform code:not([class*="text-"]),
.seite-sa-demo-konten code:not([class*="text-"]),
.seite-sa-firma code:not([class*="text-"]),
.seite-sa-firmen code:not([class*="text-"]),
.seite-sa-import code:not([class*="text-"]) {
    color: var(--we-tinte); background: var(--we-flaeche-2); border: 1px solid var(--we-linie);
    border-radius: 4px; padding: .05em .35em; font-size: .875em; overflow-wrap: break-word;
}

/* Feinschliff 22.11.2026 (Safari + Verwaltung mobil): Schnellzugriff-Kacheln - der Text war ein anonymes Flex-Kind und
   konnte nicht schmaler werden als sein laengstes Wort. Am iPhone SE/15 bei 200 % Schrift ragte "Schulungskalender"/
   "Fortschritts-Matrix" 20-90 px aus der Kachel (Safari ohne Silbentrennung). Raster mit einer Spalte minmax(0, 1fr):
   gleiches Bild (Text links, senkrecht mittig), aber das Wort darf im Notfall umbrechen. */
html body.seite-sa-start .card-body > .row > .col-md-3 > a.btn.w-100 {
    display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; justify-content: stretch;
}
/* Firmen-Einstellungen am Tablet (768-991 px): zwei Spalten in der 2/3-Spalte wurden bei 150 % Schrift so schmal, dass
   Farb- und Absenderfelder nur noch 40 px breit waren. Hauptkarte und Seitenkarte stehen dort jetzt untereinander
   (gleiche Reihenfolge wie im Markup). */
@media (min-width: 768px) and (max-width: 991.98px) {
    html body.seite-sa-firma main .row:has(> .col-md-8 + .col-md-4) > :is(.col-md-8, .col-md-4) { flex: 0 0 100%; width: 100%; max-width: 100%; }
}
/* ... und die Knopfzeile (Kategorien / Abbrechen / Speichern) bricht am Tablet um, statt die Knoepfe auf
   Buchstabenbreite zu quetschen ("A|b|b|r|e|c|h|e|n" bei 150 % Schrift) */
@media (min-width: 768px) and (max-width: 1199.98px) {
    html body.seite-sa-firma main .d-grid.d-md-flex { flex-wrap: wrap; }
    html body.seite-sa-firma main .d-grid.d-md-flex > .btn { flex: 1 1 auto; }
}
