﻿@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Chakra+Petch:wght@600;700&display=swap');

:root {
  --bg: #eef1f5;
  --bg-2: #dde2ea;
  --card: rgba(255, 255, 255, 0.93);
  --card-strong: #ffffff;
  --text: #1b1e23;
  --muted: #6f7683;
  --line: #cfd5df;
  --gold: #ffb000;
  --gold-deep: #d68500;
  --neon: #00d4ff;
  --neon-deep: #0088b8;
  --neon-soft: rgba(0, 212, 255, 0.2);
  --shadow: 0 14px 36px rgba(20, 30, 55, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  font-family: 'Sora', sans-serif;
  background:
    radial-gradient(1200px 500px at -10% -10%, #ffffff 0%, transparent 60%),
    radial-gradient(1000px 450px at 110% 10%, #e9f9ff 0%, transparent 55%),
    linear-gradient(165deg, var(--bg) 0%, var(--bg-2) 100%);
}

body::before,
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

body::before {
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(40, 60, 90, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(40, 60, 90, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, transparent, black 25%, black 75%, transparent);
}

body::after {
  width: 380px;
  height: 380px;
  top: -120px;
  right: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.3), rgba(0, 212, 255, 0));
  filter: blur(8px);
}

a { color: inherit; text-decoration: none; }

.auth-body,
.dash-body,
.page-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.auth-wrap,
.page-shell,
.phone-shell {
  position: relative;
  z-index: 2;
}

.auth-wrap {
  width: min(470px, 100%);
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.auth-head h1 {
  margin: 0;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.04rem;
  letter-spacing: 1px;
  color: #111;
}

.auth-head p {
  margin: 8px 0 18px;
  color: var(--muted);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.tab-btn {
  border: 1px solid var(--line);
  background: #f7f9fc;
  color: var(--text);
  border-radius: 12px;
  padding: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.tab-btn.active {
  border-color: #91dfff;
  background: linear-gradient(135deg, #ffffff, #e8f9ff);
  box-shadow: inset 0 0 0 1px rgba(0, 212, 255, 0.2);
}

.auth-form { display: none; }
.auth-form.show { display: grid; gap: 8px; }

.auth-form label { font-size: 0.9rem; color: #5f6672; }

.auth-form input,
.inline-form input,
.admin-form input,
.admin-form select,
.admin-item input,
.admin-item select {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ffffff;
  color: var(--text);
  padding: 11px;
  font-family: inherit;
}

.auth-form input:focus,
.inline-form input:focus,
.admin-form input:focus,
.admin-form select:focus,
.admin-item input:focus,
.admin-item select:focus {
  outline: none;
  border-color: #83d5f8;
  box-shadow: 0 0 0 3px var(--neon-soft);
}

.btn-gold,
.btn-outline {
  border-radius: 12px;
  padding: 11px 12px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}

.btn-gold {
  margin-top: 8px;
  border: 0;
  color: #171717;
  background: linear-gradient(135deg, var(--gold-deep), var(--gold));
  box-shadow: 0 8px 22px rgba(214, 133, 0, 0.35);
}

.btn-gold.small,
.btn-outline.mini {
  padding: 8px 12px;
  font-size: 0.83rem;
}

.btn-outline {
  border: 1px solid #87d6f7;
  background: linear-gradient(135deg, #ffffff, #ebfaff);
  color: #0e5270;
}

.btn-outline:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.alerts { margin-bottom: 12px; }
.alert {
  padding: 10px;
  border-radius: 10px;
  font-size: 0.92rem;
  margin-bottom: 8px;
}
.alert.ok { background: #eaf9ef; border: 1px solid #b7e3c2; color: #185d2f; }
.alert.err { background: #fff0f0; border: 1px solid #efc4c4; color: #812828; }
.alerts.slim .alert { margin-bottom: 6px; }

.phone-shell {
  width: min(430px, 100%);
  min-height: 90vh;
  padding: 14px 14px 74px;
  border-radius: 26px;
  background: linear-gradient(180deg, #fdfefe 0%, #f3f6fa 100%);
  border: 1px solid #d6dde8;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.topbar {
  display: grid;
  grid-template-columns: 38px 1fr 24px;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #c7d2e1;
  background: #ffffff;
  color: #1d2f49;
  font-weight: 700;
  cursor: pointer;
}

.brand-area h1 {
  margin: 0;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1rem;
  letter-spacing: 1px;
  color: #0f223d;
}

.brand-area p {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: #667183;
}

.logo-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d4ff, #008ec2);
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.55);
}

.hero-card,
.chart-card,
.inv-card,
.page-card {
  margin-top: 12px;
  background: var(--card-strong);
  border: 1px solid #d8dfea;
  border-radius: 16px;
  padding: 12px;
}

.hero-card {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 10px;
}

.hero-card h2 { margin: 0; font-size: 1.14rem; color: #102542; }
.hero-card p { margin: 8px 0 0; color: #6a7382; font-size: 0.88rem; }

.stats-strip,
.wallet-strip {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat-card,
.wallet-card {
  border: 1px solid #d8dfeb;
  border-radius: 14px;
  padding: 10px;
  background: #ffffff;
}

.stat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.stat-head span,
.wallet-card span { font-size: 0.75rem; color: #6a7382; }

.stat-card strong,
.wallet-card strong { margin-top: 4px; display: block; color: #102542; font-size: 1.02rem; }

.eye-btn {
  border: 1px solid #cfe6f0;
  background: #f5fcff;
  border-radius: 10px;
  width: 30px;
  height: 26px;
  cursor: pointer;
}

.secret-value.masked,
.sensitive-total.masked {
  filter: blur(5px);
  user-select: none;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.chart-head h3 { margin: 0; font-size: 1rem; color: #1d2430; }
.chart-head span { color: #0f8fbf; font-size: 0.79rem; font-weight: 700; }

.chart-filters {
  margin-top: 10px;
  display: inline-flex;
  border: 1px solid #cde2f0;
  border-radius: 10px;
  overflow: hidden;
}

.filter-btn {
  border: 0;
  background: #f5fbff;
  color: #59738a;
  padding: 7px 10px;
  cursor: pointer;
  font-weight: 700;
}

.filter-btn.active {
  background: #dcf5ff;
  color: #0f6387;
}

.chart-kpis {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.kpi-box {
  border: 1px solid #d7dfeb;
  border-radius: 10px;
  background: #f8fbff;
  padding: 8px;
}

.kpi-box span { display: block; font-size: 0.72rem; color: #6a7382; }
.kpi-box strong { display: block; margin-top: 2px; color: #0f223d; font-size: 0.95rem; }

#chart {
  width: 100%;
  height: 180px;
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid #d6deea;
  background: linear-gradient(180deg, #fbfdff, #f2f6fb);
}

#claimForm { margin-top: 10px; }

.inv-list { margin-top: 10px; display: grid; gap: 8px; }
.hidden { display: none; }

.inv-item,
.empty-item {
  border: 1px solid #d8dfeb;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px;
}

.inv-item {
  text-align: left;
  cursor: pointer;
  color: #1f2430;
  display: grid;
  gap: 3px;
}
.inv-item span { color: #6f7784; font-size: 0.82rem; }
.empty-item { font-size: 0.9rem; color: #6f7784; }

.bottom-nav {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 1px solid #d1d9e6;
  border-radius: 14px;
  background: #ffffff;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  overflow: hidden;
}

.bottom-nav a {
  text-align: center;
  font-size: 0.74rem;
  padding: 10px 4px;
  color: #687486;
}

.bottom-nav a.active {
  background: linear-gradient(135deg, #e5f9ff, #d8f4ff);
  color: #03658d;
  font-weight: 700;
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: -300px;
  width: 272px;
  padding: 18px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  background:
    radial-gradient(280px 170px at 8% -8%, rgba(0, 212, 255, 0.16), transparent 70%),
    radial-gradient(220px 140px at 100% 100%, rgba(255, 176, 0, 0.12), transparent 70%),
    linear-gradient(170deg, rgba(7, 11, 19, 0.99), rgba(12, 18, 29, 0.99));
  z-index: 40;
  transition: left 0.28s ease;
  box-shadow: 18px 0 38px rgba(1, 8, 20, 0.58);
  backdrop-filter: blur(6px);
}

.sidebar.show { left: 0; }

.side-top {
  border: 1px solid rgba(145, 163, 187, 0.34);
  border-radius: 14px;
  padding: 11px 12px;
  background: linear-gradient(180deg, rgba(24, 33, 48, 0.85), rgba(15, 24, 38, 0.8));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 20px rgba(2, 12, 28, 0.35);
}
.side-top strong {
  display: block;
  color: #f3f8ff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.side-top span {
  color: #a9bbd2;
  font-size: 0.95rem;
  display: inline-block;
  margin-top: 2px;
}

.side-links { margin-top: 18px; display: grid; gap: 12px; }

.side-links a {
  position: relative;
  border: 1px solid rgba(143, 161, 186, 0.34);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(27, 39, 58, 0.96), rgba(15, 24, 38, 0.96));
  padding: 11px 12px 11px 38px;
  font-size: 0.93rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #e8f1fe;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.16s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.side-links a::before {
  content: '\25BA';
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.58rem;
  color: rgba(0, 212, 255, 0.92);
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.5);
}

.side-links a:hover {
  border-color: rgba(0, 212, 255, 0.58);
  background: linear-gradient(180deg, rgba(31, 47, 70, 0.97), rgba(17, 29, 46, 0.97));
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.side-links a:last-child {
  border-color: rgba(244, 114, 114, 0.42);
  color: #ffd6d6;
}

.side-links a:last-child::before {
  color: rgba(248, 113, 113, 0.9);
  text-shadow: 0 0 10px rgba(248, 113, 113, 0.45);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 16, 0.6);
  z-index: 30;
  display: none;
  backdrop-filter: blur(3px);
}
.overlay.show { display: block; }

.page-shell {
  width: min(1100px, 100%);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.page-header h1 {
  margin: 0;
  font-family: 'Chakra Petch', sans-serif;
  letter-spacing: 0.7px;
}

.tier-block { margin-top: 14px; }
.tier-block h2 { margin: 0 0 10px; }

.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.package-card {
  border: 1px solid #d8dfeb;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
}

.package-card h3 { margin: 8px 0 6px; }
.package-card p { margin: 4px 0; color: #526173; font-size: 0.9rem; }

.package-media {
  border: 1px dashed #b6cada;
  border-radius: 10px;
  overflow: hidden;
  background: #f5fbff;
  min-height: 120px;
  display: grid;
  place-items: center;
}

.package-media img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.media-placeholder {
  color: #5e7790;
  font-size: 0.82rem;
  text-align: center;
  padding: 12px;
}

.big-number {
  margin: 4px 0 12px;
  color: #0a5270;
  font-size: 1.5rem;
  font-weight: 800;
}

.inline-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-form input { flex: 1; min-width: 180px; }

.hint {
  margin-top: 8px;
  font-size: 0.84rem;
  color: #687486;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #d8dfeb;
  padding: 8px;
  text-align: left;
  font-size: 0.85rem;
}

.admin-wide { width: min(1280px, 100%); }

.admin-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  align-items: end;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.admin-item {
  border: 1px solid #d8dfeb;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  display: grid;
  gap: 6px;
}

.row-title {
  font-weight: 700;
  color: #1e3b52;
}

.check-row {
  font-size: 0.85rem;
  color: #5f6f80;
}

@media (max-width: 540px) {
  .phone-shell { min-height: 100vh; border-radius: 0; }
  .dash-body { padding: 0; }
  .stats-strip,
  .wallet-strip,
  .chart-kpis { grid-template-columns: 1fr; }
}

/* Packages visual upgrade */
.packages-page .page-shell {
  width: min(1220px, 100%);
}

.tier-block {
  margin-top: 16px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid #d8dfeb;
  background: rgba(255, 255, 255, 0.66);
}

.tier-jr {
  border-color: #ffcf7a;
  box-shadow: inset 0 0 0 1px rgba(255, 176, 0, 0.2);
}

.tier-master {
  border-color: #7fddff;
  box-shadow: inset 0 0 0 1px rgba(0, 212, 255, 0.24);
}

.tier-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.tier-head h2 {
  margin: 0;
  font-family: 'Chakra Petch', sans-serif;
  letter-spacing: 0.8px;
}

.tier-pill {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #1f2a3d;
  border: 1px solid #cfd8e7;
  background: #fff;
}

.tier-jr .tier-pill {
  border-color: #ffc45b;
  background: linear-gradient(135deg, #ffe9c0, #ffd57f);
}

.tier-master .tier-pill {
  border-color: #69cff9;
  background: linear-gradient(135deg, #def7ff, #aeeaff);
}

.package-card {
  position: relative;
  border: 1px solid #d8dfeb;
  border-radius: 16px;
  background: #fff;
  padding: 10px;
  overflow: hidden;
}

.jr-card {
  border-color: #ffd287;
}

.master-card {
  border-color: #90dfff;
}

.tier-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: #f4f8ff;
  border: 1px solid #cad8ea;
  color: #2d4663;
}

.jr-card .tier-tag {
  background: linear-gradient(135deg, #ffe9bf, #ffd17b);
  border-color: #ffc266;
  color: #6a3d00;
}

.master-card .tier-tag {
  background: linear-gradient(135deg, #ddf7ff, #aae8ff);
  border-color: #6dcffd;
  color: #004d71;
}

.package-card .btn-gold {
  width: 100%;
}

@media (max-width: 900px) {
  .packages-page .page-shell {
    width: 100%;
  }

  .package-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}

@media (max-width: 680px) {
  .page-body {
    padding: 10px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .tier-block {
    padding: 10px;
    border-radius: 14px;
  }

  .tier-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .package-grid {
    grid-template-columns: 1fr;
  }

  .package-card {
    padding: 11px;
  }

  .package-media {
    min-height: 130px;
  }

  .package-media img {
    height: 130px;
  }

  .package-card p {
    font-size: 0.95rem;
  }

  .package-card .btn-gold {
    font-size: 1rem;
    padding: 12px;
  }
}

/* Ajuste solicitado: inversiones 3x3 centradas */
.package-grid {
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  justify-content: center;
  align-items: start;
}

.package-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100%;
}

.package-card form {
  margin-top: auto;
}

@media (max-width: 1080px) {
  .package-grid {
    grid-template-columns: repeat(2, minmax(230px, 1fr));
  }
}

@media (max-width: 680px) {
  .package-grid {
    grid-template-columns: 1fr;
  }
}

/* Corporate polish + admin separation */
:root {
  --corp-navy: #0f1f38;
  --corp-steel: #2f4d78;
}

.auth-card,
.phone-shell,
.page-card,
.package-card,
.stat-card,
.wallet-card,
.admin-item {
  box-shadow: 0 10px 26px rgba(22, 36, 58, 0.12);
}

.auth-head h1,
.brand-area h1,
.page-header h1,
.tier-head h2 {
  letter-spacing: 0.9px;
}

.eye-btn {
  width: 34px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #b8ddef;
  background: linear-gradient(135deg, #ffffff, #e9f8ff);
  display: grid;
  place-items: center;
}

.eye-icon {
  position: relative;
  width: 16px;
  height: 9px;
  border: 2px solid #1c6486;
  border-radius: 12px;
  display: block;
  animation: eyePulse 2.2s ease-in-out infinite;
}

.eye-icon::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  background: #1c6486;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

@keyframes eyePulse {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  45% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.25); opacity: 0.9; }
  55% { transform: scaleY(1); opacity: 1; }
}

.admin-body {
  background:
    radial-gradient(900px 320px at 100% 0%, rgba(20, 70, 120, 0.22), transparent 55%),
    radial-gradient(700px 280px at 0% 100%, rgba(214, 133, 0, 0.16), transparent 60%),
    linear-gradient(165deg, #ecf0f5 0%, #dce4ee 100%);
}

.admin-header {
  align-items: flex-start;
}

.admin-actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-card h2 {
  margin-top: 0;
  color: var(--corp-navy);
}

.row-title {
  color: var(--corp-navy);
  background: linear-gradient(135deg, #f5f9ff, #edf4ff);
  border: 1px solid #d6e3f3;
  border-radius: 10px;
  padding: 7px 8px;
}

.side-links a:hover,
.bottom-nav a:hover,
.btn-outline:hover,
.btn-gold:hover {
  transform: translateY(-1px);
}

@media (max-width: 680px) {
  .auth-card,
  .phone-shell,
  .page-card,
  .package-card,
  .admin-item {
    border-radius: 14px;
  }

  .admin-actions {
    width: 100%;
  }

  .admin-actions a {
    flex: 1;
    text-align: center;
  }
}

/* Ajuste de tamaño de tarjetas e imagen en paquetes */
.package-grid {
  grid-template-columns: repeat(3, minmax(210px, 280px));
  justify-content: center;
  gap: 12px;
}

.package-card {
  max-width: 280px;
  margin: 0 auto;
}

.package-media {
  min-height: 150px;
}

.package-media img {
  height: 150px;
}

@media (max-width: 1080px) {
  .package-grid {
    grid-template-columns: repeat(2, minmax(210px, 300px));
  }

  .package-card {
    max-width: 300px;
  }
}

@media (max-width: 680px) {
  .package-grid {
    grid-template-columns: 1fr;
  }

  .package-card {
    max-width: 360px;
    width: 100%;
  }

  .package-media {
    min-height: 160px;
  }

  .package-media img {
    height: 160px;
  }
}

/* Compactar imagen de paquete sin deformar tarjeta */
.package-media {
  padding: 8px;
  background: #f5f9fd;
}

.package-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  background: #ffffff;
}

/* FIX final: logos no deben descuadrar tarjetas */
.packages-page .package-card {
  display: flex;
  flex-direction: column;
}

.packages-page .package-media {
  height: 170px;
  min-height: 170px;
  max-height: 170px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f5f9fd;
}

.packages-page .package-media img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  background: #ffffff;
}

.packages-page .media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.packages-page .package-card h3 {
  margin-top: 10px;
  min-height: 34px;
}

.packages-page .package-card form {
  margin-top: auto;
}

@media (max-width: 680px) {
  .packages-page .package-media {
    height: 160px;
    min-height: 160px;
    max-height: 160px;
  }
}

/* Ajuste final solicitado: titulo centrado y cards mas compactas */
.packages-page .page-header {
  justify-content: center;
  position: relative;
  margin-bottom: 4px;
}

.packages-page .page-header h1 {
  text-align: center;
}

.packages-page .page-header .btn-outline {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.packages-page .package-grid {
  grid-template-columns: repeat(3, minmax(185px, 245px));
  gap: 10px;
}

.packages-page .package-card {
  max-width: 245px;
  padding: 9px;
}

.packages-page .package-media {
  height: 145px;
  min-height: 145px;
  max-height: 145px;
}

@media (max-width: 1080px) {
  .packages-page .package-grid {
    grid-template-columns: repeat(2, minmax(190px, 255px));
  }

  .packages-page .package-card {
    max-width: 255px;
  }
}

@media (max-width: 680px) {
  .packages-page .page-header {
    justify-content: flex-start;
  }

  .packages-page .page-header .btn-outline {
    position: static;
    transform: none;
  }

  .packages-page .package-grid {
    grid-template-columns: 1fr;
  }

  .packages-page .package-card {
    max-width: 330px;
  }

  .packages-page .package-media {
    height: 150px;
    min-height: 150px;
    max-height: 150px;
  }
}

/* Accordion paquetes */
.accordion-btn {
  width: 100%;
  border: 1px solid #d8dfeb;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #f4f8fd);
  padding: 8px 10px;
  cursor: pointer;
}

.accordion-btn .tier-head {
  margin: 0;
}

.accordion-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease;
}

.accordion-panel.open {
  max-height: 3000px;
  opacity: 1;
  margin-top: 10px;
}

/* UX compacto: acordeon y pantallas internas mas practicas */
.page-shell {
  width: min(760px, 100%);
}

.packages-page .page-shell {
  width: min(980px, 100%);
}

.packages-page .tier-block {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.packages-page .accordion-btn {
  width: min(860px, 100%);
  margin: 0 auto;
  display: block;
}

.packages-page .accordion-btn .tier-head {
  min-height: 36px;
}

.packages-page .accordion-panel.open {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-card {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.inline-form {
  align-items: center;
}

.inline-form .btn-gold,
.inline-form .btn-outline {
  margin-top: 0;
  min-width: 150px;
}

@media (max-width: 680px) {
  .page-body {
    padding: 8px;
  }

  .page-shell,
  .packages-page .page-shell {
    width: 100%;
    max-width: 420px;
  }

  .page-header {
    width: 100%;
  }

  .page-header h1 {
    font-size: 1.85rem;
    line-height: 1.1;
  }

  .packages-page .tier-block {
    max-width: 100%;
    padding: 8px;
  }

  .packages-page .accordion-btn {
    width: 100%;
    border-radius: 10px;
    padding: 7px 8px;
  }

  .packages-page .accordion-btn .tier-head h2 {
    font-size: 1.08rem;
  }

  .packages-page .accordion-btn .tier-pill {
    font-size: 0.82rem;
    padding: 4px 8px;
  }

  .page-card {
    max-width: 100%;
    padding: 10px;
    border-radius: 12px;
  }

  .inline-form {
    flex-direction: column;
    align-items: start;
  }

  .inline-form input,
  .inline-form .btn-gold,
  .inline-form .btn-outline {
    width: 100%;
    min-width: 0;
  }

  .table-wrap {
    border: 1px solid #d8dfeb;
    border-radius: 10px;
    background: #fff;
  }

  th,
  td {
    font-size: 0.78rem;
    padding: 7px 6px;
    white-space: nowrap;
  }
}

/* Retiros: tarjetas guardadas */
.inline-form select {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ffffff;
  color: var(--text);
  padding: 11px;
  font-family: inherit;
}

.inline-form select:focus {
  outline: none;
  border-color: #83d5f8;
  box-shadow: 0 0 0 3px var(--neon-soft);
}

.saved-cards {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.saved-card-item {
  border: 1px solid #d8dfeb;
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.saved-card-item p {
  margin: 4px 0 0;
  color: #687486;
  font-size: 0.83rem;
}

@media (max-width: 680px) {
  .saved-card-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .saved-card-item form {
    width: 100%;
  }

  .saved-card-item .btn-outline {
    width: 100%;
  }
}

/* FAQ + soporte */
.faq-list {
  display: grid;
  gap: 8px;
}

.faq-item {
  text-align: left;
  border: 1px solid #d7dfeb;
  border-radius: 10px;
  background: #fff;
  padding: 11px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.faq-float {
  position: fixed;
  inset: 0;
  background: rgba(7, 12, 20, 0.48);
  display: grid;
  place-items: center;
  z-index: 80;
  padding: 14px;
  backdrop-filter: blur(4px);
}

.faq-float.hidden {
  display: none;
}

.faq-float-body {
  width: min(500px, 100%);
  background: linear-gradient(165deg, rgba(193, 203, 216, 0.96), rgba(172, 186, 203, 0.96));
  border: 1px solid rgba(132, 149, 169, 0.6);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 18px 42px rgba(17, 31, 51, 0.28);
}

.faq-float-body p {
  margin: 0 0 10px;
  color: #2a384b;
}

.chat-card h2 {
  margin-top: 0;
}

.chat-box {
  border: 1px solid #d8dfeb;
  border-radius: 12px;
  background: #f8fbff;
  max-height: 430px;
  overflow-y: auto;
  padding: 8px;
  display: grid;
  gap: 8px;
}

.chat-row {
  display: flex;
}

.chat-row.mine {
  justify-content: flex-end;
}

.chat-row.other {
  justify-content: flex-start;
}

.chat-bubble {
  width: min(86%, 480px);
  border-radius: 12px;
  padding: 8px 10px;
  border: 1px solid #d4dfeb;
  background: #fff;
}

.chat-row.mine .chat-bubble {
  border-color: #9fdaf0;
  background: #eaf8ff;
}

.chat-bubble strong {
  font-size: 0.78rem;
  color: #27405c;
}

.chat-bubble p {
  margin: 5px 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble small {
  color: #6f7f93;
  font-size: 0.72rem;
}

.chat-form {
  margin-top: 10px;
}

.support-list {
  display: grid;
  gap: 8px;
}

.support-item {
  border: 1px solid #d8dfeb;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.support-item strong {
  color: #1f344d;
}

.support-item span,
.support-item small {
  color: #697a8e;
}

@media (max-width: 680px) {
  .chat-box {
    max-height: 52vh;
  }

  .chat-bubble {
    width: 92%;
  }
}

/* Navegacion fija global + paleta negro/blanco para subpaginas usuario */
.user-subpage .page-shell {
  width: min(760px, 100%);
  padding-top: 74px;
  padding-bottom: 92px;
}

.global-topbar {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 16px));
  z-index: 70;
  background: linear-gradient(140deg, #121417, #1e2228);
  border: 1px solid #2b323d;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.global-topbar__left strong {
  display: block;
  color: #ffffff;
  letter-spacing: 0.8px;
}

.global-topbar__left span {
  display: block;
  margin-top: 2px;
  color: #bcc5d2;
  font-size: 0.82rem;
}

.fixed-bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 8px;
  width: min(760px, calc(100% - 16px));
  z-index: 70;
  background: #0f1216;
  border: 1px solid #2e3642;
  border-radius: 14px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  overflow: hidden;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25);
}

.fixed-bottom-nav a {
  text-align: center;
  padding: 11px 4px;
  font-size: 0.76rem;
  color: #a8b3c3;
}

.fixed-bottom-nav a.active {
  background: linear-gradient(135deg, #edf8ff, #d9f1ff);
  color: #0f5f85;
  font-weight: 800;
}

.user-subpage .page-card,
.user-subpage .tier-block,
.user-subpage .accordion-btn,
.user-subpage .package-card,
.user-subpage .saved-card-item,
.user-subpage .support-item,
.user-subpage .faq-item,
.user-subpage .chat-bubble {
  background: #11151a;
  color: #f2f4f7;
  border-color: #2d3746;
}

.user-subpage .page-header h1,
.user-subpage .tier-head h2,
.user-subpage .page-card h2,
.user-subpage .package-card h3,
.user-subpage th,
.user-subpage td {
  color: #f0f3f8;
}

.user-subpage .hint,
.user-subpage p,
.user-subpage .support-item span,
.user-subpage .support-item small,
.user-subpage .chat-bubble small,
.user-subpage .chat-bubble strong {
  color: #b5c0cf;
}

.user-subpage table {
  background: #11151a;
}

.user-subpage th,
.user-subpage td {
  border-bottom-color: #2a3341;
}

.user-subpage .inline-form input,
.user-subpage .inline-form select,
.user-subpage .admin-form input,
.user-subpage .admin-form select {
  background: #0e1217;
  color: #f2f4f7;
  border-color: #334154;
}

.user-subpage .inline-form input:focus,
.user-subpage .inline-form select:focus {
  border-color: #6dcffd;
  box-shadow: 0 0 0 3px rgba(109, 207, 253, 0.22);
}

@media (max-width: 680px) {
  .user-subpage .page-shell {
    width: 100%;
    max-width: 420px;
    padding-top: 70px;
    padding-bottom: 84px;
  }

  .global-topbar,
  .fixed-bottom-nav {
    width: calc(100% - 12px);
  }

  .fixed-bottom-nav a {
    padding: 10px 2px;
    font-size: 0.72rem;
  }
}

/* Fondo gris azulado para combinar con recuadros negros */
body,
.page-body,
.user-subpage {
  background:
    radial-gradient(900px 360px at -10% -20%, rgba(255, 255, 255, 0.28), transparent 60%),
    radial-gradient(900px 420px at 110% 0%, rgba(120, 170, 205, 0.22), transparent 55%),
    linear-gradient(165deg, #c8d0dc 0%, #b6c1cf 52%, #a9b7c8 100%);
}

body::before {
  background-image:
    linear-gradient(to right, rgba(55, 78, 108, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(55, 78, 108, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
}

/* FAQ modal en dashboard */
.faq-dashboard-box {
  width: min(560px, 100%);
  max-height: 76vh;
  overflow: auto;
}

.faq-dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.faq-dashboard-head h3 {
  margin: 0;
}

.faq-accordion-list {
  gap: 10px;
}

.faq-qa-item {
  border: 1px solid rgba(112, 132, 155, 0.5);
  border-radius: 10px;
  padding: 8px;
  background: rgba(230, 236, 244, 0.8);
}

.faq-q {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #21374f;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.faq-a {
  margin-top: 8px;
  border-top: 1px solid #e2e8f1;
  padding-top: 8px;
}

.faq-a p {
  margin: 0 0 8px;
  color: #314960;
}

.faq-help {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.faq-help span {
  color: #5f7288;
  font-size: 0.84rem;
}

.faq-help-btn {
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  background: #f6fbff;
  color: #114a68;
  padding: 5px 10px;
  font-weight: 700;
  cursor: pointer;
}

.faq-help-msg {
  color: #2b6c41;
  font-size: 0.78rem;
}

@media (max-width: 680px) {
  .faq-dashboard-box {
    max-height: 88vh;
  }
}


/* Dashboard polish: compacto, limpio y con mejor contraste */
.dash-body .phone-shell {
  width: min(392px, 100%);
  min-height: 88vh;
  border-radius: 22px;
  padding: 12px 12px 72px;
  border: 1px solid #c8d2df;
  background: linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
  box-shadow: 0 10px 24px rgba(20, 34, 54, 0.14);
}

.dash-body .hero-card,
.dash-body .chart-card,
.dash-body .inv-card,
.dash-body .stat-card,
.dash-body .wallet-card,
.dash-body .kpi-box {
  border: 1px solid #cfd8e5;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafe 100%);
  box-shadow: 0 4px 10px rgba(21, 34, 54, 0.08);
}

.dash-body .hero-card,
.dash-body .chart-card,
.dash-body .inv-card {
  margin-top: 10px;
}

.dash-body .stats-strip,
.dash-body .wallet-strip,
.dash-body .chart-kpis {
  gap: 7px;
}

.dash-body .brand-area h1 {
  color: #0a1f3a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* Nombre de usuario en lateral con mayor contraste */
.sidebar .side-top strong {
  color: #ffd36a;
  text-shadow: 0 0 10px rgba(255, 186, 66, 0.25);
}

@media (max-width: 420px) {
  .dash-body {
    padding: 10px;
  }
  .dash-body .phone-shell {
    width: min(372px, 100%);
    border-radius: 18px;
  }
}


/* User subpages polish: menos ancho, menos flotante y mejor contraste */
.user-subpage .page-shell {
  width: min(620px, 100%) !important;
  padding-top: 68px !important;
  padding-bottom: 88px !important;
}

.user-subpage .global-topbar,
.user-subpage .fixed-bottom-nav,
.global-topbar,
.fixed-bottom-nav {
  width: min(620px, calc(100% - 16px)) !important;
}

.user-subpage .page-card,
.user-subpage .tier-block,
.user-subpage .accordion-btn,
.user-subpage .package-card,
.user-subpage .saved-card-item,
.user-subpage .support-item,
.user-subpage .faq-item,
.user-subpage .chat-bubble {
  border-width: 1px !important;
  border-style: solid !important;
  border-color: #283242 !important;
  box-shadow: none !important;
  border-radius: 12px !important;
}

.user-subpage .page-card {
  margin-top: 10px !important;
  padding: 12px !important;
}

.user-subpage .page-header h1 {
  color: #11263f !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.user-subpage .page-header .btn-outline {
  border-color: #7ccaf2 !important;
  color: #0d5677 !important;
}

@media (max-width: 680px) {
  .user-subpage .page-shell {
    max-width: 390px !important;
    width: 100% !important;
    padding-top: 66px !important;
    padding-bottom: 84px !important;
  }

  .global-topbar,
  .fixed-bottom-nav {
    width: min(390px, calc(100% - 12px)) !important;
  }
}


/* Soporte chat + badge notificaciones */
.chat-start {
  display: grid;
  gap: 8px;
}

.chat-start h2 {
  margin: 0;
}

.chat-start p {
  margin: 0;
  color: #6a778a;
}

.chat-image {
  display: block;
  max-width: 180px;
  max-height: 180px;
  width: auto;
  height: auto;
  border-radius: 10px;
  border: 1px solid #2f3c4f;
  margin: 6px 0;
  object-fit: cover;
}

.support-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.msg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  padding: 0 6px;
  box-shadow: 0 6px 14px rgba(225, 29, 72, 0.35);
}

.admin-support-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-badge {
  min-width: 18px;
  height: 18px;
  font-size: 0.68rem;
  padding: 0 5px;
}

.chat-form input[type="file"] {
  border: 1px solid #334154;
  background: #0e1217;
  color: #d4deea;
  border-radius: 10px;
  padding: 8px;
}

.chat-form input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  margin-right: 8px;
  background: linear-gradient(135deg, #0f6c95, #16a3df);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}


/* Soporte UX polish: limpio, compacto y sin datos sensibles */
.support-page .page-shell {
  width: min(520px, 100%) !important;
}

.support-page .global-topbar,
.support-page .fixed-bottom-nav {
  width: min(520px, calc(100% - 14px)) !important;
}

.support-page .page-header h1,
.support-page .chat-card h2 {
  font-family: 'Sora', sans-serif !important;
  letter-spacing: 0.01em !important;
}

.support-page .chat-card {
  border-radius: 14px !important;
  padding: 12px !important;
}

.support-page .chat-start {
  display: grid;
  gap: 8px;
}

/* evita que .chat-start pise la clase global .hidden */
.support-page .chat-start.hidden,
.support-page #chatPanel.hidden {
  display: none !important;
}

.support-page .chat-start p {
  margin: 0;
  color: #7a889d;
  font-size: 0.94rem;
  line-height: 1.42;
}

.support-page .chat-box {
  max-height: 45vh;
}

.support-page .chat-form {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.support-page .chat-form input[type="text"] {
  width: 100%;
}

.support-page .chat-form input[type="file"] {
  width: 100%;
}

.support-page .chat-form .btn-gold {
  width: 100%;
  margin-top: 0;
}

@media (max-width: 680px) {
  .support-page .page-shell {
    max-width: 372px !important;
    width: 100% !important;
  }

  .support-page .global-topbar,
  .support-page .fixed-bottom-nav {
    width: min(372px, calc(100% - 10px)) !important;
  }

  .support-page .page-header h1 {
    font-size: 2rem !important;
  }
}


/* Chat readability + scroll fijo */
.chat-card .chat-box {
  height: 320px !important;
  max-height: 320px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  scrollbar-width: thin;
  scrollbar-color: #6b7f98 #0f1826;
}

.chat-card .chat-box::-webkit-scrollbar {
  width: 8px;
}

.chat-card .chat-box::-webkit-scrollbar-track {
  background: #0f1826;
  border-radius: 10px;
}

.chat-card .chat-box::-webkit-scrollbar-thumb {
  background: #6b7f98;
  border-radius: 10px;
}

.chat-card .chat-bubble {
  border: 1px solid #2f3d50 !important;
  border-radius: 12px !important;
  background: #e8f0f8 !important;
}

.chat-card .chat-row.mine .chat-bubble {
  background: #d8ecff !important;
  border-color: #76bde8 !important;
}

.chat-card .chat-row.other .chat-bubble {
  background: #eef4fb !important;
}

.chat-card .chat-bubble strong {
  color: #1a3552 !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
}

.chat-card .chat-bubble p {
  color: #1e2f42 !important;
  font-size: 0.95rem !important;
  line-height: 1.4 !important;
}

.chat-card .chat-bubble small {
  color: #51667f !important;
  font-size: 0.74rem !important;
}

@media (max-width: 680px) {
  .chat-card .chat-box {
    height: 300px !important;
    max-height: 300px !important;
  }
}


/* Monto por tipo */
.amount-positive {
  color: #0f9a4b !important;
  font-weight: 800;
}

.amount-negative {
  color: #d92d20 !important;
  font-weight: 800;
}


/* Purple neon language for cards + emphasis */
.user-subpage .page-header h1,
.sociedad-page .page-header h1 {
  color: #1b2130 !important;
  text-shadow: none !important;
}

.sociedad-page .soc-title {
  color: #e8dbff !important;
  text-shadow: 0 0 12px rgba(147, 51, 234, 0.3);
}

.money-pop {
  color: #17b55a !important;
  font-weight: 900 !important;
  text-shadow: 0 0 10px rgba(23, 181, 90, 0.25);
}

.range-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #5f4c9a;
  background: linear-gradient(135deg, #251f3e, #332456);
  color: #e8dcff;
  font-size: 0.9em;
}

.range-badge.range-1 { border-color: #6b56aa; box-shadow: 0 0 12px rgba(107, 86, 170, 0.25); }
.range-badge.range-2 { border-color: #8a5cf0; box-shadow: 0 0 14px rgba(138, 92, 240, 0.35); }
.range-badge.range-3 { border-color: #d946ef; box-shadow: 0 0 16px rgba(217, 70, 239, 0.45); }

.soc-range.active {
  border-width: 1px;
  box-shadow: 0 0 18px rgba(217, 70, 239, 0.35);
  transform: translateY(-1px);
}
.soc-range.active strong { color: #ffe8ff; }


/* Nav morado-neon uniforme (Inicio/Recargas/Retiro/Sociedad/Perfil) */
.dash-body .bottom-nav,
.fixed-bottom-nav {
  background: linear-gradient(180deg, #0f1220, #17152a) !important;
  border-color: #3a315d !important;
  box-shadow: 0 0 14px rgba(147, 51, 234, 0.2) !important;
}

.dash-body .bottom-nav a,
.fixed-bottom-nav a {
  color: #b9bfdc !important;
  border-right: 1px solid rgba(90, 74, 138, 0.45);
}

.dash-body .bottom-nav a:last-child,
.fixed-bottom-nav a:last-child {
  border-right: 0;
}

.dash-body .bottom-nav a:hover,
.fixed-bottom-nav a:hover {
  background: linear-gradient(135deg, #241d3b, #332556) !important;
  color: #e6dcff !important;
}

.dash-body .bottom-nav a.active,
.fixed-bottom-nav a.active {
  background: linear-gradient(135deg, #7c3aed, #d946ef) !important;
  color: #ffffff !important;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
}


/* Subpaginas: recuadros internos con paleta morado-neon */
.user-subpage .page-card {
  background: linear-gradient(180deg, #0f1320, #171429) !important;
  border-color: #3a315f !important;
  box-shadow: 0 0 14px rgba(147, 51, 234, 0.16) !important;
}

.user-subpage .page-card h2,
.user-subpage .page-card h3,
.user-subpage .page-card strong {
  color: #ece8ff !important;
}

.user-subpage .inline-form input,
.user-subpage .inline-form select,
.user-subpage .admin-form input,
.user-subpage .admin-form select {
  background: linear-gradient(180deg, #0d1220, #12182a) !important;
  border-color: #4b3a83 !important;
  color: #e9e4ff !important;
}

.user-subpage .inline-form input::placeholder {
  color: #9c95be !important;
}

.user-subpage .inline-form input:focus,
.user-subpage .inline-form select:focus,
.user-subpage .admin-form input:focus,
.user-subpage .admin-form select:focus {
  border-color: #9d5cff !important;
  box-shadow: 0 0 0 3px rgba(157, 92, 255, 0.22) !important;
}

.user-subpage .table-wrap,
.user-subpage table {
  background: transparent !important;
}

.user-subpage th {
  color: #d8cdfa !important;
}

.user-subpage td {
  color: #c5cde8 !important;
}

.user-subpage th,
.user-subpage td {
  border-bottom-color: #322c4e !important;
}

.user-subpage .hint,
.user-subpage p {
  color: #b2b8d5 !important;
}


/* Restore semaforo monetario en dashboard (verde/rojo) */
.dash-body .amount-positive {
  color: #14c45f !important;
  text-shadow: 0 0 10px rgba(20, 196, 95, 0.28) !important;
}

.dash-body .amount-negative {
  color: #ff4d5f !important;
  text-shadow: 0 0 10px rgba(255, 77, 95, 0.24) !important;
}

.chart-mini-meta { margin-top: 6px; text-align: right; }
.chart-mini-meta small { color: #6f7784; font-size: 0.72rem; font-weight: 700; }


/* Sidebar refresh: estilo profesional neon-dark */
body.dash-body .sidebar {
  width: 286px;
  left: -312px;
  padding: 18px 14px 22px;
  border-right: 1px solid rgba(114, 88, 176, 0.38);
  background:
    radial-gradient(260px 180px at 0% -10%, rgba(168, 85, 247, 0.22), transparent 62%),
    radial-gradient(220px 140px at 100% 105%, rgba(99, 52, 219, 0.2), transparent 70%),
    linear-gradient(180deg, #090a14 0%, #120d22 48%, #080911 100%);
  box-shadow: 18px 0 34px rgba(6, 3, 16, 0.62);
  backdrop-filter: blur(8px);
}

body.dash-body .side-top {
  border-radius: 15px;
  border: 1px solid rgba(126, 98, 196, 0.52);
  padding: 11px 13px;
  background: linear-gradient(180deg, rgba(18, 14, 34, 0.92), rgba(12, 10, 25, 0.9));
  box-shadow: inset 0 1px 0 rgba(236, 226, 255, 0.08), 0 12px 24px rgba(9, 6, 22, 0.45);
}

body.dash-body .side-top strong {
  color: #ffd87a;
  font-size: 1.04rem;
  line-height: 1;
  letter-spacing: 0.01em;
  text-shadow: 0 0 16px rgba(255, 195, 78, 0.24);
}

body.dash-body .side-top span {
  color: #b8addc;
  font-size: 0.95rem;
  font-weight: 600;
}

body.dash-body .side-links {
  margin-top: 20px;
  gap: 12px;
}

body.dash-body .side-links a {
  border-radius: 14px;
  border: 1px solid rgba(126, 96, 198, 0.48);
  background: linear-gradient(180deg, rgba(20, 16, 38, 0.95), rgba(12, 10, 26, 0.94));
  color: #eee7ff;
  font-size: 0.99rem;
  font-weight: 760;
  padding: 12px 13px 12px 42px;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(231, 220, 255, 0.07), 0 8px 16px rgba(8, 6, 22, 0.28);
}

body.dash-body .side-links a::before {
  content: '▸';
  left: 15px;
  font-size: 0.66rem;
  color: #b987ff;
  text-shadow: 0 0 14px rgba(185, 135, 255, 0.55);
}

body.dash-body .side-links a:hover {
  transform: translateY(-1px);
  border-color: rgba(200, 158, 255, 0.72);
  box-shadow: 0 0 18px rgba(170, 104, 255, 0.26), inset 0 1px 0 rgba(243, 234, 255, 0.12);
  background: linear-gradient(180deg, rgba(28, 22, 50, 0.97), rgba(15, 12, 32, 0.96));
}

body.dash-body .side-links a:last-child {
  border-color: rgba(248, 113, 113, 0.58);
  color: #ffd8d8;
  background: linear-gradient(180deg, rgba(34, 18, 40, 0.92), rgba(24, 11, 24, 0.9));
}

body.dash-body .side-links a:last-child::before {
  color: #ff9191;
  text-shadow: 0 0 12px rgba(255, 97, 97, 0.55);
}

body.dash-body .sidebar.show { left: 0 !important; }





/* Packages palette sync: negro + morado neon */
.packages-page .tier-block {
  border-color: rgba(114, 88, 176, 0.46) !important;
  background: linear-gradient(180deg, rgba(13, 12, 26, 0.95), rgba(17, 14, 33, 0.95)) !important;
  box-shadow: 0 0 16px rgba(128, 84, 219, 0.2) !important;
}

.packages-page .accordion-btn {
  border-color: rgba(124, 93, 196, 0.55) !important;
  background: linear-gradient(135deg, rgba(21, 18, 40, 0.96), rgba(16, 13, 31, 0.96)) !important;
}

.packages-page .tier-head h2 {
  color: #efe8ff !important;
  text-shadow: 0 0 12px rgba(165, 111, 255, 0.24) !important;
}

.packages-page .tier-pill {
  border-color: rgba(255, 188, 84, 0.78) !important;
  background: linear-gradient(135deg, #ffe1a1, #ffc55c) !important;
  color: #3b2a0f !important;
}

.packages-page .package-card {
  border-color: rgba(108, 83, 174, 0.52) !important;
  background: linear-gradient(180deg, rgba(14, 13, 28, 0.97), rgba(11, 10, 24, 0.97)) !important;
  box-shadow: 0 0 14px rgba(129, 82, 218, 0.18) !important;
}

.packages-page .package-card h3 {
  color: #f1ecff !important;
}

.packages-page .package-card p {
  color: #bdc1dd !important;
}

.packages-page .package-card p strong {
  color: #eef0ff !important;
}

.packages-page .package-media {
  border-color: rgba(130, 98, 206, 0.44) !important;
  background: linear-gradient(180deg, #e9edf4, #dee5ee) !important;
}

.packages-page .media-placeholder {
  color: #65728a !important;
}

.packages-page .tier-tag {
  border-color: rgba(255, 188, 84, 0.65) !important;
  background: linear-gradient(135deg, #ffe8bf, #ffd281) !important;
  color: #5c3a00 !important;
}

.packages-page .package-card .btn-gold {
  background: linear-gradient(135deg, #f1a800, #ffc640) !important;
  color: #1c1303 !important;
  box-shadow: 0 8px 18px rgba(241, 168, 0, 0.35) !important;
}

/* ===== Login Redesign: Luxury Dark Split ===== */
:root {
  --auth-bg: #090b12;
  --auth-surface: rgba(18, 22, 31, 0.84);
  --auth-text: #e8edf8;
  --auth-muted: #9ca7bd;
  --auth-line: rgba(183, 197, 228, 0.26);
  --auth-accent: #3760ff;
  --auth-accent-2: #1d3daa;
}

.auth-body {
  color: var(--auth-text);
  background:
    radial-gradient(680px 420px at 4% 2%, rgba(57, 95, 245, 0.34), transparent 68%),
    radial-gradient(560px 380px at 95% 96%, rgba(86, 108, 190, 0.26), transparent 74%),
    linear-gradient(155deg, #06080f 0%, #0c1019 52%, #0a0d15 100%);
}

.auth-body::before {
  background-image:
    linear-gradient(to right, rgba(149, 164, 197, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(149, 164, 197, 0.06) 1px, transparent 1px);
  background-size: 52px 52px;
  opacity: 0.35;
  mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.auth-body::after {
  width: 460px;
  height: 460px;
  right: -140px;
  top: -130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(64, 101, 255, 0.3), rgba(64, 101, 255, 0));
  filter: blur(10px);
}

.auth-wrap {
  width: min(1060px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.auth-brand-panel,
.auth-card {
  border: 1px solid var(--auth-line);
  border-radius: 24px;
  background: var(--auth-surface);
  backdrop-filter: blur(10px);
  box-shadow: 0 22px 56px rgba(2, 6, 19, 0.58);
}

.auth-brand-panel {
  position: relative;
  overflow: hidden;
  padding: 34px;
  display: grid;
  gap: 14px;
  align-content: start;
  animation: auth-fade-up 0.36s ease-out;
}

.auth-brand-panel::before {
  content: '';
  position: absolute;
  inset: auto -50px -130px auto;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(55, 96, 255, 0.26), rgba(55, 96, 255, 0));
}

.auth-eyebrow {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c4d2f5;
}

.auth-brand-panel h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.18;
  color: #f6f9ff;
}

.auth-tagline {
  margin: 0;
  color: var(--auth-muted);
  line-height: 1.55;
  max-width: 44ch;
}


.auth-rules {
  margin-top: 6px;
  border: 1px solid rgba(157, 174, 212, 0.24);
  border-radius: 14px;
  background: rgba(16, 24, 40, 0.58);
  padding: 14px;
}

.auth-rules h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: #dce6ff;
}

.auth-rules ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #afbedf;
  font-size: 0.86rem;
  line-height: 1.45;
}
.auth-metrics {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auth-metric {
  border: 1px solid rgba(157, 174, 212, 0.23);
  background: rgba(18, 26, 42, 0.6);
  border-radius: 14px;
  padding: 12px;
}

.auth-metric span {
  display: block;
  font-size: 0.72rem;
  color: #9fb0d3;
}

.auth-metric strong {
  margin-top: 4px;
  display: block;
  color: #f4f7ff;
  font-size: 1.02rem;
}

.auth-card {
  padding: 28px;
  animation: auth-fade-up 0.44s ease-out;
}

.auth-head h2 {
  margin: 0;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.18rem;
  letter-spacing: 1.2px;
  color: #f4f7ff;
}

.auth-head p {
  margin: 7px 0 18px;
  color: var(--auth-muted);
}

.auth-tabs {
  gap: 10px;
  margin-bottom: 16px;
}

.tab-btn {
  border-color: rgba(164, 181, 217, 0.26);
  background: rgba(21, 28, 43, 0.72);
  color: #ccdaff;
  border-radius: 12px;
}

.tab-btn:hover {
  border-color: rgba(97, 128, 225, 0.55);
}

.tab-btn.active {
  border-color: rgba(83, 117, 237, 0.9);
  color: #f3f7ff;
  background: linear-gradient(135deg, rgba(30, 58, 153, 0.88), rgba(55, 96, 255, 0.88));
  box-shadow: 0 0 0 1px rgba(93, 126, 235, 0.3), 0 10px 22px rgba(26, 48, 116, 0.45);
}

.auth-form {
  gap: 10px;
  animation: auth-fade-up 0.26s ease-out;
}

.auth-form label {
  color: #b8c6e6;
}

.auth-input {
  min-height: 50px;
  border: 1px solid rgba(157, 176, 216, 0.34);
  border-radius: 12px;
  background: rgba(14, 21, 34, 0.95);
  color: #eff4ff;
  padding: 12px;
}

.auth-input::placeholder {
  color: #8ea0c7;
}

.auth-input:focus {
  outline: none;
  border-color: rgba(104, 134, 234, 0.9);
  box-shadow: 0 0 0 4px rgba(54, 91, 203, 0.24);
}

.auth-submit {
  margin-top: 10px;
  min-height: 48px;
  border: 0;
  color: #f5f7ff;
  background: linear-gradient(135deg, var(--auth-accent-2), var(--auth-accent));
  box-shadow: 0 12px 28px rgba(24, 43, 111, 0.52);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(26, 48, 124, 0.62);
  filter: brightness(1.06);
}

.auth-submit:active {
  transform: translateY(0);
}

.alerts {
  margin-bottom: 14px;
}

.alert.ok {
  background: rgba(20, 75, 47, 0.45);
  border-color: rgba(94, 194, 131, 0.55);
  color: #bdffd7;
}

.alert.err {
  background: rgba(95, 31, 36, 0.46);
  border-color: rgba(230, 108, 108, 0.56);
  color: #ffd2d2;
}

@keyframes auth-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .auth-wrap {
    width: min(640px, 100%);
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    padding: 24px;
    gap: 10px;
  }



.auth-metrics {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .auth-body,
  .auth-wrap {
    padding: 12px;
  }

  .auth-wrap {
    width: 100%;
    gap: 12px;
  }

  .auth-brand-panel {
    display: grid;
    padding: 16px;
    gap: 8px;
    border-radius: 16px;
  }

  .auth-brand-panel h1 {
    font-size: 1.45rem;
    line-height: 1.2;
  }

  .auth-tagline {
    font-size: 0.92rem;
  }

  .auth-rules {
    padding: 10px;
  }

  .auth-rules ul {
    gap: 4px;
    font-size: 0.8rem;
  }

  .auth-rules ul li:nth-child(n+3) {
    display: none;
  }

  .auth-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .auth-metric:last-child {
    grid-column: 1 / -1;
  }

  .auth-card {
    padding: 18px;
    border-radius: 18px;
  }

  .tab-btn {
    padding: 10px 8px;
    font-size: 0.9rem;
  }

  .auth-input,
  .auth-submit {
    min-height: 48px;
  }
}


.auth-captcha-box {
  margin-top: 6px;
  border: 1px solid rgba(157, 174, 212, 0.28);
  border-radius: 12px;
  background: rgba(16, 24, 40, 0.5);
  padding: 12px;
}

.auth-captcha-title {
  margin: 0;
  color: #dce6ff;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-captcha-question {
  margin: 6px 0 10px;
  color: #afbedf;
  font-size: 0.9rem;
}

.auth-captcha-question strong {
  color: #f2f6ff;
}

/* ===== Dashboard Background Refresh (User Palette) ===== */
body.dash-body {
  position: relative;
  background:
    radial-gradient(900px 500px at -8% -10%, rgba(122, 209, 255, 0.22), transparent 62%),
    radial-gradient(700px 420px at 105% 8%, rgba(64, 126, 255, 0.2), transparent 66%),
    linear-gradient(165deg, #e8f1fb 0%, #d9e8f8 54%, #ccdef2 100%);
}

body.dash-body::before,
body.dash-body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

body.dash-body::before {
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(40, 78, 126, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(40, 78, 126, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

body.dash-body::after {
  width: 380px;
  height: 380px;
  top: -130px;
  right: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(106, 176, 255, 0.35), rgba(106, 176, 255, 0));
  filter: blur(8px);
}

.dash-body .phone-shell {
  position: relative;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(248, 252, 255, 0.94) 0%, rgba(236, 245, 255, 0.93) 100%) !important;
  border: 1px solid rgba(130, 164, 204, 0.52) !important;
  box-shadow: 0 18px 42px rgba(19, 42, 74, 0.2) !important;
}

.dash-body .hero-card,
.dash-body .chart-card,
.dash-body .inv-card,
.dash-body .stat-card,
.dash-body .wallet-card,
.dash-body .kpi-box {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 248, 255, 0.95)) !important;
  border-color: rgba(158, 182, 216, 0.72) !important;
  box-shadow: 0 8px 18px rgba(21, 42, 70, 0.1) !important;
}

.dash-body .brand-area h1,
.dash-body .hero-card h2,
.dash-body .chart-head h3 {
  color: #102c4f !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.dash-body .brand-area p,
.dash-body .hero-card p,
.dash-body .stat-head span,
.dash-body .wallet-card span,
.dash-body .kpi-box span,
.dash-body .chart-head span,
.dash-body .inv-item span,
.dash-body .empty-item {
  color: #5e728f !important;
}

.dash-body .btn-outline {
  border-color: #79bde9 !important;
  background: linear-gradient(135deg, #f8fcff, #e9f5ff) !important;
  color: #114f73 !important;
}

/* ===== Dashboard shell restore: keep main panel dark ===== */
body.dash-body .phone-shell {
  width: min(378px, 100%) !important;
  min-height: 86vh !important;
  padding: 11px 11px 70px !important;
  border-radius: 20px !important;
  border: 1px solid #3a315d !important;
  background: linear-gradient(180deg, #10131d 0%, #17142a 100%) !important;
  box-shadow: 0 8px 24px rgba(128, 90, 213, 0.22) !important;
}

body.dash-body .hero-card,
body.dash-body .chart-card,
body.dash-body .inv-card,
body.dash-body .stat-card,
body.dash-body .wallet-card,
body.dash-body .kpi-box {
  border: 1px solid #3d3263 !important;
  background: linear-gradient(180deg, #0f1322 0%, #17152a 100%) !important;
  box-shadow: 0 0 14px rgba(147, 51, 234, 0.16) !important;
}

body.dash-body .brand-area h1,
body.dash-body .hero-card h2,
body.dash-body .chart-head h3 {
  color: #e7ddff !important;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.24) !important;
}

body.dash-body .brand-area p,
body.dash-body .hero-card p,
body.dash-body .stat-head span,
body.dash-body .wallet-card span,
body.dash-body .kpi-box span,
body.dash-body .chart-head span,
body.dash-body .inv-item span,
body.dash-body .empty-item {
  color: #b5b8d6 !important;
}

body.dash-body .inv-item strong,
body.dash-body #invTitle {
  color: #ecefff !important;
}

body.dash-body .btn-outline {
  border-color: #7b57cc !important;
  background: linear-gradient(135deg, #1f1a32, #2a2142) !important;
  color: #d8c8ff !important;
}

/* ===== Unified User Background: dash + subpages (black/purple + bouncing spheres) ===== */
body.dash-body,
body.page-body {
  position: relative;
  background:
    radial-gradient(920px 520px at -10% -12%, rgba(176, 104, 255, 0.2), transparent 62%),
    radial-gradient(760px 420px at 110% 6%, rgba(111, 66, 193, 0.24), transparent 68%),
    linear-gradient(162deg, #07080f 0%, #120f20 52%, #0a0b12 100%) !important;
}

body.dash-body::before,
body.page-body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(160, 118, 222, 0.11) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(160, 118, 222, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.34;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 82%, transparent);
}

body.dash-body::after,
body.page-body::after {
  content: '';
  position: fixed;
  inset: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  pointer-events: none;
  z-index: 0;
  filter: blur(4px);
  background-repeat: no-repeat;
  background-image:
    radial-gradient(circle, rgba(185, 126, 255, 0.24) 0 58%, transparent 62%),
    radial-gradient(circle, rgba(138, 86, 222, 0.2) 0 58%, transparent 62%),
    radial-gradient(circle, rgba(170, 111, 255, 0.22) 0 58%, transparent 62%),
    radial-gradient(circle, rgba(110, 74, 198, 0.22) 0 58%, transparent 62%),
    radial-gradient(circle, rgba(196, 144, 255, 0.2) 0 58%, transparent 62%);
  background-size: 110px 110px, 86px 86px, 98px 98px, 120px 120px, 80px 80px;
  background-position: 6% 20%, 22% 78%, 48% 34%, 76% 64%, 92% 26%;
  animation: user-spheres-bounce 34s linear infinite;
}

@keyframes user-spheres-bounce {
  0% {
    background-position: 6% 20%, 22% 78%, 48% 34%, 76% 64%, 92% 26%;
  }

  25% {
    background-position: 18% 34%, 8% 58%, 70% 18%, 88% 78%, 72% 42%;
  }

  50% {
    background-position: 34% 56%, 30% 30%, 86% 42%, 52% 76%, 18% 64%;
  }

  75% {
    background-position: 16% 80%, 58% 14%, 62% 66%, 24% 44%, 80% 12%;
  }

  100% {
    background-position: 6% 20%, 22% 78%, 48% 34%, 76% 64%, 92% 26%;
  }
}



/* Mobile comfort patch */
@media (max-width: 680px) {
  .page-body,
  .dash-body {
    padding: 6px !important;
  }

  .user-subpage .page-shell,
  .page-shell,
  .packages-page .page-shell {
    width: 100% !important;
    max-width: none !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .global-topbar,
  .fixed-bottom-nav,
  .user-subpage .global-topbar,
  .user-subpage .fixed-bottom-nav {
    width: calc(100% - 10px) !important;
  }

  .global-topbar {
    padding: 10px 11px !important;
    border-radius: 12px !important;
  }

  .global-topbar__left strong {
    font-size: 0.92rem !important;
  }

  .global-topbar__left span {
    font-size: 0.74rem !important;
  }

  .page-header {
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .page-header h1 {
    font-size: 1.35rem !important;
    line-height: 1.2 !important;
    word-break: break-word;
  }

  .page-card {
    padding: 12px !important;
  }

  .inline-form {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .inline-form input,
  .inline-form select,
  .inline-form .btn-gold,
  .inline-form .btn-outline {
    width: 100% !important;
    min-width: 0 !important;
  }

  .table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  th,
  td {
    white-space: normal !important;
    word-break: break-word;
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
  }

  body.dash-body .phone-shell {
    width: 100% !important;
    min-height: 100vh !important;
    border-radius: 14px !important;
    padding: 11px 10px 78px !important;
  }

  .hero-card {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .hero-card .btn-gold.small {
    width: 100%;
    text-align: center;
  }

  .fixed-bottom-nav a,
  .dash-body .bottom-nav a {
    font-size: 0.72rem !important;
    padding: 10px 2px !important;
  }
}

@media (max-width: 420px) {
  .global-topbar__left span {
    font-size: 0.7rem !important;
  }

  .page-header h1 {
    font-size: 1.2rem !important;
  }

  .fixed-bottom-nav a,
  .dash-body .bottom-nav a {
    font-size: 0.68rem !important;
    padding: 9px 1px !important;
  }
}

/* Mobile + nav consistency patch v2 */
body.dash-body .phone-shell {
  width: min(430px, 100%) !important;
  max-width: 430px !important;
  padding-bottom: 84px !important;
}

.dash-body .fixed-bottom-nav {
  position: fixed !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  bottom: 8px !important;
  width: min(430px, calc(100% - 10px)) !important;
  z-index: 90 !important;
}

.sociedad-page .table-wrap {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 680px) {
  .sociedad-page .soc-table {
    min-width: 680px;
  }

  .sociedad-page .soc-table th,
  .sociedad-page .soc-table td {
    white-space: nowrap !important;
    word-break: normal !important;
  }

  .dash-body .stats-strip,
  .dash-body .wallet-strip,
  .dash-body .chart-kpis {
    grid-template-columns: 1fr !important;
  }

  .dash-body .fixed-bottom-nav {
    width: calc(100% - 10px) !important;
  }
}

/* Dashboard mobile match web-card layout */
@media (max-width: 680px) {
  body.dash-body .phone-shell {
    width: min(390px, 100%) !important;
    max-width: 390px !important;
    min-height: 90vh !important;
    padding: 10px 10px 80px !important;
    border-radius: 18px !important;
  }

  .dash-body .hero-card {
    flex-direction: row !important;
    align-items: end !important;
    gap: 10px !important;
  }

  .dash-body .hero-card h2 {
    font-size: 1.02rem !important;
  }

  .dash-body .hero-card p {
    font-size: 0.72rem !important;
    margin-top: 6px !important;
  }

  .dash-body .hero-card .btn-gold.small {
    width: auto !important;
    font-size: 0.76rem !important;
    padding: 8px 10px !important;
  }

  .dash-body .stats-strip,
  .dash-body .wallet-strip,
  .dash-body .chart-kpis {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .dash-body .stat-card,
  .dash-body .wallet-card,
  .dash-body .kpi-box {
    padding: 9px !important;
  }

  .dash-body .stat-card strong,
  .dash-body .wallet-card strong,
  .dash-body .kpi-box strong {
    font-size: 0.86rem !important;
  }

  .dash-body .fixed-bottom-nav {
    width: min(390px, calc(100% - 10px)) !important;
  }
}

@media (max-width: 380px) {
  .dash-body .stats-strip,
  .dash-body .wallet-strip,
  .dash-body .chart-kpis {
    grid-template-columns: 1fr !important;
  }
}

/* Sociedad final fix: no horizontal drag */
@media (max-width: 680px) {
  .sociedad-page .soc-table {
    min-width: 0 !important;
    width: 100% !important;
    table-layout: fixed !important;
  }

  .sociedad-page .soc-table th,
  .sociedad-page .soc-table td {
    white-space: normal !important;
    word-break: break-word !important;
  }
}

/* User subpages: light gold titles for dark background */
.user-subpage .page-header h1,
.sociedad-page .page-header h1,
.support-page .page-header h1 {
  color: #f6d88a !important;
  text-shadow: 0 0 10px rgba(246, 216, 138, 0.28) !important;
}

/* Support chat sender name contrast fix */
.support-page .chat-card .chat-bubble strong {
  color: #1a3552 !important;
  text-shadow: none !important;
}

/* Support file picker in Spanish */
.support-page .file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.support-page .file-picker {
  display: grid;
  gap: 6px;
}

.support-page .file-picker-name {
  color: #9fb0c7;
  font-size: 0.78rem;
  word-break: break-word;
}

/* Promos page compact purple cards */
.promos-page .promo-section,
.promos-page .promo-balance-card {
  background: linear-gradient(180deg, #0f1324, #17162d) !important;
  border-color: #4b3a83 !important;
  box-shadow: 0 0 14px rgba(157, 92, 255, 0.16) !important;
}

.promos-page .promo-section h2,
.promos-page .promo-balance-card h2 {
  color: #e7d8ff !important;
}

.promos-page .promo-list.compact {
  display: grid;
  gap: 8px;
}

.promos-page .promo-item {
  border: 1px solid #5a4798;
  border-radius: 10px;
  background: linear-gradient(160deg, #171430, #1d1736);
  padding: 8px 10px;
  display: grid;
  gap: 5px;
}

.promos-page .promo-item.is-active {
  border-color: #8f6cff;
  box-shadow: 0 0 14px rgba(143, 108, 255, 0.22);
}

.promos-page .promo-main {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.promos-page .promo-main strong {
  color: #f3e8ff;
  font-size: 0.92rem;
}

.promos-page .promo-main span {
  color: #c8b7ee;
  font-size: 0.82rem;
  text-align: right;
}

.promos-page .promo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.promos-page .promo-meta small {
  border: 1px solid #624caa;
  border-radius: 999px;
  padding: 2px 8px;
  color: #d8c8ff;
  font-size: 0.72rem;
  background: rgba(110, 79, 190, 0.18);
}

@media (max-width: 680px) {
  .promos-page .promo-item {
    padding: 8px 9px;
    border-radius: 9px;
  }

  .promos-page .promo-main strong {
    font-size: 0.88rem;
  }

  .promos-page .promo-main span {
    font-size: 0.76rem;
  }

  .promos-page .promo-meta small {
    font-size: 0.68rem;
    padding: 2px 7px;
  }
}

.promos-page .promo-desc {
  margin: 0;
  color: #cfc0f2;
  font-size: 0.77rem;
  line-height: 1.3;
}

@media (max-width: 680px) {
  .promos-page .promo-desc {
    font-size: 0.72rem;
  }
}

/* Empresas page */
.empresas-page .empresas-summary,
.empresas-page .empresas-list-card {
  background: linear-gradient(180deg, #101428, #171730) !important;
  border-color: #4b3d82 !important;
  box-shadow: 0 0 14px rgba(157, 92, 255, 0.16) !important;
}

.empresas-page .empresas-summary h2,
.empresas-page .empresas-list-card h2 {
  color: #e8dbff !important;
}

.empresas-page .empresas-list {
  display: grid;
  gap: 8px;
}

.empresas-page .empresa-item {
  border: 1px solid #5b4898;
  border-radius: 11px;
  background: linear-gradient(160deg, #171431, #1d1737);
  padding: 9px;
}

.empresas-page .empresa-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.empresas-page .empresa-head strong {
  color: #f0e7ff;
  font-size: 0.95rem;
}

.empresas-page .empresa-head span {
  color: #d8c9ff;
  font-weight: 700;
  font-size: 0.88rem;
}

.empresas-page .empresa-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.empresas-page .empresa-grid div {
  border: 1px solid #4f3f88;
  border-radius: 9px;
  padding: 7px;
  background: rgba(97, 72, 173, 0.14);
}

.empresas-page .empresa-grid small {
  color: #cdbef0;
  font-size: 0.72rem;
}

.empresas-page .empresa-grid p {
  margin: 3px 0 0;
  color: #efe8ff;
  font-size: 0.84rem;
  font-weight: 700;
}

@media (max-width: 420px) {
  .empresas-page .empresa-grid {
    grid-template-columns: 1fr;
  }
}

/* Admin tabs: split sections by buttons */
.admin-tabbar {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-tab-btn {
  border: 1px solid #5d4b9f;
  background: linear-gradient(135deg, #17142d, #221a3f);
  color: #d6c9ff;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.admin-tab-btn.active {
  border-color: #9a79ff;
  background: linear-gradient(135deg, #7b4fff, #b25dff);
  color: #fff;
  box-shadow: 0 0 14px rgba(154, 121, 255, 0.28);
}

.admin-section {
  display: none;
}

.admin-section.is-visible {
  display: block;
}

@media (max-width: 680px) {
  .admin-tabbar {
    gap: 6px;
  }

  .admin-tab-btn {
    padding: 7px 10px;
    font-size: 0.78rem;
  }
}

/* Admin title/readability polish */
.admin-body .page-header h1,
.admin-body .admin-card h2 {
  color: #f6d88a !important;
  text-shadow: 0 0 10px rgba(246, 216, 138, 0.26) !important;
}

.admin-body th,
.admin-body td {
  color: #e8edf8;
}

.admin-body th {
  background: rgba(137, 104, 230, 0.18);
  border-bottom-color: #5f4ea0;
}

.admin-body td {
  border-bottom-color: #3e3766;
}

/* Admin table contrast fix on white cards */
.admin-body .admin-card table {
  color: #1f2430 !important;
}

.admin-body .admin-card th {
  color: #2a2f3d !important;
  background: #ebe8f8 !important;
  border-bottom: 1px solid #c8c1ea !important;
}

.admin-body .admin-card td {
  color: #273041 !important;
  border-bottom: 1px solid #d6dced !important;
}

.admin-body .admin-card td strong,
.admin-body .admin-card td span,
.admin-body .admin-card td small {
  color: #273041 !important;
}


/* --- UX fixes March 2026 --- */
.table-wrap.table-wrap-y {
  max-height: 260px;
  overflow: auto;
  border: 1px solid rgba(117, 130, 156, 0.24);
  border-radius: 10px;
}

.inline-badge {
  margin-left: 8px;
  vertical-align: middle;
}

.icon-btn.has-alert {
  position: relative;
}

.icon-btn.has-alert::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff2e63;
  box-shadow: 0 0 0 2px rgba(255, 46, 99, 0.24);
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker {
  display: grid;
  gap: 6px;
}

.file-picker-name {
  color: #6f7784;
  font-size: 0.78rem;
  word-break: break-word;
}

.admin-tab-btn .msg-badge {
  margin-left: 6px;
  vertical-align: middle;
}

body.dash-body .chart-card {
  background: linear-gradient(165deg, #141935, #0f1430) !important;
  border-color: #4f3f8e !important;
  box-shadow: 0 0 24px rgba(110, 80, 184, 0.22) !important;
}

body.dash-body .chart-head h3,
body.dash-body .chart-head span,
body.dash-body .kpi-box span,
body.dash-body .kpi-box strong,
body.dash-body .chart-mini-meta small {
  color: #e8dcff !important;
}

body.dash-body #chart {
  border-color: #5b4ba1 !important;
  background: linear-gradient(180deg, #111a34, #13182f) !important;
}

body.dash-body .inv-item,
body.dash-body .empty-item,
body.dash-body .inv-card {
  background: linear-gradient(165deg, #151932, #12172b) !important;
  border-color: #4f4484 !important;
  color: #e9ddff !important;
}

body.dash-body .inv-item span,
body.dash-body .empty-item {
  color: #c9b9ee !important;
}

body.dash-body .kpi-box {
  background: rgba(77, 57, 148, 0.24) !important;
  border-color: #5e4ca0 !important;
}


/* Banks select readability + recargas picker alignment */
.retiros-page .card-form select,
.retiros-page form.inline-form select,
.retiros-page form.inline-form option {
  background: #141a2b !important;
  color: #ece7ff !important;
}

.retiros-page .card-form select option,
.retiros-page form.inline-form select option {
  background: #141a2b;
  color: #ece7ff;
}

.recharge-upload-form {
  align-items: flex-start;
}

.recharge-upload-form .file-picker-compact {
  display: inline-flex;
  align-items: center;
  min-width: 180px;
}

.recharge-upload-form .file-picker-name-inline {
  width: 100%;
  margin-top: -2px;
  margin-bottom: 2px;
}

@media (max-width: 680px) {
  .recharge-upload-form {
    gap: 10px;
  }

  .recharge-upload-form .file-picker-compact,
  .recharge-upload-form .btn-gold,
  .recharge-upload-form input[type='number'] {
    width: 100%;
  }

  .recharge-upload-form .file-picker-compact .btn-outline {
    width: 100%;
  }

  .recharge-upload-form .file-picker-name-inline {
    margin-top: -6px;
  }
}

.user-subpage .inline-form select option { background: #141a2b; color: #ece7ff; }


/* Investment selector UX */
.inv-list {
  max-height: 230px;
  overflow: auto;
}

.inv-item.is-active {
  border-color: #39ff14 !important;
  box-shadow: 0 0 0 1px rgba(57, 255, 20, 0.35), 0 0 16px rgba(57, 255, 20, 0.16);
  background: linear-gradient(165deg, #16213a, #111a2f) !important;
}

.inv-item.is-active strong {
  color: #b8ffae !important;
}

.admin-form textarea { border: 1px solid var(--line); border-radius: 11px; background: #ffffff; color: var(--text); padding: 11px; font-family: inherit; min-height: 92px; resize: vertical; }

.user-subpage .admin-form textarea { background: linear-gradient(180deg, #0d1220, #12182a) !important; border-color: #4b3a83 !important; color: #e9e4ff !important; }



/* Admin dark unify */
.admin-body .page-card,
.admin-body .admin-card,
.admin-body .admin-item {
  background: linear-gradient(165deg, #141935, #0f1430) !important;
  border-color: #4f3f8e !important;
  box-shadow: 0 0 22px rgba(110, 80, 184, 0.2) !important;
}

.admin-body .row-title {
  background: rgba(116, 92, 196, 0.22) !important;
  border-color: #5f4ea0 !important;
  color: #efe7ff !important;
}

.admin-body .hint,
.admin-body p,
.admin-body small,
.admin-body label,
.admin-body span,
.admin-body strong,
.admin-body td,
.admin-body th {
  color: #e9e2ff !important;
}

.admin-body .table-wrap,
.admin-body .admin-card table {
  background: transparent !important;
}

.admin-body .admin-card th {
  background: rgba(137, 104, 230, 0.18) !important;
  color: #e8ddff !important;
  border-bottom: 1px solid #5f4ea0 !important;
}

.admin-body .admin-card td {
  background: transparent !important;
  color: #e9e2ff !important;
  border-bottom: 1px solid #3e3766 !important;
}

.admin-body .admin-card td strong,
.admin-body .admin-card td span,
.admin-body .admin-card td small {
  color: #e9e2ff !important;
}

.admin-body .admin-form input,
.admin-body .admin-form select,
.admin-body .admin-item input,
.admin-body .admin-item select,
.admin-body .admin-form textarea,
.admin-body .inline-form input,
.admin-body .inline-form select {
  background: linear-gradient(180deg, #0d1220, #12182a) !important;
  border-color: #4b3a83 !important;
  color: #e9e4ff !important;
}

.admin-body .admin-form input::placeholder,
.admin-body .admin-item input::placeholder,
.admin-body .admin-form textarea::placeholder,
.admin-body .inline-form input::placeholder {
  color: #a79acb !important;
}

.admin-body .admin-form select option,
.admin-body .admin-item select option,
.admin-body .inline-form select option {
  background: #141a2b;
  color: #ece7ff;
}

.admin-body .admin-form input:focus,
.admin-body .admin-form select:focus,
.admin-body .admin-item input:focus,
.admin-body .admin-item select:focus,
.admin-body .admin-form textarea:focus,
.admin-body .inline-form input:focus,
.admin-body .inline-form select:focus {
  border-color: #9d5cff !important;
  box-shadow: 0 0 0 3px rgba(157, 92, 255, 0.22) !important;
}

.admin-body .btn-outline {
  border-color: #7f68cb !important;
  color: #ece5ff !important;
  background: linear-gradient(135deg, #1a1735, #241b45) !important;
}

.admin-body .btn-outline:hover {
  border-color: #9f84ff !important;
  box-shadow: 0 0 14px rgba(159, 132, 255, 0.22) !important;
}


/* Predicciones UX (usuario) */
.user-subpage .prediction-list {
  display: grid;
  gap: 10px;
}

.user-subpage .prediction-card {
  border: 1px solid #4b3a83;
  border-radius: 14px;
  background: linear-gradient(180deg, #0f1320, #171429);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.user-subpage .prediction-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.user-subpage .prediction-card__head strong {
  color: #efe8ff;
  font-size: 0.98rem;
}

.user-subpage .prediction-badge {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.user-subpage .prediction-badge.open {
  color: #8fffcf;
  background: rgba(20, 196, 95, 0.12);
  border-color: rgba(20, 196, 95, 0.35);
}

.user-subpage .prediction-badge.closed {
  color: #ffc3cb;
  background: rgba(255, 77, 95, 0.14);
  border-color: rgba(255, 77, 95, 0.35);
}

.user-subpage .prediction-question {
  margin: 0;
  color: #d4cdef !important;
  font-size: 0.9rem;
}

.user-subpage .prediction-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.user-subpage .prediction-metrics > div {
  border: 1px solid #3d335f;
  border-radius: 10px;
  background: rgba(18, 16, 33, 0.72);
  padding: 8px;
}

.user-subpage .prediction-metrics span {
  display: block;
  font-size: 0.75rem;
  color: #b9b0d8;
}

.user-subpage .prediction-metrics strong {
  color: #efe8ff;
  font-size: 0.93rem;
  word-break: break-word;
}

.user-subpage .prediction-form {
  margin-top: 2px;
}

.user-subpage .prediction-form .btn-gold {
  white-space: nowrap;
}

.user-subpage .admin-item {
  background: linear-gradient(180deg, #0f1320, #171429) !important;
  border-color: #4b3a83 !important;
  color: #ece8ff !important;
}

@media (max-width: 680px) {
  .user-subpage .prediction-metrics {
    grid-template-columns: 1fr;
  }

  .user-subpage .prediction-form {
    flex-direction: column;
    align-items: stretch;
  }

  .user-subpage .prediction-form select,
  .user-subpage .prediction-form .btn-gold {
    width: 100%;
  }
}

.btn-gold:disabled,
.btn-outline:disabled,
select:disabled,
input:disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
}

.user-subpage .prediction-form--disabled .btn-gold {
  background: linear-gradient(135deg, #4f4a64, #6a5f86) !important;
  box-shadow: none !important;
  color: #ece8ff !important;
}

.tier-mid {
  border-color: #b78cff;
  box-shadow: inset 0 0 0 1px rgba(183, 140, 255, 0.22);
}

.mid-card .tier-tag {
  background: linear-gradient(135deg, #4a2a7a, #7c3aed);
  color: #f3e9ff;
}

.empresas-collection-list {
  display: grid;
  gap: 8px;
}

.empresa-collect-item {
  border: 1px solid #3d335f;
  border-radius: 11px;
  padding: 8px;
  background: rgba(19, 16, 36, 0.72);
}

.empresas-rank-card .rank-badge-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.rank-badge-symbol {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.28);
}

.rank-card-inicio .rank-badge-symbol {
  background: linear-gradient(135deg, #64748b, #94a3b8);
}

.rank-card-emprendedor .rank-badge-symbol {
  background: linear-gradient(135deg, #92400e, #f59e0b);
}

.rank-card-empresario .rank-badge-symbol {
  background: linear-gradient(135deg, #334155, #94a3b8);
}

.rank-card-corporativo .rank-badge-symbol {
  background: linear-gradient(135deg, #b45309, #facc15);
}

.empresas-rank-card {
  border-color: #6a52ab !important;
  box-shadow: 0 0 22px rgba(168, 85, 247, 0.22), inset 0 0 0 1px rgba(187, 146, 255, 0.18);
}

.rank-main-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0;
}

.rank-main-stat {
  border: 1px solid #4d3a86;
  border-radius: 10px;
  background: rgba(18, 16, 33, 0.78);
  padding: 8px;
}

.rank-main-stat span {
  display: block;
  font-size: 0.74rem;
  color: #c7bdf3;
}

.rank-main-stat strong {
  color: #f2ebff;
  font-size: 0.95rem;
}

.rank-progress-wrap {
  margin: 6px 0 10px;
}

.rank-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  border: 1px solid #4b3a83;
  background: rgba(20, 17, 36, 0.85);
  overflow: hidden;
}

.rank-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #39ff14);
  box-shadow: 0 0 14px rgba(57, 255, 20, 0.28);
}

.rank-roadmap {
  margin-top: 8px;
}

.rank-roadmap h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.rank-roadmap-list {
  display: grid;
  gap: 8px;
}

.rank-roadmap-item {
  border: 1px solid #4d3a86;
  border-radius: 10px;
  padding: 8px;
  background: rgba(18, 16, 33, 0.76);
}

.rank-roadmap-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.rank-mini-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #d946ef);
}

.rank-roadmap-item.rank-card-emprendedor .rank-mini-badge {
  background: linear-gradient(135deg, #92400e, #f59e0b);
}

.rank-roadmap-item.rank-card-empresario .rank-mini-badge {
  background: linear-gradient(135deg, #334155, #94a3b8);
}

.rank-roadmap-item.rank-card-corporativo .rank-mini-badge {
  background: linear-gradient(135deg, #b45309, #facc15);
}

@media (max-width: 680px) {
  .rank-main-grid {
    grid-template-columns: 1fr;
  }
}

.pred-help-pill {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  color: #111827;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  margin-left: 6px;
}

.prediction-help {
  border: 1px solid #4d3a86;
  border-radius: 10px;
  background: rgba(19, 16, 36, 0.7);
  padding: 8px;
}

.prediction-help summary {
  cursor: pointer;
  font-weight: 700;
  color: #efe8ff;
}

.prediction-help p {
  margin: 6px 0 0;
}

.prediction-votes {
  border: 1px solid #3e335f;
  border-radius: 10px;
  background: rgba(16, 14, 30, 0.72);
  padding: 8px;
}

.prediction-votes__title {
  display: block;
  font-size: 0.76rem;
  color: #d5cafe;
  margin-bottom: 5px;
}

.prediction-vote-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #322a4e;
  padding-top: 5px;
  margin-top: 5px;
}

.prediction-vote-row small {
  color: #c9c0ea;
}

.empresas-page .accordion-btn {
  width: 100%;
}

.empresas-page .accordion-btn h2 {
  margin: 0;
  text-align: left;
}
