:root {
  --ink: #10283d;
  --muted: #63788a;
  --blue-950: #072f54;
  --blue-800: #0b568f;
  --blue-700: #1678b7;
  --blue-600: #2498d0;
  --blue-400: #79ccec;
  --blue-200: #c9eaf6;
  --blue-100: #e9f7fc;
  --aqua: #79d8dc;
  --mint: #d8f1e9;
  --green: #23836b;
  --green-soft: #e5f4ef;
  --white: #fff;
  --danger: #c83d56;
  --warning: #c36a05;
  --success: #087f65;
  --surface: rgba(255, 255, 255, .72);
  --surface-strong: rgba(255, 255, 255, .94);
  --line: rgba(30, 93, 133, .12);
  --shadow: 0 24px 70px rgba(24, 77, 111, .10), 0 3px 14px rgba(24, 77, 111, .05);
  --shadow-soft: 0 12px 34px rgba(24, 77, 111, .08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f7fbfd;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: #f7fbfd;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 0%, rgba(148, 215, 240, .24), transparent 27rem),
    radial-gradient(circle at 94% 24%, rgba(182, 229, 218, .19), transparent 26rem),
    radial-gradient(circle at 42% 105%, rgba(139, 195, 230, .13), transparent 34rem),
    linear-gradient(150deg, #fbfdfe 0%, #f3f9fc 48%, #f8fbfc 100%);
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 999px;
  background: radial-gradient(circle at 32% 25%, rgba(255, 255, 255, .86), rgba(169, 219, 239, .12) 55%, rgba(31, 124, 177, .05));
  box-shadow: inset -16px -18px 35px rgba(9, 105, 190, .05), 0 28px 80px rgba(13, 90, 140, .07);
  content: "";
  pointer-events: none;
}

body::before {
  width: 280px;
  height: 280px;
  top: 9vh;
  right: -116px;
  animation: float 12s ease-in-out infinite;
}

body::after {
  width: 190px;
  height: 190px;
  bottom: 10vh;
  left: -82px;
  animation: float 15s ease-in-out infinite reverse;
}

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

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

button { color: inherit; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(17, 152, 238, .28);
  outline-offset: 2px;
}

a { color: inherit; }

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

h1, h2, h3, h4 {
  font-family: "Instrument Sans", "Source Sans 3", sans-serif;
  letter-spacing: -.04em;
}

.hidden { display: none !important; }

.app-shell {
  width: min(100%, 1480px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(18px + var(--safe-top)) 22px calc(105px + var(--safe-bottom));
}

.glass {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .94);
  background:
    linear-gradient(135deg, rgba(255,255,255,.84), rgba(248,252,254,.64)),
    rgba(244, 250, 252, .58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

[data-platform="ios"] .glass {
  border-color: rgba(255,255,255,.96);
  background:
    linear-gradient(140deg, rgba(255,255,255,.72), rgba(226,243,250,.30) 48%, rgba(255,255,255,.58)),
    rgba(239, 248, 251, .34);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    inset 1px 0 0 rgba(255,255,255,.35),
    0 24px 72px rgba(26, 78, 111, .12);
  backdrop-filter: blur(36px) saturate(155%);
  -webkit-backdrop-filter: blur(36px) saturate(155%);
}

[data-platform="ios"] .glass::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 9% -10%, rgba(255,255,255,.8), transparent 26%),
    linear-gradient(100deg, transparent 25%, rgba(255,255,255,.22) 49%, transparent 68%);
  content: "";
  pointer-events: none;
  mix-blend-mode: screen;
}

[data-platform="android"] .glass {
  border-color: rgba(75, 132, 164, .13);
  background: rgba(252, 254, 255, .88);
  box-shadow: 0 12px 34px rgba(23, 72, 103, .09);
  backdrop-filter: blur(18px) saturate(112%);
  -webkit-backdrop-filter: blur(18px) saturate(112%);
}

.topbar {
  position: sticky;
  z-index: 40;
  top: calc(12px + var(--safe-top));
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 70px;
  margin-bottom: 25px;
  padding: 10px 12px 10px 16px;
  border-radius: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  text-decoration: none;
}

.brand-logo-image {
  width: 126px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 7px 13px rgba(8, 108, 188, .15));
}

.brand-product {
  padding: 5px 9px;
  border: 1px solid rgba(17, 152, 238, .15);
  border-radius: 999px;
  font-family: "Instrument Sans", sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--blue-800);
  background: rgba(239, 248, 252, .82);
}

.desktop-nav {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.nav-link,
.icon-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-link {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 13px;
  color: #466078;
  font-weight: 700;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue-800);
  background: rgba(22, 151, 231, .10);
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.icon-button {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
}

.icon-button:hover { background: rgba(19, 144, 223, .09); }

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 9px;
  height: 9px;
  border: 2px solid white;
  border-radius: 50%;
  background: #ff576f;
}

.avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 15px;
  color: white;
  background: linear-gradient(145deg, #1a789f, var(--blue-950));
  box-shadow: 0 8px 18px rgba(16, 68, 101, .17);
  font-weight: 800;
  cursor: pointer;
}

.demo-role {
  min-height: 46px;
  padding: 0 40px 0 14px;
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--blue-950);
  background: rgba(255,255,255,.72);
  font-weight: 700;
}

.page {
  display: grid;
  gap: 24px;
  animation: pageIn .36s cubic-bezier(.2,.8,.2,1);
}

.customer-home {
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .78fr);
  align-items: start;
}

.hero {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  padding: 52px;
  border-radius: 36px;
  border: 1px solid rgba(255,255,255,.96);
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 16%, rgba(176, 223, 240, .34), transparent 21%),
    radial-gradient(circle at 82% 94%, rgba(192, 231, 219, .28), transparent 30%),
    linear-gradient(140deg, rgba(255,255,255,.95) 0%, rgba(238,248,252,.91) 58%, rgba(246,251,250,.92) 100%);
  box-shadow: 0 30px 90px rgba(24, 77, 111, .13);
  backdrop-filter: blur(28px) saturate(130%);
  -webkit-backdrop-filter: blur(28px) saturate(130%);
}

[data-platform="ios"] .hero {
  background:
    radial-gradient(circle at 84% 16%, rgba(176, 223, 240, .27), transparent 21%),
    radial-gradient(circle at 82% 94%, rgba(192, 231, 219, .22), transparent 30%),
    linear-gradient(140deg, rgba(255,255,255,.78), rgba(234,246,250,.58));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.98),
    0 32px 95px rgba(24,77,111,.13);
  backdrop-filter: blur(38px) saturate(150%);
  -webkit-backdrop-filter: blur(38px) saturate(150%);
}

[data-platform="android"] .hero {
  background: linear-gradient(140deg, #fbfdfe, #edf7fa 60%, #f4faf8);
  box-shadow: 0 22px 60px rgba(24,77,111,.11);
  backdrop-filter: blur(14px) saturate(108%);
  -webkit-backdrop-filter: blur(14px) saturate(108%);
}

.hero::before,
.hero::after {
  position: absolute;
  border: 1px solid rgba(255,255,255,.84);
  border-radius: 999px;
  background: radial-gradient(circle at 30% 24%, rgba(255,255,255,.92), rgba(163,215,237,.22) 43%, rgba(18,104,155,.08));
  box-shadow: inset -12px -14px 24px rgba(5,76,147,.07), 0 20px 50px rgba(19,69,102,.10);
  content: "";
}

.hero::before {
  width: 265px;
  height: 265px;
  top: -66px;
  right: -48px;
}

.hero::after {
  width: 152px;
  height: 152px;
  right: 180px;
  bottom: -61px;
}

.bubble-mini {
  position: absolute;
  z-index: 0;
  width: 54px;
  height: 54px;
  top: 68%;
  right: 12%;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 50%;
  background: rgba(212,238,247,.24);
  box-shadow: inset 4px 4px 14px rgba(255,255,255,.72), 0 10px 24px rgba(21,83,119,.08);
  animation: float 7s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(660px, 85%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 8px 11px;
  border: 1px solid rgba(29, 111, 157, .12);
  border-radius: 999px;
  color: var(--blue-800);
  background: rgba(236,247,251,.8);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(35,131,107,.10);
  content: "";
}

.hero h1 {
  max-width: 720px;
  margin-bottom: 19px;
  font-size: clamp(42px, 5.7vw, 76px);
  line-height: .98;
  letter-spacing: -.06em;
}

.hero p {
  max-width: 565px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.55;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 21px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active { transform: translateY(0) scale(.98); }

.button-primary {
  color: white;
  background: linear-gradient(135deg, #176f9d, var(--blue-950));
  box-shadow: 0 13px 28px rgba(12,62,96,.19);
}

.button-blue {
  color: white;
  background: linear-gradient(135deg, #1e8ebf, var(--blue-800));
  box-shadow: 0 12px 24px rgba(12, 86, 132, .18);
}

.button-secondary {
  color: var(--blue-800);
  border-color: rgba(13,118,197,.16);
  background: rgba(241,248,251,.86);
}

.button-ghost {
  color: var(--blue-800);
  border-color: rgba(21,99,144,.15);
  background: rgba(255,255,255,.72);
}

.button-danger {
  color: var(--danger);
  border-color: rgba(200,61,86,.18);
  background: rgba(255,238,241,.92);
}

.button-small {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 11px;
  font-size: 13px;
}

.button-full { width: 100%; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 36px;
  color: #48677e;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.side-stack {
  display: grid;
  gap: 18px;
}

.card {
  overflow: hidden;
  padding: 24px;
  border-radius: var(--radius-xl);
}

.card::before,
.stat-card::before {
  position: absolute;
  top: 0;
  right: 12%;
  left: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), transparent);
  content: "";
  pointer-events: none;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.card-title {
  margin: 0 0 5px;
  font-size: 21px;
}

.card-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.status-chip,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-chip {
  color: #1b6983;
  background: rgba(110,190,218,.16);
}

.status-chip.warning {
  color: var(--warning);
  background: rgba(255,185,92,.18);
}

.status-chip.success {
  color: var(--success);
  background: var(--green-soft);
}

.status-chip.neutral {
  color: #5b6b7e;
  background: rgba(91,107,126,.10);
}

.order-number {
  margin-bottom: 7px;
  color: var(--blue-800);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.order-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.summary-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(244,251,255,.65);
}

.summary-item small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.summary-item strong {
  font-size: 14px;
}

.progress-track {
  position: relative;
  height: 7px;
  overflow: hidden;
  margin: 15px 0 10px;
  border-radius: 99px;
  background: rgba(6,86,155,.10);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-600), var(--aqua));
  box-shadow: 0 0 15px rgba(42,197,230,.40);
  transition: width .5s cubic-bezier(.2,.8,.2,1);
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.quick-action {
  min-height: 96px;
  padding: 13px 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255,255,255,.62);
  cursor: pointer;
}

.quick-action:hover { background: rgba(229,247,255,.95); }

.quick-icon {
  display: grid;
  width: 38px;
  height: 38px;
  margin: 0 auto 8px;
  place-items: center;
  border-radius: 13px;
  color: var(--blue-800);
  background: linear-gradient(145deg, #f3fafc, #dceff6);
}

.quick-action strong {
  display: block;
  font-size: 12px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-head h1,
.section-head h2 { margin-bottom: 4px; }

.section-head p { margin: 0; color: var(--muted); }

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .65fr);
  gap: 22px;
  align-items: start;
}

.orders-list,
.activity-list,
.notification-list {
  display: grid;
  gap: 12px;
}

.order-row,
.activity-row,
.notification-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.56);
}

.order-row {
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}

.order-row:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.92);
}

.activity-button {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.activity-button:hover {
  border-color: rgba(27, 106, 150, .16);
  background: rgba(243,249,252,.92);
}

.order-icon,
.activity-icon {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border-radius: 15px;
  color: var(--blue-800);
  background: linear-gradient(145deg, #e8f9ff, #c6ebff);
}

.order-main strong,
.activity-main strong { display: block; margin-bottom: 3px; }

.order-main small,
.activity-main small,
.notification-row small {
  color: var(--muted);
  line-height: 1.4;
}

.order-price {
  text-align: right;
  font-weight: 800;
}

.order-price small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 500;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  min-height: 70px;
}

.timeline-item:not(:last-child)::before {
  position: absolute;
  width: 2px;
  top: 26px;
  bottom: -2px;
  left: 13px;
  background: rgba(11,112,190,.15);
  content: "";
}

.timeline-item.done:not(:last-child)::before {
  background: linear-gradient(var(--blue-600), var(--aqua));
}

.timeline-dot {
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid rgba(9,113,190,.20);
  border-radius: 50%;
  color: transparent;
  background: #f5fcff;
}

.timeline-item.done .timeline-dot {
  color: white;
  border-color: transparent;
  background: linear-gradient(145deg, var(--blue-600), #18bfce);
}

.timeline-item.current .timeline-dot {
  border: 7px solid white;
  background: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(17,152,238,.17);
}

.timeline-copy strong {
  display: block;
  margin: 3px 0 3px;
  font-size: 14px;
}

.timeline-copy small {
  color: var(--muted);
}

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

.stat-card {
  padding: 21px;
  border-radius: var(--radius-lg);
}

.stat-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stat-value {
  display: block;
  margin-bottom: 5px;
  font-family: "Instrument Sans", sans-serif;
  font-size: 30px;
  letter-spacing: -.05em;
}

.stat-change {
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
}

.manager-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, .7fr);
  gap: 22px;
  align-items: start;
}

.queue-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.filter-tabs {
  display: flex;
  gap: 5px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(9,104,177,.07);
}

.filter-tab {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.filter-tab.active {
  color: var(--blue-800);
  background: white;
  box-shadow: 0 4px 12px rgba(5,73,127,.09);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.65);
}

.search-box input {
  width: 180px;
  border: 0;
  outline: 0;
  min-height: 42px;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.queue-table {
  width: 100%;
  border-collapse: collapse;
}

.queue-table th {
  padding: 12px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
}

.queue-table td {
  padding: 14px 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  vertical-align: middle;
}

.queue-table tr { cursor: pointer; }
.queue-table tbody tr:hover { background: rgba(230,247,255,.45); }
.customer-cell strong { display: block; margin-bottom: 3px; }
.customer-cell small { color: var(--muted); }

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

.route-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.55);
}

.route-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: var(--blue-700);
  font-size: 12px;
  font-weight: 800;
}

.route-copy strong,
.route-copy small { display: block; }
.route-copy small { color: var(--muted); }

.detail-panel {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  width: min(520px, 100%);
  height: 100dvh;
  overflow-y: auto;
  padding: calc(28px + var(--safe-top)) 28px calc(28px + var(--safe-bottom));
  border-left: 1px solid rgba(255,255,255,.75);
  border-radius: 30px 0 0 30px;
  background: rgba(244,252,255,.94);
  box-shadow: -20px 0 70px rgba(3,51,95,.20);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  animation: slideIn .34s cubic-bezier(.2,.8,.2,1);
}

.panel-backdrop,
.modal-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  background: rgba(2,31,61,.30);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeIn .2s ease;
}

.panel-top,
.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.panel-top h2,
.modal-top h2 { margin: 0; }

.close-button {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.80);
  cursor: pointer;
}

.detail-section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.detail-section h3 { margin-bottom: 13px; font-size: 16px; }

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

.detail-pair {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}

.detail-pair strong {
  color: var(--ink);
  text-align: right;
}

.stage-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.field,
.field-row {
  display: grid;
  gap: 7px;
}

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

.field label {
  color: #39566f;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid rgba(7,105,178,.22);
  border-radius: 15px;
  color: var(--ink);
  background-color: rgba(255,255,255,.88);
  box-shadow: inset 0 1px 2px rgba(2,58,106,.035), 0 8px 22px rgba(32,112,154,.035);
  font-size: 16px;
  line-height: 1.3;
  outline: 0;
  -webkit-appearance: none;
  appearance: none;
}

.select,
select.input {
  padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230b568f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 20px 20px;
}

.input::placeholder,
.textarea::placeholder { color: #8193a2; opacity: 1; }

input[type="date"].input,
input[type="time"].input { min-height: 54px; }
input[type="date"].input::-webkit-date-and-time-value,
input[type="time"].input::-webkit-date-and-time-value { min-height: 24px; text-align: left; }

.textarea {
  min-height: 108px;
  padding: 13px 15px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(17,152,238,.62);
  box-shadow: 0 0 0 4px rgba(17,152,238,.10);
}

.field-help {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

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

.choice-card {
  position: relative;
  min-height: 125px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.60);
  cursor: pointer;
}

.choice-card:hover { border-color: rgba(17,152,238,.34); }
.choice-card.selected {
  border-color: var(--blue-600);
  background: rgba(229,247,255,.92);
  box-shadow: 0 0 0 3px rgba(17,152,238,.09);
}

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

.choice-card strong {
  display: block;
  margin-bottom: 6px;
}

.choice-card small {
  display: block;
  color: var(--muted);
  line-height: 1.4;
}

.choice-price {
  display: block;
  margin-top: 11px;
  color: var(--blue-800);
  font-weight: 800;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.53);
}

.check-row input {
  width: 19px;
  height: 19px;
  margin: 1px 0 0;
  accent-color: var(--blue-700);
}

.check-row strong,
.check-row small { display: block; }
.check-row small { margin-top: 2px; color: var(--muted); }

.modal-wrap {
  position: fixed;
  z-index: 110;
  inset: 0;
  display: grid;
  overflow-y: auto;
  place-items: center;
  padding: calc(22px + var(--safe-top)) 18px calc(22px + var(--safe-bottom));
}

.modal-wrap .modal-backdrop { z-index: 0; }

.modal {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: calc(100dvh - 44px);
  overflow-y: auto;
  padding: 28px;
  border-radius: 30px;
  background: rgba(246,252,255,.94);
  box-shadow: 0 34px 110px rgba(2,42,82,.28);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  animation: modalIn .3s cubic-bezier(.2,.8,.2,1);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin: 0 0 28px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7a8d9d;
  font-size: 11px;
  font-weight: 800;
}

.step-number {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(8,108,187,.15);
  border-radius: 50%;
  background: rgba(255,255,255,.7);
}

.step.active { color: var(--blue-800); }
.step.active .step-number,
.step.done .step-number {
  color: white;
  border-color: transparent;
  background: var(--blue-700);
}

.step.done .step-number { background: var(--success); }

.wizard-body {
  display: grid;
  gap: 18px;
  min-height: 330px;
}

.wizard-copy h3 { margin-bottom: 6px; font-size: 25px; }
.wizard-copy p { color: var(--muted); line-height: 1.5; }

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.estimate-box {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(10,117,206,.16);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(225,247,255,.86), rgba(255,255,255,.72));
}

.estimate-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}

.estimate-row strong { color: var(--ink); }
.estimate-total {
  margin-top: 5px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  font-weight: 800;
}

.estimate-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.login-page {
  display: grid;
  min-height: calc(100dvh - 48px);
  grid-template-columns: 1.08fr .92fr;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.96);
  border-radius: 36px;
  background: rgba(255,255,255,.74);
}

.login-brand {
  position: relative;
  display: flex;
  min-height: 680px;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  color: var(--ink);
  background:
    radial-gradient(circle at 75% 15%, rgba(169,220,240,.34), transparent 20%),
    radial-gradient(circle at 18% 88%, rgba(189,230,217,.26), transparent 30%),
    linear-gradient(145deg, #fafdfe, #edf7fb 58%, #f6fbfa);
}

.login-brand::after {
  position: absolute;
  width: 340px;
  height: 340px;
  right: -90px;
  bottom: -70px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.92), rgba(168,219,239,.14) 53%, transparent);
  box-shadow: inset -24px -28px 50px rgba(3,60,122,.06), 0 24px 50px rgba(21,72,103,.08);
  content: "";
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: "Instrument Sans";
  font-size: 25px;
  font-weight: 800;
}

.login-brand-image {
  width: min(230px, 64vw);
  height: 96px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 12px 20px rgba(0, 27, 72, .20));
}

.login-product-name {
  padding: 7px 12px;
  border: 1px solid rgba(23,108,155,.13);
  border-radius: 999px;
  color: var(--blue-800);
  background: rgba(255,255,255,.68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.login-message {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.login-message h1 {
  margin-bottom: 19px;
  font-size: clamp(43px, 5.5vw, 74px);
  line-height: .98;
}

.login-message p {
  max-width: 520px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.login-proof {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 17px;
  color: #49697e;
  font-size: 13px;
  font-weight: 700;
}

.login-form-wrap {
  display: grid;
  padding: 42px;
  place-items: center;
  border-left: 1px solid rgba(29,94,134,.08);
  background: rgba(255,255,255,.70);
}

.login-form {
  width: min(420px, 100%);
}

.portal-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 25px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(221,244,255,.56);
}

.portal-switch button {
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.portal-switch button.active {
  color: var(--blue-800);
  background: rgba(255,255,255,.90);
  box-shadow: 0 6px 18px rgba(5,72,126,.10);
}

.login-form h2 {
  margin-bottom: 7px;
  font-size: 31px;
}

.login-form > p {
  margin-bottom: 27px;
  color: var(--muted);
}

.form-stack {
  display: grid;
  gap: 15px;
}

.form-foot {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.text-link {
  padding: 0;
  border: 0;
  color: var(--blue-700);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.demo-note {
  margin-top: 22px;
  padding: 13px 14px;
  border: 1px solid rgba(8,117,204,.15);
  border-radius: 13px;
  color: #41627e;
  background: rgba(225,246,255,.68);
  font-size: 12px;
  line-height: 1.5;
}

.staff-note {
  display: grid;
  gap: 4px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(8,117,204,.14);
  border-radius: 14px;
  color: #41627e;
  background: rgba(255,255,255,.56);
  font-size: 12px;
  line-height: 1.5;
}

.staff-note strong { color: var(--blue-950); }

.payment-button { margin-top: 15px; }

.tracking-disabled {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 16px;
  border: 1px dashed rgba(8,117,204,.24);
  border-radius: 16px;
  color: #47667f;
  background:
    repeating-linear-gradient(135deg, rgba(224,246,255,.44) 0 9px, rgba(255,255,255,.38) 9px 18px);
}

.tracking-disabled strong,
.tracking-disabled small { display: block; }
.tracking-disabled strong { color: var(--blue-950); }
.tracking-disabled small { margin-top: 4px; line-height: 1.45; }

.order-spotlight {
  padding: 19px;
  border: 1px solid rgba(255,255,255,.96);
  border-radius: 21px;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 0%, rgba(176,222,239,.32), transparent 32%),
    linear-gradient(140deg, rgba(255,255,255,.94), rgba(234,246,250,.88));
  box-shadow: 0 14px 32px rgba(23,75,107,.09);
}

.order-spotlight p {
  margin-bottom: 5px;
  color: var(--blue-800);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.order-spotlight span {
  color: var(--muted);
  font-size: 14px;
}

.line-item-list {
  display: grid;
  gap: 8px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.line-item-list div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font-size: 13px;
}

.line-item-list strong { color: var(--ink); }

.final-weight-card {
  display: grid;
  gap: 13px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(32,126,102,.15);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(246,252,250,.96), rgba(229,244,239,.80));
}

.final-weight-title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.final-weight-title .quick-icon { margin: 0; }
.final-weight-title strong,
.final-weight-title small { display: block; }
.final-weight-title small { margin-top: 2px; color: var(--muted); }

.final-weight-math {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(33,103,81,.10);
  border-radius: 13px;
  background: rgba(255,255,255,.68);
}

.final-weight-math span {
  padding: 11px;
  border-right: 1px solid rgba(33,103,81,.10);
}

.final-weight-math span:last-child { border: 0; }
.final-weight-math small,
.final-weight-math strong { display: block; }
.final-weight-math small { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.final-weight-math strong { margin-top: 3px; font-size: 14px; }
.final-weight-math .balance-due strong { color: var(--green); }
.final-weight-card > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.catalog-heading,
.catalog-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.catalog-heading { margin-bottom: 14px; }
.catalog-heading h3 { margin-bottom: 4px; }

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

.catalog-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.62);
}

.catalog-row.paused { opacity: .66; }

.catalog-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: var(--blue-800);
  background: var(--blue-100);
}

.catalog-copy strong,
.catalog-copy small { display: block; }
.catalog-copy small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.catalog-price { color: var(--blue-950); }
.catalog-edit { width: 38px; height: 38px; border-radius: 12px; }
.catalog-modal { max-width: 620px; }
.catalog-availability { align-self: end; }

.catalog-picker {
  margin-top: 16px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(247,251,252,.72);
}

.catalog-picker-head { margin-bottom: 12px; }
.catalog-picker-head strong,
.catalog-picker-head small { display: block; }
.catalog-picker-head small { color: var(--muted); }
.catalog-picker-head > span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 800;
}

.catalog-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.catalog-pick {
  display: grid;
  grid-template-columns: 1fr 68px;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.74);
}

.catalog-pick.selected {
  border-color: rgba(35,131,107,.24);
  background: rgba(236,248,244,.88);
}

.catalog-pick strong,
.catalog-pick small { display: block; }
.catalog-pick small { color: var(--muted); font-size: 12px; }
.catalog-qty { min-height: 42px; padding: 0 8px; text-align: center; }

.account-grid,
.settings-grid {
  display: grid;
  grid-template-columns: minmax(280px, .62fr) minmax(0, 1.3fr);
  gap: 22px;
  align-items: start;
}

.profile-card { text-align: center; }

.profile-avatar {
  display: grid;
  width: 88px;
  height: 88px;
  margin: 0 auto 15px;
  place-items: center;
  border: 5px solid rgba(255,255,255,.86);
  border-radius: 27px;
  color: white;
  background: linear-gradient(145deg, var(--blue-600), var(--blue-950));
  box-shadow: 0 15px 32px rgba(5,91,157,.20);
  font-family: "Instrument Sans";
  font-size: 28px;
  font-weight: 800;
}

.profile-card h2 { margin-bottom: 4px; }
.profile-card p { color: var(--muted); }

.menu-list {
  display: grid;
  gap: 6px;
  margin-top: 24px;
  text-align: left;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  color: #48627a;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.menu-item:hover,
.menu-item.active {
  color: var(--blue-800);
  background: rgba(14,136,216,.09);
}

.settings-section {
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.settings-section:last-child { border: 0; margin: 0; padding: 0; }
.settings-section h3 { margin-bottom: 15px; font-size: 17px; }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 58px;
  padding: 9px 0;
}

.toggle-row + .toggle-row { border-top: 1px solid var(--line); }
.toggle-copy strong,
.toggle-copy small { display: block; }
.toggle-copy small { margin-top: 3px; color: var(--muted); }

.switch {
  position: relative;
  width: 46px;
  height: 27px;
  flex: 0 0 auto;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: #c7d4dc;
  cursor: pointer;
  transition: .2s;
}
.switch span::before {
  position: absolute;
  width: 21px;
  height: 21px;
  left: 3px;
  bottom: 3px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 7px rgba(0,0,0,.16);
  content: "";
  transition: .2s;
}
.switch input:checked + span { background: var(--blue-600); }
.switch input:checked + span::before { transform: translateX(19px); }

.bottom-nav {
  position: fixed;
  z-index: 50;
  right: 14px;
  bottom: calc(12px + var(--safe-bottom));
  left: 14px;
  display: none;
  grid-template-columns: repeat(4, 1fr);
  max-width: 540px;
  min-height: 66px;
  margin: auto;
  padding: 7px;
  border-radius: 23px;
}

.bottom-link {
  display: grid;
  gap: 3px;
  place-items: center;
  border: 0;
  border-radius: 16px;
  color: #667d91;
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.bottom-link.active {
  color: var(--blue-800);
  background: rgba(18,146,226,.11);
}

.bottom-link svg { width: 21px; height: 21px; }

.fab {
  position: fixed;
  z-index: 55;
  right: 20px;
  bottom: calc(94px + var(--safe-bottom));
  display: none;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 19px;
  color: white;
  background: linear-gradient(145deg, var(--blue-600), var(--blue-800));
  box-shadow: 0 13px 28px rgba(5,89,158,.27);
  cursor: pointer;
}

.empty-state {
  padding: 48px 20px;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 22px;
  color: var(--blue-700);
  background: rgba(206,239,255,.70);
}

.empty-state h3 { margin-bottom: 7px; }
.empty-state p { max-width: 430px; margin: 0 auto 20px; color: var(--muted); }

.toast-region {
  position: fixed;
  z-index: 300;
  top: calc(18px + var(--safe-top));
  right: 18px;
  display: grid;
  width: min(390px, calc(100% - 36px));
  gap: 9px;
}

.toast {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 16px;
  background: rgba(249,253,255,.93);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: toastIn .3s cubic-bezier(.2,.8,.2,1);
}

.toast-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: var(--blue-700);
}

.toast strong,
.toast small { display: block; }
.toast small { margin-top: 2px; color: var(--muted); }
.toast button { border: 0; background: transparent; cursor: pointer; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

@keyframes float {
  0%, 100% { transform: translate3d(0,0,0); }
  50% { transform: translate3d(0,-14px,0); }
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: none; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: none; }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1020px) {
  .customer-home,
  .content-grid,
  .manager-grid { grid-template-columns: 1fr; }
  .side-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desktop-nav { display: none; }
  .topbar { grid-template-columns: 1fr auto; }
  .topbar .brand { min-width: 0; }
  .account-grid,
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body::before { width: 180px; height: 180px; }
  .app-shell {
    padding: calc(8px + var(--safe-top)) 10px calc(101px + var(--safe-bottom));
  }
  .topbar {
    top: calc(6px + var(--safe-top));
    min-height: 62px;
    margin-bottom: 14px;
    padding: 7px 8px 7px 10px;
    border-radius: 20px;
  }
  .brand-logo-image { width: 105px; height: 42px; }
  .brand-product { display: none; }
  .top-actions .demo-role { display: none; }
  .icon-button,
  .avatar { width: 40px; height: 40px; border-radius: 13px; }
  .customer-home { gap: 15px; }
  .hero {
    min-height: 420px;
    padding: 34px 25px;
    border-radius: 28px;
  }
  .hero-content { width: 100%; }
  .hero h1 { font-size: clamp(42px, 14vw, 59px); }
  .hero p { font-size: 16px; }
  .hero::before { width: 205px; height: 205px; right: -90px; }
  .hero::after { right: 44%; }
  .hero-meta { gap: 11px 18px; }
  .button { min-height: 50px; }
  .action-row .button { flex: 1 1 180px; }
  .side-stack { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 19px; border-radius: 22px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 26px; }
  .bottom-nav { display: grid; }
  .fab { display: grid; }
  .queue-toolbar { align-items: stretch; flex-direction: column; }
  .filter-tabs { overflow-x: auto; }
  .search-box input { width: 100%; }
  .queue-table,
  .queue-table tbody,
  .queue-table tr,
  .queue-table td { display: block; }
  .queue-table thead { display: none; }
  .queue-table tr {
    position: relative;
    margin-bottom: 10px;
    padding: 14px 110px 14px 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(255,255,255,.56);
  }
  .queue-table td { padding: 2px 0; border: 0; }
  .queue-table td:nth-child(1) { position: absolute; top: 14px; right: 12px; }
  .queue-table td:nth-child(3),
  .queue-table td:nth-child(4) { display: inline-block; margin-right: 8px; color: var(--muted); }
  .queue-table td:nth-child(5) { position: absolute; right: 12px; bottom: 14px; }
  .modal-wrap { padding: calc(8px + var(--safe-top)) 8px calc(8px + var(--safe-bottom)); }
  .modal {
    width: 100%;
    max-height: calc(100dvh - 16px);
    padding: 20px;
    border-radius: 25px;
  }
  .steps { gap: 3px; }
  .step { justify-content: center; }
  .step span:last-child { display: none; }
  .choice-grid,
  .field-row,
  .catalog-picker-grid { grid-template-columns: 1fr; }
  .catalog-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .catalog-row .status-chip { grid-column: 2; width: max-content; }
  .catalog-row .catalog-edit { grid-column: 3; grid-row: 1 / span 2; }
  .catalog-heading { align-items: stretch; flex-direction: column; }
  .catalog-heading .button { width: 100%; }
  .final-weight-math { grid-template-columns: 1fr; }
  .final-weight-math span { border-right: 0; border-bottom: 1px solid rgba(33,103,81,.10); }
  .wizard-body { min-height: 360px; }
  .detail-panel { border-radius: 0; padding: calc(22px + var(--safe-top)) 20px calc(25px + var(--safe-bottom)); }
  .login-page { min-height: calc(100dvh - 20px); grid-template-columns: 1fr; border-radius: 26px; }
  .login-brand { min-height: 270px; padding: 27px; }
  .login-message h1 { margin-top: 50px; font-size: 43px; }
  .login-message p { margin-bottom: 0; font-size: 15px; }
  .login-proof { display: none; }
  .login-form-wrap { padding: 29px 23px; }
  .order-row { grid-template-columns: auto 1fr; }
  .order-price { grid-column: 2; text-align: left; }
  .toast-region { top: calc(10px + var(--safe-top)); right: 10px; width: calc(100% - 20px); }
}

@media (max-width: 430px) {
  .hero { min-height: 435px; padding: 30px 21px; }
  .hero h1 { font-size: 44px; }
  .hero-meta { font-size: 12px; }
  .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-action { min-height: 88px; padding: 11px 5px; }
  .order-summary { gap: 8px; }
  .summary-item { padding: 12px 10px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stage-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Bubblez brand refresh · v1.6.1 */
:root {
  --brand-blue: #168fe1;
  --brand-aqua: #57d7df;
  --brand-lime: #b7e67d;
  --brand-lime-deep: #6f9f37;
  --brand-gradient: linear-gradient(128deg, var(--brand-blue) 0%, var(--brand-aqua) 55%, var(--brand-lime) 100%);
  --green: #5f9133;
  --green-soft: #eef8df;
}

html,
body {
  background-color: #f8fcfd;
}

body {
  background:
    radial-gradient(circle at 7% 0%, rgba(88, 206, 235, .22), transparent 28rem),
    radial-gradient(circle at 96% 19%, rgba(183, 230, 125, .20), transparent 28rem),
    radial-gradient(circle at 50% 110%, rgba(37, 147, 225, .11), transparent 36rem),
    linear-gradient(150deg, #ffffff 0%, #f3fbfd 48%, #fbfdf6 100%);
}

body::before,
body::after,
.hero::before,
.hero::after,
.login-brand::after {
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,.96), rgba(78,208,224,.22) 42%, rgba(183,230,125,.12) 70%, rgba(22,143,225,.06));
}

.glass {
  border-color: rgba(255,255,255,.96);
  background:
    linear-gradient(136deg, rgba(255,255,255,.88), rgba(244,251,252,.68) 62%, rgba(249,253,242,.62)),
    rgba(246, 252, 253, .62);
}

.topbar::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 24px 0 0 24px;
  background: var(--brand-gradient);
  content: "";
}

.brand-logo-image {
  width: 138px;
  height: 53px;
}

.brand-product,
.login-product-name {
  border-color: rgba(74, 184, 196, .20);
  color: #1468a2;
  background: linear-gradient(120deg, rgba(237,250,255,.90), rgba(243,251,231,.90));
}

.avatar,
.profile-avatar {
  background: var(--brand-gradient);
  box-shadow: 0 12px 28px rgba(26, 132, 181, .20);
}

.hero {
  background:
    radial-gradient(circle at 86% 12%, rgba(70, 196, 226, .27), transparent 24%),
    radial-gradient(circle at 83% 92%, rgba(183, 230, 125, .25), transparent 31%),
    linear-gradient(140deg, rgba(255,255,255,.97) 0%, rgba(238,250,253,.92) 58%, rgba(249,253,241,.94) 100%);
}

[data-platform="ios"] .hero,
.login-brand {
  background:
    radial-gradient(circle at 78% 14%, rgba(62, 196, 228, .30), transparent 22%),
    radial-gradient(circle at 20% 88%, rgba(183, 230, 125, .22), transparent 31%),
    linear-gradient(145deg, rgba(255,255,255,.94), rgba(236,249,252,.76) 58%, rgba(249,253,240,.82));
}

.button-primary,
.button-blue {
  color: #062f4a;
  border-color: rgba(255,255,255,.56);
  background: var(--brand-gradient);
  box-shadow: 0 14px 30px rgba(31, 153, 192, .23);
}

.button-primary:hover,
.button-blue:hover {
  box-shadow: 0 17px 36px rgba(31, 153, 192, .30);
}

.eyebrow {
  border-color: rgba(69, 178, 190, .16);
  color: #176b9e;
  background: linear-gradient(120deg, rgba(235,249,255,.88), rgba(246,252,232,.88));
}

.eyebrow::before {
  background: var(--brand-lime-deep);
  box-shadow: 0 0 0 5px rgba(183,230,125,.22);
}

.catalog-pick.selected {
  border-color: rgba(126, 176, 62, .28);
  background: linear-gradient(120deg, rgba(239,251,255,.90), rgba(244,251,227,.92));
}

.login-brand-image {
  width: min(270px, 68vw);
  height: 118px;
}

.startup-shell {
  display: grid;
  place-items: center;
}

.startup-error {
  width: min(660px, 100%);
  padding: 42px;
  border-radius: 30px;
  text-align: center;
}

.startup-logo {
  width: min(300px, 78vw);
  height: 150px;
  margin-bottom: 8px;
  object-fit: contain;
}

.startup-error h1 {
  margin-bottom: 12px;
  font-size: clamp(32px, 7vw, 50px);
}

.startup-error p {
  color: var(--muted);
  line-height: 1.55;
}

.connection-details {
  display: grid;
  gap: 7px;
  margin: 22px 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  text-align: left;
}

.connection-details code,
.temporary-password code {
  overflow-wrap: anywhere;
  color: var(--blue-950);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.customer-modal {
  width: min(680px, calc(100vw - 28px));
}

.optional {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.temporary-password {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 17px;
  border: 1px solid rgba(86, 178, 92, .20);
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(235,249,255,.84), rgba(244,251,227,.90));
}

.temporary-password > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.temporary-password code {
  font-size: 17px;
  font-weight: 800;
}

.empty-state {
  display: grid;
  gap: 5px;
  padding: 38px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
  font-size: 18px;
}

/* Customer identity bridge · v1.6.1 */
.customer-row {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  cursor: default;
}
.customer-state {
  display: grid;
  justify-items: end;
  gap: 5px;
  text-align: right;
}
.customer-state small {
  color: var(--muted);
  font-size: 12px;
}
.customer-row .order-main small {
  display: block;
}
@media (max-width: 720px) {
  .customer-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .customer-state {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }
  .customer-row [data-edit-customer] {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

/* Customer cache/sync state · v1.6.1 */
.sync-state { display:block; margin-top:4px; color:var(--muted); font-weight:600; }
.loading-state strong::after { content:""; display:inline-block; width:12px; height:12px; margin-left:8px; border:2px solid rgba(22,113,196,.22); border-top-color:var(--blue); border-radius:50%; vertical-align:-2px; animation:bubblez-spin .8s linear infinite; }
@keyframes bubblez-spin { to { transform:rotate(360deg); } }

/* Performance, interaction fidelity, and push diagnostics · v1.6.1 */
.button.is-busy,
.icon-button.is-busy,
.menu-item.is-busy {
  cursor: progress;
  opacity: .82;
  pointer-events: none;
}

.button-spinner {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: bubblez-spin .7s linear infinite;
}

.settings-section {
  scroll-margin-top: 116px;
}

.section-highlight {
  animation: bubblez-highlight 1s ease;
}

[data-future] {
  cursor: help;
}

.sync-state {
  display: block;
  margin-top: 4px;
  color: var(--blue-700);
}

@keyframes bubblez-spin {
  to { transform: rotate(360deg); }
}

@keyframes bubblez-highlight {
  0%, 100% { box-shadow: none; }
  35% { box-shadow: 0 0 0 5px rgba(121, 216, 220, .24); }
}

@media (max-width: 760px) {
  .glass {
    backdrop-filter: blur(14px) saturate(118%);
    -webkit-backdrop-filter: blur(14px) saturate(118%);
    box-shadow: 0 14px 42px rgba(24, 77, 111, .08);
  }

  [data-platform="ios"] .glass {
    backdrop-filter: blur(22px) saturate(135%);
    -webkit-backdrop-filter: blur(22px) saturate(135%);
  }

  [data-platform="android"] .glass {
    backdrop-filter: blur(10px) saturate(108%);
    -webkit-backdrop-filter: blur(10px) saturate(108%);
  }

  body::before,
  body::after {
    animation: none;
    opacity: .65;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.future-chip {
  border: 0;
  font: inherit;
  cursor: help;
}

/* Bubblez Loop customer experience hardening · v1.6.1 */
:root {
  --brand-blue: #179fda;
  --brand-aqua: #55d5d8;
  --brand-lime: #b7e66f;
  --brand-lime-deep: #7fb43f;
  --brand-navy: #0b3856;
  --brand-gradient: linear-gradient(115deg, #159fe0 0%, #4bd0d7 57%, #b7e66f 100%);
  --customer-dark: #0b344e;
}

.launch-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-content: center;
  justify-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 14%, rgba(255,255,255,.96), transparent 24rem),
    radial-gradient(circle at 88% 18%, rgba(86,211,220,.26), transparent 22rem),
    radial-gradient(circle at 66% 86%, rgba(183,230,111,.28), transparent 28rem),
    linear-gradient(145deg, #f9fdff 0%, #e8f9fd 48%, #f1f9df 100%);
  transition: opacity .38s ease, visibility .38s ease, transform .38s ease;
}
.launch-screen.is-leaving { opacity: 0; visibility: hidden; transform: scale(1.015); }
.launch-screen > img { width: min(72vw, 430px); max-height: 210px; object-fit: contain; filter: drop-shadow(0 20px 28px rgba(19,100,160,.18)); }
.launch-loop { margin-top: 6px; padding: 7px 18px; border: 1px solid rgba(31,154,195,.18); border-radius: 999px; color: var(--blue-800); background: rgba(255,255,255,.72); font-family: "Instrument Sans", sans-serif; font-size: 18px; font-weight: 800; letter-spacing: -.03em; backdrop-filter: blur(18px); }
.launch-screen p { margin: 18px 0 0; color: #356a80; font-size: 17px; font-weight: 600; }
.launch-dots { display: flex; gap: 8px; margin-top: 30px; }
.launch-dots i { width: 9px; height: 9px; border-radius: 50%; animation: launch-pop 1.2s ease-in-out infinite; background: var(--brand-blue); }
.launch-dots i:nth-child(2) { animation-delay: .14s; background: var(--brand-aqua); }
.launch-dots i:nth-child(3) { animation-delay: .28s; background: var(--brand-lime-deep); }
.launch-bubble { position: absolute; border: 1px solid rgba(255,255,255,.86); border-radius: 50%; background: radial-gradient(circle at 30% 24%, rgba(255,255,255,.9), rgba(66,193,229,.12) 50%, rgba(183,230,111,.08)); box-shadow: inset -20px -18px 32px rgba(22,118,185,.06); }
.launch-bubble-one { width: 240px; height: 240px; top: -80px; right: -60px; }
.launch-bubble-two { width: 180px; height: 180px; left: -60px; bottom: 10vh; }
@keyframes launch-pop { 0%,100% { transform: translateY(0); opacity:.55; } 50% { transform: translateY(-7px); opacity:1; } }

.offline-banner {
  position: sticky;
  z-index: 55;
  top: calc(8px + var(--safe-top));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  max-width: 980px;
  margin: 0 auto 12px;
  padding: 11px 13px;
  border: 1px solid rgba(12,104,151,.14);
  border-radius: 17px;
  color: #173f56;
  background: linear-gradient(110deg, rgba(237,249,255,.97), rgba(245,252,226,.98));
  box-shadow: 0 12px 28px rgba(30,85,113,.12);
}
.offline-banner > svg { width: 24px; height: 24px; stroke: var(--blue-700); fill: none; stroke-width: 1.8; }
.offline-banner span { display: grid; }
.offline-banner small { color: var(--muted); }
.offline-banner button { border: 0; border-radius: 10px; padding: 8px 11px; color: var(--blue-800); background: white; font-weight: 800; cursor: pointer; }

.section-kicker,
.settings-kicker {
  display: inline-block;
  margin-bottom: 7px;
  color: #1574a4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.customer-home-v2 { display: grid; gap: 24px; }
.customer-welcome {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  min-height: 390px;
  overflow: hidden;
  border-radius: 34px;
  background:
    radial-gradient(circle at 86% 12%, rgba(69,210,221,.28), transparent 20rem),
    radial-gradient(circle at 75% 92%, rgba(183,230,111,.28), transparent 23rem),
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(235,249,253,.78) 54%, rgba(246,252,229,.86));
}
.customer-welcome-copy { z-index: 2; align-self: center; padding: clamp(32px, 5vw, 70px); }
.customer-greeting { margin-bottom: 14px; color: #227b9e; font-size: 16px; font-weight: 800; }
.customer-welcome h1 { max-width: 760px; margin-bottom: 15px; font-size: clamp(40px, 6vw, 72px); line-height: .98; }
.customer-welcome p { max-width: 650px; color: #547083; font-size: clamp(17px, 2.2vw, 21px); line-height: 1.52; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.welcome-visual { position: relative; min-height: 320px; display: grid; place-items: center; }
.welcome-logo { position: relative; z-index: 2; width: min(90%, 370px); height: 220px; object-fit: contain; filter: drop-shadow(0 24px 28px rgba(14,108,176,.16)); }
.welcome-orbit { position: absolute; border: 1px solid rgba(255,255,255,.92); border-radius: 50%; background: radial-gradient(circle at 28% 24%, rgba(255,255,255,.88), rgba(64,198,226,.12) 54%, rgba(183,230,111,.12)); box-shadow: inset -18px -15px 35px rgba(15,108,175,.04), 0 30px 70px rgba(24,98,130,.08); }
.orbit-one { width: 330px; height: 330px; right: 4%; top: 8%; }
.orbit-two { width: 130px; height: 130px; left: 7%; bottom: 5%; }
.freshness-badge { position: absolute; z-index: 3; right: 12%; bottom: 15%; display: flex; gap: 7px; align-items: center; padding: 9px 13px; border: 1px solid rgba(255,255,255,.9); border-radius: 999px; color: var(--brand-navy); background: rgba(255,255,255,.76); box-shadow: 0 14px 30px rgba(28,91,119,.12); font-size: 13px; font-weight: 800; backdrop-filter: blur(18px); }
.freshness-badge svg { width: 17px; height: 17px; fill: none; stroke: #50a7ad; stroke-width: 1.8; }

.customer-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .72fr); gap: 22px; align-items: start; }
.customer-primary-column,
.customer-side-column { display: grid; gap: 20px; }
.customer-section { padding: 27px; border: 1px solid rgba(255,255,255,.82); border-radius: 28px; background: rgba(255,255,255,.48); box-shadow: var(--shadow-soft); }
.customer-section-head { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 18px; }
.customer-section-head h2 { margin: 0; font-size: clamp(25px, 3vw, 35px); }
.text-button { display: inline-flex; align-items: center; gap: 4px; border: 0; color: var(--blue-800); background: transparent; font-weight: 800; cursor: pointer; }
.text-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.service-launch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.service-launch-card { display: grid; gap: 7px; min-height: 180px; padding: 18px; border: 1px solid rgba(37,132,177,.11); border-radius: 21px; color: var(--ink); background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(235,249,253,.74)); text-align: left; cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.service-launch-card:nth-child(2n) { background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(244,252,228,.76)); }
.service-launch-card:hover { transform: translateY(-3px); border-color: rgba(24,159,218,.28); box-shadow: 0 18px 36px rgba(26,91,122,.10); }
.service-launch-card > span:first-child { display:grid; width: 44px; height:44px; place-items:center; border-radius:14px; color:var(--blue-800); background:linear-gradient(135deg,rgba(31,166,219,.14),rgba(183,230,111,.22)); }
.service-launch-card svg { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:1.8; }
.service-launch-card strong { font-size: 18px; }
.service-launch-card small { min-height: 37px; color: var(--muted); line-height: 1.35; }
.service-launch-card b { align-self: end; color: var(--blue-800); font-size: 14px; }

.journey-card { padding: clamp(25px, 4vw, 38px); border-radius: 30px; }
.journey-head { display:flex; justify-content:space-between; gap:20px; align-items:start; }
.journey-head h2 { margin-bottom:8px; font-size:clamp(28px,4vw,42px); }
.journey-head p { max-width: 650px; margin:0; color:var(--muted); font-size:17px; }
.journey-rail { position:relative; height:5px; margin:32px 7px 12px; border-radius:999px; background:rgba(31,119,163,.13); }
.journey-rail > span { position:absolute; inset:0 auto 0 0; border-radius:inherit; background:var(--brand-gradient); }
.journey-rail > i { position:absolute; top:50%; display:grid; width:34px; height:34px; place-items:center; border:4px solid white; border-radius:50%; color:white; background:#189fd7; box-shadow:0 8px 18px rgba(27,129,178,.2); transform:translateY(-50%); }
.journey-rail svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; }
.journey-labels { display:flex; justify-content:space-between; color:var(--muted); font-size:12px; font-weight:700; }
.journey-details { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:24px 0 18px; }
.journey-details > div { padding:14px; border:1px solid var(--line); border-radius:15px; background:rgba(255,255,255,.7); }
.journey-details small,.journey-details strong { display:block; }
.journey-details small { color:var(--muted); }
.journey-details strong { margin-top:4px; }
.journey-empty { display:grid; align-content:center; min-height:390px; text-align:left; background:linear-gradient(145deg,rgba(255,255,255,.9),rgba(237,249,253,.75),rgba(244,251,228,.78)); }
.journey-empty-icon { display:grid; width:58px; height:58px; margin-bottom:20px; place-items:center; border-radius:19px; color:white; background:var(--brand-gradient); box-shadow:0 15px 30px rgba(28,158,198,.24); }
.journey-empty-icon svg { width:28px; height:28px; fill:none; stroke:currentColor; stroke-width:1.8; }
.journey-empty h2 { margin-bottom:9px; font-size:clamp(30px,4vw,43px); }
.journey-empty > p { color:var(--muted); font-size:17px; line-height:1.48; }
.next-window { display:flex; gap:12px; align-items:center; margin:16px 0 21px; padding:13px; border:1px solid var(--line); border-radius:15px; background:rgba(255,255,255,.74); }
.next-window svg { width:24px; height:24px; fill:none; stroke:var(--blue-700); stroke-width:1.8; }
.next-window small,.next-window strong { display:block; }

.lifestyle-card { position:relative; display:grid; gap:15px; overflow:hidden; padding:25px; border-radius:27px; color:white; box-shadow:0 25px 60px rgba(10,73,98,.15); }
.lifestyle-card::after { position:absolute; inset:auto -55px -80px auto; width:190px; height:190px; border:1px solid rgba(255,255,255,.24); border-radius:50%; background:rgba(255,255,255,.08); content:""; }
.contactless-card { background:linear-gradient(145deg,#115d79,#178fab 62%,#4cc7ca); }
.repeat-card { color:var(--brand-navy); background:linear-gradient(145deg,#effaff,#dff6f2 58%,#eaf8c8); }
.lifestyle-card h2 { margin-bottom:7px; font-size:30px; }
.lifestyle-card p { margin:0; color:inherit; opacity:.83; line-height:1.48; }
.lifestyle-card .section-kicker { color:inherit; opacity:.75; }
.lifestyle-icon { display:grid; width:48px; height:48px; place-items:center; border:1px solid rgba(255,255,255,.38); border-radius:16px; background:rgba(255,255,255,.16); }
.lifestyle-icon svg { width:25px; height:25px; fill:none; stroke:currentColor; stroke-width:1.8; }
.time-back-card { display:grid; grid-template-columns:auto 1fr; gap:17px; align-items:center; padding:21px; border-radius:24px; }
.time-back-value { display:grid; min-width:84px; min-height:84px; place-content:center; border-radius:22px; color:white; background:var(--brand-gradient); font-family:"Instrument Sans",sans-serif; font-size:34px; font-weight:800; text-align:center; }
.time-back-value small { font-family:inherit; font-size:12px; letter-spacing:.08em; text-transform:uppercase; }
.time-back-card h3 { margin:0 0 5px; }
.time-back-card p { margin:0; color:var(--muted); }
.recent-order-link { display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; padding:16px; border:1px solid var(--line); border-radius:19px; color:var(--ink); background:rgba(255,255,255,.78); text-align:left; cursor:pointer; }
.recent-order-link > span:first-child { display:grid; width:40px; height:40px; place-items:center; border-radius:13px; color:var(--blue-800); background:var(--blue-100); }
.recent-order-link svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; }
.recent-order-link small,.recent-order-link strong { display:block; }
.recent-order-link small { color:var(--muted); }

.customer-orders-page { display:grid; gap:20px; }
.customer-section-title .section-kicker { margin-bottom:5px; }
.order-history-card { border-radius:27px; }

.customer-account-page .account-grid { align-items:start; }
.preference-form-card { border-radius:28px; }
.preference-form-card .settings-section { padding-block:25px; }
.preference-form-card h3 { font-size:25px; }
.preference-summary { display:flex; gap:12px; align-items:center; margin-bottom:18px; padding:14px; border:1px solid rgba(28,146,190,.12); border-radius:15px; background:linear-gradient(115deg,rgba(234,249,255,.82),rgba(244,251,226,.84)); }
.preference-summary span { display:grid; width:38px; height:38px; flex:0 0 38px; place-items:center; border-radius:12px; color:var(--blue-800); background:white; }
.preference-summary svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; }
.preference-summary p { margin:0; color:var(--muted); }
.drop-choice-grid,.location-choice-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin:14px 0; }
.drop-choice,.location-choice { display:flex; gap:8px; align-items:center; justify-content:center; min-height:54px; padding:10px; border:1px solid var(--line); border-radius:15px; color:var(--ink); background:rgba(255,255,255,.82); font-weight:700; cursor:pointer; }
.drop-choice.active,.location-choice.selected { border-color:rgba(24,156,213,.38); color:var(--blue-800); background:linear-gradient(115deg,rgba(232,248,255,.96),rgba(240,250,221,.94)); box-shadow:0 8px 22px rgba(23,111,151,.08); }
.drop-choice svg,.location-choice svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; }
.repeat-plan-preview { display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; width:100%; margin-top:13px; padding:15px; border:1px solid rgba(71,178,176,.18); border-radius:17px; color:var(--brand-navy); background:linear-gradient(115deg,rgba(234,249,255,.9),rgba(240,250,220,.94)); text-align:left; cursor:pointer; }
.repeat-plan-preview > span:first-child { display:grid; width:42px; height:42px; place-items:center; border-radius:13px; background:white; }
.repeat-plan-preview small,.repeat-plan-preview strong { display:block; }
.repeat-plan-preview small { color:var(--muted); }
.repeat-plan-preview svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; }
.save-preferences-button { position:sticky; bottom:calc(18px + var(--safe-bottom)); z-index:3; width:100%; margin-top:20px; }

.pickup-flow-modal { width:min(880px,calc(100vw - 24px)); max-height:min(92dvh,980px); padding:0; overflow:hidden; border-radius:30px; }
.pickup-flow-header { display:grid; grid-template-columns:44px 1fr 44px; gap:12px; align-items:center; padding:20px 23px 13px; }
.pickup-flow-header > div { text-align:center; }
.pickup-flow-header h2 { margin:0; font-size:25px; }
.pickup-progress { display:grid; grid-template-columns:repeat(4,1fr); gap:5px; padding:0 24px 17px; }
.pickup-progress > span { position:relative; display:grid; justify-items:center; gap:5px; color:var(--muted); font-weight:700; }
.pickup-progress > span::after { position:absolute; z-index:-1; top:15px; left:55%; width:90%; height:2px; background:rgba(28,119,165,.12); content:""; }
.pickup-progress > span:last-child::after { display:none; }
.pickup-progress i { display:grid; width:31px; height:31px; place-items:center; border:1px solid var(--line); border-radius:50%; background:white; font-style:normal; }
.pickup-progress .active i,.pickup-progress .done i { color:white; border-color:transparent; background:var(--brand-gradient); }
.pickup-progress .active { color:var(--blue-800); }
.pickup-progress svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; }
.pickup-wizard-body { overflow-y:auto; padding:24px 28px 30px; background:linear-gradient(180deg,rgba(248,253,255,.88),rgba(248,252,245,.92)); }
.pickup-flow-actions { position:sticky; bottom:0; margin:0; padding:16px 23px calc(16px + var(--safe-bottom)); border-top:1px solid var(--line); background:rgba(255,255,255,.94); backdrop-filter:blur(18px); }
.pickup-copy h3 { font-size:clamp(27px,4vw,39px); }
.service-choice-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.service-choice { grid-template-columns:auto 1fr auto; gap:14px; align-items:center; min-height:125px; text-align:left; }
.service-choice .quick-icon { margin:0 !important; }
.service-choice > span:nth-child(3) { display:grid; gap:4px; }
.service-choice b { color:var(--blue-800); font-size:14px; }
.pickup-date-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin-bottom:17px; }
.pickup-date-choice { display:grid; gap:4px; min-height:78px; padding:12px; border:1px solid var(--line); border-radius:16px; color:var(--ink); background:white; text-align:left; cursor:pointer; }
.pickup-date-choice small { color:var(--muted); font-weight:700; }
.pickup-date-choice.selected { border-color:rgba(28,158,215,.40); background:linear-gradient(120deg,#eaf8ff,#f0f9d9); box-shadow:0 10px 24px rgba(24,106,143,.09); }
.pickup-window-callout { display:flex; gap:14px; align-items:flex-start; margin:15px 0 18px; padding:16px; border-radius:18px; color:white; background:linear-gradient(135deg,#105c79,#1591ad 66%,#54c9c8); }
.pickup-window-callout > span { display:grid; width:42px; height:42px; flex:0 0 42px; place-items:center; border-radius:14px; background:rgba(255,255,255,.15); }
.pickup-window-callout svg { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:1.8; }
.pickup-window-callout small,.pickup-window-callout strong { display:block; }
.pickup-window-callout p { margin:4px 0 0; opacity:.8; }
.contactless-check { border-color:rgba(52,172,179,.2); background:linear-gradient(115deg,rgba(234,249,255,.86),rgba(243,251,224,.88)); }
.preference-group { margin:0 0 18px; padding:0; border:0; }
.preference-group legend { font-family:"Instrument Sans",sans-serif; font-size:17px; font-weight:800; }
.preference-group > p { margin:3px 0 10px; color:var(--muted); }
.preference-pill-grid { display:flex; flex-wrap:wrap; gap:8px; }
.preference-pill { position:relative; min-width:130px; }
.preference-pill input { position:absolute; opacity:0; pointer-events:none; }
.preference-pill span { display:block; padding:12px 15px; border:1px solid var(--line); border-radius:15px; background:white; font-weight:700; text-align:center; cursor:pointer; }
.preference-pill.selected span,.preference-pill:has(input:checked) span { border-color:rgba(24,157,212,.4); color:var(--blue-800); background:linear-gradient(115deg,#eaf8ff,#f1f9dc); box-shadow:0 8px 20px rgba(22,104,145,.08); }
.review-hero,.review-service-card { display:grid; grid-template-columns:auto 1fr auto; gap:13px; align-items:center; margin-bottom:11px; padding:16px; border:1px solid var(--line); border-radius:18px; background:white; }
.review-hero > span,.review-service-card > span { display:grid; width:44px; height:44px; place-items:center; border-radius:14px; color:var(--blue-800); background:var(--blue-100); }
.review-hero svg,.review-service-card svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; }
.review-hero small,.review-hero strong,.review-service-card small,.review-service-card strong { display:block; }
.review-hero p,.review-service-card p { margin:3px 0 0; color:var(--muted); }
.review-hero button { border:0; color:var(--blue-800); background:transparent; font-weight:800; cursor:help; }
.premium-estimate { border-radius:18px; }

.customer-tracking-section { display:grid; gap:13px; }
.route-experience-card { display:grid; grid-template-columns:minmax(180px,.7fr) 1fr; overflow:hidden; border:1px solid var(--line); border-radius:20px; background:linear-gradient(135deg,#eefaff,#f6fbe8); }
.route-experience-map { display:grid; min-height:190px; place-content:center; justify-items:center; gap:8px; color:#1b7898; background:radial-gradient(circle at 32% 28%,rgba(255,255,255,.9),transparent 8rem),linear-gradient(145deg,#bcecf2,#dff2d4); }
.route-experience-map svg { width:45px; height:45px; fill:none; stroke:currentColor; stroke-width:1.45; }
.route-experience-map span { font-weight:800; }
.route-experience-copy { padding:22px; }
.route-experience-copy h4 { margin:0 0 8px; font-size:25px; }
.route-experience-copy p { color:var(--muted); }
.eta-window { display:flex; gap:8px; align-items:center; padding:10px; border-radius:12px; color:var(--blue-800); background:rgba(255,255,255,.74); font-weight:700; }
.eta-window svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; }
.future-map-button { display:flex; gap:8px; align-items:center; justify-content:center; min-height:46px; border:1px dashed rgba(25,139,187,.3); border-radius:14px; color:var(--blue-800); background:rgba(235,248,253,.72); font-weight:800; cursor:help; }
.future-map-button svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; }

/* Stable mobile layout: these cards stay in normal layout flow. iOS can defer or mis-size
   content-visibility blocks until a later repaint, which caused the Orders empty state to
   appear shifted and then snap into place after a slow API timeout. */
.customer-section,.lifestyle-card,.order-history-card,.settings-section { content-visibility:visible; contain:none; }
.customer-orders-page,.order-history-card,.orders-list,.empty-state { min-width:0; width:100%; max-width:100%; }
.empty-state { overflow:hidden; }
.empty-state > * { max-width:100%; }
.empty-state h3,.empty-state p { overflow-wrap:anywhere; }

@media (max-width: 1050px) {
  .customer-welcome { grid-template-columns:1fr .55fr; }
  .customer-dashboard-grid { grid-template-columns:1fr; }
  .customer-side-column { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .time-back-card,.recent-order-link { grid-column:span 1; }
  .service-launch-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .app-shell { padding:calc(8px + var(--safe-top)) 8px calc(98px + var(--safe-bottom)); }
  .topbar { min-height:58px; margin-bottom:14px; border-radius:19px; }
  .brand { min-width:0; }
  .brand-logo-image { width:92px; height:38px; }
  .brand-product { font-size:11px; }
  .customer-welcome { grid-template-columns:1fr; min-height:0; border-radius:25px; }
  .customer-welcome-copy { padding:28px 22px 19px; }
  .customer-welcome h1 { font-size:42px; }
  .customer-welcome p { font-size:16px; }
  .welcome-actions { display:grid; grid-template-columns:1fr; }
  .welcome-visual { min-height:180px; overflow:hidden; }
  .welcome-logo { width:72%; height:150px; }
  .orbit-one { width:220px; height:220px; right:3%; top:-20%; }
  .orbit-two { width:90px; height:90px; left:5%; }
  .freshness-badge { right:8%; bottom:9%; font-size:11px; }
  .customer-dashboard-grid { gap:14px; }
  .customer-side-column { grid-template-columns:1fr; gap:13px; }
  .customer-section { padding:19px; border-radius:22px; }
  .customer-section-head { display:block; }
  .customer-section-head .text-button { margin-top:8px; }
  .service-launch-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .service-launch-card { min-height:156px; padding:14px; }
  .service-launch-card strong { font-size:16px; }
  .journey-card { padding:21px; border-radius:23px; }
  .journey-head { display:grid; }
  .journey-head h2 { font-size:30px; }
  .journey-details { grid-template-columns:1fr; }
  .lifestyle-card { padding:21px; border-radius:22px; }
  .lifestyle-card h2 { font-size:27px; }
  .time-back-card { border-radius:21px; }
  .pickup-flow-modal { width:100vw; height:100dvh; max-height:none; border-radius:0; }
  .pickup-flow-header { padding-top:calc(13px + var(--safe-top)); }
  .pickup-progress { padding-inline:13px; }
  .pickup-progress small { font-size:10px; }
  .pickup-wizard-body { padding:18px 15px 28px; }
  .pickup-flow-actions { padding-inline:14px; }
  .service-choice-grid { grid-template-columns:1fr; }
  .service-choice { min-height:106px; padding:14px; }
  .pickup-date-grid { grid-template-columns:1fr 1fr 1fr; gap:6px; }
  .pickup-date-choice { min-height:73px; padding:9px; }
  .pickup-date-choice strong { font-size:13px; }
  .drop-choice-grid,.location-choice-grid { gap:6px; }
  .drop-choice,.location-choice { display:grid; gap:5px; min-height:66px; padding:7px; font-size:12px; text-align:center; }
  .preference-pill { min-width:calc(50% - 4px); flex:1; }
  .route-experience-card { grid-template-columns:1fr; }
  .route-experience-map { min-height:130px; }
  .offline-banner { top:calc(4px + var(--safe-top)); margin-inline:2px; border-radius:14px; }
  .offline-banner small { display:none; }
  body[data-role="customer"]::before,body[data-role="customer"]::after { opacity:.35; }
}

@media (max-width: 410px) {
  .service-launch-grid { grid-template-columns:1fr; }
  .pickup-progress small { display:none; }
  .pickup-date-grid { grid-template-columns:1fr; }
  .pickup-date-choice { min-height:58px; }
}

/* Modal scrolling and dismissal hardening · v1.6.3 */
html.overlay-open,
body.overlay-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

body.overlay-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}

.modal-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  overscroll-behavior: contain;
}

.modal {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.modal > .modal-top {
  position: sticky;
  z-index: 25;
  top: -1px;
  padding-bottom: 12px;
  background: linear-gradient(180deg, rgba(246,252,255,.99) 0%, rgba(246,252,255,.96) 82%, rgba(246,252,255,0) 100%);
}

.modal-top .close-button,
.pickup-flow-header .close-button {
  flex: 0 0 43px;
}

.pickup-flow-modal {
  display: flex;
  height: min(92dvh, 980px);
  min-height: 0;
  flex-direction: column;
}

.pickup-flow-header,
.pickup-progress,
.pickup-flow-actions {
  flex: 0 0 auto;
}

.pickup-wizard-body {
  min-height: 0;
  flex: 1 1 auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 760px) {
  .modal-wrap {
    align-items: stretch;
    padding: max(6px, var(--safe-top)) 6px max(6px, var(--safe-bottom));
  }

  .modal {
    align-self: center;
    max-height: calc(100dvh - max(12px, var(--safe-top)) - max(12px, var(--safe-bottom)));
  }

  .modal > .modal-top {
    top: -1px;
    padding-top: 2px;
  }

  .pickup-flow-modal {
    align-self: stretch;
    width: 100%;
    height: 100%;
    max-height: 100%;
  }
}

@media (max-height: 620px) and (min-width: 761px) {
  .modal-wrap { align-items: stretch; }
  .modal { align-self: center; max-height: calc(100dvh - 16px); }
}

/* Visual viewport and mobile overlay corrections · v1.6.1 */
:root {
  --visual-viewport-height: 100dvh;
  --visual-viewport-top: 0px;
}

body.overlay-open .topbar,
body.overlay-open .bottom-nav,
body.overlay-open .fab {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.modal-wrap {
  top: var(--visual-viewport-top, 0px);
  right: 0;
  bottom: auto;
  left: 0;
  width: 100%;
  height: var(--visual-viewport-height, 100dvh);
}

.modal {
  display: flex;
  min-width: 0;
  max-height: 100%;
  flex-direction: column;
}

.modal > .modal-top {
  flex: 0 0 auto;
}

.modal > .wizard-actions,
.modal > form > .wizard-actions {
  position: sticky;
  z-index: 22;
  bottom: -1px;
  padding-top: 16px;
  background: linear-gradient(180deg, rgba(246,252,255,0), rgba(246,252,255,.985) 22%, rgba(246,252,255,.995));
}

.pickup-flow-modal {
  width: min(880px, calc(100vw - 24px));
  max-height: min(92dvh, 980px);
  overflow: hidden;
}

.pickup-flow-header {
  position: relative;
  z-index: 31;
}

.pickup-wizard-body {
  overflow-x: hidden;
  overflow-y: auto;
}

.pickup-flow-actions {
  z-index: 32;
}

.detail-panel {
  top: var(--visual-viewport-top, 0px);
  height: var(--visual-viewport-height, 100dvh);
  max-height: var(--visual-viewport-height, 100dvh);
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.detail-panel > .panel-top {
  position: sticky;
  z-index: 25;
  top: calc(-28px - var(--safe-top));
  margin: calc(-28px - var(--safe-top)) -28px 20px;
  padding: calc(28px + var(--safe-top)) 28px 15px;
  background: linear-gradient(180deg, rgba(244,252,255,.995), rgba(244,252,255,.965) 82%, rgba(244,252,255,0));
}

@media (max-width: 760px) {
  .modal-wrap {
    align-items: stretch;
    padding: 0;
  }

  .modal {
    align-self: stretch;
    width: 100%;
    height: 100%;
    max-height: 100%;
    padding: calc(18px + var(--safe-top)) 16px calc(18px + var(--safe-bottom));
    border-radius: 0;
  }

  .modal > .modal-top {
    top: calc(-18px - var(--safe-top));
    margin: calc(-18px - var(--safe-top)) -16px 16px;
    padding: calc(16px + var(--safe-top)) 16px 13px;
  }

  .modal > .wizard-actions,
  .modal > form > .wizard-actions {
    bottom: calc(-18px - var(--safe-bottom));
    margin: 16px -16px calc(-18px - var(--safe-bottom));
    padding: 14px 16px calc(14px + var(--safe-bottom));
    border-top: 1px solid rgba(32,114,153,.10);
    background: rgba(248,253,255,.985);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .pickup-flow-modal {
    align-self: stretch;
    width: 100%;
    height: 100%;
    max-height: 100%;
    padding: 0;
    border-radius: 0;
  }

  .pickup-flow-actions {
    padding-bottom: calc(14px + var(--safe-bottom));
  }

  .detail-panel {
    width: 100%;
    border-radius: 0;
  }

  .detail-panel > .panel-top {
    top: calc(-22px - var(--safe-top));
    margin: calc(-22px - var(--safe-top)) -20px 18px;
    padding: calc(17px + var(--safe-top)) 20px 13px;
  }

  .pickup-date-grid,
  .drop-choice-grid,
  .location-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drop-choice-grid > :last-child:nth-child(odd),
  .location-choice-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .pickup-progress small { display: none; }
  .pickup-date-grid,
  .drop-choice-grid,
  .location-choice-grid { grid-template-columns: 1fr; }
  .drop-choice-grid > :last-child:nth-child(odd),
  .location-choice-grid > :last-child:nth-child(odd) { grid-column: auto; }
  .wizard-actions { gap: 8px; }
  .wizard-actions .button { min-width: 0; padding-inline: 13px; }
}


/* Desktop customer-home grid correction · v1.6.3
   The legacy .customer-home rule is a two-column page layout. The redesigned
   v2 home already contains its own internal dashboard grid, so inheriting the
   old columns squeezed the welcome panel and placed the lifestyle rail over
   the scheduling/services content. Keep the v2 page itself single-column and
   let .customer-dashboard-grid own the responsive columns. */
.customer-home.customer-home-v2 {
  grid-template-columns: minmax(0, 1fr);
  grid-auto-flow: row;
  align-items: stretch;
  width: 100%;
}
.customer-home-v2 > .customer-welcome,
.customer-home-v2 > .customer-dashboard-grid,
.customer-dashboard-grid > .customer-primary-column,
.customer-dashboard-grid > .customer-side-column {
  min-width: 0;
  width: 100%;
}

@media (min-width: 1051px) {
  .customer-dashboard-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, .72fr);
  }
  .customer-side-column {
    position: static;
    align-self: start;
  }
}


/* Pickup action-bar edge spacing · v1.6.3
   Keep primary actions clear of modal edges, resize handles, browser chrome,
   and device safe areas on every viewport. */
.pickup-flow-actions {
  padding-top: 18px;
  padding-right: max(22px, calc(16px + env(safe-area-inset-right)));
  padding-bottom: max(20px, calc(18px + var(--safe-bottom)));
  padding-left: max(22px, calc(16px + env(safe-area-inset-left)));
}

@media (max-width: 760px) {
  .pickup-flow-actions {
    padding-top: 16px;
    padding-right: max(18px, calc(14px + env(safe-area-inset-right)));
    padding-bottom: max(20px, calc(16px + var(--safe-bottom)));
    padding-left: max(18px, calc(14px + env(safe-area-inset-left)));
  }
}


/* Mobile pickup footer and in-place selection hardening · v1.7.0
   The generic full-screen modal footer uses negative margins to extend through
   padded dialog edges. The pickup sheet has no dialog padding, so those same
   margins pushed its actions against the device edge. Keep this footer inside
   the visual viewport and leave deliberate thumb/safe-area clearance. */
@media (max-width: 760px) {
  .pickup-flow-modal > .pickup-flow-actions {
    bottom: 0;
    margin: 0;
    padding-top: 18px;
    padding-right: max(28px, calc(22px + env(safe-area-inset-right)));
    padding-bottom: max(30px, calc(22px + env(safe-area-inset-bottom)));
    padding-left: max(28px, calc(22px + env(safe-area-inset-left)));
    box-shadow: 0 -14px 34px rgba(24, 77, 111, .08);
  }

  .pickup-flow-modal > .pickup-flow-actions #wizard-next {
    margin-left: auto;
  }
}

/* v1.7 operational lifecycle */
.operations-workflow-card {
  border: 1px solid rgba(45, 164, 205, .18);
  background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(232,251,255,.78));
  border-radius: 24px;
  padding: 20px;
  margin: 18px 0;
}
.workflow-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.workflow-heading h3 { margin: 2px 0 0; }
.file-input { min-height:54px; padding:8px 10px; background:rgba(255,255,255,.9); }
.file-input::file-selector-button { min-height:36px; margin-right:10px; padding:0 13px; border:1px solid rgba(7,105,178,.18); border-radius:11px; color:var(--blue-800); background:var(--blue-100); font-weight:800; }
.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.proof-card {
  display: grid;
  gap: 7px;
  color: var(--blue-950);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}
.proof-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(45,164,205,.18);
  background: rgba(255,255,255,.7);
}
.order-alert,
.payment-waiting {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 15px;
  margin-top: 14px;
  border-radius: 18px;
}
.order-alert { background: rgba(255, 190, 70, .14); border: 1px solid rgba(210, 136, 10, .18); }
.payment-waiting { background: rgba(62, 181, 213, .12); border: 1px solid rgba(45, 164, 205, .18); }
.order-alert svg,
.payment-waiting svg { width: 22px; height: 22px; flex: 0 0 auto; }
.order-alert p,
.payment-waiting p { margin: 3px 0 0; line-height: 1.45; }
.customer-chip-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.payment-workflow p { margin: 0 0 14px; line-height: 1.5; }
@media (max-width: 680px) {
  .operations-workflow-card { padding: 16px; border-radius: 20px; }
  .workflow-heading { align-items: center; }
  .customer-chip-row { justify-content: flex-start; }
}


/* Branded first-paint and WebP launch hardening · v1.7.1 */
html.booting,
html.booting body {
  overflow: hidden;
  background: #f7fdff;
}

html.booting #app {
  opacity: 0;
}

#app {
  transition: opacity .24s ease;
}

.launch-screen {
  z-index: 2147483647;
  padding:
    max(24px, env(safe-area-inset-top, 0px))
    24px
    max(24px, env(safe-area-inset-bottom, 0px));
}

.launch-screen > img {
  display: block;
  width: min(78vw, 430px);
  height: auto;
  max-height: 34vh;
}

@media (max-width: 480px) {
  .launch-screen > img {
    width: min(88vw, 390px);
    max-height: 30vh;
  }

  .launch-screen p {
    font-size: 15px;
  }
}

/* Consent-first route tracking and production-candidate controls · v1.9.2 */
.tracking-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.tracking-section-head h2,
.tracking-section-head h3,
.tracking-section-head p { margin: 0; }
.tracking-section-head p { margin-top: 5px; color: var(--text-muted, #587087); line-height: 1.45; }
.live-map,
.live-map-empty {
  overflow: hidden;
  border: 1px solid rgba(45, 164, 205, .2);
  border-radius: 22px;
  background: rgba(236, 249, 253, .82);
  box-shadow: inset 0 1px rgba(255,255,255,.8);
}
.live-map iframe {
  display: block;
  width: 100%;
  height: 300px;
  border: 0;
  background: #eaf6fa;
}
.live-map.compact iframe { height: 180px; }
.live-map-bar {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,.94);
  border-top: 1px solid rgba(45,164,205,.14);
}
.live-map-bar span:nth-child(2) { display: grid; min-width: 0; }
.live-map-bar strong { color: var(--blue-950, #0b3856); }
.live-map-bar small { color: var(--text-muted, #587087); }
.live-map-bar a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue-700, #0d6fa8);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.live-map-bar a svg { width: 15px; height: 15px; }
.live-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2db36f;
  box-shadow: 0 0 0 0 rgba(45,179,111,.48);
  animation: bubblez-live-pulse 1.7s ease-out infinite;
}
@keyframes bubblez-live-pulse { 70% { box-shadow: 0 0 0 9px rgba(45,179,111,0); } 100% { box-shadow: 0 0 0 0 rgba(45,179,111,0); } }
.live-map-empty {
  min-height: 210px;
  display: grid;
  place-items: center;
  grid-template-columns: auto minmax(0,360px);
  align-content: center;
  gap: 14px;
  padding: 28px;
  color: var(--blue-800, #0b568f);
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.88), transparent 18rem),
    linear-gradient(145deg, rgba(223,246,252,.9), rgba(241,249,223,.76));
}
.live-map-empty.compact { min-height: 145px; padding: 20px; }
.live-map-empty > svg { width: 34px; height: 34px; }
.live-map-empty strong,
.live-map-empty small { display: block; }
.live-map-empty small { margin-top: 4px; color: var(--text-muted, #587087); line-height: 1.4; }
.journey-live-map { margin: 18px 0; }
.customer-tracking-section .live-route-copy { margin-top: 15px; }
.customer-tracking-section .live-route-copy h4 { margin: 0; font-size: 20px; }
.customer-tracking-section .live-route-copy p { margin: 5px 0 0; color: var(--text-muted, #587087); }
.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 13px;
  color: #4d6a79;
  font-size: 12px;
  line-height: 1.45;
}
.privacy-note svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; }
.driver-tracking-card { margin-bottom: 20px; padding: clamp(20px, 3vw, 30px); }
.tracking-consent-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
  align-items: flex-start;
  margin: 4px 0 16px;
  padding: 17px;
  border: 1px solid rgba(45,164,205,.22);
  border-radius: 18px;
  background: rgba(239,249,252,.78);
  cursor: pointer;
}
.tracking-consent-box input { width: 21px; height: 21px; margin-top: 2px; accent-color: #159ee0; }
.tracking-consent-box strong,
.tracking-consent-box small { display: block; }
.tracking-consent-box small { margin-top: 5px; color: var(--text-muted, #587087); line-height: 1.48; }
.tracking-controls { display: grid; gap: 14px; }
.tracking-permission-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 15px;
  border: 1px solid rgba(63,178,124,.2);
  border-radius: 17px;
  background: rgba(226,248,237,.72);
}
.tracking-permission-summary > svg { width: 25px; height: 25px; color: #238d5c; }
.tracking-permission-summary strong,
.tracking-permission-summary small { display: block; }
.tracking-permission-summary small { margin-top: 3px; color: #567066; }
.tracking-route-warning { margin: 0; color: #9a6517; font-size: 13px; font-weight: 700; }
.tracking-route-warning.success { color: #238459; }
.driver-live-preview { margin-top: 18px; }
.live-driver-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 14px;
}
.live-driver-card {
  overflow: hidden;
  border: 1px solid rgba(45,164,205,.18);
  border-radius: 20px;
  background: rgba(255,255,255,.7);
}
.live-driver-head {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 13px 14px;
}
.live-driver-head > span:nth-child(2) { min-width: 0; }
.live-driver-head strong,
.live-driver-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-driver-head small { margin-top: 2px; color: var(--text-muted, #587087); }
.driver-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, #179fe0, #55d5d8);
  font-size: 12px;
  font-weight: 850;
}
.live-driver-card .live-map { border: 0; border-radius: 0; border-top: 1px solid rgba(45,164,205,.14); box-shadow: none; }
.live-drivers-section .live-driver-grid { grid-template-columns: 1fr; }
.live-drivers-section .live-map.compact iframe { height: 150px; }
.live-route-overview { margin-bottom: 20px; }
.route-live-location { margin: 0 0 18px; }
.readiness-grid { display: grid; gap: 10px; margin-top: 16px; }
.readiness-check {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: 11px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid rgba(45,164,205,.16);
  border-radius: 16px;
  background: rgba(244,250,252,.76);
}
.readiness-check > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: rgba(45,179,111,.13);
  color: #238459;
}
.readiness-check.warning > span { background: rgba(238,174,61,.14); color: #a36b11; }
.readiness-check.fail > span { background: rgba(220,74,74,.12); color: #b53434; }
.readiness-check svg { width: 16px; height: 16px; }
.readiness-check strong,
.readiness-check small { display: block; }
.readiness-check small { margin-top: 3px; color: var(--text-muted, #587087); line-height: 1.4; }
@media (max-width: 680px) {
  .tracking-section-head { align-items: flex-start; }
  .live-map iframe { height: 250px; }
  .live-map.compact iframe { height: 170px; }
  .live-map-bar { grid-template-columns: auto minmax(0,1fr); }
  .live-map-bar a { grid-column: 2; justify-self: start; }
  .live-map-empty { grid-template-columns: 1fr; text-align: center; }
  .live-map-empty > svg { justify-self: center; }
  .driver-tracking-card .button-row { display: grid; grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .live-pulse { animation: none; } }

/* Staging-only route fixture controls · v1.9.2 */
.demo-route-lab {
  margin-bottom: 20px;
  border-color: rgba(53, 190, 154, .24);
  background:
    radial-gradient(circle at 92% 8%, rgba(166, 228, 136, .18), transparent 36%),
    rgba(255,255,255,.82);
}
.demo-credentials { display: grid; gap: 14px; margin-top: 17px; }
.demo-password {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid rgba(45,164,205,.18);
  border-radius: 16px;
  background: rgba(239,249,252,.8);
}
.demo-password small { color: var(--text-muted, #587087); font-weight: 750; }
.demo-password code {
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(19,49,68,.07);
  color: #133144;
  font-size: 13px;
  font-weight: 800;
}
.demo-password .button { margin-left: auto; }
.demo-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}
.demo-account-grid article {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(45,164,205,.15);
  border-radius: 15px;
  background: rgba(255,255,255,.76);
}
.demo-account-grid span,
.demo-account-grid strong,
.demo-account-grid small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-account-grid span { color: #238459; font-size: 11px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.demo-account-grid strong { margin-top: 5px; color: #17394c; font-size: 14px; }
.demo-account-grid small { margin-top: 3px; color: var(--text-muted, #587087); }
.demo-route-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
}
.demo-route-actions p { max-width: 760px; margin: 0; color: var(--text-muted, #587087); font-size: 13px; line-height: 1.5; }
.demo-route-actions .button { flex: 0 0 auto; }
@media (max-width: 680px) {
  .demo-account-grid { grid-template-columns: 1fr; }
  .demo-password .button { width: 100%; margin-left: 0; }
  .demo-route-actions { align-items: stretch; flex-direction: column; }
  .demo-route-actions .button { width: 100%; }
}

/* Existing-customer staging pickup fixture · v1.9.2 */
.demo-order-seed-actions { align-items: end; }
.demo-customer-field { flex: 1 1 420px; margin: 0; }
.demo-customer-field .input { width: 100%; min-width: 260px; }
@media (max-width: 680px) {
  .demo-order-seed-actions { align-items: stretch; }
  .demo-customer-field .input { min-width: 0; }
}

/* Interactive Bubblez driver maps · v1.9.2 */
.bubblez-map-canvas {
  position: relative;
  width: 100%;
  min-height: 280px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 18%, rgba(255,255,255,.9), transparent 17rem),
    linear-gradient(145deg, #e9f7fb, #eef8e4);
  outline: none;
}
.bubblez-map-canvas:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(25,153,207,.38);
}
.live-map-canvas { height: 320px; min-height: 320px; }
.live-map.compact .live-map-canvas { height: 210px; min-height: 210px; }
.live-map .leaflet-container,
.active-driver-map-canvas.leaflet-container { font-family: inherit; color: var(--blue-950, #0b3856); }
.live-map .leaflet-tile-pane,
.active-driver-map-canvas .leaflet-tile-pane {
  filter: saturate(.68) brightness(1.045) contrast(.94);
}
.live-map .leaflet-control-zoom,
.active-driver-map-canvas .leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid rgba(20,112,157,.16) !important;
  border-radius: 14px !important;
  box-shadow: 0 9px 24px rgba(19,79,110,.13) !important;
}
.live-map .leaflet-control-zoom a,
.active-driver-map-canvas .leaflet-control-zoom a {
  width: 38px;
  height: 38px;
  line-height: 36px;
  border-color: rgba(20,112,157,.12) !important;
  background: rgba(255,255,255,.94);
  color: var(--blue-900, #0b456b);
  font: 700 22px/36px system-ui, sans-serif;
}
.live-map .leaflet-control-zoom a:hover,
.active-driver-map-canvas .leaflet-control-zoom a:hover { background: #fff; color: #087caf; }
.live-map .leaflet-control-attribution,
.active-driver-map-canvas .leaflet-control-attribution {
  padding: 3px 7px;
  border-radius: 8px 0 0 0;
  background: rgba(255,255,255,.8);
  color: #557282;
  font-size: 9px;
  backdrop-filter: blur(8px);
}
.live-map .leaflet-control-attribution a,
.active-driver-map-canvas .leaflet-control-attribution a { color: #176f95; }
.bubblez-driver-div-icon {
  border: 0 !important;
  background: transparent !important;
}
.bubblez-driver-marker {
  position: relative;
  display: flex;
  width: max-content;
  max-width: 225px;
  align-items: center;
  pointer-events: none;
  transform-origin: 20px 50%;
  transition: transform .18s ease, filter .18s ease;
}
.bubblez-driver-pin {
  position: relative;
  z-index: 2;
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 14px;
  background: linear-gradient(145deg, #159ed7, #42cad7 66%, #8fc653);
  box-shadow: 0 9px 20px rgba(8,79,116,.28), 0 0 0 1px rgba(5,107,151,.12);
  color: #fff;
  transform: rotate(-45deg);
}
.bubblez-driver-pin::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
}
.bubblez-driver-pin > span {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: -.02em;
  transform: rotate(45deg);
}
.bubblez-driver-marker.is-delivery .bubblez-driver-pin {
  background: linear-gradient(145deg, #0f7fb7, #26b8d1 62%, #77b941);
}
.bubblez-driver-marker.is-selected {
  z-index: 5;
  filter: drop-shadow(0 10px 15px rgba(5,88,126,.2));
  transform: scale(1.06);
}
.bubblez-driver-marker.is-selected .bubblez-driver-pin {
  box-shadow: 0 10px 24px rgba(8,79,116,.34), 0 0 0 5px rgba(67,207,212,.24);
}
.bubblez-driver-label {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 178px;
  margin-left: -3px;
  padding: 8px 12px 8px 14px;
  overflow: hidden;
  border: 1px solid rgba(18,111,153,.14);
  border-radius: 0 13px 13px 0;
  background: rgba(255,255,255,.96);
  box-shadow: 0 7px 18px rgba(14,75,103,.15);
  color: var(--blue-950, #0b3856);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}
.bubblez-map-popup { display: grid; gap: 3px; min-width: 150px; }
.bubblez-map-popup strong { color: var(--blue-950, #0b3856); font-size: 14px; }
.bubblez-map-popup small,
.bubblez-map-popup em { display: block; color: #617b88; font-size: 11px; font-style: normal; }
.leaflet-popup-content-wrapper {
  border: 1px solid rgba(21,126,171,.14);
  border-radius: 14px !important;
  box-shadow: 0 14px 34px rgba(11,72,101,.18) !important;
}
.leaflet-popup-content { margin: 12px 14px !important; }
.leaflet-popup-tip { box-shadow: none !important; }
.map-library-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  padding: 24px;
  color: var(--blue-800, #0b568f);
  text-align: center;
}
.map-library-fallback svg { width: 34px; height: 34px; }
.map-library-fallback strong,
.map-library-fallback small { display: block; }
.map-library-fallback small { max-width: 330px; color: var(--text-muted, #587087); line-height: 1.4; }

.active-driver-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 330px);
  gap: 16px;
  min-width: 0;
}
.active-driver-map-layout.is-admin {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}
.active-driver-map-stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(31,151,195,.18);
  border-radius: 22px;
  background: #e9f7fb;
  box-shadow: inset 0 1px rgba(255,255,255,.82);
}
.active-driver-map-canvas { height: 420px; min-height: 420px; }
.active-driver-map-layout.is-admin .active-driver-map-canvas { height: 540px; min-height: 540px; }
.active-driver-map-title {
  position: absolute;
  z-index: 600;
  top: 14px;
  left: 14px;
  display: flex;
  max-width: calc(100% - 88px);
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 14px;
  border: 1px solid rgba(15,112,155,.13);
  border-radius: 15px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 25px rgba(10,73,104,.15);
  backdrop-filter: blur(14px);
}
.active-driver-map-title > span { display: grid; min-width: 0; }
.active-driver-map-title strong { color: var(--blue-950, #0b3856); font-size: 13px; }
.active-driver-map-title small { color: #607887; font-size: 10px; }
.active-driver-map-title button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid rgba(20,133,179,.16);
  border-radius: 10px;
  background: rgba(233,248,252,.9);
  color: #0a6998;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}
.active-driver-map-title button svg { width: 15px; height: 15px; }
.active-driver-selected {
  position: absolute;
  z-index: 600;
  right: 14px;
  bottom: 14px;
  left: 14px;
  pointer-events: none;
}
.active-driver-selected-card {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 11px;
  align-items: center;
  width: min(100%, 560px);
  padding: 12px 13px;
  border: 1px solid rgba(20,116,158,.14);
  border-radius: 17px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 12px 30px rgba(9,68,95,.18);
  backdrop-filter: blur(15px);
  pointer-events: auto;
}
.active-driver-selected-copy { display: grid; min-width: 0; }
.active-driver-selected-copy .section-kicker { margin: 0 0 1px; font-size: 9px; }
.active-driver-selected-copy strong { color: var(--blue-950, #0b3856); font-size: 14px; }
.active-driver-selected-copy small,
.active-driver-selected-copy em {
  overflow: hidden;
  color: #5e7886;
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.active-driver-selected-copy em { margin-top: 2px; color: #3a687b; }
.active-driver-selected-card > a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid rgba(17,126,171,.16);
  border-radius: 11px;
  background: #ecf8fb;
  color: #096b9b;
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
}
.active-driver-selected-card > a svg { width: 15px; height: 15px; }
.active-driver-roster {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(31,151,195,.16);
  border-radius: 22px;
  background: rgba(249,253,254,.82);
}
.active-driver-roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid rgba(31,151,195,.12);
  background: rgba(255,255,255,.78);
}
.active-driver-roster-head > span:first-child { display: grid; }
.active-driver-roster-head strong { color: var(--blue-950, #0b3856); font-size: 14px; }
.active-driver-roster-head small { color: #627b88; font-size: 11px; }
.active-driver-list {
  display: grid;
  max-height: 368px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 8px;
  scrollbar-width: thin;
}
.active-driver-map-layout.is-admin .active-driver-list { max-height: 488px; }
.active-driver-row {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.active-driver-row:hover { background: rgba(233,248,252,.72); }
.active-driver-row.is-selected {
  border-color: rgba(24,153,202,.19);
  background: linear-gradient(135deg, rgba(228,247,252,.96), rgba(242,250,224,.82));
  box-shadow: 0 6px 15px rgba(13,91,125,.08);
  transform: translateX(2px);
}
.active-driver-row > span:nth-child(2) { display: grid; min-width: 0; }
.active-driver-row strong,
.active-driver-row small,
.active-driver-row em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.active-driver-row strong { color: var(--blue-950, #0b3856); font-size: 13px; }
.active-driver-row small { color: #5f7886; font-size: 11px; }
.active-driver-row em { margin-top: 2px; color: #3c7084; font-size: 10px; font-style: normal; }
.active-driver-row-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #25845b;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}
.active-driver-row-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2db36f;
  box-shadow: 0 0 0 4px rgba(45,179,111,.12);
}
.active-driver-row .driver-avatar,
.active-driver-selected-card .driver-avatar {
  width: 38px;
  height: 38px;
  font-size: 11px;
}
.live-route-overview { padding: clamp(17px, 2.4vw, 25px); }
.live-route-overview > [data-active-driver-board],
.live-drivers-section > [data-active-driver-board] { margin-top: 5px; }

@media (max-width: 980px) {
  .active-driver-map-layout,
  .active-driver-map-layout.is-admin { grid-template-columns: 1fr; }
  .active-driver-map-canvas,
  .active-driver-map-layout.is-admin .active-driver-map-canvas { height: 430px; min-height: 430px; }
  .active-driver-list,
  .active-driver-map-layout.is-admin .active-driver-list {
    grid-template-columns: repeat(2, minmax(0,1fr));
    max-height: none;
  }
}

@media (max-width: 680px) {
  .live-map-canvas { height: 280px; min-height: 280px; }
  .live-map.compact .live-map-canvas { height: 230px; min-height: 230px; }
  .active-driver-map-canvas,
  .active-driver-map-layout.is-admin .active-driver-map-canvas { height: 390px; min-height: 390px; }
  .active-driver-map-title {
    top: 10px;
    left: 10px;
    max-width: calc(100% - 72px);
    padding: 8px 8px 8px 11px;
  }
  .active-driver-map-title small { display: none; }
  .active-driver-map-title button span { display: none; }
  .active-driver-selected {
    position: static;
    padding: 10px;
    background: rgba(246,252,253,.95);
  }
  .active-driver-selected-card { width: 100%; box-shadow: none; }
  .active-driver-list,
  .active-driver-map-layout.is-admin .active-driver-list { grid-template-columns: 1fr; }
  .bubblez-driver-label { max-width: 145px; font-size: 11px; }
  .bubblez-driver-marker { max-width: 190px; }
}

@media (max-width: 420px) {
  .active-driver-map-canvas,
  .active-driver-map-layout.is-admin .active-driver-map-canvas { height: 340px; min-height: 340px; }
  .active-driver-selected-card { grid-template-columns: auto minmax(0,1fr); }
  .active-driver-selected-card > a { grid-column: 2; justify-self: start; min-height: 34px; }
  .active-driver-selected-card > a span { display: inline; }
  .bubblez-driver-label { max-width: 120px; }
}

/* Compact operations-dashboard live driver preview. */
.active-driver-map-layout.is-compact { grid-template-columns: 1fr; }
.active-driver-map-layout.is-compact .active-driver-map-canvas { height: 260px; min-height: 260px; }
.active-driver-map-layout.is-compact .active-driver-selected { position: static; padding: 9px; background: rgba(247,252,253,.96); }
.active-driver-map-layout.is-compact .active-driver-selected-card { width: 100%; padding: 10px; box-shadow: none; }
.active-driver-map-layout.is-compact .active-driver-roster { border-radius: 18px; }
.active-driver-map-layout.is-compact .active-driver-list { max-height: 218px; }
.active-driver-map-layout.is-compact .active-driver-map-title small { display: none; }
.active-driver-map-layout.is-compact .bubblez-driver-label { max-width: 118px; }

/* ========================================================================
   Bubblez Loop 1.9.2 — route tracking, map recovery, and breathing-room pass
   ======================================================================== */

/* Prevent dense copy from colliding with neighboring actions. */
.card-header > div,
.section-head > div,
.tracking-section-head > div,
.panel-top > div,
.route-copy,
.timeline-copy,
.summary-item,
.field,
.check-row > span,
.tracking-consent-box > span,
.tracking-permission-summary > span,
.pickup-pin-control > div,
.route-navigation-head > div,
.route-direction-title > span,
.route-map-summary > div {
  min-width: 0;
}

.card-subtitle,
.field-help,
.route-copy small,
.route-copy em,
.timeline-copy small,
.summary-item small,
.privacy-note,
.tracking-route-warning,
.tracking-section-head p,
.section-head p,
.wizard-copy p,
.pickup-pin-control small,
.route-navigation-head p,
.route-direction-title small,
.route-map-summary span,
.route-instructions small {
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.card-subtitle,
.tracking-section-head p,
.section-head p,
.wizard-copy p,
.route-navigation-head p {
  margin-top: 5px;
}

.card-header,
.section-head,
.tracking-section-head,
.panel-top {
  gap: 14px;
}

.status-chip {
  flex: 0 0 auto;
  min-height: 25px;
  padding: 5px 9px;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.route-item {
  gap: 12px;
  padding: 13px 14px;
}
.route-copy { gap: 3px; }
.route-copy strong { line-height: 1.28; }
.route-copy small { display: block; }
.route-copy em { display: inline-flex; margin-top: 5px; font-style: normal; }

/* Pickup pin capture. */
.pickup-pin-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 12px 0 18px;
  padding: 13px 14px;
  border: 1px solid rgba(17, 126, 171, .16);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(235, 248, 252, .9), rgba(248, 252, 239, .84));
}
.pickup-pin-control > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, .9);
  color: #087cac;
  box-shadow: 0 5px 14px rgba(15, 106, 145, .09);
}
.pickup-pin-control > span svg { width: 20px; height: 20px; }
.pickup-pin-control strong,
.pickup-pin-control small { display: block; }
.pickup-pin-control strong { color: var(--blue-950, #0b3856); font-size: 13px; }
.pickup-pin-control small { margin-top: 3px; color: #5b7482; font-size: 11px; }
.pickup-pin-control.is-saved { border-color: rgba(43, 166, 111, .24); background: linear-gradient(135deg, rgba(236, 250, 244, .94), rgba(244, 252, 226, .85)); }
.pickup-pin-control.is-saved > span { color: #16855a; }

/* Route planner and breadcrumb trail. */
.route-map-detail-section { padding: 0; overflow: visible; }
.route-navigation {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.route-navigation-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.route-navigation-head h3 { margin: 1px 0 0; color: var(--blue-950, #0b3856); font-size: clamp(19px, 2vw, 25px); line-height: 1.15; }
.route-navigation-head p { margin-bottom: 0; color: #587181; font-size: 12px; }
.route-map-frame {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(29, 147, 191, .18);
  border-radius: 21px;
  background:
    linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,.5)),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(27,134,177,.07) 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(27,134,177,.07) 32px),
    #eaf6f8;
  box-shadow: inset 0 1px rgba(255,255,255,.86);
}
.route-navigation-canvas { height: 470px; min-height: 470px; }
.route-detail-panel .route-navigation-canvas { height: min(52vh, 520px); min-height: 360px; }
.driver-route-navigation-card .route-navigation-canvas { height: min(58vh, 560px); min-height: 390px; }
.route-map-loading {
  position: absolute;
  z-index: 550;
  inset: 50% auto auto 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 34px);
  padding: 11px 13px;
  border: 1px solid rgba(15, 116, 157, .13);
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  color: #155d7e;
  box-shadow: 0 10px 30px rgba(9,72,99,.15);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.route-map-loading[hidden] { display: none; }
.route-map-loading > svg { width: 21px; height: 21px; flex: 0 0 auto; }
.route-map-loading span { display: grid; min-width: 0; }
.route-map-loading strong { font-size: 12px; }
.route-map-loading small { margin-top: 2px; color: #66808c; font-size: 10px; line-height: 1.35; }
.route-map-legend {
  position: absolute;
  z-index: 520;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 11px;
  padding: 8px 10px;
  border: 1px solid rgba(16, 112, 153, .12);
  border-radius: 12px;
  background: rgba(255,255,255,.93);
  color: #4f6876;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(13,75,102,.12);
  backdrop-filter: blur(12px);
}
.route-map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.route-map-legend i { display: block; width: 18px; height: 4px; border-radius: 999px; }
.route-map-legend i.planned { background: #087eb5; }
.route-map-legend i.actual { background: #22a66f; }
.route-map-legend i.driver { width: 9px; height: 9px; background: #0d7daa; box-shadow: 0 0 0 3px rgba(43,204,209,.23); }
.route-map-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(23, 137, 179, .13);
  border-radius: 17px;
  background: rgba(217, 239, 245, .72);
}
.route-map-summary > div {
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 13px 15px;
  background: rgba(255,255,255,.88);
}
.route-map-summary small { color: #6a818d; font-size: 9px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.route-map-summary strong { color: var(--blue-950, #0b3856); font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.route-map-summary strong.is-warning { color: #a95c12; }
.route-map-summary span { color: #58717f; font-size: 10px; }
.route-direction-panel {
  overflow: hidden;
  border: 1px solid rgba(23, 137, 179, .13);
  border-radius: 17px;
  background: rgba(255,255,255,.72);
}
.route-direction-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(23, 137, 179, .11);
}
.route-direction-title span { display: grid; min-width: 0; }
.route-direction-title strong { color: var(--blue-950, #0b3856); font-size: 14px; }
.route-direction-title small { margin-top: 2px; color: #607986; font-size: 10px; }
.route-direction-title button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid rgba(13, 126, 174, .16);
  border-radius: 11px;
  background: #e9f7fb;
  color: #096c99;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}
.route-direction-title button svg { width: 15px; height: 15px; }
.route-instructions {
  display: grid;
  max-height: 260px;
  margin: 0;
  padding: 8px;
  overflow: auto;
  list-style: none;
  overscroll-behavior: contain;
}
.route-instructions li {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 8px;
  border-radius: 11px;
}
.route-instructions li + li { border-top: 1px solid rgba(25, 135, 176, .09); }
.route-instructions li > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 9px;
  background: #e7f6fa;
  color: #0876a6;
  font-size: 10px;
  font-weight: 900;
}
.route-instructions li > div { display: grid; min-width: 0; }
.route-instructions strong { color: #173f55; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.route-instructions small { margin-top: 2px; color: #657d89; font-size: 10px; }

.bubblez-stop-div-icon { background: transparent !important; border: 0 !important; }
.bubblez-stop-marker {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #087eb5;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 5px 14px rgba(5,75,107,.28);
}
.bubblez-stop-marker.is-complete { background: #28a86f; }
.bubblez-stop-marker svg { width: 15px; height: 15px; }
.bubblez-planned-route { filter: drop-shadow(0 2px 2px rgba(7,91,128,.18)); }
.bubblez-actual-route { filter: drop-shadow(0 1px 2px rgba(18,118,75,.22)); }

.route-primary-actions { margin: 15px 0 4px; }
.route-detail-stop-list { margin-top: 14px; }
.route-detail-stop { align-items: center; }
.route-pin-state { align-items: center; gap: 5px; color: #a3601c; font-size: 10px; font-weight: 800; }
.route-pin-state.is-ready { color: #25805b; }
.route-pin-state svg { width: 13px; height: 13px; }
.route-stop-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; min-width: 0; }
.route-reorder-actions { display: inline-flex; gap: 4px; }
.button-tiny { min-height: 33px; padding: 7px 9px; font-size: 10px; white-space: nowrap; }
.route-detail-panel { width: min(830px, 100%); }
.driver-route-navigation-card { padding: clamp(17px, 2.5vw, 25px); }

/* The map remains visibly useful even if tile images temporarily fail. */
.bubblez-map-canvas .leaflet-map-pane { z-index: 2; }
.bubblez-map-canvas .leaflet-tile-pane { z-index: 2; }
.bubblez-map-canvas .leaflet-overlay-pane { z-index: 4; }
.bubblez-map-canvas .leaflet-marker-pane { z-index: 6; }
.bubblez-map-canvas .leaflet-tooltip-pane,
.bubblez-map-canvas .leaflet-popup-pane { z-index: 7; }
.bubblez-map-status { max-width: min(390px, calc(100% - 24px)); }

/* Active-driver selected actions now contain both Route and Open buttons. */
.active-driver-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.active-driver-actions button,
.active-driver-actions a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(17,126,171,.16);
  border-radius: 11px;
  background: #ecf8fb;
  color: #096b9b;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}
.active-driver-actions svg { width: 15px; height: 15px; }

@media (max-width: 760px) {
  .card-header,
  .tracking-section-head,
  .section-head { align-items: flex-start; }
  .pickup-pin-control { grid-template-columns: auto minmax(0, 1fr); }
  .pickup-pin-control .button { grid-column: 2; justify-self: start; }
  .route-navigation-head { align-items: flex-start; }
  .route-map-summary { grid-template-columns: 1fr; gap: 1px; }
  .route-map-summary > div { padding: 11px 13px; }
  .route-direction-title { align-items: flex-start; }
  .route-direction-title button { flex: 0 0 auto; }
  .route-navigation-canvas,
  .route-detail-panel .route-navigation-canvas,
  .driver-route-navigation-card .route-navigation-canvas { height: 390px; min-height: 390px; }
  .route-detail-stop { grid-template-columns: auto minmax(0, 1fr); }
  .route-stop-actions { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; padding-top: 4px; }
  .route-primary-actions { padding-right: max(4px, env(safe-area-inset-right)); padding-left: max(4px, env(safe-area-inset-left)); }
  .active-driver-selected-card { align-items: start; }
  .active-driver-actions { grid-column: 2; justify-content: flex-start; }
}

@media (max-width: 480px) {
  .status-chip { max-width: 132px; }
  .route-navigation-head { display: grid; }
  .route-navigation-head .status-chip { justify-self: start; }
  .route-navigation-canvas,
  .route-detail-panel .route-navigation-canvas,
  .driver-route-navigation-card .route-navigation-canvas { height: 340px; min-height: 340px; }
  .route-map-legend { right: 8px; bottom: 8px; gap: 6px 8px; }
  .route-direction-title { display: grid; }
  .route-direction-title button { justify-self: start; white-space: normal; }
  .route-instructions { max-height: 230px; }
  .route-stop-actions { width: 100%; }
  .route-stop-actions .button-tiny { white-space: normal; }
}

/* Final density audit: readable compact copy without inflating the interface. */
.page :where(small, em),
.modal :where(small, em),
.detail-panel :where(small, em),
.toast :where(small, em) {
  line-height: 1.42;
}

.toggle-copy,
.order-main,
.activity-main,
.pickup-copy,
.customer-copy,
.menu-item > span,
.active-driver-row > span,
.active-driver-selected-copy,
.route-copy,
.timeline-copy {
  min-width: 0;
}

.toggle-copy > small,
.order-main > small,
.activity-main > small,
.pickup-copy > small,
.customer-copy > small,
.active-driver-row small,
.active-driver-row em,
.active-driver-selected-copy small,
.active-driver-selected-copy em,
.timeline-copy small {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.detail-pair,
.estimate-row {
  align-items: flex-start;
}
.detail-pair > :first-child,
.estimate-row > :first-child {
  min-width: 0;
  line-height: 1.4;
}
.detail-pair strong,
.estimate-row strong {
  max-width: 62%;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.button-row,
.tracking-controls,
.panel-actions,
.form-foot,
.wizard-actions,
.route-primary-actions {
  row-gap: 9px;
  column-gap: 10px;
}

.menu-item {
  gap: 12px;
  padding-top: 9px;
  padding-bottom: 9px;
  line-height: 1.3;
}

.order-row,
.activity-row,
.notification-row {
  min-width: 0;
}
.order-row > *,
.activity-row > *,
.notification-row > * {
  min-width: 0;
}

.map-library-fallback {
  min-height: inherit;
  padding: 24px;
  text-align: center;
}
.map-library-fallback strong,
.map-library-fallback small {
  display: block;
  max-width: 440px;
  margin-right: auto;
  margin-left: auto;
}
.map-library-fallback small { margin-top: 6px; line-height: 1.45; }
.map-library-fallback button { margin-top: 13px; }

@media (max-width: 620px) {
  .order-row,
  .activity-row,
  .notification-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 11px 12px;
    align-items: start;
  }
  .order-row > :last-child,
  .activity-row > :last-child,
  .notification-row > :last-child {
    grid-column: 2;
    justify-self: start;
  }
  .detail-pair,
  .estimate-row { gap: 12px; }
  .detail-pair strong,
  .estimate-row strong { max-width: 58%; }
  .toggle-row { align-items: flex-start; gap: 14px; }
}

/* Bubblez Loop 1.9.2: staff chat and explicit delivery handoff choices. */
.bottom-nav { grid-template-columns: repeat(var(--nav-count, 4), minmax(0, 1fr)); }
.nav-link { position: relative; }
.nav-unread {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  margin-left: 6px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--blue-600);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}
.bottom-icon-wrap { position: relative; display: grid; place-items: center; }
.bottom-unread {
  position: absolute;
  top: -7px;
  right: -11px;
  display: grid;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  place-items: center;
  border: 2px solid rgba(249, 253, 255, .95);
  border-radius: 999px;
  color: #fff;
  background: var(--blue-600);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.delivery-handoff-field { min-width:0; margin-top:5px; padding:0; border:0; }

fieldset.preference-group,
fieldset.delivery-handoff-field { min-width:0; padding-inline:0; border:0; }

.delivery-handoff-field > legend,
.delivery-handoff-field > label {
  display: block;
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}
.delivery-handoff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.delivery-handoff-grid.compact { gap: 8px; }
.delivery-handoff-choice {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .62);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.delivery-handoff-choice:hover { transform: translateY(-1px); border-color: rgba(24, 126, 201, .34); }
.delivery-handoff-choice.selected,
.delivery-handoff-choice:has(input:checked) {
  border-color: rgba(24, 126, 201, .56);
  background: rgba(228, 246, 255, .84);
  box-shadow: 0 8px 20px rgba(31, 122, 181, .09);
}
.delivery-handoff-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.delivery-handoff-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: var(--blue-700);
  background: rgba(214, 240, 255, .88);
}
.delivery-handoff-icon svg { width: 18px; height: 18px; }
.delivery-handoff-choice strong,
.delivery-handoff-choice small { display: block; min-width: 0; overflow-wrap: anywhere; }
.delivery-handoff-choice strong { line-height: 1.25; }
.delivery-handoff-choice small { margin-top: 4px; color: var(--muted); line-height: 1.38; }

.staff-chat-page { max-width: 1050px; margin: 0 auto; }
.chat-page-head { margin-bottom: 15px; }
.chat-safety-warning {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  margin-bottom: 15px;
  padding: 16px 18px;
  border: 1px solid rgba(190, 116, 19, .26);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 247, 220, .96), rgba(255, 252, 240, .88));
  box-shadow: 0 10px 28px rgba(154, 102, 25, .07);
}
.chat-safety-warning > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #885400;
  background: rgba(255, 224, 139, .72);
}
.chat-safety-warning svg { width: 21px; height: 21px; }
.chat-safety-warning strong,
.chat-safety-warning p { display: block; }
.chat-safety-warning p { margin: 4px 0 0; color: #6c552e; line-height: 1.48; }
.chat-card { padding: 0; overflow: hidden; }
.chat-channel-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 9px;
  border-bottom: 1px solid var(--line);
  background: rgba(237, 247, 253, .66);
}
.chat-channel-tabs button {
  display: flex;
  min-width: 0;
  min-height: 46px;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border: 0;
  border-radius: 13px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.chat-channel-tabs button.active { color: var(--blue-700); background: rgba(255,255,255,.92); box-shadow: 0 5px 15px rgba(40, 93, 129, .09); }
.chat-channel-tabs svg { width: 18px; height: 18px; flex: 0 0 auto; }
.chat-channel-tabs i {
  display: grid;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  place-items: center;
  border-radius: 99px;
  color: #fff;
  background: var(--blue-600);
  font-size: 10px;
  font-style: normal;
  line-height: 1;
}
.chat-room-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 17px 19px 12px;
}
.chat-room-heading small { display: block; color: var(--blue-700); font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.chat-room-heading h2 { margin: 3px 0 0; font-size: clamp(19px, 2.2vw, 25px); }
.chat-thread-picker { padding: 0 19px 13px; }
.chat-thread-picker label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 850; }
.chat-message-list {
  min-height: 320px;
  max-height: min(51vh, 560px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 15px 19px 22px;
  border-top: 1px solid rgba(112, 150, 175, .13);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(248, 252, 254, .76), rgba(237, 247, 251, .76));
  scroll-behavior: smooth;
}
.chat-message { display: grid; justify-items: start; margin-top: 14px; }
.chat-message:first-child { margin-top: 0; }
.chat-message.mine { justify-items: end; }
.chat-message-meta {
  display: flex;
  max-width: min(78%, 660px);
  gap: 7px 10px;
  align-items: baseline;
  margin: 0 5px 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}
.chat-message.mine .chat-message-meta { justify-content: flex-end; }
.chat-message-meta strong { color: var(--ink); }
.chat-bubble {
  max-width: min(78%, 660px);
  padding: 11px 13px;
  border: 1px solid rgba(100, 145, 174, .17);
  border-radius: 6px 18px 18px 18px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 7px 18px rgba(44, 90, 119, .07);
  overflow-wrap: anywhere;
}
.chat-message.mine .chat-bubble {
  border-radius: 18px 6px 18px 18px;
  border-color: rgba(34, 134, 198, .2);
  background: linear-gradient(135deg, rgba(218, 243, 255, .98), rgba(232, 250, 248, .96));
}
.chat-bubble p { margin: 0; line-height: 1.5; white-space: normal; }
.chat-audio-player { display: block; width: min(340px, 65vw); max-width: 100%; }
.chat-audio-load {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid rgba(36, 126, 184, .22);
  border-radius: 12px;
  color: var(--blue-700);
  background: rgba(238, 249, 255, .86);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.chat-audio-load svg { width: 16px; height: 16px; }
.chat-audio-expiry { display: flex; gap: 5px; align-items: center; margin-top: 7px; color: #7c6c4d; }
.chat-audio-expiry svg { width: 14px; height: 14px; }
.chat-loading { display: grid; min-height: 250px; place-items: center; align-content: center; gap: 10px; color: var(--muted); }
.chat-composer { padding: 16px 19px 19px; background: rgba(255,255,255,.78); }
.chat-safe-stop {
  margin-bottom: 13px;
  padding: 11px 12px;
  border: 1px solid rgba(184, 113, 14, .25);
  border-radius: 14px;
  background: rgba(255, 248, 224, .72);
}
.chat-safe-stop span strong,
.chat-safe-stop span small { display: block; }
.chat-safe-stop span small { margin-top: 3px; color: #705b36; }
.chat-composer .field { margin: 0; }
.chat-composer-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 11px; }
.chat-audio-compose {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 12px 13px;
  border: 1px dashed rgba(36, 126, 184, .28);
  border-radius: 14px;
  background: rgba(237, 249, 255, .67);
}
.chat-audio-compose > div { min-width: 0; }
.chat-audio-compose strong,
.chat-audio-compose small { display: block; }
.chat-audio-compose small { margin-top: 3px; color: var(--muted); line-height: 1.4; }

@media (max-width: 720px) {
  .delivery-handoff-grid { grid-template-columns: 1fr; }
  .chat-message-list { min-height: 300px; max-height: 49vh; padding-right: 14px; padding-left: 14px; }
  .chat-room-heading,
  .chat-composer { padding-right: 14px; padding-left: 14px; }
  .chat-thread-picker { padding-right: 14px; padding-left: 14px; }
  .chat-bubble,
  .chat-message-meta { max-width: 91%; }
  .chat-audio-compose { align-items: stretch; flex-direction: column; }
  .chat-audio-compose .button-row { width: 100%; }
  .chat-audio-compose .button { flex: 1 1 130px; }
}

@media (max-width: 520px) {
  .bottom-nav[style*="--nav-count:5"] { right: 7px; left: 7px; padding: 6px 4px; }
  .bottom-nav[style*="--nav-count:5"] .bottom-link { padding-right: 2px; padding-left: 2px; font-size: 8.5px; }
  .bottom-nav[style*="--nav-count:5"] .bottom-link svg { width: 19px; height: 19px; }
  .chat-channel-tabs button { padding-right: 7px; padding-left: 7px; font-size: 12px; }
  .chat-safety-warning { padding: 14px; }
  .chat-safety-warning > span { width: 34px; height: 34px; }
  .chat-composer-actions .button { flex: 1 1 150px; }
}

/* v1.9.6 · order-specific communication, delivery proof, and emergency override */
.special-request-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 15px;
  padding: 14px 15px;
  border: 1px solid rgba(41, 132, 190, .18);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(238, 250, 255, .94), rgba(244, 255, 250, .9));
}
.special-request-card > span {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: var(--blue-700);
  background: rgba(255,255,255,.9);
  box-shadow: 0 5px 14px rgba(31, 105, 152, .08);
}
.special-request-card svg { width: 19px; height: 19px; }
.special-request-card strong,
.special-request-card p { display: block; margin: 0; }
.special-request-card p { margin-top: 4px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }

.private-proof-card { width: 100%; padding: 0; border: 0; background: transparent; text-align: left; font: inherit; cursor: pointer; }
.private-proof-card:disabled { cursor: not-allowed; opacity: .76; }
.proof-private-preview {
  display: grid;
  width: 100%;
  min-height: 126px;
  place-items: center;
  align-content: center;
  gap: 7px;
  color: var(--blue-700);
  background: linear-gradient(135deg, rgba(225, 246, 255, .95), rgba(235, 253, 247, .95));
}
.proof-private-preview svg { width: 30px; height: 30px; }
.proof-private-preview small { padding: 0 10px; color: var(--muted); text-align: center; line-height: 1.35; }
.proof-card > span { display: block; }
.proof-card > span small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 650; }

.order-conversation-section {
  padding: 18px;
  border: 1px solid rgba(35, 124, 181, .18);
  border-radius: 18px;
  background: rgba(248, 253, 255, .88);
}
.order-conversation-help { margin: 7px 0 13px; color: var(--muted); line-height: 1.5; }
.order-quick-notices { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.order-message-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 330px;
  min-height: 96px;
  margin: 14px 0;
  padding: 12px;
  overflow-y: auto;
  border: 1px solid rgba(37, 119, 173, .13);
  border-radius: 15px;
  background: rgba(238, 249, 255, .62);
}

.order-message-list.safety-locked { min-height: 150px; justify-content: center; }
.order-message-safety-lock { display: grid; place-items: center; gap: 7px; padding: 14px; color: var(--muted); text-align: center; }
.order-message-safety-lock svg { width: 27px; height: 27px; color: var(--blue-700); }
.order-message-safety-lock strong { color: var(--ink); }
.order-message-safety-lock p { max-width: 390px; margin: 0; line-height: 1.45; }

.order-message { align-self: flex-start; width: min(88%, 520px); }
.order-message.mine { align-self: flex-end; }
.order-message-meta { display: flex; flex-wrap: wrap; gap: 5px 8px; align-items: baseline; margin: 0 5px 4px; }
.order-message-meta strong { font-size: 12px; }
.order-message-meta span { color: var(--muted); font-size: 10.5px; }
.order-message p {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(37, 119, 173, .15);
  border-radius: 6px 16px 16px 16px;
  color: var(--ink);
  background: rgba(255,255,255,.96);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.order-message.mine p { border-radius: 16px 6px 16px 16px; background: linear-gradient(135deg, rgba(219, 244, 255, .98), rgba(233, 251, 246, .96)); }
.order-message.notice { width: min(94%, 560px); align-self: center; }
.order-message.notice p { border-radius: 14px; border-color: rgba(25, 145, 101, .2); background: rgba(233, 252, 244, .94); font-weight: 780; text-align: center; }
.order-message-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: end; }
.order-message-composer .textarea { min-height: 84px; margin: 0; }
.order-message-composer .button { min-height: 46px; }
.order-safe-stop {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0;
  padding: 11px 12px;
  border: 1px solid rgba(184, 113, 14, .25);
  border-radius: 14px;
  background: rgba(255, 248, 224, .72);
}
.order-safe-stop input { margin-top: 3px; }
.order-safe-stop strong,
.order-safe-stop small { display: block; }
.order-safe-stop small { margin-top: 3px; color: #705b36; line-height: 1.4; }

@media (max-width: 620px) {
  .order-conversation-section { padding: 14px; }
  .order-message { width: 94%; }
  .order-message-composer { grid-template-columns: 1fr; }
  .order-message-composer .button { width: 100%; }
  .order-quick-notices .button { flex: 1 1 145px; }
}


/* v1.9.6 final responsive and emergency-proof hardening */
.proof-override-help {
  display: block;
  margin-top: 7px;
  padding: 9px 11px;
  border: 1px solid rgba(195, 106, 5, .20);
  border-radius: 12px;
  color: #76501f;
  background: rgba(255, 248, 225, .82);
}
.admin-warning-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  margin-top: 12px;
  padding: 12px 13px;
  border: 1px solid rgba(195, 106, 5, .22);
  border-radius: 14px;
  color: #76501f;
  background: linear-gradient(135deg, rgba(255,247,220,.96), rgba(255,252,240,.88));
}
.admin-warning-card > svg { width: 20px; height: 20px; margin-top: 1px; }
.admin-warning-card strong, .admin-warning-card small { display: block; }
.admin-warning-card small { margin-top: 3px; line-height: 1.42; }
.proof-requirement-toggle { align-items: flex-start; }
.driver-handoff-card, .order-conversation-section, .settings-section { min-width: 0; }
.driver-handoff-card :where(input, textarea, select),
.order-conversation-section :where(input, textarea, select),
#admin-settings-form :where(input, textarea, select) { max-width: 100%; }
@media (max-width: 620px) {
  .workflow-heading { align-items: flex-start; flex-direction: column; }
  .workflow-heading .status-chip { max-width: 100%; }
  .driver-handoff-card .field, .order-conversation-section, .settings-section { width: 100%; }
  .proof-requirement-toggle { gap: 12px; }
}
@media (max-width: 390px) {
  .app-shell { padding-right: 8px; padding-left: 8px; }
  .card, .order-conversation-section { padding-right: 14px; padding-left: 14px; }
  .order-message { width: 100%; }
  .order-quick-notices .button { flex-basis: 100%; }
  .button-row, .wizard-actions, .panel-actions { width: 100%; }
}

.message-proof-link{display:inline-flex;align-items:center;gap:8px;max-width:100%;margin-top:9px;padding:8px 10px;border:1px solid rgba(30,132,180,.18);border-radius:11px;background:rgba(255,255,255,.72);color:#0b568f;font:inherit;font-weight:800;text-decoration:none;cursor:pointer}.message-proof-link svg{width:17px;height:17px;flex:0 0 auto}.message-proof-link .proof-private-preview{display:inline-flex;align-items:center;gap:8px;min-width:0}.message-proof-link small{overflow-wrap:anywhere}.message-proof-link img{width:52px;height:42px;object-fit:cover;border-radius:8px}@media(max-width:390px){.message-proof-link{width:100%;justify-content:center}}

/* v1.9.6 · authenticated delivery proof inside the order conversation */
.message-proof-preview{
  margin-top:10px;
  overflow:hidden;
  border:1px solid rgba(24,117,172,.18);
  border-radius:14px;
  background:rgba(255,255,255,.82);
}
.message-proof-preview[hidden]{display:none!important}
.message-proof-preview img{
  display:block;
  width:100%;
  max-height:min(52vh,520px);
  object-fit:contain;
  background:#f5fbfe;
}
@media(max-width:390px){
  .message-proof-preview{border-radius:11px}
  .message-proof-preview img{max-height:46vh}
}

/* v1.9.9 driver completion path and audited camera exception */
.driver-route-completion-card{
  margin:0 0 14px;
  padding:15px 16px;
  border:1px solid rgba(31,137,190,.18);
  border-radius:16px;
  background:linear-gradient(135deg,rgba(239,249,255,.96),rgba(238,253,247,.9));
}
.driver-route-completion-card p{margin:8px 0 0;color:var(--muted);line-height:1.5}
.driver-delivery-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0 15px}
.driver-delivery-steps span{display:flex;align-items:center;gap:8px;min-width:0;padding:9px 10px;border:1px solid rgba(30,132,180,.14);border-radius:12px;background:rgba(255,255,255,.72);font-size:12px;font-weight:750;color:var(--ink)}
.driver-delivery-steps b{display:grid;place-items:center;flex:0 0 24px;width:24px;height:24px;border-radius:50%;background:rgba(31,151,205,.13);color:var(--blue-700);font-size:12px}
.delivery-proof-ready,.delivery-proof-bypass-record,.driver-camera-bypass-warning{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:start;padding:11px 12px;border-radius:13px}
.delivery-proof-ready{margin:10px 0;border:1px solid rgba(24,145,101,.2);background:rgba(232,252,244,.82)}
.delivery-proof-ready svg{width:20px;height:20px;color:#16845f}
.delivery-proof-ready strong,.delivery-proof-ready small{display:block}.delivery-proof-ready small{margin-top:2px;color:var(--muted)}
.driver-camera-bypass{display:flex;gap:11px;align-items:flex-start;margin:12px 0;padding:12px;border:1px solid rgba(190,112,7,.24);border-radius:14px;background:rgba(255,248,226,.72);cursor:pointer}
.driver-camera-bypass input{margin-top:3px;flex:0 0 auto}
.driver-camera-bypass strong,.driver-camera-bypass small{display:block}.driver-camera-bypass small{margin-top:3px;color:#705b36;line-height:1.42}
.driver-camera-bypass-warning{margin:-3px 0 12px;border:1px solid rgba(182,83,20,.24);background:rgba(255,240,226,.88);color:#7c451f}
.driver-camera-bypass-warning svg{width:20px;height:20px}.driver-camera-bypass-warning p{margin:3px 0 0;line-height:1.42}
.driver-route-auto-complete-note{margin:10px 0 0;color:var(--muted);font-size:12px;line-height:1.45;text-align:center}
.delivery-proof-bypass-record{margin:12px 0;border:1px solid rgba(182,83,20,.22);background:rgba(255,241,226,.82);color:#78451f}
.delivery-proof-bypass-record svg{width:20px;height:20px}.delivery-proof-bypass-record p{margin:3px 0 0;line-height:1.45}
.driver-stop-ctas{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;align-items:center}
.driver-stop-ctas .button{white-space:nowrap}
.driver-verify-handoff:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:620px){
  .driver-delivery-steps{grid-template-columns:1fr}
  .driver-stop-ctas{width:100%;justify-content:flex-start;margin-top:8px}
  .route-detail-stop{align-items:flex-start}
  .route-detail-stop .route-stop-actions{width:100%}
  .driver-stop-ctas .button{flex:1 1 140px}
}
@media(max-width:390px){
  .driver-stop-ctas .button{flex-basis:100%}
}
.driver-message-customer{margin:0 0 13px}

/* v1.10.0 reusable QR bag workflow */
.qr-scan-fab{
  position:fixed;right:22px;bottom:calc(86px + env(safe-area-inset-bottom,0px));z-index:80;
  min-height:54px;padding:0 18px;border:0;border-radius:18px;display:flex;align-items:center;gap:9px;
  background:linear-gradient(135deg,#0b78bd,#16a7d7);color:#fff;font:800 15px/1 var(--font-body,system-ui);
  box-shadow:0 18px 42px rgba(11,86,143,.28);cursor:pointer
}
.qr-scan-fab svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.9}
.qr-scanner-wrap{z-index:1200}
.qr-scanner-modal{max-width:560px}
.qr-camera-shell{position:relative;overflow:hidden;min-height:320px;border-radius:22px;background:#082536;display:grid;place-items:center}
.qr-camera-shell video{display:block;width:100%;height:360px;object-fit:cover;background:#082536}
.qr-scan-frame{position:absolute;width:min(64vw,230px);aspect-ratio:1;border:1px solid rgba(255,255,255,.24);border-radius:25px;box-shadow:0 0 0 999px rgba(2,19,29,.28)}
.qr-scan-frame i{position:absolute;width:42px;height:42px;border-color:#fff;border-style:solid}
.qr-scan-frame i:nth-child(1){left:-2px;top:-2px;border-width:4px 0 0 4px;border-radius:18px 0 0 0}
.qr-scan-frame i:nth-child(2){right:-2px;top:-2px;border-width:4px 4px 0 0;border-radius:0 18px 0 0}
.qr-scan-frame i:nth-child(3){right:-2px;bottom:-2px;border-width:0 4px 4px 0;border-radius:0 0 18px 0}
.qr-scan-frame i:nth-child(4){left:-2px;bottom:-2px;border-width:0 0 4px 4px;border-radius:0 0 0 18px}
.qr-camera-message{position:absolute;left:50%;bottom:18px;transform:translateX(-50%);max-width:88%;padding:8px 13px;border-radius:999px;background:rgba(5,34,50,.78);color:#fff;font-size:13px;font-weight:700;text-align:center;backdrop-filter:blur(12px)}
.qr-manual-entry{margin-top:16px}.qr-manual-entry>label{display:block;margin-bottom:7px;font-weight:750;color:var(--ink,#0b3856)}
.qr-manual-row{display:grid;grid-template-columns:1fr auto;gap:9px}.qr-scan-status{min-height:22px;margin-top:10px;color:var(--muted,#527286);font-size:13px}
.qr-bag-card{background:linear-gradient(145deg,rgba(235,249,255,.8),rgba(248,255,239,.76))}
.qr-bag-list{display:grid;gap:9px;margin:14px 0}.qr-bag-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:10px;align-items:center;padding:11px;border:1px solid rgba(25,122,166,.13);border-radius:14px;background:rgba(255,255,255,.74)}
.qr-bag-row strong,.qr-bag-row small{display:block}.qr-bag-row small{margin-top:2px;color:var(--muted,#527286);font-size:12px}.qr-bag-symbol{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:rgba(23,159,218,.11);color:#0b78bd}.qr-bag-symbol svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.8}
.qr-state-line{display:flex;align-items:center;gap:7px;margin:7px 0;padding:8px 10px;border-radius:10px;font-size:13px;font-weight:700}.qr-state-line.success{background:rgba(79,176,116,.1);color:#21683d}.qr-state-line svg{width:17px;height:17px;stroke:currentColor;fill:none}
.qr-required-handoff .driver-delivery-steps .complete{background:rgba(79,176,116,.1);color:#21683d}.qr-system-toggle{border-color:rgba(23,159,218,.18)}
@media(min-width:900px){.qr-scan-fab{bottom:24px}}
@media(max-width:560px){.qr-scan-fab{right:14px;bottom:calc(82px + env(safe-area-inset-bottom,0px));min-height:50px;padding:0 14px;border-radius:16px}.qr-camera-shell{min-height:280px}.qr-camera-shell video{height:310px}.qr-bag-row{grid-template-columns:38px minmax(0,1fr)}.qr-bag-row .button{grid-column:1/-1}.qr-manual-row{grid-template-columns:1fr}.qr-manual-row .button{width:100%}}
.qr-bag-checkpoints{display:block;margin-top:4px;font-size:11px;line-height:1.35;opacity:.78}

/* v1.10.2 customer QR lifecycle, address integrity, and gap-closing flow */
.customer-row-actions{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end}
.customer-qr-manager,.new-customer-qr,.customer-created-qr{margin:6px 0 2px;padding:16px;border:1px solid rgba(23,159,218,.17);border-radius:18px;background:linear-gradient(145deg,rgba(239,250,255,.92),rgba(246,255,249,.9))}
.customer-qr-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.customer-qr-head h3{margin:3px 0 4px}.customer-qr-head p{margin:0;color:var(--muted);font-size:13px;line-height:1.45;max-width:620px}
.customer-bag-list{display:grid;gap:9px;margin-top:14px}.customer-bag-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:11px;align-items:center;padding:12px;border:1px solid rgba(25,122,166,.13);border-radius:14px;background:rgba(255,255,255,.78)}
.customer-bag-row.status-lost{border-color:rgba(190,112,7,.23);background:rgba(255,249,232,.82)}.customer-bag-row.status-replaced,.customer-bag-row.status-inactive{opacity:.82}
.customer-bag-copy{min-width:0}.customer-bag-copy code{display:block;margin:3px 0;font-size:12px;overflow-wrap:anywhere}.customer-bag-copy small{display:block;color:var(--muted);font-size:12px;line-height:1.4}.customer-bag-title-line{display:flex;flex-wrap:wrap;gap:7px;align-items:center}.customer-bag-replacement{font-weight:750;color:#0b678f!important}
.customer-bag-actions{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}.bag-editor-modal{max-width:580px}.bag-history-lock{padding:11px 12px;border-radius:12px;background:rgba(19,100,160,.06);font-size:13px}.bag-history-lock strong,.bag-history-lock span{display:block}.bag-history-lock span{margin-top:3px;color:var(--muted);line-height:1.42}
.new-customer-qr,.customer-created-qr{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center}.new-customer-qr>span,.customer-created-qr>span{width:44px;height:44px;display:grid;place-items:center;border-radius:13px;background:rgba(23,159,218,.12);color:#0b78bd}.new-customer-qr svg,.customer-created-qr svg{width:23px;height:23px;stroke:currentColor;fill:none}.new-customer-qr strong,.new-customer-qr small,.customer-created-qr strong,.customer-created-qr small{display:block}.new-customer-qr small,.customer-created-qr p{margin:3px 0 0;color:var(--muted);font-size:12px;line-height:1.4}.customer-created-qr strong{font:800 14px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace}
.address-inline-actions{display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin-top:8px}.address-verification-control{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:11px;align-items:center;margin-top:9px;padding:11px 12px;border:1px solid rgba(23,159,218,.16);border-radius:14px;background:rgba(247,253,255,.86)}.address-verification-control>span{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:rgba(23,159,218,.1);color:#0b78bd}.address-verification-control svg{width:20px;height:20px;stroke:currentColor;fill:none}.address-verification-control strong,.address-verification-control small{display:block}.address-verification-control small{margin-top:4px;color:var(--muted);line-height:1.4}
.address-state{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:750;line-height:1.35}.address-state svg{width:15px;height:15px;stroke:currentColor;fill:none}.address-state.neutral{color:var(--muted)}.address-state.success{color:#197047}.address-state.warning{color:#91641a}.address-state.danger{color:#a6443e}
.review-address-state{display:flex;align-items:center;gap:5px;margin-top:5px;font-size:11px;font-weight:750}.review-address-state svg{width:14px;height:14px;stroke:currentColor;fill:none}.review-address-state.success{color:#197047}.review-address-state.warning{color:#91641a}
.route-address-ready,.route-address-warning{display:flex!important;align-items:center;gap:5px;margin-top:4px!important;font-weight:700!important}.route-address-ready{color:#197047!important}.route-address-warning{color:#9a6714!important}.route-address-ready svg,.route-address-warning svg{width:14px;height:14px;stroke:currentColor;fill:none}
.how-it-works-modal{max-width:720px}.how-it-works-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin:15px 0}.how-it-works-grid article{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;padding:14px;border:1px solid rgba(23,159,218,.14);border-radius:15px;background:rgba(255,255,255,.72)}.how-it-works-grid article>span{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:rgba(23,159,218,.12);color:#0b678f;font-weight:900}.how-it-works-grid strong{display:block}.how-it-works-grid p{margin:4px 0 0;color:var(--muted);font-size:13px;line-height:1.45}
@media(max-width:720px){.customer-bag-row{grid-template-columns:38px minmax(0,1fr)}.customer-bag-actions{grid-column:1/-1;justify-content:flex-start}.customer-bag-actions .button{flex:1 1 120px}.customer-qr-head{flex-direction:column}.customer-qr-head>.button{width:100%}.how-it-works-grid{grid-template-columns:1fr}}
@media(max-width:520px){.customer-row-actions{width:100%;justify-content:stretch}.customer-row-actions .button{flex:1}.new-customer-qr,.customer-created-qr{grid-template-columns:42px minmax(0,1fr)}.new-customer-qr>.button,.customer-created-qr>.button{grid-column:1/-1;width:100%}.address-verification-control{grid-template-columns:34px minmax(0,1fr)}.address-verification-control>.button{grid-column:1/-1;width:100%}.address-inline-actions>.button{width:100%}.address-inline-actions>div{width:100%}}
@media(max-width:360px){.customer-bag-actions .button{flex-basis:100%}.customer-bag-row{padding:10px}.customer-qr-manager{padding:13px}.how-it-works-grid article{padding:11px}}
.order-address-integrity{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:10px;align-items:center;margin:13px 0;padding:11px 12px;border-radius:14px;border:1px solid rgba(23,159,218,.15);background:rgba(246,252,255,.82)}
.order-address-integrity>span{width:38px;height:38px;border-radius:11px;display:grid;place-items:center}.order-address-integrity>span svg{width:20px;height:20px;stroke:currentColor;fill:none}.order-address-integrity strong{display:block}.order-address-integrity p{margin:3px 0 0;color:var(--muted);font-size:12px;line-height:1.42}.order-address-integrity.is-verified>span{background:rgba(43,164,107,.11);color:#197047}.order-address-integrity.needs-review{border-color:rgba(190,112,7,.23);background:rgba(255,249,232,.82)}.order-address-integrity.needs-review>span{background:rgba(190,112,7,.1);color:#91641a}
@media(max-width:520px){.order-address-integrity{grid-template-columns:36px minmax(0,1fr)}.order-address-integrity>.button{grid-column:1/-1;width:100%}}

/* v1.10.2 explicit multi-bag pickup confirmation */
.pickup-ready-confirm{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px 14px;
  border:1px solid rgba(38,167,103,.24);
  border-radius:14px;
  background:rgba(232,250,241,.78);
  color:#155f43;
}
.pickup-ready-confirm svg{flex:0 0 auto;width:20px;height:20px;margin-top:1px}
.pickup-ready-confirm div{display:grid;gap:2px}
.pickup-ready-confirm strong{font-size:14px}
.pickup-ready-confirm small{font-size:12px;line-height:1.45;color:#477063}


/* v1.10.2 verified-address fine tuning */
.order-address-actions { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; align-items:center; }
.order-map-adjust-modal { max-width:680px; }
.order-map-adjust-canvas { width:100%; height:340px; min-height:260px; overflow:hidden; border:1px solid rgba(23,126,181,.18); border-radius:18px; background:linear-gradient(135deg,#eefaff,#f7fff6); }
.map-adjust-status { margin-top:10px; color:#587281; font-size:12px; line-height:1.45; }
@media (max-width:520px) {
  .order-address-actions { width:100%; justify-content:stretch; }
  .order-address-actions .button { flex:1 1 140px; }
  .order-map-adjust-canvas { height:300px; border-radius:15px; }
}

/* v1.10.2 guided QR checkpoint actions */
.qr-next-action{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:12px 0;
  padding:12px 13px;
  border:1px solid rgba(23,159,218,.17);
  border-radius:14px;
  background:rgba(244,252,255,.88);
}
.qr-next-action strong,.qr-next-action small{display:block}
.qr-next-action small{margin-top:3px;color:var(--muted);font-size:12px;line-height:1.42}
.operations-next-step{background:linear-gradient(145deg,rgba(246,251,255,.86),rgba(249,255,247,.82))}
@media(max-width:560px){
  .qr-next-action{align-items:stretch;flex-direction:column}
  .qr-next-action .button{width:100%}
}
.route-start-blocked{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:start;margin:0 0 12px;padding:12px 13px;border:1px solid rgba(190,112,7,.24);border-radius:14px;background:rgba(255,248,226,.86);color:#79501a}
.route-start-blocked>svg{width:21px;height:21px;margin-top:1px;stroke:currentColor;fill:none}.route-start-blocked strong{display:block}.route-start-blocked p{margin:3px 0 0;line-height:1.45;color:#795f35}
.manager-stop-ctas{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
@media(max-width:620px){.manager-stop-ctas{width:100%;justify-content:flex-start}.manager-stop-ctas>.button{flex:1 1 130px}}

/* v1.10.2 combined-service pickup flow */
.service-choice.selected b {
  color: var(--blue-800);
  font-weight: 800;
}

.service-bundle-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 14px 0 4px;
  padding: 14px 16px;
  border: 1px solid rgba(17,152,238,.18);
  border-radius: 16px;
  background: rgba(229,247,255,.58);
}

.service-bundle-note > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: rgba(17,152,238,.12);
  color: var(--blue-800);
}

.service-bundle-note svg { width: 17px; height: 17px; }
.service-bundle-note strong { display: block; margin-bottom: 3px; }
.service-bundle-note p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

.pickup-wizard-body .catalog-picker + .catalog-picker { margin-top: 14px; }

@media (max-width: 520px) {
  .service-bundle-note { padding: 13px 14px; }
}


/* v1.10.5 membership-aware customer pickup flow + dynamic detergents */
.pickup-membership-banner{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
  margin:0 0 16px;
  padding:15px 16px;
  border:1px solid rgba(38,158,197,.16);
  border-radius:18px;
  background:linear-gradient(110deg,rgba(41,189,220,.08),rgba(168,224,104,.11));
  box-shadow:0 10px 28px rgba(25,91,126,.05);
}
.pickup-membership-banner>span:first-child{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:linear-gradient(135deg,rgba(22,171,224,.15),rgba(161,221,101,.20));
  color:#087fa7;
}
.pickup-membership-banner svg{width:20px;height:20px}
.pickup-membership-banner small{
  display:block;
  margin-bottom:3px;
  color:#138fa8;
  font-size:10px;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.pickup-membership-banner strong{
  display:block;
  color:#0b3d5e;
  font-size:15px;
  line-height:1.25;
}
.pickup-membership-banner p{
  margin:4px 0 0;
  color:#668094;
  font-size:12px;
  line-height:1.45;
}
.pickup-membership-banner.checking{
  background:linear-gradient(110deg,rgba(42,173,213,.06),rgba(255,255,255,.88));
}
.pickup-membership-banner.warning{
  border-color:rgba(190,102,54,.18);
  background:rgba(255,248,239,.94);
}
.pickup-membership-banner.warning>span:first-child{
  background:#fff1dc;
  color:#a46326;
}
.pickup-membership-banner.warning small{color:#9a662f}
.membership-credit-row{
  color:#2b7c69;
  background:linear-gradient(90deg,rgba(74,200,178,.07),rgba(166,224,104,.09));
}
.membership-credit-row strong{color:#2d8b6f!important}
.order-membership-card{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:13px;
  align-items:start;
  margin:15px 0;
  padding:15px 16px;
  border:1px solid rgba(67,190,161,.18);
  border-radius:17px;
  background:linear-gradient(110deg,rgba(41,190,219,.07),rgba(166,224,104,.11));
}
.order-membership-card>span{
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:linear-gradient(135deg,#e2f9ff,#edfbdc);
  color:#138bad;
}
.order-membership-card>span svg{width:19px;height:19px}
.order-membership-card small{
  display:block;
  margin-bottom:2px;
  color:#1590a7;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.order-membership-card strong{
  display:block;
  color:#0b3d5e;
  font-size:15px;
}
.order-membership-card p{
  margin:4px 0 0;
  color:#667f91;
  font-size:12px;
  line-height:1.45;
}
@media(max-width:640px){
  .pickup-membership-banner{grid-template-columns:auto minmax(0,1fr)}
  .pickup-membership-banner>.status-chip{grid-column:2;justify-self:start}
}

/* Dynamic detergent administration */
.detergent-admin-list { display:grid; gap:10px; margin-top:14px; }
.detergent-admin-row { display:grid; grid-template-columns:auto minmax(180px,1.5fr) minmax(120px,.65fr) minmax(85px,.45fr) minmax(180px,1fr) auto; gap:10px; align-items:end; padding:13px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.62); }
.detergent-admin-mark { display:grid; place-items:center; width:40px; height:40px; align-self:center; border-radius:13px; color:var(--blue-800); background:var(--blue-100); }
.detergent-admin-row .field { margin:0; }
.detergent-active-field { margin:0; min-height:48px; padding:7px 9px; }
.detergent-active-field span strong,.detergent-active-field span small { display:block; }
.detergent-active-field span small { margin-top:2px; color:var(--muted); font-size:11px; }
.detergent-remove { align-self:center; }
@media (max-width:1120px) { .detergent-admin-row { grid-template-columns:auto 1fr 1fr; } .detergent-active-field { grid-column:2; } .detergent-remove { grid-column:3; } }
@media (max-width:680px) { .detergent-admin-row { grid-template-columns:1fr; } .detergent-admin-mark,.detergent-active-field,.detergent-remove { grid-column:auto; } .detergent-admin-mark { display:none; } .detergent-remove { width:100%; } }
