/* Tymera: calm and light like Mews: light grey ground, white cards, near-black buttons, indigo only for highlights,
   pastel washes for states. "accent" is the near-black of the buttons; "accent-soft" the indigo wash of selections. */
:root {
    --bg: #F1F1F3;
    --surface: #FFFFFF;
    --surface-2: #F8F8FA;
    --surface-3: #F1F1F4;
    --line: #E1E2E6;
    --line-soft: #ECEDF0;
    --line-strong: #C9CBD1;
    --ink: #1D1E23;
    --ink-2: #3A3B42;
    --muted: #6E717A;
    --accent: #1D1E23;
    --accent-hover: #3A3B42;
    --accent-soft: #ECEDFA;
    --link: #4A4DB5;
    --focus: rgba(74, 77, 181, .22);
    --warn: #B8641A;
    --green-fg: #1E7F45; --green-bg: #E4F4EA;
    --red-fg: #B8322C;   --red-bg: #FBEAE9;
    --amber-fg: #8A5300; --amber-bg: #FCF1DC;
    --gray-fg: #3A3B42;  --gray-bg: #ECEDF0;
    --blue-fg: #4A4DB5;  --blue-bg: #EEEFFB;
    --violet-fg: #6B3FA0; --violet-bg: #F3ECFA;
    --radius: 10px;
    --shadow: 0 12px 32px rgba(29, 30, 35, .12);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--ink);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
h3 { margin: 0; font-size: 15px; font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.label { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.spacer { margin-left: auto; }
.hidden { display: none !important; }

/* Boot and errors */
.boot { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.boot-text { color: var(--muted); font-weight: 600; }
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 12px 20px; background: var(--red-bg); color: var(--red-fg); font-weight: 700; z-index: 1000; }
#blazor-error-ui .reload { margin-left: 12px; }

/* Brand */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand-name span { font-weight: 500; color: var(--muted); }

/* Office shell */
.topbar { display: flex; align-items: center; gap: 24px; padding: 12px 28px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; position: sticky; top: 0; z-index: 20; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink-2); font-weight: 600; padding: 9px 13px; border-radius: 10px; }
.nav a:hover { background: var(--surface-3); color: var(--ink); }
.nav a.active { background: var(--accent-soft); color: var(--accent-hover); font-weight: 700; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--warn); color: #fff; font-size: 11.5px; font-weight: 700; }
.user-menu { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--blue-bg); color: var(--blue-fg); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; }
.page { padding: 20px 28px 40px; max-width: 1600px; }
.page-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }

/* Cards, sections */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.kpi .value { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .value.neg, td.neg { color: var(--red-fg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 700; padding: 0 14px; height: 40px; border-radius: var(--radius); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-3); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { border: 0; background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.dark { border: 0; background: var(--ink); color: #fff; }
.btn.danger { border: 0; background: var(--red-bg); color: var(--red-fg); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 9px; }
.btn.lg { height: 52px; font-size: 16px; padding: 0 22px; border-radius: 14px; }
.btn.block { width: 100%; }
.icon-btn { width: 36px; height: 36px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-3); }

/* Segmented control */
.seg { display: inline-flex; gap: 2px; background: var(--gray-bg); border-radius: 12px; padding: 4px; }
.seg button, .seg a { border: 0; background: transparent; color: var(--ink-2); font-weight: 700; font-size: 13.5px; padding: 0 14px; height: 34px; border-radius: 9px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.seg .on { background: var(--ink); color: #fff; }
.pager { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.pager .title { font-weight: 700; padding: 0 8px; font-variant-numeric: tabular-nums; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--gray-bg); color: var(--gray-fg); white-space: nowrap; }
.chip.green { background: var(--green-bg); color: var(--green-fg); }
.chip.red { background: var(--red-bg); color: var(--red-fg); }
.chip.amber { background: var(--amber-bg); color: var(--amber-fg); }
.chip.blue { background: var(--blue-bg); color: var(--blue-fg); }
.chip.violet { background: var(--violet-bg); color: var(--violet-fg); }
.chip.accent { background: var(--blue-bg); color: var(--blue-fg); }
.chip.square { border-radius: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.input, .select, textarea.input { height: 42px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 12px; background: var(--surface); width: 100%; }
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; }
.input:focus, .select:focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--ink); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.hint { font-size: 12.5px; color: var(--muted); }

/* Messages */
.alert { border-radius: 14px; padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.alert.error { background: var(--red-bg); color: var(--red-fg); }
.alert.warn { background: var(--amber-bg); color: var(--amber-fg); }
.alert.info { background: var(--blue-bg); color: var(--blue-fg); }
.alert ul { margin: 4px 0 0; padding-left: 18px; font-weight: 500; }
.toast-host { position: fixed; right: 20px; top: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 300; max-width: min(440px, calc(100vw - 40px)); }
.toast { background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; box-shadow: var(--shadow); font-weight: 600; }
.toast.error { background: var(--red-fg); }
.toast.warn { background: #6B3A0B; }
.toast button { margin-left: auto; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; flex-shrink: 0; }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--surface-2); }
.table .right { text-align: right; }

/* Dialog */
.backdrop { position: fixed; inset: 0; background: rgba(29, 30, 35, .36); z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; }
.dialog { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); width: min(560px, 100%); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.dialog.wide { width: min(820px, 100%); }
.dialog-head { display: flex; align-items: center; gap: 12px; }
.dialog-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* Week plan */
.plan { overflow-x: auto; }
.plan-inner { min-width: 980px; }
.plan-row { display: grid; grid-template-columns: minmax(220px, 1.35fr) repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line-soft); }
.plan-row > div { min-width: 0; }
.plan-row .cell { border-left: 1px solid var(--line-soft); padding: 6px; display: flex; flex-direction: column; gap: 4px; min-height: 58px; position: relative; }
.plan-row .cell.click { cursor: pointer; }
.plan-row .cell.click:hover { background: var(--surface-2); }
.plan-row .cell.today { background: #F7FBF9; }
.plan-row .cell.holiday { background: #FBF7EE; }
.plan-head .cell { min-height: 0; padding: 10px; }
.plan-head .dn { font-size: 12px; font-weight: 700; color: var(--muted); }
.plan-head .dd { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.plan-label { padding: 10px 14px; display: flex; align-items: center; gap: 10px; }
.plan-label .name { font-weight: 700; }
.plan-label .sub { font-size: 12px; color: var(--muted); }
.area-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-3); border-top: 2px solid var(--line); flex-wrap: wrap; }
.area-head .swatch { width: 12px; height: 12px; border-radius: 4px; }
.shift { width: 100%; border: 0; text-align: left; border-radius: 10px; padding: 6px 8px; background: var(--accent-soft); color: var(--accent-hover); cursor: pointer; display: block; }
.shift:hover { filter: brightness(.97); }
.shift .t { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.shift .s { font-size: 11px; font-weight: 600; opacity: .85; }
.shift.open { background: #FFF7EC; color: var(--amber-fg); border: 1.5px dashed #E7B984; }
.mark { font-size: 11px; font-weight: 700; padding: 3px 6px; border-radius: 6px; }
.add-hint { font-size: 12px; font-weight: 700; color: var(--muted); opacity: 0; }
.cell.click:hover .add-hint { opacity: 1; }
.demand { font-size: 11.5px; font-weight: 700; padding: 4px 6px; border-radius: 7px; }

/* Login and public pages */
.center-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }

/* Employee app (phone first) */
.app-shell { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.app-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.app-main { flex: 1; padding: 16px 16px 96px; display: flex; flex-direction: column; gap: 14px; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--line); display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
.tabbar-inner { display: grid; grid-template-columns: repeat(5, 1fr); width: min(560px, 100%); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.tabbar a.active { color: var(--accent); }
.clock-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; text-align: center; display: flex; flex-direction: column; gap: 12px; }
.clock-time { font-size: 44px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.list-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; }

/* Terminal */
.terminal { min-height: 100vh; background: #15161A; color: #fff; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.terminal .people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.terminal .person { border: 0; border-radius: 18px; background: #25262C; color: #fff; padding: 18px 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 700; min-height: 120px; }
.terminal .person.in { background: #17473B; }
.terminal .person.break { background: #5A3B12; }
.terminal .pad { display: grid; grid-template-columns: repeat(3, 84px); gap: 12px; justify-content: center; }
.terminal .pad button { height: 72px; border-radius: 16px; border: 0; background: #25262C; color: #fff; font-size: 26px; font-weight: 700; cursor: pointer; }
.terminal .pin { display: flex; gap: 14px; justify-content: center; }
.terminal .pin span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #5FC59F; }
.terminal .pin span.on { background: #5FC59F; }
.terminal .big { font-size: 56px; font-weight: 700; font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
    .topbar { padding: 10px 14px; gap: 10px; }
    .page { padding: 16px 14px 32px; }
    h1 { font-size: 22px; }
}
@media print {
    .topbar, .no-print, .toast-host { display: none !important; }
    body, .page { background: #fff; padding: 0; }
}

/* Focus after navigation goes to the heading; no frame needed there. */
h1:focus { outline: none; }

/* Segmented control: the current view as plain text */
.seg span { display: inline-flex; align-items: center; font-weight: 700; font-size: 13.5px; padding: 0 14px; height: 34px; border-radius: 9px; }

/* Month plan by people: one narrow column per day */
.mgrid { display: grid; border-bottom: 1px solid var(--line-soft); }
.mgrid > div { min-width: 0; }
.mgrid .lbl { padding: 5px 12px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.mgrid .lbl .n { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mgrid .lbl .s { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.mgrid .d { border-left: 1px solid var(--line-soft); position: relative; min-height: 36px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 2px; }
.mgrid .d.wk { border-left: 2px solid var(--line); }
.mgrid .d.we { background: #FAFBF8; }
.mgrid .d.hol { background: #FBF7EE; }
.mgrid .d.today { box-shadow: inset 0 0 0 2px var(--accent-soft); }
.mgrid .d.click { cursor: pointer; }
.mgrid .d.click:hover { background: var(--surface-3); }
.mgrid .sum { border-left: 1px solid var(--line-soft); padding: 5px 8px; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; font-variant-numeric: tabular-nums; }
.mchip { display: block; border-radius: 4px; font-size: 10.5px; font-weight: 700; text-align: center; line-height: 1; padding: 4px 1px; font-variant-numeric: tabular-nums; }
.mchip.abs { background: var(--gray-bg); color: var(--ink-2); }
.wishdot { position: absolute; top: 2px; right: 2px; width: 6px; height: 6px; border-radius: 50%; }
.occ { margin: 3px auto 0; width: 22px; height: 4px; border-radius: 2px; background: #ECEFEA; overflow: hidden; }
.occ > div { height: 100%; background: var(--accent); }
.pop { position: absolute; top: calc(100% - 2px); z-index: 40; width: 230px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow); padding: 10px; display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: default; }

/* Month plan by shifts: calendar and day panel */
.cal { display: grid; grid-template-columns: 54px repeat(7, minmax(0, 1fr)); }
.cal .wkcell { padding: 8px 6px; display: flex; flex-direction: column; gap: 4px; border-bottom: 1px solid var(--line-soft); }
.cal .day { border: 0; border-left: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: var(--surface); padding: 6px; min-height: 96px; display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer; }
.cal .day.out { opacity: .4; }
.cal .day.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.cal .day.hol { background: #FBF7EE; }
.cov { font-size: 10.5px; font-weight: 700; padding: 2px 5px; border-radius: 5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cov.full { background: #E1F0E8; color: var(--green-fg); }
.cov.part { background: #FBEBD6; color: var(--amber-fg); }
.cov.none { background: var(--red-bg); color: var(--red-fg); }
.side { flex: 0 1 380px; min-width: 300px; position: sticky; top: 76px; display: flex; flex-direction: column; gap: 12px; }
.slot-card { border: 1.5px solid var(--line); border-radius: 11px; overflow: hidden; }
.slot-card .top { padding: 6px 9px; display: flex; align-items: center; gap: 8px; }
.slot-card .body { padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.person-chip { display: inline-flex; align-items: center; gap: 5px; border: 0; background: var(--surface-3); border-radius: 999px; padding: 3px 9px 3px 3px; font-size: 12px; font-weight: 700; cursor: pointer; }
.cand { display: flex; justify-content: space-between; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 5px 8px; cursor: pointer; text-align: left; }
.cand:disabled { opacity: .5; cursor: not-allowed; }

/* Print view (Aushang): white A4 landscape sheets, black ink, no costs */
.print-options { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; margin-bottom: 16px; padding: 14px 18px; }
.print-options .small { flex-basis: 100%; }
.sheets { display: flex; flex-direction: column; gap: 20px; align-items: center; }
.sheet { width: 100%; max-width: 1120px; min-height: 0; background: #fff; color: #000; padding: 26px 30px; box-shadow: var(--shadow); border-radius: 4px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 8px; }
.sheet-title { font-size: 18px; font-weight: 700; }
.sheet-sub { font-size: 12px; font-weight: 600; }
.sheet-meta { font-size: 10.5px; text-align: right; line-height: 1.35; }
.sheet-draft { font-weight: 700; font-size: 11px; border: 1.5px solid #000; padding: 1px 6px; display: inline-block; margin-bottom: 3px; }
.ptable { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 10.5px; line-height: 1.25; }
.ptable col.c-name { width: 150px; }
.ptable col.c-hours { width: 40px; }
.ptable th { font-size: 10.5px; font-weight: 700; text-align: left; padding: 3px 4px; border-bottom: 1.5px solid #000; vertical-align: bottom; }
.ptable th .dn { display: block; }
.ptable th .dd { display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
.ptable th .hol { display: block; font-size: 8.5px; font-weight: 700; }
.ptable td { padding: 3px 4px; border-bottom: .5px solid #9A9A9A; border-left: .5px solid #9A9A9A; vertical-align: top; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ptable td.name { border-left: 0; font-weight: 700; }
.ptable .h { text-align: right; }
.ptable .we { background: #F2F2F2; }
.ptable .area-row td { border-left: 0; padding: 7px 4px 3px; font-size: 11.5px; font-weight: 700; background: #fff; border-bottom: 1px solid #000; }
.ptable .area-row .bar { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.ptable .area-row .tag { font-size: 9px; font-weight: 700; border: 1px solid #000; padding: 0 4px; margin-left: 6px; }
.ptable .open-row td { font-style: italic; }
.ptable .shift { font-weight: 700; }
.ptable .shift.gone { font-weight: 500; text-decoration: line-through; color: #777; }
.ptable .abs { color: #555; }
.ptable .other { color: #666; font-size: 9px; }
.ptable tr { break-inside: avoid; }
.sheet.dense { padding: 20px 22px; }
.sheet.dense .ptable { font-size: 9px; }
.sheet.dense .ptable col.c-name { width: 120px; }
.sheet.dense .ptable th, .sheet.dense .ptable td { padding: 2px 1px; text-align: center; }
.sheet.dense .ptable td.name { text-align: left; padding-left: 3px; }
.sheet.dense .ptable th .dn { font-size: 8px; font-weight: 600; }
.sheet-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 9.5px; margin-top: 8px; padding-top: 5px; border-top: 1px solid #000; }

@media print {
    @page { size: A4 landscape; margin: 8mm; }
    .page { max-width: none; margin: 0; }
    .sheets { display: block; }
    .sheet { max-width: none; box-shadow: none; border-radius: 0; padding: 0; break-after: page; }
    .sheet:last-child { break-after: auto; }
    .sheet, .ptable .we, .ptable .area-row .bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Week templates (Vorlagen-Wochen) */
.tpl-menu { position: relative; }
.tpl-pop { right: 0; top: calc(100% + 6px); width: 340px; padding: 8px; gap: 2px; }
.tpl-pop .label { padding: 6px 8px 2px; }
.tpl-pop .hint { padding: 4px 8px 8px; }
.tpl-item { display: flex; align-items: center; gap: 2px; border-radius: 10px; }
.tpl-item:hover { background: var(--surface-3); }
.tpl-main { flex: 1; min-width: 0; border: 0; background: transparent; text-align: left; padding: 9px 8px; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.tpl-main .n { font-weight: 700; font-size: 14px; }
.tpl-main .d { font-size: 12px; color: var(--muted); }
.tpl-save { margin-top: 6px; justify-content: flex-start; background: var(--accent-soft); color: var(--blue-fg); border: 0; }
.tpl-weeks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; }
.check .swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
@media (max-width: 720px) { .tpl-pop { width: min(340px, calc(100vw - 32px)); } }

/* Shift swaps */
.swaps { margin-bottom: 16px; display: flex; flex-direction: column; gap: 4px; }
.swap-row { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.swaps .swap-row:first-of-type, section.card > .swap-row:first-of-type { border-top: 0; }
.radio-card { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: 12px; cursor: pointer; }
.radio-card.on { border-color: var(--accent); background: var(--accent-soft); }
.radio-card input { margin-top: 3px; accent-color: var(--accent); }
.radio-card > span { display: flex; flex-direction: column; gap: 2px; }

/* Team messages */
.msg-layout { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .msg-layout { grid-template-columns: 1fr; } }
.chip-toggle { border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 0 12px; height: 30px; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--ink); }
.chip-toggle.on { border-color: var(--accent); background: var(--accent-soft); }
.msg-item { border-bottom: 1px solid var(--line-soft); }
.msg-item.open { background: var(--surface-2); }
.msg-head { width: 100%; display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--ink); }
.msg-body { padding: 0 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.msg-text { font-size: 13.5px; line-height: 1.5; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; white-space: pre-line; }
.bar { flex: 1; height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; display: block; }
.bar > span { display: block; height: 100%; }
.receipts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.tabbar a { position: relative; }
.tabbar .badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red-fg); color: #fff; font-size: 10.5px; display: flex; align-items: center; justify-content: center; }
.inbox-item { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; text-align: left; width: 100%; cursor: pointer; color: var(--ink); }
.inbox-item.unread { border-color: var(--accent); }
.inbox-item.important { border: 2px solid #F1B8AC; }
.inbox-item .t { font-size: 15px; font-weight: 700; }
.inbox-item .b { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); white-space: pre-line; }

/* Tips */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tips-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .tips-layout { grid-template-columns: 1fr; } }
.tip-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 720px) { .tip-kpis { grid-template-columns: 1fr; } }
.tip-kpis .card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; }
.tip-kpis .card.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.tip-kpis .card.dark .label { color: #9FB0AA; }
.tip-kpis .card.warn-border { border-color: #E0A458; }
.kpi-value { font-size: 25px; font-weight: 700; }
.input.money { width: 140px; font-size: 20px; font-weight: 700; height: 40px; }
.tip-table .r { text-align: right; }
.tip-table tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--line); }
.tip-print { display: none; }
@media print {
    .tip-print { display: block; font-size: 12px; color: #000; }
    .tip-print table { width: 100%; border-collapse: collapse; margin: 12px 0; }
    .tip-print th, .tip-print td { border: 1px solid #000; padding: 8px 6px; text-align: left; }
    .tip-print td:nth-child(3), .tip-print td:nth-child(4) { width: 28%; }
}

/* Staff costs */
.cost-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .cost-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cost-kpis .card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
.legend-box { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.day-chart { width: 100%; height: auto; display: block; }
.day-chart .grid { stroke: var(--line-soft); stroke-width: 1; }
.day-chart .axis { font-size: 10.5px; fill: var(--muted); font-family: inherit; }
.day-chart .target { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 5 4; }
.day-chart .bar { cursor: pointer; outline: none; }
.day-chart .bar:hover rect:last-of-type, .day-chart .bar:focus-visible rect:last-of-type { opacity: .8; }
.day-chart .bar.sel rect:first-of-type { fill: var(--accent-soft); }
.day-detail { gap: 6px 16px; background: var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.cost-bottom { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; align-items: start; }
@media (max-width: 1000px) { .cost-bottom { grid-template-columns: 1fr; } }
.seg-edit { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }

/* Today (office start page) */
.today-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
@media (max-width: 900px) { .today-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.today-kpis .card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
.today-kpis .card.warn-border { border-color: #E0A458; }
.today-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .today-layout { grid-template-columns: 1fr; } }
.alert-card { border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; border: 1px solid; }
.alert-card.red { background: #FFF7F5; border-color: #F2C9C0; }
.alert-card.amber { background: #FFFBF4; border-color: #F0D9B5; }
.who-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line-soft); }
.todo-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-top: 1px solid var(--line-soft); text-decoration: none; color: var(--muted); }
.todo-row:first-of-type { border-top: 0; }
.todo-row:hover { background: var(--surface-2); }
.house-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.house-grid .big { font-size: 22px; font-weight: 700; }
.next-day { gap: 8px; padding: 6px 0; border-top: 1px solid var(--line-soft); }

/* Wage catalog */
.ordio-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; }
.ordio-box summary { cursor: pointer; font-weight: 700; }
.ptable .phone { font-weight: 500; font-size: 9px; }
.sheet-foot { display: flex; align-items: flex-end; gap: 16px; margin-top: 10px; padding-top: 6px; border-top: 1px solid #000; font-size: 10px; }
.sheet-qr { display: flex; align-items: center; gap: 8px; font-size: 9px; line-height: 1.3; }
.sheet-qr img { image-rendering: pixelated; }

/* Arbeitszeitnachweis: A4 portrait, one sheet per person */
.ts-sheets { display: flex; flex-direction: column; gap: 20px; align-items: center; }
.ts-sheet { width: 100%; max-width: 800px; background: #fff; color: #000; padding: 24px 28px; box-shadow: var(--shadow); border-radius: 4px; font-size: 11px; }
.ts-scroll { overflow-x: auto; }
.ts-scroll .ts-sheet { min-width: 560px; padding: 16px; }
.ts-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 8px; }
.ts-title { font-size: 16px; font-weight: 700; }
.ts-name { font-size: 14px; font-weight: 700; text-align: right; }
.ts-who .ts-sub { text-align: right; }
.ts-sub { font-size: 10.5px; }
.ts-table { width: 100%; border-collapse: collapse; line-height: 1.25; }
.ts-table th { text-align: left; font-size: 10px; border-bottom: 1px solid #000; padding: 3px 5px; }
.ts-table td { border-bottom: 1px solid #ddd; padding: 2px 5px; height: 17px; }
.ts-table .d { white-space: nowrap; width: 76px; }
.ts-table .n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ts-table .r { text-align: right; }
.ts-table tr.we td { background: #F3F3F0; }
.ts-table tfoot td { border-top: 2px solid #000; border-bottom: 0; font-weight: 700; padding-top: 4px; }
.ts-notes { margin-top: 8px; font-size: 9.5px; display: flex; flex-direction: column; gap: 2px; }
.ts-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 34px; font-size: 9.5px; }
.ts-sign span { display: block; border-bottom: 1px solid #000; height: 22px; margin-bottom: 3px; }
.ts-foot { margin-top: 12px; font-size: 9px; color: #555; }
@page timesheet { size: A4 portrait; margin: 10mm; }
@media print {
    .app-top, .tabbar { display: none !important; }
    .app-shell, .app-main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
    .ts-sheets { display: block; }
    .ts-scroll { overflow: visible; }
    .ts-sheet, .ts-scroll .ts-sheet { page: timesheet; max-width: none; min-width: 0; box-shadow: none; border-radius: 0; padding: 0; break-after: page; }
    .ts-sheet:last-child { break-after: auto; }
    .ts-table tr.we td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Mein Konto: second factor */
.recovery-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px 16px; padding: 12px 14px; border-radius: 12px; background: var(--surface-3); font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
a.avatar { text-decoration: none; }
.ts-digital { margin-top: 14px; padding: 8px 10px; border: 1px solid #000; font-size: 10px; display: flex; flex-direction: column; gap: 3px; }
.ts-digital.void { border-color: #B42318; color: #B42318; }
.ts-digital-title { font-weight: 700; font-size: 10.5px; }
.ts-digital-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Einführung: checklist, PIN slips, start letters */
.rollout-checks { display: flex; flex-direction: column; gap: 8px; }
.rollout-check { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--surface-3); }
.rollout-check .chip { justify-self: start; }
.print-area { display: none; }
@media print {
    .print-area { display: block; color: #000; }
    .pin-slips { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; }
    .pin-slip { border: 1px dashed #777; padding: 10px 12px; height: 34mm; display: flex; flex-direction: column; gap: 2px; break-inside: avoid; }
    .start-letter { page: timesheet; break-after: page; font-size: 12pt; line-height: 1.45; }
    .start-letter:last-child { break-after: auto; }
    .start-letter h1 { font-size: 20pt; margin: 8mm 0 4mm; }
    .start-letter-qr { display: flex; gap: 8mm; align-items: center; margin: 6mm 0; }
    .start-letter-qr img { image-rendering: pixelated; }
    .start-letter-link { word-break: break-all; font-size: 8pt; }
    .start-letter-pin { border: 2px solid #000; border-radius: 4mm; padding: 4mm 6mm; margin: 6mm 0; width: 80mm; }
}
.pin-code { font-size: 26pt; font-weight: 700; letter-spacing: .2em; }
@media (max-width: 720px) { .rollout-check { grid-template-columns: 1fr; } }

/* Zeit nachtragen: day and times in one row, people as a scrollable list */
.form-grid.manual-times { grid-template-columns: 1.4fr 1fr 1fr; margin-top: 12px; }
.people-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; max-height: 240px; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
@media (max-width: 720px) { .form-grid.manual-times, .people-pick { grid-template-columns: 1fr; } }
.manual-entry { display: flex; flex-direction: column; gap: 14px; }
.manual-break { gap: 8px; align-items: center; margin-top: 8px; }
.people-pick-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.people-pick-row .btn { white-space: nowrap; }
.btn.xs { height: 26px; padding: 0 8px; font-size: 11.5px; border-radius: 8px; }
.manual-summary td { vertical-align: top; }
.manual-summary tr.blocked td { background: var(--red-bg); }
.manual-summary tfoot td { font-weight: 700; border-top: 2px solid var(--line); }

/* Dienstplan Woche: rule hints, template colours, totals, quick assignment (after the click prototype) */
.plan-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.plan-layout.with-panel { grid-template-columns: minmax(0, 1fr) 300px; }
@media (max-width: 1200px) { .plan-layout.with-panel { grid-template-columns: minmax(0, 1fr); } }
.rules-panel { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.rule-group { display: flex; flex-direction: column; gap: 4px; }
.issue-item { text-align: left; border: 0; background: var(--amber-bg); color: var(--amber-fg); border-radius: 8px; padding: 6px 8px; font-size: 12px; cursor: pointer; }
.issue-item:hover { filter: brightness(.97); }
.warn-btn { background: var(--amber-bg); color: var(--amber-fg); border-color: transparent; }
.chip-btn { border: 0; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.assign-banner { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; background: var(--blue-bg); color: var(--blue-fg); border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; font-size: 13.5px; }
.unstaffed-row { background: #FFFCF7; }
.open-count { color: var(--red-fg); font-weight: 700; }
.collapse-btn svg { transition: transform .15s; }
.collapse-btn.open svg { transform: rotate(90deg); }
.demand-cell.red { background: #FFF6F4; }
.demand-cell.amber { background: #FFFAF1; }
.demand-cell.green { background: #F5FAF6; }
.demand-cell .verdict { font-weight: 700; }
.demand-cell.red .verdict { color: var(--red-fg); }
.demand-cell.amber .verdict { color: var(--amber-fg); }
.demand-cell.green .verdict { color: var(--green-fg, #2F7A4A); }
.person-label .grow { flex: 1; min-width: 0; }
.person-label .avatar { position: relative; }
.person-label .badge { position: absolute; top: -5px; right: -6px; min-width: 16px; height: 16px; border-radius: 8px; background: #E08A1E; color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 3px; }
.pill { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--surface-3); color: var(--muted); vertical-align: 1px; }
.hours-bar { height: 4px; border-radius: 2px; background: var(--line-soft); margin-top: 4px; overflow: hidden; }
.hours-bar span { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.hours-bar.over span { background: #E08A1E; }
.cell.wish-dayoff, .cell.wish-blocked { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(180, 60, 40, .07) 6px 12px); }
.cell.wish-blocked { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(60, 60, 60, .09) 6px 12px); }
.cell.wish-want { background: #F2F9F3; }
.wish-tag { align-self: flex-start; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--gray-bg); color: var(--ink-2); }
.wish-tag.green { background: var(--green-bg); color: var(--green-fg, #2F7A4A); }
.wish-tag.red { background: var(--red-bg); color: var(--red-fg); }
.mark .sub-label { display: block; font-size: 10px; font-weight: 600; opacity: .75; }
.shift .n { font-size: 11.5px; font-weight: 700; display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shift.has-issues { box-shadow: 0 0 0 2px #E8A23A inset; }
.shift.selected { box-shadow: 0 0 0 2.5px var(--accent) inset; background: #E0E2F7; }
.changed-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .6; flex-shrink: 0; }
.tag-pill { display: inline-block; margin-top: 3px; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 5px; background: rgba(255, 255, 255, .7); }
.issue-line { display: flex; gap: 3px; align-items: center; font-size: 10.5px; font-weight: 700; color: var(--amber-fg); line-height: 1.2; }
.other-area { font-size: 10.5px; font-weight: 600; color: var(--muted); padding: 3px 6px; border-radius: 7px;
    background: repeating-linear-gradient(135deg, var(--surface-3) 0 5px, #fff 5px 10px); border: 1px solid var(--line-soft); }
.assign-here { align-self: stretch; }
.quick-pick { display: flex; flex-direction: column; gap: 3px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 5px; box-shadow: var(--shadow); z-index: 2; }
.quick-pick .btn { justify-content: flex-start; }
.totals-row { background: var(--surface-2); }
.totals-row .cell { min-height: 0; }

/* Dienstplan Etappe 2 */
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.dark:hover { filter: brightness(1.15); }
button.person-label { border: 0; background: transparent; text-align: left; width: 100%; cursor: pointer; font: inherit; color: inherit; }
button.person-label:hover { background: var(--surface-2); }
button.person-label.active { background: var(--accent-soft); }
.icon-btn.mini { width: 26px; height: 26px; font-weight: 700; font-size: 15px; background: var(--surface); border: 1px solid var(--line); }
.time-nudge { gap: 6px; flex-wrap: nowrap; }
.time-nudge .input { min-width: 0; }
.byshift-summary { justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; }
.plan-row.byshift-row { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.byshift-cell { min-height: 90px; }
.demand-mini { font-weight: 700; padding: 3px 6px; border-radius: 7px; }
.demand-mini.red { background: var(--red-bg); color: var(--red-fg); }
.demand-mini.amber { background: var(--amber-bg); color: var(--amber-fg); }
.demand-mini.green { background: var(--green-bg); color: var(--green-fg); }
.slot-card.missing { border-style: dashed; border-color: #E7B984; }
.person-chip.warn { background: var(--amber-bg); color: var(--amber-fg); }
.add-shift { align-self: flex-start; border: 1px dashed var(--line); }
.tag-row { background: var(--surface-2); }
.tag-row .cell { min-height: 0; }
.paint-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 14px; margin-bottom: 12px; }
.paint-bar .btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.paint-bar .btn.on.danger { background: var(--red-fg); border-color: var(--red-fg); }
.paint-bar .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.paint-hint { flex-basis: 100%; }

/* Office navigation on the left (desktop), as a drawer behind a menu button on small screens */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--line); z-index: 30; }
.sidebar .brand { padding: 0 6px 6px; }
.side-nav, .side-bottom { display: flex; flex-direction: column; gap: 2px; }
.side-nav { flex: 1; }
.side-nav a, .side-bottom a:not(.side-account) { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.side-nav a:hover, .side-bottom a:not(.side-account):hover { background: var(--surface-3); color: var(--ink); }
.side-nav a.active, .side-bottom a.active { background: var(--accent-soft); color: var(--accent-hover); font-weight: 700; }
.side-group { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 4px; }
.side-bottom { border-top: 1px solid var(--line-soft); padding-top: 10px; gap: 6px; }
.side-bottom .select { height: 34px; }
.side-account { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.side-account:hover { background: var(--surface-3); }
.side-account-text { display: flex; flex-direction: column; min-width: 0; }
.side-account-text .name { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-account-text .sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-logout { justify-content: flex-start; }
.shell-main { min-width: 0; }
.shell-main .page { max-width: none; }
.mobile-bar { display: none; }
.sidebar-backdrop { display: none; }
@media (max-width: 900px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: fixed; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop { display: block; position: fixed; inset: 0; border: 0; background: rgba(29, 30, 35, .36); z-index: 25; }
    .mobile-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
}
@media print {
    .sidebar, .mobile-bar, .sidebar-backdrop { display: none !important; }
    .shell { display: block; }
}
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: var(--ink); }
.table tfoot td { border-top: 2px solid var(--line); background: var(--surface-2); }
.table td .bar { height: 4px; border-radius: 4px; background: var(--gray-bg); margin-top: 4px; min-width: 48px; overflow: hidden; }
.table td .bar span { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.quick-pick .free-shift { display: flex; align-items: center; gap: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
.input.xs { height: 28px; padding: 0 6px; font-size: 12px; border-radius: 7px; min-width: 0; }
.chip.tag-toggle { border: 1px dashed var(--line); cursor: pointer; background: transparent; }
.chip.tag-toggle.green { border-style: solid; }
.chip.tag-toggle:disabled { cursor: default; }
.avail { display: flex; flex-direction: column; gap: 8px; }
.avail-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.avail-day { width: 28px; }
.avail-row .select { width: auto; min-width: 190px; }
.avail-times { display: inline-flex; align-items: center; gap: 6px; }
.avail-times .input { width: 110px; }
.avail-note { flex: 1; min-width: 140px; }
.chip.tag-chip { padding: 0 4px 0 10px; gap: 2px; }
.chip.tag-chip button { border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; padding: 2px; }
.chip.tag-chip .tag-x { opacity: .55; font-size: 14px; line-height: 1; }
.chip.tag-chip .tag-x:hover { opacity: 1; }
.vcal-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.vcal { border-collapse: collapse; font-size: 12px; min-width: 100%; }
.vcal th, .vcal td { border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); padding: 0; text-align: center; min-width: 26px; height: 28px; }
.vcal th { font-weight: 700; color: var(--muted); padding: 4px 0; background: var(--surface-2); position: sticky; top: 0; }
.vcal-dn { font-size: 10px; text-transform: uppercase; }
.vcal .vcal-name { text-align: left; padding: 0 10px; white-space: nowrap; position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 160px; font-weight: 600; }
.vcal th.vcal-name { background: var(--surface-2); z-index: 2; }
.vcal .vcal-we { background: var(--gray-bg); }
.vcal .vcal-hol { background: var(--violet-bg); }
.vcal .vcal-abs { background: var(--c); color: var(--ink); }
.vcal td svg { display: block; margin: 0 auto; }
.vcal .vcal-req { background: repeating-linear-gradient(45deg, var(--c) 0 4px, transparent 4px 8px); }
.vcal-area td { text-align: left; padding: 8px 10px 4px; font-weight: 700; background: var(--surface); position: sticky; left: 0; }
.vcal-area .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.vcal-count td { font-weight: 700; color: var(--ink-2); }
.vcal .vcal-over { background: var(--red-bg); color: var(--red-fg); }
.vcal-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; }
.vcal-key-req { background: repeating-linear-gradient(45deg, var(--muted) 0 3px, transparent 3px 6px); border: 1px solid var(--line); }
.chip.tag-mini { font-size: 10.5px; padding: 0 6px; height: 18px; background: rgba(255,255,255,.7); color: var(--ink-2); margin-right: 6px; }
.msel { position: relative; display: inline-block; }
.msel-btn.on { border-color: var(--ink); }
.msel-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 11px; margin-left: 6px; padding: 0 5px; }
.msel-caret { margin-left: 6px; font-size: 10px; opacity: .6; }
.msel-backdrop { position: fixed; inset: 0; z-index: 40; }
.msel-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 41; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 10px 12px; min-width: 220px; max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.cf { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.cf-form { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cf-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: center; }
.cf-label { font-weight: 700; font-size: 13.5px; color: var(--ink-2); }
.cf-ctrl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.cf-ctrl > .select, .cf-ctrl > .input { flex: 1; min-width: 160px; }
.ig { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); width: 150px; }
.ig .input { border: 0; border-radius: 0; min-width: 0; flex: 1; text-align: right; }
.ig .unit { display: inline-flex; align-items: center; padding: 0 10px; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.ig .unit.pre { border-right: 1px solid var(--line-soft); }
.day-chips { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.day-chips button { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; height: 32px; min-width: 40px; padding: 0 10px; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.day-chips button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.cf-summary { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface-2); position: sticky; top: 0; font-size: 13px; }
.cf-summary dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 10px 0 0; }
.cf-summary dt { color: var(--muted); }
.cf-summary dd { margin: 0; text-align: right; font-weight: 600; }
.cf-warn { margin-top: 8px; background: var(--red-bg); color: var(--red-fg); border-radius: 10px; padding: 8px 10px; font-weight: 600; }
@media (max-width: 760px) { .cf { grid-template-columns: 1fr; } .cf-row { grid-template-columns: 1fr; gap: 4px; } }
.side-nav a .nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--amber-bg); color: var(--amber-fg); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.people-pick { display: flex; flex-wrap: wrap; gap: 6px; max-height: 190px; overflow-y: auto; padding: 2px; }
.people-pick button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 11px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.people-pick button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.people-pick button.blocked:not(.on) { opacity: .55; }
.move-btns { display: flex; flex-direction: column; gap: 2px; }
.area-row { cursor: grab; }
.area-row.dragging { opacity: .45; }
.area-row.drop-target { box-shadow: inset 0 3px 0 var(--accent, var(--ink)); }
.drag-handle { color: var(--muted); font-size: 16px; cursor: grab; user-select: none; }
.invoice-form { border-top: 1px solid var(--line-soft); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }

/* Events of a day in the plan header (wedding, fair, group). */
.day-event { display: block; width: 100%; margin-top: 4px; padding: 2px 6px; border: 0; border-radius: 6px; background: var(--amber-bg); color: var(--amber-fg);
    font: inherit; font-size: 11px; font-weight: 700; line-height: 1.3; text-align: left; overflow: hidden; cursor: pointer;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.day-event-add { display: block; margin-top: 4px; padding: 0 4px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; opacity: 0; }
.cell:hover .day-event-add, .day-event-add:focus-visible { opacity: 1; }
@media (hover: none) { .day-event-add { opacity: 1; } }

/* Quick editor at a shift in the week plan; the full dialog stays behind "Mehr". */
.quick-backdrop { position: fixed; inset: 0; z-index: 60; }
.quick-edit { position: fixed; z-index: 61; width: 300px; display: flex; flex-direction: column; gap: 10px; padding: 14px;
    box-shadow: 0 12px 32px rgba(29, 30, 35, .16); }
.quick-edit .input[type=time] { flex: 1; min-width: 0; }

/* Bewerbungen: columns per stage. */
.board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.board-col { background: var(--surface-2); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.board-head { font-weight: 700; font-size: 13px; display: flex; gap: 6px; padding: 2px 4px; }
.board-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 10px 12px; border: 1px solid var(--line);
    border-radius: 12px; background: var(--surface); font: inherit; cursor: pointer; }
.board-card:hover { border-color: var(--accent); }
.stars { color: var(--amber-fg); letter-spacing: 1px; font-size: 13px; }
.star-btn { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--line); cursor: pointer; padding: 0 2px; }
.star-btn.on { color: var(--amber-fg); }
@media (max-width: 900px) { .board { grid-template-columns: repeat(5, 240px); } }

/* Checklists: big tick targets for the phone. */
.check-point { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-top: 1px solid var(--line-soft); cursor: pointer; }
.check-point input { width: 22px; height: 22px; flex: none; accent-color: var(--accent); }
.check-point.done > span:first-of-type { text-decoration: line-through; opacity: .6; }
.list-item > input[type=checkbox] { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--accent); }

/* Trend charts: thin marks, recessive grid, text in text colours. */
.trend-chart { margin: 0; }
.trend-chart figcaption { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin-bottom: 6px; }
.trend-chart .legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.trend-chart .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.trend-chart .legend i.dash { height: 0; border-top: 2px dashed var(--muted); border-radius: 0; vertical-align: 3px; }
.trend-chart svg { width: 100%; height: 200px; display: block; overflow: visible; }
.trend-chart .grid { stroke: var(--line-soft); stroke-width: 1; }
.trend-chart .axis { fill: var(--muted); font-size: 11px; }
.trend-chart .target { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
