:root {
  --primary: #1a73e8;
  --primary-dark: #0b4aa8;
  --primary-light: #e8f2ff;
  --secondary: #eef5ff;
  --background: #f5f8fc;
  --surface: #ffffff;
  --text: #102033;
  --muted: #5c6b80;
  --border: #d7e2ef;
  --success: #0d9b56;
  --warning: #e2a20b;
  --danger: #d92d20;
  --shadow: 0 8px 22px rgba(16, 56, 120, 0.07);
  --radius: 14px;
  --nav-h: 118px;
  --bottom-nav-h: 74px;
  --font: "Segoe UI", "Helvetica Neue", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--background);
  color: var(--text);
  line-height: 1.45;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.main { flex: 1; padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 992px) {
  .main { padding-bottom: 32px; }
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(13, 71, 161, 0.04);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px; align-items: center;
  padding: 8px 12px 10px;
}
.brand {
  font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em;
  color: var(--primary-dark);
}
.brand span { color: var(--primary); }
.search-wrap { position: relative; }
.search-wrap input {
  width: 100%; border: 0; border-radius: 0 0 15px 15px;
  padding: 10px 40px 10px 40px; background: #fff;
  outline: none;
}
.search-photo {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  color: var(--primary-dark); background: var(--primary-light);
}
.search-wrap input:focus { box-shadow: none; }
.search-wrap .icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 14px;
}
.header-actions { display: flex; gap: 8px; align-items: center; grid-column: 2; grid-row: 1; height: 36px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; display: grid; place-items: center; color: var(--text);
  position: relative; transition: background .15s;
}
.icon-btn:hover { background: var(--primary-light); }
.side-toggle { width: 32px; height: 32px; border-radius: 8px; font-size: .78rem; margin-top: 0; }
.badge-count {
  position: absolute; top: -4px; right: -4px;
  background: var(--primary); color: #fff; font-size: 10px;
  min-width: 18px; height: 18px; border-radius: 999px;
  display: grid; place-items: center; padding: 0 4px;
}
.badge-count[hidden] { display: none !important; }
.alert-wrap { position: relative; display: flex; align-items: center; height: 36px; }
.alert-btn.is-on { color: var(--primary-dark); border-color: #9ec1f5; background: #f4f8ff; }
.alert-panel {
  position: fixed; right: 12px; top: 64px; z-index: 70;
  width: min(340px, calc(100vw - 24px));
  max-height: min(440px, 70dvh);
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid #d5e4f7; border-radius: 18px;
  box-shadow: 0 18px 44px rgba(13, 71, 161, .18);
}
.alert-panel[hidden] { display: none !important; }
.alert-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 12px 10px;
  background: linear-gradient(180deg, #f7faff, #fff);
  border-bottom: 1px solid #e6eef8;
}
.alert-head strong { color: var(--primary-dark); font-size: .92rem; }
.alert-read {
  border: 0; cursor: pointer; background: #e8f2ff; color: var(--primary-dark);
  font-weight: 800; font-size: .72rem; border-radius: 999px; padding: 6px 10px;
}
.alert-list { overflow: auto; padding: 6px; }
.alert-item { padding: 10px; border-radius: 12px; }
.alert-item.is-new { background: #f4f8ff; }
.alert-item strong { display: block; font-size: .84rem; }
.alert-item p {
  margin: 3px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.alert-item time { display: block; margin-top: 4px; font-size: .68rem; color: #8aa0b8; font-weight: 700; }
.alert-empty { margin: 0; padding: 22px 12px; text-align: center; color: var(--muted); font-size: .82rem; }

.brand-wrap {
  display: flex; flex-direction: row; align-items: center; gap: 8px;
  min-width: 0; grid-column: 1; grid-row: 1; height: 36px;
}
.brand-wrap .side-toggle,
.brand-wrap .brand-live,
.brand-wrap .logo-orb,
.brand-wrap .logo-name { align-self: center; }
.brand-wrap .brand-live { height: 32px; }
.brand-wrap .logo-orb, .brand-wrap .logo-orb img { width: 32px; height: 32px; }
.brand-wrap .logo-name { display: flex; align-items: center; height: 32px; line-height: 1; }
.find-block {
  grid-column: 1 / -1;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: visible;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 56, 120, .05);
}
.loc-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; border: 0; cursor: pointer;
  padding: 10px 12px 7px; text-align: left; color: var(--primary-dark);
  border-bottom: 1px solid #d9e6f6;
  border-radius: 15px 15px 0 0;
  background-color: #eef5ff;
  background-image: linear-gradient(90deg, #1a73e8 0%, #0d9b56 38%, #ffb020 68%, #ff7a59 100%);
  background-repeat: no-repeat;
  background-size: 100% 3px;
  background-position: top center;
}
.loc-bar-main {
  display: flex; align-items: flex-start; gap: 8px; min-width: 0; flex: 1;
  font-size: .78rem; font-weight: 700;
}
.loc-bar-main i { color: var(--primary); font-size: .9rem; flex-shrink: 0; margin-top: 2px; }
.loc-bar-main .loc-caret { font-size: .62rem; color: var(--muted); margin-top: 5px; }
.loc-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; line-height: 1.15; }
.loc-area,
.loc-detail {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.loc-area { font-size: .95rem; font-weight: 800; letter-spacing: -.02em; color: #12263f; }
.loc-detail { font-size: .68rem; font-weight: 500; color: #6b7c93; }
.loc-eta {
  flex-shrink: 0; align-self: center; text-align: right;
  font-size: .78rem; font-weight: 800; color: #0b4aa8;
  background: #fff; border-radius: 999px; padding: 4px 8px; line-height: 1.15;
  white-space: nowrap;
}
.loc-bar.is-set { background-color: #fff; border-bottom-color: #e3eef8; }
.loc-bar.is-set .loc-bar-main { color: #12263f; }
.loc-bar.is-set .fa-location-dot { color: #0d9b56; }
.loc-bar.is-set .loc-eta { color: #0d9b56; background: #e8f8ee; }
.loc-bar.is-off { background-color: #fff; }
.loc-bar.is-off .fa-location-dot { color: #dc2626; }
.loc-bar.is-off .loc-eta,
.loc-eta.is-off { color: #dc2626; background: #fdecec; }
.loc-bar.is-loading .loc-area { overflow: visible; }
.loc-bar.is-loading .loc-area::after {
  content: '...';
  display: inline-block;
  width: 0;
  overflow: hidden;
  vertical-align: bottom;
  animation: locEllipsis .9s steps(4, end) infinite;
}
@keyframes locEllipsis { to { width: 1.15em; } }
.loc-now { margin: 2px 0 0; font-size: .8rem; color: var(--muted); }
.loc-now strong { color: var(--primary-dark); }


/* Containers */
.container { max-width: 1200px; margin: 0 auto; padding: 12px; }
.main h1 {
  margin: 2px 0 14px; font-size: 1.22rem; letter-spacing: -.02em; color: var(--primary-dark);
}
.section { margin: 18px 0; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.section-head h2 { margin: 0; font-size: 1.05rem; letter-spacing: -0.02em; }
.section-head a { font-size: .82rem; }
#shop-categories { scroll-margin-top: calc(var(--nav-h) + 10px); }

/* Banner */
.banner-slider {
  overflow: hidden; border-radius: 16px;
  touch-action: manipulation;
}
.banner-track {
  display: flex; width: 100%;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
}
.banner-track::-webkit-scrollbar { display: none; width: 0; height: 0; }
.banner-card {
  position: relative;
  flex: 0 0 100%; width: 100%; min-width: 100%;
  aspect-ratio: 16 / 7; height: auto; min-height: 0;
  scroll-snap-align: start; scroll-snap-stop: always;
  touch-action: pan-x pan-y;
  border-radius: 0;
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%) center/cover no-repeat;
  color: #fff; padding: 22px;
  display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: none;
  overflow: hidden;
}
.banner-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10,26,46,.62), rgba(10,26,46,.12));
}
.banner-copy { position: relative; z-index: 1; }
.banner-card.is-plain { padding: 0; }
.banner-card h3 { margin: 0 0 6px; font-size: 1.4rem; }
.banner-card p { margin: 0; opacity: .9; }

/* Category pills */
.cat-row {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 0;
  scrollbar-width: none; -ms-overflow-style: none;
  overscroll-behavior-x: contain;
}
.cat-row::-webkit-scrollbar { display: none; width: 0; height: 0; }
.cat-item {
  flex: 0 0 auto; width: 76px; text-align: center; color: var(--text);
}
.cat-icon {
  width: 52px; height: 52px; margin: 0 auto 5px; border-radius: 16px;
  background: var(--secondary); display: grid; place-items: center;
  font-size: 1.25rem; color: var(--primary-dark); overflow: hidden;
}
.cat-icon img { width: 100%; height: 100%; object-fit: cover; }
.cat-item span { font-size: .75rem; display: block; }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (min-width: 576px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; } }
@media (min-width: 992px) { .product-grid { grid-template-columns: repeat(5, 1fr); gap: 12px; } }

.product-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; transition: box-shadow .2s;
  display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow); }
.product-card .thumb {
  aspect-ratio: 1; background: var(--surface); display: grid; place-items: center;
  position: relative; overflow: hidden;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 8px 8px 10px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.product-card .name {
  font-size: .88rem; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  color: var(--text);
}
.price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price { font-weight: 700; color: var(--text); }
.mrp { font-size: .78rem; color: var(--muted); text-decoration: line-through; }
.disc {
  font-size: .72rem; color: var(--success); font-weight: 600;
  background: #e6f4ea; padding: 2px 6px; border-radius: 6px;
}
.btn-add {
  margin-top: auto; border: 1px solid var(--primary); background: #fff;
  color: var(--primary); border-radius: 10px; padding: 7px 10px;
  font-weight: 700; font-size: .82rem; cursor: pointer;
  transition: background .2s, color .2s;
}
.btn-add:hover { background: var(--primary); color: #fff; }
a.btn-add { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 11px; padding: 9px 14px; font-weight: 700;
  cursor: pointer; transition: background .15s, box-shadow .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: linear-gradient(180deg, #2b82f0 0%, #1a73e8 100%); color: #fff; box-shadow: 0 6px 14px rgba(26,115,232,.22); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: .85rem; border-radius: 10px; }

/* Forms */
.form-card {
  max-width: 440px; margin: 24px auto; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: .85rem; margin-bottom: 6px; color: var(--muted); }
.form-control {
  width: 100%; border: 1px solid var(--border); border-radius: 12px;
  padding: 11px 14px; background: var(--surface); outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

/* Bottom nav — base; liquid capsule is in liquid.css */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 60;
  width: min(460px, calc(100% - 16px));
  height: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 0;
  padding: 3px 4px 4px;
  border-radius: 26px;
  background: rgba(255,255,255,.96);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0; min-width: 0; color: var(--muted); font-size: .58rem; font-weight: 600;
  padding: 2px 0 0; border-radius: 16px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.bottom-nav a i {
  width: 36px; height: 20px; display: grid; place-items: center;
  border-radius: 13px; font-size: .92rem;
}
.bottom-nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bottom-nav a.active { color: var(--primary-dark); }
.bottom-nav a.active i { background: var(--primary-light); color: var(--primary); }
@media (hover: hover) {
  .bottom-nav a:hover { color: var(--primary-dark); }
}
@media (min-width: 992px) { .bottom-nav { display: none; } .main { padding-bottom: 28px; } }

/* Toast */
.toast-wrap {
  position: fixed; top: 76px; right: 16px; z-index: 100;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--text); color: #fff; padding: 12px 16px; border-radius: 12px;
  box-shadow: var(--shadow); animation: slideIn .25s ease;
  max-width: 320px; font-size: .9rem;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, #eef3f9 25%, #f7faff 37%, #eef3f9 63%);
  background-size: 400% 100%; animation: shimmer 1.2s ease infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Cart / checkout */
.cart-layout, .checkout-layout {
  display: grid; gap: 16px;
}
@media (min-width: 900px) {
  .cart-layout, .checkout-layout { grid-template-columns: 1.4fr .8fr; align-items: start; }
}
.panel {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; box-shadow: 0 1px 2px rgba(13,71,161,.04);
}
.cart-item {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.qty-control button { width: 32px; height: 32px; border: none; background: var(--surface); cursor: pointer; color: var(--primary); font-weight: 700; }
.qty-control span { min-width: 28px; text-align: center; font-weight: 700; font-size: .9rem; }
.totals-row { display: flex; justify-content: space-between; margin: 8px 0; font-size: .92rem; }
.totals-row.grand { font-weight: 800; font-size: 1.05rem; border-top: 1px dashed var(--border); padding-top: 10px; margin-top: 10px; }

/* Product page */
.product-hero {
  display: grid; gap: 20px;
}
@media (min-width: 900px) {
  .product-hero { grid-template-columns: 1fr 1fr; }
}
.gallery {
  background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border);
  aspect-ratio: 1; display: grid; place-items: center; overflow: hidden;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; }

/* Admin / retailer / rider portals */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; min-height: 100dvh; }
.admin-side {
  background: linear-gradient(180deg, #0a1a2e 0%, #0d2748 100%); color: #fff; padding: 18px 12px;
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.admin-side .brand { color: #fff; margin-bottom: 24px; display: block; padding: 0 8px; }
.admin-side a {
  display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.82);
  padding: 9px 12px; border-radius: 11px; margin-bottom: 6px; font-size: .88rem; font-weight: 600;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04);
}
.admin-side a:hover { background: rgba(26,115,232,.22); color: #fff; border-color: rgba(91,157,255,.4); }
.admin-side a.active { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.portal-side-nav { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 8px; }
.portal-side-out { margin-top: auto; padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)); }
.portal-logout { width: 100%; color: #fff; border-color: rgba(255,255,255,.3); background: transparent; }
.admin-main { background: transparent; min-width: 0; display: flex; flex-direction: column; }
.admin-top {
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 12px 18px; display: flex; align-items: center; gap: 10px;
}
.admin-top-title {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-top-meta {
  color: var(--muted); font-size: .8rem; flex-shrink: 1; max-width: 42%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right;
}
.admin-top-user {
  margin-left: auto; flex-shrink: 1; max-width: 46%;
  font-weight: 800; font-size: .78rem; color: var(--primary-dark);
  background: var(--primary-light); border-radius: 999px; padding: 6px 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dep-note { font-size: .78rem; margin: 8px 0; }
.dep-list { display: flex; flex-direction: column; gap: 8px; }
.dep-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 12px;
  box-shadow: var(--shadow);
}
.dep-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.dep-side { text-align: right; flex-shrink: 0; }
.dep-amt { font-weight: 800; color: var(--primary-dark); font-size: .95rem; }
.dep-meta { color: var(--muted); font-size: .75rem; margin-top: 2px; word-break: break-word; }
.dep-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.dep-actions .form-control { flex: 1 1 140px; min-width: 0; padding: 8px 10px; }
.dep-pager { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.status-pill.success { background: #e6f4ea; color: var(--success); }
.admin-content { padding: 20px; min-width: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 900px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .stat-grid { grid-template-columns: repeat(6, 1fr); } }
.stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.stat-card .label { color: var(--muted); font-size: .8rem; }
.stat-card .value { font-size: 1.35rem; font-weight: 800; margin-top: 4px; color: var(--primary-dark); }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); -webkit-overflow-scrolling: touch; max-width: 100%; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
.portal table.data { min-width: 520px; }
table.data th, table.data td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; }
table.data th { background: var(--surface); color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.status-pill {
  display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700;
  background: var(--primary-light); color: var(--primary-dark);
}
.status-pill.delivered { background: #e6f4ea; color: var(--success); }
.status-pill.cancelled, .status-pill.failed { background: #fce8e6; color: var(--danger); }

.footer {
  border-top: 1px solid var(--border); padding: 12px 12px calc(76px + env(safe-area-inset-bottom, 0px)); background: var(--surface);
  color: var(--muted); font-size: .78rem; overflow-x: hidden;
}
@media (min-width: 992px) { .footer { padding-bottom: 16px; } }
.footer-inner {
  max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap;
  align-items: flex-end; justify-content: space-between; gap: 14px 24px;
}
.footer-brand { flex: 1 1 240px; min-width: 0; }
.footer-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.footer-kicker {
  margin: 0; font-size: .66rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: #7b8ba3;
}
.footer-line { margin: 6px 0 0; color: var(--text); font-weight: 800; font-size: .92rem; letter-spacing: -.02em; line-height: 1.35; }
.footer-line em { font-style: normal; color: var(--primary-dark); }
.footer-note { margin: 4px 0 0; max-width: 36ch; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.pay-icons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.pay-ico {
  width: 52px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text);
}
.pay-ico i, .pay-glyph {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  color: #fff; font-size: .95rem; font-style: normal; font-weight: 800;
  box-shadow: 0 6px 12px rgba(16, 56, 120, .12);
}
.pay-ico em { font-style: normal; font-size: .6rem; font-weight: 800; color: #5c6b80; }
.pay-ico.gpay i { background: linear-gradient(145deg, #4285f4, #34a853); }
.pay-ico.paytm i { background: linear-gradient(145deg, #00baf2, #002970); }
.pay-ico.phonepe i { background: linear-gradient(145deg, #7b3ff2, #5f259f); }
.pay-ico.bhim i { background: linear-gradient(145deg, #f47920, #0b4aa8); }
.pay-ico.upi i { background: linear-gradient(145deg, #128C7E, #0b4aa8); }
.pay-ico.crypto i { background: linear-gradient(145deg, #f7931a, #c56a00); }
.footer-portals { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.footer-portal {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; font-size: .74rem; font-weight: 800;
  color: #fff; background: linear-gradient(135deg, #1a73e8, #0b4aa8);
  box-shadow: 0 6px 14px rgba(26, 115, 232, .22);
}
.footer-portal:hover { color: #fff; filter: brightness(1.05); }
.footer-applies { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.footer-apply {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; font-size: .62rem; font-weight: 700;
  color: #3d5270; background: #eef3fa; border: 1px solid #d5e2f2;
}
.footer-apply:hover { color: #0b4aa8; border-color: #b9d0ea; }
@media (max-width: 720px) {
  .footer-side, .pay-icons, .footer-portals, .footer-applies { align-items: flex-start; justify-content: flex-start; }
}
.pay-rail { max-width: 1100px; margin: 16px auto 0; min-width: 0; }
.pay-marquee {
  overflow: hidden; margin: 10px -12px; padding: 2px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.pay-marquee-track { display: flex; width: max-content; animation: payMarquee 36s linear infinite; }
.pay-marquee:hover .pay-marquee-track { animation-play-state: paused; }
.pay-marquee-set { display: flex; align-items: flex-start; gap: 18px; padding-right: 18px; }
.pay-app { width: 112px; flex: 0 0 112px; display: flex; align-items: center; justify-content: center; }
.pay-app-mark {
  width: 112px; height: 72px; border-radius: 14px; overflow: hidden;
  background: #fff; border: 1px solid #e6eef8;
  display: flex; align-items: center; justify-content: center;
  padding: 8px;
}
.pay-app-mark img {
  display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  min-width: 0; min-height: 0; flex: 0 1 auto;
  object-fit: contain; object-position: center;
}
@keyframes payMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .pay-marquee-track { animation: none; width: auto; }
  .pay-marquee { overflow: visible; width: 100%; margin-left: 0; margin-right: 0; mask-image: none; -webkit-mask-image: none; }
  .pay-marquee-set[aria-hidden="true"] { display: none; }
  .pay-marquee-set { flex-wrap: wrap; }
}
.upi-chip, .p-badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px;
  padding: 0 7px 0 3px; border-radius: 999px; background: #fff;
  border: 1px solid var(--border); color: var(--text); font-size: .66rem; font-weight: 800;
}
.upi-mark {
  width: 16px; height: 16px; border-radius: 5px; display: grid; place-items: center;
  color: #fff; font-style: normal; font-size: .62rem; line-height: 1;
}
.upi-mark.gpay { background: linear-gradient(135deg, #4285f4, #34a853); }
.upi-mark.phonepe { background: #5f259f; font-size: .55rem; }
.upi-mark.paytm { background: #00baf2; }
.upi-mark.bhim { background: linear-gradient(135deg, #f47920, #0b4aa8); }
.p-badge { padding: 0 8px; color: #0b4aa8; background: #eef5ff; border-color: #d3e3f6; }
.p-badge i { font-size: .68rem; }
.p-badge.fresh { color: #0a6b3c; background: #e8f8ee; border-color: #c8ecd4; }
.p-badge.secure { color: #7a4b00; background: #fff6e5; border-color: #f3e0b0; }
@media (max-width: 720px) { .footer-trust { justify-content: flex-start; } }
.alert {
  padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; font-size: .9rem;
}
.alert-success { background: #e6f4ea; color: #0b7a40; }
.alert-error { background: #fce8e6; color: #a50e0e; }
.empty {
  text-align: center; padding: 48px 16px; color: var(--muted);
}
.suggest-box {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); display: none; z-index: 80; max-height: 320px; overflow: auto;
}
.suggest-box.show { display: block; }
.suggest-box a {
  display: flex; gap: 10px; align-items: center; padding: 10px 12px; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.suggest-box a:hover { background: var(--surface); }
.suggest-box img { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; background: var(--surface); }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  position: relative; padding: 0 0 18px 22px; border-left: 2px solid var(--border);
}
.timeline li::before {
  content: ''; width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary); position: absolute; left: -6px; top: 4px;
}
.timeline li:last-child { border-left-color: transparent; }


/* Modal */
.modal-backdrop[hidden] { display: none !important; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(11, 31, 51, .45);
  display: grid; align-items: end;
}
@media (min-width: 768px) { .modal-backdrop { align-items: center; justify-content: center; } }
.modal-sheet {
  background: #fff; border-radius: 20px 20px 0 0; padding: 18px 16px 24px;
  width: 100%; max-width: 440px; box-shadow: var(--shadow);
  animation: slideUp .22s ease;
}
@media (min-width: 768px) { .modal-sheet { border-radius: var(--radius); } }
@keyframes slideUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-head h2 { margin: 0; font-size: 1.1rem; }
.area-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 8px 12px; cursor: pointer; font-size: .82rem; display: inline-flex; flex-direction: column; align-items: flex-start;
}
.chip small { color: var(--muted); font-size: .7rem; }
.chip:hover { border-color: var(--primary); background: var(--primary-light); }
.option-row {
  display: grid; grid-template-columns: 1.2fr .7fr .7fr .7fr .6fr auto;
  gap: 6px; margin-bottom: 6px; align-items: center;
}
@media (max-width: 700px) {
  .option-row { grid-template-columns: 1fr 1fr; }
}
.option-picks { display: grid; gap: 8px; margin: 4px 0 12px; }
.option-pick {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 8px;
  text-align: left; border: 1px solid var(--border); background: #fff;
  border-radius: 12px; padding: 8px 10px; cursor: pointer;
}
.option-pick small { grid-column: 1 / -1; color: var(--muted); font-size: .72rem; }
.option-pick s { color: var(--muted); font-weight: 500; margin-left: 4px; }
.option-pick.is-on { border-color: var(--primary); background: var(--primary-light); }
.option-pick:disabled { opacity: .5; cursor: not-allowed; }
.option-qty { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-weight: 700; }

/* Live tracking */
.track-page { max-width: 880px; margin: 0 auto; }
.track-form { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .track-form { grid-template-columns: 1.2fr 1fr auto; } }
.track-hero {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  align-items: flex-start; margin-top: 12px;
}
.track-eta { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; color: var(--primary-dark); }
.track-meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.track-dest { margin: 8px 0 0; color: var(--muted); font-size: .9rem; }
.partner-chip {
  display: flex; gap: 10px; align-items: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; min-width: 180px;
}
.partner-chip.muted { color: var(--muted); font-size: .88rem; }
.partner-avatar {
  width: 40px; height: 40px; border-radius: 12px; background: var(--primary-light);
  color: var(--primary-dark); display: grid; place-items: center;
}
.track-steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; margin-top: 12px;
}
.track-step {
  display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); font-weight: 600;
}
.track-step .dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--border); flex-shrink: 0;
}
.track-step.done { color: var(--success); }
.track-step.done .dot { background: var(--success); }
.track-step.current { color: var(--primary-dark); }
.track-step.current .dot { background: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.track-step.skipped { color: var(--muted); opacity: .55; }
.track-step.skipped .dot { background: #d0d5dd; }
.track-step.upcoming { color: var(--muted); }
.track-map-wrap { margin-top: 12px; padding: 0; overflow: hidden; position: relative; z-index: 1; }
.track-map, .pin-map, .order-map { width: 100%; background: #e7eef6; border-radius: 14px; overflow: hidden; }
.track-map { height: min(52vh, 440px); min-height: 280px; }
.pin-map { height: 240px; margin: 8px 0; border: 1px solid var(--border); }
.order-map { height: 190px; margin-top: 8px; border: 1px solid var(--border); }
.pin-caption { margin: 0 0 8px; color: var(--muted); font-size: .78rem; }
.tk-marker { background: transparent; border: 0; }
.tk-drop { position: relative; width: 36px; height: 46px; }
.tk-drop-head {
  width: 32px; height: 32px; border-radius: 50%; color: #fff;
  display: grid; place-items: center; border: 2px solid #fff;
  box-shadow: 0 8px 16px rgba(16, 56, 120, .28);
}
.tk-drop-head i { font-size: 13px; }
.tk-drop::after {
  content: ''; position: absolute; left: 11px; top: 26px;
  border: 7px solid transparent;
}
.tk-pin-home .tk-drop-head { background: #0d47a1; }
.tk-pin-home::after { border-top-color: #0d47a1; }
.tk-pin-shop .tk-drop-head { background: #0d9b56; }
.tk-pin-shop::after { border-top-color: #0d9b56; }
.tk-rider {
  width: 42px; height: 42px; border-radius: 50%; background: #1a73e8; color: #fff;
  display: grid; place-items: center; border: 3px solid #fff;
  box-shadow: 0 8px 18px rgba(26, 115, 232, .4); position: relative;
}
.tk-rider i { font-size: 16px; position: relative; z-index: 1; }
.tk-pulse {
  position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid rgba(26, 115, 232, .45);
  animation: tkPulse 1.6s ease-out infinite;
}
.tk-here-pin, .tk-here { pointer-events: none !important; }
.tk-here { width: 18px; height: 18px; }
.tk-here-dot {
  width: 14px; height: 14px; border-radius: 50%; display: block;
  background: #1a73e8; border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(16, 56, 120, .45);
}
.map-locate { color: #1a73e8; }
@keyframes tkPulse {
  from { transform: scale(.7); opacity: .8; }
  to { transform: scale(1.25); opacity: 0; }
}
.map-recenter {
  width: 34px; height: 34px; border-radius: 10px; border: 0; background: #fff;
  box-shadow: 0 4px 12px rgba(16, 56, 120, .2); color: #0b4aa8; cursor: pointer;
}
.leaflet-container { font-family: inherit; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .tk-pulse { animation: none; } }
.map-hint { margin: 0; padding: 8px 12px; font-size: .8rem; color: var(--muted); }

/* Compact date filter + ops panels */
.date-filter {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 8px 10px; margin-bottom: 12px;
}
.date-filter-presets { display: flex; gap: 4px; flex-wrap: wrap; }
.df-chip {
  padding: 5px 10px; border-radius: 8px; font-size: .75rem; font-weight: 700;
  color: var(--muted); background: var(--surface); border: 1px solid transparent;
}
.df-chip.active, .df-chip:hover { background: var(--primary-light); color: var(--primary-dark); border-color: #c5d8f8; }
.date-filter-custom { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.date-filter-custom input[type=date] {
  border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; font-size: .78rem; background: #fff;
}
.df-sep { color: var(--muted); font-size: .8rem; }
.df-label { margin-left: auto; font-size: .75rem; color: var(--muted); font-weight: 600; }
.stat-grid.compact { gap: 8px; }
.stat-card.compact { padding: 10px 12px; border-radius: 12px; }
.stat-card.compact .label { font-size: .72rem; }
.stat-card.compact .value { font-size: clamp(.82rem, 3.1vw, 1.1rem); margin-top: 2px; line-height: 1.2; }
.panel.compact { padding: 12px 14px; }
.panel.compact h3 { margin: 0 0 10px; font-size: .95rem; }
.shop-toggle {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  border-radius: 12px; border: 1px solid var(--border); background: #fff; font-weight: 700; font-size: .85rem;
}
.shop-toggle.open { background: #e6f4ea; color: var(--success); border-color: #b7e1c4; }
.shop-toggle.closed { background: #fce8e6; color: var(--danger); border-color: #f5c2bd; }
.hours-grid { display: grid; gap: 6px; }
.hours-row {
  display: grid; grid-template-columns: 64px 1fr 1fr auto; gap: 6px; align-items: center; font-size: .82rem;
}
.inline-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.doc-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.selfie-preview { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.qr-preview { max-width: 140px; border-radius: 10px; border: 1px solid var(--border); }
.toolbar-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.status-pill.pending { background: #fff8e1; color: #b06000; }
.status-pill.paid, .status-pill.active { background: #e6f4ea; color: var(--success); }
.status-pill.rejected, .status-pill.hold, .status-pill.blocked, .status-pill.suspended { background: #fce8e6; color: var(--danger); }
.status-pill.open { background: #e6f4ea; color: var(--success); }
.status-pill.closed { background: #fce8e6; color: var(--danger); }
table.data.compact th, table.data.compact td { padding: 8px 10px; font-size: .82rem; }
.perm-grid { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 4px; }
.perm-item {
  display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff; font-size: .82rem;
}
.perm-item small { display: block; color: var(--muted); font-size: .72rem; font-weight: 600; }
@media (min-width: 700px) { .perm-grid { grid-template-columns: 1fr 1fr; } }
.form-grid-2 { display: grid; gap: 10px; }
@media (min-width: 700px) { .form-grid-2 { grid-template-columns: 1fr 1fr; } }

.addr-pick {
  display: block; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; margin-bottom: 10px; cursor: pointer; background: #fff;
}
.addr-pick:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.muted { color: var(--muted); font-size: .9rem; }
.pay-grid { display: grid; gap: 8px; }
@media (min-width: 640px) { .pay-grid { grid-template-columns: 1fr 1fr; } }
.pay-card {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer;
}
.pay-card:has(input:checked) { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 0 0 2px #d7e6fb; }
.pay-card.is-off { opacity: .55; cursor: not-allowed; }
.pay-card input { margin-top: 4px; }
.pay-icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--surface); color: var(--primary-dark); flex-shrink: 0;
}
.pay-copy { display: flex; flex-direction: column; gap: 2px; font-size: .86rem; }
.pay-copy strong { font-size: .9rem; }
.pay-copy small { color: var(--muted); font-size: .75rem; }
.pay-badge {
  display: inline-block; font-style: normal; font-size: .62rem; font-weight: 800;
  letter-spacing: .04em; color: #fff; background: var(--primary); border-radius: 6px;
  padding: 1px 5px; width: fit-content;
}
.pay-amt { text-align: center; margin-bottom: 14px; }
.pay-amt span { display: block; color: var(--muted); font-size: .8rem; }
.pay-amt strong { font-size: 1.8rem; color: var(--primary-dark); }
.pay-amt small { display: block; color: var(--muted); font-size: .75rem; }
.pay-qr-wrap { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.pay-qr { width: 180px; height: 180px; border-radius: 12px; border: 1px solid var(--border); background: #fff; }
.copy-row code { font-size: .85rem; background: var(--surface); padding: 4px 8px; border-radius: 8px; }
.pay-manual { font-size: .88rem; }
.pay-box { min-height: 240px; }

/* Compact looping logo */
.brand-live {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--primary-dark); font-weight: 800; letter-spacing: -.03em;
  font-size: .98rem; line-height: 1; min-width: 0;
}
.brand-live:hover { color: var(--primary-dark); }
.logo-orb {
  width: 28px; height: 28px; position: relative; flex-shrink: 0;
}
.logo-orb img {
  width: 28px; height: 28px; border-radius: 8px; object-fit: cover;
  background: #fff; display: block;
}
.logo-ring {
  position: absolute; inset: -3px; border-radius: 11px;
  border: 2px solid #1a73e8;
  animation: logoHue 5.5s ease-in-out infinite;
  pointer-events: none;
}
.logo-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-name span { color: var(--primary); }
.brand-live.is-compact { font-size: .92rem; gap: 6px; }
.brand-live.is-compact .logo-name { max-width: 148px; }
@keyframes logoHue {
  0%, 100% { border-color: #1a73e8; box-shadow: 0 0 0 0 rgba(26, 115, 232, 0.15); }
  50% { border-color: #7aa2ff; box-shadow: 0 0 0 3px rgba(122, 162, 255, 0.28); }
}
@media (prefers-reduced-motion: reduce) {
  .logo-ring { animation: none; }
}

.app-frame { display: block; min-height: 100vh; }
.site-side {
  width: min(280px, 86vw); position: fixed; left: 0; top: 0;
  height: 100vh; height: 100dvh;
  transform: translateX(-110%);
  transition: transform .22s ease;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  display: flex; flex-direction: column; gap: 14px;
  z-index: 85; overflow: auto;
  visibility: hidden; pointer-events: none;
}
.site-side.open {
  transform: none; visibility: visible; pointer-events: auto;
  box-shadow: 0 12px 32px rgba(11, 31, 51, 0.16);
}
.side-brand { padding: 2px 6px 8px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.site-side .side-close { display: grid; flex-shrink: 0; }
.apk-download { font-weight: 800; }
.apk-icon {
  display: inline-grid; place-items: center; min-width: 28px; height: 18px; padding: 0 5px;
  border-radius: 5px; background: #0b4aa8; color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .04em;
}
.side-nav { display: flex; flex-direction: column; gap: 6px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 12px; color: var(--text); font-size: .88rem; font-weight: 600;
  border: 1px solid var(--border); background: #fff;
}
.side-nav a i { width: 16px; text-align: center; color: var(--primary); }
.side-nav a:hover { border-color: #9ec1f5; background: #f7faff; color: var(--primary-dark); }
.side-nav a.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.side-social {
  padding: 10px; border: 1px solid #d5e4f7; border-radius: 16px;
  background: linear-gradient(180deg, #f7fbff, #fff);
}
.side-wa {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #128C7E; color: #fff; border-radius: 12px;
  padding: 9px 10px; font-weight: 800; font-size: .82rem;
}
.side-wa:hover { color: #fff; }
.side-social-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.side-wa + .side-social-row { margin-top: 8px; }
.side-social-row a {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  background: #fff; border: 1px solid #d5e4f7; color: #0b4aa8; font-size: 1rem;
}
.side-social-row a:hover { background: #eef5ff; color: #0b4aa8; }
.side-apps { display: flex; flex-direction: column; gap: 8px; }
.side-apps .btn { display: flex; align-items: center; justify-content: center; gap: 6px; }
.side-apps .btn[hidden] { display: none !important; }
.side-brand .brand-live { min-width: 0; }
.side-brand .logo-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-install-hint { margin: 0; font-size: .75rem; color: var(--muted); }
body.portal .side-toggle { display: none; }
body.storefront .side-toggle { display: grid; }
.side-backdrop {
  position: fixed; inset: 0; background: rgba(11, 31, 51, .38); z-index: 80;
}
.side-backdrop[hidden] { display: none !important; }
body.portal-side-open { overflow: hidden; }
.app-shell { flex: 1; min-width: 0; }
.side-kicker { margin: -8px 8px 12px; color: rgba(255,255,255,.55); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.admin-side .side-close { display: none; }
.admin-side .brand-live, .admin-side .logo-name { color: #fff; }
.admin-side .logo-orb img { background: #0b1f33; }
.brand-preview { margin-bottom: 12px; }
.account-grid { display: grid; grid-template-columns: 200px 1fr; gap: 16px; }

@media (min-width: 992px) {
  .header-inner { padding-left: 18px; }
}
@media (max-width: 991px) {
  .side-toggle, body.portal .side-toggle { display: grid; }
  .side-close { display: grid; position: relative; z-index: 2; flex-shrink: 0; }
  .admin-side .side-close {
    display: grid;
    position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 10px;
    background: #fff; color: #0b1f33;
  }
  .site-side {
    position: fixed; left: 0; top: 0; transform: translateX(-105%);
    transition: transform .22s ease; box-shadow: 0 12px 32px rgba(11, 31, 51, 0.16);
    z-index: 85; height: 100vh; height: 100dvh; background: #fff;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .site-side .side-brand { position: sticky; top: 0; z-index: 3; background: #fff; }
  .site-side.open { transform: none; }
  body.portal-side-open { overflow: hidden; }
  .side-backdrop {
    position: fixed; inset: 0; background: rgba(11,31,51,.28); z-index: 65;
  }
  .account-grid { grid-template-columns: 1fr; }
  .header-inner { gap: 8px; padding: 6px 10px; }
  .search-wrap input { padding-top: 8px; padding-bottom: 8px; }
}
@media (max-width: 767px) {
  .header-actions .btn { padding: 6px 10px; }
}
.stat-grid.compact { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .stat-grid.compact { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .stat-grid.compact { grid-template-columns: repeat(4, 1fr); } }

.ring-banner {
  position: fixed; z-index: 90; left: 12px; right: 12px; bottom: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #0d47a1; color: #fff; border-radius: 14px; padding: 10px 12px;
  box-shadow: 0 10px 28px rgba(13, 71, 161, .28);
}
.ring-banner p { margin: 0; font-size: .84rem; line-height: 1.35; }
.ring-banner strong { font-size: .92rem; }
.ring-banner .ring-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ring-banner a, .ring-banner button {
  border: 0; border-radius: 9px; padding: 7px 10px; font-weight: 700; font-size: .78rem; cursor: pointer;
}
.ring-banner a { background: #fff; color: #0d47a1; }
.ring-banner button { background: rgba(255,255,255,.16); color: #fff; }

/* Portal mobile chrome — admin / retailer / rider */
.bottom-nav button {
  appearance: none; background: none; border: 0; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0; min-width: 0; color: var(--muted); font: inherit; font-size: .58rem; font-weight: 600;
  padding: 2px 0 0; border-radius: 16px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.bottom-nav button i {
  width: 36px; height: 20px; display: grid; place-items: center;
  border-radius: 13px; font-size: .92rem;
}
.bottom-nav button.active,
.bottom-nav button.is-open { color: var(--primary-dark); }
.bottom-nav button.active i,
.bottom-nav button.is-open i { background: var(--primary-light); color: var(--primary); }
.portal-nav-3 { grid-template-columns: repeat(3, 1fr); width: min(360px, calc(100% - 16px)); }
.portal-nav-4 { grid-template-columns: repeat(4, 1fr); width: min(420px, calc(100% - 16px)); }
body.portal .bottom-nav a,
body.portal .bottom-nav button { min-height: 46px; }
body.portal-auth {
  min-height: 100vh; min-height: 100dvh;
  padding: 16px 14px calc(20px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
}
body.portal-auth .form-card {
  margin: max(20px, 8vh) auto 0;
  width: min(440px, 100%);
  position: relative; z-index: 2;
}

@media (max-width: 991px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side {
    position: fixed; left: 0; top: 0; z-index: 70;
    width: min(280px, 86vw); height: 100vh; height: 100dvh;
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 0 12px 32px rgba(11, 31, 51, 0.2);
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    padding-right: 52px;
  }
  .admin-side:not(.open) { visibility: hidden; pointer-events: none; }
  .admin-side.open { transform: none; visibility: visible; pointer-events: auto; }
  .admin-top {
    position: sticky; top: 0; z-index: 40;
    padding: 10px 12px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
  }
  .admin-content {
    padding: 12px 10px calc(92px + env(safe-area-inset-bottom, 0px));
  }
  .portal .form-control,
  .portal select,
  .portal input,
  .portal textarea,
  .portal-auth .form-control,
  .portal-auth select,
  .portal-auth input,
  .portal-auth textarea {
    font-size: 16px;
  }
  .portal .btn { min-height: 40px; }
  .portal .btn-sm { min-height: 36px; }
  .portal .panel { max-width: 100%; }
  .portal .form-card, .portal .panel[style*="max-width"] { max-width: 100% !important; }
  .portal .date-filter { flex-direction: column; align-items: stretch; }
  .portal .date-filter-custom { width: 100%; }
  .portal .date-filter-custom input[type=date] { flex: 1; min-width: 0; }
  .portal .df-label { margin-left: 0; }
  .hours-row { grid-template-columns: 42px 1fr 1fr; }
  .hours-row label { grid-column: 2 / -1; }
  .option-row { grid-template-columns: 1fr 1fr; }
  .toolbar-row { align-items: stretch; }
  .toolbar-row > * { min-width: 0; }
  .cell-form { flex-wrap: wrap; }
  .cell-form .form-control { min-width: 0; flex: 1 1 140px; }
  .portal .ring-banner { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .banner-row { flex-wrap: wrap; }
  .portal-rider .track-map { height: min(52vh, 360px); min-height: 220px; }
  .portal-rider #share-gps { scroll-margin-top: 76px; }
  .portal-rider .job-actions,
  .portal-rider .job-actions form,
  .portal-rider .job-actions .inline-actions {
    flex-direction: column; align-items: stretch; width: 100%;
  }
  .portal-rider .job-actions .form-control,
  .portal-rider .job-actions .btn,
  .portal-rider .job-actions select { width: 100%; max-width: none !important; }
  body.portal-auth { padding: 10px 10px calc(14px + env(safe-area-inset-bottom, 0px)); }
  body.portal-auth .form-card { margin-top: 8px; width: 100%; }
}

@media (max-width: 480px) {
  .option-row { grid-template-columns: 1fr; }
  .admin-top-meta, .admin-top-user { max-width: 42%; font-size: .72rem; }
  .dep-actions { flex-direction: column; align-items: stretch; }
  .dep-actions .btn { width: 100%; }
  .portal table.data { min-width: 480px; }
}

/* Public storefront detailing */
.promise-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin: 2px 0 12px;
}
.promise-item {
  display: flex; align-items: flex-start; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 9px 10px; min-width: 0;
}
.promise-item i {
  width: 28px; height: 28px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; font-size: .78rem; color: #fff;
  background: linear-gradient(145deg, #2f86f3, #0b4aa8);
}
.promise-item:nth-child(2) i { background: linear-gradient(145deg, #34d399, #047857); }
.promise-item:nth-child(3) i { background: linear-gradient(145deg, #7c5cfc, #4c1d95); }
.promise-item:nth-child(4) i { background: linear-gradient(145deg, #ff8a65, #c2410c); }
.promise-item strong { display: block; font-size: .74rem; line-height: 1.2; color: var(--primary-dark); }
.promise-item span { display: block; font-size: .66rem; color: var(--muted); line-height: 1.25; }
@media (min-width: 768px) { .promise-row { grid-template-columns: repeat(4, 1fr); } }

.banner-kicker {
  display: inline-block; font-size: .62rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; opacity: .9; margin-bottom: 4px;
}
.banner-card-alt { background: linear-gradient(135deg, #0d47a1, #1a73e8); }
.banner-card { color: #fff; text-decoration: none; }
.banner-card:hover { color: #fff; }

.how-grid { display: grid; gap: 8px; grid-template-columns: 1fr; }
.how-step {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 12px 12px 14px;
}
.how-num {
  display: inline-grid; place-items: center; width: 22px; height: 22px;
  border-radius: 7px; background: var(--primary-light); color: var(--primary-dark);
  font-size: .72rem; font-weight: 800; margin-bottom: 6px;
}
.how-step strong { display: block; font-size: .86rem; }
.how-step p { margin: 3px 0 0; font-size: .76rem; color: var(--muted); }
@media (min-width: 700px) { .how-grid { grid-template-columns: repeat(3, 1fr); } }

.trust-band {
  display: grid; gap: 12px; margin: 8px 0 16px;
  background: linear-gradient(135deg, #eef5ff, #fff8f3);
  border: 1px solid #dce8f6; border-radius: 16px; padding: 14px;
}
.trust-copy h2 { margin: 0 0 4px; font-size: .98rem; color: var(--primary-dark); }
.trust-copy p { margin: 0; font-size: .8rem; color: var(--muted); }
.trust-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.trust-list li { font-size: .8rem; font-weight: 600; display: flex; gap: 8px; align-items: flex-start; }
.trust-list i { color: var(--primary); margin-top: 2px; }
@media (min-width: 768px) { .trust-band { grid-template-columns: 1fr 1.1fr; align-items: center; } }

.empty-hero i { font-size: 1.6rem; color: var(--primary); margin-bottom: 8px; display: block; }
.empty-hero h2 { margin: 0 0 6px; font-size: 1.05rem; color: var(--primary-dark); }
.empty-hero p { margin: 0 0 12px; }
.empty-hero .btn { margin-top: 4px; }

.page-lead { margin-bottom: 12px; }
.page-lead h1 { margin: 0 0 4px; }
.page-lead p { margin: 0; color: var(--muted); font-size: .86rem; }
.result-meta { margin: 0 0 10px; color: var(--muted); font-size: .8rem; font-weight: 600; }
.filter-bar {
  display: grid; gap: 10px; grid-template-columns: 1fr;
  margin-bottom: 16px;
}
.filter-check { display: flex; align-items: center; gap: 6px; font-size: .86rem; }
@media (min-width: 640px) {
  .filter-bar { grid-template-columns: repeat(2, 1fr) auto auto; align-items: center; }
}

.product-card .thumb { position: relative; }
.prod-badge {
  position: absolute; left: 6px; top: 6px; z-index: 1;
  background: #fff1ea; color: #c2410c; font-size: .62rem; font-weight: 800;
  padding: 2px 6px; border-radius: 999px;
}
.prod-oos {
  position: absolute; inset: auto 6px 6px 6px;
  background: rgba(16, 32, 51, .72); color: #fff; font-size: .62rem; font-weight: 800;
  text-align: center; border-radius: 8px; padding: 3px 6px;
}
.prod-unit { font-size: .68rem; color: var(--muted); font-weight: 600; }
.product-card.is-oos { opacity: .72; }
.product-card .btn-add:disabled { opacity: .55; cursor: not-allowed; }

.gallery { position: relative; }
.product-buy .product-kicker { color: var(--muted); margin: 0 0 6px; font-size: .82rem; font-weight: 700; }
.product-buy h1 { margin: 0 0 8px; letter-spacing: -.02em; font-size: 1.28rem; }
.product-rating { margin: 0 0 8px; font-weight: 700; color: #b06000; }
.product-rating i { color: var(--warning); }
.product-rating span { color: var(--muted); font-weight: 600; font-size: .85rem; }
.product-price { margin: 10px 0; font-size: 1.2rem; }
.product-meta { color: var(--muted); margin: 0; }
.product-meta .in-stock { color: var(--success); font-weight: 700; }
.product-meta .out-stock { color: var(--danger); font-weight: 700; }
.product-opt-hint { margin: 10px 0 0; }
.product-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.product-promises {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px;
}
.product-promises span {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 10px; font-size: .72rem; font-weight: 700; color: var(--primary-dark);
}
.product-copy { margin-top: 20px; }
.product-copy h3 { margin-top: 0; }
.spec-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.spec-list li { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; border-bottom: 1px dashed var(--border); padding-bottom: 6px; }
.spec-list strong { color: var(--muted); font-weight: 600; }

.coupon-row { margin: 14px 0; display: flex; gap: 8px; }
.coupon-row .form-control { min-width: 0; flex: 1; }
.bill-note { margin: 10px 0 0; font-size: .74rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.bill-note i { color: var(--primary); }

.order-list { padding: 4px 12px; }
.order-row {
  display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 14px 0; border-bottom: 1px solid var(--border); color: inherit;
}
.order-row-main {
  flex: 1; min-width: 0; display: flex; justify-content: space-between; gap: 12px; align-items: center; color: inherit;
}
.order-row > .btn { flex-shrink: 0; }
.order-row:last-child { border-bottom: 0; }
.order-row-end { text-align: right; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 700; margin-bottom: 6px; }

.account-nav { display: flex; flex-direction: column; gap: 6px; }
.account-nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 11px; color: var(--text); font-weight: 600; font-size: .88rem;
  border: 1px solid transparent;
}
.account-nav a i { width: 16px; text-align: center; color: var(--primary); }
.account-nav a.active { background: var(--primary-light); color: var(--primary-dark); border-color: #c5d8f8; }
.account-nav-meta { margin-left: auto; font-size: .72rem; color: var(--muted); }
.account-nav form { margin-top: 8px; }

.footer-blurb { margin: 6px 0 8px; max-width: 36ch; line-height: 1.4; }
.footer-support { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 0 0 8px; }
.footer-support a { color: var(--text); font-weight: 700; font-size: .8rem; }
.footer-copy {
  max-width: 1200px; margin: 2px auto 0; padding-top: 0;
  border-top: 0; font-size: .72rem; color: var(--muted);
}
.footer-legal {
  max-width: 1200px; margin: 6px auto 0; display: flex; flex-wrap: wrap; gap: 8px 12px;
}
.footer-legal a, .footer-legal button {
  border: 0; background: none; padding: 0; color: var(--muted); font: inherit; font-size: .75rem; font-weight: 700; cursor: pointer;
}
.footer-legal a:hover, .footer-legal button:hover { color: var(--primary-dark); }
.legal-page { max-width: 820px; margin: 0 auto; }
.legal-hero {
  margin: 0 0 14px; padding: 22px 20px 18px; border-radius: 22px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(255, 243, 236, .95), transparent 55%),
    linear-gradient(145deg, #f8fbff 0%, #e7f1ff 62%, #fff 100%);
  border: 1px solid #d5e4f7;
  box-shadow: 0 12px 28px rgba(16, 56, 120, .08);
}
.legal-kicker {
  margin: 0 0 6px; font-size: .68rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: #0b4aa8;
}
.legal-page h1 { margin: 0 0 8px; font-size: 1.7rem; letter-spacing: -.03em; color: #102033; }
.legal-lead { margin: 0 0 10px; max-width: 62ch; color: #24364d; font-size: .98rem; line-height: 1.55; }
.legal-updated { margin: 0; color: var(--muted); font-size: .78rem; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.legal-nav a {
  border: 1px solid #d5e4f7; border-radius: 999px; padding: 7px 12px;
  font-size: .75rem; font-weight: 800; color: #24364d; background: #fff;
}
.legal-nav a.is-on {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #1a73e8, #0b4aa8);
  box-shadow: 0 6px 14px rgba(26, 115, 232, .22);
}
.legal-body { display: grid; gap: 10px; }
.legal-section {
  display: grid; grid-template-columns: auto 1fr; gap: 12px;
  margin: 0; padding: 16px; border-radius: 18px; background: #fff;
  border: 1px solid #e3eef8; box-shadow: 0 8px 18px rgba(16, 56, 120, .05);
}
.legal-index {
  margin: 2px 0 0; width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center; font-size: .72rem; font-weight: 800;
  color: #0b4aa8; background: #e8f2ff;
}
.legal-section h2 { margin: 0 0 6px; font-size: 1.02rem; letter-spacing: -.02em; }
.legal-section p { margin: 0 0 8px; line-height: 1.6; color: #24364d; font-size: .92rem; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-contact {
  margin-top: 14px; padding: 18px; border-radius: 18px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px;
  background: #102033; color: #e7eef8;
}
.legal-contact h2 { margin: 0 0 6px; color: #fff; font-size: 1.05rem; }
.legal-contact p { margin: 0; max-width: 52ch; color: #c5d4e8; line-height: 1.55; font-size: .9rem; }
.legal-contact .legal-kicker { color: #9ec5ff; }
.legal-contact-links { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.legal-contact-links a {
  color: #fff; font-weight: 800; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 8px 12px;
}
@media (max-width: 640px) {
  .legal-page h1 { font-size: 1.4rem; }
  .legal-section { grid-template-columns: 1fr; gap: 8px; }
}
.cookie-bar {
  position: fixed; z-index: 90; left: 12px; right: 12px;
  bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  background: #fff; border: 1px solid #d5e4f7; border-radius: 14px;
  box-shadow: 0 10px 28px rgba(16, 56, 120, .16); padding: 12px;
}
.cookie-bar[hidden] { display: none; }
.cookie-bar p { margin: 0 0 10px; font-size: .8rem; line-height: 1.4; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cookie-actions a { font-size: .75rem; font-weight: 700; margin-right: auto; }
@media (min-width: 992px) {
  .cookie-bar { left: auto; right: 20px; bottom: 20px; width: min(380px, calc(100vw - 280px)); }
}
.auth-trust { margin: 14px 0 0; text-align: center; font-size: .75rem; color: var(--muted); }
.auth-trust i { color: var(--success); margin-right: 4px; }

body.storefront.is-auth .header-inner { grid-template-columns: 1fr auto; }
body.storefront.is-auth .find-block { display: none !important; }
@media (max-width: 640px) {
  .coupon-row { flex-wrap: wrap; }
  .product-actions .btn { flex: 1 1 100%; min-width: 0; }
  .cart-item { grid-template-columns: 64px minmax(0, 1fr); }
  .cart-item > .btn { grid-column: 2; justify-self: start; }
}

.side-contact i { color: #128C7E; }
.photo-search {
  scroll-margin-top: 84px;
  margin: 0 0 12px; padding: 8px 10px 0;
  border: 1px solid #d5e4f7; border-radius: 14px;
  background:
    radial-gradient(120px 80px at 100% 0%, rgba(26,115,232,.16), transparent 70%),
    linear-gradient(180deg, #f7fbff, #fff);
}
.photo-search-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; }
.photo-search-copy { min-width: 0; }
.photo-search-copy strong { display: block; color: var(--primary-dark); font-size: .86rem; }
.photo-search-copy span { display: block; color: var(--muted); font-size: .72rem; }
.photo-search-wait { color: #8a5a00 !important; }
.photo-search-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.photo-search .photo-pick { padding: 4px 8px; font-size: .72rem; border-radius: 8px; gap: 4px; }
.photo-pick { position: relative; margin: 0; cursor: pointer; overflow: hidden; }
.photo-search .search-filters {
  margin: 8px -10px 0; padding: 8px 10px;
  border: 0; border-top: 1px solid #d5e4f7; border-radius: 0;
  box-shadow: none; background: rgba(255,255,255,.8); gap: 6px;
}
.photo-search .search-filters .form-control { padding: 5px 8px; font-size: .76rem; border-radius: 8px; }
.photo-search .search-filters .btn { padding: 8px 14px; font-size: .86rem; }
.photo-search .search-filters #photo-search-go { min-height: 36px; }
@media (max-width: 639px) {
  .photo-search .search-filters #photo-search-go,
  .photo-search .search-filters [type="submit"] { width: 100%; }
}
.photo-search .search-filters .filter-check { font-size: .76rem; }
.photo-file {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
  opacity: 0; cursor: pointer; font-size: 16px;
}
#photo-search-preview { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; border: 1px solid #d5e4f7; }
.photo-search-note { margin: 8px 0 0; font-size: .78rem; font-weight: 700; color: var(--primary-dark); }
#photo-search-results { margin-top: 12px; }
#photo-search-results[hidden],
#photo-search-preview[hidden],
.help-panel[hidden],
.photo-search-note[hidden] { display: none !important; }

.help-dock {
  position: fixed; left: 12px; bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  z-index: 70; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
}
.help-launch {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  color: #fff; font-size: 1.15rem; background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  box-shadow: 0 10px 24px rgba(11,74,168,.28);
}
.help-panel {
  width: min(340px, calc(100vw - 24px));
  max-height: min(420px, calc(100dvh - 150px));
  overflow: hidden;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid #d5e4f7; border-radius: 18px;
  box-shadow: 0 16px 40px rgba(13,71,161,.18); padding: 12px;
}
.help-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.help-head strong { color: var(--primary-dark); }
.help-head p { margin: 2px 0 0; color: var(--muted); font-size: .75rem; }
.help-wa {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  color: #0b7a45; font-size: .78rem; font-weight: 800;
}
.help-log {
  margin-top: 10px; flex: 1; min-height: 0; max-height: 240px; overflow: auto; display: flex; flex-direction: column; gap: 8px;
}
.help-bubble {
  max-width: 92%; padding: 8px 10px; border-radius: 14px; font-size: .82rem; line-height: 1.35; white-space: pre-wrap;
}
.help-bubble.is-bot { background: var(--primary-light); color: var(--primary-dark); border-bottom-left-radius: 4px; }
.help-bubble.is-me { align-self: flex-end; background: #102033; color: #fff; border-bottom-right-radius: 4px; }
.help-form { display: flex; gap: 8px; margin-top: 10px; flex-shrink: 0; }
.help-form .form-control { margin: 0; font-size: 16px; }
.help-form .btn { min-width: 44px; padding-left: 12px; padding-right: 12px; }
.help-dock.is-open { z-index: 90; }
.help-dock.is-pinned {
  position: fixed; top: 0; left: 0; right: auto; bottom: auto; margin: 0;
  z-index: 95; display: flex; flex-direction: column; justify-content: flex-end;
  align-items: stretch; gap: 0; max-width: none; padding: 0;
  transform-origin: 0 0; overscroll-behavior: none; pointer-events: none;
}
.help-dock.is-pinned .help-panel {
  width: 100%; max-width: none; height: auto; max-height: 100%; min-height: 0;
  border-radius: 18px 18px 0 0; margin: 0; pointer-events: auto;
}
.help-dock.is-pinned .help-launch { display: none; }
.help-dock.is-pinned .help-log {
  max-height: none; flex: 1 1 auto; min-height: 0;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
body.chat-open .bottom-nav { visibility: hidden; pointer-events: none; }
body.storefront.is-auth .help-dock { display: none; }
body.has-cookie .help-dock { bottom: calc(176px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 992px) {
  body.has-cookie .help-dock { bottom: 18px; }
}
@media (min-width: 992px) {
  .help-dock { left: 12px; bottom: 18px; }
}

.account-page { max-width: 640px; margin: 0 auto; min-width: 0; }
.account-page h1 { margin-top: 0; }
.account-logout { margin-top: 14px; }
.note-row { padding: 12px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.note-row .muted { margin-top: 4px; font-size: .9rem; }
.note-time { margin-top: 4px; font-size: .78rem; color: var(--muted); }

.wallet-hero {
  position: relative; overflow: hidden; border-radius: 18px;
  padding: 16px 16px 14px; margin-bottom: 12px; color: #fff;
  background:
    radial-gradient(140px 90px at 100% 0%, rgba(255,255,255,.28), transparent 70%),
    linear-gradient(145deg, #2b82f0 0%, #0b4aa8 58%, #072a5e 100%);
  box-shadow: 0 14px 28px rgba(11, 74, 168, .24);
}
.wallet-kicker { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: .84rem; }
.wallet-hero p { margin: 12px 0 0; font-size: .75rem; letter-spacing: .02em; opacity: .86; }
.wallet-hero strong { display: block; margin-top: 2px; font-size: clamp(1.7rem, 8vw, 2.15rem); letter-spacing: -.03em; line-height: 1.05; }
.wallet-add h2, .wallet-history h2 { margin: 0 0 10px; font-size: 1rem; }
.wallet-amt-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.wallet-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.wallet-chip {
  border: 1px solid var(--border); background: #fff; color: var(--primary-dark);
  border-radius: 999px; padding: 6px 10px; font-weight: 800; font-size: .78rem; cursor: pointer;
}
.wallet-chip.is-on { background: var(--primary); color: #fff; border-color: var(--primary); }
.wallet-add .btn-block { margin-top: 12px; }
.pay-grid-stack { grid-template-columns: 1fr; }
.wallet-list { display: flex; flex-direction: column; }
.wallet-tx {
  display: flex; justify-content: space-between; gap: 10px; align-items: flex-start;
  padding: 10px 0; border-top: 1px solid var(--border); min-width: 0;
}
.wallet-tx-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wallet-tx-main strong { font-size: .88rem; }
.wallet-tx-main span, .wallet-tx-side span { color: var(--muted); font-size: .72rem; }
.wallet-tx-main em { font-style: normal; color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.wallet-tx-side { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
.wallet-tx-side b { font-size: .92rem; }
.wallet-tx-side b.is-in { color: var(--success); }
.wallet-tx-side b.is-out { color: var(--danger); }
.wallet-tx-side a { font-size: .72rem; font-weight: 800; }

.pay-qr-card { width: min(100%, 280px); margin: 2px auto 14px; text-align: center; }
.pay-qr-brand { margin: 0 0 8px; font-weight: 800; color: #0b4aa8; letter-spacing: -.02em; font-size: .95rem; }
.pay-qr-frame {
  position: relative; width: 208px; max-width: 100%; height: 208px; margin: 0 auto;
  border-radius: 18px; background: #fff; border: 3px solid #1a73e8;
  box-shadow: 0 0 0 6px #e8f2ff, 0 10px 24px rgba(16, 56, 120, .1);
}
.pay-qr-live, .pay-qr-frame > .pay-qr {
  position: absolute; inset: 10px; width: auto; height: auto; margin: 0;
  display: grid; place-items: center;
}
.pay-qr-live img, .pay-qr-live canvas, .pay-qr-frame > .pay-qr {
  width: 188px; height: 188px; max-width: 100%; border: 0; border-radius: 8px;
}
.pay-qr[hidden] { display: none !important; }
.pay-qr-hint { margin: 10px 0 8px; color: var(--muted); font-size: .8rem; }
.pay-qr-lock { margin: 0 0 8px; color: #8a5a00; background: #fff8e1; border-radius: 10px; padding: 6px 8px; font-size: .72rem; font-weight: 700; line-height: 1.35; }
.checkout-page { display: flex; flex-direction: column; gap: 10px; }
.checkout-head h1 { margin: 0; font-size: 1.35rem; letter-spacing: -.03em; }
.checkout-head p { margin: 2px 0 0; color: var(--muted); font-size: .82rem; }
.checkout-premium { gap: 12px; }
.checkout-premium .panel { border-radius: 16px; padding: 12px 14px; box-shadow: 0 10px 28px rgba(11, 42, 94, .06); }
.checkout-premium h3 { margin: 0 0 8px; font-size: .92rem; }
.checkout-premium .checkout-next { margin: 14px 0 8px; }
.checkout-premium .addr-pick { padding: 8px 10px; margin-bottom: 6px; border-radius: 12px; font-size: .86rem; }
.checkout-premium .addr-pick br { display: none; }
.checkout-premium .addr-pick .muted { display: block; margin-top: 2px; font-size: .75rem; }
.checkout-wallet { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin: 0 0 8px; font-size: .8rem; font-weight: 700; }
.checkout-wallet span { color: var(--primary-dark); background: #eef5ff; border-radius: 999px; padding: 4px 8px; }
.checkout-notes { margin-top: 10px; }
.checkout-notes textarea { min-height: 64px; }
.checkout-summary .totals-row { margin: 5px 0; font-size: .84rem; }
.checkout-summary .totals-row.grand { font-size: 1rem; }
.pay-stage { gap: 10px; }
.pay-back { font-size: .82rem; font-weight: 700; }
.pay-title { margin: 4px 0 0; font-size: 1.25rem; }
.pay-stage .panel { border-radius: 16px; box-shadow: 0 10px 28px rgba(11, 42, 94, .06); }
.pay-stage .pay-amt { margin-bottom: 8px; }
.pay-stage .pay-amt strong { font-size: 1.55rem; letter-spacing: -.03em; }
@media (min-width: 900px) {
  .checkout-premium { grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr); }
  .checkout-summary { position: sticky; top: 12px; }
}
.apply-cam { width: 100%; max-height: 220px; border-radius: 12px; background: #000; }
.pay-copy-chip {
  width: 100%; display: flex; align-items: center; gap: 8px; text-align: left;
  border: 1px solid var(--border); background: #f7faff; border-radius: 12px;
  padding: 8px 10px; cursor: pointer; color: var(--text); min-width: 0;
}
.pay-copy-chip span { color: var(--muted); font-size: .68rem; font-weight: 800; flex-shrink: 0; }
.pay-copy-chip strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; }
.pay-copy-chip i { margin-left: auto; color: var(--primary); flex-shrink: 0; }
.pay-copy-chip.is-copied { border-color: #b7e1c4; background: #e6f4ea; }
.pay-qr-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.pay-qr-actions .btn { width: 100%; }
.pay-secure-link { display: block; text-align: center; margin: 0 0 12px; font-size: .82rem; font-weight: 800; }
.pay-confirm-row { display: flex; gap: 8px; }
.pay-confirm-row .form-control { min-width: 0; flex: 1; }
.pay-manual .totals-row > span:last-child { overflow-wrap: anywhere; text-align: right; max-width: 62%; }

@media (max-width: 991px) {
  .app-shell, .main, .container, .admin-main, .admin-content,
  .panel, .pay-box, .checkout-layout, .cart-layout, .account-page {
    min-width: 0; max-width: 100%;
  }
  .container { padding-left: 10px; padding-right: 10px; }
  .main h1, .page-lead h1 { overflow-wrap: anywhere; }
  .brand-live.is-compact .logo-name { max-width: min(108px, 30vw); }
  .header-actions { gap: 4px; }
  .header-inner, .find-block, .loc-bar { min-width: 0; max-width: 100%; }
  .pay-grid { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .totals-row { gap: 8px; align-items: flex-start; }
  .totals-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
  .totals-row > span:last-child { flex-shrink: 0; max-width: 58%; overflow-wrap: anywhere; text-align: right; }
  .addr-pick, .pay-card, .pay-copy, .pay-copy strong, .pay-copy small,
  .order-row, .order-row-main { min-width: 0; overflow-wrap: anywhere; }
  .order-row-main { flex-wrap: wrap; }
  .checkout-layout > *, .cart-layout > * { min-width: 0; }
}
@media (max-width: 420px) {
  .pay-confirm-row { flex-direction: column; }
  .pay-confirm-row .btn { width: 100%; }
  .header-actions .icon-btn { width: 32px; height: 32px; }
  .alert-wrap { height: 32px; }
}

.auth-sheet { width: min(440px, 100%); margin: 0 auto; }
.auth-sheet .auth-card,
.auth-sheet .glass-card { width: 100%; max-width: 100%; }
.loc-manual-row { display: flex; gap: 8px; flex-wrap: wrap; }
.loc-manual-row .form-control { min-width: 0; flex: 1 1 140px; }
.stat-card .value,
.stat-card.compact .value { overflow-wrap: anywhere; }

@media (max-width: 991px) {
  html { -webkit-text-size-adjust: 100%; }
  body {
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
  }
  .main, .admin-main, .admin-content, .app-shell, .container, .auth-sheet {
    min-width: 0; max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  img, video, canvas, svg, iframe { max-width: 100%; height: auto; }
  video { height: auto; }
  .panel, .stat-card, .form-card, .glass-card, .table-wrap,
  .checkout-layout, .cart-layout, .pay-box, .auth-card {
    max-width: 100%; min-width: 0;
  }
  .table-wrap { width: 100%; overflow-x: auto; }
  .storefront input,
  .storefront select,
  .storefront textarea,
  .portal input,
  .portal select,
  .portal textarea,
  .portal-auth input,
  .portal-auth select,
  .portal-auth textarea { font-size: 16px; }
  .storefront .panel,
  .portal .panel { padding: 10px 12px; }
  .inline-actions, .toolbar-row, .cell-form, .banner-row { max-width: 100%; }
  .inline-actions > *, .cell-form > * { min-width: 0; }
  .apply-cam { width: 100%; max-height: 190px; border-radius: 12px; background: #000; }
  .selfie-preview { width: 72px; height: 72px; }
  .portal .bottom-nav,
  .storefront .bottom-nav { width: min(100% - 12px, 460px); }
  .admin-content .panel[style*="max-width"],
  .admin-content form[style*="max-width"] { max-width: 100% !important; }
  .pay-qr-frame { width: min(208px, 100%); height: auto; aspect-ratio: 1; }
}
@media (max-width: 600px) {
  .form-grid-2, .auth-sheet .form-grid-2 { grid-template-columns: 1fr; }
}
