/* Customer ordering portal (shop): phone first, same indigo as the staff phone app. */
:root {
  --p-brand: #3311db;
  --p-brand-dark: #24089e;
  --p-soft: #eeebfd;
  --p-bg: #f3f4f8;
  --p-card: #fff;
  --p-line: #e3e5ee;
  --p-text: #16181d;
  --p-muted: #6b7080;
  --p-ok: #067647;
  --p-low: #b54708;
  --p-out: #b42318;
}
body.portal { background: var(--p-bg); color: var(--p-text); font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif; }
.p-top { background: var(--p-brand); color: #fff; position: sticky; top: 0; z-index: 20; }
.p-top-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; max-width: 1200px; margin: 0 auto; }
.p-logo { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; white-space: nowrap; }
.p-logo img { height: 34px; border-radius: 6px; background: #fff; padding: 2px; }
.p-search { flex: 1; display: flex; }
.p-search input { width: 100%; border: 0; border-radius: 10px; padding: 9px 12px; font-size: 15px; }
.p-cart { position: relative; color: #fff; font-size: 24px; text-decoration: none; }
.p-cart .count { position: absolute; top: -6px; right: -10px; background: #ffb020; color: #111; font-size: 12px; font-weight: 700; border-radius: 10px; padding: 0 6px; }
.p-nav { display: flex; gap: 4px; padding: 0 12px 8px; max-width: 1200px; margin: 0 auto; overflow-x: auto; }
.p-nav a { color: #ddd6ff; text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.p-nav a.active, .p-nav a:hover { background: rgba(255,255,255,.18); color: #fff; }
.p-main { max-width: 1200px; margin: 0 auto; padding: 16px; }
.p-card { background: var(--p-card); border: 1px solid var(--p-line); border-radius: 14px; padding: 16px; }
.p-btn { background: var(--p-brand); color: #fff; border: 0; border-radius: 10px; padding: 10px 18px; font-weight: 600; }
.p-btn:hover { background: var(--p-brand-dark); color: #fff; }
.p-btn-light { background: var(--p-soft); color: var(--p-brand); border: 0; border-radius: 10px; padding: 10px 18px; font-weight: 600; }
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.p-product { background: var(--p-card); border: 1px solid var(--p-line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
.p-product:hover { border-color: var(--p-brand); }
.p-product .img { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 10px; overflow: hidden; }
.p-product .img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.p-product .img .none { color: #b6b9c6; font-size: 40px; }
.p-product .name { font-size: 14px; font-weight: 600; line-height: 1.25; min-height: 2.5em; }
.p-price { font-size: 17px; font-weight: 700; color: var(--p-brand); }
.p-stock { font-size: 12px; font-weight: 600; }
.p-stock.in { color: var(--p-ok); }
.p-stock.low { color: var(--p-low); }
.p-stock.out { color: var(--p-out); }
.p-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.p-chip { background: var(--p-card); border: 1px solid var(--p-line); color: var(--p-text); border-radius: 999px; padding: 6px 14px; text-decoration: none; white-space: nowrap; font-size: 14px; }
.p-chip.active { background: var(--p-brand); border-color: var(--p-brand); color: #fff; }
.p-qty { display: flex; align-items: center; border: 1px solid var(--p-line); border-radius: 10px; overflow: hidden; width: max-content; }
.p-qty button { border: 0; background: var(--p-brand); color: #fff; width: 38px; height: 38px; font-size: 20px; line-height: 1; }
.p-qty button.minus { background: #b6b9c6; }
.p-qty input { width: 60px; border: 0; text-align: center; font-size: 16px; height: 38px; }
.p-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--p-line); }
.p-row:last-child { border-bottom: 0; }
.p-thumb { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 8px; flex-shrink: 0; }
.p-muted { color: var(--p-muted); font-size: 13px; }
.p-problem { color: var(--p-out); font-size: 13px; font-weight: 500; }
.p-total { display: flex; justify-content: space-between; font-size: 20px; font-weight: 700; padding-top: 12px; }
.p-badge { font-size: 12px; border-radius: 6px; padding: 2px 8px; background: var(--p-soft); color: var(--p-brand); font-weight: 600; }
.p-auth { max-width: 420px; margin: 40px auto; }
.p-auth h1 { font-size: 24px; font-weight: 700; }
.p-auth label { font-size: 13px; color: var(--p-muted); margin-top: 12px; }
.p-msg { border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.p-msg.success { background: #ecfdf3; color: var(--p-ok); }
.p-msg.error { background: #fef3f2; color: var(--p-out); }
.p-msg.info { background: var(--p-soft); color: var(--p-brand); }
.p-closed { background: #fffaeb; color: var(--p-low); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.p-welcome { background: var(--p-soft); border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; white-space: pre-line; }
@media (max-width: 576px) {
  .p-logo span { display: none; }
  .p-main { padding: 12px; }
}
