:root {
  /* Palette – "ruhiges Planungsinstrument": kühles Neutral, tiefes Tinten-Navy, ein klarer Ultramarin-Akzent */
  --bg: #eef1f6;
  --surface: #f7f8fb;
  --card: #ffffff;
  --border: #e4e8f0;
  --border-strong: #d3dae6;
  --ink: #15203a;            /* Sidebar + Überschriften */
  --ink-soft: #2a3650;
  --text: #1f2840;
  --muted: #6a7589;
  --muted-2: #97a1b4;

  --primary: #2d4ecf;
  --primary-dark: #2440ad;
  --primary-soft: #e7ecfd;
  --primary-softer: #f2f5fe;

  --green: #18935f;
  --green-soft: #e1f4ec;
  --red: #d83a3f;
  --red-soft: #fce9e9;
  --amber: #c77f12;
  --amber-soft: #fbefd9;
  --violet: #6d4ee0;
  --violet-soft: #eee9fc;

  /* Domänen-Farben: klar unterscheidbar von Status-Farben */
  --school: #0b9aa6;          /* Schulferien – Petrol/Teal */
  --school-soft: #d9f1f3;
  --bridge: #b8791a;          /* Brückentage – Ocker/Gold */
  --bridge-soft: #f8ead0;

  --shadow-sm: 0 1px 2px rgba(20, 30, 60, .05);
  --shadow: 0 1px 3px rgba(20, 30, 60, .05), 0 8px 28px rgba(20, 30, 60, .07);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .22);
  --radius: 16px;
  --radius-sm: 10px;

  --font-display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display { font-family: var(--font-display); letter-spacing: -.01em; }

/* ---------- Icons ---------- */
.icon { width: 1.25em; height: 1.25em; display: inline-block; vertical-align: -0.18em; flex-shrink: 0; }
.icon svg { width: 100%; height: 100%; display: block; }

/* ---------- Loader ---------- */
.loader { display: flex; align-items: center; justify-content: center; height: 100vh; }
.spinner {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Auth-Screens ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(1200px 500px at 80% -10%, #dfe6fb 0%, rgba(223,230,251,0) 60%),
    radial-gradient(900px 500px at 0% 110%, #e6f3f4 0%, rgba(230,243,244,0) 55%),
    var(--bg);
}
.auth-card {
  background: var(--card); border-radius: 22px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 430px; padding: 40px 36px; border: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 25px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.brand .brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.brand .brand-mark .icon { width: 20px; height: 20px; }
.auth-card .sub { color: var(--muted); margin: 8px 0 26px; }
.auth-card h2 { font-size: 19px; margin-bottom: 18px; color: var(--ink); }

/* ---------- Forms ---------- */
label.field { display: block; margin-bottom: 15px; }
label.field .lbl { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 6px; color: var(--ink-soft); }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
input[readonly] { background: var(--surface); color: var(--muted); }
textarea { resize: vertical; min-height: 70px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; transition: all .15s;
  background: var(--primary); color: #fff; white-space: nowrap;
}
.btn .icon { width: 1.05em; height: 1.05em; }
.btn:hover { background: var(--primary-dark); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; color: var(--ink-soft); border-color: var(--border-strong); }
.btn.ghost:hover { background: var(--surface); border-color: var(--muted-2); }
.btn.danger { background: var(--red); }
.btn.danger:hover { background: #bb3035; }
.btn.success { background: var(--green); }
.btn.success:hover { background: #147a4f; }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn.icon-only { padding: 7px; }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; font-weight: 600; font-size: 13px; padding: 0; display: inline-flex; align-items: center; gap: 4px; }
.btn-link:hover { text-decoration: underline; }

/* ---------- App-Layout ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 246px; background: var(--ink); color: #c4cee2; flex-shrink: 0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .logo { display: flex; align-items: center; gap: 10px; padding: 22px 20px 18px; font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.sidebar .logo .brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--primary); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.sidebar .logo .brand-mark .icon { width: 19px; height: 19px; }
.sidebar nav { flex: 1; padding: 8px 12px; }
.nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #6f7d99; font-weight: 700; padding: 14px 13px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--radius-sm);
  color: #aebbd6; cursor: pointer; font-weight: 600; margin-bottom: 2px; font-size: 14px; transition: all .12s;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(45,78,207,.4); }
.nav-item .icon { width: 18px; height: 18px; opacity: .95; }
.nav-item .badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; min-width: 20px; text-align: center; }
.sidebar .user-box { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 10px; }
.sidebar .user-box .av { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.12); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.sidebar .user-box .nm { color: #fff; font-weight: 600; font-size: 13.5px; line-height: 1.2; }
.sidebar .user-box .rl { color: #7e8db0; font-size: 12px; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.acting-banner { display: flex; align-items: center; gap: 10px; background: #15203a; color: #fff; padding: 9px 20px; font-size: 13px; font-weight: 500; }
.acting-banner .icon { width: 17px; height: 17px; color: #6ea0ff; }
.acting-banner b { font-weight: 700; }
.acting-banner .btn { margin-left: auto; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }
.acting-banner .btn:hover { background: rgba(255,255,255,.2); }
.topbar {
  background: rgba(255,255,255,.86); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); padding: 15px 28px;
  display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 5;
}
.topbar h1 { font-size: 21px; font-weight: 700; color: var(--ink); }
.content { padding: 26px 28px 40px; flex: 1; max-width: 1240px; width: 100%; }

/* ---------- Cards & Grids ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 22px; }
.card h3 { font-size: 15.5px; margin-bottom: 14px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.card h3 .icon { width: 17px; height: 17px; color: var(--muted); }
.grid { display: grid; gap: 18px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) { .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

/* ---------- Stat-Karten ---------- */
.stat { padding: 20px 22px; position: relative; }
.stat .stat-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .stat-value { font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -.03em; margin-top: 6px; color: var(--ink); line-height: 1; }
.stat .stat-sub { color: var(--muted); font-size: 12px; margin-top: 6px; }
.stat .ico-pill { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; position: absolute; top: 20px; right: 20px; }
.stat .ico-pill .icon { width: 21px; height: 21px; }
.pill-blue { background: var(--primary-soft); color: var(--primary); }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-amber { background: var(--amber-soft); color: var(--amber); }
.pill-violet { background: var(--violet-soft); color: var(--violet); }
.pill-school { background: var(--school-soft); color: var(--school); }

/* ---------- Tabellen ---------- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--border); }
td { padding: 12px 14px; border-bottom: 1px solid #f0f3f8; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--primary-softer); }
.table-card { overflow: hidden; }
.table-card table { margin: 0; }
.table-scroll { overflow-x: auto; }

/* ---------- Badges / Status ---------- */
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; line-height: 1.5; }
.tag .icon { width: 13px; height: 13px; }
.tag.pending { background: var(--amber-soft); color: var(--amber); }
.tag.approved { background: var(--green-soft); color: var(--green); }
.tag.rejected { background: var(--red-soft); color: var(--red); }
.tag.urlaub { background: var(--primary-soft); color: var(--primary); }
.tag.krankheit { background: var(--red-soft); color: var(--red); }
.tag.sonstiges { background: var(--violet-soft); color: var(--violet); }
.tag.school { background: var(--school-soft); color: var(--school); }
.tag.bridge { background: var(--bridge-soft); color: var(--bridge); }
.tag.role-admin { background: #ffe6d3; color: #b3550a; }
.tag.role-manager { background: var(--primary-soft); color: var(--primary); }
.tag.role-employee { background: #eaeef4; color: #56627a; }

.avatar { width: 34px; height: 34px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell .nm { font-weight: 600; color: var(--ink-soft); }
.user-cell .dp { color: var(--muted); font-size: 12px; }

/* ---------- Genehmigungs-Karten ---------- */
.ap-card { transition: box-shadow .15s; }
.ap-card:hover { box-shadow: var(--shadow); }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.ap-grid > div > .muted { font-size: 12px; }
.ap-grid b { font-size: 15px; color: var(--ink); }
.ap-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding: 10px 12px; background: var(--surface); border-radius: var(--radius-sm); font-size: 13px; }
.ap-meta b { color: var(--ink); }
.ap-note { display: flex; gap: 9px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; background: var(--primary-softer); border-radius: var(--radius-sm); font-size: 13px; color: var(--ink-soft); }
.ap-note .icon { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; margin-top: 1px; }

/* ---------- Progress ---------- */
.progress { height: 9px; background: #e9edf4; border-radius: 6px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--primary); border-radius: 6px; transition: width .4s; }

/* ---------- Kalender ---------- */
.cal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cal-head .month-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; min-width: 190px; text-align: center; color: var(--ink); }
.cal-grid { display: grid; grid-template-columns: 200px repeat(var(--days), minmax(26px, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.cal-grid .ch { background: var(--surface); border-bottom: 1px solid var(--border); padding: 7px 2px 6px; text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); line-height: 1.35; position: relative; }
.cal-grid .ch.weekend { color: var(--muted-2); background: #eef1f6; }
.cal-grid .ch.bridge { box-shadow: inset 0 -4px 0 var(--bridge); color: var(--bridge); font-weight: 800; }
.cal-grid .ch.school { box-shadow: inset 0 -4px 0 var(--school); color: var(--school); font-weight: 800; }
.cal-grid .ch.bridge.school { box-shadow: inset 0 -4px 0 var(--school), inset 0 -8px 0 var(--bridge); }
.cal-grid .ch.betrieb { box-shadow: inset 0 -4px 0 var(--ink); color: var(--ink); font-weight: 800; }
.cal-grid .ch.decday { box-shadow: inset 0 -4px 0 var(--violet); }
.cal-grid .ch .dec-badge { display: inline-block; font-size: 8px; font-weight: 800; color: var(--violet); background: var(--violet-soft); border-radius: 4px; padding: 0 3px; margin-top: 1px; }
.cal-grid .ch.holiday { background: var(--red-soft); color: var(--red); box-shadow: inset 0 -4px 0 var(--red); }
.cal-grid .ch.today { background: var(--primary); color: #fff; box-shadow: none; }
.cal-grid .corner { background: var(--surface); border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); padding: 8px 12px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; display: flex; align-items: flex-end; }
.cal-grid .name-cell { padding: 8px 12px; border-bottom: 1px solid #f0f3f8; border-right: 1px solid var(--border); font-weight: 600; display: flex; align-items: center; gap: 8px; background: #fff; position: sticky; left: 0; z-index: 1; }
.cal-grid .name-cell .avatar { width: 26px; height: 26px; font-size: 11px; border-radius: 7px; }
.cal-grid .name-cell .nm { color: var(--ink-soft); font-size: 13px; }
.cal-grid .day-cell { border-bottom: 1px solid #f0f3f8; border-right: 1px solid #f4f6fa; min-height: 38px; position: relative; }
.cal-grid .day-cell.weekend { background: #f6f8fb; }
.cal-grid .day-cell.holiday { background: var(--red-soft); }
.cal-grid .day-cell.school::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--school); opacity: .55; }
.cal-grid .day-cell.bridge { background: repeating-linear-gradient(45deg, var(--bridge-soft), var(--bridge-soft) 4px, #fff 4px, #fff 8px); }
.cal-grid .day-cell.betrieb::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--ink); opacity: .7; }
.cal-grid .day-cell .ab { position: absolute; inset: 4px 2px; border-radius: 6px; }
.cal-stack { display: flex; flex-direction: column; gap: 18px; }
.cal-month { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.cal-month .cal-month-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink); padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; left: 0; }
.cal-month .cal-grid { border: none; border-radius: 0; box-shadow: none; }
/* Halber Tag: nur eine Hälfte der Zelle füllen */
.cal-grid .day-cell .ab.half.am { right: 50%; }
.cal-grid .day-cell .ab.half.pm { left: 50%; }
.cal-grid .day-cell .ab.urlaub { background: var(--primary); opacity: .88; }
.cal-grid .day-cell .ab.krankheit { background: var(--red); opacity: .82; }
.cal-grid .day-cell .ab.sonstiges { background: var(--violet); opacity: .82; }
.cal-grid .day-cell .ab.pending { opacity: 1; background: repeating-linear-gradient(45deg, var(--primary), var(--primary) 3px, #fff 3px, #fff 6px); border: none; }
.cal-grid .day-cell .ab.krankheit.pending { background: repeating-linear-gradient(45deg, var(--red), var(--red) 3px, #fff 3px, #fff 6px); }
.cal-grid .day-cell .ab.sonstiges.pending { background: repeating-linear-gradient(45deg, var(--violet), var(--violet) 3px, #fff 3px, #fff 6px); }
.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.cal-legend .lg { display: flex; align-items: center; gap: 6px; }
.cal-legend .sw { width: 15px; height: 15px; border-radius: 4px; flex-shrink: 0; }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,21,38,.5); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 500px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); animation: pop .18s; }
@keyframes pop { from { transform: translateY(12px) scale(.985); opacity: 0; } }
.modal .modal-head { padding: 20px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: #fff; border-radius: 18px 18px 0 0; }
.modal .modal-head h3 { font-size: 17px; margin: 0; color: var(--ink); }
.modal .modal-body { padding: 22px; }
.modal .modal-foot { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; position: sticky; bottom: 0; background: #fff; }
.modal .x { background: none; border: none; cursor: pointer; color: var(--muted); line-height: 1; display: flex; padding: 4px; border-radius: 6px; }
.modal .x:hover { background: var(--surface); color: var(--ink); }
.modal .x .icon { width: 20px; height: 20px; }

/* ---------- Hinweisboxen ---------- */
.notice { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-top: 12px; display: flex; gap: 9px; align-items: flex-start; }
.notice .icon { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.notice.info { background: var(--primary-softer); color: #243f8e; }
.notice.warn { background: var(--amber-soft); color: #87560a; }
.notice.error { background: var(--red-soft); color: #9e2529; }
.notice.success { background: var(--green-soft); color: #0f6f48; }
.notice.school { background: var(--school-soft); color: #086a73; }
.notice.bridge { background: var(--bridge-soft); color: #8a5c12; }
.preview-line { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.preview-line b { font-weight: 700; }
.preview-box { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.preview-box .notice { margin-top: 0; }

/* ---------- Hilfe / Handbuch ---------- */
.help-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 900px) { .help-grid { grid-template-columns: 1fr; } }
.help-card .help-body { font-size: 13.5px; color: var(--ink-soft); }
.help-card .help-body p { margin-bottom: 8px; }
.help-card .help-body p:last-child { margin-bottom: 0; }

/* ---------- Import ---------- */
.imp-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.imp-step { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-soft); }
.imp-num { flex-shrink: 0; width: 22px; height: 22px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 22px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; transition: all .15s; }
.dropzone .icon { width: 26px; height: 26px; color: var(--muted-2); }
.dropzone.over { border-color: var(--primary); background: var(--primary-softer); color: var(--primary); }

/* ---------- Build-/Deploy-Anzeige ---------- */
#versionBadge { position: fixed; right: 10px; bottom: 8px; z-index: 60; display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--muted); background: rgba(255,255,255,.9); border: 1px solid var(--border);
  padding: 3px 9px; border-radius: 999px; box-shadow: var(--shadow-sm); pointer-events: auto; max-width: 92vw; }
#versionBadge .icon { width: 12px; height: 12px; color: var(--muted-2); }
@media (max-width: 720px) { #versionBadge { font-size: 10px; right: 6px; bottom: 6px; } }

/* ---------- Toasts ---------- */
#toasts { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); border-radius: 11px; padding: 12px 16px; min-width: 230px; font-weight: 600; font-size: 13.5px; animation: slideIn .2s; display: flex; align-items: center; gap: 9px; }
.toast .icon { width: 17px; height: 17px; }
.toast.success .icon { color: #4ade80; }
.toast.error .icon { color: #fb7185; }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } }

/* ---------- Diverses ---------- */
.flex { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap { gap: 12px; }
.mt { margin-top: 18px; }
.muted { color: var(--muted); }
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .big { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--muted-2); }
.empty .big .icon { width: 44px; height: 44px; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .spacer { flex: 1; }
.seg { display: inline-flex; background: #e7ebf2; border-radius: var(--radius-sm); padding: 3px; }
.seg button { border: none; background: none; padding: 6px 14px; border-radius: 7px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--muted); font-family: inherit; }
.seg button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
select.inline { width: auto; padding: 7px 10px; }
.flag-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }

/* ---------- Jahresübersicht (Heatmap, druckbar) ---------- */
.print-area { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.yc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.yc-title { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--ink); }
.yc-legend { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.yc-key { display: inline-flex; align-items: center; gap: 5px; }
.yc-sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; border: 1px solid var(--border); }
.yc-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px; }
.yc-month { border: 1px solid var(--border); border-radius: 10px; padding: 10px; min-width: 0; }
.yc-mname { font-weight: 700; color: var(--ink); font-size: 13px; margin-bottom: 6px; text-align: center; }
.yc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.yc-wd { font-size: 9px; color: var(--muted-2); text-align: center; font-weight: 700; padding-bottom: 2px; }
.yc-day { position: relative; height: 21px; display: flex; align-items: center; justify-content: center; font-size: 10px; border-radius: 4px; color: var(--ink-soft); background: #f4f6fa; overflow: hidden; }
.yc-day.empty { background: transparent; }
.yc-day.we { background: #eef1f6; color: var(--muted-2); }
.yc-day.filled { color: #fff; }
.yc-day .yc-n { position: absolute; bottom: 0; right: 1px; font-size: 7px; font-weight: 700; opacity: .75; line-height: 1; }
/* Heatmap-Stufen + Feiertag – mit Druckfarben */
.yc-sw, .yc-day { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.yc-day.h1, .yc-sw.h1 { background: #d7e0fb; }
.yc-day.h2, .yc-sw.h2 { background: #aebffa; }
.yc-day.h3, .yc-sw.h3 { background: #7a93f2; color: #fff; }
.yc-day.h4, .yc-sw.h4 { background: #4f6bea; color: #fff; }
.yc-day.hol, .yc-sw.hol { background: var(--red-soft); color: var(--red); box-shadow: inset 0 0 0 1px rgba(216,58,63,.4); }
.yc-months-modal { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

/* ---------- Druck ---------- */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .app-shell, .main, .content { display: block; }
  body { background: #fff; }
  .content { padding: 0; max-width: none; }
  .print-area { border: none; border-radius: 0; padding: 0; }
  .yc-months { gap: 8px; }
  .yc-month { break-inside: avoid; }
  @page { size: A4 landscape; margin: 12mm; }
}

@media (max-width: 980px) { .yc-months { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) {
  .sidebar { display: none; }
  .content { padding: 18px 16px 32px; }
  .topbar { padding: 14px 16px; }
  .grid.cols-4 { grid-template-columns: 1fr 1fr; }
}
