/* Urlaubsplaner – Gestaltung nach dem Corporate Design Manual von Dentaltechnik Weber
   (Vorlage: "CI Dentaltechnik Weber/brand.css") */

@font-face { font-family: "Urbanist"; font-style: normal; font-weight: 300; font-display: swap; src: url("/brand/fonts/urbanist-300.woff2") format("woff2"); }
@font-face { font-family: "Urbanist"; font-style: normal; font-weight: 400; font-display: swap; src: url("/brand/fonts/urbanist-400.woff2") format("woff2"); }
@font-face { font-family: "Urbanist"; font-style: normal; font-weight: 500; font-display: swap; src: url("/brand/fonts/urbanist-500.woff2") format("woff2"); }
@font-face { font-family: "Urbanist"; font-style: normal; font-weight: 600; font-display: swap; src: url("/brand/fonts/urbanist-600.woff2") format("woff2"); }

:root {
  /* Markenfarben */
  --mirage: #101828;
  --cornflower: #665ef3;
  --cornflower-dark: #4f46e0;
  --lavender: #e1dffc;      /* Cornflower 20 % */
  --lavender-10: #f0effe;   /* Cornflower 10 % */
  --jungle: #12b76a;
  --mint: #d0f1e1;          /* Jungle Green 20 % */

  /* Rollen (hell) */
  --bg: #f7f7ff;
  --surface: #ffffff;
  --surface-2: #f3f3f4;     /* Mirage 5 % */
  --text: #101828;
  --muted: #5d6270;
  --border: #e7e8e9;        /* Mirage 10 % */
  --border-strong: #cfd1d4; /* Mirage 20 % */
  --accent: var(--cornflower);
  --accent-hover: var(--cornflower-dark);
  --accent-text: #ffffff;
  --accent-soft: var(--lavender);
  --accent-soft-text: #4f46e0;
  --header-bg: var(--mirage);
  --header-text: #ffffff;
  --ok: #067647;
  --ok-soft: var(--mint);
  --warn: #b54708;
  --warn-soft: #fef0c7;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --holiday: #e7f8f0;       /* Jungle Green 10 % */
  --holiday-text: #067647;
  --focus: rgba(102, 94, 243, .35);
  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --font: "Urbanist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}

html[data-mode="dark"] {
    --bg: #0c111d;
    --surface: #161b26;
    --surface-2: #1f242f;
    --text: #f5f5f6;
    --muted: #a3a6ad;
    --border: #2a303c;
    --border-strong: #3b4252;
    --accent: #857ef5;        /* Cornflower 80 % – auf dunklem Grund besser lesbar */
    --accent-hover: #a39ef8;
    --accent-text: #0c111d;
    --accent-soft: #26244d;
    --accent-soft-text: #c2bffa;
    --header-bg: #101828;
    --ok: #47cd89;
    --ok-soft: #0f3324;
    --warn: #fdb022;
    --warn-soft: #3a2a0d;
    --danger: #f97066;
    --danger-soft: #3b1a17;
    --holiday: #10291e;
    --holiday-text: #75e0a7;
    --shadow: none;
    color-scheme: dark;
  }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

#app {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 16px calc(32px + env(safe-area-inset-bottom));
}

.loading { padding: 80px 0; text-align: center; color: var(--muted); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
strong { font-weight: 600; }

.icon { width: 22px; height: 22px; flex: 0 0 auto; vertical-align: middle; }
.icon-sm { width: 18px; height: 18px; }
h2 .icon { margin: -3px 8px 0 0; }

/* ---------- Karten & Formulare ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.narrow { max-width: 440px; margin: 6vh auto 0; }

/* Anmelde-/Einrichtungskarte mit Logo-Kopf in Mirage */
.brand-card { padding: 0; overflow: hidden; }
.brand-card .brand-head {
  background: var(--header-bg);
  padding: 28px 24px 24px;
  color: var(--header-text);
}
.brand-card .brand-head img { height: 40px; width: auto; display: block; }
.brand-card .brand-head p { margin: 14px 0 0; color: #cfd1d4; font-size: 1rem; }
.brand-card .brand-body { padding: 24px; }

label { display: block; font-weight: 600; font-size: .95rem; margin: 0 0 6px; }
.field { margin-bottom: 16px; }
.hint { font-size: .85rem; color: var(--muted); margin-top: 4px; }

input, textarea, select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  min-height: 46px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--focus); }
button:focus-visible, .btn:focus-visible, .cal .day:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input.pin { font-size: 1.6rem; letter-spacing: .4em; text-align: center; font-weight: 600; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 140px; }

/* Buttons wie im Handbuch: CTA Cornflower, Zweit-Button Lavendel */
button, .btn {
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  min-height: 44px;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: background-color .15s;
}
button:hover, .btn:hover { background: var(--accent-hover); }
button:disabled { opacity: .5; cursor: default; }
button.secondary, .btn.secondary { background: var(--accent-soft); color: var(--accent-soft-text); }
button.secondary:hover, .btn.secondary:hover { background: var(--lavender-10); }
button.ghost { background: transparent; color: var(--muted); padding: 8px 10px; }
button.ghost:hover { background: var(--surface-2); color: var(--text); }
button.danger { background: var(--danger-soft); color: var(--danger); }
button.danger:hover { background: var(--danger-soft); filter: brightness(.97); }
button.ok { background: var(--ok-soft); color: var(--ok); }
button.ok:hover { background: var(--ok-soft); filter: brightness(.97); }
button.block { width: 100%; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.error { color: var(--danger); font-size: .9rem; margin-top: 8px; min-height: 1.2em; }

/* ---------- Kopfzeile & Tabs ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px 16px 14px 20px;
  background: var(--header-bg);
  color: var(--header-text);
  border-radius: var(--radius);
}
.topbar .who { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.topbar .who img { height: 38px; width: auto; display: block; } /* Logo-Mindesthöhe digital laut Handbuch: 30 px */
.topbar .who span { font-size: .875rem; color: #cfd1d4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .who span strong { color: #fff; }
.topbar button.ghost { color: #cfd1d4; }
.topbar button.ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow-x: auto;
}
.tabs button {
  flex: 1 0 auto;
  background: transparent;
  color: var(--muted);
  min-height: 42px;
  padding: 8px 12px;
}
.tabs button:hover { background: var(--surface-2); color: var(--text); }
.tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-soft-text); }
.badge {
  display: inline-block;
  min-width: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: .75rem;
  line-height: 20px;
  text-align: center;
}

/* ---------- Kalender ---------- */

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.cal-head h2 { margin: 0; text-transform: capitalize; }
.cal-head .nav { display: flex; gap: 6px; }
.cal-head .nav button { min-width: 44px; padding: 8px 10px; }
.cal-head .nav .icon { width: 20px; height: 20px; }

.cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.cal .dow { font-size: .8rem; color: var(--muted); text-align: center; font-weight: 600; padding-bottom: 2px; }
.cal .day {
  min-height: 92px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 2px;
  min-width: 0;
  text-align: left;
  color: var(--text);
  font-weight: 400;
  cursor: pointer;
  transition: border-color .15s;
}
.cal .day:hover { background: var(--surface); border-color: var(--accent); }
.cal .day.empty { background: transparent; border-color: transparent; cursor: default; }
.cal .day.weekend { background: var(--surface-2); }
.cal .day.holiday { background: var(--holiday); }
.cal .day.today { border: 2px solid var(--accent); }
.cal .day.today .num { color: var(--accent); }
.cal .day.selected { box-shadow: 0 0 0 3px var(--focus); }
.cal .num { font-size: .85rem; font-weight: 600; }
.cal .hol { font-size: .68rem; color: var(--holiday-text); font-weight: 500; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chip {
  display: block;
  font-size: .74rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 1px 6px;
  border-radius: 4px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip.pending {
  background: transparent !important;
  color: var(--text);
  border: 1.5px dashed currentColor;
}
.chip .full { display: inline; }
.chip .ini { display: none; }
.more { font-size: .72rem; color: var(--muted); }

@media (max-width: 620px) {
  .cal { gap: 2px; }
  .cal .day { min-height: 64px; padding: 3px; border-radius: 6px; }
  .cal .hol { display: none; }
  .chip { font-size: .66rem; padding: 0 3px; border-radius: 3px; text-align: center; }
  .chip .full { display: none; }
  .chip .ini { display: inline; }
  .card { padding: 16px; }
  .topbar { padding: 12px 10px 12px 16px; }
}

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 18px; height: 12px; border-radius: 3px; background: var(--accent); display: inline-block; }
.swatch.pending { background: transparent; border: 1.5px dashed var(--text); }
.swatch.holiday { background: var(--holiday); border: 1px solid var(--border-strong); }

.daylist { margin-top: 14px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.list li:last-child { border-bottom: 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.grow { flex: 1; min-width: 0; }

/* ---------- Großer Auswahl-Kalender beim Beantragen ---------- */

.picker { margin: 4px 0 12px; }
.pk-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.pk-head button { min-width: 52px; min-height: 48px; }
.pk-head button:disabled { visibility: hidden; }
.pk-title { font-size: 1.35rem; font-weight: 600; text-transform: capitalize; text-align: center; flex: 1; }

.pk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.pk-dow { text-align: center; font-size: .85rem; font-weight: 600; color: var(--muted); padding: 2px 0 4px; }
.pk-day {
  position: relative;
  min-height: 76px;
  padding: 8px 4px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  font-weight: 600;
  min-width: 0;
}
button.pk-day:hover:not(:disabled) { background: var(--lavender-10); border-color: var(--accent); }
.pk-day.empty { background: transparent; border: 0; }
.pk-day.weekend { background: var(--surface-2); color: var(--muted); border-color: var(--border); }
.pk-day.holiday { background: var(--holiday); color: var(--holiday-text); border-color: var(--border); }
.pk-day.today .pk-num { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.pk-day:disabled { opacity: .3; cursor: default; }
.pk-num { font-size: 1.35rem; line-height: 1.1; }
.pk-hol { font-size: .62rem; font-weight: 500; line-height: 1.1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pk-dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; align-items: center; }
.pk-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.pk-dot.pending { background: transparent; border: 2px solid; }
.pk-more { font-size: .65rem; color: var(--muted); }

/* Gewählter Zeitraum */
.pk-day.in-range { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-soft-text); }
.pk-day.range-start, .pk-day.range-end { background: var(--accent); border-color: var(--accent); color: var(--accent-text); box-shadow: 0 2px 8px rgba(102, 94, 243, .35); }
.pk-day.range-start .pk-hol, .pk-day.range-end .pk-hol, .pk-day.range-start .pk-more, .pk-day.range-end .pk-more { color: var(--accent-text); }

.pk-legend { margin: 10px 0 0; }

.pick-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--lavender-10);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 1.05rem;
  line-height: 1.4;
}
.pick-summary .grow { flex: 1 1 220px; }
:where(html[data-mode="dark"]) .pick-summary { background: var(--surface-2); }
.pk-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; margin-right: 6px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text); font-size: .8rem; font-weight: 600; vertical-align: 1px;
}

@media (max-width: 620px) {
  .pk-grid { gap: 4px; }
  .pk-day { min-height: 58px; padding: 6px 2px 4px; border-radius: 8px; }
  .pk-num { font-size: 1.2rem; }
  .pk-hol { display: none; }
  .pk-dot { width: 7px; height: 7px; }
}

/* Markierter Antrag im Kalender */
.cal .day.hl { background: var(--lavender-10); border: 2px dashed var(--accent); }
.cal .day.hl.weekend, .cal .day.hl.holiday { border-style: dotted; }
:where(html[data-mode="dark"]) .cal .day.hl { background: var(--accent-soft); }

.hl-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--accent-soft);
  color: var(--accent-soft-text);
  border-radius: var(--radius);
  padding: 12px 12px 12px 16px;
  margin-bottom: 12px;
}
.hl-banner .grow { flex: 1 1 260px; }
.hl-banner strong { color: var(--text); }
.hl-banner .small { color: var(--accent-soft-text); }
.hl-banner button.secondary { background: var(--surface); }
.hl-banner button.secondary .icon { width: 18px; height: 18px; }
@media (max-width: 620px) { .hl-banner button.secondary { flex: 1 1 auto; } }

/* ---------- Anträge ---------- */

button.link {
  background: none;
  border: 0;
  padding: 4px 0;
  min-height: 32px;
  margin-top: 2px;
  color: var(--accent);
  font-weight: 600;
  font-size: .9rem;
  gap: 4px;
}
button.link:hover { background: none; text-decoration: underline; }
button.link .icon { width: 16px; height: 16px; }

@keyframes flash { from { background: var(--accent-soft); } to { background: transparent; } }
.req.flash { animation: flash 1.6s ease-out; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { .req.flash { animation: none; } }

.status {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.status.pending { background: var(--warn-soft); color: var(--warn); }
.status.approved { background: var(--ok-soft); color: var(--ok); }
.status.partial { background: var(--accent-soft); color: var(--accent-soft-text); }
.status.rejected { background: var(--danger-soft); color: var(--danger); }
.status.withdrawn { background: var(--surface-2); color: var(--muted); }

.req { border-top: 1px solid var(--border); padding: 16px 0; }
.req:first-of-type { border-top: 0; padding-top: 4px; }
.req-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.req-title { font-weight: 600; }
.req .note { background: var(--surface-2); border-radius: 8px; padding: 8px 12px; margin-top: 8px; font-size: .95rem; white-space: pre-wrap; }
.req .boss { border-left: 3px solid var(--accent); border-radius: 0; background: var(--lavender-10); }
.warnbox { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 8px 12px; margin-top: 8px; font-size: .9rem; font-weight: 500; }

.daypick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.daypick label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: .9rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
}
.daypick input { width: auto; min-height: 0; margin: 0; accent-color: var(--jungle); }
.daypick label:has(input:checked) { background: var(--ok-soft); color: var(--ok); border-color: var(--jungle); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.stats div { background: var(--lavender-10); border-radius: 10px; padding: 12px 6px; }
.stats strong { display: block; font-size: 2rem; line-height: 1.15; font-weight: 600; color: var(--text); }
.stats span { font-size: .8rem; color: var(--muted); }
:where(html[data-mode="dark"]) .stats div { background: var(--surface-2); }

.bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 14px; }
.bar > div { height: 100%; background: var(--accent); }

.team-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--border); }
.team-row:last-of-type { border-bottom: 0; }
.team-row .name { flex: 1 1 140px; font-weight: 600; min-width: 0; }
.team-row .name.inactive { color: var(--muted); text-decoration: line-through; }
.team-row input.days { width: 76px; flex: 0 0 auto; text-align: center; }

details summary { cursor: pointer; font-weight: 600; padding: 4px 0; }

.footer { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 24px; }

/* ---------- Toast ---------- */

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: var(--mirage);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  max-width: calc(100% - 32px);
  z-index: 10;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .2);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--danger); color: #fff; }
:where(html[data-mode="dark"]) #toast { background: #f5f5f6; color: #101828; }

@media (prefers-reduced-motion: reduce) {
  #toast, button, .cal .day { transition: none; }
}

/* ---------- Urlaubskonto ---------- */

.stats-4 { grid-template-columns: repeat(4, 1fr); }
.stats .stat-hi { background: var(--accent); }
.stats .stat-hi strong, .stats .stat-hi span { color: var(--accent-text); }
.stats .stat-hi.neg { background: var(--danger); }
@media (max-width: 520px) { .stats-4 { grid-template-columns: repeat(2, 1fr); } }

.bar-2 { display: flex; }
.bar-2 > div { flex: 0 0 auto; }
.bar-2 > .pend { background: var(--accent); opacity: .35; }

.calc { list-style: none; margin: 14px 0 0; padding: 10px 14px; background: var(--surface-2); border-radius: 10px; font-size: .95rem; }
.calc li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.calc li.sum { border-top: 1px solid var(--border-strong); margin-top: 4px; padding-top: 7px; font-weight: 600; }
.neg-text { color: var(--danger); }
.tag-line { color: var(--accent-soft-text); font-weight: 500; margin-top: 2px; }

/* Team: Konto je Mitarbeiter */
.team-row .acct { display: flex; flex-wrap: wrap; gap: 4px 12px; font-weight: 400; font-size: .85rem; color: var(--muted); margin-top: 2px; }
.team-row .acct strong { color: var(--text); }
.team-row.open { background: var(--lavender-10); margin: 0 -20px; padding: 12px 20px; }
:where(html[data-mode="dark"]) .team-row.open { background: var(--surface-2); }
@media (max-width: 620px) { .team-row.open { margin: 0 -16px; padding: 12px 16px; } }
.acc-edit { flex: 1 1 100%; margin-top: 8px; }
.acc-edit .field { margin-bottom: 8px; }
.calc-preview { margin-bottom: 4px; }

/* Abwesenheit eintragen */
fieldset.kind { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
fieldset.kind legend { font-weight: 600; font-size: .95rem; margin-bottom: 6px; padding: 0; }
@media (max-width: 620px) { fieldset.kind { grid-template-columns: 1fr; } }
.kind-opt { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 0; padding: 12px; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer; line-height: 1.35; }
.kind-opt input { width: auto; min-height: 0; margin: 3px 0 0; accent-color: var(--cornflower); }
.kind-opt:has(input:checked) { border-color: var(--accent); background: var(--lavender-10); box-shadow: 0 0 0 1px var(--accent); }
:where(html[data-mode="dark"]) .kind-opt:has(input:checked) { background: var(--accent-soft); }
select { appearance: auto; }

/* "abwesend" (sonstige Abwesenheit) – schraffiert */
.chip.absent { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.4) 0 3px, transparent 3px 7px); }
.swatch.absent { background: repeating-linear-gradient(135deg, var(--muted) 0 3px, transparent 3px 6px); border: 1px solid var(--muted); }
.pk-dot.absent { border-radius: 2px; }
.status.absent { background: var(--surface-2); color: var(--muted); }

/* ======================================================================
   Größeres Banner (Logo mit mehr Gewicht), Hintergrund, Zugang & Sicherheit
   ====================================================================== */

/* Banner oben: Logo deutlich größer (Handbuch: Mindesthöhe 30 px – hier bewusst großzügig) */
.topbar { padding: 26px 22px 26px 28px; border-radius: 16px; margin-bottom: 18px; }
.topbar .who { gap: 12px; }
.topbar .who img { height: 72px; }
.topbar .who span { font-size: 1.3rem; line-height: 1.25; }
.topbar button.ghost { font-size: 1.05rem; padding: 12px 16px; }
@media (min-width: 900px) {
  .topbar { padding: 34px 38px 34px 44px; border-radius: 20px; }
  .topbar .who { gap: 14px; }
  .topbar .who img { height: 96px; }
  .topbar .who span { font-size: 1.5rem; }
  .topbar button.ghost { font-size: 1.1rem; }
}
@media (max-width: 620px) {
  .topbar { padding: 20px 10px 20px 20px; }
  .topbar .who img { height: 64px; }
  .topbar .who span { font-size: 1.15rem; }
  .topbar button.ghost { font-size: 1rem; padding: 10px 12px; }
}
a.ghost-link { background: transparent; color: #cfd1d4; border: 0; }
a.ghost-link:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* Hintergrund links und rechts neben dem Inhalt (nur auf breiten Bildschirmen, Handys laden das Bild nicht) */
@media (min-width: 1100px) {
  html { background-color: #d6f1ec; }
  body { background: transparent; }
  .footer, .loading { color: #3d4a57; }
  .footer a { color: #3d4a57; }
}
@media (min-width: 1100px) {
html[data-mode="dark"] { background-color: #132035; }
:where(html[data-mode="dark"]) .footer, :where(html[data-mode="dark"]) .loading, :where(html[data-mode="dark"]) .footer a { color: #a3a6ad; }
}

.footer a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Anmeldung: Auswahl Mitarbeiter / Chefetage */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 20px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.seg button { background: transparent; color: var(--muted); min-height: 42px; }
.seg button:hover { background: var(--surface); color: var(--text); }
.seg button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-soft-text); }

/* Zugangscode (einmalige Anzeige) */
.code-card { border: 2px solid var(--accent); }
.code-big {
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 600;
  letter-spacing: .12em;
  text-align: center;
  padding: 18px 8px;
  margin: 8px 0 14px;
  background: var(--lavender-10);
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
  user-select: all;
}
:where(html[data-mode="dark"]) .code-big { background: var(--surface-2); }

/* Zugangsstatus in der Teamliste */
.acc-state { font-weight: 500; }
.acc-state.ok { color: var(--ok); }
.acc-state.warn { color: var(--warn); }
.acc-state.pend { color: var(--accent); }
button.danger-text { color: var(--danger); }
button.danger-text:hover { background: var(--danger-soft); color: var(--danger); }

/* Protokoll */
ul.audit { list-style: none; margin: 10px 0 0; padding: 0; max-height: 420px; overflow-y: auto; border-top: 1px solid var(--border); }
ul.audit li { display: grid; grid-template-columns: 90px 110px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
ul.audit .a-time { color: var(--muted); }
ul.audit .a-who { font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 620px) {
  ul.audit li { grid-template-columns: 1fr; gap: 0; }
}

/* Datenschutz-Seite */
.legal { line-height: 1.6; }
.legal h1 { font-size: 1.6rem; }
.legal h2 { font-size: 1.1rem; margin-top: 24px; }
.legal ul { padding-left: 20px; margin: 0 0 12px; }
.legal li { margin-bottom: 6px; }
.legal table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-size: .92rem; }
.legal th, .legal td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.legal th { color: var(--muted); font-weight: 600; font-size: .85rem; }
.legal a { color: var(--accent); }

/* Teamliste auf dem Handy: Aktionen kompakter, damit pro Mitarbeiter weniger gescrollt werden muss */
@media (max-width: 620px) {
  .team-row { gap: 4px 6px; }
  .team-row .name { flex: 1 1 100%; order: 1; margin-left: 22px; margin-top: -26px; }
  .team-row .dot { order: 0; }
  .team-row > button { order: 2; flex: 0 0 auto; min-height: 38px; padding: 6px 12px; font-size: .92rem; }
  .team-row > button.ghost { padding: 6px 8px; }
  .team-row .acc-edit { order: 3; }
}

/* ---------- Betriebsurlaub ---------- */

:root { --closure: #101828; }
html[data-mode="dark"] { --closure: #5b6b8c; }

.chip.closure { background: var(--closure); color: #fff; border: 0; }
.cal .day.closure-day { box-shadow: inset 0 3px 0 var(--closure); }
.status.closure { background: var(--closure); color: #fff; }
.swatch.closure { background: var(--closure); }

.emp-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.emp-opt { display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; font-weight: 500; cursor: pointer; }
.emp-opt input { width: auto; min-height: 0; margin: 0; accent-color: var(--cornflower); }
.emp-opt:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-soft-text); }

.who-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.who-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; font-size: .88rem; font-weight: 500; }
.who-chip button.x { min-height: 26px; width: 26px; padding: 0; background: transparent; color: var(--muted); border-radius: 50%; font-size: .8rem; }
.who-chip button.x:hover { background: var(--danger-soft); color: var(--danger); }

/* ---------- Design-Schalter (Automatisch / Hell / Dunkel) ---------- */

.theme-switch { display: inline-flex; align-items: center; gap: 4px; padding: 4px; margin-bottom: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.theme-switch .theme-label { padding: 0 8px 0 10px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.theme-switch button { min-height: 32px; padding: 4px 12px; border-radius: 999px; background: transparent; color: var(--muted); font-size: .85rem; }
.theme-switch button:hover { background: var(--surface-2); color: var(--text); }
.theme-switch button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-soft-text); }
.footer { display: flex; flex-direction: column; align-items: center; }
