:root {
  --bg: #eef3f6;
  --panel: #fff;
  --ink: #10212b;
  --muted: #657078;
  --line: #d7e0e6;
  --blue: #0f6fae;
  --green: #177245;
  --amber: #9b6500;
  --shadow: 0 10px 26px rgba(30, 49, 64, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px 1fr;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

.steps {
  background: #fff;
  color: var(--ink);
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  box-shadow: 8px 0 24px rgba(18, 37, 50, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fafdff 0%, #f3f8fb 100%);
}

.tenant-sidebar-logo {
  max-width: 100%;
  max-height: 48px;
  object-fit: contain;
}

.brand strong {
  display: block;
  line-height: 1.2;
  text-align: center;
}

.step {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--muted);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.step span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e6edf2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.step.active,
.step:hover {
  border-color: #b7d7ec;
  background: #eaf5fc;
  color: var(--blue);
}

.step.locked,
.step:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.step.locked:hover,
.step:disabled:hover {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}

.step.active span {
  background: var(--blue);
  color: #fff;
}

.step.complete span {
  background: var(--green);
  color: #fff;
}

.workspace {
  min-width: 0;
  padding: 28px;
}

.topbar,
.actions,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  margin-bottom: 22px;
  justify-content: center;
  text-align: center;
}

.topbar-main {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
}

h2 {
  margin-bottom: 16px;
  font-size: 18px;
}

.status-pill {
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff6e5;
  color: var(--amber);
  font-weight: 700;
}

.top-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.api-pill {
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.tenant-pill {
  border-radius: 999px;
  padding: 7px 12px;
  background: #eaf5fc;
  color: var(--blue);
  font-weight: 800;
}

.api-pill.connected {
  background: #eef8f2;
  color: var(--green);
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.hidden {
  display: none;
}

.hidden-file {
  display: none;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel.wide {
  max-width: 1060px;
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
}

textarea {
  min-height: 82px;
  resize: vertical;
  font-family: inherit;
}

input[readonly] {
  background: #f1f4f3;
  color: #3f4d55;
}

button {
  font: inherit;
}

.primary,
.secondary {
  min-height: 40px;
  border-radius: 6px;
  padding: 0 14px;
  cursor: pointer;
}

.primary {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
}

.primary:disabled,
.primary.disabled {
  border-color: #cbd5dc;
  background: #dbe3e8;
  color: #73808a;
  cursor: not-allowed;
}

.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.secondary.mini {
  min-height: 32px;
  padding: 0 10px;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.link-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.unit-row,
.doc-row,
.summary-grid div,
.check {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfb;
}

.unit-row,
.doc-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.35fr) 1fr;
  gap: 12px;
  margin-bottom: 10px;
}

.doc-row {
  grid-template-columns: minmax(180px, 0.35fr) 1fr auto;
  align-items: center;
}

.unit-row span,
.doc-row span,
.summary-grid span {
  color: var(--muted);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.unit-row strong,
.doc-row strong,
.summary-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.doc-row.pass,
.check.pass {
  border-color: #b7dfc8;
  background: #eef8f2;
}

.doc-row.warning,
.check.warning {
  border-color: #ead29c;
  background: #fff7e8;
}

.notice p {
  color: var(--muted);
}

.masked-email {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfb;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.requirement-list {
  display: grid;
  gap: 12px;
}

.requirement-list div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfb;
}

.requirement-list strong,
.requirement-list span {
  display: block;
}

.requirement-list span {
  margin-top: 4px;
  color: var(--muted);
}

.compact-form {
  margin-bottom: 12px;
}

.checkline {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin: 8px 0 14px;
}

.checkline input {
  width: auto;
}

.driver-photo-checklist {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.driver-photo-checklist h3 {
  margin: 0;
}

.section-subhead {
  margin: 14px 0 10px;
  font-size: 16px;
}

.driver-upload-page {
  background: var(--page);
  min-height: 100vh;
  display: block;
  grid-template-columns: none;
}

.driver-upload-shell {
  margin: 0 auto;
  max-width: 720px;
  padding: 24px;
}

.driver-brand {
  margin-bottom: 22px;
}

.driver-upload-page .panel {
  overflow: hidden;
}

.driver-upload-page h1,
.driver-upload-page p {
  overflow-wrap: anywhere;
}

.driver-photo-checklist .doc-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.driver-upload-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.equipment-entry {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #b7d7ec;
  border-radius: 6px;
  background: #f6fbfe;
}

.driver-upload-action {
  white-space: normal;
}

.camera-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfb;
}

.camera-panel.hidden {
  display: none;
}

.camera-panel video {
  width: 100%;
  max-height: 62vh;
  border-radius: 6px;
  background: #000;
  object-fit: contain;
}

.correction-response-row {
  display: grid;
  gap: 10px;
}

.check {
  margin-bottom: 10px;
}

.inline-status {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #ead29c;
  border-radius: 6px;
  background: #fff7e8;
  color: var(--amber);
  font-weight: 700;
}

.inline-status.pass {
  border-color: #b7dfc8;
  background: #eef8f2;
  color: var(--green);
}

.inline-status.warning {
  border-color: #ead29c;
  background: #fff7e8;
  color: var(--amber);
}

.upload-note {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
  color: var(--muted);
}

.submission-note {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid #ead29c;
  border-radius: 6px;
  background: #fff7e8;
}

#submit-complete-panel .submission-note {
  border-color: #b7dfc8;
  background: #eef8f2;
}

.submission-note strong,
.submission-note span {
  display: block;
}

.submission-note span {
  margin-top: 4px;
  color: var(--muted);
}

.summary-grid,
.agreement-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.carrier-record-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-grid strong,
.summary-grid span,
.agreement-summary strong,
.agreement-summary span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.locked-note {
  border: 1px solid #b7d7ec;
  border-radius: 999px;
  padding: 6px 10px;
  background: #eaf5fc;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.confirm {
  grid-template-columns: 18px 1fr;
  align-items: start;
  color: var(--ink);
}

.confirm input {
  min-height: auto;
  margin-top: 3px;
}

.actions {
  max-width: 1060px;
  margin-top: 22px;
  justify-content: flex-start;
}

.platform-footer {
  max-width: 1060px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  padding: 18px 0 4px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.platform-footer-brand {
  width: 172px;
  height: 42px;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  overflow: hidden;
}

.platform-footer-brand:focus-visible,
.platform-footer-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.platform-footer-brand img {
  width: 172px;
  height: auto;
  display: block;
}

.platform-footer strong,
.platform-footer span {
  display: block;
}

.platform-footer strong {
  color: var(--ink);
  font-size: 13px;
}

.platform-footer span {
  margin-top: 3px;
  font-size: 12px;
}

.platform-footer span span {
  display: inline;
  margin-top: 0;
}

.platform-footer-link {
  display: block;
  margin-top: 2px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.platform-footer-link:hover {
  text-decoration: underline;
}

@media (max-width: 920px) {
  body {
    grid-template-columns: 1fr;
  }

  .steps {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .grid.two,
  .grid.three,
  .summary-grid,
  .carrier-record-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .actions,
  .platform-footer,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    align-items: center;
  }

  .platform-footer-brand {
    width: 150px;
    height: 38px;
  }

  .platform-footer-brand img {
    width: 150px;
  }

  .driver-upload-shell {
    padding: 14px;
  }

  .driver-upload-page .panel {
    padding: 18px;
  }

  .driver-photo-checklist .doc-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .driver-photo-checklist .doc-row strong {
    grid-column: auto;
  }

  .driver-photo-checklist .doc-row span {
    align-self: center;
  }

  .driver-upload-actions {
    justify-content: stretch;
  }

  .driver-upload-actions button {
    flex: 1 1 140px;
  }
}
