:root {
  color-scheme: light;
  --ink: #16211d;
  --muted: #5c6d66;
  --line: #d8e1dc;
  --paper: #ffffff;
  --canvas: #f2f5f3;
  --brand: #12392f;
  --brand-bright: #1e6753;
  --danger: #9e2f2f;
  --focus: #1479c9;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .7rem 1rem; background: #fff; color: var(--brand); }
.skip-link:focus { top: 1rem; }

.topbar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1.15rem clamp(1rem, 4vw, 3rem); color: #fff; background: var(--brand); }
.topbar h1 { margin: .1rem 0 0; font-size: clamp(1.35rem, 3vw, 2rem); }
.eyebrow, .step-label { margin: 0; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 800; }
.eyebrow { color: #bcd9cf; }
.step-label { color: var(--brand-bright); }
.account { display: flex; gap: .75rem; align-items: center; }

.auth-panel { max-width: 34rem; margin: 12vh auto; padding: 2rem; background: var(--paper); border: 1px solid var(--line); border-radius: 1rem; text-align: center; box-shadow: 0 18px 50px rgba(18,57,47,.08); }
.shell { max-width: 1180px; margin: 0 auto; padding: 1rem; }
.facility-bar, .panel { background: var(--paper); border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 10px 30px rgba(18,57,47,.05); }
.facility-bar { display: grid; grid-template-columns: 1fr minmax(16rem, 23rem) auto; gap: 1rem; align-items: center; padding: 1rem 1.25rem; }
.facility-bar h2, .facility-bar p { margin: 0; }
.facility-bar p { margin-top: .3rem; color: var(--muted); }

.task-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 1rem 0; }
.task-tab { min-height: 3.25rem; border: 1px solid var(--line); border-radius: .8rem; color: var(--brand); background: #fff; font-weight: 800; }
.task-tab.is-active { color: #fff; background: var(--brand); border-color: var(--brand); }

.panel { padding: clamp(1rem, 3vw, 2rem); }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.panel-heading h2 { margin: .25rem 0 0; font-size: clamp(1.35rem, 3vw, 1.85rem); }
.required-note { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field { display: grid; gap: .4rem; align-content: start; }
.field--wide { grid-column: 1 / -1; }
.field--compact { gap: .25rem; }
.field label, .fieldset legend { font-weight: 750; }
.field input, .field select, .field textarea { width: 100%; min-height: 2.9rem; border: 1px solid #aebdb5; border-radius: .65rem; padding: .65rem .75rem; color: var(--ink); background: #fff; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 2px; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.field-error { min-height: 1.1rem; margin: 0; color: var(--danger); font-size: .83rem; }
.fieldset { margin: 0; border: 0; padding: 0; }
.choice { display: flex; align-items: center; gap: .55rem; min-height: 2rem; }
.choice input { width: 1.2rem; height: 1.2rem; }
.confirmation { margin: 1.25rem 0; padding: 1rem; background: #edf5f1; border: 1px solid #bdd3c9; border-radius: .75rem; }
.choice--confirm { align-items: flex-start; font-weight: 750; }

.button { min-height: 2.65rem; border: 1px solid var(--brand); border-radius: .65rem; padding: .6rem 1rem; color: var(--brand); background: #fff; font-weight: 800; }
.button--primary { color: #fff; background: var(--brand); }
.button--danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.button--quiet { border-color: currentColor; color: inherit; background: transparent; }
.button--large { width: 100%; min-height: 3.5rem; }
.button--small { min-height: 2.2rem; padding: .4rem .7rem; }
.button:disabled { cursor: wait; opacity: .55; }

.status { margin: 0 0 1rem; padding: .85rem 1rem; border-radius: .75rem; border: 1px solid #aab8b2; background: #fff; }
.status--success { color: #12533e; background: #e9f7f0; border-color: #9bc9b7; }
.status--error { color: #7d2020; background: #fff0f0; border-color: #e5aaaa; }
.connection { padding: .5rem .7rem; border-radius: 999px; font-weight: 800; white-space: nowrap; }
.connection--online { color: #12533e; background: #e0f4ea; }
.connection--offline { color: #7d2020; background: #ffe4e4; }
.search-field { max-width: 32rem; margin-bottom: 1rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .75rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.empty-row { padding: 2rem; text-align: center; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 760px) {
  .topbar { align-items: flex-start; }
  .account { flex-direction: column; align-items: end; }
  .facility-bar { grid-template-columns: 1fr; }
  .connection { justify-self: start; }
  .form-grid { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }
  .task-tabs { position: sticky; top: .5rem; z-index: 10; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

