:root {
  color-scheme: light;
  --brand: #24439a;
  --brand-dark: #0a2466;
  --brand-bright: #2e6df6;
  --ink: #111827;
  --muted: #6b7280;
  --subtle: #9aa3b2;
  --canvas: #f5f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --success: #22c55e;
  --danger: #dc2626;
  --warning: #d97706;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

body.has-modal {
  overflow: hidden;
}

body:not(.is-signed-in):not(.is-portal-open) .portal {
  display: none;
}

body.is-signed-in .public-header,
body.is-portal-open .public-header,
body.is-signed-in .landing,
body.is-portal-open .landing,
body.is-signed-in .site-footer {
  display: none;
}

body:not(.is-signed-in) .auth-only,
body.is-signed-in .unauth-only {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

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

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.1;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 3.5vw, 3.35rem);
  font-weight: 900;
}

h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
  font-weight: 850;
}

h3 {
  margin-bottom: 7px;
  font-size: 1.15rem;
  font-weight: 850;
}

.button-primary,
.button-secondary,
.button-light,
.icon-button,
button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 18px;
  font-weight: 800;
  text-align: center;
}

.button-primary,
button {
  color: #ffffff;
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--brand-bright), var(--brand));
}

.button-primary:hover,
button:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
}

.button-secondary {
  color: var(--brand-dark);
  border-color: var(--line-strong);
  background: #ffffff;
}

.button-secondary:hover {
  color: #ffffff;
  border-color: var(--brand);
  background: var(--brand);
}

.button-light {
  color: var(--brand);
  background: #ffffff;
  border-color: #ffffff;
}

.small-button {
  min-height: 38px;
  padding: 8px 18px;
}

button:disabled {
  color: #7c8797;
  border-color: #d8dee8;
  background: #eef2f7;
  cursor: not-allowed;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--ink);
  background: #ffffff;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(46, 109, 246, 0.15);
  border-color: var(--brand-bright);
}

label {
  display: grid;
  gap: 7px;
  color: #667085;
  font-size: 0.9rem;
  font-weight: 750;
}

.public-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 66px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.public-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.public-brand,
.sidebar-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--brand-dark);
  font-weight: 900;
}

.public-brand img,
.sidebar-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.hero {
  display: grid;
  min-height: 460px;
  place-items: center;
  padding: 74px 20px;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.92)),
    url("https://images.unsplash.com/photo-1556745757-8d76bdb6984b?auto=format&fit=crop&w=2200&q=80") center / cover;
}

.hero-content {
  display: grid;
  justify-items: center;
  gap: 22px;
  max-width: 760px;
}

.hero-content p {
  max-width: 680px;
  margin: 0;
  color: #374151;
  font-size: 1.12rem;
}

.marketing-section,
.how-section {
  padding: 78px 8vw;
  background: #ffffff;
}

.marketing-section h2,
.how-section h2 {
  margin-bottom: 52px;
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto;
}

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

.feature-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.feature-card div {
  padding: 24px;
}

.feature-card p,
.step-grid p {
  margin-bottom: 0;
  color: #6b7280;
  font-size: 1rem;
  line-height: 1.25;
}

.how-section {
  min-height: 360px;
  background: #f8fafc;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 980px;
  margin: 0 auto;
}

.step-grid article {
  text-align: center;
}

.step-grid span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--brand-bright);
  font-weight: 900;
}

.cta-band {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 70px 20px;
  color: #ffffff;
  text-align: center;
  background: linear-gradient(135deg, #25469f, #2e6df6);
}

.cta-band p {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.78);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 8vw;
  color: #9ca3af;
  background: #050505;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(6px);
}

.modal-backdrop[hidden] {
  display: none !important;
}

.login-modal {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.login-modal img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.login-modal h2 {
  margin-bottom: 2px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  min-height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  color: #475467;
  background: #f2f4f7;
  font-size: 1.35rem;
}

.modal-close:hover {
  color: #ffffff;
  background: var(--brand);
}

.signin-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.link-button {
  min-height: auto;
  border: 0;
  padding: 4px;
  color: var(--brand);
  background: transparent;
  font-weight: 800;
}

.link-button:hover {
  color: var(--brand-dark);
  background: transparent;
  text-decoration: underline;
}

.portal {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  min-height: 100vh;
}

body:not(.is-signed-in).is-portal-open .portal {
  display: block;
}

body:not(.is-signed-in).is-portal-open .sidebar {
  display: none;
}

body:not(.is-signed-in).is-portal-open .workspace {
  max-width: 1180px;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
  border-right: 1px solid var(--line);
  padding: 28px 16px;
  background: #ffffff;
}

.sidebar-nav {
  display: grid;
  align-content: start;
  gap: 6px;
  margin-top: 42px;
}

.sidebar-nav a {
  border-radius: var(--radius);
  padding: 12px 16px;
  color: #374151;
  font-size: 1rem;
  font-weight: 650;
}

.sidebar-nav a:hover,
.sidebar-nav a.is-active {
  color: #ffffff;
  background: var(--brand);
}

.sidebar-user {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.avatar-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe, #93c5fd);
}

.sidebar-user strong {
  display: block;
  max-width: 170px;
  overflow: hidden;
  color: #111827;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user small {
  display: block;
  max-width: 170px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu {
  position: absolute;
  left: 52px;
  bottom: 64px;
  min-width: 150px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.sidebar-user:hover .profile-menu,
.sidebar-user:focus-within .profile-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.menu-button {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  color: var(--danger);
  border-color: transparent;
  background: #fff5f5;
  text-align: left;
}

.menu-button:hover {
  color: #ffffff;
  border-color: var(--danger);
  background: var(--danger);
}

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

.app-view {
  max-width: 1120px;
}

.tab-panel[hidden] {
  display: none !important;
}

.page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.page-title h1 {
  font-size: clamp(2rem, 3vw, 2.55rem);
}

.page-title > p {
  max-width: 560px;
  margin-bottom: 4px;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 6px;
  color: #075e54;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.panel-heading {
  margin-bottom: 18px;
}

.panel-heading.split,
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-header {
  margin: 34px 0 16px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.stat-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  align-items: center;
  min-height: 110px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.stat-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.stat-card strong {
  grid-column: 1 / -1;
  font-size: 1.1rem;
}

.icon-tile {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius);
  color: var(--brand);
  background: #eef4ff;
  font-weight: 900;
}

.icon-tile.amber {
  color: #d97706;
  background: #fff7ed;
}

.icon-tile.green {
  color: #16a34a;
  background: #ecfdf3;
}

.icon-button {
  display: grid;
  width: 42px;
  min-height: 34px;
  place-items: center;
  padding: 0;
  color: #ffffff;
  background: var(--brand);
}

.address-grid,
.book-layout,
.orders-layout,
.account-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.orders-layout {
  grid-template-columns: minmax(320px, 0.8fr) minmax(420px, 1fr);
  align-items: start;
}

.delivery-index-panel {
  position: sticky;
  top: 42px;
}

.signup-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  max-width: 760px;
  margin: 0 auto 28px;
}

.signup-header h1 {
  font-size: clamp(2.3rem, 4vw, 3.2rem);
}

.signup-header p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.signup-header img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.round-back {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #374151;
  background: #eef0f4;
  font-size: 2rem;
  line-height: 1;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.65fr) minmax(420px, 1fr);
  gap: 24px;
  max-width: 1160px;
  margin: 0 auto;
  align-items: start;
}

body:not(.is-signed-in) .account-grid {
  grid-template-columns: minmax(320px, 760px);
  justify-content: center;
}

body.is-signed-in .account-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.signin-panel {
  display: grid;
  gap: 16px;
  align-self: start;
}

.signin-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.signup-card {
  padding: 28px;
}

.account-result {
  grid-column: 1 / -1;
  min-height: 24px;
}

.address-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #ffffff;
}

.address-card p {
  margin: 2px 0 0;
  color: var(--muted);
}

.dashboard-request {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-request p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
}

.delivery-list {
  display: grid;
  gap: 14px;
}

.delivery-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--ink);
  background: #ffffff;
  text-align: left;
  box-shadow: none;
}

.delivery-row:hover {
  color: var(--brand);
  border-color: #c7d2fe;
  background: #f8fbff;
}

.delivery-row strong,
.delivery-row small {
  display: block;
}

.delivery-row small {
  margin-top: 2px;
  color: var(--muted);
  font-weight: 500;
}

.delivery-row em {
  align-self: center;
  border-radius: 999px;
  padding: 5px 12px;
  color: #92400e;
  background: #fef3c7;
  font-style: normal;
  white-space: nowrap;
}

.form-stack,
.delivery-form,
.compact-form {
  display: grid;
  gap: 14px;
}

.form-section {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.form-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.section-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.section-title span {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--brand-dark);
  font-weight: 900;
}

.section-title p,
.panel-heading p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
}

.field-grid {
  display: grid;
  gap: 16px;
}

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

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

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

.form-note {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-note.success,
.result.success {
  color: #15803d;
}

.form-note.error,
.result.error {
  color: var(--danger);
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 8;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: 6px -22px -22px;
  border-top: 1px solid var(--line);
  padding: 16px 22px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.compact-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.compact-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--ink);
  background: var(--surface-soft);
}

.compact-list .muted,
.empty-state {
  color: var(--muted);
}

.compact-list .action-row {
  padding: 0;
}

.list-action {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  width: 100%;
  min-height: auto;
  border: 0;
  border-radius: var(--radius);
  padding: 14px;
  color: var(--ink);
  background: transparent;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
}

.list-action span {
  display: block;
}

.list-action:hover {
  color: var(--brand);
  background: #eef4ff;
}

.order-row-title {
  margin-bottom: 4px;
  font-weight: 900;
}

.order-row-side {
  display: grid !important;
  justify-items: end;
  gap: 8px;
  flex: 0 0 auto;
}

.order-row-side b {
  color: var(--brand-dark);
  font-size: 1.05rem;
}

.order-row-side em {
  border-radius: 999px;
  padding: 5px 10px;
  font-style: normal;
  font-weight: 850;
}

.order-row-side em.warning {
  color: #92400e;
  background: #fef3c7;
}

.order-row-side em.success {
  color: #166534;
  background: #dcfce7;
}

.order-row-side em.danger {
  color: #991b1b;
  background: #fee2e2;
}

.button-row,
.utility-grid {
  display: grid;
  gap: 10px;
}

.button-row {
  grid-template-columns: 1fr 1fr;
}

.utility-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 16px;
}

.create-account {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.create-account summary {
  color: var(--brand-dark);
  font-weight: 850;
  cursor: pointer;
}

.create-account form {
  margin-top: 16px;
}

.signup-flow {
  display: grid;
  gap: 24px;
}

.signup-steps {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto 1fr auto auto 1fr auto auto;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.signup-steps button {
  display: grid;
  width: 30px;
  height: 30px;
  min-height: 30px;
  place-items: center;
  border-radius: 50%;
  border: 0;
  padding: 0;
  color: #6b7280;
  background: #e5e7eb;
  font-weight: 900;
}

.signup-steps button.is-active {
  color: #ffffff;
  background: var(--brand-bright);
}

.signup-steps button.is-complete {
  color: #ffffff;
  background: var(--success);
}

.signup-steps b {
  font-weight: 650;
}

.signup-steps i {
  height: 2px;
  background: var(--line);
}

.signup-step {
  display: grid;
  gap: 18px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.signup-step[hidden] {
  display: none !important;
}

.signup-step legend {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 1.85rem;
  font-weight: 900;
}

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

.choice-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 92px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  color: #374151;
  background: #ffffff;
  cursor: pointer;
}

.choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-card span {
  color: var(--brand-bright);
  font-size: 1.6rem;
  line-height: 1;
}

.choice-card.is-selected,
.choice-card:has(input:checked) {
  color: var(--brand);
  border-color: var(--brand-bright);
  background: #eef4ff;
}

.signup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
}

.signup-actions.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.signup-actions button {
  min-width: 180px;
}

.muted-copy {
  margin: -4px 0 0;
  color: var(--muted);
}

.payment-preview {
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 18px;
  background: #eff6ff;
}

.payment-preview p {
  margin: 6px 0 0;
  color: #4b5563;
}

.consent-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 600;
}

.consent-line input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.account-tools {
  grid-column: 1 / -1;
}

.payment-banner {
  display: grid;
  gap: 3px;
  margin-bottom: 14px;
  border: 1px solid #f3d29b;
  border-radius: var(--radius);
  padding: 14px;
  color: #a35b00;
  background: #fff8ed;
}

.payment-banner strong {
  color: #7c3f00;
}

.payment-banner-ready {
  color: #087333;
  border-color: #a8dabc;
  background: #eefbf3;
}

.payment-banner-error {
  color: var(--danger);
  border-color: #f2b3ae;
  background: #fff4f2;
}

.payment-method-list {
  display: grid;
  gap: 8px;
}

.payment-method-empty,
.payment-method-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--surface-soft);
}

.payment-method-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-weight: 850;
}

.payment-method-row span:last-child {
  color: var(--muted);
  font-weight: 700;
}

.payment-element {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #ffffff;
}

pre {
  min-height: 260px;
  max-height: 430px;
  overflow: auto;
  margin: 0 0 18px;
  border: 1px solid #142033;
  border-radius: var(--radius);
  padding: 14px;
  color: #d9fbe8;
  background: #101827;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
}

.result {
  min-height: 28px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.proof-viewer {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-soft);
}

.proof-heading {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.proof-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.proof-media {
  grid-column: 1 / -1;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.delivery-detail-shell {
  min-width: 0;
}

.empty-detail {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 56px 30px;
  text-align: center;
}

.empty-detail p {
  max-width: 420px;
  margin-bottom: 0;
  color: var(--muted);
}

.empty-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  color: var(--brand);
  background: #eef4ff;
  font-weight: 900;
}

.delivery-detail-card {
  max-width: 560px;
  margin: 0 auto;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.detail-hero-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.detail-hero h2 {
  font-size: 2rem;
}

.detail-hero p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
}

.detail-hero img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.detail-back {
  width: 38px;
  height: 38px;
  min-height: 38px;
  border: 0;
  padding: 0;
}

.detail-map-card {
  position: relative;
  margin-bottom: 82px;
}

.detail-map-card > img {
  width: 100%;
  height: 210px;
  border-radius: var(--radius);
  object-fit: cover;
}

.route-pills {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.route-pills span {
  max-width: 48%;
  overflow: hidden;
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--brand);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  font-size: 0.83rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-card {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: -70px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.driver-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe, #60a5fa);
}

.driver-card p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.driver-card b {
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--brand);
  background: #dbeafe;
  white-space: nowrap;
}

.detail-section {
  margin-top: 28px;
}

.detail-section h3 {
  margin-bottom: 14px;
  font-size: 1.35rem;
}

.status-timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  min-height: 62px;
}

.status-timeline li::before {
  position: absolute;
  top: 30px;
  bottom: 0;
  left: 15px;
  width: 2px;
  background: #e5e7eb;
  content: "";
}

.status-timeline li:last-child::before {
  display: none;
}

.status-timeline li > span {
  z-index: 1;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #98a2b3;
  background: #eef0f4;
  font-size: 0.84rem;
  font-weight: 900;
}

.status-timeline li.is-done > span {
  color: #ffffff;
  background: var(--success);
}

.status-timeline li.is-current > span {
  color: #ffffff;
  background: var(--brand-bright);
}

.status-timeline li.is-cancelled > span {
  color: #ffffff;
  background: var(--danger);
}

.status-timeline p {
  margin-bottom: 0;
  color: var(--muted);
}

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

.detail-list {
  display: grid;
  gap: 9px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #ffffff;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  max-width: 58%;
  font-weight: 850;
  text-align: right;
}

.route-detail-grid {
  display: grid;
  gap: 12px;
}

.route-detail-grid article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #ffffff;
}

.route-detail-grid p {
  margin: 4px 0 2px;
  color: var(--muted);
}

.route-detail-grid small {
  color: var(--subtle);
}

.route-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius);
  color: #ffffff;
  font-weight: 900;
}

.route-icon.pickup {
  background: var(--success);
}

.route-icon.dropoff {
  background: var(--danger);
}

.internal-status-tools {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.internal-status-tools summary {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.internal-status-tools form {
  margin-top: 14px;
}

@media (max-width: 1080px) {
  .portal {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    z-index: 20;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    height: auto;
    gap: 12px;
    padding: 14px 18px;
  }

  .sidebar-nav {
    display: flex;
    grid-column: 1 / -1;
    gap: 6px;
    margin-top: 0;
    overflow-x: auto;
  }

  .sidebar-user {
    justify-self: end;
    border-top: 0;
    padding-top: 0;
  }

  .workspace {
    padding: 28px 18px;
  }
}

@media (max-width: 860px) {
  .public-header {
    padding: 0 18px;
  }

  .feature-grid,
  .step-grid,
  .stat-grid,
  .address-grid,
  .book-layout,
  .orders-layout,
  .account-layout,
  .field-grid.two,
  .field-grid.three {
    grid-template-columns: 1fr;
  }

  .page-title,
  .dashboard-request {
    display: grid;
  }

  .form-section {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-3 {
    grid-column: span 1;
  }

  .site-footer {
    display: grid;
  }

  .delivery-index-panel {
    position: static;
  }

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

@media (max-width: 620px) {
  body {
    font-size: 15px;
  }

  .public-brand span,
  .sidebar-brand span {
    display: none;
  }

  .hero {
    min-height: 420px;
  }

  .marketing-section,
  .how-section {
    padding: 54px 18px;
  }

  .button-row,
  .utility-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-user strong {
    max-width: 130px;
  }

  .workspace {
    padding: 20px 12px;
  }

  .panel {
    padding: 16px;
  }

  .sticky-actions {
    margin: 6px -16px -16px;
    padding: 12px 16px;
  }

  .list-action,
  .delivery-row,
  .driver-card,
  .detail-hero {
    display: grid;
  }

  .order-row-side {
    justify-items: start;
  }

  .driver-card {
    position: static;
    margin: -22px 14px 0;
  }

  .detail-map-card {
    margin-bottom: 26px;
  }

  .route-pills {
    position: static;
    display: grid;
    margin: -14px 14px 0;
  }

  .route-pills span {
    max-width: none;
  }
}
