:root {
  color-scheme: light;
  --ink: #272038;
  --muted: #625a72;
  --quiet: #796f89;
  --brand: #5634b6;
  --action-bg: #5634b6;
  --brand-dark: #211746;
  --lavender: #eee8fc;
  --paper: #fff;
  --canvas: #f5f7fa;
  --line: #e7e0ef;
  --warn: #833720;
  --warn-bg: #fcece4;
  --green: #165e44;
  --green-bg: #e2f4eb;
  --header: #f6f3fc;
  --control: #fff;
  --empty-cell: #fbfafd;
  --weekend: #eef0f5;
  --surface-shadow: 0 2px 8px #26194308;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f5effc;
  --muted: #c9bfd6;
  --quiet: #b5a8c6;
  --brand: #c0aafa;
  --action-bg: #6346b7;
  --brand-dark: #211746;
  --lavender: #403459;
  --paper: #262132;
  --canvas: #1b1725;
  --line: #493e58;
  --warn: #ffc4a9;
  --warn-bg: #4f302f;
  --green: #bdebd6;
  --green-bg: #254338;
  --header: #2f283e;
  --control: #221d2d;
  --empty-cell: #211d2c;
  --weekend: #332b42;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; }
button, input, select, textarea { font: inherit; }
button, summary, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
a { color: var(--brand); }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.18; letter-spacing: -.035em; }
h2 { font-size: clamp(1.125rem, 1.7vw, 1.25rem); letter-spacing: -.016em; }
h3 { font-size: 1rem; }
p { line-height: 1.5; }
[hidden] { display: none !important; }
.loading { padding: 2rem; }
.layout { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0,1fr); }
.rail { background: var(--brand-dark); color: #fff; display: flex; flex-direction: column; min-width: 0; padding: 28px 17px 22px; gap: 28px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 1.3rem; font-weight: 750; letter-spacing: -.035em; }
.brand-mark { display: grid; place-items: center; height: 37px; width: 37px; border-radius: 12px; background: #d1baff; color: var(--brand-dark); font-size: 22px; flex: none; }
.rail .brand { padding-left: 8px; }
.menu { display: flex; flex-direction: column; gap: 4px; }
.icon { inline-size: 18px; block-size: 18px; flex: none; vertical-align: middle; }
.menu button { position: relative; display: flex; align-items: center; gap: 9px; min-height: 42px; text-align: left; color: #eee7fd;
  border: 0; background: transparent; padding: 9px 10px 9px 13px; border-radius: 8px; font-size: .875rem; }
.menu button:hover, .menu button[aria-current] { background: #42316e; color: #fff; }
.menu button[aria-current]::before { position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 3px; background: #cbb4ff; content: ""; }
.menu button[aria-current] span { font-weight: 680; }
.support-menu { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; margin-top: 5px; border-top: 1px solid #dbc9ff32; }
.support-menu-label { padding: 0 12px 2px; color: #d6c7f4; font-size: .75rem; font-weight: 650; }
.account { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid #584776; display: grid; gap: 6px; min-width: 0; }
.account small { color: #e0d1f8; }
.account button { color: #fff; background: transparent; text-align: left; border: 0; padding: 6px 0; justify-self: start; text-decoration: underline; }
.main { padding: clamp(20px, 3vw, 44px); width: 100%; max-width: 1700px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 15px; margin: 6px 0 21px; }
.page-head p { color: var(--muted); margin-top: 8px; font-size: 1rem; font-weight: 475; }
.calendar-staff { margin: -4px 0 18px; }
.actions, .toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar { padding: 15px 17px; border-bottom: 1px solid var(--line); justify-content: space-between; }
.toolbar .actions { min-width: 0; }
.button { display: inline-flex; gap: 6px; justify-content: center; align-items: center; min-height: 40px; padding: 8px 12px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-size: .875rem; font-weight: 650; }
.button:hover { border-color: var(--brand); }
.button.primary { background: var(--action-bg); color: white; border-color: var(--action-bg); }
.button.secondary { background: var(--header); border-color: var(--line); color: var(--ink); }
.button.secondary:hover { border-color: var(--brand); }
.button.icon-button { min-width: 38px; padding: 7px; }
.text-action { display: inline-flex; gap: 5px; align-items: center; border: 0; padding: 5px 0; background: transparent; color: var(--brand); font-size: .875rem; font-weight: 650; text-align: left; }
.text-action:hover { text-decoration: underline; }
.text-action .icon { inline-size: 16px; block-size: 16px; }
.text-action.danger { color: var(--warn); }
.button.danger { color: var(--warn); }
.button.selected { color: var(--brand); background: var(--lavender); }
.button.compact { padding: 7px 10px; min-height: 34px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; min-width: 0; overflow: hidden; box-shadow: var(--surface-shadow); }
.panel + .panel { margin-top: 18px; }
.calendar-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(195px, 252px); gap: 14px; align-items: start; }
.calendar-layout > .panel { margin: 0; }
.calendar-layout + .panel { margin-top: 18px; }
.calendar-notes h2 { margin-right: auto; }
.notes-empty { border: 1px dashed var(--line); border-radius: 8px; padding: 12px; font-size: .875rem; color: var(--muted); }
.note-list { display: grid; gap: 9px; }
.note-with-person { display: grid; gap: 3px; }
.note-with-person > div { padding: 0 10px; }
.note-card { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; text-align: left; display: grid; gap: 4px; }
.note-card:hover { border-color: var(--brand); }
.note-card small { color: var(--muted); }
.note-text { overflow-wrap: anywhere; white-space: pre-wrap; }
.person-link {
  border: 0; background: transparent; color: var(--brand); text-decoration: underline;
  text-underline-offset: 2px; text-align: left; font: inherit; font-weight: 700; padding: 3px 0;
}
.person-link:hover { color: var(--ink); }
.person-links { display: flex; flex-wrap: wrap; gap: 4px 12px; }
#person-title { margin-top: 10px; }
.earnings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.earnings-card { display: grid; align-content: start; gap: 7px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.earnings-amount { font-size: 1.5rem; color: var(--brand); }
.earnings-card dl { display: grid; gap: 5px; margin: 0; }
.earnings-card dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; }
.earnings-card dt { color: var(--muted); font-size: .875rem; }
.earnings-card dd { margin: 0; font-weight: 650; }
.individual-layout { margin-top: 16px; }
.individual-summary { padding: 11px 17px; background: var(--header); border-bottom: 1px solid var(--line); }
.individual-shift {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: 10px; padding: 12px 17px; border-bottom: 1px solid var(--line);
}
.individual-shift:last-child { border-bottom: 0; }
.individual-shift .notice { display: inline-block; margin-top: 4px; padding: 3px 8px; font-size: .8rem; }
.share-table h3 { margin-bottom: 5px; }
.panel-body { padding: 18px; }
.notice { background: var(--warn-bg); color: var(--warn); border-radius: 10px; font-size: .9rem; padding: 10px 13px; }
.notice.good { background: var(--green-bg); color: var(--green); }
.hint { color: var(--muted); font-size: .875rem; }
.stack { display: grid; gap: 13px; }
.form-grid, .settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.full { grid-column: 1 / -1; }
label { display: grid; gap: 5px; font-size: .875rem; font-weight: 650; }
label.toggle { display: flex; gap: 8px; align-items: center; min-height: 38px; }
label.toggle input { width: 17px; height: 17px; }
input:not([type=checkbox]), select, textarea { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--control); color: var(--ink); font-size: 1rem; min-height: 41px; }
select { padding-right: 22px; }
textarea { min-height: 85px; resize: vertical; }
.actions label { min-width: 115px; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: 17px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 13px; min-width: 0; box-shadow: var(--surface-shadow); }
.stat-label { display: flex; align-items: center; gap: 7px; }
.stat-label .icon { width: 16px; height: 16px; color: var(--brand); }
.stat.risk { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 28%, transparent); }
.stat.risk .icon, .stat.risk .stat-label small { color: var(--warn); }
.stat strong { display: block; font-size: clamp(1.15rem,2.2vw,1.7rem); letter-spacing: -.035em; line-height: 1.2; margin-top: 3px; }
.stat small { color: var(--muted); font-size: .82rem; }
.stat.risk strong { color: var(--warn); }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 11px; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { background: var(--header); color: var(--muted); font-size: .82rem; font-weight: 680; }
tbody th { font-size: .9rem; }
td { font-size: .875rem; }
td small, th small { display: block; color: var(--muted); font-size: .76rem; font-weight: 400; margin-top: 3px; line-height: 1.25; }
tr:last-child :is(td,th) { border-bottom: 0; }
.calendar { min-width: 820px; table-layout: fixed; }
.calendar-controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: space-between; padding: 13px 15px; }
.calendar-controls label { font-size: .875rem; font-weight: 650; }
.date-navigation, .object-controls { display: flex; min-width: 0; flex-wrap: wrap; gap: 5px; align-items: flex-end; }
.date-navigation input { min-width: 130px; }
.object-controls label { flex: 1 1 120px; }
.calendar-range, .calendar-day-controls { display: flex; flex-wrap: wrap; min-width: 0; align-items: end; gap: 8px; }
.calendar-day-controls { padding: 0 15px 12px; }
.calendar-range .error { flex: 0 0 100%; }
.calendar-agenda { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.agenda-day { display: grid; gap: 4px; padding: 11px 15px; background: var(--paper); }
.agenda-day h3, .agenda-day p { margin: 0; }
.agenda-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(115px, 1fr); max-width: 620px; align-items: center; gap: 10px; }
.agenda-row > div { min-width: 0; overflow-wrap: anywhere; }
.agenda-row > div > small { display: block; color: var(--muted); }
.agenda-row .person-link { text-align: left; }
.week-agenda, .phone-grid-toggle { display: none; }
.view-switch { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--canvas); gap: 1px; }
.view-switch .button { border-color: transparent; background: transparent; min-height: 37px; }
.view-switch .button.selected { background: var(--action-bg); color: #fff; }
.sort-button { display: inline-flex; gap: 4px; align-items: center; border: 0; padding: 2px 0; font: inherit; background: transparent; color: inherit; }
.sort-button .icon { width: 15px; height: 15px; }
.calendar th:first-child { width: 156px; }
.calendar :is(td,th):not(:first-child) { border-left: 1px solid var(--line); }
.calendar th.today { color: var(--brand); background: var(--lavender); }
.calendar .weekend { background: var(--weekend); }
.calendar th.weekend { color: var(--ink); }
.calendar th.active-day { background: var(--lavender); }
.day-button { border: 1px solid transparent; padding: 4px; background: transparent; color: inherit; font-weight: 650; text-align: left; }
.day-button[aria-pressed="true"] { color: var(--brand); border-bottom-color: currentColor; }
.calendar td { padding: 6px; }
.calendar td:empty { background: var(--empty-cell); }
.day-off { text-align: center; color: var(--muted); }
.calendar td.drop-target { background: var(--lavender); outline: 2px dashed var(--brand); outline-offset: -3px; }
.shift[draggable=true] { cursor: grab; }
.shift[draggable=true]:active { cursor: grabbing; }
.shift-time { display: block; white-space: nowrap; font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.shift-type { display: flex; align-items: flex-start; gap: 3px; }
.shift-type .icon { width: 12px; height: 12px; }
.overlap .shift-time { font-weight: 800; }
.shift { width: 100%; display: block; text-align: left; border: 1px solid transparent; background: var(--lavender); color: #3d2b74; font-weight: 680; font-size: .78rem; border-radius: 8px; padding: 7px 5px; line-height: 1.24; margin: 2px 0; overflow-wrap: anywhere; }
.shift:hover { border-color: var(--brand); }
.shift small { color: inherit; font-size: .72rem; }
.shift.overlap { background: var(--warn-bg); color: var(--warn); border-color: #e8b9a9; }
.shift-day { background: #fff3d8; color: #52380e; }
.shift-night { background: #dedcf7; color: #382c70; }
.shift-short { background: #e2f2fc; color: #25476b; }
.shift-daily { background: #dcecf8; color: #183d5b; }
.cell-note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shift .cell-flag { font-weight: 750; font-size: .69rem; letter-spacing: -.012em; white-space: nowrap; }
.cell-object { padding: 3px 4px 0; }
.draft-banner { margin-bottom: 15px; }
.draft-banner .actions { margin-top: 8px; }
.entry { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 9px; min-width: 0; }
.entry legend { padding: 0 5px; color: var(--muted); font-size: .9rem; }
.month-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.month-head { background: var(--header); font-size: .83rem; color: var(--muted); }
.month-head span { padding: 8px; text-align: center; }
.month-day, .month-blank { border: 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); min-height: 60px; }
.month-day { color: var(--ink); background: var(--paper); display: grid; gap: 3px; align-content: center; justify-items: center; padding: 5px 0; }
.month-day:hover { background: var(--lavender); }
.month-day small { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.month-day.month-risk { background: var(--warn-bg); color: var(--warn); }
.month-day.month-off strong { color: var(--warn); text-decoration: underline; }
.month-blank { background: var(--empty-cell); }
.legend { display: flex; flex-wrap: wrap; gap: 5px 9px; padding: 8px 15px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.legend > span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 8px; }
.legend .icon { width: 14px; height: 14px; }
.legend .legend-day { background: #fff3d8; color: #52380e; }
.legend .legend-night { background: #dedcf7; color: #382c70; }
.legend .legend-short { background: #e2f2fc; color: #25476b; }
.legend .legend-daily { background: #dcecf8; color: #183d5b; }
.legend .legend-warning { background: var(--warn-bg); color: var(--warn); }
.period-total { display: flex; align-items: center; flex-wrap: wrap; padding: 13px 15px; background: var(--header); font-size: .94rem; }
.period-total > div { display: flex; flex-direction: column; gap: 3px; padding: 0 14px; }
.period-total > div:first-child { padding-left: 0; }
.period-total > div + div { border-left: 1px solid var(--line); }
.period-total span { font-size: .8rem; color: var(--muted); }
.timesheet-downloads { background: var(--header); }
.report-table tfoot :is(th, td) { background: var(--lavender); font-weight: 720; }
.rate-count { text-align: center; font-variant-numeric: tabular-nums; }
.rate-warning { background: var(--warn-bg); color: var(--warn); border-radius: 6px; padding: 3px 6px; font-weight: 690; }
.profile-actions { border-top: 1px solid var(--line); padding-top: 11px; }
.support-card { max-width: 550px; }
.support-contact { display: flex; align-items: center; gap: 14px; min-width: 0; }
.support-icon { width: 43px; height: 43px; display: grid; place-items: center; flex: none; border-radius: 8px; background: var(--lavender); color: var(--brand); }
.support-icon .icon { width: 22px; height: 22px; }
.support-value { color: var(--muted); overflow-wrap: anywhere; }
.support-address { cursor: text; }
.chart-controls { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px 12px; }
.chart-controls label { flex: 1 1 154px; min-width: 0; }
.chart-selection label { flex: 0 1 250px; }
.output-chart { min-width: 0; border-radius: 8px; background: var(--header); border: 1px solid var(--line); }
.output-chart canvas { display: block; width: 100%; height: 270px; cursor: crosshair; touch-action: manipulation; }
.chart-totals { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(150px,100%),1fr)); gap: 8px; }
.chart-total { text-align: left; color: var(--ink); padding: 9px; border: 1px solid var(--line); border-left: 4px solid var(--chart-color); background: var(--paper); border-radius: 8px; display: grid; gap: 4px; }
.chart-total:hover, .chart-total[aria-pressed=true] { background: var(--header); border-color: var(--chart-color); }
.chart-total small { color: var(--muted); }
.chart-color-0 { --chart-color: #8154e3; } .chart-color-1 { --chart-color: #128678; }
.chart-color-2 { --chart-color: #bc5b00; } .chart-color-3 { --chart-color: #007cb7; }
.chart-color-4 { --chart-color: #c43c72; } .chart-color-5 { --chart-color: #6a8622; }
.chart-color-6 { --chart-color: #0f90a0; } .chart-color-7 { --chart-color: #9c4d30; }
.audit summary { display: flex; align-items: center; gap: 6px; font-weight: 700; list-style: none; }
.audit summary::-webkit-details-marker { display: none; }
.audit[open] summary .icon { transform: rotate(90deg); }
.audit summary + .hint { margin-top: 10px; }
.audit-timeline { list-style: none; margin: 12px 0 0 8px; padding: 0 0 0 14px; border-left: 1px solid var(--line); }
.audit-timeline li { position: relative; display: grid; gap: 3px; padding: 0 0 12px; }
.audit-timeline li::before { content: ""; position: absolute; left: -19px; top: 5px; background: var(--brand); width: 8px; height: 8px; border-radius: 50%; }
.audit-timeline li:last-child { padding-bottom: 0; }
.audit-timeline small { color: var(--muted); }
.bulk-people { font-size: .875rem; }
.person-actions { gap: 10px; }
.select-cell { width: 40px; text-align: center; }
.form-note { align-self: end; }
.profile-data { display: grid; gap: 9px; margin: 0; }
.profile-data > div { display: grid; grid-template-columns: minmax(80px, .45fr) minmax(0, 1fr); gap: 10px; }
.profile-data dt { color: var(--muted); }
.profile-data dd { margin: 0; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.empty { padding: 26px; text-align: center; color: var(--muted); }
.page-split { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; align-items: start; }
.page-split > .panel { margin: 0; }
.version-note { margin-top: 7px; }
.file-input { max-width: 320px; }
.table-title { padding: 12px 14px 0; }
.status-pill { background: var(--lavender); color: var(--ink); border-radius: 6px; font-size: .78rem; padding: 4px 7px; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.login-aside { background: var(--brand-dark); color: white; padding: clamp(22px,6vw,90px); display: grid; align-content: center; gap: 23px; }
.login-aside h1 { max-width: 11ch; font-size: clamp(2.5rem,6vw,5.7rem); }
.login-aside p { color: #e7ddf9; max-width: 36ch; }
.login-main { padding: clamp(20px,6vw,65px); display: grid; align-content: center; }
.login-main .panel { max-width: 470px; width: 100%; justify-self: center; }
dialog { width: min(650px, calc(100vw - 24px)); max-height: calc(100dvh - 26px); color: var(--ink); background: var(--paper); padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: auto; }
dialog.drawer { position: fixed; inset: 0 0 0 auto; width: min(520px, 100vw); height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 8px 0 0 8px; }
dialog::backdrop { background: #23194285; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
dialog .panel-body { padding: 18px; }
.settings-index { display: grid; gap: 14px; max-width: 670px; }
.calendar-day-notes { display: grid; gap: 6px; padding: 10px 12px; }
.calendar-day-notes h3, .calendar-note-key { display: inline-flex; align-items: center; gap: 5px; }
.calendar-note-mark { display: inline-flex; justify-content: center; align-items: center; color: var(--brand); }
.calendar-note-mark .icon, .calendar-note-key .icon { width: 13px; height: 13px; }
.federal-hint { color: var(--muted); font-size: .8rem; padding: 7px 12px; }
.federal-day { color: var(--warn); font-size: .85rem; margin-bottom: 4px; }
.earnings-grand-total { padding: 12px 16px; background: var(--header); }
.earnings-site + .earnings-site { border-top: 1px solid var(--line); }
.earnings-site h3 { padding: 12px 16px 5px; }
.navigation-list { display: grid; gap: 4px; }
.navigation-row {
  width: 100%; min-height: 55px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 18px;
  align-items: center; gap: 11px; text-align: left; color: var(--ink); font: inherit;
  background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 8px;
}
.navigation-row:is(:hover, :focus-visible) { background: var(--lavender); }
.navigation-row small, .cycle-presets small, .cycle-people-list small { display: block; color: var(--muted); line-height: 1.3; }
.navigation-row small { margin-top: 3px; }
.navigation-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--lavender); color: var(--brand); }
.navigation-row > .icon { width: 17px; color: var(--muted); }
dialog.cycle-dialog { width: min(680px, calc(100vw - 24px)); }
.cycle-form [hidden] { display: none; }
.cycle-dialog .dialog-head { position: sticky; top: 0; z-index: 1; background: var(--paper); }
.cycle-section { display: grid; gap: 12px; border: 1px solid var(--line); padding: 13px; border-radius: 12px; min-width: 0; }
.cycle-section :is(p, h3) { margin: 0; }
.cycle-section h3 { font-size: 1rem; }
.cycle-presets, .cycle-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cycle-presets button {
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit;
  text-align: left; min-height: 57px; padding: 8px 10px; border-radius: 9px;
}
.cycle-presets button[aria-pressed="true"] { border-color: var(--brand); background: var(--lavender); }
.cycle-presets strong { color: var(--brand); }
.cycle-more-presets summary, .cycle-people summary { min-height: 44px; padding: 10px 8px; color: var(--brand); }
.cycle-more-presets .cycle-presets { margin-top: 6px; }
.cycle-layout { display: flex; gap: 5px; overflow-x: auto; padding-block: 2px 5px; }
.cycle-layout span { white-space: nowrap; border-radius: 6px; background: var(--lavender); font-size: .79rem; padding: 5px 7px; }
.cycle-layout .cycle-off { color: var(--muted); background: var(--canvas); border: 1px solid var(--line); }
.cycle-editor { display: grid; gap: 8px; margin-bottom: 9px; max-height: min(420px, 48vh); overflow-y: auto; }
.cycle-editor fieldset {
  display: grid; gap: 8px; min-width: 0; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px;
}
.cycle-editor legend { font-weight: 650; }
.cycle-slot-actions { display: flex; justify-content: flex-end; gap: 4px; }
.cycle-slot-actions:empty { display: none; }
.cycle-slot-actions .button { min-width: 36px; min-height: 36px; }
.cycle-save { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-top: 12px; }
.cycle-save label { flex: 1 1 175px; }
.cycle-dates input { width: 100%; min-width: 0; }
.cycle-people { border: 1px solid var(--line); border-radius: 8px; padding-inline: 6px; }
.cycle-people > .stack { padding: 6px 5px 10px; }
.cycle-people-list, .cycle-preview-list { max-height: 260px; overflow-y: auto; }
.cycle-people-list label { min-height: 44px; padding: 6px 3px; }
.cycle-preview-list { padding: 0; margin: 0; list-style: none; }
.cycle-preview-list li { display: grid; gap: 2px; border-top: 1px solid var(--line); padding-block: 8px; }
.cycle-preview-list b { color: var(--warn-ink, #a12f24); }
.cycle-footer { justify-content: flex-end; }
.day-actions { padding: 8px 12px; }
.agenda-rate { color: var(--brand); font-weight: 650; }
.break-picker { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.break-picker summary { min-height: 28px; color: var(--ink); font-weight: 640; cursor: pointer; }
.break-picker summary .icon { margin: 0 6px 0 3px; vertical-align: middle; color: var(--brand); }
.break-picker summary small { font-weight: 450; color: var(--muted); }
.break-picker .cycle-dates { margin-top: 8px; }
.break-picker p { margin: 8px 0 0; }
.batch-form [hidden] { display: none; }
.batch-range { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0; }
.batch-range span { color: var(--muted); }
.batch-days summary { cursor: pointer; font-weight: 650; }
.batch-days .actions { margin: 8px 0; }
.batch-list { max-height: min(390px, 50vh); overflow: auto; }
.batch-day { border-top: 1px solid var(--line); padding: 8px 4px; }
.batch-day > .toggle { min-height: 34px; }
.batch-day details details { margin-top: 6px; }
.batch-day > details { margin: 4px 0 2px 32px; }
.batch-day > details > summary { color: var(--brand); min-height: 34px; }
[data-note-results] h2 { font-size: 1rem; margin: 10px 0 5px; }
[data-note-results] .note-list + h2 { margin-top: 18px; }
.report-summaries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.report-summaries .stat { min-width: 0; }
.report-detail-tabs .button[aria-pressed="true"] { background: var(--lavender); border-color: var(--brand); color: var(--ink); }
.report-chart { display: grid; gap: 8px; }
.report-chart > .actions { justify-content: space-between; }
.report-chart-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .82rem; color: var(--muted); }
.report-chart-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 3px; background: var(--brand); }
.report-chart-legend span + span::before { background: #00887a; }
.report-chart-series { max-height: 250px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.report-chart-point {
  width: 100%; min-height: 44px; display: grid; grid-template-columns: minmax(72px, 130px) minmax(0, 1fr);
  gap: 8px; align-items: center; padding: 4px 8px; text-align: left;
  border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); font: inherit;
}
.report-chart-point[aria-pressed="true"] { background: var(--lavender); border-color: var(--line); }
.report-bars { display: grid; gap: 4px; }
.report-bars progress { width: 100%; height: 5px; appearance: none; accent-color: var(--brand); }
.report-bars progress::-webkit-progress-bar { background: var(--line); border-radius: 3px; }
.report-bars progress::-webkit-progress-value { background: var(--brand); border-radius: 3px; }
.report-bars .worked { accent-color: #00887a; }
.report-bars .worked::-webkit-progress-value { background: #00887a; }
.report-chart-caption { margin: 0; font-size: .9rem; }
.shared-page { width: min(960px, calc(100% - 24px)); margin: 28px auto; }
.shared-page section { background: var(--paper); border: 1px solid var(--line); padding: 14px; margin-block: 14px; border-radius: 8px; }
.shared-page table { border-collapse: collapse; }
.shared-page :is(th, td) { padding: 7px; border-bottom: 1px solid var(--line); text-align: left; }
.shared-page form { max-width: 460px; }
.error { color: var(--warn); padding: 8px 0; font-size: .9rem; }
.announcement { position: fixed; right: 16px; bottom: 16px; z-index: 3; max-width: min(440px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 10px; background: var(--brand-dark); color: white; box-shadow: 0 5px 15px #21174638; }
@media(max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .rail { padding: 11px 15px; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
  .rail .brand { padding: 0; }
  .menu { grid-row: 2; grid-column: 1 / -1; flex-direction: row; overflow-x: auto; padding-bottom: 2px; }
  .menu button { padding: 8px 11px; white-space: nowrap; }
  .support-menu { flex-direction: row; flex: none; padding: 0 0 0 6px; margin: 0 0 0 3px; border-top: 0; border-left: 1px solid #dbc9ff32; }
  .support-menu-label { display: none; }
  .account { border: 0; padding: 0; display: flex; align-items: center; gap: 8px; margin: 0; }
  .account small { display: none; }
}
@media(max-width: 1220px) {
  .calendar-layout { grid-template-columns: minmax(0,1fr); }
}
@media(max-width: 650px) {
  .main { padding: 14px; }
  .chart-controls label { flex-basis: 100%; }
  .output-chart canvas { height: 240px; }
  .page-head { margin-bottom: 15px; }
  .page-split, .login-layout { grid-template-columns: 1fr; }
  .login-aside { padding: 25px; gap: 14px; }
  .login-aside h1 { max-width: 17ch; }
  .login-main { padding: 15px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .calendar-schedule .calendar-scroll { display: none; }
  .calendar-schedule.phone-grid .calendar-scroll, .calendar-schedule .week-agenda, .phone-grid-toggle { display: block; }
  .calendar-schedule.phone-grid .week-agenda { display: none; }
  .calendar th:first-child { position: sticky; left: 0; z-index: 1; width: 132px; background: var(--paper); }
  .calendar thead th:first-child { background: var(--header); }
  .calendar-range label { flex: 1 1 120px; }
  .calendar-range input { min-width: 0; }
  .calendar-day-controls { padding-inline: 12px; }
  .shift { min-height: 42px; font-size: .875rem; }
  .calendar-controls { padding: 12px; gap: 10px; }
  .object-controls { width: 100%; }
  .shift-time { font-size: .85rem; }
  .period-total > div { padding-inline: 8px; }
  .panel-body, .toolbar { padding: 12px; }
  .account strong { display: none; }
  .form-grid, .settings-grid { grid-template-columns: minmax(0,1fr); }
  .earnings-grid { grid-template-columns: minmax(0,1fr); }
  .button { min-height: 43px; }
  .person-link { min-height: 34px; }
  .individual-summary, .individual-shift { padding: 10px 12px; }
  .report-table, .people-table { min-width: 400px; }
  .month-day, .month-blank { min-height: 44px; }
}
.shift-date-nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .4rem;
}
.shift-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  padding: .3rem;
  border: 1px solid var(--line, #a294b4);
  border-radius: .75rem;
  touch-action: manipulation;
}
.shift-date-grid.swipe-dates { touch-action: none; user-select: none; }
.shift-date-grid > span { text-align: center; font-size: .8rem; padding-block: .25rem; }
.shift-date-grid > button {
  min-height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: .45rem;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  user-select: none;
}
.shift-date-grid > button[aria-pressed="true"] {
  background: #5332aa;
  color: #fff;
  font-weight: 700;
}
.shift-date-grid > button:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
.piece-lines fieldset { margin: 0; min-width: 0; }
.reference-field, .employee-search { min-width: 0; }
.reference-field label, .employee-search label { display: block; }
.reference-buttons { display: flex; flex-wrap: wrap; column-gap: .8rem; }
.reference-buttons .text-action { min-height: 32px; padding: .25rem 0; font-size: .82rem; }
.employee-search { position: relative; }
.employee-search > input[role="combobox"] { width: 100%; }
.employee-results {
  position: absolute;
  inset-inline: 0;
  z-index: 12;
  max-height: 14rem;
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: .55rem;
  box-shadow: 0 8px 24px #150e2626;
}
.employee-results button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: .5rem .65rem;
  background: transparent;
  border: 0;
  text-align: start;
  color: var(--ink);
  font: inherit;
}
.employee-results button:hover, .employee-results [aria-selected="true"] { background: var(--lavender); }
.employee-results .hint { padding: .5rem .65rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.rate-priority {
  display: block;
  width: fit-content;
  margin-block-start: .25rem;
  padding: .15rem .5rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  font-size: .75rem;
  font-weight: 650;
  color: var(--ink);
  background: var(--lavender);
}
.request-activity {
  position: fixed;
  z-index: 40;
  inset-block-start: max(env(safe-area-inset-top), .5rem);
  inset-inline-end: .5rem;
  padding: .35rem .65rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--paper);
  color: var(--muted);
  font-size: .8rem;
  pointer-events: none;
}
.profile-link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  text-decoration: underline;
  text-underline-offset: .17em;
}
.profile-link span { display: inline-flex; }
.profile-link svg { width: .9rem; height: .9rem; }
