﻿:root {
  --ink: #172033;
  --muted: #64748b;
  --line: #d9e2ef;
  --brand: #2563eb;
  --brand-strong: #1e3a8a;
  --accent: #38bdf8;
  --surface: #ffffff;
  --page: #f4f7fb;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.login-page {
  background: linear-gradient(135deg, #f8fbff 0%, #eaf2ff 52%, #eef7ff 100%);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 40px;
  align-items: center;
  width: min(1120px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
}

.login-brand h1 {
  margin: 24px 0 12px;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: .9;
  color: var(--brand-strong);
}

.login-brand p {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.25rem;
}

.brand-mark {
  width: 120px;
  height: 120px;
}

.login-panel {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 24px 70px rgba(37, 99, 235, .13);
}

.login-panel h2 {
  margin: 0 0 8px;
  font-size: 1.65rem;
}

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

form { display: grid; gap: 12px; margin-top: 24px; }
label { font-weight: 700; font-size: .9rem; }
.form-field {
  display: grid;
  gap: 7px;
}
input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
  background: #fff;
}
input:focus {
  outline: 3px solid rgba(56, 189, 248, .3);
  border-color: var(--accent);
}
textarea:focus {
  outline: 3px solid rgba(56, 189, 248, .3);
  border-color: var(--accent);
}
button, .button-link {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  cursor: pointer;
}
button:hover, .button-link:hover { background: var(--brand-strong); }
.form-message { min-height: 24px; margin: 0; color: #b42318; }

.admin-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  overflow-x: clip;
}
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background:
    radial-gradient(circle at 18% 8%, rgba(56, 189, 248, .28), transparent 28%),
    linear-gradient(165deg, #1d4ed8 0%, #172554 36%, #0f172a 72%, #08111f 100%);
  color: #eaf2ff;
  border-right: 1px solid rgba(147, 197, 253, .26);
  box-shadow:
    inset -18px 0 34px rgba(2, 6, 23, .45),
    inset 1px 0 0 rgba(255, 255, 255, .12),
    18px 0 46px rgba(15, 23, 42, .18);
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(191, 219, 254, .18);
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
  box-shadow: inset 0 -1px 0 rgba(2, 6, 23, .28);
}
.sidebar-head .topbar-brand {
  color: #fff;
}
.sidebar-head .topbar-brand img {
  width: 38px;
  height: 38px;
}
.admin-nav {
  display: grid;
  gap: 6px;
  padding: 14px 12px;
}
.nav-heading {
  margin: 14px 10px 4px;
  color: rgba(255, 255, 255, .45);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.admin-nav-link {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: rgba(239, 246, 255, .78);
  font-weight: 800;
  text-shadow: 0 1px 1px rgba(2, 6, 23, .35);
}
.admin-nav-link:hover,
.admin-nav-link.active {
  color: #fff;
  background:
    linear-gradient(145deg, rgba(96, 165, 250, .33), rgba(37, 99, 235, .13)),
    rgba(255, 255, 255, .08);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .18),
    inset -1px -1px 0 rgba(2, 6, 23, .28),
    0 10px 22px rgba(2, 6, 23, .24);
}
.admin-nav-link.active {
  box-shadow:
    inset 3px 0 0 var(--accent),
    inset 1px 1px 0 rgba(255, 255, 255, .2),
    inset -1px -1px 0 rgba(2, 6, 23, .3),
    0 12px 26px rgba(14, 165, 233, .18);
}
.nav-icon {
  width: 20px;
  height: 20px;
  justify-self: center;
  fill: currentColor;
  opacity: .92;
}
.admin-nav-link.active .nav-icon {
  color: var(--accent);
  opacity: 1;
}
.admin-main {
  min-width: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-height: 68px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.topbar-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; color: var(--brand-strong); }
.topbar-brand img { width: 38px; height: 38px; }
.topbar button { min-height: 38px; }
.mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--brand-strong);
  font-weight: 900;
}
.mobile-brand img {
  width: 34px;
  height: 34px;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 8px;
  background: #edf4ff;
  color: var(--brand-strong);
}
.icon-button:hover {
  background: #dbeafe;
}
.menu-button {
  display: none;
  gap: 4px;
}
.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand-strong);
}
.sidebar-close {
  display: none;
  position: relative;
  background: rgba(255, 255, 255, .1);
}
.sidebar-close:hover {
  background: rgba(255, 255, 255, .18);
}
.sidebar-close span {
  position: absolute;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}
.sidebar-close span:first-child {
  rotate: 45deg;
}
.sidebar-close span:last-child {
  rotate: -45deg;
}
.menu-backdrop {
  display: none;
}
.user-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: min(260px, 48vw);
  min-height: 38px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  background: #dbeafe;
  color: var(--brand-strong);
  font-size: .78rem;
  font-weight: 900;
}
.topbar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.dropdown-menu {
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(16, 32, 31, .12);
}
.dropdown-item {
  color: var(--ink);
  font-weight: 700;
}
.dropdown-item:active {
  background: var(--brand);
}
.dropdown-item[type="button"] {
  width: 100%;
  min-height: auto;
  border-radius: 0;
  background: transparent;
  text-align: left;
}
.dropdown-item[type="button"]:hover {
  color: var(--ink);
  background: #edf4ff;
}
.page-shell {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 30px 24px;
  box-sizing: border-box;
}
.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 24px;
  align-items: center;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.dashboard-hero img { width: 160px; height: 160px; }
.eyebrow { margin: 0 0 8px; color: var(--brand); font-weight: 900; text-transform: uppercase; font-size: .8rem; }
.dashboard-hero h1 { margin: 0 0 12px; font-size: clamp(2rem, 5vw, 4rem); line-height: 1; color: var(--brand-strong); }
.dashboard-hero p { max-width: 700px; color: var(--muted); font-size: 1.1rem; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.dashboard-grid article { padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.dashboard-grid span { color: var(--accent); font-weight: 900; }
.dashboard-grid h2 { margin: 10px 0 8px; font-size: 1.15rem; }
.dashboard-grid p { margin: 0; color: var(--muted); }
.dashboard-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 16px;
  margin-top: 16px;
}
.chart-panel,
.summary-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, .05);
}
.summary-panel.wide {
  margin-top: 16px;
}
.bar-chart {
  display: grid;
  gap: 18px;
}
.bar-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 42px;
  gap: 14px;
  align-items: center;
}
.bar-row span {
  color: var(--ink);
  font-weight: 900;
}
.bar-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf2ff;
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}
.bar-row strong {
  color: var(--brand-strong);
  font-size: 1.1rem;
}
.status-ring {
  display: grid;
  place-items: center;
  width: 170px;
  height: 170px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(var(--brand) 0 var(--active-percent), #fee2e2 0 100%);
  box-shadow: inset 0 0 0 1px var(--line);
}
.status-ring div {
  display: grid;
  place-items: center;
}
.status-ring strong {
  color: var(--brand-strong);
  font-size: 2rem;
  line-height: 1;
}
.status-ring span {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 900;
  text-transform: uppercase;
}
.summary-list {
  display: grid;
  gap: 10px;
}
.summary-list div,
.summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 90px;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}
.summary-list.compact div {
  grid-template-columns: minmax(0, 1fr) 70px;
}
.summary-list span,
.summary-row span {
  color: var(--muted);
  font-weight: 800;
}
.summary-list strong,
.summary-row strong {
  color: var(--brand-strong);
  font-size: 1.05rem;
}
.summary-table {
  display: grid;
  gap: 8px;
}
.summary-row.head {
  min-height: 36px;
  background: #f8fbff;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

/* Admin dashboard widgets */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.quick-link-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(30, 58, 138, 0.12);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.quick-link-card:hover {
  border-color: rgba(30, 58, 138, 0.35);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.08);
}

.quick-link-card strong {
  font-size: 1rem;
  color: #1e3a8a;
}

.quick-link-card span {
  font-size: 0.85rem;
  color: #64748b;
}

.wallet-balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.wallet-balance-panel {
  margin-top: 16px;
}

.cash-filter-form {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  gap: 8px;
  align-items: end;
}

.hr-user-table.cash-transaction-table {
  overflow-x: auto;
}

.hr-user-row.cash-transaction-row {
  grid-template-columns: minmax(120px, 1fr) minmax(140px, 1.2fr) minmax(80px, .7fr) minmax(120px, 1fr) minmax(72px, 80px) minmax(100px, .9fr) minmax(280px, 1.5fr);
  min-width: 980px;
}

.cash-review-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.cash-review-form input[type="text"] {
  min-width: 140px;
  flex: 1;
}

.hr-user-table.merchant-manage-table .hr-user-row.customer-row {
  grid-template-columns: minmax(200px, 1.4fr) minmax(108px, .95fr) minmax(120px, .9fr) minmax(120px, .9fr) minmax(80px, 96px) minmax(220px, max-content);
  min-width: 920px;
}

.hr-user-table.merchant-product-table {
  overflow-x: auto;
}

.hr-user-row.merchant-product-row {
  grid-template-columns: 72px minmax(140px, 1.1fr) minmax(100px, .85fr) minmax(160px, 1.2fr) minmax(88px, .75fr) minmax(88px, .75fr) minmax(88px, max-content);
  min-width: 900px;
  align-items: center;
}

.hr-user-table.merchant-product-table .table-head.merchant-product-row {
  align-items: end;
}

.product-image-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(30, 58, 138, 0.12);
  background: #f8fafc;
}

.product-thumb-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 10px;
}

.product-description-cell {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.product-image-preview {
  margin-bottom: 10px;
}

.product-image-preview img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(30, 58, 138, 0.12);
}

.hr-user-table.merchant-product-table .row-actions.row-actions-inline {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

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

.detail-grid dt {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 4px;
}

.detail-grid dd {
  margin: 0;
  font-weight: 600;
}

.detail-panel {
  margin-top: 16px;
  padding: 24px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(30, 58, 138, 0.12);
}
.kpi-card {
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .05);
  display: grid;
  gap: 6px;
  min-width: 0;
}
.kpi-card span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.kpi-card strong {
  color: var(--brand-strong);
  font-size: 1.85rem;
  line-height: 1;
}
.kpi-card small {
  display: block;
  font-weight: 800;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, .85fr);
  gap: 16px;
  margin-top: 16px;
}
.panel-heading.split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.list-table {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.list-row {
  display: grid;
  grid-template-columns: 120px 120px minmax(0, 1fr) minmax(0, 1fr) 72px 72px;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  color: var(--ink);
}
.list-row.head {
  min-height: 38px;
  background: #f8fbff;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}
.list-row strong {
  color: var(--brand-strong);
  font-weight: 900;
}
.pill.status {
  display: inline-flex;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: .75rem;
  font-weight: 900;
  width: fit-content;
}
.mono {
  font-variant-numeric: tabular-nums;
}
.alert-stack {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}
.alert-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  padding: 14px;
  display: grid;
  gap: 10px;
}
.mini-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.mini-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 56px;
  gap: 10px;
  align-items: center;
}
.mini-list a {
  font-weight: 900;
  color: var(--brand-strong);
}
.leaderboard {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.leader-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
}
.leader-row strong {
  color: var(--brand-strong);
}
.compliance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.compliance-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  padding: 14px;
  display: grid;
  gap: 10px;
}
.compliance-card span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.compliance-card strong {
  color: var(--brand-strong);
  font-size: 1.6rem;
  line-height: 1;
}

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .locations-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .locations-top-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .locations-search-bar { grid-template-columns: 1fr 1fr; }
  .admin-dashboard-grid { grid-template-columns: 1fr; }
}
.module-page {
  display: flex;
  align-items: flex-end;
  min-height: 260px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.module-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  min-height: 240px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff 0%, #f8fbff 58%, #eaf2ff 100%);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .06);
}
.module-hero h1 {
  margin: 0;
  color: var(--brand-strong);
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1;
}
.module-hero p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 800;
}
.module-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  gap: 10px;
}
.module-actions {
  display: grid;
  gap: 12px;
  justify-items: end;
}
.primary-action,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 900;
}
.primary-action {
  color: #fff;
  background: var(--brand);
}
.primary-action:hover {
  color: #fff;
  background: var(--brand-strong);
}
.secondary-link {
  color: var(--brand-strong);
  background: #edf4ff;
}
.module-stats span {
  display: grid;
  gap: 3px;
  min-width: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}
.module-stats strong {
  color: var(--brand-strong);
  font-size: 1.7rem;
  line-height: 1;
}
.hr-list-panel,
.hr-form-card,
.hr-side-card {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, .06);
}
.hr-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.hr-list-head h2,
.hr-side-card h2 {
  margin: 0 0 6px;
  color: var(--brand-strong);
  font-size: 1.35rem;
}
.filter-form {
  display: grid;
  gap: 6px;
  min-width: 240px;
  margin: 0;
}
.filter-form select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}
.hr-user-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.hr-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(96px, 130px) minmax(88px, 110px) minmax(132px, 160px);
  gap: 14px;
  align-items: center;
  min-height: 68px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.hr-user-table.franchisee-table {
  overflow-x: auto;
}
.hr-user-table.franchisee-table .hr-user-row.franchisee-detail {
  min-width: 920px;
}
.hr-user-row.franchisee-detail {
  grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1fr) minmax(108px, .8fr) minmax(100px, .75fr) minmax(88px, 96px) minmax(148px, .9fr) minmax(72px, 88px) minmax(260px, 1fr);
  align-items: center;
}
.hr-user-row > span {
  min-width: 0;
  overflow-wrap: break-word;
}
.hr-user-row > .doc-cell,
.hr-user-row > .row-actions {
  overflow-wrap: normal;
}
.hr-user-row:last-child {
  border-bottom: 0;
}
.hr-user-row.table-head {
  min-height: 42px;
  background: #f8fbff;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}
.hr-user-row.locations-row {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .95fr) minmax(0, 1.1fr) minmax(88px, 110px) minmax(0, 1fr) minmax(72px, 90px);
}
.locations-filter-form {
  min-width: min(100%, 320px);
  grid-template-columns: 1fr 1fr;
}
.locations-filter-form input[type="search"] {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}
.locations-filter-form button {
  grid-column: 1 / -1;
}
.locations-table .user-cell small {
  display: block;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
}
.locations-table span > small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
}
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}
.table-pagination .secondary-button.disabled {
  pointer-events: none;
  opacity: .45;
}
.locations-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.locations-top-panel {
  margin-top: 16px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .05);
}
.locations-top-panel h2 {
  margin: 0 0 6px;
  color: var(--brand-strong);
  font-size: 1.2rem;
}
.locations-top-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.locations-top-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  display: grid;
  gap: 8px;
  min-width: 0;
}
.locations-top-card strong {
  color: var(--brand-strong);
  font-size: 1rem;
}
.locations-top-card small {
  color: var(--muted);
  font-weight: 700;
}
.locations-top-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.locations-top-metrics span {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}
.locations-top-metrics em {
  font-style: normal;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}
.locations-top-metrics strong {
  font-size: 1.25rem;
}
.locations-search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, .8fr) minmax(160px, .7fr) auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
}
.locations-search-field {
  display: grid;
  gap: 6px;
}
.locations-search-field label {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}
.form-section-title {
  margin: 0;
  color: var(--brand-strong);
  font-size: 1rem;
}
.form-section-note {
  margin: 4px 0 0;
  font-size: .85rem;
}
.scope-assignment-panel {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.scope-assignment-panel-head {
  margin-bottom: 18px;
}
.scope-assignment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: start;
}
.scope-assignment-col-assigned {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}
.scope-assignment-col-assigned .scope-assigned-panel {
  flex: 1;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted, #f8fafc);
}
.scope-assignment-col-assigned .scope-assigned-list {
  max-height: 320px;
  overflow: auto;
}
.scope-save-button {
  width: 100%;
  align-self: stretch;
}
.scope-assignment-form {
  display: block;
  margin-top: 0;
}
.scope-assignment-form .scope-location-search,
.scope-assignment-form .scope-barangay-filter {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}
.scope-assignment-form input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  flex: 0 0 18px;
  accent-color: var(--brand);
}
.scope-search-results {
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  max-height: 180px;
  overflow: auto;
}
.scope-search-result {
  display: block;
  width: 100%;
  min-height: 40px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.scope-search-result:last-child {
  border-bottom: 0;
}
.scope-search-result:hover,
.scope-search-result:focus-visible {
  background: #e8f0fe;
  color: var(--brand-strong);
}
.scope-selected-location {
  margin: 6px 0 0;
  font-size: .85rem;
}
.scope-search-status {
  margin: 6px 0 0;
  font-size: .85rem;
}
.scope-barangay-picker {
  margin-top: 12px;
}
.scope-barangay-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.scope-barangay-picker-head label {
  margin: 0;
  font-weight: 600;
}
.scope-barangay-actions {
  display: flex;
  gap: 8px;
}
.text-button {
  border: 0;
  background: none;
  color: var(--brand-strong);
  padding: 0;
  min-height: auto;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.scope-assignment-form .scope-add-button,
.scope-assignment-form .scope-save-button {
  min-height: 42px;
}
.scope-barangay-checklist {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 280px;
  overflow: auto;
  padding: 4px;
  background: #fff;
}
.scope-barangay-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  line-height: 1.35;
}
.scope-barangay-option:hover {
  background: #f4f7fb;
}
.scope-barangay-option.is-added {
  background: #f8fafc;
  cursor: default;
}
.scope-barangay-option span {
  flex: 1;
  min-width: 0;
  text-align: left;
  font-weight: 500;
  word-break: break-word;
}
.scope-barangay-option.is-added span {
  color: var(--muted);
}
.scope-add-button {
  width: 100%;
}
.scope-assigned-panel {
  margin: 14px 0;
}
.scope-assigned-list {
  margin: 8px 0 0;
  padding: 0;
}
.scope-assigned-group {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.scope-assigned-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.scope-steps {
  margin: 8px 0 0;
  padding-left: 1.2rem;
}
.scope-steps li {
  margin: 4px 0;
}
.scope-assigned-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.scope-assigned-panel-head label {
  margin: 0;
  font-weight: 700;
}
.scope-assigned-summary {
  margin: 0;
  font-size: .85rem;
  font-weight: 600;
}
.scope-assigned-municipality {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #e8f0fe;
  color: var(--brand-strong);
  font-size: .92rem;
  font-weight: 800;
}
.scope-assigned-municipality-title {
  flex: 1 1 auto;
}
.scope-assigned-count {
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted);
}
.scope-remove-municipality {
  margin-left: auto;
  font-size: .8rem;
}
.scope-assigned-barangays {
  list-style: none;
  margin: 0;
  padding: 0;
}
.scope-assigned-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
}
.scope-remove-barangay {
  flex-shrink: 0;
}
.form-grid.two .form-field.span-all {
  grid-column: 1 / -1;
}
.locations-search-field input,
.locations-search-field select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}
.results-summary {
  margin: 0 0 12px;
  font-weight: 700;
}
.locations-pagination {
  flex-wrap: wrap;
  justify-content: center;
}
.pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}
.pagination-page.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.user-cell strong {
  display: block;
  color: var(--ink);
}
.user-cell small {
  color: var(--muted);
  font-weight: 800;
}
.user-avatar.small {
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 50%;
}
.user-avatar.small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.doc-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.doc-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: .75rem;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.doc-pill:hover {
  background: #bae6fd;
  color: #0c4a6e;
}
.doc-pill.missing {
  background: #fee2e2;
  color: #991b1b;
}
.doc-pill-outline {
  background: #fff;
  border: 1px solid #7dd3fc;
  color: #0369a1;
}
.doc-pill-outline:hover {
  background: #f0f9ff;
}
.row-actions {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}
.row-actions.row-actions-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
}
.row-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--brand-strong);
  background: #edf4ff;
  font-weight: 900;
  font-size: .82rem;
  text-decoration: none;
  white-space: nowrap;
}
.row-action-link:hover {
  background: #dbeafe;
}
.row-actions a:not(.row-action-link) {
  display: inline-flex;
  justify-content: center;
  min-height: 34px;
  min-width: 100%;
  width: 100%;
  align-items: center;
  border-radius: 8px;
  color: var(--brand-strong);
  background: #edf4ff;
  font-weight: 900;
}
.row-actions form,
.row-action-form {
  margin: 0;
  display: inline-flex;
}
.row-actions button,
.row-actions .secondary-button,
.row-actions .danger-button,
.row-action-btn {
  min-height: 34px;
  width: 100%;
  white-space: nowrap;
  padding: 0 12px;
  font-size: .82rem;
}
.row-actions.row-actions-inline .row-action-btn,
.row-actions.row-actions-inline button,
.row-actions.row-actions-inline .secondary-button,
.row-actions.row-actions-inline .danger-button {
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
}
.row-actions.row-actions-inline .row-action-form {
  flex: 0 0 auto;
}

/* Franchisee list row — compact actions & document pills */
.hr-user-table.franchisee-table .hr-user-row.franchisee-detail:not(.table-head) > .doc-cell,
.hr-user-table.franchisee-table .hr-user-row.franchisee-detail:not(.table-head) > span:nth-child(6) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.hr-user-table.franchisee-table .hr-user-row.franchisee-detail:not(.table-head) > .doc-cell a,
.hr-user-table.franchisee-table .hr-user-row.franchisee-detail:not(.table-head) > span:nth-child(6) a {
  display: inline-flex;
  align-items: center;
  width: auto;
  min-height: 0;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.hr-user-table.franchisee-table .hr-user-row.franchisee-detail:not(.table-head) > span:nth-child(6) .secondary-link,
.hr-user-table.franchisee-table .hr-user-row.franchisee-detail:not(.table-head) > span:nth-child(6) .doc-download-link {
  background: #fff;
  border: 1px solid #7dd3fc;
  color: #0369a1;
}
.hr-user-table.franchisee-table .hr-user-row.franchisee-detail:not(.table-head) > span:nth-child(6) .doc-pill:not(.doc-pill-outline) {
  background: #e0f2fe;
  color: #075985;
}
.hr-user-table.franchisee-table .hr-user-row.franchisee-detail:not(.table-head) .row-actions {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.hr-user-table.franchisee-table .hr-user-row.franchisee-detail:not(.table-head) .row-actions form {
  display: inline-flex;
  margin: 0;
  width: auto;
}
.hr-user-table.franchisee-table .hr-user-row.franchisee-detail:not(.table-head) .row-actions a,
.hr-user-table.franchisee-table .hr-user-row.franchisee-detail:not(.table-head) .row-actions button {
  width: auto;
  min-width: 0;
  min-height: 34px;
  padding: 0 12px;
  font-size: .82rem;
  white-space: nowrap;
}
.hr-user-table.franchisee-table .hr-user-row.franchisee-detail:not(.table-head) .row-actions .secondary-button {
  color: var(--brand-strong);
  background: #edf4ff;
}
.hr-user-table.franchisee-table .hr-user-row.franchisee-detail:not(.table-head) .row-actions .secondary-button:hover {
  background: #dbeafe;
}
.hr-user-table.franchisee-table .hr-user-row.franchisee-detail:not(.table-head) .row-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--brand-strong);
  background: #edf4ff;
  font-weight: 900;
  font-size: .82rem;
  text-decoration: none;
}

.form-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.form-page-head h1 {
  margin: 0;
  color: var(--brand-strong);
  font-size: clamp(1.8rem, 4vw, 3rem);
}
.hr-form-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}
.hr-form-shell.merchant-form-page {
  grid-template-columns: minmax(0, 1fr);
}
.merchant-form-sections {
  display: grid;
  gap: 18px;
}
.merchant-form-sections .profile-panel h2 {
  margin-bottom: 4px;
}
.merchant-form-sections .panel-intro {
  margin: 0 0 18px;
  font-size: .9rem;
}
.merchant-form-sections .password-builder {
  margin-top: 0;
}
.hr-form-card form,
.hr-side-card form {
  margin-top: 0;
}
.hr-side-card {
  position: sticky;
  top: 86px;
}
.form-grid {
  display: grid;
  gap: 14px;
}
.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.upload-tile {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}
.upload-tile img,
.stored-upload img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
.stored-upload {
  display: grid;
  gap: 8px;
}
.stored-upload-pdf {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px dashed var(--line);
  background: #fff;
  color: var(--ink-muted);
  font-size: 0.9rem;
}
.stored-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.field-hint {
  color: var(--ink-muted);
  font-size: 0.85rem;
}
.form-banner.success {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #b8e0c4;
  background: #edf9f0;
  color: #1f5f33;
}
.doc-download-link {
  margin-left: 8px;
  font-size: 0.85rem;
}
.kyc-overall-summary {
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.kyc-doc-review {
  margin-top: 8px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 10px;
}
.kyc-doc-review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.kyc-doc-reviewed {
  font-size: 0.85rem;
}
.kyc-doc-review-form {
  display: grid;
  gap: 10px;
}
.kyc-doc-review-form select,
.kyc-doc-review-form textarea {
  width: 100%;
}
.kyc-review-panel {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  display: grid;
  gap: 12px;
}
.kyc-review-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.kyc-doc-checklist {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 4px;
}
.kyc-doc-checklist .ready {
  color: #1f5f33;
}
.kyc-doc-checklist .missing {
  color: #9a3412;
}
.kyc-review-notes {
  margin: 0;
  font-size: 0.9rem;
}
.kyc-review-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.kyc-review-form {
  display: grid;
  gap: 10px;
  align-content: start;
}
.status-pill.submitted {
  background: #fff7e6;
  color: #9a6700;
  border: 1px solid #f5d78e;
}
@media (max-width: 900px) {
  .kyc-review-actions {
    grid-template-columns: 1fr;
  }
}
.form-actions {
  display: flex;
  justify-content: flex-end;
}
.edit-form-footer {
  margin-top: 28px;
  margin-bottom: 4px;
  padding: 20px 0 8px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  clear: both;
}
.edit-form-footer-franchisee {
  margin-bottom: 28px;
}
.edit-form-save-button {
  min-width: 200px;
  font-weight: 700;
}
.upload-kyc-review-section {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 2px solid var(--line);
}
.upload-kyc-review-section .form-section-title {
  margin: 0 0 8px;
}
.upload-kyc-review-grid {
  margin-top: 16px;
}
.hr-user-row.customer-row {
  grid-template-columns: minmax(180px, 1.35fr) minmax(108px, .85fr) minmax(120px, .9fr) minmax(120px, .9fr) minmax(48px, 64px) minmax(72px, 88px) minmax(72px, 96px);
}
/* Admin staff list — 6 columns (no location/franchisee); wide actions column */
.hr-user-table.admin-staff-table {
  overflow-x: auto;
}
.hr-user-table.admin-staff-table .hr-user-row.customer-row {
  grid-template-columns: minmax(200px, 1.4fr) minmax(108px, .95fr) minmax(96px, .85fr) minmax(140px, 1.2fr) minmax(80px, 96px) minmax(168px, max-content);
  min-width: 880px;
}
.hr-user-table.admin-staff-table .row-actions.row-actions-inline {
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 8px;
}
.hr-user-table.admin-staff-table .row-actions.row-actions-inline .row-action-link {
  flex: 0 0 auto;
  min-width: 0;
}
.hr-user-table.fare-matrix-table {
  overflow-x: auto;
}
.hr-user-row.fare-matrix-row {
  grid-template-columns: minmax(160px, 1.2fr) minmax(100px, .9fr) minmax(120px, 1fr) minmax(80px, 96px) minmax(88px, max-content);
  min-width: 640px;
}
.hr-user-table.fare-matrix-table .row-actions.row-actions-inline {
  flex-wrap: nowrap;
  justify-content: flex-end;
}
.hr-user-table.fare-matrix-table .hr-user-row > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hr-user-table.fare-matrix-table .hr-user-row > span:first-child small {
  font-weight: 600;
}
.customer-search-form {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: end;
  min-width: min(100%, 420px);
}
.customer-search-form input[type="search"] {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}
.customer-detail-shell {
  margin-top: 18px;
}
.customer-detail-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.customer-detail-head {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin: 0 0 20px;
}
.detail-grid dt {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}
.detail-grid dd {
  margin: 4px 0 0;
  font-weight: 700;
}
.detail-address {
  margin: 0 0 18px;
  line-height: 1.5;
}
.customer-profile-grid {
  display: grid;
  gap: 18px;
}
.module-page h1 {
  margin: 0;
  color: var(--brand-strong);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}
.module-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 700;
}
.management-grid,
.manager-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}
.create-user-card,
.user-management-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, .06);
}
.create-user-card {
  position: sticky;
  top: 86px;
}
.create-user-panel form,
.create-user-card form {
  margin-top: 0;
}
.check-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: 2px 0;
  font-weight: 800;
}
.check-row input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  accent-color: var(--brand);
}
.password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
  align-items: end;
}
.password-builder {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #f8fbff;
}
.password-builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.password-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 10px;
}
.password-builder p {
  margin: 0;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
}
.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--brand-strong);
  font-size: .84rem;
  font-weight: 900;
}
.switch-row input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--brand);
}
.secondary-button {
  color: var(--brand-strong);
  background: #edf4ff;
}
.secondary-button:hover {
  background: #dbeafe;
}
.danger-button {
  background: #dc2626;
}
.danger-button:hover {
  background: #991b1b;
}
.empty-state {
  margin: 0;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}
.user-table {
  display: grid;
  gap: 10px;
}
.user-table article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}
.user-table h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 1rem;
}
.user-table p {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.user-table span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: .78rem;
  font-weight: 900;
}
.modern-user-list {
  display: grid;
  gap: 12px;
}
.modern-user-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}
.modern-user-card.inactive {
  background: #f8fafc;
}
.user-card-main {
  display: flex;
  gap: 14px;
  min-width: 0;
}
.user-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #dbeafe;
  color: var(--brand-strong);
  font-weight: 900;
}
.modern-user-card h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 1.05rem;
}
.modern-user-card p {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.reason-text {
  margin-top: 8px !important;
  color: #991b1b !important;
  font-weight: 800;
}
.user-card-actions {
  display: grid;
  gap: 10px;
  align-content: start;
}
.status-pill {
  justify-self: start;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
}
.status-pill.active {
  color: #166534;
  background: #dcfce7;
}
.status-pill.inactive {
  color: #991b1b;
  background: #fee2e2;
}
.user-card-actions details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.user-card-actions summary {
  min-height: 40px;
  padding: 10px 12px;
  color: var(--brand-strong);
  font-weight: 900;
  cursor: pointer;
}
.user-card-actions details form {
  gap: 10px;
  margin: 0;
  padding: 0 12px 12px;
}
.user-card-actions form:not(details form) {
  margin: 0;
}
.profile-page {
  display: grid;
  gap: 18px;
}
.profile-cover {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 26px;
  align-items: end;
  min-height: 230px;
  padding: 36px;
  overflow: hidden;
  border: 1px solid #cbd8ea;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(15, 23, 42, .97), rgba(37, 99, 235, .84)),
    linear-gradient(90deg, #0f172a, #38bdf8);
  color: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .13);
}
.profile-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 7px;
  background: linear-gradient(90deg, #38bdf8, #60a5fa, #93c5fd);
}
.avatar-upload-form {
  position: relative;
  z-index: 1;
  margin: 0;
}
.avatar-upload-form input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.profile-photo-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 148px;
  height: 148px;
  margin: 0;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, .86);
  border-radius: 50%;
  background: #edf4ff;
  color: var(--brand-strong);
  font-size: 3.5rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .22);
}
.profile-photo-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.profile-photo-button strong {
  position: absolute;
  inset: auto 10px 14px;
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 999px;
  background: rgba(16, 32, 31, .78);
  color: #fff;
  font-size: .78rem;
  line-height: 1;
  opacity: 0;
  transition: opacity .16s ease;
}
.profile-photo-button:hover strong,
.profile-photo-button:focus-within strong {
  opacity: 1;
}
.profile-identity {
  position: relative;
  z-index: 1;
  min-width: 0;
}
.profile-identity .eyebrow {
  color: #bae6fd;
}
.profile-identity h1 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(2.1rem, 5vw, 4.7rem);
  line-height: .95;
}
.profile-identity p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 1.05rem;
}
.profile-content {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(360px, 1.2fr);
  gap: 18px;
  align-items: start;
}
.profile-panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .06);
}
.profile-panel h2 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--brand-strong);
}
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.panel-heading p {
  margin: 6px 0 0;
}
.account-panel dl {
  display: grid;
  gap: 14px;
  margin: 0;
}
.account-panel dl div {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.account-panel dl div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.account-panel dt {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 900;
  text-transform: uppercase;
}
.account-panel dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-weight: 800;
}
.security-panel form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 14px;
  row-gap: 14px;
  margin-top: 0;
}
.security-panel .form-field.full,
.security-panel form [data-valmsg-summary],
.security-panel form .validation-summary-errors,
.security-panel form button,
.password-note {
  grid-column: 1 / -1;
}
.security-panel input {
  min-height: 48px;
}
.security-panel .form-message {
  min-height: 18px;
  font-size: .85rem;
}
.password-note {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #e7dcc3;
  border-radius: 8px;
  background: #fff9e8;
  color: #6a5520;
  font-size: .9rem;
  font-weight: 700;
}
.security-panel button {
  justify-self: end;
  width: min(240px, 100%);
  margin-top: 2px;
}
.success-message {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: var(--brand-strong);
  font-weight: 800;
}
.wallet-app-screen {
  display: grid;
  gap: 16px;
}
.wallet-card {
  padding: 22px;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, .26), transparent 24%),
    linear-gradient(135deg, #2563eb 0%, #1d4ed8 44%, #172554 100%);
  box-shadow: 0 18px 42px rgba(37, 99, 235, .28);
}
.wallet-card p {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, .78);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}
.wallet-card h1 {
  margin: 0;
  font-size: clamp(2.1rem, 10vw, 3.4rem);
  line-height: 1;
}
.wallet-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.wallet-card-actions a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-weight: 900;
}
.mobile-subnav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.mobile-subnav a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-strong);
  font-weight: 900;
}
.mobile-subnav a.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}
.order-cover {
  padding: 22px;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, .22), transparent 26%),
    linear-gradient(135deg, #0f172a 0%, #1d4ed8 56%, #38bdf8 100%);
  box-shadow: 0 18px 42px rgba(37, 99, 235, .22);
}
.order-cover h1 {
  margin: 0 0 6px;
  font-size: clamp(2rem, 9vw, 3rem);
}
.order-cover p {
  margin: 0;
  color: rgba(255, 255, 255, .82);
}
.create-order-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 18px;
  border-radius: 999px;
  color: var(--brand-strong);
  background: #fff;
  font-weight: 900;
}

body.franchisee-user .create-order-button {
  display: none !important;
}
.wallet-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}
.wallet-list {
  display: grid;
  gap: 10px;
}
.wallet-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
}
.wallet-list strong {
  color: var(--brand-strong);
}
.wallet-list small {
  color: var(--muted);
}
.order-sample-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #cfe0f7;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 251, 255, .96)),
    radial-gradient(circle at 95% 8%, rgba(56, 189, 248, .18), transparent 28%);
  box-shadow: 0 14px 30px rgba(30, 64, 175, .08);
}
.order-sample-card.clickable {
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.order-sample-card.clickable:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(30, 64, 175, .14);
}
/* Cards are <article> with forms; do not disable pointer events on non-link cards */
.order-sample-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.order-sample-head span {
  color: var(--accent);
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
}
.order-sample-head h3 {
  margin: 3px 0 0;
  color: var(--brand-strong);
  font-size: 1.08rem;
}
.order-sample-head strong {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: #075985;
  background: #e0f2fe;
  font-size: .75rem;
}
.order-sample-card p {
  margin: 0;
  color: var(--muted);
}
.order-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.order-meta-grid span {
  display: grid;
  gap: 3px;
  min-height: 58px;
  align-content: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--brand-strong);
  font-weight: 900;
  line-height: 1.15;
}
.order-meta-grid small {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}
.track-hint {
  display: inline-flex;
  justify-content: center;
  min-height: 36px;
  align-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  font-size: .82rem;
  font-style: normal;
  font-weight: 900;
}
.wallet-form-preview {
  display: grid;
  gap: 10px;
}
.wallet-form-preview select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}
.order-create-form textarea {
  min-height: 150px;
}
.mobile-bottom-nav {
  display: none;
}
.map-screen {
  display: grid;
  gap: 16px;
}
.map-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}
.map-topbar h1 {
  margin: 0;
  color: var(--brand-strong);
  font-size: clamp(2rem, 7vw, 3.5rem);
  line-height: 1;
}
.map-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
}
.map-card {
  position: relative;
  min-height: min(640px, calc(100dvh - 250px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #dbeafe;
  box-shadow: 0 20px 48px rgba(15, 23, 42, .12);
}
.map-card iframe {
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
}
.delivery-route-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.route-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.route-shadow,
.route-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.route-shadow {
  stroke: rgba(15, 23, 42, .34);
  stroke-width: 10;
}
.route-line {
  stroke: #2563eb;
  stroke-width: 6;
  stroke-dasharray: 12 9;
  filter: drop-shadow(0 6px 10px rgba(37, 99, 235, .28));
  animation: route-flow 1.1s linear infinite;
}
.route-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .28);
}
.route-start {
  left: 58%;
  top: 78%;
  translate: -50% -50%;
}
.route-end {
  left: 37%;
  top: 24%;
  translate: -50% -50%;
  background: #0f172a;
}
.rider-motor {
  position: absolute;
  left: 58%;
  top: 78%;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  translate: -50% -50%;
  border: 4px solid #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  box-shadow: 0 12px 26px rgba(37, 99, 235, .34);
  animation: rider-route 7s cubic-bezier(.45, 0, .2, 1) infinite;
}
.rider-motor svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@keyframes route-flow {
  to { stroke-dashoffset: -21; }
}
@keyframes rider-route {
  0%, 12% {
    left: 58%;
    top: 78%;
    rotate: -19deg;
  }
  38% {
    left: 50%;
    top: 61%;
    rotate: -24deg;
  }
  68% {
    left: 44%;
    top: 43%;
    rotate: -18deg;
  }
  88%, 100% {
    left: 37%;
    top: 24%;
    rotate: -14deg;
  }
}
.map-pin {
  position: absolute;
  display: grid;
  gap: 2px;
  max-width: 180px;
  padding: 9px 12px;
  border-radius: 14px;
  color: #fff;
  background: rgba(15, 23, 42, .88);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .22);
  pointer-events: none;
}
.map-pin::after {
  content: "";
  position: absolute;
  left: 18px;
  bottom: -8px;
  width: 16px;
  height: 16px;
  rotate: 45deg;
  background: inherit;
}
.map-pin strong {
  font-size: .78rem;
  text-transform: uppercase;
}
.map-pin span {
  font-size: .82rem;
  font-weight: 800;
}
.customer-pin {
  left: 47%;
  top: 23%;
}
.rider-pin {
  left: 53%;
  top: 69%;
  background: rgba(37, 99, 235, .92);
}
.delivery-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.delivery-summary article {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.delivery-summary span {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 900;
  text-transform: uppercase;
}
.delivery-summary strong {
  color: var(--brand-strong);
}
.delivery-summary small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .login-shell, .dashboard-hero, .dashboard-grid, .dashboard-overview { grid-template-columns: 1fr; }
  .login-shell { gap: 24px; align-content: center; }
  .login-panel, .dashboard-hero { padding: 24px; }
  .dashboard-hero img { width: 96px; height: 96px; }
  .admin-shell {
    display: block;
  }
  .admin-sidebar {
    position: fixed;
    inset: 0;
    z-index: 60;
    width: 100vw;
    height: 100dvh;
    transform: translateX(-100%);
    transition: transform .18s ease;
  }
  .menu-open .admin-sidebar {
    transform: translateX(0);
  }
  .menu-open {
    overflow: hidden;
  }
  .sidebar-head {
    min-height: 72px;
    padding: 0 18px;
  }
  .admin-nav {
    gap: 9px;
    padding: 18px;
  }
  .admin-nav-link {
    min-height: 56px;
    font-size: 1.02rem;
  }
  .sidebar-close,
  .menu-button,
  .mobile-brand {
    display: inline-grid;
  }
  .mobile-brand {
    display: inline-flex;
  }
  .topbar {
    justify-content: space-between;
    padding: 0 12px;
  }
  .user-menu-button {
    max-width: 38vw;
    padding: 0 12px;
  }
  .page-shell {
    width: 100%;
    padding: 18px 12px;
  }
  .module-hero,
  .module-actions,
  .profile-cover,
  .profile-content,
  .delivery-summary,
  .security-panel form,
  .management-grid,
  .manager-layout,
  .hr-form-shell,
  .form-grid.two,
  .upload-grid,
  .password-row,
  .password-control,
  .modern-user-card {
    grid-template-columns: 1fr;
  }
  .bar-row {
    grid-template-columns: 1fr 48px;
  }
  .bar-row span {
    grid-column: 1 / -1;
  }
  .summary-row {
    grid-template-columns: 1fr;
  }
  .module-hero {
    display: grid;
    min-height: 0;
    padding: 24px;
  }
  .map-topbar {
    align-items: stretch;
    display: grid;
  }
  .map-card {
    min-height: calc(100dvh - 245px);
  }
  .customer-pin {
    left: 34%;
    top: 18%;
  }
  .rider-pin {
    left: 43%;
    top: 66%;
  }
  .rider-motor {
    width: 42px;
    height: 42px;
  }
  .rider-motor svg {
    width: 28px;
    height: 28px;
  }
  .module-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .module-actions,
  .form-page-head,
  .hr-list-head {
    display: grid;
    justify-items: stretch;
  }
  .hr-user-table {
    border: 0;
    gap: 10px;
    overflow: visible;
  }
  .hr-user-row,
  .hr-user-row.table-head {
    grid-template-columns: 1fr;
  }
  .hr-user-row.locations-row > span:nth-child(1)::before { content: "Location"; }
  .hr-user-row.locations-row > span:nth-child(2)::before { content: "Province"; }
  .hr-user-row.locations-row > span:nth-child(3)::before { content: "Region"; }
  .hr-user-row.locations-row > span:nth-child(4)::before { content: "Status"; }
  .hr-user-row.locations-row > span:nth-child(5)::before { content: "Franchisee"; }
  .hr-user-row.locations-row > span:nth-child(6)::before { content: "Riders"; }
  .hr-user-row.locations-row > span::before {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
  }
  .locations-filter-form {
    grid-template-columns: 1fr;
  }
  .locations-kpi-grid,
  .locations-top-grid {
    grid-template-columns: 1fr;
  }
  .locations-search-bar {
    grid-template-columns: 1fr;
  }
  .hr-user-row.table-head {
    display: none;
  }
  .hr-user-row {
    border: 1px solid var(--line);
    border-radius: 8px;
  }
  .hr-side-card {
    position: static;
  }
  .scope-assignment-layout {
    grid-template-columns: 1fr;
  }
  .form-actions,
  .form-actions button {
    width: 100%;
  }
  .create-user-card {
    position: static;
  }
  .profile-cover {
    align-items: start;
    padding: 24px;
  }
  .profile-photo-button {
    width: 112px;
    height: 112px;
    font-size: 2.4rem;
  }
  .security-panel button {
    width: 100%;
    justify-self: stretch;
  }
  .mobile-wallet-user {
    background: #eef4ff;
  }
  .mobile-wallet-user .admin-shell {
    display: block;
  }
  .mobile-wallet-user .topbar {
    position: sticky;
    min-height: 62px;
    padding: 0 12px;
    border-bottom: 0;
    background: rgba(238, 244, 255, .92);
    backdrop-filter: blur(12px);
  }
  .mobile-wallet-user .mobile-brand {
    display: inline-flex;
  }
  .mobile-wallet-user .page-shell {
    padding: 12px 12px 92px;
  }
  .mobile-wallet-user .user-menu-button {
    max-width: 42vw;
    border-radius: 999px;
    padding: 0 10px;
  }
  .mobile-wallet-user .dropdown-menu {
    border-radius: 14px;
  }
  .mobile-bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    min-height: 68px;
    padding: 8px;
    border: 1px solid rgba(147, 197, 253, .5);
    border-radius: 22px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 16px 36px rgba(15, 23, 42, .18);
    backdrop-filter: blur(16px);
  }
  .mobile-bottom-nav a {
    display: grid;
    place-items: center;
    gap: 3px;
    border-radius: 16px;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 900;
  }
  .mobile-bottom-nav a.active {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
  }
  .bottom-avatar {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    overflow: hidden;
    border-radius: 50%;
    background: #dbeafe;
    color: var(--brand-strong);
    font-size: .7rem;
  }
  .bottom-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .mobile-wallet-user .profile-cover {
    min-height: 0;
    border-radius: 22px;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .mobile-wallet-user .profile-content {
    gap: 12px;
  }
}

/* PABILI storefront */
.storefront-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(59, 130, 246, .18), transparent 45%),
    radial-gradient(circle at 90% 10%, rgba(14, 165, 233, .14), transparent 40%),
    linear-gradient(180deg, #eef4ff 0%, #f8fbff 40%, #ffffff 100%);
}

.storefront-shell {
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 16px 32px;
}

.storefront-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.storefront-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.storefront-brand img {
  width: 44px;
  height: 44px;
}

.storefront-brand strong {
  display: block;
  font-size: 1.1rem;
}

.storefront-brand span {
  display: block;
  font-size: .78rem;
  color: var(--muted);
}

.storefront-login-link {
  font-weight: 700;
  color: var(--brand-strong);
  text-decoration: none;
}

.storefront-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  justify-content: flex-end;
}

.storefront-menu {
  position: relative;
}

.storefront-menu-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(30, 58, 138, .2);
  border-radius: 14px;
  background: #fff;
  color: var(--brand-strong);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
}

.storefront-menu-toggle:hover {
  background: #eff6ff;
}

.storefront-menu-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 18px;
}

.storefront-menu-bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}

.storefront-menu.is-open .storefront-menu-bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.storefront-menu.is-open .storefront-menu-bars span:nth-child(2) {
  opacity: 0;
}

.storefront-menu.is-open .storefront-menu-bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.storefront-menu-tip {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  line-height: 1.2rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, .35);
}

.storefront-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 210px;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(147, 197, 253, .45);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
}

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

.storefront-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #0f172a;
  font-size: .92rem;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.storefront-menu-item:hover {
  background: #eff6ff;
  color: var(--brand-strong);
}

.storefront-menu-item-logout {
  color: #b91c1c;
}

.storefront-menu-item-logout:hover {
  background: #fef2f2;
  color: #991b1b;
}

.storefront-menu-logout {
  margin: 0;
}

.storefront-menu.is-open {
  z-index: 50;
}

.storefront-menu.is-open .storefront-menu-toggle {
  position: relative;
  z-index: 2;
}

.storefront-menu.is-open .storefront-menu-panel {
  z-index: 51;
}

.storefront-hub-hero,
.storefront-action-grid,
.storefront-hub-foot {
  position: relative;
  z-index: 2;
}

a.storefront-action-card {
  pointer-events: auto;
  cursor: pointer;
}

body.storefront-menu-open {
  overflow: hidden;
}

body.storefront-menu-open .storefront-header {
  position: relative;
  z-index: 51;
}

.storefront-menu-item-orders .storefront-order-tip {
  position: static;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 5px;
  line-height: 1.35rem;
}

.storefront-order-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(239, 68, 68, .35);
}

.storefront-chat {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.chat-bubble {
  max-width: 92%;
  padding: 14px 16px;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}

.chat-bubble-bot {
  background: #fff;
  border: 1px solid rgba(147, 197, 253, .45);
}

.chat-bubble-success {
  background: #ecfdf5;
  border: 1px solid #86efac;
}

.chat-bubble-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
}

.chat-label {
  margin: 0 0 6px;
  font-size: .72rem;
  font-weight: 800;
  color: var(--brand-strong);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.chat-example {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  font-size: .85rem;
  white-space: pre-wrap;
}

.storefront-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(147, 197, 253, .35);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
}

.storefront-fields {
  display: grid;
  gap: 12px;
}

.storefront-field {
  display: grid;
  gap: 6px;
}

.storefront-fields label,
.storefront-field label {
  font-size: .78rem;
  font-weight: 800;
  color: var(--muted);
}

.storefront-fields input,
.storefront-fields select,
.storefront-fields textarea,
.storefront-field input,
.storefront-field select,
.storefront-field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
}

.storefront-fields .form-message,
.storefront-field .form-message {
  min-height: 0;
  margin: 0;
  font-size: .78rem;
  line-height: 1.3;
}

.storefront-fields .form-message:empty,
.storefront-field .form-message:empty {
  display: none;
}

.storefront-field-hint {
  margin: 0;
  font-size: .76rem;
  line-height: 1.35;
}

.storefront-fields textarea {
  min-height: 140px;
  resize: vertical;
}

.storefront-gate {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eff6ff;
}

.pabili-button {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: .08em;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .35);
}

.storefront-step.is-hidden {
  display: none;
}

.chat-bubble-user {
  margin-left: auto;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  border: 0;
}

.chat-bubble-user .chat-label {
  color: rgba(255, 255, 255, .85);
}

.chat-bubble-user .chat-example {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.storefront-step-title {
  margin: 0 0 4px;
  font-size: .95rem;
  font-weight: 900;
}

.storefront-form-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  align-items: center;
}

.storefront-confirm-button {
  min-height: 48px;
  font-size: .95rem;
}

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

.storefront-form > label {
  font-size: .78rem;
  font-weight: 800;
  color: var(--muted);
}

.storefront-form > textarea {
  width: 100%;
  min-height: 140px;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  resize: vertical;
}

.pabili-button:disabled {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}

.storefront-footer {
  margin-top: 14px;
  text-align: center;
  font-size: .78rem;
}

.storefront-location-panel {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(147, 197, 253, .35);
}

.storefront-search-panel {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(147, 197, 253, .35);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .07);
}

.storefront-search-label {
  display: block;
  margin-bottom: 8px;
  font-size: .78rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.storefront-search-wrap {
  position: relative;
}

.storefront-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: #64748b;
  pointer-events: none;
}

.storefront-search-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px 12px 42px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  font-size: .95rem;
}

.storefront-search-input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .25);
}

.storefront-location-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.storefront-status-stack {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.storefront-alert {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: .85rem;
}

.storefront-alert-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.storefront-alert.validation-summary-valid {
  display: none;
}

.storefront-alert-info {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1e3a8a;
  margin-bottom: 12px;
}

.storefront-alert-success {
  background: #ecfdf5;
  border: 1px solid #86efac;
  color: #166534;
}

.storefront-alert-info a {
  font-weight: 700;
}

.storefront-fare-estimate,
.storefront-order-fare,
.rider-booking-fare {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: .92rem;
}

.storefront-order-fare,
.rider-booking-fare {
  margin-top: 8px;
  margin-bottom: 0;
}

.storefront-order-fare-note {
  margin: 4px 0 0;
  font-size: .82rem;
}

.storefront-order-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(147, 197, 253, .35);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
}

.storefront-order-panel label {
  font-size: .78rem;
  font-weight: 800;
  color: var(--muted);
}

.storefront-order-panel textarea {
  width: 100%;
  min-height: 96px;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  resize: vertical;
}

.storefront-location-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.storefront-page .storefront-location-button {
  min-height: 0;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 8px 14px;
  background: #eff6ff;
  color: var(--brand-strong);
  font-size: .78rem;
  font-weight: 800;
}

.storefront-page .storefront-location-button:hover {
  background: #dbeafe;
}

.storefront-location-status {
  margin: 0;
  font-size: .78rem;
  line-height: 1.35;
  color: var(--muted);
}

.storefront-location-status.success {
  color: #047857;
}

.storefront-location-status.success .storefront-location-status-link {
  color: #047857;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.storefront-location-status.success .storefront-location-status-link:hover {
  color: #065f46;
}

.storefront-location-status.has-link {
  line-height: 1.45;
}

.storefront-location-status.error {
  color: #b91c1c;
}

.storefront-catalog {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(147, 197, 253, .35);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .07);
}

.storefront-catalog.is-visible {
  border-color: #86efac;
  box-shadow: 0 12px 32px rgba(16, 185, 129, .12);
}

.storefront-catalog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 4px;
}

.storefront-catalog-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  color: #0f172a;
}

.storefront-catalog-count {
  font-size: .74rem;
  font-weight: 800;
  color: var(--brand-strong);
  background: #eff6ff;
  padding: 4px 10px;
  border-radius: 999px;
}

.storefront-catalog-empty {
  margin: 0;
  padding: 20px 12px;
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
  border-radius: 14px;
  background: #f8fafc;
}

.storefront-catalog-results {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: min(58vh, 480px);
  overflow-y: auto;
  padding: 2px 4px 2px 0;
}

.storefront-merchant-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.storefront-merchant-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}

.storefront-merchant-group-name {
  margin: 0;
  font-size: .88rem;
  font-weight: 900;
  color: #1e3a8a;
}

.storefront-merchant-group-area {
  font-size: .72rem;
  color: var(--muted);
  text-align: right;
}

.storefront-product-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.storefront-product-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.storefront-product-row:hover,
.storefront-product-row:focus-visible {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .12);
  transform: translateY(-1px);
  outline: none;
}

.storefront-product-row-image {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(145deg, #eff6ff, #f8fafc);
  color: var(--brand-strong);
  font-size: 1.1rem;
  font-weight: 900;
  overflow: hidden;
}

.storefront-product-row-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.storefront-product-row-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.storefront-product-row-name {
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.3;
  color: #0f172a;
}

.storefront-product-row-meta {
  font-size: .74rem;
  color: var(--muted);
  line-height: 1.3;
}

.storefront-product-row-desc {
  font-size: .72rem;
  color: #64748b;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.storefront-product-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.storefront-product-row-price {
  font-size: .9rem;
  font-weight: 900;
  color: var(--brand-strong);
  white-space: nowrap;
}

.storefront-product-row-add,
.storefront-page .storefront-product-row-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .25);
  cursor: pointer;
}

.storefront-page .storefront-product-row-add-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #0284c7);
}

.storefront-product-row.is-added {
  border-color: #34d399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, .35);
}

.storefront-merchant {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(147, 197, 253, .35);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}

.storefront-merchant-head {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
}

.storefront-merchant-head strong {
  font-size: .92rem;
}

.storefront-merchant-head span {
  font-size: .74rem;
  color: var(--muted);
}

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

.storefront-product-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}

.storefront-product-card:hover,
.storefront-product-card:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .12);
  outline: none;
}

.storefront-product-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  color: var(--brand-strong);
  font-weight: 900;
  overflow: hidden;
}

.storefront-product-image img {
  width: 100%;
  height: 72px;
  object-fit: cover;
}

.storefront-product-body {
  display: grid;
  gap: 2px;
}

.storefront-product-name {
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.25;
}

.storefront-product-price {
  font-size: .8rem;
  color: var(--brand-strong);
  font-weight: 800;
}

.storefront-product-desc {
  font-size: .72rem;
  color: var(--muted);
  line-height: 1.3;
}

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

.booking-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(147, 197, 253, .35);
  background: #fff;
}

.booking-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.booking-detail {
  white-space: pre-wrap;
}

.rider-availability-actions form {
  margin: 0;
}

.location-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(147, 197, 253, .35);
}

.location-panel strong {
  display: block;
  margin-bottom: 4px;
}

.location-status {
  min-height: 1.2rem;
  margin: 0 0 12px;
  font-size: .82rem;
}

.location-status.success {
  color: #047857;
}

.location-status.error {
  color: #b91c1c;
}

.manual-location-note {
  margin: 0;
  font-size: .78rem;
}

/* Storefront hub (customer home) */
.storefront-hub-hero {
  margin-bottom: 20px;
  text-align: center;
}

.storefront-hub-eyebrow {
  margin: 0 0 6px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #6366f1;
}

.storefront-hub-title {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 6vw, 2rem);
  font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(135deg, #1e3a8a, #2563eb 45%, #0ea5e9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.storefront-hub-sub {
  margin: 0;
  font-size: .92rem;
  color: var(--muted);
}

.storefront-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.storefront-action-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 128px;
  padding: 14px 12px 12px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .65);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .1);
  transition: transform .15s ease, box-shadow .15s ease;
}

a.storefront-action-card:hover,
a.storefront-action-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, .14);
  color: inherit;
}

.storefront-action-card.is-disabled {
  opacity: .72;
  cursor: not-allowed;
  pointer-events: none;
}

.storefront-action-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: rgba(15, 23, 42, .08);
  color: var(--muted);
}

.storefront-action-emoji {
  font-size: 1.6rem;
  line-height: 1;
}

.storefront-action-name {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
}

.storefront-action-desc {
  font-size: .72rem;
  color: rgba(15, 23, 42, .62);
  line-height: 1.35;
}

.storefront-action-pabili {
  background: linear-gradient(145deg, #dbeafe, #eff6ff 55%, #fff);
}

.storefront-action-browse {
  background: linear-gradient(145deg, #fce7f3, #fdf2f8 55%, #fff);
}

.storefront-action-pasuyo {
  background: linear-gradient(145deg, #d1fae5, #ecfdf5 55%, #fff);
}

.storefront-action-pasakay {
  background: linear-gradient(145deg, #f1f5f9, #f8fafc 55%, #fff);
}

.storefront-hub-foot {
  margin: 18px 0 0;
  text-align: center;
  font-size: .76rem;
  color: var(--muted);
}

.storefront-field-hint {
  margin: 6px 0 0;
  font-size: .78rem;
}

.storefront-order-type {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .04em;
  background: #dbeafe;
  color: #1e3a8a;
}

.storefront-order-type--pasuyo {
  background: #d1fae5;
  color: #065f46;
}

.rider-booking-type {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: #dbeafe;
  color: #1e3a8a;
}

.rider-booking-type--pasuyo {
  background: #d1fae5;
  color: #065f46;
}

.rider-edit-link {
  display: inline-flex;
  margin: 10px 0 4px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 700;
  color: #1e3a8a;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  text-decoration: none;
}

.rider-edit-link:hover {
  background: #dbeafe;
  color: #1e3a8a;
}

.rider-edit-page {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px;
}

.rider-edit-back {
  display: inline-block;
  margin-bottom: 10px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--brand-strong);
  text-decoration: none;
}

.rider-edit-original-text {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: .88rem;
}

.rider-edit-original-chat {
  width: 100%;
  min-height: 140px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f1f5f9;
  color: #475569;
  font-family: inherit;
  font-size: .92rem;
  line-height: 1.45;
  resize: none;
  user-select: text;
  cursor: text;
}

.rider-edit-original-chat[readonly] {
  pointer-events: auto;
  opacity: 1;
}

.rider-edit-panel {
  margin-bottom: 14px;
}

.rider-edit-form .storefront-pasuyo-add input {
  flex: 1;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  font-size: .95rem;
}

.storefront-order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.storefront-order-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(147, 197, 253, .35);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}

.storefront-order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.storefront-order-status {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--brand-strong);
}

.storefront-order-status-PendingAcceptance {
  background: #fef9c3;
  color: #854d0e;
}

.storefront-order-status-InProgress,
.storefront-order-status-ForDelivery {
  background: #dbeafe;
  color: #1e40af;
}

.storefront-order-status-Delivered {
  background: #dcfce7;
  color: #166534;
}

.storefront-order-status-Cancelled {
  background: #f1f5f9;
  color: #64748b;
}

.storefront-order-meta {
  margin: 6px 0 0;
  font-size: .76rem;
}

.storefront-order-detail {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  font-size: .85rem;
  white-space: pre-wrap;
  font-family: inherit;
}

.storefront-order-address {
  margin: 8px 0 0;
  font-size: .8rem;
}

.storefront-order-cancel-form {
  margin: 12px 0 0;
}

.storefront-order-cancel-btn {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #fca5a5;
  border-radius: 12px;
  background: #fff;
  color: #b91c1c;
  font-weight: 700;
  cursor: pointer;
}

.storefront-order-cancel-btn:hover {
  background: #fef2f2;
}

.storefront-rating-panel,
.storefront-rating-done {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, #fffbeb, #fff);
  border: 1px solid rgba(251, 191, 36, .45);
}

.storefront-rating-title {
  margin: 0 0 10px;
  font-weight: 800;
  font-size: .92rem;
  color: #92400e;
}

.storefront-rating-form {
  display: grid;
  gap: 10px;
}

.storefront-star-row {
  display: flex;
  gap: 6px;
}

.storefront-star-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: #f1f5f9;
  color: #cbd5e1;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .15s ease, color .15s ease, background .15s ease;
}

.storefront-star-btn.is-on {
  background: #fef3c7;
  color: #f59e0b;
  transform: scale(1.05);
}

.storefront-rating-comment-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
}

.storefront-rating-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-family: inherit;
  font-size: .88rem;
  resize: vertical;
}

.storefront-rating-submit {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: var(--brand-strong);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.storefront-rating-submit:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.storefront-star-display {
  display: flex;
  gap: 4px;
}

.storefront-star-display-item {
  font-size: 1.4rem;
  color: #e2e8f0;
}

.storefront-star-display-item.is-on {
  color: #f59e0b;
}

.storefront-rating-comment-text {
  margin: 8px 0 0;
  font-size: .88rem;
  color: #475569;
}

.storefront-alert-rating-prompt {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #fbbf24;
  color: #92400e;
  font-weight: 600;
}

.order-sample-card--trackable {
  border-color: #bfdbfe;
}

.order-completion-panel {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.order-delivered-at {
  margin: 0 0 8px;
}

.order-missing-proof,
.order-missing-rating {
  margin: 8px 0 0;
  font-size: .85rem;
}

.order-rating-comment {
  margin: 6px 0 0;
  font-size: .88rem;
  color: #475569;
}

.order-sample-card--managed {
  position: relative;
  z-index: 1;
}

.order-franchisee-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #e2e8f0;
  position: relative;
  z-index: 2;
}

.order-assign-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-assign-label {
  margin: 0;
  font-size: .9rem;
  color: #0f172a;
}

.order-assign-empty {
  margin: 0;
  font-size: .88rem;
}

.order-assign-empty a {
  font-weight: 700;
  color: var(--brand-strong, #0f766e);
}

.order-search-form {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.order-search-summary {
  margin: -6px 0 14px;
  font-size: .88rem;
}

.order-assign-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1 1 220px;
}

.order-assign-form select {
  flex: 1 1 160px;
  min-width: 140px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-family: inherit;
  font-size: .88rem;
  background: #fff;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
}

.order-cancel-form {
  margin: 0;
}

.order-action-btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  font-family: inherit;
  pointer-events: auto;
  touch-action: manipulation;
}

.order-action-btn--primary {
  background: var(--brand-strong, #0f766e);
  color: #fff;
}

.order-action-btn--danger {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.order-action-message--error {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.track-hint--link {
  display: inline-block;
  margin-top: 10px;
  font-style: normal;
  font-weight: 700;
  color: var(--brand-strong, #0f766e);
  text-decoration: none;
}

.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;
}

.order-delivery-proof {
  margin-top: 12px;
}

.order-delivery-proof img {
  display: block;
  width: 100%;
  max-width: 280px;
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
}

.order-rider-rating {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}

.order-rider-rating-stars .on,
.order-rider-rating-stars span.on {
  color: #f59e0b;
}

.order-rider-rating-stars span {
  color: #e2e8f0;
  font-size: 1.1rem;
}

.rider-rating-summary {
  margin-bottom: 16px;
}

.rider-rating-average {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
}

.rider-rating-average strong {
  font-size: 2rem;
  color: var(--brand-strong);
}

.rider-rating-stars-display .on,
.rider-rating-reviews .star.on {
  color: #f59e0b;
}

.rider-rating-reviews {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.rider-rating-reviews li {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.storefront-secondary-button {
  margin-top: 4px;
  background: #fff;
  color: var(--brand-strong);
  border: 2px solid var(--brand-strong);
  box-shadow: none;
}

.storefront-secondary-button:hover {
  background: #eff6ff;
}

.storefront-readonly {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.storefront-browse-hint {
  margin-top: 14px;
  font-size: .8rem;
  text-align: center;
}

.storefront-browse-hint a {
  font-weight: 700;
}

.storefront-chat-form {
  margin-top: 4px;
}

.storefront-pasuyo-panel {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(134, 239, 172, .45);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
  margin-bottom: 12px;
}

.storefront-pasuyo-add {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.storefront-pasuyo-add input {
  flex: 1;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
}

.storefront-pasuyo-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  cursor: pointer;
}

.storefront-pasuyo-add-icon {
  display: block;
  flex-shrink: 0;
}

.storefront-pasuyo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.storefront-pasuyo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  font-size: .9rem;
}

.storefront-pasuyo-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.storefront-pasuyo-set-address-btn {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 4px 12px rgba(5, 150, 105, .28);
  cursor: pointer;
  white-space: nowrap;
}

.storefront-pasuyo-set-address-btn:hover {
  filter: brightness(1.05);
}

.rider-edit-address-banner {
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  font-size: .86rem;
}

.rider-edit-address-banner strong {
  display: block;
  margin-bottom: 4px;
  color: #78350f;
}

.rider-edit-address-banner p {
  margin: 0;
}

.rider-edit-address-btn-preview {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
}

.storefront-pasuyo-remove {
  border: 0;
  background: transparent;
  color: #b91c1c;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
}

.storefront-pasuyo-empty {
  margin: 8px 0 0;
  font-size: .78rem;
}

.storefront-action-pasuyo-btn {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 12px 28px rgba(5, 150, 105, .3);
}

.storefront-pasuyo-item-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.storefront-pasuyo-item-task {
  font-size: .92rem;
  color: #14532d;
}

.storefront-pasuyo-item-address {
  font-size: .78rem;
  line-height: 1.35;
}

.storefront-pasuyo-item-editable {
  cursor: pointer;
  border-radius: 8px;
  padding: 2px 4px;
  margin: -2px -4px;
  transition: background-color .15s ease;
}

.storefront-pasuyo-item-editable:hover,
.storefront-pasuyo-item-editable:focus {
  outline: none;
  background: rgba(5, 150, 105, .12);
}

.storefront-pasuyo-item-needs-address {
  border-color: #fcd34d;
  background: #fffbeb;
}

.storefront-pasuyo-item-address-action {
  color: #b45309;
  font-weight: 600;
}

.commission-preview {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.commission-preview-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.commission-report-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.commission-settlements-table {
  width: 100%;
  font-size: .88rem;
}

input.is-readonly:disabled {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.storefront-pasuyo-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 16px;
}

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

.storefront-pasuyo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .5);
  backdrop-filter: blur(2px);
}

.storefront-pasuyo-modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 440px);
  max-height: min(90vh, 680px);
  padding: 0;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(134, 239, 172, .55);
  box-shadow: 0 28px 60px rgba(15, 23, 42, .22);
  overflow: hidden;
}

.pasuyo-modal-header {
  padding: 20px 20px 16px;
  background: linear-gradient(165deg, #ecfdf5 0%, #f8fffb 55%, #fff 100%);
  border-bottom: 1px solid #d1fae5;
}

.storefront-pasuyo-modal-card h3 {
  margin: 0 0 12px;
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: -.02em;
  color: #065f46;
}

.pasuyo-modal-task {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid #bbf7d0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.pasuyo-modal-task-label {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #64748b;
}

.pasuyo-modal-task-text {
  display: block;
  font-size: .92rem;
  line-height: 1.35;
  color: #14532d;
}

.pasuyo-modal-body {
  flex: 1;
  overflow: auto;
  min-width: 0;
  padding: 16px 20px 12px;
}

.pasuyo-section-label {
  display: block;
  margin: 0 0 10px;
  padding: 0;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #94a3b8;
}

.pasuyo-address-modes {
  border: 0;
  margin: 0 0 16px;
  padding: 0;
  min-width: 0;
}

.pasuyo-address-mode-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 8px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e8eef5;
}

.storefront-pasuyo-modal .pasuyo-address-mode {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  cursor: pointer;
  font-weight: 400;
  font-size: inherit;
  text-align: left;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.storefront-pasuyo-modal .pasuyo-address-mode:hover {
  border-color: #d1fae5;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}

.storefront-pasuyo-modal .pasuyo-address-mode:has(.pasuyo-address-mode-input:checked) {
  border-color: #6ee7b7;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  box-shadow: 0 6px 18px rgba(16, 185, 129, .14);
}

.storefront-pasuyo-modal .pasuyo-address-mode:has(.pasuyo-address-mode-input:focus-visible) {
  outline: 2px solid #34d399;
  outline-offset: 2px;
}

.storefront-pasuyo-modal .pasuyo-address-mode-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pasuyo-address-mode-icon,
.pasuyo-address-mode-copy,
.pasuyo-address-mode-check {
  pointer-events: none;
}

.pasuyo-address-mode-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #64748b;
  flex: 0 0 42px;
  transition: background-color .18s ease, color .18s ease;
}

.storefront-pasuyo-modal .pasuyo-address-mode:has(.pasuyo-address-mode-input:checked) .pasuyo-address-mode-icon {
  background: #a7f3d0;
  color: #047857;
}

.pasuyo-address-mode-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.pasuyo-address-mode-title {
  display: block;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.35;
  color: #0f172a;
}

.storefront-pasuyo-modal .pasuyo-address-mode:has(.pasuyo-address-mode-input:checked) .pasuyo-address-mode-title {
  color: #065f46;
}

.pasuyo-address-mode-desc {
  display: block;
  margin-top: 2px;
  font-size: .77rem;
  font-weight: 500;
  line-height: 1.4;
  color: #64748b;
}

.pasuyo-address-mode-check {
  width: 22px;
  height: 22px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  flex: 0 0 22px;
  transition: border-color .18s ease, background-color .18s ease, background-image .18s ease;
}

.storefront-pasuyo-modal .pasuyo-address-mode:has(.pasuyo-address-mode-input:checked) .pasuyo-address-mode-check {
  border-color: #059669;
  background-color: #059669;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.pasuyo-mode-detail {
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

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

.storefront-pasuyo-modal .pasuyo-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  width: 100%;
  margin: 0;
}

.storefront-pasuyo-modal .pasuyo-field + .pasuyo-field,
.storefront-pasuyo-modal .pasuyo-merchant-preview,
.storefront-pasuyo-modal .pasuyo-info-note {
  margin-top: 12px;
}

.storefront-pasuyo-modal .pasuyo-field-label {
  display: block;
  width: 100%;
  margin: 0;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: #64748b;
}

.storefront-pasuyo-modal .pasuyo-field-input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  font: inherit;
  font-weight: 500;
  color: #0f172a;
  box-sizing: border-box;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.storefront-pasuyo-modal select.pasuyo-field-input {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.storefront-pasuyo-modal .pasuyo-field-input:focus {
  outline: none;
  border-color: #34d399;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, .18);
}

.storefront-pasuyo-modal .pasuyo-field-input:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: .9;
}

.pasuyo-manual-fields {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.pasuyo-merchant-search-wrap {
  position: relative;
}

.storefront-pasuyo-modal .pasuyo-merchant-search {
  padding-left: 38px;
  background-color: #f8fafc;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}

.storefront-pasuyo-modal .pasuyo-merchant-search:focus {
  background-color: #fff;
}

.pasuyo-merchant-results {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  margin-top: 6px;
  border: 1px solid #d1fae5;
  border-radius: 12px;
  background: #fff;
  max-height: 180px;
  overflow: auto;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .12);
}

.pasuyo-merchant-results .scope-search-result {
  border-bottom-color: #ecfdf5;
}

.pasuyo-merchant-results .scope-search-result:hover,
.pasuyo-merchant-results .scope-search-result:focus-visible {
  background: #ecfdf5;
  color: #065f46;
}

.storefront-pasuyo-modal .pasuyo-merchant-preview {
  padding: 11px 13px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border: 1px solid #86efac;
  font-size: .78rem;
  line-height: 1.45;
  color: #065f46;
}

.storefront-pasuyo-modal .pasuyo-info-note {
  padding: 12px 13px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  font-size: .8rem;
  line-height: 1.45;
  color: #64748b;
}

.pasuyo-modal-error {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: .8rem;
}

.pasuyo-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 10px;
  padding: 16px 20px 20px;
  border-top: 1px solid #ecfdf5;
  background: linear-gradient(180deg, #fff 0%, #f8fffb 100%);
}

.storefront-pasuyo-modal button.pasuyo-modal-cancel,
.storefront-pasuyo-modal button.pasuyo-modal-confirm {
  min-height: 48px;
  border-radius: 14px;
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0 16px;
}

.storefront-pasuyo-modal button.pasuyo-modal-cancel {
  border: 1.5px solid #cbd5e1;
  background: #fff;
  color: #475569;
}

.storefront-pasuyo-modal button.pasuyo-modal-cancel:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.storefront-pasuyo-modal button.pasuyo-modal-confirm {
  border: 0;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  box-shadow: 0 10px 24px rgba(5, 150, 105, .3);
}

.storefront-pasuyo-modal button.pasuyo-modal-confirm:hover {
  background: linear-gradient(135deg, #047857, #059669);
}

.storefront-construction-card {
  text-align: center;
  padding: 28px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .92);
  border: 1px dashed rgba(148, 163, 184, .6);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.storefront-construction-emoji {
  display: block;
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.storefront-construction-card h1 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 900;
}

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

@media (max-width: 360px) {
  .storefront-action-grid {
    grid-template-columns: 1fr;
  }

  .storefront-action-card {
    min-height: 108px;
  }
}

.storefront-login-modal-content {
  border-radius: 22px;
  border: 1px solid rgba(147, 197, 253, .45);
  box-shadow: 0 20px 48px rgba(15, 23, 42, .16);
}

.storefront-login-modal-title {
  font-size: 1.15rem;
  font-weight: 900;
}

.storefront-login-modal-dismiss {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
}

.storefront-login-modal .modal-footer {
  padding-bottom: 1.25rem;
}

.storefront-booking-section {
  margin-bottom: 4px;
}

.storefront-booking-section + .storefront-booking-section {
  padding-top: 4px;
  border-top: 1px dashed rgba(148, 163, 184, .35);
}

.required-mark {
  color: #dc2626;
  font-weight: 800;
}

.storefront-booking-foot {
  margin: 8px 0 0;
  text-align: center;
  font-size: .74rem;
}

/* Rider bookings hub */
.rider-bookings-page {
  display: grid;
  gap: 20px;
  max-width: 100%;
  overflow-x: clip;
}

.rider-wallet-blocked-banner {
  margin: 0;
}

.rider-wallet-blocked-banner p {
  margin: 6px 0 0;
  font-size: .88rem;
}

.rider-wallet-topup-link {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
  color: #1d4ed8;
}

.rider-bookings-hero {
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(147, 197, 253, .4);
  background: linear-gradient(145deg, #ffffff 0%, #f0f9ff 45%, #e0f2fe 100%);
  box-shadow: 0 20px 48px rgba(15, 23, 42, .08);
  overflow: hidden;
  max-width: 100%;
}

.rider-bookings-hero-top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 18px;
}

.rider-bookings-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rider-bookings-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .2);
}

.rider-bookings-eyebrow {
  margin: 0 0 4px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #0369a1;
}

.rider-bookings-hero h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.1;
  color: var(--brand-strong);
}

.rider-bookings-greeting {
  margin: 6px 0 0;
  font-size: .88rem;
  color: var(--muted);
}

.rider-bookings-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.rider-bookings-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .85);
  border: 1px solid rgba(147, 197, 253, .35);
}

.rider-bookings-stat-value {
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
  color: var(--brand-strong);
}

.rider-bookings-stat-label {
  margin-top: 4px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.rider-online-panel {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .35);
  background: rgba(255, 255, 255, .92);
  overflow: hidden;
  max-width: 100%;
}

.rider-online-panel.is-online {
  border-color: rgba(52, 211, 153, .55);
  background: linear-gradient(135deg, rgba(236, 253, 245, .95), rgba(255, 255, 255, .98));
  box-shadow: 0 0 0 1px rgba(52, 211, 153, .15), 0 12px 32px rgba(16, 185, 129, .12);
}

.rider-online-panel.is-busy {
  border-color: rgba(251, 191, 36, .55);
  background: linear-gradient(135deg, rgba(255, 251, 235, .95), #fff);
}

.rider-online-panel.is-offline {
  border-color: rgba(148, 163, 184, .4);
  background: rgba(248, 250, 252, .95);
}

.rider-online-panel-main {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.rider-pulse-indicator {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}

.rider-pulse-indicator--inline {
  width: 28px;
  height: 28px;
}

.rider-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(34, 197, 94, .35);
  animation: rider-pulse-beat 1.6s ease-out infinite;
}

.rider-pulse-indicator.is-busy .rider-pulse-ring {
  background: rgba(245, 158, 11, .35);
  animation-duration: 2.2s;
}

.rider-pulse-ring--delay {
  animation-delay: .8s;
}

.rider-pulse-core {
  position: absolute;
  inset: 12px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, .65);
}

.rider-pulse-indicator--inline .rider-pulse-core {
  inset: 8px;
}

.rider-pulse-indicator.is-busy .rider-pulse-core {
  background: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, .55);
}

.rider-pulse-indicator.is-offline .rider-pulse-core {
  inset: 14px;
  background: #94a3b8;
  box-shadow: none;
}

@keyframes rider-pulse-beat {
  0% {
    transform: scale(.55);
    opacity: .9;
  }
  70% {
    transform: scale(1.35);
    opacity: 0;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.rider-online-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f172a;
}

.rider-online-panel.is-online .rider-online-title {
  color: #047857;
}

.rider-online-sub {
  margin: 4px 0 0;
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.35;
}

.rider-online-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.rider-online-form {
  margin: 0;
}

.rider-online-ready-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-height: 48px;
  padding: 0 18px;
  white-space: normal;
  text-align: left;
  border-radius: 999px;
  border: 2px solid #34d399;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: .88rem;
  font-weight: 900;
  letter-spacing: .01em;
  box-shadow: 0 8px 24px rgba(16, 185, 129, .35);
  cursor: default;
  user-select: none;
}

.rider-online-ready-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, .7);
  animation: rider-ready-dot-beat 1.2s ease-in-out infinite;
}

@keyframes rider-ready-dot-beat {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, .7);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
  }
}

.rider-go-online-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
  min-height: 48px;
  padding: 0 20px;
  white-space: normal;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  font-size: .9rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(37, 99, 235, .3);
}

.rider-go-online-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #0284c7);
}

.rider-go-offline-btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}

.rider-go-offline-btn:hover {
  background: #f8fafc;
}

.rider-busy-badge {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(245, 158, 11, .15);
  color: #b45309;
  font-size: .82rem;
  font-weight: 800;
}

.rider-bookings-toast--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.rider-bookings-toast {
  margin: 0;
}

.rider-bookings-section {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(147, 197, 253, .3);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
}

.rider-bookings-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.rider-bookings-section-head h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--brand-strong);
}

.rider-bookings-section-head .muted {
  margin: 4px 0 0;
  font-size: .8rem;
}

.rider-section-badge {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--brand-strong);
  font-size: .72rem;
  font-weight: 900;
}

.rider-bookings-empty {
  padding: 20px;
  border-radius: 14px;
  border: 1px dashed #cbd5e1;
  text-align: center;
  color: var(--muted);
}

.rider-bookings-empty p {
  margin: 0;
}

.rider-bookings-empty p + p {
  margin-top: 6px;
}

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

.rider-booking-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.rider-booking-card--incoming {
  border-color: rgba(147, 197, 253, .45);
  box-shadow: 0 4px 16px rgba(37, 99, 235, .06);
}

.rider-booking-card--active {
  border-color: rgba(52, 211, 153, .4);
  background: linear-gradient(180deg, #fff, #f0fdf4);
}

.rider-booking-card--highlight {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .25), 0 8px 24px rgba(22, 163, 74, .15);
  animation: rider-booking-highlight 1.2s ease-out 2;
}

@keyframes rider-booking-highlight {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.rider-booking-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.rider-booking-ref {
  font-size: .95rem;
  font-weight: 900;
  color: var(--brand-strong);
}

.rider-booking-age,
.rider-booking-status {
  font-size: .74rem;
  font-weight: 800;
  color: var(--muted);
}

.rider-booking-status {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(52, 211, 153, .15);
  color: #047857;
}

.rider-booking-customer {
  margin: 0 0 8px;
  font-size: .9rem;
}

.rider-booking-detail {
  margin: 0 0 8px;
  font-size: .86rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.rider-booking-address {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 12px;
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.4;
}

.rider-booking-address svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  fill: #64748b;
}

.rider-booking-errands {
  margin: 0 0 12px;
}

.rider-booking-errand {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #e2e8f0;
}

.rider-booking-errand:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.rider-booking-errand-task {
  margin: 0 0 6px;
  font-size: .86rem;
  line-height: 1.4;
  color: #0f172a;
}

.rider-booking-route-label {
  display: block;
  margin-bottom: 2px;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.rider-booking-pickup {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: .8rem;
  line-height: 1.4;
  color: #475569;
}

.rider-booking-pickup svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  fill: #f97316;
}

.rider-booking-destination {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
  border: 1.5px solid #6ee7b7;
}

.rider-booking-destination-label {
  margin: 0 0 8px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #047857;
}

.rider-booking-address--destination {
  margin: 0;
  color: #0f172a;
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.45;
}

.rider-booking-address--destination svg {
  fill: #059669;
}

.rider-booking-destination-hint {
  margin: 8px 0 0;
  font-size: .72rem;
  line-height: 1.35;
}

.rider-booking-form {
  margin: 0;
}

.rider-accept-btn {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.rider-accept-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #0284c7);
}

.rider-complete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: #059669;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

.rider-complete-btn:hover {
  background: #047857;
  color: #fff;
}

.rider-delivery-page {
  display: grid;
  gap: 16px;
}

.rider-delivery-back {
  color: var(--brand-strong);
  font-weight: 700;
  text-decoration: none;
}

.rider-delivery-header h1 {
  margin: 4px 0 8px;
  font-size: 1.5rem;
}

.rider-delivery-summary {
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(147, 197, 253, .45);
}

.rider-delivery-summary p {
  margin: 0 0 8px;
}

.rider-delivery-detail {
  margin-top: 8px;
  font-size: .9rem;
  color: var(--muted);
}

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

.rider-delivery-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  font-weight: 600;
}

.rider-delivery-photo-zone {
  position: relative;
  min-height: 200px;
  padding: 20px;
  border-radius: 18px;
  border: 2px dashed rgba(37, 99, 235, .55);
  background: linear-gradient(145deg, #f0f9ff, #fff);
  text-align: center;
  cursor: pointer;
}

.rider-delivery-file-input {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.rider-delivery-photo-prompt {
  display: grid;
  gap: 6px;
  pointer-events: none;
}

.rider-delivery-photo-icon {
  font-size: 2rem;
}

.rider-delivery-photo-title {
  font-weight: 900;
  color: var(--brand-strong);
}

.rider-delivery-photo-hint {
  font-size: .82rem;
  color: var(--muted);
}

.rider-delivery-preview-wrap {
  display: grid;
  gap: 10px;
}

.rider-delivery-preview {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 16px;
  border: 2px solid rgba(52, 211, 153, .5);
}

.rider-delivery-retake {
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.rider-delivery-submit:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.rider-inline-delivery {
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, #ecfdf5, #fff);
  border: 2px solid #34d399;
}

.rider-inline-delivery-label {
  margin: 0 0 10px;
  font-weight: 800;
  font-size: .92rem;
  color: #047857;
}

.rider-inline-delivery-form {
  display: grid;
  gap: 10px;
}

.rider-inline-file {
  display: block;
  width: 100%;
  padding: 10px;
  border: 2px dashed #3b82f6;
  border-radius: 12px;
  background: #fff;
  font-size: .9rem;
  cursor: pointer;
}

.rider-booking-locked {
  margin: 0;
  font-size: .78rem;
}

@media (max-width: 640px) {
  .rider-online-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .rider-online-ready-btn,
  .rider-go-online-btn {
    justify-content: center;
    width: 100%;
  }

  .rider-go-offline-btn {
    width: 100%;
  }
}

/* Rider wallet (deposit / withdrawal / history) */
.rider-wallet-screen {
  display: grid;
  gap: 12px;
  max-width: 100%;
  margin: 0 auto;
  overflow-x: clip;
}

.rider-wallet-top {
  padding: 4px 2px 0;
}

.rider-wallet-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rider-wallet-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .18);
}

.rider-wallet-eyebrow {
  margin: 0;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #0369a1;
}

.rider-wallet-rider-name {
  margin: 2px 0 0;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.rider-wallet-balance-card {
  padding: 18px 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, #1e40af 0%, #2563eb 50%, #0ea5e9 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .22);
}

.rider-wallet-balance-label {
  margin: 0;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .92;
}

.rider-wallet-balance-value {
  margin: 8px 0 0;
  font-size: clamp(1.75rem, 8vw, 2.25rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em;
}

.rider-wallet-balance-hint {
  margin: 10px 0 0;
  font-size: .72rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, .88);
}

.rider-wallet-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #e2e8f0;
}

.rider-wallet-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 6px;
  border-radius: 9px;
  font-size: .8rem;
  font-weight: 800;
  line-height: 1.2;
  color: #64748b;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.rider-wallet-nav-link.is-active {
  background: #fff;
  color: var(--brand-strong);
  box-shadow: 0 2px 6px rgba(15, 23, 42, .1);
}

.rider-wallet-toast {
  margin: 0;
}

.rider-wallet-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .05);
}

.rider-wallet-panel-intro {
  display: grid;
  gap: 6px;
}

.rider-wallet-panel-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--brand-strong);
  line-height: 1.25;
}

.rider-wallet-panel-desc {
  margin: 0;
  font-size: .8rem;
  line-height: 1.45;
  color: #64748b;
}

.mobile-wallet-user a.rider-wallet-cta,
a.rider-wallet-cta,
.mobile-wallet-user .rider-wallet-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff !important;
  font-size: .92rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .2);
  box-sizing: border-box;
  cursor: pointer;
}

.mobile-wallet-user a.rider-wallet-cta:hover,
a.rider-wallet-cta:hover {
  background: linear-gradient(135deg, #1d4ed8, #0284c7);
  color: #fff !important;
}

.rider-wallet-cta--secondary {
  width: auto;
  min-height: 42px;
  padding-inline: 20px;
}

.rider-wallet-filter {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.rider-wallet-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.rider-wallet-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rider-wallet-field label {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
}

.rider-wallet-field input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  font-size: .88rem;
  box-sizing: border-box;
}

.mobile-wallet-user .rider-wallet-filter-btn,
.rider-wallet-filter-btn {
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--brand-strong);
  font-size: .84rem;
  font-weight: 800;
  border: 1px solid #bfdbfe;
  cursor: pointer;
}

.rider-wallet-empty {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 20px 16px;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #64748b;
}

.rider-wallet-empty p {
  margin: 0;
}

.rider-wallet-tx-list {
  display: grid;
  gap: 8px;
}

.rider-wallet-tx {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.rider-wallet-tx.is-approved {
  border-color: #86efac;
  background: #f0fdf4;
}

.rider-wallet-tx.is-pending {
  border-color: #fcd34d;
  background: #fffbeb;
}

.rider-wallet-tx.is-rejected {
  border-color: #fca5a5;
  background: #fef2f2;
}

.rider-wallet-tx-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.rider-wallet-tx-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.rider-wallet-tx-type {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #64748b;
}

.rider-wallet-tx-amount {
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f172a;
}

.rider-wallet-tx-status {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.2;
  background: #e2e8f0;
  color: #475569;
}

.rider-wallet-tx.is-approved .rider-wallet-tx-status {
  background: #bbf7d0;
  color: #047857;
}

.rider-wallet-tx.is-pending .rider-wallet-tx-status {
  background: #fde68a;
  color: #b45309;
}

.rider-wallet-tx.is-rejected .rider-wallet-tx-status {
  background: #fecaca;
  color: #b91c1c;
}

.rider-wallet-tx-date {
  margin: 8px 0 0;
  font-size: .72rem;
  color: #64748b;
}

.rider-wallet-tx-notes {
  margin: 6px 0 0;
  font-size: .82rem;
  line-height: 1.4;
  color: #334155;
}

.rider-wallet-tx-review {
  margin: 4px 0 0;
  font-size: .75rem;
  color: #64748b;
}

.rider-wallet-tx-proof {
  display: inline-block;
  margin-top: 8px;
  font-size: .78rem;
  font-weight: 800;
  color: var(--brand-strong);
}

.rider-wallet-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.rider-wallet-page-btn {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--brand-strong);
  font-size: .8rem;
  font-weight: 800;
  text-decoration: none;
}

.rider-wallet-page-label {
  font-size: .78rem;
  font-weight: 800;
  color: #64748b;
}

.rider-wallet-form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  max-width: 420px;
  margin: 0 auto 12px;
}

.rider-wallet-form-head h1 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--brand-strong);
}

.rider-wallet-form-shell {
  max-width: 420px;
  margin: 0 auto;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.rider-wallet-foot {
  margin: 0;
  text-align: center;
  font-size: .82rem;
}

.rider-wallet-foot a {
  font-weight: 800;
  color: var(--brand-strong);
}

.mobile-wallet-user .rider-wallet-screen {
  padding-bottom: 88px;
}

.rider-wallet-back-link {
  flex-shrink: 0;
  font-size: .82rem;
  font-weight: 800;
  color: var(--brand-strong);
  text-decoration: none;
}

.rider-wallet-form-fields {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.rider-wallet-form-shell .rider-wallet-field textarea {
  min-height: 88px;
  resize: vertical;
}

.mobile-wallet-user .rider-wallet-form-shell button.rider-wallet-cta {
  width: 100%;
}

/* Rider wallet submit (deposit / withdrawal form) */
.rider-wallet-submit-screen {
  gap: 14px;
}

.rider-wallet-submit-header {
  display: grid;
  gap: 6px;
}

.rider-wallet-submit-back {
  justify-self: start;
  font-size: .84rem;
  font-weight: 800;
  color: var(--brand-strong);
  text-decoration: none;
}

.rider-wallet-submit-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.2;
  color: var(--brand-strong);
}

.rider-wallet-submit-lead {
  margin: 0;
  font-size: .84rem;
  line-height: 1.45;
  color: #64748b;
}

.rider-wallet-balance-card--compact {
  padding: 14px 16px;
}

.rider-wallet-balance-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rider-wallet-balance-value--sm {
  font-size: 1.25rem !important;
  margin-top: 4px !important;
}

.rider-wallet-submit-panel {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.rider-wallet-submit-form {
  display: grid;
  gap: 0;
  margin: 0;
}

.rider-wallet-submit-form .rider-wallet-field {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
}

.rider-wallet-submit-form .rider-wallet-field:last-of-type {
  border-bottom: 0;
}

.rider-wallet-submit-form label {
  margin: 0;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #64748b;
}

.rider-wallet-submit-form input[type="number"],
.rider-wallet-submit-form textarea {
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  box-sizing: border-box;
}

.rider-wallet-submit-form textarea {
  min-height: 96px;
  font-weight: 500;
  line-height: 1.45;
  resize: vertical;
}

.rider-wallet-submit-form input[type="number"]:focus,
.rider-wallet-submit-form textarea:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .25);
}

.rider-wallet-file-wrap {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px dashed #94a3b8;
  border-radius: 10px;
  background: #f8fafc;
}

.rider-wallet-submit-form input[type="file"] {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: .82rem;
  font-weight: 600;
  color: #334155;
}

.rider-wallet-field-hint {
  min-height: 0;
  margin: 0;
  font-size: .75rem;
  line-height: 1.35;
  color: #64748b;
}

.rider-wallet-field-hint.field-validation-error,
.rider-wallet-submit-form .field-validation-error {
  color: #b91c1c;
  font-weight: 700;
}

.rider-wallet-submit-panel .rider-wallet-form-heading + .rider-wallet-submit-form {
  margin-top: 0;
}

.rider-wallet-submit-form input.input-validation-error,
.rider-wallet-submit-form textarea.input-validation-error {
  border-color: #f87171;
  background: #fef2f2;
}

.rider-wallet-new-action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  box-sizing: border-box;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
  transition: transform .12s ease, box-shadow .12s ease;
}

.rider-wallet-new-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, .12);
}

.rider-wallet-new-action.is-deposit {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #0ea5e9 100%);
  color: #fff;
}

.rider-wallet-new-action.is-withdraw {
  background: linear-gradient(135deg, #0f766e 0%, #059669 50%, #10b981 100%);
  color: #fff;
}

.rider-wallet-new-action-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .22);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.rider-wallet-new-action-copy {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.rider-wallet-new-action-copy strong {
  font-size: .95rem;
  font-weight: 900;
  line-height: 1.2;
}

.rider-wallet-new-action-copy span {
  font-size: .74rem;
  line-height: 1.35;
  opacity: .92;
}

.rider-wallet-new-action-chevron {
  flex-shrink: 0;
  font-size: 1.4rem;
  font-weight: 300;
  opacity: .85;
}

.rider-wallet-submit-hero {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .05);
}

.rider-wallet-submit-hero.is-deposit .rider-wallet-submit-hero-icon {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1d4ed8;
}

.rider-wallet-submit-hero.is-withdraw .rider-wallet-submit-hero-icon {
  background: linear-gradient(135deg, #ccfbf1, #99f6e4);
  color: #047857;
}

.rider-wallet-submit-hero-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.rider-wallet-submit-hero-icon svg {
  fill: currentColor;
}

.rider-wallet-form-heading {
  margin: 0;
  padding: 14px 16px 0;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #64748b;
}

.rider-wallet-submit-footer {
  padding: 4px 16px 16px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}

.mobile-wallet-user .rider-wallet-submit-form {
  margin-top: 0;
}

.mobile-wallet-user .rider-wallet-submit-form button.rider-wallet-cta {
  width: 100%;
  min-height: 48px;
  margin: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff !important;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .22);
}

.rider-wallet-submit-form .rider-wallet-submit-footer .rider-wallet-cta {
  margin: 0;
  width: 100%;
}

/* Rider / customer wallet — all screen sizes (not only mobile) */
body.mobile-wallet-user {
  background: #eef4ff;
}

body.mobile-wallet-user .admin-shell {
  display: block;
}

/* Riders: bottom nav only — no sidebar or hamburger */
body.rider-app-user .admin-sidebar,
body.rider-app-user .menu-backdrop,
body.rider-app-user .menu-button {
  display: none !important;
}

body.rider-app-user .topbar {
  justify-content: space-between;
}

body.rider-app-user .mobile-brand {
  margin-right: auto;
}

body.mobile-wallet-user:not(.rider-app-user) .admin-sidebar {
  display: block !important;
  position: fixed;
  top: 0;
  left: 0;
  width: min(300px, 88vw);
  height: 100dvh;
  z-index: 120;
  transform: translateX(-105%);
  transition: transform 0.2s ease;
}

body.mobile-wallet-user:not(.rider-app-user).menu-open .admin-sidebar {
  transform: translateX(0);
  box-shadow: 18px 0 48px rgba(15, 23, 42, .35);
}

body.mobile-wallet-user:not(.rider-app-user) .menu-button,
body.mobile-wallet-user:not(.rider-app-user) .sidebar-close {
  display: inline-grid !important;
}

body.mobile-wallet-user:not(.rider-app-user).menu-open .menu-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(15, 23, 42, .45);
}

body.mobile-wallet-user:not(.rider-app-user).menu-open {
  overflow: hidden;
}

body.mobile-wallet-user .topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  justify-content: flex-start;
  gap: 8px;
  min-height: 62px;
  padding: 0 12px;
  border-bottom: 0;
  background: rgba(238, 244, 255, .92);
  backdrop-filter: blur(12px);
}

body.mobile-wallet-user .topbar .dropdown {
  margin-left: auto;
}

body.mobile-wallet-user .mobile-brand {
  display: inline-flex;
}

body.mobile-wallet-user .page-shell {
  padding: 12px 12px 100px;
  max-width: 480px;
  margin: 0 auto;
}

body.mobile-wallet-user .user-menu-button {
  max-width: 42vw;
  border-radius: 999px;
  padding: 0 10px;
}

body.mobile-wallet-user .dropdown-menu {
  border-radius: 14px;
}

body.mobile-wallet-user .rider-wallet-screen {
  padding-bottom: 88px;
}

body.mobile-wallet-user .mobile-bottom-nav {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 200;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  min-height: 68px;
  padding: 8px;
  border: 1px solid rgba(147, 197, 253, .5);
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 16px 36px rgba(15, 23, 42, .18);
  backdrop-filter: blur(16px);
}

body.mobile-wallet-user .mobile-bottom-nav a {
  display: grid;
  place-items: center;
  gap: 3px;
  border-radius: 16px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
  text-decoration: none;
}

body.mobile-wallet-user .mobile-bottom-nav a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

body.mobile-wallet-user .rider-bottom-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

body.mobile-wallet-user .rider-bottom-nav a span:not(.bottom-avatar) {
  font-size: .62rem;
}

@media (min-width: 761px) {
  body.mobile-wallet-user .mobile-bottom-nav {
    left: 50%;
    right: auto;
    width: min(480px, calc(100% - 24px));
    translate: -50% 0;
  }
}

/* Dedicated rider shell (no admin sidebar / hamburger) */
html.rider-app-html,
html:has(body.rider-app-shell) {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body.rider-app-shell {
  margin: 0;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: #eef4ff;
}

.rider-app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 56px;
  max-width: 100%;
  padding: 0 14px;
  overflow-x: clip;
  background: rgba(238, 244, 255, .95);
  backdrop-filter: blur(12px);
}

.rider-app-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  font-weight: 900;
  color: var(--brand-strong);
  text-decoration: none;
}

.rider-app-brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rider-app-header .dropdown {
  flex: 0 1 auto;
  max-width: 52%;
  min-width: 0;
}

.rider-app-header .user-menu-button {
  max-width: 100%;
}

.rider-app-brand img {
  width: 36px;
  height: 36px;
}

.rider-app-username {
  max-width: 38vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rider-app-main {
  width: 100%;
  max-width: 480px;
  min-height: calc(100dvh - 56px - 88px);
  margin: 0 auto;
  padding: 12px 12px 100px;
  overflow-x: clip;
  box-sizing: border-box;
}

.rider-app-main > * {
  max-width: 100%;
  min-width: 0;
}

/* Rider bottom nav: see wwwroot/css/rider-app.css */

/* Rider shell: prevent page-wide horizontal scroll */
body.rider-app-shell .wallet-app-screen,
body.rider-app-shell .wallet-panel,
body.rider-app-shell .profile-page,
body.rider-app-shell .profile-panel {
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

body.rider-app-shell .mobile-subnav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  overflow-x: visible;
  padding-bottom: 0;
}

body.rider-app-shell .mobile-subnav a {
  flex: none;
  min-width: 0;
  padding: 0 6px;
  font-size: .62rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.rider-app-shell .order-cover,
body.rider-app-shell .profile-cover {
  max-width: 100%;
  padding: 18px 16px;
  box-sizing: border-box;
}

body.rider-app-shell .profile-cover {
  grid-template-columns: 1fr;
  min-height: 0;
}

body.rider-app-shell .form-grid.two,
body.rider-app-shell .upload-grid {
  grid-template-columns: 1fr;
}

body.rider-app-shell .rider-booking-detail,
body.rider-app-shell .rider-booking-address,
body.rider-app-shell .rider-wallet-tx-notes {
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.rider-app-shell .rider-online-panel-main {
  overflow: hidden;
}

/* Floating per-order chat (customer + rider) */
.pikap-order-chat-root {
  position: fixed;
  z-index: 2147483600;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(88px, calc(72px + env(safe-area-inset-bottom)));
  font-family: inherit;
}

body.storefront-page .pikap-order-chat-root {
  bottom: max(24px, env(safe-area-inset-bottom));
}

.pikap-order-chat-fab {
  position: relative;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 10px 28px rgba(37, 99, 235, .45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pikap-order-chat-fab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  line-height: 0;
  pointer-events: none;
}

.pikap-order-chat-fab-icon svg {
  display: block;
  width: 26px;
  height: 26px;
}

.pikap-order-chat-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}

.pikap-order-chat-panel {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(96px, calc(80px + env(safe-area-inset-bottom)));
  width: min(100vw - 24px, 380px);
  max-height: min(72dvh, 560px);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(147, 197, 253, .5);
  box-shadow: 0 20px 50px rgba(15, 23, 42, .22);
  overflow: hidden;
}

body.storefront-page .pikap-order-chat-panel {
  bottom: max(88px, calc(72px + env(safe-area-inset-bottom)));
}

.pikap-order-chat-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 14px 10px;
  background: linear-gradient(180deg, #eff6ff, #fff);
  border-bottom: 1px solid rgba(147, 197, 253, .35);
}

.pikap-order-chat-panel-title strong {
  display: block;
  font-size: 1rem;
}

.pikap-order-chat-subtitle {
  display: block;
  margin-top: 2px;
  font-size: .78rem;
  color: #64748b;
}

.pikap-order-chat-close {
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
}

.pikap-order-chat-thread-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  overflow-x: auto;
  border-bottom: 1px solid #e2e8f0;
}

.pikap-order-chat-tab {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.pikap-order-chat-tab.is-active {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.pikap-order-chat-tab-badge {
  margin-left: 6px;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: .68rem;
}

.pikap-order-chat-messages {
  overflow-y: auto;
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
  background: #f8fafc;
}

.pikap-order-chat-empty {
  margin: 0;
  text-align: center;
  color: #64748b;
  font-size: .86rem;
}

.pikap-order-chat-bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .35);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}

.pikap-order-chat-bubble.is-mine {
  margin-left: auto;
  background: #dbeafe;
  border-color: #93c5fd;
}

.pikap-order-chat-meta {
  display: block;
  margin-bottom: 4px;
  font-size: .68rem;
  font-weight: 700;
  color: #64748b;
}

.pikap-order-chat-text {
  margin: 0;
  font-size: .9rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.pikap-order-chat-image-link {
  display: block;
  margin-top: 6px;
}

.pikap-order-chat-image-link img {
  max-width: 100%;
  border-radius: 12px;
  display: block;
}

.pikap-order-chat-compose {
  padding: 10px 12px 12px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.pikap-order-chat-compose.is-readonly {
  opacity: .75;
}

.pikap-order-chat-compose-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: end;
}

.pikap-order-chat-attach {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: #f8fafc;
}

.pikap-order-chat-attach.is-disabled {
  pointer-events: none;
  opacity: .5;
}

.pikap-order-chat-input {
  width: 100%;
  min-height: 38px;
  max-height: 96px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  padding: 8px 10px;
  font: inherit;
}

.pikap-order-chat-send {
  border: 0;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  padding: 0 14px;
  min-height: 38px;
  cursor: pointer;
}

.pikap-order-chat-send:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.pikap-order-chat-hint {
  margin: 6px 0 0;
  font-size: .72rem;
}

.pikap-order-chat-image-preview {
  position: relative;
  margin-bottom: 8px;
}

.pikap-order-chat-image-preview img {
  max-height: 120px;
  border-radius: 12px;
  display: block;
}

.pikap-order-chat-image-preview button {
  position: absolute;
  top: 4px;
  right: 4px;
  border: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(15, 23, 42, .72);
  color: #fff;
  cursor: pointer;
}

.pikap-order-chat-toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(160px, calc(140px + env(safe-area-inset-bottom)));
  width: min(92vw, 360px);
  padding: 12px 14px;
  border-radius: 14px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .35);
  cursor: pointer;
  z-index: 2147483601;
  display: grid;
  gap: 4px;
}

.pikap-order-chat-toast strong {
  font-size: .86rem;
}

.pikap-order-chat-toast span {
  font-size: .8rem;
  color: #cbd5e1;
}

.order-chat-history {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #cbd5e1;
}

.order-chat-history summary {
  cursor: pointer;
  font-weight: 700;
  color: #1d4ed8;
  font-size: .88rem;
}

.order-chat-history-list {
  margin-top: 10px;
  max-height: 220px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
}

.order-chat-history-item {
  padding: 8px 10px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: .82rem;
}

.order-chat-history-item strong {
  display: block;
  font-size: .72rem;
  color: #64748b;
  margin-bottom: 4px;
}

.order-chat-history-item img {
  max-width: 100%;
  margin-top: 6px;
  border-radius: 10px;
}
