:root {
  color-scheme: light;
  --ink: #111318;
  --muted: #6b7280;
  --canvas: #f3f5f8;
  --surface: #ffffff;
  --line: #e5e7eb;
  --blue: #0a6cff;
  --blue-dark: #0055cc;
  --nav: rgba(11, 16, 32, 0.92);
  --radius: 18px;
  --shadow: 0 14px 45px rgba(19, 31, 55, 0.08);
}
* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
html { min-height: 100%; background: var(--canvas); }
body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.015em;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 58px;
  padding: 0 max(18px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  background: var(--nav);
  backdrop-filter: saturate(170%) blur(22px);
}
.brand { display: flex; gap: 10px; align-items: center; font-weight: 680; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: white;
  color: #0b1020;
  font-size: 11px;
  letter-spacing: .03em;
}
.top-actions { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.user-name { opacity: .76; }
.text-button { min-height: 44px; border: 0; color: white; background: transparent; padding: 12px 0; cursor: pointer; }
.page-shell { width: min(100% - 32px, 1040px); margin: 0 auto; padding: 42px 0 120px; }
.eyebrow { margin-bottom: 10px; color: #64748b; font-size: 12px; font-weight: 750; letter-spacing: .11em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(32px, 5vw, 50px); line-height: 1.03; letter-spacing: -.045em; }
h2 { margin-bottom: 0; font-size: 21px; }
.lede { max-width: 650px; margin-bottom: 0; color: var(--muted); font-size: 17px; line-height: 1.5; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.primary-button, .secondary-button {
  min-height: 48px;
  border-radius: 999px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  font-weight: 650;
  cursor: pointer;
}
.primary-button { color: white; background: var(--blue); box-shadow: 0 7px 20px rgba(10,108,255,.22); }
.primary-button:hover { background: var(--blue-dark); }
.primary-button.compact { min-height: 42px; white-space: nowrap; }
.week-chip { padding: 10px 14px; border-radius: 999px; color: #334155; background: white; font-size: 13px; font-weight: 650; white-space: nowrap; }
.secondary-button { color: var(--blue); background: white; border-color: #c8dbff; white-space: nowrap; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.coverage-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; }
.coverage-form-grid label { min-width: 0; overflow-wrap: anywhere; }
.coverage-form-grid input, .coverage-form-grid select { width: 100%; min-width: 0; }
.report-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-metrics-grid .summary-card { min-width: 0; overflow-wrap: anywhere; }
.report-metrics-grid .summary-card:last-child { grid-column: auto; }
.summary-card { padding: 22px; background: white; border-radius: var(--radius); }
.summary-card strong { display: block; font-size: 25px; }
.summary-card span { color: var(--muted); font-size: 13px; }
.summary-card[href^="#"] { display: block; color: inherit; transition: background .15s ease, box-shadow .15s ease, transform .15s ease; }
.summary-card[href^="/manager/gaps"] { display: block; color: inherit; transition: background .15s ease, box-shadow .15s ease, transform .15s ease; }
.summary-card[href^="#"]:hover, .summary-card[href^="#"]:focus-visible { background: #f7f9fc; box-shadow: 0 0 0 2px var(--blue); transform: translateY(-1px); }
.summary-card[href^="/manager/gaps"]:hover, .summary-card[href^="/manager/gaps"]:focus-visible { background: #f7f9fc; box-shadow: 0 0 0 2px var(--blue); transform: translateY(-1px); }
.check-row { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.check-row input { width: 22px; height: 22px; }
.campaign-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 22px; }
.gap-campaign-form { margin-bottom: 22px; }
.manager-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.manager-action { min-height: 148px; padding: 24px; display: flex; flex-direction: column; justify-content: center; border: 1px solid #c8dbff; border-radius: var(--radius); color: var(--ink); background: white; box-shadow: var(--shadow); }
.manager-action:hover { border-color: var(--blue); transform: translateY(-1px); }
.manager-action span { margin-bottom: 9px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.manager-action strong { font-size: 24px; }
.manager-action small { max-width: 390px; margin-top: 7px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.manager-action-primary { color: white; border-color: var(--blue); background: var(--blue); }
.manager-action-primary span, .manager-action-primary small { color: rgba(255,255,255,.82); }
.manager-action-primary:hover { background: var(--blue-dark); }
.surface { overflow: hidden; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.surface-title { padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.status-pill { padding: 6px 10px; border-radius: 999px; color: #7c5200; background: #fff4d6; font-size: 12px; font-weight: 650; }
.staff-search { padding: 14px 20px; display: grid; gap: 7px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 650; }
.staff-search input { width: 100%; min-height: 46px; border: 1px solid #d8dde6; border-radius: 12px; padding: 0 14px; color: var(--ink); background: #fbfcfe; font-size: 16px; }
.staff-row { min-height: 72px; padding: 12px 20px; display: grid; grid-template-columns: 42px 1fr auto; gap: 13px; align-items: center; border-bottom: 1px solid var(--line); }
.staff-row:last-child { border-bottom: 0; }
.staff-row:hover { background: #f7f9fc; }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #074fb8; background: #eaf2ff; font-weight: 750; }
.staff-copy strong, .staff-copy small { display: block; }
.staff-copy small { margin-top: 3px; color: var(--muted); }
.report-row, .report-row-actions { min-width: 0; }
.report-row { width: 100%; padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 13px; align-items: start; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.report-row:last-child { border-bottom: 0; }
.report-row-actions { width: 100%; display: grid; gap: 10px; align-items: start; overflow-wrap: anywhere; }
.report-row-actions > * { max-width: 100%; }
.assignment-row > form { width: 100%; min-width: 0; }
.assignment-row select { width: 100%; min-width: 0; }
.assignment-row button { width: 100%; }
.report-anchor { scroll-margin-top: 76px; }
.audit-list { display: grid; }
.audit-row { min-width: 0; padding: 20px 22px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; border-bottom: 1px solid var(--line); }
.audit-row:last-child { border-bottom: 0; }
.audit-row:hover { background: #f7f9fc; }
.audit-copy { min-width: 0; }
.audit-copy strong, .audit-copy small { display: block; overflow-wrap: anywhere; }
.audit-copy strong { line-height: 1.35; }
.audit-copy small { margin-top: 6px; color: var(--muted); line-height: 1.45; }
.audit-actions { min-width: min(100%, 320px); display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: end; gap: 10px; }
.audit-actions label { min-width: 150px; display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 650; }
.audit-actions button { min-height: 50px; }
.roster-sheet { margin-bottom: 22px; }
.table-note { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.roster-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 0 22px 16px; color: var(--muted); font-size: 13px; }
.roster-legend span { display: inline-flex; align-items: center; gap: 7px; }
.roster-legend i { width: 14px; height: 14px; border: 1px solid rgba(16,24,40,.18); border-radius: 3px; }
.roster-scroll { overflow-x: auto; overscroll-behavior-inline: contain; border-top: 1px solid var(--line); }
.roster-scroll:focus { outline: 3px solid rgba(74,117,244,.2); outline-offset: -3px; }
.roster-matrix { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; color: #182230; font-size: 13px; }
.roster-matrix th, .roster-matrix td { min-width: 118px; height: 76px; padding: 0; border-right: 1px solid #cfd5dd; border-bottom: 1px solid #cfd5dd; vertical-align: top; }
.roster-matrix thead th { position: sticky; top: 0; z-index: 3; height: 48px; padding: 10px 8px; background: #f5f7fa; text-align: left; font-weight: 800; white-space: nowrap; }
.roster-matrix th:first-child { position: sticky; left: 0; z-index: 4; min-width: 104px; width: 104px; padding: 12px 10px; background: #f5f7fa; }
.roster-matrix tbody th { text-align: left; font-weight: 800; }
.roster-matrix tbody th small { display: block; margin-top: 4px; color: #667085; font-weight: 600; }
.shift-block { min-height: 76px; padding: 10px 8px; border-left: 4px solid rgba(16,24,40,.18); }
.shift-block + .shift-block { border-top: 1px solid rgba(16,24,40,.2); }
.shift-block strong { display: block; font-size: 13px; white-space: nowrap; }
.shift-block small { display: block; margin-top: 5px; color: #344054; font-size: 11px; }
.store-market { background: #f4efb5; }
.store-pitt { background: #bfe9c7; }
.store-kent { background: #f2b9ec; }
.chevron { color: #9aa1ad; font-size: 28px; }
.login-wrap { min-height: calc(100vh - 140px); display: grid; place-items: center; }
.login-card { width: min(100%, 480px); min-width: 0; padding: clamp(26px, 6vw, 46px); background: white; border-radius: 28px; box-shadow: var(--shadow); }
.login-card h1 { font-size: clamp(34px, 8vw, 48px); }
.form-stack { display: grid; gap: 18px; margin-top: 30px; }
.form-stack label, .time-grid label { display: grid; gap: 8px; color: #4b5563; font-size: 13px; font-weight: 650; }
input[type="text"], input[type="email"], input[type="password"], input[type="time"], input[type="date"], input[type="tel"], input[type="number"], input[type="search"], input[type="url"], input:not([type]), select, textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid #d8dde6;
  border-radius: 12px;
  padding: 0 14px;
  color: var(--ink);
  background: #fbfcfe;
  font-size: 16px;
}
input[type="text"]::placeholder, input[type="email"]::placeholder, input[type="password"]::placeholder, input[type="time"]::placeholder, input[type="date"]::placeholder, input[type="tel"]::placeholder, input[type="number"]::placeholder, input[type="search"]::placeholder, input[type="url"]::placeholder, input:not([type])::placeholder {
  color: var(--muted);
  opacity: 1;
}
textarea { min-height: 110px; padding-block: 12px; resize: vertical; }
.leave-form-surface { margin-bottom: 22px; }
.leave-form { padding: 22px; display: grid; gap: 18px; }
.leave-form label { display: grid; gap: 8px; color: #4b5563; font-size: 13px; font-weight: 650; }
.leave-date-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.optional { color: var(--muted); font-weight: 500; }
.leave-list { display: grid; }
.leave-card { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.leave-card:last-child { border-bottom: 0; }
.leave-card-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.leave-card p { margin: 14px 0 0; color: var(--ink); line-height: 1.5; overflow-wrap: anywhere; }
.leave-card p span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 12px; font-weight: 650; }
.leave-status { padding: 6px 10px; border-radius: 999px; background: #edf2f7; font-size: 12px; font-weight: 700; white-space: nowrap; }
.leave-status-approved { color: #166534; background: #dcfce7; }
.leave-status-declined { color: #991b1b; background: #fee2e2; }
.leave-status-pending { color: #7c5200; background: #fff4d6; }
.empty-state { padding: 28px 22px; color: var(--muted); text-align: center; }
.empty-state p { margin-bottom: 0; }
.decision-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.decision-fieldset { margin: 0; padding: 0; display: grid; gap: 18px; border: 0; }
.decision-fieldset legend { margin-bottom: 14px; font-size: 18px; font-weight: 700; }
.danger-button { color: #991b1b; border-color: #fecaca; }
.danger-button:hover { background: #fef2f2; }
input:focus { outline: 3px solid rgba(10,108,255,.18); border-color: var(--blue); }
.alert { margin-top: 20px; padding: 12px 14px; border-radius: 12px; color: #991b1b; background: #fef2f2; }
.success-banner { margin-bottom: 16px; padding: 13px 16px; border-radius: 13px; color: #166534; background: #dcfce7; font-weight: 650; }
.fine-print { margin: 20px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.week-nav { padding: 17px 20px; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; border-bottom: 1px solid var(--line); }
.week-nav strong, .week-nav small { display: block; }
.week-nav small { margin-top: 2px; color: var(--muted); }
.icon-button { width: 42px; height: 42px; border: 0; border-radius: 50%; display: grid; place-items: center; color: var(--blue); background: #edf4ff; font-size: 27px; cursor: pointer; }
.day-list { padding: 10px 20px 20px; }
.day-card { margin: 0; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); }
.day-card:last-child { border-bottom: 0; }
.day-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.day-title { font-size: 18px; font-weight: 700; }
.day-title small { margin-left: 5px; color: var(--muted); font-size: 12px; font-weight: 550; }
.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; }
.switch-label { min-height: 44px; display: flex; align-items: center; gap: 7px; color: #4b5563; font-size: 13px; }
.switch-label input { width: 22px; height: 22px; accent-color: var(--blue); }
.time-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; clear: both; }
.interval-list { display: grid; gap: 12px; }
.add-interval { margin-top: 12px; }
.remove-interval { min-height: 50px; }
.day-card.is-unavailable .time-grid, .day-card.is-unavailable .add-interval { opacity: .48; }
.time-grid input:disabled { cursor: not-allowed; }
.sticky-save { position: sticky; bottom: 16px; margin-top: 18px; padding: 14px 16px 14px 20px; display: flex; justify-content: space-between; align-items: center; gap: 18px; border: 1px solid rgba(220,225,233,.8); border-radius: 18px; background: rgba(255,255,255,.94); box-shadow: 0 14px 50px rgba(15,23,42,.16); backdrop-filter: blur(18px); }
.sticky-save strong, .sticky-save small { display: block; }
.sticky-save small { margin-top: 3px; color: var(--muted); }
@media (max-width: 680px) {
  .page-shell { width: min(100% - 24px, 1040px); padding-top: 28px; }
  .user-name { display: none; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading .primary-button, .availability-heading .secondary-button { width: 100%; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .campaign-detail-grid { grid-template-columns: 1fr; padding: 18px; }
  .coverage-form-grid { grid-template-columns: minmax(0, 1fr); }
  .summary-card:last-child { grid-column: 1 / -1; }
  .report-metrics-grid { grid-template-columns: 1fr; }
  .report-metrics-grid .summary-card:last-child { grid-column: auto; }
  .manager-actions { grid-template-columns: 1fr; }
  .manager-action { min-height: 126px; }
  .day-list { padding-inline: 16px; }
  .sticky-save { bottom: 8px; }
  .sticky-save { flex-wrap: wrap; }
  .sticky-save-note { display: none; }
  .sticky-save .page-actions { flex: 1 1 100%; width: 100%; min-width: 0; justify-content: stretch; }
  .sticky-save .page-actions input { flex: 1 1 12rem; min-width: 0; width: auto; }
  .sticky-save .page-actions .primary-button, .sticky-save .page-actions .secondary-button { flex: 1 1 12rem; min-height: 44px; width: 100%; }
  .sticky-save > .primary-button, .sticky-save > .secondary-button { min-height: 44px; width: 100%; }
  .sticky-save .primary-button { width: 100%; }
  .leave-date-grid { grid-template-columns: 1fr; }
  .leave-card-heading { align-items: flex-start; flex-direction: column; }
  .audit-row { grid-template-columns: 1fr; gap: 16px; }
  .audit-actions { min-width: 0; justify-content: stretch; }
  .audit-actions label, .audit-actions button { width: 100%; }
}
@media (max-width: 480px) {
  .time-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .remove-interval { grid-column: 1 / -1; width: 100%; }
  .copy-availability-form .secondary-button { width: 100%; }
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --ink: #f6f7fb; --muted: #a1a8b5; --canvas: #0e1118; --surface: #181d26; --line: #2a313d; --shadow: 0 16px 55px rgba(0,0,0,.35); }
  .summary-card, .login-card, .secondary-button, .week-chip { background: var(--surface); }
  .summary-card[href^="#"]:hover, .summary-card[href^="#"]:focus-visible { background: #202631; color: var(--ink); }
  .summary-card[href^="/manager/gaps"]:hover, .summary-card[href^="/manager/gaps"]:focus-visible { background: #202631; color: var(--ink); }
  .week-chip { color: var(--ink); }
  .staff-row:hover, .audit-row:hover { background: #202631; }
  input[type="text"], input[type="email"], input[type="password"], input[type="time"], input[type="date"], input[type="tel"], input[type="number"], input[type="search"], input[type="url"], input:not([type]), select, textarea, .staff-search input { color: var(--ink); background: #121720; border-color: #333b48; }
  input[type="text"]::placeholder, input[type="email"]::placeholder, input[type="password"]::placeholder, input[type="time"]::placeholder, input[type="date"]::placeholder, input[type="tel"]::placeholder, input[type="number"]::placeholder, input[type="search"]::placeholder, input[type="url"]::placeholder, input:not([type])::placeholder { color: var(--muted); opacity: 1; }
  .sticky-save { border-color: #303846; background: rgba(24,29,38,.94); }
}
