:root {
  color-scheme: light;
  --green: #123b2b;
  --green-light: #e7f0e9;
  --ink: #18231d;
  --muted: #68746c;
  --line: #dfe6e0;
  --paper: #ffffff;
  --background: #f6f8f5;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}
html { scroll-behavior: smooth; }
body { min-height: 100vh; }
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 2000;
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  background: var(--green);
  color: white;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgb(255 255 255 / 96%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgb(18 59 43 / 3%);
  backdrop-filter: blur(12px);
}
.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  max-width: 1180px;
  margin: auto;
  padding: 13px 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--green);
  text-decoration: none;
}
.brand::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 4px;
  background: linear-gradient(145deg, #2f7a4e, #123b2b);
  box-shadow: 0 0 0 4px #e7f0e9;
}
.brand span { color: #69936f; }
.location { margin: 0 0 0 auto; color: var(--muted); font-size: .88rem; white-space: nowrap; }
.primary-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; }
.nav-link {
  min-height: 40px;
  padding: 9px 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .93rem;
  font-weight: 650;
  white-space: nowrap;
  transition: background-color .16s ease, color .16s ease;
}
.nav-link:hover { background: var(--green-light); color: var(--green); }
.nav-link[aria-current="page"] { background: var(--green); color: white; }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-left: auto;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--green);
  font: inherit;
  font-weight: 700;
}
main { max-width: 1180px; margin: auto; padding: 0 24px 44px; }
.workspace[hidden] { display: none !important; }
.workspace-intro { max-width: 780px; padding: 40px 0 8px; }
.workspace-intro h1 {
  margin: 8px 0 10px;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
}
.workspace-lead { max-width: 700px; margin: 0; color: var(--muted); font-size: 1.05rem; }
.hero {
  max-width: none;
  margin: 24px 0 8px;
  padding: clamp(30px, 5vw, 66px);
  border: 1px solid #d9e7dc;
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 8%, rgb(105 147 111 / 24%), transparent 42%),
    linear-gradient(135deg, #ffffff 0%, #f3f8f4 56%, #e7f0e9 100%);
  box-shadow: 0 24px 60px rgb(18 59 43 / 8%);
}
.eyebrow { color: #507b5b; font-weight: 800; font-size: .75rem; letter-spacing: .14em; }
h1 { margin: 12px 0; font-size: clamp(2.5rem, 6vw, 4.4rem); line-height: 1.04; letter-spacing: -.045em; }
h2 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: -.025em; }
.intro { max-width: 600px; color: var(--muted); font-size: 1.1rem; }
.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.hero-points li {
  padding: 6px 12px;
  border: 1px solid #d7e5da;
  border-radius: 999px;
  background: rgb(255 255 255 / 78%);
  color: #23563a;
  font-size: .82rem;
  font-weight: 700;
}
.search { display: flex; gap: 10px; margin-top: 28px; }
.search input { min-width: 0; flex: 1; padding: 15px; border: 1px solid #cbd6cd; border-radius: 10px; font: inherit; background: white; }
button { font: inherit; cursor: pointer; }
.search button { border: 0; border-radius: 10px; background: var(--green); color: white; padding: 0 23px; font-weight: 700; }
.message { min-height: 24px; color: var(--muted); font-size: .9rem; }
.section { padding: 30px 0 48px; }
.section-heading { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.home-products-section {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 10px 35px rgb(18 59 43 / 4%);
}
.home-products-section .section-heading { align-items: flex-start; flex-wrap: wrap; }
.home-products-section .catalog-subtitle { margin-bottom: 0; }
.categories { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.category {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 155px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.category:hover, .category:focus-visible { transform: translateY(-2px); border-color: #71977a; background: var(--green-light); box-shadow: 0 12px 26px rgb(18 59 43 / 8%); }
.category span { color: #729179; font-size: .8rem; }
.category strong { font-size: 1.05rem; }
.category small, .role-grid p { color: var(--muted); }
.roles { background: var(--green); color: white; border-radius: 20px; padding: 32px; margin: 10px 0 45px; }
.roles .eyebrow { color: #b7d6bc; }
.role-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 22px; }
.role-grid article { border-top: 1px solid #547361; padding-top: 12px; }
.role-grid h3 { margin-bottom: 4px; }
.role-grid p { color: #d0ddd3; font-size: .92rem; }
footer {
  max-width: 1180px;
  margin: auto;
  padding: 26px 24px 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .88rem;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
@media (max-width: 760px) {
  .categories, .role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 36px 24px; }
  .roles { padding: 24px; }
}
@media (max-width: 420px) {
  main { padding: 0 16px 32px; }
  .topbar-inner { padding: 12px 16px; }
  .search { flex-direction: column; }
  .search button { min-height: 48px; }
  .categories, .role-grid { grid-template-columns: 1fr; }
}

/* ETMarket customer catalog */
.catalog-section {
  scroll-margin-top: 24px;
  padding-bottom: 52px;
}

.catalog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.catalog-heading h2 {
  margin-bottom: 8px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--green);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.catalog-subtitle {
  color: var(--muted);
  max-width: 620px;
}

.catalog-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

.catalog-filters label {
  font-weight: 700;
}

.catalog-filters select {
  min-width: 210px;
  padding: 12px;
  border: 1px solid #cbd6cd;
  border-radius: 10px;
  background: white;
  color: inherit;
  font: inherit;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.product-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  border: 1px solid #dce5de;
  border-radius: 14px;
  background: white;
  box-shadow: 0 4px 18px rgb(20 50 30 / 5%);
}

.product-branch {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}

.product-category {
  margin: 8px 0;
  padding: 5px 9px;
  border-radius: 20px;
  background: #edf4ee;
  color: #23563a;
  font-size: .78rem;
  font-weight: 700;
}

.product-name {
  margin: 8px 0;
  overflow-wrap: anywhere;
}

.product-description,
.product-unit,
.product-stock {
  color: var(--muted);
  font-size: .92rem;
  overflow-wrap: anywhere;
}

.product-price {
  margin: 12px 0 4px;
  color: var(--green);
  font-size: 1.35rem;
  font-weight: 800;
}

.branch-button,
.secondary-button {
  min-height: 42px;
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid var(--green);
  border-radius: 9px;
  background: var(--green);
  color: white;
  font: inherit;
  font-weight: 700;
}

.product-card .branch-button {
  width: 100%;
  margin-top: auto;
}

.branch-button:disabled {
  opacity: .65;
  cursor: default;
}

.secondary-button {
  margin-top: 0;
  background: white;
  color: var(--green);
}

.message {
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .catalog-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-filters select {
    width: 100%;
  }

  .product-card {
    padding: 16px;
  }
}

/* ETMarket authentication interface */
.auth-panel {
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.auth-message {
  min-height: 24px;
  overflow-wrap: anywhere;
}
.auth-message[data-state="error"] {
  color: #a32626;
}
.auth-message[data-state="success"] {
  color: var(--green);
}
.auth-session {
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  overflow-wrap: anywhere;
}
.auth-session p {
  margin: 4px 0;
}
.auth-session-heading {
  font-weight: 800;
}
.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.auth-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.auth-card h3 {
  margin: 0 0 8px;
}
.auth-card label {
  font-weight: 650;
}
.auth-card input {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid #cbd6cd;
  border-radius: 9px;
  font: inherit;
}
.auth-button {
  min-height: 44px;
  margin-top: 8px;
  padding: 10px 14px;
  border: 0;
  border-radius: 9px;
  background: var(--green);
  color: white;
  font: inherit;
  font-weight: 700;
}
.auth-button:disabled {
  opacity: .6;
  cursor: wait;
}
.auth-note {
  margin-bottom: 0;
  color: var(--muted);
  font-size: .88rem;
}
@media (max-width: 650px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }
  .auth-card {
    padding: 17px;
  }
}
/* ETMarket administrator dashboard */
.admin-panel {
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.admin-message {
  min-height: 24px;
  overflow-wrap: anywhere;
}
.admin-message[data-state="error"] {
  color: #a32626;
}
.admin-message[data-state="success"] {
  color: var(--green);
}
.admin-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 24px;
}
.admin-summary > div,
.admin-user-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.admin-summary p {
  margin-bottom: 0;
  color: var(--muted);
}
.admin-search {
  display: grid;
  gap: 8px;
  margin: 20px 0;
}
.admin-search label {
  font-weight: 700;
}
.admin-search-row {
  display: flex;
  gap: 10px;
}
.admin-search-row input,
.admin-grant-form select {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #cbd6cd;
  border-radius: 9px;
  font: inherit;
}
.admin-search-row input {
  flex: 1;
}
.admin-results {
  display: grid;
  gap: 16px;
}
.admin-user-card h3 {
  overflow-wrap: anywhere;
}
.admin-user-details {
  display: grid;
  grid-template-columns: minmax(100px, .35fr) minmax(0, 1fr);
  gap: 7px 12px;
}
.admin-user-details dt {
  font-weight: 700;
}
.admin-user-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.admin-role-list {
  display: grid;
  gap: 8px;
}
.admin-role-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.admin-role-label {
  flex: 1;
  min-width: 140px;
  overflow-wrap: anywhere;
}
.admin-action,
.danger-button {
  padding: 8px 12px;
  border-radius: 8px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.danger-button {
  border: 1px solid #d9a4a4;
  background: #fff5f5;
  color: #8e2020;
}
.admin-grant-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.admin-grant-form select {
  flex: 1;
}
.admin-empty {
  color: var(--muted);
  overflow-wrap: anywhere;
}
@media (max-width: 650px) {
  .admin-summary {
    grid-template-columns: 1fr;
  }
  .admin-search-row {
    flex-direction: column;
  }
  .admin-search-row .auth-button {
    width: 100%;
  }
  .admin-user-details {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .admin-user-details dd {
    margin-bottom: 8px;
  }
  .admin-role-row {
    align-items: stretch;
  }
  .admin-role-label {
    flex-basis: 100%;
  }
}
/* ETMARKET_STEP_5Z12_ACCOUNT_STYLES */
.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}

.auth-actions[hidden],
.auth-panel form[hidden],
.admin-panel[hidden],
.admin-dashboard-toggle[hidden] {
  display: none !important;
}

.auth-form-close {
  margin: 0 0 0.75rem;
}

.admin-dashboard-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
  padding: 0.7rem 1rem;
  cursor: pointer;
}


/* ETMARKET_STEP_5Z265C_SHOP_APPROVAL_UI */
.admin-shop-approvals {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.admin-shop-approvals-note {
  color: var(--muted);
  line-height: 1.55;
}
.admin-shop-approval-status {
  min-height: 24px;
  overflow-wrap: anywhere;
}
.admin-shop-approval-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 14px;
  margin-top: 14px;
}
.admin-shop-approval-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.admin-shop-approval-card h4 {
  overflow-wrap: anywhere;
}
.admin-shop-approval-field {
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.admin-shop-approvals button:disabled {
  cursor: wait;
  opacity: .65;
}

/* ETMARKET_STEP_5Z150D_COMPLAINT_UI */
.admin-complaints {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.admin-complaints-note {
  color: var(--muted);
  line-height: 1.55;
}
.admin-complaints-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}
.admin-complaints-toolbar label,
.admin-complaint-input {
  display: grid;
  gap: 7px;
  font-weight: 700;
}
.admin-complaints-toolbar select,
.admin-complaint-input input,
.admin-complaint-input textarea,
.admin-complaint-input select {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #cbd6cd;
  border-radius: 8px;
  font: inherit;
  background: white;
}
.admin-complaint-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 14px;
}
.admin-complaint-card,
.admin-complaint-detail,
.admin-complaint-form {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.admin-complaint-card h4,
.admin-complaint-detail h4 {
  overflow-wrap: anywhere;
}
.admin-complaint-field {
  min-width: 0;
  overflow-wrap: anywhere;
}
.admin-complaint-field strong {
  display: block;
  font-size: .82rem;
  color: var(--muted);
}
.admin-complaint-field p {
  margin: 4px 0 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.admin-complaint-detail {
  margin-top: 18px;
}
.admin-complaint-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 8px 16px;
  margin-bottom: 18px;
}
.admin-complaint-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.admin-complaint-form h5 {
  margin: 0;
  font-size: 1rem;
}
.admin-enforcement-form {
  border-color: #d6a2a2;
}
@media (max-width: 600px) {
  .admin-complaints-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}
/* STEP 5Z-217C CUSTOMER COMPLAINT FORM */
.customer-complaint-section {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.customer-complaint-section h2 {
  margin-top: 0;
}
.complaint-explanation,
.complaint-help {
  color: var(--muted);
  line-height: 1.6;
}
.complaint-context {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.complaint-form-status {
  min-height: 24px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.customer-complaint-form {
  display: grid;
  gap: 10px;
  max-width: 720px;
}
.customer-complaint-form[hidden] {
  display: none;
}
.customer-complaint-form label {
  font-weight: 600;
}
.customer-complaint-form select,
.customer-complaint-form textarea {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid #cbd6cd;
  border-radius: 8px;
  background: white;
  color: inherit;
  font: inherit;
}
.customer-complaint-form textarea {
  resize: vertical;
}
.customer-complaint-form :is(select, textarea):focus-visible {
  outline: 2px solid #315d45;
  outline-offset: 2px;
}
.customer-complaint-form button:disabled {
  opacity: .65;
  cursor: wait;
}
@media (max-width: 600px) {
  .customer-complaint-section {
    padding: 16px;
  }
}

/* STEP 5Z-273C SHOP OWNER REGISTRATION */
.shop-registration-section {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.shop-registration-section h2 {
  margin-top: 0;
}
.shop-registration-explanation,
.shop-registration-access,
.shop-registration-status {
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.shop-registration-access {
  color: var(--muted);
}
.shop-registration-form {
  display: grid;
  gap: 10px;
  max-width: 720px;
}
.shop-registration-form[hidden] {
  display: none;
}
.shop-registration-form label {
  font-weight: 600;
}
.shop-registration-form input,
.shop-registration-form select,
.shop-registration-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid #cbd6cd;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
}
.shop-registration-form :is(input, select, textarea):focus-visible {
  outline: 2px solid #315d45;
  outline-offset: 2px;
}
.shop-registration-form button:disabled {
  opacity: .65;
  cursor: wait;
}
@media (max-width: 600px) {
  .shop-registration-section {
    padding: 16px;
  }
}

/* STEP 5Z-305C3C: branch management interface */
.shop-my-business {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line, #dddddd);
}
.shop-my-business[hidden] { display: none; }
.shop-business-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.shop-business-heading h3 { margin: 0 0 8px; }
.shop-business-heading p,
.shop-registration-help { line-height: 1.55; }
.shop-branches-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 14px;
}
.shop-branch-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line, #dddddd);
  border-radius: 10px;
  overflow-wrap: anywhere;
}
.shop-branch-card h4 { margin: 0 0 10px; }

.shop-photo-preview,
.shop-branch-photo {
  display: block;
  width: 100%;
  max-width: 520px;
  max-height: 300px;
  object-fit: cover;
  border: 1px solid var(--line, #dddddd);
  border-radius: 10px;
  background: #f2f5f2;
}

.shop-photo-preview[hidden],
.shop-branch-photo[hidden] {
  display: none;
}

.shop-branch-photo-section {
  display: grid;
  gap: 9px;
  margin: 12px 0 16px;
}

.shop-branch-photo-section h5 {
  margin: 0;
}

.shop-branch-photo-section input[type="file"] {
  max-width: 100%;
}

.shop-photo-placeholder,
.shop-photo-feedback {
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.shop-photo-placeholder {
  padding: 14px;
  border: 1px dashed var(--line, #bbbbbb);
  border-radius: 8px;
}
.shop-branch-map-label {
  margin: 12px 0 6px;
  font-weight: 600;
}
.shop-branch-location-map {
  width: 100%;
  height: 230px;
  min-height: 200px;
  border: 1px solid #cbd6cd;
  border-radius: 10px;
  overflow: hidden;
  background: #f2f5f2;
  z-index: 0;
}
.shop-branch-card p { line-height: 1.5; margin: 7px 0; }
.shop-registration-help { margin: 8px 0; }
@media (max-width: 600px) {
  .shop-business-heading { display: grid; }
  .shop-business-heading button { width: 100%; }
}

/* STEP 5Z-350X: stable shop location map and owner edit controls */
.shop-pickup-actions {
  display: grid;
  justify-items: start;
  gap: 8px;
}
.shop-pickup-actions p {
  margin: 0;
  line-height: 1.5;
}
.shop-pickup-map {
  width: 100%;
  height: 360px;
  min-height: 280px;
  border: 1px solid #cbd6cd;
  border-radius: 10px;
  overflow: hidden;
  background: #f2f5f2;
  z-index: 0;
}
@media (max-width: 600px) {
  .shop-pickup-map {
    height: 300px;
    min-height: 260px;
  }
}
.shop-location-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.shop-change-location {
  margin-top: 10px;
}
@media (max-width: 600px) {
  .shop-location-form-actions {
    display: grid;
  }
  .shop-location-form-actions button {
    width: 100%;
  }
}

/* Branch-specific product images and shop-owner inventory controls. */
.product-image {
  display: block;
  width: 100%;
  max-height: 240px;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f5f7fa;
  border-radius: 10px;
  margin: 0 0 12px;
}
.shop-inventory-panel {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #dce3ea;
  border-radius: 12px;
  background: #fbfcfe;
}
.shop-inventory-panel h5 {
  margin: 0 0 10px;
  font-size: 1rem;
}
.shop-inventory-status {
  min-height: 1.4em;
  overflow-wrap: anywhere;
}
.shop-inventory-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}
.shop-inventory-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  font-size: 0.9rem;
}
.shop-inventory-field input,
.shop-inventory-field textarea,
.shop-inventory-upload-form input[type="file"] {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}
.shop-inventory-list {
  display: grid;
  gap: 10px;
}
.shop-inventory-product {
  display: grid;
  grid-template-columns: minmax(80px, 120px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e1e7ed;
  border-radius: 10px;
  background: #fff;
}
.shop-inventory-product-details {
  min-width: 0;
  overflow-wrap: anywhere;
}
.shop-inventory-product-details p {
  margin: 5px 0 0;
}
.shop-inventory-photo {
  display: block;
  width: 100%;
  max-height: 110px;
  aspect-ratio: 1;
  object-fit: contain;
  background: #f5f7fa;
  border-radius: 8px;
}
.shop-inventory-upload-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
@media (max-width: 520px) {
  .shop-inventory-product {
    grid-template-columns: 1fr;
  }
  .shop-inventory-photo {
    max-width: 180px;
  }
  .shop-inventory-upload-form {
    grid-template-columns: 1fr;
  }
}

/* Customer shopping list - Step 17 */
.shopping-list-panel {
  margin: 12px 0 48px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  scroll-margin-top: 24px;
}

.shopping-list-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.shopping-list-items {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.shopping-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.shopping-list-item-details {
  min-width: 0;
  overflow-wrap: anywhere;
}

.shopping-list-item-details p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.shopping-list-line-total {
  font-weight: 700;
}

.shopping-list-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.quantity-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.quantity-button:disabled,
#clear-shopping-list:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.shopping-list-quantity {
  min-width: 22px;
  text-align: center;
  font-weight: 700;
}

.remove-list-item {
  padding: 8px;
  border: 0;
  background: transparent;
  color: #9b3030;
  font: inherit;
  cursor: pointer;
}

.add-to-shopping-list {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  padding: 10px 14px;
  border: 1px solid var(--green);
  border-radius: 9px;
  background: white;
  color: var(--green);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.add-to-shopping-list:hover,
.add-to-shopping-list:focus-visible {
  background: var(--green-light);
}

.shopping-list-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.shopping-list-total strong {
  color: var(--green);
  font-size: 1.2rem;
}

.shopping-list-note {
  margin-bottom: 0;
  color: var(--muted);
  font-size: .9rem;
}

@media (max-width: 600px) {
  .shopping-list-panel {
    padding: 16px;
  }

  .shopping-list-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .shopping-list-controls {
    justify-content: flex-start;
  }
}

/* ETMARKET SHOP ORDERS PANEL */
.shop-orders-panel {
  margin-top: 24px;
}

.shop-orders-panel[hidden] {
  display: none;
}

.shop-orders-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.shop-orders-heading h2 {
  margin-bottom: 8px;
}

.shop-orders-list {
  display: grid;
  gap: 16px;
}

.shop-orders-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface, #fff);
}

.shop-orders-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.shop-orders-card-heading h3 {
  margin: 0;
  overflow-wrap: anywhere;
}

.shop-orders-status-badge {
  display: inline-block;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .8rem;
  text-transform: capitalize;
  overflow-wrap: anywhere;
}

.shop-orders-reference,
.shop-orders-date {
  color: var(--muted);
  font-size: .9rem;
  overflow-wrap: anywhere;
}

.shop-orders-total {
  font-weight: 700;
}

.shop-orders-note {
  padding: 10px 12px;
  border-left: 3px solid var(--line);
  overflow-wrap: anywhere;
}

.shop-orders-card h4 {
  margin: 18px 0 8px;
}

.shop-orders-items {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shop-orders-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.shop-orders-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.shop-orders-item-details {
  min-width: 0;
  overflow-wrap: anywhere;
}

.shop-orders-line-total {
  white-space: nowrap;
}

.shop-orders-empty,
.shop-orders-disclaimer {
  color: var(--muted);
  font-size: .9rem;
}

.shop-orders-disclaimer {
  margin-top: 16px;
}

.shop-order-delivery,
.shop-order-packaging {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.shop-order-delivery p,
.shop-order-packaging p {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.shop-order-packaging-status {
  margin: 16px 0 0;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.45;
}

.shop-order-packaging-message {
  margin: 8px 0 0;
  font-size: .9rem;
  line-height: 1.45;
}

@media (max-width: 600px) {
  .shop-orders-heading,
  .shop-orders-card-heading,
  .shop-orders-item {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-orders-card {
    padding: 14px;
  }

  .shop-orders-line-total {
    white-space: normal;
  }
}

/* ETMARKET ORDER QUANTITY LAYOUT */
.shop-orders-quantity {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 4px;
  row-gap: 2px;
}

.shop-orders-quantity-label,
.shop-orders-quantity-unit {
  white-space: normal;
}

.shop-orders-quantity-value {
  font-weight: 600;
}

/* ETMARKET SHOP CONFIRMATION FORM */
.shop-confirmation-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface, #fff);
}

.shop-confirmation-item-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.shop-confirmation-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-size: .9rem;
  font-weight: 600;
}

.shop-confirmation-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: inherit;
  font: inherit;
}

.shop-confirmation-line-preview,
.shop-confirmation-message {
  margin: 8px 0 0;
  font-size: .9rem;
  overflow-wrap: anywhere;
}

.shop-confirmation-total {
  margin: 8px 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.shop-confirmation-form button:disabled {
  cursor: wait;
  opacity: .65;
}

@media (max-width: 600px) {
  .shop-confirmation-form {
    padding: 12px;
  }

  .shop-confirmation-item-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ETMARKET CUSTOMER ORDER HISTORY */
.customer-order-history-panel {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--line, #d8dee8);
  border-radius: 14px;
  background: var(--surface, #fff);
  color: inherit;
}

.customer-order-history-panel[hidden] {
  display: none !important;
}

.customer-order-history-heading,
.customer-order-history-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.customer-order-history-heading {
  margin-bottom: 18px;
}

.customer-order-history-heading h2,
.customer-order-history-card h3 {
  margin-top: 0;
}

.customer-order-history-list {
  display: grid;
  gap: 16px;
}

.customer-order-history-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line, #d8dee8);
  border-radius: 12px;
  background: var(--surface, #fff);
  overflow-wrap: anywhere;
}

.customer-order-history-card-heading {
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.customer-order-history-card-heading h3 {
  margin-bottom: 0;
}

.customer-order-history-status-badge {
  display: inline-block;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid var(--line, #d8dee8);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  text-transform: capitalize;
  overflow-wrap: anywhere;
}

.customer-order-history-field {
  margin: 7px 0;
  font-size: .92rem;
  overflow-wrap: anywhere;
}

.customer-order-history-card > h4 {
  margin: 18px 0 10px;
}

.customer-order-history-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.customer-order-history-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line, #d8dee8);
  border-radius: 10px;
  overflow-wrap: anywhere;
}

.customer-order-history-item h4 {
  margin: 0 0 10px;
}

.customer-order-history-item h5 {
  margin: 14px 0 6px;
}

.customer-order-history-decision-note,
.customer-order-history-disclaimer {
  margin: 14px 0;
  font-size: .9rem;
  line-height: 1.5;
}

.customer-order-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.customer-order-history-actions button:disabled,
#customer-order-history-refresh:disabled {
  cursor: wait;
  opacity: .65;
}

@media (max-width: 600px) {
  .customer-order-history-panel {
    padding: 12px;
  }

  .customer-order-history-heading {
    flex-direction: column;
  }

  .customer-order-history-items {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-order-history-actions {
    flex-direction: column;
  }

  .customer-order-history-actions button {
    width: 100%;
  }
}
/* ETMARKET STEP 8: responsive top navigation and homepage polish */
@media (max-width: 980px) {
  .location { display: none; }
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    display: none;
    flex: 1 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px 0 4px;
  }
  .topbar.nav-open .primary-nav { display: flex; }
  .nav-link {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    text-align: left;
  }
}

.shop-search {
  max-width: 680px;
  margin: 18px 0 0;
}

.orders-access-message {
  margin: 4px 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.orders-access-message[hidden] { display: none !important; }

.home-product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card {
  border-radius: 18px;
  padding: 18px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.product-card:hover,
.product-card:focus-within {
  transform: translateY(-3px);
  border-color: #c9dccd;
  box-shadow: 0 18px 40px rgb(18 59 43 / 10%);
}

.product-image {
  max-height: none;
  aspect-ratio: 4 / 3;
  border: 1px solid #edf1ed;
  object-fit: contain;
  background: linear-gradient(135deg, #f8fbf8, #eef4ef);
}

.product-name { line-height: 1.28; }

.product-price { letter-spacing: -.02em; }

.product-stock {
  margin: 4px 0 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef7f0;
  color: #24633d;
  font-weight: 700;
}

:where(.nav-link, .nav-toggle, .category, .search button, .branch-button, .secondary-button, .auth-button, .add-to-shopping-list, .quantity-button, .remove-list-item):focus-visible {
  outline: 3px solid #6f9d78;
  outline-offset: 2px;
}

@media (max-width: 1040px) {
  .home-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .home-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .home-product-grid { grid-template-columns: minmax(0, 1fr); }
  .home-products-section { padding: 18px; border-radius: 18px; }
  .workspace-intro { padding-top: 28px; }
}

/* Keep anchored sections clear of the sticky top bar. */
.catalog-section,
.shopping-list-panel,
.auth-panel,
.admin-panel,
.shop-registration-section,
.customer-order-history-panel,
.shop-orders-panel {
  scroll-margin-top: 92px;
}


/* STEP 145X: customer nearby-shop discovery */
.nearby-shop-discovery {
  margin-top: 22px;
  padding: 22px;
  border: 1px solid #d5e3d8;
  border-radius: 16px;
  background: #f8fbf8;
}

.nearby-shop-discovery[hidden] {
  display: none !important;
}

.nearby-shop-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 14px;
  margin-top: 14px;
}

.nearby-shop-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #d5e0d7;
  border-radius: 12px;
  background: #fff;
}

.nearby-shop-card h3 {
  margin: 0;
  color: #204d32;
  overflow-wrap: anywhere;
}

.nearby-shop-card p {
  margin: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.nearby-shop-card-photo {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 9px;
  background: #edf2ed;
}

.nearby-shop-distance {
  color: #23563a;
  font-weight: 700;
}

.nearby-shop-card button {
  width: 100%;
  margin-top: auto;
}

.nearby-shop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.nearby-shop-actions button {
  margin-top: 0;
}

@media (max-width: 600px) {
  .nearby-shop-discovery {
    padding: 16px;
  }

  .nearby-shop-results {
    grid-template-columns: minmax(0, 1fr);
  }

  .nearby-shop-actions {
    flex-direction: column;
  }

  .nearby-shop-actions button {
    width: 100%;
  }
}
/* ETMARKET STEP 9C: customer entry points, branch selection and checkout */
.customer-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.customer-entry-actions .auth-button,
.customer-entry-actions .secondary-button {
  margin-top: 0;
}

.shop-picker {
  padding-bottom: 8px;
}

.shop-picker-filters select {
  min-width: 240px;
}

.selected-branch-banner {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid #bcd8c2;
  border-radius: 10px;
  background: #eef7f0;
  color: #1f5736;
  font-weight: 700;
}

.selected-branch-banner[hidden] { display: none !important; }

.shopping-list-heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shopping-order-checkout h3 {
  margin: 0 0 8px;
}

.checkout-branch-summary {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px dashed #bcd8c2;
  border-radius: 10px;
  background: #f7fbf8;
  color: #23563a;
  font-weight: 700;
}

.customer-order-delivery,
.customer-order-tracking {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line, #d8dee8);
}

.customer-order-delivery h4,
.customer-order-tracking h4 { margin: 0 0 10px; }

.customer-order-delivery-note,
.customer-order-delivery-locked {
  margin: 0 0 12px;
  font-size: .92rem;
  line-height: 1.5;
}

.customer-order-delivery-form {
  display: grid;
  gap: 10px;
}

.customer-order-delivery-form label {
  display: grid;
  gap: 5px;
  font-weight: 700;
}

.customer-order-delivery-form input,
.customer-order-delivery-form select,
.customer-order-delivery-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd6cd;
  border-radius: 9px;
  background: white;
  color: inherit;
  font: inherit;
}

.customer-order-delivery-form [hidden] {
  display: none;
}

.customer-order-delivery-locate-status,
.customer-order-delivery-feedback,
.customer-order-delivery-admin-status {
  margin: 0;
  font-size: .9rem;
  line-height: 1.45;
}

.customer-order-delivery-map-help,
.customer-order-delivery-selected {
  margin: 0;
  font-size: .9rem;
  line-height: 1.45;
}

.customer-order-delivery-map {
  width: 100%;
  height: 320px;
  border: 1px solid #cbd6cd;
  border-radius: 10px;
  background: #eef3ee;
  z-index: 0;
}

.customer-order-route-summary {
  margin: .5rem 0 0;
  color: #23563a;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.45;
}

.customer-order-delivery-selected {
  font-weight: 700;
  color: #23563a;
}

.rider-panel-heading,
.rider-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.rider-delivery-alert {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
  max-width: min(32rem, calc(100vw - 2rem));
  border: 1px solid #b7791f;
  border-left: 5px solid #b7791f;
  border-radius: 10px;
  background: #fff8e6;
  color: #5c3d00;
  padding: .9rem 1rem;
  font-weight: 700;
  line-height: 1.45;
  box-shadow: 0 12px 30px rgba(62, 45, 10, .22);
}

.rider-jobs-section {
  margin-top: 1.5rem;
}

.rider-jobs-section h3 {
  margin-bottom: .35rem;
}

.rider-section-note,
.rider-empty,
.rider-action-message {
  margin: 0;
  font-size: .9rem;
  line-height: 1.45;
}

.rider-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.rider-card {
  border: 1px solid #cbd6cd;
  border-radius: 12px;
  background: #fff;
  padding: 1rem;
}

.rider-card p {
  margin: .3rem 0;
}

.rider-status-badge {
  border-radius: 999px;
  background: #e5efe6;
  color: #23563a;
  padding: .25rem .65rem;
  font-size: .8rem;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}

.rider-action-message {
  margin-top: .5rem;
}

.shop-rider-dispatch {
  border-top: 1px solid #dbe4dc;
  margin-top: 1rem;
  padding-top: 1rem;
}

.shop-rider-dispatch p {
  margin: .35rem 0;
}

@media (max-width: 600px) {
  .customer-entry-actions { flex-direction: column; }
  .customer-entry-actions button { width: 100%; }
  .shopping-list-heading-actions { width: 100%; flex-direction: column; }
  .shopping-list-heading-actions button { width: 100%; }
  .customer-order-delivery-map { height: 240px; }
  .rider-panel-heading,
  .rider-card-heading { flex-direction: column; }
}

.rider-assignment-map {
  width: 100%;
  height: 280px;
  margin: 1rem 0;
  border: 1px solid #cbd6cd;
  border-radius: 10px;
  overflow: hidden;
}

.rider-map-status {
  margin: .5rem 0 1rem;
  color: #3f5145;
  font-size: .9rem;
}

@media (max-width: 600px) {
  .rider-assignment-map {
    height: 240px;
  }
}

.rider-gps-status {
  margin: .45rem 0 0;
  color: #3f5145;
  font-size: .88rem;
  line-height: 1.45;
}

.customer-order-transport,
.rider-transport {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: .35rem 0;
  font-weight: 700;
  color: #23563a;
}

.customer-order-transport-icon,
.rider-transport-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: #e5efe6;
  color: #23563a;
  flex: 0 0 auto;
}

.customer-order-transport-icon .etmarket-transport-icon,
.rider-transport-icon .etmarket-transport-icon {
  width: 1.1rem;
  height: 1.1rem;
}

.rider-transport-marker {
  background: transparent;
  border: 0;
}

.rider-transport-marker-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 3px solid #23563a;
  border-radius: 999px;
  background: #ffffff;
  color: #23563a;
  box-shadow: 0 4px 12px rgba(16, 48, 30, .28);
}

.rider-transport-marker-icon .etmarket-transport-icon {
  width: 26px;
  height: 26px;
}

.rider-transport-marker-walking .rider-transport-marker-icon {
  color: #1d6b4a;
}

.rider-transport-marker-motorcycle .rider-transport-marker-icon {
  color: #1d4f91;
}

.rider-transport-marker-car .rider-transport-marker-icon {
  color: #8a4b12;
}

.rider-transport-marker-unknown .rider-transport-marker-icon {
  color: #5f6b62;
}

.rider-transport-marker-photo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
}

.rider-transport-marker-photo[hidden],
.rider-transport-marker-fallback[hidden] {
  display: none;
}

.rider-transport-marker-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.customer-order-rider-profile {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: .6rem 0;
  padding: .6rem;
  border: 1px solid #d9e5dc;
  border-radius: 12px;
  background: #f5faf6;
}

.customer-order-rider-profile[hidden],
.customer-order-rider-profile-photo[hidden] {
  display: none;
}

.customer-order-rider-profile-photo {
  width: 48px;
  height: 48px;
  border: 2px solid #23563a;
  border-radius: 999px;
  background: #ffffff;
  object-fit: cover;
  flex: 0 0 auto;
}

.customer-order-rider-profile-text {
  min-width: 0;
}

.customer-order-rider-profile-name {
  margin: 0;
  font-weight: 700;
  color: #1d3b29;
}

.customer-order-rider-profile-vehicle {
  margin: .15rem 0 0;
  color: #3d5a47;
}

.rider-popup-name {
  margin: 0 0 .2rem;
  font-weight: 700;
}

.rider-popup-vehicle,
.rider-popup-transport {
  margin: .15rem 0;
}

@media (max-width: 600px) {
  .rider-transport-marker-icon {
    width: 38px;
    height: 38px;
  }

  .rider-transport-marker-icon .etmarket-transport-icon {
    width: 22px;
    height: 22px;
  }

  .customer-order-rider-profile-photo {
    width: 42px;
    height: 42px;
  }
}


/* Known Kenyan business discovery directory */
.known-business-directory {
  padding-top: 18px;
}

.known-business-directory .section-heading {
  align-items: flex-start;
}

.known-business-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.known-business-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.known-business-card h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.known-business-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.known-business-card li {
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--ink);
  font-size: .86rem;
  overflow-wrap: anywhere;
}

.known-business-card p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: .88rem;
}

.known-business-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--green);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  font-size: .9rem;
}

@media (max-width: 760px) {
  .known-business-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .known-business-grid {
    grid-template-columns: 1fr;
  }
}


/* Expandable published business branch references */
.known-business-branch-lists {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.known-business-branch-details {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.known-business-branch-details summary {
  cursor: pointer;
  color: var(--green);
  font-size: .9rem;
  font-weight: 700;
}

.known-business-branch-details summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.known-branch-source-note {
  margin: 10px 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.5;
}

.known-branch-source-note a {
  color: var(--green);
  font-weight: 700;
}

.known-branch-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 18px !important;
  margin: 8px 0 0 !important;
  padding-left: 18px !important;
  list-style: disc !important;
}

.known-branch-list li {
  display: list-item;
  max-width: none;
  padding: 2px 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: .82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  list-style: disc;
}

@media (max-width: 480px) {
  .known-branch-list {
    grid-template-columns: 1fr;
  }
}

/* Formal business registration (owner workspace) */
.business-registration-section {
  margin-top: 28px;
}

.business-registration-explanation,
.business-panel-note {
  max-width: 78ch;
  color: var(--muted);
  font-size: .92rem;
}

.business-application-form,
.business-upload-form,
.business-location-editor-form {
  display: grid;
  gap: 10px;
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.business-application-form[hidden],
.business-upload-form[hidden],
.business-location-editor-form[hidden] {
  display: none;
}

.business-application-form label,
.business-upload-form label,
.business-location-editor-form label {
  display: grid;
  gap: 5px;
  font-size: .88rem;
  font-weight: 700;
}

.business-application-form input,
.business-application-form select,
.business-upload-form input,
.business-upload-form select,
.business-location-editor-form input,
.business-location-editor-form select,
.business-location-editor-form textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.business-field-inline {
  grid-template-columns: auto 1fr;
  align-items: center;
  justify-content: start;
}

.business-field-inline input {
  width: auto;
}

.business-registration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.business-registration-mode {
  min-width: 0;
}

.business-registration-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.business-application-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--green);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.business-application-mode::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.business-application-mode[data-mode="draft"] {
  background: #eef4ff;
  color: #1d4ed8;
}

.business-application-draft-resources {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.business-application-draft-resources[hidden] {
  display: none;
}

.business-application-draft-resources > h3 {
  margin-top: 0;
}

.business-application-draft-panel {
  margin-top: 12px;
}

.business-draft-missing {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-left: 4px solid #b7791f;
  border-radius: 6px;
  background: #fff8e6;
  color: #7a4d05;
  font-size: .84rem;
}

.business-draft-card {
  display: grid;
  gap: 4px;
}

.business-draft-resume {
  justify-self: start;
  width: fit-content;
  margin-top: 10px;
}

.business-applications-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 26px;
}

.business-applications-heading h3 {
  margin: 0 0 4px;
}

.business-applications-heading p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.business-applications-list {
  display: grid;
  gap: 16px;
}

.business-application-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.business-application-name {
  margin: 0 0 4px;
}

.business-application-meta,
.business-document-meta,
.business-location-meta,
.business-history-meta,
.business-history-details {
  margin: 4px 0;
  color: var(--muted);
  font-size: .84rem;
  overflow-wrap: anywhere;
}

.business-application-review-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 4px solid #b7791f;
  border-radius: 6px;
  background: #fff8e6;
  font-size: .88rem;
}

.business-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfb;
}

.business-panel summary {
  padding: 11px 14px;
  cursor: pointer;
  color: var(--green);
  font-weight: 700;
}

.business-panel summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.business-panel-body {
  padding: 0 14px 14px;
}

.business-panel-body h4 {
  margin: 16px 0 8px;
}

.business-panel-status {
  margin: 8px 0;
  font-size: .86rem;
  color: var(--muted);
}

.business-panel-status[data-state="error"] {
  color: #a12622;
}

.business-panel-status[data-state="success"] {
  color: var(--green);
}

.business-document-list,
.business-representative-list,
.business-location-list,
.business-history-list {
  display: grid;
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
}

.business-document-row,
.business-representative-row,
.business-location-row {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.business-document-link {
  color: var(--green);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.business-representative-row .secondary-button,
.business-representative-row .danger-button,
.business-location-row .secondary-button {
  margin: 8px 8px 0 0;
}

.business-location-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.business-location-thumb,
.business-location-popup-image {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  background: var(--green-light);
}

.business-location-thumb {
  height: 84px;
}

.business-location-popup-image {
  max-width: 220px;
  height: 130px;
  margin: 6px 0;
  display: block;
}

.business-location-row-details {
  min-width: 0;
}

.business-location-row-details p {
  margin: 3px 0;
  overflow-wrap: anywhere;
}

.business-location-map,
.business-location-picker-map {
  width: 100%;
  min-height: 300px;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--green-light);
}

.business-location-picker-map {
  min-height: 260px;
}

.business-location-popup {
  max-width: 240px;
}

.business-location-popup p {
  margin: 4px 0;
}

.business-location-popup-address {
  color: var(--muted);
  font-size: .8rem;
}

.business-history-list {
  padding-left: 20px;
  list-style: disc;
}

.business-history-entry {
  padding: 8px 4px;
}

/* Administrator business verification */
.admin-business-verifications {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.admin-business-verifications-note {
  max-width: 80ch;
  color: var(--muted);
  font-size: .9rem;
}

.admin-business-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 14px 0;
}

.admin-business-toolbar label {
  display: grid;
  gap: 5px;
  font-size: .84rem;
  font-weight: 700;
}

.admin-business-toolbar select {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.admin-business-status {
  margin: 8px 0;
  color: var(--muted);
  font-size: .88rem;
}

.admin-business-list {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.admin-business-card,
.admin-business-detail-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.admin-business-card h4,
.admin-business-detail-card h4 {
  margin: 0 0 8px;
}

.admin-business-card .auth-button,
.admin-business-detail-card .auth-button {
  margin-top: 10px;
}

.admin-business-field {
  margin: 4px 0;
  color: var(--muted);
  font-size: .86rem;
  overflow-wrap: anywhere;
}

.admin-business-detail {
  display: grid;
  gap: 12px;
}

.admin-business-detail-card h5 {
  margin: 18px 0 8px;
}

.admin-business-evidence {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfb;
}

.admin-business-evidence h5 {
  margin-top: 0;
}

.admin-business-evidence-ok {
  margin: 0;
  color: var(--green);
  font-weight: 700;
}

.admin-business-evidence-missing {
  margin: 0;
  color: #a12622;
}

.admin-business-evidence-list {
  margin: 8px 0 0;
  padding-left: 20px;
  color: #7a2e22;
  font-size: .86rem;
}

.admin-business-documents,
.admin-business-representatives,
.admin-business-locations,
.admin-business-location-list {
  display: grid;
  gap: 10px;
}

.admin-business-document-row,
.admin-business-representative-row,
.admin-business-location-row {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfb;
}

.admin-business-document-link {
  color: var(--green);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.admin-business-document-actions,
.admin-business-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.admin-business-location-map {
  width: 100%;
  min-height: 280px;
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--green-light);
}

.admin-business-location-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.admin-business-location-row .business-location-thumb {
  height: 84px;
}

.admin-business-location-row p {
  margin: 3px 0;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .business-location-row,
  .admin-business-location-row {
    grid-template-columns: 1fr;
  }

  .business-location-thumb,
  .admin-business-location-row .business-location-thumb {
    height: 160px;
  }

  .business-applications-heading,
  .admin-business-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

/* STEP 11C-4K: blue-and-white business workspace cards */
#workspace-business {
  --business-blue: #1d4ed8;
  --business-blue-dark: #16357a;
  --business-blue-soft: #eef4ff;
  --business-blue-line: #c7dbf5;
}

#workspace-business .business-registration-section,
#workspace-business .shop-registration-section,
#workspace-business .business-drafts-section,
#workspace-business .business-applications-section {
  margin-top: 28px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--business-blue-line);
  border-top-width: 5px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgb(29 78 216 / 8%);
  scroll-margin-top: 92px;
}

#workspace-business .business-registration-section {
  border-top-color: #1d4ed8;
  background: linear-gradient(180deg, #f7faff 0, #fff 180px);
}

#workspace-business .shop-registration-section {
  border-top-color: #1e40af;
  background: linear-gradient(180deg, #f3f7ff 0, #fff 180px);
}

#workspace-business .business-drafts-section {
  border-top-color: #2563eb;
  background: linear-gradient(180deg, #f4f8ff 0, #fff 180px);
}

#workspace-business .business-applications-section {
  border-top-color: #0369a1;
  background: linear-gradient(180deg, #f4faff 0, #fff 180px);
}

#workspace-business .business-registration-section > h2,
#workspace-business .shop-registration-section > h2,
#workspace-business .business-drafts-section > h2,
#workspace-business .business-applications-section > h2 {
  margin-top: 0;
  color: var(--business-blue-dark);
}

#workspace-business .shop-registration-section > .eyebrow,
#workspace-business .business-drafts-section > .eyebrow,
#workspace-business .business-applications-section > .eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--business-blue-soft);
  color: var(--business-blue);
  letter-spacing: .08em;
}

#workspace-business .business-application-form,
#workspace-business .shop-registration-form {
  margin: 16px 0 18px;
  padding: 18px;
  border: 1px solid var(--business-blue-line);
  border-radius: 12px;
  background: #fff;
}

#workspace-business .business-application-form :is(input, select, textarea),
#workspace-business .shop-registration-form :is(input, select, textarea) {
  border-color: var(--business-blue-line);
}

#workspace-business .business-application-form :is(input, select, textarea):focus-visible,
#workspace-business .shop-registration-form :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--business-blue);
  outline-offset: 2px;
}

#workspace-business .business-registration-section .auth-button,
#workspace-business .shop-registration-section .auth-button,
#workspace-business .business-drafts-section .auth-button,
#workspace-business .business-drafts-section .secondary-button,
#workspace-business .business-applications-section .secondary-button {
  background: var(--business-blue);
  border-color: var(--business-blue);
  color: #fff;
}

#workspace-business .business-registration-actions {
  border-color: var(--business-blue-line);
  background: #f8fbff;
}

#workspace-business .business-application-mode {
  background: var(--business-blue-soft);
  color: var(--business-blue);
}

#workspace-business .business-registration-section .secondary-button,
#workspace-business .shop-registration-section .secondary-button {
  background: #fff;
  border: 1px solid var(--business-blue);
  color: var(--business-blue);
}

#workspace-business .shop-my-business {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--business-blue-line);
}

#workspace-business .shop-branch-card {
  border-color: var(--business-blue-line);
  background: #f8fbff;
}

#workspace-business .shop-branch-card h4 {
  color: var(--business-blue-dark);
}

#workspace-business .business-applications-heading {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--business-blue-line);
}

#workspace-business .business-application-card {
  border-color: var(--business-blue-line);
  background: #f8fbff;
}

@media (max-width: 600px) {
  #workspace-business .business-registration-section,
  #workspace-business .shop-registration-section,
  #workspace-business .business-drafts-section,
  #workspace-business .business-applications-section {
    padding: 16px;
    border-radius: 14px;
  }

  #workspace-business .business-application-form,
  #workspace-business .shop-registration-form {
    padding: 14px;
  }

  .business-registration-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .business-registration-buttons {
    width: 100%;
  }

  .business-registration-buttons .secondary-button {
    flex: 1 1 150px;
  }
}

/* Public customer shop map */
.public-shop-map-section {
  margin-top: 1.5rem;
}

.public-shop-map {
  position: relative;
  width: 100%;
  min-height: 340px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-color, #d8dee8);
  z-index: 0;
}

.public-shop-distance-label {
  position: absolute;
  z-index: 1000;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 2px 12px rgb(0 0 0 / 18%);
  font-weight: 700;
  line-height: 1.4;
  pointer-events: none;
}
.public-shop-map-popup {
  min-width: 170px;
  max-width: 240px;
}

.public-shop-map-popup p {
  margin: 0.35rem 0;
}

.public-shop-map-popup-photo {
  display: block;
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .public-shop-map {
    min-height: 280px;
  }
}
/* Owner branch map popup */
.owner-shop-map-popup {
  min-width: 170px;
  max-width: 240px;
}

.owner-shop-map-popup p {
  margin: 0.35rem 0;
}

.owner-shop-map-popup-photo {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 0.5rem;
}
/* Shop-front photograph map markers */
.shop-photo-map-marker {
  background: transparent;
  border: 0;
}

.shop-photo-map-marker-frame {
  display: block;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 9px rgba(0, 0, 0, 0.4);
}

.shop-photo-map-marker-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
/* STEP208AO: Administrator platform statistics */
.admin-statistics {
  margin: 28px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.admin-statistics-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-statistics-heading h3 {
  margin-bottom: 5px;
}

.admin-statistics-heading p,
.admin-statistics-status {
  color: var(--muted);
}

.admin-statistics-status[data-state="error"] {
  color: #a32626;
}

.admin-statistics-status[data-state="success"] {
  color: var(--green);
}

.admin-statistics-status[data-state="loading"] {
  color: var(--muted);
}

.admin-statistics-group {
  margin-top: 22px;
}

.admin-statistics-group h4 {
  margin-bottom: 12px;
}

.admin-statistics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
}

.admin-statistic-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fbf9;
}

.admin-statistic-label {
  display: block;
  color: var(--muted);
  font-size: .86rem;
  overflow-wrap: anywhere;
}

.admin-statistic-value {
  display: block;
  margin-top: 7px;
  font-size: 1.55rem;
  overflow-wrap: anywhere;
}

.admin-statistics-note {
  margin-top: 18px;
  padding: 12px;
  border-left: 3px solid var(--line);
  background: #f7f8f7;
  color: var(--muted);
}

.admin-statistics [disabled] {
  opacity: .65;
  cursor: wait;
}

@media (max-width: 600px) {
  .admin-statistics {
    padding: 14px;
  }

  .admin-statistics-heading {
    align-items: stretch;
  }

  .admin-statistics-heading button {
    width: 100%;
  }

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