* { box-sizing: border-box; }
:root {
  color-scheme: light;
  --ink: #162338;
  --muted: #4e5d6e;
  --blue: #1649ad;
  --blue-deep: #123677;
  --canvas: #f2f5f9;
  --line: #d9e1eb;
  --white: #fff;
  --radius: 12px;
  font-family: "Aptos", "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
body { margin: 0; line-height: 1.55; }
a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid #648df1; outline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, input[type="checkbox"] { cursor: pointer; }
.skip { position: absolute; top: -5rem; left: 1rem; background: white; padding: .75rem; z-index: 2; }
.skip:focus { top: .5rem; }
.topbar { background: #14233a; color: #fff; }
.topbar-inner { max-width: 1216px; min-height: 70px; margin: auto; padding: .8rem 1.5rem; display: flex; align-items: center; gap: 2rem; }
.topbar a { text-decoration: none; color: #e0e8f3; }
.topbar a:hover, .topbar a[aria-current] { color: #fff; }
.topbar a:focus-visible, .topbar button:focus-visible { outline-color: #aabfff; }
.brand { display: inline-flex; gap: .65rem; align-items: center; font-weight: 710; white-space: nowrap; }
.brand-mark { display: inline-flex; align-items: end; justify-content: center; gap: 3px; width: 30px; height: 30px; background: #dce7ff; border-radius: 7px; padding: 7px; }
.brand-mark i { display: block; flex: 1; background: #1a4798; border-radius: 1px; height: 7px; }
.brand-mark i:nth-child(2) { height: 11px; }
.brand-mark i:nth-child(3) { height: 15px; }
.topbar nav, .account { display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem; font-size: .875rem; }
.topbar nav a[aria-current] { text-decoration: underline; text-decoration-color: #9db8ff; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.account { margin-left: auto; }
.text-button { color: #e0e8f3; background: transparent; border: 0; padding: 0; }
.text-button:hover { color: white; text-decoration: underline; }
.container { max-width: 1216px; margin: auto; padding: 2.8rem 1.5rem 5rem; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.045em; line-height: 1.1; margin-bottom: .55rem; overflow-wrap: anywhere; }
h2 { font-size: 1.18rem; line-height: 1.3; letter-spacing: -.015em; margin-bottom: .75rem; }
h3 { font-size: .95rem; margin: 1rem 0 .3rem; }
p:last-child { margin-bottom: 0; }
.lede, .page-heading p, .muted, small { color: var(--muted); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: .52rem .95rem; border-radius: 8px; border: 1px solid transparent; font-weight: 640; font-size: .875rem; text-decoration: none; text-align: center; }
.primary { color: white; background: var(--blue); }
.primary:hover { color: white; background: var(--blue-deep); }
.secondary { border-color: #cdd9e8; background: var(--white); color: var(--blue-deep); }
.secondary:hover { background: #eef3fc; }
.small { min-height: 35px; padding: .34rem .63rem; font-size: .8rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.weekbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1rem; padding: .66rem .9rem; background: #e8eef8; border: 1px solid #d9e4f2; border-radius: var(--radius); }
.week-note { margin-left: .5rem; color: var(--muted); font-size: .8rem; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.45rem; }
.stat, .card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.stat { min-height: 105px; padding: .95rem 1.1rem; display: flex; flex-direction: column; }
.stat span { color: var(--muted); font-size: .86rem; }
.stat strong { font-size: 2rem; line-height: 1.15; margin: .22rem 0; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat strong small { font-size: .85rem; letter-spacing: 0; font-weight: 520; }
.card { padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.card.table-card { padding: 0; }
.table-card h2 { margin: 0; padding: 1.1rem 1.25rem .85rem; }
.scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th { background: #f5f7fb; font-size: .78rem; color: #425269; white-space: nowrap; }
th, td { padding: .72rem 1.25rem; border-top: 1px solid #e3e9f1; vertical-align: top; }
td a { font-weight: 620; }
td small { display: block; margin-top: .15rem; overflow-wrap: anywhere; }
.evidence-note { max-width: 32ch; }
td strong { color: var(--ink); }
.empty { padding: .2rem 1.25rem 1.15rem; color: var(--muted); }
.status { display: inline-block; padding: .15rem .58rem; background: #edf1f7; color: #405271; border-radius: 100px; font-weight: 640; font-size: .8rem; white-space: nowrap; }
.status.scheduled, .status.requested { background: #e7efff; color: #244982; }
.status.approved, .notice.success { background: #e5f3eb; color: #17563a; }
.status.submitted, .status.returned, .flagged { background: #fff6df; color: #68460b; }
.flagged { border-color: #ecd8a0; }
.flagged ul { margin-bottom: 0; }
.flag-text { color: #744711; }
.notice { padding: .8rem 1rem; border-radius: 8px; border: 1px solid #ccd9ed; background: #eaf1fd; margin-bottom: 1rem; }
.notice.error, .errorlist { color: #8b2031; }
.notice.error { background: #fff0f1; border-color: #ebccd1; }
.batch-controls { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; padding: .9rem 1.25rem; border-top: 1px solid var(--line); }
.batch-form { margin: 0; }
.field { display: grid; gap: .3rem; }
.field label { font-weight: 640; font-size: .88rem; }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; border: 1px solid #b8c6da; border-radius: 7px; padding: .45rem .55rem; background: white; color: var(--ink); }
.field textarea { resize: vertical; }
.field [aria-invalid="true"] { border-color: #a33443; }
.checkbox { display: inline-flex; align-items: start; gap: .5rem; font-size: .9rem; }
input[type="checkbox"] { flex: none; width: 1rem; height: 1rem; accent-color: var(--blue); }
.help, .errorlist { font-size: .85rem; margin: 0; }
.help { color: var(--muted); }
.stack { display: grid; align-content: start; gap: .95rem; }
.stack > h2, .stack > p, .stack > .card { margin-bottom: 0; }
.stack > .button { justify-self: start; }
.narrow { max-width: 610px; }
.back { display: inline-block; margin-bottom: 1rem; font-size: .9rem; }
.columns { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.details { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, 1.6fr); gap: .55rem .8rem; font-size: .9rem; }
.details dt { color: var(--muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.simple-list, .timeline { padding: 0; margin: 0; list-style: none; }
.simple-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .15rem 1rem; padding: .45rem 0; }
.simple-list li + li, .timeline li + li { border-top: 1px solid var(--line); }
.timeline li { padding: .65rem 0; font-size: .9rem; }
.timeline small { display: block; }
.timeline li p { margin: .35rem 0 0; }
.period-form { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; }
.login-page { min-height: calc(100vh - 70px); display: grid; align-content: center; }
.login-card { width: min(100%, 820px); margin: auto; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: white; }
.login-context, .login-form { padding: clamp(1.5rem, 5vw, 3.4rem); }
.login-context { color: white; background: #182e50; display: flex; flex-direction: column; justify-content: center; }
.login-context p { color: #dce7f8; max-width: 27ch; }
.login-form h2 { font-size: 1.55rem; }
.login-form .button { width: 100%; }
.login-apply { margin-top: 1.25rem; font-size: .92rem; }
.unitbar { background: #fff; border-bottom: 1px solid var(--line); }
.unitbar-inner { max-width: 1216px; margin: auto; padding: .5rem 1.5rem; color: var(--muted); font-size: .86rem; }
.unit-switch { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.unit-switch select { max-width: 100%; padding: .35rem .5rem; border: 1px solid #cdd9e8; border-radius: 7px; background: #fff; color: var(--ink); }
.task-picker { min-width: 0; border: 0; padding: 0; margin: 0; }
.task-picker legend { font-weight: 680; margin-bottom: .45rem; }
.task-option { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: .65rem .7rem; border: 1px solid var(--line); border-radius: 9px; }
.task-option + .task-option { margin-top: .45rem; }
.task-option:has(input:checked) { border-color: var(--blue); background: #edf3ff; }
.task-option label { display: flex; align-items: center; gap: .55rem; cursor: pointer; }
.task-option input { width: 1rem; height: 1rem; flex: none; accent-color: var(--blue); }
.task-context, .task-option small { display: block; }
@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; gap: .6rem 1rem; }
  .topbar nav { order: 3; width: 100%; }
  .container { padding: 1.8rem .95rem 3rem; }
  .page-heading { align-items: start; flex-direction: column; }
  .stats { gap: .45rem; }
  .stat { padding: .65rem .5rem; }
  .stat span { font-size: .75rem; }
  .stat strong { font-size: 1.45rem; }
  .columns, .login-card { grid-template-columns: 1fr; }
  .login-context h1 br { display: none; }
  th, td { padding: .6rem .8rem; }
}
