/* =============================================================
   PONS DISTRIBUCIONS PRO — assets/app.css
   Sistema visual Nishman: negro + naranja, estética profesional
   barbería, mobile-first, dark default + light.
   ============================================================= */

/* ============ TOKENS DE BASE ============ */
:root {
  /* Marca */
  --brand-orange: #F4471F;
  --brand-orange-vivid: #FF5C2E;
  --brand-orange-dark: #C7330E;
  --brand-black: #0A0A0A;
  --brand-gold: #C9A961;
  --brand-gold-dark: #a48845;

  /* Modulació d'intensitat del taronja (Tweak) — multiplica softness */
  --orange-soft-alpha: 0.14;
  --orange-accent-alpha: 1;

  /* Density (Tweak): compact | comfortable */
  --pad-base: 14px;
  --pad-tight: 10px;
  --pad-loose: 20px;
  --gap-base: 12px;
  --gap-tight: 8px;
  --row-h: 44px;

  /* Tipografia */
  --font-sans: 'DM Sans', 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Roboto Mono', Menlo, monospace;

  /* Radius */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;

  /* Transitions */
  --t-fast: 120ms ease;
  --t-med: 200ms ease;

  /* Stickies */
  --header-h: 56px;
  --progress-h: 64px;
  --bottom-nav-h: 64px;
  --demo-bar-h: 36px;
}

/* ============ TEMA FOSC (per defecte) ============ */
[data-theme="dark"] {
  --bg: #0A0A0A;
  --bg-elev: #111114;
  --surface: #15151a;
  --surface-2: #1c1c22;
  --surface-3: #25252d;
  --surface-inverse: #f1f1f3;

  --border: #26262e;
  --border-strong: #3a3a44;
  --border-active: #4a4a55;

  --text: #f1f1f3;
  --text-muted: #8e8e98;
  --text-light: #5a5a64;
  --text-on-accent: #ffffff;
  --text-on-inverse: #0A0A0A;

  --primary: #f1f1f3;          /* foreground principal */
  --primary-light: #c5c5cc;

  --accent: var(--brand-orange-vivid);
  --accent-dark: #d63d12;
  --accent-soft: rgba(255, 92, 46, var(--orange-soft-alpha));
  --accent-soft-strong: rgba(255, 92, 46, 0.22);

  --gold: var(--brand-gold);
  --gold-dark: var(--brand-gold-dark);
  --gold-soft: rgba(201, 169, 97, 0.14);

  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, 0.12);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.12);
  --danger: #f87171;

  --blue: #60a5fa;
  --purple: #a78bfa;
  --green: #4ade80;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
  --shadow-md: 0 6px 24px rgba(0,0,0,0.45);
  --scrim: rgba(0,0,0,0.7);
}

/* ============ TEMA CLAR ============ */
[data-theme="light"] {
  --bg: #f6f5f3;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #efeeec;
  --surface-3: #e3e2df;
  --surface-inverse: #0A0A0A;

  --border: #dcdad6;
  --border-strong: #b8b5b0;
  --border-active: #888580;

  --text: #0A0A0A;
  --text-muted: #5a5a60;
  --text-light: #8e8e94;
  --text-on-accent: #ffffff;
  --text-on-inverse: #f1f1f3;

  --primary: #0A0A0A;
  --primary-light: #2a2a30;

  --accent: var(--brand-orange);
  --accent-dark: var(--brand-orange-dark);
  --accent-soft: rgba(244, 71, 31, var(--orange-soft-alpha));
  --accent-soft-strong: rgba(244, 71, 31, 0.20);

  --gold: var(--brand-gold-dark);
  --gold-dark: #8a7036;
  --gold-soft: rgba(201, 169, 97, 0.18);

  --success: #16A34A;
  --success-soft: rgba(22, 163, 74, 0.10);
  --warning: #b45309;
  --warning-soft: rgba(180, 83, 9, 0.10);
  --danger: #b91c1c;

  --blue: #1d4ed8;
  --purple: #6d28d9;
  --green: #15803d;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 28px rgba(0,0,0,0.10);
  --scrim: rgba(20,18,16,0.55);
}

/* ============ DENSITY MODIFIERS (Tweak) ============ */
[data-density="comfortable"] {
  --pad-base: 18px;
  --pad-tight: 14px;
  --pad-loose: 26px;
  --gap-base: 16px;
  --gap-tight: 12px;
  --row-h: 48px;
}

/* ============ RESET ============ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overflow-x: hidden; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  letter-spacing: -0.005em;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

/* ============ APP SHELL ============ */
.app {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

@media (min-width: 600px) {
  body {
    background: #050505;
    display: flex;
    justify-content: center;
    padding: 24px 16px;
  }
  .app {
    width: 100%;
    max-width: 440px;
    min-height: calc(100vh - 48px);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  }
}

/* ============ DEMO BAR (selector de perfil al header) ============ */
.demo-bar {
  height: var(--demo-bar-h);
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}
.demo-bar .demo-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  background: var(--accent);
  color: var(--text-on-accent);
  padding: 3px 6px;
  border-radius: var(--r-xs);
  letter-spacing: 0.08em;
}
.demo-bar select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 8px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.demo-bar select:focus { outline: 1px solid var(--accent); }
.demo-bar .demo-actions { display: flex; gap: 6px; }
.demo-bar .demo-icon-btn {
  width: 28px; height: 28px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.demo-bar .demo-icon-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ============ HEADER ============ */
.app-header {
  position: sticky;
  top: var(--demo-bar-h);
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px var(--pad-base) 10px;
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.brand-mark .logo {
  width: 32px; height: 32px;
  background: var(--accent);
  color: var(--text-on-accent);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
  font-size: 14px;
  font-family: var(--font-mono);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.brand-mark .brand-text { min-width: 0; flex: 1; }
.brand-mark .brand-line-1 {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  line-height: 1;
}
.brand-mark .brand-line-2 {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tarifa-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  background: var(--accent);
  color: var(--text-on-accent);
  padding: 5px 9px;
  border-radius: var(--r-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.tarifa-badge.visitor {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.tarifa-badge.gold {
  background: var(--brand-gold);
  color: #1a1408;
}
.icon-btn {
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  flex-shrink: 0;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Greeting (home only) */
.greeting-row {
  padding: 0 var(--pad-base) 12px;
}
.greeting-eyebrow {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
.greeting-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: 2px;
}

/* ============ BARRA DE PROGRESO SEGMENTADA ============ */
.progress-block {
  padding: 10px var(--pad-base) 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  position: relative;
  z-index: 50;
}
.progress-msg {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.progress-text-wrap {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
  flex: 1;
  min-width: 0;
}
.progress-text-wrap strong { color: var(--accent); font-weight: 800; }
.progress-pct {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}
.progress-track {
  position: relative;
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-track .progress-fill-full {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  transition: width var(--t-med);
  border-radius: 4px;
}
.progress-track .progress-divider {
  position: absolute;
  top: -2px; bottom: -2px;
  width: 2px;
  background: var(--bg);
  z-index: 2;
}
.progress-track .progress-divider[data-d="0"] { left: 25%; }
.progress-track .progress-divider[data-d="1"] { left: 50%; }
.progress-track .progress-divider[data-d="2"] { left: 75%; }

.milestones {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.milestone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
}
.milestone .m-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-light);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-med);
}
.milestone .m-icon svg { width: 12px; height: 12px; }
.milestone .m-amount {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.04em;
}
.milestone.reached .m-icon {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
}
.milestone.reached .m-amount { color: var(--accent); }
.milestone.current .m-icon {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft-strong);
  animation: pulse-ring 2s ease-in-out infinite;
}
.milestone.current .m-amount { color: var(--accent); }

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

/* ============ SCREENS ============ */
.screen {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.screen.active { display: flex; }
.screen-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 24px;
}
.screen-pad { padding: var(--pad-base); }

/* Section headers */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px var(--pad-base) 10px;
  gap: 8px;
}
.section-head .label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.section-head .meta {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.section-head h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
}

/* ============ SEARCH ============ */
.search-block {
  padding: 4px var(--pad-base) 10px;
}
.search-wrap {
  position: relative;
}
.search-wrap input {
  width: 100%;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0 14px 0 40px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}
.search-wrap input::placeholder { color: var(--text-light); }
.search-wrap input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-elev);
}
.search-wrap .search-ico {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ============ FILTER CHIPS ============ */
.filter-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 var(--pad-base) 10px;
  scrollbar-width: none;
}
.filter-chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all var(--t-fast);
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ============ PRODUCT CARDS ============ */
.product-list-wrap {
  padding: 0 var(--pad-base) 80px;
}

/* GRID MODE (home default) */
.product-list--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.product-list--grid .product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px;
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.product-list--grid .product-card:hover {
  border-color: var(--border-strong);
}
.product-list--grid .product-card:active { transform: scale(0.98); }

.product-list--grid .product-img {
  aspect-ratio: 1;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.product-list--grid .product-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.product-list--grid .product-img .emoji-fallback {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-light);
  letter-spacing: 0.08em;
}
.product-list--grid .product-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-height: 0;
}
.product-list--grid .product-info .category {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.product-list--grid .product-info .name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin: 1px 0 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-list--grid .product-info .ref {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-light);
  margin-bottom: 6px;
}
.product-list--grid .product-info .price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
  margin-top: auto;
}
.product-list--grid .price {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}
.product-list--grid .price-iva {
  font-size: 8px;
  color: var(--text-light);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.product-list--grid .price-old {
  font-size: 11px;
  color: var(--text-light);
  text-decoration: line-through;
}
.product-list--grid .price-save {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 1px 5px;
  border-radius: var(--r-xs);
}
.product-list--grid .stock-inline {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: var(--r-xs);
  margin-top: 4px;
  width: fit-content;
}

/* LIST MODE (search results / Tweak) */
.product-list--list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.product-list--list .product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px;
  display: grid;
  grid-template-columns: 64px 1fr 40px;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  transition: border-color var(--t-fast);
}
.product-list--list .product-card:hover { border-color: var(--border-strong); }
.product-list--list .product-img {
  width: 64px; height: 64px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-list--list .product-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.product-list--list .product-img .emoji-fallback {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: var(--text-light);
}
.product-list--list .product-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.product-list--list .product-info .category {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.product-list--list .product-info .name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-list--list .product-info .ref {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-light);
}
.product-list--list .product-info .price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
  margin-top: 2px;
}
.product-list--list .price {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.product-list--list .price-iva {
  font-size: 8px;
  color: var(--text-light);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.product-list--list .price-old {
  font-size: 11px;
  color: var(--text-light);
  text-decoration: line-through;
}
.product-list--list .price-save {
  font-size: 9px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 1px 5px;
  border-radius: var(--r-xs);
}
.product-list--list .stock-inline {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Stock states (shared) */
.stock-high { background: var(--success-soft); color: var(--success); }
.stock-mid  { background: var(--warning-soft); color: var(--warning); }
.stock-low  { background: rgba(248, 113, 113, 0.12); color: var(--danger); }

/* Product badges (top-left overlay) */
.product-badges {
  position: absolute;
  top: 8px; left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}
.badge {
  font-size: 9px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: var(--r-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--surface-3);
  color: var(--text);
}
.badge-new { background: var(--accent); color: var(--text-on-accent); }
.badge-mes { background: var(--brand-gold); color: #1a1408; }
.badge-pack { background: var(--blue); color: #fff; }
.badge-reto { background: var(--purple); color: #fff; }

/* Add button (corner +) */
.add-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 36px; height: 36px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all var(--t-fast);
  box-shadow: var(--shadow-sm);
}
.add-btn:hover { background: var(--accent); color: var(--text-on-accent); }
.add-btn:active { transform: scale(0.92); }
.product-list--list .add-btn {
  position: static;
  width: 40px; height: 40px;
  align-self: center;
  justify-self: end;
  border-radius: var(--r-sm);
}

/* ============ BANNERS HOME ============ */
.visitor-perks-banner {
  margin: 4px var(--pad-base) 14px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-radius: var(--r-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}
.visitor-perks-banner .vp-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.visitor-perks-banner .vp-text { flex: 1; min-width: 0; }
.visitor-perks-banner .vp-eyebrow {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.85;
}
.visitor-perks-banner .vp-title {
  font-size: 14px;
  font-weight: 800;
  margin-top: 2px;
}
.visitor-perks-banner .vp-cta {
  background: #fff;
  color: var(--accent-dark);
  border: none;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.challenge-teaser {
  display: flex;
  margin: 4px var(--pad-base) 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  padding: 12px;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.challenge-teaser:hover { border-color: var(--accent); }
.challenge-teaser .ct-text { flex: 1; min-width: 0; }
.challenge-teaser .ct-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.challenge-teaser .ct-title {
  font-size: 13px;
  font-weight: 700;
  margin: 2px 0 6px;
  color: var(--text);
}
.challenge-teaser .ct-bar {
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}
.challenge-teaser .ct-bar-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width var(--t-med);
}
.challenge-teaser .ct-sub {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

.promo-banner {
  margin: 4px var(--pad-base) 14px;
  background: var(--brand-gold);
  color: #1a1408;
  border-radius: var(--r-md);
  padding: 14px;
  cursor: pointer;
}
.promo-banner .pb-eyebrow {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.7;
}
.promo-banner .pb-title {
  font-size: 14px;
  font-weight: 800;
  margin-top: 2px;
}
.promo-banner .pb-sub {
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
  opacity: 0.85;
}

/* ============ BOTTOM NAVIGATION ============ */
.bottom-nav {
  position: sticky;
  bottom: 0;
  height: var(--bottom-nav-h);
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 30;
  padding: 6px 4px;
  flex-shrink: 0;
}
.nav-item {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  color: var(--text-muted);
  border-radius: var(--r-sm);
  position: relative;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color var(--t-fast);
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item:hover { color: var(--text); }
.nav-item.active { color: var(--accent); }
.nav-item.active::before {
  content: "";
  position: absolute;
  top: -7px; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 2px;
  background: var(--accent);
}
.cart-badge {
  position: absolute;
  top: 0px; right: calc(50% - 22px);
  background: var(--accent);
  color: var(--text-on-accent);
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: var(--r-pill);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  font-family: var(--font-mono);
  border: 2px solid var(--bg-elev);
}

/* ============ PRODUCT DETAIL ============ */
.pd-hero {
  background: var(--surface);
  padding: 20px var(--pad-base);
  position: relative;
}
.pd-back {
  position: absolute;
  top: 16px; left: var(--pad-base);
  z-index: 5;
}
.pd-img {
  aspect-ratio: 1;
  max-width: 280px;
  margin: 0 auto 16px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pd-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-img .emoji-fallback {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 800;
  color: var(--text-light);
  letter-spacing: 0.08em;
}
#pdCategory {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
#pdName {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 4px 0 2px;
}
#pdRef {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-light);
}
#pdBadges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }

.pd-tarifa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent-soft-strong);
  color: var(--accent);
  padding: 5px 9px;
  border-radius: var(--r-xs);
  margin-top: 10px;
}

/* Pricing block (THE big sales tool) */
.pd-pricing {
  margin: 16px var(--pad-base);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
}
.pd-pricing-lead {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
#pdPriceMain {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}
#pdPriceOld {
  font-size: 13px;
  color: var(--text-light);
  text-decoration: line-through;
}
#pdPriceSave {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  padding: 3px 8px;
  border-radius: var(--r-xs);
  letter-spacing: 0.04em;
}
.pd-price-net {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.pd-price-net strong { color: var(--text); }

.pd-breakdown {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pd-breakdown .bd-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.pd-breakdown .bd-label {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.pd-breakdown .bd-label .tag {
  font-family: var(--font-mono);
  font-size: 9px;
  background: var(--surface-2);
  padding: 2px 5px;
  border-radius: var(--r-xs);
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.pd-breakdown .bd-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text);
}
.pd-breakdown .bd-row.strikethrough .bd-val { color: var(--text-light); text-decoration: line-through; }
.pd-breakdown .bd-row.discount .bd-val { color: var(--accent); }
.pd-breakdown .bd-row.extra .bd-val { color: var(--brand-gold); }
.pd-breakdown .bd-savings {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--accent);
  color: var(--text-on-accent);
  border-radius: var(--r-sm);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.pd-breakdown .bd-savings .l {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pd-breakdown .bd-savings .v {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

/* Qty stepper */
.pd-qty {
  margin: 0 var(--pad-base) 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 14px;
}
.pd-qty .qty-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  margin-left: auto;
}
.qty-control button {
  width: 36px; height: 36px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.qty-control button:hover { color: var(--accent); }
.qty-control .val {
  min-width: 32px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
}

/* Volume table */
.pd-volume {
  margin: 0 var(--pad-base) 12px;
}
.volume-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin-bottom: 4px;
  font-size: 12px;
}
.volume-row.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.volume-row .qty { font-weight: 600; color: var(--text); }
.volume-row .price-v {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
}
.volume-row .save { color: var(--accent); }
.volume-hint {
  font-size: 11px;
  color: var(--text-muted);
  padding: 8px 12px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  margin-top: 6px;
  line-height: 1.4;
}

/* Description */
.pd-desc {
  margin: 0 var(--pad-base) 16px;
}
.pd-desc h3 {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 0 0 6px;
}
.pd-desc p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  margin: 0;
  text-wrap: pretty;
}

/* PD sticky bottom */
.pd-sticky {
  position: sticky;
  bottom: var(--bottom-nav-h);
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  padding: 12px var(--pad-base);
  z-index: 20;
}
.pd-add-btn {
  width: 100%;
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--r-md);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--t-fast);
}
.pd-add-btn:hover { background: var(--accent-dark); }
.pd-add-btn .total {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 16px;
}

/* ============ CART ============ */
.cart-list { padding: 0 var(--pad-base); }
.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr 32px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item .product-img {
  width: 64px; height: 64px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.cart-item .product-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { min-width: 0; }
.cart-item-info .name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-item-info .unit-price {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.qty-mini {
  display: flex;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  align-items: center;
}
.qty-mini button {
  width: 28px; height: 28px;
  background: transparent;
  border: none;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}
.qty-mini .val {
  min-width: 24px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
}
.cart-item .subtotal {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.cart-item .remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
}
.cart-item .remove:hover { color: var(--danger); background: var(--surface-2); }

/* Smart hints */
#smartHints { padding: 0 var(--pad-base); display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.smart-hint {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-muted);
  border-radius: var(--r-sm);
  padding: 10px 12px;
}
.smart-hint .icon { font-size: 18px; line-height: 1; flex-shrink: 0; }
.smart-hint .text { flex: 1; min-width: 0; }
.smart-hint .title-h {
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 2px;
}
.smart-hint .body {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}
.smart-hint.success { border-left-color: var(--success); }
.smart-hint.success .title-h { color: var(--success); }
.smart-hint.challenge { border-left-color: var(--brand-gold); }
.smart-hint.challenge .title-h { color: var(--brand-gold); }
.smart-hint.danger { border-left-color: var(--danger); }
.smart-hint.danger .title-h { color: var(--danger); }
.smart-hint:not(.success):not(.challenge):not(.danger) { border-left-color: var(--accent); }
.smart-hint:not(.success):not(.challenge):not(.danger) .title-h { color: var(--accent); }

/* Totals */
.totals-block {
  margin: 12px var(--pad-base);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
}
.totals-block .totals-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  padding: 5px 0;
}
.totals-block .totals-row .l { color: var(--text-muted); }
.totals-block .totals-row .r {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text);
}
.totals-block .totals-row .sub {
  display: block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  font-family: var(--font-sans);
}
.totals-block .total-row {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 6px;
}
.totals-block .total-row .l {
  color: var(--text);
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.totals-block .total-row .r {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
}

.savings-highlight {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px var(--pad-base) 16px;
  padding: 0;
  background: transparent !important;
  color: var(--success);
  border: none !important;
  box-shadow: none !important;
  border-radius: 0;
}
.savings-highlight .l {
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--success);
  background: transparent;
}
.savings-highlight .v {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 14px;
  color: var(--success);
  background: transparent;
}

/* Shipping options */
.shipping-options {
  margin: 0 var(--pad-base) 12px;
  display: flex;
  gap: 6px;
}
.shipping-option {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px;
  font-size: 11px;
  text-align: center;
  cursor: pointer;
}
.shipping-option.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.shipping-option .name { font-weight: 700; }
.shipping-option .sub { font-size: 9px; color: var(--text-muted); margin-top: 2px; }
.shipping-option.active .sub { color: var(--accent); }

/* Sticky checkout */
.cart-sticky {
  position: sticky;
  bottom: var(--bottom-nav-h);
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  padding: 12px var(--pad-base);
  z-index: 20;
}
.confirm-btn {
  width: 100%;
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--r-md);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}
.confirm-btn:disabled {
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: not-allowed;
}
.confirm-btn:not(:disabled):hover { background: var(--accent-dark); }
.confirm-btn .total {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 16px;
}

.cart-empty {
  display: none;
  text-align: center;
  padding: 60px 30px;
}
.cart-empty .icon-big {
  width: 64px; height: 64px;
  background: var(--surface-2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  margin: 0 auto 16px;
}
.cart-empty .title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
}
.cart-empty .desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============ RETOS ============ */
.retos-header-card {
  margin: 14px var(--pad-base);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
}
.retos-header-card .level-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.retos-header-card .level-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.retos-header-card .level-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.retos-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.retos-stats .stat {
  text-align: center;
}
.retos-stats .stat .v {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}
.retos-stats .stat .l {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 2px;
}
.referral-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  gap: 10px;
}
.referral-block .ref-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.referral-block .ref-code {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text);
}
.referral-block button {
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
}

.retos-tabs {
  display: flex;
  padding: 0 var(--pad-base);
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-top: 4px;
}
.reto-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  position: relative;
}
.reto-tab.active { color: var(--accent); }
.reto-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 12px; right: 12px;
  height: 2px;
  background: var(--accent);
}

.retos-list {
  padding: 14px var(--pad-base) 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reto-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  cursor: pointer;
  position: relative;
  transition: border-color var(--t-fast);
}
.reto-card:hover { border-color: var(--border-strong); }
.reto-card.completed { opacity: 0.7; }
.reto-card.completed::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--success);
  opacity: 0.05;
  border-radius: var(--r-md);
  pointer-events: none;
}
.reto-card.locked { opacity: 0.75; }
.completed-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--success);
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.reto-card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.reto-icon {
  width: 44px; height: 44px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.reto-icon.purple { background: rgba(167, 139, 250, 0.15); border-color: rgba(167, 139, 250, 0.3); color: var(--purple); }
.reto-icon.blue { background: rgba(96, 165, 250, 0.15); border-color: rgba(96, 165, 250, 0.3); color: var(--blue); }
.reto-icon.green { background: rgba(74, 222, 128, 0.15); border-color: rgba(74, 222, 128, 0.3); color: var(--success); }
.reto-icon.gold { background: var(--gold-soft); border-color: var(--gold); color: var(--brand-gold); }
.reto-card-info {
  flex: 1;
  min-width: 0;
}
.reto-cat {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.reto-name {
  font-size: 14px;
  font-weight: 800;
  margin: 2px 0;
  letter-spacing: -0.01em;
}
.reto-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.45;
}
.reto-progress-bar {
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
  margin: 10px 0 6px;
}
.reto-progress-bar-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width var(--t-med);
}
.reto-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.reto-progress-text {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}
.reto-reward {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.collection-grid {
  display: grid;
  gap: 4px;
  margin: 10px 0 0;
}
.collection-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding: 6px 4px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-light);
}
.collection-item.acquired {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* Preview banner / CTA for non-pros */
#preview-banner {
  margin: 14px var(--pad-base) 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border-radius: var(--r-md);
  padding: 14px;
  align-items: center;
  gap: 12px;
}
#preview-cta {
  margin: 14px var(--pad-base);
}

/* ============ ACCOUNT ============ */
.account-hero {
  padding: 20px var(--pad-base) 16px;
  background: linear-gradient(180deg, var(--surface), var(--bg));
}
.account-avatar {
  width: 64px; height: 64px;
  background: var(--text);
  color: var(--bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 12px;
  font-family: var(--font-mono);
}
.account-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.account-email {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* Level card (the featured one) */
.level-card {
  margin: 14px var(--pad-base);
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.level-card.elite {
  border-left-color: var(--brand-gold);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(201,169,97,0.08) 100%);
}
.level-card .lc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  gap: 10px;
}
.level-card .lc-eyebrow {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
.level-card .lc-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.level-card.elite .lc-title { color: var(--brand-gold); }
.level-card .lc-pill {
  background: var(--accent);
  color: var(--text-on-accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--r-xs);
  letter-spacing: 0.04em;
}
.level-card.elite .lc-pill { background: var(--brand-gold); color: #1a1408; }
.level-card .lc-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 12px;
}
.level-card .lc-metric .v {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.level-card .lc-metric .l {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 2px;
}
.level-card .lc-progress-track {
  margin-top: 10px;
}
.level-card .lc-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 6px;
}
.level-card .lc-progress-label .next {
  color: var(--accent);
  font-weight: 700;
}
.level-card .lc-progress-bar {
  height: 6px;
  background: var(--surface-3);
  border-radius: 3px;
  overflow: hidden;
}
.level-card .lc-progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
}

/* Account cards row */
.acc-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 var(--pad-base) 14px;
}
.acc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  cursor: pointer;
  transition: border-color var(--t-fast);
}
.acc-card:hover { border-color: var(--border-strong); }
.acc-card .ac-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.acc-card .ac-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-top: 4px;
  color: var(--text);
}
.acc-card .ac-sub {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Points card (special) */
.points-card {
  margin: 0 var(--pad-base) 14px;
  background: linear-gradient(135deg, var(--bg-elev) 0%, var(--surface) 100%);
  border: 1px solid var(--brand-gold);
  border-radius: var(--r-md);
  padding: 14px;
  cursor: pointer;
}
.points-card .pc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.points-card .pc-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand-gold);
}
.points-card .pc-balance {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.points-card .pc-next {
  font-size: 11px;
  color: var(--text-muted);
  margin: 4px 0 8px;
}
.points-card .pc-bar {
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}
.points-card .pc-bar-fill {
  height: 100%;
  background: var(--brand-gold);
  width: 0%;
}

/* Account actions */
.acc-actions {
  margin: 14px var(--pad-base);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.acc-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--t-fast);
}
.acc-action:hover { border-color: var(--accent); color: var(--accent); }
.acc-action .a-ico {
  width: 24px; height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.acc-action .a-text { flex: 1; }
.acc-action .a-arrow { color: var(--text-light); }
.acc-action.danger:hover { color: var(--danger); border-color: var(--danger); }

#accVerifyNotice {
  margin: 14px var(--pad-base);
  background: var(--warning-soft);
  border: 1px solid var(--warning);
  border-radius: var(--r-md);
  padding: 12px 14px;
  display: none;
}
#accVerifyNotice > div:first-child {
  float: left;
  margin-right: 10px;
}
#accVerifyNotice .nw-text { font-size: 12px; line-height: 1.4; overflow: hidden; }
#accVerifyNotice .nw-text strong { color: var(--warning); }
#accVerifyNotice::after { content: ''; display: block; clear: both; }

/* ============ ORDERS ============ */
.orders-list {
  padding: 14px var(--pad-base);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============ AUTH ============ */
.auth-screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 32px 24px 24px;
  justify-content: center;
}
.auth-screen .brand-mark {
  margin-bottom: 32px;
  justify-content: center;
}
.auth-screen .brand-mark .logo { width: 48px; height: 48px; font-size: 20px; }
.auth-screen .brand-mark .brand-line-2 { font-size: 18px; }
.auth-tabs {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 4px;
  margin-bottom: 18px;
}
.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--r-sm);
}
.auth-tab.active {
  background: var(--text);
  color: var(--bg);
}
.auth-screen h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.auth-screen p.lead {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 18px;
}
.auth-screen .form-group {
  margin-bottom: 12px;
}
.auth-screen label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.auth-screen input {
  width: 100%;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0 14px;
  color: var(--text);
  font-size: 14px;
}
.auth-screen input:focus { outline: none; border-color: var(--accent); }
.auth-screen button[type="submit"] {
  width: 100%;
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--r-md);
  height: 50px;
  font-weight: 800;
  font-size: 14px;
  margin-top: 6px;
  cursor: pointer;
}
.auth-screen .auth-skip {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}
.auth-screen .auth-skip a { color: var(--accent); font-weight: 700; cursor: pointer; }
.auth-perks {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.auth-perks h3 {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.auth-perks .perks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-perk {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--text);
}
.auth-perk .pk-ico {
  width: 28px; height: 28px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.auth-perk strong { display: block; margin-bottom: 1px; }
.auth-perk span { color: var(--text-muted); font-size: 11px; }

/* ============ CONFIRM ============ */
.confirm-screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
}
.confirm-screen .confirm-tick {
  width: 80px; height: 80px;
  background: var(--success);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.confirm-screen h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.confirm-screen .lead {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 24px;
  max-width: 280px;
  line-height: 1.5;
}
.confirm-screen .confirm-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 12px;
}
.confirm-screen .confirm-card .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
}
.confirm-screen .confirm-card .row .l { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.confirm-screen .confirm-card .row .r { font-family: var(--font-mono); font-weight: 700; }
.confirm-screen .confirm-card .ref-val { font-size: 14px; color: var(--accent); }
.confirm-screen .confirm-card .save-val { color: var(--accent); }
.confirm-screen button {
  width: 100%;
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--r-md);
  height: 48px;
  font-weight: 800;
  font-size: 14px;
  margin-top: 8px;
  cursor: pointer;
}

/* ============ EMPTY STATES ============ */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}
.empty-state .icon {
  font-size: 36px;
  margin-bottom: 12px;
  color: var(--text-muted);
}
.empty-state .title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
}
.empty-state .desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============ MODALS ============ */
.modal {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(2px);
}
.modal.active { display: flex; }
.modal-content {
  background: var(--bg);
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slide-up 0.25s ease;
}
@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-handle {
  width: 36px; height: 3px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 8px auto 4px;
}
.modal-close {
  width: 32px; height: 32px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

@media (min-width: 600px) {
  .modal { align-items: center; }
  .modal-content {
    border-radius: var(--r-lg);
    max-height: 90vh;
  }
}

/* Celebration modal (smaller, centered) */
#modalCelebration .modal-content {
  text-align: center;
  padding: 32px 24px;
  border-radius: var(--r-lg);
  max-width: 360px;
  align-self: center;
  margin: auto;
}
#modalCelebration .celebration-ring {
  width: 100px; height: 100px;
  background: var(--accent-soft-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 40px;
}
#modalCelebration h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 6px;
}
#modalCelebration .reward {
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 18px;
}
#modalCelebration button {
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--r-md);
  padding: 12px 24px;
  font-weight: 800;
  font-size: 13px;
}

/* Confetti */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  overflow: hidden;
}
.confetti {
  position: absolute;
  width: 8px; height: 14px;
  top: -20px;
  animation: confetti-fall 2.5s linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(110vh) rotate(720deg); }
}

/* Review modal */
.review-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 14px 0;
}
.review-stars .star {
  font-size: 32px;
  color: var(--surface-3);
  cursor: pointer;
  transition: color var(--t-fast);
}
.review-stars .star.active { color: var(--accent); }
.review-stars .star:hover { color: var(--accent); }
.review-textarea {
  width: 100%;
  min-height: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
}

/* Btn secondary (used by app.js) */
.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ============ TWEAKS PANEL ============ */
.tweaks-panel {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 280px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  z-index: 90;
  display: none;
  flex-direction: column;
  font-size: 12px;
  overflow: hidden;
}
.tweaks-panel.active { display: flex; }
.tweaks-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tweaks-header .t-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.tweaks-header .t-close {
  width: 24px; height: 24px;
  background: var(--surface-2);
  border: none;
  border-radius: var(--r-xs);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tweaks-body {
  padding: 12px 14px;
  max-height: 60vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tweak-group .t-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.tweak-segment {
  display: flex;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 3px;
  gap: 2px;
}
.tweak-segment button {
  flex: 1;
  background: transparent;
  border: none;
  padding: 6px 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--r-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tweak-segment button.active {
  background: var(--text);
  color: var(--bg);
}

/* Tweaks density (compact mode tightens spacing further) */
[data-density="compact"] .product-list--grid { gap: 8px; }
[data-density="compact"] .section-head { padding: 14px var(--pad-base) 8px; }

/* ============ UTIL ============ */
.hidden { display: none !important; }
.mono { font-family: var(--font-mono); }
.eyebrow {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

/* Hide screen-pad if empty */
.screen-body > .empty-state { padding-top: 80px; }

/* When success state on progress */
.progress-block.progress-success .progress-fill-full {
  background: linear-gradient(90deg, var(--success), #6ee7a0);
}

/* =============================================================
   COMPAT — Classes generades pel app.js antic que el redisseny
   no havia previst. Estilatge minimalista coherent amb la nova
   paleta perquè no quedin sense format.
   ============================================================= */

/* Botons */
.btn-primary {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  padding: 14px;
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background var(--t-fast);
}
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary .btn-sub { font-size: 12px; font-weight: 600; opacity: 0.85; }

/* Filter chips (categoria al home) */
.filter-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--t-fast);
}
.filter-chip:hover { border-color: var(--border-strong); }
.filter-chip.active { background: var(--accent); color: var(--text-on-accent); border-color: var(--accent); }

/* Stock dot per a layout vell (per si reverteix) */
.stock-dot {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--text-muted); font-weight: 500;
}
.stock-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.stock-dot.stock-high::before { background: var(--success, #22C55E); }
.stock-dot.stock-mid::before { background: var(--warning, #F59E0B); }
.stock-dot.stock-low::before { background: var(--danger, #DC2626); }

/* Stats strip (Cuenta) */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}
.stats-strip .stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 10px;
  text-align: center;
}
.stats-strip .stat .label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 4px;
}
.stats-strip .stat .value {
  font-size: 16px; font-weight: 900; color: var(--text);
}

/* Referral strip (Retos) */
.referral-strip {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin: 12px 0;
  flex-wrap: wrap;
  cursor: pointer;
  transition: border-color var(--t-fast);
}
.referral-strip:hover { border-color: var(--accent); }
.referral-strip > span:first-child { font-size: 12px; color: var(--text-muted); flex: 1; min-width: 130px; }
.referral-strip strong { color: var(--accent); text-decoration: underline; }
.referral-strip .code {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.05em;
}
.referral-strip .copy-btn {
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.referral-strip .copy-btn:hover { background: var(--accent-dark); }

/* Shipping options (Cesta) */
.shipping-block { margin: 12px 0; }
.shipping-block .title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 8px;
}
.shipping-option {
  display: flex; align-items: center; gap: 10px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
  margin-bottom: 8px;
}
.shipping-option.selected, .shipping-option.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.shipping-option .shipping-radio {
  width: 18px; height: 18px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}
.shipping-option.selected .shipping-radio, .shipping-option.active .shipping-radio {
  border-color: var(--accent);
}
.shipping-option.selected .shipping-radio::after, .shipping-option.active .shipping-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--accent);
  border-radius: 50%;
}
.shipping-option .shipping-info { flex: 1; }
.shipping-option .shipping-info .title { font-size: 13px; font-weight: 700; color: var(--text); text-transform: none; letter-spacing: 0; margin-bottom: 2px; }
.shipping-option .shipping-info .sub { font-size: 11px; color: var(--text-muted); }
.shipping-option .price-r { font-size: 14px; font-weight: 800; color: var(--text); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state .title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.empty-state .desc { font-size: 12px; line-height: 1.5; }

/* (Savings highlight definit més amunt amb estil text simple) */

/* Star rating input (reviews) */
.star-input {
  display: flex; gap: 6px; justify-content: center; margin: 16px 0;
}
.star-input .star {
  font-size: 32px;
  color: var(--text-light);
  cursor: pointer;
  transition: color var(--t-fast);
}
.star-input .star.filled { color: var(--accent); }
.star-input .star:hover { transform: scale(1.1); }

/* Order cards */
.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 10px;
}
.order-card .order-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent-soft);
  color: var(--accent);
}
.order-products {
  font-size: 12px; color: var(--text-muted); margin-top: 6px;
}

/* Title-t, label-t, sub-t (challenge teaser) */
.icon-trophy { font-size: 32px; }
.label-t { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.title-t { font-size: 14px; font-weight: 800; color: var(--text); margin: 2px 0; }
.sub-t { font-size: 11px; color: var(--text-muted); }
.progress-mini {
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  margin: 6px 0;
  overflow: hidden;
}
.progress-mini-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width var(--t-med);
}

/* Auth tabs */
.auth-tabs {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 4px;
  margin-bottom: 16px;
}
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
}
.auth-tab.active {
  background: var(--accent);
  color: var(--text-on-accent);
}

/* Smart hints (warning, danger, success, challenge) variants */
.smart-hint.danger { border-color: var(--danger, #DC2626); background: rgba(220, 38, 38, 0.08); }
.smart-hint.danger .icon { color: var(--danger, #DC2626); }
.smart-hint.success { border-color: rgba(34, 197, 94, 0.5); background: rgba(34, 197, 94, 0.08); }
.smart-hint.challenge { border-color: var(--accent); background: var(--accent-soft); }

/* Verify notice (Cuenta) */
.accVerifyNotice, #accVerifyNotice {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--r-md);
  padding: 12px;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 12px;
}

/* DEV panel (account) */
.dev-panel {
  margin-top: 24px;
  padding: 14px;
  background: var(--surface);
  border: 2px dashed var(--accent);
  border-radius: var(--r-md);
}

/* =============================================================
   GREETING AUTO-HIDE + HEADER COLLAPSIBLE ON SCROLL
   ============================================================= */

/* Greeting que es col·lapsa als 4s */
#greetingRow {
  overflow: hidden;
  transition: max-height 350ms ease-out, opacity 250ms ease-out, margin 350ms ease-out, padding 350ms ease-out;
  max-height: 80px;
}
#greetingRow.greeting-collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Header collapsible al fer scroll cap avall:
   - El demo-bar (DEV) s'amaga completament
   - L'app-header (logo, badge, carret) s'amaga
   - El greeting s'amaga
   - LA BARRA DE PROGRÉS ES QUEDA VISIBLE (amb fons diferenciat + ombra)
   - El bottom nav es queda sempre fixe abaix */

.demo-bar, .app-header, #greetingRow {
  transition: transform 250ms ease-out, opacity 200ms ease-out, max-height 250ms ease-out, padding 250ms ease-out;
  will-change: transform, max-height;
}

body.header-collapsed .demo-bar {
  transform: translateY(-100%);
  opacity: 0;
  max-height: 0;
  padding: 0;
  pointer-events: none;
  overflow: hidden;
}
body.header-collapsed .app-header {
  transform: translateY(-100%);
  opacity: 0;
  max-height: 0;
  padding: 0;
  pointer-events: none;
  overflow: hidden;
}
body.header-collapsed #greetingRow {
  max-height: 0;
  opacity: 0;
  padding: 0;
}

/* La barra de progrés sempre visible, amb panell separat (fons diferent + ombra) */
.progress-block, #progressBar {
  transition: padding 250ms ease-out;
  position: relative;
  z-index: 50;
}

/* Reduir l'alçada general del header per recuperar espai vertical */
.app-header {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

/* Reduir greeting (és el "Buenos días Barbería Demo" que ocupa molt) */
#greetingRow {
  padding: 10px 16px 6px !important;
}
#greetingRow .greeting-eyebrow {
  font-size: 12px !important;
  margin-bottom: 2px !important;
}
#greetingRow .greeting-name {
  font-size: 18px !important;
  line-height: 1.1 !important;
}
