/* CleanPlan – Stylesheet (Farbwelt angelehnt an glanz-y.ch) */
:root {
    --navy: #0a1733;
    --navy-2: #132a55;
    --navy-3: #081226;
    --primaer: #1d4ed8;        /* blue-700 */
    --primaer-dunkel: #1e40af; /* blue-800 */
    --primaer-hell: #eff6ff;   /* blue-50 */
    --blau-100: #dbeafe;
    --blau-200: #bfdbfe;
    --grau-50: #f8fafc;
    --grau-100: #f1f5f9;
    --grau-200: #e2e8f0;
    --grau-400: #94a3b8;
    --grau-600: #475569;
    --grau-800: #0f172a;       /* slate-900 */
    --rot: #dc2626;
    --gruen: #16a34a;
    --radius: 16px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(180deg, #f7f9fd 0%, #eef2f9 100%);
    background-attachment: fixed;
    color: var(--grau-800);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

:focus-visible {
    outline: 2px solid var(--primaer);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Kopfleiste ---------- */
.topbar {
    background: linear-gradient(135deg, rgba(10, 23, 51, .97) 0%, rgba(19, 42, 85, .97) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    box-shadow: 0 2px 16px rgba(8, 18, 38, .3);
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-zeile1 {
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 16px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.mainnav-zeile {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2px 12px 10px;
}
.brand {
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: .01em;
    display: flex;
    align-items: center;
}
.brand:hover { text-decoration: none; }
.brand-logo {
    height: 38px;
    display: block;
}
.mainnav {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a { flex: 0 0 auto; }
.mainnav a, .userbox a {
    color: rgba(255,255,255,.75);
    padding: 7px 14px;
    border-radius: 99px;
    font-weight: 500;
    font-size: 14.5px;
    transition: background .15s ease, color .15s ease;
}
.mainnav a:hover, .userbox a:hover { background: rgba(255,255,255,.1); text-decoration: none; color: #fff; }
.mainnav a.aktiv {
    background: #fff;
    color: var(--navy);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.userbox { display: flex; align-items: center; gap: 8px; }
.userbox .profil-link {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- Layout ---------- */
.inhalt {
    max-width: 1280px;
    margin: 24px auto;
    padding: 0 16px;
}
.fusszeile {
    text-align: center;
    color: var(--grau-400);
    font-size: 13px;
    padding: 24px 0 40px;
}
.seitenkopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.seitenkopf h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; color: var(--navy); }

.karte {
    background: #fff;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, .05);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px rgba(15, 23, 42, .05);
    padding: 22px;
    margin-bottom: 20px;
}
.karte h3 {
    font-size: 16px;
    letter-spacing: -.01em;
    color: var(--navy);
}
.karten-reihe {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.kennzahl { text-align: center; padding: 18px 14px; }
.kennzahl .zahl {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.02em;
    background: linear-gradient(135deg, var(--navy) 20%, var(--primaer) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.kennzahl .label { color: var(--grau-400); font-size: 12.5px; font-weight: 600; margin-top: 2px; }

/* ---------- Flash ---------- */
.flash {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 500;
    border-left: 4px solid currentColor;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .06);
    animation: flash-rein .25s ease;
}
@keyframes flash-rein {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.flash-success { background: #dcfce7; color: #166534; }
.flash-error   { background: #fee2e2; color: #991b1b; }
.flash-warn    { background: #fef3c7; color: #92400e; }

/* ---------- Abwesenheits-Badges ---------- */
.abw-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,.15);
    color: #fff;
    border-radius: 99px;
    padding: 1px 8px;
    font-size: 10.5px;
    font-weight: 600;
    margin-top: 3px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
}
.abw-badge.dunkel {
    background: #fef3c7;
    color: #92400e;
    font-size: 12px;
    padding: 3px 10px;
}
.mobil-abw {
    padding: 8px 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    background: linear-gradient(180deg, #2563eb 0%, var(--primaer) 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(29, 78, 216, .35), inset 0 1px 0 rgba(255, 255, 255, .15);
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover {
    background: linear-gradient(180deg, #3b76f0 0%, #2356d8 100%);
    text-decoration: none;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 78, 216, .35), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.btn:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(29, 78, 216, .35); }
.btn-klein { padding: 5px 10px; font-size: 13px; }
.btn-grau { background: var(--grau-600); }
.btn-grau:hover { background: var(--grau-800); }
.btn-rot { background: var(--rot); }
.btn-rot:hover { background: #b91c1c; }
.btn-umriss {
    background: #fff;
    color: var(--primaer);
    border: 1px solid var(--blau-200);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}
.btn-umriss:hover {
    background: var(--primaer-hell);
    color: var(--primaer-dunkel);
    box-shadow: 0 3px 10px rgba(15, 23, 42, .08);
}
.btn-navy { background: var(--navy); }
.btn-navy:hover { background: var(--navy-2); }

/* ---------- Formulare ---------- */
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; color: var(--grau-600); }
input[type=text], input[type=password], input[type=email], input[type=tel],
input[type=date], input[type=time], input[type=number], select, textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--grau-200);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
input:hover, select:hover, textarea:hover { border-color: var(--grau-400); }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primaer);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .14);
}
.formular-raster {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.feld { margin-bottom: 14px; }
.checkbox-liste {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.checkbox-liste label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    font-size: 14px;
    background: var(--primaer-hell);
    border: 1px solid var(--blau-200);
    border-radius: 99px;
    padding: 7px 14px;
    cursor: pointer;
    margin: 0;
    color: var(--grau-800);
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.checkbox-liste label:hover {
    border-color: var(--primaer);
    box-shadow: 0 2px 8px rgba(29, 78, 216, .12);
}
.checkbox-liste label:has(input:checked) {
    background: var(--blau-100);
    border-color: var(--primaer);
}
.checkbox-liste input { accent-color: var(--primaer); }
.farbpunkt {
    display: inline-block;
    width: 11px; height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---------- Tabellen ---------- */
.tabelle-wrap { overflow-x: auto; }
table.liste {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
table.liste th {
    text-align: left;
    padding: 10px 12px;
    background: transparent;
    border-bottom: 1px solid var(--grau-200);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--grau-400);
    font-weight: 700;
    white-space: nowrap;
}
table.liste td {
    padding: 12px;
    border-bottom: 1px solid var(--grau-100);
    vertical-align: top;
}
table.liste tr:last-child td { border-bottom: none; }
table.liste tr:hover td { background: rgba(239, 246, 255, .6); }
.rechts { text-align: right; }

/* ---------- Status-Badges ---------- */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.badge-geplant  { background: var(--blau-100); color: var(--primaer-dunkel); }
.badge-erledigt { background: #dcfce7; color: #166534; }
.badge-abgesagt { background: #fee2e2; color: #991b1b; }
.badge-inaktiv  { background: var(--grau-200); color: var(--grau-600); }
.badge-offen    { background: #fef3c7; color: #92400e; }

/* ---------- Kalender: Navigation ---------- */
.kalender-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.kalender-nav .kw { font-weight: 800; font-size: 16px; color: var(--navy); }

/* ---------- Kalender: Wochenraster mit Zeitachse ---------- */
.wochenplan, .monatsplan {
    background: #fff;
    border: 1px solid var(--grau-100);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
    overflow: hidden;
}
.wochenplan-scroll { overflow-x: auto; }
.wp-raster {
    display: grid;
    grid-template-columns: 56px repeat(7, minmax(120px, 1fr));
    min-width: 920px;
}

/* Kopfzeile mit Tagen */
.wp-kopf {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
    color: #fff;
    padding: 10px 8px;
    text-align: center;
    font-size: 13px;
    border-left: 1px solid rgba(255,255,255,.08);
}
.wp-kopf:first-child { border-left: none; }
.wp-kopf .tag-name { font-weight: 700; display: block; }
.wp-kopf .tag-datum { color: rgba(255,255,255,.65); font-size: 12px; }
.wp-kopf a.tag-plus {
    color: rgba(255,255,255,.55);
    font-size: 15px;
    line-height: 1;
    margin-left: 6px;
}
.wp-kopf a.tag-plus:hover { color: #fff; text-decoration: none; }
.wp-kopf.heute { background: var(--primaer); }
.wp-kopf.heute .tag-datum { color: rgba(255,255,255,.85); }

/* Zeitspalte */
.wp-zeitspalte {
    position: relative;
    border-right: 1px solid var(--grau-100);
    background: var(--grau-50);
}
.wp-zeitlabel {
    position: absolute;
    right: 8px;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--grau-400);
    font-weight: 600;
}

/* Tagesspalten */
.wp-tag {
    position: relative;
    border-left: 1px solid var(--grau-100);
    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent calc(var(--stunde-px) - 1px),
            var(--grau-100) calc(var(--stunde-px) - 1px),
            var(--grau-100) var(--stunde-px)
        );
}
.wp-tag.heute { background-color: var(--primaer-hell); }
.wp-tag.wochenende { background-color: var(--grau-50); }
.wp-tag.heute.wochenende { background-color: var(--primaer-hell); }

/* Termin-Blöcke */
.wp-termin {
    position: absolute;
    border-radius: 8px;
    padding: 4px 7px;
    font-size: 12px;
    line-height: 1.3;
    overflow: hidden;
    color: #fff;
    background: var(--primaer);
    border: 1px solid rgba(255,255,255,.35);
    box-shadow: 0 1px 4px rgba(15, 23, 42, .25);
    text-decoration: none;
}
.wp-termin:hover {
    text-decoration: none;
    filter: brightness(1.1);
    z-index: 30 !important;
    min-height: 44px;
}
.wp-termin .zeit { font-weight: 700; font-size: 11px; display: block; opacity: .9; }
.wp-termin .titel { font-weight: 700; display: block; }
.wp-termin .kunde { opacity: .85; font-size: 11px; display: block; }
.wp-termin.st-erledigt { opacity: .55; }
.wp-termin.st-erledigt .titel::after { content: " ✓"; }
.wp-termin.st-abgesagt { opacity: .45; text-decoration: line-through; }
.wp-termin .ma-punkte { display: flex; gap: 3px; margin-top: 2px; }
.wp-termin .farbpunkt { border: 1px solid rgba(255,255,255,.7); width: 9px; height: 9px; }

/* Jetzt-Linie (aktuelle Uhrzeit) */
.wp-jetzt {
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: var(--rot);
    z-index: 20;
    pointer-events: none;
}
.wp-jetzt::before {
    content: "";
    position: absolute;
    left: -4px; top: -3px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--rot);
}

/* ---------- Kalender: Monatsansicht ---------- */
.monatsraster {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    min-width: 980px;
}
.m-kopf {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
    color: #fff;
    padding: 9px 10px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    border-left: 1px solid rgba(255,255,255,.08);
}
.m-kopf:first-child { border-left: none; }
.m-zelle {
    min-height: 118px;
    border-left: 1px solid var(--grau-100);
    border-top: 1px solid var(--grau-100);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #fff;
}
.m-zelle.fremd { background: var(--grau-50); }
.m-zelle.fremd .m-tag { color: var(--grau-400); }
.m-zelle.heute { background: var(--primaer-hell); }
.m-zelle-kopf {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.m-tag {
    font-weight: 700;
    font-size: 13px;
    color: var(--grau-800);
    width: 24px; height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.m-tag:hover { background: var(--blau-100); text-decoration: none; }
.m-zelle.heute .m-tag { background: var(--primaer); color: #fff; }
.m-plus {
    color: var(--grau-400);
    font-size: 14px;
    line-height: 1;
}
.m-plus:hover { color: var(--primaer); text-decoration: none; }
.m-termin {
    display: block;
    color: #fff;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.m-termin:hover { text-decoration: none; filter: brightness(1.12); }
.m-termin .m-zeit { opacity: .85; font-weight: 700; margin-right: 3px; }
.m-termin.st-erledigt { opacity: .55; }
.m-termin.st-abgesagt { opacity: .45; text-decoration: line-through; }
.m-mehr {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--primaer);
    padding-left: 2px;
}
.m-abw { display: flex; flex-wrap: wrap; gap: 3px; }
.m-abw .abw-badge { margin-top: 0; padding: 0 7px; font-size: 10px; }
.umschalter { display: inline-flex; gap: 4px; }

/* ---------- Einsatzplan: Referenz-Layout ---------- */
.ep-page {
    color: #071845;
    max-width: 1540px;
    margin: 0 auto;
}
.ep-topline {
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.ep-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 4px;
    background: #f5f8ff;
    border: 1px solid #dbe5f5;
    border-radius: 8px;
}
.ep-tabs a {
    min-width: 70px;
    text-align: center;
    padding: 8px 14px;
    border-radius: 6px;
    color: #071845;
    font-size: 13px;
    font-weight: 700;
}
.ep-tabs a:hover { text-decoration: none; background: #edf4ff; }
.ep-tabs a.aktiv {
    background: #1268f3;
    color: #fff;
    box-shadow: 0 8px 18px rgba(18,104,243,.28);
}
.ep-date-nav {
    justify-self: center;
    min-width: min(380px, 100%);
    height: 38px;
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    border: 1px solid #dbe5f5;
    border-radius: 8px;
    background: #fff;
    color: #071845;
}
.ep-date-nav strong {
    text-align: center;
    font-size: 14px;
    font-weight: 800;
}
.ep-date-nav a {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0b2d66;
    font-size: 18px;
}
.ep-date-nav a:hover { background: #f5f8ff; text-decoration: none; }
.ep-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}
.ep-filter {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid #dbe5f5;
    border-radius: 8px;
    background: #fff;
    color: #071845;
    font-size: 13px;
    font-weight: 700;
}
.ep-filter:hover { text-decoration: none; background: #f5f8ff; }
.ep-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 286px;
    gap: 20px;
    align-items: start;
}
.ep-main { min-width: 0; }
.ep-board, .ep-card {
    background: #fff;
    border: 1px solid #e1e8f3;
    border-radius: 8px;
    box-shadow: 0 8px 26px rgba(7,24,69,.04);
}
.ep-board {
    overflow: hidden;
}
.ep-board-head {
    display: grid;
    grid-template-columns: 176px minmax(840px, 1fr);
    height: 58px;
    border-bottom: 1px solid #e9eef7;
}
.ep-ma-head {
    display: flex;
    align-items: end;
    padding: 0 16px 14px;
    border-right: 1px solid #e9eef7;
    font-size: 12px;
    font-weight: 800;
    color: #071845;
}
.ep-time-head {
    position: relative;
    min-width: 840px;
}
.ep-time-head span {
    position: absolute;
    bottom: 14px;
    transform: translateX(-50%);
    color: #071845;
    font-size: 13px;
    font-weight: 700;
}
.ep-row {
    display: grid;
    grid-template-columns: 176px minmax(840px, 1fr);
    min-height: 91px;
    border-bottom: 1px solid #e9eef7;
}
.ep-person {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-right: 1px solid #e9eef7;
    min-width: 0;
}
.ep-person .avatar-kreis {
    width: 34px;
    height: 34px;
}
.ep-person-text {
    min-width: 0;
    flex: 1;
}
.ep-person-text strong {
    display: block;
    font-size: 12.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #071845;
}
.ep-person-text span {
    display: block;
    margin-top: 3px;
    color: #49618a;
    font-size: 11.5px;
}
.ep-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid transparent;
}
.ep-dot.aktiv { background: #16a66a; }
.ep-dot.frei { background: #f4a516; }
.ep-dot.abw { background: #fff; border-color: #7590be; }
.ep-lane {
    position: relative;
    min-width: 840px;
    background: #fff;
}
.ep-gridline {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #e9eef7;
}
.ep-event {
    position: absolute;
    top: 13px;
    bottom: 13px;
    min-width: 118px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 34px 10px 14px;
    border-radius: 5px;
    border: 1px solid color-mix(in srgb, var(--bf) 48%, #fff);
    background: color-mix(in srgb, var(--bf) 10%, #fff);
    color: #071845;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
    overflow: hidden;
}
.ep-event.ep-unterhalt { --ep-bg: #eef5ff; --ep-border: #9fc1ff; --ep-accent: #1268f3; }
.ep-event.ep-grund { --ep-bg: #edf9f2; --ep-border: #9bd9b8; --ep-accent: #1ca96c; }
.ep-event.ep-glas { --ep-bg: #eff6ff; --ep-border: #a9c8ff; --ep-accent: #5b95f5; }
.ep-event.ep-sonder { --ep-bg: #fff8e8; --ep-border: #f8cc76; --ep-accent: #f4a516; }
.ep-event.ep-zimmer { --ep-bg: #f7efff; --ep-border: #cc9cf4; --ep-accent: #a24be8; }
.ep-event.ep-unterhalt,
.ep-event.ep-grund,
.ep-event.ep-glas,
.ep-event.ep-sonder,
.ep-event.ep-zimmer {
    background: var(--ep-bg);
    border-color: var(--ep-border);
}
.ep-event.aktiv {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ep-accent, #1268f3), 0 12px 24px rgba(7,24,69,.12);
    z-index: 8;
}
.ep-event i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ep-accent, #1268f3);
    opacity: .95;
    display: inline-flex;
}
.ep-event:hover {
    text-decoration: none;
    filter: brightness(.985);
    z-index: 5;
}
.ep-event strong {
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ep-event span {
    color: #234066;
    margin-top: 4px;
    font-size: 12px;
}
.ep-event em {
    color: #071845;
    margin-top: 4px;
    font-size: 12px;
    font-style: normal;
}
.ep-event.st-erledigt { opacity: .62; }
.ep-event.st-abgesagt { opacity: .46; text-decoration: line-through; }
.ep-absence {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 20px;
    bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid #dbe5f5;
    background:
        repeating-linear-gradient(-45deg, #f6f8fc, #f6f8fc 4px, #edf2f8 4px, #edf2f8 8px);
    color: #071845;
    font-weight: 800;
    font-size: 12.5px;
    z-index: 2;
}
.ep-empty {
    padding: 22px;
    color: #49618a;
}
.ep-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 26px;
    padding: 16px 20px;
    color: #071845;
    font-size: 12px;
}
.ep-legend span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}
.ep-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.ep-color.ep-unterhalt { background: #1268f3; }
.ep-color.ep-grund { background: #1ca96c; }
.ep-color.ep-glas { background: #5b95f5; }
.ep-color.ep-sonder { background: #f4a516; }
.ep-color.ep-zimmer { background: #a24be8; }
.ep-color.ep-abw { background: #fff; border: 1px solid #7590be; }
.ep-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .78fr);
    gap: 20px;
    margin-top: 20px;
}
.ep-card {
    padding: 18px;
}
.ep-card h3 {
    margin: 0 0 14px;
    font-size: 16px;
    color: #071845;
}
.ep-detail-box {
    border: 1px solid #e1e8f3;
    border-radius: 8px;
    padding: 18px;
    background: #fbfdff;
    transition: box-shadow .18s ease, border-color .18s ease;
}
.ep-detail-box.puls {
    border-color: #9fc1ff;
    box-shadow: 0 0 0 4px rgba(18,104,243,.1);
}
.ep-detail-box h4 {
    margin: 0;
    font-size: 16px;
    color: #071845;
}
.ep-detail-box p {
    margin: 4px 0 14px;
    color: #49618a;
    font-size: 13px;
}
.ep-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 24px;
    font-size: 12.5px;
    color: #49618a;
}
.ep-detail-grid span {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: start;
    gap: 7px;
}
.ep-detail-grid b {
    color: #071845;
    font-weight: 600;
}
.ep-detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}
.ep-note-box {
    min-height: 126px;
    border: 1px solid #dfe7f4;
    border-radius: 8px;
    padding: 16px;
    color: #071845;
    font-size: 13px;
    background: #fff;
}
.ep-notes small {
    display: block;
    margin-top: 16px;
    color: #7184a5;
    font-size: 11.5px;
}
.ep-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.ep-summary {
    padding: 18px 18px 10px;
}
.ep-stat {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    border-bottom: 1px solid #e9eef7;
    color: #071845;
}
.ep-stat:last-child { border-bottom: 0; }
.ep-stat i {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
}
.ep-stat i.blau { background: #e9f1ff; color: #1268f3; }
.ep-stat i.gelb { background: #fff4dc; color: #f4a516; }
.ep-stat i.gruen { background: #e5f8ee; color: #1ca96c; }
.ep-stat i.rot { background: #ffe8e8; color: #f04444; }
.ep-stat span {
    color: #234066;
    font-size: 13px;
}
.ep-stat strong {
    font-size: 14px;
    color: #071845;
}
.ep-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.ep-side-head h3 { margin: 0; }
.ep-side-head span {
    display: flex;
    gap: 14px;
}
.ep-side-head a {
    color: #0b2d66;
    font-size: 18px;
}
.ep-side-head b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 24px;
    border-radius: 8px;
    background: #eef4ff;
    color: #1268f3;
    font-size: 13px;
}
.ep-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.ep-cal-head {
    margin: 18px 0 8px;
    color: #234066;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}
.ep-cal-grid a {
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #0b2d66;
    font-size: 12.5px;
    font-weight: 600;
}
.ep-cal-grid a:hover { background: #edf4ff; text-decoration: none; }
.ep-cal-grid a.fremd { color: #9fb0cc; }
.ep-cal-grid a.aktiv {
    background: #1268f3;
    color: #fff;
}
.ep-un-card {
    display: block;
    border: 1px solid #cfdcf2;
    border-radius: 7px;
    padding: 12px;
    margin-top: 10px;
    background: color-mix(in srgb, #1268f3 7%, #fff);
    color: #071845;
}
.ep-un-card:nth-of-type(2n) {
    background: color-mix(in srgb, #1ca96c 9%, #fff);
}
.ep-un-card:hover { text-decoration: none; filter: brightness(.985); }
.ep-un-card strong {
    display: block;
    font-size: 13px;
}
.ep-un-card span, .ep-un-card em {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: #234066;
    font-style: normal;
}
.ep-all {
    display: block;
    margin-top: 12px;
    text-align: center;
    height: 34px;
    line-height: 34px;
    border: 1px solid #dbe5f5;
    border-radius: 7px;
    color: #1268f3;
    font-weight: 700;
    font-size: 13px;
}
.ep-all:hover { background: #f5f8ff; text-decoration: none; }
.ep-muted {
    margin: 0;
    color: #7184a5;
    font-size: 13px;
}

@media (max-width: 1420px) {
    .ep-layout { grid-template-columns: 1fr; }
    .ep-side { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .ep-topline { grid-template-columns: 1fr; }
    .ep-date-nav { justify-self: stretch; }
    .ep-actions { justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; }
    .ep-board { overflow-x: auto; }
    .ep-board-head, .ep-row { width: 1016px; }
    .ep-bottom, .ep-side { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .ep-tabs a { min-width: 0; flex: 1; }
    .ep-tabs { display: flex; }
    .ep-date-nav { min-width: 0; }
    .ep-card { padding: 14px; }
    .ep-detail-grid { grid-template-columns: 1fr; }
    .ep-detail-actions { justify-content: stretch; flex-direction: column; }
    .ep-detail-actions .btn { text-align: center; }
}

/* ---------- Kalender: mobile Listenansicht ---------- */
.mobil-liste { display: none; }
.mobil-tag {
    background: #fff;
    border: 1px solid var(--grau-100);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
    margin-bottom: 10px;
    overflow: hidden;
}
.mobil-tag-kopf {
    padding: 9px 14px;
    font-weight: 700;
    font-size: 13.5px;
    background: var(--grau-50);
    border-bottom: 1px solid var(--grau-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--navy);
}
.mobil-tag.heute .mobil-tag-kopf {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
    color: #fff;
}
.mobil-tag.heute .mobil-tag-kopf a { color: #fff; }
.mobil-tag-inhalt { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.mobil-tag-inhalt:empty { display: none; }
.termin-karte {
    display: block;
    border-left: 4px solid var(--primaer);
    background: var(--primaer-hell);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--grau-800);
}
.termin-karte:hover { background: var(--blau-100); text-decoration: none; }
.termin-karte .zeit { font-weight: 700; color: var(--primaer-dunkel); }
.termin-karte .kunde { color: var(--grau-600); }
.termin-karte.st-erledigt { opacity: .55; border-left-color: var(--gruen); }
.termin-karte.st-abgesagt { opacity: .5; border-left-color: var(--rot); text-decoration: line-through; }
.termin-karte .ma-punkte { margin-top: 2px; display: flex; gap: 3px; }

@media (max-width: 820px) {
    .wochenplan { display: none; }
    .mobil-liste { display: block; }
    .karten-reihe { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .kennzahl { padding: 10px; }
    .kennzahl .zahl { font-size: 22px; }
    .kennzahl .label { font-size: 12px; }
}

/* ---------- Preisliste ---------- */
.preis-raster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.preis-karte {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    color: inherit;
    transition: box-shadow .12s ease, transform .12s ease;
}
.preis-karte:hover {
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .14);
    transform: translateY(-2px);
}
.preis-karte.inaktiv { opacity: .55; }
.kategorie-kachel {
    padding: 26px 20px;
    text-align: center;
    align-items: center;
    gap: 10px;
}
.kategorie-kachel .preis-name { font-size: 17px; }
.kategorie-kachel .preis-fuss { padding-top: 0; }
.kachel-zusatz {
    background: var(--primaer-hell);
    border: 1px dashed var(--blau-200);
}
.preis-fuss {
    margin-top: auto;
    padding-top: 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primaer);
}
.leistungen-liste {
    margin: 0;
    padding: 0;
    list-style: none;
}
.leistungen-liste li {
    padding: 5px 0 5px 26px;
    position: relative;
}
.leistungen-liste li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: var(--gruen);
    font-weight: 700;
}
.preis-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--navy);
}
.preis-betrag {
    font-weight: 800;
    font-size: 22px;
    color: var(--primaer);
    margin: 4px 0 6px;
}
.preis-beschreibung {
    color: var(--grau-600);
    font-size: 13.5px;
}

/* ---------- Preislisten Dashboard ---------- */
.pl-page {
    --pl-text: #071845;
    --pl-muted: #50658f;
    --pl-line: #e2e8f0;
    color: var(--pl-text);
}
.pl-topline {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 18px;
}
.pl-date-nav {
    width: min(420px, 100%);
    min-height: 44px;
    border: 1px solid var(--grau-100);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px rgba(15, 23, 42, .05);
    display: grid;
    grid-template-columns: 24px 1fr 32px 32px;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
}
.pl-date-nav strong { font-size: 14px; }
.pl-date-nav span {
    display: grid;
    place-items: center;
    color: var(--pl-text);
    font-size: 22px;
}
.pl-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}
.pl-kpi,
.pl-card {
    background: #fff;
    border: 1px solid var(--grau-100);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px rgba(15, 23, 42, .05);
}
.pl-kpi {
    position: relative;
    min-height: 108px;
    padding: 22px 86px 20px 22px;
}
.pl-kpi span {
    display: block;
    color: var(--grau-600);
    font-size: 13.5px;
    font-weight: 600;
}
.pl-kpi strong {
    display: block;
    margin: 7px 0 6px;
    color: var(--navy);
    font-size: 27px;
    line-height: 1.12;
    letter-spacing: -.025em;
}
.pl-kpi small {
    color: var(--grau-600);
    font-size: 12.5px;
    font-weight: 650;
}
.pl-kpi i {
    position: absolute;
    right: 22px;
    top: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-style: normal;
    font-size: 28px;
    font-weight: 700;
}
.pl-kpi i.blau { background: #dbeafe; color: #1467f2; }
.pl-kpi i.gruen { background: #dcfce7; color: #16a66a; }
.pl-kpi i.orange { background: #ffedd5; color: #f28c18; }
.pl-kpi i.lila { background: #f3e8ff; color: #8b35e8; }
.pl-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.pl-card { padding: 22px; }
.pl-left { min-height: 592px; }
.pl-card-head,
.pl-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}
.pl-section-head.compact {
    align-items: center;
    margin-bottom: 12px;
}
.pl-card h3,
.pl-section-head h2 {
    margin: 0;
    color: var(--pl-text);
    font-size: 18px;
    line-height: 1.2;
}
.pl-section-head p {
    margin: 8px 0 0;
    color: var(--pl-muted);
    font-size: 13px;
    font-weight: 600;
}
.pl-icon-btn,
.pl-actions-top a {
    min-height: 38px;
    border: 1px solid var(--pl-line);
    border-radius: 10px;
    background: #fff;
    color: var(--pl-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 800;
}
.pl-icon-btn {
    width: 34px;
    min-height: 34px;
    padding: 0;
    font-size: 20px;
}
.pl-actions-top {
    display: flex;
    gap: 10px;
}
.pl-actions-top .pl-more {
    width: 42px;
    padding: 0;
    font-size: 18px;
}
.pl-cat-list {
    display: grid;
    gap: 11px;
}
.pl-cat {
    min-height: 52px;
    border: 1px solid var(--pl-line);
    border-radius: 8px;
    background: #fff;
    color: var(--pl-text);
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
}
.pl-cat:hover {
    text-decoration: none;
    border-color: #9ec5ff;
}
.pl-cat.aktiv {
    border-color: #8dbbff;
    background: #eef6ff;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .12);
}
.pl-cat strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13.5px;
}
.pl-cat em {
    min-width: 32px;
    height: 26px;
    border: 1px solid #cfe1ff;
    border-radius: 999px;
    color: #0b63f6;
    display: grid;
    place-items: center;
    font-style: normal;
    font-size: 12px;
    font-weight: 800;
}
.pl-cat-icon {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    font-weight: 900;
}
.pl-cat-icon.blau { color: #0b63f6; }
.pl-cat-icon.gruen { color: #16a66a; }
.pl-cat-icon.orange { color: #f28c18; }
.pl-cat-icon.lila { color: #8b35e8; }
.pl-note {
    margin-top: 24px;
    min-height: 54px;
    border-radius: 8px;
    background: #eef6ff;
    color: #0b63f6;
    display: grid;
    grid-template-columns: 20px 1fr;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    font-size: 12.5px;
    font-weight: 650;
}
.pl-main {
    min-width: 0;
    display: grid;
    gap: 18px;
}
.pl-table-card {
    padding: 22px 22px 14px;
}
.pl-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--pl-line);
    border-radius: 8px;
}
.pl-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}
.pl-table th {
    height: 45px;
    padding: 0 14px;
    text-align: left;
    background: #fbfdff;
    border-bottom: 1px solid var(--pl-line);
    color: var(--pl-text);
    font-size: 12px;
    font-weight: 800;
}
.pl-table td {
    height: 46px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--pl-line);
    color: var(--pl-text);
    font-size: 13px;
    font-weight: 620;
    white-space: nowrap;
}
.pl-table tr:last-child td { border-bottom: 0; }
.pl-table td strong { font-weight: 800; }
.pl-empty {
    color: var(--pl-muted) !important;
    text-align: center;
}
.pl-row-actions {
    width: 92px;
    text-align: right;
}
.pl-row-actions,
.pl-row-actions form {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.pl-row-actions a,
.pl-row-actions button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--pl-line);
    border-radius: 7px;
    background: #fff;
    color: var(--pl-text);
    display: grid;
    place-items: center;
    padding: 0;
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}
.pl-row-actions button {
    color: #ef4444;
}
.pl-add-link {
    display: inline-flex;
    margin-top: 14px;
    color: #0b63f6;
    font-size: 12.5px;
    font-weight: 800;
}
.pl-extra .pl-add-link { margin-top: 0; }
@media (max-width: 1450px) {
    .pl-layout {
        grid-template-columns: 280px minmax(0, 1fr);
    }
}

@media (max-width: 1050px) {
    .pl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pl-layout { grid-template-columns: 1fr; }
    .pl-left { min-height: 0; }
}

@media (max-width: 640px) {
    .pl-topline { justify-content: stretch; }
    .pl-date-nav { width: 100%; }
    .pl-kpis { grid-template-columns: 1fr; }
    .pl-kpi { min-height: 98px; padding: 18px 78px 16px 18px; }
    .pl-kpi strong { font-size: 25px; }
    .pl-card,
    .pl-table-card { padding: 16px; }
    .pl-card-head,
    .pl-section-head {
        flex-direction: column;
        align-items: stretch;
    }
    .pl-actions-top { flex-wrap: wrap; }
    .pl-table { min-width: 720px; }
}

/* ---------- Einsatz-Fotos ---------- */
.foto-raster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.foto-karte {
    border: 1px solid var(--grau-200);
    border-radius: 12px;
    overflow: hidden;
    background: var(--grau-50);
}
.foto-karte img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}
.foto-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 8px;
}
input[type=file] {
    width: 100%;
    padding: 7px;
    border: 1px dashed var(--grau-200);
    border-radius: 10px;
    font-size: 13px;
    background: var(--grau-50);
}

/* ---------- Tagesplan / Einsätze ---------- */
.einsatz { padding: 14px 18px; }
.einsatz-kopf {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.einsatz-zeit {
    font-weight: 800;
    font-size: 17px;
    color: var(--primaer-dunkel);
    white-space: nowrap;
}
.einsatz-titel { font-size: 16px; color: var(--navy); }
.einsatz-raster {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    font-size: 14px;
}
.einsatz-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 700;
    color: var(--grau-400);
    margin-bottom: 2px;
}
.nur-druck { display: none; }

/* ---------- Druckansicht ---------- */
@media print {
    body { background: #fff; font-size: 12.5px; }
    .topbar, .fusszeile, .kein-druck, .flash { display: none !important; }
    .inhalt { max-width: none; margin: 0; padding: 0; }
    .karte {
        box-shadow: none;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        padding: 10px 14px;
        margin-bottom: 8px;
        break-inside: avoid;
    }
    .nur-druck { display: block; }
    .druck-titel {
        font-size: 16px;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 2px solid #0a1733;
    }
    .abw-badge.dunkel { border: 1px solid #d6c08a; }
}

/* ---------- Feinschliff ---------- */
::-webkit-scrollbar { height: 10px; width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--grau-200);
    border-radius: 99px;
    border: 2px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--grau-400); background-clip: content-box; }
::selection { background: var(--blau-100); }

.wochenplan, .monatsplan, .preis-karte, .mobil-tag {
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px rgba(15, 23, 42, .05);
}
.wp-termin { transition: filter .12s ease, min-height .12s ease; }
.m-termin, .termin-karte, .abw-badge { transition: filter .12s ease, background .12s ease; }

/* Kennzahl-Karten: Akzentlinie oben + sanfter Hover-Lift */
.karte.kennzahl {
    position: relative;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}
.karte.kennzahl::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primaer) 0%, #38bdf8 100%);
    opacity: .85;
}
.karte.kennzahl:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(15, 23, 42, .06), 0 18px 38px -16px rgba(15, 23, 42, .22);
}

/* Seiteninhalt sanft einblenden (nur Bewegung, kein opacity:0 –
   sonst bleibt Inhalt bei manchen Render-/Headless-Zuständen unsichtbar) */
.inhalt { animation: seite-rein .25s ease both; }
@keyframes seite-rein {
    from { transform: translateY(5px); }
    to { transform: none; }
}

/* ---------- Benachrichtigungen (Vercel-Stil: Popover + Bottom-Sheet) ---------- */
.glocke-wrap { position: relative; }
.glocke {
    background: var(--grau-100);
    border: 1px solid var(--grau-200);
    color: var(--grau-600);
    width: 40px; height: 40px;
    border-radius: 11px;
    cursor: pointer; position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.glocke:hover { background: #fff; color: var(--navy); box-shadow: 0 2px 8px rgba(15,23,42,.1); }
.glocke .ic { display: block; }
/* Grüner Ping-Punkt statt Zahl */
.glocke-ping { position: absolute; top: -2px; right: -2px; width: 10px; height: 10px; }
.glocke-ping .ping-welle, .glocke-ping .ping-kern {
    position: absolute; inset: 0; border-radius: 50%; background: #22c55e;
}
.glocke-ping .ping-welle { opacity: .75; animation: glocke-ping 1.5s cubic-bezier(0,0,.2,1) infinite; }
.glocke-ping .ping-kern { border: 2px solid #fff; }
@keyframes glocke-ping { 75%, 100% { transform: scale(2.2); opacity: 0; } }

.glocke-overlay { display: none; }

.glocke-panel {
    display: none;
    position: fixed; right: 24px; top: 66px;
    width: 360px; max-width: calc(100vw - 28px);
    max-height: 50vh;
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--grau-200);
    box-shadow: 0 20px 48px -12px rgba(15, 23, 42, .4);
    z-index: 320; overflow: hidden;
    flex-direction: column;
}
.glocke-wrap.offen { z-index: 310; }
.glocke-wrap.offen .glocke-panel { display: flex; animation: glocke-rein .16s ease; }
.glocke-leer[hidden] { display: none; }
@keyframes glocke-rein { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.glocke-griff { display: none; }

/* Tab-Leiste */
.glocke-tabs {
    display: flex; align-items: center; justify-content: space-between;
    height: 46px; border-bottom: 1px solid var(--grau-100); padding: 0 6px; flex-shrink: 0;
}
.gt-liste { display: flex; height: 100%; }
.gt {
    position: relative; background: none; border: none; cursor: pointer;
    padding: 0 14px; height: 100%; font-size: 13.5px; font-weight: 500;
    color: var(--grau-400); transition: color .15s ease;
    display: inline-flex; align-items: center; gap: 6px;
}
.gt:hover { color: var(--navy); }
.gt.aktiv { color: var(--navy); font-weight: 600; }
.gt.aktiv::after {
    content: ""; position: absolute; bottom: 0; left: 10px; right: 10px;
    height: 2px; background: var(--navy); border-radius: 2px;
}
.gt-zahl {
    background: var(--primaer); color: #fff; font-size: 10px; font-weight: 700;
    border-radius: 99px; padding: 1px 6px; min-width: 16px; text-align: center;
}
.gt-settings {
    width: 32px; height: 32px; border-radius: 8px; margin-right: 2px;
    display: flex; align-items: center; justify-content: center; color: var(--grau-400);
}
.gt-settings:hover { background: var(--grau-100); color: var(--navy); text-decoration: none; }
.gt-settings .ic { display: block; }

/* Liste */
.glocke-body { flex: 1; overflow-y: auto; min-height: 0; }
.glocke-body[data-filter="ungelesen"] .gn[data-status="gelesen"] { display: none; }
.glocke-body[data-filter="gelesen"] .gn[data-status="ungelesen"] { display: none; }
.gn {
    display: flex; align-items: center; gap: 11px;
    padding: 12px 14px; border-bottom: 1px solid var(--grau-50);
    color: var(--grau-800); text-decoration: none; position: relative;
    transition: background .12s ease;
}
.gn:last-of-type { border-bottom: none; }
.gn:hover { background: var(--grau-50); text-decoration: none; }
.gn-icon { color: var(--grau-400); flex-shrink: 0; display: flex; }
.gn-icon .ic { display: block; }
.gn.ungelesen .gn-icon { color: var(--primaer); }
.gn-haupt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gn-text { font-size: 13px; line-height: 1.35; color: var(--grau-800); }
.gn.ungelesen .gn-text { font-weight: 600; color: var(--navy); }
.gn-zeit { font-size: 11.5px; color: var(--grau-400); margin-top: 1px; }
.gn-punkt { width: 7px; height: 7px; border-radius: 50%; background: var(--primaer); flex-shrink: 0; }

.glocke-leer {
    padding: 36px 14px; color: var(--grau-400); font-size: 13.5px;
    display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.glocke-leer-icon {
    width: 46px; height: 46px; border-radius: 50%; background: var(--grau-100);
    display: flex; align-items: center; justify-content: center; color: var(--grau-400);
}

.glocke-fuss { flex-shrink: 0; border-top: 1px solid var(--grau-100); }
.glocke-fuss a {
    display: block; text-align: center; padding: 11px; font-size: 13px;
    font-weight: 600; color: var(--grau-600);
}
.glocke-fuss a:hover { background: var(--grau-50); color: var(--navy); text-decoration: none; }

/* Benachrichtigungs-Seite */
.ben-zeile {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--grau-800);
    font-size: 14px;
}
.ben-zeile:hover { background: var(--grau-50); text-decoration: none; }
.ben-zeile small { margin-left: auto; color: var(--grau-400); white-space: nowrap; }
.ben-punkt {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--grau-200);
    flex-shrink: 0;
}
.ben-zeile.ungelesen { font-weight: 600; }
.ben-zeile.ungelesen .ben-punkt { background: var(--primaer); }

/* Terminliste: Zeilen in Kategoriefarbe getönt */
table.liste tr.termin-zeile:hover td { background: rgba(15, 23, 42, .04); }

/* ---------- Stempeluhr ---------- */
.stempeluhr {
    border-left: 4px solid var(--primaer);
}
.timer-zeile {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.timer-anzeige {
    font-variant-numeric: tabular-nums;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--navy);
    background: var(--primaer-hell);
    border-radius: 12px;
    padding: 6px 16px;
}
.timer-hinweis {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--grau-600);
}
.legende {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    margin-top: 12px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--grau-600);
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .05);
    border-radius: 14px;
}
.legende strong { color: var(--navy); font-size: 12.5px; }
.legende span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }

/* ---------- Zeiterfassung Referenzlayout ---------- */
.zt-page {
    --zt-text: #07194a;
    --zt-muted: #52658f;
    --zt-line: #dfe7f3;
    --zt-soft: #f7faff;
    color: var(--zt-text);
}
.zt-topbar {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(280px, 430px) minmax(320px, auto);
    gap: 14px;
    align-items: center;
    margin: 0 0 16px;
}
.zt-tabs,
.zt-range,
.zt-actions form select,
.zt-filter {
    border: 1px solid var(--zt-line);
    background: #fff;
    box-shadow: 0 6px 18px rgba(7, 25, 74, .035);
}
.zt-tabs {
    display: inline-flex;
    width: max-content;
    border-radius: 8px;
    overflow: hidden;
}
.zt-tabs a {
    min-width: 108px;
    padding: 12px 18px;
    color: var(--zt-text);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    border-right: 1px solid var(--zt-line);
}
.zt-tabs a:last-child { border-right: 0; }
.zt-tabs a.aktiv {
    color: #fff;
    background: linear-gradient(180deg, #2385ff 0%, #0b63f6 100%);
}
.zt-range {
    min-height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 14px;
}
.zt-range a {
    color: var(--zt-text);
    font-size: 24px;
    line-height: 1;
    padding: 6px 10px;
}
.zt-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}
.zt-actions form { margin: 0; }
.zt-actions form select,
.zt-filter {
    min-height: 42px;
    border-radius: 8px;
    color: var(--zt-text);
    font-weight: 700;
    font-size: 13px;
}
.zt-actions form select {
    min-width: 170px;
    padding: 0 34px 0 14px;
}
.zt-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    padding: 0 16px;
}
.zt-mobile-timer { display: none; }
.zt-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}
.zt-main,
.zt-side {
    min-width: 0;
}
.zt-side {
    display: grid;
    gap: 16px;
}
.zt-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.zt-kpi,
.zt-card {
    background: #fff;
    border: 1px solid var(--zt-line);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(7, 25, 74, .035);
}
.zt-kpi {
    position: relative;
    min-height: 106px;
    padding: 22px 76px 18px 22px;
}
.zt-kpi span,
.zt-kpi small,
.zt-table th,
.zt-table small,
.zt-muted,
.zt-card h3 small,
.zt-start p,
.zt-hints p {
    color: var(--zt-muted);
}
.zt-kpi span,
.zt-kpi small {
    display: block;
    font-size: 13px;
    font-weight: 600;
}
.zt-kpi strong {
    display: block;
    margin: 8px 0 4px;
    color: var(--zt-text);
    font-size: 23px;
    line-height: 1;
}
.zt-kpi i {
    position: absolute;
    right: 24px;
    top: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-style: normal;
}
.zt-kpi i.blau { color: #0b63f6; background: #dbeafe; }
.zt-kpi i.gruen { color: #12a464; background: #dcfce7; }
.zt-kpi i.gelb { color: #f59e0b; background: #fef3c7; }
.zt-kpi i.lila { color: #9333ea; background: #f3e8ff; }
.zt-kpi i.tuerkis { color: #0891b2; background: #cffafe; }
.zt-card {
    padding: 18px;
}
.zt-card h3,
.zt-card-head h3 {
    margin: 0 0 14px;
    color: var(--zt-text);
    font-size: 17px;
    line-height: 1.25;
}
.zt-table-card {
    padding: 0;
    overflow: hidden;
}
.zt-card-head {
    padding: 18px 20px 0;
}
.zt-table-wrap {
    overflow-x: auto;
}
.zt-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: collapse;
}
.zt-table th {
    height: 44px;
    padding: 0 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 800;
    background: #fbfdff;
    border-bottom: 1px solid var(--zt-line);
}
.zt-table td {
    height: 64px;
    padding: 9px 16px;
    color: var(--zt-text);
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid var(--zt-line);
    vertical-align: middle;
    white-space: nowrap;
}
.zt-table tr:last-child td { border-bottom: 0; }
.zt-table td > strong,
.zt-table td small {
    display: block;
}
.zt-table td small {
    margin-top: 3px;
    font-size: 12px;
    font-weight: 600;
}
.zt-person,
.zt-top-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.zt-person span {
    display: grid;
    min-width: 0;
}
.zt-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    min-height: 26px;
    border-radius: 5px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 800;
}
.zt-status.ok {
    color: #07915c;
    background: #dff6eb;
}
.zt-status.laufend {
    color: #0b63f6;
    background: #dbeafe;
}
.zt-row-actions a {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 28px;
    border: 1px solid var(--zt-line);
    border-radius: 6px;
    color: var(--zt-text);
    font-weight: 900;
    letter-spacing: 1px;
}
.zt-empty {
    text-align: center;
    color: var(--zt-muted) !important;
}
.zt-more {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    color: #0b63f6;
    font-size: 13px;
    font-weight: 800;
    border-top: 1px solid var(--zt-line);
}
.zt-bottom {
    display: grid;
    grid-template-columns: minmax(300px, 1.15fr) minmax(320px, 1fr) minmax(230px, .65fr);
    gap: 16px;
    margin-top: 16px;
}
.zt-day-list {
    display: grid;
    gap: 8px;
}
.zt-day-item,
.zt-day-total {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    min-height: 52px;
    padding: 10px 14px;
    border: 1px solid var(--zt-line);
    border-radius: 7px;
    background: #fff;
    color: var(--zt-text);
}
.zt-day-item strong,
.zt-day-total strong {
    min-width: 0;
}
.zt-day-item small {
    display: block;
    margin-top: 3px;
    color: var(--zt-muted);
    font-size: 12px;
}
.zt-day-item b,
.zt-day-total b {
    color: #059669;
}
.zt-day-total {
    grid-template-columns: minmax(0, 1fr) auto;
    background: #fbfdff;
    font-weight: 800;
}
.zt-form {
    display: grid;
    gap: 12px;
}
.zt-form label {
    display: grid;
    gap: 6px;
    color: var(--zt-muted);
    font-size: 12px;
    font-weight: 700;
}
.zt-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.zt-form .btn {
    width: 100%;
}
.zt-export {
    display: flex;
    flex-direction: column;
}
.zt-export a,
.zt-hints p {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--zt-line);
    border-radius: 7px;
    color: var(--zt-text);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}
.zt-export a:last-child {
    justify-content: center;
    margin: 6px 0 0;
    border: 0;
    color: #0b63f6;
}
.zt-start p {
    margin: -4px 0 16px;
    font-size: 13px;
}
.zt-start .btn {
    width: 100%;
    min-height: 44px;
}
.zt-donut {
    width: 150px;
    height: 150px;
    margin: 10px auto 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(#2563eb 0 var(--a), #10b981 var(--a) var(--b), #fbbf24 var(--b) var(--c), #8b5cf6 var(--c) 100%);
}
.zt-donut::before {
    content: "";
    grid-area: 1 / 1;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #fff;
}
.zt-donut span {
    grid-area: 1 / 1;
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    text-align: center;
}
.zt-donut strong {
    font-size: 18px;
}
.zt-donut small {
    color: var(--zt-muted);
    font-size: 11px;
}
.zt-chart-list {
    display: grid;
    gap: 11px;
}
.zt-chart-list div {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    color: var(--zt-text);
    font-size: 13px;
}
.zt-chart-list i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2563eb;
}
.zt-chart-list div:nth-child(2) i { background: #10b981; }
.zt-chart-list div:nth-child(3) i { background: #fbbf24; }
.zt-chart-list div:nth-child(4) i { background: #8b5cf6; }
.zt-chart-list b {
    color: var(--zt-muted);
    font-weight: 700;
}
.zt-top-row {
    min-height: 40px;
    border-bottom: 1px solid var(--zt-line);
    font-size: 13px;
}
.zt-top-row:last-child { border-bottom: 0; }
.zt-top-row strong {
    flex: 1;
}
.zt-top-row span {
    color: var(--zt-text);
    font-weight: 800;
}
.zt-hints p {
    margin: 0 0 10px;
    color: var(--zt-muted);
    background: #fbfdff;
}

@media (max-width: 1420px) {
    .zt-topbar { grid-template-columns: 1fr; }
    .zt-range { max-width: 430px; }
    .zt-actions { justify-content: flex-start; }
    .zt-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .zt-bottom { grid-template-columns: 1fr 1fr; }
    .zt-export { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
    .zt-layout { grid-template-columns: 1fr; }
    .zt-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .zt-start { display: none; }
    .zt-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .zt-page { margin: -4px -2px 0; }
    .zt-topbar {
        gap: 10px;
        margin-bottom: 12px;
    }
    .zt-tabs {
        width: 100%;
        overflow-x: auto;
    }
    .zt-tabs a {
        flex: 1 0 118px;
        min-width: 0;
        padding: 11px 10px;
    }
    .zt-range {
        max-width: none;
        width: 100%;
        font-size: 13px;
    }
    .zt-actions {
        overflow-x: auto;
        padding-bottom: 2px;
    }
    .zt-actions form select,
    .zt-filter {
        min-width: 144px;
    }
    .zt-mobile-timer {
        display: flex;
        justify-content: center;
        margin: 10px 0 16px;
    }
    .zt-timer-circle {
        width: 152px;
        height: 152px;
        border: 0;
        border-radius: 50%;
        color: #fff;
        background: radial-gradient(circle at 35% 28%, #ff7a7a 0, #ef4444 42%, #b91c1c 100%);
        box-shadow: 0 16px 34px rgba(239, 68, 68, .32);
        display: grid;
        place-items: center;
        align-content: center;
        gap: 5px;
        cursor: pointer;
    }
    .zt-timer-circle span {
        display: block;
        font-size: 27px;
        font-weight: 900;
        font-variant-numeric: tabular-nums;
        line-height: 1;
    }
    .zt-timer-circle small {
        color: rgba(255,255,255,.88);
        font-size: 13px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .05em;
    }
.zt-timer-circle.laeuft {
        background: radial-gradient(circle at 35% 28%, #fb7185 0, #dc2626 48%, #991b1b 100%);
    }
    .zt-kpis,
    .zt-bottom,
    .zt-side {
        grid-template-columns: 1fr;
    }
    .zt-kpi {
        min-height: 92px;
        padding: 18px 76px 16px 18px;
    }
    .zt-card { padding: 16px; }
    .zt-table-card { padding: 0; }
    .zt-table { min-width: 980px; }
    .zt-form-grid { grid-template-columns: 1fr 1fr; }
    .zt-day-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

/* ---------- Mitarbeiter Referenzlayout ---------- */
.ma-page {
    --ma-text: #071845;
    --ma-muted: #50658f;
    --ma-line: #dfe7f3;
    color: var(--ma-text);
}
.ma-topline {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 18px;
}
.ma-date-nav {
    width: min(420px, 100%);
    min-height: 44px;
    border: 1px solid var(--grau-100);
    border-radius: 16px;
    background: #fff;
    display: grid;
    grid-template-columns: 26px 1fr 34px 34px;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px rgba(15, 23, 42, .05);
}
.ma-date-nav strong {
    font-size: 14px;
}
.ma-date-nav a {
    color: var(--ma-text);
    font-size: 22px;
    text-align: center;
}
.ma-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.ma-kpi,
.ma-card {
    background: #fff;
    border: 1px solid var(--grau-100);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px rgba(15, 23, 42, .05);
}
.ma-kpi {
    position: relative;
    min-height: 108px;
    padding: 20px 82px 20px 22px;
}
.ma-kpi span {
    display: block;
    color: var(--grau-600);
    font-size: 13.5px;
    font-weight: 600;
}
.ma-kpi small {
    display: block;
    color: var(--grau-400);
    font-size: 12.5px;
    font-weight: 650;
}
.ma-kpi strong {
    display: block;
    margin: 6px 0;
    font-size: 32px;
    line-height: 1.15;
    color: var(--navy);
    letter-spacing: -.03em;
}
.ma-kpi i {
    position: absolute;
    right: 22px;
    top: 20px;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
}
.ma-kpi i.lila { background: #f3e8ff; color: #8b35e8; }
.ma-kpi i.gruen { background: #dcfce7; color: #16a66a; }
.ma-kpi i.orange { background: #fff1df; color: #f28c18; }
.ma-kpi i.blau { background: #e9f1ff; color: #1268f3; }
.ma-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 20px;
    align-items: start;
}
.ma-main,
.ma-side {
    min-width: 0;
}
.ma-side {
    display: grid;
    gap: 14px;
}
.ma-card {
    padding: 22px;
}
.ma-card h3 {
    margin: 0;
    font-size: 17px;
    color: var(--ma-text);
}
.ma-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}
.ma-card-head.compact {
    margin-bottom: 14px;
}
.ma-card-head a {
    color: #0b63f6;
    font-size: 12px;
    font-weight: 800;
}
.ma-table-card {
    padding: 22px 22px 0;
}
.ma-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 1;
}
.ma-tools select,
.ma-search,
.ma-icon-btn,
.ma-pagination select {
    height: 40px;
    border: 1px solid var(--grau-200);
    border-radius: 12px;
    background: #fff;
    color: var(--ma-text);
    font-weight: 700;
    font-size: 13px;
}
.ma-tools select {
    min-width: 150px;
    padding: 0 12px;
}
.ma-search {
    width: min(320px, 100%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
}
.ma-search input {
    border: 0;
    box-shadow: none;
    height: 38px;
    padding: 0;
    min-width: 0;
}
.ma-search input:focus {
    outline: 0;
    box-shadow: none;
}
.ma-icon-btn {
    width: 40px;
    display: grid;
    place-items: center;
    cursor: pointer;
}
.ma-table-wrap {
    overflow-x: auto;
    margin: 0 -22px;
}
.ma-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}
.ma-table th {
    height: 46px;
    padding: 0 20px;
    text-align: left;
    color: var(--ma-text);
    background: #fbfdff;
    border-top: 1px solid var(--ma-line);
    border-bottom: 1px solid var(--ma-line);
    font-size: 12px;
    font-weight: 800;
}
.ma-table td {
    height: 62px;
    padding: 8px 20px;
    border-bottom: 1px solid var(--ma-line);
    color: var(--ma-text);
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
}
.ma-table tr.aktiv td,
.ma-table tbody tr:hover td {
    background: #f7fbff;
}
.ma-person {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--ma-text);
}
.ma-person:hover {
    text-decoration: none;
}
.ma-person span {
    display: grid;
    min-width: 0;
}
.ma-person strong {
    font-size: 13px;
}
.ma-person small {
    color: var(--ma-muted);
    font-size: 12px;
}
.ma-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 800;
}
.ma-pill.team.unterhalt { background: #dbeafe; color: #0757d5; }
.ma-pill.team.glas { background: #e0f2fe; color: #0369a1; }
.ma-pill.team.grund { background: #dcfce7; color: #15803d; }
.ma-pill.team.sonder { background: #fff2d9; color: #d97706; }
.ma-pill.job.vollzeit { background: #dcfce7; color: #15803d; }
.ma-pill.job.teilzeit { background: #ffedd5; color: #ea580c; }
.ma-pill.job.aushilfe { background: #f3e8ff; color: #7e22ce; }
.ma-pill.status.aktiv { background: #dff6eb; color: #07915c; }
.ma-pill.status.inaktiv { background: #eef2f7; color: #475569; }
.ma-row-actions {
    display: flex;
    gap: 8px;
}
.ma-row-actions a {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--grau-200);
    border-radius: 10px;
    color: var(--ma-text);
    font-weight: 900;
}
.ma-empty {
    text-align: center;
    color: var(--ma-muted) !important;
}
.ma-pagination {
    min-height: 58px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    color: var(--ma-muted);
    font-size: 13px;
}
.ma-pagination div {
    display: flex;
    gap: 8px;
}
.ma-pagination a {
    width: 30px;
    height: 30px;
    border: 1px solid var(--grau-200);
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--ma-text);
    font-weight: 800;
}
.ma-pagination a.aktiv {
    background: #0b63f6;
    color: #fff;
}
.ma-bottom {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.ma-muted {
    margin: 0;
    color: var(--ma-muted);
    font-size: 13px;
}
.ma-mini-list {
    display: grid;
    gap: 10px;
}
.ma-mini-list div {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: center;
    gap: 9px;
    font-size: 13px;
}
.ma-mini-list strong {
    display: grid;
    min-width: 0;
}
.ma-mini-list strong small {
    color: var(--ma-muted);
    font-size: 11px;
    font-weight: 600;
}
.ma-mini-list .ma-availability {
    min-width: 96px;
    text-align: center;
    border-radius: 5px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 800;
}
.ma-mini-list .ma-availability.ok { background: #dcfce7; color: #15803d; }
.ma-mini-list .ma-availability.warn { background: #fee2e2; color: #dc2626; }
.ma-detail-head {
    display: flex;
    gap: 14px;
    align-items: center;
    margin: 18px 0;
}
.ma-detail-head > div {
    display: grid;
    gap: 4px;
}
.ma-detail-head strong {
    font-size: 17px;
}
.ma-detail-head small {
    color: var(--ma-muted);
    font-size: 13px;
}
.ma-contact {
    display: grid;
    gap: 10px;
}
.ma-contact p {
    margin: 0;
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 9px;
    align-items: center;
    color: var(--ma-text);
    font-size: 13px;
}
.ma-card hr {
    border: 0;
    border-top: 1px solid var(--ma-line);
    margin: 18px 0;
}
.ma-card h4 {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--ma-text);
}
.ma-detail dl {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 10px 16px;
    margin: 0;
    font-size: 13px;
}
.ma-detail dt {
    color: var(--ma-muted);
}
.ma-detail dd {
    margin: 0;
    font-weight: 700;
}
.ma-checks {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 9px;
    color: var(--ma-text);
    font-size: 13px;
}
.ma-checks li::before {
    content: "✓";
    color: #16a66a;
    font-weight: 900;
    margin-right: 8px;
}
.ma-vacation div {
    min-height: 58px;
    display: flex;
    gap: 12px;
    align-items: center;
    border-radius: 12px;
    background: #f4f8ff;
    padding: 10px;
}
.ma-vacation i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #dbeafe;
    color: #0b63f6;
    font-style: normal;
}
.ma-vacation strong {
    display: grid;
    font-size: 13px;
}
.ma-vacation small {
    margin-top: 3px;
    color: var(--ma-muted);
}
.ma-actions {
    display: grid;
    gap: 10px;
}
.ma-actions a,
.ma-actions button {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--grau-200);
    border-radius: 12px;
    background: #fff;
    color: var(--ma-text);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}
.ma-actions button {
    color: #dc2626;
}

@media (max-width: 1380px) {
    .ma-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ma-layout { grid-template-columns: 1fr; }
    .ma-side { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .ma-kpis,
    .ma-bottom,
    .ma-side {
        grid-template-columns: 1fr;
    }
    .ma-card-head {
        align-items: stretch;
        flex-direction: column;
    }
    .ma-tools {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .ma-search {
        width: 100%;
    }
    .ma-pagination {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .ma-date-nav {
        width: 100%;
    }
    .ma-kpi {
        min-height: 96px;
        padding: 18px 74px 16px 18px;
    }
    .ma-table-card,
    .ma-card {
        padding: 14px;
    }
    .ma-table-wrap {
        margin: 0 -14px;
    }
.ma-table {
    min-width: 900px;
    }
}

/* ---------- Ferien & Absenzen Referenzlayout ---------- */
.fa-page {
    --fa-text: #071845;
    --fa-muted: #50658f;
    --fa-line: #e2e8f0;
    color: var(--fa-text);
}
.fa-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}
.fa-kpi,
.fa-card {
    background: #fff;
    border: 1px solid var(--grau-100);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px rgba(15, 23, 42, .05);
}
.fa-kpi {
    position: relative;
    min-height: 108px;
    padding: 22px 86px 20px 22px;
}
.fa-kpi span {
    display: block;
    color: var(--grau-600);
    font-size: 13.5px;
    font-weight: 600;
}
.fa-kpi strong {
    display: block;
    margin: 8px 0 6px;
    color: var(--navy);
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: -.03em;
}
.fa-kpi small {
    color: var(--grau-600);
    font-size: 12.5px;
    font-weight: 650;
}
.fa-kpi i {
    position: absolute;
    right: 22px;
    top: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-style: normal;
}
.fa-kpi i.orange { background: #fff1df; color: #f59e0b; }
.fa-kpi i.gruen { background: #dcfce7; color: #16a66a; }
.fa-kpi i.lila { background: #f3e8ff; color: #8b35e8; }
.fa-kpi i.blau { background: #dbeafe; color: #0b63f6; }
.fa-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 20px;
    align-items: start;
}
.fa-main {
    min-width: 0;
    display: grid;
    gap: 18px;
}
.fa-side {
    display: grid;
    gap: 18px;
}
.fa-card {
    padding: 22px;
}
.fa-card h3 {
    margin: 0;
    color: var(--fa-text);
    font-size: 18px;
    line-height: 1.2;
}
.fa-card h3 small {
    color: var(--fa-muted);
    font-size: 12px;
    font-weight: 600;
}
.fa-card-head,
.fa-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}
.fa-side-head a {
    color: #0b63f6;
    font-size: 12px;
    font-weight: 800;
}
.fa-tabs {
    display: inline-flex;
    border: 1px solid var(--fa-line);
    border-radius: 8px;
    overflow: hidden;
    background: #f8fbff;
}
.fa-tabs span {
    min-width: 62px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--fa-text);
    font-size: 12px;
    font-weight: 800;
    border-right: 1px solid var(--fa-line);
}
.fa-tabs span:last-child { border-right: 0; }
.fa-tabs .aktiv {
    background: #0b63f6;
    color: #fff;
}
.fa-month-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 34px;
    margin: 0 0 18px;
}
.fa-month-nav a {
    color: var(--fa-text);
    font-size: 24px;
    font-weight: 600;
}
.fa-month-nav strong {
    font-size: 18px;
}
.fa-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 8px;
}
.fa-weekdays span {
    text-align: center;
    color: var(--fa-text);
    font-size: 12px;
    font-weight: 800;
}
.fa-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border: 1px solid var(--fa-line);
    border-radius: 8px;
    overflow: hidden;
}
.fa-day {
    position: relative;
    min-height: 86px;
    border-right: 1px solid var(--fa-line);
    border-bottom: 1px solid var(--fa-line);
    background: #fff;
    padding: 12px 8px 8px;
}
.fa-day:nth-child(7n) { border-right: 0; }
.fa-day:nth-last-child(-n+7) { border-bottom: 0; }
.fa-day.muted .fa-day-num { color: #b6c2d6; }
.fa-day.today .fa-day-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0b63f6;
    color: #fff;
    display: grid;
    place-items: center;
}
.fa-day-num {
    display: block;
    color: var(--fa-text);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}
.fa-event {
    min-height: 28px;
    border: 1px solid transparent;
    border-radius: 5px;
    padding: 4px 7px;
    margin-top: 4px;
    overflow: hidden;
}
.fa-event strong,
.fa-event small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.2;
}
.fa-event strong { font-weight: 800; }
.fa-event small { font-weight: 600; }
.fa-event.ferien { background: #e8f7ef; border-color: #b8e3c9; color: #075e3a; }
.fa-event.krankheit { background: #f1e7ff; border-color: #d6b6ff; color: #5b21b6; }
.fa-event.weiterbildung { background: #e8f1ff; border-color: #bfdbfe; color: #1d4ed8; }
.fa-event.arzttermin { background: #f3e8ff; border-color: #d8b4fe; color: #7e22ce; }
.fa-event.unbezahlt { background: #fff4df; border-color: #fed7aa; color: #b45309; }
.fa-event.feiertag { background: #fee2e2; border-color: #fecaca; color: #b91c1c; }
.fa-event.sonstiges { background: #eef2f7; border-color: #dbe3ef; color: #475569; }
.fa-table-card {
    padding: 22px 22px 14px;
}
.fa-table-card h3 {
    margin-bottom: 18px;
}
.fa-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--fa-line);
    border-radius: 8px;
}
.fa-table {
    width: 100%;
    min-width: 840px;
    border-collapse: collapse;
}
.fa-table th {
    height: 43px;
    padding: 0 14px;
    text-align: left;
    background: #fbfdff;
    border-bottom: 1px solid var(--fa-line);
    color: var(--fa-text);
    font-size: 12px;
    font-weight: 800;
}
.fa-table td {
    height: 48px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--fa-line);
    color: var(--fa-text);
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
}
.fa-table tr:last-child td { border-bottom: 0; }
.fa-person {
    display: flex;
    align-items: center;
    gap: 9px;
}
.fa-actions {
    display: flex;
    gap: 8px;
}
.fa-actions form {
    margin: 0;
}
.fa-actions button,
.fa-actions a {
    width: 28px;
    height: 28px;
    border: 1px solid var(--fa-line);
    border-radius: 7px;
    background: #fff;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--fa-text);
    font-weight: 900;
    cursor: pointer;
}
.fa-actions .ok { color: #16a66a; }
.fa-actions .no { color: #ef4444; }
.fa-status {
    min-width: 78px;
    min-height: 22px;
    border-radius: 5px;
    display: inline-grid;
    place-items: center;
    padding: 0 8px;
    font-size: 10.5px;
    font-weight: 800;
}
.fa-status.offen { background: #fff1df; color: #f59e0b; }
.fa-status.ok { background: #dcfce7; color: #07915c; }
.fa-status.nein { background: #fee2e2; color: #dc2626; }
.fa-table-link,
.fa-wide-link {
    display: flex;
    justify-content: center;
    margin-top: 14px;
    color: #0b63f6;
    font-size: 12.5px;
    font-weight: 800;
}
.fa-wide-link {
    min-height: 36px;
    border: 1px solid var(--fa-line);
    border-radius: 7px;
    align-items: center;
}
.fa-empty {
    text-align: center;
    color: var(--fa-muted) !important;
}
.fa-summary {
    display: grid;
    gap: 15px;
}
.fa-summary p {
    margin: 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    font-weight: 650;
}
.fa-summary p span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--fa-text);
}
.fa-summary i,
.fa-legend i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}
.fa-summary hr {
    border: 0;
    border-top: 1px solid var(--fa-line);
    width: 100%;
    margin: 3px 0 0;
}
.fa-summary i.ferien,
.fa-legend i.ferien { background: #25a56a; }
.fa-summary i.krankheit,
.fa-legend i.krankheit { background: #8b5cf6; }
.fa-summary i.weiterbildung,
.fa-legend i.weiterbildung { background: #60a5fa; }
.fa-summary i.arzttermin,
.fa-legend i.arzttermin { background: #7c3aed; }
.fa-summary i.unbezahlt,
.fa-legend i.unbezahlt { background: #f59e0b; }
.fa-legend i.feiertag { background: #ef4444; }
.fa-next {
    display: grid;
    gap: 14px;
}
.fa-next > div {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}
.fa-next strong,
.fa-next small {
    display: block;
    color: var(--fa-text);
}
.fa-next small {
    color: var(--fa-muted);
    font-size: 12px;
    line-height: 1.35;
}
.fa-credit {
    display: grid;
    gap: 11px;
}
.fa-credit > div {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) .8fr .8fr .8fr;
    gap: 10px;
    font-size: 12.5px;
    font-weight: 650;
}
.fa-credit > div:first-child {
    color: var(--fa-muted);
    font-size: 11.5px;
}
.fa-credit strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fa-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 22px;
    padding: 0 22px;
    color: var(--fa-text);
    font-size: 12.5px;
    font-weight: 650;
}
.fa-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.fa-manage {
    margin-top: 18px;
    padding: 0;
    overflow: hidden;
}
.fa-manage-head {
    padding: 20px 22px;
    border-bottom: 1px solid var(--fa-line);
}
.fa-manage-head h3 {
    margin: 0;
}
.fa-manage-head p {
    margin: 6px 0 0;
    color: var(--fa-muted);
    font-size: 13px;
    font-weight: 600;
}
.fa-panel {
    border-bottom: 1px solid var(--fa-line);
    background: #fff;
}
.fa-panel:last-child {
    border-bottom: 0;
}
.fa-panel summary {
    min-height: 58px;
    position: relative;
    display: block;
    padding: 12px 64px 12px 22px;
    cursor: pointer;
    list-style: none;
}
.fa-panel summary::-webkit-details-marker { display: none; }
.fa-panel summary::after {
    content: "+";
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 1px solid var(--fa-line);
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #0b63f6;
    font-weight: 900;
}
.fa-panel[open] summary::after {
    content: "−";
}
.fa-panel summary span {
    display: block;
    color: var(--fa-text);
    font-size: 14px;
    font-weight: 850;
}
.fa-panel summary small {
    display: block;
    margin-top: 3px;
    color: var(--fa-muted);
    font-size: 12px;
    font-weight: 600;
}
.fa-panel form,
.fa-panel .fa-table-wrap,
.fa-panel-tools {
    margin: 0 22px 22px;
}
.fa-panel .fa-table-wrap {
    margin-top: 0;
}
.fa-panel-tools {
    display: flex;
    justify-content: flex-end;
    padding-top: 2px;
}
.fa-panel[open] summary {
    background: #fbfdff;
}

@media (max-width: 1350px) {
    .fa-layout { grid-template-columns: 1fr; }
    .fa-side { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
    .fa-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fa-side { grid-template-columns: 1fr; }
    .fa-card-head { align-items: flex-start; flex-direction: column; }
    .fa-calendar { min-width: 820px; }
    .fa-calendar-card { overflow-x: auto; }
    .fa-weekdays { min-width: 820px; }
}

@media (max-width: 620px) {
    .fa-kpis { grid-template-columns: 1fr; }
    .fa-kpi { min-height: 98px; padding: 18px 78px 16px 18px; }
    .fa-card,
    .fa-table-card { padding: 16px; }
    .fa-tabs span { min-width: 58px; }
    .fa-legend { padding: 0; gap: 12px; }
    .fa-table { min-width: 760px; }
}

/* ---------- Drag & Drop im Kalender ---------- */
.wp-termin[draggable=true], .m-termin[draggable=true] { cursor: grab; }
.wp-termin[draggable=true]:active, .m-termin[draggable=true]:active { cursor: grabbing; }
.wp-termin.wird-gezogen { opacity: .5; }
.wp-tag.drop-ziel {
    background-color: var(--blau-100) !important;
    box-shadow: inset 0 0 0 2px var(--primaer);
}
.m-zelle.drop-ziel {
    background: var(--blau-100) !important;
    box-shadow: inset 0 0 0 2px var(--primaer);
    border-radius: 8px;
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ---------- Login ---------- */
body.login-seite {
    background: #eef2f8;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    overflow: auto;
    position: relative;
}
.login-wrap {
    width: 100%;
    max-width: 1040px;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .18);
    border: 1px solid rgba(15, 23, 42, .06);
}
.login-marke {
    position: relative;
    min-height: 100%;
    padding: 42px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(150deg, rgba(8, 18, 38, .38), rgba(8, 18, 38, .78)),
        url("https://images.unsplash.com/photo-1581578731548-c64695cc6952?auto=format&fit=crop&w=1200&q=80");
    background-size: cover;
    background-position: center;
}
.login-logo-bild {
    width: min(260px, 82%);
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    filter: none;
    margin-bottom: 28px;
}
.login-logo-bild img {
    width: 100%;
    display: block;
}
.login-claim {
    max-width: 500px;
}
.login-claim span {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 6px 10px;
    border-radius: 99px;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.22);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.login-claim h1 {
    margin: 0;
    color: #fff;
    font-size: 46px;
    line-height: 1.02;
    letter-spacing: 0;
    max-width: 520px;
}
.login-claim p {
    margin: 18px 0 0;
    color: rgba(255,255,255,.78);
    font-size: 16px;
    max-width: 460px;
}
.login-status {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.login-status div {
    min-width: 0;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.login-status strong {
    display: block;
    font-size: 18px;
    line-height: 1.1;
}
.login-status span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255,255,255,.7);
}
.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 54px;
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.login-panel-kopf {
    margin-bottom: 26px;
}
.login-panel h2 {
    margin: 0 0 4px;
    color: var(--navy);
    font-size: 32px;
    line-height: 1.15;
    letter-spacing: 0;
}
.login-panel p {
    margin: 0;
    color: var(--grau-600);
}
.login-text {
    margin: -12px 0 22px;
    color: var(--grau-600);
    font-size: 14px;
}
.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.login-feld label {
    color: var(--grau-600);
    margin-bottom: 7px;
}
.login-input {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    border: 1px solid var(--grau-200);
    border-radius: 14px;
    padding: 0 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.login-input .ic {
    color: var(--grau-400);
    flex-shrink: 0;
}
.login-input:focus-within {
    border-color: var(--primaer);
    box-shadow: 0 0 0 4px rgba(29,78,216,.12);
    background: #fff;
}
.login-input input {
    border: 0;
    box-shadow: none;
    padding: 0;
    min-width: 0;
    height: 50px;
    background: transparent;
}
.login-input input:hover,
.login-input input:focus {
    border: 0;
    box-shadow: none;
    outline: none;
}
.login-input input::placeholder {
    color: var(--grau-400);
}
.login-knopf {
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
    box-shadow: 0 12px 24px rgba(29, 78, 216, .24);
    transition: transform .12s ease, box-shadow .12s ease;
}
.login-knopf:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(29, 78, 216, .32);
    background: linear-gradient(135deg, #172554 0%, #2563eb 100%);
}
.login-reset {
    display: inline-flex;
    align-self: center;
    margin-top: 18px;
    color: var(--grau-600);
    font-size: 13px;
    font-weight: 600;
}
.login-reset:hover {
    color: var(--primaer);
}
.login-panel .flash {
    margin-bottom: 18px;
}

@media (max-width: 860px) {
    body.login-seite {
        padding: 16px;
        align-items: stretch;
    }
    .login-wrap {
        min-height: auto;
        grid-template-columns: 1fr;
        border-radius: 22px;
    }
    .login-marke {
        min-height: 300px;
        padding: 26px;
        gap: 28px;
    }
    .login-logo-bild {
        width: min(235px, 76%);
    }
    .login-claim h1 {
        font-size: 32px;
        max-width: 360px;
    }
    .login-claim p {
        font-size: 14px;
    }
    .login-status {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .login-status div {
        padding: 11px;
    }
    .login-panel {
        padding: 28px 22px 30px;
    }
    .login-panel h2 {
        font-size: 28px;
    }
}

@media (max-width: 520px) {
    body.login-seite {
        padding: 0;
        background: #fff;
    }
    .login-wrap {
        min-height: 100vh;
        border-radius: 0;
        border: 0;
        box-shadow: none;
    }
    .login-marke {
        min-height: 255px;
        padding: 20px;
    }
    .login-logo-bild {
        width: min(220px, 78%);
        border-radius: 13px;
        margin-bottom: 24px;
    }
    .login-claim span {
        display: none;
    }
    .login-claim h1 {
        font-size: 28px;
    }
    .login-claim p {
        display: none;
    }
    .login-status {
        display: none;
    }
    .login-panel {
        justify-content: flex-start;
        padding: 28px 18px 32px;
    }
    .login-input {
        min-height: 50px;
    }
    .login-input input {
        height: 48px;
    }
}

/* ====================================================================
   DESIGN-VARIANTE 2: Seitenleiste links + Dashboard
   ==================================================================== */
body.layout-seite { background: #eef2f8; }
.app-rahmen { display: flex; min-height: 100vh; }

/* ---------- Seitenleiste (dunkles Theme) ---------- */
.seitenleiste {
    width: 248px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-3) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 18px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.s-logo {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 8px 20px;
}
.s-logo-icon { width: 34px; height: 34px; border-radius: 9px; display: block; box-shadow: 0 0 0 1px rgba(255,255,255,.1); }
.s-logo-text { display: flex; flex-direction: column; line-height: 1.1; font-weight: 800; font-size: 18px; color: #fff; letter-spacing: -.01em; }
.s-logo-text small { font-weight: 500; font-size: 11px; color: rgba(255,255,255,.5); letter-spacing: 0; }
.s-nav { display: flex; flex-direction: column; gap: 3px; }
.s-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(255,255,255,.72);
    font-size: 14.5px;
    font-weight: 500;
    transition: background .14s ease, color .14s ease;
}
.s-nav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.s-nav a.aktiv { background: var(--primaer); color: #fff; font-weight: 600; box-shadow: 0 6px 16px -4px rgba(29,78,216,.6); }
.s-icon { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.s-icon .ic { display: block; }

.s-benutzer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255,255,255,.06);
    color: #fff;
}
.s-benutzer:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.avatar-kreis {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #fff;
    flex-shrink: 0;
    overflow: hidden;
    line-height: 1;
    aspect-ratio: 1 / 1;
}
.avatar-kreis img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    display: block;
    object-fit: cover;
    border-radius: inherit;
}
.avatar-kreis.gross { width: 72px !important; height: 72px !important; font-size: 22px; }
.avatar-kreis.klein { width: 30px !important; height: 30px !important; font-size: 11px; }
.avatar-kreis.mini { width: 24px !important; height: 24px !important; font-size: 10px; }
.avatar-kreis.mikro { width: 18px !important; height: 18px !important; font-size: 8px; display: inline-flex; vertical-align: middle; margin-right: 4px; }
.mobil-avatar img,
.avatar-bild img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    display: block;
    object-fit: cover;
    border-radius: inherit;
}
.profilbild-feld {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.profilbild-eingabe {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.profilbild-eingabe small { color: var(--grau-400); font-size: 12px; }
.checkbox-zeile {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--grau-600);
}
.mini-ma {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.ma-zelle { white-space: nowrap; }
.ma-zelle .avatar-kreis { margin-right: 7px; vertical-align: middle; }
.mini-ma { margin-right: 8px; white-space: nowrap; }
.s-benutzer-text { display: flex; flex-direction: column; line-height: 1.25; overflow: hidden; }
.s-benutzer-text strong { font-size: 13.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-benutzer-text small { font-size: 11.5px; color: rgba(255,255,255,.5); }

.schnellzugriff { margin-top: 20px; }
.schnellzugriff-titel {
    font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
    color: rgba(255,255,255,.4); font-weight: 700; padding: 0 12px 8px;
}
.schnellzugriff a {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px;
    border-radius: 9px;
    color: rgba(255,255,255,.7);
    font-size: 13.5px;
}
.schnellzugriff a .ic { color: #60a5fa; flex-shrink: 0; }
.schnellzugriff a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.s-logout {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(255,255,255,.72);
    font-size: 13.5px;
    font-weight: 650;
}
.s-logout .ic {
    color: #fca5a5;
    flex-shrink: 0;
}
.s-logout:hover {
    background: rgba(239,68,68,.14);
    color: #fff;
    text-decoration: none;
}

/* ---------- Hauptbereich ---------- */
.hauptbereich { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.haupt-kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 32px;
    background: transparent;
    position: sticky; top: 0; z-index: 90;
    background: #eef2f8;
}
.hk-titel { min-width: 0; }
.hk-titel h1 { margin: 0; font-size: 24px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.hk-titel .dash-gruss h1 { margin: 0 0 3px; font-size: 26px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.hk-titel .dash-gruss p { margin: 0; color: var(--grau-400); font-size: 14.5px; }
.hk-aktionen { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.haupt-kopf .glocke { background: #fff; color: var(--grau-800); box-shadow: 0 1px 3px rgba(15,23,42,.08); }
.haupt-kopf .glocke:hover { background: var(--grau-100); }
.hk-link { color: var(--grau-600); font-weight: 600; padding: 6px 10px; border-radius: 8px; }
.hk-profil { display: inline-flex; align-items: center; gap: 7px; }
.hk-link:hover { background: #fff; text-decoration: none; }
.hk-aktionen .dash-cta { padding: 11px 18px; }
/* Inhalt direkt unter dem Kopf, gleiche horizontale Polsterung */
body.layout-seite .inhalt { max-width: none; margin: 0; width: auto; padding: 4px 32px 40px; }

/* ---------- Dashboard ---------- */
.dash-kopf {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 14px; flex-wrap: wrap; margin-bottom: 22px;
}
.dash-gruss h1 { margin: 0 0 4px; font-size: 26px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.dash-gruss p { margin: 0; color: var(--grau-400); font-size: 14.5px; }
.dash-cta { padding: 11px 18px; font-size: 14.5px; align-self: center; }

.kpi-reihe {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}
.kpi {
    background: #fff;
    border: 1px solid var(--grau-100);
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: var(--schatten-karte);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.kpi-text { min-width: 0; }
.kpi-label { color: var(--grau-600); font-size: 13.5px; font-weight: 600; }
.kpi-zahl { font-size: 32px; font-weight: 800; color: var(--navy); letter-spacing: -.03em; line-height: 1.15; margin-top: 6px; }
.kpi-zusatz { font-size: 12.5px; color: var(--grau-400); margin-top: 6px; }
.kpi-zusatz b { color: var(--rot); }
.kpi-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 21px;
    flex-shrink: 0;
}
.kpi-icon .ic { display: block; }
.kpi-icon.blau { background: #dbeafe; color: #2563eb; }
.kpi-icon.gruen { background: #dcfce7; color: #16a34a; }
.kpi-icon.lila { background: #ede9fe; color: #7c3aed; }
.kpi-icon.gelb { background: #fef3c7; color: #d97706; }
.kpi-icon.rot { background: #fee2e2; color: #dc2626; }
.kpi-icon.tuerkis { background: #ccfbf1; color: #0d9488; }

.dash-spalten {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}
.dash-spalten > .karte { margin-bottom: 0; }
.dash-rechts { display: flex; flex-direction: column; gap: 18px; }
.dash-rechts .karte { margin-bottom: 0; }

.dash-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}
.widget-kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
}
.widget-kopf h3 { margin: 0; font-size: 16px; }
.widget-kopf a { font-size: 13px; font-weight: 600; white-space: nowrap; }

/* Tag/Woche/Monat-Umschalter im Einsatzplan */
.plan-tabs { display: inline-flex; background: var(--grau-100); border-radius: 9px; padding: 2px; }
.plan-tabs a {
    padding: 5px 14px; border-radius: 7px; font-size: 13px; font-weight: 600;
    color: var(--grau-600);
}
.plan-tabs a:hover { text-decoration: none; color: var(--navy); }
.plan-tabs a.aktiv { background: var(--primaer); color: #fff; box-shadow: 0 1px 3px rgba(29,78,216,.4); }

/* Ressourcen-Einsatzplan (eine Zeile pro Mitarbeiter) */
.res-plan { overflow-x: auto; }
.res-inner { min-width: 680px; }
.res-zeitkopf { position: relative; height: 22px; margin-left: 184px; border-bottom: 1px solid var(--grau-100); }
.res-zeitkopf span { position: absolute; font-size: 11px; color: var(--grau-400); transform: translateX(-50%); top: 4px; }
.res-zeile { display: flex; align-items: stretch; }
.res-ma {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 8px 9px 0; width: 184px; flex-shrink: 0;
    border-bottom: 1px solid var(--grau-50);
}
.res-ma .avatar-kreis { width: 34px; height: 34px; font-size: 12px; }
.res-ma-info { flex: 1; min-width: 0; }
.res-ma-name { font-size: 13px; font-weight: 600; color: var(--grau-800); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-ma-rolle { font-size: 11px; color: var(--grau-400); }
.res-status { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.res-spur {
    position: relative; flex: 1; min-height: 56px;
    border-bottom: 1px solid var(--grau-50);
    border-left: 1px solid var(--grau-100);
    background-image: repeating-linear-gradient(to right, transparent, transparent calc(100%/11 - 1px), var(--grau-50) calc(100%/11 - 1px), var(--grau-50) calc(100%/11));
}
.res-block {
    position: absolute; top: 7px; bottom: 7px;
    border-radius: 8px; padding: 5px 9px;
    font-size: 11px; line-height: 1.3; overflow: hidden;
    background: color-mix(in srgb, var(--bf) 14%, #fff);
    border-left: 3px solid var(--bf);
    color: var(--grau-800);
}
.res-block:hover { text-decoration: none; filter: brightness(.97); z-index: 5; }
.res-block b { font-weight: 700; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-block-leistung { display: block; color: var(--grau-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-block-zeit { display: block; color: var(--grau-400); font-size: 10.5px; }
.res-abw {
    left: 0; right: 0; background: repeating-linear-gradient(45deg, #f1f5f9, #f1f5f9 8px, #e2e8f0 8px, #e2e8f0 16px);
    border-left: none; color: var(--grau-600); display: flex; align-items: center; justify-content: center;
}
.res-abw b { color: var(--grau-600); }

/* Listen-Widgets */
.dash-liste { display: flex; flex-direction: column; }
.dash-liste-zeile {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--grau-50); font-size: 13.5px;
    color: var(--grau-800);
}
.dash-liste-zeile:last-child { border-bottom: none; }
.dash-liste-zeile:hover { text-decoration: none; }
a.dash-liste-zeile:hover .haupt strong { color: var(--primaer); }
.dash-liste-zeile .haupt { flex: 1; min-width: 0; }
.dash-liste-zeile .haupt strong { display: block; font-weight: 600; color: var(--grau-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-liste-zeile .haupt small { color: var(--grau-400); font-size: 12px; }
.dash-liste-zeile .rechts { color: var(--grau-400); font-size: 12.5px; white-space: nowrap; }
.avatar-kreis.klein { width: 30px; height: 30px; font-size: 11px; }
.dash-vollbtn { margin-top: 14px; width: 100%; text-align: center; }

/* Tabellen-Widget (Offene Aufträge) */
.dash-tab td, .dash-tab th { padding: 8px 8px; font-size: 13px; }
.dash-tab th { font-size: 10.5px; }
.dash-tab tr:hover td { background: var(--grau-50); }

/* Lohn-Widget */
/* ---------- Lohn & Abrechnung Referenzlayout ---------- */
.la-page {
    --la-text: #071845;
    --la-muted: #50658f;
    --la-line: #e2e8f0;
    color: var(--la-text);
}
.la-head-form { margin: 0; }
.la-topline {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 18px;
}
.la-month-nav {
    width: min(360px, 100%);
    min-height: 44px;
    border: 1px solid var(--grau-100);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px rgba(15, 23, 42, .05);
    display: grid;
    grid-template-columns: 24px 1fr 32px 32px;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
}
.la-month-nav strong { font-size: 14px; }
.la-month-nav a {
    display: grid;
    place-items: center;
    color: var(--la-text);
    font-size: 22px;
}
.la-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}
.la-kpi,
.la-card {
    background: #fff;
    border: 1px solid var(--grau-100);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px rgba(15, 23, 42, .05);
}
.la-kpi {
    position: relative;
    min-height: 104px;
    padding: 20px 18px 18px 82px;
}
.la-kpi i {
    position: absolute;
    left: 20px;
    top: 22px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-style: normal;
}
.la-kpi i.orange { background: #fff1df; color: #f59e0b; }
.la-kpi i.gruen { background: #dcfce7; color: #16a66a; }
.la-kpi i.blau { background: #dbeafe; color: #0b63f6; }
.la-kpi span {
    display: block;
    color: var(--grau-600);
    font-size: 12.5px;
    font-weight: 700;
}
.la-kpi strong {
    display: block;
    margin: 7px 0 6px;
    color: var(--navy);
    font-size: 23px;
    line-height: 1.1;
    letter-spacing: -.025em;
}
.la-kpi small {
    color: var(--la-text);
    font-size: 12px;
    font-weight: 650;
}
.la-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}
.la-main {
    min-width: 0;
    display: grid;
    gap: 18px;
}
.la-side {
    display: grid;
    gap: 18px;
}
.la-card { padding: 22px; }
.la-card h3 {
    margin: 0;
    color: var(--la-text);
    font-size: 17px;
}
.la-card h3 small {
    color: var(--la-muted);
    font-size: 12px;
    font-weight: 600;
}
.la-table-card {
    padding: 18px 18px 0;
}
.la-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}
.la-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.la-tabs a {
    min-height: 36px;
    border: 1px solid var(--la-line);
    border-radius: 8px;
    background: #fff;
    color: var(--la-text);
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    font-size: 12.5px;
    font-weight: 800;
}
.la-tabs a:hover { text-decoration: none; background: #f7faff; }
.la-tabs .aktiv {
    background: #0b63f6;
    border-color: #0b63f6;
    color: #fff;
}
.la-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}
.la-filter select,
.la-filter button,
.la-pagination select {
    height: 38px;
    border: 1px solid var(--la-line);
    border-radius: 8px;
    background: #fff;
    color: var(--la-text);
    padding: 0 12px;
    font-weight: 750;
}
.la-filter button {
    width: 38px;
    padding: 0;
    display: grid;
    place-items: center;
}
.la-table-wrap {
    overflow-x: auto;
    margin: 0 -18px;
}
.la-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: collapse;
}
.la-table th {
    height: 56px;
    padding: 0 18px;
    text-align: left;
    background: #fbfdff;
    border-top: 1px solid var(--la-line);
    border-bottom: 1px solid var(--la-line);
    color: var(--la-text);
    font-size: 12px;
    font-weight: 850;
}
.la-table th small {
    color: var(--la-muted);
    font-size: 10.5px;
}
.la-table td {
    height: 58px;
    padding: 8px 18px;
    border-bottom: 1px solid var(--la-line);
    color: var(--la-text);
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
}
.la-person {
    display: flex;
    align-items: center;
    gap: 10px;
}
.la-person span {
    display: grid;
}
.la-person small {
    color: var(--la-muted);
    font-size: 11.5px;
}
.la-status {
    min-width: 58px;
    min-height: 24px;
    border-radius: 5px;
    display: inline-grid;
    place-items: center;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 850;
}
.la-status.ready,
.la-status.ok { background: #dff6eb; color: #07915c; }
.la-status.warn { background: #fff1df; color: #d97706; }
.la-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.la-actions form { margin: 0; }
.la-actions a,
.la-actions button {
    width: 30px;
    height: 30px;
    border: 1px solid var(--la-line);
    border-radius: 7px;
    background: #fff;
    color: var(--la-text);
    display: grid;
    place-items: center;
    padding: 0;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}
.la-actions button { color: #16a66a; }
.la-pagination {
    min-height: 62px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    color: var(--la-muted);
    font-size: 12.5px;
    font-weight: 650;
}
.la-pagination div {
    display: flex;
    gap: 8px;
}
.la-pagination a {
    width: 30px;
    height: 30px;
    border: 1px solid var(--la-line);
    border-radius: 7px;
    display: grid;
    place-items: center;
    color: var(--la-text);
}
.la-pagination a.aktiv {
    background: #0b63f6;
    border-color: #0b63f6;
    color: #fff;
}
.la-pagination a.muted { color: #a8b5cb; }
.la-side-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.la-side-head a,
.la-link {
    color: #0b63f6;
    font-size: 12px;
    font-weight: 850;
}
.la-bottom {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.la-mini-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
}
.la-mini-table th,
.la-mini-table td {
    height: 32px;
    text-align: left;
    border-bottom: 1px solid var(--la-line);
    color: var(--la-text);
    font-size: 12px;
    font-weight: 650;
}
.la-mini-table th {
    color: var(--la-muted);
    font-weight: 850;
}
.la-mini-table tr:last-child td { border-bottom: 0; }
.la-link {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}
.la-status-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}
.la-status-list p {
    margin: 0;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    font-weight: 700;
}
.la-status-list i {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #64748b;
    display: grid;
    place-items: center;
    font-style: normal;
    font-size: 10px;
    font-weight: 900;
}
.la-status-list .done i {
    background: #25a56a;
    color: #fff;
}
.la-status-list .current i {
    background: #0b63f6;
    color: #fff;
}
.la-status-list strong {
    color: #07915c;
    font-size: 11px;
}
.la-status-list p:not(.done):not(.current) strong { color: var(--la-muted); }
.la-pay {
    width: 100%;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: #0b63f6;
    color: #fff;
    font-weight: 850;
    margin: 18px 0 10px;
}
.la-preview {
    min-height: 36px;
    border: 1px solid var(--la-line);
    border-radius: 8px;
    color: #0b63f6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 850;
}
.la-next-pay {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}
.la-next-pay .ic { color: #0b63f6; }
.la-next-pay strong { font-size: 13px; }
.la-next-pay em {
    border-radius: 5px;
    background: #e8f1ff;
    color: #0b63f6;
    padding: 5px 8px;
    font-style: normal;
    font-size: 11px;
    font-weight: 850;
}
.la-donut {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    margin: 18px auto 16px;
    background: conic-gradient(#0b63f6 0 78%, #22c55e 78% 89%, #8b5cf6 89% 96%, #f59e0b 96% 100%);
    display: grid;
    place-items: center;
}
.la-donut > div {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 8px;
}
.la-donut strong {
    font-size: 12px;
}
.la-donut small {
    color: var(--la-muted);
    font-size: 10px;
}
.la-cost-legend,
.la-docs,
.la-runs {
    display: grid;
    gap: 11px;
}
.la-cost-legend p,
.la-docs p,
.la-runs p {
    margin: 0;
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    color: var(--la-text);
    font-size: 12px;
    font-weight: 650;
}
.la-cost-legend i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}
.la-cost-legend i.blau { background: #0b63f6; }
.la-cost-legend i.gruen { background: #22c55e; }
.la-cost-legend i.lila { background: #8b5cf6; }
.la-cost-legend i.gelb { background: #f59e0b; }
.la-docs p {
    grid-template-columns: 20px minmax(0, 1fr) auto;
    min-height: 30px;
}
.la-docs .ic { color: #ef4444; }
.la-docs em,
.la-runs em {
    border-radius: 5px;
    background: #dff6eb;
    color: #07915c;
    padding: 4px 8px;
    font-style: normal;
    font-size: 10.5px;
    font-weight: 850;
}
.la-runs p {
    grid-template-columns: minmax(0, 1fr) auto auto;
}
.la-panel-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px 220px;
    gap: 16px;
    padding-bottom: 18px;
}
.la-run-card {
    min-height: 92px;
    border: 1px solid var(--la-line);
    border-radius: 12px;
    background: #f8fbff;
    padding: 16px;
    display: grid;
    gap: 5px;
}
.la-run-card strong {
    color: #0b63f6;
    font-size: 22px;
}
.la-run-card span,
.la-run-card small {
    color: var(--la-muted);
    font-size: 12.5px;
    font-weight: 700;
}
.la-inline-form { margin: 0; align-self: end; }
.la-edit-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
    padding-bottom: 18px;
}
.la-edit-form {
    display: grid;
    gap: 12px;
    align-content: start;
    border: 1px solid var(--la-line);
    border-radius: 12px;
    background: #f8fbff;
    padding: 16px;
}
.la-edit-form label {
    color: var(--la-text);
    font-size: 12px;
}
.la-edit-form input,
.la-edit-form select {
    margin-top: 5px;
}
.la-form-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--la-text);
    font-size: 13px;
    font-weight: 850;
}
.la-form-title a,
.la-form-actions a {
    color: #0b63f6;
    font-size: 12px;
    font-weight: 850;
}
.la-wage-editor {
    border-top: 1px solid var(--la-line);
    margin: 0 -18px;
    padding: 18px;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 18px;
    background: #fbfdff;
}
.la-wage-editor h3 {
    margin: 0 0 5px;
    color: var(--la-text);
}
.la-wage-editor p {
    margin: 0;
    color: var(--la-muted);
    font-size: 12.5px;
    font-weight: 700;
}
.la-wage-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
}
.la-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.la-form-actions .la-pay {
    margin: 0;
}
.la-wide {
    margin-top: 0;
}
.la-wide td small {
    display: block;
    color: var(--la-muted);
    margin-top: 2px;
}
.la-wide form { margin: 0; }
.la-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.la-icon-edit,
.la-icon-danger {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
}
.la-icon-edit {
    border: 1px solid #bfdbfe;
    color: #0b63f6;
}
.la-icon-edit:hover {
    text-decoration: none;
    background: #eff6ff;
}
.la-icon-danger {
    border: 1px solid #fecaca;
    color: #ef4444;
}
.la-doc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding-bottom: 18px;
}
.la-doc-grid a,
.la-docs a {
    min-height: 48px;
    border: 1px solid var(--la-line);
    border-radius: 10px;
    background: #fff;
    color: var(--la-text);
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 12.5px;
    font-weight: 750;
}
.la-doc-grid a:hover,
.la-docs a:hover {
    text-decoration: none;
    border-color: #bfdbfe;
    background: #f8fbff;
}
.la-doc-grid em,
.la-docs a em {
    border-radius: 5px;
    background: #dff6eb;
    color: #07915c;
    padding: 4px 8px;
    font-style: normal;
    font-size: 10.5px;
    font-weight: 850;
}
.la-preview-card {
    scroll-margin-top: 24px;
}
.la-payslip {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}
.la-payslip > div {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--la-line);
}
.la-payslip > div span {
    grid-column: 2;
    color: var(--la-muted);
    font-size: 12px;
}
.la-payslip p {
    margin: 0;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--la-line);
    font-size: 13px;
    font-weight: 700;
}
.la-payslip p.total {
    border-bottom: 0;
    color: #0b63f6;
    font-size: 17px;
}

@media (max-width: 1450px) {
    .la-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .la-layout { grid-template-columns: 1fr; }
    .la-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
    .la-kpis,
    .la-bottom,
    .la-side { grid-template-columns: 1fr; }
    .la-layout,
    .la-main,
    .la-table-card,
    .la-tools,
    .la-filter,
    .la-pagination {
        min-width: 0;
    }
    .la-tools {
        align-items: stretch;
        flex-direction: column;
    }
    .la-filter { flex-wrap: wrap; }
    .la-filter select { flex: 1 1 180px; min-width: 0; }
    .la-pagination { grid-template-columns: 1fr; }
    .la-pagination span { min-width: 0; }
    .la-pagination div { flex-wrap: wrap; }
    .la-panel-grid,
    .la-edit-layout,
    .la-doc-grid,
    .la-wage-editor,
    .la-wage-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .la-topline { justify-content: stretch; }
    .la-month-nav { width: 100%; }
    .la-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .la-tabs a {
        justify-content: center;
        padding: 0 10px;
    }
    .la-filter {
        display: grid;
        grid-template-columns: 1fr 1fr 38px;
    }
    .la-filter select {
        width: 100%;
        min-width: 0;
    }
    .la-kpi {
        min-height: 98px;
        padding: 18px 18px 16px 76px;
    }
    .la-card,
    .la-table-card { padding: 16px; }
    .la-table-wrap { margin: 0 -16px; }
    .la-table { min-width: 980px; }
}

/* Team-Widget */
.team-stat { display: flex; gap: 10px; text-align: center; }
.team-stat > div { flex: 1; background: var(--grau-50); border-radius: 12px; padding: 14px 8px; }
.team-stat strong { display: block; font-size: 24px; font-weight: 800; color: var(--navy); }
.team-stat span { font-size: 11.5px; color: var(--grau-400); }

@media (max-width: 1050px) {
    .dash-spalten { grid-template-columns: 1fr; }
    .dash-rechts { flex-direction: row; flex-wrap: wrap; }
    .dash-rechts .karte { flex: 1; min-width: 280px; }
}
@media (max-width: 760px) {
    .seitenleiste {
        position: static; width: 100%; height: auto; flex-direction: column;
    }
    .app-rahmen { flex-direction: column; }
    .s-nav { flex-direction: row; flex-wrap: wrap; }
    .s-nav a { flex: 0 0 auto; }
    .schnellzugriff { display: none; }
    .dash-kopf { flex-direction: column; }
}

/* ====================================================================
   MOBILE (iPhone) – eigenes Layout für die Seitenleisten-Variante
   ==================================================================== */
.nur-mobil { display: none; }
.mobil-topbar, .drawer-overlay, .mobil-tabbar { display: none; }

@media (max-width: 700px) {
    .nur-desktop { display: none !important; }
    .nur-mobil { display: block; }

    /* --- Mobiler Kopf --- */
    .mobil-topbar {
        display: flex;
        align-items: center;
        gap: 12px;
        background: #fff;
        padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
        border-bottom: 1px solid var(--grau-100);
        position: sticky; top: 0; z-index: 250;
    }
    .mobil-hamburger {
        background: none; border: none; padding: 6px; cursor: pointer;
        display: flex; flex-direction: column; gap: 4px; flex-shrink: 0;
    }
    .mobil-hamburger span { width: 22px; height: 2.5px; border-radius: 2px; background: var(--navy); display: block; }
    .mobil-gruss { flex: 1; min-width: 0; line-height: 1.25; }
    .mobil-gruss strong { display: block; font-size: 17px; color: var(--navy); font-weight: 800; letter-spacing: -.01em;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .mobil-gruss small { color: var(--grau-400); font-size: 12.5px; }
    /* Glocke im mobilen Kopf + Bottom-Sheet */
    .mobil-topbar .glocke-wrap { flex-shrink: 0; }
    .mobil-topbar .glocke { width: 40px; height: 40px; border-radius: 50%; }
    .glocke-overlay {
        display: none; position: fixed; inset: 0; background: rgba(8,18,38,.5); z-index: 295;
    }
    .glocke-wrap.offen .glocke-overlay { display: block; }
    .glocke-wrap .glocke-panel {
        position: fixed; left: 0; right: 0; bottom: 0; top: auto;
        width: 100%; max-width: none; max-height: 72vh; height: 72dvh;
        border-radius: 18px 18px 0 0; border: none;
        transform: translateY(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
        display: flex; z-index: 300;
    }
    .glocke-wrap.offen .glocke-panel { transform: none; animation: none; }
    .glocke-griff {
        display: block; width: 40px; height: 4px; border-radius: 99px;
        background: var(--grau-200); margin: 8px auto 2px; flex-shrink: 0;
    }
    .glocke-tabs { height: 50px; }
    .gt { font-size: 15px; padding: 0 16px; }
    .gn { padding: 14px 16px; }
    .gn-text { font-size: 14px; }
    body.glocke-sheet-offen { overflow: hidden; }
    .mobil-avatar {
        flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; color: #fff;
        display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
        text-decoration: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--grau-100);
        overflow: hidden;
    }
    .mobil-avatar .avatar-kreis { width: 100%; height: 100%; }

    /* --- Seitenleiste wird Off-Canvas-Drawer --- */
    .app-rahmen { display: block; }
    .seitenleiste {
        position: fixed; top: 0; left: 0; height: 100%; width: 270px;
        transform: translateX(-100%); transition: transform .25s ease; z-index: 300;
        padding-top: calc(16px + env(safe-area-inset-top));
    }
    body.drawer-offen .seitenleiste { transform: none; }
    .seitenleiste .s-nav { flex-direction: column; }
    .seitenleiste .s-nav a { flex: none; }
    .seitenleiste .schnellzugriff { display: block; }
    .drawer-overlay { position: fixed; inset: 0; background: rgba(8,18,38,.5); z-index: 290; }
    body.drawer-offen .drawer-overlay { display: block; }
    .haupt-kopf { display: none; }
    .hauptbereich { display: block; }
    body.layout-seite .inhalt {
        max-width: none; margin: 0; width: auto;
        padding: 16px 14px calc(78px + env(safe-area-inset-bottom));
    }

    /* --- Schwebendes Dock (untere Navigation) --- */
    .mobil-tabbar {
        display: flex; justify-content: center;
        position: fixed; left: 0; right: 0; z-index: 200;
        bottom: calc(14px + env(safe-area-inset-bottom));
        pointer-events: none;
    }
    .dock {
        pointer-events: auto;
        display: flex; align-items: flex-end; gap: 6px;
        padding: 9px 12px; border-radius: 26px;
        background: rgba(255, 255, 255, .72);
        backdrop-filter: blur(22px) saturate(1.4);
        -webkit-backdrop-filter: blur(22px) saturate(1.4);
        border: 1px solid rgba(255, 255, 255, .8);
        box-shadow: 0 12px 34px -8px rgba(15, 23, 42, .35), 0 2px 8px rgba(15, 23, 42, .12);
        animation: dock-bob 8s ease-in-out infinite;
    }
    @keyframes dock-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
    .dock-item {
        position: relative; background: none; border: none; cursor: pointer;
        display: flex; flex-direction: column; align-items: center; gap: 4px;
        padding: 0; text-decoration: none;
    }
    .dock-btn {
        width: 46px; height: 46px; border-radius: 16px;
        display: flex; align-items: center; justify-content: center;
        color: var(--grau-600);
        transition: transform .26s cubic-bezier(.34, 1.56, .64, 1),
                    background .2s ease, box-shadow .2s ease, color .2s ease;
    }
    .dock-item:hover .dock-btn,
    .dock-item:active .dock-btn,
    .dock-item:focus-visible .dock-btn {
        transform: scale(1.18) rotate(-5deg);
        background: var(--primaer-hell);
        color: var(--primaer);
        box-shadow: 0 0 0 1px rgba(29, 78, 216, .4), 0 10px 22px -6px rgba(29, 78, 216, .45);
    }
    .dock-item.aktiv .dock-btn { color: var(--primaer); }
    .dock-dot {
        width: 6px; height: 6px; border-radius: 50%;
        background: var(--primaer); opacity: 0; transition: opacity .2s ease;
    }
    .dock-item.aktiv .dock-dot { opacity: 1; }
    @media (prefers-reduced-motion: reduce) { .dock { animation: none; } }

    /* --- Greeting im Inhalt ausblenden (steht jetzt im Kopf) --- */
    .dash-kopf { display: none; }

    /* --- KPI: 3 Spalten, Icon oben rechts (Label nutzt volle Breite) --- */
    .kpi-reihe { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 16px; }
    .kpi {
        display: flex; flex-direction: row; justify-content: space-between; align-items: flex-start;
        gap: 7px; padding: 11px 10px; border-radius: 14px;
    }
    .kpi-text { min-width: 0; }
    .kpi-icon { width: 30px; height: 30px; font-size: 15px; border-radius: 9px; }
    .kpi-label { font-size: 10.5px; line-height: 1.25; overflow-wrap: anywhere; hyphens: auto; }
    .kpi-zahl { font-size: 21px; margin-top: 4px; }
    .kpi-zusatz { font-size: 9.5px; margin-top: 3px; }

    /* --- Karten kompakter --- */
    .dash-spalten { gap: 16px; }
    .karte { padding: 16px; border-radius: 16px; }
    .widget-kopf h3 { font-size: 15px; }

    /* --- Einsatzplan als Liste --- */
    .einsatz-mobil { display: flex; flex-direction: column; gap: 10px; }
    .em-zeile {
        display: flex; align-items: stretch; gap: 10px;
        border: 1px solid var(--grau-100); border-left: 4px solid var(--bf);
        border-radius: 12px; padding: 11px 12px; text-decoration: none; color: var(--grau-800);
        background: #fff;
    }
    .em-zeile:hover { text-decoration: none; }
    .em-zeit { flex-shrink: 0; width: 58px; }
    .em-zeit strong { display: block; font-size: 15px; font-weight: 800; color: var(--navy); }
    .em-zeit small { color: var(--grau-400); font-size: 12px; }
    .em-haupt { flex: 1; min-width: 0; }
    .em-titel { font-weight: 700; font-size: 14.5px; color: var(--navy); }
    .em-leistung { font-size: 12.5px; color: var(--grau-600); }
    .em-adr { font-size: 12px; color: var(--grau-400); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .em-team { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 12px; color: var(--grau-600); }
    .em-rechts { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 6px; flex-shrink: 0; }
    .em-pfeil { color: var(--grau-400); font-size: 20px; line-height: 1; }
    .em-mehr { display: block; text-align: left; font-weight: 600; font-size: 13.5px; padding-top: 4px; }

    /* --- Schnellzugriff-Kacheln (4 Spalten) --- */
    .schnell-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
    .schnell-titel { grid-column: 1 / -1; font-size: 16px; font-weight: 700; color: var(--navy); margin: 4px 0 2px; }
    .schnell-kachel {
        background: #fff; border: 1px solid var(--grau-100); border-radius: 14px;
        padding: 14px 4px; display: flex; flex-direction: column; align-items: center; gap: 7px;
        text-decoration: none; box-shadow: var(--schatten-karte);
    }
    .schnell-kachel:hover { text-decoration: none; }
    .schnell-icon { font-size: 22px; line-height: 1; }
    .schnell-label { font-size: 10.5px; font-weight: 600; color: var(--grau-800); text-align: center; line-height: 1.2; }

    /* --- Rechte Spalte stapeln --- */
    .dash-rechts { flex-direction: column; }
    .dash-rechts .karte { min-width: 0; }
    .dash-widgets { grid-template-columns: 1fr; gap: 16px; }

    /* --- Klassisches Layout auf dem Handy: Inhalt bekommt Luft --- */
}

/* Mobile-Feinschliff: Überlauf vermeiden */
@media (max-width: 700px) {
    .widget-kopf { flex-wrap: wrap; row-gap: 8px; }
    .widget-kopf h3 { flex: 1 1 100%; }
    .plan-tabs { width: 100%; }
    .plan-tabs a { flex: 1; text-align: center; }
    .dash-spalten > .karte, .dash-rechts .karte, .dash-widgets .karte { min-width: 0; }
    body.layout-seite .inhalt { overflow-x: hidden; }
    .res-plan.nur-desktop { display: none !important; }
}

/* Icon+Text-Ausrichtung in Kopfleisten-Links */
.hk-link, .profil-link { display: inline-flex; align-items: center; gap: 6px; }
.hk-link .ic, .profil-link .ic { display: block; }
.glocke .ic { display: block; }
.s-nav a .ic, .schnellzugriff a .ic { display: block; }

/* Glocke-Trigger im klassischen (dunklen) Topbar */
.topbar .glocke {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.18);
    color: #fff;
}
.topbar .glocke:hover { background: rgba(255,255,255,.22); color: #fff; box-shadow: none; }
.topbar .glocke-panel { color: var(--grau-800); }


/* ---------- Einsatzplan Host-Variante: übernommen aus glanz-y host ---------- */
/* ---------- Einsatzplan Final: Safari-stabiles Layout ---------- */
.ep-seitenkopf { margin-bottom: 18px; }
.ep-seitenkopf h1 { margin: 0 0 3px; font-size: 24px; font-weight: 800; color: var(--navy); letter-spacing: 0; }
.ep-seitenkopf p { margin: 0; color: var(--grau-400); font-size: 14.5px; }
body.layout-seite .ep-seitenkopf { display: none; }
.ep-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.ep-layout.ep-voll { grid-template-columns: 1fr; }
.ep-haupt { min-width: 0; }
.ep-karte { padding: 18px; }
.ep-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.ep-umschalter { display: inline-flex; background: var(--grau-100); border-radius: 10px; padding: 3px; gap: 2px; }
.ep-umschalter a { padding: 6px 16px; border-radius: 8px; font-weight: 600; font-size: 13.5px; color: var(--grau-600); }
.ep-umschalter a:hover { color: var(--navy); text-decoration: none; }
.ep-umschalter a.aktiv { background: var(--primaer); color: #fff; box-shadow: 0 1px 2px rgba(29,78,216,.3); }
.ep-datumnav { display: inline-flex; align-items: center; gap: 10px; }
.ep-pfeil { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--grau-200); color: var(--grau-600); background: #fff; }
.ep-pfeil:hover { background: var(--grau-100); color: var(--navy); text-decoration: none; }
.ep-pfeil .ic { display: block; }
.ep-datum { font-weight: 700; color: var(--navy); font-size: 15px; min-width: 196px; text-align: center; }
.ep-werkzeuge { display: inline-flex; align-items: center; gap: 8px; }
.ep-heute, .ep-chip, .ep-icon-btn { border: 1px solid var(--grau-200); border-radius: 9px; color: var(--grau-600); background: #fff; font-weight: 600; font-size: 13px; }
.ep-heute { padding: 7px 14px; }
.ep-chip { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; }
.ep-chip .ic { color: var(--grau-400); }
.ep-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; }
.ep-heute:hover, .ep-chip:hover, .ep-icon-btn:hover { background: var(--grau-100); color: var(--navy); text-decoration: none; }

.ep-timeline { border: 1px solid var(--grau-200); border-radius: 14px; overflow-x: auto; background: #fff; }
.ep-grid-kopf { display: grid; grid-template-columns: 210px 1fr; border-bottom: 1px solid var(--grau-200); background: var(--grau-50); min-width: 700px; }
.ep-kopf-ma { padding: 13px 16px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--grau-400); border-right: 1px solid var(--grau-200); }
.ep-kopf-zeit { position: relative; height: 46px; }
.ep-stunde { position: absolute; top: 50%; font-size: 12px; font-weight: 600; color: var(--grau-400); white-space: nowrap; }
.ep-grid-body { min-width: 700px; }
.ep-leer { padding: 40px; text-align: center; color: var(--grau-400); }
.ep-zeile { display: grid; grid-template-columns: 210px 1fr; min-height: 86px; border-bottom: 1px solid var(--grau-100); }
.ep-zeile:last-child { border-bottom: 0; }
.ep-ma { display: flex; align-items: center; gap: 11px; padding: 12px 16px; border-right: 1px solid var(--grau-200); min-width: 0; }
.ep-ma-text { min-width: 0; display: flex; flex-direction: column; flex: 1; }
.ep-ma-text strong { font-size: 14px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-ma-text small { font-size: 12px; color: var(--grau-400); }
.ep-status { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.ep-status.aktiv { background: var(--gruen); }
.ep-status.leer { background: #fbbf24; }
.ep-status.frei { background: var(--grau-200); }
.ep-track { position: relative; min-height: 86px; }
.ep-line { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--grau-100); }
.ep-bar { position: absolute; top: 10px; bottom: 10px; box-sizing: border-box; min-width: 118px; border-radius: 10px; padding: 8px 28px 7px 10px; overflow: hidden; color: var(--navy); background: #eff6ff; border: 1px solid var(--blau-200); border-left: 4px solid var(--c); box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.ep-bar:hover { text-decoration: none; box-shadow: 0 5px 14px rgba(15,23,42,.12); z-index: 5; }
.ep-bar.gewaehlt { box-shadow: 0 0 0 2px var(--c); }
.ep-bar-icon { position: absolute; top: 6px; right: 7px; color: var(--c); opacity: .7; }
.ep-bar-icon .ic { display: block; }
.ep-bar-titel { display: block; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 14px; }
.ep-bar-sub { display: block; font-size: 11.5px; color: var(--grau-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-bar-zeit { display: block; font-size: 11px; color: var(--grau-400); }
.ep-bar.st-erledigt { opacity: .6; }
.ep-bar.st-abgesagt { opacity: .45; text-decoration: line-through; }
.ep-abwesend { position: absolute; top: 10px; bottom: 10px; left: 0; right: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--grau-400); border: 1px solid var(--grau-200); background: repeating-linear-gradient(-45deg, #f8fafc, #f8fafc 6px, #eef2f7 6px, #eef2f7 12px); }
.ep-legende { display: flex; flex-wrap: wrap; gap: 16px 20px; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--grau-100); font-size: 13px; color: var(--grau-600); }
.ep-legende span { display: inline-flex; align-items: center; gap: 7px; }
.ep-punkt { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ep-punkt-leer { border: 1.5px solid var(--grau-200); background: #fff; }

.ep-woche { border: 1px solid var(--grau-200); border-radius: 14px; overflow-x: auto; background: #fff; }
.ep-w-kopf, .ep-w-zeile { display: grid; grid-template-columns: 170px repeat(7, minmax(82px, 1fr)); min-width: 744px; }
.ep-w-kopf { border-bottom: 1px solid var(--grau-200); background: var(--grau-50); }
.ep-w-eck { padding: 12px 14px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--grau-400); border-right: 1px solid var(--grau-200); display: flex; align-items: center; }
.ep-w-tagkopf { padding: 9px 8px; border-right: 1px solid var(--grau-200); display: flex; flex-direction: column; gap: 2px; align-items: center; justify-content: center; }
.ep-w-tagkopf:last-child { border-right: 0; }
.ep-w-wt { font-size: 12px; font-weight: 700; color: var(--grau-600); }
.ep-w-datum { font-size: 11.5px; color: var(--grau-400); }
.ep-w-num { font-weight: 700; color: var(--grau-600); }
.ep-w-tagkopf.heute .ep-w-wt, .ep-w-tagkopf.heute .ep-w-datum { color: var(--primaer); }
.ep-w-tagkopf.heute .ep-w-num { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; border-radius: 50%; background: var(--primaer); color: #fff; }
.ep-w-zeile { border-bottom: 1px solid var(--grau-100); min-height: 92px; }
.ep-w-zeile:last-child { border-bottom: 0; }
.ep-w-zeile .ep-ma { border-right: 1px solid var(--grau-200); padding: 11px 12px; gap: 9px; }
.ep-w-zelle { border-right: 1px solid var(--grau-100); padding: 7px; display: flex; flex-direction: column; gap: 6px; }
.ep-w-zelle:last-child { border-right: 0; }
.ep-w-zelle.we { background: #fafbfc; }
.ep-w-zelle.heute { background: #f7fbff; }
.ep-w-leer { color: var(--grau-200); text-align: center; margin: auto; font-size: 15px; }
.ep-w-abw-mini { margin: auto; font-size: 11px; font-weight: 600; color: var(--grau-400); border: 1px solid var(--grau-200); border-radius: 7px; padding: 4px 8px; }
.ep-w-abwesend { margin: 10px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--grau-400); border: 1px solid var(--grau-200); background: repeating-linear-gradient(-45deg, #f8fafc, #f8fafc 6px, #eef2f7 6px, #eef2f7 12px); }
.ep-w-chip { display: block; position: relative; border-radius: 9px; padding: 6px 8px; overflow: hidden; color: var(--navy); background: #eff6ff; border: 1px solid var(--blau-200); border-left: 3px solid var(--c); }
.ep-w-chip:hover { text-decoration: none; box-shadow: 0 4px 10px rgba(15,23,42,.1); }
.ep-w-chip.gewaehlt { box-shadow: 0 0 0 2px var(--c); }
.ep-w-chip.st-abgesagt { opacity: .6; }
.ep-w-chip-icon { position: absolute; top: 5px; right: 6px; color: var(--c); opacity: .7; }
.ep-w-chip-icon .ic { display: block; }
.ep-w-chip-titel { display: block; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 14px; }
.ep-w-chip-zeit { display: block; font-size: 11px; color: var(--grau-400); white-space: nowrap; }

.ep-m-titel { font-size: 17px; font-weight: 800; color: var(--navy); margin: 0 0 12px; }
.ep-m-kopf { display: grid; grid-template-columns: repeat(7, 1fr); padding-bottom: 8px; }
.ep-m-kopf span { padding-left: 8px; font-size: 12px; font-weight: 700; color: var(--grau-400); }
.ep-m-gitter { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--grau-200); border-radius: 12px; overflow: hidden; background: #fff; }
.ep-m-zelle { min-height: 104px; border-right: 1px solid var(--grau-100); border-bottom: 1px solid var(--grau-100); padding: 7px; display: flex; flex-direction: column; gap: 4px; }
.ep-m-zelle:nth-child(7n) { border-right: 0; }
.ep-m-zelle:nth-last-child(-n+7) { border-bottom: 0; }
.ep-m-zelle.fremd { background: var(--grau-50); }
.ep-m-num { font-size: 13px; font-weight: 600; color: var(--grau-600); align-self: flex-start; min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
.ep-m-zelle.fremd .ep-m-num { color: var(--grau-400); }
.ep-m-zelle.heute .ep-m-num { background: var(--primaer); color: #fff; border-radius: 50%; }
.ep-m-chip { display: block; border-radius: 7px; padding: 4px 7px; overflow: hidden; color: var(--navy); background: #eff6ff; border-left: 3px solid var(--c); }
.ep-m-chip:hover { text-decoration: none; filter: brightness(.97); }
.ep-m-chip-titel { display: block; font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-m-chip-zeit { display: block; font-size: 10.5px; color: var(--grau-400); }
.ep-m-mehr { font-size: 11px; color: var(--primaer); font-weight: 600; padding-left: 2px; }
.ep-m-mehr:hover { text-decoration: underline; }

.ep-seite { display: flex; flex-direction: column; gap: 18px; }
.ep-uebersicht h3, .ep-unzu h3, .ep-detail h3, .ep-notiz h3, .ep-minikal h3, .ep-topk h3, .ep-statkarte h3, .ep-hinweise h3, .ep-abw-karte h3 { margin: 0 0 14px; }
.ep-stat { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.ep-stat + .ep-stat { border-top: 1px solid var(--grau-100); }
.ep-stat-ic { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ep-stat-ic.blau { background: var(--primaer-hell); color: var(--primaer); }
.ep-stat-ic.gelb { background: #fef9c3; color: #ca8a04; }
.ep-stat-ic.gruen { background: #dcfce7; color: var(--gruen); }
.ep-stat-ic.rot { background: #fee2e2; color: var(--rot); }
.ep-stat-label { flex: 1; font-size: 13.5px; color: var(--grau-600); }
.ep-stat-wert { font-weight: 800; font-size: 16px; color: var(--navy); }
.ep-ueb-link { display: block; text-align: center; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--grau-100); color: var(--primaer); font-weight: 600; font-size: 13.5px; }
.ep-ueb-link:hover { text-decoration: none; color: var(--primaer-dunkel); }
.ep-mk-kopf, .ep-unzu-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.ep-mk-kopf strong { font-size: 14.5px; color: var(--navy); }
.ep-mk-gitter { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.ep-mk-wt { text-align: center; font-size: 11px; font-weight: 700; color: var(--grau-400); padding-bottom: 4px; }
.ep-mk-tag { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 8px; font-size: 12.5px; color: var(--grau-600); }
.ep-mk-tag:hover { background: var(--grau-100); text-decoration: none; }
.ep-mk-tag.leer { pointer-events: none; }
.ep-mk-tag.heute { color: var(--primaer); font-weight: 800; }
.ep-mk-tag.gewaehlt { background: var(--primaer); color: #fff; font-weight: 700; }
.ep-mk-tag.woche:not(.gewaehlt) { background: var(--primaer-hell); color: var(--primaer-dunkel); font-weight: 600; }
.ep-unzu-zahl { background: var(--primaer-hell); color: var(--primaer); font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.ep-unzu-karte { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid var(--grau-200); border-radius: 11px; margin-bottom: 8px; }
.ep-unzu-karte:hover { background: var(--grau-50); text-decoration: none; border-color: var(--blau-200); }
.ep-unzu-punkt { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.ep-unzu-text { display: flex; flex-direction: column; min-width: 0; }
.ep-unzu-text strong { font-size: 13.5px; color: var(--navy); }
.ep-unzu-text small { font-size: 12px; color: var(--grau-400); }
.ep-unzu-leer, .ep-detail-leer, .ep-notiz-leer { color: var(--grau-400); font-size: 13.5px; }
.ep-unzu-alle { display: block; text-align: center; padding: 9px; border-radius: 9px; background: var(--grau-50); color: var(--primaer); font-weight: 600; font-size: 13.5px; margin-top: 4px; }
.ep-unzu-alle:hover { background: var(--grau-100); text-decoration: none; }
.ep-unten { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.ep-unten-3 { grid-template-columns: 1.2fr 1fr 1fr; }
.ep-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ep-kachel { border: 1px solid var(--grau-200); border-radius: 12px; padding: 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ep-kachel-zahl { font-size: 24px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.ep-kachel-label { font-size: 12.5px; color: var(--grau-400); margin-top: 3px; }
.ep-kachel-ic { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ep-kachel-ic.blau { background: var(--primaer-hell); color: var(--primaer); }
.ep-kachel-ic.gruen { background: #dcfce7; color: var(--gruen); }
.ep-kachel-ic.gelb { background: #fef9c3; color: #ca8a04; }
.ep-kachel-ic.rot { background: #fee2e2; color: var(--rot); }
.ep-detail-kopf, .ep-hinweis, .ep-abw-zeile { display: flex; gap: 10px; align-items: flex-start; }
.ep-detail-punkt { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.ep-detail-titel { font-size: 16px; font-weight: 700; color: var(--navy); }
.ep-detail-sub { font-size: 13px; color: var(--grau-400); }
.ep-detail-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.ep-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ep-info-label { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--grau-400); text-transform: uppercase; letter-spacing: .03em; }
.ep-info-wert { font-size: 13.5px; color: var(--navy); }
.ep-detail-aktionen { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--grau-100); }
.ep-erledigt-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--gruen); font-weight: 600; font-size: 13.5px; }
.ep-notiz-box { min-height: 120px; border: 1px solid var(--grau-200); border-radius: 12px; padding: 14px; background: var(--grau-50); font-size: 13.5px; color: var(--grau-800); line-height: 1.6; }
.ep-notiz-meta { margin: 10px 0 0; font-size: 12px; color: var(--grau-400); }
.ep-hinweis { padding: 11px 0; }
.ep-hinweis + .ep-hinweis, .ep-abw-zeile + .ep-abw-zeile { border-top: 1px solid var(--grau-100); }
.ep-hinweis-ic { flex-shrink: 0; margin-top: 1px; }
.ep-hinweis-ic.info { color: var(--primaer); }
.ep-hinweis-ic.warn { color: #ca8a04; }
.ep-hinweis-text { font-size: 13px; color: var(--grau-800); line-height: 1.5; }
.ep-abw-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ep-abw-text strong { font-size: 13.5px; color: var(--navy); }
.ep-abw-text small { font-size: 12px; color: var(--grau-400); }
.ep-abw-badge { margin-left: auto; align-self: center; font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 99px; flex-shrink: 0; }
.ep-abw-badge.ferien { background: var(--primaer-hell); color: var(--primaer); }
.ep-abw-badge.krankheit { background: #fee2e2; color: var(--rot); }
.ep-abw-badge.sonstiges { background: var(--grau-100); color: var(--grau-600); }

@media (max-width: 1200px) {
    .ep-layout { grid-template-columns: 1fr; }
    .ep-seite { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ep-unten-3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    body.layout-seite .ep-seitenkopf { display: block; }
    .ep-karte { padding: 14px; }
    .ep-toolbar { gap: 10px; }
    .ep-datum { min-width: 0; font-size: 14px; }
    .ep-werkzeuge { width: 100%; justify-content: flex-start; overflow-x: auto; }
    .ep-unten, .ep-seite, .ep-detail-raster { grid-template-columns: 1fr; }
    .ep-stat-grid { grid-template-columns: 1fr; }
    .ep-detail-aktionen { flex-direction: column; align-items: stretch; }
    .ep-detail-aktionen .btn { text-align: center; }
}

.ep-grid-kopf,
.ep-grid-body {
    min-width: 840px;
}

@media (max-width: 1500px) {
    .ep-layout {
        grid-template-columns: 1fr;
    }
    .ep-seite {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .ep-seite {
        grid-template-columns: 1fr;
    }
}

/* Safari-Fallback: gleiche Scroll-Breite fuer Kopf, Zeilen und Zeitspur */
.ep-timeline {
    -webkit-overflow-scrolling: touch;
}
.ep-grid-kopf,
.ep-zeile {
    width: max(100%, 1060px);
    min-width: 1060px;
    grid-template-columns: 210px 850px;
}
.ep-grid-body {
    width: max(100%, 1060px);
    min-width: 1060px;
}
.ep-kopf-zeit,
.ep-track {
    width: 850px;
    min-width: 850px;
}
.ep-abwesend {
    left: 10px;
    right: 10px;
}

@media (min-width: 1501px) {
    .ep-grid-kopf,
    .ep-zeile,
    .ep-grid-body {
        width: 100%;
    }
    .ep-grid-kopf,
    .ep-zeile {
        grid-template-columns: 210px minmax(850px, 1fr);
    }
    .ep-kopf-zeit,
    .ep-track {
        width: auto;
        min-width: 850px;
    }
}
