:root {
  --navy: #101d68;
  --navy-dark: #09144f;
  --blue-accent: #4e7cff;
  --bg: #f2f5fa;
  --card: #ffffff;
  --text: #17213c;
  --muted: #69738b;
  --line: #dce3ef;
  --shadow: 0 12px 30px rgba(28, 47, 88, 0.1);
  --section-tab: #ffffff;
  --section-tab-ink: var(--navy);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #f6f6f6 0%, #ececec 100%);
  color: var(--text);
}

body {
  display: flex;
  justify-content: center;
  background: radial-gradient(circle at 50% -10%, #ffffff 0, #f2f5fa 50%, #e8edf5 100%);
}

.app-shell {
  width: 100%;
  max-width: 820px;
  min-height: 100vh;
  background: var(--bg);
}

.screen {
  width: 100%;
  min-height: 100vh;
  padding: 0 14px 24px;
}

.is-hidden {
  display: none;
}

.topbar {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  font-weight: 700;
  text-align: center;
  padding: 10px 12px;
  font-size: 1rem;
}

.card {
  background: var(--card);
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid #dcdcdc;
}

.form-card {
  margin: 0 14px 16px;
  overflow: hidden;
}

.login-form {
  margin-top: 16px;
}

.form-error {
  margin: -6px 14px 12px;
  color: #a52b35;
  font-size: 0.9rem;
  text-align: center;
}

.field {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #e8e8e8;
  font-weight: 700;
}

.field:last-child {
  border-bottom: 0;
}

.field span {
  color: #222;
}

.field input {
  width: 100%;
  border: 1px solid #bdbdbd;
  background: #fff7c9;
  border-radius: 2px;
  padding: 7px 10px;
  font-size: 1rem;
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #69738b;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: #eef2fa;
  color: var(--navy);
}

.password-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.primary-button,
.menu-button {
  width: calc(100% - 28px);
  margin: 0 14px 12px;
  border: 0;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}

.primary-button {
  background: linear-gradient(180deg, #e4e4e4 0%, #cfcfcf 100%);
  color: #9a9a9a;
  padding: 13px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.helper-text {
  text-align: center;
  color: var(--muted);
  max-width: 520px;
  margin: 18px auto 10px;
  font-size: 0.95rem;
  line-height: 1.35;
  padding: 0 10px;
}

.store-links {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 12px;
}

.store-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

.store-icon.apple {
  background: radial-gradient(circle at 30% 30%, #49c8ff, #1b7edd);
}

.store-icon.play {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #2dd4bf 0%, #22c55e 45%, #f59e0b 45%, #f97316 100%);
  clip-path: polygon(15% 10%, 85% 50%, 15% 90%, 27% 50%);
  border-radius: 0;
}

.store-links a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid #cbd5ef;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.footer {
  text-align: center;
  color: #8b8b8b;
  margin-top: 36px;
  font-size: 0.82rem;
}

.welcome-header {
  text-align: center;
  padding: 24px 8px 18px;
}

.welcome-name {
  font-weight: 700;
  color: var(--text);
  font-size: 1.08rem;
  margin-bottom: 9px;
}

.welcome-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
}

.menu-list {
  display: grid;
  gap: 10px;
}

.menu-button {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--navy) 0%, #13298b 100%);
  color: #fff;
  min-height: 62px;
  padding: 12px 18px;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(15, 33, 106, 0.16), 0 1px 0 rgba(255, 255, 255, 0.16) inset;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.menu-button:hover,
.menu-button:focus-visible {
  background: linear-gradient(135deg, #16257c 0%, #1d3eaf 100%);
  box-shadow: 0 10px 22px rgba(15, 33, 106, 0.22), 0 1px 0 rgba(255, 255, 255, 0.18) inset;
  transform: translateY(-1px);
}

.menu-button:active {
  transform: translateY(1px);
}

.menu-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #bcd0ff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.menu-button span:not(.menu-arrow) {
  font-size: 0.98rem;
  font-weight: 700;
}

.menu-arrow {
  color: #bcd0ff;
  font-size: 1.7rem;
  font-weight: 300;
  line-height: 1;
}

.menu-button-logout {
  margin-top: 8px;
  background: #ffffff;
  color: var(--navy);
  border: 1px solid var(--line);
  box-shadow: 0 5px 14px rgba(28, 47, 88, 0.08);
}

.menu-button-logout .menu-icon,
.menu-button-logout .menu-arrow {
  stroke: #5471be;
  color: #5471be;
}

.menu-button-logout:hover,
.menu-button-logout:focus-visible {
  background: #f8faff;
  box-shadow: 0 8px 18px rgba(28, 47, 88, 0.13);
}

.screen-content {
  padding-top: 18px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 4px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--section-tab);
}

.section-invoices {
  --section-tab: #ffffff;
  --section-tab-ink: var(--navy);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--blue-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.page-header h1 {
  margin: 0;
  color: var(--text);
  font-size: 1.45rem;
}

.small-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--section-tab);
  color: var(--section-tab-ink);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(28, 47, 88, 0.06);
}

.small-link:hover,
.small-link:focus-visible {
  border-color: #9eb5f6;
  background: #f8faff;
}

.page-intro {
  margin: 18px 4px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.invoice-list {
  display: grid;
  gap: 10px;
}

.invoice-link {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 13px;
  min-height: 78px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 7px 18px rgba(28, 47, 88, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.invoice-link:hover,
.invoice-link:focus-visible {
  border-color: #9eb5f6;
  box-shadow: 0 10px 22px rgba(28, 47, 88, 0.13);
  transform: translateY(-1px);
}

.invoice-link:active {
  transform: translateY(1px);
}

.invoice-date {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: center;
}

.invoice-date span {
  padding: 4px 2px;
  background: var(--navy);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.invoice-date strong {
  padding: 7px 2px;
  color: var(--navy);
  font-size: 1.2rem;
}

.invoice-copy {
  min-width: 0;
}

.invoice-copy strong,
.invoice-copy span {
  display: block;
  overflow-wrap: anywhere;
}

.invoice-copy strong {
  margin-bottom: 4px;
  color: var(--text);
  font-size: 0.96rem;
}

.invoice-copy span {
  color: var(--muted);
  font-size: 0.78rem;
}

.empty-card {
  padding: 24px 18px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}

.footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.action-card {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.action-card.danger {
  border-color: #ffd2d5;
  background: #fff5f5;
  color: #a52b35;
}

.section-memos {
  --section-tab: #ffffff;
  --section-tab-ink: #111111;
}

.section-training {
  --section-tab: #f1f8ff;
  --section-tab-ink: #145275;
}

.section-circle-checks {
  --section-tab: #fff8ed;
  --section-tab-ink: #7d4c18;
}

.section-dispatches {
  --section-tab: #eef6ff;
  --section-tab-ink: #24558f;
}

.dispatch-list {
  display: grid;
  gap: 10px;
}

.dispatch-date-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 12px 14px;
  border: 1px solid #c9dced;
  border-radius: 14px;
  background: #fafdff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 7px 18px rgba(36, 85, 143, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dispatch-date-card:hover,
.dispatch-date-card:focus-visible {
  border-color: #78a8d4;
  box-shadow: 0 10px 24px rgba(36, 85, 143, 0.14);
  transform: translateY(-1px);
}

.dispatch-date-card:active {
  transform: translateY(1px);
}

.dispatch-calendar {
  display: grid;
  width: 58px;
  height: 62px;
  grid-template-rows: 22px 1fr;
  overflow: hidden;
  border: 1px solid #c9dced;
  border-radius: 12px;
  background: #fff;
}

.dispatch-calendar span {
  display: grid;
  place-items: center;
  background: #24558f;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dispatch-calendar strong {
  display: grid;
  place-items: center;
  color: #173c68;
  font-size: 1.45rem;
}

.dispatch-date-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dispatch-date-copy strong {
  color: #173c68;
  font-size: 1rem;
}

.dispatch-date-copy span,
.dispatch-date-copy small {
  color: var(--muted);
  font-size: 0.82rem;
}

.dispatch-date-copy small {
  color: #24558f;
  font-weight: 800;
}

.dispatch-arrow {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #a9c7e1;
  border-radius: 50%;
  color: #24558f;
  font-size: 1.1rem;
}

.dispatch-empty {
  margin-top: 18px;
}

.dispatch-toolbar {
  display: flex;
  justify-content: center;
  margin: 18px 0 12px;
}

.circle-check-prompt {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 10px;
  background: #8d35c9;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 7px 18px rgba(141, 53, 201, 0.2);
}

.dispatch-toolbar-note {
  color: #237446;
  font-size: 0.85rem;
  font-weight: 800;
}

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

.order-card {
  overflow: hidden;
  border: 1px solid #c9dced;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(36, 85, 143, 0.08);
}

.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #dce8f2;
  background: #fafdff;
}

.order-time,
.order-date {
  margin: 0;
}

.order-time {
  color: #173c68;
  font-size: 1.1rem;
  font-weight: 800;
}

.order-date {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.dispatch-id {
  color: #24558f;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.order-card-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.order-route-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #20283a;
  font-size: 0.92rem;
}

.order-route-line strong {
  color: #173c68;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.order-detail-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.order-detail-grid .order-detail-wide {
  grid-column: 1 / -1;
}

.order-detail-grid span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.order-detail-grid strong {
  color: #20283a;
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.order-alerts {
  padding: 12px;
  border-left: 4px solid #d08b22;
  background: #fff8e8;
  color: #5b421d;
  font-size: 0.88rem;
  line-height: 1.45;
}

.order-alerts p,
.cancelled-order,
.order-route-name {
  margin: 0;
}

.order-alerts p + p {
  margin-top: 8px;
}

.cancelled-order {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff0f0;
  color: #a52b35;
  font-size: 0.88rem;
  font-weight: 800;
}

.order-route-name {
  color: #24558f;
  font-size: 0.85rem;
}

.legacy-order-body {
  gap: 0;
  padding: 12px 10px 14px;
  color: #111;
  font-size: 0.92rem;
}

.legacy-order-line,
.legacy-order-label,
.legacy-order-value,
.legacy-passenger {
  margin: 0;
  line-height: 1.45;
}

.legacy-order-label {
  margin-top: 16px;
  font-weight: 800;
}

.legacy-order-value {
  margin-bottom: 16px;
}

.legacy-passenger {
  margin-bottom: 2px;
}

.legacy-order-line strong {
  font-weight: 800;
  margin-right: 0.3em;
}

.route-stops-panel {
  margin: 14px 0 2px;
  border: 1px solid #d8e3ef;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fbfe;
}

.route-stops-heading {
  display: grid;
  gap: 3px;
  padding: 10px 12px 16px;
  border-bottom: 1px solid #d8e3ef;
  background: #edf5fb;
  color: #173c68;
}

.route-stops-heading strong {
  font-size: 0.92rem;
}

.route-stops-heading span {
  color: #52647a;
  font-size: 0.78rem;
}

.route-stop {
  margin-top: 8px;
  padding: 11px 12px 12px;
  border-top: 1px solid #d8e3ef;
  border-bottom: 1px solid #d8e3ef;
}

.route-stop:last-child {
  border-bottom: 0;
}

.route-stop-title {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 12px;
  margin-bottom: 9px;
  color: #111;
  font-size: 0.84rem;
  line-height: 1.4;
}

.route-stop-title strong {
  color: #173c68;
  margin-right: 0.25em;
}

.route-stop-title span {
  margin-right: 12px;
}

.route-stop-break {
  flex-basis: 100%;
  height: 0;
  margin: 0 !important;
}

.route-stop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 14px;
}

.route-stop-field {
  display: flex;
  align-items: baseline;
  gap: 0.35em;
  min-width: 0;
}

.route-stop-field strong {
  color: #52647a;
  flex: 0 0 auto;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.route-stop-field span {
  color: #111;
  font-size: 0.86rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.legacy-order-body .order-alerts {
  margin-top: 12px;
}

.dispatch-total {
  margin-top: 8px;
  padding: 14px 10px;
  border: 1px solid #c9dced;
  border-radius: 12px;
  background: #fff;
  color: #111;
  font-size: 0.92rem;
  box-shadow: 0 7px 18px rgba(36, 85, 143, 0.08);
}

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

.circle-check-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(150px, 0.8fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 92px;
  padding: 15px 16px;
  border: 1px solid #eadbc6;
  border-radius: 14px;
  background: #fffdf9;
  color: #2b241c;
  text-decoration: none;
  box-shadow: 0 7px 18px rgba(109, 74, 31, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.circle-check-row:hover,
.circle-check-row:focus-visible {
  border-color: #d6af77;
  box-shadow: 0 10px 24px rgba(109, 74, 31, 0.14);
  transform: translateY(-1px);
}

.circle-check-row:active {
  transform: translateY(1px);
}

.circle-check-dates,
.circle-check-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.circle-check-dates strong {
  color: #4d3116;
  font-size: 1.02rem;
}

.circle-check-dates span {
  color: #7b6d5d;
  font-size: 0.78rem;
}

.circle-check-meta {
  color: #554938;
  font-size: 0.84rem;
}

.circle-check-meta b {
  color: #2b241c;
}

.acknowledgement {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f8e9e7;
  color: #8a3830;
  font-size: 0.74rem;
  font-weight: 800;
}

.acknowledgement.is-acknowledged {
  background: #e6f5ec;
  color: #237446;
}

.circle-check-arrow {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #d6bd9c;
  border-radius: 50%;
  color: #7d4c18;
  font-size: 1.1rem;
}

.detail-not-found {
  margin-top: 18px;
}

.detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.detail-summary-item {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #eadbc6;
  border-radius: 12px;
  background: #fffdf9;
}

.detail-summary-item span,
.detail-field span {
  color: #7b6d5d;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.detail-summary-item strong {
  color: #2b241c;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.detail-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-panel-heading {
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.detail-panel-heading .eyebrow {
  color: #7d4c18;
}

.detail-panel-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.12rem;
}

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

.detail-group + .detail-group {
  border-top: 1px solid var(--line);
}

.detail-group-header {
  padding: 12px 16px;
  background: #c6283f;
  color: #ffffff;
}

.detail-group-header h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px 16px;
  border-bottom: 1px solid #edf0f5;
}

.detail-field:nth-child(odd) {
  border-right: 1px solid #edf0f5;
}

.detail-field strong {
  color: #20283a;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.circle-check-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.add-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.add-summary label,
.initials-field {
  display: grid;
  gap: 6px;
  color: #7b6d5d;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.add-summary input,
.initials-field input,
.numeric-check-input,
.check-comment textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d7c8b6;
  border-radius: 8px;
  background: #fffdf9;
  color: #2b241c;
  font: inherit;
  padding: 10px 11px;
}

.add-summary input[readonly] {
  background: #f0f2f5;
  color: #5f6875;
}

.add-groups {
  display: grid;
  gap: 12px;
}

.add-group {
  overflow: hidden;
  border: 1px solid #eadbc6;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(109, 74, 31, 0.08);
}

.add-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  background: #c6283f;
  color: #fff;
}

.add-group-header h2 {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.select-all-control {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 700;
}

.header-choice-control {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.header-choice-control label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}

.add-field-list {
  display: grid;
}

.add-field-row {
  display: grid;
  grid-template-columns: minmax(170px, 230px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid #edf0f5;
}

.add-field-label {
  color: #20283a;
  font-size: 0.9rem;
  line-height: 1.25;
}

.required-mark {
  color: #c6283f;
  margin-left: 3px;
}

.status-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.status-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #354052;
  font-size: 0.84rem;
}

.check-comment {
  display: none;
  gap: 6px;
  padding: 0 16px 12px 260px;
  color: #7b6d5d;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.check-comment.is-visible {
  display: grid;
}

.submission-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #eadbc6;
  border-radius: 14px;
  background: #fffdf9;
}

.acknowledge-control {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #2b241c;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
}

.primary-button,
.button-link {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid #7d4c18;
  border-radius: 10px;
  background: #7d4c18;
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.success-card {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #b7dfc3;
  border-radius: 12px;
  background: #eefaf1;
  color: #216b36;
  font-weight: 700;
}

.health-section {
  padding-top: 0;
}

.health-card {
  margin-top: 18px;
  padding: 22px 20px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: #111111;
  box-shadow: var(--shadow);
}

.health-card h1 {
  margin: 4px 0 18px;
  color: #111111;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.4;
  text-align: left;
}

.health-card .eyebrow {
  color: var(--navy);
}

.health-questions {
  margin: 0;
  padding-left: 26px;
  color: #111111;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.5;
}

.health-questions li {
  padding-left: 6px;
  margin-bottom: 7px;
}

.health-actions {
  display: grid;
  max-width: 520px;
  gap: 12px;
  margin: 22px auto 0;
}

.health-option {
  display: grid;
  min-height: 72px;
  align-content: center;
  gap: 6px;
  padding: 12px 16px;
  border: 1px solid #bcc5d4;
  border-radius: 10px;
  background: #ffffff;
  color: #111111;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.health-option span {
  color: #4f596b;
  font-size: 0.88rem;
  font-weight: 700;
}

.health-option:hover,
.health-option:focus-visible {
  border-color: #7e8fae;
  box-shadow: 0 8px 18px rgba(28, 47, 88, 0.12);
  transform: translateY(-1px);
}

.health-option:active {
  transform: translateY(1px);
}

.health-option-yes {
  border-left: 5px solid #2d8a5b;
}

.health-option-no {
  border-left: 5px solid #b33a42;
}

.training-list {
  display: grid;
  gap: 10px;
}

.training-link {
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #bcd5e6;
  border-radius: 12px;
  background: #f8fcff;
  color: #14364a;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(20, 82, 117, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.training-link:hover,
.training-link:focus-visible {
  border-color: #77afd0;
  box-shadow: 0 9px 20px rgba(20, 82, 117, 0.14);
  transform: translateY(-1px);
}

.training-link:active {
  transform: translateY(1px);
}

.training-arrow {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #a8c8db;
  border-radius: 50%;
  color: #145275;
  font-size: 1.05rem;
}

.memo-list {
  display: grid;
  gap: 10px;
}

.memo-row,
.memo-card {
  border: 1px solid #d9dfe9;
  border-radius: 12px;
  background: #ffffff;
  color: #111111;
  box-shadow: 0 6px 16px rgba(28, 47, 88, 0.07);
}

.memo-row {
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 56px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #111111;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.memo-row:hover,
.memo-row:focus-visible,
.memo-toggle:hover,
.memo-toggle:focus-visible {
  border-color: #aab6cc;
  box-shadow: 0 9px 20px rgba(28, 47, 88, 0.12);
}

.memo-row:active {
  transform: translateY(1px);
}

.memo-card {
  overflow: hidden;
}

.memo-toggle {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 16px;
  border: 0;
  background: #ffffff;
  color: #111111;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: left;
}

.memo-arrow {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #c9d1df;
  border-radius: 50%;
  color: #111111;
  font-size: 1.15rem;
  line-height: 1;
  transition: transform 160ms ease, background 160ms ease;
}

.memo-card.is-open .memo-arrow {
  background: #f0f3f8;
  transform: rotate(180deg);
}

.memo-external-arrow {
  font-size: 1.05rem;
}

.memo-content {
  padding: 0 16px 18px;
  border-top: 1px solid #e4e8ef;
  color: #111111;
  font-size: 0.92rem;
  line-height: 1.55;
}

.memo-content a {
  color: #173e9f;
  font-weight: 700;
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  .field {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .field input {
    font-size: 1rem;
  }

  .primary-button,
  .menu-button {
    width: calc(100% - 24px);
    margin-left: 12px;
    margin-right: 12px;
  }

  .menu-list {
    gap: 9px;
  }

  .menu-button {
    min-height: 58px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .invoice-link {
    grid-template-columns: 48px 1fr auto;
    gap: 10px;
    padding: 9px 11px;
  }

  .invoice-date strong {
    font-size: 1.05rem;
  }

  .footer-actions {
    grid-template-columns: 1fr;
  }

  .memo-row,
  .memo-toggle {
    padding-left: 13px;
    padding-right: 13px;
  }

  .memo-content {
    padding-left: 13px;
    padding-right: 13px;
  }

  .training-link {
    padding-left: 13px;
    padding-right: 13px;
  }

  .health-card {
    padding: 18px 14px 20px;
  }

  .health-questions {
    padding-left: 24px;
    font-size: 0.91rem;
  }

  .health-actions {
    margin-top: 18px;
  }

  .circle-check-row {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .dispatch-date-card {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 11px;
  }

  .dispatch-calendar {
    width: 52px;
    height: 58px;
  }

  .order-card-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .order-detail-grid {
    grid-template-columns: 1fr;
  }

  .order-detail-grid .order-detail-wide {
    grid-column: auto;
  }

  .route-stop-grid {
    grid-template-columns: 1fr;
  }

  .route-stop-title {
    display: flex;
    gap: 2px;
  }

  .route-stop-title span {
    margin-right: 0;
  }

  .route-stop-break {
    flex-basis: 100%;
  }

  .circle-check-meta {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .circle-check-arrow {
    grid-column: 2;
    grid-row: 1;
  }

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

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-field:nth-child(odd) {
    border-right: 0;
  }

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

  .add-group-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .add-field-row {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 12px 13px;
  }

  .status-options {
    gap: 9px 13px;
  }

  .check-comment {
    padding-left: 13px;
    padding-right: 13px;
  }
}
