/* Shared task surfaces. Brand colours and the incumbent component vocabulary
   live in app.css; this layer owns navigation, editing and action feedback. */
:root {
  --space-group: 8px;
  --space-section: 24px;
  --motion-panel: 200ms;
  --focus-color: #9c382e;
  --vega-surface: #f4f3f0;
  --vega-panel-soft: #faf9f7;
  --vega-row-hover: #faf8f5;
  --vega-text: #201e1c;
  --vega-muted: #5b5753;
  --vega-border-light: #d9d6d1;
  --vega-hairline: #e9e6e1;
  --radius-card: 12px;
  --panel-inline-padding: 18px;
  --header-offset: var(--topbar-height);
}
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--header-offset) + 12px); scroll-padding-bottom: calc(var(--footer-offset, 0px) + 12px); }
body { font-variant-numeric: lining-nums; }
input, textarea { caret-color: var(--vega-link); }
::selection { color: #171717; background: #ffd7c9; }
:focus-visible { outline: 2px solid var(--focus-color); outline-offset: 3px; }
.sidebar :focus-visible { outline-color: #ffaf94; }
.skip-link { position: fixed; left: 16px; top: 8px; z-index: 200; padding: 12px 16px; color: #fff; background: #1e1e1e; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.portal-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: stretch;
  gap: 24px;
  min-height: var(--topbar-height);
  padding-inline: 28px;
  background: var(--vega-card);
  border-bottom: 1px solid var(--vega-border-light);
}
.topbar { position: static; height: auto; padding: 0; border: 0; background: transparent; box-shadow: none; }
.topbar-title { order: -1; display: flex; flex-direction: column; justify-content: center; align-items: start; gap: 3px; min-width: 0; flex: 1; padding-block: 9px; }
.topbar-title h1 { display: block; max-width: none; overflow: visible; font-size: 22px; font-weight: 680; line-height: 1.22; letter-spacing: -.025em; white-space: normal; overflow-wrap: anywhere; }
.topbar-title p { margin: 0; }
.topbar-actions { gap: 14px; }
.user-copy strong, .user-copy small { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.mobile-brand { display: none; }
.topbar a[aria-current] { background: var(--accent-soft); }
.account-menu-current .user-avatar { box-shadow: 0 0 0 2px var(--vega-card), 0 0 0 4px var(--focus-color); }
.message-stack { top: calc(var(--header-offset) + 12px); }
.num, .statement-total, .ppe-due, .pay-amount, time { font-variant-numeric: tabular-nums; }
.form-field small, .panel-note, .cell-note { font-size: 12px; line-height: 1.5; }
.panel, .panel:hover, .site-card, .kpi-card, .alert-card { box-shadow: none; }
.panel:hover { border-color: var(--vega-border-light); }
.panel-header { min-height: 60px; padding: 14px var(--panel-inline-padding); background: var(--vega-panel-soft); }
.panel-header h2 { margin: 0; font-weight: 650; line-height: 1.3; letter-spacing: -.015em; overflow-wrap: anywhere; }
.panel-header p { margin: 5px 0 0; max-width: 74ch; }
.data-table thead th { font-size: 11.5px; font-weight: 650; }
.empty-state { line-height: 1.6; }
.form-control, .form-field input:not([type="checkbox"]):not([type="file"]), .form-field textarea, .form-field select, .login-form input {
  border-color: #938f87;
}
.form-control[aria-invalid="true"], .form-field [aria-invalid="true"], .login-form [aria-invalid="true"] { border-color: var(--danger); }
.form-control:focus-visible, .form-field :is(input, select, textarea):focus-visible, .login-form input:focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
}
.content-area input[type="file"] {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 4px;
  border: 1px solid #938f87;
  border-radius: var(--radius-sm);
  background: var(--vega-panel-soft);
  color: var(--vega-muted);
  font: inherit;
  font-size: .875rem;
  cursor: pointer;
}
.content-area input[type="file"]::file-selector-button {
  min-height: 34px;
  margin-inline-end: 10px;
  padding: 5px 10px;
  border: 1px solid var(--vega-border-light);
  border-radius: var(--radius-sm);
  background: var(--vega-card);
  color: var(--vega-text);
  font: inherit;
  font-weight: 650;
  cursor: inherit;
}
.content-area input[type="file"]:enabled:hover::file-selector-button { background: var(--vega-surface); border-color: #938f87; }
.content-area input[type="file"][aria-invalid="true"] { border-color: var(--danger); }
.content-area input[type="file"]:disabled { opacity: .6; cursor: not-allowed; }
.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 370px), 1fr));
  align-items: start;
  gap: 20px;
}
.upload-grid > *, .upload-form > * { min-width: 0; }
.upload-form { display: grid; gap: 14px; }
.upload-form > .button { justify-self: start; }
.panel-inset, .upload-inset { padding: 18px var(--panel-inline-padding); }
.panel-footer, .upload-footer { border-top: 1px solid var(--vega-border-light); background: var(--vega-panel-soft); }
.panel-narrow { max-width: 740px; }
.panel-inset.stacked-form { margin-top: 0; }
.empty-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding-block: 22px;
}
.empty-panel > div { flex: 1 1 300px; min-width: 0; }
.empty-panel h2 { margin: 0; font-size: 20px; line-height: 1.3; }
.empty-panel p { margin: 6px 0 0; color: var(--vega-muted); }
.pay-layout:not(:has(> .pay-aside)) { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 560px) {
  .upload-form > .button { justify-self: stretch; }
  .empty-panel > .button { width: 100%; }
  .rating-choice span { min-width: 44px; min-height: 44px; }
}
.button.secondary:hover { border-color: #82786e; }
.dashboard-grid { align-items: start; }
.side-stack { min-width: 0; }
.timeline-panel { height: auto; }
.form-section-header p { max-width: 75ch; }
.form-section { scroll-margin-top: 12px; }
.record-context { margin: 0 0 16px; font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.form-purpose { margin: -4px 0 16px; }
.button { transition: background-color 140ms ease-out, border-color 140ms ease-out, color 140ms ease-out; }
.button:active:not(:disabled) { filter: brightness(.96); }
.button:disabled, .button[aria-disabled="true"] { cursor: not-allowed; opacity: .6; }
.status-published { color: #225d3e; background: #e2f1e8; border-color: #aed2bd; }
/* Move the original header inside the table's scroll wrapper, preserving
   column widths, horizontal scrolling, sorting links and table semantics. */
[data-follow-table-header] thead {
  position: relative;
  z-index: 20;
  transform: translateY(var(--table-head-offset, 0px));
}
[data-follow-table-header] thead.is-following {
  box-shadow: 0 2px 0 var(--vega-border-light);
}
.status-action-heading { font-size: 14px; margin: 20px 0 10px; }
.hiring-statuses { border-top: 0; padding-top: 0; }
.candidate-outcome { flex-basis: 100%; }
.candidate-outcome-content { display: grid; gap: 12px; padding: 16px 0 0; max-width: 680px; }
.candidate-outcome-content .action-group { justify-content: start; flex-wrap: wrap; }
.hiring-statuses .button.active { border-color: #a55b40; background: #fff0e9; color: #713621; }

/* Keep the section links readable at every window height. */
.sidebar-nav {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: #646461 transparent;
  gap: 2px;
  padding-block: 9px;
}
.sidebar-nav .nav-section {
  flex: 0 0 auto;
  padding: 9px 14px 4px;
  color: #c4c1bc;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}
.sidebar-nav .nav-item {
  flex-shrink: 0;
  min-height: 42px;
  padding-block: 7px;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 500;
}
.sidebar-nav .nav-item svg { flex: 0 0 20px; width: 20px; height: 20px; }
.sidebar-nav .nav-item:hover { transform: none; }
.sidebar-nav .nav-item:not([aria-current]):hover svg { transform: translateX(2px); }
.sidebar-nav .nav-item[aria-current] {
  border-color: rgba(255, 148, 116, .16);
  background: rgba(255, 148, 116, .11);
  font-weight: 600;
  animation: sidebar-selection-in 220ms var(--motion-ease);
}
.sidebar-nav .nav-item[aria-current]:hover { color: var(--vega-accent); }
.sidebar-nav .nav-item[aria-current]::before { width: 3px; height: 25px; }
@keyframes sidebar-selection-in {
  from { border-color: transparent; background-color: rgba(255, 148, 116, .03); }
}
.sidebar-close { display: none; position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 6px; background: #f5f5f3; color: #1e1e1e; cursor: pointer; }
.sidebar-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sidebar-overlay { cursor: pointer; }

@media (min-width: 901px) and (min-height: 900px) {
  .sidebar-nav .nav-item { min-height: 46px; }
  .sidebar-nav .nav-section { padding-top: 12px; }
}

/* An ordinary disclosure keeps the secondary actions keyboard accessible. */
.action-menu { position: relative; }
.action-menu > summary { list-style: none; cursor: pointer; white-space: nowrap; }
.action-menu > summary::-webkit-details-marker { display: none; }
.action-menu > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg); margin: -3px 0 0 10px; }
.action-menu-content { position: absolute; right: 0; top: calc(100% + 6px); z-index: 35; min-width: 250px; max-width: calc(100vw - 32px); padding: 6px; background: #fff; border: 1px solid var(--vega-border); border-radius: 8px; box-shadow: 0 8px 24px #0000001a; }
.action-menu-content > a, .action-menu-content button { display: block; width: 100%; text-align: left; padding: 12px; border: 0; background: none; color: var(--vega-text); font: inherit; text-decoration: none; cursor: pointer; border-radius: 4px; }
.action-menu-content > a:hover, .action-menu-content button:hover { background: var(--vega-surface); }
.action-menu-content .action-menu-danger { margin-top: 6px; border-top: 1px solid var(--vega-border-light); border-radius: 0; color: var(--danger); }
.action-menu-content form { margin: 0; }
.account-menu > summary::after { flex: none; margin-inline-start: 2px; color: var(--vega-muted); }
.account-menu > summary:hover .user-copy strong { text-decoration: underline; }
.account-menu-content { min-width: 228px; max-height: calc(100dvh - var(--header-offset) - 16px); overflow-y: auto; }
.account-menu-content :is(a, button) { min-height: 38px; padding-block: 8px; }

/* Task queue: compact rows give the problem and a concrete next destination. */
.my-day { margin-bottom: 24px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.section-heading h2 { font-size: 22px; margin: 0 0 4px; }
.section-heading p { margin: 0; color: var(--vega-muted); }
.day-list { border-block: 1px solid var(--vega-border); }
.day-item { display: grid; grid-template-columns: 96px minmax(180px, 1fr) minmax(100px, .35fr) auto; gap: 16px; align-items: center; padding: 15px 4px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--vega-border-light); }
.day-item:last-child { border-bottom: 0; }
.day-item:hover { background: #fff8f4; }
.day-item strong { display: block; margin-bottom: 3px; }
.day-item small { display: block; color: var(--vega-muted); line-height: 1.5; }
.day-section { font-size: 12px; font-weight: 700; }
.day-item.tone-critical .day-section { color: #a8322a; }
.day-item.tone-warning .day-section { color: #805000; }
.day-owner { color: var(--vega-muted); font-size: 12px; }
.day-action { color: var(--vega-link); font-size: 12px; font-weight: 600; }
.my-day-more { border-top: 1px solid var(--vega-border-light); }
.my-day-more > summary { padding: 14px 4px; color: var(--vega-link); cursor: pointer; }
.quiet-state { padding-block: 16px; color: var(--vega-muted); }
.mobile-arrivals { display: none; }
.scroll-hint { margin: 0; padding: 10px var(--panel-inline-padding); font-size: 12px; color: var(--vega-muted); }
.responsive-disclosure { margin-bottom: 20px; }
.responsive-disclosure > summary { padding: 12px 0; font-weight: 600; cursor: pointer; }
.responsive-disclosure > summary span { margin-left: 8px; font-weight: 400; color: var(--vega-muted); }
.responsive-disclosure[open] > summary { margin-bottom: 8px; }
.hiring-navigation { margin-bottom: 20px; }

/* Editing: navigation, persistent actions, field errors and stable feedback. */
.form-navigation { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--vega-border-light); }
.form-navigation a { padding: 7px 10px; color: var(--vega-link); background: var(--accent-tint); border: 1px solid transparent; border-radius: 6px; font-size: 13px; text-underline-offset: 3px; }
.form-navigation a:hover { border-color: var(--danger-border); }
.error-summary { margin-bottom: 20px; }
.error-summary h2 { font-size: 17px; margin: 0 0 10px; }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary li + li { margin-top: 7px; }
.error-summary a { color: #922f28; text-underline-offset: 3px; }
.deadline-preview { margin: 20px 0 4px; font-weight: 600; }
.assignment-totals { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.assignment-totals span { font-size: 13px; }
.roster-panel { grid-column: 1 / -1; padding-block: 12px; border-block: 1px solid var(--vega-border-light); }
.roster-toggle { display: flex; gap: 10px; align-items: center; font-weight: 600; cursor: pointer; min-height: 32px; }
.roster-toggle input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--vega-accent); }
.roster-status { margin: 8px 0 10px; color: var(--vega-muted); line-height: 1.55; }
.roster-status.is-warning { color: var(--warning); }
.roster-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.roster-details { margin-top: 12px; font-size: 13px; }
.roster-details summary { cursor: pointer; }
.roster-details li + li { margin-top: 7px; }
.roster-details ul { padding-inline-start: 20px; }
.operations-section .operations-summary { margin: 12px 20px; line-height: 1.6; }
.operations-history { padding: 18px 20px; }
.operations-history > summary, .preparation-checks > summary { cursor: pointer; font-weight: 600; }
.operations-event { padding-block: 16px; border-bottom: 1px solid var(--vega-border-light); }
.operations-event:last-child { border-bottom: 0; }
.operations-event ul, .preparation-checks ul { padding-inline-start: 20px; line-height: 1.6; }
.application-work { display: grid; gap: 8px; padding-block: 14px; }
.preparation-checks { margin-block: 6px; }
.operations-section td { overflow-wrap: anywhere; }
.assignment-compact-header { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--vega-border-light); }
.assignment-compact-header strong { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.assignment-card.is-collapsed .assignment-card-grid, .assignment-card.is-collapsed .assignment-card-footer { display: none; }
.assignment-card.is-collapsed .assignment-compact-header { padding-bottom: 0; margin-bottom: 0; border: 0; }
.assignment-card.is-deleted .assignment-card-grid { opacity: .45; }
.deletion-note { display: none; }
.is-deleted .deletion-note { display: block; flex-basis: 100%; }
.assignment-card-footer { flex-wrap: wrap; }
.picker-wrap { position: relative; }
.picker-results { position: absolute; top: calc(100% + 4px); inset-inline: 0; max-height: 280px; overflow-y: auto; z-index: 30; background: #fff; border: 1px solid var(--vega-border); border-radius: 6px; box-shadow: 0 5px 16px #00000014; }
.picker-option { padding: 11px 12px; cursor: pointer; }
.picker-option strong, .picker-option small { display: block; }
.picker-option small { margin-top: 3px; }
.picker-option[aria-selected="true"], .picker-option:hover { background: #fff0e9; }
.picker-option[aria-disabled="true"] { color: var(--vega-muted); cursor: default; }
.enhanced-employee-select { display: none; }
.assignment-card-grid { overflow: visible; }
.form-panel { overflow: visible; }
.form-actions .button { min-height: 40px; }
.form-actions .form-feedback { flex-basis: 100%; font-size: 12px; color: var(--vega-muted); }
.is-submitting { cursor: progress; }
.button.is-loading::before { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: busy-turn 800ms linear infinite; }
.assignment-card.is-added { animation: added-row 500ms ease-out; }
@keyframes busy-turn { to { transform: rotate(360deg); } }
@keyframes added-row { from { background: #fff0cf; } to { background: var(--vega-card); } }
dialog[open] { animation: dialog-enter 180ms cubic-bezier(.16,1,.3,1); }
dialog::backdrop { background: #0009; backdrop-filter: none; }
.confirm-dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 1px solid var(--vega-border); border-radius: 10px; color: var(--vega-text); }
.confirm-dialog h2 { margin: 0 0 12px; font-size: 21px; }
.confirm-dialog p { line-height: 1.6; }
.confirm-dialog .form-actions { justify-content: flex-end; }
@keyframes dialog-enter { from { opacity: .5; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.selection-count { font-weight: 600; }
.bulk-bar { gap: 16px; flex-wrap: wrap; }
.candidate-bulk-fields { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 420px; }
.candidate-bulk-fields > .form-control { flex: 1 1 145px; width: auto; min-width: 0; }
.employee-tenure-summary { margin: 0; padding: 10px 20px; background: var(--surface-muted, #f4f2ee); }
.rotation-row-jumps, .day-filter { margin: 0 0 12px; }
.assignment-card[id], [id^="movement-"], [id^="renewal-"], #employee-periods-title { scroll-margin-top: 100px; }
.assignment-card:target, tr[id^="renewal-"]:target { outline: 2px solid var(--vega-accent); outline-offset: -2px; }
.notification-group { border-top: 1px solid var(--vega-border, #dedbd5); }
.notification-group > summary { padding: 12px 16px; }
.cal-bar.state-now { color: var(--vega-on-accent); }
.cal-bar.is-fact { box-shadow: inset 0 0 0 1px currentColor; font-weight: 700; }
.cal-bar.is-undated { color: #32251e; background: #f2ebe4; outline: 1px dashed #8c5f4d; outline-offset: -1px; }
.cal-bar.is-undated.is-conflict { color: #fff; background: #8a3430; }
@media (max-width: 620px) {
  .rotation-review-table.data-table:not(.no-stack) tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rotation-review-table.data-table:not(.no-stack) td { width: auto; min-width: 0; }
  .rotation-review-table.data-table:not(.no-stack) td:nth-child(4) { grid-column: 2; grid-row: 2; }
  .rotation-review-table.data-table:not(.no-stack) .review-issue,
  .rotation-review-table.data-table:not(.no-stack) .review-action { grid-column: 1 / -1; }
  .rotation-review-table.data-table:not(.no-stack) .review-action[data-label]::before { display: none; }
  .rotation-review-table.data-table:not(.no-stack) .review-action .text-link { display: inline-flex; min-height: 36px; align-items: center; }
}

.upload-help { max-width: 65ch; margin: 16px 0; font-size: 13px; }
.upload-help summary { cursor: pointer; color: var(--vega-link); }
.accounting-upload-help {
  padding: 14px 16px;
  border: 1px solid var(--vega-border-light);
  border-radius: var(--radius-sm);
  background: var(--vega-panel-soft);
}
.accounting-upload-help .upload-help { margin: 0; }
.site-card { padding: 20px; min-height: 0; gap: 16px; }
.site-card h2 { font-size: 21px; }
.site-card :is(h2, dt, dd) { overflow-wrap: anywhere; }
.site-card-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-card-stats > div { background: transparent; padding: 0; }
.site-card-stats dd { font-variant-numeric: tabular-nums; }
.site-card-stats dd.muted { font-weight: 550; }
.site-card-link { margin-top: 0; }
.site-search { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.site-search .filter-check { font-size: 13px; }
.view-switch { display: flex; gap: 8px; margin-bottom: 20px; }
.view-switch .button[aria-pressed="true"] { color: #fff; background: var(--vega-dark); border-color: var(--vega-dark); }
.sites-list-view .site-card-grid { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--vega-border); }
.sites-list-view .site-card { display: grid; grid-template-columns: 160px minmax(80px, .5fr) minmax(220px, 1fr) auto; align-items: center; gap: 16px; padding: 16px 4px; border: 0; border-bottom: 1px solid var(--vega-border-light); border-radius: 0; background: transparent; }
.sites-list-view .site-card-stats { margin: 0; }
.sites-list-view .site-card h2 { margin: 0; font-size: 17px; }
.sites-list-view .site-card:hover { transform: none; box-shadow: none; }

@media (min-width: 681px) {
  .page-toolbar > .action-group { margin-inline-start: auto; }
  .page-toolbar:has(> .filter-bar) { flex-wrap: wrap; align-items: flex-start; }
  .page-toolbar > .filter-bar { flex: 1 1 520px; }
}
@media (max-width: 1100px) {
  .day-item { grid-template-columns: 80px minmax(150px, 1fr) auto; }
  .day-owner { display: none; }
}
@media (max-width: 900px) {
  .portal-header { display: contents; }
  .topbar {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: flex-start;
    min-height: var(--topbar-height);
    gap: 8px;
    padding: 7px 16px;
    background: var(--vega-card);
    border-bottom: 1px solid var(--vega-border-light);
  }
  .mobile-brand { display: inline-flex; align-items: center; min-height: 44px; }
  .mobile-brand img { display: block; width: 76px; height: auto; }
  .topbar-actions { margin-inline-start: auto; gap: 6px; }
  .topbar-title { padding: 18px 16px 0; }
  .topbar-title h1 { font-size: clamp(19px, 3.7vw, 22px); }
  .topbar-title p { display: none; }
  .sidebar-close { display: flex; align-items: center; justify-content: center; }
  .sidebar-open { overflow: hidden; }
  .sidebar { width: min(300px, calc(100vw - 48px)); }
  .brand-panel { padding-right: 62px; }
  .sidebar-nav { gap: 2px; padding-block: 6px; }
  .sidebar-nav .nav-section { padding-block: 12px 5px; }
  .sidebar-nav .nav-item { min-height: 44px; padding-block: 9px; }
  .account-menu-content :is(a, button) { min-height: 44px; }
  .sites-list-view .site-card { grid-template-columns: 1fr 1fr; }
  .sites-list-view .site-card-stats { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .rotation-filter-bar { flex: 0 1 auto; min-height: 0; }
  .page-toolbar, .page-actions { gap: 12px; }
  .page-toolbar .action-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .page-toolbar .action-group > .primary { grid-column: 1 / -1; order: -1; }
  .page-toolbar .action-group > form:has(.primary) { grid-column: 1 / -1; order: -1; }
  .topbar-actions { gap: 4px; flex-shrink: 0; }
  .mobile-menu, .bell, .user-avatar { width: 44px; min-width: 44px; height: 44px; }
  .account-menu > summary::after { display: none; }
  .topbar { padding-inline: 12px; gap: 8px; }
  .form-control, .form-field input:not([type="checkbox"]):not([type="file"]), .form-field select, .form-field textarea { font-size: 16px; min-height: 44px; }
  .button, .chip, .view-tab { min-height: 44px; }
  .form-field small, .cell-note { font-size: 13px; }
  .form-panel form[data-dirty-form] { padding-bottom: 0; }
  .sticky-form-actions, .rotation-sticky-actions {
    position: sticky;
    inset: auto auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    border-inline: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .sticky-form-actions > .button, .rotation-sticky-actions > .button { flex: 1 1 auto; width: auto; }
  .sticky-form-actions > .primary, .rotation-sticky-actions > .primary { flex: 1 1 140px; min-width: 0; white-space: normal; }
  .sticky-form-actions > button[name="another"] { font-size: 12px; order: 3; flex-basis: 100%; }
  .form-navigation { gap: 4px; margin-bottom: 16px; }
  .form-navigation a { padding: 10px 8px; }
  .section-heading { align-items: start; }
  .section-heading h2 { font-size: 21px; }
  .section-heading > .muted { display: none; }
  .section-heading p { font-size: 13px; }
  .day-item { grid-template-columns: 1fr auto; gap: 5px 12px; padding: 14px 0; }
  .day-section { grid-column: 1 / -1; }
  .day-action { max-width: 100px; text-align: right; }
  .day-item strong { font-size: 14px; }
  .day-item small { font-size: 13px; }
  .timeline-panel .timeline-wrap, .timeline-panel .tl-legend, .timeline-panel .scroll-hint { display: none; }
  .mobile-arrivals { display: block; }
  .mobile-arrivals a { display: grid; grid-template-columns: 1fr auto; padding: 14px 18px; gap: 4px 12px; border-bottom: 1px solid var(--vega-border-light); color: inherit; text-decoration: none; }
  .mobile-arrivals span { grid-column: 1 / -1; font-size: 13px; }
  .mobile-arrivals small { color: var(--vega-muted); grid-column: 2; grid-row: 1; }
  .responsive-disclosure > summary { padding: 12px 0; font-size: 14px; }
  .responsive-disclosure > summary span { display: block; margin: 5px 0 0 16px; font-size: 12px; }
  .view-tabs { padding-bottom: 6px; }
  .data-table:not(.no-stack) td { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
  .data-table:not(.no-stack) td a { overflow-wrap: anywhere; white-space: normal; }
  .message-stack { left: 16px; right: 16px; width: auto; }
  .hiring-filters > nav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
  .hiring-filters .chip { flex: 0 0 auto; }
  .site-search { width: 100%; }
  .site-search .form-control { flex: 1 1 160px; }
  .site-card, .sites-list-view .site-card {
    grid-template-columns: minmax(0, 1fr) fit-content(48%);
    align-items: baseline;
    gap: 12px 10px;
  }
  .site-card { padding: 14px 16px; }
  .sites-list-view .site-card { padding: 14px 0; }
  .site-card > header { min-width: 0; justify-content: flex-end; }
  .site-card > header > .status {
    min-width: 0;
    max-width: 100%;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .site-card h2 { font-size: 1.125rem; line-height: 1.25; }
  .site-card-stats {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    border-block-start: 1px solid var(--vega-border-light);
  }
  .site-card-stats > div {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: baseline;
    column-gap: 10px;
    padding-block: 7px;
    border-radius: 0;
  }
  .site-card-stats > div + div { border-block-start: 1px solid var(--vega-hairline); }
  .site-card-stats > div:last-child { padding-block-end: 0; }
  .site-card-stats :is(dt, dd) { font-size: .875rem; line-height: 1.35; }
  .site-card-stats dd { margin: 0; text-align: end; }
  .assignment-compact-header { flex-wrap: wrap; }
  .assignment-compact-header strong { flex-basis: 60%; }
  .hiring-statuses { gap: 8px; }
  .candidate-outcome-content .action-group { flex-direction: column; }
}
.site-roster-action { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 0 16px; }
.site-roster-form { max-width: 760px; }
.site-roster-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px 20px; }
.site-roster-form .form-actions { margin: 0; padding: 16px 20px; }
.site-roster-picker { margin: 0; min-inline-size: 0; border: 1px solid var(--vega-border-light); border-radius: var(--radius-card); padding: 8px 12px 12px; }
.site-roster-picker legend { font-weight: 600; padding-inline: 5px; }
.site-roster-picker .panel-note { margin: 4px 0 8px; }
.site-roster-options { max-height: min(46vh, 26rem); overflow: auto; }
.site-roster-options label { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 6px; border-bottom: 1px solid var(--vega-border-light); cursor: pointer; }
.site-roster-options input { flex: none; margin-top: 3px; accent-color: var(--vega-accent); }
.site-roster-empty-confirm { white-space: normal; }
.site-roster-empty-confirm input { flex: none; }
.site-roster-form [hidden] { display: none !important; }
.employee-roster-note { margin: 0 0 14px; color: var(--vega-muted); font-size: 13px; }
.employee-print .table-wrap { overflow-x: auto; }

.bulk-assignment[open] { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.bulk-assignment summary { cursor: pointer; font-weight: 600; }
.bulk-assignment .form-control { min-width: 128px; }
@media (max-width: 720px) {
  .view-tabs.payment-tabs, .view-tabs.ppe-tabs { flex-wrap: wrap; overflow: visible; }
  .bulk-assignment[open] > * { margin-bottom: 8px; }
}
.print-scroll-hint { display: none; }

.site-comparison .panel-header { flex-wrap: wrap; }
.site-comparison-notes { display: grid; gap: 6px; padding: 12px 18px; }
.site-comparison-notes .panel-note { margin: 0; }
.site-comparison-table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: left; }
.site-comparison-table th, .site-comparison-table td { padding: 11px 14px; border-top: 1px solid var(--vega-border-light); overflow-wrap: anywhere; }
.site-comparison-table thead th { background: var(--vega-surface); vertical-align: top; }
.site-comparison-table thead th:first-child { width: 17%; }
.site-comparison-table thead .site-milestone-heading { width: 10%; text-align: center; padding-inline: 5px; }
.site-comparison-table .site-milestone { text-align: center; padding-inline: 5px; font-size: 12px; font-variant-numeric: tabular-nums; }
.site-milestone time { white-space: nowrap; }
.site-milestone-label { display: none; }
.site-milestone-reached { font-weight: 700; }
.site-comparison-table tbody th { vertical-align: top; }
.site-comparison-table th small { display: block; margin-top: 3px; color: var(--vega-muted); font-weight: 400; }
.site-comparison-table td { border-left: 1px solid var(--vega-border-light); }
.site-comparison-table .status { white-space: normal; }
.site-comparison-person { font-weight: 600; color: inherit; }
a.site-comparison-person:hover { color: var(--vega-link); text-decoration: underline; }
.site-comparison-dash { color: var(--vega-muted); }
.site-comparison-current { scroll-margin-top: calc(var(--header-offset, 64px) + 12px); }
.site-arrival-entry { margin-top: 5px; font-size: 12px; }
.site-arrival-entry > summary { color: var(--vega-link); cursor: pointer; width: fit-content; }
.site-arrival-form { display: grid; gap: 6px; margin: 8px 0 2px; max-width: 230px; }
.site-arrival-form label { font-weight: 600; }
.site-arrival-form .form-control { width: 100%; min-width: 0; }
.site-arrival-form .button { justify-self: start; }
.site-confirmed-presence > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.site-confirmed-presence > summary::-webkit-details-marker { display: none; }
.site-confirmed-presence > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin: -4px 3px 0 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.site-confirmed-presence[open] > summary::after { margin-top: 4px; transform: rotate(225deg); }
.site-confirmed-presence > summary:hover { background: var(--vega-row-hover); }
.site-confirmed-presence > summary:focus-visible { outline-offset: -3px; }
.site-confirmed-presence > .panel-note { margin: 0; padding: 10px 16px; border-top: 1px solid var(--vega-border-light); }
.site-confirmed-list { padding: 0 16px 4px; margin: 0; list-style: none; }
.site-confirmed-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 16px;
  padding: 9px 0;
  border-top: 1px solid var(--vega-border-light);
}
.site-confirmed-list li > div { min-width: 0; overflow-wrap: anywhere; }
.site-confirmed-list time { margin: 0; white-space: nowrap; }
.site-previous-team > summary { cursor: pointer; padding: 14px 18px; font-weight: 600; }
.site-previous-team .team-state-panel { border: 0; box-shadow: none; }

.employee-period-current { padding: 14px 18px; background: var(--vega-surface); }
.employee-period-history { border-top: 1px solid var(--vega-border-light); }
.employee-period-history summary { padding: 12px 18px; font-weight: 600; cursor: pointer; }
.site-history-list { margin: 0; padding: 0 18px; list-style: none; }
.site-history-list .operations-event { overflow-wrap: anywhere; }
.site-history-changes { margin: 8px 0; }
.site-history-changes summary { padding-block: 6px; color: var(--vega-link); cursor: pointer; }
.site-history-changes ul { margin: 4px 0 12px; }
.site-history-list .operations-event > .text-link { display: inline-block; margin-top: 4px; }
.rotation-pair-table th:first-child { width: 20%; }
.rotation-pair-table :is(th:nth-child(2), th:nth-child(3)) { width: 29%; }
.rotation-pair-table th:last-child { width: 22%; white-space: normal; }
.rotation-pair-table td { overflow-wrap: anywhere; }
.rotation-position-repeat { display: none; }
.rotation-pair-relation .cell-note { margin: 0; }
.rotation-pair-relation a { display: inline-block; margin-top: 5px; }
.rotation-pairs-empty { margin: 0; }
.ticket-recipients { margin: 10px 0 14px; padding-left: 18px; }
.ticket-recipients li + li { margin-top: 8px; }
.choice-fieldset { min-inline-size: 0; margin: 0; padding: 10px 12px; border: 1px solid var(--vega-border-light); border-radius: 8px; }
.choice-fieldset legend { padding-inline: 4px; font-weight: 600; }
.choice-fieldset .checkbox-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 8px 14px; max-height: 220px; overflow: auto; }
.choice-fieldset label { display: flex; align-items: baseline; gap: 8px; }

@media (max-width: 900px) {
  .site-comparison-table, .site-comparison-table thead, .site-comparison-table tbody { display: block; }
  .site-comparison-table tr { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .site-comparison-table thead th { grid-column: span 3; }
  .site-comparison-table thead th:first-child, .site-comparison-table thead .site-milestone-heading { display: none; }
  .site-comparison-table tbody th { grid-column: 1 / -1; background: var(--vega-surface); }
  .site-comparison-table th, .site-comparison-table td { padding: 9px 10px; }
  .site-comparison-table td:first-of-type { border-left: 0; }
  .site-comparison-current, .site-comparison-after { grid-column: span 3; }
  .site-comparison-table .site-milestone { grid-column: span 2; order: 1; background: var(--vega-surface); }
  .site-comparison-table .site-milestone-empty { display: none; }
  .site-milestone-label { display: block; color: var(--vega-muted); margin-bottom: 3px; }
}

.account-avatar { flex: none; overflow: hidden; }
.account-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.account-avatar [hidden] { display: none !important; }
.account-avatar-large,
.colleague-avatar { display: grid; place-items: center; background: var(--vega-dark); color: #fff; }
.account-avatar-large { width: 96px; height: 96px; border-radius: var(--radius-card); font-size: 31px; font-weight: 600; }
.colleague-avatar { width: 40px; height: 40px; border-radius: var(--radius-sm); font-size: 16px; }
.account-actions, .account-profile, .account-form, .account-directory { max-width: 860px; }
.account-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 24px;
}
.account-identity h2 { margin: 0 0 5px; font-size: clamp(19px, 2vw, 25px); line-height: 1.2; overflow-wrap: anywhere; }
.account-identity p { margin: 3px 0 0; overflow-wrap: anywhere; }
.account-contacts { border-top: 1px solid var(--vega-border-light); padding: 20px 24px 24px; }
.account-contacts-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 16px; }
.account-contacts-heading h2, .account-form-section h2 { margin: 0; font-size: 17px; }
.account-contacts-heading .muted { font-size: 13px; }
.account-contacts > p { margin: 10px 0 0; }
.account-contact-list { margin: 12px 0 0; }
.account-contact-list > div {
  display: grid;
  grid-template-columns: minmax(135px, 0.37fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 6px 16px;
  padding-block: 12px;
  border-top: 1px solid var(--vega-border-light);
}
.account-contact-list dt { color: var(--vega-muted); }
.account-contact-list dd { margin: 0; overflow-wrap: anywhere; }
.account-contact-list a { color: var(--vega-link); text-decoration: underline; text-underline-offset: 3px; }
.account-contact-note { white-space: pre-wrap; }
.account-form .form-alert { margin: 16px 24px 0; }
.account-form-section { padding: 20px 24px; }
.account-form-section + .account-form-section { border-top: 1px solid var(--vega-border-light); }
.account-photo-input { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 16px; margin-top: 14px; }
.account-form-section > .panel-note { margin: 10px 0 0; }
.account-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-top: 14px; }
.account-note-field { grid-column: 1 / -1; }
.account-field-grid .form-control { width: 100%; }
.account-checkbox { display: flex; align-items: center; gap: 9px; min-height: 44px; width: fit-content; cursor: pointer; }
.account-checkbox input { flex: none; accent-color: var(--vega-accent); }
.account-form-section .account-visibility-note { margin-top: 0; }
.account-form .account-save { margin: 0; padding: 16px 24px; }
.account-directory-search { max-width: 100%; }
.search-page-form .form-control { min-width: 0; }
.colleague-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; color: inherit; }
.colleague-row + .colleague-row { border-top: 1px solid var(--vega-border-light); }
.colleague-row:hover { background: var(--vega-row-hover); }
.colleague-row:hover strong { text-decoration: underline; }
.colleague-copy { min-width: 0; overflow-wrap: anywhere; }
.colleague-copy strong, .colleague-copy small { display: block; }
.colleague-copy small { margin-top: 3px; color: var(--vega-muted); font-size: 13px; }
.search-result-item { grid-template-columns: minmax(0, 1fr); }
.search-result-item strong, .search-result-item small { white-space: normal; overflow-wrap: anywhere; }

/* Compact overviews leave the working data above the fold. */
.site-overview-context { padding: 12px 18px; border-bottom: 1px solid var(--vega-hairline); overflow-wrap: anywhere; }
.site-overview-context p { max-width: 75ch; margin: 4px 0 0; color: var(--vega-muted); }
.site-helipad { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0; padding: 12px 18px; border-bottom: 1px solid var(--vega-hairline); }
.site-helipad dt, .site-helipad dd span { color: var(--vega-muted); font-size: .875rem; }
.site-helipad dd { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 10px; margin: 0; }
.site-helipad dd strong { font-size: 1.125rem; white-space: nowrap; }
.site-overview-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.site-overview-metrics > div { padding: 13px 18px; min-width: 0; }
.site-overview-metrics > div + div { border-inline-start: 1px solid var(--vega-hairline); }
.site-overview-metrics dt { color: var(--vega-muted); font-size: 12px; line-height: 1.4; }
.site-overview-metrics dd { margin: 4px 0 0; font-size: 19px; font-weight: 680; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.site-overview-metrics dd .muted { font-size: .86em; font-weight: 500; }
.site-overview-metrics dd a { text-underline-offset: 3px; }
.site-meal-panel .panel-header { flex-wrap: wrap; }
.site-meal-metrics .cell-note { margin-top: 4px; }
.site-meal-empty { margin: 0; }
.meal-month-filter { display: flex; gap: 8px; align-items: center; }
.meal-month-filter .form-control { min-width: 0; }
.meal-report-layout > :only-child { max-width: 700px; }
.meal-report-draft { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.meal-report-draft > div { flex: 1 1 185px; min-width: 0; }
.meal-report-panel .panel-note, .meal-report-name, .meal-report-draft .cell-note, .meal-report-list .attention-item small { overflow-wrap: anywhere; }
.meal-report-instructions { margin: 14px var(--panel-inline-padding); }
.meal-report-warning { padding: 10px 12px; border: 1px solid var(--vega-border-light); border-radius: var(--radius-sm); background: var(--warning-tint); }
.meal-report-table { width: 100%; min-width: 630px; }
.meal-report-table td, .meal-report-table th { vertical-align: middle; }
.meal-report-table thead th { white-space: normal; }
.meal-report-table .meal-report-site { width: 32%; }
.meal-report-table .meal-report-site select { width: 100%; min-width: 0; }
.meal-report-table .meal-report-name { padding: 10px 15px; border-bottom: 1px solid var(--vega-hairline); color: var(--vega-text); background: transparent; text-align: start; font-size: inherit; letter-spacing: normal; text-transform: none; white-space: normal; }
.meal-report-table tbody tr:last-child > .meal-report-name { border-bottom: 0; }
.meal-report-value { min-width: 95px; font-variant-numeric: tabular-nums; }
.meal-report-mobile-label { display: none; }
.meal-report-list .attention-item { grid-template-columns: minmax(0, 1fr) auto; padding-inline: var(--panel-inline-padding); }

@media (max-width: 680px) {
  .meal-report-table-wrap { overflow: visible; }
  .meal-report-table, .meal-report-table tbody { display: block; min-width: 0; }
  .meal-report-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .meal-report-table tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px var(--panel-inline-padding); border-bottom: 1px solid var(--vega-hairline); }
  .meal-report-table tbody :is(th, td) { display: block; height: auto; min-width: 0; padding: 0; border: 0; white-space: normal; }
  .meal-report-table .meal-report-name, .meal-report-table .meal-report-site { grid-column: 1 / -1; width: 100%; padding: 0; border: 0; }
  .meal-report-mobile-label { display: block; color: var(--vega-muted); font-size: 12px; }
  .site-meal-metrics .cell-note { font-size: 11px; }
}

.hiring-page-actions .hiring-navigation { margin-bottom: 0; }
.queue-disclosure { margin-bottom: 14px; }
.queue-disclosure > summary { color: var(--vega-text); }
.queue-disclosure .work-queue-nav { margin: 0; }
.queue-disclosure .queue-link { align-items: center; padding: 10px 12px; border-color: var(--vega-border-light); }
.queue-disclosure .queue-link.active { border-color: var(--focus-color); box-shadow: none; background: var(--accent-soft); }
.queue-disclosure .queue-link > span { font-weight: 600; line-height: 1.4; }
.queue-disclosure .queue-link > strong { font-size: 20px; }
.queue-zero { color: var(--vega-muted); }
.hiring-table .check-cell { width: 42px; text-align: center; }
.hiring-person > div { min-width: 0; }

.cal-scroll-help { margin: 0; padding: 10px var(--panel-inline-padding); color: var(--vega-muted); background: var(--vega-panel-soft); border-bottom: 1px solid var(--vega-border-light); font-size: 13px; }
.cal-scroll:focus-visible { outline-offset: -3px; }
.cal-name a { white-space: normal; overflow-wrap: anywhere; }
.crm-advance { width: auto; min-height: 34px; gap: 5px; padding-inline: 8px; font: inherit; font-size: 12px; font-weight: 650; text-decoration: none; }
.crm-advance svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.crm-col-empty { text-align: start; padding: 10px 4px; border: 0; }
.crm-stage-dialog { max-width: calc(100% - 32px); max-height: calc(100dvh - 24px); }

.meal-edit { overflow: visible; }
.meal-edit .error-summary { margin: 16px; }
.meal-edit-table .form-control { width: 100%; min-width: 0; }
.meal-edit-table th:first-child { width: 36%; }
.meal-edit-table th:last-child { width: 1%; }
.meal-edit-delete label { min-height: 36px; cursor: pointer; }
.meal-edit-actions { margin: 0; padding: 16px 18px; background: var(--vega-panel-soft); border-radius: 0 0 var(--radius-card) var(--radius-card); }
.meal-edit-new { background: var(--vega-panel-soft); }
.meal-edit-label, .meal-edit-delete label > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.trend-chart { gap: 14px; padding-inline: 4px; overflow-x: auto; }
.trend-chart .vbar { flex: 0 0 clamp(92px, 10vw, 120px); }
.trend-chart .vbar-label { white-space: nowrap; }
.trend-chart .vbar:hover .vbar-label, .trend-chart .vbar:focus-visible .vbar-label { text-decoration: underline; color: var(--vega-link); }

.notification-settings { margin-bottom: 16px; }
.notification-settings > summary { padding: 13px var(--panel-inline-padding); min-height: 44px; font-weight: 650; cursor: pointer; }
.notification-settings > summary:focus-visible { outline-offset: -4px; }
.notification-settings[open] > summary { border-bottom: 1px solid var(--vega-hairline); }
.notification-settings .desktop-notify { border-bottom: 1px solid var(--vega-hairline); background: var(--vega-panel-soft); }
.notification-preferences > h2 { margin: 0 0 4px; font-size: 16px; }
.notification-preferences > p { margin: 0 0 14px; }
.notification-entry { line-height: 1.5; }
.notification-list .unread { background: var(--accent-tint); }

/* The sign-in surface deliberately remains unbranded. */
.login-body { min-height: 100svh; background: #23211f; }
.login-card { border-radius: 16px; box-shadow: 0 20px 60px #0005; }
.login-mark { color: var(--accent-ink); background: var(--accent-soft); margin-bottom: 20px; }
.login-form h1 { font-weight: 680; }
.login-form p { line-height: 1.5; }
.error-page { display: grid; justify-items: start; align-content: start; gap: 12px; min-height: 0; margin: 0; text-align: left; }
.content-area > .error-page { max-width: 540px; margin: clamp(16px, 8vh, 72px) auto 0; padding: clamp(18px, 4vw, 32px); background: var(--vega-card); border: 1px solid var(--vega-border-light); border-radius: var(--radius-card); }
.error-page > .error-code { padding: 5px 8px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.error-page h1, .error-page h2 { margin: 0; font-size: 22px; font-weight: 680; letter-spacing: -.025em; }
.error-page p { margin: 0 0 4px; max-width: 52ch; line-height: 1.6; }
.error-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 680px) {
  .content-area { padding-top: 16px; }
  .rotation-summary strong, .ticket-meta strong { min-width: 0; overflow-wrap: anywhere; }
  .pay-sum { min-width: 0; flex-wrap: wrap; }
  .pay-quick { min-height: 44px; max-width: 100%; }
  .print-scroll-hint { display: block; color: var(--vega-muted); font-size: 13px; }
  :root { --panel-inline-padding: 14px; }
  .panel-header { min-height: 0; padding-block: 12px; gap: 10px; }
  .site-overview-metrics > div { padding: 10px; }
  .site-overview-metrics dt { font-size: 11.5px; }
  .site-overview-metrics dd { font-size: 15px; }
  .site-overview-metrics dd .muted { font-size: 13px; }
  .queue-disclosure > summary { min-height: 44px; padding: 10px 12px; background: var(--vega-card); border: 1px solid var(--vega-border-light); border-radius: var(--radius-sm); }
  .queue-disclosure > summary span { display: inline; margin-inline-start: 7px; }
  .queue-disclosure .work-queue-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .queue-disclosure .queue-link { min-height: 58px; padding: 8px; }
  .queue-disclosure .queue-link small { grid-column: 1; font-size: 11px; }
  .queue-disclosure .queue-link > span { font-size: 12px; }
  .hiring-page-actions { align-items: stretch; }
  .hiring-toolbar .filter-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; }
  .hiring-toolbar .filter-bar > :not([data-filter-primary]):not(.filter-toggle) { grid-column: 1 / -1; }
  .hiring-toolbar .filter-bar > select { min-width: 0; width: 100%; }
  .hiring-table.data-table:not(.no-stack) tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); position: relative; }
  .hiring-table.data-table:not(.no-stack) .check-cell { width: auto; position: absolute; inset-block-start: 14px; inset-inline-end: 14px; }
  .hiring-table.data-table:not(.no-stack) .hiring-person-cell, .hiring-table.data-table:not(.no-stack) .hiring-last-note { grid-column: 1 / -1; }
  .hiring-table.data-table:not(.no-stack) td.hiring-person-cell[data-label]::before { display: none; }
  .hiring-table .check-cell:has(input) + .hiring-person-cell { padding-inline-end: 32px; }
  .rotation-pair-table.data-table:not(.no-stack) tbody tr,
  .ppe-table.data-table:not(.no-stack) tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rotation-pair-table.data-table:not(.no-stack) .rotation-position { color: var(--vega-text); }
  .rotation-position-repeat { display: inline; }
  .rotation-pair-table.data-table:not(.no-stack) .rotation-pair-person { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--vega-panel-soft); }
  .rotation-pair-person .rotation-assignment { display: block; }
  .rotation-pair-person .direction-icon { display: none; }
  .rotation-pair-person .rotation-vacancy { padding: 6px; }
  .rotation-pair-table.data-table:not(.no-stack) .rotation-pair-relation { grid-column: 1 / -1; }
  .rotation-pair-relation a { min-height: 40px; display: inline-flex; align-items: center; }
  .ppe-table.data-table:not(.no-stack) tbody tr { grid-template-areas: "person person" "sizes deadline" "items items" "actions actions"; }
  .ppe-table.data-table:not(.no-stack) .ppe-person { grid-area: person; }
  .ppe-table.data-table:not(.no-stack) .ppe-sizes { grid-area: sizes; }
  .ppe-table.data-table:not(.no-stack) .ppe-deadline { grid-area: deadline; }
  .ppe-table.data-table:not(.no-stack) .ppe-items { grid-area: items; }
  .ppe-table.data-table:not(.no-stack) .row-actions { grid-area: actions; }
  .employee-profile-header { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; }
  .employee-profile-header .profile-avatar { grid-row: span 2; width: 48px; height: 48px; }
  .employee-profile-header > .status { grid-column: 2; justify-self: start; }
  .page-toolbar .calendar-nav { grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); }
  .cal-scroll-help { font-size: 12px; }
  .crm-advance { min-height: 44px; }
  .crm-col-body:not(:has(.crm-card)) { padding-block: 0; }
  .crm-col-head { align-items: center; }
  .meal-edit .table-wrap { overflow: visible; }
  .meal-edit-table, .meal-edit-table tbody { display: block; min-width: 0; }
  .meal-edit-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .meal-edit-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--vega-border-light); }
  .meal-edit-table td { display: block; min-width: 0; height: auto; padding: 0; border: 0; white-space: normal; }
  .meal-edit-person, .meal-edit-card, .meal-edit-delete { grid-column: 1 / -1; }
  .meal-edit-delete:not(:has(label)) { display: none; }
  .meal-edit-label, .meal-edit-delete label > span { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
  .meal-edit-label { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 650; }
  .meal-edit-delete label { gap: 8px; min-height: 40px; padding: 6px 0; color: var(--danger); background: none; border: 0; }
  .meal-edit-actions { padding-inline: 14px; }
  .compare-picker .form-field { min-width: 0; flex-basis: 100%; }
}

@media (max-width: 640px) {
  .account-identity { grid-template-columns: auto minmax(0, 1fr); padding: 16px; gap: 12px; }
  .account-avatar-large { width: 64px; height: 64px; font-size: 23px; }
  .account-edit { grid-column: 1 / -1; justify-self: start; }
  .account-contacts, .account-form-section, .account-form .account-save { padding: 16px; }
  .account-form .form-alert { margin-inline: 16px; }
  .account-contact-list > div { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .account-contact-list a { display: inline-block; padding: 6px 0; }
  .account-photo-input { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .account-field-grid { grid-template-columns: minmax(0, 1fr); }
  .account-directory-search { flex-wrap: wrap; }
  .account-directory-search input { flex: 1 1 150px; }
}

@media (max-width: 480px) {
  .rotation-list-table.data-table:not(.no-stack) tbody tr,
  .employee-table.data-table:not(.no-stack) tbody tr,
  .hiring-table.data-table:not(.no-stack) tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-directory-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .account-directory-search > :is(input, a) { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  dialog[open] { transform: none; }
}
@media (forced-colors: active) {
  .button, .chip, .status, .day-list, .picker-results { border: 1px solid ButtonText; }
  :focus-visible { outline-color: Highlight; }
}
@media print {
  .print-scroll-hint { display: none; }
  .portal-header { display: block; position: static; padding: 0; }
  .portal-header .topbar { display: none; }
  .topbar-title { padding: 0 0 8px; }
  [data-follow-table-header] thead { position: static; transform: none; box-shadow: none; }
  .my-day, .form-navigation, .view-switch { display: none; }
  .action-menu { display: none; }
  .responsive-disclosure > :not(summary) { display: block !important; }
  .employee-print .table-wrap { overflow: visible; }
  .employee-print .data-table { width: 100%; min-width: 0; font-size: 9pt; }
  .employee-print thead { display: table-header-group; position: static; }
  .employee-print tr { break-inside: avoid; }
  .employee-print th, .employee-print td { padding: 4px 6px; white-space: normal; }
  .employee-print td { height: auto; }
  .employee-print .status { border: 0; background: transparent; color: #000; padding: 0; white-space: normal; }
}
