/* JS Power Services – timesheets
   Brand taken from jspowerservices.com: Barlow / Barlow Condensed / IBM Plex Mono,
   navy #0d1621, red #ee2a22, paper #f5f6f4. */
:root {
  --ink: #0d1621;
  --ink-2: #14212f;
  --ink-3: #1d2d3f;
  --line-dark: #2a3c51;
  --on-dark: #eef2f6;
  --muted-on-dark: #9fb0c2;
  --red: #ee2a22;
  --red-deep: #c8150e;
  --red-soft: #fdeceb;
  --paper: #f5f6f4;
  --paper-2: #eceeea;
  --card: #ffffff;
  --border: #d9ddd6;
  --line: #e6e9e4;
  --text: #18222d;
  --muted: #5b6672;
  --navy-soft: #e8edf3;
  --green: #17734a;
  --green-soft: #e4f3ea;
  --radius: 10px;
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', 'Barlow', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --shadow: 0 1px 2px rgba(13, 22, 33, .05), 0 4px 14px rgba(13, 22, 33, .04);
  font-family: var(--font);
  color: var(--text);
  background: var(--paper);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; font-size: 16px; line-height: 1.5; background: var(--paper); }
a { color: var(--red-deep); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 1.05; margin: 0 0 .5rem; color: var(--ink); }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar { background: var(--ink); color: var(--on-dark); position: sticky; top: 0; z-index: 20; }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: .7rem 1.25rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .9rem; color: var(--on-dark); text-decoration: none; margin-right: auto; }
.brand-logo { height: 46px; width: auto; display: block; }
.brand-text { font-family: var(--display); font-weight: 700; letter-spacing: .04em; font-size: 1.15rem; }
.brand-text b { color: var(--red); }
.brand-sub { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted-on-dark); border-left: 1px solid var(--line-dark); padding-left: .9rem; }
.nav-right { display: flex; align-items: center; gap: .6rem; }
.nav-right .who { color: var(--muted-on-dark); font-size: .88rem; }
.nav-right .signout { background: none; border: 1px solid var(--line-dark); color: #c9d4df; font: 500 .85rem var(--font); padding: .38rem .7rem; border-radius: 6px; cursor: pointer; }
.nav-right .signout:hover { color: #fff; border-color: #fff; }
.menu-btn { display: none; background: none; border: 1px solid var(--line-dark); color: #fff; font: 600 .85rem var(--font); padding: .45rem .8rem; border-radius: 6px; cursor: pointer; }
.mode-switch { font: 600 .82rem var(--font); color: #fff; background: var(--red); border: 0; border-radius: 999px; padding: .38rem .85rem; cursor: pointer; white-space: nowrap; }
.mode-switch:hover { background: var(--red-deep); }
.tabs { background: var(--ink-2); border-top: 1px solid var(--line-dark); }
.tabs-inner { max-width: 1180px; margin: 0 auto; padding: 0 .75rem; display: flex; gap: .1rem; overflow-x: auto; scrollbar-width: none; }
.tabs a { color: #b8c4d2; text-decoration: none; font: 500 .93rem var(--font); padding: .7rem .75rem; white-space: nowrap; position: relative; flex: none; }
.tabs a:hover { color: #fff; }
.tabs a.active { color: #fff; }
.tabs a.active::after { content: ''; position: absolute; left: .75rem; right: .75rem; bottom: 0; height: 3px; background: var(--red); border-radius: 3px 3px 0 0; }
.tab-signout { display: none; }
.nav { display: flex; gap: .15rem; flex-wrap: wrap; align-items: center; }
.nav a, .nav button { color: #c9d4df; text-decoration: none; font: 500 .95rem var(--font); padding: .5rem .75rem; white-space: nowrap; flex: none; border-radius: 6px; background: none; border: 0; cursor: pointer; position: relative; }
.nav a:hover, .nav button:hover { color: #fff; background: var(--ink-2); }
.nav a.active { color: #fff; }
.nav a.active::after { content: ''; position: absolute; left: .75rem; right: .75rem; bottom: .15rem; height: 2px; background: var(--red); border-radius: 2px; }
.nav .who { color: var(--muted-on-dark); font-size: .85rem; padding: 0 .5rem 0 .9rem; border-left: 1px solid var(--line-dark); margin-left: .4rem; }

/* ---------- layout ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 1.75rem 1.25rem 7.5rem; outline: none; }
.narrow { max-width: 460px; margin: 2.5rem auto; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem 1.35rem; margin-bottom: 1rem; border: 1px solid var(--border); }
.card.accent { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }
.card.accent .muted { color: var(--muted-on-dark); }
.card.accent .stat b { color: #fff; }
.card.accent h2 { color: #fff; }
.card.accent .table-wrap table.data th { color: var(--muted-on-dark); border-color: var(--line-dark); }
.card.accent table.data td { border-color: var(--ink-3); color: var(--on-dark); }
.card.accent table.data tfoot td { border-color: var(--line-dark); }
.card.accent .zero { color: #4b5d71; }
.card.accent .warn-box { background: rgba(238, 42, 34, .12); color: #ffd9d6; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.mt { margin-top: 1rem; }
.loading { color: var(--muted); padding: 3rem 0; text-align: center; font-family: var(--mono); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; }
.eyebrow { font-family: var(--mono); text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 500; color: var(--red); margin-bottom: .45rem; display: flex; align-items: center; gap: .6rem; }
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--red); display: inline-block; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: .15rem; }
.stat > span { font-family: var(--mono); text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; }
.stat b { font-family: var(--display); font-size: 1.45rem; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 1.1; }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; font-size: .92rem; margin: .9rem 0 .3rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .84rem; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], select, textarea {
  width: 100%; font: 400 1rem var(--font); padding: .65rem .75rem; border: 1px solid #c8cec6; border-radius: 6px; background: #fff; color: var(--text);
}
input::placeholder, textarea::placeholder { color: #98a1aa; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(238, 42, 34, .18); }
button:focus-visible, a:focus-visible, tr:focus-visible { outline: 3px solid rgba(238, 42, 34, .45); outline-offset: 2px; }
textarea { min-height: 96px; resize: vertical; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: 600 .97rem var(--font); border-radius: 6px; padding: .65rem 1.1rem; border: 1px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.2; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-deep); }
.btn-dark, .btn-success { background: var(--ink); color: #fff; }
.btn-dark:hover, .btn-success:hover { background: var(--ink-3); }
.btn-ghost { background: #fff; color: var(--ink); border-color: #c8cec6; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-danger { background: #fff; color: var(--red-deep); border-color: #efb4b0; }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { padding: .42rem .7rem; font-size: .87rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.error-box, .info-box, .warn-box, .ok-box { border-radius: 6px; padding: .75rem .95rem; margin: .75rem 0; font-size: .95rem; border-left: 3px solid; }
.error-box { background: var(--red-soft); color: #8f1410; border-color: var(--red); }
.info-box { background: var(--navy-soft); color: var(--ink-2); border-color: var(--ink); }
.warn-box { background: var(--red-soft); color: #7a1611; border-color: var(--red); }
.ok-box { background: var(--green-soft); color: #0f4f32; border-color: var(--green); }

/* ---------- status pills ---------- */
.pill { display: inline-flex; align-items: center; gap: .35rem; font: 600 .7rem var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: .28rem .6rem; border-radius: 4px; white-space: nowrap; border: 1px solid transparent; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-not-started, .pill-draft, .pill-not-required { background: var(--paper-2); color: #6b7580; }
.pill-not-required::before { display: none; }
.pill-in-progress { background: #fff; color: var(--ink); border-color: #c8cec6; }
.pill-due { background: var(--red-soft); color: var(--red-deep); border-color: #f3c3c0; }
.pill-overdue { background: var(--red); color: #fff; }
.pill-submitted, .pill-awaiting_approval, .pill-approving { background: var(--navy-soft); color: var(--ink); }
.pill-approved, .pill-sent { background: var(--green-soft); color: var(--green); }
.pill-returned, .pill-send_failed { background: #fff; color: var(--red-deep); border-color: var(--red); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -1.35rem; padding: 0 1.35rem; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th { text-align: left; font: 600 .78rem var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: .6rem .55rem; border-bottom: 2px solid var(--ink); white-space: nowrap; }
table.data td { padding: .65rem .55rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: #fafbf9; }
table.data tr.clickable:hover td:first-child { box-shadow: inset 3px 0 0 var(--red); }
table.data tfoot td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }
.zero { color: #b9c0c7; }

/* ---------- week editor ---------- */
.week-nav { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.week-nav .btn { min-width: 44px; }
.days { display: grid; gap: .7rem; }
.day { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.day-head { display: flex; justify-content: space-between; align-items: center; padding: .6rem 1.1rem; border-bottom: 1px solid var(--line); gap: .5rem; }
.day-head .d { font-family: var(--display); font-weight: 700; font-size: 1.08rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink); }
.day-head .d span { font-family: var(--font); color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; margin-left: .45rem; font-size: .95rem; }
.day-head .small { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }
.day.weekend .day-head { background: var(--paper-2); }
.day.locked { opacity: .6; }
.day.locked .day-head { background: repeating-linear-gradient(-45deg, #f3f4f2 0 8px, #eceeea 8px 16px); }
.day-body { padding: .45rem 1.1rem .85rem; }
.claim { display: grid; grid-template-columns: 170px 130px 1fr auto; gap: .55rem; align-items: center; padding: .45rem 0; border-bottom: 1px dashed var(--line); }
.claim:last-of-type { border-bottom: 0; }
.claim .ct { font-weight: 600; font-size: .95rem; }
.claim .ct small { display: block; font: 500 .68rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--red-deep); margin-top: .1rem; }
.qty { position: relative; }
.qty input { padding-right: 3.3rem; font-variant-numeric: tabular-nums; }
.qty .unit { position: absolute; right: .65rem; top: 50%; transform: translateY(-50%); color: var(--muted); font: 500 .72rem var(--mono); text-transform: uppercase; pointer-events: none; }
.qty select + .unit { display: none; }
.remove { background: none; border: 0; color: #9aa3ac; font-size: 1.35rem; cursor: pointer; padding: .2rem .5rem; border-radius: 6px; line-height: 1; }
.remove:hover { background: var(--red-soft); color: var(--red); }
.add-row { display: flex; flex-wrap: wrap; gap: .4rem; padding-top: .6rem; }
.add-row .btn { font-weight: 500; border-style: dashed; color: var(--ink-3); }
.add-row .btn:hover { border-style: solid; color: var(--red-deep); border-color: var(--red); }
.empty-day { color: var(--muted); font-size: .9rem; padding: .35rem 0; }
.ro-claim { display: grid; grid-template-columns: 170px 120px 1fr; gap: .55rem; padding: .4rem 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.ro-claim:last-child { border-bottom: 0; }
.ro-claim .q { font-variant-numeric: tabular-nums; font-weight: 600; }
.ro-claim .n { color: var(--muted); }

.actionbar { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, .97); backdrop-filter: blur(6px); border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(13, 22, 33, .07); z-index: 15; padding: .7rem 1.25rem calc(.7rem + env(safe-area-inset-bottom)); }
.actionbar-inner { max-width: 1180px; margin: 0 auto; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.totals { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .88rem; color: var(--muted); flex: 1; }
.totals b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list a.item { text-decoration: none; color: inherit; display: flex; justify-content: space-between; align-items: center; width: 100%; gap: .75rem; }
.list a.item strong { color: var(--ink); }
.list a.item:hover strong { color: var(--red-deep); }
.list li.upcoming { color: #8a939c; }
.list li.upcoming strong { font-weight: 500; }
.list li.current { margin: 0 -1.35rem; padding-left: 1.35rem; padding-right: 1.35rem; background: #fafbf9; box-shadow: inset 3px 0 0 var(--red); }

/* ---------- login ---------- */
.login-hero { background: var(--ink); color: var(--on-dark); border-radius: var(--radius) var(--radius) 0 0; padding: 1.6rem 1.4rem 1.3rem; margin: -1.25rem -1.35rem 1.2rem; position: relative; overflow: hidden; }
.login-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--red); }
.login-hero img { height: 46px; width: auto; display: block; margin-bottom: 1.1rem; }
.login-hero h1 { color: #fff; font-size: 1.9rem; margin-bottom: .25rem; }
.login-hero p { color: var(--muted-on-dark); margin: 0; font-size: .95rem; }

/* ---------- modal & toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(13, 22, 33, .6); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 1rem; }
.modal { background: #fff; border-radius: 12px; max-width: 540px; width: 100%; padding: 1.4rem; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); max-height: 90vh; overflow: auto; border-top: 3px solid var(--red); }
.modal h2 { margin-bottom: .75rem; }
.modal .actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1.2rem; flex-wrap: wrap; }
.linkbox { font-family: var(--mono); font-size: .8rem; background: var(--paper); border: 1px solid var(--border); padding: .65rem; border-radius: 6px; word-break: break-all; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 5.8rem; background: var(--ink); color: #fff; padding: .75rem 1.15rem; border-radius: 8px; z-index: 60; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); font-size: .95rem; max-width: 90vw; border-left: 3px solid var(--red); }
.toast.error { background: var(--red-deep); border-left-color: #fff; }

@media (max-width: 720px) {
  h1 { font-size: 1.7rem; }
  .container { padding-top: 1.25rem; }
  .brand-sub { display: none; }
  .brand-logo { height: 38px; }
  .topbar-inner { padding: .6rem 1rem; }
  .nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; margin: 0 -.5rem; scrollbar-width: none; }
  .nav a, .nav button { padding: .5rem .6rem; }
  .nav .who { display: none; }
  .claim { grid-template-columns: 1fr auto; grid-template-areas: "ct rm" "qty qty" "note note"; }
  .claim .ct { grid-area: ct; }
  .claim .qty { grid-area: qty; }
  .claim .note { grid-area: note; }
  .claim .remove { grid-area: rm; }
  .ro-claim { grid-template-columns: 1fr auto; }
  .ro-claim .n { grid-column: 1 / -1; }
  .stats { gap: 1.25rem; }
  .totals { font-size: .82rem; gap: .6rem; }
  .actionbar .btn { flex: 1; }
}
@media print {
  .topbar, .actionbar, .no-print { display: none !important; }
  .container { padding: 0; }
  .card { box-shadow: none; }
}

/* ---------- policies ---------- */
.lead { margin: .35rem 0 0; }
.filters { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.filters input[type=search] { width: auto; flex: 1 1 260px; font: 400 1rem var(--font); padding: .62rem .75rem; border: 1px solid #c8cec6; border-radius: 6px; background: #fff; }
.filters input[type=search]:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(238, 42, 34, .18); }
.chips { display: flex; gap: .35rem; flex-wrap: wrap; }
.chip { font: 600 .85rem var(--font); padding: .45rem .8rem; border-radius: 999px; border: 1px solid #c8cec6; background: #fff; color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.doc-list li { gap: .5rem; }
.doc { align-items: center; }
.doc-ext { flex: none; width: 46px; height: 54px; border-radius: 4px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: .45rem; font: 600 .66rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--ink); position: relative; }
.doc-ext::before { content: ''; position: absolute; top: 0; right: 0; border-width: 0 12px 12px 0; border-style: solid; border-color: var(--paper) var(--paper) rgba(255, 255, 255, .25) rgba(255, 255, 255, .25); }
.doc-ext.ext-pdf { background: var(--red); }
.doc-ext.ext-docx, .doc-ext.ext-doc { background: #2b579a; }
.doc-ext.ext-xlsx, .doc-ext.ext-xls { background: #217346; }
.doc-ext.ext-pptx { background: #b7472a; }
.doc-meta { font: 500 .7rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.empty-state { text-align: center; padding: 2.5rem 1.5rem; }
@media (max-width: 720px) { .doc .btn { display: none; } }

/* ---------- cards & certificates ---------- */
.filters select { width: auto; flex: 0 1 220px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .85rem; }
.card-tile { display: flex; flex-direction: column; text-align: left; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; padding: 0; cursor: pointer; font: inherit; color: inherit; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.card-tile:hover { border-color: var(--ink); transform: translateY(-1px); }
.card-img { aspect-ratio: 1.586; background: var(--paper-2); display: flex; align-items: center; justify-content: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-info { display: flex; flex-direction: column; gap: .3rem; padding: .7rem .8rem .8rem; align-items: flex-start; }
.card-info strong { color: var(--ink); line-height: 1.25; }
.card-no { font: 500 .75rem var(--mono); color: var(--muted); letter-spacing: .04em; }
.pill-expired { background: var(--red); color: #fff; }
.pill-soon { background: var(--red-soft); color: var(--red-deep); border-color: #f3c3c0; }
.pill-valid { background: var(--green-soft); color: var(--green); }
.pill-noexpiry { background: var(--paper-2); color: #6b7580; }
.card-sides { display: grid; gap: .75rem; }
.card-full img { width: 100%; border-radius: 8px; border: 1px solid var(--border); display: block; }
.grid-2.tight { gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.check input { width: auto; }
@media (max-width: 720px) {
  .nav .nav-signout { display: none; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .card-info { padding: .55rem .6rem .65rem; }
  .card-info strong { font-size: .92rem; }
  .filters select { flex: 1 1 100%; }
}
.card-info .pill { max-width: 100%; white-space: normal; line-height: 1.3; }
@media (max-width: 720px) { .card-info .pill { font-size: .62rem; letter-spacing: .04em; padding: .25rem .45rem; } }
.read-count.incomplete { border-color: var(--red); color: var(--red-deep); }
.list.compact li { padding: .45rem 0; }
.notice { display: flex; justify-content: space-between; align-items: center; gap: .75rem; background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--red); border-radius: 6px; padding: .75rem .95rem; margin: 0 0 .75rem; color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.notice:hover { border-color: var(--ink); border-left-color: var(--red); }
.notice > span:last-child { color: var(--red); font-size: 1.3rem; line-height: 1; }
@media (max-width: 720px) {
  .doc-list li { flex-wrap: wrap; }
  .doc-list li > .btn, .doc-list li > .pill { margin-left: calc(46px + .75rem); }
}

/* ---------- vans ---------- */
.plate { display: inline-flex; align-items: center; justify-content: center; font: 700 1.6rem var(--display); letter-spacing: .06em; color: #111; background: #f6cf1a; border: 2px solid #111; border-radius: 6px; padding: .2rem .8rem .15rem; min-width: 8.5rem; white-space: nowrap; box-shadow: inset 0 0 0 2px #f6cf1a, inset 0 0 0 3px rgba(0,0,0,.25); }
.plate.sm { font-size: .98rem; padding: .12rem .45rem .08rem; min-width: 0; border-width: 1.5px; border-radius: 4px; }
.van-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.van-head h2 { margin: 0; }
.van-head p { margin: .1rem 0 0; }
.due-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.due-tile { border: 1px solid var(--border); border-radius: 8px; padding: .7rem .8rem; display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; background: #fff; }
.due-tile strong { font-size: 1rem; }
.due-tile.due-expired { border-color: var(--red); background: var(--red-soft); }
.due-tile.due-soon { border-color: #f3c3c0; }
.due-label { font: 500 .68rem var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.repairs li { align-items: flex-start; }
details summary { cursor: pointer; }
table.data.vans td { white-space: nowrap; }
.reg-input { text-transform: uppercase; font-family: var(--display); font-weight: 700; letter-spacing: .06em; font-size: 1.15rem; }
@media (max-width: 720px) {
  .due-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plate { font-size: 1.35rem; min-width: 0; }
}
.due-tile .pill { max-width: 100%; white-space: normal; line-height: 1.3; }
@media (max-width: 720px) {
  .nav a, .nav button { padding: .5rem .45rem; font-size: .9rem; }
  .due-tile { padding: .6rem .65rem; }
  .due-tile strong { font-size: .92rem; }
  .due-tile .pill { font-size: .62rem; letter-spacing: .04em; }
}
.due-tile .pill { max-width: 100%; white-space: normal; line-height: 1.3; }
@media (max-width: 720px) {
  .nav a, .nav button { padding: .5rem .45rem; font-size: .9rem; }
  .due-tile { padding: .6rem .65rem; }
  .due-tile strong { font-size: .92rem; }
  .due-tile .pill { font-size: .62rem; letter-spacing: .04em; }
}
.nav .mode-switch { font: 600 .82rem var(--font); color: #fff; background: var(--red); border: 0; border-radius: 999px; padding: .38rem .8rem; margin-right: .4rem; cursor: pointer; white-space: nowrap; flex: none; }
.nav .mode-switch:hover { background: var(--red-deep); }
.mode-banner { background: var(--red); color: #fff; display: flex; justify-content: center; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .45rem 1rem; font-size: .9rem; }
.mode-banner button { font: 600 .82rem var(--font); background: #fff; color: var(--red-deep); border: 0; border-radius: 6px; padding: .3rem .7rem; cursor: pointer; }
.done-btn { margin-top: .15rem; padding: .3rem .6rem; font-size: .8rem; }
.check { flex-wrap: wrap; }
.check .hint { flex-basis: 100%; margin-left: 1.6rem; }
@media (max-width: 1340px) {
  .brand-sub { display: none; }
  .nav a, .nav button { padding: .5rem .55rem; }
  .nav .who { display: none; }
}

@media (max-width: 860px) {
  .menu-btn { display: inline-block; }
  .nav-right .who, .nav-right .signout { display: none; }
  .tabs { display: none; }
  .tabs.open { display: block; }
  .tabs-inner { flex-direction: column; padding: .4rem 1rem .8rem; }
  .tabs a { padding: .75rem .25rem; border-bottom: 1px solid var(--line-dark); font-size: 1rem; }
  .tabs a.active::after { left: auto; right: 0; top: 50%; bottom: auto; width: 6px; height: 6px; border-radius: 50%; transform: translateY(-50%); }
  .tab-signout { display: block; text-align: left; background: none; border: 0; color: #c9d4df; font: 500 1rem var(--font); padding: .75rem .25rem; cursor: pointer; }
  .mode-switch { padding: .38rem .7rem; }
}

/* ---------- planner ---------- */
.jobs-list { max-height: 50vh; overflow: auto; }
.job-row { display: flex; gap: .5rem; align-items: center; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.job-row input[type=color] { width: 42px; height: 36px; padding: 2px; border: 1px solid #c8cec6; border-radius: 6px; flex: none; background: #fff; }
.job-row input[type=text] { flex: 1; }
.job-row .check { margin: 0; white-space: nowrap; }
.my-days h3 { color: var(--muted); font-size: .95rem; }
.day-list li { justify-content: flex-start; gap: 1rem; align-items: flex-start; }
.day-list li.is-today { background: #fafbf9; box-shadow: inset 3px 0 0 var(--red); padding-left: .6rem; }
.day-list li.past { opacity: .55; }
.dl-date { min-width: 88px; font-size: .92rem; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .45rem; border: 1px solid rgba(0,0,0,.2); vertical-align: -1px; }
.team-note { color: var(--ink); font-weight: 600; }
.pill-abs-holiday { background: #fde2e0; color: #8f1410; }
.pill-abs-sick { background: #f1e5f6; color: #5b2a73; }
.pill-abs-unpaid, .pill-abs-other, .pill-abs-compassionate { background: #ececec; color: #444; }
.pill-abs-paternity, .pill-abs-maternity { background: #e1ecf9; color: #1f4f8a; }
.pill-info { background: var(--navy-soft); color: var(--ink); }
.pill-info::before { display: none; }
/* ---------- holidays ---------- */
.hol-balance .stats { align-items: flex-end; }
.hol-balance .stat.big b { font-size: 2.4rem; color: #fff; }
.neg { color: var(--red) !important; }
.card.accent .neg { color: #ff8a84 !important; }
.card.accent-red { border-top: 3px solid var(--red); }
.days-count { font-weight: 600; color: var(--ink); margin: .6rem 0 0; }
@media (max-width: 720px) {
  .planner-wrap { max-height: none; }
  .palette { left: .5rem; right: .5rem; transform: none; bottom: .5rem; }
  .dl-date { min-width: 72px; }
}

/* ---------- planner: calendar ---------- */
.pl-head { align-items: flex-end; }
.pl-actions { gap: .4rem; align-items: center; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--ink); cursor: pointer; }
.icon-btn:hover:not(:disabled) { background: var(--paper-2); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.menu-wrap { position: relative; }
.pop-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(13,22,33,.16); padding: .35rem; min-width: 240px; display: flex; flex-direction: column; }
.pop-menu button { text-align: left; background: none; border: 0; padding: .6rem .75rem; border-radius: 8px; font: 500 .92rem var(--font); color: var(--ink); cursor: pointer; }
.pop-menu button:hover { background: var(--paper); }
.pl-toolbar { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: .25rem 0 .9rem; }
.pl-range { font: 700 1.15rem var(--display); text-transform: uppercase; letter-spacing: .02em; color: var(--ink); margin-right: auto; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: .38rem .75rem; border-radius: 7px; font: 600 .88rem var(--font); color: var(--ink); cursor: pointer; }
.seg button:hover { background: var(--paper); }
.seg button.on { background: var(--ink); color: #fff; }
.seg-sm button { font-size: .82rem; padding: .35rem .65rem; }

.pl-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1rem; align-items: start; }
.pl-side { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 1rem; position: sticky; top: .75rem; max-height: calc(100vh - 1.5rem); display: flex; flex-direction: column; gap: .6rem; box-shadow: var(--shadow); }
.pl-side h2 { margin: 0; font-size: 1.15rem; }
.pl-find { padding: .5rem .7rem; font-size: .9rem; border-radius: 9px; margin: 0; }
.pal-list { overflow: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -.35rem; padding: 0 .35rem; }
.pal-job { display: flex; align-items: center; gap: .6rem; text-align: left; background: none; border: 0; border-radius: 9px; padding: .5rem .55rem; font: 500 .9rem var(--font); color: var(--ink); cursor: grab; touch-action: none; }
.pal-job:hover { background: var(--paper); }
.pal-job:active { cursor: grabbing; }
.pal-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.pl-hint { margin: 0; border-top: 1px solid var(--line); padding-top: .6rem; }

.planner-card { padding: 0; overflow: hidden; border-radius: 14px; }
.planner-wrap { overflow: auto; max-height: calc(100vh - 220px); position: relative; }
table.planner { border-collapse: separate; border-spacing: 0; font-size: .8rem; user-select: none; -webkit-user-select: none; width: max-content; min-width: 100%; }
table.planner th, table.planner td { border: 0; }
table.planner thead th { position: sticky; top: 0; z-index: 3; background: #fff; padding: .6rem .5rem .55rem; min-width: 118px; max-width: 118px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
table.planner thead th.we, table.planner td.we { min-width: 70px; max-width: 70px; }
table.planner thead th.wk, table.planner td.wk { border-left: 2px solid var(--line); }
.pl-dow { display: block; font: 600 .68rem var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pl-dnum { font: 700 1.35rem/1.1 var(--display); color: var(--ink); }
.pl-mon { font: 500 .78rem var(--font); color: var(--muted); margin-left: .25rem; }
th.today .pl-dnum { display: inline-grid; place-items: center; min-width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--red); color: #fff; font-size: 1.05rem; }
th.today .pl-dow { color: var(--red); }
th.we .pl-dnum, th.we .pl-dow { color: #9aa3ac; }
.pl-flag { display: block; margin-top: .3rem; font: 600 .66rem var(--font); border-radius: 999px; padding: .12rem .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: max-content; max-width: 100%; }
.pl-flag.bank { background: var(--paper-2); color: var(--muted); }
.pl-flag.team { background: var(--ink); color: #fff; }

table.planner .pl-name { position: sticky; left: 0; z-index: 2; background: #fff; text-align: left; padding: .35rem .75rem; min-width: 190px; max-width: 190px; border-right: 1px solid var(--line); }
table.planner thead .pl-name { z-index: 4; font: 600 .68rem var(--font); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; vertical-align: bottom; }
table.planner tbody .pl-name { display: table-cell; font-weight: 600; font-size: .88rem; color: var(--ink); white-space: nowrap; }
table.planner tbody .pl-name > * { vertical-align: middle; }
.pl-av { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy-soft); color: var(--ink); font: 700 .72rem var(--font); margin-right: .55rem; flex: none; }
.pl-nm { display: inline-block; max-width: 115px; overflow: hidden; text-overflow: ellipsis; }
.pl-grip { float: right; color: #c3c9cf; font-size: .75rem; letter-spacing: -2px; line-height: 30px; opacity: 0; transition: opacity .15s; }
table.planner.editable tbody tr:hover .pl-grip { opacity: 1; }
table.planner.editable tbody th.pl-name { cursor: grab; }
table.planner tbody tr + tr > * { border-top: 1px solid #f0f2ef; }

td.pl-cell { padding: 4px; height: 52px; min-width: 118px; max-width: 118px; position: relative; background: #fff; vertical-align: top; }
td.pl-cell.we { background: #fafbfa; }
td.pl-cell.today { background: #fffafa; }
.pl-in { height: 100%; }
.pl-card { height: 100%; border-radius: 8px; padding: .32rem .5rem .32rem .55rem; background: var(--bg, #eef1f4); color: var(--fg, var(--ink)); box-shadow: inset 3px 0 0 var(--edge, #9aa3ac); line-height: 1.2; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.pl-t { font-weight: 600; font-size: .78rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.pl-sub { font-size: .7rem; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-card.blank { min-height: 100%; }
.pl-card.bank { background: repeating-linear-gradient(-45deg, #f6f7f5 0 6px, #eff1ee 6px 12px); box-shadow: none; color: var(--muted); }
.pl-card.bank .pl-t { font-weight: 500; font-style: italic; }
.pl-card.abs { box-shadow: none; }
.pl-card.abs-holiday { background: #fde8e6; color: #9b1a14; }
.pl-card.abs-holiday::before { content: '☀'; font-size: .8rem; margin-bottom: 1px; }
.pl-card.abs-sick { background: #f3e9f8; color: #5b2a73; }
.pl-card.abs-unpaid, .pl-card.abs-other, .pl-card.abs-compassionate { background: #eef0f2; color: #3f4a55; }
.pl-card.abs-paternity, .pl-card.abs-maternity { background: #e5eef9; color: #1f4f8a; }
.pl-add { display: grid; place-items: center; height: 100%; border-radius: 8px; color: #b2bac2; font-size: 1.25rem; font-weight: 300; opacity: 0; transition: opacity .12s, background .12s; }
table.planner.editable td.pl-cell:hover .pl-add { opacity: 1; background: var(--paper); }
table.planner.editable td.pl-cell.filled { cursor: grab; }
table.planner.editable td.pl-cell:not(.filled) { cursor: pointer; }
table.planner.editable td.pl-cell.filled:hover .pl-card { filter: brightness(.97); box-shadow: inset 3px 0 0 var(--edge, #9aa3ac), 0 2px 6px rgba(13,22,33,.12); }
td.pl-cell.changed::after { content: ''; position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #fff; }

/* selection, moving, filling */
td.pl-cell.sel::before { content: ''; position: absolute; inset: 2px; border-radius: 9px; background: rgba(29, 78, 216, .09); pointer-events: none; z-index: 1; }
.sel-box { position: absolute; border: 2px solid #1d4ed8; border-radius: 10px; pointer-events: none; z-index: 1; box-shadow: 0 0 0 3px rgba(29, 78, 216, .15); }
td.pl-cell.drop::after { content: ''; position: absolute; inset: 2px; border: 2px dashed #1d4ed8; background: rgba(29, 78, 216, .06); border-radius: 9px; pointer-events: none; width: auto; height: auto; top: 2px; right: 2px; box-shadow: none; }
td.pl-cell.lifting .pl-card { opacity: .35; }
td.pl-cell.clip .pl-card, td.pl-cell.clip .pl-add { outline: 2px dashed #1d4ed8; outline-offset: -1px; }
.fill-handle { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: #1d4ed8; border: 2px solid #fff; z-index: 4; cursor: crosshair; }
td.pl-cell:has(.fill-handle) { z-index: 3; }
.pl-edit { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); border: 2px solid #1d4ed8; border-radius: 8px; padding: .2rem .45rem; font: 600 .8rem var(--font); background: #fff; color: var(--ink); z-index: 5; margin: 0; }
table.planner tbody tr.drop-above > * { box-shadow: inset 0 3px 0 #1d4ed8; }
table.planner tbody tr.drop-below > * { box-shadow: inset 0 -3px 0 #1d4ed8; }
.chip-ghost { position: fixed; z-index: 100; pointer-events: none; padding: .45rem .7rem; border-radius: 9px; font: 600 .82rem var(--font); box-shadow: 0 10px 28px rgba(13,22,33,.28); max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: rotate(-2deg); }
body.pl-moving, body.pl-moving * { cursor: grabbing !important; }
body.pl-moving.pl-copying, body.pl-moving.pl-copying * { cursor: copy !important; }

/* floating bar when several days are selected */
.selbar { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: .15rem; background: var(--ink); color: #fff; border-radius: 999px; padding: .35rem .4rem .35rem 1rem; box-shadow: 0 14px 36px rgba(13,22,33,.35); }
.selbar[hidden] { display: none; }
.selbar button { background: none; border: 0; color: #fff; font: 600 .86rem var(--font); padding: .45rem .7rem; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; }
.selbar button:hover { background: rgba(255,255,255,.12); }
.sb-count { font-size: .86rem; margin-right: .5rem; color: #cfd8e2; }
.selbar .sb-danger { color: #ff9b96; }
.selbar .sb-x { color: #9fb0c2; }
.sb-danger { color: var(--red); }
.xl-sw { display: inline-block; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); vertical-align: middle; }
.xl-menu { position: fixed; z-index: 60; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 14px 36px rgba(13,22,33,.22); padding: .6rem; display: grid; grid-template-columns: repeat(8, 30px); gap: 4px; }
.xl-menu[hidden] { display: none; }
.xl-menu-row { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-top: .35rem; gap: .5rem; }
.xl-menu-row input[type=color] { width: 34px; height: 26px; padding: 0; border: 0; vertical-align: middle; }
.xl-btn { background: #fff; border: 1px solid var(--border); border-radius: 8px; font: 600 .8rem var(--font); padding: .3rem .6rem; cursor: pointer; color: var(--ink); }
.xl-swbtn, .pp-swbtn { width: 30px; height: 30px; padding: 0; display: grid; place-items: center; border: 2px solid transparent; border-radius: 50%; background: none; cursor: pointer; }
.xl-swbtn .xl-sw, .pp-swbtn .xl-sw { width: 22px; height: 22px; }
.xl-swbtn:hover, .xl-swbtn.on, .pp-swbtn:hover, .pp-swbtn.on { border-color: var(--ink); }
.xl-swatches { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.xl-swatches input[type=color] { width: 40px; height: 30px; padding: 0; border: 1px solid var(--border); border-radius: 8px; }

/* popover for one day */
.pl-pop { position: fixed; z-index: 55; width: 300px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 44px rgba(13,22,33,.24); padding: .8rem; display: flex; flex-direction: column; gap: .55rem; }
.pl-pop[hidden] { display: none; }
.pp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; font-size: .9rem; }
.pp-x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .95rem; padding: .1rem .3rem; border-radius: 6px; }
.pp-x:hover { background: var(--paper); }
.pp-find { margin: 0; padding: .5rem .7rem; border-radius: 9px; font-size: .9rem; }
.pp-list { max-height: 210px; overflow: auto; display: flex; flex-direction: column; gap: 1px; margin: 0 -.3rem; padding: 0 .3rem; }
.pp-job { display: flex; align-items: center; gap: .55rem; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: .45rem .5rem; font: 500 .88rem var(--font); color: var(--ink); cursor: pointer; }
.pp-job:hover, .pp-job.on { background: var(--paper); }
.pp-job[hidden] { display: none; }
.pp-tick { margin-left: auto; color: #1d4ed8; font-weight: 700; }
.pp-plus { width: 12px; text-align: center; font-weight: 700; color: #1d4ed8; }
.pp-new { border-top: 1px solid var(--line); padding-top: .3rem; }
.pp-sec { border-top: 1px solid var(--line); padding-top: .55rem; }
.pp-lab { font: 600 .68rem var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .35rem; }
.pp-sw { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.pp-custom input { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.pp-all { margin: .45rem 0 0; }
.pp-foot { display: flex; justify-content: flex-end; }
.tips li { margin: .4rem 0; }
kbd { font: 600 .75rem var(--mono); background: var(--paper); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 .3rem; }

@media (max-width: 980px) {
  .pl-layout { grid-template-columns: 1fr; }
  .pl-side { position: static; max-height: none; }
  .pal-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .pal-job { flex: none; background: var(--paper); }
  .planner-wrap { max-height: none; }
  table.planner .pl-name { min-width: 130px; max-width: 130px; }
  .pl-nm { max-width: 70px; }
  .selbar { left: .5rem; right: .5rem; transform: none; overflow-x: auto; }
}
.pl-grip { float: none; position: absolute; right: .55rem; top: 50%; transform: translateY(-50%); line-height: 1; }
table.planner { width: 100%; }
table.planner thead th, td.pl-cell { max-width: none; min-width: 104px; }
table.planner thead th.we, table.planner td.we { min-width: 64px; max-width: none; width: 64px; }
.pl-pop .pp-custom { display: inline-grid; place-items: center; width: 30px; height: 30px; margin: 0; cursor: pointer; }
.pl-pop .pp-custom input[type=color] { width: 24px; height: 24px; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 50%; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); cursor: pointer; }
.pl-pop .pp-custom input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.pl-pop .pp-custom input[type=color]::-webkit-color-swatch { border: 2px solid #fff; border-radius: 50%; }
.pl-pop .pp-all { display: flex; align-items: center; gap: .45rem; margin: .5rem 0 0; font-weight: 500; color: var(--ink); cursor: pointer; }
.pl-pop .pp-all input { width: 16px; height: 16px; margin: 0; flex: none; }
.pl-layout > * { min-width: 0; }
@media (max-width: 980px) {
  .pal-job { touch-action: pan-x; }
  .pl-head { flex-direction: column; align-items: stretch; }
  .pl-actions { justify-content: flex-end; }
  .pl-pop { left: .5rem !important; right: .5rem; width: auto; top: auto !important; bottom: .5rem; max-height: 75vh; overflow: auto; }
}

/* ---------- home dashboards ---------- */
.dtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; margin: .25rem 0 1.1rem; }
.dtile { display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1rem; border-radius: 14px; background: #fff; border: 1px solid var(--border); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.dtile:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(13,22,33,.1); }
.dtile b { font: 700 2rem/1 var(--display); }
.dtile span { font-size: .86rem; color: var(--muted); font-weight: 500; }
.dtile.ok b { color: var(--green); font-size: 1.6rem; }
.dtile.warn { border-color: #f3c27a; background: #fffaf1; }
.dtile.warn b { color: #b36b00; }
.dtile.bad { border-color: #f5b1ad; background: #fff5f4; }
.dtile.bad b { color: var(--red); }
.dtile.info b { color: var(--ink); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.dash-grid.three { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-top: 1rem; }
.dash-col { display: flex; flex-direction: column; gap: 1rem; }
.dash-col .card, .dash-grid .card { margin: 0; }
.dash-grid h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.dash-week .seg { margin-bottom: .4rem; }
.dash-days { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.dash-days li { display: grid; grid-template-columns: 54px 1fr; gap: .7rem; align-items: stretch; }
.dash-days li.past { opacity: .5; }
.dd-date { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; background: var(--paper); padding: .35rem 0; }
.dd-date span { font: 600 .66rem var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.dd-date b { font: 700 1.35rem/1.1 var(--display); color: var(--ink); }
.dash-days li.is-today .dd-date { background: var(--red); }
.dash-days li.is-today .dd-date span, .dash-days li.is-today .dd-date b { color: #fff; }
.dd-what { display: flex; flex-direction: column; gap: .25rem; min-height: 48px; }
.dd-what .pl-card { min-height: 48px; padding: .45rem .75rem; }
.dd-what .pl-t { font-size: .92rem; }
.dash-none { min-height: 48px; display: flex; align-items: center; padding: 0 .75rem; border: 1px dashed var(--border); border-radius: 8px; color: var(--muted); font-size: .88rem; }
.dd-team { align-self: flex-start; font: 600 .74rem var(--font); background: var(--ink); color: #fff; border-radius: 999px; padding: .15rem .6rem; }
.dash-list { list-style: none; margin: 0 0 .5rem; padding: 0; }
.dash-list > li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.dash-list > li:last-child { border-bottom: 0; }
.dash-list > li.soft { color: var(--muted); }
.dash-list > li.bad { color: var(--red); }
.dash-list .nowrap { flex-wrap: nowrap; gap: .35rem; }
.dash-van { flex-direction: column; align-items: stretch !important; }
.dash-sub { list-style: none; margin: .35rem 0 0; padding: 0; font-size: .88rem; }
.dash-sub li { padding: .2rem 0 .2rem .8rem; position: relative; }
.dash-sub li::before { content: ''; position: absolute; left: 0; top: .62rem; width: 6px; height: 6px; border-radius: 50%; background: #c3c9cf; }
.dash-sub li.warn::before { background: #f0a020; }
.dash-sub li.bad { color: var(--red); }
.dash-sub li.bad::before { background: var(--red); }
.dash-clear { display: flex; align-items: center; gap: .55rem; color: var(--green); font-weight: 600; margin: .2rem 0 .6rem; }
.dash-clear span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--green-soft); font-size: .8rem; }
.dash-planner { padding: 0; }
.dash-ph { padding: .9rem 1rem .4rem; }
.dash-ph h2 { margin: 0; }
.dash-planner .planner-wrap { max-height: 60vh; }
.dash-wk { margin-right: .15rem; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

/* condensed dashboard layout */
.dtiles { gap: .6rem; margin-bottom: 1rem; }
.dtile { padding: .7rem .9rem; flex-direction: row; align-items: center; gap: .7rem; }
.dtile b { font-size: 1.7rem; min-width: 1.6rem; }
.dtile.ok b { font-size: 1.3rem; }
.dtile span { line-height: 1.2; }
.dash-emp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1rem; align-items: start; }
.dash-mas { columns: 2 280px; column-gap: 1rem; }
.dash-mas.three { columns: 3 300px; }
.dash-mas > .card { break-inside: avoid; display: inline-block; width: 100%; margin: 0 0 1rem; }
.dash-mas > .card, .dash-week { padding: .95rem 1.05rem; }
.dash-mas h2, .dash-week h2, .dash-ph h2 { font-size: 1rem; margin: 0 0 .45rem; letter-spacing: .03em; }
.dash-h { margin-bottom: .1rem; }
.dash-list > li { padding: .42rem 0; font-size: .9rem; }
.dash-list .btn-sm { padding: .25rem .6rem; font-size: .78rem; }
.dash-mas a.small, .dash-week a.small { display: inline-block; margin-top: .2rem; }
.dash-clear { margin: .1rem 0 .3rem; font-size: .9rem; }
.dash-note { margin: 0 0 .35rem; font-size: .9rem; color: var(--muted); }
.dash-note strong { color: var(--ink); font-size: 1.05rem; }
.dash-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin: .45rem 0 .2rem; }
.dchip { font-size: .74rem; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .55rem; color: var(--muted); }
.dchip b { color: var(--ink); font-weight: 600; }
.dash-more summary { cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--red); padding: .3rem 0; list-style: none; }
.dash-more summary::-webkit-details-marker { display: none; }
.dash-more[open] summary { display: none; }
.dash-wks { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: flex-end; }
.dash-wk { font: 600 .72rem var(--font); border-radius: 999px; padding: .12rem .5rem; text-decoration: none; background: var(--paper-2); color: var(--ink); white-space: nowrap; }
.dash-wk.due { background: #fff1d9; color: #8a5300; }
.dash-wk.overdue { background: #fde3e1; color: #a3160f; }
.dash-wk.returned { background: #e8edf3; color: var(--ink); }
.dash-key { margin: .3rem 0 0; display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; }
.dash-days { gap: .3rem; }
.dash-days li { grid-template-columns: 46px 1fr; gap: .55rem; }
.dd-date { padding: .2rem 0; border-radius: 8px; }
.dd-date b { font-size: 1.15rem; }
.dd-what, .dd-what .pl-card, .dash-none { min-height: 40px; }
.dd-what .pl-card { padding: .35rem .65rem; }
.dd-what .pl-t { font-size: .86rem; }
.dash-foot { margin: .6rem 0 0; }
.dash-van .dash-sub { font-size: .84rem; }
.dash-planner { margin-top: .2rem; }
.dash-planner .planner-wrap { max-height: 420px; }
.dash-planner td.pl-cell { height: 42px; }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; font-size: .85rem; }
.icon-btn.ok { background: var(--ink); color: #fff; border-color: var(--ink); }
.icon-btn.ok:hover { background: var(--ink-3); }
@media (max-width: 900px) { .dash-emp { grid-template-columns: 1fr; } .dash-mas, .dash-mas.three { columns: 1; } }

/* ---------- 3-week planner: full width, compact ---------- */
.container.wide { max-width: none; padding-left: 1.5rem; padding-right: 1.5rem; }
.pl-layout.stacked { grid-template-columns: 1fr; gap: .7rem; }
.pl-layout.stacked .pl-side { position: static; max-height: none; display: grid; grid-template-columns: auto 220px 1fr; grid-template-areas: "head find list"; align-items: start; gap: .6rem .8rem; padding: .6rem .75rem; border-radius: 12px; }
.pl-layout.stacked .pl-side > .row { grid-area: head; gap: .6rem; }
.pl-layout.stacked .pl-side h2 { font-size: 1rem; }
.pl-layout.stacked .pl-find { grid-area: find; padding: .38rem .6rem; font-size: .85rem; }
.pl-layout.stacked .pal-list { grid-area: list; flex-direction: row; flex-wrap: wrap; gap: .3rem; max-height: 64px; overflow: auto; margin: 0; padding: 0; }
.pl-layout.stacked .pal-job { background: var(--paper); padding: .28rem .6rem .28rem .45rem; font-size: .78rem; border-radius: 999px; gap: .4rem; max-width: 240px; }
.pl-layout.stacked .pal-job:hover { background: var(--paper-2); }
.pl-layout.stacked .pal-dot { width: 10px; height: 10px; }
.pl-layout.stacked .pl-hint { display: none; }
.pl-layout.stacked .planner-wrap { max-height: calc(100vh - 250px); }

table.planner.compact { table-layout: fixed; width: 100%; min-width: 1080px; font-size: .72rem; }
table.planner.compact .pl-name { width: 158px; min-width: 158px; max-width: 158px; padding: .2rem .5rem; }
table.planner.compact thead th { min-width: 0; max-width: none; padding: .4rem .3rem .35rem; }
table.planner.compact thead th.we, table.planner.compact td.we { width: 30px; min-width: 0; max-width: none; }
table.planner.compact td.pl-cell { min-width: 0; max-width: none; height: 40px; padding: 2px; }
.compact .pl-av { width: 24px; height: 24px; font-size: .6rem; margin-right: .4rem; }
.compact .pl-nm { max-width: 100px; font-size: .8rem; }
.compact tbody .pl-name { font-size: .8rem; }
.compact .pl-dow { font-size: .58rem; letter-spacing: .05em; }
.compact .pl-dnum { font-size: 1.05rem; }
.compact .pl-mon { font-size: .66rem; margin-left: .15rem; }
.compact .pl-mon.hide-c { display: none; }
.compact th.we { text-align: center; padding-left: 0; padding-right: 0; }
.compact th.we .pl-dnum { font-size: .82rem; }
.compact th.today .pl-dnum { min-width: 1.4rem; height: 1.4rem; font-size: .82rem; }
.compact .pl-flag { font-size: .56rem; padding: .05rem .3rem; margin-top: .2rem; }
.compact th.we .pl-flag { display: none; }
.compact .pl-card { padding: .18rem .3rem .18rem .4rem; border-radius: 6px; box-shadow: inset 2px 0 0 var(--edge, #9aa3ac); }
.compact .pl-card.abs { box-shadow: none; }
.compact .pl-t { font-size: .66rem; line-height: 1.15; font-weight: 600; }
.compact .pl-sub { font-size: .6rem; }
.compact .pl-card.abs-holiday::before { font-size: .62rem; margin: 0; }
.compact td.we .pl-card { padding: 0; box-shadow: none; }
.compact td.we .pl-t, .compact td.we .pl-sub, .compact td.we .pl-card::before { display: none; }
.compact .pl-add { font-size: .95rem; }
.compact td.pl-cell.changed::after { top: 4px; right: 4px; width: 5px; height: 5px; }
.compact .pl-grip { right: .3rem; }
table.planner.compact .pl-name { width: 142px; min-width: 142px; max-width: 142px; }
.compact .pl-nm { max-width: 88px; }
table.planner.compact thead th.we, table.planner.compact td.we { width: 24px; }
table.planner.compact td.pl-cell { padding: 2px 1px; }
.compact .pl-t { font-size: .65rem; word-break: normal; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
.pl-layout.stacked + * { margin-top: 0; }
.container.wide .page-head { margin-bottom: .6rem; }
.container.wide .pl-toolbar { margin-bottom: .6rem; }
/* endless sideways planner */
table.planner.scroll { table-layout: fixed; min-width: 0; }
table.planner.scroll .pl-name { width: var(--namew); min-width: var(--namew); max-width: var(--namew); }
table.planner.scroll thead th:not(.pl-name), table.planner.scroll td.pl-cell { width: var(--colw); min-width: var(--colw); max-width: var(--colw); }
table.planner.scroll thead th.we, table.planner.scroll td.we { width: var(--wew); min-width: var(--wew); max-width: var(--wew); }
table.planner.scroll:not(.compact) .pl-nm { max-width: 115px; }

/* ---------- bold colours + black grid lines ---------- */
.planner-card { border: 2px solid #0d1621; border-radius: 10px; }
table.planner th, table.planner td { border-right: 1px solid #0d1621; border-bottom: 1px solid #0d1621; }
table.planner tbody tr + tr > * { border-top: 0; }
table.planner thead th { border-bottom: 2px solid #0d1621; background: #fff; }
table.planner .pl-name { border-right: 2px solid #0d1621; }
table.planner thead th.wk, table.planner td.wk { border-left: 3px solid #0d1621; }
table.planner thead th.we { background: #e9ebee; }
td.pl-cell, table.planner.compact td.pl-cell { padding: 0; }
td.pl-cell.we { background: #e9ebee; }
td.pl-cell.today { background: #fff; box-shadow: inset 0 0 0 9999px rgba(238, 42, 34, .05); }
.pl-card { border-radius: 0; box-shadow: none; background: var(--bg, #dfe3e8); color: var(--fg, #0d1621); padding: .3rem .45rem; }
.compact .pl-card { border-radius: 0; box-shadow: none; padding: .2rem .3rem; }
.pl-t { font-weight: 700; }
.pl-card.abs { color: #fff; }
.pl-card.abs-holiday { background: #ee2a22; color: #fff; }
.pl-card.abs-sick { background: #6b2c91; color: #fff; }
.pl-card.abs-unpaid, .pl-card.abs-other, .pl-card.abs-compassionate { background: #4b5563; color: #fff; }
.pl-card.abs-paternity, .pl-card.abs-maternity { background: #1d4ed8; color: #fff; }
.pl-card.abs-holiday::before { content: none; }
.pl-card.bank { background: repeating-linear-gradient(-45deg, #d9dce0 0 6px, #cdd1d6 6px 12px); color: #0d1621; }
.pl-card.bank .pl-t { font-style: normal; font-weight: 600; }
table.planner.editable td.pl-cell.filled:hover .pl-card { filter: brightness(.93); box-shadow: none; }
.pl-add { border-radius: 0; }
td.pl-cell.sel::before { inset: 0; border-radius: 0; background: rgba(29, 78, 216, .18); }
.sel-box { border-radius: 0; border-width: 3px; }
td.pl-cell.drop::after { inset: 0; border-radius: 0; }
td.pl-cell.changed::after { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #0d1621; }
.pl-av { background: #0d1621; color: #fff; }
.dd-what .pl-card, .dash-none { border-radius: 6px; }
.pl-note { background: #fff4d6; border-left: 4px solid #f0a020; padding: .5rem .75rem; border-radius: 6px; margin: .5rem 0; font-size: .9rem; color: var(--ink); }
.install-card { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; border-left: 4px solid var(--red); }
.install-card img { border-radius: 12px; flex: none; }
.install-card h2 { margin: 0 0 .3rem; font-size: 1.1rem; }
.install-card p { margin: .2rem 0; }
