:root {
  --color-bg: hsl(218 100% 98%);
  --color-surface: #ffffff;
  --color-text: hsl(220 83% 9%);
  --color-muted: hsl(220 45% 38%);
  --color-navy: #082766;
  --color-navy-2: #123b82;
  --color-accent: hsl(222 100% 57%);
  --color-focus: hsl(222 100% 57%);
  --color-success: #197a4a;
  --color-warning: #b87913;
  --color-danger: #b42318;
  --color-line: hsl(221 100% 90%);
  --font-display:
    "DIN Condensed", "Avenir Next Condensed", "Franklin Gothic Condensed",
    sans-serif;
  --font-body: "Avenir Next", "Century Gothic", sans-serif;
  --font-mono: "SFMono-Regular", "Courier New", monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;
  --text-2xl: 2.5rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --radius-sm: 2px;
  --radius-md: 5px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgb(17 40 61 / 0.12), 0 4px 14px rgb(17 40 61 / 0.06);
  --shadow-md: 0 3px 8px rgb(17 40 61 / 0.14), 0 18px 48px rgb(17 40 61 / 0.12);
  --duration-fast: 140ms;
  --duration-base: 220ms;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
* {
  box-sizing: border-box;
}
html {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
}
body {
  margin: 0;
  min-width: 320px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  min-height: 42px;
}
button,
input,
select,
textarea {
  border-radius: var(--radius-sm);
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-focus) 50%, transparent);
  outline-offset: 2px;
}
.site-header {
  align-items: center;
  background: var(--color-navy);
  color: white;
  display: flex;
  height: 68px;
  justify-content: space-between;
  padding: 0 clamp(1rem, 5vw, 4.5rem);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  align-items: center;
  color: white;
  display: flex;
  gap: 0.65rem;
  text-decoration: none;
}
.brand-mark {
  background: linear-gradient(135deg, #3b6ce9 0%, #d92079 100%);
  clip-path: polygon(0 0, 100% 0, 78% 100%, 0 100%);
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 38px;
  padding: 0 13px 0 9px;
}
.brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}
.brand small {
  color: #bdc9d2;
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.header-meta {
  align-items: center;
  display: flex;
  font-size: var(--text-sm);
  gap: var(--space-4);
}
.text-button {
  background: transparent;
  border: 0;
  color: white;
  text-decoration: underline;
  text-underline-offset: 4px;
}
main {
  min-height: calc(100vh - 68px);
}
.access-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  min-height: calc(100vh - 68px);
}
.access-stage[hidden] {
  display: none;
}
.yard-ledger {
  background: var(--color-navy-2);
  color: white;
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  font-size: clamp(1.2rem, 4vw, 4.5rem);
  font-weight: 700;
  justify-content: center;
  line-height: 0.95;
  overflow: hidden;
  padding: 8vw;
  position: relative;
}
.yard-ledger:after {
  background: var(--color-accent);
  content: "";
  height: 12px;
  left: 0;
  position: absolute;
  right: 0;
  top: 20%;
}
.yard-ledger span:nth-child(2) {
  color: #8ea4b5;
  font-size: 0.34em;
  letter-spacing: 0.16em;
  margin-top: 1.5rem;
}
.yard-ledger span:nth-child(3) {
  border: 2px solid #7991a3;
  font-size: 0.2em;
  letter-spacing: 0.14em;
  margin-top: 3rem;
  padding: 0.8rem;
  width: max-content;
}
.access-panel {
  align-self: center;
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  margin: clamp(1rem, 6vw, 5rem);
  padding: clamp(1.5rem, 5vw, 3rem);
}
h1,
h2 {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
  line-height: 1.02;
  margin: 0.2em 0 0.4em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2rem, 5vw, var(--text-2xl));
}
h2 {
  font-size: var(--text-xl);
}
p {
  text-wrap: pretty;
}
.eyebrow {
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.11em;
  margin: 0;
  text-transform: uppercase;
}
label {
  display: grid;
  font-size: var(--text-sm);
  font-weight: 650;
  gap: 0.4rem;
  margin: 1rem 0;
}
input,
select,
textarea {
  background: #fff;
  border: 1px solid #aeb8bf;
  color: var(--color-text);
  min-height: 44px;
  padding: 0.72rem 0.78rem;
  width: 100%;
}
textarea {
  resize: vertical;
}
.field-error {
  color: var(--color-danger);
  font-size: var(--text-sm);
  min-height: 1.3em;
}
.primary,
.secondary,
.danger,
.danger-quiet {
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 750;
  padding: 0.7rem 1rem;
  transition:
    background var(--duration-fast),
    border var(--duration-fast),
    color var(--duration-fast),
    transform var(--duration-fast);
}
.primary {
  background: var(--color-accent);
  color: white;
}
.primary:hover {
  background: hsl(222 85% 47%);
}
.secondary {
  background: white;
  border-color: #8796a1;
  color: var(--color-navy);
}
.secondary:hover {
  background: hsl(217 92% 95%);
}
.danger {
  background: var(--color-danger);
  color: white;
}
.danger-quiet {
  background: white;
  border-color: #f0b7b1;
  color: var(--color-danger);
}
button:active {
  transform: scale(0.97);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}
.app-view {
  margin: 0 auto;
  max-width: 1240px;
  padding: 0 clamp(1rem, 4vw, 3rem) 4rem;
}
.status-rail {
  align-items: center;
  background: var(--color-navy-2);
  color: white;
  display: grid;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  grid-template-columns: 1fr auto auto;
  gap: 2rem;
  margin: 0 calc(clamp(1rem, 4vw, 3rem) * -1);
  padding: 0.7rem clamp(1rem, 4vw, 3rem);
  text-transform: uppercase;
}
.rail-label {
  color: #a9bbc8;
}
.workspace-head,
.section-heading {
  align-items: end;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.workspace-head {
  padding: 2.4rem 0 1.5rem;
}
.feedback {
  background: #e9f6ee;
  border-left: 4px solid var(--color-success);
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
}
.feedback:empty {
  display: none;
}
.status-panel,
.task-section {
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.2rem;
  padding: clamp(1.1rem, 3vw, 2rem);
}
.status-chip {
  background: #e1f3e8;
  border: 1px solid #92c7a8;
  color: var(--color-success);
  font-size: var(--text-sm);
  font-weight: 750;
  padding: 0.35rem 0.7rem;
  text-transform: capitalize;
}
.overview-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 1.4fr 0.85fr;
  margin-top: 1.2rem;
}
.overview-grid dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem 1rem;
  margin: 0;
}
.overview-grid dt {
  color: var(--color-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
}
.overview-grid dd {
  font-family: var(--font-mono);
  margin: 0;
}
.timeline {
  border-left: 3px solid #d3dbe0;
  display: grid;
  gap: 0.75rem;
  padding-left: 1rem;
}
.timeline span {
  color: var(--color-muted);
  position: relative;
}
.timeline span:before {
  background: #fff;
  border: 2px solid #a4b0b8;
  border-radius: 50%;
  content: "";
  height: 10px;
  left: -1.45rem;
  position: absolute;
  top: 0.2rem;
  width: 10px;
}
.timeline span.complete {
  color: var(--color-text);
  font-weight: 700;
}
.timeline span.complete:before {
  background: var(--color-success);
  border-color: var(--color-success);
}
.dock-callout {
  align-content: center;
  background: var(--color-navy);
  color: white;
  display: grid;
  min-height: 150px;
  padding: 1.2rem;
  text-align: center;
}
.dock-callout span {
  color: #b9c7d0;
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.dock-callout strong {
  font-family: var(--font-display);
  font-size: 2.2rem;
}
.slot-list {
  border-top: 1px solid var(--color-line);
  margin: 1rem 0;
}
.slot-filters {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr);
}
.appointment-summary {
  background: hsl(218 100% 98%);
  border: 1px solid var(--color-line);
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1rem;
  padding: 1rem;
}
.appointment-summary div {
  display: grid;
  gap: 0.25rem;
}
.appointment-summary span,
.review-list dt {
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.appointment-success {
  align-items: center;
  background: #e9f6ee;
  border: 1px solid #92c7a8;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto 1fr auto;
  margin-top: 1.2rem;
  padding: 1.2rem;
}
.appointment-success .result-icon {
  margin: 0;
}
.appointment-success h2,
.appointment-success p {
  margin: 0;
}
.text-link {
  background: transparent;
  border: 0;
  color: var(--color-navy);
  cursor: pointer;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.slot-row {
  align-items: center;
  border-bottom: 1px solid var(--color-line);
  display: grid;
  gap: 1rem;
  grid-template-columns: 70px 1fr 1fr 1fr;
  min-height: 58px;
  padding: 0.5rem;
}
.slot-header {
  background: hsl(217 92% 95%);
  font-size: var(--text-xs);
  font-weight: 750;
  min-height: 38px;
  text-transform: uppercase;
}
.slot-row time {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}
.slot-row input {
  justify-self: start;
  min-height: 20px;
  width: 20px;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.two-column {
  display: grid;
  gap: clamp(1.5rem, 5vw, 4rem);
  grid-template-columns: 1fr 1fr;
}
.consent {
  align-items: start;
  display: grid;
  grid-template-columns: 22px 1fr;
}
.consent input {
  min-height: 20px;
}
.yard-card {
  align-content: center;
  background: var(--color-navy-2);
  color: white;
  display: grid;
  min-height: 240px;
  padding: 2rem;
  text-align: center;
}
.yard-card h2 {
  margin-bottom: 1rem;
}
#check-in-section:has(#check-in-form[hidden]) {
  grid-template-columns: minmax(280px, 460px);
  justify-content: center;
}
.yard-card span,
.yard-card small {
  color: #b9c7d0;
}
.yard-card strong {
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
}
.file-drop {
  border: 2px dashed #95a3ad;
  padding: 1.2rem;
  text-align: center;
}
.file-drop input {
  border: 0;
  margin-top: 0.5rem;
  padding: 0;
}
progress {
  accent-color: var(--color-accent);
  height: 10px;
  width: 100%;
}
.record-list {
  display: grid;
  gap: 0.55rem;
}
.record-item {
  border-left: 3px solid var(--color-success);
  background: #edf6f0;
  padding: 0.7rem;
}
.empty-copy {
  color: var(--color-muted);
  font-style: italic;
}
.app-view[hidden] {
  display: none;
}
dialog {
  border: 0;
  box-shadow: var(--shadow-md);
  max-width: 520px;
  padding: 2rem;
  width: min(calc(100% - 2rem), 520px);
}
dialog::backdrop {
  background: rgb(17 40 61 / 0.72);
}
.result-icon {
  align-items: center;
  background: #e1f3e8;
  border-radius: 50%;
  color: var(--color-success);
  display: flex;
  font-size: 1.8rem;
  height: 52px;
  justify-content: center;
  margin: 0 auto 1rem;
  width: 52px;
}
#result-dialog {
  text-align: center;
}
.review-list {
  display: grid;
  gap: 0.35rem;
  grid-template-columns: 1fr 1.4fr;
  margin: 1.5rem 0;
}
.review-list dd {
  font-family: var(--font-mono);
  margin: 0;
}
.dock-assignment {
  align-content: center;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-sm);
  display: grid;
  justify-items: center;
  margin: 1.5rem 0;
  min-height: 360px;
  padding: 2rem;
  text-align: center;
}
.dock-assignment strong {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 8rem);
  line-height: 1;
}
.dock-assignment span {
  font-size: var(--text-lg);
  font-weight: 700;
}
.appointment-summary[hidden],
.appointment-success[hidden],
.dock-assignment[hidden],
.yard-card[hidden],
#check-in-form[hidden] {
  display: none;
}
.dialog-icon {
  align-items: center;
  background: #e8eef2;
  border-radius: 50%;
  color: var(--color-navy);
  display: flex;
  font-size: 1.5rem;
  font-weight: 800;
  height: 52px;
  justify-content: center;
  margin-bottom: 1rem;
  width: 52px;
}
.dialog-icon-warning {
  background: #fff2d6;
  color: var(--color-warning);
}
.offline-dialog {
  border-left: 5px solid var(--color-warning);
}
.offline-dialog .primary {
  width: 100%;
}
.access-stage,
.lookup-stage {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 68px);
  padding: 2rem;
}
.access-panel,
.lookup-panel,
.empty-state {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-sm);
  margin: 0;
  padding: 2rem;
  width: min(100%, 460px);
}
.access-stage[hidden],
.lookup-stage[hidden],
.empty-state[hidden] {
  display: none;
}
.access-panel .primary,
.lookup-panel .primary {
  width: 100%;
}
.empty-state {
  text-align: center;
}
.empty-icon {
  color: var(--color-muted);
  display: block;
  font-size: 3rem;
}
.dock-callout:not([data-assigned="true"]) {
  background: white;
  border: 1px solid var(--color-line);
  color: var(--color-text);
}
.dock-callout:not([data-assigned="true"]) span {
  color: var(--color-muted);
}
input:user-invalid,
select:user-invalid,
textarea:user-invalid {
  background: #fff3f2;
  border-color: var(--color-danger);
}
@media (max-width: 900px) {
  .access-stage {
    grid-template-columns: 1fr;
  }
  .yard-ledger {
    display: none;
  }
  .access-panel {
    justify-self: center;
    width: min(100% - 2rem, 480px);
  }
  .overview-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dock-callout {
    grid-column: 1/-1;
    min-height: 120px;
  }
  .two-column {
    grid-template-columns: 1fr;
  }
  .appointment-summary {
    grid-template-columns: 1fr;
  }
  .status-rail {
    grid-template-columns: 1fr auto;
  }
  .status-rail span:last-child {
    display: none;
  }
}
@media (max-width: 560px) {
  .site-header {
    height: 58px;
    padding: 0 0.8rem;
  }
  .brand small,
  .header-meta > span {
    display: none;
  }
  main {
    min-height: calc(100vh - 58px);
  }
  .access-stage {
    min-height: calc(100vh - 58px);
  }
  .access-panel {
    margin: 1rem;
    padding: 1.4rem;
  }
  .app-view {
    padding: 0 0.75rem 2rem;
  }
  .status-rail {
    margin: 0 -0.75rem;
    padding: 0.65rem 0.75rem;
  }
  .workspace-head,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .workspace-head button,
  .section-heading button {
    width: 100%;
  }
  .overview-grid {
    grid-template-columns: 1fr;
    gap: 1.3rem;
  }
  .dock-callout {
    grid-column: auto;
  }
  .task-section,
  .status-panel {
    padding: 1rem;
  }
  .button-row {
    display: grid;
  }
  .button-row button {
    width: 100%;
  }
  .slot-row {
    grid-template-columns: 28px 1fr;
  }
  .slot-header {
    display: none;
  }
  .slot-row > :not(input) {
    grid-column: 2;
  }
  .slot-row time::before {
    color: var(--color-muted);
    content: "Time: ";
    font-family: var(--font-body);
    font-size: var(--text-xs);
    text-transform: uppercase;
  }
  .slot-filters {
    grid-template-columns: 1fr;
  }
  .appointment-success {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .dock-assignment {
    min-height: 520px;
  }
  .header-meta {
    gap: 0.4rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
