:root {
  --bg: #f5f6f9; --panel: #ffffff; --ink: #1d2433; --muted: #6b7385; --line: #e3e6ee; --line2: #eef0f5;
  --brand: #233a6b; --accent: #2f6fed; --accent-soft: #e8f0fe; --ok: #1f8a4c; --ok-soft: #e3f4ea;
  --bad: #c43d3d; --bad-soft: #fbe9e9; --warn: #b7791f; --warn-soft: #fdf3e1; --we: #f8f9fc;
  --radius: 10px; --shadow: 0 6px 24px rgba(20, 30, 60, .14);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
h2 { font-size: 18px; margin: 4px 0 12px; } h3 { font-size: 15px; margin: 0 0 8px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.block { display: block; } .grow { flex: 1; }
.boot, .empty { padding: 48px; text-align: center; color: var(--muted); }

/* top bar */
header.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 8px 16px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; color: var(--brand); }
.brand.big { font-size: 26px; justify-content: center; margin-bottom: 8px; }
.logo { width: 28px; height: 28px; color: var(--brand); } .brand.big .logo { width: 40px; height: 40px; }
header nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.nav { border: 0; background: none; padding: 8px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 500; }
.nav:hover { background: var(--line2); color: var(--ink); }
.nav.on { color: var(--accent); background: var(--accent-soft); }
.me { display: flex; align-items: center; gap: 10px; }
.me select { border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; background: var(--panel); }
.who { display: flex; flex-direction: column; line-height: 1.1; font-weight: 600; border: 0; background: none; cursor: pointer; text-align: left; padding: 0; }
.who small { font-weight: 400; color: var(--muted); font-size: 11px; }
main { padding: 16px; max-width: 100%; }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); padding: 7px 12px; border-radius: 8px; cursor: pointer; text-decoration: none; font-weight: 500; white-space: nowrap; }
.btn:hover { border-color: #c9cede; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); } .btn.danger.ghost { border-color: transparent; }
.btn.sm { padding: 5px 10px; font-size: 13px; } .btn.xs { padding: 2px 7px; font-size: 12px; }
.btn.icon { width: 32px; height: 32px; justify-content: center; padding: 0; font-size: 18px; }
.btn.ok { color: var(--ok); } .btn.ko { color: var(--bad); }
.link { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 4px 0; font-size: 13px; }
input, select, textarea { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #fff; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
input[type=color] { padding: 2px; width: 42px; height: 32px; }
input:disabled, select:disabled, textarea:disabled { background: var(--line2); color: var(--muted); }
.w60 { width: 60px; } .w70 { width: 70px; } .w-note { width: 140px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
label > input, label > select, label > textarea { color: var(--ink); font-size: 14px; }
label.check { flex-direction: row; align-items: center; gap: 6px; color: var(--ink); }
label.mini { flex-direction: row; align-items: center; gap: 6px; }
.inline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 8px 16px; }
legend { font-size: 13px; color: var(--muted); }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-card { width: 100%; max-width: 380px; background: var(--panel); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); text-align: center; }
.auth-card form { text-align: left; margin-top: 16px; }

/* subtabs & toolbar */
.subtabs { display: flex; gap: 6px; align-items: stretch; margin-bottom: 12px; flex-wrap: wrap; }
.subtab { display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 6px 14px; cursor: pointer; }
.subtab small { color: var(--muted); font-size: 11px; }
.subtab.on { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.subtab.add { align-items: center; justify-content: center; font-size: 20px; width: 44px; color: var(--accent); }
.subtabs .btn { align-self: center; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar h2, .toolbar h3 { margin: 0; }
.range-label { font-weight: 600; margin-left: 6px; text-transform: capitalize; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--panel); }
.seg button { border: 0; background: none; padding: 6px 14px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.date { width: 140px; }

/* grids */
.grid-wrap { overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); max-height: calc(100vh - 210px); }
.grid-wrap.short { max-height: 360px; }
table.grid, table.list { border-collapse: separate; border-spacing: 0; width: 100%; }
.grid th, .list th { position: sticky; top: 0; z-index: 5; background: #fafbfd; font-weight: 600; font-size: 12px; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.grid th.today { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.grid th b { color: var(--ink); font-size: 14px; }
.grid td, .list td { border-bottom: 1px solid var(--line2); padding: 4px 6px; vertical-align: top; }
.grid .emp, .list .emp { position: sticky; left: 0; z-index: 4; background: var(--panel); min-width: 210px; max-width: 240px; border-right: 1px solid var(--line); }
.grid th.emp, .list th.emp { z-index: 6; background: #fafbfd; }
.emp-cell { display: flex; gap: 8px; align-items: center; cursor: pointer; padding: 2px; border-radius: 6px; }
.emp-cell:hover { background: var(--line2); }
.emp-cell b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.emp-cell small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; }
.avatar.sm { width: 22px; height: 22px; font-size: 9px; vertical-align: middle; }
.dept-row td { position: sticky; left: 0; background: #fff; padding: 8px 10px; font-weight: 700; cursor: pointer; border-left: 4px solid var(--c); border-bottom: 1px solid var(--line); }
.dept-row td { background: color-mix(in srgb, var(--c) 8%, #fff); }
.dept-row.static td { cursor: default; }
.dept-row .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 8px; }
.caret { display: inline-block; width: 16px; color: var(--muted); }
.cell { min-width: 120px; cursor: pointer; height: 54px; border-left: 1px solid var(--line2); }
.cell:hover { background: #f3f6fd; }
.cell.we, .grid th.we { background: var(--we); }
.cell.off, .timeline.off { background: repeating-linear-gradient(135deg, #f3f4f7 0 6px, #fafafc 6px 12px); }
.tot { text-align: right; white-space: nowrap; min-width: 80px; }
.tot small { display: block; color: var(--muted); font-size: 11px; }
.tot.over b { color: var(--warn); } .tot.bad b { color: var(--bad); } .tot.under b { color: var(--muted); }
.chip { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; margin: 2px 0; padding: 3px 6px; border-radius: 6px; font-size: 12px; background: color-mix(in srgb, var(--c) 16%, #fff); border-left: 3px solid var(--c); cursor: pointer; }
.chip .tm { font-weight: 600; } .chip .ps { font-size: 11px; color: #3c4456; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.demo { display: inline-flex; flex-direction: column; align-items: flex-start; min-width: 120px; }
.chip.abs, .mchip.abs { background: repeating-linear-gradient(135deg, #eceef3 0 5px, #f6f7fa 5px 10px); border-left: 3px solid #9aa1b2; color: #4a5266; font-weight: 600; }
.st { font-weight: 700; } .st.ok { color: var(--ok); } .st.ko { color: var(--bad); }
.unav { font-size: 11px; color: var(--bad); background: var(--bad-soft); border-radius: 5px; padding: 2px 5px; margin: 2px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -2px; }
.legend .abs-sw { background: repeating-linear-gradient(135deg, #cfd3dc 0 3px, #f0f1f4 3px 6px); }
.legend .unav-sw { background: var(--bad-soft); border: 1px solid var(--bad); }

/* month grid */
.grid.month .cell.m { min-width: 34px; height: 40px; padding: 2px; text-align: center; }
.grid.month th { text-align: center; padding: 4px 2px; } .grid.month th small { display: block; font-weight: 400; }
.mchip { font-size: 11px; font-weight: 600; border-radius: 4px; padding: 1px 2px; margin: 1px 0; background: color-mix(in srgb, var(--c) 22%, #fff); border-left: 3px solid var(--c); cursor: pointer; }
.cell.has-unav { box-shadow: inset 0 3px 0 var(--bad); }

/* day grid */
.grid.day .tl-head { min-width: 960px; padding: 8px 0; }
.tl-hours { display: grid; grid-template-columns: repeat(24, 1fr); }
.tl-hours span { font-weight: 500; border-left: 1px solid var(--line); padding-left: 3px; }
.timeline { position: relative; height: 46px; min-width: 960px; cursor: pointer; background-image: linear-gradient(to right, var(--line2) 1px, transparent 1px); background-size: calc(100% / 24) 100%; }
.bar { position: absolute; top: 7px; height: 32px; border-radius: 6px; background: color-mix(in srgb, var(--c) 25%, #fff); border-left: 4px solid var(--c); font-size: 12px; padding: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; z-index: 2; }
.ubar { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(196,61,61,.12) 0 6px, rgba(196,61,61,.04) 6px 12px); }
.abar { position: absolute; inset: 8px 4px; border-radius: 6px; background: repeating-linear-gradient(135deg, #eceef3 0 5px, #f6f7fa 5px 10px); font-weight: 600; padding: 6px 10px; color: #4a5266; z-index: 1; }

/* modal */
.overlay { position: fixed; inset: 0; background: rgba(18, 24, 40, .35); z-index: 100; display: grid; place-items: center; padding: 16px; overflow: auto; }
.modal { background: var(--panel); border-radius: 14px; width: 100%; max-width: 560px; padding: 20px 22px; box-shadow: var(--shadow); max-height: calc(100vh - 32px); overflow: auto; }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; }
.modal .sub { color: var(--muted); margin: 2px 0 12px; text-transform: capitalize; }
.x { border: 0; background: none; font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tab { border: 0; background: none; padding: 8px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.pane { display: none; } .pane.on { display: block; }
.frow { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line2); }
.frow > label { font-weight: 600; color: var(--ink); }
.frow textarea, .frow select { width: 100%; }
.lbl { font-size: 12px; color: var(--muted); margin-left: 6px; }
.dur { font-weight: 600; color: var(--accent); }
.modal-foot { display: flex; gap: 8px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.repeat { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.days { display: flex; gap: 6px; margin: 10px 0; flex-wrap: wrap; }
.daychip input { position: absolute; opacity: 0; pointer-events: none; }
.daychip span { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--line2); color: var(--ink); cursor: pointer; font-size: 12px; font-weight: 600; }
.daychip input:checked + span { background: var(--accent); color: #fff; }
.daychip input:focus-visible + span { outline: 2px solid var(--accent); }
.warn { background: var(--warn-soft); border: 1px solid #f0d49b; border-radius: 8px; padding: 8px 12px; margin-top: 12px; font-size: 13px; }
.warn ul { margin: 4px 0; padding-left: 18px; }
.hint { margin-top: 12px; font-size: 12px; color: var(--muted); background: var(--line2); padding: 8px 10px; border-radius: 8px; }
.hint:empty { display: none; }
.hint.bad { background: var(--bad-soft); color: var(--bad); }
.add-unav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.pane-foot { border-top: 1px solid var(--line2); padding-top: 12px; }

/* lists */
.list td input:not([type=color]):not([type=checkbox]) { width: 100%; }
.list td.num, .list th.num { text-align: right; white-space: nowrap; }
.list tr.inactive td { opacity: .55; }
.list.small td { font-size: 12px; }
.list .details { color: var(--muted); max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list.positions { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); max-width: 900px; }
.list.positions td { vertical-align: middle; }
.list.positions { max-width: 1100px; }
.list.positions td input[name=name], .list.positions td #np-name { min-width: 170px; }
.list.positions td input[type=time] { width: 100px; }
.list.positions td input[type=number] { width: 64px; }
.emp-sub td { background: #fbfcfe; padding: 8px; }
.ts td { vertical-align: middle; white-space: nowrap; }
.list.ts td input[type=time] { width: 100px; }
.list.ts td input[type=number] { width: 70px; }
.list.ts td input.w-note { width: 160px; }
.ts .d.pos { color: var(--warn); font-weight: 600; } .ts .d.neg { color: var(--accent); font-weight: 600; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.pend { background: var(--warn-soft); color: var(--warn); } .pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.ko { background: var(--bad-soft); color: var(--bad); }
.acts { display: flex; gap: 4px; }
.pos { color: var(--warn); } .neg { color: var(--bad); }
.dash td.num.pos b { color: var(--warn); } .dash td.num.neg b { color: var(--bad); }
.dash .bal small { display: block; color: var(--muted); font-size: 10px; }
.dash td { vertical-align: middle; }
.alert-btn { border: 1px solid #f0d49b; background: var(--warn-soft); color: var(--warn); border-radius: 999px; padding: 2px 9px; cursor: pointer; font-weight: 600; }
.okmark { color: var(--ok); font-weight: 700; }
.alerts-row td { background: var(--warn-soft); font-size: 13px; }
.alerts-row ul { margin: 4px 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.kpi small { color: var(--muted); display: block; } .kpi b { font-size: 22px; }
.kpi.warn { border-color: #f0d49b; background: var(--warn-soft); } .kpi.bad { border-color: #efc1c1; background: var(--bad-soft); }
.notes { margin-top: 14px; font-size: 12px; color: var(--muted); } .notes h3 { font-size: 13px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.card .btn.primary { align-self: flex-start; }

#toasts { position: fixed; bottom: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #1d2433; color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); max-width: 380px; }
.toast.err { background: var(--bad); }

#print-root { display: none; }

@media (max-width: 720px) {
  main { padding: 10px; }
  .two { grid-template-columns: 1fr; }
  .frow { grid-template-columns: 1fr; gap: 4px; }
  .grid .emp, .list .emp { min-width: 150px; }
  .me .who { display: none; }
}

/* ---------------------------------------------------------------- compact layout */
html, body { font-size: 13px; line-height: 1.3; }
h2 { font-size: 16px; margin: 2px 0 8px; } h3 { font-size: 14px; }
header.top { padding: 4px 12px; gap: 10px; }
.brand { font-size: 15px; } .logo { width: 22px; height: 22px; }
.nav { padding: 5px 9px; }
.who { font-size: 12px; }
main { padding: 10px 12px; }
.btn { padding: 4px 9px; border-radius: 6px; }
.btn.sm { padding: 3px 8px; font-size: 12px; }
.btn.icon { width: 26px; height: 26px; font-size: 15px; }
input, select, textarea { padding: 3px 6px; border-radius: 6px; }
input[type=color] { width: 34px; height: 26px; }
.subtabs { margin-bottom: 8px; gap: 4px; }
.subtab { padding: 3px 10px; border-radius: 8px; }
.subtab.add { width: 34px; font-size: 16px; }
.toolbar { margin-bottom: 8px; gap: 6px; }
.toolbar .group { gap: 5px; }
.seg button { padding: 3px 10px; }
.date { width: 125px; }
.grid-wrap { max-height: calc(100vh - 150px); border-radius: 8px; }
.grid th, .list th { padding: 4px 5px; font-size: 11px; }
.grid th b { font-size: 12px; }
.grid td, .list td { padding: 2px 4px; }
.grid .emp, .list .emp { min-width: 165px; max-width: 190px; }
.emp-cell { gap: 6px; padding: 1px; }
.emp-cell b { font-size: 12px; max-width: 140px; }
.emp-cell small { font-size: 10px; }
.avatar { width: 22px; height: 22px; font-size: 9px; }
.dept-row td { padding: 4px 8px; font-size: 12px; }
.cell { min-width: 105px; height: 32px; }
.chip { flex-wrap: nowrap; margin: 1px 0; padding: 1px 5px; font-size: 11px; border-radius: 4px; overflow: hidden; }
.chip .tm { white-space: nowrap; }
.chip .ps { width: auto; flex: 1; min-width: 0; font-size: 10px; }
.chip.demo { display: inline-flex; flex-direction: row; min-width: 0; }
.unav { font-size: 10px; padding: 0 4px; margin: 1px 0; }
.tot { min-width: 64px; } .tot small { font-size: 10px; display: inline; margin-left: 3px; }
.legend { margin-top: 6px; gap: 10px; font-size: 11px; }
.legend .tip { margin-left: auto; }
.grid.month .cell.m { min-width: 28px; height: 26px; padding: 1px; }
.mchip { font-size: 10px; padding: 0 2px; }
.timeline { height: 30px; }
.bar { top: 4px; height: 22px; padding: 3px 6px; font-size: 11px; border-radius: 4px; }
.abar { inset: 4px; padding: 3px 8px; }
.grid.day .tl-head { padding: 4px 0; }
.tl-hours span { font-size: 10px; }
.modal { padding: 14px 16px; max-width: 580px; }
.modal.wide { max-width: 720px; }
.tabs { margin-bottom: 8px; } .tab { padding: 5px 10px; }
.frow { grid-template-columns: 95px 1fr; padding: 4px 0; gap: 8px; }
.stack { gap: 8px; } .two { gap: 8px; }
.repeat { margin-top: 8px; padding: 8px; }
.daychip span { width: 32px; height: 32px; font-size: 11px; }
.modal-foot { margin-top: 10px; }
.kpis { gap: 8px; margin-bottom: 8px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.kpi { padding: 6px 10px; } .kpi small { font-size: 11px; } .kpi b { font-size: 17px; }
.card { padding: 12px; gap: 8px; margin-bottom: 10px; }
.emp-sub td { padding: 4px 6px; }
.list.ts td input[type=time] { width: 92px; }
.list.ts td input[type=number] { width: 58px; }
.pill { padding: 1px 6px; font-size: 11px; }
.notes { margin-top: 8px; font-size: 11px; }

/* validation of effective hours in the shift window */
.st.pend { color: var(--warn); font-size: 9px; }
.review { margin-top: 8px; padding: 8px 10px; border: 1px solid #f0d49b; background: var(--warn-soft); border-radius: 8px; display: flex; flex-direction: column; gap: 6px; }
.review-head { display: flex; align-items: center; gap: 8px; }
.review .full { width: 100%; }

.list th.center, .list td.center { text-align: center; }
.list .emp.one, .grid .emp.one { max-width: none; white-space: nowrap; vertical-align: middle; }
.emp.one .emp-cell { gap: 5px; }
.emp.one .emp-cell b { max-width: none; font-weight: 600; }
.emp.one .sep { color: var(--line); }
.list.dash .bal small { display: inline; margin-right: 4px; }
.list.dash td { white-space: nowrap; padding-top: 3px; padding-bottom: 3px; }
.list.dash th.num { white-space: nowrap; vertical-align: middle; }
/* dashboard: every header on one line, the "i" right after the text */
.list.dash th { white-space: nowrap; }
.list.dash thead tr:nth-child(2) th { height: 30px; font-weight: 600; }
.list.dash th .info { margin-left: 5px; }
/* dashboard: the summary cards on one row, each label on one line with its "i" */
.kpis.dk { grid-template-columns: 1fr 1fr 1.1fr 1.5fr 1.25fr 1.05fr .85fr; }
.list.dash thead tr:nth-child(2) th { font-size: 11px; }
.list.dash td.num, .list.dash th.num { padding-left: 5px; padding-right: 6px; }
.list.dash th .info { margin-left: 4px; }
.kpis.dk .kpi { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 2px; }
.kpis.dk .kpi small { display: flex; align-items: center; min-width: 0; white-space: nowrap; }
.kpis.dk .kpi small .kl { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kpis.dk .kpi b { white-space: nowrap; }
@media (max-width: 1100px) { .kpis.dk { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } }

/* dashboard: column groups like the official form */
.list.dash tr.grp th { top: 0; text-transform: uppercase; letter-spacing: .03em; font-size: 10px; color: var(--brand); background: #eef1f7; padding: 3px 4px; }
.list.dash thead tr:nth-child(2) th { top: 21px; }
.list.dash .g1 { border-left: 1px solid var(--line); }
.list.dash td.num, .list.dash th.num { padding-left: 6px; padding-right: 6px; }

/* annual control report (official form layout) */
.control .c-grid th, .control .c-grid td { padding: 0 1px; font-size: 6.5px; text-align: center; line-height: 1.25; }
.control .c-grid th.c-sum { writing-mode: vertical-rl; transform: rotate(180deg); height: 70px; font-size: 6.5px; white-space: nowrap; vertical-align: bottom; }
.control .c-grid td.c-day { width: 15px; height: 10px; }
.control .c-grid tr.top td.c-day { border-bottom: 1px dotted #c5c9d3; }
.control .c-grid tr.bot td.c-day { border-top: 0; }
.control td.c-X { background: #eef6ee; } .control td.c-F { background: #eef1fb; } .control td.c-V { background: #fff6e2; }
.control td.c-M, .control td.c-Ma, .control td.c-A { background: #fbecec; } .control td.c-Mi, .control td.c-D { background: #f1eef8; }
.control td.c-na { background: #f3f4f6; }
.control td.c-month { font-weight: 700; font-size: 7px; text-transform: capitalize; }
.control td.c-sum { font-size: 7px; white-space: nowrap; padding: 0 2px; } .control td.b { font-weight: 700; }
.control td.c-sign { width: 40px; }
.control .c-bottom { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-top: 8px; align-items: start; }
.control .c-year th, .control .c-year td { font-size: 8px; padding: 2px 4px; } .control .c-year td { text-align: right; } .control .c-year td:last-child { text-align: left; font-style: italic; }
.control .c-legend { font-size: 7.5px; line-height: 1.5; }
.control .p-sign { margin-top: 18px; }

/* timesheets: one line per shift */
.ts .ts-emp { white-space: nowrap; max-width: 210px; overflow: hidden; text-overflow: ellipsis; }
.ts .ts-emp b { font-weight: 500; margin-left: 5px; }
.ts .ts-emp:not(.first) { color: var(--muted); }
.ts tr.first td { border-top: 1px solid var(--line); }
.ts .ts-emp .btn { margin-left: 4px; padding: 0 4px; }
.avatar.xs { width: 18px; height: 18px; font-size: 8px; vertical-align: middle; }
.ts td { padding: 1px 4px; }
.ts input { padding: 1px 4px; }
.ts .acts .btn { padding: 1px 6px; }

/* labour-law flags */
.cell, .timeline { position: relative; }
.law { position: absolute; top: 3px; right: 3px; z-index: 3; display: inline-flex; align-items: center; gap: 1px; cursor: help;
  height: 16px; min-width: 16px; padding: 0 2px; border-radius: 8px; line-height: 1; }
.law svg { width: 12px; height: 12px; display: block; }
.law i { font-style: normal; font-size: 9px; font-weight: 700; padding-right: 2px; }
.law.l-bad { color: #fff; background: var(--bad); box-shadow: 0 1px 2px rgba(196,61,61,.35); }
.law.l-warn { color: #fff; background: #d68a1c; box-shadow: 0 1px 2px rgba(183,121,31,.35); }
.law svg path:first-child { fill: #fff; }
.law.l-bad svg path:nth-child(2) { stroke: var(--bad); } .law.l-bad svg circle { fill: var(--bad); }
.law.l-warn svg path:nth-child(2) { stroke: #d68a1c; } .law.l-warn svg circle { fill: #d68a1c; }
.law:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.law.lg { position: static; vertical-align: -3px; margin-right: 2px; }
.l-bad { color: var(--bad); } .l-warn { color: var(--warn); }
.cell:has(.law.l-bad), .timeline:has(.law.l-bad) { background-color: #fdf1f1; box-shadow: inset 2px 0 0 var(--bad); }
.cell:has(.law.l-warn), .timeline:has(.law.l-warn) { background-color: #fdf8ee; box-shadow: inset 2px 0 0 #d68a1c; }
.cell.m .law { top: 1px; right: 1px; height: 12px; min-width: 12px; padding: 0; }
.cell.m .law svg { width: 9px; height: 9px; } .cell.m .law i { display: none; }
.cell .chip { margin-right: 18px; }
#law-tip { position: fixed; z-index: 300; display: none; max-width: calc(100vw - 16px); width: max-content; background: #1d2433; color: #fff; border-radius: 8px; padding: 8px 10px; font-size: 12px; box-shadow: var(--shadow); pointer-events: none; border-top: 3px solid var(--bad); }
#law-tip.warn { border-top-color: #d68a1c; }
/* explanation bubbles of the dashboard */
.info { display: inline-flex; align-items: center; justify-content: center; width: 13px; height: 13px; margin-left: 4px; vertical-align: 1px;
  border-radius: 50%; background: #e3e8f2; color: #4a5875; font: italic 700 9px/1 Georgia, "Times New Roman", serif; cursor: help; flex: none; transition: background .12s, color .12s; }
.info:hover, .info:focus { background: var(--primary, #2f6fde); color: #fff; outline: none; }
/* header label with a bubble: dotted underline instead of an "i" */
.info.info-t { display: inline; width: auto; height: auto; margin: 0; border-radius: 0; background: none; color: inherit; font: inherit;
  text-decoration: underline dotted #9aa6bd; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.info.info-t:hover, .info.info-t:focus { background: none; color: var(--primary, #2f6fde); text-decoration-color: currentColor; }
#info-tip { position: fixed; z-index: 300; display: none; width: max-content; max-width: min(340px, calc(100vw - 16px)); background: #1d2433; color: #e9edf5;
  border-radius: 9px; padding: 9px 12px; font-size: 12px; line-height: 1.45; box-shadow: 0 8px 24px rgba(16, 24, 40, .22); pointer-events: none;
  border-top: 3px solid var(--primary, #2f6fde); text-align: left; font-weight: 400; white-space: normal; animation: pop-in .12s ease-out; }
#info-tip b { display: block; color: #fff; font-size: 12.5px; margin-bottom: 3px; }
#info-tip p { margin: 0; }
#info-tip .sub { display: block; color: #aab4c8; font-size: 11.5px; margin: -2px 0 6px; }
#info-tip dl { display: grid; grid-template-columns: auto auto; gap: 3px 14px; margin: 0; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .1); }
#info-tip dt { color: #aab4c8; }
#info-tip dd { margin: 0; color: #fff; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
#info-tip.emp { border-top-color: #5b8def; min-width: 210px; }
#info-tip p.calc { margin-top: 6px; padding: 6px 8px; background: rgba(255, 255, 255, .07); border-radius: 6px; color: #cfd8ea; font-size: 11.5px; }
#law-tip ul { margin: 4px 0 0; padding-left: 0; list-style: disc inside; }
/* one line per bullet, the bullet point stays visible */
#law-tip li { margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; list-style-position: inside; }
#law-tip li.bad::marker { color: #ff8b8b; } #law-tip li.warn::marker { color: #f5c26b; }
/* "to check" lines: black text on light orange (readable) */
#law-tip li.warn { color: #1d2433; background: #fdf3e1; border: 1px solid #f0d49b; border-radius: 5px; padding: 3px 7px; margin: 3px 0; font-size: 12px; }
.warn li { margin: 2px 0; }

/* past days: validation colours */
.chip.past, .mchip.past { background: color-mix(in srgb, var(--c) 14%, #fff); }
.chip.past .tm, .chip.past .ps { color: color-mix(in srgb, var(--c) 75%, #000); }
.chip.past.ok .st.ok { color: #1f8a4c; }

/* the Save button of the employee form belongs to the form tabs only */
.modal:has(#p-docs.on) .pane-foot, .modal:has(#p-unav.on) .pane-foot { display: none; }

/* employee documents */
.doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dropzone { border: 2px dashed #c7cedd; border-radius: 10px; padding: 14px 8px; text-align: center; cursor: pointer; background: #fafbfd; display: flex; flex-direction: column; align-items: center; gap: 3px; transition: background .15s, border-color .15s; }
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); border-style: solid; }
.dropzone .dz-ic { font-size: 22px; } .dropzone small { color: var(--muted); font-size: 11px; }
.doc-list { list-style: none; margin: 6px 0 0; padding: 0; }
.doc-list li { display: flex; align-items: center; gap: 6px; padding: 3px 2px; border-bottom: 1px solid var(--line2); font-size: 12px; }
.doc-list li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); text-decoration: none; }
.doc-list li a:hover { text-decoration: underline; }
.doc-list li small { color: var(--muted); font-size: 10px; white-space: nowrap; }
@media (max-width: 720px) { .doc-grid { grid-template-columns: 1fr; } }

/* planning: name column, split shifts side by side, weekend hover, clickable totals */
.grid .emp.nm { min-width: 150px; max-width: 180px; vertical-align: middle; }
/* week view: the 7 days share the width evenly and always fit on screen */
table.grid.week { table-layout: fixed; }
table.grid.week th.emp { width: 160px; } table.grid.week th.tot { width: 128px; }
.grid .tot-btn { width: 100%; justify-content: space-between; box-sizing: border-box; }
.grid .tot-btn .tot-val { margin-left: auto; }
.grid td.tot { text-align: right; }
.grid.month th.tot, .grid.day th.tot { min-width: 96px; }
table.grid.week .cell { min-width: 0; overflow: hidden; }
table.grid.week .chip { overflow: hidden; }
table.grid.week .chip .tm { overflow: hidden; text-overflow: ellipsis; }
.grid .emp.nm .emp-cell b { max-width: 145px; }
.cell .shifts { display: flex; gap: 2px; align-items: stretch; }
.cell .shifts .chip { flex: 1 1 0; min-width: 0; }
/* split shift: each block on a single line, the tick right after the hours */
.cell .shifts.multi .chip { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 2px; padding: 1px 3px; }
.cell .shifts.multi .chip .tm { white-space: nowrap; font-size: 10px; line-height: 1.3; min-width: 0; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.2px; }
.cell .shifts.multi .chip .st { flex: none; font-size: 10px; }
.cell .shifts.multi .chip .ps { display: none; }
/* the space for the labour-law badge is kept once for the whole day, not for each block */
.cell .shifts .chip { margin-right: 0; }
.cell:has(.law) .shifts { margin-right: 18px; }
.cell .shifts.multi { gap: 2px; }
.cell .shifts.multi .chip { padding: 1px 2px; border-left-width: 2px; }
.cell .shifts.m { gap: 1px; } .cell .shifts.m .mchip { flex: 1 1 0; min-width: 0; margin: 0; }
.cell.m { min-width: 30px; }
.timeline.we { background-color: var(--we); }
.cell:hover, .timeline:hover { background-color: #eaf0fd; }
.cell.we:hover, .timeline.we:hover { background-color: #dfe7fb; box-shadow: inset 0 0 0 1px #b9c8ef; }
.grid th.we { color: #5b6ea8; }
.grid td.tot[data-act] { cursor: pointer; }
.grid td.tot[data-act]:hover { background: var(--accent-soft); }
.grid td.tot[data-act]:hover b { text-decoration: underline; }
/* totals: red = hours still to approve, green = all approved */
.grid td.tot { vertical-align: middle; padding: 3px 5px; }
.tot-btn { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; white-space: nowrap;
  padding: 3px 6px 3px 7px; border-radius: 8px; border: 1px solid #d5dbe8; background: #fff;
  box-shadow: 0 1px 2px rgba(20, 30, 60, .08); transition: transform .12s, box-shadow .12s, border-color .12s, background .12s; }
.tot-btn .tot-val { display: flex; align-items: baseline; gap: 3px; line-height: 1.2; }
.tot-btn .tot-val small { display: inline; margin: 0; font-size: 10px; }
.tot-btn .tot-go { font-size: 16px; font-weight: 700; color: var(--accent); line-height: 1; transition: transform .12s; }
.tot-btn:hover, .tot-btn:focus-visible { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(20, 30, 60, .16); border-color: var(--accent); outline: none; }
.tot-btn:hover .tot-go, .tot-btn:focus-visible .tot-go { transform: translateX(2px); }
.tot-btn:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(20, 30, 60, .12); }
.tot-btn.ap-open { background: #fde8e8; border-color: #efb3b3; }
.tot-btn.ap-open:hover { background: #fbd9d9; border-color: var(--bad); } .tot-btn.ap-open .tot-go { color: var(--bad); }
.tot-btn.ap-ok { background: #e3f4ea; border-color: #b4dec4; }
.tot-btn.ap-ok:hover { background: #d3eddd; border-color: var(--ok); } .tot-btn.ap-ok .tot-go { color: var(--ok); }
.tot-ic { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; font-size: 10px; font-weight: 800; color: #fff; flex: none; }
.tot-ic.open { background: var(--bad); } .tot-ic.ok { background: var(--ok); }
.grid.month .tot-btn { padding: 2px 4px 2px 5px; gap: 3px; }
.ap-btn { border-color: #b9e2c8; color: var(--ok); }
.ap-btn:hover { background: var(--ok-soft); }
.lock-note { background: var(--line2); border-radius: 8px; padding: 6px 10px; font-size: 12px; color: #3c4456; margin: 0 0 6px; }
.list.hvo td { vertical-align: middle; } .list.hvo tr.hvo-row { cursor: pointer; } .list.hvo tr.hvo-row:hover td { background: var(--accent-soft); }
.month-pick { width: 150px; }
.kpi.vac { border-color: #f1d9a6; background: #fff8e8; }
.kpi b .muted { font-size: 15px; font-weight: 600; }
.p-days tr.we td { background: #f5f6f9; }
.modal.xl { max-width: 1060px; }
.modal.xl .grid-wrap.short { max-height: 55vh; }
.kpis.hv { margin-top: 4px; } .kpi.ok { border-color: #b9e2c8; background: var(--ok-soft); }
.hvt tr.future td { color: var(--muted); }
.hvt input[type=number] { width: 58px !important; }

/* ---------------------------------------------------------------- friendlier planning */
#main:has(.grid) .toolbar, #main:has(.dash) .toolbar, #main:has(.emps) .toolbar, #main:has(.positions) .toolbar, #main .toolbar.sec-tb { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; box-shadow: 0 1px 3px rgba(20, 30, 60, .05); }
.grid-wrap:has(.grid) { border-radius: 12px; box-shadow: 0 2px 10px rgba(20, 30, 60, .06); border-color: #e6e9f1; }
.grid th { background: #fbfcfe; border-bottom: 1px solid #e6e9f1; }
.grid th.day-h { text-align: center; padding: 5px 2px 6px; }
.grid th.day-h .dname { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.grid th.day-h .dnum { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-top: 1px; border-radius: 12px; font-size: 14px; font-weight: 700; color: var(--ink); padding: 0 4px; }
.grid th.day-h.we .dname, .grid th.day-h.we .dnum { color: #5b6ea8; }
.grid th.day-h.past .dnum { color: #9aa1b2; }
.grid th.day-h.today { box-shadow: none; }
.grid th.day-h.today .dname { color: var(--accent); }
.grid th.day-h.today .dnum { background: var(--accent); color: #fff; box-shadow: 0 2px 6px rgba(47, 111, 237, .35); }
.grid.month th.day-h .dnum { min-width: 20px; height: 20px; font-size: 12px; }
.grid td { border-bottom-color: #eef1f6; }
.cell { border-left-color: #eef1f6; }
.cell.today, .timeline.today { background-color: #f4f7ff; }
.grid tbody tr:not(.dept-row):hover > td.emp { background: #f7f9ff; }
.grid .emp-cell b { font-weight: 600; }
.grid .avatar.xs { width: 24px; height: 24px; font-size: 9px; box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(20, 30, 60, .2); }
/* department rows */
.grid .dept-row td { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 14%, #fff), #fff 60%); border-left: 4px solid var(--c); padding: 5px 10px; font-size: 12px; letter-spacing: .02em; }
.grid .dept-row .dname-row { font-weight: 700; color: color-mix(in srgb, var(--c) 70%, #1d2433); text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.grid .dept-row .cnt { display: inline-block; margin-left: 8px; min-width: 18px; padding: 0 6px; border-radius: 9px; font-size: 10px; font-weight: 700; text-align: center; color: #fff; background: var(--c); }
.grid .dept-row:hover td { filter: brightness(.98); }
/* shift blocks */
.grid .chip { border-radius: 6px; border-left-width: 3px; box-shadow: 0 1px 1px rgba(20, 30, 60, .06); transition: transform .1s, box-shadow .1s; }
.grid .chip:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(20, 30, 60, .14); }
.grid .chip .tm { font-variant-numeric: tabular-nums; }
.grid .chip.abs { border-radius: 6px; }
/* shifts of a day (split shift opened from the month view) */
.ds-list { display: flex; flex-direction: column; gap: 6px; }
.ds-card { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; column-gap: 10px; row-gap: 2px; width: 100%; text-align: left; cursor: pointer;
  padding: 8px 10px; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 8px; background: color-mix(in srgb, var(--c) 8%, #fff); transition: transform .1s, box-shadow .1s; }
.ds-card:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(20, 30, 60, .12); border-color: var(--c); }
.ds-card .ds-time { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.ds-card .ds-pos { color: #3c4456; font-size: 12px; }
.ds-card small { grid-column: 1 / 3; font-size: 11px; }
.ds-card .ds-note { grid-column: 1 / 3; font-size: 11px; color: var(--muted); font-style: italic; }
.ds-card .ds-go { grid-row: 1; grid-column: 4; font-size: 18px; color: var(--accent); }

/* labour-law information box in the shift window */
.law-box { border-radius: 10px; padding: 8px 12px; margin: 0 0 8px; font-size: 12px; color: #1d2433; }
.law-box.bad { background: #fdeaea; border: 1px solid #efb3b3; border-left: 4px solid var(--bad); }
.law-box.warn { background: #fdf3e1; border: 1px solid #f0d49b; border-left: 4px solid #d68a1c; }
.law-box-h { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.law-box ul { margin: 4px 0 0; padding-left: 18px; } .law-box li { margin: 2px 0; }
.law-box li.bad::marker { color: var(--bad); } .law-box li.warn::marker { color: #d68a1c; }
.timeline .law { top: 2px; right: 4px; }

/* ---- identical frame in the day, week and month views: same header height, same name and total columns, same texts ---- */
table.grid.week, table.grid.month, table.grid.day { table-layout: fixed; }
table.grid thead th.emp { width: 160px !important; }
table.grid thead th.tot { width: 132px !important; min-width: 0 !important; }
table.grid thead th.emp, table.grid thead th.tot { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; vertical-align: middle; padding: 0 8px; }
table.grid thead th.tot { text-align: center; }
table.grid.week thead tr, table.grid.day thead tr { height: 50px; }
table.grid.week thead th, table.grid.day thead th { height: 50px; box-sizing: border-box; }
table.grid.month thead tr.wk-row { height: 18px; } table.grid.month thead tr.d-row { height: 32px; }
table.grid.month thead tr.wk-row th { height: 18px; padding-top: 0; padding-bottom: 0; line-height: 18px; box-sizing: border-box; }
table.grid.month thead tr.d-row th { height: 32px; box-sizing: border-box; }
table.grid.month thead tr.wk-row th.wk-h { border-bottom: 0; box-shadow: inset 0 -1px 0 #e6e9f1; }
table.grid.month thead tr.wk-row th.emp, table.grid.month thead tr.wk-row th.tot { height: 50px; background: #fbfcfe; text-transform: none; letter-spacing: 0; font-size: 11px; font-weight: 600; color: var(--muted); }
table.grid.month thead tr.d-row th { top: 18px; }
table.grid.month thead th.day-h { padding: 1px 0; } table.grid.month thead th.day-h .dname { line-height: 1.1; } table.grid.month thead th.day-h .dnum { height: 18px; min-width: 18px; font-size: 12px; margin-top: 0; }
table.grid.day thead th.tl-head { padding: 0; vertical-align: bottom; } table.grid.day .tl-head .tl-hours span { padding: 0 0 6px 3px; font-size: 10px; color: var(--muted); }
table.grid.day .timeline { min-width: 0; }
table.grid.day .tl-head { min-width: 0 !important; }

/* clickable day headers (open the daily view) */
.grid th.day-h[data-act] { cursor: pointer; }
.grid th.day-h[data-act]:hover .dnum { background: var(--accent-soft); color: var(--accent); }
.grid th.day-h.today[data-act]:hover .dnum { background: var(--accent); color: #fff; }
/* month view: week numbers and a visible gap between weeks */
.grid.month thead tr.wk-row th { height: 22px; padding: 2px 4px; text-align: center; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); background: #f1f4fa; }
.grid.month thead tr.wk-row th.wk-h { cursor: pointer; border-bottom: 1px solid #e6e9f1; }
.grid.month thead tr.wk-row th.wk-h:hover { color: var(--accent); background: var(--accent-soft); }
.grid.month thead tr:nth-child(2) th { top: 22px; }
.grid.month .wk { border-left: 6px solid #e9edf5 !important; }
/* fixed columns: the whole month always fits, every day has the same width */
table.grid.month { table-layout: fixed; }
table.grid.month th.emp { width: 150px; } table.grid.month th.tot { width: 132px; min-width: 0; }
.grid.month .cell.m { height: 30px; min-width: 0; overflow: hidden; padding: 2px 1px; }
.grid.month .mchip { padding: 2px 1px; border-radius: 4px; font-size: 10px; text-align: center; overflow: hidden; white-space: nowrap; }
.grid.month .mchip.day { font-weight: 600; font-variant-numeric: tabular-nums; border-left-width: 2px; letter-spacing: -.3px; }
.grid.month .mchip .split { display: block; font-size: 8px; font-weight: 500; opacity: .75; line-height: 1; }
.grid.month th.day-h { padding: 3px 0 4px; } .grid.month th.day-h .dname { font-size: 9px; letter-spacing: .02em; }

/* "+" on empty days */
.cell .add-hint { display: none; height: 100%; min-height: 22px; align-items: center; justify-content: center; color: var(--accent); font-size: 16px; font-weight: 300; border: 1px dashed #bfcdf3; border-radius: 6px; margin: 1px 0; }
.cell:hover .add-hint { display: flex; }

/* ---------------------------------------------------------------- modern drop-down lists */
.csel { position: relative; display: inline-flex; vertical-align: middle; min-width: 90px; }
.csel.full { display: flex; width: 100%; }
.csel-native { position: absolute !important; inset: 0; opacity: 0; pointer-events: none; width: 100% !important; height: 100% !important; }
.csel-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 30px; padding: 4px 8px 4px 11px; cursor: pointer;
  background: #fff; border: 1px solid #d7dce7; border-radius: 8px; font: inherit; font-size: 13px; color: var(--ink); text-align: left;
  box-shadow: 0 1px 2px rgba(20, 30, 60, .05); transition: border-color .12s, box-shadow .12s, background .12s; }
.csel-btn:hover { border-color: #b8c2d8; background: #fbfcff; }
.csel-btn:focus-visible, .csel.open .csel-btn { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 111, 237, .15); }
.csel-btn.placeholder .csel-txt { color: var(--muted); }
.csel-btn.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(196, 61, 61, .15); }
.csel-btn:disabled { background: var(--line2); color: var(--muted); cursor: default; box-shadow: none; }
.csel-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csel-chev { display: inline-flex; color: var(--muted); transition: transform .15s; }
.csel-chev svg { width: 14px; height: 14px; }
.csel.open .csel-chev { transform: rotate(180deg); color: var(--accent); }
.csel-pop { position: fixed; z-index: 400; max-width: 360px; background: #fff; border: 1px solid #dfe4ee; border-radius: 12px; box-shadow: 0 12px 32px rgba(20, 30, 60, .18), 0 2px 6px rgba(20, 30, 60, .08);
  padding: 4px; animation: pop-in .12s ease-out; }
.csel-list { max-height: 300px; overflow-y: auto; }
.csel-search { padding: 4px 4px 6px; border-bottom: 1px solid var(--line2); margin-bottom: 4px; }
.csel-search input { width: 100%; border-radius: 7px; padding: 5px 8px; }
.csel-group { padding: 7px 10px 3px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.csel-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 7px; cursor: pointer; font-size: 13px; white-space: nowrap; }
.csel-group ~ .csel-opt { padding-left: 16px; }
.csel-opt.active { background: var(--accent-soft); color: var(--accent); }
.csel-opt.sel { font-weight: 600; }
.csel-opt.dis { opacity: .45; cursor: default; }
.csel-opt.hidden, .csel-group.hidden { display: none; }
.csel-check { color: var(--accent); font-weight: 700; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- date / month fields and calendar pop-up */
.cdate-wrap { position: relative; display: inline-flex; align-items: center; vertical-align: middle; }
.cdate-wrap.full { display: flex; width: 100%; }
.cdate-wrap.full input { width: 100%; }
input.cdate { padding-right: 30px; cursor: pointer; border-color: #d7dce7; border-radius: 8px; min-height: 30px; font-variant-numeric: tabular-nums; }
input.cdate:hover { border-color: #b8c2d8; }
.cdate-wrap.open input.cdate, input.cdate:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 111, 237, .15); outline: none; }
input.cdate::-webkit-calendar-picker-indicator { display: none; }
input.cdate::-webkit-inner-spin-button { display: none; }
.cdate-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 6px; }
.cdate-btn:hover, .cdate-wrap.open .cdate-btn { color: var(--accent); background: var(--accent-soft); }
.cdate-btn svg { width: 15px; height: 15px; }
input:disabled + .cdate-btn { display: none; }
.cal-pop { position: fixed; z-index: 400; width: 280px; min-width: 0 !important; background: #fff; border: 1px solid #dfe4ee; border-radius: 14px; padding: 10px;
  box-shadow: 0 14px 36px rgba(20, 30, 60, .2), 0 2px 6px rgba(20, 30, 60, .08); animation: pop-in .12s ease-out; user-select: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-title { font-weight: 700; font-size: 14px; text-transform: capitalize; }
.cal-nav { width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; font-size: 18px; color: var(--muted); cursor: pointer; }
.cal-nav:hover { background: var(--accent-soft); color: var(--accent); }
.cal-grid { display: grid; grid-template-columns: 26px repeat(7, 1fr); gap: 2px; }
.cal-wh { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; text-align: center; padding: 4px 0; }
.cal-wh.we { color: #5b6ea8; }
.cal-wk { font-size: 9px; color: #a3aabb; display: grid; place-items: center; }
.cal-d { height: 32px; border: 0; border-radius: 9px; background: none; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.cal-d:hover { background: var(--accent-soft); color: var(--accent); }
.cal-d.we { color: #5b6ea8; }
.cal-d.out { color: #c3c8d4; }
.cal-d.today { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); font-weight: 700; }
.cal-d.sel { background: var(--accent); color: #fff; font-weight: 700; box-shadow: 0 2px 6px rgba(47, 111, 237, .35); }
.cal-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line2); }
.cal-foot button { border: 0; background: none; color: var(--accent); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.cal-foot button:hover { background: var(--accent-soft); }
.cal-foot .cal-clear { color: var(--muted); }
.cal-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cal-m { height: 40px; border: 1px solid var(--line2); border-radius: 9px; background: #fff; font: inherit; font-size: 13px; cursor: pointer; text-transform: capitalize; }
.cal-m:hover { border-color: var(--accent); color: var(--accent); }
.cal-m.today { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.cal-m.sel { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
/* other fields in the same style */
input[type=time], input[type=number], input[type=text], input:not([type]), input[type=email], input[type=tel], input[type=password], textarea {
  border-color: #d7dce7; border-radius: 8px; min-height: 30px; }
input[type=time]:hover, input[type=number]:hover, input[type=text]:hover, input:not([type]):hover, textarea:hover { border-color: #b8c2d8; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 111, 237, .15); outline: none; }
input[type=time]::-webkit-calendar-picker-indicator { opacity: .45; cursor: pointer; }
input[type=time] { font-variant-numeric: tabular-nums; }
.date { width: 140px; } .month-pick { width: 150px; }

/* drag & drop */
.chip[draggable], .mchip[draggable], .bar[draggable] { cursor: grab; }
.dragging { opacity: .45; }
.drop-ok { background: var(--accent-soft) !important; box-shadow: inset 0 0 0 2px var(--accent); }

/* ---------------------------------------------------------------- print */
@media print {
  body { background: #fff; font-size: 10px; }
  #app, #modal-root, #toasts { display: none !important; }
  #print-root { display: block; }
  .page { page-break-after: always; break-after: page; }
  .page:last-child { page-break-after: auto; break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.p-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 3px solid var(--c); padding-bottom: 4px; margin-bottom: 8px; font-size: 14px; text-transform: none; }
.p-who { font-size: 12px; margin-bottom: 8px; }
.p-table { width: 100%; border-collapse: collapse; }
.p-table th, .p-table td { border: 1px solid #9aa1b2; padding: 3px 4px; vertical-align: top; text-align: left; }
.p-table th { background: #eef0f5; font-size: 9px; }
.p-table th.we, .p-table td.we { background: #f5f6f9; }
.p-s { border-left: 3px solid; padding-left: 3px; margin: 1px 0; font-weight: 600; }
.p-s small { display: block; font-weight: 400; font-size: 8px; }
.p-m { border-left: 2px solid; padding-left: 1px; font-size: 7px; line-height: 1.1; }
.p-month td, .p-month th { padding: 1px 2px; font-size: 7px; }
.p-name small { display: block; color: #6b7385; font-size: 8px; }
.p-abs { background: #eceef3; font-weight: 600; }
.p-s.p-ok, .p-m.p-ok, .p-d.p-ok, .p-key.p-ok { background: #d6f0df; }
.p-s.p-ko, .p-m.p-ko, .p-d.p-ko, .p-key.p-ko { background: #fbd8d8; }
.p-s, .p-m { border-radius: 2px; padding-right: 2px; }
.p-d { padding: 0 3px; border-radius: 2px; }
.p-key { padding: 0 4px; border-radius: 2px; }
.p-off { background: #f1f2f5; }
.p-tot { text-align: right; font-weight: 600; white-space: nowrap; }
.p-sheet td { height: 34px; vertical-align: middle; font-size: 10px; }
.p-sheet .p-day { width: 70px; font-weight: 600; } .p-sheet .p-plan { width: 34%; }
.p-sheet small { color: #6b7385; }
.p-note { font-size: 9px; color: #444; margin: 6px 0; }
.p-sign { display: flex; gap: 40px; margin-top: 28px; font-size: 10px; }
.p-sign div { flex: 1; } .p-sign span { display: block; border-bottom: 1px solid #333; height: 32px; }
.p-foot { margin-top: 6px; font-size: 8px; color: #6b7385; }
.p-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.p-days td { font-size: 9px; padding: 1px 4px; }
.p-sum { margin-bottom: 10px; } .p-sum td { font-size: 10px; }

/* ---------- Tableau de bord: same look as the planning ---------- */
.grid-wrap:has(.dash) { border-radius: 12px; box-shadow: 0 2px 10px rgba(20, 30, 60, .06); border-color: #e6e9f1; }
.list.dash th { background: #fbfcfe; border-bottom: 1px solid #e6e9f1; color: var(--muted); font-weight: 600; }
/* header: 20 px group row + 30 px column row = 50 px, like the planning */
.list.dash tr.grp th { height: 20px; padding: 0 6px; line-height: 20px; background: #fbfcfe; color: var(--muted); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid #eef1f6; }
.list.dash thead tr:nth-child(2) th { top: 20px; height: 30px; padding-top: 0; padding-bottom: 0; vertical-align: middle; font-size: 11px; }
.list.dash thead th.emp { width: 160px; min-width: 160px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; padding: 0 8px; }
.list.dash tr.grp th.emp { border-bottom-color: transparent; }
/* rows: 32 px, same lines and hover as the planning */
.list.dash td { height: 32px; padding-top: 2px; padding-bottom: 2px; border-bottom: 1px solid #eef1f6; vertical-align: middle; }
.list.dash .g1 { border-left: 1px solid #eef1f6; }
.list.dash tbody tr:not(.dept-row):not(.alerts-row):hover > td { background: #f7f9ff; }
/* department rows: gradient, uppercase name and count pill, like the planning */
.list.dash .dept-row td { height: auto; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 14%, #fff), #fff 60%); border-left: 4px solid var(--c);
  border-bottom: 1px solid #eef1f6; padding: 5px 10px; font-size: 12px; letter-spacing: .02em; }
.list.dash .dept-row .dname-row { font-weight: 700; color: color-mix(in srgb, var(--c) 70%, #1d2433); text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.list.dash .dept-row .cnt { display: inline-block; margin-left: 8px; min-width: 18px; padding: 0 6px; border-radius: 9px; font-size: 10px; font-weight: 700; text-align: center; color: #fff; background: var(--c); }
.list.dash .dept-row:hover td { filter: brightness(.98); }
.list.dash thead tr:nth-child(2) th { height: 29px; }
.list.dash th.emp, .list.dash td.emp { width: 160px; min-width: 160px; max-width: 160px; box-sizing: border-box; overflow: hidden; }

/* Tableau de bord, "Heures": 6 equal columns, light separator before the balances, soft tint on the contract balance */
.list.dash thead tr:nth-child(2) th:nth-child(n+2):nth-child(-n+7),
.list.dash tbody tr:not(.dept-row):not(.alerts-row) > td:nth-child(n+2):nth-child(-n+7) { width: 74px; min-width: 74px; padding-left: 6px; padding-right: 9px; }
.list.dash thead tr:nth-child(2) th:nth-child(6),
.list.dash tbody tr:not(.dept-row):not(.alerts-row) > td:nth-child(6) { border-left: 1px dashed #dfe4ee; }
.list.dash thead tr:nth-child(2) th:nth-child(7) { background: #f3f6fd; color: var(--ink); }
.list.dash tbody tr:not(.dept-row):not(.alerts-row) > td:nth-child(7) { background: #f8faff; }
.list.dash tbody tr:not(.dept-row):not(.alerts-row):hover > td:nth-child(7) { background: #eef3ff; }

/* Tableau de bord: bubble with the days taken (rest, public holidays, vacation) */
.list.dash td.dtip { cursor: help; }
.list.dash tbody tr:not(.dept-row) > td.dtip:hover { background: #eef3ff; }
#info-tip dt.foot, #info-tip dd.foot { color: #cfd8ea; font-weight: 400; }
#info-tip dd.foot { color: #fff; font-weight: 600; }
#info-tip dt.foot.first, #info-tip dd.foot.first { margin-top: 4px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .1); }

/* absences can be dragged like shifts */
.chip.abs[draggable], .mchip.abs[draggable], .abar[draggable] { cursor: grab; }
.chip.abs[draggable]:active, .mchip.abs[draggable]:active, .abar[draggable]:active { cursor: grabbing; }

/* ---------- Employees tab: Department > Employee > details, same look as the planning ---------- */
.grid-wrap:has(.emps) { border-radius: 12px; box-shadow: 0 2px 10px rgba(20, 30, 60, .06); border-color: #e6e9f1; }
.list.emps { width: 100%; }
.list.emps thead th { height: 50px; padding: 0 8px; background: #fbfcfe; border-bottom: 1px solid #e6e9f1; font-size: 11px; font-weight: 600; color: var(--muted); vertical-align: middle; }
.list.emps td { border-bottom: 1px solid #eef1f6; }
.list.emps .dept-row td { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 14%, #fff), #fff 60%); border-left: 4px solid var(--c);
  border-bottom: 1px solid #eef1f6; padding: 5px 10px; font-size: 12px; letter-spacing: .02em; }
.list.emps .dept-row .dname-row { font-weight: 700; color: color-mix(in srgb, var(--c) 70%, #1d2433); text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.list.emps .dept-row .cnt { display: inline-block; margin-left: 8px; min-width: 18px; padding: 0 6px; border-radius: 9px; font-size: 10px; font-weight: 700; text-align: center; color: #fff; background: var(--c); }
.list.emps .dept-row:hover td { filter: brightness(.98); }
/* employee row: 32 px like the planning */
.list.emps tr.emp-row td { height: 32px; padding: 2px 8px 2px 14px; cursor: pointer; vertical-align: middle; }
.list.emps tr.emp-row:hover td { background: #f7f9ff; }
.list.emps tr.emp-row.open td { background: #f3f6fd; border-bottom-color: transparent; }
.emp-line { display: flex; align-items: center; gap: 8px; }
.emp-line .caret { width: 12px; color: var(--muted); font-size: 11px; }
.emp-line b { font-weight: 600; }
.emp-line .tag { margin-left: 6px; padding: 1px 7px; border-radius: 9px; background: #eef0f4; color: var(--muted); font-size: 10.5px; font-weight: 600; }
.list.emps tr.inactive .emp-line b { color: var(--muted); }
/* details: all the fields, directly under the name */
.list.emps tr.emp-detail > td { padding: 4px 14px 16px 34px; background: #f3f6fd; border-bottom: 1px solid #e6e9f1; box-shadow: inset 4px 0 0 var(--c); }
.emp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.emp-sec { background: #fff; border: 1px solid #e6e9f1; border-radius: 10px; padding: 12px 14px; min-width: 0; box-shadow: 0 1px 3px rgba(20, 30, 60, .04); }
.emp-sec.wide { grid-column: 1 / -1; }
.emp-sec h3 { margin: 0 0 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.emp-sec h4 { margin: 14px 0 4px; font-size: 12px; }
.emp-sec .two { gap: 8px 12px; }
.emp-sec label { font-size: 11.5px; color: var(--muted); }
.emp-sec .list th { position: static; }
.emp-save { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.emp-save .grow { flex: 1; }
.modal .emp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .emp-grid, .modal .emp-grid { grid-template-columns: 1fr; } }
#main:has(.emps) .toolbar { min-height: 44px; box-sizing: border-box; }

/* planning + dashboard bar: the Day / Week / Month buttons stay in the centre, whatever the width of the label on the left */
#main:has(.grid) .toolbar, #main:has(.dash) .toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; }
#main:has(.grid) .toolbar > .group:last-child, #main:has(.dash) .toolbar > .group:last-child { justify-self: end; }
#main:has(.grid) .toolbar .range-label, #main:has(.dash) .toolbar .range-label { white-space: nowrap; }

/* ---------- Positions tab: same look as the planning ---------- */
#main:has(.positions) .toolbar { min-height: 44px; box-sizing: border-box; }
.toolbar .tb-note { max-width: 760px; }
.grid-wrap:has(.positions) { border-radius: 12px; box-shadow: 0 2px 10px rgba(20, 30, 60, .06); border-color: #e6e9f1; }
.list.positions thead th { height: 50px; padding: 0 8px; background: #fbfcfe; border-bottom: 1px solid #e6e9f1; font-size: 11px; font-weight: 600; color: var(--muted); vertical-align: middle; }
.list.positions td { border-bottom: 1px solid #eef1f6; }
.list.positions .dept-row td { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 14%, #fff), #fff 60%); border-left: 4px solid var(--c);
  border-bottom: 1px solid #eef1f6; padding: 5px 10px; font-size: 12px; letter-spacing: .02em; }
.list.positions .dept-row .dname-row { font-weight: 700; color: color-mix(in srgb, var(--c) 70%, #1d2433); text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.list.positions .dept-row .cnt { display: inline-block; margin-left: 8px; min-width: 18px; padding: 0 6px; border-radius: 9px; font-size: 10px; font-weight: 700; text-align: center; color: #fff; background: var(--c); }
.list.positions .dept-row:hover td { filter: brightness(.98); }
.list.positions tr.pos-row td { height: 36px; padding: 3px 8px; vertical-align: middle; }
.list.positions tr.pos-row:hover td { background: #f7f9ff; }
.list.positions tr.pos-row input:not([type=hidden]), .list.positions tr.pos-row select { height: 28px; }
.list.positions tr.pos-new td { background: #fbfcfe; border-top: 1px solid #e6e9f1; }
.list.positions .c-col { width: 56px; text-align: center; padding-left: 12px; }
.list.positions td.right { text-align: right; }
/* colour button and palette */
.swatch-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid #dfe4ee; background: #fff; padding: 3px; cursor: pointer; display: inline-grid; place-items: center; }
.swatch-btn span { width: 100%; height: 100%; border-radius: 5px; background: var(--sw); }
.swatch-btn:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.swatch-btn[disabled] { cursor: default; box-shadow: none; }
#color-pop { position: fixed; z-index: 400; background: #fff; border: 1px solid #e6e9f1; border-radius: 12px; padding: 10px; box-shadow: 0 12px 32px rgba(20, 30, 60, .18); animation: pop-in .12s ease-out; }
#color-pop .cp-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 2px 8px; }
#color-pop .cp-grid { display: grid; grid-template-columns: repeat(3, 26px); grid-auto-flow: row; gap: 6px; }
#color-pop .cp-grid { grid-template-columns: repeat(7, 26px); grid-template-rows: repeat(3, 26px); grid-auto-flow: column; }
.cp-sw { width: 26px; height: 26px; border-radius: 7px; border: 0; background: var(--sw); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); transition: transform .08s; }
.cp-sw:hover { transform: scale(1.12); }
.cp-sw.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.list.positions { width: 100%; }
#main:has(.positions) .toolbar .group { flex-wrap: nowrap; min-width: 0; }
.toolbar .tb-note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ---------- personal data sheet (Personalstammblatt) on screen ---------- */
.emp-sec.ps .ps-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.emp-sec.ps .ps-top h3 { margin: 0; }
.ps-bar { margin: 14px 0 6px; padding: 6px 10px; border-radius: 7px; background: #eef2fb; color: var(--ink); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.ps-bar b { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 10.5px; }
.ps-sub { margin: 10px 2px 4px; font-size: 11.5px; font-weight: 700; color: var(--ink); }
.ps-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.ps-f { display: grid; grid-template-columns: minmax(150px, 40%) 1fr; align-items: center; gap: 8px; min-width: 0; }
.ps-f.wide { grid-column: 1 / -1; grid-template-columns: minmax(150px, calc(20% - 4px)) 1fr; }
.ps-l { font-size: 11.5px; color: var(--muted); line-height: 1.25; }
.ps-f input, .ps-f select, .ps-f textarea { width: 100%; min-width: 0; }
.ps-static { font-weight: 600; padding: 4px 0; }
.ps-yn { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.ps-yn .check { color: var(--ink); font-size: 12px; }
.ps-since { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.ps-since input { width: auto; }
.ps-kids { width: 100%; margin-top: 8px; border-collapse: collapse; }
.ps-kids th { font-size: 11px; color: var(--muted); font-weight: 600; text-align: left; padding: 2px 6px; position: static; background: none; border: 0; }
.ps-kids td { padding: 3px 6px; border: 0; }
.ps-kids td.n { width: 20px; color: var(--muted); font-weight: 700; }
.ps-kids input { width: 100%; }
@media (max-width: 900px) { .ps-grid { grid-template-columns: 1fr; } .ps-f.wide { grid-template-columns: minmax(150px, 40%) 1fr; } }

/* ---------- personal data sheet: printout (same layout as the paper form) ---------- */
.ps-page { font-family: Arial, Helvetica, sans-serif; font-size: 9.5px; color: #222; }
.ps-phead { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #b0223a; padding-bottom: 6px; margin-bottom: 8px; }
.ps-phead h1 { margin: 0; font-size: 20px; }
.ps-psubt { color: #555; font-size: 11px; }
.ps-pwho { text-align: right; font-size: 11px; }
.ps-pbar { background: #6b2f33; color: #fff; padding: 4px 8px; border-radius: 3px; margin: 9px 0 4px; font-size: 10px; letter-spacing: .02em; }
.ps-pbar b { margin-right: 4px; }
.ps-psub { margin: 6px 0 3px; font-size: 10px; } .ps-psub i { color: #777; }
.ps-t { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ps-t td { border: 1px solid #ddd; padding: 3px 5px; vertical-align: top; }
.ps-t td.pk { background: #faf8f8; width: 21%; }
.ps-t td.pv { background: #fff; width: 29%; font-size: 10px; }
.ps-t.kids td.pk.n { width: 4%; text-align: center; font-weight: 700; }
.pl-de { display: block; font-size: 9.5px; } .pl-x { display: block; font-size: 7.5px; color: #888; font-style: italic; }
.pbox { display: inline-block; width: 8px; height: 8px; border: 1px solid #777; vertical-align: -1px; }
.pbox.on { background: #222; }
.psince { margin-top: 3px; font-size: 8px; color: #666; }
.ps-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.ps-sbox { height: 46px; border: 1px solid #ddd; border-radius: 4px; }
.ps-sbox.line { background: linear-gradient(#fff calc(100% - 12px), #444 calc(100% - 12px), #444 calc(100% - 11px), #fff calc(100% - 11px)); }
.ps-pfoot { margin-top: 10px; border-top: 1px solid #ddd; padding-top: 4px; color: #888; font-size: 8px; }
.list.positions { max-width: none; border: 0; border-radius: 0; background: transparent; }

/* positions window (opened from the planning bar) */
.modal.pos-modal { width: min(1280px, calc(100vw - 32px)); max-width: none; }
.modal.pos-modal .pos-tb { margin: 0 0 10px; padding: 0; background: none; border: 0; box-shadow: none; min-height: 0; }
.modal.pos-modal .pos-tb .range-label { display: none; }
.modal.pos-modal .grid-wrap { max-height: calc(100vh - 220px); border-radius: 12px; box-shadow: 0 2px 10px rgba(20, 30, 60, .06); border-color: #e6e9f1; }
/* planning bar: buttons on the right on one line (department filter a little narrower) */
#main:has(.grid) .toolbar > .group:last-child, #main:has(.dash) .toolbar > .group:last-child { flex-wrap: nowrap; }
#main:has(.grid) .toolbar > .group:last-child .csel { max-width: 150px; }
@media (max-width: 1320px) {
  #main:has(.grid) .toolbar, #main:has(.dash) .toolbar { display: flex; flex-wrap: wrap; }
  #main:has(.grid) .toolbar > .group:last-child, #main:has(.dash) .toolbar > .group:last-child { flex-wrap: wrap; }
}
/* employee details: Save bar always visible at the bottom while scrolling */
.emp-save { position: sticky; bottom: 0; z-index: 3; margin: 12px -14px -16px -34px; padding: 10px 14px; background: rgba(243, 246, 253, .96); border-top: 1px solid #e6e9f1; backdrop-filter: blur(2px); }
.modal .emp-save { margin: 12px 0 0; background: #fff; }

/* ---------- Reports and Administration: same design as the other tabs ---------- */
#main .toolbar.sec-tb { min-height: 44px; box-sizing: border-box; }
#main .toolbar.sec-tb .group { flex-wrap: nowrap; min-width: 0; }
.rep-cards { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.card.rep-card { margin: 0; border-radius: 12px; border-color: #e6e9f1; box-shadow: 0 2px 10px rgba(20, 30, 60, .06); padding: 14px 16px; gap: 8px; }
.rep-card .rc-head { display: flex; align-items: center; gap: 10px; }
.rep-card .rc-ic { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #eef2fb; font-size: 16px; flex: none; }
.rep-card h3 { margin: 0; font-size: 13.5px; }
.rep-card > p { margin: 0; line-height: 1.45; }
.rep-card .rc-fields { display: flex; flex-direction: column; gap: 8px; }
.rep-card label, .adm-sec label { font-size: 11.5px; color: var(--muted); }
.rc-foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: flex-end; }
.adm-grid { margin-top: 0; }
.adm-sec .as-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.adm-sec .as-head h3 { margin: 0; }
.adm-sec .stack { display: flex; flex-direction: column; gap: 8px; }
.adm-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.list.adm-table { width: 100%; border: 0; background: transparent; }
.list.adm-table thead th { position: static; background: #fbfcfe; border-bottom: 1px solid #e6e9f1; font-size: 11px; font-weight: 600; color: var(--muted); height: 34px; padding: 0 8px; }
.list.adm-table td { border-bottom: 1px solid #eef1f6; padding: 4px 8px; height: 34px; vertical-align: middle; }
.list.adm-table tbody tr:hover td { background: #f7f9ff; }
.list.adm-table tr.adm-new td { background: #fbfcfe; }
.list.adm-table .c-col { width: 56px; text-align: center; }
.list.adm-table td.right { text-align: right; }
.list.adm-table input:not([type=hidden]) { height: 28px; }
.adm-sec .grid-wrap.short { box-shadow: none; border-radius: 8px; }
.rep-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .rep-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .rep-cards { grid-template-columns: 1fr; } }
.list.adm-table input[name=sort] { width: 80px; }
.list.adm-table td:nth-child(3):has(input[name=sort]) { width: 110px; }

/* automatic saving: status text and small confirmation */
.as-status { font-size: 11.5px; color: #2f8a57; font-weight: 600; }
#autosave-pill { position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 12px); z-index: 500; padding: 6px 14px; border-radius: 999px; background: #1d2433; color: #fff;
  font-size: 12px; font-weight: 600; box-shadow: 0 6px 18px rgba(20, 30, 60, .25); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
#autosave-pill.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- employee sheet: summary, section tabs, grouped fields ---------- */
.emp-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 10px 0 12px; padding: 14px 16px; background: #fff; border: 1px solid #e6e9f1;
  border-radius: 12px; box-shadow: 0 1px 3px rgba(20, 30, 60, .04); border-left: 4px solid var(--c); }
.emp-head .eh-av { width: 44px; height: 44px; border-radius: 50%; font-size: 15px; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.emp-head .eh-main { min-width: 180px; }
.emp-head .eh-name { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.emp-head .eh-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.emp-head .eh-dept { color: color-mix(in srgb, var(--c) 70%, #1d2433); font-weight: 600; }
.emp-head .eh-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.eh-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: #f3f6fd; border: 1px solid #e3e8f4; font-size: 12px; color: var(--ink); white-space: nowrap; }
.eh-chip i { font-style: normal; font-size: 12px; }
.emp-tabs { display: flex; gap: 2px; border-bottom: 1px solid #e3e8f4; margin-bottom: 12px; overflow-x: auto; }
.emp-tab { appearance: none; border: 0; background: none; padding: 9px 14px 10px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border-radius: 8px 8px 0 0; }
.emp-tab:hover { color: var(--ink); background: #eef2fb; }
.emp-tab.on { color: var(--accent); border-bottom-color: var(--accent); background: #fff; }
.et-n { min-width: 18px; padding: 0 6px; border-radius: 9px; background: #e3e8f2; color: #4a5875; font-size: 10.5px; font-weight: 700; text-align: center; }
.emp-tab.on .et-n { background: var(--accent); color: #fff; }
.emp-pane { display: none; }
.emp-pane.on { display: block; }
.emp-general > .emp-sec { margin-top: 0; }
.ec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ec-grp { border: 1px solid #edf0f6; border-radius: 10px; padding: 10px 12px 12px; background: #fcfdff; min-width: 0; }
.ec-grp.wide { grid-column: 1 / -1; }
.ec-grp h4 { margin: 0 0 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ec-grp .hint { margin-top: 8px; }
.ec-grp p.small { margin: 6px 0 0; }
.ec-active { margin-top: 8px; color: var(--ink) !important; font-size: 12.5px !important; }
.ec-calc { margin-top: 8px; padding: 7px 10px; border-radius: 8px; background: #eef6f0; color: #245c3a; font-size: 12.5px; }
.emp-pane .add-unav { margin-top: 0; }
.emp-pane > .ec-grp { margin-top: 12px; }
/* personal data sheet: foldable sections with a counter */
.ps-grp { margin-top: 8px; border: 1px solid #edf0f6; border-radius: 10px; background: #fcfdff; }
.ps-grp > summary { list-style: none; cursor: pointer; margin: 0; border-radius: 9px; display: flex; align-items: center; gap: 4px; user-select: none; }
.ps-grp > summary::-webkit-details-marker { display: none; }
.ps-grp[open] > summary { border-radius: 9px 9px 0 0; }
.ps-grp > summary:hover { filter: brightness(.98); }
.ps-cnt { margin-left: auto; padding: 1px 8px; border-radius: 9px; background: #fff; color: var(--muted); font-size: 10.5px; letter-spacing: 0; text-transform: none; }
.ps-cnt.part { color: #9a6b0c; background: #fdf3e1; } .ps-cnt.full { color: #2f8a57; background: #e6f4ea; }
.ps-chev { margin-left: 8px; transition: transform .15s; font-size: 11px; color: var(--muted); }
.ps-grp:not([open]) .ps-chev { transform: rotate(-90deg); }
.ps-body { padding: 4px 12px 12px; }
.ps-grp .ps-bar { margin: 0; }
@media (max-width: 900px) { .ec-grid { grid-template-columns: 1fr; } .emp-head .eh-chips { margin-left: 0; } }
.emp-tabs { overflow-y: hidden; scrollbar-width: none; padding-bottom: 1px; }
.emp-tabs::-webkit-scrollbar { display: none; }
/* positions: minimum legal break */
.list.positions td.brk-cell { white-space: nowrap; }
.list.positions .brk-min { display: block; margin-top: 1px; font-size: 10px; color: var(--muted); line-height: 1.1; }
.list.positions input.below-min { border-color: var(--bad); background: var(--bad-soft); }
.list.positions tr.pos-row td { height: 40px; }

/* user accounts: grouped by role, order by drag & drop */
.users-table .u-handle { width: 26px; text-align: center; color: #a3adc2; cursor: grab; font-size: 14px; padding: 0 4px; }
.users-table tr.user-row.dragging td { opacity: .45; background: #eef3ff; }
.users-table .dept-row td { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 12%, #fff), #fff 60%); border-left: 4px solid var(--c); padding: 5px 10px; font-size: 12px; height: auto; }
.users-table .dept-row .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 7px; }
.users-table .dept-row .dname-row { font-weight: 700; color: color-mix(in srgb, var(--c) 75%, #1d2433); text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.users-table .dept-row .cnt { display: inline-block; margin-left: 8px; min-width: 18px; padding: 0 6px; border-radius: 9px; font-size: 10px; font-weight: 700; text-align: center; color: #fff; background: var(--c); }
.users-table td.right .btn.icon { width: 26px; padding: 0; }
/* planning bar: undo / redo */
.undo-btns { display: inline-flex; gap: 2px; margin-left: 6px; padding-left: 8px; border-left: 1px solid #e3e8f2; }
.undo-btns .btn.icon { font-size: 15px; font-weight: 700; }
.undo-btns .btn.icon:disabled { opacity: .35; cursor: default; }
#main:has(.grid) .toolbar, #main:has(.dash) .toolbar { min-height: 44px; box-sizing: border-box; }


/* one avatar size everywhere (planning, dashboard, employees): 24 px, like the planning */
td.emp .avatar.xs, .emp-line .avatar.xs, .grid .avatar.xs, .list.dash .avatar.xs {
  width: 24px; height: 24px; font-size: 9px; flex: none; box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(20, 30, 60, .2); }

/* unavailability in the planning: one fixed line, nothing moves when the cell is hovered */
.grid .unav { display: flex; align-items: center; gap: 4px; height: 20px; box-sizing: border-box; margin: 1px 0; padding: 0 6px; overflow: hidden;
  border-radius: 6px; border-left: 3px solid var(--bad); font-size: 10.5px; font-weight: 600; color: #a33a3a; white-space: nowrap;
  background: repeating-linear-gradient(135deg, #fdeeee 0 6px, #fbe4e4 6px 12px); }
.grid .unav i { font-style: normal; font-size: 11px; opacity: .8; }
.grid .unav span { overflow: hidden; text-overflow: ellipsis; }
.grid td.cell { position: relative; }
/* the "+" of a cell that already shows an unavailability: small, overlaid on the right, takes no room */
.grid .cell:has(.unav) .add-hint { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 20px; height: 20px; min-height: 0; margin: 0;
  background: #fff; font-size: 14px; box-shadow: 0 1px 3px rgba(20, 30, 60, .12); }
.grid .cell:has(.unav):hover .unav { margin-right: 26px; }
.grid .unav { transition: margin-right .12s; }
.legend .unav-sw { background: repeating-linear-gradient(135deg, #fdeeee 0 3px, #fbe4e4 3px 6px); border: 0; border-left: 3px solid var(--bad); }

/* the small "+" next to the content of a cell (shifts or unavailability); empty cells keep the big "+" in the middle */
.grid .cell:has(.shifts) .add-hint, .grid .cell:has(.unav) .add-hint {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 20px; height: 20px; min-height: 0; margin: 0;
  background: #fff; font-size: 14px; box-shadow: 0 1px 3px rgba(20, 30, 60, .12); z-index: 2; }
.grid .cell:has(.shifts):hover .shifts { margin-right: 26px; }
.grid .cell .shifts { transition: margin-right .12s; }
/* with a labour-law badge (top right), the "+" goes just to its left */
.grid .cell:has(.law):has(.shifts) .add-hint, .grid .cell:has(.law):has(.unav) .add-hint { right: 24px; }
.grid .cell:has(.law):has(.shifts):hover .shifts { margin-right: 46px; }
.grid .cell:has(.law):has(.unav):hover .unav { margin-right: 46px; }

/* last backup */
.bk-info { padding: 8px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; margin: 2px 0 6px; }
.bk-info small { font-weight: 400; margin-top: 2px; }
.bk-info.ok { background: #eef6f0; color: #245c3a; }
.bk-info.old, .bk-info.none { background: #fdf3e1; color: #8a5a07; }

/* public holidays (canton of Bern): amber column, name under the date */
.grid th.day-h.hol .dname { color: #b4590a; }
.grid th.day-h.hol .dnum { box-shadow: inset 0 0 0 2px #f0b25a; color: #8a4507; }
.grid th.day-h.today.hol .dnum { box-shadow: 0 2px 6px rgba(47, 111, 237, .35), 0 0 0 2px #f0b25a; color: #fff; }
.grid th.day-h .hol-tag { display: block; max-width: 100%; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; font-weight: 700; color: #b4590a; line-height: 1; }
.grid thead tr:not(.wk-row) th.day-h.hol:has(.hol-tag) { padding-top: 2px; padding-bottom: 2px; }
.grid th.day-h.hol:has(.hol-tag) .dnum { height: 20px; min-width: 20px; font-size: 12.5px; }
.grid td.cell.hol, .grid td.timeline.hol { background-color: #fff7ea; }
.grid td.cell.hol.we { background-color: #fdf2e2; }
.hol-pill { display: inline-flex; align-items: center; margin-left: 4px; padding: 2px 9px; border-radius: 999px; background: #fff1dc; color: #8a4507; border: 1px solid #f3cf9a; font-size: 11.5px; font-weight: 700; }
.legend .hol-sw { background: #fff1dc; border: 1px solid #f0b25a; }
/* numbered steps in a bubble */
#info-tip ol.tip-steps { margin: 6px 0 0; padding-left: 18px; }
#info-tip ol.tip-steps li { margin: 3px 0; }
#info-tip .calc { margin-top: 8px; }
.rep-card .rc-head .info { margin-left: 2px; }
/* public holidays: no circle around the date, only the amber colour (today keeps its blue circle) */
.grid th.day-h.hol .dnum { box-shadow: none; color: #b4590a; }
.grid th.day-h.today.hol .dnum { box-shadow: 0 2px 6px rgba(47, 111, 237, .35); color: #fff; }

/* ---------- hours approval window ---------- */
.modal.hv-modal { width: min(1180px, calc(100vw - 32px)); max-width: none; }
.hv-head { align-items: flex-start; }
.hv-who { display: flex; align-items: center; gap: 12px; }
.hv-who .eh-av { width: 40px; height: 40px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.hv-who h2 { margin: 0; } .hv-who .sub { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.hv-prog { display: flex; align-items: center; gap: 10px; margin: 12px 0 10px; font-size: 12.5px; color: var(--muted); }
.hv-bar { flex: 1; max-width: 360px; height: 8px; border-radius: 99px; background: #eef1f6; overflow: hidden; }
.hv-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #4caf50, #2f8a57); transition: width .3s; }
.hv-todo { padding: 2px 10px; border-radius: 99px; background: #fdecec; color: var(--bad); font-weight: 700; }
.hv-done { padding: 2px 10px; border-radius: 99px; background: #e6f4ea; color: #2f8a57; font-weight: 700; }
.hv-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.hv-k { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid #e6e9f1; background: #fbfcfe; }
.hv-k small { display: block; color: var(--muted); font-size: 11.5px; }
.hv-k b { font-size: 18px; } .hv-k em { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.hv-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #eef1f6; color: #6b7385; flex: none; }
.hv-k.ok { background: #f1f9f3; border-color: #cfe9d7; } .hv-k.ok .hv-ic { background: #2f8a57; color: #fff; }
.hv-k.todo { background: #fff6f0; border-color: #f5d2c2; } .hv-k.todo .hv-ic { background: var(--bad); color: #fff; }
.hv-k.ko { background: #fdf1f1; border-color: #f1c9c9; } .hv-k.ko .hv-ic { background: #8f222b; color: #fff; }
.hv-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.hv-wrap { max-height: 52vh; border-radius: 12px; border-color: #e6e9f1; }
table.hv2 { width: 100%; border-collapse: separate; border-spacing: 0; }
table.hv2 td { padding: 7px 10px; border-bottom: 1px solid #eef1f6; vertical-align: middle; }
table.hv2 tr.hv-row > td:first-child { border-left: 4px solid transparent; }
table.hv2 tr.hv-row.ok > td:first-child { border-left-color: #4caf50; } table.hv2 tr.hv-row.ok { background: #f8fcf9; }
table.hv2 tr.hv-row.todo > td:first-child { border-left-color: #e8743b; } table.hv2 tr.hv-row.todo { background: #fffaf6; }
table.hv2 tr.hv-row.ko > td:first-child { border-left-color: var(--bad); } table.hv2 tr.hv-row.ko { background: #fdf6f6; }
table.hv2 tr.hv-row.future, table.hv2 tr.hv-row.abs { background: #fbfcfe; }
table.hv2 tr.hv-row:hover { filter: brightness(.985); }
table.hv2 tr.hv-wk td { background: #f3f6fd; color: var(--muted); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 4px 12px; }
.hv-date { width: 78px; white-space: nowrap; }
.hv-date b { display: block; font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.hv-date span { font-size: 15px; font-weight: 700; color: var(--ink); }
.hv-date .hv-hol { display: block; font-style: normal; font-size: 10px; font-weight: 700; color: #b4590a; }
.hv-date.same { border-top-color: transparent; }
.hv-plan { min-width: 190px; } .hv-plan small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.hv-pos { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; }
.hv-pos i { width: 10px; height: 10px; border-radius: 3px; }
.hv-abs { display: inline-block; padding: 2px 9px; border-radius: 99px; background: repeating-linear-gradient(135deg, #eceef3 0 5px, #f6f7fa 5px 10px); border: 1px solid #dfe3ea; font-size: 11.5px; font-weight: 600; color: #4a5875; }
.hv-abs.sm { margin-top: 3px; font-size: 10.5px; padding: 0 7px; }
.hv-eff label { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.hv-times { display: flex; align-items: center; gap: 4px; }
.hv-times input[type=time] { width: 92px; } .hv-times input[type=number] { width: 54px; }
.hv-h { width: 76px; text-align: right; white-space: nowrap; }
.hv-h .h { display: block; font-size: 15px; }
.hv-h .d { display: inline-block; margin-top: 2px; padding: 0 6px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.hv-h .d.pos { background: #fdf3e1; color: #9a6b0c; } .hv-h .d.neg { background: #eef2fb; color: #3d5a9e; }
.hv-note input { width: 100%; min-width: 120px; }
.hv-later { font-style: italic; }
.pill.todo { background: #fdecec; color: var(--bad); }
.hv-acts { white-space: nowrap; text-align: right; }
.hv-acts .btn { margin-left: 4px; }
.hv-acts .btn.ok { background: #2f8a57; color: #fff; border-color: #2f8a57; } .hv-acts .btn.ok:hover { filter: brightness(1.08); }
.hv-acts .btn.ko { color: var(--bad); border-color: #efc1c1; background: #fff; }

/* Tableau de bord, "Heures": 5 columns now (Solde 30.11 removed); separator and tint on the contract balance (column 6) */
.list.dash thead tr:nth-child(2) th:nth-child(7),
.list.dash tbody tr:not(.dept-row):not(.alerts-row) > td:nth-child(7) { width: auto; min-width: 0; padding-left: 5px; padding-right: 6px; background: none; }
.list.dash thead tr:nth-child(2) th:nth-child(6),
.list.dash tbody tr:not(.dept-row):not(.alerts-row) > td:nth-child(6) { border-left: 1px dashed #dfe4ee; }
.list.dash thead tr:nth-child(2) th:nth-child(6) { background: #f3f6fd; color: var(--ink); }
.list.dash tbody tr:not(.dept-row):not(.alerts-row) > td:nth-child(6) { background: #f8faff; }
.list.dash tbody tr:not(.dept-row):not(.alerts-row):hover > td:nth-child(6) { background: #eef3ff; }
.list.dash tbody tr:not(.dept-row):not(.alerts-row):hover > td:nth-child(7) { background: #f7f9ff; }
.list.dash thead tr:nth-child(2) th:nth-child(7) { color: var(--muted); }

/* ---------- dashboard: easier to read ---------- */
.list.dash td .z { color: #c3c9d6; font-weight: 400; }
.list.dash tr.grp th { border-top: 3px solid transparent; }
.list.dash tr.grp th.grp-g_hours { border-top-color: #4a7be0; color: #2f55a8; background: #f4f7fe; }
.list.dash tr.grp th.grp-g_rest { border-top-color: #2a9d8f; color: #1b6b62; background: #f1faf8; }
.list.dash tr.grp th.grp-g_hol { border-top-color: #e0a526; color: #8a5a07; background: #fffaf0; }
.list.dash tr.grp th.grp-g_vac { border-top-color: #4caf50; color: #2e6b30; background: #f3faf3; }
.list.dash tr.grp th.grp-g_abs { border-top-color: #8a63d2; color: #553393; background: #f7f3fd; }
.list.dash .g1 { border-left: 1px solid #dfe4ee; }
.list.dash td.rep-cell, .list.dash th.rep-cell { width: 46px; border-left: 1px solid #dfe4ee; }
.list.dash .rep-btn { width: 26px; height: 24px; padding: 0; font-size: 13px; opacity: .7; }
.list.dash tr:hover .rep-btn { opacity: 1; border-color: var(--accent); }
.dash-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 4px 0; font-size: 11.5px; color: var(--muted); }
.dash-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.dash-legend .lg-pos { background: var(--warn); } .dash-legend .lg-neg { background: var(--bad); }

/* Tableau de bord: narrower "Absences (jours)" (columns 16-19) */
.list.dash thead tr:nth-child(2) th:nth-child(n+16):nth-child(-n+19),
.list.dash tbody tr:not(.dept-row):not(.alerts-row) > td:nth-child(n+16):nth-child(-n+19) { width: 50px; min-width: 50px; max-width: 56px; padding-left: 3px; padding-right: 5px; }
.list.dash thead tr:nth-child(2) th:nth-child(n+16):nth-child(-n+19) { font-size: 10.5px; }

/* ---------- dashboard: new look ---------- */
/* fixed columns: same widths in the week and month views */
table.list.dash.fixed { table-layout: fixed; width: 100%; }
.list.dash.fixed th, .list.dash.fixed td { width: auto !important; min-width: 0 !important; max-width: none !important; overflow: hidden; text-overflow: ellipsis; }
.list.dash.fixed col.c-emp { width: 172px; }
.list.dash.fixed col.c-h { width: 76px; } .list.dash.fixed col.c-hc { width: 90px; }
.list.dash.fixed col.c-r, .list.dash.fixed col.c-f, .list.dash.fixed col.c-v { width: 54px; }
.list.dash.fixed col.c-a { width: 54px; } .list.dash.fixed col.c-al { width: 62px; } .list.dash.fixed col.c-rp { width: 58px; }
/* light banding per group */
.list.dash.fixed col.c-h, .list.dash.fixed col.c-hc { background: #fbfcff; }
.list.dash.fixed col.c-f { background: #fffdf7; }
.list.dash.fixed col.c-a { background: #fdfcff; }
.list.dash tbody tr:not(.dept-row):not(.alerts-row) > td:nth-child(6) { background: transparent; }
/* figures */
.list.dash td.num { font-variant-numeric: tabular-nums; font-size: 12.5px; color: #3b4456; }
.list.dash td.num.muted { color: var(--muted); }
.list.dash .bal { display: inline-block; min-width: 46px; padding: 2px 7px; border-radius: 99px; font-weight: 700; font-size: 12px; text-align: right; }
.list.dash .bal.pos { background: #fdf0dc; color: #9a5b06; }
.list.dash .bal.neg { background: #fde8e8; color: #b23434; }
.list.dash .bal.ok { background: #e8f5ec; color: #2c7a4b; }
.list.dash .bal.zero { background: #f1f3f7; color: #9aa3b5; font-weight: 600; }
.list.dash td.num.pos, .list.dash td.num.neg { font-weight: 600; }
/* header */
.list.dash thead tr:nth-child(2) th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: #7a8396; }
.list.dash thead tr:nth-child(2) th.emp { text-transform: none; letter-spacing: 0; font-size: 11px; }
.list.dash tr.grp th { font-size: 10.5px; letter-spacing: .07em; }
/* alerts and report */
.list.dash .okmark { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #e8f5ec; color: #2c7a4b; font-size: 11px; font-weight: 800; }
.list.dash .alert-btn { border: 0; border-radius: 99px; padding: 2px 9px; background: #fde8e8; color: #b23434; font-weight: 700; font-size: 11.5px; cursor: pointer; }
.list.dash .alert-btn:hover { background: #fbd5d5; }
/* rows */
.list.dash tbody tr:not(.dept-row):not(.alerts-row) > td { border-bottom-color: #f0f2f7; }
.list.dash tbody tr:not(.dept-row):not(.alerts-row):hover > td { background: #f5f8ff !important; }
/* column headers: normal case, may wrap on two lines (never cut) */
.list.dash.fixed thead tr:nth-child(2) th { text-transform: none; letter-spacing: 0; font-size: 11px; white-space: normal; line-height: 1.15; text-overflow: clip; overflow: visible; color: #6b7385; }
.list.dash.fixed thead tr:nth-child(2) th .info-t { white-space: normal; }
.list.dash.fixed thead tr:nth-child(2) th { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; padding-left: 4px; padding-right: 4px; }

/* staff import window */
.modal.imp-modal { width: min(1100px, calc(100vw - 32px)); max-width: none; }
.imp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 6px 0 12px; }
.imp-step { display: flex; gap: 10px; padding: 12px; border: 1px solid #e6e9f1; border-radius: 12px; background: #fbfcfe; }
.imp-step .n { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.imp-step p { margin: 4px 0 8px; }
.imp-step > div { min-width: 0; flex: 1; }
.imp-drop { margin-top: 6px; padding: 10px; min-height: 0; }
.imp-sum { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.imp-wrap { max-height: 46vh; border-radius: 12px; }
.imp-table tr.imp-bad td { background: #fdf6f6; } .imp-table tr.imp-warn td { background: #fffaf2; }
.imp-msg span { display: block; font-size: 11.5px; } .imp-msg .e { color: var(--bad); } .imp-msg .w { color: #9a5b06; }
@media (max-width: 900px) { .imp-steps { grid-template-columns: 1fr; } }

/* ---------- Documents tab ---------- */
#main .toolbar.sec-tb .lib-search { width: 240px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.lib-card { margin: 0; }
.lib-card .as-head h3 { display: flex; align-items: center; gap: 6px; }
.lib-card .cnt-n { min-width: 18px; padding: 0 6px; border-radius: 9px; background: #e3e8f2; color: #4a5875; font-size: 10.5px; text-align: center; }
.lib-drop { padding: 10px; min-height: 0; margin-bottom: 8px; }
.lib-drop b { font-size: 12px; } .lib-drop small { display: block; }
.lib-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow: auto; }
.lib-list li { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid #f0f2f7; }
.lib-list li:hover { background: #f7f9ff; }
.lib-ic { font-size: 18px; flex: none; }
.lib-main { flex: 1; min-width: 0; }
.lib-main a { display: block; font-weight: 600; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); text-decoration: none; }
.lib-main a:hover { color: var(--accent); text-decoration: underline; }
.lib-main small { color: var(--muted); font-size: 11px; }
.lib-move { width: 130px; flex: none; }
.lib-empty { padding: 10px 4px; border: 0 !important; }

/* Collaborateurs: the opened employee stops under the sticky header of the list */
.list.emps tr.emp-row { scroll-margin-top: 58px; }

/* ---------- shift / absence window ---------- */
.modal.sf-modal { width: min(720px, calc(100vw - 32px)); max-width: none; }
.sf-head { align-items: flex-start; }
.sf-head .eh-av { width: 40px; height: 40px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.sf-head .eh-av.sf-new { background: #e3e8f2; color: #4a5875; font-size: 20px; }
.sf-head h2 { margin: 0; } .sf-head .sub { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.sf-seg { display: inline-flex; margin: 10px 0 12px; }
.sf-seg button { padding: 6px 16px; font-size: 13px; }
form.sf .sf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sf-grp { border: 1px solid #e6e9f1; border-radius: 12px; padding: 10px 12px 12px; background: #fbfcfe; margin-bottom: 10px; min-width: 0; }
form.sf .sf-grid .sf-grp { margin-bottom: 0; }
form.sf .sf-grid + * { margin-top: 10px; }
.sf-grp h4 { margin: 0 0 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sf-grp > label, .sf-row > label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.sf-grp > label:last-child { margin-bottom: 0; }
.sf-grp input, .sf-grp select, .sf-grp textarea { width: 100%; }
.sf-row { display: flex; gap: 8px; align-items: flex-end; }
.sf-row > label { flex: 1; margin-bottom: 0; min-width: 0; }
.sf-inl { display: flex; align-items: center; gap: 6px; color: var(--ink); } .sf-inl input { width: 64px !important; }
.sf-total { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.sf-dur { display: inline-block; padding: 4px 12px; border-radius: 99px; background: #eef6f0; color: #245c3a; font-weight: 700; font-size: 13px; }
.sf-dur.bad, #brk-hint.bad { color: var(--bad); } .sf-dur.bad { background: #fde8e8; }
.sf-dur:empty { display: none; }
.sf-grp .link { display: inline-block; margin: -2px 0 8px; font-size: 11.5px; }
.sf-hint { margin: 2px 2px 8px; }
.sf-switch { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 10px; color: var(--ink) !important; font-size: 13px !important; cursor: pointer; margin: 0 !important; }
.sf-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sf-switch .sw { width: 34px; height: 20px; border-radius: 99px; background: #cfd6e3; position: relative; transition: background .15s; flex: none; }
.sf-switch .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
.sf-switch input:checked + .sw { background: var(--accent); } .sf-switch input:checked + .sw::after { left: 16px; }
.sf-switch input:focus-visible + .sw { outline: 2px solid var(--accent); outline-offset: 2px; }
#rep-body { margin-top: 10px; } #rep-body .days { margin-bottom: 8px; }
.sf-grp.review.ok { background: #f3faf5; border-color: #cfe9d7; } .sf-grp.review.todo { background: #fff8f2; border-color: #f5d8c6; } .sf-grp.review.ko { background: #fdf4f4; border-color: #f1c9c9; }
.sf-grp.review .review-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; } .sf-grp.review .review-head h4 { margin: 0; }
.sf-grp.review .sf-row { margin-bottom: 8px; } .sf-grp.review .sf-dur { margin-bottom: 4px; }
.sf-acts { display: flex; gap: 6px; margin-top: 8px; }
.sf-acts .btn.ok { background: #2f8a57; color: #fff; border-color: #2f8a57; } .sf-acts .btn.ko { color: var(--bad); border-color: #efc1c1; background: #fff; }
.series-all { display: flex !important; flex-direction: row !important; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: #eef2fb; color: var(--ink) !important; margin: 0 0 10px; }
@media (max-width: 700px) { form.sf .sf-grid { grid-template-columns: 1fr; } }
