/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-md);
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  letter-spacing: -.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-mid), background var(--t-fast);
}
.btn:active { transform: translateY(1px); }

/* Barrido de brillo "foil" al pasar el ratón sobre botones grandes — detalle de
   acabado (no default). Solo en --lg para no abusar. */
.btn--lg { position: relative; overflow: hidden; isolation: isolate; }
.btn--lg::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn--lg:hover::after { transform: translateX(120%); }
@media (prefers-reduced-motion: reduce) { .btn--lg::after { display: none; } }

/* Acción primaria = LATÓN sólido (chrome cálido del rediseño), no rojo con halo.
   El rojo de marca queda para micro-acentos; el oro (--gold) para conversión. */
.btn--primary { background: linear-gradient(180deg, var(--brass-l), #8F7344); color: #1a1208; box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--brass) 55%, transparent); }
.btn--primary:hover { background: linear-gradient(180deg, #F0DCA6, var(--brass)); box-shadow: var(--shadow-3); transform: translateY(-2px); }

.btn--gold { background: var(--poke-gold); color: var(--poke-ink); box-shadow: 0 4px 14px rgba(255,203,5,.35); }
.btn--gold:hover { background: var(--poke-gold-d); transform: translateY(-2px); }

.btn--ghost { background: var(--bg-raised); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--bg-elev); border-color: var(--border-h); }

.btn--outline { background: transparent; color: var(--text); border-color: var(--border-h); }
.btn--outline:hover { background: var(--bg-raised); border-color: var(--text-mute); }

.btn--lg { padding: 14px 28px; font-size: 16px; }
.btn--sm { padding: 6px 12px; font-size: 12px; border-radius: var(--r-sm); }

/* Input */
.input, .select {
  padding: 8px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 13px;
  min-width: 120px;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input:focus, .select:focus { border-color: var(--poke-gold); box-shadow: 0 0 0 4px rgba(255,203,5,.14); }
.input--search { min-width: 280px; padding-left: 36px; background-image:
  url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%236B7896' stroke-width='2'><circle cx='7' cy='7' r='5'/><line x1='11' y1='11' x2='14' y2='14'/></svg>");
  background-repeat: no-repeat; background-position: 10px center; }

/* Badge / Chip */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
}
.badge--up   { color: var(--up);   background: var(--up-bg);   border-color: rgba(34,197,94,.3); }
.badge--down { color: var(--down); background: var(--down-bg); border-color: rgba(239,68,68,.3); }
.badge--warn { color: var(--warn); background: var(--warn-bg); border-color: rgba(245,158,11,.3); }
.badge--neutral { color: var(--text-3); background: var(--bg-elev); border-color: var(--border); }
.badge--gold { color: var(--poke-gold); background: rgba(255,203,5,.12); border-color: rgba(255,203,5,.3); }
.badge--red  { color: var(--poke-red);  background: rgba(238,21,21,.12);  border-color: rgba(238,21,21,.3); }
/* Etiqueta de mercado/moneda: latón contenido (un dato, no una alarma) */
.badge--brass { color: var(--brass-l); background: color-mix(in srgb, var(--brass) 13%, transparent); border-color: color-mix(in srgb, var(--brass) 34%, transparent); }
/* Posición vs media de ventas (basis='feed'): dato informativo SIN dirección
   temporal — atenuado a propósito para no competir con la variación real. */
.badge--vsavg { color: var(--text-3); background: var(--bg-elev); border-color: var(--border); font-weight: 600; }

/* Panel de PRECISIÓN MEDIDA (honestidad del motor): un dato sobrio, no un reclamo. */
.accuracy-note {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brass);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 4px 0 18px;
}
.accuracy-note__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
/* Audit 12-jun: el contenido DIFERENCIAL del producto (precisión medida) vivía a
   11-12.5px gris-sobre-gris. Sube a la escala de lectura: nada bajo --fs-caption. */
.accuracy-note__meta { font-size: var(--fs-caption); color: var(--text-3); font-variant-numeric: tabular-nums; line-height: 1.5; }
.accuracy-note__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.accuracy-note__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--fs-note); line-height: 1.5; }
.accuracy-note__sig { color: var(--text); font-weight: 600; min-width: 240px; flex: 1 1 240px; }
.accuracy-note__detail { color: var(--text-2); font-variant-numeric: tabular-nums; }
.accuracy-note__foot { margin: 12px 0 0; font-size: var(--fs-caption); line-height: 1.55; color: var(--text-3); }

/* Nota + controles del beneficio NETO en la cartera (comisión + impuesto). */
.port-net-note {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: center;
  background: var(--bg-raised); border: 1px solid var(--border); border-left: 3px solid var(--brass);
  border-radius: 12px; padding: 12px 16px; margin: 0 0 18px; font-size: var(--fs-note); color: var(--text-2);
}
.port-net-note__txt { flex: 1 1 320px; line-height: 1.55; }
.port-net-note__ctl { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: var(--fs-caption); color: var(--text-3); }
.port-net-note__ctl label { display: flex; gap: 6px; align-items: center; }
.port-net-note__ctl .select, .port-net-note__ctl .input { font-size: 12.5px; padding: 5px 8px; }

/* Cuña fiscal en cartera: DAC7 + enlace a la guía + export CSV (IRPF). */
.port-fiscal {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: center;
  background: var(--bg-raised); border: 1px solid var(--border); border-left: 3px solid var(--poke-gold);
  border-radius: 12px; padding: 12px 16px; margin: 0 0 18px; font-size: var(--fs-note); color: var(--text-2);
}
.port-fiscal__txt { flex: 1 1 320px; line-height: 1.55; display: flex; gap: 8px; align-items: baseline; }
.port-fiscal__txt > svg { flex: none; width: 14px; height: 14px; color: var(--poke-gold); transform: translateY(2px); }

/* Panel DESTACADO "Si liquido hoy" (r.liquidate_today): la cascada bruto→neto
   tras impuesto en cabecera de la cartera. Reutiliza la cascada de .fiscal-out__*
   (mismo lenguaje visual que la calculadora fiscal) dentro de un marco propio
   con borde dorado — es lo primero que responde "¿cuánto me llevo hoy?". */
.port-liquidate {
  background: var(--bg-raised); border: 1px solid var(--border); border-left: 3px solid var(--poke-gold);
  border-radius: 14px; padding: 18px 20px; margin: 0 0 18px;
}
.port-liquidate__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.port-liquidate__title { margin: 0; font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; color: var(--text); }
.port-liquidate__title svg { color: var(--poke-gold); }
.port-liquidate__badge {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-3); background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 2px 9px;
}
.port-liquidate__foot { margin: 10px 0 0; font-size: var(--fs-caption); line-height: 1.55; color: var(--text-3); }

/* ── Página /fiscalidad ── */
.fiscal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 26px; }
.fiscal-card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 20px; font-size: 13.5px; color: var(--text-2); line-height: 1.55;
}
.fiscal-card h3 { margin: 10px 0 6px; font-size: 16px; color: var(--text); }
.fiscal-card p { margin: 0; }
.fiscal-card strong { color: var(--text); }
.fiscal-card__icon svg { width: 20px; height: 20px; color: var(--poke-gold); }
.fiscal-calc {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 22px; margin-bottom: 22px;
}
.fiscal-calc__row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--text-3); margin-bottom: 16px; }
.fiscal-calc__row label { display: flex; gap: 7px; align-items: center; }
.fiscal-calc__row .input.num { max-width: 110px; }
.fiscal-out__net { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 12px; }
.fiscal-out__net-label { font-size: 13px; color: var(--text-3); }
.fiscal-out__net-value { font-family: var(--font-mono); font-weight: 700; font-size: 28px; letter-spacing: -.02em; }
.fiscal-out__net.up .fiscal-out__net-value { color: var(--up); }
.fiscal-out__net.down .fiscal-out__net-value { color: var(--down); }
.fiscal-out__rows { display: flex; flex-direction: column; gap: 5px; max-width: 460px; font-size: 13px; color: var(--text-2); }
.fiscal-out__rows > div { display: flex; justify-content: space-between; gap: 18px; border-bottom: 1px dashed var(--border); padding-bottom: 4px; }
.fiscal-out__rows .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.fiscal-calc__out { padding-top: 14px; border-top: 1px solid var(--border); }
.fiscal-export {
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center;
  background: var(--bg-raised); border: 1px solid var(--border); border-left: 3px solid var(--poke-gold);
  border-radius: 14px; padding: 18px 20px;
}
.fiscal-export > div:first-child { flex: 1 1 360px; }
.fiscal-export__actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Informe IRPF por lotes FIFO */
.fiscal-report { margin-top: 28px; }
.fiscal-report__head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.fiscal-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0 8px; }
.fiscal-sum__cell { background: var(--bg-raised); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.fiscal-sum__cell span { font-size: 12px; color: var(--text-3); }
.fiscal-sum__cell strong { font-size: 19px; font-weight: 800; }
.fiscal-sum__cell em { font-size: 11.5px; font-style: normal; }
.fiscal-sum__cell--hl { border-left: 3px solid var(--poke-gold); background: var(--bg-elev); }
.fiscal-sum__cell .up { color: var(--up); }
.fiscal-sum__cell .down { color: var(--down); }
.fiscal-sum__detail { font-size: var(--fs-caption); line-height: 1.55; margin: 0 0 14px; }
.fiscal-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.fiscal-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fiscal-table th, .fiscal-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.fiscal-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 600; }
.fiscal-table tbody tr:last-child td { border-bottom: none; }
.fiscal-table .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.fiscal-table .up { color: var(--up); font-weight: 700; }
.fiscal-table .down { color: var(--down); font-weight: 700; }
.fiscal-wash { font-size: 11px; color: var(--poke-gold); margin-left: 4px; }
.fiscal-del { background: none; border: none; color: var(--text-mute); font-size: 17px; line-height: 1; cursor: pointer; padding: 0 4px; }
.fiscal-del:hover { color: var(--down); }
.fiscal-report__actions { margin: 14px 0 10px; }
.fiscal-caveats { margin: 6px 0 0; padding-left: 18px; font-size: var(--fs-caption); color: var(--text-3); line-height: 1.55; }
.fiscal-caveats li { margin-bottom: 4px; }

/* Filter chip */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  font-size: 12px; font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--t-fast);
}
.chip:hover { color: var(--text); border-color: var(--border-h); }
/* Estado activo en familia LATÓN (no rojo): el rojo queda para micro-acentos,
   el oro para conversión. Definición efectiva en views.css (cárgase después). */
.chip--active { background: color-mix(in srgb, var(--brass) 18%, transparent); color: var(--brass-l); border-color: var(--brass); }
.chip--active:hover { border-color: var(--brass-l); }

/* Rarity badges (colorización) */
.rarity { padding: 2px 8px; border-radius: var(--r-xs); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.rarity--common    { background: rgba(123,132,151,.18); color: var(--rar-common); }
.rarity--uncommon  { background: rgba(74,157,95,.18);  color: var(--rar-uncommon); }
.rarity--rare      { background: rgba(201,162,39,.18); color: var(--rar-rare); }
.rarity--double    { background: rgba(183,148,81,.18); color: var(--rar-double); }
.rarity--ultra     { background: rgba(91,125,204,.18); color: var(--rar-ultra); }
.rarity--illus     { background: rgba(199,122,184,.18); color: var(--rar-illus); }
.rarity--sir       { background: rgba(224,78,140,.18); color: var(--rar-sir); }
.rarity--hyper     { background: rgba(210,160,59,.22);  color: var(--rar-hyper); }
.rarity--acespec   { background: rgba(56,183,171,.18); color: var(--rar-acespec); }
/* Rarezas con efecto holo propio (vintage, radiant, shiny) */
.rarity--holo      { background: rgba(108,140,202,.18); color: var(--rar-ultra); }
.rarity--radiant   { background: rgba(196,186,98,.18);  color: var(--rar-rare); }
.rarity--shiny     { background: rgba(160,176,204,.18); color: var(--rar-common); }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(5,7,12,.78);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-6);
  animation: fadeIn .25s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative;          /* contexto para .modal__close (absolute), si no salta */
  background: var(--bg-raised);
  border: 1px solid var(--border-h);
  border-radius: var(--r-xl);
  max-width: 1100px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  /* Scroll del modal a prueba de secuestros: sin encadenar al fondo bloqueado
     (iOS incluido) y con momentum táctil nativo. */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  box-shadow: var(--shadow-3);
  animation: pop .35s var(--ease-snap);
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal__close {
  position: absolute; top: 18px; right: 18px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 50%;
  color: var(--text);
  font-size: 18px;
  z-index: 5;
}
.modal__close { transition: transform var(--t-fast) var(--ease), background var(--t-fast), color var(--t-fast); }
.modal__close:hover { background: var(--poke-red); border-color: var(--poke-red); color: #fff; transform: rotate(90deg); }

/* Loading state — destello en LATÓN cálido (no gris genérico ni arcoíris): la
   carga es un momento de marca. El iridiscente se RESERVA al canto de la carta. */
.skeleton {
  position: relative; overflow: hidden;
  background: var(--bg-raised);
  border-radius: var(--r-sm);
}
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%,
    color-mix(in srgb, var(--brass) 15%, transparent) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: shimmer 1.5s var(--ease) infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skeleton::after { animation: none; } }

.loading {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-4);
  padding: var(--space-12); color: var(--text-2);
  font-family: var(--font-display); font-weight: 700;
}

.empty {
  padding: var(--space-12);
  text-align: center;
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  color: var(--text-3);
}
.empty__title { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--text-2); margin-top: var(--space-3); }

/* Toast (errores) */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 300;
  padding: 12px 18px;
  background: var(--bg-raised);
  border: 1px solid var(--border-h);
  border-left: 4px solid var(--poke-red);
  border-radius: var(--r-md);
  font-size: 13px;
  box-shadow: var(--shadow-3);
  max-width: 360px;
  animation: slideIn .3s var(--ease);
}
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* KPI card */
.kpi {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--space-4);
}
.kpi__label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; font-weight: 700; }
.kpi__value { font-family: var(--font-display); font-weight: 800; font-size: 26px; color: var(--text); }
.kpi__delta { margin-top: 4px; font-size: 12px; font-variant-numeric: tabular-nums; }
/* Variante "sin dirección temporal" (vs media de ventas) o "aún sin dato fiable"
   (90d en maduración): texto más pequeño y apagado — no es un número que pueda
   leerse como variación real. */
.kpi__value--muted { font-family: var(--font-body); font-weight: 700; font-size: 15px; color: var(--text-mute); line-height: 1.3; }
.kpi__sub { display: block; font-size: 10.5px; font-weight: 600; color: var(--text-mute); text-transform: none; letter-spacing: 0; margin-top: 2px; }

/* Tooltip */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--poke-ink); color: var(--text);
  padding: 4px 10px; border-radius: var(--r-xs); font-size: 11px;
  white-space: nowrap; pointer-events: none;
  border: 1px solid var(--border-h);
  z-index: 10;
}

/* Pagination */
.pagination { display: flex; justify-content: center; gap: var(--space-2); margin-top: var(--space-6); }
.pagination button { min-width: 38px; height: 38px; }

/* ───────────────────────────────────────────────────────────────────
   Auth: control de cuenta en navbar + modal login/registro/cuenta
   ─────────────────────────────────────────────────────────────────── */
.nav__login { white-space: nowrap; }
.nav__account {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 10px 0 6px;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--r-pill);
  cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast);
}
.nav__account:hover { border-color: var(--border-h); background: var(--bg-elev); }
.nav__account.is-pro { border-color: var(--poke-gold); }
.nav__account-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--poke-red); color: #fff; font-weight: 800; font-size: 13px;
}
.nav__account.is-pro .nav__account-avatar {
  background: linear-gradient(135deg, var(--poke-gold), var(--poke-gold-d)); color: var(--poke-ink);
}
.nav__account-plan { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--text-2); }
.nav__account.is-pro .nav__account-plan { color: var(--poke-gold); }

.auth { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-2); max-width: 380px; }
.auth__head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.auth__brand { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -.04em; }
.auth__brand b { color: var(--poke-red); }
.auth__sub { color: var(--text-3); font-size: 14px; margin: 0; }
.auth__tabs { display: flex; gap: 4px; background: var(--bg-deep); border-radius: var(--r-md); padding: 4px; }
.auth__tab {
  flex: 1; padding: 9px; border: 0; background: transparent; border-radius: var(--r-sm);
  font-weight: 700; font-size: 13px; color: var(--text-3); transition: all var(--t-fast);
}
.auth__tab.is-active { background: var(--bg-raised); color: var(--text); box-shadow: var(--shadow-1); }
.auth__form { display: flex; flex-direction: column; gap: var(--space-3); }
.auth__field { display: flex; flex-direction: column; gap: 5px; }
.auth__field span { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.auth__field input {
  height: 44px; padding: 0 14px; font-size: 15px;
  background: var(--bg-deep); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text);
  transition: border-color var(--t-fast);
}
.auth__field input:focus { outline: none; border-color: var(--poke-gold); }
.auth__submit { width: 100%; height: 46px; font-size: 15px; margin-top: 4px; }
.auth__err { color: var(--down); font-size: 13px; text-align: center; margin: 0; }
.auth__legal { font-size: 11px; color: var(--text-mute); text-align: center; line-height: 1.5; margin: 0; }

.account__avatar {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--poke-red); color: #fff; font-weight: 800; font-size: 24px;
}
.account__email { font-weight: 700; font-size: 15px; }
.account__plan {
  font-size: 11px; font-weight: 800; letter-spacing: .08em;
  padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--bg-raised); border: 1px solid var(--border); color: var(--text-3);
}
.account__plan.is-pro { background: rgba(255,203,5,.15); border-color: var(--poke-gold); color: var(--poke-gold); }
.account__upsell {
  background: var(--bg-deep); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3);
}
.account__upsell h4 { font-family: var(--font-display); margin: 0; color: var(--poke-gold); }
.account__perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.account__perks li { position: relative; padding-left: 22px; font-size: 14px; color: var(--text-2); }
.account__perks li::before { content: "✦"; position: absolute; left: 0; color: var(--poke-gold); }

/* Bloque de upsell Pro (gating visual en vistas) */
.pro-lock {
  display: flex; align-items: center; gap: var(--space-4);
  background: linear-gradient(135deg, rgba(255,203,5,.10), transparent 70%);
  border: 1px dashed var(--poke-gold); border-radius: var(--r-lg);
  padding: var(--space-5); margin: var(--space-4) 0;
}
.pro-lock__icon { font-size: 26px; flex-shrink: 0; }
.pro-lock__body { flex: 1; min-width: 0; }
.pro-lock__title { font-family: var(--font-display); font-weight: 800; color: var(--poke-gold); margin-bottom: 2px; }
.pro-lock__text { font-size: 14px; color: var(--text-2); }
@media (max-width: 560px) { .pro-lock { flex-direction: column; text-align: center; } }

/* Modal a pantalla completa en móvil (más espacio, sensación app) */
@media (max-width: 560px) {
  .modal-backdrop { padding: 0; }
  .modal { border-radius: 0; max-height: 100dvh; min-height: 100dvh; border: 0; }
  /* Fija al viewport (el modal es fullscreen aquí): con absolute, la X se iba
     con el scroll y para cerrar había que volver arriba del todo. */
  .modal__close { position: fixed; top: 12px; right: 12px; }
  .auth { max-width: 100%; }
}

/* ── Campana de avisos (feed de alertas) ─────────────────────────────── */
.nav__bell-wrap { position: relative; display: inline-flex; }
.nav__bell { position: relative; }
.nav__bell.has-unread { color: var(--poke-gold); border-color: var(--border-h); }
.nav__bell-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 17px; height: 17px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--poke-red); color: #fff;
  font-size: 10px; font-weight: 800; line-height: 1; border-radius: 999px;
  border: 1.5px solid var(--bg);
}
.feed {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  width: 340px; max-width: calc(100vw - 24px);
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); box-shadow: 0 18px 48px rgba(0,0,0,.45);
  overflow: hidden;
}
.feed__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.feed__title { font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.feed__readall {
  background: none; border: none; color: var(--accent, var(--poke-gold));
  font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 4px;
}
.feed__readall:hover { text-decoration: underline; }
.feed__list { max-height: min(60vh, 420px); overflow-y: auto; }
.feed__item {
  display: flex; gap: 10px; width: 100%; text-align: left; align-items: center;
  padding: 10px 14px; background: none; border: none; border-bottom: 1px solid var(--border);
  color: var(--text); cursor: pointer;
}
.feed__item:last-child { border-bottom: none; }
.feed__item:hover { background: var(--bg-deep); }
.feed__item.is-unread { background: color-mix(in srgb, var(--poke-gold) 7%, transparent); }
.feed__img { width: 34px; height: 47px; flex-shrink: 0; }
.feed__img img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }
.feed__noimg { display: block; width: 100%; height: 100%; background: var(--bg-deep); border-radius: 4px; }
.feed__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.feed__name { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed__desc { font-size: var(--fs-caption); color: var(--text-2); line-height: 1.45; }
.feed__time { font-size: 11px; }
.feed__dot { width: 8px; height: 8px; border-radius: 999px; background: var(--poke-gold); flex-shrink: 0; }
.feed__empty { padding: 26px 18px; text-align: center; color: var(--text-2); }
.feed__empty .ico { color: var(--text-mute); margin-bottom: 6px; }
.feed__empty p { margin: 2px 0; font-size: 13px; }
.feed__empty .muted { font-size: 12px; }
@media (max-width: 560px) {
  .feed { position: fixed; top: 64px; right: 12px; left: 12px; width: auto; }
}
