:root {
  --navy: #0b1728;
  --navy-2: #12243c;
  --ink: #122033;
  --muted: #4b5a6b;
  --line: #d5dde6;
  --bg: #e4eaf1;
  --card: #ffffff;
  --gold: #d4a017;
  --gold-soft: #f6e7b8;
  --safe: #0b7a3a;
  --safe-bg: #e3f6ea;
  --warn: #9a6700;
  --warn-bg: #fff3c4;
  --warn-border: #e3b341;
  --danger: #b42318;
  --danger-bg: #fde8e6;
  --asap: #9a3412;
  --asap-bg: #ffedd5;
  --shadow: 0 8px 24px rgba(11, 23, 40, 0.08);
  --radius: 14px;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 400px at 10% -10%, #dce7f3 0%, transparent 55%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.45;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--gold);
  color: #111;
  padding: 8px 12px;
  z-index: 20;
}
.skip-link:focus { top: 12px; }

.topbar {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #f4f7fb;
  border-bottom: 4px solid var(--gold);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 20px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.mark { flex: none; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c9d6e6;
  font-weight: 600;
}
.brand-text h1 {
  margin: 1px 0 0;
  font-family: var(--cond);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.view-toggle {
  display: flex;
  background: rgba(7, 17, 29, 0.55);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}
.view-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #d5deea;
  font: 700 14px/1 var(--font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.view-toggle button[aria-selected="true"] {
  background: #f4f7fb;
  color: var(--navy);
}
.view-toggle button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

main { max-width: 1180px; margin: 0 auto; padding: 28px 20px 48px; }

.section-head { margin-bottom: 16px; }
.section-head h2, .completed-head {
  margin: 0 0 4px;
  font-family: var(--cond);
  font-size: 28px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.section-head p { margin: 0; color: var(--muted); max-width: 62ch; }
.section-head-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
}
.queue-count {
  margin: 0;
  font-family: var(--cond);
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form-card, .ticket, .tracker-card, .confirm-card { padding: 20px; }

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-span-2 { grid-column: 1 / -1; }
.field span, .grades-head h3, fieldset.urgency-box legend {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #314257;
}
.field input, .field textarea, .grade-grid input, .grade-grid select, .assign-row input {
  width: 100%;
  border: 1px solid #c5d0dc;
  border-radius: 10px;
  padding: 10px 12px;
  font: 500 15px/1.3 var(--font);
  color: var(--ink);
  background: #fbfcfe;
}
.field input:focus, .field textarea:focus, .grade-grid input:focus, .grade-grid select:focus, .assign-row input:focus {
  outline: 2px solid #1c4e80;
  outline-offset: 1px;
  border-color: #1c4e80;
}
.field textarea { resize: vertical; min-height: 68px; }

.grades-head { margin: 22px 0 12px; }
.grades-head h3 { margin: 0 0 4px; font-size: 13px; }
.grades-head p { margin: 0; color: var(--muted); font-size: 13px; }

.grade-rows { display: grid; gap: 12px; }
.grade-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #f8fafc;
}
.grade-card.is-safe { background: var(--safe-bg); border-color: #b7e0c5; }
.grade-card.is-danger { background: var(--danger-bg); border-color: #f0b4ae; }
.grade-name {
  font-family: var(--cond);
  font-size: 22px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.grade-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.grade-grid label { display: flex; flex-direction: column; gap: 5px; }
.grade-grid label span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #314257;
}
.meter {
  margin-top: 12px;
  height: 12px;
  background: #d9e1ea;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}
.meter-fill, .meter-req {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
}
.meter-fill { background: #35506c; }
.meter-req { background: var(--safe); opacity: 0.9; }
.meter-req.is-danger { background: var(--danger); }
.meter-safe {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: #111;
  box-shadow: 0 0 0 1px #fff;
}
.grade-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
  font-size: 13px;
}
.grade-meta strong { font-family: var(--mono); font-weight: 600; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}
.pill-safe { background: #166534; color: #fff; }
.pill-danger { background: var(--danger); color: #fff; }
.pill-idle { background: #e5ebf1; color: #334155; }

.totals-bar {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: var(--navy);
  color: #fff;
  border-radius: 12px;
  padding: 14px 16px;
}
.totals-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c5d2e2;
}
.totals-bar strong {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
}
.totals-alert {
  grid-column: 1 / -1;
  background: var(--danger);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 8px;
  padding: 8px 10px;
}
.totals-alert ul { margin: 0; padding-left: 1.2em; }
.totals-alert li { margin: 0 0 4px; text-transform: none; letter-spacing: 0; }

.urgency-box {
  margin: 18px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.radio-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}
.radio-pill:has(input:checked) {
  border-color: var(--navy);
  background: #eef3f8;
}
.window-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.form-error {
  margin: 14px 0 0;
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #f0b4ae;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
}
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  font: 700 14px/1 var(--font);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn-primary { background: #0f7a3c; color: #fff; }
.btn-primary:hover { background: #0b6632; }
.btn-primary:disabled { background: #8aa596; cursor: not-allowed; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: #07111d; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}
.btn-wide { width: 100%; }

.confirm-card { text-align: center; padding: 32px 22px; }
.confirm-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--safe);
  color: #fff;
  font-size: 32px;
  display: grid;
  place-items: center;
}
.confirm-card h2 {
  margin: 0;
  font-family: var(--cond);
  font-size: 32px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.confirm-lead { color: var(--muted); margin: 6px 0 18px; }
.confirm-details {
  text-align: left;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 12px;
  margin: 0 auto 8px;
  max-width: 460px;
}
.confirm-details dt {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
}
.confirm-details dd { margin: 0; font-weight: 600; }

.stack { display: grid; gap: 12px; }
.empty {
  background: #f5f7fa;
  border: 1px dashed #c5d0dc;
  border-radius: 12px;
  padding: 20px;
  color: var(--muted);
}

.tracker-card { border-left: 5px solid var(--gold); }
.tracker-top, .ticket-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}
.station-title {
  margin: 0;
  font-family: var(--cond);
  font-size: 24px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.meta, .addr, .notes { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.order-id { font-family: var(--mono); font-size: 12px; color: var(--muted); }

.status-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 14px;
}
.status-step {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7a8a;
}
.status-step .dot {
  height: 7px;
  border-radius: 99px;
  background: #d3dbe4;
  margin-bottom: 6px;
}
.status-step.is-done .dot, .status-step.is-current .dot { background: var(--safe); }
.status-step.is-current { color: var(--safe); font-weight: 800; }
.status-step.is-done { color: #255a38; }

.dispatch-grid { display: grid; gap: 16px; }
.ticket { position: relative; }
.ticket-flags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 5px 8px;
}
.badge-asap { background: var(--asap-bg); color: var(--asap); }
.badge-window { background: #e8eef6; color: #1e3a5f; }
.badge-est {
  background: var(--warn-bg);
  color: #7a4f00;
  border: 2px solid var(--warn-border);
  box-shadow: 0 0 0 2px #fff3c4;
}
.grade-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13px; }
.grade-table th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 0 6px 6px 0;
}
.grade-table td {
  padding: 7px 6px 7px 0;
  border-bottom: 1px solid #eef2f6;
  font-family: var(--mono);
  font-size: 13px;
}
.grade-table td:first-child, .grade-table th:first-child { font-family: var(--font); font-weight: 700; }
.ticket-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.ticket-stats div { min-width: 120px; }
.ticket-stats span { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ticket-stats strong { font-family: var(--mono); font-size: 18px; }
.assign-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.assign-row label { display: flex; flex-direction: column; gap: 5px; }
.assign-row label span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #314257;
}

.completed-head { margin: 28px 0 12px; color: var(--muted); }
.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 40px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: start;
}
.site-footer p { margin: 0; max-width: 72ch; }
.site-footer code { font-family: var(--mono); font-size: 12px; }
.text-btn {
  appearance: none;
  background: none;
  border: 0;
  color: #1e3a5f;
  font: 700 13px/1 var(--font);
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .layout, .grade-grid, .window-fields, .field-grid, .assign-row, .confirm-details {
    grid-template-columns: 1fr;
  }
  .field-span-2 { grid-column: auto; }
  .status-bar { gap: 4px; }
  .totals-bar { grid-template-columns: 1fr; }
}

.field input, .field textarea, .grade-grid input, .grade-grid select, .assign-row input, .size-custom, .confirm-size {
  min-height: 48px;
  font-size: 16px;
}

.btn {
  min-height: 52px;
  padding: 14px 18px;
  font-size: 16px;
}

.hint {
  background: #fff8e1;
  border: 1px solid #e3b341;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 14px;
  color: #5c4300;
  font-size: 14px;
}
.hint strong { display: block; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }

.size-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #314257;
  margin: 12px 0 6px;
}
.size-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.size-chips button {
  appearance: none;
  border: 1px solid #c5d0dc;
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  min-height: 44px;
  padding: 8px 12px;
  font: 700 14px/1 var(--font);
  cursor: pointer;
}
.size-chips button[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.size-chips button.is-unknown[aria-pressed="true"] {
  background: #9a6700;
  border-color: #9a6700;
}
.size-custom { margin-top: 8px; }

.readings-toggle {
  margin-top: 12px;
  appearance: none;
  background: none;
  border: 0;
  color: #1e3a5f;
  font: 700 14px/1 var(--font);
  text-decoration: underline;
  cursor: pointer;
  padding: 8px 0;
}
.readings-block { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.req-field input { font-size: 22px; font-family: var(--mono); font-weight: 600; min-height: 56px; }

.pin-card { max-width: 420px; margin: 0 auto; padding: 28px 22px; }
.pin-card h2 {
  margin: 0 0 6px;
  font-family: var(--cond);
  font-size: 32px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pin-card p { color: var(--muted); }
.pin-card input { letter-spacing: 0.2em; font-size: 22px; text-align: center; }
.queue-tools { text-align: right; }
.demo-row { margin-top: 20px; }
.badge-unknown {
  background: var(--warn-bg);
  color: #7a4f00;
  border: 2px solid var(--warn-border);
  box-shadow: 0 0 0 2px #fff3c4;
}
.field em { font-style: normal; font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; }
.confirm-sizes { display: grid; gap: 8px; margin: 0 0 12px; }
.confirm-sizes label { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; }

@media (max-width: 900px) {
  .readings-block, .confirm-sizes label { grid-template-columns: 1fr; }
  .layout { display: flex; flex-direction: column-reverse; }
}

.photo-box {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px;
  margin: 0 0 16px;
}
.photo-box h3 {
  margin: 0 0 4px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #314257;
}
.photo-box p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.photo-btn { display: flex; align-items: center; justify-content: center; cursor: pointer; }
.photo-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.photo-preview-wrap { margin-top: 12px; display: grid; gap: 8px; justify-items: start; }
.photo-preview-wrap img, .ticket-photo {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #111;
  cursor: zoom-in;
}
.ticket-photo-wrap { margin: 0 0 14px; }
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(7, 17, 29, 0.92);
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 48px 16px 16px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  appearance: none;
  border: 0;
  background: #fff;
  color: #111;
  font: 700 14px/1 var(--font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
}

.email-box {
  margin: 1.25rem 0 0;
  padding: 1rem 1rem 0.25rem;
  border: 1px solid #c5ced8;
  border-radius: 10px;
  background: #f6f8fb;
}
.email-box legend {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  padding: 0 0.35rem;
}
.email-box .field-help {
  margin: 0 0 0.75rem;
  color: #314154;
  font-size: 0.95rem;
}
.badge-submitted {
  display: inline-block;
  background: #1a3a22;
  color: #d8f5df;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.loc-row { display: flex; flex-direction: column; gap: 8px; margin: 0 0 1rem; }
.loc-status { margin: 0; }
.tank-card { position: relative; }
.tank-card.is-danger { background: var(--danger-bg); border-color: #f0b4ae; }
.tank-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.tank-math {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: #eef3f8;
  border-radius: 8px;
  font-size: 0.92rem;
  color: #1a2836;
  line-height: 1.45;
}
.tank-math strong { font-family: var(--mono); }
.overfill-flag {
  margin: 10px 0 0;
  padding: 12px 14px;
  background: #7a1210;
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.overfill-flag button { background: #fff; color: #7a1210; border: 0; font-weight: 700; }
.overfill-banner {
  margin: 0 0 1rem;
  padding: 14px 16px;
  background: #7a1210;
  color: #fff;
  border-radius: 10px;
  font-weight: 650;
}
.overfill-banner p { margin: 0 0 8px; }
.overfill-banner ul { margin: 0 0 10px; padding-left: 1.2rem; }
.overfill-banner .btn { background: #fff; color: #7a1210; }
.field.is-flagged input, .field.is-flagged select { box-shadow: 0 0 0 2px #d4a017; }
.check-flag {
  display: inline-block;
  margin-left: 6px;
  background: #d4a017;
  color: #1a1404;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  vertical-align: middle;
}
.product-totals { margin: 0.5rem 0 0; color: #314154; font-size: 0.95rem; }
.photo-details { margin-top: 8px; font-size: 0.85rem; color: #314154; }
#add-tank { margin-top: 10px; }
.badge-submitted {
  display: inline-block;
  background: #1a3a22;
  color: #d8f5df;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}
.email-box {
  margin: 1.25rem 0 0;
  padding: 1rem 1rem 0.25rem;
  border: 1px solid #c5ced8;
  border-radius: 10px;
  background: #f6f8fb;
}
.email-box legend {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  padding: 0 0.35rem;
}
.email-box .field-help { margin: 0 0 0.75rem; color: #314154; font-size: 0.95rem; }
.badge-scheduled {
  display: inline-block;
  background: #1e3a5f;
  color: #e8eef6;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}
.badge-duplicate {
  display: inline-block;
  background: #7a1212;
  color: #fde8e8;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}
.schedule-page { max-width: 640px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.schedule-status {
  margin: 0 0 1rem;
  padding: 0.8rem 0.9rem;
  background: #e8eef6;
  border-radius: 8px;
  color: #1e3a5f;
  font-weight: 800;
}
.schedule-status.is-duplicate,
.schedule-warning {
  margin: 0 0 1rem;
  padding: 0.8rem 0.9rem;
  background: #fde8e8;
  border: 1px solid #b42318;
  border-radius: 8px;
  color: #7a1212;
  font-weight: 800;
}
.schedule-confirm { display: flex; gap: 0.6rem; align-items: flex-start; }
.schedule-confirm input { margin-top: 0.25rem; }
.dispatch-on-file {
  margin: 0 0 0.9rem;
  padding: 0.7rem 0.85rem;
  background: #e8eef6;
  border-radius: 8px;
  color: #1e3a5f;
  font-weight: 700;
}
.dispatch-on-file.is-missing {
  background: #f8eee8;
  color: #7a1212;
}

.warn-flag {
  margin: 10px 0 0;
  padding: 12px 14px;
  background: #f8e7a8;
  color: #3a2d00;
  border: 1px solid #d4a017;
  border-radius: 8px;
  font-weight: 650;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.warn-flag button { background: #3a2d00; color: #f8e7a8; border: 0; font-weight: 700; }
.review-list { list-style: none; padding: 0; margin: 1rem 0; }
.review-list li {
  padding: 12px 0;
  border-bottom: 1px solid #d5dde6;
  font-size: 1.05rem;
}
.review-warnings { margin: 0 0 1rem; }

.photo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 8px; }
.photo-actions .btn { flex: 1 1 160px; }
.readings-mode {
  margin: 16px 0 10px;
  padding: 0;
  border: 0;
}
.readings-mode legend {
  font-weight: 700;
  margin: 0 0 8px;
}
.readings-only-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 8px;
  padding: 12px 14px;
  background: #eef3f8;
  border: 2px solid transparent;
  border-radius: 10px;
  font-weight: 650;
  cursor: pointer;
}
.readings-only-toggle:has(input:checked) {
  background: #e4edf7;
  border-color: #1e3a5f;
}
.readings-only-toggle input { margin-top: 3px; width: 1.15rem; height: 1.15rem; }
.readings-mode .field-help { margin: 4px 0 0; }

.method-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.method-toggle button {
  flex: 1 1 140px;
  border: 2px solid #1e3a5f;
  background: #fff;
  color: #1e3a5f;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.method-toggle button[aria-pressed="true"] {
  background: #1e3a5f;
  color: #fff;
}
.stick-note { margin: 0 0 10px; color: #314154; font-size: 0.95rem; }
.diameter-on-file {
  margin: 8px 0 0;
  font-weight: 700;
  color: #1e3a5f;
}
.diameter-on-file .text-btn { margin-left: 6px; font-weight: 650; }
.capacity-confirm {
  margin: 8px 0 0;
  padding: 10px 12px;
  background: #eef5fb;
  border-radius: 8px;
  color: #1e3a5f;
  font-weight: 700;
}
.capacity-confirm .btn { margin-left: 8px; }
.stick-convert, .advanced-diam {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: #f3f6f9;
  border-radius: 8px;
}
.advanced-diam summary { cursor: pointer; font-weight: 650; }
.diam-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.diam-chips button {
  border: 1px solid #1e3a5f;
  background: #fff;
  color: #1e3a5f;
  font-weight: 650;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.diam-chips button[aria-pressed="true"] { background: #1e3a5f; color: #fff; }
.fill-max-safe {
  margin-top: 8px;
  width: 100%;
}
.freshness-banner {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 650;
  line-height: 1.4;
}
.freshness-banner.is-live { background: #e5f6ea; color: #0b3d1a; border: 1px solid #1b7a3a; }
.freshness-banner.is-old { background: #f8e7a8; color: #3a2d00; border: 1px solid #d4a017; }
.freshness-banner.is-stale { background: #f8d4d2; color: #6b1111; border: 1px solid #c0392b; }
.freshness-banner .text-btn { font-weight: 800; text-decoration: underline; }
.review-banner {
  margin: 0 0 1rem;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 650;
  background: #eef3f8;
}

.store-picker { margin: 0 0 1.25rem; }
.store-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; }
.store-chip {
  border: 2px solid #1e3a5f;
  background: #fff;
  color: #1e3a5f;
  font-weight: 800;
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  min-width: 140px;
  flex: 1 1 160px;
}
.store-chip small { display: block; font-weight: 500; color: #314154; margin-top: 2px; }
.store-chip.is-active { background: #1e3a5f; color: #fff; }
.store-chip.is-active small { color: #d7e4f2; }
.store-picker-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.unlock-card { margin: 0 0 1.25rem; padding: 18px 16px; }
.photo-box-primary { background: #eef3f8; padding: 16px; border-radius: 12px; margin: 18px 0; }
.btn-photo-main {
  font-size: 1.15rem;
  padding: 16px 18px;
  min-height: 56px;
}
.photo-actions-main { display: flex; flex-direction: column; gap: 10px; }
.vr-term { display: block; font-size: 0.78rem; font-weight: 500; color: #5a6a7a; }
.safe-room-big {
  margin: 12px 0 8px;
  padding: 12px 14px;
  background: #0b1728;
  color: #fff;
  border-radius: 10px;
  text-align: center;
}
.safe-room-big .safe-label { display: block; font-size: 0.85rem; letter-spacing: 0.02em; color: #d7e4f2; font-weight: 650; }
.safe-room-big .safe-value { display: block; font-size: 1.8rem; font-weight: 800; line-height: 1.15; }
.safe-room-big small { color: #b9c7d6; font-weight: 500; }
.fill-pct {
  margin: 8px 0 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: #0b1728;
}
.totals-label small { display: block; font-weight: 500; color: #5a6a7a; }
.review-list-big li {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
  padding: 14px 0;
  border-bottom: 1px solid #d5dde6;
}
.review-list-big li span.review-sub {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #314154;
  margin-top: 4px;
}
.review-lead { color: #314154; margin: 6px 0 18px; }
.pin-box { margin-top: 16px; padding: 12px 14px; background: #f3f6f9; border-radius: 10px; border: 0; }
.pin-box legend { font-weight: 800; }
.call-supplier {
  display: inline-block;
  margin-top: 8px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0b3d1a;
}
@media (max-width: 520px) {
  .btn-photo-main { font-size: 1.1rem; width: 100%; }
  .safe-room-big .safe-value { font-size: 1.6rem; }
  .review-list-big li { font-size: 1.3rem; }
}

.liter-note { font-size: 0.75em; font-weight: 600; color: #334155; margin-left: 0.3rem; }
.tank-confirm { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.6rem; }
.tank-confirm .btn.is-on { background: #166534; color: #fff; }
.manifold-bar-card, .manifold-check, .manifold-note { margin: 0.6rem 0; padding: 0.7rem 0.8rem; background: #eef6ff; border: 1px solid #bfdbfe; border-radius: 8px; }
.manifold-check { display: block; }

.ust-banners { display: grid; gap: 0.6rem; margin: 0 0 1rem; }
.ust-banner {
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  font-size: 0.95rem;
  line-height: 1.35;
}
.ust-banner.is-due60,
.ust-banner.is-due30 {
  background: #fff4cc;
  border: 1px solid #c9a227;
  color: #3b2e00;
}
.ust-banner.is-expired {
  background: #fde8e8;
  border: 1px solid #b42318;
  color: #7a1212;
  font-weight: 600;
}
.dep-offer {
  background: #edf4ff;
  border: 1px solid #3b6ea8;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin: 0 0 1rem;
}
.dep-offer p { margin: 0 0 0.6rem; }
.dep-offer .dep-asof { font-size: 0.85rem; color: #355; }
.dep-offer-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.compliance-box {
  border: 1px solid #c9d2dc;
  border-radius: 10px;
  padding: 0.9rem 1rem 1.1rem;
  margin: 1rem 0;
}
.compliance-box legend { font-weight: 700; }
.compliance-box .disclaimer {
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.compliance-box .dep-asof,
.field .dep-asof { font-size: 0.8rem; color: #4a5a6a; display: block; margin-top: 0.25rem; }
.tank-kind, .red-tag-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 0.4rem 0 0.6rem;
}
.tank-kind button[aria-pressed="true"],
.method-toggle button[aria-pressed="true"] { font-weight: 700; }
.red-tag-row.is-on {
  background: #fde8e8;
  border: 1px solid #b42318;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
}
.red-tag-row label { display: flex; gap: 0.4rem; align-items: center; font-weight: 600; }

.ust-banner.is-hold, .review-banner.ust-banner.is-hold {
  background: #fde8e8;
  border: 1px solid #b42318;
  color: #7a1212;
  font-weight: 600;
}
.state-rule {
  background: #f4f7fb;
  border: 1px solid #c9d2dc;
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
}
.state-rule a { margin-left: 0.35rem; }

.review-size-source {
  display: block;
  font-size: 0.85rem;
  color: #555;
  font-weight: 550;
}
.review-fuel-type {
  display: block;
  font-size: 0.95rem;
  color: #7a1212;
  font-weight: 750;
  margin-top: 0.35rem;
}
.fuel-type-alert {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding: 12px 14px;
  background: #fde8e8;
  color: #7a1212;
  border: 1px solid #b42318;
  border-radius: 8px;
  font-weight: 750;
}
.fuel-type-alert.is-hold {
  background: #f8d0d0;
  border-width: 2px;
}
.fuel-type-alert p { margin: 0 0 8px; }
.fuel-type-alert p:last-of-type { margin-bottom: 8px; }
.fuel-type-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 750;
  color: #7a1212;
}
.diesel-type-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.review-diesel-pick {
  margin-top: 0.5rem;
}


/* Supplier desk and invite setup */
.store-invite-name {
  font-weight: 700;
  margin: 0 0 0.75rem;
}
.invite-result {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 2px solid #0b3a5b;
  background: #f4f8fb;
  word-break: break-all;
}
.invite-result code, .invite-link {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92rem;
}
.supplier-store-list {
  display: grid;
  gap: 0.85rem;
}
.supplier-store {
  border: 1px solid #d5dde4;
  padding: 0.85rem 1rem;
  background: #fff;
}
.supplier-store h4 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}
.supplier-store p {
  margin: 0.2rem 0;
  font-size: 0.95rem;
}
.supplier-flag {
  color: #8a1c12;
  font-weight: 650;
}
.supplier-ok {
  color: #1a5a2a;
}
#supplier-link {
  display: inline-block;
  margin-left: 0.75rem;
  color: #0b3a5b;
}
.lock-note {
  font-size: 0.9rem;
  color: #445;
}


.legal-page { max-width: 44rem; margin: 0 auto; padding: 1.5rem 1.15rem 3rem; }
.legal-page h1 { font-size: 1.6rem; margin: 0 0 0.4rem; }
.legal-page h2 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.legal-page p, .legal-page li { line-height: 1.5; }
.legal-draft { background: #f8eee8; color: #7a1212; padding: 0.75rem 0.9rem; border-radius: 8px; font-weight: 700; }
.legal-nav a { margin-right: 0.8rem; }

.setup-needed-banner {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: #f8eee8;
  color: #7a1212;
  border: 1px solid #d9b3a3;
  border-radius: 8px;
  font-weight: 700;
  line-height: 1.4;
}
.agree-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0.75rem 0 0.25rem;
  font-size: 0.95rem;
}
.agree-row input { margin-top: 0.2rem; }
button[disabled],
#submit-btn:disabled,
#review-confirm:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.lang-picker { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; }
.lang-picker select { font: inherit; padding: 0.25rem 0.4rem; }
.load-size-box, .delivery-window-extra { margin-top: 0.75rem; }
.too-small-note { color: #8a1c12; font-weight: 600; margin: 0.25rem 0 0; }
.credit-hold-badge, .hold-badge { color: #8a1c12; font-weight: 700; }
.deletion-actions { margin-top: 0.75rem; flex-direction: column; align-items: flex-start; }
body.is-supplier .lang-picker { display: none; }


body.is-readings-request .load-size-box,
body.is-readings-request .urgency-box,
body.is-readings-request .totals-bar,
body.is-readings-request #emergency-row {
  display: none !important;
}
