/* KMP Farbschema: hell (Standard) und dunkel. Umschalten über html[data-theme] (siehe theme.js). */
:root{
 --k-bg:#f4f6f8;--k-fg:#18242d;--k-card:#fff;--k-field:#fff;--k-primary:#006a54;--k-secondary:#e8edef;--k-muted:#536570;
 --k-accent:#e2f2eb;--k-accent-border:#bfe0d2;--k-danger:#ad2929;--k-danger-bg:#fbeaea;--k-danger-border:#efc4c4;
 --k-warn:#8a5a00;--k-warn-bg:#fff6e0;--k-border:#dce3e7;--k-input:#ced8dd;--k-ring:#00896c;
}
html[data-theme="dark"]{
 color-scheme:dark;
 /* Portal-Variablen und die der neuen Seiten (gleiche Namen) */
 --background:#0f1418;--foreground:#e4ebef;--card:#171e24;--popover:#171e24;--popover-foreground:#e4ebef;--card-foreground:#e4ebef;
 --primary:#0f8a6d;--primary-hover:#11a07f;--primary-foreground:#fff;--secondary:#232c33;--secondary-foreground:#e4ebef;
 --muted:#1d252b;--muted-foreground:#9db0ba;--accent:#173a30;--accent-foreground:#d9f2e8;--destructive:#ff8a8a;--destructive-bg:#3a1f22;
 --warn:#f0c46a;--warn-bg:#3a3020;--sick:#a9c2ff;--sick-bg:#1f2b44;--border:#2c3740;--input:#3a4752;--ring:#2fbf98;
 --k-bg:#0f1418;--k-fg:#e4ebef;--k-card:#171e24;--k-field:#10171c;--k-primary:#2fbf98;--k-secondary:#232c33;--k-muted:#9db0ba;
 --k-accent:#173a30;--k-accent-border:#25584a;--k-danger:#ff8a8a;--k-danger-bg:#3a1f22;--k-danger-border:#5c2a2f;
 --k-warn:#f0c46a;--k-warn-bg:#3a3020;--k-border:#2c3740;--k-input:#3a4752;--k-ring:#2fbf98;
 background:#0f1418;
}
/* Das Portal setzt seine Farben zusätzlich direkt am body (blaues KMP-Design) – auch dort überschreiben */
html[data-theme="dark"] body.kmp-theme{
 --primary:#2f7fe0;--ring:#4a94f0;--accent:#1a2a44;--background:#0f1418;--foreground:#e4ebef;--secondary:#232c33;--muted:#1d252b;--border:#2c3740;--input:#3a4752;
 background:#0f1418;
}
/* Neue Seiten: fest eingetragene helle Flächen */
html[data-theme="dark"] body{background:var(--background);color:var(--foreground)}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#10171c;color:var(--foreground);border-color:var(--input)}
html[data-theme="dark"] .seg button{background:#10171c;color:var(--foreground);border-color:var(--input)}
html[data-theme="dark"] .seg button[aria-pressed="true"]{background:var(--primary);border-color:var(--primary);color:#fff}
html[data-theme="dark"] a{color:#5fd3b2}
html[data-theme="dark"] button.primary{color:#fff}
html[data-theme="dark"] .plus{color:#5fd3b2}
html[data-theme="dark"] .alert.ok{border-color:#25584a;color:#8fe3c8}
html[data-theme="dark"] .alert.error{border-color:#5c2a2f}
html[data-theme="dark"] .preview:not(:has(.sheet)){background:#162027;color:#cfdbe1}   /* Urlaubsschein: leerer Zustand lesbar */
html[data-theme="dark"] .preview:has(.sheet){background:#0b1013}     /* Urlaubsschein: Papier bleibt weiß */
html[data-theme="dark"] .badge.approved,html[data-theme="dark"] .badge.vacation,html[data-theme="dark"] .pill.ok{color:#8fe3c8}
html[data-theme="dark"] .list button[aria-current="true"],html[data-theme="dark"] .emps button[aria-current="true"]{border-color:#25584a}
/* Stempel-Terminal: Entscheidung über Urlaub/Zeitausgleich beim Einstempeln – genehmigt grün, abgelehnt rot, kurz aufleuchtend */
.clock-result .clock-leave-decision.approved,.clock-result .clock-leave-decision.rejected{border-width:3px!important;border-style:solid!important;color:#fff!important;animation:kmp-glow 1.3s ease-out 3}
.clock-result .clock-leave-decision.approved{background:#15803d!important;border-color:#86efac!important;--kmp-glow:134,239,172}
.clock-result .clock-leave-decision.rejected{background:#c81e1e!important;border-color:#fca5a5!important;--kmp-glow:252,165,165}
.clock-result .clock-leave-decision.approved strong::before{content:"✓ ";font-weight:800}
.clock-result .clock-leave-decision.rejected strong::before{content:"✕ ";font-weight:800}
.clock-result .clock-leave-decision strong,.clock-result .clock-leave-decision p{color:#fff!important}
html[data-theme="dark"] .clock-result .clock-result-name,html[data-theme="dark"] .clock-result .clock-result-title{color:#fff!important}
@keyframes kmp-glow{0%{box-shadow:0 0 0 0 rgba(var(--kmp-glow),.9)}70%{box-shadow:0 0 0 18px rgba(var(--kmp-glow),0)}100%{box-shadow:0 0 0 0 rgba(var(--kmp-glow),0)}}
@media (prefers-reduced-motion:reduce){.clock-result .clock-leave-decision{animation:none!important}}
/* Schalter */
.kmp-theme-toggle{position:fixed;right:14px;bottom:14px;z-index:2147483001;width:38px;height:38px;border-radius:50%;border:1px solid #ced8dd;background:#fff;color:#18242d;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 14px rgba(0,0,0,.15);padding:0}
.kmp-theme-toggle:focus-visible{outline:2px solid #00896c;outline-offset:2px}
html[data-theme="dark"] .kmp-theme-toggle{background:#232c33;color:#e4ebef;border-color:#3a4752}
@media print{.kmp-theme-toggle{display:none!important}html[data-theme] body{background:#fff!important;color:#000!important}}
