/* Look: soft, airy and rounded. Light mode is a frosted, translucent surface over a calm tinted background; dark mode (follows the device
   setting) is deep and quiet. Everything is made from the tokens below; nothing here is copied from another product. */
/* An element that carries the hidden attribute is never drawn, whatever display its class sets (a class such as .stack would otherwise show it:
   the sign-in's second step block appeared before the server asked for it). */
[hidden] { display: none !important; }
:root {
  --bg: #fafbf7;
  --bg-a: #eef4de;
  --bg-b: #e8eddf;
  --surface: #ffffff;
  --glass: rgba(255, 255, 255, 0.92);
  --glass-strong: #ffffff;
  --glass-edge: #dce2d9;
  --text: #172d2a;
  --muted: #596661;
  --line: #dce2d9;
  --field: #596661;
  --soft: #edf1e8;
  --chip: #eaf0e1;
  --accent: #173d35;
  --accent-ink: #173d35;
  --accent-text: #ffffff;
  --focus: #548625;
  --side-bg: #173d35;
  --side-text: #fafbf7;
  --side-muted: #c2d0c5;
  --side-hover: rgba(255, 255, 255, 0.1);
  --side-active: #d5ed86;
  --side-active-text: #172d2a;
  --side-mark: #d5ed86;
  --danger: #a3262b;
  --ok: #146c3b;
  --warn-text: #8a5a00;
  --track: rgba(21, 24, 29, 0.1);
  --chart-warn: #d98e04;
  --chart-muted: #9aa1a8;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-pop: 0 18px 44px rgba(16, 24, 40, 0.22);
  --head-h: 46px;
  --head-bg: #173d35;
  --head-text: #ffffff;
  --head-muted: #c2d0c5;
  --radius: 8px;
  --radius-md: 8px;
  --radius-field: 6px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e211d;
    --bg-a: #0e211d;
    --bg-b: #102a24;
    --surface: #17302a;
    --glass: rgba(23, 48, 42, 0.92);
    --glass-strong: #17302a;
    --glass-edge: rgba(255, 255, 255, 0.08);
    --text: #edf1e8;
    --muted: #c2d0c5;
    --line: rgba(255, 255, 255, 0.1);
    --field: #747b82;
    --soft: rgba(213, 237, 134, 0.14);
    --chip: rgba(255, 255, 255, 0.07);
    --accent: #d5ed86;
    --accent-ink: #d5ed86;
    --accent-text: #172d2a;
    --focus: #d5ed86;
    --head-bg: #102a24;
    --danger: #ff8a8f;
    --ok: #5fd49a;
    --warn-text: #f2b84b;
    --track: rgba(255, 255, 255, 0.12);
    --chart-warn: #f2b84b;
    --chart-muted: #5d777d;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-pop: 0 18px 44px rgba(0, 0, 0, 0.6);
  }
}
@media (prefers-contrast: more) {
  :root { --glass: var(--surface); --glass-edge: var(--text); --line: var(--muted); }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background-color: var(--bg);
  background-image: radial-gradient(900px 520px at 6% -8%, var(--bg-a), transparent 65%), radial-gradient(800px 480px at 100% 0%, var(--bg-b), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1, h2 { line-height: 1.25; margin: 0; }
h1 { font-size: 1.3rem; }
h2 { font-size: 1.05rem; }
p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
a { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
/* A control that is shown but switched off for now: light grey, not clickable. */
.check-row.is-locked { color: #b9bdc2; cursor: not-allowed; }
.check-row.is-locked input { cursor: not-allowed; opacity: 0.45; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1:focus-visible { outline-offset: 5px; border-radius: 10px; }
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Frosted surfaces: a translucent fill with a soft blur where the browser supports it, a solid fill where it does not */
.tile, .card, .table-wrap, .day, .request-card, .news-item {
  background: var(--glass-strong);
  border: 1px solid var(--glass-edge);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .tile, .card, .table-wrap, .day, .request-card, .news-item {
    background: var(--glass);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    backdrop-filter: blur(16px) saturate(1.2);
  }
}

.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-text); padding: 8px 16px; border-radius: 999px; }
.skip:focus { top: 8px; }

/* Layout: a dark header across the top, a navigation menu under its right edge, then the tab strip and the content. */
.shell { min-height: 100vh; }

.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--head-h); display: flex; align-items: center; gap: 16px; padding: 0 20px;
  background: var(--head-bg); color: var(--head-text); border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topbar :focus-visible { outline-color: var(--side-mark); }
.topbar { font-size: 14px; line-height: 20px; }
.top-left { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: none; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--side-mark); }
.brand-name { color: var(--head-text); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-logo { height: 28px; width: auto; max-width: 160px; object-fit: contain; flex: none; }
.brand-preview { max-height: 64px; width: auto; max-width: 100%; padding: 4px; border: 1px solid rgba(128, 128, 128, 0.4); border-radius: 6px; background: #ffffff; }
.qr { width: 192px; height: 192px; padding: 4px; background: #ffffff; }
.recovery-codes { columns: 2; list-style: none; margin: 0; padding: 0; font-family: ui-monospace, monospace; }
.secret { word-break: break-all; }
.heading { flex: 1; min-width: 0; }
.heading h1 { font-size: 22px; line-height: 28px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; flex: none; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.12); }
/* Header controls use the same compact interaction rhythm at every viewport: a 36px touch target with an 18px symbol. */
.topbar > .top-centre .icon-btn, .topbar > .top-right .icon-btn, .topbar > .top-centre .bell { width: 36px; height: 36px; }
.topbar > .top-centre .icon, .topbar > .top-right .icon { width: 18px; height: 18px; }
.search-toggle { display: grid; }
.search-close { display: none; }
.tools { display: flex; align-items: center; gap: 8px; flex: none; }

/* Main menu: a compact right-hand panel opened by the hamburger. */
.sidebar {
  display: none; position: fixed; top: calc(var(--head-h) + 8px); right: 12px; z-index: 60; width: min(var(--launcher-menu-width, 240px), calc(100vw - 24px)); max-height: calc(100dvh - var(--head-h) - 20px); padding-top: 12px; font-size: 14px; line-height: 20px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; box-shadow: var(--shadow-pop);
}
.sidebar[data-drawer="open"] { display: block; }
.sidebar::-webkit-scrollbar { display: none; }
.side-nav { padding: 0 10px 16px; }
.launcher-return { display: flex; align-items: center; gap: 8px; min-height: 42px; margin: 0 0 12px; padding: 0 12px; border-radius: 10px; background: var(--soft); color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.launcher-return:hover { background: color-mix(in srgb, var(--accent) 16%, var(--soft)); }
.side-group { margin: 16px 12px 6px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; height: 16px; line-height: 16px; overflow: hidden; }
.sidebar .icon, .inner .icon { width: 18px; height: 18px; }
.navlink {
  display: flex; align-items: center; gap: 11px; width: 100%; height: 34px; margin: 0; padding: 0 12px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text); font: inherit; text-decoration: none; cursor: pointer; text-align: left;
}
.navlink:hover { background: var(--soft); }
.navlink[aria-current="page"] { background: var(--accent); color: var(--accent-text); font-weight: 500; }
.navlink.nav-parent-current:not([aria-current="page"]) { color: var(--accent-ink); font-weight: 700; }
.nav-entry { margin: 0; }
.nav-children { display: grid; gap: 1px; margin: 1px 0 5px 23px; padding: 2px 0; list-style: none; border-left: 1px solid var(--line); }
.nav-child { height: 31px; padding-left: 12px; font-size: 13px; }
.nav-child.is-disabled { color: var(--muted); opacity: 0.6; cursor: default; }
.label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { padding-top: var(--head-h); min-height: 100vh; display: flex; flex-direction: column; }
.workspace { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* Search: at every width it starts as the lens. Opening it grows the field leftwards while the live notification actions keep their place. */
.search { position: relative; flex: none; min-width: 0; }
.search-field { position: relative; display: none; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.2); color: var(--head-muted); }
.search[data-open="true"] { flex: 1 1 320px; }
.search[data-open="true"] .search-toggle { display: none; }
.search[data-open="true"] .search-field { display: flex; }
.search-field:focus-within { background: rgba(255, 255, 255, 0.14); outline: 3px solid var(--side-mark); outline-offset: 2px; }
.search-input { flex: 1; min-width: 0; min-height: 28px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--head-text); font: inherit; }
.search-input::placeholder { color: var(--head-muted); opacity: 1; }
.search-input:focus-visible { outline: none; }
.search-input::-webkit-search-cancel-button { appearance: none; }
.search-pop { position: absolute; top: calc(100% + 8px); right: 0; width: min(320px, calc(100vw - 24px)); z-index: 50; padding: 6px; border-radius: 8px; background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-pop); }
.search-pop[hidden] { display: none; }
.search-opt { display: grid; gap: 1px; padding: 9px 14px; border-radius: 6px; cursor: pointer; }
.search-opt:hover { background: var(--soft); }
.search-opt[aria-selected="true"] { background: var(--soft); box-shadow: inset 0 0 0 2px var(--accent); }
.search-opt-last { font-weight: 600; }
.search-status { padding: 6px 14px 4px; }

/* Tabs (the sub-menu): a plain white strip, the open tab in the accent colour with an underline */
.tabs { position: sticky; top: var(--head-h); z-index: 9; background: var(--surface); border-bottom: 1px solid var(--line); padding: 0 19px; overflow-x: auto; scrollbar-width: none; font-size: 14px; line-height: 20px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs ul { display: flex; gap: 21px; }
.tabs a { display: block; min-width: 44px; text-align: center; padding: 15px 0 11px; border-bottom: 2px solid transparent; text-decoration: none; color: var(--muted); white-space: nowrap; font-weight: 500; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--accent-ink); border-bottom-color: var(--accent-ink); font-weight: 600; }
.body { flex: 1; display: flex; align-items: flex-start; gap: 20px; min-width: 0; padding: 24px 28px 32px; }
/* The inner menu follows the main menu: the same flat white column, 34 px rows, 6 px corners, filled open item */
.body.with-inner { gap: 0; padding: 0; }
.with-inner .content { padding: 24px 28px 32px; }
.inner { flex: none; align-self: flex-start; width: 203px; height: calc(100vh - var(--head-h) - 49px); position: sticky; top: calc(var(--head-h) + 49px); overflow-y: auto; padding: 20px 10px; background: var(--surface); border-right: 1px solid var(--line); font-size: 14px; line-height: 20px; }
.inner a { display: flex; align-items: center; height: 34px; padding: 0 12px; margin: 0; border-radius: 6px; text-decoration: none; color: var(--text); }
.inner a:hover { background: var(--soft); }
.inner a[aria-current="page"] { background: var(--accent); color: var(--accent-text); font-weight: 500; }
.content { flex: 1; min-width: 0; }
.content:focus-visible { outline: none; }
.stack { display: grid; gap: 16px; }
.narrow { max-width: 520px; }
.card { border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.empty { max-width: 640px; }
.empty-note { padding: 8px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Language switch: a pill with two segments */
.lang { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--chip); }
.lang-btn { min-width: 36px; min-height: 28px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.04em; cursor: pointer; }
.lang-btn:hover { color: var(--text); }
.lang-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
.user-panel .lang { justify-self: start; margin: 0; }
@media (pointer: coarse) { .lang-btn { min-height: 36px; min-width: 44px; } }

/* Sign-in */
.signin { min-height: 100vh; min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 20px; padding: 24px; }
@media (max-width: 640px) { .signin { align-content: start; padding-top: 7vh; } }
.signin-top { width: min(420px, 100%); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.signin-top .brand { padding: 0; color: var(--accent); }
.signin-top .brand-name { color: var(--text); }
.signin-card { width: min(420px, 100%); gap: 16px; padding: 28px; }
.field { display: grid; gap: 6px; }
.field > select, .field > input:not([type="checkbox"]):not([type="radio"]) { max-width: 480px; }
.field label { font-weight: 600; font-size: 0.92rem; }

/* Fields and buttons: large radius everywhere */
input, select, textarea { border: 1px solid var(--field); border-radius: var(--radius-field); background: var(--surface); color: var(--text); font: inherit; }
input, select, textarea { font-size: 14px; line-height: 20px; }
input, select { min-height: 36px; padding: 0 12px; }
textarea { padding: 7px 12px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 24px; height: 24px; min-height: 0; padding: 0; }
/* Buttons are the width of their text, 34 px high with 6 px corners; full width only on a phone (and the sign-in card) */
button.primary { width: fit-content; min-height: 34px; padding: 0 16px; border: 0; border-radius: 6px; background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 500; cursor: pointer; }
button.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
button.secondary { width: fit-content; min-height: 34px; padding: 0 16px; border: 1px solid var(--accent); border-radius: 6px; background: transparent; color: var(--accent-ink); font: inherit; font-weight: 500; cursor: pointer; }
button.secondary:hover { background: var(--soft); }
button.secondary:disabled, button.primary:disabled { opacity: 0.6; cursor: progress; }
button.primary, button.secondary { font-size: 14px; line-height: 20px; }
.signin-card button.primary { width: 100%; }
/* The Show / Hide button of every password field (lib/password-toggle.ts) sits inside the field, on its right. */
.pw-wrap { position: relative; display: block; width: 100%; max-width: 480px; }
.pw-wrap > input { width: 100%; box-sizing: border-box; padding-right: 84px; }
.pw-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); min-width: 64px; min-height: 30px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--accent-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pw-toggle:hover { background: var(--soft); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 640px) { .pw-toggle { min-height: 36px; } }
.form-status:empty { display: none; }
.form-status { color: var(--danger); display: grid; gap: 4px; }
.form-status .muted { color: var(--muted); }
.form { display: grid; gap: 14px; max-width: 480px; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { min-height: 0; width: 24px; height: 24px; flex: none; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.filters .field { min-width: 160px; }

/* Header: bell and profile button */
.bell-wrap { position: relative; }
.bell-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 45; width: min(380px, 92vw); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-pop); font-size: 14px; line-height: 20px; }
.bell-panel[hidden] { display: none; }
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 600; }
.bell-list { max-height: 60vh; overflow-y: auto; padding: 6px; display: grid; gap: 2px; align-content: start; }
.bell-item { display: grid; gap: 2px; padding: 8px 10px; border-radius: 6px; text-decoration: none; color: var(--text); }
.bell-item:hover { background: var(--soft); }
.bell-item.unread { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.bell-item.unread .bell-text { font-weight: 600; }
.bell-foot { padding: 10px 12px; border-top: 1px solid var(--line); }
.bell-panel .form-status { padding: 0 12px; }
.choices { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.choices legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.choices.indent { margin-left: 32px; }
.bell { position: relative; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; background: transparent; font: inherit; cursor: pointer; flex: none; border-radius: 50%; color: var(--head-text); text-decoration: none; }
.bell:hover { background: rgba(255, 255, 255, 0.12); }
.badge { position: absolute; top: 1px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--side-mark); color: #10252a; font-size: 0.7rem; font-weight: 700; display: grid; place-items: center; }
.badge[hidden], .user-panel[hidden] { display: none; }
/* The unread counts in red: on the profile button (the total), at the entries of its menu and at the side menu entries (build 28). */
.count-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #d92d20; color: #fff; font-size: 0.7rem; font-weight: 700; line-height: 1; display: inline-grid; place-items: center; flex: none; box-sizing: border-box; }
.count-badge[hidden] { display: none; }
.user-btn { position: relative; }
.user-badge { position: absolute; top: 2px; left: 28px; border: 2px solid var(--head-bg); min-width: 22px; height: 22px; }
.entry-label { flex: 1; }
.navlink .nav-badge { margin-left: auto; }
.user { position: relative; }
/* The corner shows only a round picture (photo or initials) and a small caret, no frame and no name. */
.user-btn { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 6px; border: 0; border-radius: 22px; background: transparent; color: var(--head-text); font: inherit; cursor: pointer; }
.user-btn:hover { background: rgba(255, 255, 255, 0.12); }
.user-label { display: none; }
.user-caret .icon { width: 14px; height: 14px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: #e4e6ec; color: #1c2540; display: grid; place-items: center; font-weight: 600; font-size: 0.75rem; flex: none; overflow: hidden; }
/* The signed-in account control follows the compact header proportion while retaining Clessidra's round avatar. */
.topbar .user-btn .avatar { width: 26px; height: 26px; }
.user-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 45; width: min(var(--account-menu-width, 280px), calc(100vw - 24px)); padding: 10px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); display: grid; align-content: start; gap: 0; }
.user-name { margin: 0; font-weight: 700; }
.navlink-light { display: flex; align-items: center; gap: 11px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.navlink-light:hover { background: var(--soft); }

/* Tiles: a title bar with a thin divider, then the body */
.home { display: grid; gap: 16px; width: 100%; margin-inline: auto; }
.home-head { display: grid; gap: 2px; padding: 0 4px; }
.dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; align-items: start; }
.tile { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tile.wide { grid-column: 1 / -1; }
.tile-title { padding: 16px 22px; border-bottom: 1px solid var(--line); font-size: 1rem; font-weight: 650; }
.tile-body { padding: 20px 22px; display: grid; gap: 12px; }
.big { font-size: 1.6rem; font-weight: 650; line-height: 1.2; }
.status { display: flex; align-items: center; gap: 10px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 25%, transparent); }
.dot.break { background: var(--warn-text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn-text) 25%, transparent); }
.info-members { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.info-members li { align-items: center; }
.chip { display: inline-block; justify-self: start; padding: 3px 14px; border-radius: 999px; background: var(--chip); border: 1px solid var(--line); font-size: 0.9rem; }
.more { display: inline-flex; align-items: center; min-height: 40px; color: var(--accent); font-weight: 600; justify-self: start; }
.problem { display: grid; gap: 8px; color: var(--danger); }
.problem .muted { color: var(--muted); }
.news-list { display: grid; gap: 8px; }
.news-list li { display: flex; gap: 8px; align-items: baseline; }
.new { flex: none; padding: 0 9px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: 0.72rem; font-weight: 700; }
.news-title { min-width: 0; overflow-wrap: anywhere; }
.week { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; height: 150px; align-items: stretch; }
.week li { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 4px; min-width: 0; }
.week-value { font-size: 0.78rem; color: var(--muted); min-height: 1.1em; }
.week-bar { width: 70%; display: flex; align-items: flex-end; background: var(--track); border-radius: 999px; overflow: hidden; }
.week-bar span { display: block; width: 100%; background: var(--accent); border-radius: 999px; }
.week-day { font-size: 0.8rem; color: var(--muted); text-transform: capitalize; }
/* Manager tiles: a number and what it counts; each row opens the screen where the work is done */
.counts { display: grid; gap: 2px; }
.count-row { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 4px 12px; margin: 0 -12px; border-radius: 6px; text-decoration: none; }
.count-row:hover { background: var(--soft); }
.count { min-width: 2.4ch; font-size: 1.6rem; font-weight: 650; line-height: 1.2; color: var(--accent); text-align: right; font-variant-numeric: tabular-nums; }
.count.zero { color: var(--muted); font-weight: 500; }
.count-label { min-width: 0; overflow-wrap: anywhere; }

/* Charts drawn by us */
.tone-accent { --tone: var(--accent); }
.tone-warn { --tone: var(--chart-warn); }
.tone-muted { --tone: var(--chart-muted); }
.tone-ok { --tone: var(--ok); }
.ring { position: relative; width: 96px; height: 96px; flex: none; }
.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-svg circle { fill: none; stroke-width: 11; }
.ring-track { stroke: var(--track); }
.ring-arc { stroke: var(--tone); }
.ring-centre { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.2rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.rings { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); gap: 20px 12px; }
.rings li { display: grid; justify-items: center; gap: 6px; text-align: center; }
.gauge { position: relative; width: 170px; height: 96px; margin: 0 auto; }
.gauge-svg { width: 100%; height: 100%; }
.gauge-svg path { fill: none; stroke-width: 10; stroke-linecap: round; }
.gauge-track { stroke: var(--track); }
.gauge-arc { stroke: var(--accent); }
.gauge-centre { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 1.5rem; font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; }
.segbar { display: flex; gap: 3px; height: 12px; border-radius: 999px; overflow: hidden; background: var(--track); }
.seg { display: block; height: 100%; min-width: 4px; background: var(--tone); border-radius: 999px; }
.balances { display: grid; gap: 18px; }
.balances li { display: grid; gap: 6px; }
.ring-name { font-weight: 600; }
.dial { display: grid; justify-items: center; gap: 6px; text-align: center; }

/* Shared kit: pills, tables, dialogs, toast, pager */
.pill { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 650; border: 1px solid currentColor; background: color-mix(in srgb, currentColor 10%, transparent); white-space: nowrap; }
.pill.ok { color: var(--ok); }
.pill.warn { color: var(--warn-text); }
.pill.info { color: var(--accent-ink); }
.pill.muted { color: var(--muted); }
.pill.danger { color: var(--danger); }
.table-wrap { overflow-x: auto; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 12px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--chip); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--soft); }
td { overflow-wrap: break-word; min-width: 4.5em; }
.summary-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.bubble { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; max-width: 42rem; background: var(--surface); }
.bubble.mine { margin-left: auto; background: var(--soft); }
.bubble p { margin: 0 0 4px; overflow-wrap: anywhere; white-space: pre-wrap; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; max-width: 26rem; }
/* The page of an integration has many tabs: its window is wider and the tab strip may use all of it, so the tabs sit in one row on a desktop. */
.dialog:has(.page-tabs) { width: min(880px, 94vw); }
.page-tabs { max-width: none; margin-bottom: 12px; }
.area-chip { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 3px; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); vertical-align: -1px; }
/* Printing the schedule: only the sheet is printed */
@media print {
  body * { visibility: hidden; }
  .print-sheet, .print-sheet * { visibility: visible; }
  .print-sheet { position: absolute; left: 0; top: 0; width: 100%; }
  .no-print { display: none; }
}
/* The schedule board: people (or areas) by day, a rail of people; cards on a phone */
.board-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; align-items: start; }
.board-main { overflow-x: auto; }
.board { border-collapse: collapse; width: 100%; font-size: 13px; }
.board th, .board td { border: 1px solid var(--line, #ccc); padding: 4px; vertical-align: top; text-align: left; min-width: 84px; }
.board th[scope='row'] { min-width: 140px; position: sticky; left: 0; background: var(--surface, #fff); }
.board .today { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.board-band th { background: var(--chip); }
.board-cell:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.board-card { display: grid; gap: 2px; padding: 4px 6px; margin-bottom: 4px; border-radius: 6px; background: var(--chip); cursor: grab; }
.board-card.draft { border-left: 4px solid #b7791f; }
.board-context-menu { position: fixed; z-index: 50; margin: 0; padding: 4px 0; list-style: none; background: var(--surface, #fff); color: var(--text, #111); border: 1px solid var(--border, #ccc); border-radius: 6px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18); min-width: 12rem; }
.board-context-menu button { display: block; width: 100%; text-align: left; padding: 6px 12px; }
.board-context-menu button:hover, .board-context-menu button:focus-visible { background: var(--chip); }
.shift-parts { display: flex; flex-wrap: wrap; gap: 4px; }
.shift-parts .part { padding-left: 4px; }
.board-card.published { border-left: 4px solid var(--accent); }
.board-card.sel { outline: 2px solid var(--accent); }
.board-card.leave { border-left: 4px solid #805ad5; cursor: default; }
.board-card.leave.pending { border-left-style: dashed; }
.board th.holiday { background: var(--chip); }
.board-card.hl { box-shadow: 0 0 0 2px #d69e2e; }
.hl-row { background: color-mix(in srgb, #d69e2e 15%, transparent); }
.board-rail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.linklike { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; min-height: 32px; }
@media (max-width: 640px) {
  .board-wrap { grid-template-columns: 1fr; }
  .board thead { display: none; }
  .board, .board tbody, .board tr, .board th, .board td { display: block; width: 100%; }
  .board td { border: 0; border-top: 1px solid var(--line, #ccc); min-width: 0; }
  .board td::before { content: attr(data-label); display: block; font-weight: 600; font-size: 12px; }
  .board td:not(:has(.board-card)) { display: none; }
  .board th[scope='row'] { position: static; }
}
.row-actions button, td button { min-height: 30px; padding: 0 12px; font-size: 13px; }
.row-actions > a { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; padding: 0 6px; }
/* On a phone every table row becomes a small card: the first cell is its title, the other cells show "label  value", the buttons sit at the bottom. */
@media (max-width: 640px) {
  .table-wrap { overflow: visible; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  tbody tr { display: grid; gap: 6px; margin-bottom: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
  tbody tr:last-child { margin-bottom: 0; }
  tbody tr:hover td { background: none; }
  td { display: grid; grid-template-columns: minmax(84px, 36%) 1fr; align-items: baseline; gap: 10px; min-width: 0; padding: 0; border: 0; }
  td::before { content: attr(data-label); font-size: 0.74rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
  td:empty { display: none; }
  td.cell-title { display: block; font-size: 1rem; font-weight: 650; }
  td.cell-title::before, td.cell-actions::before, td[data-label=""]::before { display: none; }
  td.cell-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }
  td.cell-actions .row-actions { max-width: none; }
}
.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.page-btn { display: grid; place-items: center; width: 40px; height: 40px; min-height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--glass-strong); color: var(--text); font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; }
.page-btn:hover:not(:disabled) { background: var(--soft); }
.page-btn:disabled { opacity: 0.45; cursor: default; }
.page-btn[aria-current="page"] { background: var(--accent); color: var(--accent-text); border-color: transparent; font-weight: 650; }
.page-gap { width: 24px; text-align: center; color: var(--muted); }
.dialog { width: min(520px, 92vw); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); padding: 24px; box-shadow: var(--shadow-pop); }
.dialog::backdrop { background: rgba(6, 16, 18, 0.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dialog h2 { margin-bottom: 14px; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px); z-index: 60; max-width: 90vw; padding: 12px 22px; border-radius: 999px; background: var(--text); color: var(--bg); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; box-shadow: var(--shadow-pop); }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* My schedule */
.week-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.week-label { margin-left: auto; }
.days { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.day { border-radius: var(--radius-md); padding: 12px; display: grid; gap: 8px; align-content: start; }
.day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.day h3 { font-size: 0.9rem; margin: 0; }
.day ul { display: grid; gap: 6px; }
.shift { display: grid; gap: 2px; padding: 8px 12px; border-radius: 6px; background: var(--chip); justify-items: start; }
.shift.mine { box-shadow: inset 4px 0 0 var(--accent); }

/* Documents and news */
.request-card { display: grid; gap: 10px; padding: 16px; border-radius: var(--radius-md); max-width: 520px; }
.news-item { display: grid; gap: 8px; padding: 16px; border-radius: var(--radius-md); }
.news-item.unread { box-shadow: inset 4px 0 0 var(--accent); }
.news-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.news-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.news-item button { justify-self: start; }

.scrim { display: none; }

/* Touch devices and narrow windows */
@media (max-width: 899px), (hover: none) {
  .brand-name { display: none; }
  .top-left { width: auto; }
  .topbar { padding: 0 10px 0 16px; gap: 8px; }
  .heading h1 { font-size: 1.05rem; }
  .user-label, .user-caret { display: none; }
  .user-btn { padding: 0 6px; border: 0; }
  .topbar .user-btn .avatar { width: 24px; height: 24px; }
  /* The search becomes a button; opened, its field covers the header (the header is the positioned parent, so .search must not be) */
  .search { position: static; flex: none; }
  .search-toggle { display: grid; }
  .search-field { display: none; }
  .search[data-open="true"] .search-field { display: flex; position: absolute; z-index: 5; inset: 8px 10px; height: auto; background: var(--head-bg); }
  .search-close { display: grid; margin-right: -8px; }
  .search-pop { max-height: 60vh; overflow-y: auto; }
  .tabs { padding: 0 16px; }
  .tabs ul { gap: 22px; }
  .body { padding: 16px 12px 24px; }
  .body.with-inner { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px 12px 24px; }
  .with-inner .content { padding: 0; }
  .inner { position: static; align-self: stretch; width: auto; height: auto; padding: 6px; overflow-x: auto; scrollbar-width: none; border: 1px solid var(--line); border-radius: 8px; }
  button.wide-btn { width: 100%; }
  .bell-wrap { position: static; }
  .bell-panel { left: 8px; right: 8px; top: calc(100% + 4px); width: auto; }
  button.primary, button.secondary { min-height: 44px; }
  input, select { min-height: 44px; }
  .inner a { height: 40px; }
  .inner ul { display: flex; gap: 4px; }
  .inner a { white-space: nowrap; }
  .toast { bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Owner portal (the operator door): a plain header and one centred column; it reuses the tiles, tables, dialogs and sign-in card. */
.owner-shell { min-height: 100vh; background: var(--bg); }
.owner-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; min-height: var(--head-h); padding: 8px 20px; background: var(--head-bg); color: var(--head-text); font-size: 14px; line-height: 20px; }
.owner-top :focus-visible { outline-color: var(--side-mark); }
.owner-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.owner-name { color: #a9afb4; }
.owner-top h1.brand { margin: 0; font: inherit; }
.owner-top button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1px solid var(--side-hover); border-radius: 6px; background: transparent; color: var(--head-text); font: inherit; cursor: pointer; }
.owner-top button:hover { background: var(--side-hover); }
@media (max-width: 899px), (hover: none) { .owner-top button { min-height: 44px; } }
.owner-main { max-width: 980px; margin: 0 auto; padding: 24px 16px 48px; display: grid; gap: 16px; }
.owner-main:focus-visible { outline: none; }
.owner-customer { margin: 0; font-size: 1.25rem; }

/* On a phone the three week buttons share one row (the label goes below them). */
@media (max-width: 640px) {
  .week-nav { display: grid; grid-template-columns: repeat(3, 1fr); }
  .week-nav > :not(button) { grid-column: 1 / -1; }
  .week-nav button { padding: 6px 8px; line-height: 1.2; text-align: center; }
}

/* Kiosk terminal: the screen of a shared device. Big controls, few choices. */
.kiosk-form { display: grid; gap: 14px; max-width: 420px; margin: 0 auto; }
.kiosk-input { font-size: 24px; min-height: 56px; text-align: center; letter-spacing: 2px; }
.kiosk-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kiosk-key { min-height: 64px; font-size: 24px; justify-content: center; text-align: center; }
.kiosk-punch { min-height: 64px; font-size: 22px; justify-content: center; width: 100%; }
.kiosk-status { min-height: 56px; font-size: 20px; text-align: center; }
.kiosk-ok { color: #1f7a3d; font-weight: 600; }
.kiosk-bad { color: #b3261e; }
/* Printing a payslip: only the open dialog is printed, without its buttons. */
@media print {
  body > *:not(dialog) { display: none !important; }
  dialog[open] { position: static !important; box-shadow: none !important; border: 0 !important; max-width: none !important; width: 100% !important; }
  .no-print, .dialog-actions { display: none !important; }
}

/* The report library: the landing list, the strip of figures, the standing remarks and the sort buttons of a table. */
.report-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.report-link { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line, #ececec); border-radius: 8px; text-decoration: none; color: inherit; }
.report-link:hover, .report-link:focus-visible { border-color: var(--accent, #4a69e8); }
.report-tile .tile-picture { color: var(--accent, #4a69e8); }
/* The classic reports landing: twelve tiles, a greyed one says why. */
.cls-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.cls-tile { display: grid; gap: 6px; align-content: start; padding: 12px; border: 1px solid var(--line, #ececec); border-radius: 8px; }
.cls-tile.cls-grey { opacity: 0.75; }
.cls-counters { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.cls-counter strong { font-size: 1.05rem; }
.cr-embed-frame { display: block; }
.stat-strip { display: flex; flex-wrap: wrap; gap: 12px; }
.stat { display: grid; gap: 2px; padding: 8px 12px; border: 1px solid var(--line, #ececec); border-radius: 8px; min-width: 96px; }
.stat strong { font-size: 1.15rem; }
.caveats { border-left: 3px solid var(--line, #ececec); padding-left: 12px; }
.caveats h4 { margin: 0 0 4px; }
.caveats ul { margin: 0; padding-left: 18px; }
.sort-button { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; text-align: inherit; }
.sort-button:focus-visible { outline: 2px solid var(--accent, #4a69e8); outline-offset: 2px; }
th.num, td.num { text-align: right; }

/* Report charts: six series colours (each with enough contrast on a white card), tooltips are the SVG titles; a legend below. */
.report-chart { margin: 0; display: grid; gap: 8px; }
.report-chart-svg { width: 100%; height: auto; max-width: 720px; }
.report-chart-svg .rc-axis { font-size: 11px; fill: var(--muted, #5f6468); }
.report-chart-svg .rc-grid { stroke: var(--line, #ececec); stroke-width: 1; }
.report-chart-svg .rc-line { stroke-width: 2.5; }
.report-chart-svg .rc-area { opacity: 0.25; }
.rc-s0 { fill: #3a53b0; stroke: #3a53b0; }
.rc-s1 { fill: #c75b12; stroke: #c75b12; }
.rc-s2 { fill: #2a7d43; stroke: #2a7d43; }
.rc-s3 { fill: #8a3ea8; stroke: #8a3ea8; }
.rc-s4 { fill: #a1812b; stroke: #a1812b; }
.rc-s5 { fill: #0e7c86; stroke: #0e7c86; }
.rc-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.rc-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.modify-panel { border: 1px solid var(--line, #ececec); border-radius: 8px; padding: 8px 12px; }
.modify-panel summary { cursor: pointer; font-weight: 600; }
.col-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.col-row { display: grid; grid-template-columns: auto 1fr minmax(120px, 220px) auto; gap: 8px; align-items: center; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 2px 8px; border: 1px solid var(--line, #ececec); border-radius: 999px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--link, #3a53b0); text-decoration: underline; cursor: pointer; }

/* A table or a chart made full screen; the rows that hold the highlighted text; the first columns kept in view when the table is wide. */
.report-block { display: grid; gap: 8px; }
.report-block.maximised { position: fixed; inset: 0; z-index: 60; overflow: auto; padding: 16px; background: var(--card, #fff); align-content: start; }
.report-block.maximised .report-chart-svg { max-width: 100%; }
tr.row-highlight td, tr.row-highlight th { background: var(--highlight, #fff3b0); color: var(--ink, inherit); }
.table-wrap th.frz, .table-wrap td.frz { position: sticky; z-index: 1; background: var(--card, #fff); min-width: 9rem; max-width: 9rem; }
.table-wrap .frz-0 { left: 0; }
.table-wrap .frz-1 { left: 9rem; }
.table-wrap .frz-2 { left: 18rem; }

/* Print (and so PDF through the browser's print page): only the report is printed. */
@media print {
  body * { visibility: hidden; }
  .report-print, .report-print * { visibility: visible; }
  .report-print { position: absolute; left: 0; top: 0; width: 100%; border: 0; box-shadow: none; }
  .no-print { display: none !important; }
  .table-wrap { overflow: visible; }
  .report-chart-svg { max-width: 100%; }
  .cr-pagebreak { break-after: page; }
}

/* Custom reports: the elements of a report, the colours of conditional formatting and the editor. */
.cr-element, .cr-container { display: grid; gap: 8px; }
.cr-border { border: 2px solid var(--line, #ececec); border-radius: 8px; padding: 12px; }
.cr-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.cr-head h4 { margin: 0; }
.cr-export { display: inline-flex; gap: 10px; }
.cr-divider { border: 0; border-top: 1px solid var(--muted, #8a8894); width: 100%; margin: 4px 0; }
.cr-pagebreak { height: 0; }
.cr-image { height: auto; }
.cr-colour-violet { color: #3d1cba; border-color: #3d1cba; }
.cr-colour-grey { color: #5f6468; border-color: #8a8894; }
.cr-colour-green { color: #1e6b34; border-color: #1e6b34; }
.cr-colour-red { color: #b3261e; border-color: #b3261e; }
.cr-colour-amber { color: #8a4b08; border-color: #b8620a; }
.cr-colour-blue { color: #1d4ea8; border-color: #1d4ea8; }
.cr-colour-black { color: #1e163c; border-color: #1e163c; }
hr.cr-divider.cr-colour-violet { border-top-color: #3d1cba; }
hr.cr-divider.cr-colour-grey { border-top-color: #8a8894; }
hr.cr-divider.cr-colour-green { border-top-color: #1e6b34; }
hr.cr-divider.cr-colour-red { border-top-color: #b3261e; }
hr.cr-divider.cr-colour-amber { border-top-color: #b8620a; }
hr.cr-divider.cr-colour-blue { border-top-color: #1d4ea8; }
hr.cr-divider.cr-colour-black { border-top-color: #1e163c; }
.cr-tablist { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line, #ececec); }
.cr-tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 6px 12px; font: inherit; cursor: pointer; }
.cr-tab[aria-selected='true'] { border-bottom-color: var(--accent, #4a69e8); font-weight: 650; }
.cr-trellis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.cr-panel { margin: 0; }
.cr-tone-green { background: #dff3e4; color: #14532a; }
.cr-tone-red { background: #fbe0de; color: #7a1a14; }
.cr-tone-amber { background: #fdebd0; color: #6d3a05; }
.cr-tone-blue { background: #dbe6fb; color: #173e8a; }
.cr-scale-1 { background: #eef1fc; }
.cr-scale-2 { background: #d9e0f8; }
.cr-scale-3 { background: #bcc8f2; }
.cr-scale-4 { background: #97a8e9; }
.cr-scale-5 { background: #6f86de; color: #fff; }
.cr-bold { font-weight: 700; }
.cr-underline { text-decoration: underline; }
.cr-total th, .cr-total td { font-weight: 700; border-top: 2px solid var(--line, #ececec); }
.cr-tree { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cr-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 8px; border: 1px solid var(--line, #ececec); border-radius: 8px; }
.cr-row.selected { border-color: var(--accent, #4a69e8); background: color-mix(in srgb, var(--accent, #4a69e8) 8%, transparent); }
.cr-row-actions { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.cr-form, .cr-control { border: 1px solid var(--line, #ececec); border-radius: 8px; padding: 12px; }
.cr-editor .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.cr-editor .field { min-width: 160px; }

/* Binders (Profile settings, Business settings): topics as a list on the left, a strip of choices above the content, a grey place kept for later. */
@media (min-width: 641px) { .body.binder .inner { height: calc(100vh - var(--head-h)); top: var(--head-h); } }
.inner .is-disabled { display: flex; align-items: center; height: 34px; padding: 0 12px; color: var(--muted); opacity: 0.6; cursor: default; user-select: none; }
.subtabs { margin: 0 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; font-size: 14px; line-height: 20px; }
.subtabs ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.subtabs a { display: block; padding: 8px 0; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.subtabs a:hover { color: var(--text); }
.subtabs a[aria-current="page"] { color: var(--text); font-weight: 500; border-bottom-color: var(--accent); }
.subtabs .is-disabled { display: block; padding: 8px 0; color: var(--muted); opacity: 0.6; }
/* Every menu strip that can be wider than the screen: arrows at both ends, shown only when there is more on that side. */
.has-arrows { display: flex; align-items: stretch; }
.has-arrows > ul { flex: 1 0 auto; }
.strip-arrow { position: sticky; z-index: 2; flex: none; display: flex; align-items: center; justify-content: center; width: 32px; padding: 0; border: 0; background: var(--surface); color: var(--text); cursor: pointer; }
.strip-arrow[hidden] { display: none; }
.strip-arrow:hover { background: var(--soft); }
.strip-arrow .icon { width: 18px; height: 18px; }
.strip-prev { left: 0; box-shadow: 8px 0 8px -8px rgba(0, 0, 0, 0.25); }
.strip-next { right: 0; box-shadow: -8px 0 8px -8px rgba(0, 0, 0, 0.25); }
.photo-frame { display: block; width: 160px; height: 160px; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); background: var(--soft); }
.photo-empty { background: var(--soft); }
.photo-rules { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
ul.integrations { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.integration a { display: grid; justify-items: center; gap: 8px; width: 110px; padding: 12px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); text-decoration: none; }
.integration a:hover { background: var(--soft); }
/* The directory ("Add more"): one card per system, in a grid, with a round badge of initials, the words and a status line. */
ul.integration-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.integration-card { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.integration-badge { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; font-weight: 700; font-size: 20px; color: #fff; }
.integration-body { display: grid; gap: 6px; align-content: start; min-width: 0; }
.integration-body h3 { margin: 0; font-size: 16px; }
.integration-body p { margin: 0; }
.integration-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }

/* Round pictures of people: in lists ("face"), on a person's card ("face lg"), and in the corner of the top bar (".avatar img"). */
.face { display: inline-grid; place-items: center; width: 32px; height: 32px; margin-right: 8px; border-radius: 50%; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 600; overflow: hidden; vertical-align: middle; flex: none; }
.face.lg { width: 96px; height: 96px; margin-right: 0; font-size: 30px; }
.face img, .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.person-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }

/* B5: the board's status bar, day boxes, cell tools, selection bar and rail menu */
.board-counters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.board-counters .counter { padding: 4px 8px; font-size: 0.85rem; }
.board-counters .counter.on { outline: 2px solid var(--accent); }
.day-note { padding: 0 4px; }
.day-note.has { color: var(--accent); }
.day-note-text { white-space: normal; max-width: 12rem; }
.day-box { white-space: normal; }
.cell-add { opacity: 0; border: 0; background: transparent; color: var(--muted, #667); cursor: pointer; width: 1.6rem; height: 1.6rem; }

/* where people clocked in and out, and the map of sites: a plain plan drawn from points (no map service) */
.geo-plan { max-width: 100%; height: auto; display: block; }
.geo-bg { fill: var(--chip); }
.geo-grid { stroke: var(--line); stroke-width: 1; }
.geo-radius { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 4; }
.geo-site { fill: var(--danger); stroke: var(--text); stroke-width: 1; }
.geo-site-dot { fill: var(--surface); }
.geo-in { fill: var(--ok); stroke: var(--surface); stroke-width: 1.5; }
.geo-out { fill: var(--accent); stroke: var(--surface); stroke-width: 1.5; }
.geo-far { stroke: var(--danger); stroke-width: 3; }
.geo-scale { stroke: var(--text); stroke-width: 2; }
.geo-north { fill: none; stroke: var(--text); stroke-width: 1.5; }
.geo-text { fill: var(--text); font-size: 11px; paint-order: stroke; stroke: var(--surface); stroke-width: 3; }
.geo-key { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; }
.geo-key-item { display: inline-flex; align-items: center; gap: 6px; }
.geo-site-block { margin: 12px 0; }
.geo-map { position: relative; }
.geo-pin { cursor: pointer; }
.geo-pin:focus { outline: 2px solid var(--focus); }
.geo-card { position: absolute; transform: translate(-50%, 8px); display: grid; gap: 6px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); z-index: 2; }
.geo-card[hidden] { display: none; }
.board-cell:hover .cell-add, .board-cell:focus-within .cell-add, .cell-add:focus-visible { opacity: 1; }
.board-card { position: relative; }
.board-card.picked { outline: 2px dashed var(--accent); }
.board-card.away { border-left: 4px solid #a0aec0; cursor: default; background: transparent; border: 1px dashed #a0aec0; }
.board-card.regular { cursor: default; background: transparent; border: 1px dotted #a0aec0; opacity: 0.7; }
.resize-handle { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; touch-action: none; }
.selection-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; margin: 0 0 10px; border: 1px solid var(--accent); border-radius: 8px; }
.rail-menu { display: inline-block; margin-left: 4px; }
.rail-menu > ul { margin: 4px 0 0; padding-left: 1rem; list-style: none; }
.keys { list-style: none; padding: 0; display: grid; gap: 4px; }
.place-factors { padding-left: 1.2rem; }
.metrics-menu { display: inline-block; margin-left: 8px; }
.notice { padding: 8px 10px; border-radius: 8px; border: 1px solid #d69e2e; margin: 0 0 10px; }

/* hiring depth: the candidates board, the weekly bars of a listing, a file shown in a dialog */
.stage-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.stage-tabs button { min-height: 32px; padding: 0 12px; font-size: 13px; }
.card-group { display: grid; gap: 8px; }
.card-group h3 { margin: 8px 0 0; font-size: 15px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.cand-card { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line, #d9dde3); border-radius: var(--radius); background: var(--surface, #fff); }
.cand-card p { margin: 0; }
.bars { display: flex; align-items: flex-end; gap: 14px; min-height: 120px; padding: 8px 0; }
.bar-col { display: grid; justify-items: center; gap: 4px; min-width: 40px; }
.bar { width: 28px; background: var(--accent, #3a53b0); border-radius: 4px 4px 0 0; }
.bar-value { font-weight: 600; font-size: 13px; }
.preview-media { max-width: 100%; max-height: 70vh; border-radius: var(--radius); }
.preview-frame { width: 100%; height: 70vh; border: 1px solid var(--line, #d9dde3); border-radius: var(--radius); }

/* a document opened in the page: the file on the left, the information bar on the right (which can be hidden) */
.preview-layout { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.preview-main { flex: 1 1 24rem; min-width: 0; max-height: 70vh; overflow: auto; }
.preview-info { flex: 0 1 18rem; min-width: 14rem; }
.preview-info[hidden] { display: none; }

/* plan labels (build 27, B35) */
.plan-marks { display: inline-flex; gap: 4px; align-items: center; margin-left: 6px; vertical-align: middle; }
.plan-mark { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--soft); color: var(--accent-ink); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); font-size: 11px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; }
.plan-mark[data-plan-included="false"] { color: var(--muted); border-style: dashed; }
.plan-chip { display: inline-block; padding: 0 6px; border-radius: 999px; border: 1px solid var(--muted); color: var(--muted); font-size: 11px; font-weight: 600; }
.navlink .plan-mark, .tabs .plan-mark { text-transform: none; }

/* compact table rows (the viewer's choice on the hours list) */
.compact-table td, .compact-table th { padding-top: 0.15rem; padding-bottom: 0.15rem; font-size: 0.9em; }

/* Localised file chooser text; the native input still handles keyboard, focus and file selection. */
.file-picker { position: relative; display: flex; gap: 12px; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line, #cbd0d7); border-radius: 8px; }
.field input.file-picker-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.file-picker:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.file-picker:has(input:disabled) { opacity: 0.55; }
.file-picker-action { flex-shrink: 0; font-weight: 600; color: var(--accent-ink); }
.file-picker-status { min-width: 0; overflow-wrap: anywhere; color: var(--muted); }

/* Header: account at the left, an operational strip in the centre, and navigation at the right. */
.topbar { gap: 12px; }
.top-left { width: auto; margin-right: 0; gap: 10px; min-width: 0; flex: none; }
.navigation-button { border-radius: 8px; color: var(--head-text); }
.navigation-button:hover { background: rgba(255, 255, 255, 0.12); }
.top-centre .heading { flex: none; min-width: 0; }
.top-centre .heading h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-centre { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.top-centre .search { flex: none; }
.notification-bar { min-height: 36px; padding: 2px 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); }
.top-right { flex: none; display: flex; align-items: center; }
.user-left .user-panel { right: auto; left: 0; }

.scrim[data-drawer="open"] { display: block; position: fixed; top: var(--head-h); right: 0; bottom: 0; left: 0; z-index: 55; background: transparent; }
.user-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px 8px; border-bottom: 1px solid var(--line); }
.user-panel-identity { display: flex; align-items: center; min-width: 0; gap: 12px; }
.user-panel-avatar { width: 36px; height: 36px; }
.user-panel .navlink-light .icon { width: 18px; height: 18px; }
.user-panel-section { display: grid; gap: 0; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.user-panel-kicker { height: 16px; margin: 12px 12px 6px; padding: 0; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: 0.06em; line-height: 16px; text-transform: uppercase; }
.user-close { color: var(--text); }
.workspace-choice[aria-current="true"] { background: var(--soft); color: var(--accent-ink); font-weight: 700; }
.user-panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 2px 4px; }
.user-sign-out { min-height: 34px; padding: 0 10px; }
.top-action { position: relative; }
.top-badge { position: absolute; top: -4px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border: 2px solid var(--head-bg); font-size: 0.65rem; line-height: 14px; }
.launcher { flex: 1; min-width: 0; max-width: none; width: 100%; margin: 0 auto; padding: clamp(28px, 6vw, 72px) clamp(20px, 5vw, 64px) 64px; }
/* Desktop cards keep a fixed width and reflow into the available number of columns. */
.launcher-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); justify-content: center; gap: 16px; margin: 0; padding: 0; list-style: none; }
.launcher-tile { display: block; color: var(--text); text-decoration: none; }
.launcher-icon-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 14px; min-height: 116px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease; }
.launcher-tile:hover .launcher-icon-card { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-pop); }
.launcher-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 12px; }
.module-return { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; margin: 0 0 12px; color: var(--accent-ink); font-size: 0.875rem; font-weight: 750; text-decoration: none; }
.module-return:hover { text-decoration: underline; }
.module-return:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.module-return .icon { width: 18px; height: 18px; }
.module-home { width: 100%; max-width: none; margin-inline: auto; }
.module-home-heading { margin: 0 0 22px; }
.module-home-heading h2 { margin: 2px 0 6px; font-size: 28px; }
.module-home-heading p { margin: 0; }
.module-home-kicker { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.module-action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); justify-content: center; gap: 14px; margin: 0; padding: 0; list-style: none; }
.module-action { display: grid; grid-template-columns: 44px minmax(0, 1fr) 18px; align-items: center; gap: 13px; min-height: 98px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface); box-shadow: var(--shadow); text-decoration: none; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.module-action:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-pop); }
.module-action:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.module-action.primary { border-color: var(--accent); background: var(--soft); }
.module-action-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 10px; color: var(--deep); background: var(--paper); }
.module-action-icon .icon { width: 23px; height: 23px; }
.module-action-copy { display: grid; gap: 3px; }
.module-action-copy strong { font-size: 16px; }
.module-action-copy span { color: var(--muted); font-size: 13px; line-height: 1.35; }
.module-action > .icon { width: 18px; height: 18px; color: var(--muted); }

.launcher-icon { position: relative; display: grid; place-items: center; width: 64px; height: 64px; color: var(--accent); }
.launcher-icon .icon { width: 42px; height: 42px; }
.launcher-badge { position: absolute; top: 0; right: 0; border: 2px solid var(--surface); }
.launcher-copy { display: grid; min-width: 0; gap: 4px; align-content: center; }
.launcher-label { overflow-wrap: anywhere; font-size: 0.875rem; font-weight: 700; line-height: 1.25; }
.launcher-description { color: var(--muted); font-size: 0.75rem; line-height: 1.35; }
.launcher-empty { max-width: 520px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
@media (max-width: 899px), (hover: none) {
  .topbar { gap: 4px; padding: 0 8px; }
  .top-left { flex: none; max-width: min(42vw, 170px); gap: 5px; }
  .top-centre .heading { max-width: 88px; }
  .top-centre .heading h1 { font-size: 0.9rem; }
  .top-centre { flex: 1 1 auto; justify-content: flex-end; gap: 1px; }
  .top-centre .search { flex: none; }
  .top-centre .search[data-open="true"] { flex: 1 1 260px; }
  .notification-bar { gap: 0; padding: 0; background: transparent; }
  .user-left .user-panel { position: fixed; top: 0; right: auto; bottom: auto; left: 0; width: min(var(--account-menu-width, 280px), calc(100vw - 24px)); min-width: 0; max-height: calc(100dvh - 12px); padding: 12px 10px; border-radius: 0 20px 20px 0; overflow-y: auto; }
  .launcher { padding: 24px 8px 44px; }
  .launcher-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 84px), 1fr)); gap: 12px; }
  .launcher-grid > li { display:grid; min-width:0; }
  .launcher-tile { display: grid; width:100%; min-width:0; justify-items: stretch; align-content: start; }
  .launcher-icon-card { width:100%; min-width:0; justify-self:stretch; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr) auto; place-items: center; gap: 4px; min-height: 0; aspect-ratio: 1; box-sizing: border-box; padding: 8px 4px 7px; }
  .module-home { max-width: none; }
  .module-home-heading { margin-bottom: 16px; }
  .module-home-heading h2 { font-size: 24px; }
  .module-action-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
  .module-action { min-height: 88px; padding: 14px; }
  .launcher-icon { width: 42px; height: 42px; }
  .launcher-icon .icon { width: 38px; height: 38px; }
  .launcher-badge { top: -3px; right: -3px; }
  .launcher-copy { display:grid; width:100%; min-width:0; font-size:.67rem; min-height:2.4em; justify-items:center; align-content:center; }
  .launcher-label { width:100%; box-sizing:border-box; display: -webkit-box; min-height: 2.2em; overflow: hidden; padding: 0; font-size: 0.67rem; font-weight: 600; line-height: 1.1; text-align: center; text-overflow: ellipsis; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .launcher-description { display: none; }
}

/* Receipt tools are scoped to the new module; launcher styles are unchanged. */
.expenses-capture canvas { max-width:100%; max-height:60vh; width:auto; height:auto; touch-action:none; border-radius:var(--radius,12px); }
.expenses-preview {max-width:100%;max-height:70vh;object-fit:contain;}
.expenses-capture input[type=file] {max-width:100%;}

.expenses-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); justify-content:center; gap:16px; }
.expenses-fields .field { min-width:0; }
.expenses-fields input, .expenses-fields select, .expenses-fields textarea { width:100%; min-width:0; box-sizing:border-box; }
@media(max-width:640px) { .expenses-fields { grid-template-columns:1fr; } }

/* Collection grids use available width and keep their layout centred. */
.dash, .rings, .days, .report-list, .cls-grid, .cr-trellis, ul.integration-grid, .tiles { justify-content: center; min-width: 0; }
.launcher-grid > *, .module-action-grid > *, .dash > *, .days > *, .report-list > *, .cls-grid > *, .cr-trellis > *, ul.integration-grid > *, .tiles > *, .expenses-fields > * { min-width: 0; }

/* Personal monthly calendar: seven semantic weekday columns, fluid page width. */
.schedule-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }
.schedule-toolbar h2 { margin:0; text-transform:capitalize; }
.schedule-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch; gap:8px; width:100%; }
.schedule-summary > div { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:10px; padding:10px 12px; min-height:64px; box-sizing:border-box; border:1px solid var(--line); border-radius:8px; min-width:0; }
.schedule-summary strong { font-size:1.3rem; line-height:1.2; font-variant-numeric:tabular-nums; }
.schedule-summary span { color:var(--muted); font-size:.85rem; line-height:1.35; }
.schedule-month { display:grid; grid-template-columns:38px repeat(7,minmax(0,1fr)); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.schedule-weekday { padding:8px 2px; text-align:center; background:var(--soft); font-weight:600; font-size:.85rem; }
.schedule-date { display:flex; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:4px; min-width:0; min-height:110px; padding:8px; background:var(--surface); color:var(--text); border:0; border-radius:0; text-align:left; font:inherit; cursor:pointer; }
.schedule-date.outside { background:var(--bg); color:var(--muted); }
.schedule-date.today .schedule-date-number { border-radius:50%; background:var(--accent); color:var(--accent-text); }
.schedule-date-number { display:grid; place-items:center; align-self:flex-start; width:26px; height:26px; }
.schedule-date[aria-pressed=true] { outline:2px solid var(--accent); outline-offset:-2px; }
.schedule-date:focus-visible { outline:3px solid var(--accent); outline-offset:-3px; }
.schedule-event { display:block; padding:3px; background:var(--chip); color:var(--text); border-radius:4px; font-size:.78rem; overflow-wrap:anywhere; }
.schedule-day-detail { display:grid; gap:8px; }
@media(max-width:640px) { .schedule-overview > .tile-body {padding:10px;} .schedule-date {min-height:78px;padding:3px;gap:3px;} .schedule-date-number {width:23px;height:23px;} .schedule-event {font-size:.6rem;padding:2px;} .schedule-weekday {font-size:.65rem;} }

.schedule-week-number { display:grid; place-items:center; background:var(--soft); color:var(--muted); font-size:.75rem; font-weight:600; }
@media(max-width:640px) { .schedule-month {grid-template-columns:29px repeat(7,minmax(0,1fr));} .schedule-week-number {font-size:.6rem;} }

@media(max-width:640px) { .schedule-summary {gap:8px;} .schedule-summary > div {padding:8px 10px;gap:8px;} .schedule-summary span {font-size:.75rem;overflow-wrap:normal;} .schedule-summary strong {font-size:1.2rem;} }

.schedule-view-switch { display:flex; gap:4px; flex-wrap:wrap; }
.schedule-view-switch button[aria-pressed=true] {background:var(--accent);color:var(--accent-text);border-color:var(--accent);}
.schedule-agenda {border:1px solid var(--line);border-radius:10px;overflow:hidden;}
.schedule-agenda-head,.schedule-agenda-body {display:grid;grid-template-columns:48px repeat(var(--agenda-days),minmax(0,1fr));}
.schedule-agenda-head {padding-right:14px;background:var(--soft);border-bottom:1px solid var(--line);}
.schedule-agenda-day {min-width:0;min-height:48px;padding:6px 3px;border:0;border-left:1px solid var(--line);border-radius:0;background:var(--surface);color:var(--text);font:inherit;font-size:.8rem;cursor:pointer;}
.schedule-agenda-day.today {font-weight:700;color:var(--accent);}
.schedule-agenda-day[aria-pressed=true] {box-shadow:inset 0 -3px var(--accent);}
.schedule-agenda-scroll {max-height:65vh;overflow-y:scroll;scrollbar-gutter:stable;}
.schedule-agenda-body {height:1152px;background:var(--surface);}
.schedule-time-rail {position:relative;background:var(--soft);}
.schedule-time-rail span {position:absolute;left:3px;font-size:.7rem;color:var(--muted);}
.schedule-time-column {position:relative;min-width:0;border-left:1px solid var(--line);background:repeating-linear-gradient(to bottom,transparent 0,transparent 47px,var(--line) 47px,var(--line) 48px);}
.schedule-timed-event {position:absolute;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:3px;padding:5px 3px;border:1px solid var(--accent);border-radius:5px;background:var(--chip);color:var(--text);font:inherit;font-size:.72rem;overflow:auto;text-align:left;cursor:pointer;overflow-wrap:anywhere;}
.schedule-timed-event strong {font-size:inherit;}
@media(max-width:640px) { .schedule-agenda-head,.schedule-agenda-body {grid-template-columns:35px repeat(var(--agenda-days),minmax(0,1fr));} .schedule-agenda-head {padding-right:14px;} .schedule-agenda-day {font-size:.6rem;} .schedule-time-rail span {font-size:.6rem;} .schedule-timed-event {font-size:.6rem;padding:3px 1px;} .schedule-view-switch {width:100%;} .schedule-view-switch button {flex:1;} }

button.module-action { width:100%; font:inherit; text-align:left; }
button.module-action:disabled { opacity:1; cursor:default; color:var(--text); }
button.module-action:disabled .module-action-copy > span { color:var(--muted); }

button.launcher-tile {padding:0;border:0;background:transparent;font:inherit;color:inherit;text-align:inherit;}
button.launcher-tile:disabled {opacity:1;cursor:default;}
button.navlink:disabled {opacity:1;color:var(--muted);cursor:default;font:inherit;text-align:left;border:0;background:transparent;}

/* Consistent event colours and labels in all calendar views. */
.schedule-legend {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(24px,auto);column-gap:8px;row-gap:0;width:100%;box-sizing:border-box;padding-top:8px;border-top:1px solid var(--line);align-items:stretch;}
.schedule-legend-item {display:grid;grid-template-columns:8px minmax(0,1fr);align-items:center;column-gap:8px;min-width:0;padding:3px 0;font-size:.75rem;line-height:1.4;color:var(--muted);background:transparent;}
.schedule-legend-item::before {content:"";width:8px;height:8px;flex:0 0 8px;border-radius:2px;background:var(--event-edge,var(--accent));}
.event-shift {--event-fill:#e5efe9;--event-edge:#235c45;--event-ink:#163b2b;}
.event-annual {--event-fill:#e3edff;--event-edge:#315bb0;--event-ink:#18366d;}
.event-permit {--event-fill:#eee5ff;--event-edge:#7d49b5;--event-ink:#4d2476;}
.event-sick {--event-fill:#ffe5e5;--event-edge:#bc4b53;--event-ink:#762630;}
.event-absence {--event-fill:#ffe9d5;--event-edge:#b86c25;--event-ink:#743f13;}
.event-holiday {--event-fill:#fff4cf;--event-edge:#9b7821;--event-ink:#604a12;}
.event-availability {--event-fill:#dff4f2;--event-edge:#24786e;--event-ink:#164b45;}
.event-unavailable {--event-fill:#e9eaf0;--event-edge:#707587;--event-ink:#3f4555;}
.event-overtime {--event-fill:#fbe2ef;--event-edge:#a74078;--event-ink:#6f244e;}
.event-attendance {--event-fill:#dcf1ff;--event-edge:#2777a6;--event-ink:#174f71;}
.schedule-event[class*=event-],.schedule-timed-event[class*=event-] {background:var(--event-fill);color:var(--event-ink);border-left:3px solid var(--event-edge);}
.schedule-event[class*=event-] {text-decoration:none;}
.schedule-timed-event[class*=event-] {border-color:var(--event-edge);}
.schedule-allday {display:grid;grid-template-columns:48px repeat(var(--agenda-days),minmax(0,1fr));padding-right:14px;background:var(--surface);border-bottom:1px solid var(--line);}
.schedule-allday-cell {display:grid;align-content:start;gap:3px;padding:3px;min-width:0;border-left:1px solid var(--line);}
.schedule-allday > .schedule-weekday {font-size:.65rem;overflow-wrap:anywhere;}
@media(max-width:640px){.schedule-allday {grid-template-columns:35px repeat(var(--agenda-days),minmax(0,1fr));}.schedule-allday-cell .schedule-event {font-size:.6rem;}.schedule-legend-item {font-size:.75rem;}}

/* Daily absence intervals keep both times and the add button on one line. */
.leave-time-range { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:8px; align-items:end; max-width:540px; }
.leave-time-range > .field { min-width:0; }
.leave-time-range select { width:100%; min-width:0; }
.leave-time-range > button { min-width:44px; min-height:44px; }

.top-left .launcher-home { width:36px; height:36px; color:inherit; text-decoration:none; flex:none; }
.top-left .launcher-home .icon { width:20px; height:20px; }

/* Compact month: fixed rows never grow with the number or length of events. */
.schedule-month { max-width:520px; width:100%; margin-inline:auto; grid-template-columns:38px repeat(7,minmax(0,1fr)); grid-template-rows:32px repeat(6,64px); gap:0; background:var(--surface); border:0; }
.schedule-month .schedule-weekday { padding:6px 0; background:var(--surface); }
.schedule-month .schedule-date { height:64px; min-height:0; max-height:64px; padding:2px; gap:2px; align-items:center; overflow:hidden; }
.schedule-month .schedule-date-number { width:28px; height:28px; flex:none; align-self:center; font-size:.95rem; }
.schedule-month .schedule-event { width:100%; box-sizing:border-box; height:16px; min-height:16px; line-height:14px; padding:1px 2px; flex:none; font-size:.65rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; overflow-wrap:normal; }
.schedule-month .schedule-more { display:block; height:12px; line-height:8px; font-size:20px; font-weight:700; flex:none; }
.schedule-month .schedule-date[aria-pressed=true]:not(:focus-visible) { outline:none; }
.schedule-month .schedule-date[aria-pressed=true] .schedule-date-number { border-radius:50%; background:var(--accent); color:var(--accent-text); }
@media(max-width:640px) { .schedule-month {grid-template-columns:29px repeat(7,minmax(0,1fr));} }

.leave-notice-banner { margin:0; padding:16px; border:2px solid var(--accent); border-radius:10px; background:var(--surface); font-size:1.1rem; font-weight:700; line-height:1.5; }

.leave-bonus-status {margin:0;color:var(--accent);font-size:.85rem;font-weight:600;}
.leave-bonus-dialog {max-width:440px;padding:4px 0 0;line-height:1.6;}
.leave-bonus-emblem {display:grid;place-items:center;width:64px;height:64px;border-radius:20px;background:#edf3e8;color:#184b3d;font-size:1.4rem;font-weight:800;margin-bottom:20px;}
.leave-bonus-quarter {font-size:.72rem;font-weight:750;letter-spacing:.06em;color:var(--accent);margin:0 0 8px;}
.leave-bonus-lead {font-size:1.5rem;font-weight:750;line-height:1.25;margin:0 0 12px;}
.leave-bonus-approval {padding:14px 16px;border-radius:12px;background:var(--bg);font-size:.9rem;margin:20px 0;}
.leave-bonus-actions {display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:24px;}
.leave-bonus-actions button {min-height:46px;border-radius:12px;}

.dialog:has(.leave-notice-popup) {width:min(360px,calc(100vw - 32px));padding:16px;}
.dialog:has(.leave-notice-popup) > h2 {border:2px solid var(--accent);border-radius:10px;padding:16px;font-size:1.1rem;line-height:1.5;margin:0 0 16px;}
.leave-notice-popup .leave-bonus-status {font-size:.85rem;font-weight:500;margin:0 0 16px;}
.leave-notice-popup .leave-notice-confirm {background:#238636;border-color:#238636;color:#fff;}
.leave-notice-popup .leave-notice-confirm:hover {background:#1b6f2b;border-color:#1b6f2b;}
