:root {
  --ink: #102a3a;
  --muted: #647783;
  --line: #dce5e9;
  --paper: #ffffff;
  --canvas: #f3f6f7;
  --navy: #0b2a3b;
  --teal: #0d7c78;
  --teal-soft: #e5f4f2;
  --warning: #d97706;
  --danger: #dc4c45;
  --shadow: 0 18px 50px rgba(19, 52, 67, 0.09);
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px 1fr; transition: grid-template-columns .18s ease; }
.auth-gate { position: fixed; z-index: 1000; inset: 0; padding: 24px; display: grid; place-items: center; background: radial-gradient(circle at top, #164c61 0, #0b2a3b 42%, #071c28 100%); }
.auth-card { width: min(430px, 100%); padding: 36px; border: 1px solid rgba(255,255,255,.14); border-radius: 22px; background: white; box-shadow: 0 30px 90px rgba(0,0,0,.32); }
.auth-mark { margin-bottom: 22px; }
.auth-card h1 { font-size: 30px; }
.auth-copy { margin: 9px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.auth-form { display: grid; gap: 14px; }
.auth-form input { width: 100%; text-transform: none; letter-spacing: normal; }
.auth-submit { width: 100%; margin-top: 2px; }
.auth-mode-button { width: 100%; margin-top: 16px; padding: 5px; border: 0; color: var(--teal); background: transparent; font-size: 12px; font-weight: 800; }
.auth-reset-button { margin-top: 3px; color: #607580; font-size: 10px; }
.auth-domain-note { display: block; margin-top: 12px; color: #8b9aa1; text-align: center; font-size: 9px; }
.auth-error { padding: 10px 11px; border-radius: 9px; color: #943b35; background: #faeae8; font-size: 11px; line-height: 1.45; }

.sidebar-toggle { position: absolute; right: -13px; top: 34px; z-index: 5; width: 26px; height: 26px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; color: #cbd9df; background: #123243; box-shadow: 0 4px 12px rgba(6,24,33,.35); font-size: 13px; line-height: 1; }
.sidebar-toggle:hover { color: white; background: #17435a; }

/* Eingeklappt bleibt eine schmale Leiste mit Zeichen - so bleibt die Navigation
   erreichbar, statt ganz zu verschwinden. */
.app-shell.sidebar-collapsed { grid-template-columns: 68px 1fr; }
.app-shell.sidebar-collapsed .sidebar { padding-left: 12px; padding-right: 12px; }
.app-shell.sidebar-collapsed .brand { justify-content: center; padding: 0 0 24px; }
.app-shell.sidebar-collapsed .brand > span:last-child,
.app-shell.sidebar-collapsed .nav-text,
.app-shell.sidebar-collapsed .sidebar-section,
.app-shell.sidebar-collapsed .connection-state > div { display: none; }
.app-shell.sidebar-collapsed .nav-item { justify-content: center; padding: 11px 0; gap: 0; }
.app-shell.sidebar-collapsed .nav-item.active { box-shadow: inset 2px 0 #f4b942; }
.app-shell.sidebar-collapsed .sidebar-footer { flex-direction: column; gap: 12px; padding: 15px 0 2px; }
.app-shell.sidebar-collapsed .sidebar-toggle { right: -13px; }

.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 28px 20px 20px; color: #d8e3e7;
  background: linear-gradient(170deg, #0c2e40 0%, #0a2433 68%, #081d29 100%);
  display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.04);
}
.brand { display: flex; gap: 12px; align-items: center; color: white; text-decoration: none; padding: 0 8px 28px; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #f4b942; color: #102a3a; box-shadow: 0 8px 24px rgba(244,185,66,.18); }
.brand-mark svg { width: 26px; height: 26px; }
.wordmark i { color: #f4b942; font-style: normal; }
.auth-card .wordmark i { color: #C68A18; }
.brand-by { margin: 4px 0 20px; color: #7C8B95; font-size: 12px; font-weight: 600; }
.brand strong { font-family: Manrope, sans-serif; display: block; font-size: 17px; letter-spacing: -.02em; }
.brand small { color: #91a8b3; font-size: 12px; }
.nav-list { display: grid; gap: 6px; }
.nav-item { border: 0; border-radius: 10px; padding: 11px 13px; color: #a9bbc3; background: transparent; text-align: left; display: flex; align-items: center; gap: 12px; font-weight: 600; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: rgba(255,255,255,.10); box-shadow: inset 3px 0 #f4b942; }
.nav-icon { width: 20px; font-size: 18px; text-align: center; }
.sidebar-section { margin-top: 34px; padding: 0 8px; }
.eyebrow { margin: 0 0 5px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; color: #7e939d; }
.team-mini-list { display: grid; gap: 12px; margin-top: 14px; }
.team-mini { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: #c1d0d6; }
.avatar.has-photo { padding: 0; overflow: hidden; }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; display: block; }
.quick-assignee { overflow: hidden; }
.quick-face { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.quick-assignee.unavailable .quick-face { filter: grayscale(1); opacity: .5; }
.avatar { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: white; font-size: 10px; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.team-mini small { display: block; color: #728d98; font-weight: 500; margin-top: 1px; }
.sidebar-footer { margin-top: auto; padding: 15px 8px 2px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.connection-state { display: flex; align-items: center; gap: 9px; min-width: 0; }
.connection-state strong, .connection-state small { display: block; white-space: nowrap; }
.connection-state strong { color: #dbe6ea; font-size: 11px; }
.connection-state small { color: #718b96; font-size: 10px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #667f89; box-shadow: 0 0 0 4px rgba(102,127,137,.12); }
.status-dot.online { background: #3bbf98; box-shadow: 0 0 0 4px rgba(59,191,152,.14); }
.icon-button { border: 0; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #8fa5ae; background: transparent; font-size: 17px; }
.icon-button:hover { background: rgba(255,255,255,.08); color: white; }

.main-content { min-width: 0; padding: 0 38px 56px; }
.duty-now { margin-bottom: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.duty-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 4px 18px rgba(19,52,67,.05); }
.duty-card.current { border-left: 5px solid #15a05f; }
.duty-card.next { border-left: 5px solid #9db0b8; }
.duty-label { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.duty-body { margin-top: 9px; }
.duty-person { display: flex; align-items: center; gap: 11px; }
.duty-person .avatar { width: 40px; height: 40px; border-radius: 12px; }
.duty-person strong { display: block; font-size: 14px; }
.duty-person small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.duty-empty { padding: 9px 0; color: var(--muted); font-size: 12px; }
@media (max-width: 720px) { .duty-now { grid-template-columns: 1fr; } }
.topbar { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
h1, h2, h3 { font-family: Manrope, sans-serif; margin: 0; letter-spacing: -.035em; }
h1 { font-size: 27px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
.topbar-actions, .range-controls { display: flex; align-items: center; gap: 10px; }
.week-step { width: 40px; padding: 0; font-size: 17px; }
.button { min-height: 40px; padding: 0 15px; border-radius: 10px; border: 1px solid transparent; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button.primary { color: white; background: var(--teal); box-shadow: 0 8px 20px rgba(13,124,120,.18); }
.button.primary span { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: white; color: #4285f4; font-size: 11px; }
.button.ghost { color: #36515e; border-color: var(--line); background: white; }
.button.subtle { color: #48616c; background: #edf2f3; }
.button.dark { color: white; background: var(--navy); box-shadow: 0 8px 22px rgba(11,42,59,.15); }
.button.danger { color: #a43d37; border-color: #efc5c1; background: #fff5f4; }
.plan-actions { display: flex; align-items: center; gap: 8px; }
.control-card { margin: 24px 0 18px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); display: flex; justify-content: space-between; align-items: end; gap: 18px; box-shadow: 0 4px 18px rgba(19,52,67,.04); }
.control-card label, .field { display: grid; gap: 5px; color: #607580; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
input, select { min-height: 38px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfc; color: var(--ink); padding: 0 10px; outline: 0; }
input:focus, select:focus { border-color: #65aaa6; box-shadow: 0 0 0 3px rgba(13,124,120,.1); }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 30px; }
.stat-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); display: flex; align-items: center; gap: 13px; }
.stat-icon { width: 35px; height: 35px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; }
.stat-icon.ocean { background: #e4f2f4; color: #14778a; }.stat-icon.green { background: #e6f5ee; color: #14855b; }.stat-icon.amber { background: #fdf1d9; color: #bb7107; }.stat-icon.purple { background: #eee9fa; color: #7044bc; }
.stat-card strong, .stat-card small { display: block; }
.stat-card strong { font-family: Manrope, sans-serif; font-size: 20px; }
.stat-card small { margin-top: 1px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.schedule-title-group { display: flex; align-items: center; gap: 12px; }
.week-step { width: 34px; height: 34px; flex: none; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: #3d5563; font-size: 15px; line-height: 1; box-shadow: 0 1px 2px rgba(19,52,67,.05); }
.week-step:hover { border-color: #b3c6cd; background: white; transform: translateY(-1px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.legend-daypart { display: inline-flex; align-items: center; gap: 5px; color: var(--daypart-ink); font-weight: 700; }
.legend-daypart i { width: 11px; height: 11px; border: 1px solid color-mix(in srgb, var(--daypart-ink) 28%, white); border-radius: 4px; background: var(--daypart-bg); }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 10px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend-frame { width: 13px; height: 13px; border: 4px solid #15a05f; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }.legend-dot.ideal { background: #38a979; }.legend-dot.recommended { background: #d62f29; }.legend-dot.notice { background: #e1a124; }.legend-dot.conflict { background: #db554d; }
.empty-state { min-height: 350px; border: 1px dashed #c9d7dc; border-radius: 16px; background: rgba(255,255,255,.48); display: grid; place-content: center; justify-items: center; text-align: center; padding: 30px; }
.empty-state p { max-width: 400px; margin: 8px 0 20px; color: var(--muted); font-size: 13px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.empty-illustration { width: 54px; height: 54px; margin-bottom: 15px; display: grid; place-items: center; border-radius: 18px; background: var(--teal-soft); color: var(--teal); font-size: 24px; }

.schedule-board { display: grid; gap: 14px; }
.week-card { border: 1px solid var(--line); border-radius: 15px; background: white; overflow: hidden; box-shadow: 0 6px 20px rgba(20,51,66,.04); }
.week-head { padding: 11px 14px; border-bottom: 1px solid var(--line); background: #fafcfc; display: flex; align-items: center; justify-content: space-between; }
.week-head strong { font-size: 12px; }.week-head span { color: var(--muted); font-size: 10px; }
.shift-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.shift-card { min-width: 0; min-height: 155px; padding: 13px; border: 0; border-right: 1px solid var(--line); background: white; text-align: left; color: inherit; transition: .15s ease; position: relative; }
.shift-card:last-child { border-right: 0; }.shift-card:hover { background: #f9fbfb; }.shift-card:focus-visible { outline: 3px solid rgba(13,124,120,.25); outline-offset: -3px; }
.shift-card.weekend { background: #fbfaf6; }
.shift-top { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.shift-day { font-size: 11px; font-weight: 800; }.shift-date { display: block; color: var(--muted); font-weight: 500; margin-top: 2px; }
.slot-pill { padding: 3px 6px; border-radius: 6px; color: #627983; background: #eef3f4; font-size: 9px; font-weight: 700; white-space: nowrap; }
.assignee { margin-top: 18px; display: flex; align-items: center; gap: 9px; min-width: 0; }
.assignee .avatar { width: 34px; height: 34px; border-radius: 10px; }
.avatar-stack { display: flex; min-width: 48px; }.avatar-stack .avatar + .avatar { margin-left: -10px; box-shadow: 0 0 0 2px white; }
.assignee strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }.assignee small { display: block; color: var(--muted); font-size: 9px; margin-top: 2px; }
.unassigned { margin-top: 22px; color: var(--danger); font-size: 11px; font-weight: 700; }
.shift-flags { min-height: 21px; margin-top: 14px; display: flex; flex-wrap: wrap; gap: 4px; }
.flag { max-width: 100%; padding: 3px 6px; border-radius: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; font-weight: 800; }
.flag.error { color: #a93833; background: #fae8e6; }.flag.warning, .flag.notice { color: #9b620f; background: #fbf0d9; }.flag.ideal { color: #13714e; background: #e5f4ec; }
.manual-mark { position: absolute; right: 12px; bottom: 10px; color: #91a3aa; font-size: 9px; }

.calendar-week { border: 1px solid var(--line); border-radius: 15px; background: white; overflow: hidden; box-shadow: 0 6px 20px rgba(20,51,66,.04); }
.calendar-week-head { min-height: 42px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafcfc; display: flex; align-items: center; justify-content: space-between; }
.calendar-week-head strong { font-size: 12px; }.calendar-week-head span { color: var(--muted); font-size: 10px; }
.calendar-scroll { overflow-x: auto; }
.calendar-grid { min-width: 920px; display: grid; grid-template-columns: 70px repeat(7, minmax(118px, 1fr)); }
.calendar-corner, .calendar-day-head, .calendar-time, .calendar-slot { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calendar-day-head:nth-child(8), .calendar-slot:nth-child(8n) { border-right: 0; }
.calendar-corner { min-height: 50px; padding: 10px; background: #f7fafb; display: grid; place-items: center; color: #8a9aa2; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.calendar-day-head { min-height: 50px; padding: 9px 10px; background: #f7fafb; text-align: center; }
.calendar-day-head.weekend { background: #fbf8f0; }
.calendar-day-head.holiday { background: #fff0f2; box-shadow: inset 0 3px #c43d59; }.calendar-day-head.holiday small { display: block; margin-top: 2px; color: #a52d45; font-size: 7px; font-weight: 800; }
.calendar-day-head strong { display: block; font-size: 10px; text-transform: uppercase; }.calendar-day-head span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.calendar-time { min-height: 96px; padding: 11px 6px; background: var(--daypart-strong); color: var(--daypart-ink); display: grid; align-content: center; justify-items: center; gap: 3px; text-align: center; }
.calendar-time strong { font-size: 10px; font-weight: 800; letter-spacing: .01em; }
.calendar-time small { font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .78; }
.daypart-icon { display: inline-grid; place-items: center; }
.daypart-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.segment-time { display: inline-flex; align-items: center; gap: 4px; color: var(--daypart-ink); }
.segment-time .daypart-icon svg { width: 12px; height: 12px; stroke-width: 1.9; }

/* Tageszeiten: von Sonnenaufgang ueber Mittag und Abendrot bis zur Nacht. */
.daypart-morgen { --daypart-bg: #ffffff; --daypart-strong: #f1f5f6; --daypart-ink: #5b7481; }
.daypart-tag { --daypart-bg: #fff9db; --daypart-strong: #fdefac; --daypart-ink: #8a6510; }
.daypart-abend { --daypart-bg: #ffeeda; --daypart-strong: #ffd8ab; --daypart-ink: #a2521b; }
.daypart-nacht { --daypart-bg: #fbe7e5; --daypart-strong: #f6cbc7; --daypart-ink: #96302b; }
.calendar-slot { min-height: 96px; padding: 5px; background: var(--daypart-bg, white); }
.calendar-slot.weekend { background: color-mix(in srgb, var(--daypart-bg, white) 90%, var(--daypart-ink, #6b7f89)); }
.segment-card { width: 100%; min-height: 120px; padding: 7px; border: 1px solid #dde5e8; border-left: 5px solid var(--employee-color, #9db0b8); border-radius: 8px; color: var(--ink); background: white; box-shadow: 0 1px 3px rgba(16,42,58,.09); text-align: left; position: relative; transition: .16s ease; overflow: hidden; }
.segment-open { width: 100%; padding: 2px; border: 0; color: inherit; background: transparent; text-align: left; }
.segment-card:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(16,42,58,.09); }
.segment-card.foreign { opacity: .72; border-style: dashed; box-shadow: none; }
.segment-card.foreign .segment-open { cursor: default; }
.foreign-note { margin-top: 6px; padding: 4px; border-radius: 6px; background: rgba(255,255,255,.55); color: #56707d; text-align: center; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.segment-card.two-tone { border-color: color-mix(in srgb, var(--employee-color) 45%, white); border-left: 5px solid transparent; border-image-source: linear-gradient(180deg, var(--employee-color) 0 50%, var(--employee-color-2) 50% 100%); border-image-slice: 1; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--employee-color) 24%, white) 0 12px, color-mix(in srgb, var(--employee-color-2) 24%, white) 12px 24px); }
.segment-card.two-tone .segment-part:first-child { --part-color: var(--employee-color); }
.segment-card.two-tone .segment-part:last-child { --part-color: var(--employee-color-2); }
.segment-card.has-error { background: #fff0ee; border-color: #e7a39e; border-left-color: var(--danger); }
.segment-card.unassigned { border: 3px solid #c92d26; background: repeating-linear-gradient(135deg, #fff0ee 0, #fff0ee 9px, #ffd9d5 9px, #ffd9d5 18px); box-shadow: 0 0 0 3px rgba(201,45,38,.2), 0 8px 22px rgba(201,45,38,.18); }
.segment-compact-head { padding: 1px 2px 6px; display: flex; align-items: center; justify-content: space-between; gap: 5px; }.segment-compact-head strong { font-size: 10px; text-transform: uppercase; }.segment-compact-head span { color: #526a75; font-size: 9px; font-weight: 800; }
.segment-person .avatar { box-shadow: 0 0 0 2px var(--employee-color, #9db0b8); }
.segment-person.split { padding: 6px 4px; display: grid; gap: 4px; }
.segment-part { display: flex; align-items: center; justify-content: center; gap: 5px; }
.segment-part .avatar { width: 22px; height: 22px; border-radius: 7px; font-size: 8px; }
.segment-part small { color: var(--muted); font-size: 8px; font-weight: 700; white-space: nowrap; }
.segment-person { min-height: 42px; display: grid; place-items: center; }.segment-person .avatar { width: 38px; height: 38px; border-radius: 11px; font-size: 11px; }.segment-person.empty { opacity: .55; }.empty-assignee { width: 38px; height: 38px; border: 2px dashed #bc7771; border-radius: 11px; display: grid; place-items: center; color: #a94a43; background: rgba(255,255,255,.55); font-size: 16px; font-weight: 900; }
.segment-person strong { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }.segment-person small { display: block; margin-top: 1px; color: var(--muted); font-size: 8px; }
.segment-warning { position: absolute; right: 6px; top: 6px; width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--danger); font-size: 9px; font-weight: 800; }
/* Die Direktwahl liegt als Auflage ueber der Kachel und erscheint erst beim
   Darueberfahren. So bleibt der Plan im Ruhezustand lesbar, ohne dass die
   Kachelhoehe springt. Auf Geraeten ohne Maus fuehrt ein Tipp ins Fenster. */
.quick-assignees { position: absolute; left: 5px; right: 5px; bottom: 5px; padding: 7px; border: 1px solid #dde5e8; border-radius: 7px; background: rgba(255,255,255,.97); box-shadow: 0 6px 18px rgba(16,42,58,.14); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; opacity: 0; pointer-events: none; transform: translateY(4px); transition: opacity .14s ease, transform .14s ease; }
.segment-card:hover .quick-assignees, .segment-card:focus-within .quick-assignees { opacity: 1; pointer-events: auto; transform: none; }
@media (hover: none) { .quick-assignees { display: none; } }
.quick-assignee { position: relative; width: 100%; min-width: 0; height: 30px; padding: 0; border: 2px solid transparent; border-radius: 8px; color: white; background: var(--quick-color); font-size: 9px; font-weight: 900; line-height: 1; }
.quick-assignee.ideal { border-color: #15a05f; border-width: 4px; border-radius: 0; }
.quick-assignee.holiday-recommended { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #c43d59; }.quick-assignee.holiday-recommended::after { content: "✦"; position: absolute; right: -5px; top: -8px; color: #c43d59; font-size: 8px; text-shadow: 0 1px white; }
.quick-unassign { color: #a51f19; background: #ffe1de; border-color: #e6aaa5; font-size: 11px; }
.quick-unassign.selected { color: white; background: #c92d26; border-color: #7f1712; }
.quick-assignee:hover { transform: translateY(-1px); }
.quick-assignee.selected { border-color: var(--ink); box-shadow: 0 0 0 1px white; }
.quick-assignee.ideal.selected { border-color: #0c6b3f; border-radius: 0; box-shadow: 0 0 0 2px var(--ink); }
.quick-assignee.unavailable { position: relative; opacity: .5; filter: grayscale(.35); cursor: not-allowed; }
.quick-assignee.unavailable::after { content: ""; position: absolute; left: 1px; right: 1px; top: 7px; height: 2px; background: #c9352d; transform: rotate(-35deg); }
.empty-slot { height: 84px; display: grid; place-items: center; color: color-mix(in srgb, var(--daypart-ink, #8a9aa2) 42%, transparent); font-size: 9px; }

.dialog { width: min(540px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: 18px; color: var(--ink); box-shadow: 0 25px 80px rgba(8,31,43,.28); }
.dialog::backdrop { background: rgba(6,24,33,.46); backdrop-filter: blur(3px); }
.dialog form, .dialog-body { padding: 25px; }
.dialog-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.dialog-head .icon-button { margin: -4px -4px 0 0; color: #647984; font-size: 24px; }.dialog-head .icon-button:hover { color: var(--ink); background: #edf2f3; }
.shift-time { margin: 20px 0; padding: 12px 14px; border-radius: 10px; background: #f1f5f5; color: #455f6b; font-size: 12px; }
fieldset { margin: 0; padding: 0; border: 0; } legend { margin-bottom: 9px; color: #607580; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.employee-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.employee-option { cursor: pointer; position: relative; }.employee-option input { position: absolute; opacity: 0; pointer-events: none; }
.employee-option > span { min-height: 52px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 700; }
.employee-option-text { min-width: 0; display: block; }.employee-option-text strong, .employee-option-text small { display: block; }.employee-option-text small { margin-top: 2px; color: var(--danger); font-size: 8px; font-weight: 700; }
.employee-option.calendar-absent .employee-option-text strong { color: var(--danger); text-decoration: line-through; }
.employee-option input:checked + span { border-color: var(--teal); background: var(--teal-soft); box-shadow: 0 0 0 2px rgba(13,124,120,.08); }
.employee-option input:disabled + span { opacity: .4; cursor: not-allowed; }
.nobody-option > span { border-color: #e2b0ac; background: #fff5f4; }.nobody-option input:checked + span { border-color: #c92d26; background: #ffe4e1; box-shadow: 0 0 0 2px rgba(201,45,38,.1); }
.nobody-avatar { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: white; background: #c92d26; font-weight: 900; }
.nobody-option .employee-option-text strong, .nobody-option .employee-option-text small { color: #a51f19; }
.decouple-field { margin-top: 14px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: #f7fafb; display: flex; align-items: start; gap: 10px; cursor: pointer; }
.decouple-field:hover { border-color: #b9ccd3; }
.decouple-field input { margin-top: 2px; width: 15px; height: 15px; accent-color: var(--teal); flex: none; }
.decouple-field strong, .decouple-field small { display: block; }
.decouple-field strong { font-size: 11px; }
.decouple-field small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.rule-hint { min-height: 36px; margin-top: 13px; padding: 9px 11px; border-radius: 9px; color: #526a74; background: #eef3f4; font-size: 10px; line-height: 1.45; }
.rule-hint.has-rule-warning { color: #8d3d22; background: #fce9df; box-shadow: inset 3px 0 #dc4c45; font-weight: 700; }
.dialog-actions { margin-top: 22px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }.dialog-spacer { flex: 1; }
.dialog-copy { color: var(--muted); font-size: 12px; line-height: 1.6; }.settings-dialog .field { margin-top: 18px; }.settings-dialog input { width: 100%; text-transform: none; letter-spacing: normal; }
.setup-note { margin-top: 13px; padding: 12px; display: grid; gap: 5px; border-radius: 10px; background: #f1f5f5; color: #536a74; font-size: 10px; }.setup-note strong { color: var(--ink); }.setup-note code { font-size: 10px; }
.import-stats { margin-top: 16px; padding: 9px 11px; border-radius: 9px; color: #4c6570; background: #eef3f4; font-size: 10px; }
.import-content { margin-top: 18px; display: grid; gap: 12px; }
.import-group { display: grid; gap: 7px; }
.import-group h3 { font-size: 12px; }
.import-change, .import-warning { padding: 10px 11px; border-radius: 9px; font-size: 10px; line-height: 1.45; }
.import-change { border: 1px solid #c9e1dc; background: #edf7f5; }
.import-change strong, .import-warning strong { display: block; margin-bottom: 2px; color: var(--ink); }
.import-warning { border: 1px solid #efd7a6; background: #fff7e7; color: #76571b; }
.import-empty { padding: 15px; border-radius: 10px; background: #f1f5f5; color: var(--muted); text-align: center; font-size: 11px; }
.absence-form { margin-top: 16px; display: grid; gap: 12px; }
.absence-range { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.absence-form input, .absence-form select { width: 100%; text-transform: none; letter-spacing: normal; }
.absence-list { margin-top: 18px; max-height: min(38vh, 300px); overflow-y: auto; }
.absence-row { padding: 9px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.absence-row.past { opacity: .5; }
.absence-text { flex: 1; min-width: 0; }
.absence-text strong { display: block; font-size: 11px; }
.absence-text small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.absence-remove { color: #97a7ae; font-size: 18px; }.absence-remove:hover { color: var(--danger); background: #fae8e6; }
.absence-empty { padding: 20px; color: var(--muted); text-align: center; font-size: 11px; }
.history-summary { margin: 12px 0 0; color: var(--muted); font-size: 10px; }
.history-list { max-height: min(52vh, 420px); overflow-y: auto; margin: 12px -4px 0; padding: 0 4px; }
.history-day { margin-bottom: 14px; }.history-day:last-child { margin-bottom: 0; }
.history-day h3 { position: sticky; top: 0; z-index: 1; padding: 7px 0; background: white; color: #55707e; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.history-entry { padding: 9px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 42px 78px minmax(0, 1fr); align-items: start; gap: 10px; }
.history-time { color: var(--muted); font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.history-type { padding: 2px 6px; border-radius: 999px; text-align: center; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.history-type.type-zuteilung { color: #1f5f8c; background: #e6f1f9; }
.history-type.type-woche { color: #6b4a12; background: #fbf0d9; }
.history-type.type-google { color: #13714e; background: #e5f4ec; }
.history-type.type-einstellung { color: #5b4b8a; background: #eeebf8; }
.history-text { font-size: 11px; line-height: 1.45; }
.history-text small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.history-empty { padding: 22px; color: var(--muted); text-align: center; font-size: 11px; line-height: 1.5; }
.info-list { display: grid; gap: 8px; margin-top: 20px; }.info-row { padding: 12px; border: 1px solid var(--line); border-radius: 11px; display: flex; align-items: center; gap: 11px; }.info-row strong { display: block; font-size: 12px; }.info-row small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }.info-rule { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.5; }.info-rule:last-child { border-bottom: 0; }
.toast-region { position: fixed; right: 22px; bottom: 22px; display: grid; gap: 8px; z-index: 100; }
.toast { width: min(360px, calc(100vw - 44px)); padding: 12px 14px; border-radius: 11px; color: white; background: #173848; box-shadow: var(--shadow); font-size: 11px; animation: toast-in .2s ease both; }.toast.error { background: #9d3934; }.toast.success { background: #087160; }.toast.warning { background: #b65d16; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 78px 1fr; }.sidebar { padding-inline: 12px; }.brand { padding-inline: 6px; justify-content: center; }.brand > span:last-child, .nav-item:not(.active) { font-size: 0; }.nav-item { justify-content: center; padding-inline: 6px; }.nav-item.active { font-size: 0; }.nav-icon { font-size: 18px; }.sidebar-section { display: none; }.connection-state div { display: none; }.sidebar-footer { padding-inline: 5px; }.main-content { padding-inline: 24px; }
}
@media (max-width: 800px) {
  .app-shell { display: block; }.sidebar { position: static; width: 100%; height: 64px; padding: 10px 16px; flex-direction: row; align-items: center; }.brand { padding: 0; }.brand-mark { width: 38px; height: 38px; }.nav-list { margin-left: auto; display: flex; }.nav-item { width: 42px; }.sidebar-footer { margin: 0 0 0 4px; border: 0; padding: 0; }.connection-state { display: none; }.main-content { padding: 0 16px 38px; }.topbar { min-height: 88px; }.topbar-actions .button span + * { display: none; }.control-card { align-items: stretch; flex-direction: column; }.range-controls { flex-wrap: wrap; }.plan-actions { justify-content: flex-end; }.stat-grid { grid-template-columns: 1fr 1fr; }.holiday-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }.holiday-recommendation { align-items: flex-start; flex-direction: column; }.shift-grid { grid-template-columns: 1fr; }.shift-card { min-height: 100px; border-right: 0; border-bottom: 1px solid var(--line); }.shift-card:last-child { border-bottom: 0; }.assignee { margin-top: 10px; }.shift-flags { margin-top: 8px; }.section-heading { align-items: start; flex-direction: column; }.legend { display: none; }
}
@media (max-width: 500px) {
  h1 { font-size: 22px; }.topbar-actions { gap: 5px; }.topbar-actions .button { width: 41px; padding: 0; font-size: 0; }.topbar-actions .button > span { font-size: 12px; }.stat-grid { gap: 8px; }.stat-card { padding: 12px; }.stat-card small { white-space: normal; }.employee-options { grid-template-columns: 1fr; }.range-controls label { flex: 1; }.range-controls input, .range-controls select { width: 100%; }
}
