/* San Barber seller catalog: shared styles. Tokens live in tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); }
@media (hover: hover) and (pointer: fine) { a:hover { color: var(--accent-hover); } }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, input, select, label { touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Browser surfaces in the brand palette: selection, caret, scrollbars. */
::selection { background: rgba(227, 166, 59, 0.32); color: var(--text); }
input, textarea { caret-color: var(--accent-ink); }
html { scrollbar-color: var(--line-strong) transparent; }

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

.display { font-family: var(--font-display); font-weight: 800; }
.muted { color: var(--muted); }
.wordmark { font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: 0.5px; }
.caption { font-size: 12px; color: var(--muted); }
.icon { flex-shrink: 0; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 16px; border-radius: 12px;
  border: 1px solid transparent; background: transparent; color: var(--text);
  font-size: 14px; font-weight: 600; text-decoration: none; text-align: center;
}
@media (hover: hover) and (pointer: fine) { .btn:hover { color: var(--text); } }
.btn-primary { background: var(--accent); color: var(--on-accent); font-weight: 700; }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); } }
.btn-outline { border-color: var(--line-strong); }
@media (hover: hover) and (pointer: fine) { .btn-outline:hover { border-color: var(--muted); } }
.btn-ok { background: var(--ok-bg); color: var(--ok); font-weight: 700; border: 0; }
@media (hover: hover) and (pointer: fine) { .btn-ok:hover { color: var(--ok); filter: brightness(1.15); } }
.btn-wa { background: var(--wa); color: var(--on-wa); font-weight: 700; font-size: 16px; border: 0; }
@media (hover: hover) and (pointer: fine) { .btn-wa:hover { color: var(--on-wa); filter: brightness(1.05); } }
.btn-link { color: var(--accent); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .btn-link:hover { color: var(--accent-hover); } }
.btn-lg { min-height: 56px; border-radius: var(--r-btn); font-size: 16px; width: 100%; }
.btn-md { min-height: 52px; border-radius: var(--r-btn); font-size: 15px; width: 100%; }
.btn-sm { min-height: 36px; padding: 0 12px; border-radius: var(--r-sm); font-size: 13px; }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--line); color: var(--disabled); border-color: var(--line); filter: none;
}
.icon-btn {
  width: var(--tap); height: var(--tap); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-input); border: 1px solid var(--line); background: var(--surface);
  color: var(--text); text-decoration: none;
}
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { border-color: var(--line-strong); color: var(--text); } }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Inputs --------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 600; }
.field-hint { font-size: 12px; color: var(--muted); }
.input, .select {
  height: var(--tap); width: 100%; border-radius: var(--r-input);
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 0 12px; font-size: 14px;
}
.input::placeholder { color: var(--disabled); }
.input:focus, .select:focus { border-color: var(--line-strong); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.search {
  display: flex; align-items: center; gap: 8px; height: var(--tap);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-input);
  padding: 0 12px; color: var(--muted);
}
.search:focus-within { border-color: var(--line-strong); }
.search input {
  flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: none;
  color: var(--text); font-size: 14px;
}
.search input::placeholder { color: var(--disabled); }
.search input::-webkit-search-cancel-button { filter: invert(0.7); }

/* --- Banners, badges, toasts --------------------------------------------- */
.banner {
  border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.45;
  display: flex; flex-direction: column; gap: 8px;
}
.banner-bad { background: var(--bad-bg); color: var(--bad); }
.banner-warn { background: var(--warn-bg); color: var(--warn); }
.banner ul { margin: 0; padding-left: 18px; }
.badge {
  display: inline-flex; align-items: center; align-self: flex-start;
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--line); color: var(--muted); white-space: nowrap;
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-accent { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 60; max-width: calc(100% - 32px);
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px;
  padding: 12px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.toast.is-bad { background: var(--bad-bg); color: var(--bad); }

/* --- Empty, error and skeleton states ----------------------------------- */
.state {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 40px 12px; text-align: center; color: var(--muted); font-size: 14px;
  line-height: 1.5;
}
.state strong { color: var(--text); font-size: 16px; }
.skeleton { background: var(--surface-2); border-radius: 8px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }

/* --- Phone page shell --------------------------------------------------- */
.shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; }
.narrow { width: 100%; max-width: 560px; margin: 0 auto; }
.head-line { border-bottom: 1px solid var(--line-soft); }
.topbar { padding: 20px var(--pad) 12px; display: flex; flex-direction: column; gap: 14px; }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-head {
  padding: 20px var(--pad); display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.page-title { font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.page-sub { font-size: 12px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* --- Catalog (S1) ------------------------------------------------------- */
/* Header: brand + web store + order icon; seller line; search and chips stick. */
.cat-top { padding: 14px 12px 12px; display: flex; flex-direction: column; gap: 14px; }
.brand-row { display: flex; align-items: center; gap: 8px; }
.brand-row .wordmark { margin-right: auto; }
.seller-hero { display: flex; align-items: center; gap: 12px; min-width: 0; }
.seller-hero .stack { gap: 0; min-width: 0; }
.seller-hero .who {
  font-family: var(--font-display); font-weight: 800; font-stretch: 80%;
  font-size: 28px; line-height: 1.05; letter-spacing: 0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.online { display: inline-flex; align-items: center; gap: 6px; }
.online::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--wa); }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 24px;
}
.avatar-sm { width: 36px; height: 36px; font-size: 16px; background: var(--tab-on); color: var(--text); }
.web-link {
  font-size: 12px; font-weight: 600; text-decoration: none; color: var(--text);
  border: 1px solid var(--line-strong); padding: 0 12px; border-radius: var(--r-pill);
  min-height: 36px; display: inline-flex; align-items: center; white-space: nowrap; position: relative;
}
.web-link::after { content: ""; position: absolute; inset: -4px 0; }
@media (hover: hover) and (pointer: fine) { .web-link:hover { color: var(--text); border-color: var(--muted); } }
.cart-icon {
  position: relative; width: 44px; height: 44px; border-radius: 22px; flex-shrink: 0;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
}
.cart-icon .n {
  position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--accent); color: var(--on-accent); border: 2px solid var(--bg);
  font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}

.cat-sticky {
  position: sticky; top: 0; z-index: 15; background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
}
.cat-tools { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.chips {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -12px; padding: 0 12px;
  overscroll-behavior-x: contain; min-height: 36px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; min-height: 36px; padding: 0 14px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-2); position: relative;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.chip::after { content: ""; position: absolute; inset: -4px 0; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip-outline { background: transparent; border-color: var(--line-strong); }
.chip-outline[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip-select select {
  position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px;
}
.chip-select:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Section heads */
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 22px 12px 10px; }
.sec-title { font-family: var(--font-display); font-weight: 800; font-stretch: 82%; font-size: 22px; line-height: 1.1; }
.sec-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sec-link {
  background: transparent; border: 0; color: var(--accent); font-size: 13px; font-weight: 600;
  min-height: 36px; padding: 0; position: relative;
}
.sec-link::after { content: ""; position: absolute; inset: -4px; }
.results-head { padding: 22px 12px 4px; display: flex; flex-direction: column; gap: 10px; }
.results-head .sec-head { padding: 0; }
.filters-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px 2px; }

/* Grid: always 3 per row; the catalog is a phone-width column on every screen (Javier, 2026-11-12). */
.grid {
  padding: 10px 12px 120px; display: grid; gap: 8px; align-content: start;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (min-width: 600px) {
  .cat-top, .cat-tools, .grid, .sec-head, .results-head { padding-left: var(--pad); padding-right: var(--pad); }
}

/* Card: soft surface holding a white photo tile, name and price. */
.card {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px;
}
.card-media { position: relative; aspect-ratio: 1; border-radius: 10px; background: #fff; overflow: hidden; }
.card-open {
  display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent;
  border-radius: inherit;
}
.card-open:focus-visible { outline-offset: -2px; }
.card-media img { width: 100%; height: 100%; object-fit: contain; padding: 7%; }
.card-media .no-photo {
  display: flex; height: 100%; align-items: center; justify-content: center;
  font-size: 11px; color: #71717A; text-align: center; padding: 8px;
}
.card.is-out .card-media img { opacity: 0.38; filter: grayscale(1); }
.tag {
  position: absolute; top: 6px; left: 6px; z-index: 1; pointer-events: none;
  font-size: 10px; font-weight: 800; letter-spacing: 0.3px; padding: 3px 7px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--on-accent);
}
.tag.is-out { background: #18181B; color: #F4F4F5; }
.card-body { display: flex; flex-direction: column; gap: 3px; padding: 2px 5px 6px; cursor: pointer; }
.card-title {
  font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(12px * 1.3 * 2); overflow-wrap: anywhere;
}
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 5px; }
.price {
  font-family: var(--font-display); font-weight: 800; font-stretch: 78%;
  font-size: 17px; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text);
}
.card.is-out .price { color: var(--muted); }
.price-from { font-size: 10px; color: var(--muted); font-weight: 600; }
.price-old { font-size: 11px; color: var(--muted); text-decoration: line-through; font-variant-numeric: tabular-nums; }

/* Add control on the photo: "+" button, then a gold "− n +" counter. */
.card-ctl { position: absolute; right: 5px; bottom: 5px; z-index: 2; }
.add-fab {
  width: 34px; height: 34px; border-radius: 17px; border: 0; position: relative;
  background: #111; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 16px;
  transition: background-color 150ms ease, color 150ms ease;
}
.add-fab::after { content: ""; position: absolute; inset: -5px; }
.add-fab.in-cart { background: var(--accent); color: var(--on-accent); }
.qty-pill {
  display: flex; align-items: center; height: 34px; border-radius: 17px;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}
.qty-pill button {
  width: 30px; height: 34px; border: 0; background: transparent; color: inherit;
  font-size: 18px; font-weight: 700; position: relative; padding: 0;
}
.qty-pill button::after { content: ""; position: absolute; inset: -5px 0; }
.qty-pill .n {
  min-width: 16px; text-align: center; font-variant-numeric: tabular-nums;
  font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 16px;
}
.more-row { grid-column: 1 / -1; display: flex; justify-content: center; padding-top: 8px; }
.skeleton-card { aspect-ratio: 0.7; border-radius: 14px; }

/* Product sheet */
.sheet { max-height: 92vh; overflow: auto; }
.sheet-media {
  aspect-ratio: 1; max-height: 40vh; margin: 0 auto; width: 100%;
  background: #fff; border-radius: 14px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.sheet-media img { width: 100%; height: 100%; object-fit: contain; padding: 5%; }
.sheet-title { font-size: 16px; font-weight: 600; line-height: 1.35; }
.sheet-price .price { font-size: 30px; }
.sheet-price .price-old { font-size: 14px; }
.sheet-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.option[aria-pressed="true"] { border-color: var(--accent); background: var(--surface-2); }

/* Order bar: last product photo, count + total, and the gold "Ver pedido". */
.cart-bar {
  position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 20;
  max-width: 560px; margin: 0 auto;
  animation: rise 200ms ease-out;
}
.cart-bar .bar {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55); text-align: left;
}
.bar-thumb {
  width: 46px; height: 46px; border-radius: 12px; background: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.bar-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.bar-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bar-info .lbl { font-size: 12px; color: var(--muted); }
.bar-info .total {
  font-family: var(--font-display); font-weight: 800; font-stretch: 78%; font-size: 22px; line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.bar-go {
  min-height: 46px; padding: 0 16px; border-radius: 13px; flex-shrink: 0;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Order ticket (sent view): the order code as a torn-off stub. */
.ticket {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 20px;
}
.ticket::before, .ticket::after {
  content: ""; position: absolute; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  border-radius: 50%; background: var(--bg); border: 1px solid var(--line);
}
.ticket::before { left: -10px; clip-path: inset(0 0 0 50%); }
.ticket::after { right: -10px; clip-path: inset(0 50% 0 0); }
.ticket .lbl { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; color: var(--muted); text-transform: uppercase; }
.ticket .code {
  font-family: var(--font-display); font-weight: 800; font-stretch: 75%; font-size: 30px;
  letter-spacing: 0.5px; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums;
}
.ticket .for { text-align: right; font-size: 12px; color: var(--muted); }
.ticket .for b { display: block; color: var(--text); font-size: 14px; }

/* Cart (S1) */
.list { padding: 16px var(--pad); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.line {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.line.is-bad { border-color: var(--bad); }
.thumb {
  width: 56px; height: 56px; border-radius: var(--r-sm); background: var(--surface-2);
  flex-shrink: 0; object-fit: cover; overflow: hidden;
}
img.thumb { background: #fff; object-fit: contain; }
.line-info { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.line-title { font-size: 13px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.line-sub { font-size: 13px; color: var(--muted); }
.line-warn { font-size: 12px; color: var(--bad); font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.stepper button {
  width: var(--tap); height: var(--tap); border-radius: var(--r-input);
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 18px;
}
.stepper output, .stepper .qty { min-width: 22px; text-align: center; font-weight: 700; }
.total-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 0 0; border-top: 1px solid var(--line-soft); margin-top: 6px;
}
.total-row .label { font-size: 14px; color: var(--muted); }
.total-row .amount { font-family: var(--font-display); font-weight: 800; font-size: 24px; }
.note { font-size: 12px; color: var(--muted); line-height: 1.5; }
.footer-bar {
  padding: 12px var(--pad) 20px; display: flex; flex-direction: column; gap: 10px;
  border-top: 1px solid var(--line-soft); background: var(--bg);
  position: sticky; bottom: 0;
}

/* Sent (S1) */
.sent { padding: 28px var(--pad) 20px; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.eyebrow { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 1px; }
.headline { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.15; }
.lead { font-size: 14px; color: var(--muted); line-height: 1.5; }
.chat {
  background: var(--wa-chat); border: 1px solid var(--wa-chat-line); border-radius: 16px;
  padding: 16px; display: flex; flex-direction: column;
}
.bubble {
  align-self: flex-end; max-width: 88%; background: var(--wa-bubble); color: var(--wa-text);
  border-radius: 12px 12px 2px 12px; padding: 10px 12px; font-size: 14px; line-height: 1.45;
  white-space: pre-line; overflow-wrap: anywhere;
}
.actions-end { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

/* Variant sheet and modals (native <dialog>) */
dialog {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 0; border-radius: 16px; max-width: min(480px, calc(100% - 32px));
  width: 100%;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.65); }
.sheet {
  margin: auto auto 0; max-width: 560px; width: 100%;
  border-radius: 16px 16px 0 0; border-bottom: 0;
}
.dialog-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dialog-title { font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 1.25; }
.options { display: flex; flex-direction: column; gap: 8px; }
.option {
  min-height: var(--tap); padding: 10px 14px; border-radius: var(--r-input);
  border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left;
  font-weight: 600;
}
@media (hover: hover) and (pointer: fine) { .option:hover:not(:disabled) { border-color: var(--accent); } }
.option:disabled { color: var(--disabled); border-color: var(--line); }
.option .opt-price { font-family: var(--font-display); font-weight: 800; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* --- Login (S2) ----------------------------------------------------------- */
.auth {
  width: 100%; max-width: 420px; margin: 0 auto; padding: 48px var(--pad) 32px;
  display: flex; flex-direction: column; gap: 20px;
}
.auth form { display: flex; flex-direction: column; gap: 16px; }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 52px; }
.password-wrap .icon-btn {
  position: absolute; right: 0; top: 0; border: 0; background: transparent; color: var(--muted);
}

/* --- Seller panel (S3) ---------------------------------------------------- */
/* One column on phones; on a computer the commission and link stay on the
   left while the orders use the rest of the width (2 cards per row). */
.panel-shell { width: 100%; max-width: 560px; margin: 0 auto; }
.panel-top { padding: 20px var(--pad) 0; }
.panel-grid { padding: 16px var(--pad) 0; display: flex; flex-direction: column; gap: 16px; }
.panel-side, .panel-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.link-box { display: flex; flex-direction: column; gap: 8px; }
.link-box .btn-primary { min-height: 48px; gap: 8px; }
.panel-main .orders { padding: 0 0 8px; }
.orders > .banner, .orders > .state, .orders > .sr-only { grid-column: 1 / -1; }
@media (min-width: 960px) {
  .panel-shell { max-width: 1120px; }
  .panel-top { padding-top: 28px; }
  .panel-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 28px; align-items: start; padding-top: 20px; }
  .panel-side { position: sticky; top: 20px; }
  .panel-main .orders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
}
.hello { display: flex; flex-direction: column; gap: 2px; }
.hello .name { font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.summary {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-summary);
  padding: 18px; display: flex; flex-direction: column; gap: 6px;
}
.summary .label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.5px; text-transform: uppercase; }
.summary .figure { font-family: var(--font-display); font-weight: 800; font-size: 36px; color: var(--accent); line-height: 1.1; }
.summary .detail { font-size: 13px; color: var(--muted); }
.catalog-link { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.tabs { display: flex; gap: 6px; background: var(--surface); border-radius: 12px; padding: 4px; }
.tab {
  flex: 1 1 0; min-height: 40px; border: 0; border-radius: 9px; font-size: 13px; font-weight: 600;
  background: transparent; color: var(--muted); padding: 0 4px;
}
.tab[aria-selected="true"] { background: var(--tab-on); color: var(--text); }
.orders { padding: 12px var(--pad) 20px; display: flex; flex-direction: column; gap: 10px; }
.order {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.order-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.order-code { font-weight: 700; font-size: 14px; }
.order-total { font-family: var(--font-display); font-weight: 800; font-size: 18px; white-space: nowrap; }
.order-items { font-size: 13px; color: var(--text-2); line-height: 1.4; overflow-wrap: anywhere; }
.order-actions { display: flex; gap: 8px; }
.order-actions .btn-ok { flex: 1; }
.order-skeleton { height: 132px; border-radius: var(--r-card); }

/* Pending order actions: close (ink), remind on WhatsApp, cancel. */
.order .order-actions { flex-direction: column; }
.order-actions-row { display: flex; gap: 8px; }
.order-actions-row .btn { flex: 0 0 auto; padding: 0 14px; white-space: nowrap; }
.order-actions-row .btn-remind { flex: 1 1 auto; }
.btn-close { background: var(--text); color: var(--surface); font-weight: 700; min-height: 46px; }
@media (hover: hover) and (pointer: fine) { .btn-close:hover { color: var(--surface); background: #2A2A2E; } }
.btn-remind .icon { color: #1B8F4A; }
.order-customer { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.oc-phone {
  display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--text);
  text-decoration: none; font-variant-numeric: tabular-nums;
}
@media (hover: hover) and (pointer: fine) { .oc-phone:hover { color: var(--text); text-decoration: underline; } }
.oc-phone .icon { color: #1B8F4A; }
.order-canje {
  display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px;
  background: var(--warn-bg); border: 1px dashed #E3C27F;
}
.oc-label { font-size: 11px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: var(--accent-ink); }
.oc-items { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }

/* Closed sale = sold: the whole card turns red (Javier, PRD A-20). */
.order.is-closed { border: 1.5px solid var(--bad); background: #FFF5F4; }
.order.is-closed .order-total { color: var(--bad); }
.closed-tag {
  display: flex; align-items: center; gap: 8px; align-self: stretch;
  background: var(--bad); color: #FFFFFF; font-weight: 700; font-size: 13px;
  padding: 9px 12px; border-radius: 10px;
}
.badge-closed { background: var(--bad); color: #FFFFFF; }
.badge.badge-closed { background: var(--bad); color: #FFFFFF; }
@media (prefers-reduced-motion: no-preference) {
  .order.is-closed { animation: closed-in 0.35s ease-out; }
  @keyframes closed-in { from { background: var(--surface); border-color: var(--line); } }
}

/* Order search (code or customer number) */
.order-search .search { height: 48px; }
.search-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; }
.search-title { font-weight: 700; font-size: 15px; }
.section-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.products-section {
  margin: 20px var(--pad) 40px; padding-top: 20px; display: flex; flex-direction: column; gap: 14px;
  border-top: 1px solid var(--line);
}
.products-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.products-head .stack { gap: 2px; min-width: 0; flex: 1 1 260px; }
.products-body { display: flex; flex-direction: column; gap: 4px; }
.products-body .search { margin-bottom: 8px; }
.vis-row {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px 16px; padding: 12px 0; align-items: center;
  border-bottom: 1px solid var(--line-soft);
}
.vis-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
@media (min-width: 600px) {
  .vis-row { grid-template-columns: minmax(0, 1fr) 280px; }
  .vis-row .segmented { grid-column: 2; grid-row: 1 / span 2; }
}
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--surface); border-radius: 10px; padding: 3px; }
.segmented button {
  min-height: 36px; border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); font-size: 12px; font-weight: 600;
}
.segmented button[aria-pressed="true"] { background: var(--tab-on); color: var(--text); }
.segmented button[data-v="hidden"][aria-pressed="true"] { background: var(--line-strong); }
.segmented button[data-v="sold_out"][aria-pressed="true"] { background: var(--bad-bg); color: var(--bad); }

/* --- Manual sale (S4) ----------------------------------------------------- */
.form-main { padding: 16px var(--pad); display: flex; flex-direction: column; gap: 16px; flex: 1; }
.pick-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid #1F1F23;
}
.pick-row .info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pick-row .name { font-size: 13px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.pick-row .sub { font-size: 12px; color: var(--muted); }
.pick-row.is-selected .name { color: var(--accent-hover); }
.pick-row .stepper button { background: var(--surface); }
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 8px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; width: 100%;
}
.switch-row .stack .t { font-size: 14px; font-weight: 600; }
.track {
  width: 48px; height: 28px; border-radius: 14px; flex-shrink: 0; position: relative;
  background: var(--line-strong); transition: background-color 150ms ease;
}
.track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 11px; background: #fff; transition: left 150ms ease;
}
.switch-row[aria-checked="true"] .track { background: var(--switch-on); }
.switch-row[aria-checked="true"] .track::after { left: 23px; }
.success { padding: 28px var(--pad) 20px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.check-circle {
  width: 56px; height: 56px; border-radius: 28px; background: var(--ok-bg); color: var(--ok);
  display: flex; align-items: center; justify-content: center;
}
.success .text { font-size: 15px; color: var(--text-2); line-height: 1.5; }

/* --- Admin (S5) ----------------------------------------------------------- */
.admin-top { border-bottom: 1px solid var(--line-soft); }
.admin-top .wrap {
  padding: 18px var(--pad); display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 16px;
}
.brand-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand-line .wordmark { font-size: 20px; }
.brand-line .sub { font-size: 13px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 14px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 0 14px; min-height: var(--tap); display: inline-flex; align-items: center; border-radius: var(--r-sm);
}
.nav a[aria-current="page"] { color: var(--text); background: var(--surface); }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--text); } }
.admin-main { padding: 28px var(--pad) 48px; display: flex; flex-direction: column; gap: 28px; }
.admin-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.admin-head h1 { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.15; }
.admin-head .sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.control { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.control .select { min-width: 160px; }
.control .input-rate { width: 100px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.seller-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-summary);
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
}
.seller-card.is-off { opacity: 0.6; }
.seller-card .who { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.seller-card .big { font-family: var(--font-display); font-weight: 800; font-size: 30px; color: var(--accent); line-height: 1.1; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 12px; color: var(--muted); }
.kpis div { display: flex; flex-direction: column; gap: 2px; }
.kpis b { color: var(--text); font-weight: 600; font-size: 14px; }
.totals-line { font-size: 14px; color: var(--muted); }
.totals-line b { color: var(--text); }
.section { display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters .select, .filters .search { height: 40px; width: auto; font-size: 13px; }
.filters .search { min-width: 240px; }
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
.orders-table { min-width: 860px; }
.products-table { min-width: 780px; }
th {
  background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 600;
  text-align: left; padding: 12px 16px; white-space: nowrap;
}
td { padding: 12px 16px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
td.num, th.num { text-align: right; }
td.dim { color: var(--muted); }
td.strong { font-weight: 600; }
td.nowrap { white-space: nowrap; }
/* Amounts never split between "S/" and the number. */
td.num, .kpis b { white-space: nowrap; }
td .small { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cell-input { height: 36px; width: 110px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 0 10px; font-size: 13px; }
.cell-select { height: 36px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 0 10px; font-size: 13px; }
.price-cell { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }
.panel-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 18px; display: flex; flex-direction: column; gap: 14px;
}
.secret {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 12px 14px;
}
.secret code { font-size: 16px; font-weight: 700; letter-spacing: 0.5px; color: var(--text); }
.sellers-list { display: flex; flex-direction: column; }
.seller-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 0; border-top: 1px solid var(--line-soft);
}
.seller-row .stack .t { font-weight: 700; }
.seller-row .row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pager { display: flex; justify-content: center; gap: 8px; padding-top: 4px; }

@media (max-width: 600px) {
  .admin-head h1 { font-size: 24px; }
  .brand-line .sub { border-left: 0; padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.total-row.flat { border-top: 0; padding-top: 0; margin-top: 0; }

/* --- Typography refinements (2026-11-12) -------------------------------------
   Money and names use condensed Archivo, like a price ticket on the counter. */
.wordmark { letter-spacing: 1px; }
.price, .order-total, .total-row .amount, .summary .figure, .seller-card .big,
.option .opt-price, .kpis b, td.num { font-variant-numeric: tabular-nums; }
.total-row .amount { font-stretch: 78%; font-size: 28px; }
.option .opt-price { font-stretch: 80%; font-size: 16px; }
.hello .name { font-stretch: 80%; font-size: 28px; line-height: 1.05; }
.summary { gap: 4px; padding: 18px 18px 16px; }
.summary .figure { font-stretch: 75%; font-size: 48px; line-height: 1; margin: 2px 0 4px; }
.order-total { font-stretch: 78%; font-size: 21px; }
.order-code { font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 17px; letter-spacing: 0.3px; }
.headline { font-stretch: 85%; }
.ticket + .stack .headline { font-size: 24px; }
.auth .wordmark { font-size: 26px; }
.auth .page-title { font-size: 24px; font-stretch: 85%; }
.admin-head h1 { font-stretch: 82%; font-size: 34px; }
.seller-card .big { font-stretch: 75%; font-size: 38px; line-height: 1; }
.section-title { font-stretch: 85%; }
@media (max-width: 600px) { .admin-head h1 { font-size: 28px; } }
.skel-line { display: inline-block; width: 90%; height: 0.9em; border-radius: 4px; vertical-align: middle; }
.skel-line.short { width: 55%; }

/* --- Light theme adjustments (Javier, 2026-11-12) ---------------------------
   Gold stays as a fill; gold text and focus rings use --accent-ink for contrast. */
a, .btn-link, .sec-link, .eyebrow { color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { a:hover, .btn-link:hover { color: var(--text); } }
:focus-visible { outline-color: var(--accent-ink); }
.chip-select:focus-within { outline-color: var(--accent-ink); }
.web-link, .web-link:hover { color: var(--text); }
.btn-outline, .btn-outline:hover { color: var(--text); }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover { background: var(--accent-hover); } }
.search input::-webkit-search-cancel-button { filter: none; }
.toast { box-shadow: var(--shadow-lg); }
dialog { box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(18, 18, 20, 0.45); }
.badge { background: var(--surface-2); }
.avatar-sm { background: var(--surface-2); }

/* Catalog */
.head-line, .cat-sticky { background: var(--bg); }
.search { background: var(--surface); box-shadow: var(--shadow-sm); }
.chip { box-shadow: var(--shadow-sm); }
.chip-outline { background: var(--surface); box-shadow: none; }
.card { box-shadow: var(--shadow-sm); }
.card-media { background: #fff; }
.add-fab { box-shadow: 0 2px 8px rgba(18, 18, 20, 0.22); }
.qty-pill { box-shadow: 0 2px 8px rgba(18, 18, 20, 0.18); }
.cart-bar .bar { box-shadow: var(--shadow-lg); border-color: var(--line); }
.cart-icon { background: var(--surface); border-color: var(--line); }
.ticket { box-shadow: var(--shadow-sm); }
.ticket .code { color: var(--accent-ink); }
.option[aria-pressed="true"] { border-color: var(--accent-ink); background: #FFF8EA; }
@media (hover: hover) and (pointer: fine) { .option:hover:not(:disabled) { border-color: var(--accent-ink); } }
.line, .order, .summary, .seller-card, .panel-box, .switch-row { box-shadow: var(--shadow-sm); }
.stepper button { background: var(--surface); }

/* Panels */
.summary .figure, .seller-card .big { color: var(--accent-ink); }
.tabs { background: var(--surface-2); }
.tab[aria-selected="true"] { background: var(--surface); box-shadow: var(--shadow-sm); }
.segmented { background: var(--surface-2); }
.segmented button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow-sm); }
.segmented button[data-v="hidden"][aria-pressed="true"] { background: var(--text); color: var(--surface); }
.pick-row { border-bottom-color: var(--line-soft); }
.pick-row.is-selected .name { color: var(--accent-ink); }
.track::after { box-shadow: 0 1px 2px rgba(18, 18, 20, 0.25); }
.secret code { color: var(--text); }

/* Admin */
.admin-top { background: var(--surface); }
.nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.table-box { background: var(--surface); box-shadow: var(--shadow-sm); }
th { background: var(--surface-2); }
.cell-input, .cell-select { background: var(--surface); }

/* --- Catalog: phone column, sections by category and brands (2026-11-12) --- */
.catalog-page .wrap { max-width: 640px; }
.catalog-page .cart-bar { max-width: 620px; }
@media (min-width: 640px) {
  .catalog-page { background: var(--surface-2); }
  .catalog-page #view-catalog, .catalog-page #view-cart, .catalog-page #view-sent, .catalog-page #view-down {
    width: 100%; max-width: 640px; margin: 0 auto; background: var(--bg);
    box-shadow: 0 0 0 1px var(--line);
  }
  .catalog-page .cat-sticky, .catalog-page .footer-bar { background: var(--bg); }
}
#overview { padding-bottom: 110px; }
.ov-section .grid { padding-top: 0; padding-bottom: 4px; }
.ov-section .sec-head { padding-bottom: 10px; }
.ov-section .sec-head .stack { gap: 1px; }
.sec-link { display: inline-flex; align-items: center; gap: 4px; }
.sec-skel { width: 140px; height: 22px; }
.back-link {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start;
  background: transparent; border: 0; padding: 0; min-height: 32px; position: relative;
  color: var(--accent-ink); font-size: 13px; font-weight: 600;
}
.back-link::after { content: ""; position: absolute; inset: -6px -4px; }
.results-head .sec-head { align-items: flex-end; }
.card-brand {
  font-size: 10px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 13px;
}

/* Brand chip and brand strip */
.chip-brand { background: var(--text); border-color: var(--text); color: var(--surface); }
.chip-brand[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip-brand .chev { font-size: 10px; margin-left: 2px; }
.brand-rail {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 0 12px 2px;
  scroll-snap-type: x proximity; overscroll-behavior-x: contain; scroll-padding-inline: 12px;
}
@media (min-width: 600px) {
  .brand-rail { padding-inline: var(--pad); scroll-padding-inline: var(--pad); }
}
.brand-rail::-webkit-scrollbar { display: none; }
.brand-tile {
  flex: 0 0 auto; min-width: 116px; min-height: 64px; padding: 10px 14px; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm);
  text-align: left; color: var(--text);
}
.brand-tile.skeleton { border: 0; box-shadow: none; }
.bt-name {
  font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 17px; line-height: 1.1;
  letter-spacing: 0.3px; white-space: nowrap;
}
.bt-count { font-size: 11px; color: var(--muted); }
.brand-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; }
.brand-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-weight: 600; text-align: left;
}
.brand-item[aria-pressed="true"] { border-color: var(--accent-ink); background: #FFF8EA; }
.bi-count { font-size: 12px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }

/* --- Admin on phones: compact header, scrolling tabs, tables as cards ------- */
@media (max-width: 720px) {
  .admin-top .wrap { padding: 12px 16px 0; gap: 8px; flex-direction: column; align-items: stretch; }
  .brand-line { gap: 2px 12px; }
  .brand-line .sub { border-left: 0; padding-left: 0; font-size: 12px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 10px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex-shrink: 0; }
  .nav .icon-btn { margin-left: auto; }
  .admin-main { padding: 20px 16px 48px; gap: 22px; }
  .admin-head h1 { font-size: 28px; }
  .controls { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .control .select, .control .input-rate { width: 100%; min-width: 0; }
  #export { grid-column: 1 / -1; min-height: 48px; }
  .cards { grid-template-columns: 1fr; }
  .filters { width: 100%; }
  .filters .select, .filters .search { flex: 1 1 150px; min-width: 0; width: auto; }

  .table-box { border: 0; background: transparent; box-shadow: none; overflow: visible; }
  .orders-table, .products-table { min-width: 0; }
  .table-box table, .table-box tbody, .table-box tr, .table-box td { display: block; }
  .table-box thead { display: none; }
  .table-box tr {
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm);
  }
  .table-box td { padding: 0; border: 0; }

  .orders-table tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px;
    grid-template-areas: "code total" "date date" "seller source" "items items" "status action";
  }
  .c-code { grid-area: code; font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 18px; }
  .c-total { grid-area: total; font-family: var(--font-display); font-weight: 800; font-stretch: 78%; font-size: 20px; }
  .c-date { grid-area: date; font-size: 12px; }
  .c-date .small { display: inline; margin-left: 6px; }
  .c-seller { grid-area: seller; font-size: 13px; font-weight: 600; }
  .c-source { grid-area: source; font-size: 12px; text-align: right; }
  .c-items { grid-area: items; font-size: 13px; color: var(--text-2); padding: 6px 0 4px !important; }
  .c-status { grid-area: status; align-self: center; }
  .c-action { grid-area: action; text-align: right; }

  .products-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
  .products-table tr.is-variant { margin-top: -4px; }
  .p-name { grid-column: 1 / -1; font-size: 14px; }
  .products-table td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 4px;
    font-size: 11px; font-weight: 600; color: var(--muted);
  }
  .products-table td.num { text-align: left; }
  .p-novis { display: none !important; }
  .cell-input, .cell-select { width: 100%; height: 40px; }
  .price-cell { width: 100%; }

  .form-grid { grid-template-columns: 1fr; }
  .seller-row .row-btns { width: 100%; }
  .seller-row .row-btns .btn { flex: 1 1 auto; }
}
.card-media.skeleton { background: var(--surface-2); }
@media (max-width: 720px) {
  .admin-top .wrap { flex-wrap: nowrap; }
  .nav { min-width: 0; }
}
/* Status badges keep their colors over the light-theme default badge. */
.badge.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge.badge-accent { background: var(--accent); color: var(--on-accent); }

/* --- Team board /equipo (supervisor, PRD A-20) ---------------------------- */
.team-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.team-top { background: var(--surface); border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; z-index: 20; }
.team-bar, .team-tools { max-width: 1600px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 14px; }
.team-bar { padding-bottom: 6px; }
.team-bar .brand-line { flex: 1; min-width: 0; }
.team-who { display: flex; align-items: baseline; gap: 6px; font-size: 14px; }
.team-tools { padding-top: 6px; flex-wrap: wrap; }
.team-search { display: flex; gap: 8px; flex: 1 1 420px; max-width: 620px; }
.team-search .search { flex: 1; }
.team-search .btn { min-height: var(--tap); }
.team-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat {
  display: inline-flex; align-items: baseline; gap: 4px; font-size: 13px; color: var(--muted);
  background: var(--surface-2); border-radius: var(--r-pill); padding: 6px 12px;
}
.stat b { color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.stat.is-closed { background: var(--bad-bg); color: var(--bad); }
.stat.is-closed b { color: var(--bad); }
.team-main { flex: 1; width: 100%; max-width: 1600px; margin: 0 auto; padding: 16px 24px 24px; display: flex; flex-direction: column; gap: 16px; }

.board { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(300px, 1fr)); gap: 16px; align-items: start; }
.col {
  background: var(--surface-2); border-radius: 18px; display: flex; flex-direction: column; min-width: 0;
  max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px);
}
.col-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line); background: var(--surface); border-radius: 18px 18px 0 0;
}
.col-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent); font-family: var(--font-display); font-weight: 800; font-size: 18px;
}
.col-head .stack { flex: 1; min-width: 0; }
.col-name { font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 22px; line-height: 1.1; }
.col-count {
  min-width: 34px; height: 34px; padding: 0 8px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--muted); font-weight: 800; font-variant-numeric: tabular-nums;
}
.col-count.has { background: var(--warn-bg); color: var(--warn); }
.col-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.col-sec { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.col-sec span { font-weight: 600; }
.col-sec.is-closed { color: var(--bad); margin-top: 10px; }
.col-empty { font-size: 13px; color: var(--muted); padding: 10px 2px; }
.col-more { align-self: center; }
.order.is-compact { padding: 12px; gap: 8px; }
.order.is-compact .order-items { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.order.is-compact .closed-tag { padding: 7px 10px; font-size: 12px; }

.search-results { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px 16px; box-shadow: var(--shadow-md); }
.search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 8px; }

/* Phones and small laptops: columns slide sideways, one at a time. */
@media (max-width: 899px) {
  .team-bar, .team-tools { padding-left: 16px; padding-right: 16px; }
  .team-top { position: static; }
  .team-bar { gap: 8px; }
  .team-bar .wordmark { white-space: nowrap; font-size: 18px; }
  .team-bar .brand-line .sub { display: none; }
  .team-who { display: none; }
  #refresh .lbl { display: none; }
  #refresh { width: var(--tap); padding: 0; }
  .team-tools { gap: 8px; }
  .team-search { flex-basis: 100%; }
  .stat { padding: 4px 10px; font-size: 12px; }
  .team-main { padding: 12px 0 20px; }
  .search-results { margin: 0 16px; }
  .board {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86vw;
    overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px 8px; scroll-padding: 0 16px;
  }
  .col { scroll-snap-align: start; max-height: none; }
  .col-body { overflow: visible; }
}

/* --- Canje (Puntos del Tio San, PRD A-21) and the customer's number ------- */
.chip.chip-canje { border-style: dashed; border-color: #D9A441; color: var(--accent-ink); background: #FFF8EA; }
.chip.chip-canje[aria-pressed="true"] { background: var(--accent); border-style: solid; border-color: var(--accent); color: var(--on-accent); }
.canje-pill {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.4px;
  text-transform: uppercase; color: var(--accent-ink); background: #FFF3D9; border: 1px dashed #D9A441;
  padding: 3px 8px; border-radius: var(--r-pill);
}
.canje-pill.is-big { font-size: 13px; padding: 6px 12px; }
.card.is-canje .card-media { background: #FFF8EA; }
.add-fab.is-canje { background: var(--accent); color: var(--on-accent); }
.qty-pill.is-canje { background: var(--accent); color: var(--on-accent); }
.qty-pill.is-canje button { color: var(--on-accent); }
.canje-section {
  background: #FFF8EA; border: 1px dashed #E3C27F; border-radius: 18px; margin: 14px 6px 0; padding-bottom: 8px;
}
.canje-section .sec-head { padding: 14px 6px 6px; }
.canje-section .grid { padding-left: 6px; padding-right: 6px; }
.canje-intro { font-size: 13px; color: var(--text-2); line-height: 1.45; margin: 0 0 10px; padding: 0 6px; }
@media (min-width: 600px) {
  .canje-section { margin: 14px 10px 0; }
  .canje-section .sec-head, .canje-section .grid, .canje-intro { padding-left: 10px; padding-right: 10px; }
}
.grid-intro { grid-column: 1 / -1; margin: 0 0 4px; padding: 10px 12px; border-radius: 12px; background: #FFF8EA; border: 1px dashed #E3C27F; }
.canje-note { color: var(--accent-ink); }
.canje-box {
  display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px;
  background: #FFF8EA; border: 1px dashed #E3C27F;
}
.canje-head { display: flex; flex-direction: column; gap: 2px; }
.canje-title { font-family: var(--font-display); font-weight: 800; font-stretch: 85%; font-size: 18px; }
.line.is-canje { background: var(--surface); }
.line.is-canje .line-sub { color: var(--accent-ink); font-weight: 600; }
.phone-field { margin-top: 4px; }
.phone-field .input { height: 50px; font-size: 17px; letter-spacing: 0.5px; font-variant-numeric: tabular-nums; }
.field-hint.is-bad { color: var(--bad); font-weight: 600; }

/* Small on/off switch (admin "Canje" column) */
.switch {
  position: relative; width: 46px; height: 28px; border-radius: var(--r-pill); border: 0; padding: 0;
  background: var(--line-strong); flex-shrink: 0; transition: background 0.15s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #FFFFFF; box-shadow: 0 1px 3px rgba(18, 18, 20, 0.3); transition: left 0.15s;
}
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { left: 21px; }
.small.canje-line { color: var(--accent-ink); font-weight: 600; }

/* --- Admin polish (2026-11-13) ----------------------------------------------
   Same title size in every section, logout beside the menu, the team list as
   the main content of Vendedoras, and a menu that fits a phone without scrolling. */
.admin-top .wrap { flex-wrap: nowrap; }
.admin-top .nav { margin-left: auto; }
.admin-main .section-title {
  font-family: var(--font-display); font-weight: 800; font-stretch: 82%; font-size: 34px; line-height: 1.15;
}
.admin-main .section-head { align-items: flex-end; gap: 16px; }
.admin-main .section-head .stack { gap: 4px; min-width: 0; flex: 1 1 320px; }
.admin-main .section-head .caption { font-size: 14px; max-width: 70ch; }
.orders-table .c-items { min-width: 240px; }
.orders-table .c-date { min-width: 150px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.list-title { font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); padding-top: 12px; }
.team-extra { display: flex; flex-direction: column; gap: 4px; }
.sellers-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 0 18px; box-shadow: var(--shadow-sm); }
.seller-row {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 4px 14px;
  padding: 14px 0; border-top: 1px solid var(--line-soft);
}
.sellers-list > .seller-row:first-child { border-top: 0; }
.seller-row.is-off .seller-info, .seller-row.is-off .seller-avatar { opacity: 0.55; }
.seller-avatar {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); font-family: var(--font-display); font-weight: 800; font-size: 17px;
}
.seller-info { gap: 2px; min-width: 0; }
.seller-row .seller-info .t { font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.seller-info .caption { overflow-wrap: anywhere; }
.seller-row .row-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .btn-quiet:hover { color: var(--text); background: var(--surface-2); } }
.btn-quiet.is-danger { color: var(--bad); }
@media (hover: hover) and (pointer: fine) { .btn-quiet.is-danger:hover { color: var(--bad); background: var(--bad-bg); } }
.sellers-list > .state { padding: 28px 12px; }

@media (max-width: 720px) {
  .admin-top .wrap {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand out" "nav nav";
    align-items: center; padding: 12px 16px 10px; gap: 8px;
  }
  .admin-top .brand-line { grid-area: brand; }
  .admin-top #logout { grid-area: out; }
  .admin-top .nav {
    grid-area: nav; margin: 0; padding: 0; overflow: visible; display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  }
  .admin-top .nav a { justify-content: center; padding: 0 4px; font-size: 13px; min-height: 40px; }
  .admin-main .section-title { font-size: 28px; }
  .admin-main .section-head .caption { font-size: 13px; }
  .sellers-list { padding: 0 14px; }
  .seller-row { grid-template-columns: 40px minmax(0, 1fr); }
  .seller-row .row-btns { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .seller-row .row-btns .btn { width: 100%; padding: 0 6px; }
  .seller-row .row-btns .btn-quiet { grid-column: 1 / -1; min-height: 36px; }
  #add-seller { width: 100%; min-height: 48px; }
}

/* Login on a computer: a centered card instead of a column floating at the top. */
@media (min-width: 720px) {
  body.auth-page { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
  body.auth-page .auth {
    margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
    padding: 36px 36px 28px; box-shadow: var(--shadow-md);
  }
}
.nowrap { white-space: nowrap; }
.orders-table .c-date { min-width: 170px; }
.orders-table .c-source { min-width: 150px; }
@media (max-width: 720px) {
  /* The supervisor has a single everyday action: let it use the full row. */
  .seller-row .row-btns .btn-outline:first-child:nth-last-child(2) { grid-column: 1 / -1; }
}

/* ---- Native feel on phones (PRD A-24) ------------------------------------ */
html { -webkit-tap-highlight-color: transparent; }
button, .btn, .tab, .chip, .icon-btn, .cart-icon, [role="button"] {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
/* iOS zooms into inputs under 16px and never zooms back. */
@media (pointer: coarse) {
  input, select, textarea, .filters .select, .filters .search, .cell-input, .cell-select { font-size: 16px; }
}
.btn:active:not(:disabled), .icon-btn:active { transform: scale(0.98); }
.btn, .icon-btn { transition: transform 100ms ease-out, background-color 120ms, border-color 120ms, color 120ms; }
@media (prefers-reduced-motion: reduce) {
  .btn:active:not(:disabled), .icon-btn:active { transform: none; }
}

/* Installed app (standalone): the status bar is not overlaid (no
   black-translucent style), so only the home indicator needs room. There is
   no reload button in the app, so pull-to-refresh stays on. */
.cart-bar { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }

.btn-dark { background: var(--text); color: var(--surface); font-weight: 700; border: 0; }
@media (hover: hover) and (pointer: fine) { .btn-dark:hover { background: #2A2A2E; color: var(--surface); } }

/* ---- Seller product browser (panel › Ver productos) ------------------------ */
.s-tools { display: flex; flex-direction: column; gap: 10px; }
.s-tools .search { margin-bottom: 0; }
.s-tools .chips { padding: 2px 0 4px; }
.s-count { font-size: 13px; color: var(--muted); font-weight: 600; padding: 6px 0 2px; }
.s-grid {
  display: grid; gap: 10px; align-content: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 560px) { .s-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 860px) { .s-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .s-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.s-card { padding: 5px 5px 6px; gap: 8px; }
.s-body { cursor: default; gap: 4px; padding: 2px 4px 0; }
.s-card .card-title { font-size: 12.5px; min-height: calc(12.5px * 1.3 * 2); }
.s-meta { font-size: 11.5px; font-weight: 600; color: var(--ok); }
.s-meta.is-bad { color: var(--bad); }
.s-dot { color: var(--muted); font-weight: 500; }
.s-card .segmented { background: var(--surface-2); margin-top: auto; }
.s-card .segmented button { min-height: 34px; font-size: 11.5px; padding: 0 2px; }
.s-card .segmented button[aria-pressed="true"] { box-shadow: var(--shadow-sm); }
.tag.is-hidden { background: var(--text-2); color: var(--surface); }
.s-card.is-hidden { background: var(--surface-2); border-style: dashed; border-color: var(--line-strong); box-shadow: none; }
.s-card.is-hidden .card-media img { opacity: 0.35; filter: grayscale(1); }
.s-card.is-hidden .card-title, .s-card.is-hidden .price { color: var(--muted); }
.s-card.is-hidden .segmented { background: var(--surface); }
.s-empty { grid-column: 1 / -1; }
.s-card.is-skeleton { pointer-events: none; }
.s-card.is-skeleton .card-media, .sk-line { background: var(--surface-2); animation: pulse 1.4s ease-in-out infinite; }
.sk-line { height: 10px; border-radius: 5px; margin: 2px 4px; }
.sk-line.short { width: 55%; margin-bottom: 8px; }
@media (prefers-reduced-motion: reduce) { .s-card.is-skeleton .card-media, .sk-line { animation: none; } }
.products-body .pager { padding-top: 14px; }
.s-tools .chips { margin: 0; padding: 0 0 4px; }

/* ---- Brand tiles with logos (catalog › Marcas) ----------------------------- */
.brand-tile {
  min-width: 0; width: 104px; min-height: 0; padding: 4px 4px 8px; gap: 6px;
  align-items: stretch; justify-content: flex-start; text-align: center;
}
.bt-box {
  display: grid; place-items: center; height: 72px; border-radius: 10px;
  background: #fff; overflow: hidden; padding: 6px;
}
.bt-box img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.brand-tile:not(.has-logo) .bt-box { background: var(--surface-2); }
.brand-tile .bt-name {
  font-size: 14px; white-space: normal; overflow-wrap: anywhere; text-align: center; line-height: 1.05;
}
.brand-tile .bt-count { text-align: center; }
.bt-search .bt-box { background: var(--text); color: var(--accent); }
.bt-search .bt-count { color: var(--text); font-weight: 600; }
.brand-tile[aria-pressed="true"] { border-color: var(--accent-ink); box-shadow: 0 0 0 1px var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .brand-tile:hover { border-color: var(--line-strong); } }
.brand-list { gap: 10px; max-height: 60vh; }
.brand-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 480px) { .brand-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.brand-grid .brand-tile { width: auto; }
.brand-all { align-self: flex-start; }

/* Logos cropped to their ink box (brands.js). The frame takes the ink's
   aspect ratio; its width is the smallest of: the box width, the max height
   times the aspect, and an equal-weight size (area ~ --lg squared). */
.brand-tile { width: 112px; }
.bt-box { height: 68px; padding: 6px 8px; --lh: 50px; --lg: 40px; }
.brand-grid .bt-box { height: 76px; --lh: 58px; --lg: 46px; }
.bt-logo {
  position: relative; display: block; overflow: hidden;
  width: min(100%, calc(var(--lh) * var(--a)), calc(var(--lg) * var(--sa)));
  aspect-ratio: var(--a);
}
.bt-logo img {
  position: absolute; max-width: none; padding: 0; object-fit: fill;
  mix-blend-mode: multiply;
}

/* ---- Product description from Shopify (PRD A-28) --------------------------- */
.ps-desc { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--line-soft); }
.ps-desc-title { font-size: 14px; font-weight: 700; margin: 0; }
.ps-desc-body { display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.ps-desc-body p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.ps-desc-body.is-folded {
  max-height: calc(14px * 1.55 * 6); overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
}
.ps-more { align-self: flex-start; padding: 6px 0; border: 0; background: none; font-size: 14px; color: var(--accent-ink); cursor: pointer; }
.ps-store { align-self: flex-start; font-size: 14px; font-weight: 600; color: var(--accent-ink); padding: 6px 0; }
.ps-sk { display: block; height: 12px; border-radius: 6px; }
.ps-sk.short { width: 60%; }
.s-title-btn {
  all: unset; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.s-title-btn:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 4px; }
@media (hover: hover) and (pointer: fine) { .s-title-btn:hover { text-decoration: underline; } }
#product-info .s-meta { font-size: 13px; }

/* ---- Floating product card + photo carousel (PRD A-29) --------------------- */
dialog.float-card {
  margin: auto; padding: 0; width: calc(100% - 24px); max-width: 460px;
  max-height: calc(100dvh - 32px); border-radius: 22px; border: 1px solid var(--line);
  overflow: hidden; box-shadow: 0 24px 60px rgba(18, 18, 20, 0.28);
}
dialog.float-card::backdrop {
  background: rgba(18, 18, 20, 0.32);
  -webkit-backdrop-filter: blur(10px) saturate(0.9);
  backdrop-filter: blur(10px) saturate(0.9);
}
.float-body { max-height: calc(100dvh - 34px); overflow-y: auto; overscroll-behavior: contain; }
.float-x {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 40px; height: 40px; border-radius: 20px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92); color: var(--text);
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm);
}
.float-x::after { content: ""; position: absolute; inset: -4px; }
@media (hover: hover) and (pointer: fine) { .float-x:hover { background: #fff; border-color: var(--line-strong); } }
.float-info { padding-top: 16px; gap: 12px; }
.float-info .caption { padding-right: 0; }

.gallery { position: relative; background: #fff; }
.g-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain; aspect-ratio: 1; max-height: 46dvh; margin: 0 auto;
}
.g-track::-webkit-scrollbar { display: none; }
.g-slide { flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; }
.g-slide img { width: 100%; height: 100%; object-fit: contain; padding: 6%; -webkit-user-drag: none; user-select: none; }
.g-slide .no-photo { color: var(--muted); font-size: 13px; }
.g-nav {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 2; display: none;
  width: 38px; height: 38px; border-radius: 19px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92); color: var(--text); place-items: center; cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.g-nav.prev { left: 10px; }
.g-nav.next { right: 10px; }
.g-nav:disabled { opacity: 0; pointer-events: none; }
.gallery.has-many .g-nav { display: grid; }
@media (hover: none) { .gallery.has-many .g-nav { display: none; } } /* phones swipe */
.g-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.g-dots button {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 4px; background: rgba(18, 18, 20, 0.22);
  position: relative; cursor: pointer; transition: width 160ms ease-out, background-color 160ms;
}
.g-dots button::after { content: ""; position: absolute; inset: -8px -4px; }
.g-dots button[aria-current="true"] { width: 20px; background: var(--text); }

/* PC: photos on the left, details on the right. */
@media (min-width: 820px) {
  dialog.float-card { max-width: 900px; }
  .float-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); overflow: hidden; }
  .gallery { border-right: 1px solid var(--line-soft); display: flex; align-items: center; }
  .g-track { max-height: none; width: 100%; }
  .float-info { max-height: calc(100dvh - 34px); overflow-y: auto; padding: 28px 24px 24px; }
  .float-info .sheet-title { font-size: 18px; padding-right: 36px; }
}

@media (prefers-reduced-motion: no-preference) {
  dialog.float-card[open] { animation: float-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1); }
  dialog.float-card[open]::backdrop { animation: fade-in 220ms ease-out; }
}
@keyframes float-in { from { opacity: 0; transform: translateY(12px) scale(0.97); } }
@keyframes fade-in { from { opacity: 0; } }
dialog.sheet::backdrop {
  background: rgba(18, 18, 20, 0.32);
  -webkit-backdrop-filter: blur(10px) saturate(0.9);
  backdrop-filter: blur(10px) saturate(0.9);
}

/* ---- Profile photos (PRD A-30) --------------------------------------------- */
.has-photo { background: #fff !important; overflow: hidden; padding: 0; }
.has-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.seller-hero .avatar.has-photo { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.me-photo {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center;
  padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
}
.me-photo .avatar { width: 64px; height: 64px; font-size: 28px; }
.me-photo .stack { gap: 3px; min-width: 0; }
.me-photo b { font-size: 14px; }
.me-photo .row-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.photo-row { display: flex; gap: 16px; align-items: center; }
.photo-preview { width: 88px; height: 88px; font-size: 36px; }

/* ---- "Como pedir" button and animated demo (PRD A-31) ---------------------- */
.help-wrap { position: relative; display: inline-flex; }
.help-btn {
  width: 44px; height: 44px; border-radius: 22px; flex-shrink: 0; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
}
@media (hover: hover) and (pointer: fine) { .help-btn:hover { border-color: var(--accent-ink); color: var(--accent-ink); } }
.help-btn.is-new { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
@media (prefers-reduced-motion: no-preference) {
  .help-btn.is-new { animation: help-pulse 1.6s ease-out 3; }
}
@keyframes help-pulse {
  0% { box-shadow: 0 0 0 0 rgba(227, 166, 59, 0.55); }
  100% { box-shadow: 0 0 0 14px rgba(227, 166, 59, 0); }
}
.help-tip {
  position: absolute; top: calc(100% + 10px); right: -6px; z-index: 30; white-space: nowrap; cursor: pointer;
  background: var(--text); color: var(--surface); font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: 10px; box-shadow: var(--shadow-md);
  animation: rise 220ms ease-out;
}
.help-tip::before {
  content: ""; position: absolute; top: -5px; right: 22px; width: 10px; height: 10px;
  background: var(--text); transform: rotate(45deg); border-radius: 2px;
}

dialog.howto { max-width: 420px; overflow-y: auto; overscroll-behavior: contain; }
.hw-intro { padding: 34px 24px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.hw-q {
  width: 64px; height: 64px; border-radius: 32px; background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 34px;
}
@media (prefers-reduced-motion: no-preference) {
  .hw-q { animation: hw-bob 2.4s ease-in-out infinite; }
}
@keyframes hw-bob { 50% { transform: translateY(-5px) rotate(-6deg); } }
.hw-step-title { font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1.2; margin: 0; }
.hw-step-text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.hw-intro .hw-actions { margin-top: 6px; justify-content: center; }
.hw-actions { display: flex; gap: 8px; justify-content: flex-end; width: 100%; }
.hw-actions .btn { min-width: 110px; }

.hw-demo { display: flex; flex-direction: column; }
.hw-stage-wrap { background: var(--surface-2); padding: 22px 0 18px; display: grid; place-items: center; }
.hw-copy { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 8px; min-height: 196px; }
.hw-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: var(--accent-ink); }
.hw-copy .hw-actions { margin-top: auto; padding-top: 8px; }
.hw-progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 4px; }
.hw-progress span { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.hw-progress i { display: block; height: 100%; width: 0; background: var(--accent); }
.hw-progress .done i { width: 100%; }
.hw-progress .now i { width: 100%; animation: hw-fill var(--dur, 5.2s) linear both; }
@keyframes hw-fill { from { width: 0; } }

/* Pretend phone */
.hw-stage {
  position: relative; width: 236px; height: 420px; border-radius: 30px; overflow: hidden;
  background: var(--bg); border: 7px solid #18181b; box-shadow: 0 18px 40px rgba(18, 18, 20, 0.25);
  color: var(--text); user-select: none;
}
.hw-notch { position: absolute; top: 6px; left: 50%; translate: -50% 0; width: 64px; height: 14px; border-radius: 8px; background: #18181b; z-index: 5; }
.hw-screen {
  position: absolute; inset: 0; padding: 28px 10px 10px; display: flex; flex-direction: column; gap: 9px;
  transition: transform 420ms cubic-bezier(0.3, 0.8, 0.2, 1); background: var(--bg);
}
.hw-cartscr, .hw-chat { transform: translateX(100%); }
.hw-stage[data-screen="cart"] .hw-cat { transform: translateX(-100%); }
.hw-stage[data-screen="cart"] .hw-cartscr { transform: none; }
.hw-stage[data-screen="chat"] .hw-cat, .hw-stage[data-screen="chat"] .hw-cartscr { transform: translateX(-100%); }
.hw-stage[data-screen="chat"] .hw-chat { transform: none; }
.hw-instant, .hw-instant * { transition: none !important; animation: none !important; }

.hw-top { display: flex; align-items: center; justify-content: space-between; }
.hw-word { font-family: var(--font-display); font-weight: 800; font-size: 11px; letter-spacing: 1px; }
.hw-cart { position: relative; width: 24px; height: 24px; border-radius: 12px; border: 1px solid var(--line-strong); display: grid; place-items: center; }
.hw-badge {
  position: absolute; top: -5px; right: -5px; width: 14px; height: 14px; border-radius: 7px;
  background: var(--accent); color: var(--on-accent); font-size: 8px; font-weight: 800; display: grid; place-items: center;
  transform: scale(0); transition: transform 260ms cubic-bezier(0.3, 1.6, 0.5, 1);
}
.hw-stage.has-item .hw-badge { transform: scale(1); }
.hw-hero { display: flex; align-items: center; gap: 7px; }
.hw-ava {
  width: 28px; height: 28px; border-radius: 14px; background: var(--accent); color: var(--on-accent); overflow: hidden;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 13px; flex-shrink: 0;
}
.hw-ava img { width: 100%; height: 100%; object-fit: cover; }
.hw-ava.sm { width: 24px; height: 24px; font-size: 11px; }
.hw-who { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.hw-who small { font-size: 8px; color: var(--muted); }
.hw-who b { font-family: var(--font-display); font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-search { display: flex; align-items: center; gap: 5px; height: 24px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); padding: 0 7px; font-size: 9px; color: var(--muted); }
.hw-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.hw-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 3px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hw-img { position: relative; aspect-ratio: 1; background: #fff; border-radius: 6px; display: grid; place-items: center; }
.hw-img img { width: 86%; height: 86%; object-fit: contain; }
.hw-nophoto { width: 60%; height: 60%; border-radius: 6px; background: var(--surface-2); }
.hw-title { font-size: 6.5px; line-height: 1.25; color: var(--text-2); height: 2.5em; overflow: hidden; }
.hw-price { font-family: var(--font-display); font-weight: 800; font-size: 9px; }
.hw-add {
  position: absolute; right: 2px; bottom: 2px; min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
  background: #111; color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 800;
  transition: background-color 200ms, color 200ms, transform 200ms;
}
.hw-add .hw-qty { display: none; font-size: 9px; }
.hw-stage.has-item .hw-target-add { background: var(--accent); color: var(--on-accent); transform: scale(1.1); }
.hw-stage.has-item .hw-target-add .hw-plus { display: none; }
.hw-stage.has-item .hw-target-add .hw-qty { display: block; }
.hw-bar {
  position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 4px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18); transform: translateY(140%); transition: transform 380ms cubic-bezier(0.3, 1.3, 0.5, 1);
}
.hw-stage.has-item .hw-bar { transform: none; }
.hw-bar img { width: 24px; height: 24px; object-fit: contain; background: #fff; border-radius: 6px; }
.hw-bar-txt { display: flex; flex-direction: column; font-size: 8px; line-height: 1.2; flex: 1; }
.hw-bar-btn { background: var(--accent); color: var(--on-accent); font-size: 8.5px; font-weight: 800; padding: 6px 8px; border-radius: 8px; }

.hw-h { font-family: var(--font-display); font-weight: 800; font-size: 14px; }
.hw-line { display: flex; gap: 6px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 5px; }
.hw-line img { width: 30px; height: 30px; object-fit: contain; background: #fff; border-radius: 6px; }
.hw-line-t { display: flex; flex-direction: column; font-size: 8px; line-height: 1.3; min-width: 0; }
.hw-line-t span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hw-line-t small { color: var(--muted); }
.hw-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 9px; padding: 0 2px; }
.hw-total b { font-family: var(--font-display); font-size: 15px; font-weight: 800; }
.hw-field { display: flex; flex-direction: column; gap: 3px; margin-top: auto; }
.hw-field small { font-size: 8px; font-weight: 600; }
.hw-input { height: 26px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line-strong); display: flex; align-items: center; padding: 0 7px; font-size: 10px; font-weight: 600; letter-spacing: 0.3px; }
.hw-caret { width: 1px; height: 12px; background: var(--text); margin-left: 1px; opacity: 0; }
.hw-stage[data-screen="cart"] .hw-caret { animation: hw-blink 1s steps(2) infinite; }
@keyframes hw-blink { 50% { opacity: 1; } }
.hw-send { display: flex; align-items: center; justify-content: center; gap: 5px; height: 30px; border-radius: 9px; background: var(--wa); color: var(--on-wa); font-size: 9px; font-weight: 800; }

.hw-chat { background: var(--wa-chat); padding: 0; gap: 0; }
.hw-chat-head { display: flex; align-items: center; gap: 7px; padding: 26px 10px 8px; background: #075e54; color: #fff; }
.hw-chat-head .hw-who small { color: rgba(255, 255, 255, 0.75); }
.hw-chat-head .hw-who b { font-family: inherit; font-size: 11px; }
.hw-msgs { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 10px 8px; overflow: hidden; }
.hw-bubble {
  max-width: 86%; font-size: 7.6px; line-height: 1.4; padding: 6px 7px; border-radius: 8px; white-space: pre-line;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12); opacity: 0; transform: translateY(8px) scale(0.96);
  transition: opacity 260ms ease-out, transform 300ms cubic-bezier(0.3, 1.3, 0.5, 1);
}
.hw-bubble.out { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 2px; }
.hw-bubble.in { align-self: flex-start; background: #fff; border-top-left-radius: 2px; }
.hw-stage[data-chat="1"] .hw-msg-out, .hw-stage[data-chat="2"] .hw-msg-out, .hw-stage[data-chat="3"] .hw-msg-out,
.hw-stage[data-chat="3"] .hw-msg-in { opacity: 1; transform: none; }
.hw-typing { align-self: flex-start; display: none; gap: 3px; background: #fff; padding: 7px 8px; border-radius: 8px; }
.hw-stage[data-chat="2"] .hw-typing { display: flex; }
.hw-typing i { width: 4px; height: 4px; border-radius: 2px; background: #9a9a9a; animation: hw-dot 1s ease-in-out infinite; }
.hw-typing i:nth-child(2) { animation-delay: 0.15s; }
.hw-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes hw-dot { 40% { transform: translateY(-3px); background: #666; } }
.hw-compose { display: flex; align-items: center; gap: 6px; padding: 7px 8px 9px; }
.hw-compose-txt { flex: 1; background: #fff; border-radius: 14px; padding: 6px 9px; font-size: 7.6px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity 200ms; }
.hw-stage:not([data-chat="0"]) .hw-compose-txt { opacity: 0.35; }
.hw-send-round { width: 26px; height: 26px; border-radius: 13px; background: #00a884; color: #fff; display: grid; place-items: center; flex-shrink: 0; }

.hw-finger {
  position: absolute; left: 0; top: 0; z-index: 6; width: 28px; height: 28px; border-radius: 14px;
  background: rgba(18, 18, 20, 0.35); border: 2px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0; pointer-events: none;
  transition: transform 650ms cubic-bezier(0.45, 0, 0.2, 1), opacity 250ms;
}
.hw-stage.finger-on .hw-finger { opacity: 1; }
.hw-ripple { position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.hw-finger.tap { animation: hw-press 260ms ease-out; }
.hw-finger.tap .hw-ripple { animation: hw-ring 520ms ease-out; }
@keyframes hw-press { 50% { scale: 0.8; } }
@keyframes hw-ring { from { opacity: 0.9; scale: 1; } to { opacity: 0; scale: 2.4; } }

@media (min-width: 820px) {
  dialog.howto { max-width: 760px; }
  .hw-demo:not([hidden]) { display: grid; grid-template-columns: 340px 1fr; }
  .hw-stage-wrap { padding: 30px 0; }
  .hw-copy { padding: 34px 28px 26px; justify-content: center; }
  .hw-copy .hw-progress { margin-right: 48px; margin-bottom: 14px; }
  .hw-copy .hw-actions { margin-top: 22px; }
  .hw-step-title { font-size: 24px; }
  .hw-step-text { font-size: 15px; }
}
@media (max-height: 700px) {
  .hw-stage { height: 360px; }
  .hw-stage-wrap { padding: 14px 0 12px; }
}

/* ---- Brand logo (2026-11-13) --------------------------------------------------
   Every .wordmark draws the official SAN BARBER logo (public/img/logo-san-barber.png,
   1200x281) as a mask filled with the text color, so it stays crisp and can be
   recolored. The words stay in the HTML for screen readers. --h sets the height. */
.wordmark {
  --h: 22px;
  display: inline-block; flex-shrink: 0; vertical-align: middle;
  height: var(--h); width: calc(var(--h) * 4.27);
  font-size: 0; line-height: 0; letter-spacing: 0; color: var(--text); overflow: hidden;
  background-color: currentColor;
  -webkit-mask: url("/img/logo-san-barber.png") center / contain no-repeat;
  mask: url("/img/logo-san-barber.png") center / contain no-repeat;
}
.cat-top .wordmark { --h: 24px; }
.brand-line .wordmark, .team-bar .wordmark { --h: 22px; }
.sent .wordmark { --h: 28px; }

/* Login: logo centered at the top of the card, title and subtitle centered under it. */
.auth .wordmark { --h: 40px; align-self: center; margin: 4px 0 10px; }
.auth > .stack { align-items: center; text-align: center; }
@media (min-width: 720px) {
  body.auth-page .auth { padding-top: 40px; }
}

/* No counts on brand tiles and section heads (2026-11-13): tiles are just the logo box. */
.brand-tile { padding: 4px; gap: 0; }
.bt-box { height: 64px; }
.bt-search .bt-box { display: flex; flex-direction: column; gap: 3px; justify-content: center; align-items: center; }
.bt-search-txt { font-size: 11px; font-weight: 700; color: var(--surface); letter-spacing: 0.2px; }
.sec-head .stack { justify-content: center; }

/* ---- Team board colors (Javier, 2026-11-13) ----------------------------------
   Ximena's board: orders still waiting for an answer are green (card, button,
   section title, counters); closed sales stay red. Only on /equipo. */
.team-page .order:not(.is-closed) { border: 1.5px solid #2E9E5B; background: #F1FAF4; }
.team-page .order:not(.is-closed) .order-total { color: var(--ok); }
.team-page .order:not(.is-closed) .btn-close { background: #1F9A57; color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .team-page .order:not(.is-closed) .btn-close:hover { background: #188049; color: #fff; }
}
.team-page .col-sec:not(.is-closed) { color: var(--ok); }
.team-page .col-count.has { background: var(--ok-bg); color: var(--ok); }
.team-page .stat.is-open { background: var(--ok-bg); color: var(--ok); }
.team-page .stat.is-open b { color: var(--ok); }

/* ---- "Lo mejor para tu barbería" (PRD A-32) ----------------------------------
   The seller's showcase: a dark band with a gold kicker, the first thing the
   customer sees. Cards stay white so the photos read the same as everywhere. */
.featured-section {
  background: var(--text); color: var(--surface); border-radius: 20px;
  margin: 14px 6px 0; padding: 18px 6px 10px; position: relative; overflow: hidden;
}
.featured-section::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent);
}
.featured-head { display: flex; flex-direction: column; gap: 3px; padding: 0 6px 12px; }
.featured-kicker {
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent);
}
.featured-title {
  font-family: var(--font-display); font-weight: 800; font-stretch: 82%; font-size: 24px; line-height: 1.05;
  color: #fff; margin: 0;
}
.featured-section .grid { padding: 0 6px 4px; }
.featured-section .card { border-color: transparent; box-shadow: none; }
@media (min-width: 600px) {
  .featured-section { margin: 16px var(--pad) 0; padding: 22px 10px 14px; }
  .featured-head { padding: 0 8px 14px; }
  .featured-title { font-size: 28px; }
}

/* ---- Panel: "Lo mejor para tu barbería" card and picker (PRD A-32) ----------- */
.showcase {
  display: flex; flex-direction: column; gap: 12px; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--accent);
}
.sc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sc-head .stack { gap: 2px; min-width: 0; }
.sc-kicker { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent-ink); }
.sc-title { font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 1.15; }
.sc-count { flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--text-2); background: var(--surface-2); border-radius: 99px; padding: 4px 10px; }
.sc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sc-empty { font-size: 13px; color: var(--muted); line-height: 1.45; padding: 4px 0; }
.sc-row {
  display: grid; grid-template-columns: 18px 44px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  padding: 6px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--bg);
}
.sc-row.is-off { opacity: 0.6; }
.sc-pos { font-family: var(--font-display); font-weight: 800; font-size: 13px; color: var(--accent-ink); text-align: center; }
.sc-row img, .sc-nophoto { width: 44px; height: 44px; border-radius: 8px; background: #fff; object-fit: contain; }
.sc-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sc-name { font-size: 12.5px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-price { font-size: 12px; color: var(--muted); }
.sc-tools { display: flex; gap: 2px; }
.sc-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2);
  display: grid; place-items: center; cursor: pointer;
}
.sc-btn:disabled { opacity: 0.25; cursor: default; }
.sc-tools .sc-btn:nth-child(1) svg { transform: rotate(90deg); }
.sc-tools .sc-btn:nth-child(2) svg { transform: rotate(-90deg); }
.sc-btn.is-x:hover { color: var(--bad); }
@media (hover: hover) and (pointer: fine) { .sc-btn:not(:disabled):hover { background: var(--surface-2); } }
.showcase .row-btns { display: flex; gap: 8px; flex-wrap: wrap; }

dialog.picker { max-width: 980px; height: calc(100dvh - 32px); }
.pk-body { display: flex; flex-direction: column; height: 100%; }
.pk-head { padding: 22px 20px 10px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line-soft); }
.pk-title { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.1; margin: 0; padding-right: 48px; }
.pk-sub { margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.45; padding-right: 30px; }
.pk-chips { margin: 0; padding: 2px 0 4px; }
.pk-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px; }
.pk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .pk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 820px) { .pk-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.pk-card {
  display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 5px 5px 8px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; color: var(--text);
  transition: border-color 120ms, box-shadow 120ms;
}
.pk-card.is-on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.pk-card.is-skeleton { height: 220px; background: var(--surface-2); border: 0; animation: pulse 1.4s ease-in-out infinite; }
.pk-media { position: relative; aspect-ratio: 1; background: #fff; border-radius: 10px; display: grid; place-items: center; margin-bottom: 3px; }
.pk-media img { width: 88%; height: 88%; object-fit: contain; }
.pk-badge {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 13px;
  background: var(--accent); color: var(--on-accent); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 14px; box-shadow: var(--shadow-sm);
}
.pk-brand { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); padding: 0 3px; }
.pk-name { font-size: 12px; line-height: 1.3; color: var(--text-2); padding: 0 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pk-price { font-family: var(--font-display); font-weight: 800; font-size: 15px; padding: 0 3px; }
.pk-more { display: flex; justify-content: center; padding: 14px 0 4px; }
.pk-none { grid-column: 1 / -1; }
.pk-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line-soft); background: var(--surface);
}
.pk-count { font-size: 14px; font-weight: 700; }
.pk-count.is-full { color: var(--accent-ink); }
.pk-actions { display: flex; gap: 8px; }
.pk-actions .btn { min-width: 110px; }

/* "Imperdibles" as a one-line carousel (2026-11-13): about 2.4 cards visible
   on a phone so the next one peeks in; arrows only with a mouse. */
.featured-section { padding: 16px 0 14px; }
.featured-head { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px 12px; }
.featured-title { font-size: 26px; letter-spacing: 0.2px; }
.featured-rail {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain; padding: 0 12px 4px; scroll-padding-inline: 12px;
}
.featured-rail::-webkit-scrollbar { display: none; }
.featured-rail .card { flex: 0 0 calc((100% - 20px) / 2.4); scroll-snap-align: start; }
.fr-navs { display: none; gap: 6px; }
.fr-nav {
  width: 36px; height: 36px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.fr-nav.is-next svg { transform: rotate(180deg); }
.fr-nav:disabled { opacity: 0.3; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .fr-navs { display: flex; }
  .fr-nav:not(:disabled):hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
}
@media (min-width: 600px) {
  .featured-section { padding: 20px 0 16px; }
  .featured-head { padding: 0 18px 14px; }
  .featured-title { font-size: 30px; }
  .featured-rail { padding: 0 18px 4px; scroll-padding-inline: 18px; gap: 12px; }
  .featured-rail .card { flex-basis: calc((100% - 36px) / 3.35); }
}

/* ---- "Ajusta tu foto" (zoom and move before uploading) --------------------- */
dialog.crop-dialog { max-width: 380px; }
.crop-body { padding: 26px 22px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.crop-title { font-family: var(--font-display); font-weight: 800; font-size: 20px; margin: 0; }
.crop-sub { margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.45; padding: 0 18px; }
.crop-frame { position: relative; width: 280px; height: 280px; border-radius: 16px; overflow: hidden; background: #fff; margin-top: 4px; }
.crop-canvas { display: block; width: 280px; height: 280px; cursor: grab; touch-action: none; }
.crop-canvas:active { cursor: grabbing; }
.crop-canvas:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: -2px; }
/* Everything outside the round avatar is dimmed. */
.crop-ring {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 999px rgba(18, 18, 20, 0.5); outline: 2px solid #fff; outline-offset: -2px;
}
.crop-zoom { display: flex; align-items: center; gap: 10px; width: 280px; }
.crop-zoom input[type="range"] { flex: 1; accent-color: var(--accent); }
.crop-step {
  width: 34px; height: 34px; border-radius: 17px; border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 18px; font-weight: 700; color: var(--text); cursor: pointer; display: grid; place-items: center;
}
.crop-reset { border: 0; background: none; font-size: 13px; color: var(--accent-ink); cursor: pointer; padding: 2px 0; }
.crop-actions { display: flex; gap: 8px; justify-content: center; width: 100%; margin-top: 4px; }
.crop-actions .btn { min-width: 130px; }

/* PRD A-33: Ximena's commission */
.team-page .stat.is-mine { background: #FFF8EA; color: var(--accent-ink); border: 1px solid #E3C27F; }
.team-page .stat.is-mine b { color: var(--accent-ink); }
.closed-tag.is-transfer { background: #3D3D42; color: #fff; }
/* The "Vendido" amount gets the room it needs; counts stay compact. */
.seller-card .kpis { grid-template-columns: minmax(max-content, 1.6fr) 1fr 1fr; gap: 8px 12px; }

/* ---- Guided tour over the real panel (PRD A-34) ---------------------------- */
.tour { position: fixed; inset: 0; z-index: 90; }
.tour-shield { position: absolute; inset: 0; }
.tour-hole {
  position: fixed; border-radius: 14px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(18, 18, 20, 0.62), 0 0 0 3px var(--accent);
  transition: left 380ms cubic-bezier(0.3, 0.8, 0.2, 1), top 380ms cubic-bezier(0.3, 0.8, 0.2, 1),
    width 380ms cubic-bezier(0.3, 0.8, 0.2, 1), height 380ms cubic-bezier(0.3, 0.8, 0.2, 1);
}
.tour-card {
  position: fixed; background: var(--surface); color: var(--text); border-radius: 16px;
  padding: 16px 16px 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3); outline: none;
  display: flex; flex-direction: column; gap: 6px;
  transition: left 380ms cubic-bezier(0.3, 0.8, 0.2, 1), top 380ms cubic-bezier(0.3, 0.8, 0.2, 1);
}
.tour-card::before {
  content: ""; position: absolute; left: var(--arrow, 50%); width: 14px; height: 14px; margin-left: -7px;
  background: var(--surface); transform: rotate(45deg); border-radius: 3px;
}
.tour-card[data-side="below"]::before { top: -6px; }
.tour-card[data-side="above"]::before { bottom: -6px; }
.tour-card[data-side="center"]::before, .tour-card[data-side="bottom"]::before { display: none; }
.tour-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tour-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--accent-ink); }
.tour-skip { border: 0; background: none; font-size: 12.5px; color: var(--muted); cursor: pointer; padding: 4px 0; }
.tour-title { font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1.15; margin: 0; }
.tour-text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.tour-dots { display: flex; gap: 5px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line-strong); transition: width 200ms, background-color 200ms; }
.tour-dots i.on { width: 18px; background: var(--accent); }
.tour-btns { display: flex; gap: 6px; }
.tour-btns .btn { min-width: 84px; }
@media (prefers-reduced-motion: no-preference) {
  .tour { animation: fade-in 200ms ease-out; }
  .tour-card.pop { animation: tour-pop 260ms cubic-bezier(0.3, 1.2, 0.5, 1); }
  .tour.out { opacity: 0; transition: opacity 180ms; }
}
@media (prefers-reduced-motion: reduce) { .tour-hole, .tour-card { transition: none; } }
@keyframes tour-pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } }
.icon-btn.tour-help { font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--text); }
.icon-btn.tour-help.is-new { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (prefers-reduced-motion: no-preference) { .icon-btn.tour-help.is-new { animation: help-pulse 1.6s ease-out 3; } }
.tour-tip { right: -4px; }
/* Panel header: "?" sits next to "Cerrar sesión" on the right. */
.topbar-row .help-wrap { margin-left: auto; margin-right: 8px; }

/* A-35: switch between the team board and Ximena's selling panel */
.team-sell-link { white-space: nowrap; }
.topbar-row .team-back { margin-left: auto; margin-right: 8px; white-space: nowrap; }
.topbar-row .team-back + .help-wrap { margin-left: 0; }
@media (max-width: 720px) { .team-sell-link { padding: 0 10px; } }

/* A-36: "¿Desde qué celular respondiste?" */
dialog.line-dialog { max-width: 400px; }
.line-options { display: flex; flex-direction: column; gap: 8px; }
.line-option {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; cursor: pointer;
  border: 1.5px solid var(--line-strong); border-radius: 12px; font-weight: 600;
}
.line-option:has(input:checked) { border-color: var(--accent); background: #FFF8EA; }
.line-option input { accent-color: var(--accent-ink); width: 18px; height: 18px; }

/* --- Admin dashboard (A-37) ---------------------------------------------------
   Series colors: validated categorical order (blue, orange, aqua, yellow, ...),
   assigned per seller by id so a color always means the same person. */
:root {
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
  --series-5: #e87ba4; --series-6: #008300; --series-7: #6250d6; --series-8: #e34948;
}
.dash-controls { align-items: center; }
.dash-mode { display: inline-grid; grid-auto-flow: column; gap: 3px; background: var(--surface-2); border-radius: 12px; padding: 3px; }
.dash-mode button {
  min-height: 38px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent;
  font: 600 14px var(--font-text); color: var(--muted); cursor: pointer; touch-action: manipulation;
}
.dash-mode button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.dash-nav { display: inline-flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 2px; }
.dash-nav span { min-width: 170px; text-align: center; font-weight: 700; font-size: 14px; }
.dash-nav .icon-btn:disabled { opacity: 0.3; cursor: default; }
.dash-main { display: flex; flex-direction: column; gap: 14px; transition: opacity 0.15s; }
.dash-main[aria-busy="true"] { opacity: 0.55; }
.dash-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dash-kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.dash-kpi .label { font-size: 12px; font-weight: 600; color: var(--muted); }
.dash-kpi b { font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dash-kpi:first-child b { color: var(--accent-ink); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.dash-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-summary);
  padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.dash-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.dash-card-head h2 { font-family: var(--font-display); font-weight: 800; font-size: 17px; }
.dash-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--text-2); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.dash-chart { position: relative; min-height: 220px; }
.dash-chart svg { display: block; max-width: 100%; height: auto; }
.dash-chart .grid { stroke: var(--line-soft); stroke-width: 1; }
.dash-chart .axis { stroke: var(--line-strong); stroke-width: 1; }
.dash-chart .tick { font: 500 11px var(--font-text); fill: var(--muted); font-variant-numeric: tabular-nums; }
.dash-chart .tick.is-today { fill: var(--text); font-weight: 700; }
.dash-chart .hit { fill: transparent; outline: none; cursor: default; }
.dash-chart .hit:hover, .dash-chart .hit:focus-visible { fill: rgba(18, 18, 20, 0.04); }
.dash-empty {
  position: absolute; inset: 0 0 30px 62px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--muted); pointer-events: none;
}
.dash-tip {
  position: absolute; z-index: 2; min-width: 190px; max-width: 260px; pointer-events: none;
  background: var(--text); color: #fff; border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow-md);
  font-size: 13px; display: flex; flex-direction: column; gap: 6px;
}
.dash-tip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.dash-tip li { display: grid; grid-template-columns: 10px 1fr auto auto; align-items: center; gap: 8px; }
.dash-tip li b { font-variant-numeric: tabular-nums; }
.dash-tip li .n { color: #B9B9C0; font-size: 12px; min-width: 14px; text-align: right; }
.dash-tip .muted { color: #B9B9C0; margin: 0; }
.dash-tip .tip-total { margin: 0; border-top: 1px solid rgba(255, 255, 255, 0.18); padding-top: 6px; color: #D6D6DC; }
.dash-tip .tip-total b { color: #fff; }
.dash-table summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent-ink); min-height: 32px; display: inline-flex; align-items: center; }
.dash-table .table-box { margin-top: 8px; max-height: 360px; overflow: auto; }
.dash-table table { font-size: 13px; }
.dash-table td, .dash-table th { padding: 8px 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dash-sellers { display: flex; flex-direction: column; gap: 16px; }
.seller-bar { display: flex; flex-direction: column; gap: 6px; }
.seller-bar .who { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.seller-bar .who span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seller-bar .who b { font-variant-numeric: tabular-nums; }
.seller-bar .bar-track { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.seller-bar .bar-track span { display: block; height: 100%; background: var(--c); border-radius: 5px; min-width: 2px; transition: width 0.3s ease-out; }
.seller-bar .meta { font-size: 12px; color: var(--muted); margin: 0; }
@media (max-width: 1080px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-kpi b { font-size: 20px; }
  .dash-controls { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); }
  .dash-nav { flex: 1; justify-content: space-between; }
  .dash-nav span { min-width: 0; font-size: 13px; line-height: 1.25; }
  #dash-export { grid-column: 1 / -1; justify-content: center; }
  .dash-card { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .seller-bar .bar-track span, .dash-main { transition: none; }
}

/* --- Comisión por marca (A-38) ------------------------------------------------ */
.rates-box { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.rates-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.rates-head .caption { font-size: 13px; max-width: 70ch; }
.rates-list { display: flex; flex-direction: column; }
.rate-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 120px 84px; align-items: center; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--line-soft);
}
.rate-row.is-default { border-top: 1px solid var(--line-strong); }
.rate-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rate-name b { font-size: 15px; font-weight: 700; }
.rate-name span { font-size: 12px; color: var(--muted); }
.rate-input { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-2); }
.rate-input .input { width: 100%; height: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.rate-action { display: flex; justify-content: flex-end; }
.rates-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.rates-add .control:first-child { flex: 1 1 240px; }
.rates-add .select { width: 100%; }
@media (max-width: 560px) {
  .rate-row { grid-template-columns: minmax(0, 1fr) 96px; }
  .rate-action { grid-column: 1 / -1; justify-content: flex-start; }
  .rate-action:empty { display: none; }
  .rates-add .btn { width: 100%; }
}

/* --- ¿Cuándo llegó? date filter + orders grouped by day (A-39) ------------------ */
.date-box { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.date-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.date-filter {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(var(--pad) * -1); padding: 2px var(--pad) 4px; scroll-padding-inline: var(--pad);
}
.date-filter::-webkit-scrollbar { display: none; }
.date-filter .chip { white-space: nowrap; touch-action: manipulation; }
.chip-dates::before {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat;
}
.range-panel {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px;
}
.range-panel .input { width: 100%; min-width: 0; font-size: 16px; }
.range-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.range-error { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--bad); }
.range-error:empty { display: none; }
.range-info { margin: 0; font-size: 13px; color: var(--muted); }
.range-info b { color: var(--text); }
.day-group { display: contents; }
.day-head {
  grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 10px 2px -2px; font-family: var(--font-display); font-size: 15px; font-weight: 800;
}
.day-head:first-child { margin-top: 2px; }
.day-count { font-family: var(--font-text); font-size: 12px; font-weight: 600; color: var(--muted); }

/* --- Tu opinión (A-40) ----------------------------------------------------------- */
.feedback-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
}
.feedback-card > b { font-size: 15px; }
.fb-form { display: flex; flex-direction: column; gap: 8px; }
.fb-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-kinds .chip { touch-action: manipulation; }
.fb-kinds .chip[aria-checked="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.fb-hint { margin: 0; }
.fb-text { width: 100%; min-height: 96px; resize: vertical; font: inherit; font-size: 16px; line-height: 1.45; padding: 10px 12px; }
.fb-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fb-history { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.fb-history-title { font-size: 13px; }
.fb-history ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; overscroll-behavior: contain; }
.fb-history li { background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.fb-history p { margin: 4px 0 0; font-size: 13px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; color: var(--muted); }
.fb-kind { font-weight: 700; color: var(--text); }
.fb-kind.is-like { color: var(--ok); }
.fb-kind.is-problem { color: var(--bad); }
.fb-kind.is-idea { color: var(--accent-ink); }
.fb-read { margin-left: auto; }
.fb-read.is-read { color: var(--ok); font-weight: 600; }
dialog.fb-dialog { max-width: 480px; width: calc(100% - 32px); }
.fb-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* Admin › Opiniones (A-40) */
.nav-badge {
  margin-left: 6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--bad); color: #fff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.fb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.fb-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-sm);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 8px;
}
.fb-card.is-unread { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-sm); }
.fb-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13px; }
.fb-card-head b { font-size: 15px; }
.fb-when { margin-left: auto; color: var(--muted); font-size: 12px; }
.fb-message { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fb-list .state { grid-column: 1 / -1; }
@media (max-width: 560px) { .fb-list { grid-template-columns: minmax(0, 1fr); } }
/* Six admin tabs (A-40): keep the menu on one line on laptops. */
@media (max-width: 1440px) {
  .admin-top .brand-line .sub { display: none; }
  .nav a { padding: 0 11px; }
}

/* --- Admin › Pedidos, larger and easier to read (Javier, 2026-11-17) -------- */
@media (min-width: 721px) {
  .admin-top .wrap, .admin-main.wrap { max-width: 1360px; }
  .orders-table { min-width: 0; table-layout: auto; }
  .orders-table th { font-size: 13px; padding: 14px 14px; }
  .orders-table td { font-size: 15px; padding: 16px 14px; vertical-align: top; }
  .orders-table .c-code { font-family: var(--font-display); font-weight: 800; font-size: 17px; white-space: nowrap; }
  .orders-table .c-date { min-width: 0; white-space: nowrap; color: var(--text-2); }
  .orders-table .c-seller { font-weight: 600; }
  .orders-table .c-source { min-width: 0; color: var(--text-2); }
  .orders-table td .small { font-size: 13px; }
  .orders-table .c-items { min-width: 280px; width: 40%; }
  .orders-table .c-total { font-family: var(--font-display); font-weight: 800; font-size: 18px; white-space: nowrap; }
  .orders-table .c-status .badge { font-size: 13px; padding: 5px 12px; }
  .orders-table .c-action { white-space: nowrap; }
}
.item-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; color: var(--text); line-height: 1.35; }
.item-lines li { display: flex; gap: 8px; align-items: baseline; }
.item-lines .qty { flex: none; min-width: 2.4em; font-variant-numeric: tabular-nums; color: var(--accent-ink); }
@media (max-width: 720px) {
  .orders-table .c-code { font-size: 20px; }
  .orders-table .c-total { font-size: 22px; }
  .orders-table .c-date, .orders-table .c-source { font-size: 13px; }
  .orders-table .c-seller { font-size: 15px; }
  .orders-table .c-items { font-size: 15px; color: var(--text); padding: 8px 0 6px !important; }
  .orders-table .c-status .badge { font-size: 13px; padding: 5px 12px; }
  .orders-table .c-action .btn { min-height: 40px; }
}

/* --- Descargar app (A-42) ----------------------------------------------------- */
.install-btn svg { display: block; }
dialog.install-dialog { max-width: 400px; width: calc(100% - 32px); }
.install-dialog .dialog-body { align-items: stretch; }
.inst-icon { width: 64px; height: 64px; border-radius: 16px; box-shadow: var(--shadow-md); align-self: center; }
.install-dialog .dialog-title { text-align: center; }
.install-dialog .note { text-align: center; }
.inst-steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.inst-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.inst-n {
  flex: none; width: 26px; height: 26px; border-radius: 13px; background: var(--accent); color: var(--on-accent);
  font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center;
}
/* Four header buttons must fit 320-400 px phones (A-42). */
@media (max-width: 400px) {
  .brand-row { gap: 6px; }
  .brand-row .help-btn, .brand-row .cart-icon { width: 40px; height: 40px; }
  .web-link { padding: 0 10px; }
}
@media (max-width: 360px) {
  .cat-top .wordmark { --h: 20px; }
  .brand-row .help-btn, .brand-row .cart-icon { width: 38px; height: 38px; }
  .web-link { font-size: 12px; padding: 0 8px; }
}
@media (max-width: 340px) {
  .cat-top { padding-left: 10px; padding-right: 10px; }
  .brand-row { gap: 4px; }
  .cat-top .wordmark { --h: 18px; }
}
/* Soft entrance when the catalog opens (A-42 follow-up). */
@media (prefers-reduced-motion: no-preference) {
  .app-enter .shell { animation: app-enter 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
}
@keyframes app-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* --- Installed app intro: black, white SB, opens onto the catalog (A-42) ------ */
.app-intro { display: none; }
@media (display-mode: standalone) {
  .app-intro {
    position: fixed; inset: 0; z-index: 1000; background: #000;
    display: flex; align-items: center; justify-content: center;
    clip-path: circle(150% at 50% 50%);
  }
  .app-intro img { width: 112px; height: auto; }
  .app-intro.is-open { animation: intro-open 0.75s cubic-bezier(0.7, 0, 0.2, 1) forwards; }
  .app-intro.is-open img { animation: intro-logo 0.45s ease-in forwards; }
  /* Under the intro the catalog must not play its own fade. */
  .app-enter .shell { animation: none; }
}
@keyframes intro-open {
  0% { clip-path: circle(150% at 50% 50%); }
  100% { clip-path: circle(0% at 50% 50%); }
}
@keyframes intro-logo {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.82); opacity: 0; }
}
@media (display-mode: standalone) and (prefers-reduced-motion: reduce) {
  .app-intro.is-open { animation: intro-fade 0.2s linear forwards; }
  .app-intro.is-open img { animation: none; }
}
@keyframes intro-fade { to { opacity: 0; } }

/* Login, second step (A-43) */
.mfa-form { display: flex; flex-direction: column; gap: 14px; }
.mfa-note { margin: 0; }
.mfa-code { font-size: 22px; letter-spacing: 0.25em; text-align: center; font-variant-numeric: tabular-nums; }
.mfa-help { margin: 0; text-align: center; }
#mfa-back { align-self: center; }

/* --- Admin › Seguridad (A-43) --------------------------------------------------- */
.mfa-card { display: flex; flex-direction: column; gap: 12px; }
.mfa-title { font-family: var(--font-display); font-weight: 800; font-size: 18px; margin: 0; }
#mfa-box { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.mfa-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; color: var(--text-2); }
.mfa-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; color: var(--text-2); max-width: 680px; }
.mfa-steps b { color: var(--text); }
.mfa-key {
  margin-top: 8px; padding: 10px 14px; border-radius: 10px; background: var(--surface-2);
  font-size: 17px; letter-spacing: 0.08em; color: var(--text); word-break: break-all; user-select: all;
}
.mfa-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 8px; }
.mfa-input { width: 160px; font-size: 18px; letter-spacing: 0.2em; text-align: center; }
.mfa-recovery { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1.5px dashed var(--accent); border-radius: 12px; background: #FFF8EA; max-width: 520px; }
.mfa-recovery p { margin: 0; }
.mfa-codes { margin: 0; padding-left: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; font-size: 15px; }
.mfa-off summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.audit-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.audit-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.audit-filters .select { height: 40px; width: auto; font-size: 13px; }
.audit-table { min-width: 720px; }
.audit-table td { font-size: 14px; vertical-align: top; }
.audit-table tr.is-alert td { background: var(--bad-bg); }
.audit-table .c-from .mono { font-size: 12.5px; }
@media (max-width: 720px) {
  .audit-table { min-width: 0; }
  .table-box .audit-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .audit-table .c-what { grid-column: 1 / -1; }
  .audit-table .c-from { grid-column: 1 / -1; }
  .mfa-codes { grid-template-columns: minmax(0, 1fr); }
}

/* --- Dashboard › Visitas (A-44) ------------------------------------------------- */
.dash-visits { gap: 16px; }
.dash-sub { font-family: var(--font-display); font-weight: 800; font-size: 15px; margin: 4px 0 -6px; }
.funnel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fn-step { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fn-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fn-label { font-size: 12px; font-weight: 600; color: var(--muted); width: 100%; }
.fn-head b { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.fn-pct { font-size: 13px; font-weight: 700; color: var(--accent-ink); }
.fn-track { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.fn-bar { display: block; height: 100%; background: var(--text); border-radius: 4px; }
.fn-hint { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.visits-table { font-size: 14px; }
.visits-table td, .visits-table th { padding: 9px 12px; font-variant-numeric: tabular-nums; }
.who-cell { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.tip-visits { grid-template-columns: 10px 1fr auto auto !important; }
@media (max-width: 720px) {
  .funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visits-table { min-width: 0; }
  .table-box .visits-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 10px; }
  .table-box .visits-table td:first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .table-box .visits-table td.num { text-align: left; font-weight: 700; font-size: 16px; }
  .table-box .visits-table td[data-label]::before {
    content: attr(data-label); display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 2px;
  }
}

/* NAVIDAD SAN BARBER (test): banner 16:9 + button. Art: /img/navidad-san-barber.jpg (1600 x 900). */
.xmas-section { padding: 14px 12px 4px; }
.xmas-link { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 16px; }
.xmas-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #a50f19; }
.xmas-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.xmas-frame.has-art .xmas-art { opacity: 1; }
.xmas-frame.has-art .xmas-ph { display: none; }
.xmas-ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 16px; text-align: center; color: #fff;
  background: linear-gradient(135deg, #8e0c15, #d3262f);
}
.xmas-ph-title { font-family: "Archivo", sans-serif; font-weight: 800; font-size: clamp(22px, 6vw, 34px); letter-spacing: .02em; }
.xmas-ph-sub { font-size: 13px; opacity: .85; }
/* Floating "NUEVO" button (bottom right) -> Christmas combos. */
.nuevo-fab {
  position: fixed; right: max(12px, calc(50% - 308px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 21;
  padding: 3px; border: 0; border-radius: 14px; background: #f8d78e; cursor: pointer;
  box-shadow: 0 6px 18px rgba(120, 8, 16, .35); touch-action: manipulation;
  animation: rise 240ms ease-out;
}
.nuevo-fab-txt {
  display: block; padding: 8px 18px 9px; border-radius: 11px; color: #fff;
  background: linear-gradient(115deg, #d6262f 0%, #a8111a 45%, #c41e27 70%, #8e0606 100%);
  font-family: Georgia, "Times New Roman", serif; font-weight: 800; font-size: 22px; line-height: 1;
  text-transform: uppercase; letter-spacing: .01em;
}
.nuevo-fab:active { transform: scale(.96); }
.catalog-page:has(#cart-bar:not([hidden])) .nuevo-fab { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }

/* Arma tu Combo in the seller panel (combos-panel.js). */
.combos-box { display: flex; flex-direction: column; gap: 10px; padding: 16px; margin-bottom: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-soft); }
.combos-title { font-family: var(--font-display); font-weight: 800; font-size: 18px; display: inline-flex; align-items: center; gap: 8px; }
.combos-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #b3121c; color: #fff; font-size: 12px; display: inline-grid; place-items: center; font-family: inherit; }
.combos-tabs { margin: 0; }
.combos-list { display: flex; flex-direction: column; gap: 10px; }
.combo-empty { color: var(--muted); font-size: 14px; padding: 6px 2px; }
.combo-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--line-soft); border-left: 4px solid #b3121c; background: var(--surface-2); }
.combo-card.is-done { border-left-color: var(--line-soft); }
.combo-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.combo-name { font-size: 16px; }
.combo-phone { color: inherit; font-weight: 600; }
.combo-left { flex: none; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--surface); }
.combo-left.is-soon { background: #fff1d6; color: #8a5a00; }
.combo-left.is-late { background: #ffe1e1; color: #a1121b; }
.combo-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.combo-items li { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.combo-items img, .combo-noimg { width: 40px; height: 40px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--line-soft); }
.combo-it-price { color: var(--muted); font-variant-numeric: tabular-nums; }
.combo-note { margin: 0; font-size: 13px; color: var(--muted); font-style: italic; }
.combo-total { margin: 0; font-size: 13px; }
.combo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.combo-price { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.combo-price .input { width: 120px; font-size: 16px; }
