/* FL-Verwaltung – eigenes Farbschema und Layout */
:root {
    --fl-primary: #12304A;
    --fl-primary-2: #1D435F;
    --fl-primary-soft: #e8f0f7;
    --fl-bg: #f5f7fa;
    --fl-surface: #ffffff;
    --fl-border: #dfe6ed;
    --fl-text: #172b3a;
    --fl-muted: #647483;
    --fl-sidebar-w: 256px;
    --fl-radius: 12px;
    --fl-shadow-sm: 0 1px 2px rgba(18, 48, 74, .05), 0 2px 8px rgba(18, 48, 74, .035);
    --fl-shadow-md: 0 12px 28px rgba(18, 48, 74, .12);
}

body {
    background-color: var(--fl-bg);
    color: var(--fl-text);
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Kopfzeile */
.fl-header {
    background: linear-gradient(100deg, #12304A 0%, #163a57 100%);
    color: #fff;
    height: 64px;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    box-shadow: 0 2px 12px rgba(8, 27, 43, .2);
}
.fl-header .fl-brand {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -.01em;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.fl-header .fl-brand img { height: 32px; max-width: 124px; object-fit: contain; }
.fl-header .fl-brand .fl-brand-mark {
    width: 34px;
    height: 34px;
    max-width: none;
    border-radius: 9px;
    flex: 0 0 auto;
}
.fl-logo-placeholder {
    width: 34px; height: 34px;
    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Seitenleiste */
.fl-sidebar {
    background: linear-gradient(180deg, #1d435f 0%, #1a3d58 100%);
    position: fixed;
    top: 64px; bottom: 0; left: 0;
    width: var(--fl-sidebar-w);
    overflow-y: auto;
    padding: 1rem .75rem 1.25rem;
    box-shadow: inset -1px 0 0 rgba(255,255,255,.055);
}
.fl-sidebar a {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: #d5e1eb;
    padding: .63rem .8rem;
    margin: .12rem 0;
    text-decoration: none;
    border-left: 0;
    border-radius: 8px;
    font-size: .93rem;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}
.fl-sidebar a > .bi { width: 1.05rem; text-align: center; font-size: .98rem; }
.fl-sidebar a span { min-width: 0; overflow-wrap: anywhere; }
.fl-sidebar a small { margin-left: auto; color: #a9c6d9; font-size: .66rem; white-space: nowrap; }
.fl-sidebar a:hover { background: rgba(255,255,255,.09); color: #fff; transform: translateX(2px); }
.fl-sidebar a.active {
    background: rgba(255,255,255,.15);
    box-shadow: inset 3px 0 0 #8cbfdf;
    color: #fff;
    font-weight: 600;
}
.fl-sidebar .fl-group-label {
    color: #9bb1c4;
    font-size: .69rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    padding: 1.25rem .8rem .35rem;
}

/* Inhalt */
.fl-content {
    margin-left: var(--fl-sidebar-w);
    margin-top: 64px;
    padding: 2rem clamp(1.5rem, 3vw, 3.25rem) 2.5rem;
    min-height: calc(100vh - 64px);
}
@media (max-width: 768px) {
    .fl-sidebar { display: none; }
    .fl-content { margin-left: 0; }
}

.fl-page-title {
    font-size: clamp(1.45rem, 2vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -.025em;
    color: var(--fl-primary);
    margin-bottom: .55rem;
}

.card {
    border: 1px solid var(--fl-border);
    border-radius: var(--fl-radius);
    background: var(--fl-surface);
    box-shadow: var(--fl-shadow-sm);
    overflow: hidden;
}
.card-header {
    background: var(--fl-surface);
    border-bottom-color: #e8edf2;
    font-weight: 700;
    color: var(--fl-primary);
    padding: .9rem 1.1rem;
}
.card-body { padding: 1.2rem; }

.btn {
    border-radius: 8px;
    font-weight: 600;
    box-shadow: none;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus {
    box-shadow: 0 0 0 .22rem rgba(64, 128, 174, .22);
}
.btn-primary { background: var(--fl-primary); border-color: var(--fl-primary); }
.btn-primary:hover { background: var(--fl-primary-2); border-color: var(--fl-primary-2); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(18,48,74,.18); }
.btn-outline-primary { color: var(--fl-primary); border-color: var(--fl-primary); }
.btn-outline-primary:hover { background: var(--fl-primary); border-color: var(--fl-primary); }

a { color: var(--fl-primary-2); }
a:focus-visible { outline: 3px solid rgba(92, 157, 201, .55); outline-offset: 3px; border-radius: 4px; }
.form-control, .form-select {
    border-color: #c9d4de;
    border-radius: 8px;
    min-height: 2.5rem;
}
.form-control:focus, .form-select:focus { border-color: #5a99c4; }

/* KPI-Karten */
.kpi-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    border: 1px solid var(--fl-border);
    background: #fff;
    padding: 1rem 1.15rem;
    height: 100%;
    transition: box-shadow .15s, transform .15s;
}
.kpi-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,.1); transform: translateY(-2px); color: inherit; }
.kpi-value { font-size: 1.9rem; font-weight: 700; line-height: 1; color: var(--fl-primary); }
.kpi-label { font-size: .82rem; color: #64707c; margin-top: .35rem; }
.kpi-card.kpi-red .kpi-value { color: #c0392b; }
.kpi-card.kpi-orange .kpi-value { color: #d35400; }
.kpi-card.kpi-yellow .kpi-value { color: #b7950b; }
.kpi-card.kpi-grey .kpi-value { color: #7f8c8d; }

/* Modul 01: bewusst wenige, großformatige Kennzahlen für eine schnelle Übersicht. */
.fl-dashboard-kpis .kpi-card {
    min-height: 7.5rem;
    padding: 1.25rem 1.35rem;
}
.fl-dashboard-kpis .kpi-value { font-size: 2.25rem; }
.fl-dashboard-kpis .kpi-label { font-size: .9rem; }

/* Status-Badges (Fristfarben) */
.status-badge {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 12px;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}
.status-green  { background: #d5f0dd; color: #1e7e45; }
.status-yellow { background: #fdf3cf; color: #9a7d0a; }
.status-orange { background: #fde5cf; color: #b9560f; }
.status-red    { background: #fadbd8; color: #b03a2e; }
.status-grey   { background: #e5e8ea; color: #5f6b76; }

.table thead th {
    background: #f1f5f8;
    color: var(--fl-primary);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .02em;
    border-bottom: 2px solid var(--fl-border);
}
.table td, .table th { vertical-align: middle; padding: .78rem .9rem; }
.table tbody tr { transition: background .12s ease; }
.table-hover > tbody > tr:hover > * { background-color: #f5f9fc; }

.required-mark { color: #c0392b; font-weight: 700; }
.form-label { font-weight: 500; font-size: .9rem; }
.help-block { font-size: .8rem; color: #6c757d; }

/* Listenwerkzeugleiste: einheitliche Filter- und Sortierbedienung in Modul 01. */
.aurora-list-tools {
    border-color: #d7e2eb;
    box-shadow: 0 .18rem .55rem rgba(16, 48, 74, .06);
}
.aurora-list-tools .card-body { padding: 1.15rem 1.25rem; }
.aurora-list-tools .form-label {
    color: #40586c;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .015em;
    margin-bottom: .35rem;
}
.aurora-list-tools .form-control,
.aurora-list-tools .form-select { min-height: 2.45rem; }
.aurora-list-tools__actions {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: .65rem;
    min-height: 2.45rem;
}
.aurora-list-tools__actions--inline { justify-content: flex-start; }
.aurora-list-reset {
    color: #63788a;
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.aurora-list-reset:hover { color: var(--fl-primary); text-decoration: underline; }

.aurora-pagination {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
    padding: .85rem 1rem;
    border: 1px solid var(--fl-border);
    border-radius: .65rem;
    background: var(--fl-surface);
    box-shadow: 0 2px 8px rgba(13, 49, 79, .04);
}
.aurora-pagination__summary { color: var(--fl-muted); font-size: .875rem; }
.aurora-pagination__summary strong { color: var(--fl-primary); }
.aurora-pagination .pagination { justify-content: center; }
.aurora-pagination .page-link { min-width: 2.25rem; text-align: center; }
.aurora-pagination__size-form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .55rem;
    color: var(--fl-muted);
    font-size: .875rem;
    white-space: nowrap;
}
.aurora-pagination__size-form .form-select { width: 4.75rem; }
@media (max-width: 767.98px) {
    .aurora-pagination { grid-template-columns: 1fr; justify-items: center; }
    .aurora-pagination__size-form { justify-content: center; }
}
@media (max-width: 991.98px) {
    .aurora-list-tools__actions { justify-content: flex-start; }
}

.footer-note {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .75rem;
    color: #788896;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #e3e9ef;
}
.footer-note .footer-separator { color: #a8b5c0; }

/* --- Aurora Modul-Umschalter & Modul 02 --- */
.fl-module-switch {
    display: flex;
    gap: .15rem;
    margin-left: 2rem;   /* Abstand zum Programmnamen */
    align-items: center;
}
.fl-module-switch a {
    font-size: .84rem;
    padding: .42rem .75rem;
    color: #bbcedd;
    text-decoration: none;
    border-radius: 7px;
    transition: background .16s, color .16s;
    white-space: nowrap;
}
.fl-module-switch a:hover { color: #fff; background: rgba(255,255,255,.09); }
.fl-module-switch a.active {
    color: #fff;
    font-weight: 600;
    background: rgba(255,255,255,.14);
}
.fl-area-menu { position: relative; }
.fl-area-menu summary {
    display: flex;
    align-items: center;
    gap: .42rem;
    padding: .42rem .75rem;
    border-radius: 7px;
    color: #bbcedd;
    cursor: pointer;
    font-size: .84rem;
    font-weight: 500;
    list-style: none;
    transition: background .16s, color .16s;
    white-space: nowrap;
}
.fl-area-menu summary::-webkit-details-marker { display: none; }
.fl-area-menu summary:hover,
.fl-area-menu.active summary,
.fl-area-menu[open] summary { color: #fff; background: rgba(255,255,255,.14); }
.fl-area-chevron { margin-left: .05rem; font-size: .66rem; transition: transform .16s ease; }
.fl-area-menu[open] .fl-area-chevron { transform: rotate(180deg); }
.fl-area-popover {
    display: none;
    position: absolute;
    top: calc(100% + .55rem);
    left: 0;
    z-index: 1040;
    min-width: 235px;
    padding: .45rem;
    border: 1px solid var(--fl-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--fl-shadow-md);
}
.fl-area-menu[open] .fl-area-popover { display: block; }
.fl-area-popover-title { padding: .35rem .55rem .45rem; color: var(--fl-muted); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.fl-module-switch .fl-area-popover a {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: .05rem 0;
    padding: .55rem .6rem;
    border-radius: 7px;
    color: var(--fl-primary);
    font-size: .86rem;
    white-space: normal;
}
.fl-module-switch .fl-area-popover a:hover,
.fl-module-switch .fl-area-popover a.active { color: var(--fl-primary); background: var(--fl-primary-soft); }
.fl-module-switch .fl-area-popover a > .bi { width: 1rem; text-align: center; }
.fl-module-switch .fl-area-popover small { margin-left: auto; color: var(--fl-muted); font-size: .65rem; white-space: nowrap; }
@media (max-width: 640px) {
    .fl-module-switch { margin-left: .75rem; }
    .fl-module-switch a { padding: .3rem .55rem; font-size: .78rem; }
}
/* Dienstplan-Matrix */
.roster-table { border-collapse: collapse; font-size: .72rem; }
.roster-table th, .roster-table td {
    border: 1px solid var(--fl-border); padding: 1px 3px; text-align: center;
    white-space: nowrap;
}
.roster-table th.emp-name {
    writing-mode: horizontal-tb; transform: none;
    vertical-align: middle; font-weight: 600;
    background: var(--fl-primary); color: #fff;
    font-size: .66rem; line-height: 1.04; padding: 3px 2px;
    min-width: 34px; white-space: nowrap;
}
.roster-table td.day-label, .roster-table th.day-head {
    background: #f0f3f6; font-weight: 600; text-align: left; padding: 1px 6px;
}
.roster-table tr.weekend td { background: #EDF0F3; }
.roster-table tr.holiday td { background: #FCE8D5; }
.roster-cell-shift { font-variant-numeric: tabular-nums; }
.roster-cell-absence { color: #5F6B76; font-weight: 700; }
.roster-cell-medic { border-bottom: 2px solid #12304A; }
.roster-open-badge { color: #fff; background: #C0392B; border-radius: 3px; padding: 0 4px; }
.roster-table td.weekend { background: #EDF0F3; }
.roster-table td.holiday { background: #FCE8D5; }
.roster-table th.weekend { background: #6b7f92; }
.roster-table th.holiday { background: #b9560f; }

/* Manuelle Bearbeitung: klickbare Zellen & gesperrte Dienste */
a.roster-cell-shift { color: inherit; text-decoration: none; display: block; cursor: pointer; border-bottom: 1px dotted #9fb2c4; }
a.roster-cell-shift:hover { background: #12304A; color: #fff; border-radius: 2px; border-bottom-color: #12304A; }
.roster-table td.roster-cell-locked { outline: 1.5px solid #12304A; outline-offset: -2px; }

/* Teilnehmerauswahl in der Planung */
.teilnehmer-zeile { transition: background .1s; }
.teilnehmer-zeile:hover { background: #eef2f6; }
.teilnehmer-zeile.teilnehmer-aktiv { background: #dbe7f3; }
.teilnehmer-zeile .form-check-label { cursor: pointer; }

/* Checkboxen in der Teilnehmerauswahl gut sichtbar */
#teilnehmer-liste .form-check-input {
    width: 1.15em; height: 1.15em; flex-shrink: 0; margin: 0;
    border: 1px solid #7a8794;
}
#teilnehmer-liste .form-check-input:checked {
    background-color: #12304A; border-color: #12304A;
}

/* Einsatzstellenauswahl im Meldebuch: dieselbe klare Checkboxdarstellung wie
   die Mitarbeiterauswahl der Dienstplanung. */
#agency-list .form-check-input {
    width: 1.15em; height: 1.15em; flex-shrink: 0; margin: 0;
    border: 1px solid #7a8794;
}
#agency-list .form-check-input:checked {
    background-color: #12304A; border-color: #12304A;
}
#agency-list .teilnehmer-zeile label { cursor: pointer; }

/* --- Aurora: Startseite, Modulkacheln, Administration --- */
.fl-header-link {
    color: #d0e0ec; text-decoration: none; font-size: .84rem;
    padding: .42rem .6rem; border-radius: 7px; white-space: nowrap;
}
.fl-header-link:hover, .fl-header-link.active { color: #fff; background: rgba(255,255,255,.13); }

.fl-header-actions { gap: .8rem !important; padding-left: 1.15rem; }
.fl-header-actions .fl-header-link { padding: .5rem .68rem; }
.fl-context-switcher {
    display: inline-flex; align-items: center; gap: .45rem; min-width: 0;
    margin: 0; padding: .28rem .5rem .28rem .62rem;
    border: 1px solid rgba(255,255,255,.22); border-radius: 8px;
    color: #c8dbe8; background: rgba(255,255,255,.07);
}
.fl-context-switcher:focus-within {
    border-color: #a9d7f5; box-shadow: 0 0 0 3px rgba(130, 204, 244, .18);
}
.fl-context-switcher .bi { flex: 0 0 auto; font-size: .9rem; }
.fl-context-switcher select {
    min-width: 10.5rem; max-width: 17rem; padding: .08rem 1.4rem .08rem .05rem;
    overflow: hidden; border: 0; outline: 0; color: #fff; background: transparent;
    font-size: .78rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap;
}
.fl-context-switcher select option { color: var(--fl-text); background: #fff; }
.fl-context-current {
    display: inline-flex; align-items: center; gap: .45rem; min-width: 0;
    padding: .34rem .62rem; border: 1px solid rgba(255,255,255,.16);
    border-radius: 8px; color: #d7e6f0; background: rgba(255,255,255,.045);
    font-size: .78rem; font-weight: 600; white-space: nowrap;
}
.fl-context-current .bi { flex: 0 0 auto; font-size: .88rem; }
.fl-context-current span { overflow: hidden; max-width: 18rem; text-overflow: ellipsis; }
.fl-user-context {
    display: flex; flex-direction: column; line-height: 1.15; min-width: 0;
    padding-left: .95rem; border-left: 1px solid rgba(255,255,255,.2);
}
.fl-user-name { color: #fff; font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 12rem; }
.fl-user-role { color: #a9c0d1; font-size: .7rem; white-space: nowrap; }
.fl-profile-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.3rem; height: 2.3rem; color: #fff; text-decoration: none;
    border: 1px solid rgba(255,255,255,.16); overflow: hidden;
    border-radius: 50%; background: rgba(255,255,255,.09);
    transition: background .16s ease, border-color .16s ease;
}
.fl-profile-link:hover { color: #fff; background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.35); }
.fl-profile-avatar { width: 100%; height: 100%; object-fit: cover; display: block; }
.fl-auth-mark {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(18,48,74,.16);
}

.profile-image-editor {
    display: flex; align-items: center; gap: 1.15rem;
    padding: 0 0 1.25rem; margin: 0 0 1.25rem;
    border-bottom: 1px solid #e3e9ef;
}
.profile-image-preview {
    width: 88px; height: 88px; flex: 0 0 88px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    color: #a9bdcd; font-size: 2.35rem; border-radius: 50%;
    border: 3px solid #e3edf4; background: #f1f6fa;
    box-shadow: 0 5px 12px rgba(18,48,74,.1);
}
.profile-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.profile-image-input { flex: 1 1 auto; min-width: 0; }
.profile-image-input h2 { color: var(--fl-primary); font-size: 1rem; font-weight: 700; margin: 0 0 .55rem; }
.profile-image-input input[type="file"] { max-width: 100%; }

.aurora-module-card {
    position: relative;
    display: flex;
    min-height: 156px;
    padding: 1.25rem;
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--fl-border);
    border-radius: 14px;
    background: var(--fl-surface);
    box-shadow: var(--fl-shadow-sm);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.aurora-module-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--fl-shadow-md);
    border-color: #a9c8dc;
    color: inherit;
}
.aurora-module-icon {
    width: 50px; height: 50px; border-radius: 12px;
    background: var(--fl-primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1.32rem;
    box-shadow: 0 7px 14px rgba(18,48,74,.16);
}
.aurora-module-admin .aurora-module-icon { background: #5F6B76; }
.aurora-module-card h2, .aurora-module-card h3 { color: var(--fl-primary); }
.aurora-module-content { display: flex; flex-direction: column; min-width: 0; }
.aurora-module-eyebrow {
    margin-top: 1.05rem;
    color: #718393;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}
.aurora-module-title { margin: .18rem 0 .25rem; font-size: 1.22rem; font-weight: 700; letter-spacing: -.018em; }
.aurora-module-description { margin: 0; color: var(--fl-muted); font-size: .86rem; }
.aurora-module-arrow {
    position: absolute; right: 1.2rem; bottom: 1.2rem;
    display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; border-radius: 50%; color: var(--fl-primary);
    background: var(--fl-primary-soft); transition: transform .18s ease, background .18s ease, color .18s ease;
}
.aurora-module-card:hover .aurora-module-arrow { color: #fff; background: var(--fl-primary); transform: translateX(3px); }
.aurora-module-card--planned {
    min-height: 148px;
    border-color: #e2e9ef;
    background: #fbfcfd;
    box-shadow: none;
}
.aurora-module-card--planned .aurora-module-icon {
    background: #5f7486;
    box-shadow: none;
}
.aurora-module-card--planned .aurora-module-title { color: #3f5e74; }
.aurora-welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.8rem; }
.aurora-welcome .fl-page-title { margin: 0; }
.aurora-module-overview { max-width: 1600px; margin: 0 auto; }
.aurora-eyebrow {
    display: flex; align-items: center; gap: .45rem; margin: 0 0 .45rem;
    color: #5e7f98; font-size: .73rem; font-weight: 700; letter-spacing: .075em; text-transform: uppercase;
}
.aurora-welcome-copy { max-width: 42rem; margin: .55rem 0 0; color: var(--fl-muted); }
.aurora-area-section { margin: 0 0 2.35rem; }
.aurora-area-heading { display: flex; align-items: center; gap: .65rem; margin: 0 0 1rem; }
.aurora-area-heading h2 { margin: 0; color: var(--fl-primary); font-size: 1.15rem; font-weight: 700; }
.aurora-area-icon, .aurora-placeholder__icon { display: inline-flex; align-items: center; justify-content: center; width: 2.15rem; height: 2.15rem; border-radius: 9px; color: var(--fl-primary); background: var(--fl-primary-soft); }
.aurora-status-badge { display: inline-flex; width: fit-content; margin-top: .35rem; padding: .2rem .5rem; border-radius: 999px; color: #486477; background: #eef4f7; font-size: .72rem; font-weight: 700; }
.aurora-planned-section { margin: .35rem 0 2.35rem; padding-top: 1.65rem; border-top: 1px solid #dfe7ed; }
.aurora-planned-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1rem; }
.aurora-planned-heading .aurora-eyebrow { margin-bottom: .25rem; }
.aurora-planned-heading h2 { margin: 0; color: var(--fl-primary); font-size: 1.15rem; font-weight: 700; }
.aurora-planned-heading > p { max-width: 28rem; margin: 0; color: var(--fl-muted); font-size: .82rem; text-align: right; }
.platform-hero { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(1.45rem, 3vw, 2.35rem); margin-bottom: 1.5rem; border: 1px solid #d8e4ed; border-radius: 16px; background: linear-gradient(115deg, #fff 0%, #f2f7fa 100%); box-shadow: var(--fl-shadow-sm); }
.platform-hero__content { max-width: 720px; }
.platform-hero .fl-page-title { margin: 0; }
.platform-hero p:not(.aurora-eyebrow) { max-width: 660px; margin: .65rem 0 0; color: var(--fl-muted); font-size: 1rem; }
.platform-hero__actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.35rem; }
.platform-guardrail { display: flex; gap: .85rem; align-items: flex-start; width: min(100%, 360px); padding: 1rem 1.05rem; border: 1px solid #cfe0ea; border-radius: 12px; background: rgba(255,255,255,.85); box-shadow: 0 6px 18px rgba(18,48,74,.06); }
.platform-guardrail__icon, .platform-panel__icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 2.5rem; height: 2.5rem; border-radius: 10px; color: #fff; background: var(--fl-primary); font-size: 1.12rem; }
.platform-guardrail strong, .platform-guardrail span { display: block; }
.platform-guardrail strong { color: var(--fl-primary); font-size: .9rem; }
.platform-guardrail span { margin-top: .18rem; color: var(--fl-muted); font-size: .8rem; line-height: 1.42; }
.platform-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2.35rem; }
.platform-stat-card { display: flex; align-items: center; gap: .85rem; min-width: 0; padding: 1.1rem 1.05rem; border: 1px solid var(--fl-border); border-radius: 12px; background: var(--fl-surface); box-shadow: var(--fl-shadow-sm); }
.platform-stat-card__icon, .platform-action-card__icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 2.45rem; height: 2.45rem; border-radius: 10px; color: var(--fl-primary); background: var(--fl-primary-soft); font-size: 1.08rem; }
.platform-stat-card span, .platform-stat-card strong { display: block; }
.platform-stat-card span { overflow: hidden; color: var(--fl-muted); font-size: .76rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.platform-stat-card strong { margin-top: .1rem; color: var(--fl-primary); font-size: 1.55rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.platform-stat-card strong small { color: #7790a3; font-size: .86rem; font-weight: 600; }
.platform-section { margin-bottom: 2.35rem; }
.platform-section__heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1rem; }
.platform-section__heading .aurora-eyebrow { margin-bottom: .3rem; }
.platform-section__heading h2, .platform-panel h2 { margin: 0; color: var(--fl-primary); font-size: 1.17rem; font-weight: 700; }
.platform-section__heading > p { max-width: 490px; margin: 0; color: var(--fl-muted); font-size: .86rem; text-align: right; }
.platform-action-card { display: flex; align-items: center; gap: .85rem; height: 100%; min-height: 112px; padding: 1rem; border: 1px solid var(--fl-border); border-radius: 12px; color: inherit; background: var(--fl-surface); box-shadow: var(--fl-shadow-sm); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.platform-action-card:hover { transform: translateY(-2px); border-color: #a9c8dc; box-shadow: var(--fl-shadow-md); color: inherit; }
.platform-action-card > span:nth-child(2) { min-width: 0; }
.platform-action-card strong, .platform-action-card small { display: block; }
.platform-action-card strong { color: var(--fl-primary); font-size: .91rem; }
.platform-action-card small { margin-top: .2rem; color: var(--fl-muted); font-size: .77rem; line-height: 1.38; }
.platform-action-card > .bi { margin-left: auto; color: #6b8ba1; transition: transform .18s ease; }
.platform-action-card:hover > .bi { color: var(--fl-primary); transform: translateX(3px); }
.platform-panel { padding: 1.3rem; border: 1px solid var(--fl-border); border-radius: 14px; background: var(--fl-surface); box-shadow: var(--fl-shadow-sm); }
.platform-panel__heading { display: flex; align-items: center; gap: .75rem; padding-bottom: 1rem; border-bottom: 1px solid #e8eef3; }
.platform-panel__heading p { margin: .14rem 0 0; color: var(--fl-muted); font-size: .8rem; }
.platform-status-list { display: grid; gap: .85rem; padding: 1rem 0 0; margin: 0; list-style: none; }
.platform-status-list li { display: flex; align-items: flex-start; gap: .65rem; color: #1d8957; }
.platform-status-list li > .bi { margin-top: .08rem; }
.platform-status-list strong, .platform-status-list small { display: block; }
.platform-status-list strong { color: var(--fl-text); font-size: .86rem; }
.platform-status-list small { margin-top: .1rem; color: var(--fl-muted); font-size: .77rem; line-height: 1.4; }
.platform-status-list__warning { color: #bb7a13 !important; }
.platform-event { display: grid; gap: .36rem; padding-top: 1rem; }
.platform-event__time { color: var(--fl-muted); font-size: .77rem; }
.platform-event strong { color: var(--fl-primary); font-size: .96rem; }
.platform-event > span:not(.platform-event__time) { color: var(--fl-muted); font-size: .82rem; }
.platform-event a { margin-top: .35rem; color: var(--fl-primary); font-size: .84rem; font-weight: 700; text-decoration: none; }
.platform-event a:hover { text-decoration: underline; }
.platform-empty-event { display: flex; align-items: center; gap: .7rem; padding: 1.25rem 0 .15rem; color: var(--fl-muted); font-size: .86rem; }
.platform-empty-event .bi { color: #7494a8; font-size: 1.3rem; }
.aurora-placeholder { max-width: 720px; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--fl-border); border-radius: var(--fl-radius); background: var(--fl-surface); box-shadow: var(--fl-shadow-sm); }
.aurora-placeholder h1 { margin: .55rem 0 0; color: var(--fl-primary); font-size: clamp(1.45rem, 3vw, 2rem); }
.aurora-placeholder__message { margin: 1.35rem 0; color: var(--fl-text); font-size: 1rem; }
.fl-area-toggle, .fl-sidebar-toggle { display: none; }

@media (max-width: 992px) {
    .fl-header { padding: 0 .85rem; }
    .fl-module-switch { margin-left: .85rem; overflow-x: auto; }
    .fl-module-switch a { padding: .38rem .5rem; }
    .fl-user-context { display: none; }
    .fl-header-actions { gap: .5rem !important; padding-left: .5rem; }
    .fl-context-switcher select { min-width: 8rem; max-width: 12rem; }
    .fl-context-current span { max-width: 11rem; }
    .platform-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .platform-hero { align-items: flex-start; flex-direction: column; }
    .platform-guardrail { width: 100%; }
}
@media (max-width: 768px) {
    .fl-header { height: 58px; }
    .fl-header .fl-brand { font-size: 1rem; }
    .fl-logo-placeholder { width: 30px; height: 30px; }
    .fl-area-toggle { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; margin-left: .65rem; padding: 0; border: 1px solid rgba(255,255,255,.25); border-radius: 7px; color: #fff; background: transparent; }
    .fl-module-switch { display: none; position: fixed; top: 58px; left: .65rem; right: .65rem; z-index: 1031; flex-direction: column; align-items: stretch; margin: 0; padding: .5rem; border: 1px solid rgba(18,48,74,.18); border-radius: 10px; background: #fff; box-shadow: var(--fl-shadow-md); }
    .fl-module-switch.is-open { display: flex; }
    .fl-area-menu summary { padding: .6rem .75rem; color: var(--fl-primary); font-size: .88rem; }
    .fl-area-menu summary:hover, .fl-area-menu.active summary, .fl-area-menu[open] summary { color: var(--fl-primary); background: var(--fl-primary-soft); }
    .fl-area-popover { position: static; min-width: 0; margin: .15rem 0 .4rem; box-shadow: none; border-color: #e4edf3; }
    .fl-sidebar { display: block; top: 58px; z-index: 1029; transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--fl-shadow-md); }
    .fl-sidebar.is-open { transform: translateX(0); }
    .fl-sidebar-toggle { display: inline-flex; position: fixed; top: 68px; left: .8rem; z-index: 1028; align-items: center; gap: .45rem; padding: .4rem .65rem; border: 1px solid var(--fl-border); border-radius: 8px; color: var(--fl-primary); background: #fff; box-shadow: var(--fl-shadow-sm); font-size: .8rem; font-weight: 600; }
    .fl-content { margin-top: 58px; padding: 1.4rem 1rem 2rem; min-height: calc(100vh - 58px); }
    .aurora-welcome { display: block; margin-bottom: 1.35rem; }
    .aurora-module-card { min-height: 154px; }
    .aurora-planned-heading { align-items: flex-start; flex-direction: column; gap: .35rem; }
    .aurora-planned-heading > p { text-align: left; }
    .platform-section__heading { align-items: flex-start; flex-direction: column; gap: .45rem; }
    .platform-section__heading > p { text-align: left; }
}
@media (max-width: 540px) {
    .fl-header-link .d-none { display: none !important; }
    .fl-header-actions .btn { padding: .3rem .45rem; font-size: .8rem; }
    .fl-context-switcher { padding-left: .45rem; }
    .fl-context-switcher select { min-width: 0; max-width: 8.2rem; font-size: .72rem; }
    .fl-context-current { padding: .3rem .45rem; }
    .fl-context-current span { max-width: 7.5rem; font-size: .72rem; }
    .profile-image-editor { align-items: flex-start; gap: .85rem; }
    .profile-image-preview { width: 72px; height: 72px; flex-basis: 72px; font-size: 1.9rem; }
    .platform-hero { padding: 1.25rem; }
    .platform-stats { grid-template-columns: 1fr; }
    .platform-hero__actions .btn { width: 100%; }
}

/* Fehlerseiten */
.aurora-error-icon {
    width: 64px; height: 64px; margin: 0 auto; border-radius: 50%;
    background: #f0f3f6; color: var(--fl-primary);
    display: flex; align-items: center; justify-content: center; font-size: 1.8rem;
}

/* Ersatzteil-Vorschläge in der Bearbeitungsmaske */
tr.sparepart-suggested { background: #f4f8fb; }
tr.sparepart-suggested td:first-child { border-left: 3px solid var(--fl-primary); }

/* CSP-compatible layout utilities: keep presentation out of style attributes. */
.aurora-focus-shell {
    min-height: 100vh;
    background: linear-gradient(135deg, #12304a 0%, #163a57 100%);
}
.aurora-focus-card {
    width: 100%;
    max-width: 480px;
    border: 1px solid rgba(223, 230, 237, .95);
    border-radius: 14px;
    box-shadow: 0 20px 46px rgba(7, 29, 46, .26) !important;
}
.aurora-focus-card .card-body { padding: 2.5rem !important; }
.aurora-focus-card .form-label {
    margin-bottom: .45rem;
    color: var(--fl-primary);
    font-size: .84rem;
    font-weight: 700;
}
.aurora-focus-card .form-control,
.aurora-focus-card .form-select {
    min-height: 2.9rem;
    border-color: #cdd9e3;
}
.aurora-focus-card .form-control:focus,
.aurora-focus-card .form-select:focus {
    border-color: #5e9ec6;
    box-shadow: 0 0 0 .2rem rgba(94, 158, 198, .18);
}
.aurora-focus-card .btn-primary {
    min-height: 2.9rem;
    font-weight: 700;
    letter-spacing: .01em;
}
.aurora-focus-card a.small {
    color: #446d8a;
    font-weight: 600;
}
.aurora-focus-title, .aurora-login-title {
    color: var(--fl-primary);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -.02em;
}
.aurora-login-shell { min-height: 100vh; background: var(--fl-primary); }
.aurora-login-card { width: 100%; max-width: 380px; }
.aurora-login-mark { background: var(--fl-primary); color: #fff; width: 48px; height: 48px; font-size: 1.4rem; }
.aurora-qr-code { max-width: 220px; }
.aurora-mfa-success-icon { font-size: 2.5rem; }
.aurora-click-label { cursor: pointer; }
.aurora-search-input { max-width: 360px; }
.aurora-inherit-color { color: inherit; }

@media (max-width: 575.98px) {
    .aurora-focus-shell { padding: 1rem !important; }
    .aurora-focus-card { max-width: 100%; border-radius: 12px; }
    .aurora-focus-card .card-body { padding: 1.5rem !important; }
}
.aurora-primary-display { color: var(--fl-primary); }
.aurora-scroll-220 { max-height: 220px; overflow-y: auto; }
.aurora-scroll-380 { max-height: 380px; overflow-y: auto; }
.aurora-scroll-440 { max-height: 440px; overflow-y: auto; }
.aurora-scroll-70vh { max-height: 70vh; }
.aurora-col-min-170 { min-width: 170px; }
.aurora-col-min-180 { min-width: 180px; }
.aurora-col-min-200 { min-width: 200px; }
.aurora-col-min-220 { min-width: 220px; }
.aurora-col-38 { width: 38px; }
.aurora-col-70 { width: 70px; }
.aurora-col-80 { width: 80px; }
.aurora-col-90 { width: 90px; }
.aurora-col-100 { width: 100px; }
.aurora-col-110 { width: 110px; }
.aurora-col-120 { width: 120px; }
.aurora-col-130 { width: 130px; }
.aurora-model-work-list { list-style: none; padding-left: 0; }
.aurora-model-work-list li { margin-bottom: .25rem; }
.aurora-model-work-list input { margin-right: .4rem; }
.aurora-error-copy { color: #5f6b76; }
