:root {
  color-scheme: light;
  --page-gutter: clamp(24px, 2.5vw, 48px);
  --content-width: 1480px;
  --ink: #1e293b;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --surface: #ffffff;
  --canvas: #f5f7fa;
  --navy: #17375e;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --green: #15803d;
  --green-soft: #f0fdf4;
  --amber: #a16207;
  --amber-soft: #fffbeb;
  --red: #b91c1c;
  --red-soft: #fef2f2;
  font-family: "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

button, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 3px solid #60a5fa;
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 5;
  padding: 9px 12px;
  background: #fff;
  color: var(--navy);
  border-radius: 5px;
}

.skip-link:focus { top: 8px; }

.topbar {
  height: 66px;
  padding: 0 max(var(--page-gutter), calc((100% - var(--content-width)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand, .topbar-meta { display: flex; align-items: center; }
.brand { gap: 11px; color: var(--navy); font-weight: 650; letter-spacing: .01em; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 7px; background: var(--navy); color: #fff; font-size: 17px; }
.brand-divider { color: #cbd5e1; padding: 0 5px; font-weight: 400; }
.topbar-meta { gap: 16px; color: var(--muted); font-size: 12px; }
.environment-label { padding: 4px 8px; border: 1px solid #bfdbfe; border-radius: 99px; color: #1d4ed8; background: var(--blue-soft); font-size: 10px; font-weight: 750; letter-spacing: .08em; }

.prototype-banner {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  width: calc(100% - 2 * var(--page-gutter));
  max-width: var(--content-width);
  margin: 20px auto 0;
  padding: 12px 18px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #f0f7ff;
  color: #1e3a5f;
}

.banner-icon { flex: 0 0 20px; display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid #60a5fa; border-radius: 50%; font-size: 12px; font-weight: 700; }
.prototype-banner p { margin: 0; font-size: 12px; }
.page-shell { width: calc(100% - 2 * var(--page-gutter)); max-width: var(--content-width); margin: 0 auto; padding: 0 0 28px; }

.priority-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 24px 0 30px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}

.priority-item { display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px; color: #475569; text-decoration: none; border-radius: 7px; font-weight: 600; }
.priority-item.active { color: var(--navy); background: #eaf0f7; }
.priority-item.disabled { color: #94a3b8; cursor: default; }
.priority-number { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #e2e8f0; font-size: 11px; }
.priority-item.active .priority-number { color: #fff; background: var(--navy); }
.coming-soon { padding: 2px 6px; border-radius: 4px; background: #edf0f4; color: #78879a; font-size: 10px; font-weight: 600; }

.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 19px; }
.eyebrow { margin: 0 0 4px; color: #64748b; font-size: 10px; font-weight: 750; letter-spacing: .11em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 4px; color: #172b45; font-size: clamp(24px, 3vw, 30px); letter-spacing: -.035em; line-height: 1.18; }
.section-description { margin: 0; color: var(--muted); font-size: 13px; }
.sample-count { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.sample-dot, .source-dot { width: 7px; height: 7px; border-radius: 50%; background: #3b82f6; }

.filter-panel, .table-panel { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 1px 2px #0f172a08; }
.filter-panel { padding: 17px 20px 19px; margin-bottom: 15px; }
.filter-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.filter-heading h2 { margin-bottom: 3px; font-size: 14px; }
.filter-heading p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.text-button { padding: 4px 2px; border: 0; background: transparent; color: #1d4ed8; font-size: 12px; font-weight: 650; cursor: pointer; }
.text-button:hover { text-decoration: underline; }
.filter-grid { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 13px; }
.assignment-filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.filter-field { display: grid; gap: 6px; color: #475569; font-size: 11px; font-weight: 650; }
.filter-field select { width: 100%; min-height: 39px; padding: 7px 34px 7px 10px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #1e293b; font-size: 13px; font-weight: 450; }
.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; }

.table-panel { overflow: hidden; }
.table-wrap { overflow-x: auto; }
.table-wrap[tabindex]:focus-visible { outline-offset: -3px; }
table { width: 100%; min-width: 1230px; border-collapse: separate; border-spacing: 0; text-align: left; }
thead { background: #f8fafc; }
th { padding: 11px 13px; border-bottom: 1px solid var(--line); color: #64748b; font-size: 10px; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
td { padding: 14px 13px; border-bottom: 1px solid #edf1f5; color: #334155; vertical-align: middle; font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdff; }
.employee-cell { min-width: 205px; }
.employee-name { display: block; margin-bottom: 3px; color: #172b45; font-weight: 700; font-size: 13px; }
.assignment-name { display: block; max-width: 250px; color: #64748b; font-size: 11px; }
.assignment-id { display: block; color: #94a3b8; font-size: 10px; }
.hours-cell { min-width: 155px; }
.hours-value { color: #172b45; font-size: 14px; font-weight: 700; white-space: nowrap; }
.state-chip { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; padding: 3px 7px; border-radius: 99px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.state-chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.state-complete { color: var(--green); background: var(--green-soft); }
.state-incomplete, .state-partial, .state-future { color: var(--amber); background: var(--amber-soft); }
.state-unavailable, .state-unknown { color: #475569; background: #f1f5f9; }
.state-stale, .state-review-required { color: var(--red); background: var(--red-soft); }
.state-exempt { color: #5b21b6; background: #f5f3ff; }
.punch-time { display: block; color: #334155; white-space: nowrap; }
.observed-punch-cell { min-width: 220px; }
.observed-punch-cell > span { display: block; margin-bottom: 3px; }
.observed-only { color: #475569; font-weight: 700; }
.observed-event { color: #334155; font-size: 12px; white-space: nowrap; }
.observed-open-pair { width: fit-content; margin-top: 4px; padding: 3px 7px; border: 1px solid #d97706; border-radius: 5px; background: #fffbeb; color: #92400e; font-size: 10px; font-weight: 800; }
.attendance-state { display: inline-block; padding: 4px 8px; border: 1px solid transparent; border-radius: 5px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.attendance-punched-in { border-color: #bbf7d0; color: #166534; background: #f0fdf4; }
.attendance-punched-out { border-color: #cbd5e1; color: #475569; background: #f8fafc; }
.attendance-unknown, .attendance-unavailable { border-color: #e2e8f0; color: #64748b; background: #f8fafc; }
.attendance-stale, .attendance-review-required { border-color: #fecaca; color: #991b1b; background: #fff7f7; }
.attendance-exempt { border-color: #ddd6fe; color: #5b21b6; background: #f5f3ff; }
.subtle { display: block; color: #94a3b8; font-size: 10px; }
.dept-name { display: block; color: #334155; font-weight: 600; white-space: nowrap; }
.shift-name { display: block; margin-top: 2px; color: #64748b; font-size: 10px; }
.schedule-time { display: block; color: #334155; white-space: nowrap; }
.schedule-label { display: block; color: #94a3b8; font-size: 10px; }
.notes-button { min-height: 30px; padding: 5px 8px; border: 1px solid #cbd5e1; border-radius: 5px; background: white; color: #1d4ed8; font-size: 11px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.notes-button:hover { border-color: #93c5fd; background: #f8fbff; }
.notes-unknown { color: #64748b; white-space: nowrap; }
.empty-state { padding: 46px 18px; text-align: center; }
.empty-icon { margin-bottom: 8px; color: #94a3b8; font-size: 27px; }
.empty-state h2 { margin-bottom: 4px; font-size: 15px; }
.empty-state p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.table-footer { display: flex; justify-content: space-between; gap: 14px; padding: 11px 14px; border-top: 1px solid var(--line); color: #64748b; background: #fcfdff; font-size: 11px; }
.data-source-note { display: inline-flex; align-items: center; gap: 6px; }
.source-dot { width: 6px; height: 6px; background: #60a5fa; }

.lower-priority { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin-top: 18px; }
.orders-section, .starts-section { margin-top: 32px; }
.orders-section h2, .starts-section h2 { margin-bottom: 4px; color: #172b45; font-size: 24px; }
.filter-heading h3 { margin: 0 0 3px; font-size: 14px; }
.orders-table { min-width: 760px; }
.later-card { display: flex; align-items: center; gap: 13px; min-height: 91px; padding: 15px 17px; border: 1px dashed #cbd5e1; border-radius: 9px; background: #f9fafb; }
.later-number { display: grid; flex: 0 0 30px; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #475569; background: #e2e8f0; font-size: 12px; font-weight: 750; }
.later-card h2 { margin-bottom: 3px; color: #334155; font-size: 13px; }
.later-card p { margin: 0; color: #64748b; font-size: 11px; }
.later-label { margin-left: auto; color: #94a3b8; font-size: 10px; white-space: nowrap; }
.page-footer { display: flex; justify-content: space-between; gap: 14px; margin-top: 25px; color: #94a3b8; font-size: 10px; }

.notes-dialog { width: min(520px, calc(100vw - 28px)); max-height: min(680px, calc(100vh - 36px)); padding: 0; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 22px 70px #0f172a33; color: var(--ink); }
.notes-dialog::backdrop { background: #0f172a70; }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 21px 12px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; color: #172b45; font-size: 20px; }
.icon-button { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #64748b; font-size: 20px; cursor: pointer; }
.notes-employee { margin: 14px 21px 9px; color: #475569; font-size: 12px; font-weight: 650; }
.notes-list { display: grid; gap: 9px; max-height: 330px; overflow-y: auto; margin: 0; padding: 0 21px 6px; list-style: none; }
.note-item { padding: 11px 12px; border: 1px solid #e5eaf0; border-radius: 7px; background: #fbfcfe; }
.note-date { display: block; margin-bottom: 4px; color: #64748b; font-size: 10px; font-weight: 650; }
.note-text { margin: 0; color: #334155; font-size: 12px; }
.dialog-caution { margin: 14px 21px 19px; padding: 9px 10px; border-radius: 6px; background: #f1f5f9; color: #64748b; font-size: 10px; }
.request-dialog { width: min(760px, calc(100vw - 28px)); }
.request-fields [hidden] { display: none !important; }
.request-actions .request-action { display: block; margin: 4px 0; }
.request-fields { display: grid; gap: 14px; padding: 18px 21px; }
.new-order-form { display: grid; gap: 14px; }
.request-tracking-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.request-identifier { display: block; max-width: 240px; overflow-wrap: anywhere; }
.request-record-button { display: block; margin-top: 6px; }
.request-detail-list { display: grid; grid-template-columns: minmax(140px, 1fr) 2fr; gap: 8px 16px; font-size: 12px; }
.request-detail-list dt { color: var(--muted); }
.request-detail-list dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.request-detail-heading { margin: 18px 0 10px; font-size: 14px; }
.request-fields p { margin: 0; }
.request-fields .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.filter-field input, .filter-field textarea { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font: inherit; color: var(--ink); background: var(--surface); }
.filter-field textarea { resize: vertical; }
.request-confirmation { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; }
.request-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.request-error { color: var(--red); font-size: 12px; }
.request-feedback { color: var(--navy); font-size: 13px; overflow-wrap: anywhere; }
button:disabled { opacity: .55; cursor: not-allowed; }

@media (max-width: 820px) {
  :root { --page-gutter: 16px; }
  .filter-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .assignment-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .priority-nav { overflow-x: auto; }
  .priority-item { white-space: nowrap; }
}

@media (max-width: 520px) {
  :root { --page-gutter: 12px; }
  .topbar { height: 58px; }
  .brand-name { font-size: 12px; }
  .topbar-date { display: none; }
  .prototype-banner { margin-top: 13px; padding: 10px 11px; }
  .priority-nav { margin-top: 19px; margin-bottom: 23px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .filter-panel { padding: 14px; }
  .filter-grid { grid-template-columns: 1fr; }
  .request-fields .filter-grid { grid-template-columns: 1fr; }
  .request-detail-list { grid-template-columns: 1fr; gap: 4px; }
  .request-detail-list dd { margin-bottom: 8px; }
  .assignment-filter-grid { grid-template-columns: 1fr; }
  .lower-priority { grid-template-columns: 1fr; }
  .page-footer, .table-footer { align-items: flex-start; flex-direction: column; }
  .later-card { flex-wrap: wrap; }
  .later-card > div:nth-child(2) { flex: 1; min-width: 0; }
  .later-label { flex-basis: 100%; margin-left: 43px; }
}

