:root {
  --color-training-primary: #5B3F86;
  --color-training-unpaid: #CBBEDD;
  --color-training-soft: #eee8f5;
  --color-training-current: #b72f24;
  --color-training-empty: #f0f1f0;
  --color-training-muted: #5d6260;
  --color-training-weekend-bg: #f7f7f7;
  --color-training-weekend-line: #d9dddb;
  --color-training-public: #dce0de;
  --color-training-today: #bc3328;
  --color-training-paid-bg: #f7f4fb;
  --color-training-paid-border: #e0d7ec;
  --color-training-chip-border: #a28abf;
  --color-training-chip-bg: #fcfaff;
  --color-training-issue: #8b6116;
  --color-training-delete: #b33228;
  --color-training-changed-bg: #fff7e6;
  --color-training-changed-border: #dcab4b;
  --color-training-notice-border: #e5bf73;
  --color-training-notice-text: #79551a;

  --color-payroll-office-tag: #edf0ee;
  --color-payroll-office-text: #505b57;
  --color-payroll-office-stripe: #e1e5e4;
  --color-payroll-office-base: #f4f5f5;
  --color-payroll-public-text: #1F4E7A;
  --color-payroll-public-bg: #E8F1FB;
  --color-payroll-closed-dot: #ce4937;
  --color-training: #453a78;
  --color-training-bg: #e8e5f1;
  --color-training-pattern: repeating-linear-gradient(135deg, var(--color-training-bg) 0 8px, var(--color-training) 8px 16px);
  --color-planned-over-contract: var(--color-team-overtime);
  --color-holiday-over-allowance: #e99bb5;
  --color-holiday-upcoming: #7fb39e;
  --color-team-attention-bg: #fff8e6;
  --color-team-attention-border: #f0dda8;
  --color-team-break-edge: #c0391b;
  --color-team-overtime: #e8b54a;
  --color-team-track: #e6ebe8;
  --color-team-empty-month: #eef0ef;
  --color-team-absence-medium: #b5a89d;
  --color-team-shift-empty: #e9eeeb;
  --color-team-amber-text: #8a5b00;
  --color-team-amber-bg: #fcedc8;
  --color-team-blue-bg: #e6eef3;
  --color-working-selection-glow: rgba(46,107,91,.18);
  --color-working-menu-shadow: rgba(21,32,28,.22);
  --color-working-delete-hint: #b4655a;
  --color-working-delete-hover: #fbf3f1;
  --color-profile-pending: #f3d58c;
  --color-profile-left: #e3e9e6;
  --color-profile-left-border: #cdd7d2;
  --color-profile-divider: #cfd6d3;
  --color-profile-alert-shadow: rgba(180,46,26,.3);
  --color-profile-alert: #fff6f4;
  --color-profile-alert-border: #f1c6ba;
  --color-profile-holiday: #8cc2ab;
  --color-cancellation-amber-edge: #c98a12;
  --color-draft-outline: #e0a526;
  --color-draft-ghost: rgba(63,102,128,.08);
  --color-draft-shadow: rgba(21,32,28,.24);
  --color-audit-payroll-bg: #e5ecfa;
  --color-audit-payroll-text: #25448a;
  --color-audit-shadow: rgba(21,32,28,.16);
  --color-absence-lunch-edge: rgba(125,111,100,.45);
  --color-holiday-lunch-hatch: rgba(255,255,255,.75);
  --color-holiday-lunch-edge: rgba(46,107,91,.35);
  --color-working-fill: #3f6680;
  --color-working-edge: #294c63;
  --color-working-lunch-grey: #cfdce4;
  --color-cancellation-amber: #f6dfa4;
  --color-cancellation-border: var(--color-calendar-pending-border);
  --color-cancellation-text: #7a4e00;
  --color-cancellation-row: #fffcf4;
  --color-cancellation-glow: rgba(217,169,63,.25);
  --color-request-band: rgba(217,169,63,.10);
  --color-toast-progress: rgba(46,107,91,.3);
  --color-absence-hours-border: #c9d6ee;
  --color-absence-last-edge: #7a8a84;
  --color-absence-cover-none: #b42e1a;
  --color-absence-recent-edge: #e8873a;
  --color-absence-reference: #f6f7fd;
  --color-absence-missing-note: #fffcf5;
  --color-absence-childcare: #7a5bc7;
  --color-absence-family: #0e8a86;
  --color-absence-recent: #fff1e2;
  --color-brand: #2e6b5b;
  --color-brand-hover: #1d4d40;
  --color-brand-soft: #e3eeea;
  --color-nav-text: #3e4a46;
  --color-avatar-bg: #dce7e3;
  --color-brand-tint: #f6fbf9;
  --color-brand-border: #a9cbbe;
  --color-focus-ring: #cfe3dc;
  --color-page: #f4f6f5;
  --color-surface: #ffffff;
  --color-surface-alt: #fafbfa;
  --color-border: #dde3e0;
  --color-divider: #edf0ef;
  --color-border-strong: #b9c3bf;
  --color-input-border: #9eaaa5;
  --color-input-border-visible: #8a9590;
  --color-text: #15201c;
  --color-text-muted: #55625d;
  --color-text-subtle: #8a9590;
  --color-pending-bg: #fcf0d6;
  --color-pending-text: #6e4a00;
  --color-approved-bg: #e2f1e9;
  --color-approved-text: #1e5a40;
  --color-declined-bg: #fbe6e1;
  --color-declined-text: #9a2e1f;
  --color-cancelled-bg: #ecefee;
  --color-cancelled-text: #46524e;
  --color-holiday-bg: #e3eeea;
  --color-holiday-text: #1d4d40;
  --color-absence-bg: #e4ded8;
  --color-absence-text: #4a3f37;
  --color-admin-bg: #ede7f8;
  --color-admin-text: #4b2c86;
  --color-warning-bg: #fff9ec;
  --color-warning-border: #e8cf95;
  --color-warning-text: #6e4a00;
  --color-warning-icon: #b7791f;
  --color-destructive: #a3321f;
  --color-destructive-border: #e3b4aa;
  --color-calendar-approved-bg: #cfe5da;
  --color-calendar-approved-text: #174536;
  --color-calendar-pending-light: #fff6e0;
  --color-calendar-pending-dark: #fcebc2;
  --color-calendar-pending-border: #d9a93f;
  --color-calendar-absence-bg: var(--color-absence-bg);
  --color-calendar-absence-edge: #7d6f64;
  --color-calendar-holiday-bg: #e6ddf7;
  --color-calendar-holiday-edge: #6b4bb0;
  --color-calendar-lunch-light: #f1f4f3;
  --color-calendar-lunch-dark: #e2e7e5;
  --color-cover-full: #eef5f1;
  --color-cover-short: #f5d98f;
  --color-cover-none: #d9573a;
  --color-cover-none-hatch: #f6c9bf;
  --color-overlap-fill: rgba(192, 57, 27, .08);
  --color-overlap-edge: #e3a493;
  --color-shadow-soft: rgba(21, 32, 28, .06);
  --color-shadow-floating: rgba(21, 32, 28, .12);
  --color-dialog-overlay: rgba(21, 32, 28, .55);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  color: var(--color-text);
  background: var(--color-page);
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  --color-pairing-gap-light: #FFF6F4;
  --color-pairing-gap-dark: #FBE6E1;
  --color-pairing-gap-border: #C0391B;
  --color-pairing-gap-glow: rgba(192,57,27,.18);
  --color-pairing-border: #CFD6D3;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1200px; margin: 0 auto; padding: 32px clamp(24px, 3vw, 36px) 48px; }
a { color: var(--color-brand); }
a:hover { color: var(--color-brand-hover); }
button, input, select, textarea { font: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 3px; box-shadow: 0 0 0 3px var(--color-focus-ring); }
button:disabled { opacity: .55; cursor: not-allowed; }
.dashboard { max-width: none; padding: 0; }
.page-container { max-width: 1200px; margin: 0 auto; padding: 32px clamp(24px, 3vw, 36px) 48px; }
.page-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-heading h1 { margin: 0; }
.page-heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.app-bar { display: block; min-height: 56px; background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.app-bar-inner { max-width: 1200px; min-height: 56px; margin: 0 auto; padding: 0 clamp(24px, 3vw, 36px); display: flex; align-items: center; gap: 24px; }
.app-brand { display: inline-flex; flex: none; align-items: center; gap: 8px; color: var(--color-text); font-size: 17px; font-weight: 700; text-decoration: none; }
.app-brand-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--color-brand); }
.account-menu { position: relative; margin-left: auto; }
.account-menu summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 8px; border-radius: 8px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:hover, .account-menu[open] summary { background: var(--color-brand-soft); }
.account-avatar, .person-avatar { display: inline-grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: var(--color-brand-soft); color: var(--color-brand-hover); font-size: 12px; font-weight: 600; }
.account-dropdown { position: absolute; top: calc(100% + 4px); right: 0; z-index: 50; min-width: 200px; padding: 8px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 8px 24px var(--color-shadow-floating); }
.account-dropdown p { overflow-wrap: anywhere; margin: 4px 8px 8px; color: var(--color-text-muted); font-size: 12.5px; }
.account-dropdown a, .account-dropdown button { display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--color-text); text-align: left; text-decoration: none; font-size: 14px; font-weight: 500; }
.account-dropdown a:hover, .account-dropdown button:hover { background: var(--color-brand-soft); color: var(--color-brand-hover); }
.account-mobile-nav { display: none; }
.welcome { max-width: 32rem; }
.signin-page { box-sizing: border-box; min-height: 100vh; min-height: 100svh; max-width: none; margin: 0; padding: 1rem; display: flex; align-items: center; justify-content: center; background: var(--color-page); color: var(--color-text); font-family: "IBM Plex Sans", system-ui, sans-serif; }
.signin-column { width: min(100%, 400px); display: flex; flex-direction: column; gap: 22px; }
.signin-brand { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--color-text); font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1; }
.signin-brand-mark { display: inline-block; width: 30px; height: 30px; border-radius: 8px; background: var(--color-brand); }
.signin-card { box-sizing: border-box; display: grid; gap: 18px; width: 100%; padding: 32px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; box-shadow: 0 1px 2px var(--color-shadow-soft), 0 8px 24px var(--color-shadow-soft); }
.signin-card h1 { margin: 0; color: var(--color-text); font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.signin-form { gap: 18px; margin: 0; }
.signin-form label, .signin-password-control { gap: 6px; color: var(--color-text); font-size: 13px; font-weight: 600; }
.signin-password-control { display: grid; }
.signin-form input { box-sizing: border-box; width: 100%; min-height: 44px; padding: 11px 12px; border: 1px solid var(--color-input-border); border-radius: 8px; background: var(--color-surface); color: var(--color-text); font-size: 15px; font-weight: 400; }
.signin-form input:focus-visible { border: 2px solid var(--color-brand); outline: none; box-shadow: 0 0 0 3px var(--color-focus-ring); }
.signin-password-field { position: relative; display: block; }
.signin-password-field input { padding-right: 54px; }
.signin-password-toggle { position: absolute; top: 50%; right: 0; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--color-text-muted); }
.signin-password-toggle:hover { background: transparent; color: var(--color-brand-hover); }
.signin-password-toggle:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 1px; }
.signin-error-slot { min-height: 1.5rem; }
.signin-error-slot p { margin: 0; font-size: .9rem; line-height: 1.5rem; }
.signin-submit { box-sizing: border-box; width: 100%; height: 46px; padding: 0; border: 0; border-radius: 8px; background: var(--color-brand); color: var(--color-surface); font-size: 14px; font-weight: 600; }
.signin-submit:hover { background: var(--color-brand-hover); }
.signin-submit:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 3px; }
.signin-page a { color: var(--color-brand); }
.signin-page a:hover { color: var(--color-brand-hover); }
@media (max-width: 420px) { .signin-card { padding: 24px; } }
.eyebrow { font-size: .8rem; letter-spacing: .2em; font-weight: 700; }
h1 { font-size: clamp(28px, 3vw, 30px); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
h2 { font-size: 19px; font-weight: 600; line-height: 1.3; }
p { line-height: 1.5; }
form { display: grid; gap: 1rem; margin: 1.5rem 0; }
label { display: grid; gap: 6px; color: var(--color-text); font-size: 13px; font-weight: 600; }
input, select, textarea { min-height: 44px; padding: 10px 12px; border: 1px solid var(--color-input-border); border-radius: 8px; background: var(--color-surface); color: var(--color-text); font-size: 14px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border: 2px solid var(--color-brand); outline: 0; }
input[type=checkbox] { width: 1.2rem; height: 1.2rem; }
fieldset { border: 1px solid var(--color-border-strong); border-radius: 8px; display: flex; gap: 1.5rem; }
fieldset label { display: flex; align-items: center; text-transform: capitalize; }
button { min-height: 36px; padding: 8px 12px; border: 0; border-radius: 8px; background: var(--color-brand); color: var(--color-surface); cursor: pointer; font-size: 14px; font-weight: 600; }
button:hover { background: var(--color-brand-hover); }
.button-secondary { background: var(--color-surface); border: 1px solid var(--color-border-strong); color: var(--color-text); }
.button-secondary:hover { background: var(--color-surface-alt); }
.button-text { background: transparent; color: var(--color-brand); }
.button-text:hover { background: var(--color-brand-soft); color: var(--color-brand-hover); }
.button-destructive { background: var(--color-surface); border: 1px solid var(--color-destructive-border); color: var(--color-destructive); }
.button-destructive:hover { background: var(--color-declined-bg); }
header, .actions { display: flex; align-items: center; gap: .5rem; justify-content: space-between; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.admin-nav a { color: var(--color-text-muted); padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; text-decoration: none; }
.admin-nav a[aria-current=page] { background: var(--color-brand-soft); color: var(--color-brand-hover); font-weight: 600; }
.admin-nav a:hover { background: var(--color-brand-tint); color: var(--color-brand-hover); }
.job-role-selected { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; list-style: none; }
.job-role-selected li { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .4rem; background: var(--color-brand-soft); border-radius: .3rem; }
.job-role-selected button { padding: .1rem .35rem; }
.job-role-options { display: flex; flex-wrap: wrap; gap: .4rem; padding: .5rem; background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: .3rem; }
.job-role-options button { background: var(--color-brand-soft); color: var(--color-text); }
.job-role-options button:hover { background: var(--color-brand-border); }
.vacation-allowance-panel { margin: 1.5rem 0; padding: 1rem; background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: .5rem; }
.vacation-allowance-panel select { padding: .65rem; font: inherit; border: 1px solid var(--color-input-border); border-radius: .3rem; }
.vacation-allowance-panel textarea { width: 100%; min-height: 5rem; padding: .65rem; font: inherit; border: 1px solid var(--color-input-border); border-radius: .3rem; resize: vertical; box-sizing: border-box; }
table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
th, td { padding: .75rem; text-align: left; border-bottom: 1px solid var(--color-border-strong); }
[role=alert] { color: var(--color-destructive); }
@media (max-width: 40rem) { table { display: block; overflow-x: auto; } }
.absence-history { margin-top: 1.5rem; padding: 1rem; background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: .5rem; }
.absence-history h2 { margin: 0; }
.absence-history p { margin: .5rem 0; }
.absence-history ul { margin: .5rem 0 0; padding-left: 1.25rem; }
.absence-history li { margin: .3rem 0; }
.manager-requests { margin-top: 1.5rem; padding: 1rem; background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: .5rem; }
.manager-requests-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.manager-requests-heading h2 { margin: 0; }
.manager-requests li { margin-bottom: 1rem; line-height: 1.6; }
.manager-requests .actions { justify-content: flex-start; margin-top: .4rem; }
.request-activities-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.request-activities-heading h2 { margin: 0; }
.request-activity-filters { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; }
.request-activity-filters select { min-width: 11rem; padding: .65rem; font: inherit; border: 1px solid var(--color-input-border); border-radius: .3rem; }
.request-activity-list { margin: 0; padding: 0; list-style: none; }
.request-activity-list li { padding: 1rem 0; border-top: 1px solid var(--color-divider); }
.request-activity-list p { margin: .3rem 0; }
.request-activity-list time { color: var(--color-text-muted); font-size: .9rem; }
.request-activity-type { color: var(--color-brand); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.request-activity-note { padding-left: .75rem; border-left: 3px solid var(--color-input-border); }
.calendar-event-tooltip { position: fixed; z-index: 30; display: grid; gap: .25rem; width: min(19rem, calc(100vw - 1rem)); padding: .7rem .85rem; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: .4rem; box-shadow: 0 .3rem 1rem var(--color-shadow-floating); line-height: 1.35; pointer-events: none; }
.calendar-event-tooltip strong { margin-bottom: .15rem; }
.short-notice-label { color: var(--color-destructive); font-weight: 700; }

.working-hours-calendar { --agreed-block-color: var(--color-border-strong); --actual-work-color: var(--color-approved-text); --holiday-color: var(--color-brand); --absence-color: var(--color-calendar-absence-edge); --lunch-color: var(--color-warning-icon); --calendar-axis-width: 2.75rem; margin: 1.5rem 0; padding: 1rem; background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: .5rem; }
.calendar-heading { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.working-hours-calendar .fc-timegrid-axis, .working-hours-calendar .fc-timegrid-slot-label { width: var(--calendar-axis-width); min-width: var(--calendar-axis-width); max-width: var(--calendar-axis-width); }
.working-hours-calendar .fc-event.calendar-agreed-shift { background: var(--agreed-block-color); border-color: var(--color-input-border); color: var(--color-text); cursor: grab; }
.working-hours-calendar .fc-event.calendar-available { background: var(--actual-work-color); border-color: var(--color-brand-hover); cursor: default; }
.working-hours-calendar .fc-event.calendar-approved-holiday { background: var(--holiday-color); border-color: var(--color-absence-text); cursor: default; }
.working-hours-calendar .fc-event.calendar-absence { background: var(--absence-color); border-color: var(--color-calendar-absence-edge); cursor: default; }
.working-hours-calendar .fc-event.calendar-lunch { background: var(--lunch-color); border-color: var(--color-warning-text); cursor: grab; }
.working-availability-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin: .6rem 0 1rem; }
.working-availability-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.availability-swatch { display: inline-block; width: .9rem; height: .9rem; border-radius: .2rem; }
.availability-swatch.agreed { background: var(--agreed-block-color); }
.availability-swatch.available { background: var(--actual-work-color); }
.availability-swatch.holiday { background: var(--holiday-color); }
.availability-swatch.absence { background: var(--absence-color); }
.availability-swatch.lunch { background: var(--lunch-color); }
.calendar-shift-content { display: flex; flex-direction: column; gap: .1rem; padding: .15rem .25rem; line-height: 1.2; }
.calendar-lunch-footer { display: grid; overflow-x: auto; margin-top: .35rem; border: 1px solid var(--color-border-strong); border-radius: .3rem; }
.calendar-lunch-day { display: grid; grid-template-rows: repeat(5, 1.8rem) auto; gap: .1rem; align-content: start; align-items: start; justify-items: start; padding: .35rem .3rem; border-left: 1px solid var(--color-border-strong); text-align: left; font-size: .7rem; line-height: 1.2; }
.calendar-lunch-day.calendar-past-day { background: var(--color-divider); }
.calendar-lunch-actions { display: flex; width: 100%; }
.calendar-lunch-actions button { width: 100%; min-height: 2.25rem; padding: .45rem .3rem; background: var(--lunch-color); color: var(--color-surface); font-size: .85rem; }
.calendar-lunch-actions button:hover:not(:disabled) { background: var(--color-warning-text); }
.calendar-lunch-actions button:disabled { opacity: .4; cursor: default; }
.calendar-lunch-menu { position: fixed; z-index: 15; display: grid; gap: .25rem; width: 10rem; padding: .4rem; background: var(--color-surface); border: 1px solid var(--color-input-border); border-radius: .35rem; box-shadow: 0 .3rem 1rem var(--color-shadow-floating); }
.calendar-lunch-menu button { padding: .4rem .55rem; text-align: left; }
.calendar-weekend-toggle { display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 1rem; }
.calendar-period-context { margin-bottom: .8rem; }
.calendar-period-context h3 { margin: 0; font-size: 1.25rem; }
.calendar-period-context p { margin: .25rem 0; }
.calendar-period-context .calendar-hours-warning { color: var(--color-destructive); }
.calendar-hours-breakdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: .75rem 0; }
.calendar-week-summary { border: 1px solid var(--color-input-border); border-radius: .5rem; padding: .75rem 1rem; background: var(--color-brand-tint); }
.calendar-week-summary.is-current { border: 3px solid var(--color-brand); padding: calc(.75rem - 2px) calc(1rem - 2px); }
.calendar-week-summary h4 { margin: 0 0 .5rem; }
.calendar-week-summary p { margin: .25rem 0; }
.calendar-week-summary .week-hours-agreed { color: var(--color-text-muted); }
.calendar-week-summary .week-hours-actual { color: var(--actual-work-color); }
.calendar-week-summary .week-hours-holiday { color: var(--holiday-color); }
.calendar-week-summary .week-hours-absence { color: var(--absence-color); }
.calendar-week-summary .week-hours-office { color: var(--color-text-muted); }
.calendar-week-summary .week-hours-lunch { color: var(--lunch-color); }
@media (max-width: 650px) { .calendar-hours-breakdown { grid-template-columns: 1fr; } }
.working-hours-calendar .fc-timegrid-col.calendar-past-day { background: var(--color-divider); }
.working-hours-calendar .fc-col-header-cell.calendar-past-day { background: var(--color-calendar-lunch-dark); }
.working-hours-calendar .calendar-past-day .fc-event { filter: grayscale(1); opacity: .6; }
.calendar-date-editor { display: flex; align-items: end; flex-wrap: wrap; }
.calendar-confirmation { position: fixed; z-index: 10; inset: auto 1rem 1rem; max-width: 40rem; margin: auto; padding: 1.5rem; background: var(--color-surface); border: 2px solid var(--color-brand); border-radius: .5rem; box-shadow: 0 0 0 100vmax var(--color-dialog-overlay); }
.calendar-confirmation textarea { width: 100%; min-height: 5rem; padding: .65rem; font: inherit; border: 1px solid var(--color-input-border); border-radius: .3rem; resize: vertical; box-sizing: border-box; }
.period-past-warning { color: var(--color-destructive); font-weight: 700; }
.calendar-past-warning { color: var(--color-destructive); font-weight: 700; }
.calendar-confirmation .actions { justify-content: flex-start; flex-wrap: wrap; }

.payroll-panel { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--color-border-strong); }
.payroll-actions { display: flex; align-items: end; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.payroll-actions select { padding: .65rem; font: inherit; border: 1px solid var(--color-input-border); border-radius: .3rem; }
.payroll-panel .fc-event { background: var(--color-absence-text); border-color: var(--color-absence-text); }

/* Shared cards, lists, and status language */
.card, .vacation-allowance-panel, .absence-history, .manager-requests, .working-hours-calendar, .payroll-panel, .table-card {
  margin: 0 0 24px; padding: 24px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: none;
}
.payroll-panel { border-top: 1px solid var(--color-border); }
.table-card { padding: 0; overflow-x: auto; }
table { min-width: 640px; margin: 0; font-size: 14px; font-variant-numeric: tabular-nums; }
th { background: var(--color-surface-alt); color: var(--color-text-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
th, td { padding: 11px 16px; border-bottom: 1px solid var(--color-divider); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
.numeric-cell, th.numeric-cell { text-align: right; font-variant-numeric: tabular-nums; }
.person-cell { display: inline-flex; align-items: center; gap: 10px; }
.person-cell small { display: block; color: var(--color-text-muted); font-size: 12.5px; }
.row-menu { position: relative; }
.row-menu summary { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; color: var(--color-text-muted); cursor: pointer; list-style: none; }
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu summary:hover { background: var(--color-brand-soft); }
.row-menu-popover { min-width: 180px; padding: 8px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); }
.row-menu-popover button { width: 100%; text-align: left; }
.muted { color: var(--color-text-muted); }
.actions > button:not(:first-child):not(.button-destructive) { background: var(--color-surface); border: 1px solid var(--color-border-strong); color: var(--color-text); }
.actions > button:not(:first-child):not(.button-destructive):hover { background: var(--color-surface-alt); }
.pill { display: inline-flex; align-items: center; gap: 4px; margin: 2px 4px 2px 0; padding: 3px 9px; border-radius: 999px; background: var(--color-cancelled-bg); color: var(--color-cancelled-text); font-size: 12px; font-weight: 600; text-transform: capitalize; white-space: nowrap; }
.pill.role-admin { background: var(--color-admin-bg); color: var(--color-admin-text); }
.pill.role-manager, .pill.status-absence { background: var(--color-absence-bg); color: var(--color-absence-text); }
.pill.role-employee, .pill.status-cancelled, .pill.status-recorded { background: var(--color-cancelled-bg); color: var(--color-cancelled-text); }
.pill.status-pending { background: var(--color-pending-bg); color: var(--color-pending-text); }
.pill.status-approved { background: var(--color-approved-bg); color: var(--color-approved-text); }
.pill.status-declined { background: var(--color-declined-bg); color: var(--color-declined-text); }
.pill.status-holiday { background: var(--color-holiday-bg); color: var(--color-holiday-text); }
.pill.flag-short-notice { background: var(--color-surface); border: 1px solid var(--color-warning-border); color: var(--color-warning-text); }
.pill.flag-urgent { background: var(--color-declined-bg); color: var(--color-declined-text); }
.payroll-code { font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 600; }
.current-row { background: var(--color-brand-tint); box-shadow: inset 3px 0 0 var(--color-brand); }
.past-row { color: var(--color-text-subtle); }
.warning-panel, .short-notice-label { padding: 10px 12px; background: var(--color-warning-bg); border: 1px solid var(--color-warning-border); border-radius: 8px; color: var(--color-warning-text); }
.short-notice-label { display: inline-block; font-size: 12px; font-weight: 600; }
.request-activity-list li { border-top: 1px solid var(--color-divider); }
.request-activity-type { display: inline-flex; padding: 3px 9px; border-radius: 999px; background: var(--color-holiday-bg); color: var(--color-holiday-text); font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.request-activity-type.is-absence { background: var(--color-absence-bg); color: var(--color-absence-text); }
.request-activity-list time { color: var(--color-text-muted); font-size: 12.5px; }
.old-value { color: var(--color-text-subtle); text-decoration: line-through; }
.new-value { display: inline-block; padding: 2px 7px; border-radius: 999px; background: var(--color-approved-bg); color: var(--color-approved-text); font-weight: 700; }
.new-value.is-reduction { background: var(--color-declined-bg); color: var(--color-declined-text); }
.history-day { padding: 12px 0 4px; color: var(--color-text-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

/* Calendars keep patterns and labels alongside colour. */
.working-hours-calendar { --agreed-block-color: transparent; --actual-work-color: var(--color-cover-full); --holiday-color: var(--color-calendar-holiday-bg); --absence-color: var(--color-calendar-absence-bg); --lunch-color: var(--color-calendar-lunch-dark); }
.working-hours-calendar .fc-event.calendar-agreed-shift { background: transparent; border: 1.5px dashed var(--color-input-border); color: var(--color-text); }
.working-hours-calendar .fc-event.calendar-available { background: var(--color-working-fill); border: 1px solid var(--color-working-edge); border-left: 3px solid var(--color-working-edge); color: var(--color-surface); font-weight: 600; }
.working-hours-calendar .fc-event.calendar-approved-holiday { background: var(--color-calendar-holiday-bg); border: 1px solid var(--color-calendar-holiday-edge); border-left: 3px solid var(--color-calendar-holiday-edge); color: var(--color-admin-text); }
.working-hours-calendar .fc-event.calendar-absence { background: var(--color-calendar-absence-bg); border: 1px solid var(--color-calendar-absence-edge); border-left: 3px solid var(--color-calendar-absence-edge); color: var(--color-absence-text); }
.working-hours-calendar .fc-event.calendar-lunch { background: repeating-linear-gradient(135deg, var(--color-calendar-lunch-light) 0 6px, var(--color-calendar-lunch-dark) 6px 12px); border: 1px solid var(--color-border-strong); color: var(--color-cancelled-text); }
.availability-swatch.agreed { background: transparent; border: 1.5px dashed var(--color-input-border); }
.availability-swatch.available { background: var(--color-working-fill); border-left: 3px solid var(--color-working-edge); }
.availability-swatch.holiday { background: var(--color-calendar-holiday-bg); border-left: 3px solid var(--color-calendar-holiday-edge); }
.availability-swatch.absence { background: var(--color-calendar-absence-bg); border-left: 3px solid var(--color-calendar-absence-edge); }
.availability-swatch.lunch { background: repeating-linear-gradient(135deg, var(--color-calendar-lunch-light) 0 4px, var(--color-calendar-lunch-dark) 4px 8px); }
.calendar-lunch-actions button { background: var(--color-calendar-lunch-dark); border: 1px solid var(--color-border-strong); color: var(--color-cancelled-text); }
.calendar-lunch-actions button:hover:not(:disabled) { background: var(--color-calendar-lunch-light); }
.calendar-week-summary { background: var(--color-surface); border: 1px solid var(--color-border); }
.calendar-week-summary.is-current { background: var(--color-brand-tint); border: 1px solid var(--color-brand-border); box-shadow: inset 3px 0 0 var(--color-brand); padding: .75rem 1rem; }
.calendar-week-summary .week-hours-actual { color: var(--color-approved-text); }
.calendar-week-summary .week-hours-holiday { color: var(--color-admin-text); }
.calendar-week-summary .week-hours-absence { color: var(--color-absence-text); }
.calendar-week-summary .week-hours-lunch { color: var(--color-cancelled-text); }
.calendar-confirmation { border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 0 0 100vmax var(--color-dialog-overlay), 0 8px 24px var(--color-shadow-floating); }
.calendar-event-tooltip, .calendar-lunch-menu, .absence-menu, .absence-matches { box-shadow: 0 8px 24px var(--color-shadow-floating); }
.fc .fc-button-primary { background: var(--color-surface); border: 1px solid var(--color-border-strong); color: var(--color-text); }
.fc .fc-button-primary:hover, .fc .fc-button-primary:focus { background: var(--color-brand-soft); border-color: var(--color-brand-border); color: var(--color-brand-hover); }
.fc .fc-button-primary:not(:disabled).fc-button-active { background: var(--color-brand-soft); border-color: var(--color-brand-border); color: var(--color-brand-hover); }
.fc .fc-toolbar { gap: 12px; flex-wrap: wrap; }
.fc .fc-toolbar-title { font-size: 19px; font-weight: 600; }
input:not([type=checkbox]):not(:focus-visible), select:not(:focus-visible), textarea:not(:focus-visible) { border-color: var(--color-input-border-visible); }
.fc .fc-day-today { background: var(--color-brand-tint) !important; }
.calendar-hours-warning, .calendar-past-warning, .period-past-warning { padding: 10px 12px; background: var(--color-warning-bg); border: 1px solid var(--color-warning-border); border-radius: 8px; color: var(--color-warning-text); font-weight: 600; }
.cover-strip-full { background: var(--color-cover-full); }
.cover-strip-short { background: var(--color-cover-short); }
.cover-strip-none { background: var(--color-cover-none); color: var(--color-surface); }
.cover-strip-at-risk { background: repeating-linear-gradient(135deg, var(--color-cover-none-hatch) 0 6px, var(--color-surface) 6px 12px); border: 1px dashed var(--color-cover-none); }
.calendar-overlap-band { background: var(--color-overlap-fill); border-inline: 1px dashed var(--color-overlap-edge); }

@media (max-width: 700px) { .app-bar-inner { gap: 8px; padding-inline: 16px; } .admin-nav { display: none; } .account-mobile-nav { display: block; border-bottom: 1px solid var(--color-divider); } .page-container { padding: 24px 16px 48px; } .account-name { display: none; } .calendar-heading, .request-activities-heading, .manager-requests-heading { flex-wrap: wrap; } button, .admin-nav a { min-height: 44px; } }
@media (max-width: 420px) { .signin-card { padding: 24px; } .page-heading h1 { font-size: 28px; } .vacation-allowance-panel, .absence-history, .manager-requests, .working-hours-calendar, .payroll-panel { padding: 16px; } }

/* Admin team directory */
.app-bar-inner { max-width: none; min-height: 60px; padding-inline: 28px; gap: 28px; }
.app-brand { letter-spacing: -.01em; }
.admin-nav a { color: var(--color-nav-text); }
.account-avatar, .person-avatar { background: var(--color-avatar-bg); }
.account-dropdown { padding: 6px; }
.account-sign-out { border-top: 1px solid var(--color-divider) !important; border-radius: 0 0 8px 8px !important; }
.page-container { padding-top: 30px; }
.page-heading { align-items: flex-end; gap: 20px; margin-bottom: 20px; }
.page-subtitle { margin: 4px 0 0; color: var(--color-text-muted); font-size: 14px; }
.page-heading-actions { align-items: center; gap: 10px; }
.page-heading-actions .team-search { width: 220px; }
.page-heading-actions .team-role-filter { min-width: 104px; }
.page-heading-actions select.team-role-filter, .requests-changes-filters select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%2355625D' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px 16px; }
.page-heading-actions .team-search, .page-heading-actions .team-role-filter { min-height: 38px; padding: 8px 12px; border-color: var(--color-border-strong); font-size: 14px; }
.page-heading-actions > button { min-height: 38px; padding: 9px 14px; }
.team-table { overflow-x: auto; }
.team-table table { min-width: 730px; }
.team-table th { padding: 10px 16px; border-bottom: 1px solid var(--color-border); letter-spacing: .05em; }
.team-table td { padding: 11px 16px; }
.team-table .person-cell strong { display: block; white-space: nowrap; font-size: 14px; font-weight: 500; }
.team-table .person-cell small { white-space: nowrap; }
.team-table .role-pill-group { display: inline-flex; flex-wrap: nowrap; gap: 6px; }
.team-table .pill { margin: 0; }
.team-table .team-actions-heading, .team-table .team-row-actions { width: 110px; text-align: right; }
.team-table .team-row-actions .actions { justify-content: flex-end; gap: 4px; }
.team-table .team-row-actions .button-text { min-height: 32px; padding: 6px 8px; }
.team-table .team-empty { padding: 24px 16px; color: var(--color-text-muted); text-align: center; }
.team-table .team-empty button { margin-left: 8px; }
.row-menu-trigger { display: grid; place-items: center; width: 32px; min-height: 32px; padding: 0; background: transparent; color: var(--color-text-muted); }
.row-menu-trigger:hover, .row-menu-trigger[aria-expanded="true"] { background: var(--color-divider); color: var(--color-text); }
.row-menu-popover { position: fixed; z-index: 100; width: 180px; padding: 6px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 8px 24px var(--color-shadow-floating); }
.row-menu-popover a, .row-menu-popover button { display: block; width: 100%; min-height: 36px; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--color-text); text-align: left; text-decoration: none; font-size: 14px; font-weight: 400; }
.row-menu-popover a:hover, .row-menu-popover button:hover { background: var(--color-surface-alt); }
.row-menu-popover .row-menu-delete { color: var(--color-destructive); }
.row-menu-divider { height: 1px; margin: 5px -6px; background: var(--color-divider); }
.delete-dialog-backdrop { position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; padding: 16px; background: var(--color-dialog-overlay); }
.delete-dialog { width: min(100%, 400px); padding: 24px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 8px 24px var(--color-shadow-floating); }
.delete-dialog h2 { margin: 0; }
.delete-dialog p { margin: 12px 0 24px; color: var(--color-text-muted); }
.delete-dialog .actions { justify-content: flex-end; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 700px) { .app-bar-inner { padding-inline: 16px; } .page-container { padding: 30px 16px 48px; } .page-heading-actions { width: 100%; } .page-heading-actions .team-search { flex: 1 1 180px; } .page-heading-actions .team-role-filter { flex: 0 1 120px; } }

/* Employee holiday and absence */
.employee-time-off, .employee-absence-page { color: var(--color-text); }
.employee-page-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 20px 0 28px; }
.employee-page-title h1 { margin: 0; font-size: clamp(28px, 3vw, 36px); }
.employee-page-title p { margin: 6px 0 0; color: var(--color-text-muted); font-size: 15px; }
.employee-page-title label { display: flex; align-items: center; gap: 12px; color: var(--color-text-muted); font-size: 14px; font-weight: 600; }
.employee-page-title select { min-width: 105px; padding-right: 36px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%2355625D' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; font-size: 16px; font-weight: 600; }
.employee-stats { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(230px, 1fr); gap: 20px; margin-bottom: 24px; }
.employee-stats .card { margin: 0; padding: 24px; }
.employee-stat-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.employee-stat-heading > span:first-child, .employee-absence-stat > span:first-child { color: var(--color-text-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.employee-stat-heading > strong { font-size: 28px; line-height: 1.2; }
.employee-stat-heading > span:nth-child(3) { color: var(--color-text-muted); }
.employee-stat-heading .pill { margin-left: auto; }
.employee-balance-bar { display: flex; height: 18px; overflow: hidden; margin: 20px 0 12px; border-radius: 999px; background: var(--color-calendar-lunch-dark); }
.employee-balance-bar > span { display: block; flex-shrink: 0; height: 100%; background: var(--color-brand); }
.employee-balance-bar > .balance-pending, .pending-swatch { background: repeating-linear-gradient(135deg, var(--color-calendar-pending-light) 0 6px, var(--color-cover-short) 6px 12px); box-shadow: inset 0 0 0 2px var(--color-calendar-pending-border); }
.employee-balance-legend { display: flex; flex-wrap: wrap; gap: 24px; color: var(--color-text-muted); }
.employee-balance-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.employee-balance-legend strong { color: var(--color-text); }
.employee-balance-legend i { width: 16px; height: 16px; border-radius: 3px; }
.employee-balance-legend .pending-legend { padding: 2px 8px; margin: -2px -8px; border-radius: 6px; background: var(--color-warning-bg); }
.booked-swatch { background: var(--color-brand); }
.left-swatch { border: 1px solid var(--color-border-strong); background: var(--color-calendar-lunch-dark); }
.employee-absence-stat { display: flex; flex-direction: column; justify-content: center; gap: 4px; text-decoration: none; color: var(--color-text); }
.employee-absence-stat:hover { border-color: var(--color-brand-border); background: var(--color-brand-tint); color: var(--color-text); }
.employee-absence-stat strong { font-size: 28px; }
.employee-absence-stat small { color: var(--color-text-muted); font-size: 14px; }
.employee-main-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, 1fr); align-items: start; gap: 20px; }
.employee-main-grid .card { margin: 0; }
.employee-request-card { padding: 28px; }
.employee-request-card h2, .employee-coming-up h2 { margin: 0 0 20px; font-size: 20px; }
.employee-segments { display: inline-flex; overflow: hidden; margin-bottom: 20px; border: 1px solid var(--color-border-strong); border-radius: 8px; }
.employee-segments button { min-height: 42px; border: 0; border-radius: 0; background: var(--color-surface); color: var(--color-text); }
.employee-segments button + button { border-left: 1px solid var(--color-border-strong); }
.employee-segments button[aria-pressed="true"] { background: var(--color-brand-soft); color: var(--color-brand-hover); }
.employee-segments button:hover { background: var(--color-brand-tint); }
.employee-request-card form { gap: 16px; margin: 0; }
.employee-date-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.employee-date-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.employee-date-grid input { width: 100%; }
.employee-request-card form > .muted { margin: 0; font-size: 13px; }
.employee-use-preview { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 12px 14px; border-radius: 8px; background: var(--color-page); font-size: 13px; }
.employee-use-preview > span:last-child { margin-left: auto; color: var(--color-text-muted); text-align: right; }
.employee-short-notice p { margin: 0 0 16px; }
.employee-short-notice label { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.employee-short-notice label > span { color: var(--color-warning-text); }
.employee-short-notice textarea { grid-column: 1 / -1; width: 100%; min-height: 90px; }
.employee-short-notice small { display: block; margin-top: 8px; color: var(--color-text-muted); }
.employee-send-button { width: 100%; min-height: 46px; }
.employee-send-button:disabled, .employee-send-button:disabled:hover { opacity: 1; background: var(--color-calendar-lunch-dark); color: var(--color-text-muted); cursor: not-allowed; }
.employee-shift-preview { margin-top: 4px; }
.employee-shift-preview > div:first-child { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; font-size: 13px; }
.employee-shift-preview > div:first-child span, .employee-shift-axis { color: var(--color-text-muted); }
.employee-shift-track { position: relative; height: 38px; margin-top: 14px; overflow: hidden; border-radius: 6px; background: var(--color-cover-full); }
.employee-shift-work { position: absolute; inset: 0; border-left: 3px solid var(--color-brand); background: var(--color-calendar-approved-bg); }
.employee-shift-lunch { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, var(--color-calendar-lunch-light) 0 5px, var(--color-calendar-lunch-dark) 5px 10px); }
.employee-shift-off { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding-left: 8px; overflow: hidden; border: 2px solid var(--color-calendar-holiday-edge); border-radius: 4px; background: var(--color-calendar-holiday-bg); color: var(--color-admin-text); white-space: nowrap; font-size: 12px; font-weight: 600; }
.employee-shift-axis { display: flex; justify-content: space-between; font-size: 12px; }
.employee-shift-legend { display: flex; gap: 16px; font-size: 12px; color: var(--color-text-muted); }
.employee-shift-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 2px; background: var(--color-calendar-approved-bg); }
.employee-shift-legend span:nth-child(2)::before { background: var(--color-calendar-lunch-dark); }
.employee-shift-legend span:nth-child(3)::before { background: var(--color-calendar-holiday-bg); border: 1px solid var(--color-calendar-holiday-edge); }
.employee-coming-up { padding: 0; overflow: hidden; }
.employee-coming-up h2 { margin: 0; padding: 24px; }
.employee-coming-up > p { padding: 0 24px 20px; }
.employee-coming-up ul, .employee-absence-history ul { margin: 0; padding: 0; list-style: none; }
.employee-request-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 20px 24px; border-top: 1px solid var(--color-divider); }
.employee-request-row.is-pending { background: var(--color-warning-bg); }
.employee-request-row strong { font-size: 15px; }
.employee-request-row p { margin: 4px 0 0; color: var(--color-text-muted); font-size: 13px; }
.employee-request-row small { display: block; margin-top: 4px; color: var(--color-warning-text); }
.employee-request-state { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: start; gap: 6px; max-width: 180px; }
.employee-request-action { min-height: 30px; padding: 4px 0; background: none; color: var(--color-destructive); }
.employee-request-action:hover { background: none; text-decoration: underline; }
.employee-cancel-form { grid-column: 1 / -1; margin: 0; }
.employee-cancel-form textarea { width: 100%; min-height: 80px; }
.employee-past-toggle { width: 100%; padding: 14px 24px; border-top: 1px solid var(--color-divider); border-radius: 0; background: var(--color-surface-alt); color: var(--color-brand); text-align: left; text-decoration: underline; font-weight: 400; }
.employee-past-toggle:hover { background: var(--color-brand-tint); }
.employee-past-requests { border-top: 1px solid var(--color-divider); }
.employee-past-requests > p { padding: 12px 24px; }
.employee-back-link { display: inline-block; margin: 4px 0 8px; text-decoration: none; }
.employee-back-link:hover { text-decoration: underline; }
.employee-absence-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
.employee-absence-stats .card { margin: 0; padding: 24px; }
.employee-absence-stats .is-blue { background: var(--color-absence-bg); border-color: var(--color-calendar-absence-edge); }
.employee-absence-stats h2 { margin: 0 0 8px; color: var(--color-text-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.employee-absence-stats .is-blue h2, .employee-absence-stats .is-blue > strong { color: var(--color-absence-text); }
.employee-absence-stats strong { font-size: 28px; }
.employee-absence-stats p { margin: 4px 0 0; color: var(--color-text-muted); font-size: 13px; }
.employee-absence-chart { padding: 24px; }
.employee-absence-chart > div:first-child { display: flex; justify-content: space-between; align-items: center; }
.employee-absence-chart h2 { margin: 0; }
.employee-absence-chart > div:first-child span { color: var(--color-text-muted); font-size: 13px; }
.employee-month-bars { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 8px; margin-top: 18px; overflow-x: auto; }
.employee-month { min-width: 38px; text-align: center; color: var(--color-text-muted); font-size: 12px; }
.employee-month-bar-space { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 126px; }
.employee-month-bar-space strong { color: var(--color-absence-text); white-space: nowrap; font-size: 12px; }
.employee-month-bar-space > span { display: block; width: min(100%, 46px); min-height: 3px; border-radius: 5px 5px 0 0; background: var(--color-divider); }
.employee-month-bar-space > span.has-hours { background: var(--color-calendar-absence-edge); }
.employee-absence-history { padding: 0; overflow: hidden; }
.employee-absence-history header { display: flex; justify-content: space-between; padding: 14px 24px; border-bottom: 1px solid var(--color-divider); background: var(--color-surface-alt); color: var(--color-text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.employee-absence-history li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 1fr) auto; align-items: center; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--color-divider); }
.employee-absence-history li small { display: block; color: var(--color-text-muted); }
.employee-absence-day-type { display: flex; align-items: center; gap: 8px; }
.employee-absence-history footer { padding: 16px 24px; color: var(--color-text-muted); font-size: 13px; }
@media (max-width: 780px) { .employee-stats, .employee-main-grid { grid-template-columns: 1fr; } .employee-absence-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 550px) { .employee-page-title { align-items: flex-start; flex-direction: column; } .employee-page-title label { width: 100%; justify-content: space-between; } .employee-date-grid, .employee-date-grid.three, .employee-absence-stats { grid-template-columns: 1fr; } .employee-request-card { padding: 20px; } .employee-absence-history li { grid-template-columns: 1fr auto; } .employee-absence-day-type { grid-column: 1 / -1; grid-row: 2; } }

/* Manager requests and review */
.manager-center-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin: 12px 0 24px; }
.manager-center-heading h1 { margin: 0; font-size: 34px; }
.manager-center-heading p { margin: 6px 0 0; color: var(--color-text-muted); }
.manager-center-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.manager-center-filters label { font-size: 0; }
.manager-center-filters select { min-width: 130px; padding-right: 34px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%2355625D' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; font-size: 14px; font-weight: 600; }
.manager-request-center .card { padding: 0; margin: 0 0 24px; overflow: hidden; }
.manager-request-center h2 { margin: 0; padding: 18px 24px; font-size: 19px; }
.manager-request-center ul { margin: 0; padding: 0; list-style: none; }
.manager-request-center li { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.5fr) auto; gap: 24px; align-items: center; padding: 18px 24px; border-top: 1px solid var(--color-divider); }
.manager-decision-card { border-color: var(--color-warning-border); }
.manager-decision-card h2 { background: var(--color-warning-bg); }
.manager-decision-card h2 .pill { margin-left: 8px; }
.manager-request-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.manager-request-person > div > strong { display: block; margin-bottom: 6px; font-size: 16px; }
.manager-request-person > div > div { display: flex; flex-wrap: wrap; gap: 6px; }
.manager-request-person .person-avatar { flex: none; }
.manager-request-details { min-width: 0; }
.manager-request-details > strong { display: block; font-size: 15px; }
.manager-request-details small { display: block; margin-top: 3px; color: var(--color-text-muted); font-size: 13px; }
.manager-request-details .warning-panel { margin: 10px 0 0; }
.manager-review-link { display: inline-flex; align-items: center; gap: 10px; justify-content: center; min-width: 100px; min-height: 44px; padding: 9px 16px; border-radius: 8px; background: var(--color-brand); color: var(--color-surface); text-decoration: none; font-weight: 600; }
.manager-review-link:hover { background: var(--color-brand-hover); color: var(--color-surface); }
.manager-list-status { justify-self: end; }
.manager-empty { margin: 0; padding: 20px 24px; color: var(--color-text-muted); }
.manager-review-heading { display: flex; align-items: center; gap: 14px; margin: 12px 0 24px; }
.manager-review-heading > .person-avatar { width: 54px; height: 54px; font-size: 18px; }
.manager-review-heading h1 { margin: 0 0 8px; }
.manager-review-heading > div > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.page-container:has(.manager-review-page) { max-width: none; width: 100%; box-sizing: border-box; padding: 32px 32px 48px; }
.dashboard:has(.manager-review-page) .app-bar-inner { max-width: none; padding-inline: 32px; }
.manager-review-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.manager-review-grid .card { margin: 0; padding: 0; overflow: hidden; }
.manager-review-coverage { min-width: 0; container-type: inline-size; }
.manager-review-controls { border-bottom: 1px solid var(--color-divider); padding-bottom: 4px; }
.manager-review-controls .manager-review-picker { padding: 0 20px 14px; border-bottom: 0; }
.manager-coverage-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px; padding: 16px 20px 12px; }
.manager-coverage-title { grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 12px; text-align: center; }
.manager-coverage-heading h2 { margin: 0; font-size: 17px; white-space: nowrap; }
.manager-coverage-heading p { margin: 0; color: var(--color-text-muted); font-size: 13px; }
.manager-coverage-show { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 10px; margin-left: 0; justify-self: start; }
.manager-coverage-show > span { font-size: 13px; font-weight: 600; color: var(--color-text-muted); }
.manager-coverage-heading .employee-segments { margin: 0; }
.manager-coverage-heading .employee-segments button { padding: 8px 10px; font-size: 13px; }
.manager-coverage-row { display: grid; grid-template-columns: minmax(100px, 1fr) auto minmax(220px, 2fr); align-items: center; gap: 10px; padding: 16px 24px; border-bottom: 1px solid var(--color-divider); font-size: 14px; }
.manager-coverage-row.is-request { background: var(--color-warning-bg); }
.manager-coverage-row > span:last-child { color: var(--color-text-muted); }
.manager-timeline-scroll { overflow-x: auto; }
.manager-timeline { display: grid; min-width: 100%; }
.manager-timeline-corner, .manager-timeline-day, .manager-timeline-person, .manager-timeline-cell { min-height: 62px; padding: 12px; border-bottom: 1px solid var(--color-divider); }
.manager-timeline-corner, .manager-timeline-person { position: sticky; left: 0; z-index: 1; background: var(--color-surface); }
.manager-timeline-corner, .manager-timeline-day { min-height: 56px; background: var(--color-surface-alt); }
.manager-timeline-day { display: flex; flex-direction: column; justify-content: center; gap: 4px; border-left: 1px solid var(--color-divider); }
.manager-timeline-times { position: relative; min-height: 38px; border-left: 1px solid var(--color-divider); border-bottom: 1px solid var(--color-divider); background: repeating-linear-gradient(to right, transparent 0, transparent calc(10% - 1px), var(--color-divider) calc(10% - 1px), var(--color-divider) 10%); }
.manager-timeline-times span { position: absolute; bottom: 4px; transform: translateX(-50%); color: var(--color-text-muted); font-size: 13px; }
.manager-timeline-times span:first-child { transform: none; }
.manager-timeline-times span:last-child { transform: translateX(-100%); }
.manager-timeline-corner.manager-timeline-sort { padding: 8px 12px; }
.manager-timeline-sort label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: var(--color-text-muted); }
.manager-timeline-sort select { width: 100%; height: 30px; min-height: 30px; padding: 4px 32px 4px 9px; appearance: none; border: 1px solid var(--color-border-strong); border-radius: 6px; font: inherit; font-size: 12px; color: var(--color-text); background-color: var(--color-surface); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px 14px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%2355625D' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.manager-timeline-corner.is-time { min-height: 38px; background: var(--color-surface); }
.manager-timeline-section-label { position: sticky; left: 0; z-index: 1; padding: 10px 12px; background: var(--color-surface-alt); border-bottom: 1px solid var(--color-divider); color: var(--color-text-muted); text-transform: uppercase; font-size: 12px; font-weight: 600; letter-spacing: .05em; }
.manager-timeline-section-spacer { border-left: 1px solid var(--color-divider); border-bottom: 1px solid var(--color-divider); }
.manager-timeline-people-divider { grid-column: 1 / -1; border-top: 3px solid var(--color-border-strong); }
.manager-timeline-person strong, .manager-timeline-person small { display: block; }
.manager-timeline-person small { margin-top: 3px; color: var(--color-text-muted); font-size: 12px; }
.manager-timeline-person.is-request { background: var(--color-warning-bg); }
.manager-timeline-cell { position: relative; border-left: 1px solid var(--color-divider); background: repeating-linear-gradient(to right, transparent 0, transparent calc(10% - 1px), var(--color-divider) calc(10% - 1px), var(--color-divider) 10%); }
.manager-timeline-cell.is-request { background-color: var(--color-warning-bg); }
.manager-timeline .is-compact-weekend { background: var(--color-cancelled-bg); color: var(--color-text-muted); padding-left: 4px; padding-right: 4px; }
.manager-timeline-day.is-compact-weekend { text-align: center; font-size: 10px; line-height: 1.4; }
.manager-timeline-bar { position: absolute; top: 12px; height: 36px; overflow: hidden; padding: 7px 5px; border-radius: 5px; white-space: nowrap; font-size: 11px; font-weight: 600; }
.manager-timeline-bar.is-request { border: 2px solid var(--color-calendar-pending-border); background: repeating-linear-gradient(135deg, var(--color-calendar-pending-light) 0, var(--color-calendar-pending-light) 6px, var(--color-calendar-pending-dark) 6px, var(--color-calendar-pending-dark) 12px); color: var(--color-warning-text); }
.manager-timeline-bar.is-holiday { background: var(--color-calendar-approved-bg); border-left: 3px solid var(--color-brand); color: var(--color-brand-hover); }
.manager-timeline-bar.is-absence { background: var(--color-absence-bg); border-left: 3px solid var(--color-calendar-absence-edge); color: var(--color-absence-text); }
.manager-timeline-cell:not(.is-role) .manager-timeline-bar { height: 22px; padding: 2px 5px; }
.manager-timeline-cell .manager-timeline-bar.is-request, .manager-timeline-cell .manager-timeline-bar.is-holiday, .manager-timeline-cell .manager-timeline-bar.is-pending { height: 34px; padding: 6px 5px; }
.manager-review-role-picker { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px; }
.manager-review-role-picker button { width: auto; min-height: 36px; padding: 8px 14px; border: 1px solid var(--color-border-strong); border-radius: 8px; background: var(--color-surface); color: var(--color-text); font-size: 13px; font-weight: 600; }
.manager-review-role-picker button:hover, .manager-review-role-picker button[aria-pressed="true"] { background: var(--color-brand-soft); color: var(--color-brand-hover); }
.manager-review-role-picker button[aria-pressed="true"] { border-color: var(--color-brand-border); }
.manager-review-picker { padding: 14px 20px; border-bottom: 1px solid var(--color-divider); }
.manager-review-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 54px; padding: 6px; border: 1px solid var(--color-border); border-radius: 9px; }
.manager-review-chip, .manager-review-saved-group { display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px; border: 1px solid var(--color-border-strong); border-radius: 22px; white-space: nowrap; font-size: 13px; font-weight: 600; }
.manager-review-chip small { font-weight: 400; }
.manager-review-chip.is-requester { background: var(--color-warning-bg); border-color: var(--color-warning-border); }
.manager-review-chip .person-avatar { width: 25px; height: 25px; font-size: 10px; }
.manager-review-chip small { color: var(--color-text-muted); }
.manager-review-chip button, .manager-review-saved-group button { width: auto; min-height: 25px; padding: 0 4px; border: 0; background: transparent; color: inherit; }
.manager-review-search { position: relative; flex: 1 1 140px; }
.manager-review-search input { width: 100%; min-width: 130px; min-height: 38px; padding: 6px 10px; border: 0; background: transparent; }
.manager-review-suggestions { position: absolute; z-index: 3; top: 100%; left: 0; min-width: 200px; max-height: 200px; overflow: auto; padding: 5px; border: 1px solid var(--color-border); border-radius: 8px; background: white; box-shadow: 0 8px 24px rgba(21, 32, 28, .1); }
.manager-review-suggestions button, .manager-review-suggestions span { display: block; width: 100%; padding: 9px; border: 0; background: white; color: var(--color-text); text-align: left; }
.manager-review-suggestions button:hover, .manager-review-suggestions button[aria-selected="true"] { background: var(--color-brand-soft); }
.manager-review-saved { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 10px; font-size: 13px; }
.manager-review-saved-group { position: relative; background: var(--color-surface); padding: 6px 10px; }
.manager-review-saved-group:has(button[aria-pressed="true"]) { background: var(--color-brand-soft); border-color: var(--color-brand-border); color: var(--color-brand-hover); }
.manager-review-saved-group > button:last-child { position: absolute; right: -5px; top: -7px; border-radius: 50%; background: var(--color-surface); border: 1px solid var(--color-border); opacity: 0; }
.manager-review-saved-group:hover > button:last-child, .manager-review-saved-group:focus-within > button:last-child { opacity: 1; }
.manager-review-save-link { width: auto; min-height: 32px; margin-left: auto; padding: 3px; border: 0; background: transparent; color: var(--color-brand); text-decoration: underline; }
.manager-review-save-form { display: flex; gap: 8px; margin-top: 10px; }
.manager-review-save-form input { flex: 1; min-width: 0; }
.manager-review-save-form button { width: auto; }
.manager-timeline-person.is-role, .manager-timeline-cell.is-role { min-height: 44px; background-color: var(--color-surface-alt); }
.manager-timeline .manager-timeline-cell.is-compact-weekend { background: var(--color-cancelled-bg); }
.manager-timeline-cell.is-role .manager-timeline-bar { top: 7px; height: 29px; text-align: center; }
.manager-timeline-bar.is-short { background: var(--color-cover-short); color: var(--color-warning-text); }
.manager-timeline-bar.is-none { background: var(--color-cover-none); color: white; }
.manager-timeline-bar.is-below-minimum { background: var(--color-cover-none); color: var(--color-surface); }
.manager-timeline-bar.is-pending { background: repeating-linear-gradient(135deg, var(--color-calendar-pending-light) 0 6px, var(--color-calendar-pending-dark) 6px 12px); border: 2px solid var(--color-calendar-pending-border); color: var(--color-warning-text); box-shadow: 0 0 0 3px var(--color-cancellation-glow); container-type: inline-size; }
.manager-timeline-bar:hover, .manager-timeline-bar:focus-visible { outline: 3px solid var(--color-text); outline-offset: 2px; }
.manager-review-tooltip { position: fixed; z-index: 50; width: min(420px, calc(100vw - 16px)); color: var(--color-surface); pointer-events: none; font-size: 14px; line-height: 1.5; }
.manager-review-tooltip::before { content: ""; position: absolute; top: -10px; left: var(--tooltip-arrow-left); transform: translateX(-50%); border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 10px solid var(--color-text); }
.manager-review-tooltip.is-above::before { top: auto; bottom: -10px; border-bottom: 0; border-top: 10px solid var(--color-text); }
.manager-review-tooltip-content { max-height: calc(100vh - 16px); overflow: auto; padding: 18px 20px; background: var(--color-text); border-radius: 14px; box-shadow: 0 8px 24px var(--color-shadow-floating); }
.manager-review-tooltip-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.manager-review-tooltip-heading strong { font-size: 17px; }
.manager-review-tooltip-heading > span { flex: none; background: var(--color-cover-short); color: var(--color-warning-text); border-radius: 20px; padding: 1px 10px; font-weight: 700; }
.manager-review-tooltip-content > p { margin: 8px 0 14px; color: var(--color-avatar-bg); }
.manager-review-tooltip-rows { display: grid; grid-template-columns: fit-content(40%) minmax(0, 1fr); gap: 8px 14px; align-items: start; }
.manager-review-tooltip-rows > div { display: contents; }
.manager-review-tooltip-rows > div > span { min-width: 0; overflow-wrap: anywhere; }
.manager-review-tooltip-rows > div > span:first-child { color: var(--color-brand-border); }
.automatic-holiday-settings { border-top: 1px solid var(--color-divider); padding-top: 16px; }
.automatic-holiday-checkbox { display: flex; align-items: center; gap: 8px; }
.automatic-holiday-settings p { font-size: 13px; }
.automatic-holiday-settings .job-role-options small { display: block; font-weight: 400; color: var(--color-text-muted); }
.holiday-approval-notices:empty { display: none; }
.holiday-approval-notices article { margin-bottom: 12px; }
.holiday-approval-notices h2 { font-size: 16px; margin: 0; }
.holiday-approval-notices article > p { white-space: pre-wrap; overflow-wrap: anywhere; }
.manager-review-expand { width: 100%; min-height: 40px; border: 0; border-bottom: 1px solid var(--color-divider); background: var(--color-surface-alt); color: var(--color-brand); text-align: left; padding: 8px 20px; }
.manager-review-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 14px 20px; color: var(--color-text-muted); font-size: 12px; }
.manager-review-legend span { display: inline-flex; align-items: center; gap: 5px; }
.manager-review-legend i { width: 13px; height: 13px; border-radius: 3px; border: 1px solid var(--color-border); }
.manager-review-legend .is-request { background: repeating-linear-gradient(135deg, var(--color-calendar-pending-light) 0, var(--color-calendar-pending-light) 3px, var(--color-calendar-pending-dark) 3px, var(--color-calendar-pending-dark) 6px); border-color: var(--color-calendar-pending-border); }
.manager-review-legend .is-holiday { background: var(--color-calendar-approved-bg); border-left: 3px solid var(--color-brand); }
.manager-review-legend .is-absence { background: var(--color-absence-bg); }
.manager-review-legend .is-short { background: var(--color-cover-short); }
.manager-review-legend .is-below-minimum { background: var(--color-cover-none); }
.manager-review-legend .is-none { background: var(--color-cover-none); }
.manager-coverage-footnote { margin: 0; padding: 16px 24px; color: var(--color-text-muted); font-size: 13px; }
.manager-review-summary { padding: 24px !important; }
.manager-review-summary h2 { margin: 0 0 12px; color: var(--color-text-muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.manager-review-summary > strong { display: block; }
.manager-review-summary > p { margin: 6px 0 20px; color: var(--color-text-muted); }
.manager-review-balance { margin: 18px 0; }
.manager-review-balance h3 { margin: 0; color: var(--color-text-muted); font-size: 13px; text-transform: uppercase; }
.manager-review-balance .employee-balance-bar { display: flex; margin: 10px 0 8px; border: 0; background: var(--color-calendar-lunch-dark); }
.manager-review-balance .employee-balance-bar > span { flex-shrink: 0; }
.manager-review-balance .employee-balance-bar > .balance-pending { background: repeating-linear-gradient(135deg, var(--color-cover-short) 0, var(--color-cover-short) 6px, var(--color-calendar-pending-border) 6px, var(--color-calendar-pending-border) 12px); }
.manager-review-balance p { margin: 0; color: var(--color-text-muted); font-size: 13px; }
.manager-review-summary .actions { margin-top: 20px; }
.manager-review-summary .actions button { flex: 1; min-height: 46px; }
.manager-review-summary .actions > button.manager-approve-button { background: var(--color-brand); color: var(--color-surface); border: 1px solid var(--color-brand); }
.manager-review-summary .actions > button.manager-approve-button:hover { background: var(--color-brand-hover); border-color: var(--color-brand-hover); }
@media (max-width: 1023px) { .manager-review-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .manager-request-center li { grid-template-columns: 1fr auto; gap: 10px; } .manager-request-details { grid-column: 1 / -1; grid-row: 2; } .manager-review-link, .manager-list-status { grid-column: 2; grid-row: 1; } .manager-center-filters { width: 100%; } .manager-center-filters label { flex: 1 1 135px; } .manager-center-filters select { width: 100%; } .manager-coverage-row { grid-template-columns: 1fr auto; } .manager-coverage-row > span:last-child { grid-column: 1 / -1; } }

/* Employee request inbox */
.employee-requests-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; }
.employee-requests-heading h2 { padding: 0; }
.employee-requests-heading .employee-past-toggle { width: auto; padding: 0; border: 0; background: transparent; font-weight: 600; }
.employee-request-group h3 { display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px 24px; border-top: 1px solid var(--color-divider); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.employee-request-group h3 > span:first-child { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 16px; background: currentColor; color: var(--color-surface); }
.declined-group h3 { background: var(--color-declined-bg); color: var(--color-declined-text); }
.waiting-group h3 { background: var(--color-warning-bg); color: var(--color-pending-text); }
.approved-group h3 { background: var(--color-brand-tint); color: var(--color-brand); }
.employee-request-group h3 > span:first-child svg { display: block; }
.declined-group h3 > span:first-child { background: var(--color-destructive); }
.waiting-group h3 > span:first-child { background: var(--color-calendar-pending-border); }
.approved-group h3 > span:first-child { background: var(--color-brand); }
.request-count { padding: 2px 8px; border: 1px solid var(--color-border-strong); border-radius: 999px; background: var(--color-surface); text-transform: none; letter-spacing: 0; }
.employee-request-group .employee-request-row { border-left: 4px solid var(--color-brand); }
.waiting-group .employee-request-row { border-left-color: var(--color-calendar-pending-border); }
.declined-group .employee-request-row { border-left-color: var(--color-destructive); background: var(--color-surface-alt); }
.employee-decline-note { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 14px; border: 1px solid var(--color-destructive-border); border-radius: 10px; background: var(--color-surface); }
.employee-decline-note .avatar { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; font-weight: 600; background: var(--color-declined-bg); color: var(--color-declined-text); }
.employee-decline-note p { margin: 0; color: var(--color-text); font-size: 14px; }
.employee-decline-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.employee-decline-actions button:first-child { background: transparent; border-color: transparent; color: var(--color-text-muted); }
.employee-days-away { display: inline-block; margin-left: 8px; padding: 2px 6px; border-radius: 4px; background: var(--color-brand-tint); color: var(--color-brand); font-size: 12px; font-weight: 600; }
.employee-rebooking { color: var(--color-brand); }

.manager-home-actions { display: flex; justify-content: flex-end; margin-bottom: 16px; }

/* Absence recording and history */
.page-container:has(.absence-page) { max-width: none; padding: 28px 32px 48px; }
.absence-title { display: flex; gap: 14px; align-items: center; margin: 16px 0; }
.absence-title > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--color-absence-bg); color: var(--color-absence-text); font-size: 24px; }
.absence-title h1 { margin: 0; }
.absence-title p { margin: 4px 0 0; color: var(--color-text-muted); }
.absence-form { padding: 20px; }
.absence-form h2 { margin: 0; font-size: 16px; }
.absence-form .calendar-hours-warning { margin: 12px 0 0; color: var(--color-destructive); }
.absence-form form { margin: 14px 0 0; }
.absence-top-fields { display: grid; grid-template-columns: minmax(200px,1.4fr) 1fr 1fr 1fr 1.2fr; gap: 14px; align-items: end; }
.absence-top-fields input, .absence-top-fields select, .absence-note-fields select { width: 100%; }
.absence-field-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.absence-top-fields .employee-segments { display: inline-flex; max-width: 100%; white-space: nowrap; }
.absence-top-fields .employee-segments button { padding: 10px; font-size: 12px; }
.absence-clock-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.absence-hours { padding: 12px; border-radius: 8px; background: var(--color-absence-bg); color: var(--color-absence-text); font-weight: 600; font-size: 13px; }
.absence-note-fields { display: grid; grid-template-columns: minmax(200px, 1fr) 2.5fr; gap: 20px; }
.absence-note-fields textarea { width: 100%; min-height: 90px; }
.absence-note-fields label > .muted { font-weight: 400; }
.absence-checkbox { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.absence-shift > div:first-child, .absence-inline-history > div:first-child { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.absence-shift input[type=range] { width: 100%; accent-color: var(--color-calendar-absence-edge); }
.absence-shift > div:first-child > span { color: var(--color-text-muted); font-size: 13px; }
.absence-quick-picks { grid-column: 4 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.absence-quick-picks button { padding: 6px 10px; min-height: 32px; border-radius: 999px; }
.absence-inline-history { border-top: 1px solid var(--color-divider); }
.absence-inline-history h3 { font-size: 14px; }
.absence-inline-history .card { border: 0; margin: 0; padding: 0; box-shadow: none; }
.absence-form footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--color-divider); padding-top: 14px; }
.absence-form footer p { margin: 0; font-size: 13px; color: var(--color-text-muted); }
.absence-form footer .actions { margin: 0; }
.absence-summary { padding: 20px; }
.absence-summary-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.absence-summary-stats > div { border-left: 3px solid var(--color-border-strong); padding: 10px 14px; }
.absence-summary-stats > div:nth-child(2) { background: var(--color-absence-recent); border-color: var(--color-warning-icon); }
.absence-summary-stats small { display: block; text-transform: uppercase; font-weight: 600; letter-spacing: .03em; color: var(--color-text-muted); font-size: 11px; }
.absence-summary-stats strong { display: block; font-size: 24px; }
.absence-summary-stats strong span { font-size: 13px; }
.absence-summary-stats p { margin: 4px 0; font-size: 12px; color: var(--color-text-muted); }
.absence-reason-summary p { display: flex; align-items: flex-start; gap: 6px; }
.absence-reason-summary p > i { flex-shrink: 0; margin-top: 3px; }
.absence-reason-summary p strong { margin-left: auto; font-size: 12px; }
.absence-months { display: grid; gap: 2px; overflow-x: auto; }
.absence-months > div { background: var(--color-page); padding: 10px 6px; display: flex; align-items: center; flex-direction: column; gap: 4px; font-size: 12px; }
.absence-months small { font-size: 10px; color: var(--color-text-muted); }
.absence-month-marks { min-height: 28px; display: flex; gap: 3px; flex-wrap: wrap; align-items: end; }
.absence-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--color-calendar-absence-edge); }
.absence-swatch.childcare { background: var(--color-absence-childcare); }
.absence-swatch.family_emergency { background: var(--color-absence-family); }
.absence-swatch.is-part { background-image: linear-gradient(to bottom, var(--color-surface) 0 50%, transparent 50%); border: 1px solid var(--color-text-muted); }
.absence-month-marks .absence-swatch { width: 18px; height: 18px; }
.absence-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; color: var(--color-text-muted); font-size: 12px; }
.absence-legend span { display: inline-flex; align-items: center; gap: 5px; }
.absence-history { padding: 0; overflow: hidden; }
.absence-history-heading { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.absence-history-heading h2 { margin: 0 auto 0 0; font-size: 16px; }
.absence-history-heading h2 small { margin-left: 8px; color: var(--color-text-muted); font-size: 12px; font-weight: 400; }
.absence-history th, .absence-history td { padding: 12px; text-align: left; font-size: 12px; }
.absence-history td small { display: block; color: var(--color-text-muted); }
.absence-year-row { background: var(--color-page); }
.absence-reason-pill { border-radius: 999px; padding: 4px 8px; background: var(--color-absence-bg); color: var(--color-absence-text); }
.absence-reason-pill.childcare { background: var(--color-admin-bg); color: var(--color-admin-text); }
.absence-reason-pill.family_emergency { background: var(--color-brand-soft); color: var(--color-absence-family); }
.destructive-text { color: var(--color-destructive); }
.manager-review-page.is-reference .manager-review-grid { display: block; }
.manager-review-page.is-reference .manager-timeline-cell.is-request, .manager-review-page.is-reference .manager-timeline-person.is-request { background: var(--color-brand-tint); }
.manager-review-page.is-reference .manager-timeline-bar.is-request, .manager-review-page.is-reference .manager-review-legend i.is-request { background: repeating-linear-gradient(135deg, var(--color-absence-bg) 0 5px, var(--color-calendar-absence-bg) 5px 10px); border-color: var(--color-calendar-absence-edge); color: var(--color-absence-text); }
@media (max-width: 1023px) { .absence-top-fields { grid-template-columns: repeat(2,minmax(0,1fr)); } .absence-note-fields { grid-template-columns: 1fr; } .absence-summary-stats { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 600px) { .page-container:has(.absence-page) { padding-inline: 16px; } .absence-top-fields, .absence-summary-stats { grid-template-columns: 1fr; } .absence-history-heading, .absence-form footer { flex-wrap: wrap; } }

.absence-shift-track { position: relative; min-height: 34px; margin: 12px 0; border-radius: 6px; background: var(--color-calendar-approved-bg); overflow: hidden; }
.absence-shift-working { position: absolute; left: 10px; top: 8px; color: var(--color-calendar-approved-text); font-size: 12px; font-weight: 600; }
.absence-shift-lunch { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg,var(--color-calendar-lunch-light) 0 5px,var(--color-calendar-lunch-dark) 5px 10px); }
.absence-shift-off { position: absolute; inset-block: 0; border: 2px solid var(--color-calendar-absence-edge); border-radius: 4px; padding: 6px 10px; font-size: 12px; font-weight: 600; color: var(--color-absence-text); background: repeating-linear-gradient(135deg,var(--color-absence-bg) 0 5px,var(--color-calendar-absence-bg) 5px 10px); }
.absence-shift-track input[type=range] { position: absolute; inset: 0; margin: 0; height: 34px; padding: 0; appearance: none; pointer-events: none; background: transparent; border: 0; }
.absence-shift-track input[type=range]::-webkit-slider-thumb { appearance: none; pointer-events: auto; width: 8px; height: 34px; background: var(--color-calendar-absence-edge); cursor: ew-resize; border-radius: 2px; }
.absence-shift-track input[type=range]::-moz-range-thumb { pointer-events: auto; width: 8px; height: 34px; background: var(--color-calendar-absence-edge); cursor: ew-resize; border: 0; border-radius: 2px; }
/* Absence screens follow the compact recording and history layouts. */
.absence-form form { gap: 14px; margin-bottom: 0; }
.absence-form input, .absence-form select { min-height: 42px; }
.absence-note-fields > label { position: relative; }
.absence-note-fields > label > .muted { position: absolute; right: 0; top: 0; font-size: 12px; }
.absence-form footer { margin: 0 -20px -20px; padding: 14px 20px; background: var(--color-surface-alt); border-radius: 0 0 12px 12px; }
.absence-form footer button { min-height: 44px; padding-inline: 20px; }
.absence-shift-ticks { position: relative; height: 20px; margin: 0 0 6px; color: var(--color-text-muted); font-size: 12px; }
.absence-shift-ticks span { position: absolute; transform: translateX(-50%); }
.absence-shift-ticks span:first-child { transform: none; }
.absence-shift-ticks span:last-child { transform: translateX(-100%); }
.absence-person-heading { display: flex; align-items: center; gap: 12px; }
.absence-person-heading .person-avatar { width: 42px; height: 42px; border-radius: 14px; }
.absence-person-heading h1 { font-size: 26px; margin: 0; }
.absence-person-heading p { margin: 4px 0 0; font-size: 13px; }
.absence-page .employee-page-title { margin-bottom: 16px; }
.absence-summary.is-compact { display: grid; grid-template-columns: 56% minmax(0, 1fr); gap: 24px; padding: 0; }
.absence-summary.is-compact .absence-summary-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 0; }
.absence-summary-stats > div { min-height: 116px; }
.absence-summary-stats > div:nth-child(2) { border-color: var(--color-absence-recent-edge); border-radius: 0 6px 6px 0; }
.absence-summary-stats strong { line-height: 1.2; margin-top: 4px; }
.absence-summary-stats > div:nth-child(3) strong { font-size: 24px; }
.absence-reason-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; margin: 6px 0; background: var(--color-page); }
.absence-reason-bar .absence-swatch { height: 100%; border-radius: 0; border-right: 1px solid white; }
.absence-chart { min-width: 0; overflow-x: auto; }
.absence-month-years { display: grid; margin-bottom: 4px; color: var(--color-text-muted); font-weight: 600; font-size: 11px; }
.absence-month-years > span:not(:first-child):not(:empty) { border-left: 2px solid var(--color-border-strong); padding-left: 6px; }
.absence-months { overflow: visible; }
.absence-months > button { position: relative; background: var(--color-page); color: var(--color-text-muted); border-radius: 0; padding: 10px 6px; display: flex; align-items: center; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 400; min-height: 116px; }
.absence-months > button.is-recent { background: var(--color-absence-recent); }
.absence-months > button.is-today::before { content: ""; position: absolute; top: 7px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--color-brand); }
.absence-months > button.is-today > span { font-weight: 700; color: var(--color-text); }
.absence-months > button[aria-pressed=true] { outline: 1px solid var(--color-calendar-absence-edge); outline-offset: -1px; }
.absence-months > button:hover { box-shadow: inset 0 0 0 1px var(--color-border-strong); }
.absence-month-marks { flex: 1; align-content: end; justify-content: center; }
.absence-summary.is-compact .absence-months > button { min-height: 76px; padding: 6px 2px; font-size: 11px; }
.absence-summary.is-compact .absence-month-marks .absence-swatch { width: 16px; height: 16px; }
.absence-summary.is-compact .absence-legend { gap: 8px; font-size: 11px; }
.absence-month-filter { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.absence-history table { margin-top: 0; }
.absence-history thead th { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); background: var(--color-surface-alt); }
.absence-history th, .absence-history td { border-bottom: 1px solid var(--color-divider); }
.absence-history tbody > tr:not(.absence-year-row):has(.destructive-text) { background: var(--color-absence-missing-note); }
.absence-year-row th { padding-block: 6px; font-size: 11px; letter-spacing: .02em; }
.absence-year-row a { margin-left: 8px; }
.absence-reason-pill { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; padding: 3px 8px; white-space: nowrap; font-size: 11px; }
.absence-reason-pill .absence-swatch { width: 8px; height: 8px; border-radius: 2px; }
.absence-note-received { color: var(--color-approved-text); font-weight: 600; }
.manager-review-page.is-reference .manager-review-controls { padding: 14px 16px; }
.manager-review-page.is-reference .manager-coverage-heading { gap: 12px; }
.manager-review-page.is-reference .manager-coverage-title { justify-content: center; gap: 10px; }
.manager-review-page.is-reference .manager-coverage-title h2 { font-size: 16px; }
.manager-review-page.is-reference .manager-coverage-title p { font-size: 13px; }
.manager-review-page.is-reference .employee-segments button { min-height: 32px; padding: 6px 12px; font-size: 12px; }
.manager-review-page.is-reference .manager-review-picker { margin-top: 12px; }
.manager-review-page.is-reference .manager-timeline-person { position: relative; padding-left: 52px; font-size: 13px; }
.manager-review-page.is-reference .manager-timeline-person .person-avatar { position: absolute; left: 16px; top: 12px; }
.manager-review-page.is-reference .manager-timeline-person.is-role { padding-left: 16px; }
.manager-review-page.is-reference .manager-timeline-person.is-request, .manager-review-page.is-reference .manager-timeline-cell.is-request { background: var(--color-absence-reference); }
.absence-can-cover { display: inline-block; font-size: 10px; padding: 0 4px; background: var(--color-brand-soft); color: var(--color-brand-hover); border-radius: 4px; margin-left: 4px; }
.absence-reference-explanation { margin: 0; padding: 0 16px 12px; font-size: 13px; color: var(--color-text-muted); }
.absence-reference-tag { font-size: 11px; background: var(--color-cancelled-bg); color: var(--color-cancelled-text); }
.manager-review-legend i.is-pending { background: repeating-linear-gradient(135deg,var(--color-calendar-pending-light) 0 4px,var(--color-calendar-pending-dark) 4px 8px); border: 1px dashed var(--color-calendar-pending-border); }
@media (max-width: 1023px) { .absence-summary.is-compact { grid-template-columns: 1fr; } .absence-note-fields > label > .muted { position: static; } }
@media (max-width: 600px) { .absence-summary.is-compact .absence-summary-stats { grid-template-columns: 1fr; } .absence-shift > div:first-child { flex-wrap: wrap; } }
.absence-person-select { position: relative; display: block; }
.absence-person-select .person-avatar { position: absolute; left: 9px; top: 8px; width: 26px; height: 26px; font-size: 10px; pointer-events: none; }
.absence-person-select.has-person select { padding-left: 43px; }
.manager-review-page.is-reference .manager-timeline-bar.is-request { height: 22px; padding: 1px 5px; }
.manager-review-page.is-reference .manager-timeline-person:not(.is-role) small { font-size: 11px; }
.absence-page > .employee-back-link { margin-bottom: 0; }
.absence-title { margin: 12px 0 16px; }
.absence-top-fields .employee-segments { margin-bottom: 0; }
.absence-form footer .actions > button[type=submit] { background: var(--color-brand); color: var(--color-surface); border: 0; }
.absence-form footer .actions > button[type=submit]:hover { background: var(--color-brand-hover); }
.absence-form footer .button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; min-height: 44px; padding: 8px 20px; border-radius: 8px; }

.absence-history tbody th { background: transparent; text-transform: none; letter-spacing: 0; color: var(--color-text); font-weight: 600; }
.absence-history .absence-year-row th { background: var(--color-page); font-size: 11px; color: var(--color-text-muted); }
.absence-history-heading { padding: 12px 16px; border-bottom: 1px solid var(--color-divider); }
.absence-history-heading select { min-height: 34px; font-size: 12px; }
.absence-form .warning-panel { margin: 0; padding: 10px 12px; font-size: 12px; }
.absence-shift-track { margin-bottom: 8px; }
/* Exact dimensions and alignment for the absence recording form. */
.absence-page { font-family: "IBM Plex Sans", system-ui, sans-serif; }
.absence-period-filter { display: flex; align-items: center; gap: 12px; color: var(--color-text-muted); font-size: 13px; font-weight: 600; }
.absence-period-filter .styled-select { width: 210px; }
.absence-reason-filter { width: 165px; flex-shrink: 0; }
.absence-page .styled-select-trigger { font-weight: 500; }
.absence-page .styled-select-menu { top: calc(100% + 6px); bottom: auto; }
.absence-page .absence-history { overflow: visible; }
.page-container:has(.absence-page) { padding-inline: 32px; }
.absence-title > span { width: 40px; height: 40px; flex: none; }
.absence-title h1 { font-size: 26px; }
.absence-title p { font-size: 12.5px; }
.absence-page > .employee-back-link { font-size: 13px; }
.absence-form { padding: 16px; margin-bottom: 14px; border-radius: 10px; }
.absence-form h2 { font-size: 14.5px; font-weight: 700; }
.absence-form form { gap: 14px; }
.absence-top-fields { grid-template-columns: minmax(220px, 1.3fr) max-content minmax(130px, 1fr) minmax(130px, 1fr) minmax(180px, 1.1fr); gap: 12px; align-items: end; }
.absence-form input:not([type=checkbox]):not([type=range]), .absence-form select, .absence-top-fields .employee-segments, .absence-top-fields .employee-segments button, .absence-hours { height: 36px; min-height: 36px; }
.absence-form input:not([type=checkbox]):not([type=range]), .absence-form select { padding: 6px 10px; }
.absence-top-fields .employee-segments button { padding: 6px 10px; height: 34px; min-height: 34px; }
.absence-top-fields label, .absence-field-label { line-height: 19.5px; }
.absence-top-fields .absence-field-label { margin-bottom: 6px; }
.absence-hours { display: flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1px solid var(--color-absence-hours-border); font-weight: 400; white-space: nowrap; }
.absence-hours strong { font-weight: 700; }
.absence-person-select .person-avatar { width: 24px; height: 24px; top: 6px; left: 8px; }
.absence-person-select.has-person select { padding-left: 40px; }
.absence-page select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='rgb(85,98,93)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 12px; }
.absence-note-fields { grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.absence-note-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 19.5px; }
.absence-note-label > .muted { font-size: 12px; font-weight: 400; text-align: right; }
.absence-note-fields textarea { min-height: 86px; margin: 0; resize: vertical; }
.absence-checkbox { font-size: 13px; font-weight: 600; margin-top: 8px; }
.absence-checkbox input { min-height: 14px; width: 14px; height: 14px; margin: 0; accent-color: var(--color-brand); }
.absence-checkbox .muted { font-weight: 400; }
.absence-checkbox:has(input:disabled) { color: var(--color-text-muted); }
.absence-inline-history > div:first-child { margin: 10px 0; }
.absence-inline-history h3 { margin: 0; font-size: 14px; }
.absence-inline-history h3 .muted { font-weight: 400; }
.absence-inline-history > div:first-child > a { font-size: 13px; font-weight: 600; }
.absence-summary.is-compact { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); gap: 16px; }
.absence-summary-stats > div:first-child { border-color: var(--color-text-muted); }
.absence-summary-stats > div:nth-child(3) { border-color: var(--color-absence-last-edge); }
.absence-summary-stats strong, .absence-summary-stats > div:nth-child(3) strong { font-size: 26px; }
.absence-summary-stats strong span { font-size: 14px; }
.absence-summary-stats p { font-size: 12.5px; }
.absence-swatch.unforeseen_circumstances, .absence-swatch.other { background-color: var(--color-absence-last-edge); }
.absence-form footer { margin: 0 -16px -16px; padding: 12px 16px; border-radius: 0 0 10px 10px; }
.absence-form footer .actions > button, .absence-form footer .button-link { min-height: 36px; height: 36px; font-size: 14px; border-radius: 8px; }
.manager-review-page.is-reference .manager-review-legend { background: var(--color-surface-alt); border-top: 1px solid var(--color-divider); }
.manager-review-page.is-reference .manager-timeline-bar.is-none { background: var(--color-absence-cover-none); }
.manager-review-page.is-reference .manager-timeline-bar.is-holiday { border-left: 3px solid var(--color-brand); }
@media (max-width: 1100px) { .absence-top-fields { grid-template-columns: repeat(2,minmax(0,1fr)); } .absence-note-fields { grid-template-columns: minmax(0,1fr); } .absence-note-label { flex-wrap: wrap; gap: 0; } .absence-note-label > .muted { text-align: left; } }
@media (max-width: 700px) { .page-container:has(.absence-page) { padding-inline: 16px; } .absence-note-fields, .absence-summary.is-compact { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 420px) { .absence-top-fields { grid-template-columns: minmax(0,1fr); } }
.absence-inline-history > div:first-child > a { font-weight: 700; }
.absence-reference-band, .holiday-reference-band { position: absolute; top: 0; bottom: 0; background: var(--color-absence-bg); opacity: .35; border-inline: 1px dashed var(--color-calendar-absence-edge); pointer-events: none; }
.manager-review-page.is-reference .manager-review-expand { display: flex; align-items: center; justify-content: space-between; width: 100%; background: var(--color-surface-alt); color: var(--color-text); padding: 8px 16px; }
.manager-review-page.is-reference .manager-review-expand > span:last-child { color: var(--color-brand); text-decoration: underline; }
.manager-review-page.is-reference .manager-timeline-cell.is-role { background-color: var(--color-cover-full); }
.manager-review-page.is-reference .manager-timeline-person .person-avatar { width: 26px; height: 26px; }
.manager-review-page.is-reference .manager-timeline-person.is-role small { display: none; }
.absence-role-count { font-weight: 400; color: var(--color-text-muted); }
.manager-review-page.is-reference .manager-timeline-cell.is-role { background-color: var(--color-surface); }
.manager-review-page.is-reference .manager-timeline-cell.is-role:not(.is-compact-weekend)::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 29px; background: var(--color-cover-full); }
.manager-review-page.is-reference .manager-timeline-cell.is-compact-weekend { background-color: var(--color-cancelled-bg); }

.success-toast-stack { position: fixed; right: 24px; width: min(400px, calc(100vw - 32px)); z-index: 10000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.success-toast { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--color-surface); border: 1px solid var(--color-focus-ring); border-left: 4px solid var(--color-brand); border-radius: 10px; box-shadow: 0 8px 24px var(--color-shadow-floating); overflow: hidden; pointer-events: auto; animation: toast-enter 200ms ease-out; }
.success-toast.is-leaving { animation: toast-leave 150ms ease-out forwards; pointer-events: none; }
.success-toast-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 24px; height: 24px; border-radius: 50%; background: var(--color-approved-bg); color: var(--color-brand); }
.success-toast-copy { flex: 1; min-width: 0; }
.success-toast-copy > strong { display: block; font-size: 14.5px; font-weight: 600; color: var(--color-text); }
.success-toast-copy p { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: var(--color-text-muted); }
.success-toast-copy p[role=alert] { color: var(--color-destructive); }
.success-toast-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.success-toast-actions:empty { display: none; }
.success-toast-actions a, .success-toast-actions button { min-height: 0; padding: 0; border: 0; background: transparent; font-size: 13px; font-weight: 600; color: var(--color-brand); text-decoration: none; cursor: pointer; }
.success-toast-actions a:hover, .success-toast-actions button:hover { background: transparent; text-decoration: underline; color: var(--color-brand); }
.success-toast-close { flex: 0 0 28px; height: 28px; min-height: 28px; display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; border-radius: 8px; color: var(--color-text-muted); }
.success-toast-close:hover { background: var(--color-page); }
.success-toast-progress { position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--color-toast-progress); transform-origin: left; transition: transform 100ms linear; }
@keyframes toast-enter { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-leave { to { opacity: 0; } }
@media (max-width: 480px) { .success-toast-stack { right: 16px; } }
@media (prefers-reduced-motion: reduce) { .success-toast, .success-toast.is-leaving { animation: none; } .success-toast-progress { transition: none; } }

.manager-timeline-cell .manager-timeline-bar.is-working,
.manager-timeline-cell .manager-timeline-bar.is-temping { height: 34px; padding: 6px 5px; }
.manager-timeline-cell .manager-timeline-bar.is-working { background: var(--color-working-fill); border-left: 3px solid var(--color-working-edge); color: var(--color-surface); font-weight: 600; }
.manager-review-legend i.is-working { background: var(--color-working-fill); border-left: 3px solid var(--color-working-edge); }

.manager-review-summary .review-note-hint { font-size: 12px; margin: 4px 0 6px; }

.manager-review-summary #review-note { display: block; width: 100%; }

.holiday-reference-band { background: var(--color-calendar-pending-light); border-color: var(--color-calendar-pending-border); }

.manager-timeline-cell .manager-timeline-bar.is-cancellation {
  border-radius: 5px;
  background: repeating-linear-gradient(135deg, var(--color-calendar-approved-bg) 0 7px, var(--color-cancellation-amber) 7px 14px);
  border: 2.5px solid var(--color-cancellation-border);
  box-sizing: border-box;
  box-shadow: 0 0 0 3px var(--color-cancellation-glow);
  color: var(--color-warning-text);
}
.manager-timeline-cell .manager-timeline-bar.is-cancellation { height: 34px; padding: 6px 5px; }
.manager-review-balance .employee-balance-bar > .balance-pending.is-cancellation {
  background: repeating-linear-gradient(135deg, var(--color-calendar-approved-bg) 0 7px, var(--color-cancellation-amber) 7px 14px);
  box-shadow: inset 0 0 0 2px var(--color-cancellation-border);
}
.manager-request-history { margin: 20px 0; }
.manager-request-history h3 { color: var(--color-text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 12px; }
.manager-request-history ol { list-style: none; margin: 0 0 0 10px; padding: 0; border-left: 2px solid var(--color-border); }
.manager-request-history li { position: relative; padding: 0 0 14px 24px; font-size: 13px; }
.manager-request-history li:last-child { padding-bottom: 0; }
.manager-request-history li::before { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; left: -8px; top: 3px; background: var(--color-calendar-pending-border); box-shadow: 0 0 0 4px var(--color-pending-bg); }
.manager-request-history li.is-approved::before { background: var(--color-brand); box-shadow: 0 0 0 4px var(--color-brand-soft); }
.manager-request-history strong, .manager-request-history time { display: block; }
.manager-request-history time { color: var(--color-text-muted); margin-top: 2px; }

.holiday-reference-band { border-inline: 1.5px dashed var(--color-calendar-pending-border); background: var(--color-request-band); opacity: 1; }
.manager-timeline-person.is-cancellation, .manager-timeline-cell.is-cancellation { background-color: var(--color-cancellation-row); }
.manager-timeline-bar.is-cancellation { container-type: inline-size; }
.cancellation-block-label { display: inline-flex; align-items: center; gap: 5px; position: absolute; left: 7px; top: 50%; transform: translateY(-50%); max-width: calc(100% - 14px); border-radius: 4px; padding: 2px 7px; background: var(--color-surface); color: var(--color-cancellation-text); font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 12px; font-weight: 700; white-space: nowrap; box-sizing: border-box; }
.cancellation-block-label svg { flex-shrink: 0; }
@container (max-width: 120px) { .cancellation-block-label:not(.request-block-label) > span { display: none; } }
.manager-review-legend i.is-cancellation { width: 12px; height: 12px; background: repeating-linear-gradient(135deg, var(--color-calendar-approved-bg) 0 3px, var(--color-cancellation-amber) 3px 6px); border: 1.5px solid var(--color-cancellation-border); box-sizing: border-box; }

.manager-review-page:not(.is-reference) .manager-timeline-bar.is-request { container-type: inline-size; box-shadow: 0 0 0 3px var(--color-cancellation-glow); }

.request-block-label { overflow: hidden; }
.request-block-label > span { min-width: 0; overflow: hidden; text-overflow: clip; }
.manager-review-page:not(.is-reference) .manager-timeline-bar.is-request:not(.is-cancellation):hover,
.manager-review-page:not(.is-reference) .manager-timeline-bar.is-request:not(.is-cancellation):focus-visible { overflow: visible; z-index: 2; }
.manager-timeline-bar:hover .request-block-label,
.manager-timeline-bar:focus-visible .request-block-label { max-width: none; }

.manager-review-balance .employee-balance-bar > .balance-left { background: var(--color-calendar-lunch-dark); }
.manager-review-balance .employee-balance-bar > span:focus-visible { outline: 2px solid var(--color-brand-hover); outline-offset: -2px; }

.manager-timeline-cell .manager-timeline-bar.is-lunch { background: repeating-linear-gradient(135deg, var(--color-surface) 0 3px, var(--color-working-lunch-grey) 3px 6px); border: 0; border-radius: 2px; height: 34px; padding: 0; }

.manager-timeline-cell .manager-timeline-bar.is-holiday-lunch { background-color: var(--color-calendar-approved-bg); background-image: repeating-linear-gradient(135deg, var(--color-holiday-lunch-hatch) 0 3px, transparent 3px 6px); border: 0; border-inline: 1px dashed var(--color-holiday-lunch-edge); border-radius: 2px; height: 34px; padding: 0; }

.manager-timeline-cell .manager-timeline-bar.is-absence,
.manager-review-page.is-reference .manager-timeline-bar.is-request { height: 34px; padding: 6px 5px; }
.manager-timeline-cell .manager-timeline-bar.is-absence-lunch { background-color: var(--color-absence-bg); background-image: repeating-linear-gradient(135deg, var(--color-holiday-lunch-hatch) 0 3px, transparent 3px 6px); border: 0; border-inline: 1px dashed var(--color-absence-lunch-edge); border-radius: 2px; height: 34px; padding: 0; }

.manager-review-grid .manager-coverage-card { overflow: clip; }
.manager-timeline-sticky-header { position: sticky; top: 0; z-index: 5; background: var(--color-surface); box-shadow: 0 2px 0 var(--color-divider); }
.manager-timeline-header-scroll { overflow: hidden; }
.manager-timeline-sticky-header .manager-timeline-times { background-color: var(--color-surface); }

.manager-timeline-cell .manager-timeline-bar.is-pending-lunch,
.manager-timeline-cell .manager-timeline-bar.is-cancellation-lunch { background-image: repeating-linear-gradient(135deg, var(--color-holiday-lunch-hatch) 0 3px, transparent 3px 6px); border: 0; border-inline: 1px dashed var(--color-calendar-pending-border); border-radius: 2px; height: 34px; padding: 0; }
.manager-timeline-cell .manager-timeline-bar.is-pending-lunch { background-color: var(--color-calendar-pending-light); }
.manager-timeline-cell .manager-timeline-bar.is-cancellation-lunch { background-color: var(--color-calendar-approved-bg); background-image: repeating-linear-gradient(135deg, var(--color-holiday-lunch-hatch) 0 3px, transparent 3px 6px), repeating-linear-gradient(135deg, var(--color-calendar-approved-bg) 0 7px, var(--color-cancellation-amber) 7px 14px); }
.manager-timeline-bar .cancellation-block-label { z-index: 1; }

.manager-review-page.is-reference .manager-timeline-bar.is-request { background: var(--color-absence-bg); border: 1px solid var(--color-calendar-absence-edge); border-left: 3px solid var(--color-calendar-absence-edge); color: var(--color-absence-text); }
.manager-review-legend .is-absence, .manager-review-page.is-reference .manager-review-legend i.is-request { background: var(--color-absence-bg); border-left: 3px solid var(--color-calendar-absence-edge); }

.manager-review-page .manager-timeline-person:not(.is-role) { position: sticky; padding: 10px 10px 10px 48px; }
.manager-review-page .manager-timeline-person:not(.is-role) .person-avatar { position: absolute; left: 12px; top: 10px; width: 26px; height: 26px; }
.manager-review-page .manager-timeline-person:not(.is-role) strong { font-size: 13px; line-height: 1.25; }
.manager-review-page .manager-timeline-person:not(.is-role) small { margin-top: 1px; font-size: 11px; line-height: 1.25; }

.manager-review-page .manager-timeline-person.is-role strong { font-size: 13px; font-weight: 600; line-height: 1.3; white-space: nowrap; }

.manager-timeline-bar.is-pending:hover, .manager-timeline-bar.is-pending:focus-visible { overflow: visible; z-index: 2; }

.manager-timeline-cell, .manager-timeline-times { background-image: none; }
.manager-timeline-gridline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--color-divider); pointer-events: none; }
.manager-timeline-cell.is-compact-weekend .manager-timeline-gridline { display: none; }

.manager-timeline-day, .manager-timeline-times, .manager-timeline-section-spacer, .manager-timeline-cell { border-left-width: 2px; }

.manager-timeline-navigation { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px 16px; }
.manager-timeline-navigation button { min-width: 32px; min-height: 32px; padding: 2px 8px; }
.manager-timeline-navigation strong { font-size: 13px; }
.manager-review-page.is-week-view .manager-timeline-times span { font-size: 10px; }
.manager-review-page.is-week-view .manager-timeline-day { font-size: 12px; padding-inline: 6px; }
.manager-review-page.is-week-view .manager-timeline-day.is-compact-weekend { padding: 0; }
.manager-review-page.is-week-view .manager-timeline-bar { font-size: 10px; }
.manager-review-page.is-week-view .manager-timeline-scroll { overflow-x: hidden; }
.manager-coverage-show { flex-wrap: wrap; }
.manager-review-page.is-week-view .manager-timeline-times span:first-child { transform: translateX(3px); }
.manager-review-page.is-week-view .manager-timeline-times span:last-child { transform: translateX(calc(-100% - 3px)); }
.manager-coverage-heading .manager-calendar-view { margin-left: 12px; }
.manager-coverage-heading .manager-calendar-view button, .manager-coverage-heading .manager-calendar-today button { min-width: 86px; padding-inline: 22px; }
.manager-payroll-week { font-size: 13px; font-weight: 500; color: var(--color-text-muted); }
.manager-range-notice { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 16px; border-block: 1px solid var(--color-warning-border); border-inline: 0; border-radius: 0; background: var(--color-warning-bg); color: var(--color-warning-text); font-size: 13px; line-height: 1.5; }
.manager-range-notice > svg { flex: 0 0 20px; margin-top: 1px; color: var(--color-warning-icon); }
.manager-range-links { display: inline-flex; flex-wrap: wrap; gap: 12px; }
.manager-range-links button { width: auto; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--color-brand); font-size: inherit; font-weight: 600; text-decoration: underline; }
.manager-range-links button:hover { background: transparent; color: var(--color-brand-hover); }

.manager-coverage-card:has(.manager-range-notice) .manager-review-controls { border-bottom: 0; padding-bottom: 0; }

/* Admin payroll schedule */
.page-container:has(.payroll-schedule) { max-width: none; padding: 26px 36px 48px; }
.payroll-schedule { display: grid; gap: 18px; }
.payroll-schedule-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.payroll-schedule-heading h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.payroll-schedule-heading p { margin: 6px 0 0; font-size: 14px; color: var(--color-text-muted); }
.payroll-schedule-heading label { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--color-text-muted); }
.payroll-schedule-heading select { width: 100px; min-height: 38px; border: 1px solid var(--color-border-strong); border-radius: 8px; padding: 8px 32px 8px 12px; background-position: right 12px center; }
.payroll-summary-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr); gap: 16px; }
.payroll-summary-card, .payroll-calendar-card, .payroll-periods-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; overflow: hidden; }
.payroll-summary-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.payroll-summary-main { background: var(--color-brand-tint); border-color: var(--color-brand-border); }
.payroll-summary-label { display: flex; justify-content: space-between; align-items: center; font-size: 12px; letter-spacing: .06em; font-weight: 600; color: var(--color-text-muted); }
.payroll-summary-main .payroll-summary-label { color: var(--color-brand-hover); }
.payroll-summary-pill { background: var(--color-brand-soft); color: var(--color-brand-hover); padding: 4px 10px; border-radius: 100px; letter-spacing: normal; }
.payroll-summary-dates { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; font-size: 18px; }
.payroll-summary-main .payroll-code { font-size: 22px; }
.payroll-summary-previous .payroll-summary-dates { font-size: 15px; }
.payroll-summary-previous .payroll-code { font-size: 18px; }
.payroll-summary-card p { margin: 0; font-size: 13px; color: var(--color-text-muted); }
.payroll-workday-progress { height: 8px; border-radius: 4px; background: var(--color-avatar-bg); overflow: hidden; }
.payroll-workday-progress > span { display: block; height: 100%; background: var(--color-brand); border-radius: inherit; }
.payroll-summary-detail { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.payroll-summary-detail span { color: var(--color-text-muted); }
.payroll-months { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--color-divider); }
.payroll-months button { position: relative; height: 40px; min-height: 40px; border: 0; border-radius: 8px; padding: 4px; background: transparent; color: var(--color-text); font-size: 13.5px; font-weight: 400; }
.payroll-months button.is-past { color: var(--color-text-subtle); }
.payroll-months button:hover { background: var(--color-brand-soft); }
.payroll-months button.is-selected { background: var(--color-brand); color: var(--color-surface); font-weight: 600; }
.payroll-month-dot { position: absolute; bottom: 4px; left: calc(50% - 2px); width: 4px; height: 4px; border-radius: 50%; background: var(--color-brand); }
.payroll-months .is-selected .payroll-month-dot { background: var(--color-surface); }
.payroll-weekday-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); }
.payroll-weekday-heading { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); }
.payroll-weekday-heading span { padding: 10px 16px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); font-weight: 600; border-bottom: 1px solid var(--color-divider); }
.payroll-period-band, .payroll-today-strip { grid-column: 1 / -1; padding: 8px 16px; font-size: 12px; font-weight: 600; background: var(--color-surface-alt); border-bottom: 1px solid var(--color-divider); }
.payroll-period-band.is-ended { background: var(--color-cancelled-bg); color: var(--color-cancelled-text); }
.payroll-period-band.is-highlighted { background: var(--color-brand); color: var(--color-surface); }
.payroll-day { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 16px; font-size: 12.5px; font-variant-numeric: tabular-nums; border-right: 1px solid var(--color-divider); border-bottom: 1px solid var(--color-divider); }
.payroll-day.is-ended, .payroll-periods-card tr.is-ended { color: var(--color-text-subtle); }
.payroll-day.is-highlighted, .payroll-periods-card tr.is-highlighted { background: var(--color-brand-tint); }
.payroll-day.is-next-workday { font-weight: 700; color: var(--color-brand-hover); }
.payroll-today-strip { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--color-text-muted); background: repeating-linear-gradient(135deg,var(--color-page) 0 5px,var(--color-cancelled-bg) 5px 10px); }
.payroll-today-strip > span, .payroll-day-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-brand); flex-shrink: 0; }
.payroll-calendar-empty { grid-column: 1 / -1; padding: 16px; color: var(--color-text-muted); }
.payroll-periods-card table { width: 100%; border-collapse: collapse; }
.payroll-periods-card th { font-size: 12px; text-transform: uppercase; font-weight: 600; color: var(--color-text-muted); border-bottom: 1px solid var(--color-border); }
.payroll-periods-card td, .payroll-periods-card th { padding: 8px 16px; }
.payroll-periods-card td { font-size: 13.5px; border-bottom: 1px solid var(--color-divider); }
.payroll-periods-card tr.is-highlighted { font-weight: 600; }
.payroll-periods-card tr.is-highlighted td:first-child { box-shadow: inset 3px 0 var(--color-brand); }
.payroll-periods-card footer { background: var(--color-surface-alt); padding: 10px 16px; }
.payroll-periods-card footer button { min-height: 24px; padding: 0; font-size: 13px; font-weight: 600; color: var(--color-brand); }
@media (max-width: 700px) { .page-container:has(.payroll-schedule) { padding: 24px 16px; } .payroll-summary-grid { grid-template-columns: 1fr; } .payroll-schedule-heading { align-items: flex-start; flex-wrap: wrap; } .payroll-months { grid-template-columns: repeat(6,minmax(0,1fr)); } .payroll-day { padding-inline: 6px; font-size: 11px; } .payroll-summary-detail { flex-wrap: wrap; } .payroll-periods-card td, .payroll-periods-card th { padding-inline: 8px; } }

.payroll-summary-grid.has-current { grid-template-columns: minmax(0,1fr) minmax(0,2fr) minmax(0,1fr); }
.payroll-summary-next .payroll-summary-dates { font-size: 15px; }
.payroll-summary-next .payroll-code { font-size: 18px; }
.payroll-year-select { position: relative; display: inline-flex; align-items: center; }
.payroll-schedule-heading .payroll-year-select select { appearance: none; background-image: none; padding-right: 36px; }
.payroll-year-select svg { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--color-text-muted); }
@media (max-width: 700px) { .payroll-summary-grid, .payroll-summary-grid.has-current { grid-template-columns: 1fr; } }
.page-container:has(.all-payroll-periods) { max-width: none; padding: 22px 36px 48px; }
.all-payroll-periods { display: grid; gap: 14px; }
.payroll-back-link { justify-self: start; font-size: 13px; color: var(--color-brand); text-decoration: none; }
.all-payroll-toolbar { display: flex; align-items: center; gap: 14px; }
.payroll-jump-link, .payroll-periods-card footer a { font-size: 13px; font-weight: 600; color: var(--color-brand); text-decoration: none; }
.payroll-back-link:hover, .payroll-jump-link:hover, .payroll-periods-card footer a:hover { color: var(--color-brand-hover); text-decoration: underline; }
.payroll-future-actions:empty { display: none; }
.all-payroll-table td { padding: 7px 16px; }
.all-payroll-table thead th { letter-spacing: .05em; }
.all-payroll-table .payroll-quarter-row th { background: var(--color-surface-alt); font-size: 11.5px; padding: 6px 16px; letter-spacing: .06em; text-align: left; }
.payroll-status-pill { display: inline-block; border-radius: 100px; padding: 2px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.payroll-status-pill.is-ended { background: var(--color-cancelled-bg); color: var(--color-cancelled-text); }
.payroll-status-pill.is-current { background: var(--color-brand); color: var(--color-surface); }
.payroll-status-pill.is-upcoming { background: var(--color-brand-soft); color: var(--color-brand-hover); }
.all-payroll-table tr { scroll-margin-top: 90px; }
.all-payroll-table tr.is-jumped td { background: var(--color-brand-soft); }
.all-payroll-table tr:focus-visible { outline: 2px solid var(--color-brand); outline-offset: -2px; }
@media (max-width: 700px) { .page-container:has(.all-payroll-periods) { padding-inline: 16px; } .all-payroll-toolbar { flex-wrap: wrap; } .all-payroll-table { overflow-x: auto; } .all-payroll-table table { min-width: 510px; } }

/* Change history and date range picker */
.change-diff { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 14px; }
.change-diff s { color: var(--color-text-subtle); }
.change-diff > span { color: var(--color-text-muted); }
.change-diff strong { padding: 1px 8px; border-radius: 6px; background: var(--color-approved-bg); color: var(--color-approved-text); }
.change-diff strong.is-reduction { background: var(--color-declined-bg); color: var(--color-declined-text); }
.history-range-control { position: relative; }
.history-range-trigger { display: flex; align-items: center; gap: 8px; height: 36px; min-height: 36px; padding: 7px 10px; font-size: 13px; border-color: var(--color-border-strong); white-space: nowrap; }
.history-range-trigger.is-open { border: 2px solid var(--color-brand); padding: 6px 9px; box-shadow: 0 0 0 3px var(--color-focus-ring); }
.history-range-chevron { display: block; width: 16px; height: 16px; flex-shrink: 0; align-self: center; }
.history-range-popover { position: absolute; right: 0; top: 46px; z-index: 60; width: min(720px,calc(100vw - 32px)); display: grid; grid-template-columns: 196px minmax(0,1fr); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; box-shadow: 0 12px 32px var(--color-audit-shadow); overflow: hidden; }
.history-range-popover aside { padding: 8px; background: var(--color-surface-alt); border-right: 1px solid var(--color-divider); }
.history-range-popover aside button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 6px; text-align: left; padding: 9px 10px; min-height: 36px; border: 0; background: transparent; border-radius: 8px; font-size: 13.5px; font-weight: 400; }
.history-range-popover aside button[aria-pressed=true] { background: var(--color-brand-soft); color: var(--color-brand-hover); font-weight: 600; }
.history-range-popover aside small { font-size: 10px; color: var(--color-text-muted); }
.history-range-custom { display: grid; gap: 14px; padding: 16px 20px; }
.history-range-fields, .history-range-calendars { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.history-range-fields label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--color-text-muted); }
.history-range-fields input { width: 100%; min-height: 36px; padding: 7px 10px; font-size: 13.5px; }
.history-range-month header { position: relative; height: 30px; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.history-range-month header button { position: absolute; top: 1px; width: 28px; height: 28px; min-height: 28px; padding: 0; border: 0; background: transparent; font-size: 20px; }
.history-range-month header button[aria-label="Previous month"] { left: 0; }
.history-range-month header button[aria-label="Next month"] { right: 0; }
.history-range-days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.history-range-days > span { text-align: center; font-size: 11px; color: var(--color-text-muted); height: 24px; }
.history-range-days button { height: 30px; min-height: 30px; border: 0; border-radius: 0; padding: 0; background: transparent; font-size: 12.5px; font-weight: 400; }
.history-range-days button.is-between { background: var(--color-brand-soft); color: var(--color-brand-hover); }
.history-range-days button.is-start, .history-range-days button.is-end { background: var(--color-brand); color: var(--color-surface); font-weight: 700; }
.history-range-days button.is-start { border-radius: 8px 0 0 8px; }
.history-range-days button.is-end { border-radius: 0 8px 8px 0; }
.history-range-days button.is-start.is-end { border-radius: 8px; }
.history-range-days button:disabled { color: var(--color-border-strong); opacity: 1; }
.history-range-custom footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--color-divider); padding-top: 12px; font-size: 12.5px; color: var(--color-text-muted); }
.history-range-custom footer > div { display: flex; gap: 8px; }
.history-range-custom footer button { font-size: 13px; font-weight: 600; padding: 8px 14px; min-height: 36px; }
.history-range-custom footer .history-range-apply { background: var(--color-brand); color: var(--color-surface); border-color: var(--color-brand); }
.history-range-validation { margin: 0; font-size: 12px; color: var(--color-destructive); }
.change-reason-fields { display: grid; gap: 12px; }
.change-reason-fields label { display: grid; gap: 6px; }
@media (max-width: 700px) { .history-range-trigger { gap: 4px; font-size: 11px; padding-inline: 6px; } .history-range-popover { grid-template-columns: 1fr; } .history-range-popover aside { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--color-divider); border-right: 0; } .history-range-custom { padding: 12px; } .history-range-calendars { gap: 12px; } }
.history-range-trigger { border: 1px solid var(--color-border-strong); background: var(--color-surface); color: var(--color-text); font-weight: 400; }
.history-range-trigger:hover { background: var(--color-surface-alt); }
.history-range-trigger.is-open { border: 2px solid var(--color-brand); }
.history-range-popover aside button { color: var(--color-text); }
.history-range-month header button, .history-range-days button { color: var(--color-text); }
.history-range-custom footer button { background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border-strong); }
.history-range-custom footer .history-range-apply { background: var(--color-brand); color: var(--color-surface); border-color: var(--color-brand); }
.history-range-fields input { font-weight: 400; }
@media (max-width: 700px) { .history-range-control { flex-shrink: 0; } .history-range-fields input { min-width: 0; } }

.hours-change-popover { position: fixed; z-index: 1200; width: min(384px, calc(100vw - 32px)); padding: 16px; display: grid; gap: 12px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; box-shadow: 0 16px 40px var(--color-draft-shadow); font-family: "IBM Plex Sans", system-ui, sans-serif; max-height: calc(100svh - 32px); overflow-y: auto; }
.hours-change-popover::before { content: ""; position: fixed; width: 12px; height: 12px; background: var(--color-surface); border: 1px solid var(--color-border); transform: translate(-23px, calc(var(--arrow-top) - 7px)) rotate(45deg); border-top: 0; border-right: 0; }
.hours-change-popover.opens-left::before { right: auto; margin-left: 365px; transform: translate(0, calc(var(--arrow-top) - 7px)) rotate(45deg); border: 1px solid var(--color-border); border-bottom: 0; border-left: 0; }
.hours-change-popover header { display: flex; justify-content: space-between; gap: 8px; }
.hours-change-popover h3 { font-size: 15.5px; margin: 0; }
.hours-change-popover header p { font-size: 12.5px; color: var(--color-text-muted); margin: 3px 0 0; }
.hours-change-close { color: var(--color-text-muted); border: 0; background: transparent; padding: 0; width: 24px; height: 24px; font-size: 20px; }
.hours-change-diff { display: flex; align-items: center; gap: 7px; padding: 9px 11px; font-size: 14px; font-variant-numeric: tabular-nums; border-radius: 8px; background: var(--color-page); white-space: nowrap; }
.hours-change-diff s { color: var(--color-text-subtle); }
.hours-change-delta { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--color-approved-text); background: var(--color-approved-bg); border-radius: 99px; padding: 2px 7px; }
.hours-change-delta.is-reduction { color: var(--color-declined-text); background: var(--color-declined-bg); }
.hours-change-popover fieldset { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.hours-change-popover legend { font-size: 12px; font-weight: 600; color: var(--color-text-muted); padding: 0 0 6px; }
.hours-change-option { display: flex; gap: 9px; padding: 9px 10px; border: 1px solid var(--color-border); border-radius: 9px; font-size: 13px; cursor: pointer; }
.hours-change-option.is-selected { border-color: var(--color-brand); box-shadow: inset 0 0 0 1px var(--color-brand); background: var(--color-brand-tint); }
.hours-change-option input[type=radio] { accent-color: var(--color-brand); width: 14px; min-height: 0; height: 14px; margin: 3px 0 0; flex-shrink: 0; }
.hours-change-option small { display: block; margin-top: 3px; font-size: 12px; color: var(--color-text-muted); }
.hours-change-option.repeat { display: block; }
.hours-change-option.repeat > label { display: flex; gap: 9px; }
.hours-change-repeat { display: grid; gap: 8px; padding: 10px 0 0 23px; font-size: 12px; }
.hours-change-repeat > div:first-child, .hours-change-repeat > label { display: flex; align-items: center; gap: 8px; }
.hours-frequency { display: flex; border: 1px solid var(--color-border-strong); border-radius: 6px; overflow: hidden; }
.hours-frequency button { padding: 5px 8px; font-size: 12px; border: 0; border-radius: 0; color: var(--color-text); background: var(--color-surface); white-space: nowrap; }
.hours-frequency button[aria-pressed=true] { background: var(--color-brand); color: var(--color-surface); }
.hours-change-repeat select, .hours-change-repeat input, .hours-change-reason input { height: 34px; min-height: 34px; border: 1px solid var(--color-input-border); border-radius: 8px; font-size: 13px; padding: 6px 9px; background-color: var(--color-surface); }
.hours-change-repeat select { flex: 1; appearance: auto; }
.hours-change-repeat p { margin: 0; color: var(--color-text-muted); line-height: 1.5; }
.hours-change-skip { border-radius: 6px; padding: 4px 7px; background: var(--color-brand-soft); color: var(--color-brand-hover); font-size: 12px; }
.hours-change-reason { display: grid; gap: 6px; font-size: 12px; font-weight: 600; }
.hours-change-reason span { font-weight: 400; }
.hours-change-impact { margin: 0; font-size: 12px; color: var(--color-text-muted); }
.hours-change-impact strong { color: var(--color-text); }
.hours-change-popover footer { display: flex; justify-content: flex-end; gap: 8px; padding-top: 12px; border-top: 1px solid var(--color-divider); white-space: nowrap; }
.hours-change-popover footer button { font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 8px; }
.hours-change-popover .hours-apply { background: var(--color-brand); color: var(--color-surface); border: 1px solid var(--color-brand); }
.hours-change-popover button:disabled { opacity: .5; cursor: not-allowed; }
.calendar-unsaved-block { outline: 2px dashed var(--color-draft-outline); outline-offset: 2px; box-shadow: 0 3px 10px var(--color-draft-shadow); }
.calendar-draft-ghost.fc-bg-event { background: var(--color-draft-ghost); border: 1.5px dashed var(--color-input-border); opacity: 1; }
.calendar-unsaved-tag { display: block; margin-top: 3px; padding: 1px 5px; font-size: 10px; font-weight: 700; color: var(--color-pending-text); background: var(--color-pending-bg); border-radius: 4px; }

.hours-change-popover label { text-transform: none; }
.hours-change-option small { font-weight: 400; }
.hours-change-reason .hours-reason-label { font-weight: 600; }
.hours-change-reason .hours-reason-label > span { font-weight: 400; }
/* Compact employee profile and working-hours overview. */
.page-container:has(.employee-admin-page) { max-width: none; padding: 16px 26px 32px; }
.employee-admin-page { display: grid; gap: 12px; }
.employee-team-back { font-size: 13px; text-decoration: none; justify-self: start; }
.employee-profile { justify-content: flex-start; gap: 12px; }
.employee-profile-avatar { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--color-avatar-bg); color: var(--color-brand-hover); font-weight: 600; }
.employee-profile-identity { min-width: 0; }
.employee-profile-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.employee-profile h1 { margin: 0; font-size: 24px; }
.employee-profile p { margin: 3px 0 0; font-size: 13px; color: var(--color-text-muted); }
.employee-access-pill, .employee-role-pill { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; text-transform: capitalize; background: var(--color-cancelled-bg); color: var(--color-cancelled-text); }
.employee-role-pill { background: var(--color-brand-soft); color: var(--color-brand-hover); }
.employee-profile-divider { width: 1px; height: 16px; background: var(--color-profile-divider); }
.employee-profile-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.employee-profile-actions button { font-size: 13px; }
.employee-more { position: relative; }
.employee-more summary { display: grid; place-items: center; width: 36px; height: 36px; background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: 8px; cursor: pointer; list-style: none; font-weight: 700; }
.employee-more summary::-webkit-details-marker { display: none; }
.employee-more > div { position: absolute; right: 0; top: 40px; z-index: 20; width: 200px; padding: 6px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 8px 24px var(--color-shadow-floating); }
.employee-more button { display: block; width: 100%; text-align: left; background: transparent; color: var(--color-text); }
.employee-more button:hover { background: var(--color-brand-soft); }
.employee-summary-tiles { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.employee-summary-tile { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; min-width: 0; }
.employee-summary-tile h2 { margin: 0 0 4px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted); }
.employee-summary-tile p { margin: 0; font-size: 12.5px; color: var(--color-text-muted); }
.employee-tile-number { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.employee-tile-number strong { font-size: 22px; color: var(--color-text); letter-spacing: -.02em; }
.employee-summary-tile > a, .employee-tile-links { margin-top: auto; padding-top: 8px; font-size: 12.5px; }
.employee-tile-links { display: flex; gap: 14px; }
.profile-balance-bar { display: flex; height: 10px; gap: 2px; overflow: hidden; border-radius: 7px; margin: 4px 0; }
.profile-balance-bar span { min-width: 0; }
.profile-balance-bar .booked, .employee-balance-legend .booked { background: var(--color-brand); }
.profile-balance-bar .pending, .employee-balance-legend .pending { background: repeating-linear-gradient(135deg,var(--color-calendar-pending-dark) 0 4px,var(--color-profile-pending) 4px 8px); box-shadow: inset 0 0 0 1.5px var(--color-calendar-pending-border); }
.profile-balance-bar .left, .employee-balance-legend .left { background: var(--color-profile-left); box-shadow: inset 0 0 0 1px var(--color-profile-left-border); }
.employee-balance-legend { display: flex; gap: 8px; font-size: 11.5px; color: var(--color-text-muted); white-space: nowrap; }
.employee-balance-legend span { display: inline-flex; align-items: center; gap: 3px; }
.employee-balance-legend i, .employee-last-absence i { width: 10px; height: 10px; display: inline-block; border-radius: 2px; }
.employee-balance-legend b { color: var(--color-text); }
.employee-last-absence { display: flex; gap: 6px; align-items: center; }
.employee-last-absence i { background: var(--color-absence-bg); box-shadow: inset 2px 0 var(--color-calendar-absence-edge); }
.employee-compact-calendar { margin: 0; padding: 0; border: 1px solid var(--color-border); border-radius: 10px; overflow: hidden; background: var(--color-surface); }
.employee-hours-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 14px; gap: 12px; border-bottom: 1px solid var(--color-border); }
.employee-hours-toolbar > div { display: flex; align-items: center; gap: 12px; }
.employee-hours-toolbar h2 { font-size: 15px; margin: 0; }
.employee-week-tabs { display: inline-flex; }
.employee-week-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 30px; padding: 6px 12px; font-size: 12.5px; color: var(--color-text-muted); background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: 0; }
.employee-week-tabs button:first-child { border-radius: 8px 0 0 8px; }
.employee-week-tabs button:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.employee-week-tabs button[aria-pressed=true] { background: var(--color-brand-soft); color: var(--color-brand-hover); }
.employee-hours-toolbar nav { display: flex; gap: 6px; align-items: center; }
.employee-hours-toolbar nav strong { min-width: 128px; font-size: 13.5px; text-align: center; }
.employee-hours-toolbar nav button { padding: 6px 10px; }
.employee-period-summary { padding: 12px 14px; display: grid; gap: 8px; border-bottom: 1px solid var(--color-border); }
.employee-period-summary.incomplete { background: var(--color-profile-alert); box-shadow: inset 4px 0 var(--color-absence-cover-none); border-bottom-color: var(--color-profile-alert-border); }
.employee-period-summary > div:first-child { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--color-text-muted); gap: 12px; }
.employee-period-summary b { font-size: 15px; color: var(--color-text); }
.employee-missing-badge { padding: 6px 13px 6px 10px; border-radius: 999px; background: var(--color-absence-cover-none); color: var(--color-surface); font-size: 14px; box-shadow: 0 2px 6px var(--color-profile-alert-shadow); }
.employee-fully-planned { color: var(--color-brand); font-size: 12px; }
.employee-over-contract { color: var(--color-team-amber-text); font-size: 12px; font-weight: 600; }
.employee-planned-bar .over-contract, .employee-hours-key .over-contract { background: var(--color-planned-over-contract); }
.employee-planned-bar { display: flex; height: 12px; border-radius: 6px; background: var(--color-cancelled-bg); overflow: hidden; }
.employee-planned-bar i { flex: none; }
.employee-hours-key, .employee-grid-legend { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 12px; color: var(--color-text-muted); }
.employee-hours-key span, .employee-grid-legend span { display: flex; gap: 5px; align-items: center; }
.employee-hours-key i, .employee-grid-legend i { width: 12px; height: 12px; border-radius: 2px; }
.employee-day-key i { width: 8px; height: 8px; border-radius: 1px; }
.employee-hours-key .work, .employee-grid-legend .work, .employee-day-key .work, .employee-planned-bar .work { background: var(--color-working-fill); }
.employee-hours-key .holiday, .employee-grid-legend .holiday, .employee-day-key .holiday, .employee-planned-bar .holiday { background: var(--color-profile-holiday); }
.employee-hours-key .absence, .employee-planned-bar .absence { background: var(--color-absence-text); }
.employee-grid-legend .absence { background: var(--color-absence-bg); }
.employee-hours-key .unplanned, .employee-planned-bar .unplanned { background: repeating-linear-gradient(135deg,var(--color-cover-none-hatch) 0 4px,var(--color-declined-bg) 4px 8px); }
.employee-unplanned { color: var(--color-declined-text); font-weight: 600; }
.employee-grid-legend .agreed { border: 1.5px dashed var(--color-input-border); }
.employee-grid-legend .lunch, .employee-day-key .lunch { background: repeating-linear-gradient(135deg,var(--color-surface) 0 3px,var(--color-working-lunch-grey) 3px 6px); }
.employee-grid-legend .pending, .employee-day-key .pending { background: repeating-linear-gradient(135deg,var(--color-surface) 0 3px,var(--color-cover-short) 3px 6px); border: 1px solid var(--color-calendar-pending-border); }
.employee-grid-legend { padding: 8px 14px; background: var(--color-surface-alt); border-top: 1px solid var(--color-border); }
.employee-grid-hint { margin-left: auto; }
.employee-compact-calendar .employee-short-notice { padding: 1px 5px; font-size: 10.5px; font-weight: 600; color: var(--color-pending-text); border: 1px solid var(--color-warning-border); border-radius: 999px; background: var(--color-surface); }
.employee-compact-calendar .employee-short-notice::before { content: ''; width: 5px; height: 5px; display: inline-block; margin-right: 4px; border-radius: 50%; background: var(--color-calendar-pending-border); }
.employee-compact-calendar .fc { --fc-border-color: var(--color-divider); }
.employee-compact-calendar .fc-timegrid-slot { height: 18px; border-bottom-color: var(--color-calendar-lunch-light); }
.employee-compact-calendar .fc-timegrid-axis, .employee-compact-calendar .fc-timegrid-slot-label { width: 44px; font-size: 11px; color: var(--color-text-muted); }
.employee-compact-calendar .fc-col-header-cell-cushion { display: block; text-decoration: none; text-align: left; padding: 7px 8px; }
.employee-day-header { display: block; }
.employee-day-header > b { display: block; font-size: 15px; padding-bottom: 5px; border-bottom: 1px solid var(--color-divider); color: var(--color-text); }
.employee-day-key { display: flex; flex-direction: column; min-height: 46px; padding-top: 4px; font-size: 11px; font-weight: 500; color: var(--color-nav-text); }
.employee-day-key > span { display: flex; align-items: center; gap: 4px; }
.employee-day-key small { font-size: 11px; color: var(--color-text-muted); }
.employee-compact-calendar .fc-timegrid-event-harness { left: 10px !important; right: 10px !important; }
.employee-compact-calendar .fc-timegrid-event-harness:has(.calendar-agreed-shift) { left: 6px !important; right: 6px !important; z-index: 0 !important; }
.employee-compact-calendar .fc-timegrid-event-harness:has(.calendar-pending-holiday) { left: 16px !important; z-index: 8 !important; }
.employee-compact-calendar .fc-timegrid-event { border-radius: 4px; padding: 3px 7px; font-size: 11.5px; box-shadow: none; }
.employee-compact-calendar .calendar-agreed-shift { border: 1.5px dashed var(--color-input-border); background: transparent; border-radius: 7px; }
.employee-compact-calendar .calendar-agreed-shift .calendar-shift-content { visibility: hidden; }
.employee-compact-calendar .calendar-available { background: var(--color-working-fill); border: 0; box-shadow: inset 3px 0 var(--color-working-edge); color: var(--color-surface); }
.employee-compact-calendar .calendar-approved-holiday { background: var(--color-calendar-approved-bg); border: 0; box-shadow: inset 3px 0 var(--color-brand); color: var(--color-calendar-approved-text); }
.employee-compact-calendar .calendar-absence { background: var(--color-absence-bg); border: 0; box-shadow: inset 3px 0 var(--color-calendar-absence-edge); color: var(--color-absence-text); }
.employee-compact-calendar .calendar-lunch { background: repeating-linear-gradient(135deg,var(--color-surface) 0 3px,var(--color-working-lunch-grey) 3px 6px); border: 0; color: var(--color-working-edge); }
.employee-compact-calendar .calendar-pending-holiday { background: repeating-linear-gradient(135deg,var(--color-calendar-pending-light) 0 7px,var(--color-calendar-pending-dark) 7px 14px); border: 1.5px dashed var(--color-cancellation-amber-edge); color: var(--color-pending-text); box-shadow: 0 2px 6px var(--color-shadow-soft); }
.employee-compact-calendar .calendar-shift-content { gap: 0; line-height: 1.25; overflow: hidden; }
.employee-compact-calendar .calendar-shift-content a { font-size: 11.5px; color: var(--color-brand); }
.employee-compact-calendar .calendar-past-day { opacity: 1; }
@media (max-width: 1000px) { .employee-summary-tiles { grid-template-columns: 1fr; } .employee-balance-legend { flex-wrap: wrap; } }
@media (max-width: 650px) { .page-container:has(.employee-admin-page) { padding: 16px; } .employee-profile { flex-wrap: wrap; } .employee-profile-actions { margin-left: 56px; } .employee-hours-toolbar > div { flex-wrap: wrap; } }

.employee-compact-calendar .fc-event.calendar-available { background: var(--color-working-fill); border: 0; box-shadow: inset 3px 0 var(--color-working-edge); color: var(--color-surface); cursor: grab; }
.employee-compact-calendar .fc-event.calendar-approved-holiday { background: var(--color-calendar-approved-bg); border: 0; box-shadow: inset 3px 0 var(--color-brand); color: var(--color-calendar-approved-text); }
.employee-compact-calendar .fc-event.calendar-absence { background: var(--color-absence-bg); border: 0; box-shadow: inset 3px 0 var(--color-calendar-absence-edge); color: var(--color-absence-text); }
.employee-compact-calendar .fc-event.calendar-lunch { background: repeating-linear-gradient(135deg,var(--color-surface) 0 3px,var(--color-working-lunch-grey) 3px 6px); border: 0; color: var(--color-working-edge); }
.employee-compact-calendar .fc-col-header-cell { text-transform: none; letter-spacing: 0; background: var(--color-surface); }
.employee-compact-calendar .fc-timegrid-col.calendar-past-day, .employee-compact-calendar .fc-col-header-cell.calendar-past-day { background: var(--color-surface); }
.employee-compact-calendar .calendar-past-day .fc-event { filter: none; opacity: 1; }
.employee-compact-calendar .fc-event.calendar-unsaved-block { box-shadow: 0 3px 10px var(--color-draft-shadow); }
.employee-compact-calendar .calendar-lunch-menu { width: 220px; }
.employee-compact-calendar .fc-event-main { color: inherit; }
.employee-compact-calendar .calendar-shift-content .employee-short-notice { align-self: flex-start; }
.employee-compact-calendar .fc-timegrid-slot-label-cushion { font-size: 11px; line-height: 14px; }
.employee-compact-calendar .fc-timegrid-slots td { height: 18px; font-size: 11px; line-height: 14px; }

.employee-compact-calendar { --calendar-axis-width: 44px; min-width: 0; }
.employee-compact-calendar .fc colgroup col:first-child { width: 44px !important; }
.employee-day-key .absence { background: var(--color-absence-bg); box-shadow: inset 2px 0 var(--color-calendar-absence-edge); }
.employee-compact-calendar .fc-event.calendar-lunch { padding: 0; }
.employee-compact-calendar .calendar-lunch .calendar-shift-content { padding: 3px 7px; }
.employee-compact-calendar :is(.calendar-lunch, .calendar-original-lunch) .fc-event-main { height: 100%; overflow: hidden; }
.employee-compact-calendar :is(.calendar-lunch, .calendar-original-lunch) .calendar-shift-content { height: 100%; box-sizing: border-box; overflow: hidden; }
.employee-absence-lunch-window { position: absolute; left: 0; right: 0; pointer-events: none; background: repeating-linear-gradient(135deg,var(--color-holiday-lunch-hatch) 0 3px,transparent 3px 6px),var(--color-absence-bg); border-top: 1px dashed var(--color-absence-lunch-edge); border-bottom: 1px dashed var(--color-absence-lunch-edge); }
.employee-compact-calendar .calendar-lunch .calendar-shift-content > :not(.employee-absence-lunch-window) { position: relative; z-index: 1; }
.employee-compact-calendar .fc-event.calendar-lunch:has(.employee-absence-lunch-window) { color: var(--color-absence-text); }
.employee-compact-calendar .fc-timegrid-col .fc-timegrid-event-harness:has(.calendar-cover-actual),
.employee-compact-calendar .fc-timegrid-col .fc-timegrid-bg-harness:has(.calendar-cover-actual) { left: calc(50% + 3px) !important; right: 7px !important; }
.employee-compact-calendar .fc-timegrid-col .fc-timegrid-event-harness:has(.calendar-original-work, .calendar-original-lunch) { left: 7px !important; right: calc(50% + 3px) !important; z-index: 2 !important; }
.employee-compact-calendar .calendar-original-work, .employee-grid-legend i.original { background: repeating-linear-gradient(135deg, var(--color-working-lunch-grey) 0 5px, var(--color-surface-alt) 5px 10px); color: var(--color-working-edge); border: 1px solid var(--color-input-border); }
.employee-compact-calendar .calendar-original-lunch { background: repeating-linear-gradient(45deg, var(--color-surface) 0 3px, var(--color-working-lunch-grey) 3px 6px); color: var(--color-working-edge); border: 1px dashed var(--color-input-border); }
.employee-cover-lane-labels { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding-top: 5px; font-size: 10px; font-weight: 600; color: var(--color-text-muted); }
.employee-cover-lane-labels > span { text-align: center; }
.employee-cover-lane-labels small { display: block; font-size: 9px; font-weight: 400; }

/* A working day is selected as a unit, including its unpaid lunch. */

.working-day-menu { position: fixed; z-index: 2200; width: 236px; box-sizing: border-box; padding: 5px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 12px 30px var(--color-working-menu-shadow); font-family: "IBM Plex Sans", sans-serif; }
.working-day-menu header { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 7px 9px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--color-divider); }
.working-day-menu header strong { font-size: 12.5px; color: var(--color-text); }
.working-day-menu header span { font-size: 11.5px; color: var(--color-text-muted); }
.working-day-menu button { width: 100%; display: flex; align-items: flex-start; gap: 9px; padding: 8px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--color-text); text-align: left; font-size: 13.5px; font-weight: 500; }
.working-day-menu button:hover, .working-day-menu button:focus { background: var(--color-calendar-lunch-light); outline: none; box-shadow: none; }
.working-day-menu svg { width: 15px; height: 15px; margin-top: 2px; flex-shrink: 0; fill: none; stroke: var(--color-text-muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.working-day-menu hr { border: 0; border-top: 1px solid var(--color-divider); margin: 4px 0; }
.working-day-menu .working-day-delete { color: var(--color-absence-cover-none); }
.working-day-menu .working-day-delete svg { stroke: currentColor; }
.working-day-menu .working-day-delete small { display: block; font-size: 11.5px; margin-top: 2px; color: var(--color-working-delete-hint); }
.working-day-menu .working-day-delete:hover, .working-day-menu .working-day-delete:focus { background: var(--color-working-delete-hover); }
.working-hours-calendar .fc-timegrid-event-harness:has(.calendar-day-selection) { left: 7px !important; right: 7px !important; z-index: 15 !important; pointer-events: none; }
.working-hours-calendar .calendar-day-selection { background: transparent; border: 2px solid var(--color-brand); border-radius: 7px; box-shadow: 0 0 0 4px var(--color-working-selection-glow); pointer-events: none; }
.hours-change-popover .working-day-fields { row-gap: 4px; }
.working-day-fields > div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 4px; }
.hours-change-popover .working-day-fields label { text-align: left; align-items: stretch; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--color-text-muted); }
.working-day-fields input { width: 100%; box-sizing: border-box; min-height: 36px; }
.working-day-lunch-link { justify-self: end; min-height: 0; line-height: 1.4; border: 0; padding: 0; background: transparent; color: var(--color-brand); text-decoration: underline; font-size: 12px; }
.working-day-fields p { font-size: 13px; margin: 0; }
.working-day-removal { background: var(--color-page); border-radius: 8px; padding: 9px 11px; font-size: 13px; }
.working-day-removal s { display: block; color: var(--color-text-subtle); margin-bottom: 5px; }
.working-day-removal p { margin: 9px 0 0; }
.hours-change-popover .working-day-confirm-delete { background: var(--color-absence-cover-none); }
.hours-change-popover .working-day-confirm-delete:hover { background: var(--color-declined-text); }

.working-day-fields .working-day-add-lunch { justify-self: start; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 8px; }

.employee-compact-calendar .fc-timeGridPeriod-view .fc-col-header-cell:nth-child(7),
.employee-compact-calendar .fc-timeGridPeriod-view .fc-timegrid-col:nth-child(7) {
  border-left: 3px solid var(--color-border-strong);
}

/* Primary working and paired-person lanes share the calendar's exact hour scale. */
.pairing-timeline-cell { min-height: 78px; }
.pairing-primary-lane { position: absolute; inset: 0; }
.manager-timeline-cell.pairing-timeline-cell .pairing-primary-lane .manager-timeline-bar { top: 8px !important; height: 22px; min-height: 22px; padding: 2px 5px; line-height: 18px; }
.pairing-primary-lane .manager-timeline-bar.is-lunch { color: var(--color-working-edge); }
.pairing-partner-lane { position: absolute; top: 34px; left: 0; right: 0; height: 22px; }
.pairing-partner-pill { position: absolute; top: 0; display: flex; align-items: center; justify-content: flex-start; gap: 4px; height: 22px; min-height: 22px; padding: 1px 4px; border: 1px solid var(--color-pairing-border); border-radius: 5px; background: var(--color-surface); color: var(--color-text); font: inherit; font-size: 11.5px; overflow: hidden; white-space: nowrap; }
.pairing-partner-pill > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.pairing-avatar { display: inline-flex; flex: 0 0 17px; width: 17px; height: 17px; align-items: center; justify-content: center; border-radius: 50%; background: var(--color-brand-soft); color: var(--color-brand-hover); font-size: 8px; font-weight: 600; }
.pairing-partner-pill.is-gap { justify-content: center; border: 1.5px dashed var(--color-pairing-gap-border); background: repeating-linear-gradient(135deg, var(--color-pairing-gap-light) 0 4px, var(--color-pairing-gap-dark) 4px 8px); color: var(--color-pairing-gap-border); }
.pairing-partner-pill:hover, .pairing-partner-pill:focus-visible { background-color: var(--color-surface-alt); }
.pairing-partner-pill.is-gap:hover { border-style: solid; }
.pairing-partner-pill.is-selected { border: 2px solid var(--color-brand); box-shadow: 0 0 0 3px var(--color-focus-ring); z-index: 2; }
.pairing-partner-pill.is-gap.is-selected { border-color: var(--color-pairing-gap-border); box-shadow: 0 0 0 3px var(--color-pairing-gap-glow); }
.pairing-partner-pill.is-lunch { justify-content: center; background: repeating-linear-gradient(135deg, var(--color-surface) 0 3px, var(--color-working-lunch-grey) 3px 6px); color: var(--color-text-muted); border: 0; border-radius: 2px; }
.role-pairing-total { grid-column: 2; font-size: 11px; line-height: 1.2; }
.role-pairing-total.is-unpaired { color: var(--color-pairing-gap-border); font-weight: 600; }
.pairing-partner-pill.is-gap { font-weight: 600; }
.role-pairing-total.is-paired { color: var(--color-brand); }
.role-pairing-popover { position: fixed; z-index: 150; width: 360px; max-width: calc(100vw - 16px); padding: 16px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); box-shadow: 0 12px 32px var(--color-working-menu-shadow); overflow-y: auto; font-size: 13px; }
.role-pairing-popover header { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; }
.role-pairing-popover h3 { margin: 0; font-size: 15px; }
.role-pairing-popover p { margin: 6px 0 12px; font-size: 12px; color: var(--color-text-muted); }
.role-pairing-popover .pairing-close { padding: 0; flex: 0 0 24px; min-height: 24px; width: 24px; border: 0; background: transparent; color: var(--color-text-muted); font-size: 20px; }
.role-pairing-popover h4 { margin: 12px 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted); }
.role-pairing-popover .pairing-removal-scope { display: block; border: 0; padding: 0; margin: 12px 0; min-width: 0; }
.pairing-choices { display: flex; flex-direction: column; gap: 6px; }
.pairing-choice { display: grid; grid-template-columns: 14px 17px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 8px; border: 1px solid var(--color-border); border-radius: 8px; font-weight: 400; }
.pairing-choice.is-selected { border-color: var(--color-brand); box-shadow: inset 0 0 0 1px var(--color-brand); background: var(--color-brand-tint); }
.pairing-choice.is-busy { opacity: .55; }
.pairing-choice input { margin: 0; accent-color: var(--color-brand); }
.pairing-choice small { display: block; font-size: 11px; color: var(--color-text-muted); }
.pairing-covered { text-align: right; font-size: 11px; }
.pairing-covered em { display: block; font-size: 10px; font-style: normal; font-weight: 600; color: var(--color-brand); }
.pairing-choice-body { min-width: 0; }
.pairing-choice .pairing-covered { align-self: start; white-space: nowrap; }
.pairing-availability { list-style: none; margin: 5px 0 0; padding: 0; font-size: 11px; line-height: 1.6; }
.pairing-availability li > span { color: var(--color-text-muted); font-weight: 400; }
.pairing-selection-outline, .pairing-person-preview { position: absolute; top: -2px; height: 26px; box-sizing: border-box; border: 3px solid var(--color-pairing-gap-border); border-radius: 6px; pointer-events: none; z-index: 3; }
.pairing-person-preview { top: 1px; height: 20px; border: 2px solid var(--color-brand); background: var(--color-brand-tint); color: var(--color-brand-hover); font-size: 11px; font-weight: 600; padding: 0 3px; overflow: hidden; white-space: nowrap; z-index: 4; }
.pairing-preview-lunch { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, var(--color-surface) 0 3px, var(--color-working-lunch-grey) 3px 6px); }
.role-pairing-popover .pairing-warning { padding: 8px; border: 1px solid var(--color-warning-border); border-radius: 6px; background: var(--color-warning-bg); color: var(--color-warning-text); }
.role-pairing-popover .pairing-save-error { white-space: pre-line; }
.pairing-repeat { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }

.role-pairing-popover footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--color-divider); }
.role-pairing-popover footer button { font-size: 12px; padding: 7px 9px; }
.temporary-cover-popover footer .cover-review-button { background: var(--color-cover-short); border: 1px solid var(--color-warning-border); color: var(--color-warning-text); }
.temporary-cover-popover footer > .cover-review-button:first-child { margin-right: auto; }
.temporary-cover-popover footer .cover-review-button:hover:not(:disabled) { background: var(--color-warning-border); }
.cover-review-dates { margin: 12px 0; padding: 0; list-style: none; }
.cover-review-dates li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--color-divider); font-size: 13px; font-variant-numeric: tabular-nums; }
.pairing-actions { display: flex; flex-direction: column; gap: 4px; }
.pairing-actions button { text-align: left; background: var(--color-surface); color: var(--color-text); border: 0; }
.pairing-actions button:hover { background: var(--color-surface-alt); }
.pairing-actions .pairing-remove { color: var(--color-pairing-gap-border); }
.pairing-time-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pairing-time-inputs label { display: flex; flex-direction: column; gap: 4px; }
.pairing-time-inputs input { width: 100%; min-width: 0; }

.pairing-partner-pill.is-gap { container-type: inline-size; }
.pairing-partner-pill .pairing-gap-full { display: none; }
@container (min-width: 185px) {
  .pairing-partner-pill .pairing-gap-short { display: none; }
  .pairing-partner-pill .pairing-gap-full { display: inline; }
}

.manager-timeline-bar.is-not-scheduled { left: 8px; right: 8px; top: 8px; background: var(--color-cancelled-bg); color: var(--color-text-muted); opacity: .6; border: 0; box-shadow: none; }

.pairing-partner-pill.needs-change { border: 2px solid var(--color-calendar-pending-border); box-shadow: 0 0 0 3px var(--color-cancellation-glow); }
.pairing-change-label { color: var(--color-destructive); font-size: 11px; margin-left: auto; white-space: nowrap; }

.manager-review-error { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0; padding: 10px 12px; background: var(--color-profile-alert); border: 1px solid var(--color-profile-alert-border); border-radius: 8px; color: var(--color-destructive); font-size: 13px; line-height: 1.5; }
.manager-review-error > svg { flex: 0 0 20px; margin-top: 1px; }

.styled-select { position: relative; width: 100%; }
.styled-select .styled-select-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 36px; padding: 8px 12px; background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: 8px; color: var(--color-text); font: inherit; font-size: 13px; text-align: left; }
.styled-select-trigger > svg { flex: 0 0 16px; color: var(--color-text-muted); }
.styled-select .styled-select-trigger[aria-expanded="true"] { border-color: var(--color-brand); box-shadow: 0 0 0 3px var(--color-focus-ring); }
.styled-select-menu { position: absolute; bottom: calc(100% + 6px); inset-inline: 0; z-index: 5; padding: 5px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 8px 24px var(--color-shadow-floating); }
.styled-select-menu > button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px; background: var(--color-surface); color: var(--color-text); text-align: left; font: inherit; font-size: 13px; font-weight: 500; }
.styled-select-menu > button > span { width: 14px; flex: 0 0 14px; }
.styled-select-menu > button.is-selected { background: var(--color-brand-soft); color: var(--color-brand-hover); font-weight: 600; }
.styled-select-menu > button:hover, .styled-select-menu > button:focus-visible { background: var(--color-brand-tint); outline: 2px solid var(--color-brand); outline-offset: -2px; }

@media (min-width: 1024px) {
  .manager-review-grid .manager-review-summary { position: sticky; top: 16px; align-self: start; box-sizing: border-box; max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
}

.manager-review-page.is-calendar-only .manager-review-grid { grid-template-columns: minmax(0, 1fr); }

.manager-calendar-person-link { color: inherit; text-decoration: none; }
.manager-calendar-person-link:hover, .manager-calendar-person-link:focus-visible { color: var(--color-brand); text-decoration: underline; }

.manager-timeline-date-arrows { grid-column: 2; display: flex; align-items: center; justify-content: center; gap: 12px; }
.manager-timeline-view-actions { grid-column: 3; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.manager-timeline-view-actions .employee-segments { margin: 0; }
.manager-timeline-view-actions .employee-segments button { min-width: 86px; min-height: 36px; padding: 8px 14px; font-size: 13px; }
@media (max-width: 700px) {
  .manager-timeline-navigation { grid-template-columns: minmax(0, 1fr); }
  .manager-timeline-date-arrows, .manager-timeline-view-actions { grid-column: 1; }
}

@container (max-width: 960px) {
  .manager-timeline-navigation { grid-template-columns: minmax(0, 1fr); }
  .manager-timeline-date-arrows, .manager-timeline-view-actions { grid-column: 1; }
  .manager-coverage-heading { grid-template-columns: minmax(0, 1fr); }
  .manager-coverage-title { grid-column: 1; grid-row: 2; }
  .manager-coverage-heading h2 { white-space: normal; }
}

.manager-review-page { overflow-anchor: none; }

/* Manager team: a quiet, compact overview with colour reserved for flags. */
.page-container:has(.team-page) { max-width: none; padding: 24px 32px 40px; }
.team-page { color: var(--color-text); font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 13px; }
.team-header { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 20px; margin-bottom: 14px; }
.team-header h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.team-header p { margin: 4px 0 0; color: var(--color-text-muted); font-size: 12px; }
.team-period-nav { display: flex; align-items: center; justify-content: center; gap: 10px; }
.team-period-nav strong { white-space: nowrap; font-size: 13px; font-weight: 600; text-align: center; }
.team-period-nav button { min-height: 32px; padding: 4px 10px; }
.team-navigation-row { display: grid; grid-template-columns: minmax(max-content,1fr) auto minmax(max-content,1fr); align-items: center; gap: 16px; margin-bottom: 14px; overflow-x: auto; padding: 3px 0; }
.team-navigation-row .team-period-nav { grid-column: 2; }
.team-flag-toggle { grid-column: 3; justify-self: end; }
.team-header > button { min-height: 32px; padding: 5px 12px; font-size: 12px; }
.team-filter-row { display: flex; align-items: center; gap: 8px; color: var(--color-text-muted); margin: 0; white-space: nowrap; }
.team-page .employee-segments { margin: 0; }
.team-page .employee-segments button { padding: 6px 11px; font-size: 12px; min-height: 30px; }
.team-role-picker, .team-people-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.team-role-picker button, .team-people-picker > button { padding: 6px 12px; min-height: 34px; font-size: 12px; }
.team-role-picker button[aria-pressed=true] { background: var(--color-holiday-bg); border-color: var(--color-brand); color: var(--color-holiday-text); }
.team-people-picker { padding: 8px; border: 1px solid var(--color-border-strong); border-radius: 8px; background: var(--color-surface); }
.team-people-picker .manager-review-search { min-width: 200px; }
.team-people-picker .manager-review-search input { box-sizing: border-box; border: 1px solid var(--color-border-strong); border-radius: 6px; background: var(--color-surface); }
.team-saved-groups { flex: 1 0 100%; padding: 4px 0; margin-top: 0; gap: 6px; font-size: 12px; }
.team-saved-groups .manager-review-saved-group { min-height: 28px; box-sizing: border-box; padding: 2px 8px; gap: 4px; font-size: 12px; font-weight: 500; }
.team-saved-groups .manager-review-saved-group > button { min-height: 22px; padding: 0 2px; font: inherit; }
.team-saved-groups .manager-review-saved-group > button:last-child { width: 18px; height: 18px; min-height: 18px; padding: 0; font-size: 13px; line-height: 1; }
.team-saved-groups .manager-review-save-link { min-height: 28px; font-size: 12px; }
.team-save-group { display: flex; flex: 1 0 100%; align-items: flex-end; gap: 8px; }
.team-save-group label { display: grid; gap: 4px; font-size: 12px; }
.team-save-group input { min-height: 34px; padding: 6px 10px; }
.team-save-group button { min-height: 34px; padding: 6px 12px; font-size: 12px; }
.team-people-picker .team-error { flex-basis: 100%; margin: 0; }
.team-page .styled-select-menu { top: calc(100% + 6px); bottom: auto; z-index: 20; }
.team-flag-tiles { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.team-flag-tile { --flag-edge: var(--color-text-subtle); display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 12px 13px; background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); border-left: 3px solid var(--flag-edge); border-radius: 10px; text-align: left; }
.team-flag-tile.amber { --flag-edge: var(--color-team-overtime); }
.team-flag-tile.red { --flag-edge: var(--color-absence-cover-none); }
.team-flag-tile.blue { --flag-edge: var(--color-working-fill); }
.team-flag-tile strong { font-size: 26px; line-height: 1.15; }
.team-flag-tile b { font-size: 12px; font-weight: 600; }
.team-flag-tile small { font-size: 11px; font-weight: 400; color: var(--color-text-muted); line-height: 1.5; }
.team-flag-tile:hover, .team-flag-tile[aria-pressed=true] { background: var(--color-surface-alt); box-shadow: 0 0 0 1px var(--flag-edge); }
.team-table-card { border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); overflow: hidden; }
.team-table-card > .table-scroll { overflow-x: auto; }
.team-table { width: 100%; min-width: 960px; border-collapse: collapse; table-layout: fixed; }
.team-table th, .team-table td { padding: 13px 12px; border-bottom: 1px solid var(--color-divider); text-align: left; vertical-align: middle; }
.team-table thead th { font-size: 11.5px; font-weight: 600; color: var(--color-text-muted); background: var(--color-surface); text-transform: none; letter-spacing: 0; }
.team-table thead small { display: block; font-size: 10px; font-weight: 400; margin-top: 4px; }
/* Allocate space to every column, including Flags, rather than leaving it the remainder. */
.team-table thead th { box-sizing: border-box; }
.team-table thead th:nth-child(1) { width: 19%; }
.team-table thead th:nth-child(2) { width: 14%; }
.team-table thead th:nth-child(3) { width: 18%; }
.team-table thead th:nth-child(4) { width: 16%; }
.team-table thead th:nth-child(5), .team-table thead th:nth-child(6) { width: 10%; }
.team-table thead th:nth-child(7) { width: 13%; }
.team-table tbody td:nth-child(2) { font-size: 11px; }
.team-table .team-person > div { min-width: 0; overflow-wrap: anywhere; }
.team-table .team-row-flags .team-flag { max-width: 100%; box-sizing: border-box; white-space: normal; overflow-wrap: anywhere; }
.team-table .team-group-row th { padding: 6px 12px; background: var(--color-surface-alt); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted); }
.team-table tbody tr.has-flags { background: var(--color-absence-missing-note); }
.team-table tbody tr:not(.team-group-row) { cursor: pointer; }
.team-table tbody tr:not(.team-group-row):hover { background: var(--color-page); }
.team-person { display: flex; align-items: center; gap: 9px; }
.team-person .person-avatar { width: 30px; height: 30px; flex: 0 0 30px; font-size: 11px; }
.team-person a { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--color-text); }
.team-person a:hover { color: var(--color-brand); text-decoration: underline; }
.team-person small { display: block; margin-top: 2px; font-size: 10.5px; color: var(--color-text-muted); }
.team-cell-line { display: flex; align-items: baseline; justify-content: space-between; gap: 5px; margin-bottom: 7px; font-size: 11px; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.team-hours-bar, .team-holiday-bar { height: 10px; background: var(--color-team-track); border-radius: 5px; position: relative; display: flex; }
.team-hours-bar > i, .team-holiday-bar > i { display: block; height: 100%; }
.team-hours-bar > i:first-child, .team-holiday-bar > i:first-child { border-radius: 5px 0 0 5px; }
.team-hours-bar > i.over { border-radius: 0 5px 5px 0; }
.team-hours-bar .team-contract-tick, .team-holiday-bar .team-pace-tick { position: absolute; width: 2px; height: 16px; top: -3px; background: var(--color-text); transform: translateX(-1px); z-index: 1; }
.team-page .work { background: var(--color-working-fill); }
.team-page .over { background: var(--color-team-overtime); }
.team-page .used { background: var(--color-brand); }
.team-page .pending { background: repeating-linear-gradient(135deg,var(--color-calendar-pending-dark) 0 3px,var(--color-profile-pending) 3px 6px); box-shadow: inset 0 0 0 1px var(--color-calendar-pending-border); }
.team-months, .team-month-labels { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 3px; margin-bottom: 5px; }
.team-month-labels { margin-top: 7px; margin-bottom: 0; text-align: center; font-size: 9px; font-weight: 400; }
.team-months span { height: 21px; border-radius: 3px; background: var(--color-team-empty-month); text-align: center; font-size: 10px; line-height: 21px; }
.team-months .level-1 { background: var(--color-absence-bg); color: var(--color-absence-text); }
.team-months .level-2 { background: var(--color-team-absence-medium); color: var(--color-absence-text); }
.team-months .level-3 { background: var(--color-calendar-absence-edge); color: var(--color-surface); }
.team-shift-squares { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 6px; }
.team-shift-squares i, .team-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--color-team-shift-empty); box-sizing: border-box; }
.team-page .late { background: var(--color-working-edge); }
.team-page .lunch { background: var(--color-calendar-approved-bg); }
.team-page .no-lunch { background: var(--color-surface); border: 1.5px solid var(--color-absence-cover-none); }
.team-page .absence { background: var(--color-team-absence-medium); }
.team-muted { color: var(--color-text-muted); }
.team-amber-text { color: var(--color-team-amber-text); }
.team-red-text { color: var(--color-absence-cover-none); }
.team-row-flags { display: flex; flex-wrap: wrap; gap: 4px; }
.team-flag { display: inline-block; font-size: 9.5px; font-weight: 600; padding: 2px 6px; border-radius: 20px; line-height: 1.4; }
.team-flag.amber { color: var(--color-cancellation-text); background: var(--color-team-amber-bg); }
.team-flag.red { color: var(--color-declined-text); background: var(--color-pairing-gap-dark); }
.team-flag.blue { color: var(--color-working-edge); background: var(--color-team-blue-bg); }
.team-flag.grey { color: var(--color-text-muted); background: var(--color-cancelled-bg); }
.team-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 14px; background: var(--color-surface-alt); font-size: 10.5px; color: var(--color-text-muted); }
.team-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.team-legend small { margin-left: auto; font-size: 10.5px; }
.team-data-note { color: var(--color-text-muted); font-size: 11px; margin: 10px 0 0; }
.team-active-filter { color: var(--color-text-muted); margin: 0 0 12px; }
.team-active-filter button { margin-left: 8px; font-size: 12px; }
.team-empty { padding: 24px; text-align: center; color: var(--color-text-muted); }
.team-error { padding: 10px 12px; border: 1px solid var(--color-profile-alert-border); border-radius: 8px; background: var(--color-pairing-gap-light); color: var(--color-declined-text); }
.team-threshold-backdrop { position: fixed; z-index: 2000; inset: 0; background: rgba(21,32,28,.38); display: grid; place-items: center; padding: 20px; }
.team-threshold-dialog { box-sizing: border-box; width: min(100%,620px); max-height: calc(100dvh - 40px); overflow-y: auto; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; padding: 20px; box-shadow: 0 16px 40px rgba(21,32,28,.24); }
.team-threshold-dialog header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 16px; }
.team-threshold-dialog h2 { font-size: 18px; margin: 0; }
.team-threshold-dialog header p { font-size: 12.5px; line-height: 1.5; color: var(--color-text-muted); margin: 5px 0 0; }
.threshold-row { display: grid; grid-template-columns: 30px minmax(0,1fr) 92px; gap: 12px; align-items: start; padding: 14px 0; border-top: 1px solid var(--color-divider); }
.threshold-row.is-off { opacity: .5; }
.threshold-switch { position: relative; width: 30px; height: 17px; min-height: 17px; padding: 0; margin-top: 2px; border: 0; border-radius: 12px; background: var(--color-input-border); }
.threshold-switch[aria-checked="true"], .threshold-switch[aria-checked="true"]:hover { background: var(--color-brand); }
.threshold-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: var(--color-surface); transition: transform .15s; }
.threshold-switch[aria-checked="true"]::after { transform: translateX(13px); }
.threshold-rule strong { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.threshold-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-text-muted); flex-shrink: 0; }
.threshold-dot.amber { background: var(--color-team-overtime); }
.threshold-dot.red { background: var(--color-absence-cover-none); }
.threshold-dot.blue { background: var(--color-working-fill); }
.threshold-rule fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.threshold-rule p { margin: 5px 0 0; font-size: 12.5px; line-height: 2.25; color: var(--color-text-muted); }
.threshold-inline-field { display: inline-flex; align-items: center; gap: 2px; height: 24px; border: 1px solid var(--color-border-strong); border-radius: 6px; padding: 0 4px; color: var(--color-text); background: var(--color-surface); font-weight: 600; vertical-align: middle; box-sizing: border-box; }
.threshold-inline-field:focus-within { border-color: var(--color-brand); box-shadow: 0 0 0 3px var(--color-focus-ring); }
.threshold-inline-field input { width: 29px; min-height: 20px; height: 20px; padding: 0; border: 0; border-radius: 0; font: inherit; background: transparent; box-shadow: none; outline: none; appearance: textfield; }
.threshold-inline-field input::-webkit-inner-spin-button { appearance: none; }
.threshold-inline-field input[type="time"] { width: 87px; }
.threshold-inline-field span { font-size: 11px; }
.threshold-rule select { width: auto; min-height: 24px; height: 24px; border: 1px solid var(--color-border-strong); border-radius: 6px; padding: 1px 20px 1px 5px; font-size: 12px; font-weight: 600; }
.team-threshold-dialog small { display: block; font-size: 11px; line-height: 1.45; font-weight: 400; color: var(--color-text-muted); }
.threshold-rule > small { margin-top: 4px; }
.threshold-preview { text-align: right; padding-top: 1px; font-size: 12px; }
.threshold-preview small { margin-top: 5px; overflow-wrap: anywhere; }
.team-threshold-dialog footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--color-divider); }
.threshold-footer-left { display: flex; align-items: center; gap: 10px; }
.threshold-footer-left small { max-width: 130px; }
.threshold-footer-actions { display: flex; gap: 8px; align-items: center; }
.team-threshold-dialog footer button { min-height: 34px; padding: 6px 10px; font-size: 12px; white-space: nowrap; }
@media (max-width: 500px) { .team-threshold-dialog { padding: 14px; } .threshold-row { grid-template-columns: 30px minmax(0,1fr) 64px; gap: 8px; } .team-threshold-dialog footer, .threshold-footer-left { flex-wrap: wrap; } }

.team-profile-name { display: flex; align-items: center; gap: 12px; }
.team-person-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.team-person-summary .card { margin: 0; padding: 16px; }
.team-person-summary h2, .team-person-schedule h2 { font-size: 14px; margin: 0 0 16px; }
.team-person-summary a { display: block; margin-top: 10px; font-size: 12px; }
.team-person-schedule { margin-top: 16px; }
.team-person-schedule > p { color: var(--color-text-muted); font-size: 12px; }
@media (max-width: 1200px) { .team-flag-tiles { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 650px) { .page-container:has(.team-page) { padding: 18px 16px; } .team-navigation-row { gap: 12px; } .team-period-nav strong { font-size: 11px; } .team-save-group { flex-wrap: wrap; } .team-flag-tiles { grid-template-columns: repeat(2,minmax(0,1fr)); } .team-person-summary, .team-threshold-dialog { grid-template-columns: 1fr; } }

.team-threshold-dialog .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Team employee detail: time off stays above the expandable shift history. */
.team-employee-page { display: flex; flex-direction: column; gap: 14px; }
.team-employee-breadcrumb { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--color-text-muted); }
.team-employee-breadcrumb a { color: var(--color-brand); text-decoration: none; }
.team-employee-profile { display: flex; justify-content: flex-start; align-items: center; gap: 13px; padding: 2px 0 4px; }
.team-employee-profile .person-avatar { width: 48px; height: 48px; font-size: 17px; }
.team-employee-profile h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.team-employee-profile p { margin: 3px 0 0; color: var(--color-text-muted); font-size: 13px; }
.team-employee-attention { display: flex; align-items: center; gap: 8px; background: var(--color-team-attention-bg); border: 1px solid var(--color-team-attention-border); border-radius: 7px; padding: 9px 12px; font-size: 12.5px; color: var(--color-team-amber-text); }
.team-employee-attention > i { width: 6px; height: 6px; border-radius: 50%; background: var(--color-team-overtime); flex-shrink: 0; }
.team-employee-timeoff-grid { display: grid; grid-template-columns: 1.22fr 1fr; gap: 14px; align-items: stretch; }
.team-employee-page .card { margin: 0; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); box-shadow: none; }
.team-employee-timeoff { padding: 16px 18px; }
.team-employee-timeoff > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.team-employee-timeoff h2, .team-employee-hours h2 { font-size: 15px; margin: 0; font-weight: 600; }
.team-employee-timeoff header p { color: var(--color-text-muted); font-size: 12px; margin: 3px 0 0; }
.team-employee-timeoff header a { color: var(--color-brand); font-size: 12px; white-space: nowrap; }
.team-employee-balance { margin-top: 15px; }
.team-employee-balance > strong { font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.team-employee-balance > strong > span { font-size: 18px; font-weight: 500; }
.team-employee-balance p { font-size: 12px; color: var(--color-text-muted); margin: 4px 0 10px; }
.team-employee-holiday-bar { height: 12px; margin: 12px 0 18px; }
.team-employee-timeoff h3 { font-size: 10.5px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .07em; margin: 16px 0 4px; }
.team-employee-bookings { list-style: none; margin: 0; padding: 0; }
.team-employee-bookings li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 0; border-bottom: 1px solid var(--color-divider); font-size: 12px; }
.team-employee-bookings li:last-child { border-bottom: 0; }
.team-employee-bookings li > span:first-child { flex: 1; min-width: 180px; }
.team-employee-bookings .pill { font-size: 10.5px; padding: 2px 7px; }
.team-employee-review { border-radius: 6px; color: var(--color-surface); background: var(--color-brand); padding: 4px 9px; text-decoration: none; font-size: 11px; font-weight: 600; }
.team-employee-months { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 5px; margin-top: 15px; }
.team-employee-months > div { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.team-employee-months span { display: grid; place-items: center; height: 27px; width: 100%; font-size: 11px; background: var(--color-team-empty-month); border-radius: 3px; color: var(--color-absence-text); }
.team-employee-months .level-1 { background: var(--color-absence-bg); }
.team-employee-months .level-2 { background: var(--color-team-absence-medium); }
.team-employee-months .level-3 { background: var(--color-calendar-absence-edge); color: var(--color-surface); }
.team-employee-months small { font-size: 10px; color: var(--color-text-muted); }
.team-employee-absence-note { font-size: 11.5px; margin: 15px 0 12px; }
.team-employee-record { display: inline-flex; padding: 6px 10px; border: 1px solid var(--color-border-strong); border-radius: 7px; text-decoration: none; font-size: 12px; font-weight: 600; }
.team-employee-hours { padding: 0; }
.team-employee-hours > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px; }
.team-employee-hours-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.team-employee-range { display: flex; align-items: center; gap: 12px; }
.team-employee-range > small { color: var(--color-text-muted); font-size: 11px; }
.team-employee-range > div { display: flex; align-items: center; gap: 5px; }
.team-employee-range button { min-height: 30px; font-size: 12px; padding: 5px 9px; }
.team-employee-range .styled-select-trigger { min-width: 190px; min-height: 30px; }
.team-employee-range .styled-select-menu { z-index: 25; }
.team-employee-key-numbers { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); background: var(--color-surface-alt); border-top: 1px solid var(--color-divider); border-bottom: 1px solid var(--color-divider); }
.team-employee-key-numbers > div { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; padding: 10px 13px; border-right: 1px solid var(--color-divider); font-size: 12px; font-variant-numeric: tabular-nums; }
.team-employee-key-numbers > div:last-child { border: 0; }
.team-employee-key-numbers span { text-transform: uppercase; letter-spacing: .04em; font-size: 9.5px; color: var(--color-text-muted); }
.team-employee-key-numbers small { font-size: 11px; color: var(--color-text-muted); }
.team-employee-range-caption, .team-employee-loading { color: var(--color-text-muted); font-size: 11px; margin: 9px 16px; }
.team-employee-shift-grid { width: 100%; min-width: 850px; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.team-employee-shift-grid th, .team-employee-shift-grid td { border: 1px solid var(--color-divider); border-left: 0; padding: 7px 8px; font-size: 11px; }
.team-employee-shift-grid thead th { color: var(--color-text-muted); font-size: 11px; text-align: left; background: var(--color-surface-alt); }
.team-employee-shift-grid th:first-child { width: 65px; font-weight: 500; color: var(--color-text-muted); }
.team-employee-shift-grid th:last-child { width: 180px; }
.team-employee-shift-grid .period-start > * { border-top: 2px solid var(--color-border-strong); }
.team-employee-shift-grid .team-employee-day { height: 30px; }
.team-employee-timeline { position: relative; height: 22px; border-radius: 3px; background: var(--color-surface-alt); }
.team-employee-timeline > span { position: absolute; top: 4px; height: 14px; border-radius: 2px; box-sizing: border-box; }
.team-employee-timeline .working, .team-employee-grid-legend .working { background: var(--color-working-fill); }
.team-employee-timeline .lunch, .team-employee-grid-legend .lunch { background: repeating-linear-gradient(135deg,var(--color-surface) 0 3px,var(--color-working-lunch-grey) 3px 6px); }
.team-employee-timeline .late-tail, .team-employee-grid-legend .late-tail { background: var(--color-working-edge); }
.team-employee-timeline .no-lunch, .team-employee-grid-legend .no-lunch { outline: 1.5px solid var(--color-team-break-edge); outline-offset: 1px; }
.team-employee-timeline .holiday, .team-employee-grid-legend .holiday { background: var(--color-calendar-approved-bg); }
.team-employee-timeline .absence, .team-employee-grid-legend .absence { background: var(--color-absence-bg); }
.team-employee-timeline.is-bank-holiday, .team-employee-grid-legend .bank-holiday { background: var(--color-team-shift-empty); }
.team-employee-timeline .not-working, .team-employee-grid-legend .not-working { background: repeating-linear-gradient(135deg,var(--color-surface) 0 3px,var(--color-team-shift-empty) 3px 6px); }
.team-employee-late-line { position: absolute; top: 0; bottom: 0; z-index: 2; border-left: 1px dashed var(--color-input-border); pointer-events: none; }
.team-employee-period-total > b { display: block; font-size: 11px; }
.team-employee-period-total > small { display: block; font-size: 10px; margin: 3px 0 7px; color: var(--color-text-muted); }
.team-employee-period-total > div:last-child { display: flex; justify-content: space-between; gap: 5px; font-size: 10.5px; }
.team-employee-hours-bar { height: 7px; display: flex; background: var(--color-team-track); position: relative; margin-bottom: 6px; border-radius: 4px; }
.team-employee-hours-bar .worked { height: 100%; background: var(--color-working-fill); border-radius: 4px 0 0 4px; }
.team-employee-hours-bar .overtime, .team-employee-grid-legend .overtime { height: 100%; background: var(--color-team-overtime); border-radius: 0 4px 4px 0; }
.team-employee-hours-bar .contract-tick { position: absolute; top: -2px; height: 11px; width: 1px; background: var(--color-text); }
.team-employee-hour-ticks { display: flex; justify-content: space-between; color: var(--color-text-subtle); font-size: 9px; }
.team-employee-grid-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 11px 16px; background: var(--color-surface-alt); border-radius: 0 0 10px 10px; font-size: 11px; color: var(--color-text-muted); }
.team-employee-grid-legend > span { display: flex; align-items: center; gap: 6px; }
.team-employee-grid-legend i { display: inline-block; width: 12px; height: 9px; border-radius: 2px; }
.team-employee-grid-legend .no-lunch { background: var(--color-working-fill); }
@media (max-width: 1100px) { .team-employee-hours > header { align-items: flex-start; } .team-employee-range { flex-direction: column; gap: 5px; align-items: flex-end; } }
@media (max-width: 700px) { .team-employee-timeoff-grid { grid-template-columns: 1fr; } .team-employee-hours > header { flex-direction: column; } .team-employee-range { align-items: flex-start; } .team-employee-key-numbers { grid-template-columns: repeat(2,minmax(0,1fr)); } }

.team-employee-timeline .not-working { inset: 0; height: 22px; }
.team-employee-timeline.is-bank-holiday .not-working { background: var(--color-team-shift-empty); }
.team-employee-grid-legend .overtime { height: 9px; }

/* Employee holiday history */
.page-container:has(.holiday-history-page) { max-width: none; width: 100%; box-sizing: border-box; padding: 22px 36px 48px; }
.holiday-history-page { color: var(--color-text); }
.holiday-breadcrumb { color: var(--color-text-muted); font-size: 13px; margin-bottom: 14px; }
.holiday-breadcrumb a { color: var(--color-brand); text-decoration: none; }
.holiday-history-header, .holiday-profile { display: flex; align-items: center; gap: 14px; }
.holiday-history-header { justify-content: space-between; margin-bottom: 18px; }
.holiday-profile .person-avatar { width: 48px; height: 48px; flex: 0 0 48px; font-size: 17px; }
.holiday-history-header h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -.02em; }
.holiday-history-header p { margin: 0; color: var(--color-text-muted); font-size: 13px; }
.holiday-years { display: flex; align-items: center; gap: 8px; }
.holiday-years > span { font-size: 13px; font-weight: 600; color: var(--color-text-muted); }
.holiday-years .styled-select { min-width: 112px; }
.holiday-years .styled-select-menu { top: calc(100% + 6px); bottom: auto; }
.holiday-history-columns { display: grid; grid-template-columns: minmax(0, 3fr) minmax(390px, 2fr); gap: 18px; align-items: start; }
.holiday-allowance-card, .holiday-payroll-card { border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); min-width: 0; }
.holiday-allowance-card > header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 10px; gap: 10px; }
.holiday-history-page h2 { font-size: 15px; margin: 0; }
.holiday-allowance-card > header span { font-size: 12px; color: var(--color-text-muted); }
.holiday-allowance-summary { padding: 0 18px 14px; }
.holiday-allowance-summary > strong { font-size: 28px; letter-spacing: -.02em; margin-right: 8px; }
.holiday-allowance-summary > span, .holiday-allowance-summary > p { color: var(--color-text-muted); font-size: 12px; }
.holiday-allowance-bar { display: flex; height: 32px; border-radius: 6px; overflow: hidden; margin-top: 14px; background: var(--color-brand-soft); }
.holiday-allowance-bar > span { display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; font-size: 11px; font-weight: 600; min-width: 0; }
.holiday-allowance-bar .approved, .holiday-allowance-bar .taken, .holiday-day.taken, .holiday-section i.taken { background: var(--color-brand); color: var(--color-surface); }
.holiday-allowance-bar .upcoming, .holiday-day.upcoming, .holiday-section i.upcoming { background: var(--color-holiday-upcoming); }
.holiday-allowance-bar .pending, .holiday-day.pending, .holiday-section i.pending { background: repeating-linear-gradient(135deg, var(--color-pending-bg) 0 3px, var(--color-surface) 3px 6px); box-shadow: inset 0 0 0 1px var(--color-cancellation-amber-edge); }
.holiday-allowance-bar .left, .holiday-section i.left { background: var(--color-border); }
.holiday-bar-scale { display: flex; justify-content: space-between; color: var(--color-text-muted); font-size: 11px; margin-top: 5px; }
.holiday-bookings-scroll { overflow-x: auto; border-radius: 0 0 10px 10px; }
.holiday-bookings { width: 100%; border-collapse: collapse; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.holiday-bookings th, .holiday-bookings td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--color-divider); vertical-align: top; }
.holiday-bookings thead th { font-size: 10px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .04em; background: var(--color-page); }
.holiday-bookings th:first-child, .holiday-bookings td:first-child { padding-left: 18px; }
.holiday-bookings td { line-height: 18px; }
.holiday-booking-date { display: flex; align-items: center; gap: 4px; min-height: 18px; }
.holiday-bookings td small { display: block; }
.holiday-section th { background: var(--color-page); padding: 10px 18px; font-size: 12px; }
.holiday-section th > div { display: flex; justify-content: space-between; gap: 8px; }
.holiday-section th span { display: flex; align-items: center; gap: 6px; }
.holiday-section small { font-weight: 400; color: var(--color-text-muted); }
.holiday-section i { width: 10px; height: 10px; border-radius: 2px; background: var(--color-border); flex: 0 0 10px; }
.holiday-status { display: inline-block; border-radius: 20px; padding: 2px 7px; font-weight: 600; font-size: 10.5px; background: var(--color-brand-soft); color: var(--color-brand-hover); }
.holiday-status.pending { background: var(--color-pending-bg); color: var(--color-team-amber-text); }
.holiday-status.declined { background: var(--color-declined-bg); color: var(--color-declined-text); }
.holiday-status.not_counted { background: var(--color-page); color: var(--color-text-muted); }
.holiday-bookings tr.not_counted { color: var(--color-text-muted); }
.holiday-short-notice { color: var(--color-team-amber-text); border: 1px solid var(--color-team-attention-border); border-radius: 4px; padding: 1px 4px; margin-top: 5px; width: fit-content; font-size: 10px; }
.holiday-note-trigger { display: inline-flex; align-items: center; justify-content: center; height: 18px; min-height: 0; line-height: 18px; background: transparent; border: 0; color: var(--color-brand); padding: 0 4px; cursor: pointer; font: inherit; }
.holiday-review-button { background: var(--color-brand); color: var(--color-surface); border: 0; border-radius: 5px; padding: 4px 8px; font: inherit; font-weight: 600; cursor: pointer; }
.holiday-empty { color: var(--color-text-muted); }
.holiday-bookings tr.notes-open { background: var(--color-brand-soft); box-shadow: inset 3px 0 0 var(--color-brand); }
.holiday-notes-layer { position: fixed; z-index: 400; padding-top: 8px; box-sizing: border-box; font-size: 12px; display: flex; flex-direction: column; }
.holiday-notes-layer.is-above { padding-top: 0; padding-bottom: 8px; }
.holiday-notes-popover { position: relative; min-height: 0; overflow-y: auto; padding: 14px; border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 8px 24px rgba(21,32,28,.12); background: var(--color-surface); }
.holiday-notes-layer::before { content: ''; position: absolute; width: 10px; height: 10px; background: var(--color-surface); transform: rotate(45deg); top: 3px; left: 22px; border-left: 1px solid var(--color-border); border-top: 1px solid var(--color-border); }
.holiday-notes-popover header { display: flex; justify-content: space-between; gap: 10px; }
.holiday-notes-popover h3 { font-size: 11.5px; margin: 12px 0 4px; }
.holiday-notes-popover p { margin: 0 0 3px; font-size: 12px; }
.holiday-notes-popover small { color: var(--color-text-muted); }
.holiday-regular-notice { color: var(--color-brand); }
.holiday-payroll-card { padding: 16px; }
.holiday-payroll-card > p { font-size: 11.5px; color: var(--color-text-muted); margin: 5px 0 14px; }
.holiday-payroll-scroll { overflow-x: auto; }
.holiday-payroll-grid { min-width: 350px; }
.holiday-grid-row { display: grid; grid-template-columns: 70px repeat(7, minmax(12px,1fr)) 5px repeat(7,minmax(12px,1fr)) 65px; align-items: center; gap: 3px; margin-bottom: 5px; min-height: 18px; font-size: 11px; font-variant-numeric: tabular-nums; }
.holiday-grid-row > :nth-child(9) { grid-column: 10; }
.holiday-grid-row > :first-child { white-space: nowrap; }
.holiday-grid-row small { color: var(--color-text-muted); font-size: 10px; }
.holiday-grid-row.is-heading { color: var(--color-text-muted); font-size: 9px; text-align: center; margin-bottom: 8px; }
.holiday-grid-row.is-heading > :last-child { text-align: left; font-size: 10px; }
.holiday-day { display: inline-block; height: 14px; width: 100%; border-radius: 2px; background: var(--color-border); position: relative; box-sizing: border-box; }
.holiday-day.weekend { background: repeating-linear-gradient(135deg, var(--color-page) 0 2px, var(--color-border) 2px 4px); }
.holiday-day.public::after { content: ''; width: 3px; height: 3px; border-radius: 50%; background: var(--color-text-muted); position: absolute; top: 5px; left: calc(50% - 1.5px); }
.holiday-day.cancelled { background: linear-gradient(135deg, transparent 45%, var(--color-border-strong) 45% 55%, transparent 55%); border: 1px solid var(--color-border-strong); }
.holiday-day.is-today { outline: 1.5px solid var(--color-team-break-edge); outline-offset: 1px; }
.holiday-current-period { color: var(--color-team-break-edge); font-weight: 600; }
.holiday-current-period small { color: inherit; }
.holiday-period-hours { padding-left: 3px; }
.holiday-period-hours small { display: block; color: var(--color-team-amber-text); }
.holiday-grid-legend { border-top: 1px solid var(--color-divider); margin-top: 12px; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 9px 12px; }
.holiday-grid-legend > span { display: flex; gap: 5px; align-items: center; font-size: 10px; color: var(--color-text-muted); }
.holiday-grid-legend .holiday-day { width: 12px; height: 12px; }
.holiday-review-overlay { position: fixed; inset: 0; background: rgba(21,32,28,.38); z-index: 500; padding: 20px; display: flex; align-items: center; justify-content: center; }
.holiday-review-dialog { background: var(--color-page); border-radius: 12px; width: min(1500px, 100%); max-height: calc(100vh - 40px); overflow: auto; position: relative; box-shadow: 0 16px 40px rgba(21,32,28,.24); padding: 0 10px 10px; }
.holiday-review-close { position: sticky; top: 0; float: right; z-index: 10; border: 0; background: var(--color-surface); color: var(--color-text-muted); border-radius: 6px; font-size: 24px; cursor: pointer; width: 32px; height: 32px; }
@media (max-width: 1100px) { .holiday-history-columns { grid-template-columns: 1fr; } .holiday-payroll-grid { max-width: 600px; } }
@media (max-width: 700px) { .page-container:has(.holiday-history-page) { padding: 16px; } .holiday-history-header { align-items: flex-start; flex-direction: column; } }

.holiday-review-dialog .employee-back-link { display: none; }

.holiday-notes-layer.is-above::before { top: auto; bottom: 3px; transform: rotate(225deg); }

.team-employee-timeline > span[tabindex] { cursor: help; }
.team-employee-timeline > span[tabindex]:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.team-shift-popover { position: fixed; z-index: 600; box-sizing: border-box; padding: 14px 16px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-text); color: var(--color-surface); box-shadow: 0 8px 24px rgba(21,32,28,.2); pointer-events: none; font-family: "IBM Plex Sans", sans-serif; font-size: 13px; line-height: 1.45; }
.team-shift-popover > strong { display: block; font-size: 14px; }
.team-shift-popover > p { margin: 8px 0; font-variant-numeric: tabular-nums; }
.team-shift-popover > small { font-size: 12px; opacity: .8; }

.page-container:has(.contract-page) { max-width: none; padding: 22px 36px; }
.contract-page { color: var(--color-text); font-family: "IBM Plex Sans", sans-serif; display: flex; flex-direction: column; gap: 16px; }
.contract-header { display: flex; gap: 14px; align-items: center; }
.contract-header .person-avatar { width: 48px; height: 48px; font-size: 18px; }
.contract-header > div { flex: 1; }
.contract-header > .styled-select { flex: 0 0 120px; }
.contract-header nav { display: flex; gap: 8px; font-size: 12.5px; color: var(--color-text-muted); }
.contract-page a { color: var(--color-brand); }
.contract-header h1 { margin: 4px 0; font-size: 28px; letter-spacing: -.02em; }
.contract-header p { margin: 0; font-size: 13px; color: var(--color-text-muted); }
.contract-page h2 { font-size: 16px; margin: 0 0 14px; }
.contract-summary { display: grid; grid-template-columns: 1fr 1fr 2fr; padding: 16px 0; }
.contract-summary > div { padding: 0 20px; border-right: 1px solid var(--color-divider); }
.contract-summary > div:last-child { border: 0; }
.contract-summary > div > span { display: block; font-size: 12px; color: var(--color-text-muted); margin-bottom: 7px; }
.contract-summary strong { display: block; font-size: 20px; }
.contract-summary > div > small { display: inline-block; margin-top: 7px; padding: 2px 7px; border-radius: 5px; background: var(--color-surface-alt); color: var(--color-text-muted); }
.contract-summary p { margin: 0 0 8px; font-size: 14px; }
.contract-holiday-bar { height: 8px; display: flex; overflow: hidden; border-radius: 5px; background: var(--color-team-track); }
.contract-holiday-bar > i { height: 100%; flex-shrink: 0; }
.contract-page .taken { background: var(--color-brand); }
.contract-page .upcoming { background: var(--color-holiday-upcoming); }
.contract-holiday-bar .imported { background: repeating-linear-gradient(135deg,var(--color-working-lunch-grey) 0 3px,var(--color-working-fill) 3px 6px); }
.contract-holiday-legend { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 11px; margin-top: 8px; align-items: center; }
.contract-holiday-legend > span { display: flex; gap: 4px; align-items: center; }
.contract-holiday-legend i, .contract-chart-legend i { width: 9px; height: 9px; display: inline-block; border-radius: 2px; }
.contract-imported-chip { background: var(--color-team-blue-bg); padding: 3px 6px; border-radius: 5px; }
.contract-page .button-text { padding: 0; min-height: 0; font-size: 12px; color: var(--color-brand); background: transparent; border: 0; text-decoration: underline; }
.contract-columns { display: grid; grid-template-columns: minmax(0,3fr) minmax(340px,2fr); gap: 18px; align-items: start; }
.contract-columns > aside { display: flex; flex-direction: column; gap: 16px; }
.contract-year { overflow: hidden; }
.contract-year > h2 { padding: 18px 18px 0; }
.contract-chart { display: grid; grid-template-columns: repeat(26,minmax(0,1fr)); gap: 4px; padding: 8px 18px; }
.contract-chart > a { display: grid; grid-template-rows: 20px 100px 20px 4px; text-decoration: none; color: var(--color-text-muted); text-align: center; font-size: 9px; }
.contract-chart b { font-size: 10px; font-variant-numeric: tabular-nums; }
.contract-chart i { align-self: end; display: block; background: var(--color-working-fill); border-radius: 3px 3px 0 0; min-height: 1px; }
.contract-chart > .is-past i { opacity: .4; }
.contract-chart > .is-single i { background: var(--color-team-overtime); opacity: 1; }
.contract-chart > .is-current i { outline: 2px solid var(--color-team-break-edge); outline-offset: 2px; }
.contract-chart > .is-current span, .contract-now-key { color: var(--color-team-break-edge); font-weight: 600; }
.contract-chart em { display: block; border-radius: 2px; }
.contract-chart-legend { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 11px; padding: 8px 18px 16px; color: var(--color-text-muted); }
.contract-chart-legend > span { display: flex; align-items: center; gap: 5px; }
.contract-page .work { background: var(--color-working-fill); }
.contract-page .one-off { background: var(--color-team-overtime); }
.contract-year table { width: 100%; border-collapse: collapse; font-size: 12px; }
.contract-year th { text-align: left; font-size: 10px; color: var(--color-text-muted); background: var(--color-surface-alt); }
.contract-year th, .contract-year td { padding: 9px 12px; border-bottom: 1px solid var(--color-divider); }
.contract-year tr.is-past { color: var(--color-text-subtle); }
.contract-year tr.is-current > td:first-child { box-shadow: inset 3px 0 var(--color-team-break-edge); }
.contract-year td small { display: block; margin-top: 4px; font-size: 10px; }
.contract-reference-hours { white-space: nowrap; font-variant-numeric: tabular-nums; }
.contract-over-hours { color: var(--color-team-amber-text); font-weight: 600; }
.contract-over-holiday { display: inline-block; padding: 2px 6px; border-radius: 4px; background: var(--color-holiday-over-allowance); color: var(--color-text); font-weight: 600; }
.contract-now-tag { color: var(--color-team-break-edge); }
.contract-one-off { padding: 2px 6px; border-radius: 9px; background: var(--color-team-amber-bg); color: var(--color-team-amber-text); }
.contract-divider { background: var(--color-audit-payroll-bg); color: var(--color-audit-payroll-text); font-size: 11px; }
.contract-booked { height: 4px; width: 60px; margin-bottom: 4px; }
.contract-booked > i { display: block; height: 4px; border-radius: 2px; }
.contract-footnote { font-size: 11.5px; color: var(--color-text-muted); padding: 0 16px; }
.contract-change, .contract-history { padding: 18px; }
.contract-change { border-color: var(--color-brand); display: flex; flex-direction: column; gap: 14px; }
.contract-change h2 { margin-bottom: 0; }
.contract-page label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--color-text-muted); }
.contract-checkbox { flex-direction: row !important; align-items: center; color: var(--color-text) !important; font-size: 14px !important; }
.contract-checkbox input { width: 16px; height: 16px; min-height: 16px; flex: 0 0 16px; margin: 0; padding: 0; accent-color: var(--color-brand); }
.contract-checkbox input:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 3px; }
.contract-change > section { border-top: 1px solid var(--color-divider); padding-top: 12px; }
.contract-change p { color: var(--color-text-muted); font-size: 12px; margin: 6px 0; }
.contract-value-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.contract-value-row small { font-size: 12px; color: var(--color-text-muted); }
.contract-stepper { display: inline-flex; align-items: stretch; flex: 0 0 auto; height: 36px; border: 1px solid var(--color-border-strong); border-radius: 8px; background: var(--color-surface); }
.contract-stepper:focus-within { border-color: var(--color-brand); box-shadow: 0 0 0 3px var(--color-focus-ring); }
.contract-stepper label { display: flex; gap: 0; margin: 0; }
.contract-stepper button { box-sizing: border-box; width: 34px; padding: 0; min-height: 0; height: 34px; border: 0; border-radius: 7px 0 0 7px; font-size: 18px; line-height: 1; }
.contract-stepper button:last-child { border-radius: 0 7px 7px 0; }
.contract-stepper input { box-sizing: border-box; width: 68px; min-width: 0; padding: 0 6px; height: 34px; min-height: 0; border: 0; border-left: 1px solid var(--color-border); border-right: 1px solid var(--color-border); border-radius: 0; text-align: center; font-family: inherit; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; appearance: textfield; }
.contract-stepper input:focus-visible { border-width: 0 1px; border-color: var(--color-border); outline: none; }
.contract-stepper input::-webkit-inner-spin-button, .contract-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.contract-hint { margin-top: 10px; border: 1px dashed var(--color-brand); padding: 10px; background: var(--color-brand-tint); font-size: 12px; line-height: 1.5; border-radius: 6px; }
.contract-hint button { display: block; margin-top: 5px; }
.contract-reason > span { font-size: 12px; color: var(--color-text-muted); font-weight: 600; }
.contract-reason > div { display: flex; flex-wrap: wrap; gap: 5px; margin: 7px 0 10px; }
.contract-reason button { background: var(--color-surface); color: var(--color-text-muted); border: 1px solid var(--color-border); padding: 5px 8px; border-radius: 20px; min-height: 0; font-size: 11.5px; }
.contract-reason button[aria-pressed=true] { color: var(--color-brand); border-color: var(--color-brand); background: var(--color-brand-soft); }
.contract-reason textarea { min-height: 60px; padding: 8px; font-size: 13px; resize: vertical; }
.contract-plain-summary { background: var(--color-surface-alt); padding: 12px; border-radius: 7px; font-size: 12px; line-height: 1.6; }
.contract-change > button { width: 100%; font-size: 13px; min-height: 38px; padding: 8px; }
.contract-history article { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--color-divider); font-size: 12px; }
.contract-history article > small { text-align: right; white-space: nowrap; color: var(--color-text-muted); font-size: 11px; }
.contract-history p { margin: 5px 0; }
.contract-history small { color: var(--color-text-muted); }
.contract-finished { padding: 12px 16px; border: 1px solid var(--color-team-attention-border); background: var(--color-team-attention-bg); color: var(--color-team-amber-text); font-size: 13px; border-radius: 8px; }
.contract-page.is-finished .contract-header .styled-select-trigger { border-color: var(--color-cancellation-amber-edge); background: var(--color-team-attention-bg); }
.contract-modal-overlay { position: fixed; inset: 0; z-index: 700; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--color-draft-shadow); }
.contract-modal { width: 420px; max-width: 100%; max-height: calc(100dvh - 40px); overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.contract-modal header, .contract-modal footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.contract-modal h2 { margin: 0; }
.contract-modal p { font-size: 12.5px; margin: 0; color: var(--color-text-muted); }
.contract-modal input { height: 36px; font-size: 14px; padding: 6px 10px; }
.contract-modal footer { justify-content: flex-end; }
.contract-modal footer button { min-height: 36px; padding: 7px 12px; font-size: 13px; }
@media (max-width: 1100px) { .contract-columns { grid-template-columns: 1fr; } .contract-columns > aside { grid-row: 1; } .contract-summary { grid-template-columns: 1fr 1fr; } .contract-summary > .contract-holiday-used { grid-column: 1 / -1; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--color-divider); } }
@media (max-width: 700px) { .page-container:has(.contract-page) { padding: 16px; } .contract-header { flex-wrap: wrap; } .contract-header > div:not(.styled-select) { min-width: 190px; } .contract-summary { display: flex; flex-direction: column; gap: 16px; } .contract-summary > div { border: 0; } .contract-chart { gap: 2px; padding-left: 8px; padding-right: 8px; } .contract-chart b, .contract-chart span { font-size: 8px; } }

/* Admin employee profile; the existing week grid keeps its own styles. */
.employee-profile-cards { align-items: stretch; }
.employee-profile-cards .employee-summary-tile { gap: 10px; min-width: 0; }
.employee-profile-cards header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.employee-profile-cards header a { white-space: nowrap; margin: 0; font-size: 12.5px; }
.employee-profile-cards h3 { margin: 4px 0 0; font-size: 11px; text-transform: uppercase; color: var(--color-text-muted); letter-spacing: .06em; }
.employee-profile-cards .button-secondary { align-self: flex-start; margin-top: auto; text-decoration: none; font-size: 13px; }
.admin-upcoming-bookings { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.admin-upcoming-bookings li { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--color-border); }
.admin-upcoming-bookings a { margin: 0; }
.admin-contract-line { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.admin-contract-line strong { font-family: inherit; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--color-text); }
.admin-contract-line small { padding: 2px 6px; border-radius: 5px; background: var(--color-team-track); font-size: 11px; }
.admin-contract-upcoming { color: var(--color-audit-payroll-text); font-size: 12px; background: var(--color-audit-payroll-bg); padding: 8px; border-radius: 6px; }
.employee-more hr { border: 0; border-top: 1px solid var(--color-border); margin: 4px; }
.employee-more .employee-deactivate { color: var(--color-team-break-edge); }
.employee-more small { display: block; color: var(--color-text-muted); font-size: 11px; margin-top: 4px; }
.employee-view-switch { display: inline-flex; border: 1px solid var(--color-border); border-radius: 7px; overflow: hidden; flex-shrink: 0; }
.employee-view-switch button { background: var(--color-surface); color: var(--color-text-muted); border: 0; border-radius: 0; font-size: 12px; padding: 6px 10px; white-space: nowrap; }
.employee-view-switch button[aria-pressed="true"] { background: var(--color-brand-soft); color: var(--color-brand-hover); }
.employee-hours-toolbar > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex: 1; }
.employee-hours-toolbar .employee-week-tabs { margin-left: auto; }
.employee-admin-page > .team-employee-attention { margin: 0; }
.contract-drawer-overlay { position: fixed; inset: 0; background: var(--color-dialog-overlay); z-index: 1100; display: flex; justify-content: flex-end; }
.contract-drawer { width: min(470px, 100%); background: var(--color-surface); height: 100%; max-height: 100dvh; margin: 0; gap: 0; display: flex; flex-direction: column; box-shadow: 0 16px 40px var(--color-draft-shadow); font-family: inherit; }
.contract-drawer > header { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--color-border); }
.contract-drawer h2 { font-size: 19px; margin: 0 0 6px; }
.contract-drawer p { font-size: 13px; color: var(--color-text-muted); }
.contract-drawer-body { flex: 1; overflow: auto; padding: 20px; }
.contract-drawer-body.contract-change { border: 0; border-radius: 0; }
.contract-drawer > footer { display: flex; gap: 10px; border-top: 1px solid var(--color-border); padding: 16px 20px; }
.contract-drawer > footer button:first-child { flex: 1; }
.contract-drawer .employee-view-switch { display: flex; margin-top: 10px; }
.contract-drawer .employee-view-switch button { flex: 1; }
.admin-bird-view .team-employee-timeline .pending, .admin-bird-view .team-employee-grid-legend .pending { background: repeating-linear-gradient(135deg, var(--color-surface) 0 3px, var(--color-team-overtime) 3px 6px); border: 1px solid var(--color-cancellation-amber-edge); }
.admin-bird-view .team-employee-timeline .unplanned, .admin-bird-view .team-employee-grid-legend .unplanned { background: repeating-linear-gradient(135deg, var(--color-profile-alert) 0 3px, var(--color-profile-alert-border) 3px 6px); border: 1px dashed var(--color-team-break-edge); }
.users-inactive-toggle { display: flex; gap: 6px; align-items: center; white-space: nowrap; font-size: 12px; }
.users-inactive-toggle input { width: auto; }

.contract-drawer-body { min-height: 0; }
.contract-drawer label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--color-text-muted); }
.contract-drawer .contract-checkbox { display: flex; gap: 8px; }
.admin-bird-view tbody tr { cursor: pointer; }
.admin-bird-view tbody tr:hover { background: var(--color-brand-tint); }
.admin-bird-view .team-employee-shift-grid th:first-child { width: 104px; }
.admin-bird-view .team-employee-shift-grid tbody th button { white-space: nowrap; padding: 0; font-size: 11px; }
.admin-bird-view .team-employee-range small { white-space: nowrap; }
.admin-bird-view .team-employee-timeline .unplanned { left: 0; width: 100%; }
.admin-bird-view .team-red-text { color: var(--color-team-break-edge); }

/* Admin Users overview shares Team's data displays and practice settings. */
.users-header { display: grid; grid-template-columns: minmax(150px, 1fr) auto minmax(400px, 1fr); gap: 18px; align-items: center; }
.users-header h1 { font-size: 24px; margin: 0; }
.users-header p { color: var(--color-text-muted); font-size: 13px; margin: 6px 0 0; }
.users-header-right { display: grid; justify-items: end; gap: 12px; }
.users-header-right .actions { justify-content: flex-end; }
.users-access-filter { position: relative; font-size: 13px; }
.users-access-filter summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; padding: 9px 12px; cursor: pointer; white-space: nowrap; }
.users-access-filter summary::-webkit-details-marker { display: none; }
.users-access-filter [role="group"] { position: absolute; right: 0; top: calc(100% + 5px); z-index: 10; width: 185px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 12px 30px var(--color-working-menu-shadow); padding: 5px; }
.users-access-filter [role="group"] button { display: block; width: 100%; text-align: left; background: transparent; color: var(--color-text); border: none; padding: 8px; }
.users-access-filter [role="group"] button[aria-pressed="true"], .users-access-filter [role="group"] button:hover { background: var(--color-brand-soft); }
.users-access-filter label { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--color-border); padding: 10px 8px; }
.users-access-filter input { width: 15px; height: 15px; margin: 0; }
.users-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.users-table-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--color-border); }
.users-table-tools input { max-width: 320px; font-size: 13px; min-height: 36px; }
.users-table-tools small { color: var(--color-text-muted); }
.staff-type-tabs { margin: 12px 16px; }
.users-overview-table { min-width: 960px; }
.users-overview-table td > small { display: block; margin-top: 5px; }
.users-access-badges { display: flex; gap: 4px; margin-top: 5px; }
.users-access-badges .pill { font-size: 10.5px; padding: 2px 7px; }
.users-access-badges .role-admin { background: var(--color-working-edge); color: var(--color-surface); }
.users-access-badges .role-manager { background: var(--color-team-blue-bg); color: var(--color-working-edge); }
.users-overview-table .users-plan-label { text-align: right; }
.users-overview-table .team-hours-bar { overflow: hidden; }
.users-unplanned { background: repeating-linear-gradient(135deg, var(--color-profile-alert-border) 0 3px, var(--color-profile-alert) 3px 6px); }
.users-overview-table .users-is-inactive { opacity: .5; }
.users-row-chevron { color: var(--color-text-muted); font-size: 22px; }
@media (max-width: 1200px) { .users-header { grid-template-columns: 1fr auto; } .users-header > .team-period-nav { grid-row: 2; grid-column: 1 / -1; justify-self: center; } .users-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .users-header { grid-template-columns: 1fr; } .users-header > .team-period-nav { grid-row: auto; grid-column: auto; } .users-header-right { justify-items: start; } .users-header-right .team-filter-row { flex-wrap: wrap; } .users-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.users-overview-table thead th:nth-child(1) { width: 19%; }
.users-overview-table thead th:nth-child(2) { width: 18%; }
.users-overview-table thead th:nth-child(3) { width: 18%; }
.users-overview-table thead th:nth-child(4) { width: 15%; }
.users-overview-table thead th:nth-child(5), .users-overview-table thead th:nth-child(6) { width: 9%; }
.users-overview-table thead th:nth-child(7) { width: 10%; }
.users-overview-table thead th:nth-child(8) { width: 2%; }
.users-overview-table .users-holiday-total { font-size: 11px; }
.users-overview-table .users-holiday-total b { font-weight: 700; }
.users-overview-table .users-holiday-total small { display: block; margin-top: 5px; font-size: 11px; color: var(--color-text-muted); }
.users-overview-table th, .users-overview-table td { padding: 12px 10px; }
.users-table-tools input { width: 260px; }

@media (max-width: 1100px) { .absence-quick-picks { grid-column: 1 / -1; } }

.absence-row-actions { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.absence-row-actions button { padding: 0; min-height: 32px; font-size: inherit; }

.doctors-note-notices { margin: 12px 0; display: grid; gap: 8px; }
.doctors-note-notices .warning-panel { display: flex; gap: 10px; margin: 0; }
.doctors-note-upload { width: min(440px, 100%); padding: 22px; display: grid; gap: 12px; }
.doctors-note-upload h2, .doctors-note-upload p { margin: 0; }
.doctors-note-upload p { font-size: 13px; color: var(--color-text-muted); }
.doctors-note-upload .actions { justify-content: flex-end; }
.absence-upload-note { display: inline-block; margin-left: 8px; padding: 4px 8px; font-size: 12px; min-height: 30px; }
.doctors-note-overlay { z-index: 750; background: var(--color-dialog-overlay); }
.doctors-note-viewer { width: min(900px, 100%); max-height: calc(100dvh - 40px); padding: 18px; display: flex; flex-direction: column; gap: 14px; overflow: auto; }
.doctors-note-viewer.confirming { width: min(460px, 100%); }
.doctors-note-viewer header, .doctors-note-viewer footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.doctors-note-viewer h2 { font-size: 18px; margin: 0; }
.doctors-note-viewer header button { font-size: 22px; padding: 2px 10px; }
.doctors-note-viewer img { display: block; width: 100%; min-height: 0; max-height: calc(100dvh - 190px); object-fit: contain; }
.doctors-note-viewer footer { justify-content: flex-end; border-top: 1px solid var(--color-divider); padding-top: 12px; }
.holiday-excess-detail { display: block; min-width: 150px; margin-top: 5px; color: var(--color-text-muted); font-size: 12px; line-height: 1.4; }
.holiday-day.longer_holidays { background: repeating-linear-gradient(135deg, var(--color-holiday-upcoming) 0 4px, var(--color-calendar-absence-edge) 4px 7px); border: 1px solid var(--color-calendar-absence-edge); }
.absence-swatch.longer_holidays { background-color: var(--color-holiday-over-allowance); }
.absence-reason-pill.longer_holidays { color: var(--color-absence-text); background: var(--color-absence-bg); }
.employee-holiday-stat .employee-balance-bar > .balance-left { background: var(--color-calendar-lunch-dark); }
.employee-holiday-stat .employee-balance-bar > .balance-over-allowance, .employee-balance-legend .over-allowance-swatch { background: var(--color-holiday-over-allowance); }
.employee-over-allowance-note { font-size: 12px; color: var(--color-text-muted); margin: 8px 0 0; }
.holiday-allowance-chart { position: relative; }
.holiday-balance-tooltip { position: absolute; top: calc(100% + 8px); left: 0; z-index: 10; width: min(360px, 100%); padding: 12px 14px; border-radius: 10px; background: var(--color-text); color: var(--color-surface); box-shadow: 0 8px 24px var(--color-shadow-floating); pointer-events: none; font-size: 12.5px; }
.holiday-balance-tooltip p { margin: 5px 0 0; line-height: 1.45; }
.holiday-allowance-bar > span:focus-visible { outline: 2px solid var(--color-text); outline-offset: -2px; }
.holiday-allowance-bar .over_allowance, .holiday-balance-legend i.over_allowance { background: var(--color-holiday-over-allowance); }
.holiday-balance-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; font-size: 11.5px; color: var(--color-text-muted); }
.holiday-balance-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.holiday-balance-legend i { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.holiday-balance-legend i.approved, .holiday-balance-legend i.taken { background: var(--color-brand); }
.holiday-balance-legend i.upcoming { background: var(--color-holiday-upcoming); }
.holiday-balance-legend i.pending { background: repeating-linear-gradient(135deg, var(--color-pending-bg) 0 3px, var(--color-surface) 3px 6px); box-shadow: inset 0 0 0 1px var(--color-cancellation-amber-edge); }
.holiday-balance-legend i.left { background: var(--color-border); }
.holiday-balance-segments { display: flex; width: 100%; height: 100%; border-radius: inherit; overflow: hidden; }
.holiday-balance-segments > span { display: block; flex-shrink: 0; height: 100%; }
.holiday-balance-segments .used { background: var(--color-brand); }
.holiday-balance-segments .pending { background: repeating-linear-gradient(135deg,var(--color-calendar-pending-dark) 0 3px,var(--color-profile-pending) 3px 6px); box-shadow: inset 0 0 0 1px var(--color-calendar-pending-border); }
.holiday-balance-segments .left { background: var(--color-profile-left); }
.holiday-balance-segments .over-allowance, .holiday-over-allowance-summary > i { background: var(--color-holiday-over-allowance); }
.holiday-over-allowance-summary { display: flex; align-items: center; gap: 5px; margin-top: 5px; font-size: 11.5px; color: var(--color-text-muted); }
.holiday-over-allowance-summary > i { display: inline-block; flex-shrink: 0; width: 10px; height: 10px; border-radius: 2px; }
.coverage-settings-page { display: grid; gap: 18px; padding: 26px 36px; }
.coverage-settings-page h1 { margin: 0; font-size: 30px; letter-spacing: -.02em; }
.coverage-settings-page header p { color: var(--color-text-muted); margin: 6px 0 0; }
.coverage-settings-page h2 { font-size: 16px; margin: 0 0 16px; }
@media (max-width: 600px) { .coverage-settings-page { padding: 16px; } }
.coverage-settings-page .card { margin: 0; }
.coverage-stepper { display: inline-flex; align-items: center; border: 1px solid var(--color-border-strong); border-radius: 8px; overflow: hidden; }
.coverage-stepper button { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 0; font: inherit; font-size: 20px; }
.coverage-stepper output { display: flex; align-items: center; justify-content: center; align-self: stretch; min-width: 52px; text-align: center; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; border-inline: 1px solid var(--color-border); }

/* Temporary cover uses the calendar's pairing window and a distinct slate hatch. */
.temporary-cover-popover { width: 390px; }
.temporary-cover-popover fieldset { display: block; border: 0; padding: 0; margin: 12px 0; min-width: 0; }
.temporary-cover-popover legend, .cover-search-label { font-size: 12px; font-weight: 600; color: var(--color-text-muted); }
.temporary-cover-popover input[type="text"], .cover-search-label input { display: block; width: 100%; box-sizing: border-box; font: inherit; padding: 10px 12px; border: 1px solid var(--color-border-strong); border-radius: 8px; background: var(--color-surface); color: var(--color-text); margin-top: 6px; }
.cover-option { text-transform: none; display: flex; align-items: flex-start; gap: 9px; border: 1px solid var(--color-border); border-radius: 9px; padding: 10px; margin-top: 8px; font-size: 13px; }
.cover-option input { min-height: 16px; width: 16px; height: 16px; flex: 0 0 16px; margin: 2px 0; accent-color: var(--color-brand); }
.cover-option small { display: block; color: var(--color-text-muted); margin-top: 4px; }
.cover-option.is-selected { border-color: var(--color-brand); background: var(--color-brand-tint); }
.cover-employee-options { max-height: 170px; overflow-y: auto; border: 1px solid var(--color-border); border-radius: 8px; }
.cover-employee-options button { display: block; text-align: left; width: 100%; border: 0; border-radius: 0; background: var(--color-surface); color: var(--color-text); padding: 9px 12px; }
.cover-employee-options button[aria-selected="true"], .cover-employee-options button:hover { background: var(--color-brand-soft); }
.cover-employee-options small { display: block; color: var(--color-text-muted); }
.manager-timeline-bar.is-temping { background: repeating-linear-gradient(135deg, var(--color-working-lunch-grey) 0 5px, var(--color-surface-alt) 5px 10px); color: var(--color-working-edge); border: 1px solid var(--color-input-border); z-index: 3; }
.manager-timeline-cell.has-temp-cover { min-height: 94px !important; }
.temp-cover-lane { position: absolute; left: 0; right: 0; top: 44px; height: 22px; }
.temp-cover-lane .pairing-partner-pill:not(.is-lunch) { background: var(--color-brand-tint); color: var(--color-brand-hover); }
.manager-timeline-cell.is-role .manager-timeline-bar,
.manager-timeline-cell.is-role .manager-timeline-bar * { cursor: pointer; }
.pairing-timeline-cell:has(.temp-cover-lane) { min-height: 94px; }

.cover-scope-options { display: flex; gap: 6px; }
.cover-scope-options button { flex: 1; font-size: 13px; }
.cover-scope-options .is-selected { background: var(--color-brand-soft); border-color: var(--color-brand); }
.cover-days-summary { border-top: 1px solid var(--color-border); padding-top: 10px; }
.cover-days-summary > div { padding: 8px 0; border-bottom: 1px solid var(--color-border); font-size: 12px; }
.cover-days-summary small { display: block; margin-top: 4px; }

.planned-hours { display: flex; flex-direction: column; align-items: stretch; }
.planned-hours .team-hours-bar { overflow: hidden; }
.planned-hours .users-plan-label { display: block; margin-top: 5px; font-size: 11px; text-align: right; }
.planned-hours .hours-to-plan { align-self: flex-end; padding: 3px 8px; border-radius: 999px; background: var(--color-absence-cover-none); color: var(--color-surface); font-weight: 700; line-height: 1.35; }

.cover-remove-warning { padding: 10px 12px; border: 1px solid var(--color-profile-alert-border); border-radius: 8px; background: var(--color-profile-alert); color: var(--color-declined-text); font-size: 13px; }
.cover-remove-button { background: var(--color-absence-cover-none); color: var(--color-surface); }
.cover-remove-button:hover { background: var(--color-destructive); }

.weekly-hours-icon { width: 16px; height: 16px; flex: 0 0 16px; vertical-align: -.15em; }
.weekly-hours-warning { display: inline-flex; align-items: center; gap: 4px; color: var(--color-destructive); font-weight: 700; font-size: 11px; }
.planned-hours .weekly-hours-warning { margin-left: auto; text-align: right; }
.planned-hours .team-cell-line { flex-wrap: wrap; gap: 4px; }
.employee-week-tabs .weekly-hours-warning { flex-shrink: 0; }
.employee-admin-page > .weekly-hours-alert, .employee-admin-page > .doctors-note-notices { margin: 0; }
.weekly-hours-alert .weekly-hours-icon { color: var(--color-destructive); }

/* Training overview and editor */
.page-container:has(> .training-page) { max-width: 1660px; }
.training-page { --training-purple: var(--color-training-primary); --training-light: var(--color-training-unpaid); display: grid; gap: 22px; min-width: 0; }
.training-page h1 { margin: 0; font-size: 28px; }
.training-page .card { margin: 0; min-width: 0; }
.training-page h2 { margin: 0; font-size: 17px; }
.training-page .muted, .training-heading p { color: var(--color-text-muted); }
.training-heading, .training-heading > .actions { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.training-heading p { margin: 6px 0 0; }
.training-heading .payroll-year-select select { appearance: none; background-image: none; padding-right: 36px; }
.training-heading label { display: flex; align-items: center; gap: 10px; }
.training-page .training-primary, .training-page .actions > button.training-primary { background: var(--training-purple); border-color: var(--training-purple); color: var(--color-surface); white-space: nowrap; }
.training-page .button-text { color: var(--training-purple); }
.training-overview { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(410px, 1fr); gap: 22px; align-items: start; }
.training-page .training-list { padding: 0; overflow: hidden; }
.training-list table { width: 100%; }
.training-list th, .training-list td { padding: 15px 12px; font-size: 12px; vertical-align: middle; }
.training-list thead th { font-size: 10px; white-space: nowrap; }
.training-list tbody th[scope] { text-transform: none; letter-spacing: 0; font-size: 13px; background: transparent; }
.training-list .training-group th { background: var(--color-surface-alt); text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--color-text-muted); padding: 10px 14px; }
.training-done { color: var(--color-text-muted); }
.training-clock, .training-list td:first-child { white-space: nowrap; }
.training-attending { width: 190px; max-width: 190px; min-width: 125px; }
.training-attending > div:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; font-size: 11px; }
.training-avatar-stack { display: flex; padding-left: 5px; margin-bottom: 5px; }
.training-avatar-stack .person-avatar { height: 25px; width: 25px; min-width: 25px; font-size: 9px; margin-left: -5px; border: 2px solid var(--color-surface); }
.training-list > p { padding: 16px; }
.training-year { padding: 20px; }
.training-year > p { font-size: 11px; color: var(--color-text-muted); margin: 6px 0 18px; }
.training-year-row, .training-year-head { display: grid; grid-template-columns: 77px minmax(200px, 1fr) minmax(30px, 95px); gap: 10px; align-items: center; min-height: 25px; }
.training-year-row > span:first-child { font-weight: 600; font-size: 11px; white-space: nowrap; }
.training-year-row small { font-weight: 400; }
.training-year-row .is-current { color: var(--color-training-current); }
.training-day-squares { display: grid; grid-template-columns: repeat(7, 1fr) 5px repeat(7, 1fr); gap: 3px; }
.training-day { position: relative; height: 14px; border-radius: 2px; background: var(--color-training-empty); display: flex; min-width: 0; align-items: center; justify-content: center; font-size: 11px; color: var(--color-training-muted); }
.training-day-squares > .second-week { grid-column: 9; }
.training-day.is-weekend, .training-grid-legend .is-weekend { background: repeating-linear-gradient(135deg,var(--color-training-weekend-bg) 0 2px,var(--color-training-weekend-line) 2px 4px); }
.training-day.is-holiday, .training-grid-legend .is-holiday { background: var(--color-training-public); }
.training-day.is-office-closed, .training-grid-legend .is-office-closed { background: repeating-linear-gradient(135deg, var(--color-payroll-office-base) 0 2px, var(--color-payroll-office-stripe) 2px 4px); }
.training-closure-dot { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--color-training-muted); box-shadow: 0 0 0 2px var(--color-training-public); font-size: 0; border-radius: 50%; width: 4px; height: 4px; pointer-events: none; }
.training-day button { flex: 1; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 2px; }
.training-day .is-paid, .training-grid-legend .is-paid { background: var(--training-purple); }
.training-day .is-unpaid, .training-grid-legend .is-unpaid { background: var(--training-light); }
.training-day.is-today, .training-grid-legend .is-today { outline: 2px solid var(--color-training-today); outline-offset: 1px; }
.training-grid-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; color: var(--color-text-muted); }
.training-year-head { font-size: 8px; color: var(--color-text-muted); text-align: center; margin-bottom: 8px; }
.training-grid-legend { display: flex; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--color-divider); padding-top: 15px; margin-top: 16px; font-size: 10px; }
.training-grid-legend span { display: flex; align-items: center; gap: 5px; }
.training-grid-legend i { width: 11px; height: 11px; border-radius: 2px; background: var(--color-training-empty); }
.training-grid-legend .is-holiday::after, .training-grid-legend .is-office-closed::after { content: '•'; display: block; text-align: center; line-height: 10px; }
.training-back { justify-self: start; padding: 0; }
.training-editor-layout { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0,1fr); gap: 24px; border: 0; margin: 0; padding: 0; }
.training-editor-left, .training-editor-right { display: grid; gap: 22px; align-content: start; min-width: 0; }
.training-step { display: grid; align-content: start; gap: 20px; padding: 24px; }
.training-step h2 { display: flex; align-items: center; gap: 10px; }
.training-step h2 > span { display: inline-grid; place-items: center; border-radius: 50%; background: var(--color-training-soft); color: var(--training-purple); width: 28px; height: 28px; font-size: 13px; }
.training-step h2 > strong { margin-left: auto; color: var(--training-purple); font-size: 13px; }
.training-step label { display: grid; gap: 8px; text-transform: none; }
.training-step input { box-sizing: border-box; width: 100%; }
.training-step .training-paid-box { display: flex; align-items: flex-start; gap: 12px; background: var(--color-training-paid-bg); border: 1px solid var(--color-training-paid-border); padding: 16px; border-radius: 8px; }
.training-paid-box input { width: 18px; height: 18px; min-height: 18px; margin: 1px 0 0; padding: 0; accent-color: var(--training-purple); }
.training-paid-box small { display: block; font-weight: 400; color: var(--color-text-muted); margin-top: 5px; }
.training-times { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.training-step > p { margin: 0; font-size: 12px; line-height: 1.6; }
.training-role-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.training-role-chips > span { width: 100%; color: var(--color-text-muted); }
.training-role-chips button { min-height: 30px; padding: 6px 10px; border: 1px dashed var(--color-training-chip-border); background: var(--color-training-chip-bg); color: var(--training-purple); border-radius: 18px; font-size: 12px; }
.training-role-chips button.is-added { background: var(--color-training-soft); border-style: solid; }
.training-attendee-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 20px; }
.training-attendee-list > div { display: flex; align-items: center; gap: 10px; padding: 12px 0; min-width: 0; }
.training-attendee-list .person-avatar { width: 30px; height: 30px; min-width: 30px; font-size: 11px; }
.training-attendee-list > div > div { min-width: 0; }
.training-attendee-list strong { font-size: 13px; }
.training-attendee-list small { display: block; font-size: 11px; font-weight: 400; color: var(--color-text-muted); margin-top: 4px; }
.training-attendee-list button { margin-left: auto; }
.training-attendee-list em, .training-was, .training-issue { color: var(--color-training-issue) !important; font-style: normal; }
.training-search-results { display: grid; gap: 5px; max-height: 200px; overflow-y: auto; }
.training-search-results button { text-align: left; }
.training-save-card { padding: 24px; }
.training-save-card > p { line-height: 1.6; font-size: 13px; margin: 0 0 10px; }
.training-save-card footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 22px; flex-wrap: wrap; }
.training-save-card footer .actions { margin-left: auto; align-items: center; flex-wrap: wrap; }
.training-save-card footer small { max-width: 220px; color: var(--color-text-muted); font-size: 11px; }
.training-delete { background: var(--color-surface); color: var(--color-training-delete); border: 1px solid var(--color-training-delete); }
.training-unsaved, .training-changed, .is-just-added { background: var(--color-training-changed-bg) !important; border-color: var(--color-training-changed-border) !important; }
.training-unsaved { border: 1px solid var(--color-training-notice-border); padding: 14px; border-radius: 8px; margin-bottom: 18px; font-size: 13px; color: var(--color-training-notice-text); }
.training-unsaved ul { padding-left: 18px; margin: 8px 0 0; line-height: 1.7; }
.training-attendee-list .is-just-added { border-radius: 8px; padding-left: 8px; }
.training-delete-modal { max-width: 520px; }
.training-delete-modal .button-destructive { background: var(--color-destructive); border-color: var(--color-destructive); color: var(--color-surface); }
@media (max-width: 1100px) { .training-overview { grid-template-columns: minmax(0,1fr); } .training-year { max-width: 750px; } }
@media (max-width: 850px) { .training-editor-layout { grid-template-columns: minmax(0,1fr); } .training-heading { align-items: flex-start; flex-wrap: wrap; } }
@media (max-width: 550px) { .training-attendee-list { grid-template-columns: minmax(0,1fr); } .training-year { overflow-x: auto; } .training-year-row, .training-year-head { min-width: 380px; } .training-save-card .actions { width: 100%; } }
.training-key { color: var(--color-text); font-weight: 600; font-size: 13px; }
.training-list td:nth-child(2), .training-list td:nth-child(3), .training-list td:nth-child(4) { white-space: nowrap; }
.training-key { display: inline-flex; align-items: center; gap: 7px; color: var(--color-text-muted); font-size: 12px; }
.training-key i, .employee-planned-bar .training, .employee-hours-key .training, .employee-grid-legend i.training, .manager-timeline-bar.is-training { background: var(--color-training-pattern); }
.training-key i { width: 16px; height: 16px; border-radius: 3px; }
.calendar-training { background: var(--color-training-pattern) !important; border: 1px solid var(--color-training) !important; color: var(--color-surface) !important; cursor: pointer; }
.calendar-training .fc-event-main { color: var(--color-surface); font-weight: 700; text-shadow: 0 1px 2px var(--color-training); overflow: hidden; height: 100%; }
.calendar-training .calendar-shift-content { overflow: hidden; height: 100%; box-sizing: border-box; }
.calendar-training .calendar-shift-content > * { color: var(--color-surface); font-weight: 700; }
.manager-timeline-bar.is-training, .temp-cover-lane .pairing-partner-pill.is-training { background: var(--color-training-pattern); color: var(--color-surface); font-weight: 700; text-shadow: 0 1px 2px var(--color-training); border: 1px solid var(--color-training); }
.contract-training-hours { color: var(--color-training); font-weight: 600; }

.team-employee-timeline > .training, .manager-review-legend i.is-training, .team-employee-grid-legend i.training, .employee-day-key i.training { background: var(--color-training-pattern); }

.training-attendance-confirmation { margin: 0; }
.training-attendance-confirmation p { margin: 0; font-size: 13px; }
.training-attendance-confirmation fieldset { display: grid; gap: 10px; padding: 12px; }
.training-attendance-confirmation legend { font-size: 13px; font-weight: 600; }
.training-attendance-confirmation label { display: flex; align-items: center; gap: 8px; text-transform: none; }
.training-attendance-confirmation input[type=radio] { width: 16px; height: 16px; min-height: 16px; margin: 0; padding: 0; flex: 0 0 16px; accent-color: var(--color-brand); }

.planned-training-hours { color: var(--color-training); font-size: 11px; font-weight: 600; white-space: nowrap; }

.absence-reason-values { margin-left: auto; text-align: right; }
.absence-reason-values strong, .absence-reason-values small { display: block; }
.absence-reason-values small { margin-top: 3px; color: var(--color-text-muted); font-size: 12px; text-transform: none; font-weight: 400; letter-spacing: normal; }
.absence-upcoming-summary { margin-top: 12px; }
.absence-upcoming-summary > small { color: var(--color-text-muted); font-size: 11px; }
.absence-upcoming-summary .absence-reason-bar { margin-top: 6px; }

.absence-deletion-reason { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.absence-deletion-reason textarea { min-height: 80px; width: 100%; resize: vertical; font: inherit; font-weight: 400; }


.roles-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.roles-page-heading > button { flex-shrink: 0; }
@media (max-width: 480px) { .roles-page-heading { flex-wrap: wrap; } }


.functional-assignment-overlay { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 24px; background: var(--color-dialog-overlay); }
.functional-assignment-dialog { width: min(100%, 480px); max-height: calc(100vh - 48px); overflow-y: auto; padding: 24px; border-radius: 14px; background: var(--color-surface); box-shadow: 0 12px 40px var(--color-working-menu-shadow); }
.functional-assignment-dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.functional-assignment-dialog h2 { margin: 0; font-size: 18px; }
.functional-assignment-dialog p { font-size: 13px; }
.functional-assignment-dialog form { margin: 18px 0 0; gap: 14px; }
.functional-assignment-dialog footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.functional-assignment-people { display: grid; gap: 4px; max-height: 180px; overflow-y: auto; }
.functional-assignment-people button { text-align: left; }
.functional-assignment-people small { display: block; color: var(--color-text-muted); font-size: 12px; font-weight: 400; }

.secondary-free-lane { position: absolute; left: 0; right: 0; height: 22px; }

.secondary-free-lane .pairing-partner-pill { cursor: default; }
.secondary-free-lane button.pairing-partner-pill { cursor: pointer; }
.free-time-dialog h3 { margin: 20px 0 8px; font-size: 14px; }
.free-time-options { display: grid; gap: 6px; }
.free-time-options button { text-align: left; }
.free-time-options small { display: block; color: var(--color-text-muted); font-weight: 400; margin-top: 3px; }
.calendar-popup-layer { position: fixed; inset: 0; z-index: 2200; pointer-events: none; }
.calendar-floating-dialog { position: fixed; z-index: 2200; pointer-events: auto; box-sizing: border-box; margin: 0; width: min(480px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow-y: auto; }
[data-calendar-drag-handle] { cursor: grab; touch-action: none; user-select: none; }
[data-calendar-drag-handle]:active { cursor: grabbing; }
[data-calendar-drag-handle] button { cursor: pointer; }
.working-day-menu .calendar-menu-close { position: absolute; right: 4px; top: 2px; width: 24px; padding: 2px; justify-content: center; }
.working-day-menu header { padding-right: 28px; }
.functional-assignment-popover { width: min(390px, calc(100vw - 16px)); }
.functional-assignment-popover form { margin: 12px 0 0; gap: 12px; }
.functional-assignment-popover form > p { margin: 0; }
.functional-assignment-popover form > footer { margin-top: 2px; flex-wrap: wrap; }
.functional-search-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.functional-search-heading button { font: inherit; font-size: 11px; min-height: 28px; padding: 0; text-align: right; }
.functional-suggestions > p { margin: 0 0 8px; }
.functional-best-fit { float: right; font-size: 10px; font-weight: 600; color: var(--color-brand); }

.calendar-scrollable-popup { box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain; }

.manager-timeline-bar.is-office_induced, .manager-review-legend i.is-office_induced,
.fc-event.calendar-office-induced, .employee-compact-calendar .fc-event.calendar-office-induced,
.employee-grid-legend i.office_induced { background: var(--color-cancelled-bg); color: var(--color-text-muted); border: 1px solid var(--color-border-strong); }
.manager-timeline-bar[role="button"].is-working, .manager-timeline-bar[role="button"].is-office_induced,
.fc-event.calendar-office-induced { cursor: pointer; }
.office-induced-form .working-day-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.office-induced-form .working-day-fields input { width: 100%; min-width: 0; box-sizing: border-box; }
.calendar-office-induced .fc-event-main { color: var(--color-text-muted); }
.employee-planned-bar .office-induced, .employee-hours-key .office-induced { background: var(--color-cancelled-bg); box-shadow: inset 0 0 0 1px var(--color-border-strong); }
.pairing-partner-lane > .pairing-partner-pill.is-lunch { top: 1px; height: 20px; min-height: 20px; }
.pairing-joined-lunch { position: absolute; top: 1px; bottom: 1px; background: repeating-linear-gradient(135deg, var(--color-surface) 0 3px, var(--color-working-lunch-grey) 3px 6px); pointer-events: none; }
.temp-cover-lane > .pairing-partner-pill.is-lunch { transform: translateY(1px); height: 20px; min-height: 20px; }

.manager-timeline-person .calendar-person-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.manager-timeline-person .schedule-send-icon { min-height: 26px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; padding: 3px; border: 0; background: transparent; color: var(--color-text-muted); cursor: default; }
.schedule-send-icon.is-pending { color: var(--color-absence-cover-none); cursor: pointer; }
.schedule-send-icon:disabled { background: transparent; color: var(--color-text-muted); opacity: .5; }
.schedule-email-preview { white-space: normal; overflow-wrap: anywhere; padding: 16px; background: var(--color-surface-alt); border: 1px solid var(--color-divider); border-radius: 8px; line-height: 1.5; font-size: 13px; }

.schedule-delivery-dialog { width: min(1100px, calc(100vw - 32px)); }
.schedule-email-preview { overflow-x: auto; padding: 0; }
.employee-schedule-update-notice { display: flex; align-items: center; gap: 16px; margin: 16px 0; padding: 18px 20px; background: var(--color-profile-alert); border: 2px solid var(--color-destructive); border-radius: 12px; color: var(--color-destructive); }
.employee-schedule-update-notice svg { flex: 0 0 auto; }
.employee-schedule-update-notice div { flex: 1; }
.employee-schedule-update-notice p { margin: 4px 0 0; }
.employee-schedule-update-notice button { flex: 0 0 auto; background: var(--color-destructive); color: white; border-color: var(--color-destructive); }
@media (max-width: 640px) { .employee-schedule-update-notice { flex-wrap: wrap; } .employee-schedule-update-notice button { margin-left: 46px; } }

.payroll-schedule-layout { display: grid; grid-template-columns: minmax(0, 1fr) 520px; gap: 24px; align-items: start; }
.payroll-schedule-main { display: grid; gap: 18px; min-width: 0; }
.payroll-month-closed-dot { position: absolute; bottom: 4px; left: calc(50% - 2px); width: 5px; height: 5px; border-radius: 50%; background: var(--color-payroll-closed-dot); }
.payroll-months button:has(.payroll-month-closed-dot) .payroll-month-dot { left: calc(50% + 6px); }
button.payroll-day { position: relative; height: auto; min-height: 76px; margin: 0; border-radius: 0; border-left: 0; border-top: 0; background: var(--color-surface); color: var(--color-text); flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 5px; padding: 10px 12px; font-weight: 400; text-align: left; }
button.payroll-day.is-highlighted { background: var(--color-brand-tint); }
button.payroll-day.is-ended { color: var(--color-text-subtle); }
button.payroll-day:hover { box-shadow: inset 0 0 0 2px var(--color-brand-border); }
button.payroll-day > span { display: flex; align-items: center; gap: 5px; }
button.payroll-day small { display: block; font-size: 11px; line-height: 1.45; }
button.payroll-day small > span { display: block; opacity: .8; }
button.payroll-day.is-closed-selected { box-shadow: inset 0 0 0 2px var(--color-brand); color: var(--color-brand-hover); }
button.payroll-day.is-public_holiday, .payroll-closed-tags .is-public_holiday, .payroll-closed-legend .is-public_holiday { background: var(--color-payroll-public-bg); color: var(--color-payroll-public-text); }
button.payroll-day.is-office_closed, .payroll-closed-legend .is-office_closed { background: repeating-linear-gradient(135deg, var(--color-payroll-office-base) 0 5px, var(--color-payroll-office-stripe) 5px 9px); color: var(--color-payroll-office-text); }
.payroll-closed-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 14px 16px; font-size: 12px; color: var(--color-text-muted); border-top: 1px solid var(--color-divider); }
.payroll-closed-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.payroll-closed-legend i { width: 14px; height: 14px; border-radius: 3px; }
.payroll-closed-legend .closed-month-legend-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--color-payroll-closed-dot); }
.payroll-closed-tags > span { display: inline-block; padding: 3px 7px; border-radius: 5px; margin: 2px 5px 2px 0; font-size: 11px; white-space: nowrap; }
.payroll-closed-tags .is-office_closed { background: var(--color-payroll-office-tag); color: var(--color-payroll-office-text); }
.payroll-periods-card .numeric-cell { text-align: right; }
.payroll-closed-days-panel { padding: 20px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); }
.payroll-closed-days-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.payroll-closed-days-panel h2 { font-size: 19px; margin: 0; }
.payroll-closed-days-panel > header button { font-size: 12px; min-height: 34px; padding: 6px 10px; }
.payroll-closed-days-panel > p { font-size: 13px; line-height: 1.6; color: var(--color-text-muted); margin: 14px 0 22px; }
.payroll-closed-days-panel h3 { margin: 24px 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted); }
.payroll-closed-days-panel ul { list-style: none; margin: 0; padding: 0; }
.closed-day-panel-row { display: grid; grid-template-columns: 88px minmax(0, 1fr) 70px; align-items: center; gap: 9px; padding: 14px 0; border-bottom: 1px solid var(--color-divider); font-size: 12px; }
.closed-day-panel-row time { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.closed-day-name { overflow-wrap: anywhere; line-height: 1.45; }
.closed-day-name small { display: block; margin-top: 4px; color: var(--color-text-muted); font-size: 11px; }
.closed-day-switch { display: inline-flex; justify-content: center; align-items: center; gap: 5px; min-height: 30px; padding: 4px 5px; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-surface-alt); color: var(--color-text-muted); font-size: 11px; font-weight: 500; white-space: nowrap; }
.closed-day-switch i { width: 16px; height: 10px; border-radius: 9px; background: var(--color-border-strong); position: relative; flex-shrink: 0; }
.closed-day-switch i::after { content: ""; position: absolute; width: 6px; height: 6px; border-radius: 50%; top: 2px; left: 2px; background: var(--color-surface); }
.closed-day-switch[aria-checked=true] { color: var(--color-brand-hover); background: var(--color-brand-tint); }
.closed-day-switch[aria-checked=true] i { background: var(--color-brand); }
.closed-day-switch[aria-checked=true] i::after { left: 8px; }
.payroll-closed-day-form { width: min(420px, calc(100vw - 16px)); }
.payroll-closed-day-form form { display: grid; gap: 18px; }
.payroll-closed-day-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.payroll-closed-day-form legend { font-size: 13px; margin-bottom: 8px; }
.payroll-closed-day-form label { display: grid; gap: 7px; font-size: 13px; font-weight: 600; }
.payroll-closed-day-form label > input { width: 100%; }
.payroll-closed-day-form footer { display: flex; justify-content: flex-end; gap: 10px; padding-top: 12px; border-top: 1px solid var(--color-divider); }
.closed-day-date-field { position: relative; display: flex; align-items: center; }
.closed-day-date-field input[type=text] { width: 100%; padding-right: 40px; }
.closed-day-date-field button { position: absolute; right: 10px; display: flex; min-height: 28px; padding: 2px; }
.closed-day-date-field input[type=date] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.closed-day-range { font-size: 12px; line-height: 1.6; color: var(--color-text-muted); margin: -6px 0 0; }
@media (max-width: 1200px) { .payroll-schedule-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .payroll-closed-days-panel { padding: 16px; } .closed-day-panel-row { grid-template-columns: 78px minmax(0, 1fr) 62px; gap: 5px; } button.payroll-day { min-height: 90px; padding-inline: 6px; } .payroll-closed-days-panel > header { flex-wrap: wrap; } .payroll-periods-card { overflow-x: auto; } }

.closed-day-title { display: flex; align-items: center; gap: 5px; }
.closed-day-title > :first-child { min-width: 0; }
.closed-day-edit { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 28px; min-width: 24px; padding: 3px; }
.payroll-closed-day-form .closed-day-delete { margin-right: auto; color: var(--color-declined-text); }

.closed-day-delete-confirmation { display: grid; gap: 16px; }
.closed-day-delete-confirmation p { margin: 0; line-height: 1.6; }

.team-employee-timeline .office-induced, .holiday-day.public, .holiday-day.office_closed { background: var(--color-cancelled-bg); color: var(--color-text-muted); border: 1px solid var(--color-border-strong); }

.requests-and-changes { padding: 12px 0 32px; }
.requests-changes-header { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.requests-changes-header > div:first-child { flex: 1 1 460px; min-width: 0; }
.requests-changes-header h1 { margin: 0 0 8px; font-size: 25px; letter-spacing: -.5px; }
.requests-changes-header p { margin: 0; color: var(--color-text-muted); font-size: 14px; }
.requests-changes-filters { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; max-width: 100%; }
.requests-changes-filters input, .requests-changes-filters select { margin: 0; min-height: 40px; height: 40px; width: auto; font-size: 13px; }
.requests-changes-filters input { width: 260px; min-width: 120px; }
.requests-changes-filters select { max-width: 180px; }
.requests-changes-filters .history-range-trigger { height: 40px; min-height: 40px; font-size: 13px; }
.requests-changes-card { border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); overflow: hidden; }
.requests-changes-scroll { overflow-x: auto; }
.requests-changes-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.requests-changes-table thead th { padding: 15px 18px; background: var(--color-surface-alt); border-bottom: 1px solid var(--color-border); text-transform: uppercase; letter-spacing: .8px; color: var(--color-text-muted); font-size: 10px; font-weight: 600; }
.requests-changes-table td { padding: 18px; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.requests-history-day th { padding: 11px 18px; background: var(--color-page); text-transform: uppercase; letter-spacing: .8px; color: var(--color-text-muted); font-size: 10px; font-weight: 650; border-bottom: 1px solid var(--color-border); }
.requests-change-time { width: 76px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.requests-change-type { display: inline-flex; width: 68px; justify-content: center; border-radius: 5px; padding: 4px 0; font-size: 11px; font-weight: 650; }
.requests-change-type.is-holiday { color: var(--color-brand); background: var(--color-brand-soft); }
.requests-change-type.is-absence { color: var(--color-payroll-public-text); background: var(--color-payroll-public-bg); }
.requests-change-type.is-hours, .requests-change-type.is-contract { color: var(--color-working-edge); background: var(--color-team-blue-bg); }
.requests-change-type.is-lunch { color: var(--color-text-muted); background: var(--color-payroll-office-tag); }
.requests-change-type.is-pairing { color: var(--color-training); background: var(--color-training-bg); }
.requests-change-type.is-cover { color: var(--color-team-amber-text); background: var(--color-team-amber-bg); }
.requests-change-description { min-width: 330px; line-height: 1.65; }
.requests-change-description strong { font-weight: 650; }
.requests-change-description s { color: var(--color-text-muted); margin: 0 3px; }
.requests-change-extra { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--color-text-muted); font-size: 12px; line-height: 1.55; margin-top: 4px; }
.requests-change-extra:empty { display: none; }
.requests-change-extra a { color: var(--color-brand); font-weight: 600; }
.requests-change-status { display: inline-flex; vertical-align: middle; padding: 1px 7px; border-radius: 10px; font-size: 10px; margin-left: 9px; line-height: 1.7; background: var(--color-payroll-office-tag); color: var(--color-text-muted); }
.requests-change-status.is-waiting { background: var(--color-team-amber-bg); color: var(--color-team-amber-text); }
.requests-change-status.is-approved { background: var(--color-brand-soft); color: var(--color-brand); }
.requests-change-status.is-declined { background: var(--color-profile-alert); color: var(--color-destructive); }
.requests-change-effect { text-align: right; width: 150px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.requests-change-effect strong { font-size: 14px; font-weight: 650; }
.requests-change-effect small { display: block; color: var(--color-text-muted); font-size: 10px; margin-top: 5px; }
.requests-change-effect .is-up { color: var(--color-brand); }
.requests-change-effect .is-down { color: var(--color-destructive); }
.requests-change-by { width: 110px; color: var(--color-text-muted); font-size: 12px; }
button.history-inline-button, button.history-edits-toggle { background: transparent; border: 0; border-radius: 0; padding: 0; min-height: 0; font-size: 12px; font-weight: 500; color: var(--color-brand); cursor: pointer; }
button.history-inline-button { margin-left: 8px; }
button.history-edits-toggle { display: block; color: var(--color-text-muted); margin-top: 8px; }
.requests-change-row.is-expanded, .requests-change-expanded { background: var(--color-brand-tint); box-shadow: inset 3px 0 var(--color-brand); }
.requests-change-expanded ol { list-style: none; padding: 0; margin: 0 0 12px; }
.requests-change-expanded ol li { display: grid; grid-template-columns: 24px 48px minmax(220px, 1fr) 150px 100px 100px; gap: 12px; padding: 10px 12px; align-items: start; font-size: 12px; border-bottom: 1px solid var(--color-border); }
.requests-change-expanded ol li.is-final { background: var(--color-brand-soft); border-radius: 6px; }
.history-step-number { display: inline-flex; width: 21px; height: 21px; align-items: center; justify-content: center; border: 1px solid var(--color-border-strong); border-radius: 50%; font-size: 10px; }
.history-step-hours { color: var(--color-text-muted); }
.requests-change-expanded p { font-size: 12px; color: var(--color-text-muted); margin: 10px 0; }
.history-covered-days { list-style: none; padding: 0; margin: 0; }
.history-covered-days li { display: flex; gap: 18px; flex-wrap: wrap; padding: 8px 0; font-size: 12px; }
.requests-changes-card footer { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: var(--color-surface-alt); color: var(--color-text-muted); font-size: 12px; }
.requests-changes-card footer button { min-height: 32px; padding: 5px 13px; background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border-strong); font-size: 12px; }
.history-empty { text-align: center; padding: 36px !important; color: var(--color-text-muted); }
@media (max-width: 700px) {
  .requests-changes-header > div:first-child { flex-basis: 100%; }
  .requests-changes-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: 100%; }
  .requests-changes-filters input { grid-column: 1 / -1; width: 100%; }
  .requests-changes-filters select { width: 100%; max-width: none; }
  .requests-changes-filters .history-range-control { grid-column: 1 / -1; justify-self: end; }
  .requests-changes-table { min-width: 900px; }
}

/* Roles share one table; every control edits the saved role in place. */
.roles-table-scroll { overflow-x: auto; }
.roles-table { width: 100%; border-collapse: collapse; min-width: 1120px; }
.roles-table th, .roles-table td { text-align: left; padding: 18px 16px; vertical-align: top; }
.roles-table thead th { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 700; white-space: nowrap; }
.roles-table small, .roles-add-minimums small { display: block; font-weight: 400; color: var(--color-text-muted); font-size: 11px; margin-top: 5px; }
.roles-table .roles-pairing-heading { color: var(--color-brand); }
.roles-table tbody th[scope=row] { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; min-width: 185px; }
.roles-table .roles-group th { padding: 11px 16px; background: var(--color-surface-alt); color: var(--color-text-muted); font-size: 12px; text-transform: none; letter-spacing: 0; }
.roles-rename { padding: 0; color: var(--color-text); font-weight: 700; text-align: left; }
.roles-rename span { margin-left: 7px; color: var(--color-brand); }
.roles-people, .roles-people button, .roles-enable { white-space: nowrap; }
.roles-table .coverage-stepper button { width: 28px; height: 32px; min-height: 32px; }
.roles-table .coverage-stepper output { min-width: 30px; }
.roles-table .roles-pairing { min-width: 180px; position: relative; }
.roles-table .roles-plain { min-width: 220px; width: 29%; font-size: 13px; line-height: 1.6; }
.roles-table .roles-disabled { color: var(--color-text-muted); background: var(--color-surface-alt); }
.roles-rule-chips { display: grid; gap: 6px; justify-items: start; }
.roles-rule-chips > span, .roles-person-chips > span { display: inline-flex; gap: 8px; align-items: center; background: var(--color-brand-soft); color: var(--color-brand); border-radius: 6px; padding: 3px 8px; font-size: 12px; }
.roles-rule-chips button, .roles-person-chips button { padding: 0 2px; min-height: 24px; }
.roles-pairing p { font-size: 12px; margin: 8px 0; }
.roles-pairing-popup { width: 320px; }
.roles-pairing-menu { display: grid; gap: 8px; margin-top: 14px; }
.roles-pairing-menu > button { text-align: left; }
.roles-pairing-menu small { line-height: 1.5; white-space: normal; }
.roles-opening-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 11px; font-weight: 400; color: var(--color-text-muted); margin-top: 9px; max-width: 250px; line-height: 1.6; }
.roles-opening-summary button { padding: 0; font-size: 11px; }
.roles-opening-days { display: inline-flex; gap: 3px; }
.roles-opening-days > span { width: 15px; text-align: center; color: var(--color-text-muted); border-radius: 3px; }
.roles-opening-days .is-open { color: var(--color-brand); background: var(--color-brand-soft); font-weight: 700; }
.roles-footer { font-size: 12px; margin: 0; }
.roles-empty { padding: 20px; }
.roles-dialog { width: min(720px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 24px; }
.roles-dialog > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.roles-dialog h2 { margin: 0; }
.roles-dialog fieldset, .functional-assignment-dialog fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.roles-dialog fieldset { display: grid; gap: 20px; }
.roles-dialog legend { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.roles-kind-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.roles-kind-options button { display: grid; text-align: left; gap: 9px; white-space: normal; line-height: 1.5; padding: 16px; }
.roles-kind-options button[aria-pressed=true], .roles-day-chips button[aria-pressed=true] { border-color: var(--color-brand); background: var(--color-brand-soft); color: var(--color-brand); }
.roles-kind-options span { font-weight: 400; font-size: 12px; }
.roles-kind-options small { color: var(--color-text-muted); font-weight: 400; }
.roles-dialog h3 { font-size: 14px; margin: 0 0 12px; }
.roles-dialog h3 small { font-weight: 400; font-size: 11px; }
.roles-hours-fields { display: grid; gap: 16px; }
.roles-hours-fields .employee-segments button { font-size: 12px; padding: 10px; }
.roles-day-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.roles-day-chips button { padding: 7px 10px; font-size: 12px; background: var(--color-surface); color: var(--color-text-muted); border: 1px solid var(--color-border); }
.roles-hours-times { display: flex; align-items: end; gap: 10px; }
.roles-hours-times > span { align-self: center; padding-top: 16px; font-size: 12px; color: var(--color-text-muted); }
.roles-hours-times label { font-size: 11px; }
.roles-hours-times input { width: 130px; }
.roles-hours-days { display: grid; gap: 10px; }
.roles-hours-days > div { display: flex; align-items: center; gap: 20px; }
.roles-hours-days > div > label { width: 65px; display: flex; align-items: center; gap: 7px; }
.roles-hours-days input[type=checkbox] { width: 16px; height: 16px; margin: 0; }
.roles-add-minimums { display: flex; gap: 32px; }
.roles-add-minimums .coverage-stepper { margin-top: 9px; }
.roles-person-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.roles-person-search { display: grid; gap: 6px; margin-top: 10px; max-height: 200px; overflow-y: auto; }
.roles-person-search button { text-align: left; }
.roles-live-summary { background: var(--color-surface-alt); border-radius: 8px; padding: 15px; font-size: 13px; line-height: 1.6; margin: 0; }
@media (max-width: 600px) { .roles-page-heading { flex-wrap: wrap; } .roles-kind-options { grid-template-columns: 1fr; } .roles-dialog { padding: 18px; } }

.page-container:has(> .coverage-settings-page) { max-width: 1600px; }
.coverage-settings-page { padding: 0; min-width: 0; }

.roles-dialog fieldset > label { display: grid; gap: 8px; }
.roles-dialog fieldset > label input { width: 100%; box-sizing: border-box; }
.roles-table thead small { white-space: normal; }
