/* ════════════════════════════════════════════════════════════════════════════
   StakeMaster — styles.css
   Estética: Terminal de Trading Profesional
   Tipografías: Rajdhani (display) + JetBrains Mono (datos)
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────────────────────────────── */
:root {
  /* Fondos */
  --bg-0:        #07090d;   /* base absoluta */
  --bg-1:        #0c1018;   /* paneles */
  --bg-2:        #111620;   /* cards internas */
  --bg-3:        #171e2c;   /* hover / input */
  --bg-4:        #1d2535;   /* bordes de foco */

  /* Bordes */
  --brd:         #1e2c3f;
  --brd-hi:      #2a3d57;

  /* Acento principal — ámbar dorado */
  --amber:       #e8a020;
  --amber-dim:   #7a520f;
  --amber-glow:  rgba(232, 160, 32, 0.15);

  /* Ganancias — verde frío */
  --win:         #22d07a;
  --win-dim:     #0d4d2c;
  --win-glow:    rgba(34, 208, 122, 0.12);

  /* Pérdidas — rojo cobalto */
  --lose:        #f04545;
  --lose-dim:    #4d1010;
  --lose-glow:   rgba(240, 69, 69, 0.12);

  /* Texto */
  --txt-1:       #ffffff;   /* principal */
  --txt-2:       #c2d6e8;   /* secundario */
  --txt-3:       #5a7898;   /* placeholders */
  --input-text:  #b9c9da;   /* texto dentro de campos */
  --input-placeholder: #7690ab;
  --copy-text:   #d8e3ee;

  /* Tipografía */
  --font-display: 'Rajdhani', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Miscelánea */
  --radius:      4px;
  --radius-lg:   8px;
  --transition:  150ms ease;
  --shadow:      0 4px 24px rgba(0,0,0,0.5);
}

/* ── Velo de carga inicial (evita flash de login en usuarios autenticados) ── */
#page-veil {
  position: fixed;
  inset: 0;
  background: var(--bg-0);
  z-index: 9999;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
#page-veil.fade-out { opacity: 0; }

/* ── Reset & base ───────────────────────────────────────────────────────── */
/* ── Tema claro ──────────────────────────────────────────────────────────── */
[data-theme="light"] {
  --bg-0:       #e8edf4;
  --bg-1:       #ffffff;
  --bg-2:       #f0f4fa;
  --bg-3:       #e2e9f2;
  --bg-4:       #d4dde9;
  --brd:        #becada;
  --brd-hi:     #97a9c0;
  --amber:      #c47d00;
  --amber-dim:  #f7e4b3;
  --amber-glow: rgba(196,125,0,0.12);
  --win:        #16a85a;
  --win-dim:    #c7ead9;
  --win-glow:   rgba(22,168,90,0.1);
  --lose:       #d93030;
  --lose-dim:   #f8d9d9;
  --lose-glow:  rgba(217,48,48,0.1);
  --txt-1:      #080e18;
  --txt-2:      #304762;
  --txt-3:      #607790;
  --input-text: #5d6e82;
  --input-placeholder: #8393a5;
  --copy-text:  #182537;
  --shadow:     0 4px 24px rgba(0,0,0,0.1);
}

/* Auto: sigue la preferencia del sistema cuando no hay tema forzado */
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]):not([data-theme="light"]) {
    --bg-0:       #e8edf4;
    --bg-1:       #ffffff;
    --bg-2:       #f0f4fa;
    --bg-3:       #e2e9f2;
    --bg-4:       #d4dde9;
    --brd:        #becada;
    --brd-hi:     #97a9c0;
    --amber:      #c47d00;
    --amber-dim:  #f7e4b3;
    --amber-glow: rgba(196,125,0,0.12);
    --win:        #16a85a;
    --win-dim:    #c7ead9;
    --win-glow:   rgba(22,168,90,0.1);
    --lose:       #d93030;
    --lose-dim:   #f8d9d9;
    --lose-glow:  rgba(217,48,48,0.1);
    --txt-1:      #080e18;
    --txt-2:      #304762;
    --txt-3:      #607790;
    --input-text: #5d6e82;
    --input-placeholder: #8393a5;
    --copy-text:  #182537;
    --shadow:     0 4px 24px rgba(0,0,0,0.1);
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 17px; scroll-behavior: smooth; }

body {
  background: var(--bg-0);
  color: var(--txt-1);
  font-family: var(--font-mono);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Grid sutil de fondo — da textura de terminal */
  background-image:
    linear-gradient(rgba(30, 44, 63, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 44, 63, 0.35) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center center;
}

body.body--auth-open {
  overflow: hidden;
}

/* ── TOAST ──────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 10001;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  max-width: 340px;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  border-left: 3px solid var(--amber);
  background: var(--bg-2);
  color: var(--txt-1);
  box-shadow: var(--shadow);
}
.toast.toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast--win     { border-color: var(--win);  }
.toast.toast--lose    { border-color: var(--lose); }
.toast.toast--error   { border-color: var(--lose); color: var(--lose); }

/* ── HEADER ─────────────────────────────────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px;
  min-height: 68px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--brd);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.6);
  flex-shrink: 0;
}

.header__left,
.header__right,
.header__actions-group,
.header__nav,
.header__kpis {
  display: flex;
  align-items: center;
  min-width: 0;
}

.header__left {
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
}

.header__right {
  gap: 8px;
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
}

.header__actions-group {
  flex: 0 0 auto;
  gap: 8px;
  justify-content: flex-end;
}

.header__nav {
  gap: 8px;
  flex-shrink: 0;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
}
.header__logo {
  color: var(--amber);
  font-size: 1.4rem;
  line-height: 1;
  animation: pulse-amber 3s ease-in-out infinite;
}
@keyframes pulse-amber {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}
.header__name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.12em;
  color: var(--txt-2);
}
.header__name strong { color: var(--amber); font-weight: 700; }

.header__toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 118px;
  padding: 0 14px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.header__calc-btn,
.header__articles-link,
.header__news-btn,
.header__share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--brd);
  border-radius: var(--radius);
  background: transparent;
  color: var(--txt-2);
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.header__articles-link:hover,
.header__news-btn:hover,
.header__share-btn:hover {
  border-color: var(--brd-hi);
  background: var(--bg-2);
  color: var(--amber);
}

.header__news-btn,
.header__share-btn {
  cursor: pointer;
  font-family: var(--font-mono);
}

.header__calc-btn {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
}

.header__toolbar-icon {
  display: block;
  flex-shrink: 0;
  opacity: 0.96;
}

.header__share-btn {
  color: var(--amber-soft);
  border-color: rgba(232, 160, 32, 0.28);
  background: rgba(232, 160, 32, 0.06);
}

.header__share-btn:hover {
  border-color: rgba(232, 160, 32, 0.55);
  background: rgba(232, 160, 32, 0.11);
}

.header__news-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 9px;
  height: 9px;
  color: var(--amber);
  font-size: 0.52rem;
  line-height: 1;
}

.header__news-badge--pulse {
  animation: signalBadgePulse 1.8s ease-in-out infinite;
}

@keyframes signalBadgePulse {
  0%, 100% { transform: scale(1); opacity: 0.88; }
  45% { transform: scale(1.18); opacity: 1; }
  70% { transform: scale(0.96); opacity: 0.72; }
}

.header__bankroll {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 5px 8px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  min-width: 0;
}
.header__bankroll:hover {
  border-color: var(--brd-hi);
  background: var(--bg-2);
}
.bankroll__figure {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.bankroll__label {
  color: var(--txt-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.bankroll__amount {
  font: inherit;
  color: var(--amber);
}
.bankroll__currency {
  font-size: 0.7rem;
  color: var(--txt-3);
  letter-spacing: 0.1em;
}
/* bankroll__name removed - name is now shown in bankroll__label */

.header__kpis {
  gap: 18px;
  flex-shrink: 0;
}

.meta-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.meta-stat--yield {
  min-width: 0;
}
.meta-stat__val {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--txt-1);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.meta-stat--bankroll {
  flex-shrink: 0;
}
/* Utility color classes (usadas en varios paneles) */
.win  { color: var(--win);  }
.lose { color: var(--lose); }
.meta-stat__val.win  { color: var(--win);  }
.meta-stat__val.lose { color: var(--lose); }
.pnl-item__val.lose  { color: var(--lose); }
.pnl-item--sep-before {
  border-left: 1px solid var(--brd-hi);
  margin-left: 4px;
}
.meta-stat__lbl {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--txt-3);
  white-space: nowrap;
}
.meta-stat__sub {
  font-size: 0.58rem;
  line-height: 1.35;
  letter-spacing: 0.04em;
  color: var(--txt-3);
  text-align: center;
  max-width: 138px;
}

.header__user {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding-left: 12px;
  border-left: 1px solid var(--brd);
}

/* ── LAYOUT ─────────────────────────────────────────────────────────────── */
.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 0;
}

/* ── PANEL BASE ─────────────────────────────────────────────────────────── */
.panel {
  background: var(--bg-1);
  padding: 28px 24px;
  overflow-y: clip;
}
.panel--history { background: var(--bg-0); }

.panel__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  color: var(--txt-2);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--brd);
}
.panel__title--toggle {
  justify-content: space-between;
  cursor: pointer;
  border-radius: 10px;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.panel__title--toggle:hover {
  background: var(--bg-2);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(122, 143, 168, 0.14);
}
.panel__title-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.panel__title-arrow {
  color: var(--txt-3);
  font-size: 0.82rem;
  transition: transform var(--transition), color var(--transition);
}
.panel__title-arrow.open {
  transform: rotate(0deg);
}
.panel__title-icon { color: var(--amber); font-size: 1rem; }
.dashboard-body.hidden { display: none; }

.tablero-card {
  border: 1px solid var(--brd);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.tablero-card .panel__title {
  padding: 10px 16px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--brd);
}
.tablero-card .dashboard-body {
  padding: 10px 14px 14px;
}

.tablero-popup {
  position: fixed;
  top: 78px;
  right: 28px;
  width: min(680px, calc(100vw - 36px));
  max-height: calc(100dvh - 100px);
  margin-bottom: 0;
  background: var(--bg-1);
  box-shadow: var(--shadow);
  z-index: 116;
  overflow: hidden;
}

.tablero-popup.hidden {
  display: none;
}

.tablero-popup__bar {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--brd);
}

.tablero-popup .panel__title {
  flex: 1 1 auto;
  border-bottom: none;
}

.tablero-popup__title {
  cursor: default;
  user-select: text;
}

.tablero-popup .dashboard-body {
  max-height: calc(100dvh - 158px);
  overflow-y: auto;
  overflow-x: hidden;
}

.tablero-popup .streak-panel {
  margin: 10px 0 8px;
  border: 1px solid var(--brd);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
  overflow: hidden;
}

.tablero-popup .achievements-panel {
  margin: 10px 0 8px;
  border: 1px solid var(--brd);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
  overflow: hidden;
}

.tablero-popup .streak-header {
  padding: 10px 14px 8px;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.tablero-popup .streak-header:hover,
.tablero-popup .achievements-header:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.tablero-popup .streak-title,
.tablero-popup .achievements-title {
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}

.tablero-popup .streak-grid {
  grid-template-columns: repeat(4, minmax(118px, 1fr));
}

.tablero-popup .streak-item {
  grid-template-rows: minmax(1.35rem, auto) 1fr;
  gap: 4px;
  padding: 8px 10px;
}

.tablero-popup .streak-lbl {
  min-height: 1.35rem;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  color: var(--txt-2);
}

.tablero-popup .streak-val {
  font-size: 0.98rem;
}

.tablero-popup .streak-val--sm,
.tablero-popup .mejor-odds {
  font-size: 0.72rem;
}

.tablero-popup .mejor-desc {
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--txt-2);
  letter-spacing: 0.02em;
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
}

.tablero-popup .achievements-header {
  padding: 10px 14px 8px;
}

.tablero-popup .achievements-body {
  padding: 10px 12px 12px;
}

.tablero-popup .achievements-row {
  flex-wrap: wrap;
  overflow-x: visible;
  gap: 6px;
}

.tablero-popup .achievements-ver-todos {
  margin-top: 8px;
  padding-top: 8px;
}

.tablero-popup .achievement-chip {
  gap: 6px;
  padding: 6px 8px;
}

.tablero-popup .achievement-chip__icon {
  font-size: 0.82rem;
}

.tablero-popup .achievement-chip__text {
  font-size: 0.68rem;
}

[data-theme="light"] .tablero-popup .streak-panel,
[data-theme="light"] .tablero-popup .achievements-panel {
  border-color: #d4ddea;
  background: #f7f9fc;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55);
}

[data-theme="light"] .tablero-popup .streak-title,
[data-theme="light"] .tablero-popup .achievements-title,
[data-theme="light"] .tablero-popup .streak-val {
  color: #172335;
}

[data-theme="light"] .tablero-popup .streak-lbl,
[data-theme="light"] .tablero-popup .mejor-desc,
[data-theme="light"] .tablero-popup .achievement-chip__text {
  color: #425775;
}

.tablero-popup__close {
  width: 46px;
  border: none;
  border-left: 1px solid var(--brd);
  background: transparent;
  color: var(--txt-3);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.tablero-popup__close:hover {
  background: var(--bg-2);
  color: var(--amber);
}

/* ── CALCULADORA: Drawer lateral ────────────────────────────────────────── */
.calc-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 9, 18, 0.54);
  z-index: 119;
  backdrop-filter: blur(3px);
}
.calc-drawer-overlay.hidden { display: none; }

.calc-drawer {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(760px, calc(100vw - 40px));
  max-width: 760px;
  height: auto;
  max-height: calc(100vh - 36px);
  background: var(--bg-1);
  border: 1px solid rgba(122, 143, 168, 0.18);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.48);
  z-index: 120;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translate(-50%, calc(-50% + 18px)) scale(0.985);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease;
}
.calc-drawer.drawer--open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.calc-drawer:has(.calc-result.hidden) {
  height: fit-content;
  max-height: calc(100vh - 36px);
}

.calc-drawer.calc-step-result {
  height: fit-content;
  max-height: calc(100vh - 36px);
}
.calc-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px 14px;
  border-bottom: 1px solid var(--brd);
  flex-shrink: 0;
}
.calc-drawer__title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  letter-spacing: 0.16em;
  color: var(--txt-3);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.pricing-beta-banner {
  margin: -2px auto 2px;
  padding: 8px 14px;
  border: 1px solid rgba(232,160,32,0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(232,160,32,0.08), rgba(232,160,32,0.03));
  color: var(--amber);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-align: center;
  width: fit-content;
  max-width: 100%;
}
.calc-drawer__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--txt-3);
  font-size: 1rem;
  padding: 4px 6px;
  border-radius: var(--radius);
}
.calc-drawer__close:hover { background: var(--bg-3); color: var(--txt-1); }

.calc-drawer__content {
  flex: 1;
  min-height: 0;
  display: block;
  overflow-y: auto;
}

/* Zona de inputs */
.calc-drawer__inputs {
  padding: 18px 22px 20px;
  min-width: 0;
}

/* Zona de resultado */
.calc-drawer__result {
  position: relative;
  background:
    radial-gradient(circle at top right, rgba(232,160,32,0.08), transparent 42%),
    linear-gradient(180deg, rgba(12,20,31,0.95), rgba(14,24,36,0.98));
  padding: 0;
  min-width: 0;
  border-top: 1px solid var(--brd);
}

.calc-drawer:has(.calc-result.hidden) .calc-drawer__result {
  display: none;
}

.calc-drawer.calc-step-result .calc-drawer__inputs {
  display: none;
}

.calc-drawer.calc-step-result .calc-drawer__result {
  display: block;
  border-top: none;
}

/* Header button to open calculator */
  .header__calc-btn {
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    padding: 0 12px;
    border-width: 1px;
}
.header__calc-btn:hover {
  transform: translateY(-1px);
}

/* Título de sección secundario (HISTORIAL) */
.section-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  color: var(--txt-2);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--brd);
}

.section-copy {
  margin: -4px 0 14px;
  color: var(--txt-3);
  font-size: 0.84rem;
  letter-spacing: 0.02em;
}

/* ── FORMULARIO ─────────────────────────────────────────────────────────── */
.calc-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.field--span-2 {
  grid-column: 1 / -1;
}

.field { display: flex; flex-direction: column; gap: 5px; }
.field--password { position: relative; }

.field-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  font-weight: 500;
  color: var(--txt-2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.opt { font-size: 0.68rem; color: var(--txt-3); opacity: 0.6; }

.field-hint {
  font-size: 0.68rem;
  color: var(--txt-3);
  opacity: 0.7;
}

.input {
  background: var(--bg-2);
  border: 1px solid var(--brd);
  border-radius: var(--radius);
  color: var(--input-text);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  padding: 9px 11px;
  outline: none;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  width: 100%;
}
.password-input-wrap {
  position: relative;
  width: 100%;
}
.password-input {
  padding-right: 46px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--txt-3);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}
.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--txt-1);
  background: var(--bg-3);
  outline: none;
}
.password-toggle.is-visible {
  color: var(--amber);
}
.input:hover  { border-color: var(--brd-hi); background: var(--bg-3); }
.input:focus  { border-color: var(--amber-dim); box-shadow: 0 0 0 2px var(--amber-glow); }
.input--error { border-color: var(--lose) !important; box-shadow: 0 0 0 2px rgba(240,69,69,0.18) !important; }
.field-hint--error { color: var(--lose); opacity: 1; }
.input--sm    { width: auto; min-width: 60px; }
.input--select { appearance: none; cursor: pointer; background-image:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237a8fa8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
  transition: border-color var(--transition), box-shadow var(--transition); }
.input::placeholder { color: var(--input-placeholder); }
input[type="number"]::-webkit-inner-spin-button { opacity: 0.3; }

/* Confidence slider row */
.confidence-wrap { display: flex; align-items: center; gap: 10px; }
.confidence-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-3);
  border-radius: 2px;
  overflow: hidden;
}
.confidence-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--win), var(--amber));
  border-radius: 2px;
  transition: width 0.2s ease;
  width: 60%;
}
.confidence-val {
  font-size: 0.75rem;
  color: var(--amber);
  min-width: 40px;
  text-align: right;
}

/* Badge info */
.badge-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px; height: 14px;
  background: var(--bg-3);
  border: 1px solid var(--brd-hi);
  border-radius: 50%;
  font-size: 0.55rem;
  color: var(--txt-2);
  cursor: help;
}

/* ── Tooltip flotante (position:fixed — escapa overflow:hidden del pnl-bar) ── */
.sm-tooltip {
  position: fixed;
  background: var(--bg-0);
  color: var(--txt-1);
  font-size: 0.72rem;
  line-height: 1.45;
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid var(--brd-hi);
  max-width: 220px;
  text-align: center;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(-100%) translateY(-8px);
  transition: opacity 0.12s ease;
  z-index: 9999;
  box-shadow: 0 2px 10px rgba(0,0,0,0.45);
}
.sm-tooltip--visible { opacity: 1; }

.chart-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  max-width: 320px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #2a3d57;
  background: #111620;
  color: var(--txt-1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.1s ease, transform 0.1s ease;
  z-index: 10000;
}
.chart-tooltip--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: none;
}
.chart-tooltip__title {
  color: #7a8fa8;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.chart-tooltip__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chart-tooltip__line {
  color: #d4dde8;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.4;
}
.chart-tooltip__line--bankroll {
  color: #d4dde8;
}
.chart-tooltip__line--pnl.chart-tooltip__line--win,
.chart-tooltip__line--result.chart-tooltip__line--win {
  color: #22d07a;
}
.chart-tooltip__line--pnl.chart-tooltip__line--lose,
.chart-tooltip__line--result.chart-tooltip__line--lose {
  color: #f04545;
}
.chart-tooltip__line--desc {
  color: #7a8fa8;
  font-size: 0.70rem;
}
.chart-tooltip__line--result {
  color: var(--txt-1);
  font-weight: 600;
}

/* Badge de ayuda en KPIs */
.kpi-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: var(--bg-3);
  border: 1px solid var(--brd-hi);
  border-radius: 50%;
  font-size: 0.58rem;
  color: var(--txt-3);
  cursor: help;
  flex-shrink: 0;
  line-height: 1;
}
.pnl-item__lbl {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--txt-3);
}

/* ── BOTONES ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn:disabled { opacity: 0.35; cursor: default; }
.btn--full     { width: 100%; }

.btn--primary {
  background: var(--amber-dim);
  border-color: var(--amber);
  color: var(--amber);
}
.btn--primary:hover:not(:disabled) {
  background: var(--amber);
  color: var(--bg-0);
  box-shadow: 0 0 20px var(--amber-glow);
}

.btn--danger {
  background: var(--lose-dim);
  border-color: var(--lose);
  color: var(--lose);
}
.btn--danger:hover:not(:disabled) {
  background: var(--lose);
  color: var(--bg-0);
  box-shadow: 0 0 20px var(--lose-glow);
}

.btn--win {
  flex: 1;
  background: var(--win-dim);
  border-color: var(--win);
  color: var(--win);
}
.btn--win:hover:not(:disabled) {
  background: var(--win);
  color: var(--bg-0);
  box-shadow: 0 0 20px var(--win-glow);
}

.btn--lose {
  flex: 1;
  background: var(--lose-dim);
  border-color: var(--lose);
  color: var(--lose);
}
.btn--lose:hover:not(:disabled) {
  background: var(--lose);
  color: #fff;
  box-shadow: 0 0 20px var(--lose-glow);
}

.btn--void {
  background: var(--bg-3);
  border-color: var(--brd-hi);
  color: var(--txt-2);
}
.btn--void:hover:not(:disabled) {
  background: var(--bg-4);
  color: var(--txt-1);
}

.btn--ghost {
  background: color-mix(in srgb, var(--bg-2) 82%, transparent);
  border-color: var(--brd-hi);
  color: var(--txt-2);
  font-size: 0.72rem;
  padding: 6px 10px;
}
.btn--ghost:hover {
  background: var(--bg-3);
  border-color: var(--amber-dim);
  color: var(--amber);
}
.btn--ghost-danger {
  border-color: rgba(255, 89, 94, 0.26);
  color: rgba(255, 89, 94, 0.88);
}
.btn--ghost-danger:hover:not(:disabled) {
  border-color: rgba(255, 89, 94, 0.5);
  color: var(--lose);
  background: rgba(255, 89, 94, 0.06);
}
.btn--sm { padding: 6px 12px; font-size: 0.75rem; }
.btn__icon { font-size: 0.9rem; }

/* Loading spinner en botón */
.btn--loading { position: relative; color: transparent !important; pointer-events: none; }
.btn--loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  color: var(--amber);
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── RESULTADO DEL CÁLCULO ──────────────────────────────────────────────── */
.calc-result {
  margin: 0;
  border: none;
  border-radius: 0;
  background: var(--bg-2);
  overflow: visible;
  animation: slide-down 0.2s ease;
  box-shadow: none;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  position: relative;
}

.calc-result__topbar {
  display: flex;
  justify-content: flex-end;
  padding: 12px 14px 8px;
  border-bottom: 1px solid rgba(122, 143, 168, 0.12);
  background: rgba(7, 9, 13, 0.16);
}
.calc-result--plan-locked .calc-result__topbar,
.calc-result--plan-locked .result-grid,
.calc-result--plan-locked .result-warning,
.calc-result--plan-locked #stake-risk-alert-result,
.calc-result--plan-locked .pending-primary {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
}
.calc-limit-wall {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(to bottom, rgba(7, 9, 13, 0.06), rgba(7, 9, 13, 0.54) 30%, rgba(7, 9, 13, 0.72));
  z-index: 3;
}
.calc-limit-wall.hidden { display: none; }
.calc-limit-wall__cta {
  background: transparent;
  padding: 0;
  gap: 8px;
  max-width: 360px;
}
@keyframes slide-down {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--brd);
}
.result-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px 14px;
  border-right: 1px solid var(--brd);
}
.result-cell:nth-child(4) { border-right: none; }
.result-cell--main {
  grid-column: 1 / -1;
  border-right: none;
  background: rgba(232,160,32,0.04);
  align-items: center;
  padding: 16px 14px;
}
.result-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--txt-3);
  font-weight: 500;
}
.result-value {
  font-family: var(--font-display);
  font-size: 1.95rem;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
}
.result-value--sm  { font-size: 1.05rem; }
.result-value.win  { color: var(--win);  }
.result-value.lose { color: var(--lose); }
.result-value.amber{ color: var(--amber);}

/* Detalle Kelly */
.kelly-detail {
  padding: 10px 14px;
  border-bottom: 1px solid var(--brd);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kelly-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--txt-2);
}
.kelly-row span:last-child { color: var(--txt-1); font-weight: 500; }
.amber { color: var(--amber) !important; }

/* Warning */
.result-warning {
  padding: 9px 14px;
  font-size: 0.68rem;
  color: var(--amber);
  background: var(--amber-glow);
  border-bottom: 1px solid var(--amber-dim);
  line-height: 1.5;
}

/* Botones de resolución */
.pending-primary {
  padding: 12px 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.resolution-secondary {
  padding: 0 14px 10px;
  border-top: 1px solid var(--brd);
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.resolution-secondary__label {
  display: block;
  font-size: 0.68rem;
  color: var(--txt-3);
  letter-spacing: 0.06em;
  margin: 6px 0 5px;
  align-self: stretch;
  text-align: center;
}
.btn--resolve-toggle {
  width: min(100%, 340px);
  justify-content: center;
  gap: 8px;
}
.resolution-menu {
  width: min(100%, 340px);
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.resolution-btns {
  display: grid;
  grid-template-columns: repeat(2, minmax(128px, 1fr));
  gap: 6px;
  justify-content: center;
  width: min(100%, 340px);
}
.resolution-hint {
  font-size: 0.58rem;
  color: var(--txt-3);
  line-height: 1.5;
  text-align: center;
}

.resolution-btns .btn {
  width: 100%;
  min-width: 0;
  justify-content: center;
  padding: 8px 12px;
}

#btn-win { order: 1; min-width: 112px; }
#btn-lose { order: 2; min-width: 112px; }
#btn-void { order: 3; min-width: 132px; }
#btn-gc-place { order: 4; min-width: 132px; }
#btn-half-win { order: 5; min-width: 144px; }
.resolution-btns--standard #btn-win { order: 1; }
.resolution-btns--standard #btn-lose { order: 2; }
.resolution-btns--standard #btn-void { order: 3; }
.resolution-btns--standard #btn-cashout { order: 4; }

.resolution-btns--asian #btn-win { order: 1; }
.resolution-btns--asian #btn-half-win { order: 2; }
.resolution-btns--asian #btn-lose { order: 3; }
.resolution-btns--asian #btn-half-lose { order: 4; }
.resolution-btns--asian #btn-void { order: 5; }
.resolution-btns--asian #btn-cashout { order: 6; }

.resolution-btns--gc #btn-win { order: 1; }
.resolution-btns--gc #btn-gc-place { order: 2; }
.resolution-btns--gc #btn-lose { order: 3; }
.resolution-btns--gc #btn-void { order: 4; }
.resolution-btns--gc #btn-cashout { order: 5; }

#btn-half-win {
  background: rgba(87, 199, 143, 0.14);
  border-color: rgba(87, 199, 143, 0.24);
  color: #7ce8b1;
}

#btn-half-win:hover:not(:disabled) {
  background: rgba(87, 199, 143, 0.24);
  border-color: rgba(87, 199, 143, 0.36);
  color: #d9f7e8;
}

#btn-half-lose {
  background: rgba(227, 141, 80, 0.12);
  border-color: rgba(227, 141, 80, 0.45);
  color: #f2b98d;
}

#btn-half-lose:hover:not(:disabled) {
  background: rgba(227, 141, 80, 0.18);
  border-color: rgba(227, 141, 80, 0.7);
  color: #ffe3cb;
}

/* Apuesta activa */
.active-bet {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(34, 208, 122, 0.05);
  border-top: 1px solid var(--win-dim);
  font-size: 0.76rem;
}
.active-bet__label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--win);
  font-weight: 600;
}
.active-bet__id    { color: var(--txt-2); }
.active-bet__stake { color: var(--txt-1); margin-left: auto; }

/* ── PANEL HISTORIAL ─────────────────────────────────────────────────────── */

/* Selector de rango de gráfica */
.chart-range-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  justify-content: flex-end;
}
.chart-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin: 0 2px 10px;
  color: var(--txt-2);
  font-size: 0.76rem;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}
.chart-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.chart-legend__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.04);
}
.chart-legend__dot--bankroll {
  background: #e8a020;
}
.chart-legend__dot--pnl,
.chart-legend__dot--pnl-win {
  background: #22d07a;
}
.chart-legend__dot--pnl-lose {
  background: #f04545;
}
.btn-range {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--txt-3);
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-range:hover { color: var(--txt-1); border-color: var(--txt-2); }
.btn-range.active {
  background: var(--amber);
  border-color: var(--amber);
  color: #07090d;
  font-weight: 700;
}

/* Gráfica */
.chart-wrap {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--brd);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 16px;
  height: 290px;
  box-shadow: var(--shadow-sm);
}
.chart-premium-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(34%, 280px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: linear-gradient(90deg, rgba(7, 9, 13, 0) 0%, rgba(7, 9, 13, 0.72) 28%, rgba(7, 9, 13, 0.96) 100%);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  pointer-events: none;
}
.chart-premium-overlay.hidden { display: none; }
.chart-premium-overlay__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  max-width: 210px;
}
.chart-premium-overlay__lock {
  font-size: 1.1rem;
  line-height: 1;
}
.chart-premium-overlay__title {
  font-family: var(--font-display);
  font-size: 0.86rem;
  color: var(--txt-1);
  line-height: 1.35;
}
.chart-premium-overlay__sub {
  font-size: 0.68rem;
  color: var(--txt-3);
  line-height: 1.45;
}
.chart-premium-overlay .free-wall__btn {
  pointer-events: auto;
}
.chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--txt-3);
}

/* P&L bar */
.pnl-bar {
  display: flex;
  gap: 1px;
  margin-bottom: 16px;
  background: var(--brd);
  border-radius: var(--radius);
  overflow: hidden;
}
.pnl-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 11px 14px;
  background: var(--bg-1);
  min-width: 0;
}
.pnl-item--secondary {
  display: none;
}
.pnl-bar--expanded .pnl-item--secondary {
  display: flex;
}
.pnl-bar-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  background: var(--bg-1);
  border: none;
  border-left: 1px solid var(--brd);
  color: var(--txt-3);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  gap: 6px;
}
.pnl-bar-toggle:hover {
  background: var(--bg-2);
  color: var(--amber);
}
.pnl-bar-toggle__icon {
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 0.18s ease;
}
.pnl-bar--expanded .pnl-bar-toggle__icon {
  transform: rotate(180deg);
}
.pnl-item__val {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--txt-1);
  line-height: 1;
}
.pnl-item__val.win  { color: var(--win);  }
.pnl-item__val.lose { color: var(--lose); }
.pnl-item__val--cashout { color: #7ec2ff; }

/* Tabla */
/* ── Toolbar encima de la tabla (count + CSV) ───────────────────── */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 2px 6px;
}
.table-toolbar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.table-search-wrap {
  flex: 1;
  max-width: 240px;
}
.table-search {
  width: 100%;
  height: 28px;
  padding: 4px 8px;
  font-size: 0.75rem;
}
.table-toolbar__export {
  margin-left: auto;
  flex-shrink: 0;
}
.table-toolbar__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.table-toolbar__actions .table-toolbar__export {
  margin-left: 0;
}
.table-toolbar__count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--txt-2);
}
.table-toolbar .btn-filter-toggle {
  margin-left: 0;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--brd);
  border-radius: var(--radius-lg);
  background: var(--bg-1);
  position: relative;
}
.table-wrap--history {
  display: flex;
  flex-direction: column;
}
.table-wrap--empty {
  overflow-x: hidden;
}

/* ── Toggle G/C en el formulario ────────────────────────────────── */
.gc-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}
.gc-toggle-row input[type="checkbox"] { accent-color: var(--amber); width:15px; height:15px; cursor:pointer; }
.gc-toggle-label { font-size: 0.78rem; color: var(--txt-1); display:flex; align-items:center; gap:6px; }
.badge-gc {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--amber-dim);
  color: var(--amber);
  border: 1px solid var(--amber-dim);
  letter-spacing: 0.04em;
}
.gc-options { padding: 6px 0 0; }


.gc-inline-badge {
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--amber-dim);
  color: var(--amber);
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1.4;
}
.badge-live {
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(239,68,68,0.15);
  color: #f87171;
  margin-left: 5px;
  vertical-align: middle;
  line-height: 1.6;
  letter-spacing: 0.03em;
  position: relative;
  top: -0.5px;
}
.req-star {
  color: var(--amber);
  font-size: 0.75rem;
  margin-left: 1px;
}
.live-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 0;
}
.live-toggle-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--amber);
  cursor: pointer;
  flex-shrink: 0;
}
.live-toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--txt-2);
}
.live-dot {
  color: #f87171;
  font-size: 0.9rem;
  line-height: 1;
}
.hist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  overflow: visible;
}
/* Ocultar columna UNIDADES cuando no hay datos de unidades en la vista */
.hist-table.hide-units-col td:nth-child(6),
.hist-table.hide-units-col th:nth-child(6) { display: none; }
.hist-table th {
  padding: 11px 12px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--txt-3);
  text-align: left;
  background: var(--bg-2);
  border-bottom: 1px solid var(--brd);
  white-space: nowrap;
  font-weight: 600;
}
.hist-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--brd);
  color: var(--txt-2);
  white-space: nowrap;
  overflow: visible;
}
.hist-table tr:last-child td { border-bottom: none; }
.hist-table tr { position: relative; }
.hist-table tr:hover td { background: var(--bg-2); color: var(--txt-1); }
.hist-table .hist-empty-row td {
  color: var(--txt-3);
  padding: 0;
}

/* ── EMPTY STATES ─────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 52px 24px;
  text-align: center;
  width: 100%;
}
.empty-state__title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--txt-1);
  text-transform: uppercase;
}
.empty-state__sub {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  color: var(--txt-3);
  max-width: 340px;
  line-height: 1.65;
  margin-bottom: 4px;
  text-align: center;
}
.empty-state__btn { margin-top: 2px; }

/* ── ONBOARDING STEPS ─────────────────────────────────────────────────────── */
.onboarding-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto 12px;
  text-align: left;
}
.onboarding-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--brd);
  border-radius: 8px;
}
.onboarding-step__num {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--amber, #e8a020);
  color: #07090d;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}
.onboarding-step__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.onboarding-step__body strong {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--txt-1);
  text-transform: uppercase;
}
.onboarding-step__body span {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  color: var(--txt-3);
}

/* Chart empty: centrado con soporte multilinea */
.chart-empty {
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* Badges de resultado */
.badge-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 2px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.badge-result--button {
  cursor: pointer;
  transition: filter var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.badge-result--button:hover {
  filter: brightness(1.08);
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(232, 160, 32, 0.08);
}
.badge-result__chevron {
  font-size: 0.62rem;
  opacity: 0.85;
  transform: translateY(-1px);
}
.badge-result--win     { background: var(--win-dim);  color: var(--win);   border: 1px solid var(--win-dim); }
.badge-result--half-win { background: rgba(34, 208, 122, 0.12); color: var(--win); border: 1px solid rgba(34, 208, 122, 0.22); }
.badge-result--lose    { background: var(--lose-dim); color: var(--lose);  border: 1px solid var(--lose-dim); }
.badge-result--half-lose { background: rgba(240, 69, 69, 0.12); color: #ff8d8d; border: 1px solid rgba(240, 69, 69, 0.22); }
.badge-result--pending { background: var(--bg-3);     color: var(--amber); border: 1px solid var(--amber-dim); }
.badge-result--void    { background: var(--bg-3);     color: var(--txt-2); border: 1px solid var(--brd-hi); }
.badge-result--place      { background: var(--amber-dim); color: var(--amber); border: 1px solid var(--amber-dim); }
.badge-result--cashout    { background: rgba(96, 165, 250, 0.12); color: #7ec2ff; border: 1px solid rgba(96, 165, 250, 0.25); }
.badge-result--adjustment { background: var(--amber-dim); color: var(--amber); border: 1px solid var(--amber-dim); font-style: italic; }
[data-theme="light"] .badge-result--win {
  background: #c7ead9;
  color: #137045;
  border-color: #abd7bf;
}
[data-theme="light"] .badge-result--half-win {
  background: #d7efe2;
  color: #137045;
  border-color: #c0e0ce;
}
[data-theme="light"] .badge-result--lose {
  background: #f0d1d1;
  color: #b02a2a;
  border-color: #dfb8b8;
}
[data-theme="light"] .badge-result--half-lose {
  background: #f5dddd;
  color: #b02a2a;
  border-color: #e7c4c4;
}
[data-theme="light"] .badge-result--pending {
  background: #dde4ed;
  color: #c47d00;
  border-color: #bdcad8;
}
[data-theme="light"] .badge-result--void {
  background: #dde4ed;
  color: #465a73;
  border-color: #bdcad8;
}
[data-theme="light"] .badge-result--place,
[data-theme="light"] .badge-result--cashout,
[data-theme="light"] .badge-result--adjustment {
  background: #eadab5;
  color: #b87400;
  border-color: #d9c18c;
}
[data-theme="light"] .badge-result--cashout {
  background: rgba(96, 165, 250, 0.16);
  color: #0f4f94;
  border-color: rgba(96, 165, 250, 0.28);
}

html:not([data-theme="dark"]):not([data-theme="light"]) .badge-result--win {
  background: #c7ead9;
  color: #137045;
  border-color: #abd7bf;
}
html:not([data-theme="dark"]):not([data-theme="light"]) .badge-result--half-win {
  background: #d7efe2;
  color: #137045;
  border-color: #c0e0ce;
}
html:not([data-theme="dark"]):not([data-theme="light"]) .badge-result--lose {
  background: #f0d1d1;
  color: #b02a2a;
  border-color: #dfb8b8;
}
html:not([data-theme="dark"]):not([data-theme="light"]) .badge-result--half-lose {
  background: #f5dddd;
  color: #b02a2a;
  border-color: #e7c4c4;
}
html:not([data-theme="dark"]):not([data-theme="light"]) .badge-result--pending {
  background: #dde4ed;
  color: #c47d00;
  border-color: #bdcad8;
}
html:not([data-theme="dark"]):not([data-theme="light"]) .badge-result--void {
  background: #dde4ed;
  color: #465a73;
  border-color: #bdcad8;
}
html:not([data-theme="dark"]):not([data-theme="light"]) .badge-result--place,
html:not([data-theme="dark"]):not([data-theme="light"]) .badge-result--cashout,
html:not([data-theme="dark"]):not([data-theme="light"]) .badge-result--adjustment {
  background: #eadab5;
  color: #b87400;
  border-color: #d9c18c;
}
html:not([data-theme="dark"]):not([data-theme="light"]) .badge-result--cashout {
  background: rgba(96, 165, 250, 0.16);
  color: #0f4f94;
  border-color: rgba(96, 165, 250, 0.28);
}
.hist-table .badge-result {
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 0.66rem;
}
.hist-adjustment-row td   { opacity: 0.72; font-size: 0.72rem; }
.hist-adjustment-row      { border-left: 2px solid var(--amber-dim); background: var(--bg-2) !important; }

/* P&L en tabla */
.pnl-positive { color: var(--win); }
.pnl-negative { color: var(--lose); }
.pnl-zero     { color: var(--txt-3); }

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
.footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  font-size: 0.65rem;
  color: var(--txt-3);
  letter-spacing: 0.08em;
  border-top: 1px solid var(--brd);
  background: var(--bg-1);
  flex-shrink: 0;
}
.footer__sep { color: var(--brd-hi); }
.footer__link {
  color: var(--txt-2);
  text-decoration: none;
  transition: color var(--transition);
}
.footer__link:hover,
.footer__link:focus-visible {
  color: var(--amber);
}
.footer__ts  { margin-left: auto; }

.auth-legal {
  margin: 4px 2px 0;
  color: var(--txt-3);
  font-size: 0.67rem;
  line-height: 1.6;
}

.auth-legal a {
  color: var(--amber);
  text-decoration: none;
}

.auth-legal a:hover,
.auth-legal a:focus-visible {
  text-decoration: underline;
}

/* ── UTILIDADES ──────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* Fade in al revelar elementos */
.fade-in {
  animation: fade-in 0.3s ease forwards;
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Animación de actualización del bankroll */
@keyframes flash-amber {
  0%   { color: var(--amber); }
  50%  { color: #fff; text-shadow: 0 0 20px var(--amber); }
  100% { color: var(--amber); }
}
.bankroll--updated { animation: flash-amber 0.6s ease; }
@keyframes flash-win {
  0%   { color: var(--win); }
  50%  { color: #fff; text-shadow: 0 0 20px var(--win); }
  100% { color: var(--win); }
}
.stat--updated-win { animation: flash-win 0.6s ease; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */

/* Tablet (≤ 1024px) ────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .header__meta, .header__kpis { gap: 16px; }
  .layout { gap: 0; }
}

@media (max-height: 860px) and (min-width: 901px) {
  .calc-drawer {
    width: min(1060px, calc(100vw - 40px));
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
  }
  .calc-drawer__header {
    padding: 14px 20px 12px;
  }
  .calc-drawer__inputs {
    padding: 16px 20px 16px;
  }
  .calc-form {
    gap: 10px 12px;
  }
  .input {
    font-size: 0.82rem;
    padding: 7px 10px;
  }
  .result-cell {
    padding: 11px 12px;
  }
  .result-cell--main {
    padding: 14px 12px;
  }
  .result-value {
    font-size: 1.7rem;
  }
  .result-value--sm {
    font-size: 0.98rem;
  }
  .pending-primary {
    padding: 10px 12px 6px;
  }
  .resolution-secondary {
    padding: 0 12px 8px;
  }
  .btn--resolve-toggle,
  .resolution-menu {
    width: 100%;
  }
}

/* Tablet pequeña / landscape móvil (≤ 900px) ───────────────────────────── */
@media (max-width: 900px) {
  .header {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 12px 16px;
    gap: 10px 12px;
  }
  .analyzer-header {
    flex-wrap: nowrap;
    align-items: center;
  }
  .header__left {
    flex: 1 1 100%;
    order: 1;
    justify-content: space-between;
  }
  .header__right {
    order: 2;
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
  }
  .header__bankroll {
    padding: 4px 8px;
  }
  .header__kpis {
    flex: 1 1 auto;
    gap: 12px;
  }
  .header__user {
    padding-left: 10px;
  }
  .meta-stat {
    align-items: flex-start;
    min-width: 0;
  }
  .bankroll__amount { font-size: 1.34rem; }
  .avatar-menu { margin-left: auto; }
  .avatar-dropdown  {
    right: 0;
    left: auto;
    width: min(280px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
  }

  .tablero-popup {
    top: 116px;
    right: 16px;
    width: calc(100vw - 32px);
    max-height: calc(100dvh - 132px);
  }

  .tablero-popup .dashboard-body {
    max-height: calc(100dvh - 190px);
  }

  .layout { grid-template-columns: 1fr; }
  .calc-drawer {
    top: 0;
    left: 0;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    transform: translateY(100%);
  }
  .calc-drawer.drawer--open { transform: translateY(0); }
  .calc-drawer:has(.calc-result.hidden),
  .calc-drawer.calc-step-result {
    height: 100dvh;
    max-height: 100dvh;
  }
  .calc-drawer__header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg-1);
    padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  }
  .calc-drawer__content {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }
  .calc-drawer__inputs {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    border-right: none;
    border-bottom: 1px solid var(--brd);
  }
  .calc-drawer__result {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
  .calc-drawer.calc-step-result .calc-drawer__result {
    display: block;
    flex: 1 1 auto;
  }
  .calc-form { grid-template-columns: 1fr; }
  .field--span-2 { grid-column: auto; }
  .calc-result { min-height: auto; }

  .result-grid { grid-template-columns: 1fr 1fr; }
  .result-cell--main { grid-column: 1 / -1; }
  .result-cell { border-right: none !important; border-bottom: 1px solid var(--brd); }

  .pnl-bar { flex-wrap: wrap; }
  .pnl-item { flex: 1 1 calc(50% - 1px); min-width: 120px; }

  .filters-row { flex-direction: column; align-items: stretch; }
  .filter-field { min-width: unset; }

  .modal { max-width: calc(100vw - 32px); }
  .modal--md { max-width: calc(100vw - 32px); }
}

@media (max-width: 700px) {
  .auth-overlay {
    background: var(--bg-0);
    background-image: none;
    padding: 0;
    align-items: stretch;
  }

  .auth-overlay__laser,
  .auth-landing__scanline,
  .auth-landing__glow {
    display: none;
  }

  .auth-shell {
    width: 100%;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: var(--bg-1);
  }

  .auth-shell:not(.auth-shell--form) .auth-landing {
    position: static;
    top: auto;
    margin-bottom: 0;
    min-height: 100svh;
    padding: calc(env(safe-area-inset-top, 0px) + 28px) 20px calc(env(safe-area-inset-bottom, 0px) + 28px);
    border: none;
    gap: 18px;
  }

  .auth-landing__title {
    font-size: clamp(2rem, 8vw, 2.6rem);
  }

  .auth-landing__sub {
    max-width: none;
    font-size: 0.82rem;
    line-height: 1.7;
  }

  .auth-landing__cta {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-landing__kpis,
  .auth-preview__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-kpi {
    padding: 16px 12px;
  }

  .auth-preview {
    margin-top: 0;
    padding: 16px;
  }

  .auth-card {
    width: 100vw;
    right: -100vw;
    padding: calc(env(safe-area-inset-top, 0px) + 60px) 20px calc(env(safe-area-inset-bottom, 0px) + 24px);
    border-left: none;
  }

  .auth-brand {
    margin-bottom: 22px;
  }

  .auth-mode {
    margin-bottom: 20px;
  }
}

/* Móvil (≤ 600px) ──────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  html { font-size: 16px; }

  .header {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "left left"
      "kpis kpis"
      "actions actions";
    align-items: start;
    padding: 10px 14px 12px;
    gap: 10px;
  }
  .analyzer-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .header__left {
    grid-area: left;
    width: 100%;
    display: block;
  }
  .header__brand {
    min-width: 0;
    margin-bottom: 10px;
  }
  .header__bankroll {
    display: inline-flex;
    vertical-align: top;
    margin-left: 52px;
    margin-right: 12px;
  }
  .header__right {
    grid-area: actions;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 10px;
    align-items: start;
    min-width: 0;
  }
  .header__actions-group {
    display: contents;
  }
  .header__kpis {
    display: inline-flex;
    vertical-align: top;
    gap: 14px;
    min-width: 0;
    justify-content: flex-start;
    align-items: flex-start;
  }
  .header__nav {
    display: contents;
  }
  .header__news-btn,
  .header__calc-btn,
  .header__share-btn,
  .header__articles-link {
    min-width: 0;
    width: 100%;
  }
  .header__calc-btn {
    justify-self: stretch;
    margin: 0;
  }
  .header__user {
    position: absolute;
    top: 54px;
    left: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    z-index: 2;
  }
  .header__name {
    font-size: 0.98rem;
    letter-spacing: 0.06em;
  }
  .header__logo { font-size: 1.08rem; }
  .bankroll__label {
    max-width: 110px;
    font-size: 0.58rem;
  }
  .bankroll__amount { font-size: 1.06rem; }
  .bankroll__currency { font-size: 0.58rem; }

  .meta-stat__val { font-size: 1.06rem; }
  .meta-stat__lbl { font-size: 0.5rem; }

  .header__username { display: none; }   /* en móvil no hace falta "Hola, X" */
  .avatar-btn {
    width: 32px;
    height: 32px;
    font-size: 0.84rem;
  }
  .avatar-menu {
    display: block;
  }
  .avatar-dropdown {
    left: 0;
    right: auto;
    width: min(260px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
  }
  .btn--sm { padding: 3px 8px; font-size: 0.62rem; }
  .header__toolbar-btn {
    min-height: 42px;
    min-width: 0;
    padding: 0 10px;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    justify-content: center;
    text-align: center;
  }
  .header__toolbar-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }
  .header__user #plan-badge {
    display: none !important;
  }
  .analyzer-page-title {
    font-size: 0.82rem;
    letter-spacing: 0.1em;
  }
  .analyzer-back-btn {
    min-height: 34px;
    padding-inline: 12px;
    font-size: 0.7rem;
  }

  .panel { padding: 18px 14px; }
  .panel__title { font-size: 0.75rem; }
  .calc-drawer__header {
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  }
  .calc-drawer__inputs {
    padding: 14px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  }
  .calc-result__topbar {
    padding: 10px 12px 8px;
  }

  .result-grid { grid-template-columns: 1fr; }
  .result-value { font-size: 1.5rem; }

  .resolution-btns { display: grid; grid-template-columns: 1fr; }
  .resolution-btns .btn--win,
  .resolution-btns .btn--lose,
  .resolution-btns .btn--void { width: 100%; }
  .pending-primary .btn--amber { width: 100%; min-width: 0; }

  .pnl-item { flex: 1 1 calc(50% - 1px); padding: 13px 13px; }
  .pnl-item__val { font-size: 1.3rem; }
  .pnl-item__lbl { font-size: 0.58rem; }
  .pnl-bar-toggle { padding: 0 10px; font-size: 0.62rem; }

  /* Tabla: scroll horizontal + texto más compacto */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .hist-table { min-width: 580px; font-size: 0.75rem; }
  .hist-table th, .hist-table td { padding: 8px 8px; }
  .hist-desc-cell { width: 100px; max-width: 100px; overflow: hidden; }
  .hist-desc { max-width: 100px; }

  .chart-range-bar {
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
  }
  .btn-range {
    min-width: 56px;
    min-height: 34px;
    font-size: 0.74rem;
  }
  .chart-wrap {
    height: 252px;
    padding: 14px 12px 12px;
    margin-bottom: 12px;
  }
  .chart-legend {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 8px;
  }

  /* Auth card */
  .auth-shell {
    width: min(100vw - 24px, 760px);
    min-height: auto;
  }
  .auth-landing {
    border-right: none;
    border-bottom: 1px solid var(--brd);
    padding: 20px 18px;
    gap: 18px;
    justify-content: flex-start;
  }
  .auth-landing__cta {
    flex-direction: column;
    align-items: stretch;
  }
  .auth-landing__kpis,
  .auth-preview__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .auth-card {
    padding: 60px 24px 34px;
  }
  .auth-brand__name { font-size: 1.2rem; }

  /* Modales */
  .modal-overlay { padding: 12px; align-items: flex-end; }
  .modal { border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 90vh; overflow-y: auto; }

  /* Filtros: stack vertical en móvil */
  .filters-panel {
    padding: 10px 12px;
    top: 0;
    margin-bottom: 10px;
  }
  .filters-header {
    margin-bottom: 0;
    padding: 2px 0;
  }
  .filters-title {
    font-size: 0.74rem;
  }
  .filters-copy {
    font-size: 0.72rem;
    line-height: 1.35;
  }
  .filters-body {
    padding-top: 10px;
  }
  .filters-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .filter-field { width: 100%; min-width: unset; }
  .filter-field .input--sm { width: 100%; height: 40px; font-size: 0.82rem; box-sizing: border-box; }
  .filter-field .field-label { font-size: 0.62rem; margin-bottom: 2px; }

  /* Toast más pequeño */
  .toast { max-width: 90vw; font-size: 0.75rem; bottom: 16px; }
}

@media (min-width: 1024px) and (max-width: 1440px) {
  .hist-desc-cell {
    min-width: 160px;
    max-width: none;
  }
  .hist-desc { max-width: none; }
  .row--editing .ei-desc {
    min-width: 92px;
    max-width: 130px;
  }
}

@media (min-width: 1024px) and (max-width: 1366px) {
  .hist-sport-cell {
    min-width: 110px;
    max-width: none;
  }
  .hist-sport { max-width: none; }
  .row--editing .ei-sport {
    min-width: 84px;
    max-width: 112px;
  }
}

/* Móvil muy pequeño (≤ 380px) ──────────────────────────────────────────── */
@media (max-width: 380px) {
  html { font-size: 14px; }
  .header__meta, .header__kpis { display: none; }  /* en pantallas muy pequeñas ocultar stats del header */
  .btn--change-password { display: none; }
}

/* ════════════════════════════════════════════════════════════════════════════
   MODALES — añadido para configuración de usuario y ajuste de bankroll
   ════════════════════════════════════════════════════════════════════════════ */

.btn--amber {
  background: var(--amber-dim);
  border-color: var(--amber);
  color: var(--amber);
  font-size: 0.75rem;
  padding: 6px 12px;
}
.btn--amber:hover {
  background: var(--amber);
  color: var(--bg-0);
  box-shadow: 0 0 16px var(--amber-glow);
}
/* Botón pendiente como acción principal */
.pending-primary .btn--amber {
  background: var(--amber);
  color: var(--bg-0);
  width: auto;
  min-width: 210px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 9px 14px;
  box-shadow: 0 0 12px var(--amber-glow);
}
.pending-primary .btn--amber:hover:not(:disabled) {
  background: var(--amber);
  box-shadow: 0 0 22px var(--amber-glow);
  transform: translateY(-1px);
}
.pending-primary .btn--amber:disabled {
  background: var(--amber-dim);
  color: var(--amber);
  box-shadow: none;
  opacity: 0.5;
}
.btn--cashout {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.28);
  color: #7ec2ff;
}
.btn--cashout:hover:not(:disabled) {
  background: rgba(96, 165, 250, 0.18);
  border-color: rgba(96, 165, 250, 0.36);
}
.cashout-inline {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.cashout-inline__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.modal--confirm {
  max-width: 460px;
}
.modal-confirm {
  display: grid;
  gap: 14px;
}
.modal__actions--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 13, 0.85);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in 0.15s ease;
}
.modal-overlay--instant {
  animation: none !important;
}
.modal-overlay--instant .modal {
  animation: none !important;
}
.modal-overlay--stacked {
  z-index: 510;
  background: transparent;
  backdrop-filter: none;
}

.modal {
  background: var(--bg-1);
  border: 1px solid var(--brd-hi);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7);
  animation: slide-down 0.2s ease;
}
.modal--sm { max-width: 340px; }
.modal--lg { max-width: 920px; }

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--brd);
}
.modal__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--amber);
}
.modal__close {
  background: none;
  border: none;
  color: var(--txt-3);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  line-height: 1;
}
.modal__close:hover { color: var(--txt-1); background: var(--bg-3); }

.modal__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal--lg .modal__body {
  max-height: min(78vh, 760px);
  overflow-y: auto;
}
.import-csv-summary {
  border: 1px solid var(--brd);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--bg-2);
  color: var(--txt-2);
  font-size: 0.8rem;
  line-height: 1.6;
}
.import-csv-summary strong {
  color: var(--txt-1);
}
.import-csv-preview-wrap {
  border: 1px solid var(--brd);
  border-radius: var(--radius);
  overflow: auto;
  max-height: 280px;
  background: var(--bg-1);
}
.import-csv-preview-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.import-csv-preview-table th,
.import-csv-preview-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--brd);
  text-align: left;
  font-size: 0.76rem;
  white-space: nowrap;
}
.import-csv-preview-table th {
  position: sticky;
  top: 0;
  background: var(--bg-2);
  color: var(--txt-2);
  letter-spacing: 0.12em;
  font-size: 0.62rem;
}
.import-csv-preview-table tr:last-child td {
  border-bottom: none;
}
.import-csv-preview-table td.is-ok {
  color: var(--win);
}
.import-csv-preview-table td.is-error {
  color: var(--lose);
}
.import-csv-preview-table th:last-child,
.import-csv-preview-table td:last-child {
  width: 52px;
  text-align: center;
}
.btn-import-row-remove {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brd);
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--txt-3);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.btn-import-row-remove:hover {
  background: rgba(240, 69, 69, 0.08);
  border-color: rgba(240, 69, 69, 0.28);
  color: var(--lose);
  transform: translateY(-1px);
}
.import-csv-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.modal__desc {
  font-size: 0.86rem;
  color: var(--txt-2);
  line-height: 1.6;
}
.modal__actions { margin-top: 4px; }
.modal__actions--secondary { margin-top: 10px; }

.modal__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--txt-3);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}
.modal__divider::before,
.modal__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--brd);
}

/* Banner de bienvenida — aparece cuando no hay usuario cargado */
.welcome-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed var(--brd-hi);
  border-radius: var(--radius-lg);
  background: var(--bg-1);
  margin-bottom: 20px;
}
.welcome-banner__icon  { font-size: 2rem; color: var(--amber); opacity: 0.6; }
.welcome-banner__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--txt-1);
  letter-spacing: 0.1em;
}
.welcome-banner__sub { font-size: 0.75rem; color: var(--txt-3); line-height: 1.6; }

/* Usuario en header */
.header__username {
  font-size: 0.7rem;
  color: var(--txt-2);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.header__username strong { color: var(--amber); font-size: 0.8rem; }

/* ── AUTH OVERLAY ────────────────────────────────────────────────────────── */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-0);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 16px 16px;
  overflow-y: auto;
}
.auth-overlay.hidden { display: none; }

.auth-shell {
  width: min(900px, calc(100vw - 32px));
  min-height: auto;
  display: block;
  border: 1px solid var(--brd-hi);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-1);
  box-shadow: var(--shadow);
  margin: 0 auto;
}

.auth-landing {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 24px;
  padding: 24px 34px 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0)),
    var(--bg-0);
  border-right: none;
  transition: border-color 240ms ease;
}

.auth-shell:not(.auth-shell--form) .auth-landing {
  display: grid;
  align-content: start;
  position: relative;
  top: -500px;
  margin-bottom: -500px;
  padding-top: 0;
  padding-bottom: 20px;
}

/* Láser naranja de página completa */
.auth-overlay__laser {
  position: fixed;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(232,160,32,0.03) 10%,
    rgba(255,196,72,0.28) 40%,
    rgba(255,210,90,0.38) 50%,
    rgba(255,196,72,0.28) 60%,
    rgba(232,160,32,0.03) 90%,
    transparent 100%
  );
  box-shadow:
    0 0 4px 1px rgba(232,160,32,0.10),
    0 0 12px 2px rgba(232,160,32,0.05);
  animation: overlay-laser 5s ease-in 1 forwards;
  pointer-events: none;
  z-index: 10;
}
/* estela que se desvanece hacia arriba */
.auth-overlay__laser::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(232,160,32,0.02) 50%,
    rgba(232,160,32,0.05) 100%
  );
  pointer-events: none;
}
@keyframes overlay-laser {
  0%   { top: -2px; opacity: 0; }
  4%   { opacity: 1; }
  85%  { opacity: 0.7; }
  100% { top: 100vh; opacity: 0; }
}

.auth-landing__scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(232,160,32,0.12) 14%, rgba(255,196,72,0.95) 50%, rgba(232,160,32,0.12) 86%, transparent 100%);
  box-shadow:
    0 0 0 1px rgba(232,160,32,0.14),
    0 0 12px rgba(232,160,32,0.24),
    0 0 24px rgba(232,160,32,0.12);
  animation: auth-scan 7.5s linear infinite;
  pointer-events: none;
  z-index: 1;
}

.auth-landing__scanline::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 26px;
  background: linear-gradient(180deg, transparent 0%, rgba(232,160,32,0.06) 45%, rgba(232,160,32,0.14) 50%, rgba(232,160,32,0.06) 55%, transparent 100%);
  pointer-events: none;
}

.auth-landing__glow {
  position: absolute;
  top: -160px;
  right: -120px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,160,32,0.08) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
  animation: auth-glow 6s ease-in-out infinite;
}

@keyframes auth-scan {
  0% { top: 0; }
  100% { top: 100%; }
}

@keyframes auth-glow {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes auth-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.95;
    box-shadow: 0 0 0 5px rgba(34,208,122,0.12);
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
    box-shadow: 0 0 0 8px rgba(34,208,122,0.18), 0 0 14px rgba(34,208,122,0.28);
  }
}

.auth-landing > * {
  position: relative;
  z-index: 2;
}

.auth-landing__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.auth-brand--hero {
  margin-bottom: 0;
}

.auth-landing__cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-landing__hero {
  max-width: 600px;
  margin-top: 0;
}

.auth-landing__hero {
  margin-top: 0;
}

.auth-landing__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 4px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--amber-dim);
  background: rgba(232,160,32,0.08);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--amber);
}

.auth-landing__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--win);
  box-shadow: 0 0 0 5px rgba(34,208,122,0.12);
  animation: auth-pulse 1.8s ease-in-out infinite;
}

.auth-landing__title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.7vw, 2.95rem);
  line-height: 1.08;
  letter-spacing: 0.04em;
  color: var(--txt-1);
}

.auth-landing__title span {
  color: var(--amber);
}

.auth-landing__sub {
  max-width: 460px;
  margin: 0 0 24px;
  color: var(--txt-3);
  font-size: 0.8rem;
  line-height: 1.75;
  text-align: left;
  text-wrap: balance;
}

.btn--hero {
  height: 40px;
  padding: 0 22px;
  font-size: 0.78rem;
}

.auth-landing__kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--brd);
  border-bottom: 1px solid var(--brd);
  margin-top: 8px;
}

.auth-kpi {
  padding: 22px 18px;
  border-right: 1px solid var(--brd);
  background: transparent;
}

.auth-kpi:last-child {
  border-right: none;
}

.auth-kpi__val {
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 1.24rem;
  color: var(--amber);
  letter-spacing: 0.06em;
}

.auth-kpi__lbl {
  font-size: 0.68rem;
  color: var(--txt-3);
  line-height: 1.5;
}

.how-it-works {
  margin-top: 28px;
  padding: 30px;
  border: 1px solid rgba(50, 69, 95, 0.9);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(232, 160, 32, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(11, 16, 26, 0.96), rgba(9, 13, 21, 0.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 18px 48px rgba(0,0,0,0.24);
}

.how-it-works__header {
  max-width: 760px;
}

.how-it-works__eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  color: var(--amber);
}

.how-it-works__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--txt-1);
}

.how-it-works__sub {
  margin-top: 12px;
  max-width: 680px;
  color: var(--txt-2);
  font-size: 0.98rem;
  line-height: 1.7;
}

.how-it-works__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.how-it-works__step {
  position: relative;
  min-height: 220px;
  padding: 20px 18px 18px;
  border-radius: 18px;
  border: 1px solid rgba(52, 70, 94, 0.95);
  background: rgba(14, 20, 31, 0.92);
  overflow: hidden;
}

.how-it-works__step::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(232, 160, 32, 0.08);
  filter: blur(6px);
}

.how-it-works__step-top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.how-it-works__number {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  line-height: 0.92;
  letter-spacing: 0.04em;
  color: rgba(232, 160, 32, 0.9);
  text-shadow: 0 0 18px rgba(232, 160, 32, 0.12);
}

.how-it-works__step-title {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: 1.38rem;
  line-height: 1.02;
  letter-spacing: 0.03em;
  color: var(--txt-1);
}

.how-it-works__step-text {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  color: var(--txt-2);
  font-size: 0.84rem;
  line-height: 1.75;
}

.auth-preview {
  margin-top: 8px;
  padding: 20px;
  border: 1px solid var(--brd);
  border-radius: 18px;
  background: rgba(8,14,24,0.9);
  box-shadow: var(--shadow-sm);
}

.auth-preview__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.auth-preview__disclaimer {
  font-size: 0.72rem;
  color: var(--txt-3);
  margin: 0 0 14px;
  font-style: italic;
}

.auth-preview__modes {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px;
  border: 1px solid rgba(30,44,63,0.74);
  border-radius: 999px;
  background: rgba(8,12,19,0.72);
}

.auth-preview__mode {
  padding: 5px 10px;
  border-radius: 999px;
  color: #7f96b2;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-preview__mode--active {
  color: var(--amber);
  background: rgba(232,160,32,0.12);
  border: 1px solid rgba(232,160,32,0.24);
}

.auth-preview__title,
.auth-preview__tag,
.auth-preview__label,
.auth-preview__card-label {
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-preview__label {
  color: #dbe7f5;
}

.auth-preview__title {
  font-size: 0.66rem;
  color: #dbe7f5;
}

.auth-preview__tag {
  font-size: 0.56rem;
  color: #7f96b2;
}

.auth-preview__amount {
  font-family: var(--font-display);
  font-size: 2.05rem;
  color: #f4f7fb;
  letter-spacing: 0.04em;
}

.auth-preview__amount span {
  font-size: 0.76rem;
  color: #7f96b2;
}

.auth-preview__meta {
  margin-top: 6px;
  font-size: 0.7rem;
  color: var(--win);
  overflow-wrap: anywhere;
}

.auth-preview__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.auth-preview__hero-main {
  display: grid;
  gap: 12px;
}

.auth-preview__summary {
  display: grid;
  gap: 10px;
}

.auth-preview__summary-item {
  padding: 11px 12px;
  border: 1px solid rgba(30,44,63,0.74);
  border-radius: 12px;
  background: rgba(12,18,28,0.72);
}

.auth-preview__summary-item strong,
.auth-preview__summary-item span {
  display: block;
}

.auth-preview__summary-item strong {
  margin-bottom: 5px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #f4f7fb;
  overflow-wrap: anywhere;
}

.auth-preview__summary-item span {
  color: #8ea3bc;
  font-size: 0.64rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

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

.auth-preview__total {
  padding: 12px 14px;
  border: 1px solid rgba(30,44,63,0.9);
  border-radius: 12px;
  background: rgba(12,18,28,0.9);
}

.auth-preview__total-label,
.auth-preview__curve-tag {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6f87a3;
}

.auth-preview__total-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.28rem;
  letter-spacing: 0.04em;
  color: #f4f7fb;
}

.auth-preview__total-value--win { color: var(--win); }
.auth-preview__total-value--amber { color: var(--amber); }

.auth-preview__curve {
  margin: 14px 0 16px;
  border-bottom: 1px solid var(--brd);
  padding-bottom: 14px;
}

.auth-preview__curve-head,
.auth-preview__curve-axis,
.auth-preview__curve-ranges {
  display: flex;
  align-items: center;
}

.auth-preview__curve-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.auth-preview__curve-ranges {
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7f96b2;
}

.auth-preview__curve-ranges span {
  padding: 5px 8px;
  border-radius: 999px;
}

.auth-preview__curve-ranges .is-active {
  background: rgba(232,160,32,0.16);
  color: var(--amber);
}

.auth-preview__curve svg {
  display: block;
  width: 100%;
  height: 210px;
}

.auth-preview__curve-axis {
  justify-content: space-between;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  color: #5f7692;
}

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

.auth-preview__card {
  padding: 12px 13px;
  border: 1px solid rgba(30,44,63,0.74);
  border-radius: 12px;
  background: rgba(12,18,28,0.72);
}

.auth-preview__card-label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.54rem;
  color: #7f96b2;
}

.auth-preview__card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #f4f7fb;
  overflow-wrap: anywhere;
}

.auth-preview__card small {
  display: block;
  color: #8ea3bc;
  font-size: 0.64rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.public-showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 22px;
  align-items: center;
  padding: 24px 0 8px;
}

.public-showcase__eyebrow {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}

.public-showcase__title {
  max-width: 540px;
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: var(--txt-1);
}

.public-showcase__sub {
  max-width: 540px;
  margin: 0 0 18px;
  color: var(--txt-3);
  font-size: 0.76rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.public-showcase__bullets {
  display: grid;
  gap: 10px;
}

.public-showcase__bullet {
  position: relative;
  padding-left: 18px;
  color: #d4dde8;
  font-size: 0.72rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.public-showcase__bullet::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(232,160,32,0.10);
}

.public-showcase__frame {
  position: relative;
}

.public-showcase__browser {
  border: 1px solid rgba(30,44,63,0.84);
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(8,14,24,0.96), rgba(11,17,27,0.92));
  box-shadow: 0 26px 48px rgba(0,0,0,0.28);
}

.public-showcase__browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(30,44,63,0.74);
  background: rgba(12,18,28,0.92);
}

.public-showcase__browser-bar > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(127,150,178,0.55);
}

.public-showcase__browser-url {
  margin-left: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  color: #8ea3bc;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-showcase__profile {
  padding: 18px;
}

.public-showcase__hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.public-showcase__avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8a020, #f3c86b);
  color: #07090d;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.public-showcase__name {
  font-family: var(--font-display);
  font-size: 1.08rem;
  color: #f4f7fb;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.public-showcase__meta {
  margin-top: 4px;
  color: #8ea3bc;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
}

.public-showcase__kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.public-showcase__kpis div {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(30,44,63,0.74);
  background: rgba(255,255,255,0.02);
}

.public-showcase__kpis strong,
.public-showcase__kpis span {
  display: block;
}

.public-showcase__kpis strong {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #f4f7fb;
}

.public-showcase__kpis span {
  margin-top: 4px;
  color: #7f96b2;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.public-showcase__chart {
  padding: 12px 10px 8px;
  border-radius: 14px;
  border: 1px solid rgba(30,44,63,0.74);
  background: rgba(7,9,13,0.54);
}

.public-showcase__chart svg {
  display: block;
  width: 100%;
  height: 180px;
}

.public-showcase__footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  color: #8ea3bc;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.social-proof {
  padding: 18px 0 4px;
}

.social-proof__header {
  margin-bottom: 18px;
}

.social-proof__eyebrow {
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}

.social-proof__title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.9vw, 2rem);
  line-height: 1.12;
  letter-spacing: 0.04em;
  color: var(--txt-1);
}

.social-proof__sub {
  max-width: 620px;
  margin: 0;
  color: var(--txt-3);
  font-size: 0.76rem;
  line-height: 1.75;
}

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

.social-proof__card {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(30,44,63,0.78);
  background: linear-gradient(180deg, rgba(12,18,28,0.92), rgba(9,14,22,0.82));
  box-shadow: var(--shadow-sm);
}

.social-proof__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.social-proof__avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(232,160,32,0.95), rgba(243,200,107,0.92));
  color: #07090d;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.social-proof__name {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: #f4f7fb;
}

.social-proof__sport {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8ea3bc;
}

.social-proof__quote {
  margin: 0;
  color: #d4dde8;
  font-size: 0.74rem;
  line-height: 1.75;
}

.compare-strip {
  margin-top: 30px;
  padding: 28px;
  border: 1px solid rgba(30,44,63,0.78);
  border-radius: 22px;
  background:
    radial-gradient(circle at right top, rgba(232,160,32,0.12), transparent 34%),
    linear-gradient(180deg, rgba(11,16,26,0.9), rgba(9,14,22,0.84));
  box-shadow: var(--shadow-sm);
}

.compare-strip__header {
  max-width: 760px;
  margin-bottom: 20px;
}

.compare-strip__eyebrow {
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}

.compare-strip__title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: 0.04em;
  color: var(--txt-1);
}

.compare-strip__sub {
  margin: 0;
  color: var(--txt-3);
  font-size: 0.76rem;
  line-height: 1.75;
}

.compare-strip__table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(30,44,63,0.78);
  border-radius: 18px;
  background: rgba(255,255,255,0.02);
}

.compare-strip__table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.compare-strip__table th,
.compare-strip__table td {
  padding: 16px 14px;
  border-bottom: 1px solid rgba(30,44,63,0.62);
  text-align: left;
  vertical-align: middle;
}

.compare-strip__table thead th {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8ea3bc;
  background: rgba(10,15,24,0.92);
}

.compare-strip__table tbody th {
  font-family: var(--font-display);
  font-size: 0.96rem;
  letter-spacing: 0.03em;
  color: #f4f7fb;
  background: rgba(255,255,255,0.01);
}

.compare-strip__table tbody tr:last-child th,
.compare-strip__table tbody tr:last-child td {
  border-bottom: none;
}

.compare-strip__cell {
  font-size: 0.74rem;
  line-height: 1.6;
  color: #d4dde8;
}

.compare-strip__cell--brand {
  color: var(--amber);
  font-weight: 700;
}

.compare-strip__cell--muted {
  color: #a9bdd0;
}

.lp-faq {
  margin-top: 34px;
  padding: 28px;
  border: 1px solid rgba(30,44,63,0.78);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(11,16,26,0.9), rgba(8,12,20,0.84));
  box-shadow: var(--shadow-sm);
}

.lp-faq__header {
  max-width: 720px;
  margin-bottom: 18px;
}

.lp-faq__eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}

.lp-faq__title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: 0.04em;
  color: var(--txt-1);
}

.lp-faq__sub {
  margin: 0;
  color: var(--txt-3);
  font-size: 0.76rem;
  line-height: 1.75;
}

.lp-faq__list {
  display: grid;
  gap: 12px;
}

.lp-faq__item {
  border: 1px solid rgba(30,44,63,0.78);
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}

.lp-faq__question {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 18px 52px 18px 18px;
  font-family: var(--font-display);
  font-size: 1.06rem;
  letter-spacing: 0.03em;
  color: #f4f7fb;
}

.lp-faq__question::-webkit-details-marker {
  display: none;
}

.lp-faq__question::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--amber);
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1;
}

.lp-faq__item[open] .lp-faq__question::after {
  content: "−";
}

.lp-faq__answer {
  margin: 0;
  padding: 0 18px 18px;
  color: #ced9e6;
  font-size: 0.76rem;
  line-height: 1.8;
  border-top: 1px solid rgba(30,44,63,0.6);
}

@media (max-width: 860px) {
  .how-it-works {
    padding: 24px 18px;
  }

  .how-it-works__grid {
    grid-template-columns: 1fr;
  }

  .how-it-works__step {
    min-height: unset;
  }

  .auth-preview__hero {
    grid-template-columns: 1fr;
  }

  .auth-preview__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-preview__curve svg {
    height: 170px;
  }

  .public-showcase {
    grid-template-columns: 1fr;
  }

  .social-proof__grid {
    grid-template-columns: 1fr;
  }

  .compare-strip {
    padding: 22px 16px;
  }

  .lp-faq {
    padding: 22px 16px;
  }
}

@media (max-width: 640px) {
  .auth-preview__totals,
  .auth-preview__cards {
    grid-template-columns: 1fr;
  }

  .public-showcase__kpis,
  .public-showcase__footer {
    grid-template-columns: 1fr;
    display: grid;
  }

  .auth-preview__curve-axis {
    gap: 8px;
    font-size: 0.52rem;
    overflow-x: auto;
    justify-content: flex-start;
    white-space: nowrap;
  }

  .public-showcase__browser-url {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .auth-preview__modes {
    width: 100%;
    justify-content: space-between;
  }
}

.auth-card {
  position: fixed;
  right: -440px;
  top: 0;
  height: 100vh;
  width: min(420px, 100vw);
  z-index: 10002;
  background: var(--bg-1);
  border-left: 1px solid var(--brd);
  padding: 86px 34px 34px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
  transition: right 0.28s ease;
  box-shadow: -8px 0 32px rgba(0,0,0,0.35);
}

.auth-card--open {
  right: 0;
}

.auth-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.auth-backdrop--visible {
  opacity: 1;
  pointer-events: auto;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.auth-brand__logo {
  color: var(--amber);
  font-size: 1.6rem;
}
.auth-brand__name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--txt-1);
}
.auth-brand__name strong { color: var(--amber); }

.auth-mode {
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--brd);
}

.auth-mode__label {
  display: inline-block;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.auth-mode__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brd);
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--txt-2);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.auth-mode__close:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--bg-3);
}

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form.hidden { display: none; }

.auth-error {
  background: rgba(240, 69, 69, 0.1);
  border: 1px solid var(--lose-dim);
  border-left: 3px solid var(--lose);
  color: var(--lose);
  font-size: 0.78rem;
  padding: 10px 12px;
  border-radius: var(--radius);
  line-height: 1.5;
}
.auth-error.hidden { display: none; }

.plan-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
}
.plan-badge--free    { background: var(--bg-3); color: var(--txt-3); border: 1px solid var(--brd); }
.plan-badge--premium { background: var(--amber-dim); color: var(--amber); border: 1px solid var(--amber-dim); }

.auth-link {
  background: none;
  border: none;
  color: var(--txt-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  transition: color var(--transition);
}
.auth-link:hover { color: var(--amber); }

.auth-success-inline {
  background: rgba(34, 208, 122, 0.08);
  border: 1px solid var(--win-dim);
  border-left: 3px solid var(--win);
  color: var(--win);
  font-size: 0.78rem;
  padding: 10px 12px;
  border-radius: var(--radius);
  line-height: 1.5;
}
.auth-success-inline.hidden { display: none; }

.auth-resend {
  text-align: center;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--brd);
}
.auth-resend p { color: var(--txt-3); font-size: 0.75rem; margin-bottom: 8px; }
.auth-resend.hidden { display: none; }

.auth-success {
  text-align: center;
  padding: 16px 0;
}
.auth-success.hidden { display: none; }
.auth-success__icon {
  font-size: 2.5rem;
  color: var(--amber);
  margin-bottom: 12px;
}
.auth-success h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--txt-1);
  margin-bottom: 8px;
}
.auth-success p {
  color: var(--txt-2);
  font-size: 0.82rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ── Premium tag inline ──────────────────────────────────────────────────── */
.premium-tag {
  font-size: 0.58rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px solid var(--amber-dim);
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
}

/* ── Filtros avanzados (premium) ─────────────────────────────────────────── */
.filters-panel {
  position: sticky;
  top: 64px;
  z-index: 40;
  background: var(--bg-2);
  border: 1px solid var(--brd);
  border-left: 3px solid var(--amber-dim);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 12px;
}
.filters-panel.hidden { display: none; }
.filters-body--free {
  user-select: none;
}
.filters-free-overlay {
  position: absolute;
  inset: 44px 10px 10px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 18px 16px;
  background: rgba(7, 9, 13, 0.18);
  backdrop-filter: blur(1px);
  border-radius: var(--radius);
  pointer-events: auto;
}
.filters-free-overlay.hidden { display: none; }
.filters-free-overlay .free-wall__cta {
  position: relative;
  z-index: 5;
  pointer-events: auto;
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  cursor: pointer;
  border-radius: 10px;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.filters-header:hover {
  background: var(--bg-2);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(122, 143, 168, 0.14);
}
.filters-body.hidden { display: none; }

.filters-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filters-active-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--amber);
  color: #07090d;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: .02em;
  flex-shrink: 0;
}
.filters-active-badge.hidden { display: none; }

#filter-odds-min,
#filter-odds-max,
#filter-stake-min,
#filter-stake-max {
  font-family: var(--font-display);
  font-variant-numeric: lining-nums tabular-nums;
}

.filters-header--active .filters-title { color: var(--amber); }

.filters-arrow {
  color: var(--txt-3);
  font-size: 0.9rem;
  transform: rotate(-90deg);
  transition: transform .18s ease, color .18s ease;
}
.filters-arrow.open {
  transform: rotate(0deg);
  color: var(--txt-2);
}
.panel__title--toggle:hover .panel__title-arrow,
.filters-header:hover .filters-arrow,
.sport-stats-header:hover .sport-stats-arrow,
.streak-header:hover .streak-arrow,
.achievements-header:hover .achievements-arrow {
  color: var(--amber);
}
.filters-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.filters-topbar--standalone {
  margin-bottom: 12px;
}
.filters-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--txt-1);
  text-transform: uppercase;
}
.filters-title-wrap,
.sport-stats-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.filters-copy,
.sport-stats-copy {
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--copy-text);
  letter-spacing: 0.02em;
  text-transform: none;
}
.filters-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.btn-link-muted {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.72rem;
  color: var(--txt-3);
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-link-muted:hover { color: var(--txt-2); }
.filter-actions {
  display: flex;
  align-items: flex-end;
}
.filter-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 90px;
}
.btn-filter-clear {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 10px;
  background: var(--bg-2);
  border: 1px solid var(--brd-hi);
  border-radius: var(--radius);
  color: var(--txt-2);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.btn-filter-clear:hover {
  color: var(--txt-1);
  border-color: var(--amber);
  background: var(--bg-3);
}
.filter-field--narrow {
  min-width: 56px;
  max-width: 72px;
}
.filter-field .field-label {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
}
.filter-field .input--sm {
  padding: 5px 8px;
  font-size: 0.75rem;
  height: 30px;
  color: var(--txt-1);
}
.btn-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--brd-hi);
  border-radius: var(--radius);
  background: var(--bg-1);
  color: var(--txt-2);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn-filter-toggle:hover {
  color: var(--txt-1);
  border-color: var(--txt-3);
  background: var(--bg-2);
}
.btn-filter-toggle[aria-pressed="true"] {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-dim);
}

#btn-toggle-cols[aria-pressed="true"] {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-dim);
}

/* ── Nota conflicto periodo / fechas ──────────────────────────────────────── */
.filters-note {
  font-size: 0.68rem;
  color: var(--amber);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  padding: 6px 0 2px;
}
.filters-note.hidden { display: none; }
.filters-free-notice {
  font-size: 0.72rem;
  color: var(--copy-text);
  font-family: var(--font-mono);
  padding: 6px 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.filters-free-notice.hidden { display: none; }
.btn-inline-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: inherit;
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.btn-inline-link:hover { color: #f0b840; }

/* ── Selector de periodo ───────────────────────────────────────────────────── */
.periodo-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.periodo-bar--filters {
  padding: 0;
  border-bottom: 0;
  margin-bottom: 0;
}

.btn-periodo {
  background: transparent;
  border: 1px solid var(--amber);
  color: var(--txt-2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-periodo:hover { color: var(--txt-1); border-color: var(--txt-2); }
.btn-periodo.active {
  background: var(--amber);
  border-color: var(--amber);
  color: #07090d;
  font-weight: 700;
}

.periodo-mes-select {
  min-width: 140px;
  background: transparent;
  border: 1px solid var(--amber);
  color: var(--input-text);
  padding: 4px 28px 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  height: auto;
  line-height: normal;
  appearance: auto;
}
.periodo-mes-select:hover { color: var(--txt-1); border-color: var(--txt-2); }
.periodo-mes-select:focus { outline: none; border-color: var(--amber); }

.periodo-count {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--copy-text);
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* ── Paginación ────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 0 4px;
}
.pagination.hidden { display: none; }
.pagination__info {
  font-size: 0.72rem;
  color: var(--txt-2);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  min-width: 90px;
  text-align: center;
}

/* ── Punto de resultado en tabla ─────────────────────────────────────────── */
.result-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.result-dot--win        { background: var(--win);   box-shadow: 0 0 4px var(--win-glow); }
.result-dot--half_win   { background: #68e6a0; box-shadow: 0 0 4px rgba(34, 208, 122, 0.35); }
.result-dot--lose       { background: var(--lose);  box-shadow: 0 0 4px var(--lose-glow); }
.result-dot--half_lose  { background: #ff8d8d; box-shadow: 0 0 4px rgba(240, 69, 69, 0.35); }
.result-dot--place      { background: var(--amber); box-shadow: 0 0 4px var(--amber-glow); }
.result-dot--pending    { background: var(--amber); box-shadow: 0 0 4px var(--amber-glow); }
.result-dot--void       { background: var(--txt-3); }
.result-dot--cashout    { background: #66b7ff; box-shadow: 0 0 4px rgba(96, 165, 250, 0.35); }
.result-dot--adjustment { background: var(--amber); }

.hist-table .result-dot-cell {
  width: 28px;
  text-align: center;
  padding-left: 8px;
  padding-right: 4px;
}
.hist-actions-cell {
  white-space: nowrap;
  text-align: right;
  padding-right: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 90px;
  min-width: 90px;
}
.hist-actions-cell .btn { margin-left: 0; }
.hist-action-tools {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pending-resolver {
  display: inline-flex;
  align-items: center;
}
.pending-resolve-popover {
  position: fixed;
  padding: 8px;
  display: grid;
  gap: 5px;
  background: color-mix(in srgb, var(--bg-1) 94%, var(--bg-0));
  border: 1px solid var(--brd-hi);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  z-index: 10050;
}
.pending-resolve-popover.hidden { display: none; }
.pending-resolver__option {
  width: 100%;
  padding: 7px 9px;
  border-radius: 7px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}
.pending-resolver__option:hover { transform: translateY(-1px); }
.pending-resolver__option--win {
  background: var(--win-dim);
  color: var(--win);
  border-color: rgba(34, 208, 122, 0.18);
}
.pending-resolver__option--lose {
  background: var(--lose-dim);
  color: var(--lose);
  border-color: rgba(240, 69, 69, 0.18);
}
.pending-resolver__option--void {
  background: var(--bg-3);
  color: var(--txt-2);
  border-color: var(--brd);
}
.pending-resolver__option--place {
  background: var(--amber-dim);
  color: var(--amber);
  border-color: rgba(232, 160, 32, 0.24);
}
.pending-resolver__option--half-win {
  background: rgba(87, 199, 143, 0.14);
  color: #7ce8b1;
  border-color: rgba(87, 199, 143, 0.24);
}
.pending-resolver__option--half-lose {
  background: rgba(240, 69, 69, 0.12);
  color: #ff8d8d;
  border-color: rgba(240, 69, 69, 0.24);
}
[data-theme="light"] .pending-resolve-popover {
  box-shadow: 0 18px 36px rgba(18, 24, 34, 0.18);
}
[data-theme="light"] .pending-resolver__option--win {
  background: #c7ead9;
  color: #137045;
  border-color: #abd7bf;
}
[data-theme="light"] .pending-resolver__option--lose {
  background: #f0d1d1;
  color: #b02a2a;
  border-color: #dfb8b8;
}
[data-theme="light"] .pending-resolver__option--void {
  background: #edf2f8;
  color: #465a73;
  border-color: #c6d3e2;
}
[data-theme="light"] .pending-resolver__option--place {
  background: #eadab5;
  color: #b87400;
  border-color: #d9c18c;
}
[data-theme="light"] .pending-resolver__option--half-win {
  background: #d7efe2;
  color: #137045;
  border-color: #c0e0ce;
}
[data-theme="light"] .pending-resolver__option--half-lose {
  background: #f5dddd;
  color: #b02a2a;
  border-color: #e7c4c4;
}

html:not([data-theme="dark"]):not([data-theme="light"]) .pending-resolve-popover {
  box-shadow: 0 18px 36px rgba(18, 24, 34, 0.18);
}
html:not([data-theme="dark"]):not([data-theme="light"]) .pending-resolver__option--win {
  background: #c7ead9;
  color: #137045;
  border-color: #abd7bf;
}
html:not([data-theme="dark"]):not([data-theme="light"]) .pending-resolver__option--lose {
  background: #f0d1d1;
  color: #b02a2a;
  border-color: #dfb8b8;
}
html:not([data-theme="dark"]):not([data-theme="light"]) .pending-resolver__option--void {
  background: #edf2f8;
  color: #465a73;
  border-color: #c6d3e2;
}
html:not([data-theme="dark"]):not([data-theme="light"]) .pending-resolver__option--place {
  background: #eadab5;
  color: #b87400;
  border-color: #d9c18c;
}
html:not([data-theme="dark"]):not([data-theme="light"]) .pending-resolver__option--half-win {
  background: #d7efe2;
  color: #137045;
  border-color: #c0e0ce;
}
html:not([data-theme="dark"]):not([data-theme="light"]) .pending-resolver__option--half-lose {
  background: #f5dddd;
  color: #b02a2a;
  border-color: #e7c4c4;
}
.hist-actions-divider {
  width: 1px;
  height: 20px;
  margin: 0 2px;
  background: var(--border);
  opacity: 0.9;
  flex-shrink: 0;
}
.hist-resolve-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.hist-resolve-group .btn {
  min-width: 24px;
  padding-left: 7px;
  padding-right: 7px;
}
.hist-resolve-group--asian {
  display: grid;
  grid-template-columns: repeat(3, minmax(24px, max-content));
  justify-content: end;
  gap: 4px;
}
.hist-resolve-group--asian .btn {
  font-size: 0.56rem;
  min-width: 24px;
}
.btn--half-win {
  background: rgba(87, 199, 143, 0.14);
  color: #7ce8b1;
  border: 1px solid rgba(87, 199, 143, 0.22);
}
.btn--half-win:hover { background: rgba(87, 199, 143, 0.24); }
.btn--half-lose {
  background: rgba(232, 160, 32, 0.12);
  color: #f2be57;
  border: 1px solid rgba(232, 160, 32, 0.24);
}
.btn--half-lose:hover { background: rgba(232, 160, 32, 0.22); }
.btn-row-delete--subtle {
  opacity: 0.55;
  font-size: 1rem;
  line-height: 1;
  min-width: 30px;
  padding-left: 0;
  padding-right: 0;
}
.btn-row-delete--subtle:hover { opacity: 1; color: var(--lose); }

/* Fila en modo edición inline */
.row--editing td { background: var(--bg-3); padding-top: 4px; padding-bottom: 4px; }
.row--editing .input { padding: 3px 6px; font-size: 0.78rem; height: auto; }
.row--editing input[type="number"] { -moz-appearance: textfield; }
.row--editing input[type="number"]::-webkit-inner-spin-button,
.row--editing input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.row--editing .hist-actions-cell {
  align-items: flex-start;
  justify-content: flex-end;
  min-width: 104px;
}
.row--editing .ei-sport {
  width: 100%;
  min-width: 100px;
  max-width: 170px;
}
.row--editing .ei-desc {
  width: 100%;
  min-width: 120px;
  max-width: 240px;
}
.edit-row-actions {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 96px;
}
.edit-row-actions .btn {
  width: 100%;
  justify-content: center;
}
.row--editing .ei-bookmaker,
.row--editing .ei-tipster {
  width: 100%;
  min-width: 72px;
  max-width: 140px;
}
.row--editing.row--editing-extra-cols .ei-bookmaker,
.row--editing.row--editing-extra-cols .ei-tipster {
  min-width: 64px;
  max-width: 110px;
}
.row--editing.row--editing-extra-cols .ei-desc {
  min-width: 96px;
  max-width: 180px;
}
.btn--void { background: rgba(122,143,168,0.12); color: var(--txt-2); border: 1px solid var(--brd); }
.btn--void:hover { background: rgba(122,143,168,0.22); }
.th-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.th-sort:hover { color: var(--amber); }
.sort-icon { font-size: 0.65em; opacity: 0.4; margin-left: 2px; }
.th-sort.sort-asc .sort-icon::after  { content: '▲'; opacity: 1; color: var(--amber); }
.th-sort.sort-desc .sort-icon::after { content: '▼'; opacity: 1; color: var(--amber); }

/* ── Bankrolls manager modal ─────────────────────────────────────────────── */
.modal--md { max-width: 520px; }

.bankrolls-list {
  position: relative;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bankrolls-list--free {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}
.bankrolls-empty {
  color: var(--txt-3);
  font-size: 0.8rem;
  text-align: center;
  padding: 12px;
}
.bankrolls-empty.hidden { display: none; }

.bankroll-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--brd);
  border-radius: var(--radius);
  transition: border-color var(--transition), background var(--transition);
  cursor: pointer;
}
.bankroll-item:hover {
  border-color: var(--amber-dim);
  background: var(--bg-3);
}
.bankroll-item--locked {
  cursor: default;
  opacity: 0.9;
}
.bankroll-item--locked:hover {
  border-color: var(--brd);
  background: var(--bg-2);
}
.bankroll-item--active {
  border-color: var(--amber-dim);
  background: var(--amber-glow);
}
.bankroll-item--active:hover {
  background: var(--amber-glow);
}

#modal-bankrolls .free-wall-sport {
  margin: -4px 0 12px;
}
.bankroll-item__name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-br-rename-inline {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--txt-3);
  font-size: 0.8rem;
  padding: 0 2px;
  opacity: 0;
  transition: opacity var(--transition), color var(--transition);
  line-height: 1;
}
.btn-br-icon {
  width: 14px;
  height: 14px;
  display: block;
}
.bankroll-item:hover .btn-br-rename-inline {
  opacity: 1;
}
.btn-br-rename-inline:hover {
  color: var(--amber);
}
.btn-br-rename-confirm {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--green);
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0 2px;
  line-height: 1;
}
.btn-br-rename-confirm:hover {
  opacity: 0.8;
}
.bankroll-item__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bankroll-item__name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--txt-1);
}
.bankroll-item__saldo {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--amber);
}
.bankroll-item__actions {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.btn--xs {
  padding: 3px 8px;
  font-size: 0.65rem;
  height: 26px;
}

.bankroll-item__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--txt-2);
  background: transparent;
  border: 1px solid var(--brd);
  border-radius: 3px;
  padding: 3px 8px;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.bankroll-item__tag--locked {
  color: var(--amber);
  border-color: rgba(232,160,32,.35);
  background: rgba(232,160,32,.08);
}

.bankrolls-create {
  border-top: 1px solid var(--brd);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bankrolls-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.bankrolls-footer-actions__create,
.bankrolls-footer-actions__premium {
  width: auto;
  min-width: 0;
  padding-inline: 16px;
  margin-top: 0 !important;
}

.bankrolls-footer-actions__create {
  flex: 0 1 auto;
}

.bankrolls-footer-actions__premium {
  flex: 0 0 auto;
}
.bankrolls-readonly-note {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--brd);
  border-radius: var(--radius);
  background: rgba(255,255,255,.02);
  color: var(--txt-3);
  font-size: 0.72rem;
  line-height: 1.5;
}
.bankrolls-readonly-note.hidden {
  display: none;
}

/* ── P&L item premium ────────────────────────────────────────────────────── */
.pnl-item--premium.hidden { display: none; }

/* ── Columnas opcionales Casa / Tipster ──────────────────────────────────── */
.td-bookmaker,
.td-tipster  { display: none; }
#hist-table.show-extra-cols .td-bookmaker,
#hist-table.show-extra-cols .td-tipster  { display: table-cell; }

/* ── Avatar y menú desplegable de usuario ────────────────────────────────── */
.avatar-menu {
  position: relative;
}

.avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--amber-dim);
  border: 2px solid var(--amber);
  color: var(--amber);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), box-shadow var(--transition);
  letter-spacing: 0;
}
.avatar-btn:hover {
  background: var(--amber);
  color: var(--bg-0);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

.avatar-initials {
  line-height: 1;
  text-transform: uppercase;
}
.avatar-premium-star {
  font-size: 0.65rem;
  line-height: 1;
  color: var(--amber);
  pointer-events: none;
  align-self: center;
  margin-left: 1px;
}
.avatar-premium-star.hidden { display: none; }

.avatar-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: var(--bg-1);
  border: 1px solid var(--brd-hi);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  z-index: 200;
  overflow: hidden;
  animation: dropdown-in 0.15s ease;
}
@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.avatar-dropdown.hidden { display: none; }

.dd-user {
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dd-user__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--txt-1);
}
.dd-user__plan {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  align-self: flex-start;
}
.dd-user__plan.plan-badge--free    { background: var(--bg-3); color: var(--txt-3); border: 1px solid var(--brd); }
.dd-user__plan.plan-badge--premium { background: var(--amber-dim); color: var(--amber); border: 1px solid var(--amber-dim); }
.mis-datos-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 16px;
  align-items: center;
}
.mis-datos__label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--txt-3);
  white-space: nowrap;
}
.mis-datos__val {
  font-size: 0.85rem;
  color: var(--txt-1);
  word-break: break-all;
}
.mis-datos__val--inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.subscription-card {
  border: 1px solid var(--brd);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  overflow: hidden;
}

.subscription-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--brd);
}

.subscription-card__row:last-child {
  border-bottom: none;
}

.subscription-card__label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--txt-3);
}

.subscription-card__value {
  color: var(--txt-1);
  font-size: 0.82rem;
  text-align: right;
}
.subscription-card__price-display {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.subscription-card__price-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
}
.subscription-card__price-display .pricing-card__price-badge {
  align-self: flex-end;
}
.subscription-card__note {
  font-size: 0.69rem;
  color: var(--txt-3);
  letter-spacing: 0.04em;
}
.feedback-rating {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
.feedback-rating__option {
  min-width: 46px;
  min-height: 46px;
  border: 1px solid rgba(232, 160, 32, 0.18);
  border-radius: 12px;
  background: rgba(232, 160, 32, 0.05);
  color: rgba(232, 160, 32, 0.34);
  font-family: var(--font-ui);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.feedback-rating__option:hover {
  border-color: rgba(232, 160, 32, 0.45);
  color: rgba(232, 160, 32, 0.72);
  transform: translateY(-1px);
}
.feedback-rating__option.is-hovered {
  border-color: rgba(232, 160, 32, 0.58);
  background: rgba(232, 160, 32, 0.07);
  color: rgba(232, 160, 32, 0.88);
  transform: translateY(-1px);
}
.feedback-rating__option.is-active {
  border-color: rgba(232, 160, 32, 0.75);
  background: rgba(232, 160, 32, 0.08);
  color: var(--amber);
}
.feedback-comment__input {
  min-height: 132px;
  resize: vertical;
}
/* ── Bienvenido a Pro modal ──────────────────────────────────────────────── */
.pw-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pw-hero {
  text-align: center;
  padding: 8px 0 20px;
}
.pw-badge {
  display: inline-block;
  background: var(--amber);
  color: var(--bg-0);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  padding: 4px 14px;
  border-radius: 3px;
  margin-bottom: 14px;
}
.pw-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--txt-1);
  margin-bottom: 8px;
  line-height: 1.3;
}
.pw-sub {
  font-size: 0.8rem;
  color: var(--txt-2);
  line-height: 1.65;
  max-width: 320px;
  margin: 0 auto;
}
.pw-features {
  display: flex;
  flex-direction: column;
  gap: 11px;
  border-top: 1px solid var(--border-1);
  padding: 18px 0 22px;
}
.pw-feat {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.81rem;
  color: var(--txt-2);
  line-height: 1.5;
}
.pw-feat__icon {
  color: var(--amber);
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 0.75rem;
}

.subscription-help {
  display: flex;
  align-items: center;
  gap: 10px;
}

.subscription-help__email {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--brd);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  user-select: all;
}

.subscription-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dd-sep {
  height: 1px;
  background: var(--brd);
}

.dd-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  background: none;
  border: none;
  color: var(--txt-2);
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.dd-item:hover { background: var(--bg-3); color: var(--txt-1); }
.dd-item--danger       { color: var(--lose); }
.dd-item--danger:hover { background: var(--lose-dim); color: var(--lose); }
.dd-item--logout       { color: var(--amber); }
.dd-item--logout:hover { background: var(--amber-dim); color: var(--amber); }
.dd-item.hidden        { display: none; }
.section-title--compact {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}


.dd-theme {
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dd-theme__label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--txt-3);
  letter-spacing: 0.04em;
}
.dd-theme__options {
  display: flex;
  gap: 4px;
}
.dd-theme__btn {
  flex: 1;
  padding: 5px 4px;
  background: var(--bg-3);
  border: 1px solid var(--brd);
  border-radius: var(--radius);
  color: var(--txt-2);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.dd-theme__btn:hover          { background: var(--bg-4); color: var(--txt-1); }
.dd-theme__btn--active        { background: var(--amber-dim); color: var(--amber); border-color: var(--amber); }

/* ── Descripción en tabla ────────────────────────────────────────────────── */
.hist-desc-cell {
  max-width: 160px;
}
.hist-desc {
  display: block;
  color: var(--txt-2);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
  cursor: default;
}
.hist-sport-cell {
  max-width: 190px;
}
.hist-sport {
  display: block;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .hist-sport-cell {
    width: 1%;
    min-width: 120px;
    max-width: none;
  }

  .hist-sport {
    max-width: none;
  }

  .hist-desc-cell {
    width: auto;
    min-width: 180px;
    max-width: none;
  }

  .hist-desc {
    max-width: none;
  }

  .hist-table th:nth-child(7),
  .hist-table td:nth-child(7) {
    width: 104px;
  }
}

/* ── Modal editar apuesta ─────────────────────────────────────────────────── */
.modal--sm { max-width: 420px; }

/* ── Premium info modal ───────────────────────────────────────────────────── */
/* ── Pricing modal ───────────────────────────────────────────────────────── */
.modal--pricing {
  max-width: 620px;
  width: calc(100vw - 32px);
  max-height: min(88vh, 860px);
  display: flex;
  flex-direction: column;
}
.pricing-modal__header { border-bottom: 1px solid var(--border); }
.pricing-modal__body   { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.pricing-modal__subtitle {
  text-align: center;
  font-size: 0.82rem;
  color: var(--txt-2);
  letter-spacing: 0.02em;
  margin: 0;
}
.pricing-modal__subtitle:empty { display: none; }
/* Grid de comparación */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
/* Tarjeta plan */
.pricing-card {
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}
.pricing-card--free    { background: var(--bg-2); opacity: 0.85; }
.pricing-card--premium { background: var(--bg-2); border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.pricing-card__badge {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 0.58rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  background: var(--amber);
  color: #07090d;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 700;
}
.pricing-card__header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.pricing-card--premium .pricing-card__header { border-bottom-color: rgba(232,160,32,0.25); }
.pricing-card__plan {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--txt-3);
  font-weight: 600;
}
.pricing-card--premium .pricing-card__plan { color: var(--amber); }
.pricing-card__price {
  font-size: 1.15rem;
  font-family: var(--font-mono);
  color: var(--txt-1);
  font-weight: 700;
  margin-top: 4px;
}
.pricing-card--premium .pricing-card__price { color: var(--amber); }
.pricing-card__price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.pricing-card__price-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.pricing-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 16px 0;
  padding: 10px 12px;
  border: 1px solid var(--brd);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  color: var(--txt-2);
  font-size: 0.68rem;
  line-height: 1.4;
}
.pricing-consent input {
  margin-top: 1px;
  accent-color: var(--amber);
  flex-shrink: 0;
}
.pricing-card__price--old {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--txt-2);
  opacity: 0.92;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(232,160,32,0.72);
}
.pricing-card--premium .pricing-card__price--old { color: var(--txt-2); }
.pricing-card__price-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(34,208,122,0.18);
  background: rgba(34,208,122,0.08);
  color: #22d07a;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.pricing-card__beta-note {
  font-size: 0.69rem;
  color: var(--txt-3);
  letter-spacing: 0.04em;
}
.pricing-card__subnote {
  font-size: 0.69rem;
  color: var(--amber-2);
  letter-spacing: 0.03em;
}
.pricing-card__desc {
  font-size: 0.72rem;
  color: var(--txt-3);
}
/* Lista de features */
.pricing-feat-list {
  list-style: none;
  margin: 0;
  padding: 8px 0 10px;
  display: flex;
  flex-direction: column;
}
.pricing-feat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--txt-2);
  line-height: 1.24;
}
.pricing-feat::before {
  content: '✓';
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  width: 16px;
  text-align: center;
}
.pricing-feat--yes { color: var(--txt-1); }
.pricing-feat--yes::before { color: #22d07a; }
.pricing-card--free .pricing-feat--yes { text-decoration: none; opacity: 1; }
.pricing-feat--no  { color: var(--txt-3); text-decoration: line-through; text-decoration-color: var(--txt-3); opacity: 0.55; }
.pricing-feat--no::before  { content: '—'; color: var(--txt-3); }
/* CTA dentro de la tarjeta */
.premium-beta-inactive .pricing-beta-banner,
.premium-beta-inactive #pricing-premium-free,
.premium-beta-inactive #pricing-premium-beta-note {
  display: none;
}
.premium-beta-inactive #pricing-premium-price {
  color: var(--amber);
  opacity: 1;
  text-decoration: none;
}
.pricing-cta {
  display: block;
  margin: 10px auto 14px;
  width: fit-content;
  text-align: center;
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 6px 18px;
}
/* Responsive: apilar en móvil */
@media (max-width: 500px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card--free { display: none; }
  .modal--pricing {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 16px);
  }
  .pricing-modal__body {
    padding: 14px 14px 16px;
    gap: 12px;
  }
  .pricing-card__header {
    padding: 14px 14px 10px;
  }
  .pricing-feat-list {
    padding: 8px 0 10px;
  }
  .pricing-feat {
    padding: 5px 14px;
    font-size: 0.72rem;
  }
  .pricing-consent {
    margin: 6px 14px 0;
    font-size: 0.64rem;
  }
  .pricing-cta {
    margin-bottom: 10px;
  }
}

/* ── Estadísticas por deporte ─────────────────────────────────────────────── */
.sport-stats-panel {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 12px 0;
  overflow: hidden;
}
.sport-stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  border-radius: 10px;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.sport-stats-header:hover {
  background: var(--bg-2);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(122, 143, 168, 0.14);
}
.sport-stats-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--txt-2);
}
.sport-stats-arrow {
  font-size: 0.75rem;
  color: var(--txt-3);
  transition: transform var(--transition), color var(--transition);
}
.sport-stats-body { overflow-x: auto; }
.sport-stats-chart-wrap {
  max-width: 320px;
  max-height: 200px;
  display: flex;
  justify-content: center;
  padding: 8px 12px;
  margin: 0 auto 8px;
}
.sport-stats-chart-wrap canvas { max-height: 180px; }
.sport-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  font-family: var(--font-mono);
}
.sport-stats-table th {
  padding: 9px 12px;
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  color: var(--txt-3);
  border-bottom: 1px solid var(--border);
}
.sport-stats-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--bg-2);
  color: var(--txt-1);
  font-family: var(--font-display);
  font-weight: 600;
}
.sport-stats-table td.stats-cell--center {
  text-align: center;
}
.sport-stats-table th.stats-cell--center {
  text-align: center;
}
.sport-stats-table tr:last-child td { border-bottom: none; }
.sport-stats-table tr:hover td { background: var(--bg-2); }
.ss-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.ss-sort:hover { color: var(--txt-1); }

/* ── PANEL RESUMEN DE RACHA ─────────────────────────────────────────────── */
.streak-panel {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 12px 0 8px;
  overflow: hidden;
}
.streak-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  cursor: pointer;
  user-select: none;
  border-radius: 10px;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.streak-header:hover {
  background: var(--bg-2);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(122, 143, 168, 0.14);
}
.streak-title {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--txt-1);
}
.streak-arrow {
  font-size: 0.75rem;
  color: var(--txt-3);
  transition: transform 0.2s;
}
.streak-arrow.open { transform: rotate(180deg); }
.streak-body {
  position: relative;
  border-top: 1px solid var(--border);
}
/* Grid de KPIs de rendimiento */
.streak-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 1px;
  background: var(--brd);
}
.streak-grid--blurred {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
}
.streak-item {
  display: grid;
  grid-template-rows: minmax(1.55rem, auto) 1fr;
  gap: 5px;
  align-items: flex-start;
  padding: 11px 14px;
  background: var(--bg-1);
  min-width: 0;
}
.streak-item--wide { grid-column: auto; }
.streak-lbl {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--txt-2);
  line-height: 1.35;
  min-height: 1.55rem;
  white-space: normal;
  display: block;
  width: 100%;
}
.streak-lbl-sep { color: var(--brd-hi); }
.streak-lbl--roi {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  column-gap: 8px;
}
.streak-lbl-col {
  display: flex;
  justify-content: center;
  text-align: center;
}
.streak-lbl--roi .streak-lbl-sep {
  justify-self: center;
}
.streak-val {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--txt-1);
  line-height: 1.2;
  display: block;
  width: 100%;
}
.streak-val--streak {
  font-size: 0.98rem;
}
.streak-val#streak-roi {
  display: block;
}
.streak-val--sm { font-size: 0.8rem; }
.streak-date { color: var(--txt-3); font-weight: 400; }
.mejor-pnl  { display: inline; }
.mejor-desc { display: block; font-size: 0.72rem; color: var(--txt-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mejor-odds { display: inline; font-size: 0.7rem; margin-left: 6px; color: var(--txt-1); }
.streak-sep  { color: var(--brd-hi); margin: 0 3px; }
.streak-prev { color: var(--txt-3); }
.streak-arrow-val { font-weight: 700; }
@media (max-width: 1200px) {
  .streak-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 980px) {
  .streak-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .streak-item--wide {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .streak-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .streak-item--wide {
    grid-column: auto;
  }
  .streak-lbl--roi,
  .streak-val#streak-roi {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 4px;
  }
  .streak-lbl--roi .streak-lbl-sep,
  .streak-val#streak-roi .streak-sep,
  .streak-val#streak-roi .streak-arrow-val {
    display: none;
  }
}
/* Free overlay */
.streak-free-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(7, 9, 13, 0.55);
  backdrop-filter: blur(1px);
  padding: 16px;
  text-align: center;
}
.streak-free-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px solid var(--amber-dim);
  border-radius: 4px;
  padding: 3px 10px;
}
.streak-free-copy {
  max-width: 360px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--txt-2);
}

.achievements-panel {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 0 10px;
  overflow: hidden;
}
.achievements-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  cursor: pointer;
  user-select: none;
  border-radius: 10px;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.achievements-header:hover {
  background: var(--bg-2);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(122, 143, 168, 0.14);
}
.achievements-title {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--txt-1);
}
.achievements-arrow {
  font-size: 0.75rem;
  color: var(--txt-3);
  transition: transform 0.2s;
}
.achievements-arrow.open { transform: rotate(180deg); }
.achievements-body {
  border-top: 1px solid var(--border);
  padding: 10px 12px;
}
.achievements-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.achievements-ver-todos {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.achievements-meta {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--txt-3);
  text-transform: uppercase;
}
.achievement-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  cursor: help;
}
.achievement-chip--new {
  border-color: rgba(232, 160, 32, 0.58);
  box-shadow: 0 0 0 1px rgba(232, 160, 32, 0.14), var(--shadow-sm);
}
.achievement-chip--announce {
  animation: achievementAnnounce 1.05s ease-out 1;
}
.achievement-chip__icon {
  font-size: 0.9rem;
  line-height: 1;
}
.achievement-chip__new-icon,
.achievement-card__new-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: rgba(232, 160, 32, 0.14);
  border: 1px solid rgba(232, 160, 32, 0.34);
  color: var(--amber);
  font-size: 0.55rem;
  line-height: 1;
  flex-shrink: 0;
}
.achievement-chip__text {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--txt-1);
  letter-spacing: 0.03em;
}
.achievement-chip__badge,
.achievement-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(232, 160, 32, 0.38);
  background: rgba(232, 160, 32, 0.12);
  color: var(--amber);
  font-size: 0.53rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.achievement-chip:focus-visible,
.achievement-card:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.achievements-catalog {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 8px;
}
.achievement-group__header {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.achievement-group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.achievement-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-2);
}
.achievement-card--unlocked {
  border-color: var(--amber-dim);
  box-shadow: var(--shadow-sm);
}
.achievement-card--new {
  border-color: rgba(232, 160, 32, 0.58);
  box-shadow: 0 0 0 1px rgba(232, 160, 32, 0.14), var(--shadow-sm);
}
.achievement-card--announce {
  animation: achievementAnnounce 1.05s ease-out 1;
}
.achievement-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.achievement-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.achievement-card__icon {
  font-size: 1.1rem;
  line-height: 1;
}
.achievement-card__status {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--txt-3);
}
.achievement-card__status--pending {
  color: var(--amber);
  opacity: 0.75;
}
.achievement-card__status--unlocked {
  color: var(--win);
}
@keyframes achievementAnnounce {
  0% {
    transform: translateY(0);
    box-shadow: 0 0 0 0 rgba(232, 160, 32, 0);
  }
  35% {
    transform: translateY(-2px);
    box-shadow: 0 0 0 4px rgba(232, 160, 32, 0.12), var(--shadow-sm);
  }
  100% {
    transform: translateY(0);
    box-shadow: 0 0 0 0 rgba(232, 160, 32, 0), var(--shadow-sm);
  }
}
.achievement-card__title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--txt-1);
}
.achievement-card__desc {
  font-size: 0.72rem;
  color: var(--txt-2);
  line-height: 1.45;
}
.achievement-card__reason {
  font-size: 0.68rem;
  color: var(--txt-3);
  line-height: 1.5;
}
.achievement-card__progress {
  font-size: 0.64rem;
  color: var(--txt-3);
  line-height: 1.45;
  padding-top: 2px;
  border-top: 1px solid var(--border);
}

.stats-suite-panel {
  margin: 20px 0 12px;
}
.stats-suite-panel.hidden { display: none; }
.stats-suite-header {
  font-family: var(--font-display);
  font-size: 0.84rem;
  letter-spacing: 0.2em;
  color: var(--txt-2);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--brd);
}
.stats-suite-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.stats-suite-body {
  margin-top: 12px;
}
.stats-suite-panel .sport-stats-panel:first-child {
  margin-top: 0;
}

/* Spinner de carga del historial */
.hist-loading-cell {
  text-align: center;
  padding: 28px 0;
  color: var(--txt-3);
  font-size: 0.82rem;
}
.hist-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--brd);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Free walls (limitaciones plan free) ──────────────────────── */
.free-wall-tabla {
  position: relative;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  background: var(--bg-card);
}
.free-wall__ghost-rows {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 16px 4px;
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
  opacity: 0.3;
}
.free-wall__ghost-row {
  height: 28px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--border) 0%, var(--bg-2) 40%, var(--border) 100%);
}
.free-wall__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 16px 18px;
  background: linear-gradient(to bottom, transparent, var(--bg-card) 28%);
  text-align: center;
}
.free-wall__lock  { font-size: 1.3rem; line-height: 1; }
.free-wall__title {
  font-size: 0.8rem;
  color: var(--txt-1);
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.03em;
}
.free-wall__sub {
  font-size: 0.7rem;
  color: var(--txt-3);
  font-family: var(--font-mono);
  margin-bottom: 4px;
  line-height: 1.45;
}
.free-wall__cta--history {
  padding-top: 10px;
  padding-bottom: 14px;
  border-top: 1px solid rgba(30,44,63,.65);
}
/* Aviso debajo de la gráfica (free) */
.free-wall-chart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px 12px;
  font-size: 0.7rem;
  color: var(--txt-3);
  font-family: var(--font-mono);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
}
/* Sport/tipster/bookmaker stats: blur filas 2+ cuando usuario es free */
.sport-stats-tbody--free tr:nth-child(n+3),
.tipster-stats-tbody--free tr:nth-child(n+2),
.bookmaker-stats-tbody--free tr:nth-child(n+2),
.cuota-stats-tbody--free tr:nth-child(n+2) {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}
.free-wall-sport {
  background: linear-gradient(to bottom, transparent, var(--bg-card) 30%);
}
.free-wall__cta--sport {
  padding: 10px 16px 16px;
}
/* Inputs bloqueados para free */
.input--locked {
  opacity: 0.55;
  cursor: not-allowed !important;
  pointer-events: none;
}
.filter-field--locked > .field-label::after {
  content: ' 🔒';
  font-size: 0.75em;
}

/* ── Alerta de riesgo de stake (calculadora) ─────────────────────────────── */
.stake-risk-alert {
  font-size: 0.78rem;
  line-height: 1.4;
  padding: 5px 10px;
  border-radius: 4px;
  margin: 6px 22px 0;
}
.stake-risk-alert--aviso  { color: var(--amber); background: var(--amber-glow); }
.stake-risk-alert--alerta { color: #e07820;      background: rgba(224,120,32,0.12); }
.stake-risk-alert--peligro{ color: var(--lose);  background: var(--lose-glow); }
#stake-risk-alert-result  { margin: 6px 0 0; }

.insights-panel {
  display: grid;
  gap: 9px;
  margin: 8px 0 14px;
  padding: 13px 14px;
  border: 1px solid var(--brd);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.insights-header {
  display: grid;
  gap: 4px;
}

.insights-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--txt-1);
  text-transform: uppercase;
}

.insights-copy {
  color: var(--txt-2);
  font-size: 0.7rem;
  line-height: 1.38;
}

[data-theme="light"] .streak-title,
[data-theme="light"] .achievements-title,
[data-theme="light"] .achievement-chip__text,
[data-theme="light"] .streak-val {
  color: #172335;
}

[data-theme="light"] .streak-lbl,
[data-theme="light"] .insights-copy {
  color: #455a77;
}

[data-theme="light"] .insights-title {
  color: #172335;
}

.insights-body.hidden {
  display: none;
}

.insights-summary {
  display: grid;
  gap: 7px;
  padding: 9px 11px;
  border: 1px solid var(--brd);
  border-radius: var(--radius);
  background: var(--bg-2);
}

.insights-summary__grid {
  display: grid;
  gap: 6px;
}

.insights-summary__item {
  display: grid;
  gap: 2px;
}

.insights-summary__label {
  font-size: 0.63rem;
  color: var(--txt-3);
}

.insights-summary__value {
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--txt-1);
}

.insights-summary__item--risk .insights-summary__value {
  color: var(--amber-strong);
}

.insights-summary__item--positive .insights-summary__value {
  color: var(--green);
}

.insights-list {
  display: grid;
  gap: 10px;
}

.insight-section {
  display: grid;
  gap: 6px;
}

.insight-section__title {
  font-family: var(--font-display);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--txt-3);
}

.insight-section__list {
  display: grid;
  gap: 8px;
}

.insight-card {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 10px 12px 11px;
  border-radius: var(--radius);
  border: 1px solid var(--brd);
  background: rgba(255,255,255,0.04);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
  overflow: hidden;
}

.insight-card::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  border-radius: 999px;
  background: var(--brd-hi);
}

:root {
  --insight-orange-border: rgba(232, 160, 32, 0.55);
  --insight-orange-bg: rgba(232, 160, 32, 0.22);
  --insight-orange-ring: rgba(232, 160, 32, 0.16);
  --insight-orange-ring-soft: rgba(232, 160, 32, 0.08);
  --insight-green-border: rgba(34, 208, 122, 0.56);
  --insight-green-bg: rgba(34, 208, 122, 0.22);
  --insight-green-ring: rgba(34, 208, 122, 0.16);
  --insight-green-ring-soft: rgba(34, 208, 122, 0.08);
}

.insight-card--new {
  border-color: rgba(232, 160, 32, 0.58);
  box-shadow: 0 0 0 1px rgba(232, 160, 32, 0.14), inset 0 0 0 1px rgba(255,255,255,0.02);
  will-change: transform, box-shadow, filter;
}

.insight-card--announce {
  animation: insightPulse 1.1s ease-out;
}

.insight-card--info {
  border-color: var(--brd);
  background: var(--bg-2);
}

.insight-card--info::before {
  background: rgba(122, 143, 168, 0.62);
}

.insight-card--success {
  border-color: var(--insight-green-border);
  background: var(--insight-green-bg);
}

.insight-card--success::before {
  background: var(--green);
}

.insight-card--warning {
  border-color: var(--insight-orange-border);
  background: var(--insight-orange-bg);
}

.insight-card--warning::before {
  background: var(--amber);
}

.insight-card--danger {
  border-color: var(--insight-orange-border);
  background: var(--insight-orange-bg);
}

.insight-card--danger::before {
  background: var(--lose);
}

.insight-card--locked {
  overflow: hidden;
}

.insight-card--locked::after {
  display: none;
}

.insight-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.insight-card__meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.insight-card__meta-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.insight-card__kind {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.06);
  color: var(--txt-2);
}

.insight-card__kind-icon {
  font-size: 0.52rem;
  line-height: 1;
}

.insight-card__kind--success {
  color: var(--green);
}

.insight-card__kind--warning {
  color: var(--amber);
}

.insight-card__kind--danger {
  color: var(--lose);
}

.insight-card__context {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 0.54rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--txt-3);
  background: rgba(255,255,255,0.04);
}

.insight-card__top--title {
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
}

.insight-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--brd);
  color: var(--txt-3);
  background: var(--bg-2);
}

.insight-card__badge--new {
  color: var(--amber);
  border-color: rgba(232, 160, 32, 0.34);
  background: rgba(232, 160, 32, 0.12);
}

.insight-card__badge--updated {
  color: var(--green);
  border-color: rgba(34, 208, 122, 0.34);
  background: rgba(34, 208, 122, 0.12);
}

.insight-card__lock {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--amber-dim);
  background: rgba(232,160,32,0.1);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.insight-card__lock:hover {
  filter: brightness(1.04);
}

.insight-card__title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--txt-1);
}

.insight-card--info .insight-card__title,
.insight-card--warning .insight-card__title,
.insight-card--danger .insight-card__title {
  color: var(--amber-strong);
}

.insight-card--info .insight-card__title {
  color: var(--txt-1);
}

.insight-card--success .insight-card__title {
  color: var(--green);
}

.insight-card__message {
  position: relative;
  z-index: 1;
  color: var(--txt-2);
  font-size: 0.76rem;
  line-height: 1.45;
}

.insight-card__message--locked {
  filter: blur(4px);
  user-select: none;
}

.insights-footer {
  display: flex;
  justify-content: center;
}

[data-theme="light"] .insight-card {
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(18, 24, 34, 0.03);
}

[data-theme="light"] .insight-card--info {
  border-color: rgba(18, 24, 34, 0.08);
  background: rgba(18, 24, 34, 0.04);
}

[data-theme="light"] .insight-card--success {
  border-color: var(--insight-green-border);
  background: rgba(34, 208, 122, 0.18);
}

[data-theme="light"] .insight-card--warning {
  border-color: var(--insight-orange-border);
  background: rgba(232, 160, 32, 0.18);
}

[data-theme="light"] .insight-card--danger {
  border-color: var(--insight-orange-border);
  background: rgba(232, 160, 32, 0.18);
}

[data-theme="light"] .insight-card__kind {
  background: rgba(23, 35, 53, 0.05);
  color: #4a607d;
}

[data-theme="light"] .insight-card__kind--success {
  color: #128f53;
}

[data-theme="light"] .insight-card__kind--warning {
  color: #b36f00;
}

[data-theme="light"] .insight-card__kind--danger {
  color: #c23333;
}

[data-theme="light"] .insights-summary {
  background: #f7f9fc;
  border-color: #d4ddea;
}

[data-theme="light"] .insight-section__title,
[data-theme="light"] .insight-card__context,
[data-theme="light"] .insights-summary__label {
  color: #5a7090;
}

@keyframes insightPulse {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 0 0 rgba(0,0,0,0);
    filter: saturate(1);
  }
  28% {
    transform: translateY(-2px) scale(1.008);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 0 0 4px var(--insight-orange-ring);
    filter: saturate(1.08);
  }
  55% {
    transform: translateY(0) scale(1.004);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 0 0 8px var(--insight-orange-ring-soft);
    filter: saturate(1.03);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 0 0 rgba(0,0,0,0);
    filter: saturate(1);
  }
}

.insight-card--success.insight-card--announce {
  animation-name: insightPulseSuccess;
}

@keyframes insightPulseSuccess {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 0 0 rgba(0,0,0,0);
    filter: saturate(1);
  }
  28% {
    transform: translateY(-2px) scale(1.008);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 0 0 4px var(--insight-green-ring);
    filter: saturate(1.08);
  }
  55% {
    transform: translateY(0) scale(1.004);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 0 0 8px var(--insight-green-ring-soft);
    filter: saturate(1.03);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 0 0 rgba(0,0,0,0);
    filter: saturate(1);
  }
}

.insights-cta {
  display: flex;
  justify-content: flex-start;
}

.stake-risk-alert__list {
  display: grid;
  gap: 4px;
}

.stake-risk-alert__item {
  display: block;
}

@media (max-width: 700px) {
  .table-toolbar {
    align-items: flex-start;
    gap: 8px;
  }

  .table-toolbar__left {
    gap: 6px;
    flex-wrap: wrap;
  }

  .table-toolbar .btn-filter-toggle {
    padding: 0 8px;
    min-height: 28px;
    max-width: 126px;
    font-size: 0.62rem;
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .table-toolbar__actions {
    gap: 6px;
  }

  .insights-panel {
    padding: 14px;
  }

  .insight-card {
    padding: 12px 14px;
  }

  .insight-card__top {
    align-items: flex-start;
    flex-direction: column;
  }

  .insight-card__top--title {
    align-items: flex-start;
  }

  .auth-overlay {
    background: var(--bg-0) !important;
    background-image: none !important;
    padding: 0 !important;
    align-items: stretch !important;
    overflow-y: auto !important;
  }

  .auth-overlay__laser,
  .auth-landing__scanline,
  .auth-landing__glow {
    display: none !important;
  }

  .auth-shell {
    width: 100% !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: var(--bg-1) !important;
    overflow: visible !important;
  }

  .auth-shell:not(.auth-shell--form) .auth-landing {
    position: static !important;
    top: auto !important;
    margin-bottom: 0 !important;
    min-height: 100svh !important;
    padding: calc(env(safe-area-inset-top, 0px) + 28px) 20px calc(env(safe-area-inset-bottom, 0px) + 28px) !important;
    border: none !important;
    gap: 18px !important;
  }

  .auth-card {
    width: 100vw !important;
    right: -100vw !important;
    padding: calc(env(safe-area-inset-top, 0px) + 60px) 20px calc(env(safe-area-inset-bottom, 0px) + 24px) !important;
    border-left: none !important;
  }

  .auth-card--open {
    right: 0 !important;
  }
}

@media (max-width: 700px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  body {
    background-image: none !important;
  }

  .header,
  .layout,
  .panel,
  .panel--history,
  main,
  section {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .layout {
    display: block;
    overflow-x: hidden;
  }

  .panel,
  .panel--history {
    overflow-x: hidden;
  }

.header__brand,
.header__articles-link,
.header__news-btn,
.header__bankroll,
.header__kpis,
.header__user {
  min-width: 0;
  max-width: 100%;
}
}

@media (max-width: 380px) {
  .header__kpis {
    display: flex;
  }

  .tablero-popup {
    right: 10px;
    width: calc(100vw - 20px);
  }

  .tablero-popup .streak-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ═══════════════════════════════════════════════════════════════════
   CALENDARIO DE BENEFICIOS MENSUAL
   ═══════════════════════════════════════════════════════════════════ */

.btn-calendar-toggle {
  background: transparent;
  border: 1px solid var(--amber);
  color: var(--txt-2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn-calendar-toggle:hover { color: var(--txt-1); border-color: var(--txt-2); }
.btn-calendar-toggle.active {
  background: var(--amber);
  border-color: var(--amber);
  color: #07090d;
  font-weight: 700;
}

/* Panel principal */
.calendar-panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
}
.calendar-panel.hidden { display: none; }

/* Barra de título */
.calendar-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px 11px;
  border-bottom: 1px solid var(--border);
}
.calendar-panel-title {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--txt-1);
}
.calendar-close-btn {
  background: none;
  border: none;
  color: var(--txt-3);
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  cursor: pointer;
  transition: color .15s;
}
.calendar-close-btn:hover { color: var(--txt-1); }

/* Cabecera de navegación */
.calendar-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 16px 9px;
}
.calendar-nav {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--txt-2);
  font-size: 1.2rem;
  line-height: 1;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, color .15s;
}
.calendar-nav:hover { border-color: var(--amber); color: var(--amber); }

.calendar-title-pill {
  flex: 1;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--txt-1);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  text-transform: capitalize;
}

.calendar-today-btn {
  flex-shrink: 0;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--txt-2);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 500;
  padding: 5px 13px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
  white-space: nowrap;
}
.calendar-today-btn:hover { border-color: var(--amber); color: var(--amber); }

/* Zona del grid */
.calendar-grid-wrap {
  padding: 0 14px 4px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 6px;
}

.cal-dow {
  text-align: center;
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--txt-3);
  padding: 2px 0 6px;
}

.cal-day {
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 5px 2px;
  gap: 3px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--txt-3);
  position: relative;
  cursor: default;
}

.cal-day--other {
  opacity: .3;
}

.cal-day--active {
  cursor: pointer;
  color: var(--txt-1);
  transition: transform .1s;
}
.cal-day--active:hover { transform: scale(1.07); z-index: 1; }

.cal-day--win     { background: color-mix(in srgb, var(--win)  20%, transparent); }
.cal-day--lose    { background: color-mix(in srgb, var(--lose) 22%, transparent); }
.cal-day--neutral { background: color-mix(in srgb, var(--txt-3) 12%, transparent); }

.cal-day--today {
  outline: 2px solid var(--amber);
  outline-offset: -1px;
}

.cal-day--selected {
  outline: 2px solid var(--txt-1);
  outline-offset: -1px;
}
.cal-day--selected.cal-day--win  { background: color-mix(in srgb, var(--win)  45%, transparent); }
.cal-day--selected.cal-day--lose { background: color-mix(in srgb, var(--lose) 45%, transparent); }

.cal-day__num {
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1;
}

.cal-day__pnl {
  font-size: 0.60rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .01em;
}
.cal-day--win  .cal-day__pnl { color: var(--win); }
.cal-day--lose .cal-day__pnl { color: var(--lose); }
.cal-day--neutral .cal-day__pnl { color: var(--txt-2); }

/* Footer con tarjetas de métricas */
.calendar-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 14px 14px;
}
.cal-footer-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cal-footer-card__lbl {
  font-size: 0.65rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--txt-3);
}
.cal-footer-card__val {
  font-size: 1.20rem;
  font-weight: 700;
  color: var(--txt-1);
  line-height: 1;
}
.cal-footer-card__val.win  { color: var(--win); }
.cal-footer-card__val.lose { color: var(--lose); }
.cal-footer-card__val--blue { color: var(--txt-1); }

/* Tooltip del calendario */
.cal-tooltip {
  position: fixed;
  z-index: 2000;
  display: none;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  min-width: 130px;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s ease;
}
.cal-tooltip--visible { opacity: 1; }

.cal-tooltip__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.76rem;
  padding: 2px 0;
  color: var(--txt-2);
}
.cal-tooltip__row strong            { color: var(--txt-1); font-weight: 600; }
.cal-tooltip__row--win              { color: var(--win); }
.cal-tooltip__row--win strong       { color: var(--win); }
.cal-tooltip__row--lose             { color: var(--lose); }
.cal-tooltip__row--lose strong      { color: var(--lose); }
.cal-tooltip__row--pnl              { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--border); }

@media (max-width: 600px) {
  .calendar-grid-wrap { padding: 0 10px 4px; }
  .calendar-grid      { gap: 1px; padding: 6px 4px; }
  .cal-day            { min-height: 44px; border-radius: 4px; }
  .cal-day__num       { font-size: 0.74rem; }
  .cal-day__pnl       { font-size: 0.54rem; }
  .cal-dow            { font-size: 0.58rem; }
  .calendar-footer    { padding: 10px 10px 12px; gap: 8px; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   TABLA — Rajdhani en columnas numéricas
   ───────────────────────────────────────────────────────────────────────────── */
.td-odds, .td-stake, .td-pnl, .td-bankroll {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
}
.td-odds  { color: var(--amber); }
.td-bankroll { color: var(--txt-2); font-weight: 500; }

/* ─────────────────────────────────────────────────────────────────────────────
   BOOKIE PILL — logo de casa de apuestas
   ───────────────────────────────────────────────────────────────────────────── */
.bookie-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
  max-width: 110px;
  overflow: hidden;
}
.bookie-pill--text-only {
  padding-left: 8px;
}
.bookie-pill--sm {
  padding: 1px 5px;
  gap: 3px;
  max-width: 96px;
}
.grp-bet__left .bookie-pill--sm {
  max-width: 126px;
}
.bookie-pill__icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 2px;
  flex-shrink: 0;
}
.bookie-pill--sm .bookie-pill__icon { width: 18px; height: 18px; }
.bookie-pill__name {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--txt-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}
.bookie-pill--sm .bookie-pill__name { font-size: 0.64rem; }
/* In table cells */
.td-bookmaker .bookie-pill { max-width: 120px; }

/* ─────────────────────────────────────────────────────────────────────────────
   VISTA AGRUPADA — grouped history view
   ───────────────────────────────────────────────────────────────────────────── */

/* Toggle button */
.btn-vista-toggle { font-size: 0.72rem; letter-spacing: 0.04em; }

/* ── Container ── */
.hist-grouped {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 0 20px;
}

/* ── Month block ── */
.grp-month {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ── Week block ── */
.grp-week { border-top: 1px solid var(--border); }
.grp-week:first-child { border-top: none; }

/* ── Day block ── */
.grp-day { border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent); }
.grp-day:first-child { border-top: none; }

/* ── Generic header row ── */
.grp-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  user-select: none;
}
.grp-toggle { cursor: pointer; }
.grp-toggle:hover { background: color-mix(in srgb, var(--amber) 6%, transparent); }

/* Month: prominent accent */
.grp-hdr--month {
  height: 44px;
  background: color-mix(in srgb, var(--bg-2) 90%, var(--amber) 10%);
  border-left: 3px solid var(--amber);
}
/* Week */
.grp-hdr--week {
  height: 36px;
  background: color-mix(in srgb, var(--bg-2) 60%, transparent);
  padding-left: 20px;
}
/* Day */
.grp-hdr--day {
  height: 30px;
  padding-left: 26px;
  background: none;
}

/* Arrow */
.grp-arrow {
  display: inline-block;
  font-size: 0.60rem;
  color: var(--txt-3);
  transition: transform 0.15s ease;
  flex-shrink: 0;
  width: 10px;
}
.grp-arrow.open { transform: rotate(90deg); }

/* Header text */
.grp-hdr__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--txt-1);
  flex: 1;
  letter-spacing: 0.01em;
}
.grp-hdr--week .grp-hdr__name { font-size: 0.82rem; font-weight: 600; color: var(--txt-2); }
.grp-hdr--day  .grp-hdr__name { font-size: 0.78rem; font-weight: 500; color: var(--txt-2); }
.grp-hdr__count {
  font-size: 0.70rem;
  color: var(--txt-3);
  flex-shrink: 0;
  margin-right: 4px;
}

/* P&L on headers */
.grp-pnl {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 72px;
  text-align: right;
}
.grp-hdr--week .grp-pnl { font-size: 0.84rem; }
.grp-hdr--day  .grp-pnl { font-size: 0.80rem; }
.grp-pnl--win  { color: var(--win); }
.grp-pnl--lose { color: var(--lose); }

/* Collapsible body */
.grp-body { display: flex; flex-direction: column; }
.grp-body.hidden { display: none; }

/* Day bets container — fondo opaco para que el rayado no componga sobre capas variables (móvil) */
.grp-day-bets {
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
}

/* ───────────────────────────────────────────────────────
   BET CARD
   grid: bar(3px) | left(auto) | info(1fr) | nums(auto) | badge(auto)
   ─────────────────────────────────────────────────────── */
.grp-bet {
  display: grid;
  grid-template-columns: 3px 134px minmax(260px, 1.75fr) minmax(286px, 0.98fr) 128px;
  align-items: center;
  gap: 0 14px;
  padding: 11px 14px;
  border-top: 1px solid color-mix(in srgb, var(--border) 35%, transparent);
  position: relative;
  transition: background 0.1s;
}
.grp-bet:first-child { border-top: none; }
.grp-bet--clickable { cursor: pointer; }
.grp-bet--clickable:hover { background: var(--bg-3); }
.grp-bet--adj { opacity: 0.82; }
/* Rayado oscuro: tono intermedio entre bg-1 y bg-3 para distinción visible en tema oscuro */
.grp-day-bets .grp-bet:nth-child(even) {
  background: var(--bg-2);
}
/* Tema claro explícito */
[data-theme=”light”] .grp-day-bets .grp-bet:nth-child(even) {
  background: color-mix(in srgb, #d8e1ec 78%, var(--bg-1) 22%);
}
/* Modo auto + preferencia del sistema en claro */
@media (prefers-color-scheme: light) {
  html:not([data-theme=”dark”]):not([data-theme=”light”]) .grp-day-bets .grp-bet:nth-child(even) {
    background: color-mix(in srgb, #d8e1ec 78%, var(--bg-1) 22%);
  }
}

/* Left bar */
.grp-bet__bar {
  width: 3px;
  align-self: stretch;
  border-radius: 2px;
}
.grp-bet__bar--win       { background: var(--win); }
.grp-bet__bar--lose      { background: var(--lose); }
.grp-bet__bar--pending   { background: var(--amber); }
.grp-bet__bar--void      { background: var(--txt-3); }
.grp-bet__bar--place     { background: var(--amber); }
.grp-bet__bar--half_win  { background: color-mix(in srgb, var(--win) 60%, transparent); }
.grp-bet__bar--half_lose { background: color-mix(in srgb, var(--lose) 60%, transparent); }
.grp-bet__bar--adj       { background: var(--amber); opacity: 0.5; }

/* Left section: time + bookie */
.grp-bet__left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  width: 134px;
  flex-shrink: 0;
}
.grp-bet__time {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  color: var(--txt-3);
  line-height: 1;
  white-space: nowrap;
}

/* Info section */
.grp-bet__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  justify-content: center;
  padding-right: 12px;
}
.grp-bet--clickable:hover .grp-bet__actions,
.grp-bet--editing .grp-bet__actions { opacity: 1; }
.grp-bet--adj .grp-bet__actions { opacity: 1; margin-top: 0; }
/* Top row: sport tag + badges */
.grp-bet__sport-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex-wrap: wrap;
  row-gap: 4px;
}
.grp-bet__sport {
  font-size: 0.63rem;
  font-weight: 700;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.grp-bet__sport.hist-sport {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}
/* Middle row: description — full width, prominent */
.grp-bet__desc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.grp-bet__desc {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--txt-1);
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.grp-bet__desc .hist-desc {
  display: inline;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
/* Bottom row: tipster */
.grp-bet__tipster-row { display: flex; align-items: center; min-width: 0; }
.grp-bet__tipster {
  font-size: 0.68rem;
  color: var(--txt-3);
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.grp-bet__edit-grid {
  display: grid;
  grid-template-columns: minmax(130px, 0.9fr) minmax(0, 1.4fr);
  gap: 8px;
}
.grp-bet__edit-grid .grp-edit-desc {
  grid-column: 1 / -1;
}

/* Numeric section */
.grp-bet__nums {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  width: 100%;
  justify-self: center;
  justify-content: center;
  min-width: 0;
  max-width: 312px;
}
.grp-bet__num-pair {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 10px;
  border-left: 1px solid var(--border);
  min-width: 68px;
  flex: 1 1 68px;
}
.grp-bet__num-pair:first-child { border-left: none; }
.grp-bet__num-pair:last-child {
  min-width: 118px;
  flex-basis: 118px;
}
.grp-bet__num-lbl {
  font-size: 0.59rem;
  color: var(--txt-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}
.grp-bet__odds {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--txt-2);
  line-height: 1;
  white-space: nowrap;
}
.grp-bet__stake {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--txt-2);
  line-height: 1;
  white-space: nowrap;
}
.grp-bet__pnl {
  font-family: var(--font-display);
  font-size: 1.10rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

/* Badge */
.grp-bet__badge {
  flex-shrink: 0;
  width: 128px;
  padding-left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.grp-bet__badge--editing {
  min-width: 132px;
}
.grp-bet__badge--editing .input {
  min-width: 120px;
}
.grp-bet .badge-result {
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 0.66rem;
  white-space: nowrap;
}

/* Actions — absolute, fade over badge on hover */
.grp-bet__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s;
  margin-top: 6px;
}
.grp-bet__actions--meta {
  margin-top: 0;
  opacity: 0;
  flex-shrink: 0;
  align-self: center;
}
.grp-bet__actions .btn {
  min-width: 28px;
  width: 28px;
  height: 28px;
  padding: 0;
}
.grp-bet__actions--inline .btn {
  width: auto;
  min-width: 28px;
  padding: 0 10px;
}
.grp-bet__actions--inline .grp-edit-save,
.grp-bet__actions--inline .grp-edit-cancel {
  height: 30px;
}
.grp-bet__nums--editing .input {
  width: 78px;
  text-align: right;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .grp-hdr--month { height: 38px; padding: 0 10px 0 12px; }
  .grp-hdr--week  { height: 30px; padding-left: 14px; }
  .grp-hdr--day   { height: 26px; padding-left: 18px; }
  .grp-bet {
    gap: 6px 10px;
    padding: 10px;
    grid-template-columns: 3px 72px minmax(0, 1fr);
    grid-template-areas:
      "bar left info"
      "bar left nums"
      "bar left badge";
    align-items: start;
  }
  .grp-bet__bar { grid-area: bar; }
  .grp-bet__left  {
    grid-area: left;
    width: 72px;
    align-self: start;
  }
  .grp-bet__left .bookie-pill--sm {
    max-width: 72px;
  }
  .grp-bet__info {
    grid-area: info;
    padding-right: 0;
  }
  .grp-bet__nums {
    grid-area: nums;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .grp-bet__num-pair {
    padding: 0;
    min-width: 0;
    border-left: none;
    align-items: flex-start;
  }
  .grp-bet__odds, .grp-bet__stake { font-size: 0.90rem; }
  .grp-bet__pnl   { font-size: 0.95rem; }
  .grp-bet__badge {
    grid-area: badge;
    padding-left: 0;
    justify-self: start;
  }
  .grp-bet__edit-grid { grid-template-columns: 1fr; }
  .grp-bet__actions { opacity: 1; flex-wrap: wrap; margin-top: 8px; }
  .grp-bet__actions--meta {
    flex-wrap: nowrap;
    margin-top: 0;
    align-self: flex-start;
    opacity: 1;
  }
  .grp-bet__actions .btn { min-width: 26px; width: 26px; height: 26px; }
  .grp-bet__actions--inline .btn { width: auto; min-width: 26px; }
  .grp-bet__badge--editing,
  .grp-bet__badge--editing .input {
    min-width: 0;
    width: 100%;
  }
  .grp-bet__nums--editing .input {
    width: 100%;
  }
}

/* Solo móvil: en Auto + sistema oscuro, usar tonos oscuros en vista agrupada y resultados */
@media (max-width: 700px) and (prefers-color-scheme: dark) {
  html:not([data-theme="dark"]):not([data-theme="light"]) .grp-day-bets .grp-bet:nth-child(even) {
    background: var(--bg-2);
  }

  html:not([data-theme="dark"]):not([data-theme="light"]) .badge-result--win     { background: var(--win-dim);  color: var(--win);   border-color: var(--win-dim); }
  html:not([data-theme="dark"]):not([data-theme="light"]) .badge-result--half-win { background: rgba(34, 208, 122, 0.12); color: var(--win); border-color: rgba(34, 208, 122, 0.22); }
  html:not([data-theme="dark"]):not([data-theme="light"]) .badge-result--lose    { background: var(--lose-dim); color: var(--lose);  border-color: var(--lose-dim); }
  html:not([data-theme="dark"]):not([data-theme="light"]) .badge-result--half-lose { background: rgba(240, 69, 69, 0.12); color: #ff8d8d; border-color: rgba(240, 69, 69, 0.22); }
  html:not([data-theme="dark"]):not([data-theme="light"]) .badge-result--pending { background: var(--bg-3);     color: var(--amber); border-color: var(--amber-dim); }
  html:not([data-theme="dark"]):not([data-theme="light"]) .badge-result--void    { background: var(--bg-3);     color: var(--txt-2); border-color: var(--brd-hi); }
  html:not([data-theme="dark"]):not([data-theme="light"]) .badge-result--place   { background: var(--amber-dim); color: var(--amber); border-color: var(--amber-dim); }
  html:not([data-theme="dark"]):not([data-theme="light"]) .badge-result--cashout { background: rgba(96, 165, 250, 0.12); color: #7ec2ff; border-color: rgba(96, 165, 250, 0.25); }
  html:not([data-theme="dark"]):not([data-theme="light"]) .badge-result--adjustment { background: var(--amber-dim); color: var(--amber); border-color: var(--amber-dim); }

  html:not([data-theme="dark"]):not([data-theme="light"]) .pending-resolve-popover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
  }
  html:not([data-theme="dark"]):not([data-theme="light"]) .pending-resolver__option--win {
    background: rgba(87, 199, 143, 0.18);
    color: #57c78f;
    border-color: rgba(87, 199, 143, 0.28);
  }
  html:not([data-theme="dark"]):not([data-theme="light"]) .pending-resolver__option--lose {
    background: rgba(240, 69, 69, 0.16);
    color: #ff7777;
    border-color: rgba(240, 69, 69, 0.28);
  }
  html:not([data-theme="dark"]):not([data-theme="light"]) .pending-resolver__option--void {
    background: rgba(107, 124, 146, 0.16);
    color: var(--txt-2);
    border-color: rgba(107, 124, 146, 0.28);
  }
  html:not([data-theme="dark"]):not([data-theme="light"]) .pending-resolver__option--place {
    background: rgba(232, 160, 32, 0.18);
    color: #ffca6a;
    border-color: rgba(232, 160, 32, 0.3);
  }
  html:not([data-theme="dark"]):not([data-theme="light"]) .pending-resolver__option--half-win {
    background: rgba(87, 199, 143, 0.14);
    color: #7ce8b1;
    border-color: rgba(87, 199, 143, 0.24);
  }
  html:not([data-theme="dark"]):not([data-theme="light"]) .pending-resolver__option--half-lose {
    background: rgba(240, 69, 69, 0.12);
    color: #ff8d8d;
    border-color: rgba(240, 69, 69, 0.24);
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   ANALYZER PAGE
   ───────────────────────────────────────────────────────────────────────────── */
.analyzer-header {
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 18px;
}
.analyzer-page {
  --border: var(--brd);
  --analyzer-text-main: var(--txt-1);
  --analyzer-text-muted: #a6b6c8;
  --analyzer-text-soft: #7d91a8;
  background: var(--bg-0);
  background-image: none;
}
[data-theme="light"] .analyzer-page {
  --analyzer-text-main: var(--txt-1);
  --analyzer-text-muted: #617286;
  --analyzer-text-soft: #7b8a9b;
}
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]):not([data-theme="light"]) .analyzer-page {
    --analyzer-text-main: var(--txt-1);
    --analyzer-text-muted: #617286;
    --analyzer-text-soft: #7b8a9b;
  }
}
.analyzer-header .header__brand {
  color: inherit;
  text-decoration: none;
}
.analyzer-header .header__brand:visited,
.analyzer-header .header__brand:hover,
.analyzer-header .header__brand:focus-visible {
  text-decoration: none;
}
.analyzer-header .header__logo {
  color: var(--amber);
}
.analyzer-header .header__name {
  color: var(--analyzer-text-main);
}
.analyzer-header .header__name strong {
  color: var(--amber);
}
.analyzer-page-title {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.12em;
  margin-left: 4px;
}
.analyzer-back-btn {
  margin-left: auto;
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.analyzer-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 28px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: var(--analyzer-text-main);
}

/* Filter bar */
.analyzer-filters {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.analyzer-filters__group { display: flex; flex-direction: column; gap: 4px; }
.analyzer-page .analyzer-filters .field-label,
.analyzer-page .az-card__title,
.analyzer-page .az-tab,
.analyzer-page .az-table thead th {
  color: var(--analyzer-text-muted);
}
.analyzer-page .az-tab:hover,
.analyzer-page .az-tab--active {
  color: var(--amber);
}
.analyzer-page .az-table tbody td,
.analyzer-page .az-kpi__val,
.analyzer-page .analyzer-page-title,
.analyzer-page .az-scope-banner,
.analyzer-page .analyzer-back-btn {
  color: var(--analyzer-text-main);
}
.analyzer-page .input,
.analyzer-page .input--select,
.analyzer-page input[type="date"] {
  color: var(--analyzer-text-muted);
}
.analyzer-page .input::placeholder {
  color: var(--analyzer-text-soft);
}
.analyzer-filters__summary {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--analyzer-text-muted);
  align-self: center;
  font-family: var(--font-mono);
}
.az-scope-banner {
  padding: 10px 20px;
  background: color-mix(in srgb, var(--amber) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: var(--txt-2);
  line-height: 1.5;
}
.az-scope-banner.hidden { display: none; }

/* Tab nav */
.az-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.az-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 10px 18px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--txt-3);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
.az-tab__lock {
  font-size: 0.7rem;
  opacity: 0.8;
}
.az-tab:hover { color: var(--txt-1); }
.az-tab--active { color: var(--amber); border-bottom-color: var(--amber); }
.az-tab--locked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.analyzer-page .az-tab:hover {
  color: var(--analyzer-text-main);
}

/* Panels */
.az-panel { display: none; flex-direction: column; gap: 20px; }
.az-panel--active { display: flex; }

.az-demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  background: linear-gradient(90deg, rgba(232,160,32,0.12), rgba(232,160,32,0.04));
  border: 1px solid rgba(232,160,32,0.28);
  border-radius: var(--radius);
}
.az-demo-banner__copy {
  display: grid;
  gap: 6px;
}
.az-demo-banner__eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
}
.az-demo-banner__title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--txt-1);
}
.az-demo-banner__text {
  margin: 0;
  max-width: 68ch;
  color: var(--txt-2);
  line-height: 1.45;
}
.az-demo-banner__cta {
  flex-shrink: 0;
}

.az-locked-card {
  align-items: flex-start;
  gap: 14px;
  max-width: 760px;
}
.az-locked-card__eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
}
.az-locked-card__title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--txt-1);
}
.az-locked-card__copy {
  margin: 0;
  max-width: 62ch;
  color: var(--txt-2);
  line-height: 1.5;
}
.az-locked-card__list {
  margin: 0;
  padding-left: 18px;
  color: var(--txt-2);
  display: grid;
  gap: 6px;
}
.az-locked-card__cta {
  margin-top: 4px;
}

.az-panel__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.az-card--wide { grid-column: 1 / -1; }

/* Cards */
.az-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.az-card__title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--txt-2);
}

/* Chart areas */
.az-chart-wrap {
  height: 260px;
  position: relative;
}
.az-chart-wrap--donut { height: 240px; }

/* KPI grid (general tab) */
.az-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.az-tooltip {
  position: fixed;
  z-index: 9999;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.75rem;
  color: var(--txt-2);
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  max-width: 260px;
  word-wrap: break-word;
}
.az-tooltip--visible { opacity: 1; }
.az-kpi {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px;
  background: var(--bg-3);
  border-radius: 6px;
  border: 1px solid var(--border);
}
.az-kpi__val {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--txt-1);
  line-height: 1;
}
.az-kpi__lbl {
  font-size: 0.64rem;
  color: var(--analyzer-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 4px;
}
.az-kpi__hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  font-size: 0.58rem;
  color: var(--txt-3);
  cursor: help;
}

/* Tables */
.az-table-wrap { overflow-x: auto; }
.az-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  table-layout: fixed;
}
.az-table thead th {
  padding: 8px 12px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--analyzer-text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.az-table thead th.az-num,
.az-table tbody td.az-num {
  text-align: right;
}
.az-table thead th .az-kpi__hint {
  margin-left: 6px;
  vertical-align: middle;
}
.az-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  color: var(--analyzer-text-main);
  font-family: var(--font-display);
}
.az-table tbody tr:last-child td { border-bottom: none; }
.az-table tbody tr:hover td { background: var(--bg-3); }
.az-num { font-weight: 600; }

/* Responsive */
@media (max-width: 900px) {
  .az-panel__row { grid-template-columns: 1fr; }
  .analyzer-main { padding: 16px; }
  .az-tabs { overflow-x: auto; }
  .az-tab { padding: 8px 12px; font-size: 0.75rem; }
  .az-demo-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .az-demo-banner__cta {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .analyzer-main {
    padding: 12px;
    gap: 14px;
  }
  .analyzer-filters {
    gap: 10px;
    padding: 12px;
  }
  .analyzer-filters__group {
    flex: 1 1 calc(50% - 6px);
    min-width: calc(50% - 6px);
  }
  .analyzer-filters__summary {
    width: 100%;
    margin-left: 0;
    font-size: 0.72rem;
    align-self: flex-start;
  }
  .az-tabs {
    gap: 6px;
    padding-bottom: 2px;
  }
  .az-tab {
    padding: 8px 10px;
    font-size: 0.7rem;
    white-space: nowrap;
  }
  .az-card {
    padding: 14px;
    gap: 12px;
  }
  .az-card__title {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }
  .az-chart-wrap {
    height: 220px;
  }
  .az-chart-wrap--donut {
    height: 210px;
  }
  .az-kpi-grid {
    gap: 10px;
  }
  .az-kpi {
    padding: 10px 12px;
    gap: 4px;
  }
  .az-kpi__val {
    font-size: 1.12rem;
  }
  .az-kpi__lbl {
    font-size: 0.58rem;
    line-height: 1.35;
  }
  .az-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .az-table {
    min-width: 640px;
    table-layout: auto;
    font-size: 0.78rem;
  }
  .az-table thead th {
    padding: 7px 10px;
    font-size: 0.63rem;
  }
  .az-table tbody td {
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .analyzer-filters__group {
    flex-basis: 100%;
    min-width: 100%;
  }
  .az-kpi {
    padding: 9px 10px;
  }
  .az-kpi__val {
    font-size: 1.02rem;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   LANDING — Planes / CTA / Footer  (prefijo lp-)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Planes */
.lp-plans {
  padding: 48px 0 8px;
  text-align: center;
}
.lp-plans__eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--amber);
  margin-bottom: 10px;
}
.lp-plans__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--txt-1);
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}
.lp-plans__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: left;
}
.lp-plan {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--brd);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: border-color 0.2s;
}
.lp-plan--pro {
  border-color: var(--amber);
  background: linear-gradient(160deg, rgba(232,160,32,0.07) 0%, var(--bg-1) 60%);
}
.lp-plan__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--amber);
  color: var(--bg-0);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 4px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.lp-plan__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--txt-1);
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 8px;
}
.lp-plan__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}
.lp-plan__amount {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--txt-1);
  line-height: 1;
}
.lp-plan--pro .lp-plan__amount { color: var(--amber); }
.lp-plan__period {
  font-size: 0.75rem;
  color: var(--txt-3);
}
.lp-plan__desc {
  font-size: 0.75rem;
  color: var(--txt-3);
  line-height: 1.5;
}
.lp-plan__subnote {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--amber);
}

.lp-plan__subnote--muted {
  color: var(--txt-3);
}
.lp-plan__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  font-size: 0.78rem;
  color: var(--txt-2);
}
.lp-plan__features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}
.lp-feat-icon {
  color: var(--txt-3);
  font-size: 0.7rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.lp-feat-icon--pro { color: var(--amber); }
.lp-plan__btn {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.18s, transform 0.15s, border-color 0.18s;
}
.lp-plan__btn--free {
  background: transparent;
  border: 1px solid var(--brd-hi);
  color: var(--txt-2);
}
.lp-plan__btn--free:hover {
  border-color: var(--amber);
  color: var(--amber);
}
.lp-plan__btn--pro {
  background: var(--amber);
  border: 1px solid var(--amber);
  color: var(--bg-0);
}
.lp-plan__btn--pro:hover {
  background: #f5b340;
  transform: translateY(-1px);
}

/* CTA final */
.lp-cta {
  background: linear-gradient(135deg, rgba(232,160,32,0.10) 0%, rgba(232,160,32,0.03) 100%);
  border: 1px solid rgba(232,160,32,0.25);
  border-radius: var(--radius-lg);
  padding: 52px 32px;
  text-align: center;
}
.lp-cta__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 700;
  color: var(--txt-1);
  line-height: 1.25;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}
.lp-cta__sub {
  font-size: 0.82rem;
  color: var(--txt-3);
  margin-bottom: 28px;
  letter-spacing: 0.04em;
}
.lp-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  background: var(--amber);
  border: none;
  border-radius: var(--radius);
  color: var(--bg-0);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.18s, transform 0.15s;
}
.lp-cta__btn:hover {
  background: #f5b340;
  transform: translateY(-2px);
}

.lp-cta__trust {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 16px;
}

.lp-cta__trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--txt-2);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lp-cta__trust-item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(232,160,32,0.88);
  box-shadow: 0 0 12px rgba(232,160,32,0.22);
}

/* Footer */
.lp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 0 8px;
  border-top: 1px solid var(--brd);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--txt-3);
}
.lp-footer__nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.lp-footer__nav a {
  color: var(--txt-3);
  text-decoration: none;
  transition: color 0.15s;
}
.lp-footer__nav a:hover { color: var(--amber); }

/* Responsive */
@media (max-width: 600px) {
  .lp-plans__grid {
    grid-template-columns: 1fr;
  }
  .lp-cta {
    padding: 36px 20px;
  }

  .lp-cta__trust {
    gap: 8px 12px;
  }

  .lp-cta__trust-item {
    font-size: 0.62rem;
  }

  .lp-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ── NAVBAR LANDING ──────────────────────────────────────────────────────── */
.lp-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(13, 13, 13, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.lp-nav--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lp-nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 0;
}

.lp-nav__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-right: 32px;
  text-decoration: none;
}

.lp-nav__logo {
  color: var(--amber);
  font-size: 1.2rem;
  line-height: 1;
}

.lp-nav__name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--txt-1);
}

.lp-nav__links {
  display: flex;
  list-style: none;
  gap: 2px;
  margin: 0;
  padding: 0;
  flex: 1;
}

.lp-nav__link {
  font-size: 0.82rem;
  color: var(--txt-2);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.lp-nav__link:hover {
  color: var(--txt-1);
  background: rgba(255, 255, 255, 0.06);
}

.lp-nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lp-nav__btn {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 7px 16px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lp-nav__btn--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--txt-1);
}

.lp-nav__btn--ghost:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.lp-nav__btn--primary {
  background: var(--amber);
  border: 1px solid var(--amber);
  color: #07090d;
}

.lp-nav__btn--primary:hover {
  filter: brightness(1.08);
}

@media (max-width: 768px) {
  .lp-nav__links {
    display: none;
  }
  .lp-nav__inner {
    justify-content: space-between;
  }
  .lp-nav__brand {
    margin-right: 0;
  }
}

@media (max-width: 420px) {
  .lp-nav__btn--ghost {
    display: none;
  }
}
