/* ═══════════════════════════════════════════════════════════
   ReplicatorNT — capa pro (panel clásico)
   Refuerza jerarquía visual sin romper el markup existente.
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #09090b;
  --bg-soft: #0c0c0f;
  --card: #18181b;
  --card-2: #1c1c20;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.40), 0 4px 6px -4px rgba(0, 0, 0, 0.40);
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: "Inter", "Segoe UI", system-ui, sans-serif;
}

body {
  font-family: var(--font);
  letter-spacing: -0.011em;
}

.page-head h1,
.hero-title,
.brand-name,
.brandmark-text,
.landing-title {
  font-family: var(--font-display);
  font-weight: 600;
}

/* ── Shell / secciones ─────────────────────────────────── */
.topbar {
  backdrop-filter: blur(16px);
  background: rgba(9, 9, 11, 0.86);
  border-bottom: 1px solid var(--border);
}

.page-head {
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.page-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.35rem;
}
.page-head h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  letter-spacing: -0.03em;
  font-weight: 600;
}

.dash-tabs {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  gap: 2px;
  max-width: fit-content;
}
.dash-tabs button {
  border-radius: 8px !important;
  border: none !important;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}
.dash-tabs button.active,
.dash-tabs button[aria-selected="true"] {
  background: var(--accent) !important;
  color: #fff !important;
  box-shadow: none;
}
.dash-tabs button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}
.dash-tabs button.active:hover,
.dash-tabs button[aria-selected="true"]:hover {
  background: var(--accent-hover, #4338ca) !important;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.card-head h2 {
  font-family: var(--font);
  letter-spacing: -0.02em;
  font-weight: 600;
}

/* ── Tienda de licencias (compacta, con perks visibles) ─ */
.license-store {
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: start;
}

.license-product-card {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 1.1rem 1.05rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  min-height: 0;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}
.license-product-card.featured {
  border-color: rgba(var(--accent-rgb), 0.28);
  box-shadow: var(--shadow);
}
.license-product-card .product-icon {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.2rem;
  border-radius: 10px;
  background: var(--bg-soft);
  border-color: var(--border);
  margin-bottom: 0.55rem;
}
.license-product-card h4 {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.license-product-card .product-desc {
  min-height: 0;
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

.product-price-panel {
  margin: 0 0 0.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
}
.product-price { margin: 0; align-items: baseline; gap: 0.35rem; }
.price-now {
  font-family: var(--mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: var(--text);
}
.price-period { font-size: 0.78rem; color: var(--muted); }
.product-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 0.55rem;
}
.product-meta-chip {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255,255,255,0.02);
}
.product-meta-chip.ok {
  color: var(--ok);
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
}

.plan-perks {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: grid;
  gap: 0.2rem;
  flex: 1;
}
.plan-perks li {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.1rem 0;
  line-height: 1.35;
}
.license-product-actions {
  margin-top: auto;
  padding-top: 0.15rem;
}
.license-product-actions .btn-buy {
  font-weight: 600;
  letter-spacing: -0.01em;
}
.license-product-actions .btn-trial {
  font-weight: 500;
}
.license-trial-used {
  margin-top: 0.45rem;
  font-size: 0.72rem;
  line-height: 1.35;
}

/* ── Mis canales (filas → tarjetas) ─────────────────────── */
#channel-list.channel-rows {
  gap: 0.75rem;
}
.channel-row {
  align-items: stretch;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
}
.channel-row-main { gap: 0.35rem; justify-content: center; }
.channel-row-title strong {
  font-family: var(--font);
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.channel-row .ch-id {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  width: fit-content;
}
.channel-price-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.2rem;
}
.channel-price-chip {
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid rgba(var(--accent2-rgb), 0.35);
  color: var(--accent-2);
  background: rgba(var(--accent2-rgb), 0.08);
}
.channel-row-actions {
  align-content: center;
  gap: 0.25rem;
}
.channel-row-actions button {
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.channel-icon-btn {
  box-shadow: none;
  filter: none;
}

/* ── Directorio público (tipografía sobria, densidades claras) ── */
.pub-card {
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
}
.pub-card:hover {
  border-color: var(--border-strong);
}
.pub-name {
  font-family: var(--font) !important;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.pub-card-hero {
  padding: 0.1rem 0;
}
.pub-roi-value {
  font-family: var(--mono, "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace) !important;
  font-size: clamp(1.7rem, 2.4vw, 2.05rem) !important;
  font-weight: 500 !important;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  text-shadow: none;
}
.pub-roi-label,
.pub-capital-note {
  font-family: var(--font);
  font-weight: 500;
}
.pub-stats-row {
  background: none;
  border-radius: 0;
  border: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 0;
  margin: 0.1rem 0;
}
.pub-stat strong {
  font-family: var(--mono, "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace);
  font-size: 0.86rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.pub-card-foot button:not(.btn-secondary) {
  font-weight: 600;
}
.pub-chip {
  background: rgba(var(--accent2-rgb), 0.1);
  border: 1px solid rgba(var(--accent2-rgb), 0.3);
  color: var(--accent-2);
  font-family: var(--font);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
}

/* ── Ficha de canal ────────────────────────────────────── */
#channel-profile-page .page-head,
#channel-profile-page .log-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.9rem;
  margin-bottom: 1.1rem;
}
.profile-kpis { gap: 0.85rem; }
.kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 0.95rem;
  min-height: 4.5rem;
  box-shadow: var(--shadow);
}
.kpi.big {
  background: var(--card);
  border-color: var(--border);
}
.kpi.big strong {
  font-family: var(--mono, "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace);
  font-size: 1.7rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.profile-cta-row button {
  font-weight: 600;
  padding: 0 1rem;
}
.profile-cta-row button:not(.btn-secondary) {
  color: #fafafa;
}
.profile-curve-card,
.profile-journal-card,
.profile-instruments-card {
  border: 1px solid var(--border);
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 720px) {
  .dash-tabs {
    max-width: 100%;
    overflow-x: auto;
  }
  .channel-row {
    flex-direction: column;
    align-items: stretch;
  }
  .channel-row-actions {
    justify-content: flex-start;
  }
  .price-now { font-size: 1.5rem; }
  .kpi.big { grid-column: 1 / -1; }
}
