:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #172033;
  --muted: #64748b;
  --line: #d8e0ea;
  --primary: #b42318;
  --primary-2: #ef4444;
  --green: #15803d;
  --amber: #b45309;
  --blue: #2563eb;
  --radius: 8px;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

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

body.bambus-store-mode {
  --primary: #3f6212;
  --primary-2: #84cc16;
}

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

button {
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 700;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  min-height: 42px;
  padding: 10px 12px;
}

textarea { resize: vertical; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }

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

.sidebar {
  background: #111827;
  color: #f8fafc;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.brand-mark img {
  width: 34px;
  height: 34px;
  display: block;
  object-fit: contain;
}

.brand strong { display: block; font-size: 18px; }
.brand small, .sidebar-footer small { color: #cbd5e1; }

.nav { display: grid; gap: 8px; }
.nav-btn {
  background: transparent;
  color: #dbeafe;
  text-align: left;
  border: 1px solid transparent;
}
.nav-btn.active, .nav-btn:hover {
  background: #243041;
  border-color: #334155;
  color: #fff;
}

.sidebar-footer { margin-top: auto; border-top: 1px solid #334155; padding-top: 14px; }

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
}

.topbar small {
  color: var(--green);
  font-weight: 800;
}

.top-actions, .toolbar, .panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary {
  background: var(--primary);
  color: #fff;
}

.primary:hover { background: #991b1b; }
.ghost {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
}
.small { min-height: 32px; padding: 0 10px; font-size: 13px; }
.danger { background: #fee2e2; color: #991b1b; }
.success { background: #dcfce7; color: #166534; }

.view { display: none; }
.view.active { display: block; }

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

.metric, .panel, .product-card, .order-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric { padding: 16px; }
.metric small { color: var(--muted); font-weight: 800; }
.metric strong { display: block; font-size: 26px; margin-top: 6px; }

.finance-panel {
  margin-bottom: 16px;
}

.loyalty-opportunity-panel {
  margin-bottom: 16px;
}

.loyalty-opportunity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.loyalty-opportunity-item {
  display: grid;
  gap: 6px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.loyalty-opportunity-item small {
  color: var(--muted);
  font-weight: 800;
}

.loyalty-opportunity-item strong {
  font-size: 22px;
}

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

.finance-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.finance-line span {
  min-width: 0;
  color: var(--muted);
  font-weight: 800;
}

.finance-line strong {
  white-space: nowrap;
}

.finance-line.total {
  border-color: #fecaca;
  background: #fff1f2;
}

.payment-breakdown {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.55fr);
  gap: 16px;
}

.panel {
  padding: 16px;
}
.panel.compact { margin: 12px 0 16px; }
.panel h2, .panel-head h2, .cart-panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}
.panel-head { justify-content: space-between; margin-bottom: 8px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.wide { grid-column: span 2; }
.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}
.toggle input { width: 18px; min-height: 18px; }
.stack { display: grid; gap: 12px; }

.inline-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.inline-copy input {
  min-width: 0;
}

.settings-split {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.45fr);
}

.assistant-split {
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.55fr);
}

.sync-panel {
  align-self: start;
}

.settings-blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.compact-form {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  margin-bottom: 12px;
}

.sync-status {
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.sync-actions {
  margin-top: 12px;
}

.toolbar {
  margin-bottom: 14px;
}
.toolbar input { max-width: 360px; }
.toolbar select { max-width: 220px; }

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

.product-card {
  overflow: hidden;
}

.product-visual {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

.product-body {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.product-body h3, .store-item h3, .order-card h3 {
  margin: 0;
  font-size: 17px;
}

.muted { color: var(--muted); }
.price { font-size: 18px; font-weight: 900; color: var(--primary); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.badge.green { background: #dcfce7; color: #166534; }
.badge.amber { background: #fef3c7; color: #92400e; }
.badge.blue { background: #dbeafe; color: #1d4ed8; }
.badge.red { background: #fee2e2; color: #991b1b; }

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

.order-card {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.kitchen-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 14px;
  align-items: start;
}

.kitchen-column {
  min-height: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.kitchen-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.kitchen-column-head h2 {
  margin: 0;
  font-size: 16px;
}

.kitchen-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.kitchen-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.kitchen-card.urgent {
  border-color: #f59e0b;
  background: #fffbeb;
}

.kitchen-timer {
  font-weight: 900;
  color: var(--primary);
}

.kitchen-items {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 14px;
}

.table-wrap {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.campaign-item, .mini-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
}

.campaign-preview {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.campaign-preview p {
  margin: 4px 0 0;
  line-height: 1.45;
}

.check-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.check-list .mini-item {
  margin-bottom: 0;
}

.check-item .row {
  align-items: flex-start;
}

.campaign-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.campaign-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.assistant-template {
  display: grid;
  gap: 8px;
}

.assistant-template p {
  margin: 0;
}

.assistant-history-panel {
  margin-top: 16px;
}

.assistant-conversation-panel {
  margin-top: 16px;
}

.conversation-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.assistant-message {
  display: grid;
  gap: 8px;
}

.assistant-message.inbound {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.assistant-message p {
  margin: 0;
}

.assistant-message-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.tag-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
}

.combo-list, .addon-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.option-picker {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.option-picker h3 {
  margin: 0;
  font-size: 16px;
}

.hidden {
  display: none !important;
}

.addon-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
}

.addon-choice:last-child {
  border-bottom: 0;
}

.addon-choice input {
  width: 18px;
  min-height: 18px;
}

.pizza-picker {
  display: grid;
  gap: 14px;
}

.pizza-picker section {
  display: grid;
  gap: 8px;
}

.pizza-picker h4 {
  margin: 0;
  font-size: 14px;
}

.pizza-choice-grid {
  display: grid;
  gap: 8px;
}

.pizza-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.pizza-choice input {
  width: 18px;
  min-height: 18px;
}

.pizza-choice span {
  display: grid;
  gap: 2px;
}

.pizza-choice small {
  color: var(--muted);
}

.coupon-hint {
  min-height: 18px;
  color: var(--muted);
  font-weight: 700;
}

.store-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}

.storefront, .cart-panel, .store-info-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.store-cover {
  display: grid;
  gap: 18px;
  padding: 22px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(255, 255, 255, 0.94)),
    linear-gradient(90deg, #b42318, #15803d);
  border-bottom: 1px solid var(--line);
}

body.bambus-store-mode .store-cover {
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(17, 17, 17, 0.94), rgba(44, 50, 35, 0.92)),
    linear-gradient(90deg, #9bd42b, #151515);
}

.store-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.store-logo {
  width: 74px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  flex: 0 0 auto;
}

.store-logo.has-image {
  width: min(270px, 52vw);
  aspect-ratio: 560 / 190;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}

.store-logo.has-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.26));
}

body.bambus-store-mode .store-logo {
  background: #9bd42b;
  color: #151515;
}

.store-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 900;
}

.store-status.closed {
  background: #fee2e2;
  color: #991b1b;
}

.store-cover h2 { margin: 8px 0 4px; font-size: 32px; }
.store-cover p { margin: 0; color: var(--muted); }
.store-meta { font-weight: 800; }

body.bambus-store-mode .store-cover h2 { color: #f8fafc; }
body.bambus-store-mode .store-cover p { color: #d9e6c4; }

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

.store-hero-grid div {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(216, 224, 234, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.store-hero-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.store-hero-grid strong {
  font-size: 14px;
}

.store-tools {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

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

.store-category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.chip {
  min-height: 32px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  white-space: nowrap;
  border: 1px solid transparent;
}
.chip.active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.chip small {
  margin-left: 5px;
  opacity: 0.72;
}

.store-products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 14px;
}
.store-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 112px;
  background: #fff;
}
.store-thumb {
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: #fff7ed;
  font-size: 34px;
}

.store-item h3 {
  margin-bottom: 4px;
}

.store-item .actions {
  align-self: stretch;
  align-items: center;
}

.store-item .actions button {
  min-width: 104px;
}

.store-item-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.store-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 14px 14px;
}

.store-info-panel {
  padding: 14px;
  box-shadow: none;
  display: grid;
  gap: 10px;
}

.store-orders-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.store-order-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(34px, 1fr));
  gap: 5px;
  margin: 4px 0;
}

.store-order-progress span {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.store-order-progress i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 2px solid var(--line);
}

.store-order-progress .done i,
.store-order-progress .current i {
  background: #16a34a;
  border-color: #16a34a;
}

.store-order-progress .current {
  color: #166534;
}

.store-info-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.store-info-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.store-info-card p {
  color: var(--text);
}

.store-order-details {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}

.store-order-details summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 800;
}

.store-order-details ul {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 10px 0;
  padding: 0;
}

.store-order-details li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.store-order-details li small,
.store-order-meta small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.store-order-meta {
  display: grid;
  gap: 8px;
}

.store-order-meta strong {
  font-size: 12px;
  line-height: 1.35;
}

.store-order-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.store-order-actions button {
  flex: 1 1 120px;
}

.store-review-form {
  display: grid;
  gap: 8px;
}

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

.profile-stat {
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-2);
}

.profile-stat small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.profile-stat strong {
  display: block;
  margin-top: 2px;
}

.loyalty-stamp-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f0fdf4;
}

.loyalty-stamps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));
  gap: 6px;
}

.loyalty-stamp {
  display: grid;
  place-items: center;
  min-height: 30px;
  border-radius: 999px;
  border: 1px dashed #86efac;
  color: #166534;
  background: #fff;
  font-weight: 900;
}

.loyalty-stamp.filled {
  border-style: solid;
  color: #fff;
  background: #16a34a;
}

.loyalty-redeem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

.loyalty-redeem input {
  width: auto;
}

.loyalty-redeem.hidden {
  display: none;
}

.pizza-addon-size-hint {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
}

.cart-panel {
  padding: 16px;
  position: sticky;
  top: 24px;
}

.cart-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.cart-panel h2,
.checkout-block h3 {
  margin: 0;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.qty-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.qty-controls button { width: 32px; min-height: 32px; padding: 0; }
.cart-total {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 14px 0;
}

.cart-minimum {
  display: grid;
  gap: 6px;
  padding: 0 0 14px;
}

.cart-minimum[hidden] {
  display: none;
}

.cart-minimum-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.cart-minimum-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #f97316;
  transition: width 0.2s ease;
}

.cart-minimum.done .cart-minimum-bar span {
  background: #16a34a;
}

.cart-minimum small {
  color: var(--muted);
  font-weight: 800;
}

.checkout-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.checkout-steps span {
  min-height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.checkout-steps span.current {
  background: #fff7ed;
  color: #9a3412;
  box-shadow: inset 0 0 0 1px #fed7aa;
}

.checkout-steps span.done {
  background: #dcfce7;
  color: #166534;
}

.checkout-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.loyalty-card {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.loyalty-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.loyalty-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dcfce7;
}

.loyalty-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 0.2s ease;
}

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

.fulfillment-toggle label {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
}

.fulfillment-toggle input {
  width: auto;
  min-height: auto;
}

.store-bottom-nav {
  display: none;
}

.empty {
  padding: 18px;
  background: var(--surface-2);
  color: var(--muted);
  border-radius: var(--radius);
  text-align: center;
  font-weight: 700;
}

body.public-store-mode {
  background: #f1f5f9;
}

body.public-store-mode .app-shell {
  display: block;
}

body.public-store-mode .sidebar,
body.public-store-mode .topbar {
  display: none;
}

body.public-store-mode .main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 22px 82px;
}

body.public-store-mode .storefront,
body.public-store-mode .cart-panel {
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.10);
}

body.public-store-mode .cart-panel {
  top: 22px;
}

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
  }
  .nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .split, .assistant-split, .store-layout, .settings-blocks { grid-template-columns: 1fr; }
  .cart-panel { position: static; }
  .metrics-grid, .finance-grid, .product-grid, .kitchen-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-hero-grid, .store-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .main { padding: 14px; }
  body.public-store-mode .main { padding: 0 0 78px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .top-actions, .toolbar { width: 100%; }
  .top-actions button, .toolbar button, .toolbar input, .toolbar select { width: 100%; max-width: none; }
  .inline-copy { grid-template-columns: 1fr; }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics-grid, .finance-grid, .loyalty-opportunity-grid, .product-grid, .orders-board, .kitchen-board, .store-products, .form-grid, .compact-form, .store-hero-grid, .store-info-grid, .profile-stats { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .storefront, .cart-panel {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
  .store-cover {
    padding: 16px;
  }
  .store-cover h2 {
    font-size: 26px;
  }
  .store-identity {
    align-items: flex-start;
  }
  .store-logo {
    width: 58px;
    font-size: 20px;
  }
  .store-logo.has-image {
    width: min(230px, 64vw);
  }
  .store-search-row {
    grid-template-columns: 1fr;
  }
  .store-orders-actions {
    grid-template-columns: 1fr;
  }
  .store-order-progress {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .store-item {
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: start;
  }
  .store-item .actions {
    grid-column: 1 / -1;
  }
  .store-item .actions button {
    width: 100%;
  }
  .checkout-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .store-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    min-height: 64px;
    padding: 6px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -12px 28px rgba(15, 23, 42, 0.12);
  }
  .store-bottom-nav button {
    min-height: 50px;
    padding: 0 4px;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
  }
  .store-bottom-nav button.active {
    background: #111827;
    color: #fff;
  }
  .store-bottom-nav span {
    display: inline-grid;
    min-width: 18px;
    height: 18px;
    margin-left: 2px;
    place-items: center;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 10px;
  }
  .store-bottom-nav button.active span {
    background: #fff;
    color: #111827;
  }
}
