/* ==========================================================================
   CraftX — Personal · Urlaub & Abwesenheit · HR-Cockpit (v2)
   Calendar-first cockpit: Team-Timeline + Genehmigungs-Rail + slim KPIs +
   Antrags-Drawer + Einzel-Urlaubskonto-Drawer + Urlaubskonten-Slide-over.
   Ported from the "Urlaubsverwaltung Prototyp v2" design. All selectors are
   scoped under .cx-leave and reuse the global CraftX design tokens
   (--copper, --ink, --patina, --sh-md, --font-display, …) defined app-wide.
   ========================================================================== */

.cx-leave{
  --lv-ease:cubic-bezier(.22,.61,.36,1);
  /* hairline tokens: --hairline/--hairline-soft come from app.css; -strong is page-scoped
     (matches .cx-users/.cx-ob) and MUST be defined here or var() would silently resolve to nothing */
  --hairline-strong:rgba(28,25,21,.14);
  /* --white/--sh-* are page-scoped tokens too (values match .cx-users) — app.css only has
     --shadow-*. Without --white the sticky .tl-name column had a transparent background and
     the leave bars showed through it. */
  --white:#fff;
  --sh-xs:0 1px 2px rgba(28,25,21,.06);
  --sh-sm:0 2px 6px rgba(28,25,21,.08),0 1px 2px rgba(28,25,21,.04);
  --sh-xl:0 28px 56px rgba(28,25,21,.18),0 10px 20px rgba(28,25,21,.10);
  --sh-copper:0 8px 20px rgba(184,96,31,.28),0 2px 6px rgba(184,96,31,.16);
  /* form-field contrast tokens: fields sit white-on-cream, so their borders carry the
     entire visual affordance — deliberately stronger than the hairlines */
  --lv-field-border:rgba(28,25,21,.22);
  --lv-field-border-hover:rgba(28,25,21,.34);
  --lv-field-border-soft:rgba(28,25,21,.12);
  --lv-check-border:rgba(28,25,21,.32);
  --lv-sub-border:rgba(45,108,158,.22);
  font-family:var(--font-sans); color:var(--ink);
}
.cx-leave button{ font-family:inherit; cursor:pointer; }

.cx-leave .lv-mono{ font-variant-numeric:tabular-nums; font-family:var(--font-mono); }
.cx-leave .lv-muted{ color:var(--stone); }

/* ── Avatar / tags / status ─────────────────────────────── */
.cx-leave .av{ border-radius:var(--cx-radius-control); display:grid; place-items:center; font-weight:700; color:#fff; flex-shrink:0; font-family:var(--font-display); letter-spacing:-.01em; }
.cx-leave .av.dim{ opacity:.5; filter:grayscale(.4); }
.cx-leave .ltag{ display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:var(--cx-radius-control); font-size:11.5px; font-weight:600; white-space:nowrap; background:var(--sand); color:var(--walnut); }
.cx-leave .ltag .ic{ display:grid; place-items:center; }
.cx-leave .ltag.copper{ background:var(--copper-50); color:var(--copper-dark); }
.cx-leave .ltag.blue{ background:var(--blue-50); color:var(--blue); }
.cx-leave .ltag.violet{ background:var(--violet-50); color:var(--violet); }
.cx-leave .ltag.ochre{ background:var(--ochre-50); color:var(--ochre); }
.cx-leave .ltag.brick{ background:var(--brick-50); color:var(--brick); }
.cx-leave .ltag.patina{ background:var(--patina-50); color:var(--patina); }
.cx-leave .ltag.stone{ background:var(--sand); color:var(--stone); }
.cx-leave .lstatus{ display:inline-flex; align-items:center; gap:7px; font-size:12px; font-weight:600; }
.cx-leave .lstatus .sd{ width:8px; height:8px; border-radius:var(--cx-radius-round); flex-shrink:0; }
.cx-leave .lstatus.ochre{ color:var(--ochre); } .cx-leave .lstatus.ochre .sd{ background:var(--ochre); box-shadow:0 0 0 3px var(--ochre-50); }
.cx-leave .lstatus.patina{ color:var(--patina); } .cx-leave .lstatus.patina .sd{ background:var(--patina); box-shadow:0 0 0 3px var(--patina-50); }
.cx-leave .lstatus.brick{ color:var(--brick); } .cx-leave .lstatus.brick .sd{ background:var(--brick); box-shadow:0 0 0 3px var(--brick-50); }
.cx-leave .lstatus.stone{ color:var(--stone); } .cx-leave .lstatus.stone .sd{ background:var(--stone); box-shadow:0 0 0 3px var(--sand); }
.cx-leave .lstatus.violet{ color:var(--violet); } .cx-leave .lstatus.violet .sd{ background:var(--violet); box-shadow:0 0 0 3px var(--violet-50); }
.cx-leave .depttag-mini{ width:9px; height:9px; border-radius:var(--cx-radius-control); display:inline-block; flex-shrink:0; }

/* ── Buttons (cockpit-local) ────────────────────────────── */
.cx-leave .lv-btn{ display:inline-flex; align-items:center; justify-content:center; gap:7px; height:36px; padding:0 16px; border-radius:var(--cx-radius-control); font-size:13px; font-weight:600; border:1.5px solid transparent; background:transparent; color:var(--ink); white-space:nowrap; }
.cx-leave .lv-btn .ic{ display:grid; place-items:center; }
.cx-leave .lv-btn.primary{ background:var(--copper); color:#fff; box-shadow:var(--sh-copper); }
.cx-leave .lv-btn.primary:hover{ background:var(--copper-dark); }
.cx-leave .lv-btn.outline{ border-color:var(--hairline-strong); background:var(--white); }
.cx-leave .lv-btn.outline:hover{ border-color:var(--ink); }
.cx-leave .lv-btn.outline.danger{ color:var(--brick); border-color:rgba(154,59,51,.3); }
.cx-leave .lv-btn.outline.danger:hover{ background:var(--brick-50); border-color:var(--brick); }
.cx-leave .lv-btn.patina{ background:var(--patina); color:#fff; }
.cx-leave .lv-btn.patina:hover{ filter:brightness(.95); }
.cx-leave .lv-btn.ghost{ background:transparent; }
.cx-leave .lv-btn.ghost:hover{ background:var(--sand); }
.cx-leave .lv-btn.sm{ height:31px; padding:0 12px; font-size:12px; }
.cx-leave .lv-btn.block{ width:100%; }
.cx-leave .lv-btn:disabled{ opacity:.45; cursor:not-allowed; }
.cx-leave .lv-btn:active:not(:disabled){ transform:translateY(1px); }
.cx-leave .iconbtn{ width:34px; height:34px; border-radius:var(--cx-radius-control); border:1px solid var(--hairline-strong); background:var(--white); display:grid; place-items:center; color:var(--walnut); }
.cx-leave .iconbtn:hover{ border-color:var(--ink); color:var(--ink); }
.cx-leave .iconbtn.sm{ width:30px; height:30px; }

/* ── Page shell ─────────────────────────────────────────── */
/* Fills the .erp-content scroll area; only the timeline rows scroll (see .tl-scroll).
   Header, Bob hint and KPI strip stay fixed as flex-shrink:0 bands. */
.cx-leave.ck-shell{ height:100%; display:flex; flex-direction:column; padding:24px 28px 20px; overflow:hidden; }
.cx-leave.ck-shell > .ck-head,
.cx-leave.ck-shell > .bob,
.cx-leave.ck-shell > .ck-stats{ flex-shrink:0; }

/* ── Cockpit header ─────────────────────────────────────── */
.cx-leave .ck-head{ display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:15px; flex-wrap:wrap; }
.cx-leave .ck-title h1{ font-family:var(--font-display); font-size:24px; font-weight:800; letter-spacing:-.02em; color:var(--ink); line-height:1.05; margin:0; }
.cx-leave .ck-sub{ font-size:13.5px; color:var(--walnut); margin:5px 0 0; }
.cx-leave .ck-sub b{ color:var(--ink); font-weight:600; }
.cx-leave .ck-actions{ display:flex; align-items:center; gap:10px; flex-shrink:0; flex-wrap:wrap; }
.cx-leave .ck-toggle{ display:inline-flex; align-items:center; gap:7px; border:1px solid var(--hairline-strong); background:var(--white); padding:8px 13px; border-radius:var(--cx-radius-control); font-size:12.5px; font-weight:600; color:var(--walnut); }
.cx-leave .ck-toggle:hover{ border-color:var(--ink); color:var(--ink); }
.cx-leave .ck-toggle.on{ background:var(--copper-50); border-color:var(--copper); color:var(--copper-dark); }
.cx-leave .ck-toggle .tg{ width:30px; height:17px; border-radius:var(--cx-radius-control); background:var(--hairline-strong); position:relative; transition:background .15s; }
.cx-leave .ck-toggle.on .tg{ background:var(--copper); }
.cx-leave .ck-toggle .tg::after{ content:''; position:absolute; top:2px; left:2px; width:13px; height:13px; border-radius:var(--cx-radius-control); background:#fff; transition:transform .15s; }
.cx-leave .ck-toggle.on .tg::after{ transform:translateX(13px); }
/* count badge reused from the rail head — reset its auto-margin inside the toggle */
.cx-leave .ck-toggle .rh-c{ margin-left:2px; }

/* ── Employee show/hide filter (page header) ── */
.cx-leave .ck-filter{ position:relative; }
.cx-leave .ckf-n{ font-family:var(--font-mono); font-size:10.5px; font-weight:700; background:var(--copper); color:#fff; border-radius:var(--cx-radius-round); min-width:18px; height:18px; padding:0 5px; display:grid; place-items:center; }
.cx-leave .ckf-catch{ position:fixed; inset:0; z-index:1120; background:transparent; }
.cx-leave .ckf-pop{ position:absolute; top:calc(100% + 8px); right:0; z-index:1130; width:290px; max-height:min(62vh,500px); overflow-y:auto; background:var(--white); border:1px solid var(--hairline-strong); border-radius:var(--cx-radius-surface); box-shadow:var(--sh-xl); padding:6px; }
.cx-leave .ckf-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 10px 9px; border-bottom:1px solid var(--hairline-soft); margin-bottom:4px; }
.cx-leave .ckf-t{ font-size:13px; font-weight:700; color:var(--ink); }
.cx-leave .ckf-s{ font-size:11px; color:var(--stone); margin-top:1px; }
.cx-leave .ckf-all{ border:none; background:transparent; color:var(--copper-dark); font-size:12px; font-weight:600; padding:4px 6px; border-radius:var(--cx-radius-control); white-space:nowrap; }
.cx-leave .ckf-all:hover{ background:var(--copper-50); }
.cx-leave .ckf-dept{ display:flex; align-items:center; gap:7px; padding:8px 10px 4px; font-family:var(--font-mono); font-size:10px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--stone); }
.cx-leave .ckf-row{ display:flex; align-items:center; gap:9px; width:100%; text-align:left; border:none; background:transparent; padding:7px 10px; border-radius:var(--cx-radius-control); font-size:13px; font-weight:600; color:var(--ink); }
.cx-leave .ckf-row:hover{ background:var(--paper-2); }
.cx-leave .ckf-row.off{ color:var(--stone); }
.cx-leave .ckf-row.off .av{ opacity:.45; filter:grayscale(.5); }
.cx-leave .ckf-check{ width:17px; height:17px; border-radius:var(--cx-radius-control); border:1.5px solid var(--lv-check-border); background:var(--white); display:grid; place-items:center; color:#fff; flex-shrink:0; font-size:11px; }
.cx-leave .ckf-check.on{ background:var(--copper); border-color:var(--copper); }
.cx-leave .ckf-nm{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ── Slim KPI strip ─────────────────────────────────────── */
.cx-leave .ck-stats{ display:flex; align-items:stretch; background:var(--white); border:1px solid var(--hairline); border-radius:var(--cx-radius-surface); overflow:hidden; margin-bottom:16px; box-shadow:var(--sh-xs); }
.cx-leave .ck-stat{ flex:1; display:flex; align-items:center; gap:12px; padding:13px 18px; border-right:1px solid var(--hairline-soft); min-width:0; background:transparent; text-align:left; border-top:none; border-bottom:none; border-left:none; }
.cx-leave button.ck-stat{ cursor:pointer; }
.cx-leave button.ck-stat:hover{ background:var(--paper-2); }
.cx-leave .ck-stat:last-child{ border-right:none; }
.cx-leave .ck-stat.alert{ background:var(--brick-50); }
.cx-leave .ck-stat .ci{ width:38px; height:38px; border-radius:var(--cx-radius-control); display:grid; place-items:center; flex-shrink:0; }
.cx-leave .ck-stat .cv{ font-family:var(--font-display); font-size:22px; font-weight:800; letter-spacing:-.02em; color:var(--ink); line-height:1; display:flex; align-items:baseline; gap:4px; }
.cx-leave .ck-stat .cv small{ font-size:12px; font-weight:600; color:var(--stone); }
.cx-leave .ck-stat .cl{ font-size:11px; color:var(--stone); margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ── Bob hint ───────────────────────────────────────────── */
/* Bob hint — deliberately quiet: one slim row instead of a gradient stage. The ✕ hides
   the nudge for 24h (localStorage), so it must read as a passing note, not a banner. */
.cx-leave .bob{ background:#fff; border:1px solid var(--hairline-strong); border-left:3px solid var(--violet); border-radius:var(--cx-radius-surface); padding:9px 12px; display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:16px; }
.cx-leave .bav{ width:24px; height:24px; border-radius:var(--cx-radius-control); background:linear-gradient(135deg,var(--violet),#8370c0); color:#fff; display:grid; place-items:center; font-weight:800; font-size:11px; flex-shrink:0; font-family:var(--font-display); }
.cx-leave .btext{ flex:1 1 260px; min-width:0; font-size:13px; color:var(--ink); line-height:1.45; margin:0; }
.cx-leave .btext b{ color:var(--violet); font-weight:700; }
.cx-leave .bactions{ display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.cx-leave .bchip{ font-size:12px; padding:5px 11px; border-radius:var(--cx-radius-control); background:transparent; border:1px solid rgba(91,75,138,.25); color:var(--violet); font-weight:600; display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.cx-leave .bchip:hover{ background:var(--violet-50); }
.cx-leave .bclose{ background:transparent; border:none; color:var(--stone); display:grid; place-items:center; padding:4px; border-radius:var(--cx-radius-control); flex-shrink:0; }
.cx-leave .bclose:hover{ color:var(--ink); background:var(--violet-50); }

/* ── Approval rail (hosted inside the slide-over panel) ─── */
/* Stacked column; the .rail-panel-body owns the scroll, so no sticky/max-height here. */
.cx-leave .ck-rail{ display:flex; flex-direction:column; gap:14px; }
.cx-leave .rail-panel{ position:fixed; top:0; right:0; bottom:0; width:440px; max-width:94vw; background:var(--paper); z-index:1150; display:flex; flex-direction:column; box-shadow:var(--sh-xl); animation:lv-slidein .26s var(--lv-ease); }
.cx-leave .rail-panel-body{ flex:1; overflow-y:auto; padding:16px 18px; }
.cx-leave .rail-card{ background:var(--white); border:1px solid var(--hairline); border-radius:var(--cx-radius-surface); box-shadow:var(--sh-xs); overflow:hidden; }
.cx-leave .rail-head{ display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--hairline-soft); }
.cx-leave .rail-head .rh-ic{ width:30px; height:30px; border-radius:var(--cx-radius-control); background:var(--ochre-50); color:var(--ochre); display:grid; place-items:center; flex-shrink:0; }
.cx-leave .rail-head .rh-t{ font-size:13.5px; font-weight:700; color:var(--ink); }
/* count badge is shared between the rail head and the "Zu genehmigen" header toggle */
.cx-leave .rh-c{ font-family:var(--font-mono); font-size:11px; font-weight:700; color:#fff; background:var(--ochre); border-radius:var(--cx-radius-round); min-width:20px; height:20px; padding:0 6px; display:grid; place-items:center; margin-left:auto; }
.cx-leave .rail-list{ display:flex; flex-direction:column; }
.cx-leave .rail-item{ padding:13px 16px; border-bottom:1px solid var(--hairline-soft); border-left:3px solid; cursor:pointer; transition:background .12s; display:flex; flex-direction:column; gap:9px; }
.cx-leave .rail-item:last-child{ border-bottom:none; }
.cx-leave .rail-item:hover{ background:var(--paper-2); }
.cx-leave .ri-top{ display:flex; align-items:center; gap:9px; }
.cx-leave .ri-nm{ min-width:0; flex:1; }
.cx-leave .ri-nm-n{ font-size:13px; font-weight:700; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cx-leave .ri-nm-d{ font-size:11px; color:var(--stone); margin-top:1px; }
.cx-leave .ri-when{ display:flex; align-items:center; gap:8px; font-size:12px; color:var(--walnut); }
.cx-leave .ri-when .ri-days{ font-family:var(--font-mono); font-size:10.5px; font-weight:700; color:var(--copper-dark); background:var(--copper-50); border-radius:var(--cx-radius-control); padding:1px 7px; }
.cx-leave .ri-reason{ font-size:12px; color:var(--walnut); font-style:italic; line-height:1.4; }
.cx-leave .ri-flags{ display:flex; flex-wrap:wrap; gap:5px; }
.cx-leave .ri-flag{ display:inline-flex; align-items:center; gap:4px; font-size:10.5px; font-weight:600; border-radius:var(--cx-radius-control); padding:2px 7px; }
.cx-leave .ri-flag.warn{ color:var(--brick); background:var(--brick-50); }
.cx-leave .ri-flag.conf{ color:var(--ochre); background:var(--ochre-50); }
.cx-leave .ri-flag.sub{ color:var(--blue); background:var(--blue-50); }
.cx-leave .ri-flag.subno{ color:var(--brick); background:var(--brick-50); }
.cx-leave .ri-acts{ display:flex; gap:7px; }
.cx-leave .ri-acts .lv-btn{ flex:1; height:32px; font-size:12px; }
.cx-leave .rail-empty{ padding:34px 20px; text-align:center; }
.cx-leave .rail-empty .re-ic{ width:46px; height:46px; border-radius:var(--cx-radius-control); background:var(--patina-50); color:var(--patina); display:grid; place-items:center; margin:0 auto 12px; }
.cx-leave .rail-empty .re-t{ font-size:13.5px; font-weight:700; color:var(--ink); }
.cx-leave .rail-empty .re-s{ font-size:12px; color:var(--stone); margin-top:4px; line-height:1.45; }
.cx-leave .rail-week{ display:flex; flex-direction:column; }
.cx-leave .rw-row{ display:flex; align-items:center; gap:10px; padding:9px 16px; border-bottom:1px solid var(--hairline-soft); cursor:pointer; background:transparent; border-left:none; border-right:none; border-top:none; width:100%; text-align:left; }
.cx-leave .rw-row:last-child{ border-bottom:none; }
.cx-leave .rw-row:hover{ background:var(--paper-2); }
.cx-leave .rw-mid{ flex:1; min-width:0; }
.cx-leave .rw-n{ font-size:12.5px; font-weight:600; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cx-leave .rw-d{ font-size:11px; color:var(--stone); margin-top:1px; }
.cx-leave .rail-week-empty{ padding:18px 16px; font-size:12px; color:var(--stone); text-align:center; }

/* substitute chip */
.cx-leave .subchip{ display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:600; color:var(--blue); background:var(--blue-50); border-radius:var(--cx-radius-control); padding:3px 9px 3px 4px; }
.cx-leave .subchip .av{ width:18px; height:18px; }
.cx-leave .subchip.none{ color:var(--brick); background:var(--brick-50); padding-left:9px; }

/* ════════════════════════ TIMELINE ════════════════════════ */
.cx-leave .tl-card{ background:var(--white); border:1px solid var(--hairline); border-radius:var(--cx-radius-surface); box-shadow:var(--sh-xs); overflow:hidden; flex:1; min-height:0; display:flex; flex-direction:column; }
.cx-leave .tl-head{ display:flex; align-items:center; justify-content:space-between; gap:18px; padding:14px 18px; border-bottom:1px solid var(--hairline-soft); flex-wrap:wrap; flex-shrink:0; }
.cx-leave .tl-mnav{ display:flex; align-items:center; gap:8px; }
.cx-leave .tl-month{ font-family:var(--font-display); font-size:18px; font-weight:700; letter-spacing:-.02em; display:flex; align-items:baseline; gap:7px; min-width:140px; justify-content:center; }
.cx-leave .tl-month span{ font-family:var(--font-mono); font-size:13px; font-weight:500; color:var(--stone); }
.cx-leave .tl-legend{ display:flex; align-items:center; gap:13px; flex-wrap:wrap; }
.cx-leave .leg{ display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:600; color:var(--walnut); }
.cx-leave .leg-sw{ width:11px; height:11px; border-radius:var(--cx-radius-control); display:inline-block; }
.cx-leave .tl-scroll{ flex:1; min-height:0; overflow:auto; }
.cx-leave .tl-inner{ position:relative; }
.cx-leave .tl-row{ display:flex; align-items:stretch; }
/* Sticky header rows: they scroll over content, so their cells carry opaque backgrounds
   (default white via the row bg; .off/.today cells override). The day-header is 46px tall,
   so the load row sticks right below it. */
.cx-leave .tl-headrow{ position:sticky; top:0; z-index:8; background:var(--white); }
.cx-leave .tl-name{ width:200px; flex-shrink:0; position:sticky; left:0; z-index:4; background:var(--white); display:flex; align-items:center; gap:10px; padding:0 12px; border-right:1px solid var(--hairline); }
.cx-leave .tl-days{ position:relative; flex:1; display:flex; align-self:stretch; }
.cx-leave .tl-dayhead{ height:46px; border-bottom:1px solid var(--hairline); }
.cx-leave .tl-corner{ background:var(--paper-2); font-family:var(--font-mono); font-size:10px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--stone); z-index:9; display:flex; align-items:center; padding:0 12px; }
.cx-leave .tl-dcell{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; border-right:1px solid var(--hairline-soft); flex-shrink:0; }
.cx-leave .tl-dcell.off{ background:var(--paper-2); }
.cx-leave .tl-dcell.today{ background:var(--copper-50); }
.cx-leave .tl-wd{ font-family:var(--font-mono); font-size:9px; letter-spacing:.02em; text-transform:uppercase; color:var(--stone); }
.cx-leave .tl-dcell.today .tl-wd{ color:var(--copper-dark); }
.cx-leave .tl-dn{ font-size:12px; font-weight:600; color:var(--walnut); font-variant-numeric:tabular-nums; }
.cx-leave .tl-dcell.today .tl-dn{ color:var(--copper-dark); font-weight:800; }
.cx-leave .tl-colbg{ position:absolute; top:0; bottom:0; pointer-events:none; }
.cx-leave .tl-colbg.off{ background:var(--paper-2); }
.cx-leave .tl-colbg.today{ background:var(--copper-50); box-shadow:inset 1px 0 0 var(--copper-light),inset -1px 0 0 var(--copper-light); }
.cx-leave .tl-loadrow{ height:42px; border-bottom:1px solid var(--hairline); position:sticky; top:46px; z-index:8; background:var(--white); }
.cx-leave .tl-loadname{ background:var(--paper-2); font-family:var(--font-mono); font-size:10px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--stone); gap:6px; z-index:9; }
/* Load cells stretch to the row height (no align-items override on .tl-loaddays) and centre
   the badge in flow — nothing positioned, so it can never land in the department row below.
   Deliberately one calm style: no colour steps by headcount. */
.cx-leave .tl-loadpill{ min-width:20px; height:18px; padding:0 6px; border-radius:var(--cx-radius-round); background:var(--sand); border:1px solid var(--hairline-strong); color:var(--walnut); font-family:var(--font-mono); font-size:10.5px; font-weight:700; line-height:16px; text-align:center; font-variant-numeric:tabular-nums; }
/* Department header as a proper grid row: the label lives in a sticky-left name cell
   (never protrudes into the day grid), the empty .tl-days strip keeps the row full-width
   so the weekend/today bands show through behind it. */
.cx-leave .tl-deptrow{ height:30px; border-bottom:1px solid var(--hairline-soft); }
.cx-leave .tl-deptname{ background:var(--paper-2); z-index:5; gap:8px; font-size:11.5px; font-weight:700; color:var(--walnut); text-transform:uppercase; letter-spacing:.04em; font-family:var(--font-mono); }
.cx-leave .tl-deptnm{ min-width:0; flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cx-leave .tl-deptsw{ width:10px; height:10px; border-radius:var(--cx-radius-control); flex-shrink:0; }
.cx-leave .tl-deptn{ font-family:var(--font-mono); background:var(--sand); color:var(--stone); border-radius:var(--cx-radius-control); padding:1px 6px; font-size:10px; flex-shrink:0; }
.cx-leave .tl-emprow{ border-bottom:1px solid var(--hairline-soft); }
.cx-leave .tl-emprow:hover .tl-name{ background:var(--paper-2); }
.cx-leave .tl-nm{ min-width:0; }
.cx-leave .tl-nm-n{ font-size:12.5px; font-weight:600; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:flex; align-items:center; gap:6px; }
.cx-leave .tl-awaydot{ width:7px; height:7px; border-radius:var(--cx-radius-round); background:var(--copper); flex-shrink:0; box-shadow:0 0 0 2px var(--copper-50); }
.cx-leave .tl-statuschip{ flex-shrink:0; font-family:var(--font-mono); font-size:9px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--stone); background:var(--sand); border:1px solid var(--hairline-strong); border-radius:var(--cx-radius-control); padding:1px 5px; }
.cx-leave .tl-statuschip.susp{ color:var(--brick); background:var(--brick-50); border-color:transparent; }
.cx-leave .tl-nm-p{ font-size:10.5px; color:var(--stone); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:1px; }
.cx-leave .tl-empdays{ align-items:center; }
.cx-leave .tl-bar{ position:absolute; top:50%; transform:translateY(-50%); height:24px; border:1.5px solid; border-radius:var(--cx-radius-control); display:flex; align-items:center; gap:4px; padding:0 7px; font-size:10.5px; font-weight:700; overflow:hidden; z-index:2; box-shadow:var(--sh-xs); }
.cx-leave .tl-bar:hover{ filter:brightness(.97); z-index:3; }
.cx-leave .tl-bar.pending{ border-style:dashed; opacity:.92; }
.cx-leave .tl-bar-ic{ display:grid; place-items:center; flex-shrink:0; }
.cx-leave .tl-bar-t{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* direct planning: drag-to-plan + multi-select pick */
.cx-leave .tl-empdays.plan{ cursor:cell; user-select:none; touch-action:pan-y; }
.cx-leave .tl-empdays.plan.lv-dragging{ touch-action:none; }
.cx-leave .tl-selbar{ position:absolute; top:50%; transform:translateY(-50%); height:26px; border:2px dashed var(--copper); background:rgba(184,96,31,.16); border-radius:var(--cx-radius-control); z-index:3; display:flex; align-items:center; justify-content:center; font-family:var(--font-mono); font-size:10px; font-weight:700; color:var(--copper-dark); pointer-events:none; gap:4px; white-space:nowrap; overflow:hidden; }
.cx-leave .tl-name.pickable{ cursor:pointer; user-select:none; }
.cx-leave .tl-name.picked{ background:var(--copper-50)!important; box-shadow:inset 3px 0 0 var(--copper); }
.cx-leave .tl-pickdot{ width:16px; height:16px; border-radius:var(--cx-radius-control); border:1.5px solid var(--hairline-strong); background:var(--white); display:grid; place-items:center; flex-shrink:0; color:#fff; margin-left:auto; }
.cx-leave .tl-name.picked .tl-pickdot{ background:var(--copper); border-color:var(--copper); }
.cx-leave .tl-hint{ display:flex; align-items:center; gap:7px; padding:8px 14px; font-size:11.5px; color:var(--stone); background:var(--paper-2); border-top:1px solid var(--hairline-soft); flex-shrink:0; }
.cx-leave .tl-hint kbd{ font-family:var(--font-mono); font-size:10px; background:var(--white); border:1px solid var(--hairline-strong); border-bottom-width:2px; border-radius:var(--cx-radius-control); padding:1px 6px; color:var(--walnut); }

/* floating multi-select bar */
.cx-leave .planbar{ position:fixed; left:50%; bottom:24px; transform:translateX(-50%); z-index:1160; background:var(--ink); color:#fff; border-radius:var(--cx-radius-surface); padding:9px 10px 9px 17px; display:flex; align-items:center; gap:15px; box-shadow:var(--sh-xl); animation:lv-toastin .2s var(--lv-ease); }
.cx-leave .planbar-t{ font-size:13px; font-weight:600; display:flex; align-items:center; gap:9px; }
.cx-leave .planbar-n{ font-family:var(--font-display); font-size:15px; font-weight:800; background:var(--copper); width:24px; height:24px; border-radius:var(--cx-radius-control); display:grid; place-items:center; }
.cx-leave .planbar-avs{ display:flex; align-items:center; }
.cx-leave .planbar-avs .av{ margin-left:-7px; border:2px solid var(--ink); }
.cx-leave .planbar-avs .av:first-child{ margin-left:0; }
.cx-leave .planbar .lv-btn.primary{ height:34px; }
.cx-leave .planbar .ghostx{ background:rgba(255,255,255,.14); border:none; color:#fff; width:32px; height:32px; border-radius:var(--cx-radius-control); display:grid; place-items:center; }
.cx-leave .planbar .ghostx:hover{ background:rgba(255,255,255,.26); }

/* ════════════════════════ SCRIM + DRAWER + MODAL ════════════════════════ */
/* Overlays must clear the app chrome (topbar z-1100, sidebar z-1000/1250) — same
   band as .cx-users: scrim 1140, panels 1150, floating planbar above both. */
.cx-leave .scrim{ position:fixed; inset:0; background:rgba(28,25,21,.34); backdrop-filter:blur(2px); z-index:1140; animation:lv-fade .18s var(--lv-ease); }
/* raised tier: modals that can open ON TOP of an already-open panel/drawer (z-1150),
   e.g. the reject modal launched from the Anträge slide-over — the scrim must cover
   the panel or it would stay clickable underneath */
.cx-leave .scrim.raised{ z-index:1165; }
.cx-leave .lv-modal.raised{ z-index:1170; }
@keyframes lv-fade{ from{opacity:0} to{opacity:1} }
.cx-leave .drawer{ position:fixed; top:0; right:0; bottom:0; width:488px; max-width:94vw; background:var(--paper); z-index:1150; box-shadow:var(--sh-xl); display:flex; flex-direction:column; animation:lv-slidein .26s var(--lv-ease); }
.cx-leave .drawer.wide{ width:564px; }
@keyframes lv-slidein{ from{transform:translateX(100%)} to{transform:none} }
.cx-leave .dr-head{ padding:20px 22px; background:var(--white); border-bottom:1px solid var(--hairline); position:relative; }
.cx-leave .dr-close{ position:absolute; top:16px; right:16px; width:32px; height:32px; border-radius:var(--cx-radius-control); border:none; background:var(--sand); display:grid; place-items:center; color:var(--walnut); }
.cx-leave .dr-close:hover{ background:var(--sand-2); color:var(--ink); }
.cx-leave .dr-id{ display:flex; align-items:center; gap:14px; }
.cx-leave .dr-id .dn{ font-family:var(--font-display); font-size:21px; font-weight:700; letter-spacing:-.02em; line-height:1.1; }
.cx-leave .dr-id .dp{ font-size:12.5px; color:var(--stone); margin-top:3px; }
.cx-leave .dr-id .dp b{ color:var(--walnut); font-weight:600; }
.cx-leave .dr-statusrow{ display:flex; align-items:center; gap:12px; margin-top:16px; padding-top:16px; border-top:1px solid var(--hairline-soft); flex-wrap:wrap; }
.cx-leave .dr-pnum{ margin-left:auto; font-family:var(--font-mono); font-size:11px; color:var(--stone); }
.cx-leave .dr-body{ flex:1; overflow-y:auto; padding:20px 22px; display:flex; flex-direction:column; gap:18px; }
.cx-leave .dr-hero{ background:var(--white); border:1px solid var(--hairline); border-left-width:4px; border-radius:var(--cx-radius-surface); padding:16px 18px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.cx-leave .dr-hero-lab{ font-family:var(--font-mono); font-size:10px; letter-spacing:.1em; text-transform:uppercase; color:var(--stone); margin-bottom:5px; }
.cx-leave .dr-hero-range{ font-family:var(--font-display); font-size:20px; font-weight:700; letter-spacing:-.02em; line-height:1.1; }
.cx-leave .dr-hero-sub{ font-size:12px; color:var(--stone); margin-top:4px; }
.cx-leave .dr-hero-r{ text-align:center; flex-shrink:0; }
.cx-leave .dr-hero-days{ font-family:var(--font-display); font-size:34px; font-weight:800; letter-spacing:-.03em; line-height:1; color:var(--copper); }
.cx-leave .dr-hero-dl{ font-size:10.5px; color:var(--stone); margin-top:3px; text-transform:uppercase; letter-spacing:.04em; }
.cx-leave .dr-conflict{ display:flex; gap:11px; align-items:flex-start; background:var(--ochre-50); border:1px solid rgba(169,117,20,.3); border-radius:var(--cx-radius-surface); padding:12px 14px; color:var(--ochre); font-size:13px; }
.cx-leave .dr-conflict>.ic,.cx-leave .dr-conflict svg{ flex-shrink:0; margin-top:1px; }
.cx-leave .dr-conflict b{ color:var(--ink); font-weight:700; display:block; margin-bottom:4px; }
.cx-leave .dr-conflict-list{ display:flex; flex-direction:column; gap:3px; color:var(--walnut); }
.cx-leave .dr-cf{ display:inline-flex; align-items:center; gap:6px; font-size:12px; }
.cx-leave .dr-cf .av{ width:18px; height:18px; }
.cx-leave .dr-sec .dr-lab{ font-family:var(--font-mono); font-size:10px; font-weight:600; letter-spacing:.12em; text-transform:uppercase; color:var(--stone); margin-bottom:10px; display:flex; align-items:center; gap:7px; }
.cx-leave .dr-card{ background:var(--white); border:1px solid var(--hairline); border-radius:var(--cx-radius-surface); padding:2px 14px; }
.cx-leave .fieldrow{ display:flex; align-items:center; gap:11px; padding:10px 0; border-bottom:1px solid var(--hairline-soft); font-size:13px; }
.cx-leave .fieldrow:last-child{ border-bottom:none; }
.cx-leave .fieldrow .ic{ color:var(--stone); flex-shrink:0; display:grid; place-items:center; }
.cx-leave .fieldrow .fk{ color:var(--stone); width:108px; flex-shrink:0; }
.cx-leave .fieldrow .fv{ color:var(--ink); font-weight:500; min-width:0; }
.cx-leave .dr-quote{ background:var(--paper-2); border:1px solid var(--hairline); border-radius:var(--cx-radius-surface); padding:13px 15px; font-size:13.5px; color:var(--walnut); font-style:italic; line-height:1.5; }
.cx-leave .dr-sub{ display:flex; align-items:center; gap:10px; background:var(--blue-50); border:1px solid var(--lv-sub-border); border-radius:var(--cx-radius-surface); padding:10px 13px; }
.cx-leave .dr-sub-n{ font-size:13.5px; font-weight:700; color:var(--ink); }
.cx-leave .vacbig{ background:var(--white); border:1px solid var(--hairline); border-radius:var(--cx-radius-surface); padding:15px; }
.cx-leave .vacbig-top{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:11px; }
.cx-leave .vacbig-top .big{ font-family:var(--font-display); font-size:25px; font-weight:700; letter-spacing:-.02em; line-height:1; }
.cx-leave .vacbig-top .big small{ font-family:var(--font-sans); font-size:12px; font-weight:600; color:var(--stone); }
.cx-leave .vacbig-top .lab{ font-family:var(--font-mono); font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:var(--stone); text-align:right; white-space:pre-line; }
.cx-leave .vacbig .balbar{ height:10px; }
.cx-leave .vacbig-legend{ display:flex; justify-content:space-between; font-size:11.5px; color:var(--walnut); margin-top:9px; }
.cx-leave .vacbig-legend b{ color:var(--ink); }
.cx-leave .dr-foot{ padding:16px 22px; background:var(--white); border-top:1px solid var(--hairline); }
.cx-leave .dr-foot .frow{ display:flex; gap:10px; }
.cx-leave .dr-foot .frow .lv-btn{ flex:1; }

/* balance bar */
.cx-leave .balbar{ display:flex; width:100%; border-radius:var(--cx-radius-round); overflow:hidden; background:var(--sand-2); }
.cx-leave .balseg{ height:100%; }
.cx-leave .balseg.taken{ background:var(--patina); } .cx-leave .balseg.planned{ background:var(--copper); } .cx-leave .balseg.pending{ background:var(--ochre); }

/* lifecycle stepper */
.cx-leave .lifebar{ display:flex; align-items:center; gap:0; flex-wrap:wrap; }
.cx-leave .lifestep{ display:flex; align-items:center; gap:7px; font-size:11.5px; font-weight:600; color:var(--stone); }
.cx-leave .lifestep .ls-dot{ width:24px; height:24px; border-radius:var(--cx-radius-round); display:grid; place-items:center; background:var(--sand); color:var(--stone); flex-shrink:0; border:1.5px solid transparent; }
.cx-leave .lifestep.done .ls-dot{ background:var(--patina-50); color:var(--patina); border-color:var(--patina); }
.cx-leave .lifestep.cur .ls-dot{ background:var(--copper); color:#fff; border-color:var(--copper); box-shadow:0 0 0 4px var(--copper-50); }
.cx-leave .lifestep.cur{ color:var(--ink); }
.cx-leave .lifestep.bad .ls-dot{ background:var(--brick-50); color:var(--brick); border-color:var(--brick); }
.cx-leave .lifestep.bad{ color:var(--brick); }
.cx-leave .lifeline{ flex:1; height:1.5px; background:var(--hairline-strong); margin:0 7px; min-width:12px; }
.cx-leave .lifeline.done{ background:var(--patina); }

/* AU / sick panel */
.cx-leave .au-panel{ background:var(--brick-50); border:1px solid rgba(154,59,51,.25); border-radius:var(--cx-radius-surface); padding:14px 16px; display:flex; flex-direction:column; gap:11px; }
.cx-leave .au-head{ display:flex; align-items:center; gap:9px; font-size:13px; font-weight:700; color:var(--brick); }
.cx-leave .au-grid{ display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.cx-leave .au-item{ background:rgba(255,255,255,.6); border:1px solid rgba(154,59,51,.16); border-radius:var(--cx-radius-surface); padding:9px 11px; }
.cx-leave .au-item .ai-l{ font-family:var(--font-mono); font-size:9px; letter-spacing:.06em; text-transform:uppercase; color:var(--brick); opacity:.8; }
.cx-leave .au-item .ai-v{ font-size:13px; font-weight:600; color:var(--ink); margin-top:3px; display:flex; align-items:center; gap:6px; }
.cx-leave .au-doc{ display:flex; align-items:center; gap:9px; background:rgba(255,255,255,.7); border:1px solid rgba(154,59,51,.2); border-radius:var(--cx-radius-surface); padding:9px 11px; font-size:12.5px; color:var(--walnut); }
.cx-leave .au-doc .ad-ic{ width:30px; height:30px; border-radius:var(--cx-radius-control); background:var(--brick-50); color:var(--brick); display:grid; place-items:center; flex-shrink:0; }
.cx-leave .au-doc .ad-n{ font-weight:600; color:var(--ink); font-family:var(--font-mono); font-size:11.5px; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cx-leave .au-doc .ad-dl{ color:var(--brick); font-weight:600; display:inline-flex; align-items:center; gap:4px; flex-shrink:0; }

/* audit timeline */
.cx-leave .audit{ display:flex; flex-direction:column; gap:0; position:relative; }
.cx-leave .audit-row{ display:flex; gap:12px; padding-bottom:14px; position:relative; }
.cx-leave .audit-row:last-child{ padding-bottom:0; }
.cx-leave .audit-row::before{ content:''; position:absolute; left:13px; top:27px; bottom:0; width:1.5px; background:var(--hairline-strong); }
.cx-leave .audit-row:last-child::before{ display:none; }
.cx-leave .audit-dot{ width:27px; height:27px; border-radius:var(--cx-radius-round); display:grid; place-items:center; color:#fff; flex-shrink:0; z-index:1; }
.cx-leave .audit-mid{ min-width:0; flex:1; padding-top:1px; }
.cx-leave .audit-t{ font-size:13px; font-weight:600; color:var(--ink); display:flex; align-items:center; justify-content:space-between; gap:10px; }
.cx-leave .audit-date{ font-family:var(--font-mono); font-size:10.5px; color:var(--stone); white-space:nowrap; }
.cx-leave .audit-by{ font-size:12px; color:var(--walnut); margin-top:2px; }
.cx-leave .audit-note{ font-size:12px; color:var(--walnut); font-style:italic; margin-top:4px; background:var(--paper-2); border-radius:var(--cx-radius-surface); padding:7px 10px; line-height:1.45; }

/* ════════════════════════ EINZEL-URLAUBSKONTO (Employee Drawer) ════════════════════════ */
.cx-leave .ed-head{ background:linear-gradient(135deg,#221d18,#3a322a); color:#fff; padding:22px 24px 20px; position:relative; flex-shrink:0; }
.cx-leave .ed-close{ position:absolute; top:16px; right:16px; width:32px; height:32px; border-radius:var(--cx-radius-control); border:none; background:rgba(255,255,255,.14); display:grid; place-items:center; color:#fff; }
.cx-leave .ed-close:hover{ background:rgba(255,255,255,.24); }
.cx-leave .ed-id{ display:flex; align-items:center; gap:14px; }
.cx-leave .ed-id .av{ box-shadow:0 4px 12px rgba(0,0,0,.25); }
.cx-leave .ed-name{ font-family:var(--font-display); font-size:22px; font-weight:800; letter-spacing:-.02em; line-height:1.1; }
.cx-leave .ed-pos{ font-size:12.5px; color:rgba(255,255,255,.7); margin-top:3px; }
.cx-leave .ed-tags{ display:flex; align-items:center; gap:8px; margin-top:14px; flex-wrap:wrap; }
.cx-leave .ed-tag{ display:inline-flex; align-items:center; gap:6px; font-size:11px; font-weight:600; background:rgba(255,255,255,.1); border-radius:var(--cx-radius-control); padding:4px 11px; color:rgba(255,255,255,.9); }
.cx-leave .ed-tag .sw{ width:8px; height:8px; border-radius:var(--cx-radius-control); }
.cx-leave .ed-body{ flex:1; overflow-y:auto; padding:20px 22px; display:flex; flex-direction:column; gap:20px; background:var(--paper); }
.cx-leave .ed-tabs{ display:flex; gap:2px; background:var(--sand); border-radius:var(--cx-radius-control); padding:3px; }
.cx-leave .ed-tabs button{ flex:1; background:transparent; border:none; padding:7px 10px; font-size:12.5px; font-weight:600; border-radius:var(--cx-radius-control); color:var(--walnut); display:inline-flex; align-items:center; justify-content:center; gap:6px; }
.cx-leave .ed-tabs button.on{ background:var(--white); color:var(--ink); box-shadow:0 1px 2px rgba(0,0,0,.07); }
.cx-leave .ed-konto{ background:var(--white); border:1px solid var(--hairline); border-radius:var(--cx-radius-surface); padding:17px 18px; }
.cx-leave .ed-konto-top{ display:flex; align-items:flex-end; justify-content:space-between; gap:14px; margin-bottom:13px; }
.cx-leave .ed-rest{ font-family:var(--font-display); font-size:40px; font-weight:800; letter-spacing:-.03em; line-height:.95; color:var(--ink); }
.cx-leave .ed-rest small{ font-size:15px; font-weight:600; color:var(--stone); }
.cx-leave .ed-rest-l{ font-family:var(--font-mono); font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:var(--stone); margin-bottom:5px; white-space:nowrap; }
.cx-leave .ed-risk{ text-align:right; font-size:11.5px; font-weight:600; display:inline-flex; align-items:center; gap:6px; padding:5px 10px; border-radius:var(--cx-radius-control); white-space:nowrap; }
.cx-leave .ed-risk.high{ background:var(--brick-50); color:var(--brick); } .cx-leave .ed-risk.med{ background:var(--ochre-50); color:var(--ochre); } .cx-leave .ed-risk.ok{ background:var(--patina-50); color:var(--patina); }
.cx-leave .ed-konto .balbar{ height:11px; margin-bottom:11px; }
.cx-leave .ed-prorata{ display:flex; align-items:center; gap:9px; font-size:12px; color:var(--walnut); background:var(--paper-2); border:1px solid var(--hairline-soft); border-radius:var(--cx-radius-surface); padding:9px 12px; margin-top:11px; }
.cx-leave .ed-prorata .ic{ color:var(--copper); flex-shrink:0; }
.cx-leave .ed-prorata b{ color:var(--ink); }
.cx-leave .ed-statgrid{ display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:12px; }
.cx-leave .ed-stat{ background:var(--paper-2); border:1px solid var(--hairline-soft); border-radius:var(--cx-radius-surface); padding:9px 10px; text-align:center; }
.cx-leave .ed-stat-v{ font-family:var(--font-display); font-size:19px; font-weight:700; color:var(--ink); line-height:1; }
.cx-leave .ed-stat-v.c{ color:var(--patina); } .cx-leave .ed-stat-v.p{ color:var(--copper-dark); } .cx-leave .ed-stat-v.o{ color:var(--ochre); }
.cx-leave .ed-stat-l{ font-size:10px; color:var(--stone); margin-top:4px; }
.cx-leave .ed-sec-t{ font-family:var(--font-mono); font-size:10px; font-weight:600; letter-spacing:.12em; text-transform:uppercase; color:var(--stone); margin-bottom:11px; display:flex; align-items:center; gap:7px; }
.cx-leave .ed-contract{ background:var(--white); border:1px solid var(--hairline); border-radius:var(--cx-radius-surface); padding:4px 15px; }
.cx-leave .ledger{ background:var(--white); border:1px solid var(--hairline); border-radius:var(--cx-radius-surface); overflow:hidden; }
.cx-leave .ledger-row{ display:grid; grid-template-columns:30px 1fr auto auto; align-items:center; gap:12px; padding:11px 15px; border-bottom:1px solid var(--hairline-soft); }
.cx-leave .ledger-row:last-child{ border-bottom:none; }
.cx-leave .lg-ic{ width:30px; height:30px; border-radius:var(--cx-radius-control); display:grid; place-items:center; flex-shrink:0; }
.cx-leave .lg-ic.credit{ background:var(--patina-50); color:var(--patina); } .cx-leave .lg-ic.debit{ background:var(--copper-50); color:var(--copper-dark); } .cx-leave .lg-ic.reserve{ background:var(--ochre-50); color:var(--ochre); }
.cx-leave .lg-mid{ min-width:0; }
.cx-leave .lg-t{ font-size:13px; font-weight:600; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cx-leave .lg-s{ font-size:11.5px; color:var(--stone); margin-top:1px; }
.cx-leave .lg-days{ font-family:var(--font-mono); font-size:13.5px; font-weight:700; text-align:right; font-variant-numeric:tabular-nums; }
.cx-leave .lg-days.pos{ color:var(--patina); } .cx-leave .lg-days.neg{ color:var(--copper-dark); } .cx-leave .lg-days.res{ color:var(--ochre); }
.cx-leave .lg-run{ font-family:var(--font-mono); font-size:11.5px; color:var(--stone); text-align:right; min-width:52px; }
.cx-leave .lg-run b{ color:var(--ink); font-weight:700; font-size:13px; }
.cx-leave .ed-abs{ display:flex; flex-direction:column; gap:8px; }
.cx-leave .ed-absrow{ display:flex; align-items:center; gap:12px; background:var(--white); border:1px solid var(--hairline); border-radius:var(--cx-radius-surface); padding:11px 14px; cursor:pointer; text-align:left; width:100%; border-left-width:3px; }
.cx-leave .ed-absrow:hover{ box-shadow:var(--sh-sm); }
.cx-leave .ed-absrow .ea-ic{ width:34px; height:34px; border-radius:var(--cx-radius-control); display:grid; place-items:center; flex-shrink:0; }
.cx-leave .ed-absrow .ea-mid{ flex:1; min-width:0; }
.cx-leave .ed-absrow .ea-t{ font-size:13px; font-weight:700; color:var(--ink); display:flex; align-items:center; gap:8px; }
.cx-leave .ed-absrow .ea-d{ font-size:12px; color:var(--walnut); margin-top:2px; }
.cx-leave .ed-absrow .ea-days{ font-family:var(--font-mono); font-size:11px; font-weight:600; color:var(--stone); background:var(--sand); border-radius:var(--cx-radius-control); padding:1px 7px; flex-shrink:0; }
.cx-leave .ed-empty{ text-align:center; padding:26px; color:var(--stone); font-size:13px; background:var(--white); border:1px dashed var(--hairline-strong); border-radius:var(--cx-radius-surface); }

/* ════════════════════════ URLAUBSKONTEN SLIDE-OVER ════════════════════════ */
.cx-leave .kp-panel{ position:fixed; top:0; right:0; bottom:0; width:760px; max-width:94vw; background:var(--paper); z-index:1150; display:flex; flex-direction:column; box-shadow:var(--sh-xl); animation:lv-slidein .26s var(--lv-ease); }
.cx-leave .kp-head{ display:flex; align-items:center; gap:13px; padding:18px 22px; background:var(--white); border-bottom:1px solid var(--hairline); }
.cx-leave .kp-head .kp-ic{ width:36px; height:36px; border-radius:var(--cx-radius-control); background:var(--patina-50); color:var(--patina); display:grid; place-items:center; }
.cx-leave .kp-head .kp-t{ font-family:var(--font-display); font-size:18px; font-weight:800; color:var(--ink); letter-spacing:-.01em; }
.cx-leave .kp-head .kp-s{ font-size:12px; color:var(--stone); margin-top:2px; }
.cx-leave .kp-close{ margin-left:auto; width:34px; height:34px; border-radius:var(--cx-radius-control); border:1px solid var(--hairline-strong); background:var(--white); display:grid; place-items:center; color:var(--walnut); }
.cx-leave .kp-close:hover{ background:var(--sand); }
.cx-leave .kp-body{ flex:1; overflow-y:auto; padding:18px 22px; display:flex; flex-direction:column; gap:16px; }

/* Urlaubskonten table */
.cx-leave .bal-card{ background:var(--white); border:1px solid var(--hairline); border-radius:var(--cx-radius-surface); box-shadow:var(--sh-xs); overflow-x:auto; overflow-y:hidden; }
.cx-leave .bal-head,.cx-leave .bal-row{ display:grid; grid-template-columns:minmax(180px,1.7fr) 76px 78px 88px 78px 72px minmax(120px,1.3fr); align-items:center; gap:8px; min-width:760px; }
.cx-leave .bal-head{ padding:11px 20px; background:var(--paper-2); border-bottom:1px solid var(--hairline); font-family:var(--font-mono); font-size:10px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--stone); }
.cx-leave .bal-row{ padding:12px 20px; border-bottom:1px solid var(--hairline-soft); cursor:pointer; background:transparent; border-left:none; border-right:none; border-top:none; width:100%; text-align:left; }
.cx-leave .bal-row:last-child{ border-bottom:none; }
.cx-leave .bal-row:hover{ background:var(--copper-50); }
.cx-leave .bal-cell.num{ font-variant-numeric:tabular-nums; font-family:var(--font-mono); font-size:13.5px; color:var(--walnut); }
.cx-leave .bal-cell.num b{ color:var(--ink); font-weight:700; }
.cx-leave .bal-cell .carry{ color:var(--patina); font-weight:600; }
.cx-leave .bal-cell.who{ display:flex; align-items:center; gap:11px; min-width:0; }
.cx-leave .bal-who-t{ min-width:0; }
.cx-leave .bal-who-n{ font-size:13.5px; font-weight:700; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cx-leave .bal-who-p{ font-size:11.5px; color:var(--stone); display:flex; align-items:center; gap:6px; margin-top:1px; }
.cx-leave .bal-cell.rest{ text-align:right; }
.cx-leave .bal-rest-v{ font-family:var(--font-display); font-size:21px; font-weight:700; letter-spacing:-.02em; line-height:1; color:var(--ink); }
.cx-leave .bal-rest-v.warn{ color:var(--ochre); }
.cx-leave .bal-rest-l{ font-size:10px; color:var(--stone); margin-top:2px; }

/* ════════════════════════ PLANNING MODAL ════════════════════════ */
.cx-leave .lv-modal{ display:block; position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); width:560px; max-width:94vw; height:auto; max-height:92vh; overflow-y:auto; background:var(--paper); border-radius:var(--cx-radius-surface); z-index:1150; box-shadow:var(--sh-xl); animation:lv-modalin .24s var(--lv-ease); }
@keyframes lv-modalin{ from{opacity:0; transform:translate(-50%,-46%) scale(.97)} to{opacity:1; transform:translate(-50%,-50%) scale(1)} }
@keyframes lv-toastin{ from{opacity:0; transform:translateX(-50%) translateY(10px)} to{opacity:1; transform:translateX(-50%) translateY(0)} }
.cx-leave .modal-h{ padding:22px 24px 16px; display:flex; align-items:flex-start; gap:14px; border-bottom:1px solid var(--hairline-soft); position:relative; }
.cx-leave .modal-h .mi{ width:42px; height:42px; border-radius:var(--cx-radius-control); background:var(--copper-50); color:var(--copper); display:grid; place-items:center; flex-shrink:0; }
.cx-leave .modal-h .mt{ font-family:var(--font-display); font-size:19px; font-weight:700; letter-spacing:-.02em; }
.cx-leave .modal-h .ms{ font-size:13px; color:var(--walnut); margin-top:3px; max-width:56ch; }
.cx-leave .modal-close{ position:absolute; top:16px; right:16px; width:32px; height:32px; border-radius:var(--cx-radius-control); border:none; background:var(--sand); display:grid; place-items:center; color:var(--walnut); }
.cx-leave .modal-close:hover{ background:var(--sand-2); }
.cx-leave .modal-b{ padding:20px 24px; display:flex; flex-direction:column; gap:16px; }
.cx-leave .frow2{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.cx-leave .field{ display:flex; flex-direction:column; gap:7px; }
.cx-leave .field label{ font-size:12.5px; font-weight:600; color: var(--cx-label-color); }
.cx-leave .field .hint{ font-size:11.5px; color:var(--stone); }
.cx-leave .lockfield{ display:flex; align-items:center; gap:9px; min-height:42px; padding:0 12px; border:1.5px solid var(--lv-field-border); border-radius:var(--cx-radius-control); background:var(--white); box-shadow:0 1px 2px rgba(28,25,21,.05); font-size:13.5px; font-weight:600; color:var(--ink); transition:border-color .15s, box-shadow .15s; }
.cx-leave .lockfield:hover{ border-color:var(--lv-field-border-hover); }
.cx-leave .lockfield:focus, .cx-leave .lockfield:focus-within{ border-color:var(--copper); box-shadow:0 0 0 3px var(--copper-50); outline:none; }
.cx-leave select.lockfield{ appearance:none; -webkit-appearance:none; padding-right:34px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23715a45' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; }
.cx-leave .minicheck{ display:inline-flex; align-items:center; gap:8px; font-size:12px; font-weight:500; color:var(--walnut); cursor:pointer; }
.cx-leave .minicheck input{ display:none; }
.cx-leave .minicheck .mc-box{ width:18px; height:18px; border-radius:var(--cx-radius-control); border:1.5px solid var(--lv-check-border); background:var(--white); display:grid; place-items:center; color:#fff; flex-shrink:0; }
.cx-leave .minicheck:hover .mc-box{ border-color:var(--copper); }
.cx-leave .minicheck.on .mc-box{ background:var(--copper); border-color:var(--copper); }
.cx-leave .calc-warn{ display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:600; color:var(--brick); }
.cx-leave .calc-conflict{ display:flex; align-items:center; gap:9px; background:var(--ochre-50); border:1px solid rgba(169,117,20,.3); border-radius:var(--cx-radius-surface); padding:10px 13px; font-size:12.5px; color:var(--ochre); }
.cx-leave .calc-conflict b{ color:var(--ink); }
/* inline per-employee save errors (partial batch failure keeps the dialog open) */
.cx-leave .plan-errors{ display:flex; gap:10px; align-items:flex-start; background:var(--brick-50); border:1px solid var(--brick); border-radius:var(--cx-radius-surface); padding:11px 13px; font-size:12.5px; color:var(--brick); line-height:1.5; }
.cx-leave .plan-errors i{ flex-shrink:0; margin-top:1px; }
.cx-leave .plan-errors b{ color:var(--ink); display:block; margin-bottom:2px; }
.cx-leave .modal-f{ padding:15px 24px; border-top:1px solid var(--hairline-soft); display:flex; align-items:center; gap:10px; background:var(--white); border-radius:0 0 var(--cx-radius-surface) var(--cx-radius-surface); }
.cx-leave .modal-f.col{ flex-direction:column; align-items:stretch; gap:12px; }
.cx-leave .modal-f.col .mf-row{ display:flex; align-items:center; gap:12px; }
.cx-leave .modal-f.col .mf-row .mf-sum{ flex:1; min-width:0; }
.cx-leave .mf-sum{ display:inline-flex; align-items:center; gap:9px; font-size:12.5px; font-weight:600; color:var(--walnut); }
.cx-leave .modal-f.col .mf-actions{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.cx-leave .modal-f.col .mf-actions .lv-btn{ flex:0 1 auto; white-space:nowrap; }
.cx-leave .plan-emps{ display:flex; flex-wrap:wrap; gap:7px; }
.cx-leave .plan-empchip{ display:inline-flex; align-items:center; gap:7px; background:var(--white); border:1px solid var(--hairline-strong); border-radius:var(--cx-radius-control); padding:4px 6px 4px 4px; font-size:12.5px; font-weight:600; color:var(--ink); }
.cx-leave .plan-empchip .pe-x{ width:18px; height:18px; border-radius:var(--cx-radius-control); background:var(--sand); border:none; display:grid; place-items:center; color:var(--walnut); flex-shrink:0; }
.cx-leave .plan-empchip .pe-x:hover{ background:var(--brick-50); color:var(--brick); }
/* "+ hinzufügen" inline add control (native select styled as a dashed chip) */
.cx-leave .plan-addbtn{ appearance:none; -webkit-appearance:none; flex:1 1 160px; min-height:34px; text-align:left; border:1px dashed var(--hairline-strong); border-radius:var(--cx-radius-control); background:var(--paper-2); color:var(--walnut); font-size:13px; font-weight:600; padding:6px 18px; cursor:pointer; }
.cx-leave .plan-addbtn:hover{ border-color:var(--copper); color:var(--copper-dark); }
/* Read-only computed field (Werktage je Person) — neutral sand, only the icon is copper */
.cx-leave .lockfield.computed{ background:var(--paper-2); border:1.5px solid var(--lv-field-border-soft); box-shadow:none; color:var(--ink); cursor:default; }
.cx-leave .lockfield.computed:hover{ border-color:var(--lv-field-border-soft); }
.cx-leave .lockfield.computed i{ color:var(--copper); }
.cx-leave .lockfield.computed b{ font-weight:800; font-variant-numeric:tabular-nums; color:var(--ink); }
/* Übersicht & Vertretung card */
.cx-leave .ov-card{ display:flex; flex-direction:column; border:1px solid var(--hairline-strong); border-radius:var(--cx-radius-surface); overflow:hidden; background:var(--white); }
.cx-leave .ov-row{ display:flex; align-items:center; gap:11px; padding:10px 13px; }
.cx-leave .ov-row + .ov-row{ border-top:1px solid var(--hairline-soft); }
.cx-leave .ov-main{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.cx-leave .ov-name{ font-size:13.5px; font-weight:700; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cx-leave .ov-vert{ display:flex; align-items:center; gap:6px; font-size:11.5px; color:var(--stone); }
.cx-leave .ov-vert i{ font-size:11px; color:var(--stone); }
.cx-leave .ov-vsel{ appearance:none; -webkit-appearance:none; border:none; background:transparent; color:var(--walnut); font-size:11.5px; font-weight:600; padding:1px 2px; cursor:pointer; max-width:170px; }
.cx-leave .ov-vsel:hover{ color:var(--copper-dark); }
.cx-leave .ov-bal{ font-family:var(--font-mono); font-size:11.5px; font-weight:700; color:var(--copper-dark); background:var(--copper-50); border-radius:var(--cx-radius-control); padding:3px 9px; white-space:nowrap; flex-shrink:0; }
.cx-leave .ov-bal.over{ color:var(--brick); background:var(--brick-50); }
.cx-leave .ov-bal.neutral{ color:var(--stone); background:var(--sand); }

/* ── Responsive ─────────────────────────────────────────── */
/* The approval rail now lives in a slide-over (max-width:94vw), so it needs no grid
   collapse — the KPI strip is the only element that reflows on narrow widths. */
@media (max-width:760px){
  .cx-leave .ck-stats{ flex-wrap:wrap; } .cx-leave .ck-stat{ flex:1 1 50%; } .cx-leave .au-grid{ grid-template-columns:1fr; }
  /* small screens: header + wrapped KPI strip alone can exceed the viewport, and the
     fixed shell would clip them without any scrollbar — fall back to page scroll and
     cap the timeline so its internal scroll (sticky day header) still works */
  .cx-leave.ck-shell{ height:auto; overflow:visible; }
  .cx-leave .tl-scroll{ max-height:70vh; }
}
