/* ============= RESET BÁSICO ============= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============= FONDO GENERAL ============= */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Poppins", sans-serif;
  background:
    radial-gradient(circle at 0% 0%, #301848 0, #020617 45%, #000 100%),
    radial-gradient(circle at 100% 100%, #0ea5e9 0, #020617 55%, #000 100%);
  color: #e5e7eb;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 32px 16px;
}

/* Contenedor principal genérico (sirve para / y para /panel) */
main,
.container,
.wrapper {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ============= CABECERAS ============= */

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: 0.04em;
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, #38bdf8, #a855f7, #f97316);
  -webkit-background-clip: text;
  color: transparent;
}

h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: #e5e7eb;
}

/* Subtítulo bajo el h1 */
.subtitle {
  color: #9ca3af;
  margin-bottom: 1.5rem;
}

/* ============= TARJETAS / CAJAS ============= */

.card,
.panel,
.auth-card {
  background: radial-gradient(circle at top left, #0f172a, #020617 55%);
  border-radius: 18px;
  padding: 24px 20px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow:
    0 0 40px rgba(56, 189, 248, 0.12),
    0 0 80px rgba(168, 85, 247, 0.15);
  backdrop-filter: blur(12px);
}

/* Layout típico de panel: info izquierda, acciones derecha */
.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .panel-grid {
    grid-template-columns: 1fr;
  }
}

/* ============= TEXTOS GENERALES ============= */

p {
  margin-bottom: 0.75rem;
  color: #cbd5f5;
  line-height: 1.5;
}

strong {
  color: #e5e7eb;
}

/* ============= BOTONES ============= */

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.6rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 0.95rem;
  color: #0b1220;
  background-image: linear-gradient(120deg, #22d3ee, #6366f1, #ec4899);
  background-size: 200% 200%;
  box-shadow:
    0 10px 25px rgba(37, 99, 235, 0.35),
    0 0 18px rgba(236, 72, 153, 0.45);
  transition:
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out,
    background-position 0.25s ease-out,
    filter 0.15s ease-out;
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
  background-position: 100% 0;
  filter: brightness(1.05);
  box-shadow:
    0 14px 30px rgba(37, 99, 235, 0.45),
    0 0 25px rgba(236, 72, 153, 0.55);
}

button:active,
.btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow:
    0 6px 16px rgba(15, 23, 42, 0.8),
    0 0 10px rgba(56, 189, 248, 0.6);
}

/* Botón secundario (ej. Cerrar sesión) */
.btn-secondary {
  background: transparent;
  border: 1px solid #64748b;
  color: #e5e7eb;
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(15, 23, 42, 0.85);
  border-color: #e5e7eb;
}

/* ============= INPUTS Y FORMULARIOS ============= */

form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

label {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 0.15rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background-color: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  outline: none;
  font-size: 0.95rem;
  transition:
    border-color 0.15s ease-out,
    box-shadow 0.15s ease-out,
    background-color 0.15s ease-out,
    transform 0.08s ease-out;
}

input::placeholder {
  color: #6b7280;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
  background-color: rgba(15, 23, 42, 0.98);
  transform: translateY(-1px);
}

/* Inputs en línea (ej. cambiar contraseña) */
.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.form-inline input {
  flex: 1 1 150px;
}

/* ============= PANEL DE USUARIO ============= */

/* Contenedor principal del panel (usa el body que ya tienes) */
body.panel-page {
  align-items: stretch;
}

/* Encabezado con título + botón cerrar sesión */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

/* Stats: Balance, depósitos, referidos, etc. */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: radial-gradient(circle at top, #1e293b, #020617 80%);
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 0.3rem;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #e5e7eb;
}

/* Campo del link de referido */
.ref-link {
  margin-top: 0.75rem;
}

.ref-link input {
  font-size: 0.85rem;
}

/* Mensajes de estado */
.alert {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.alert.ok {
  color: #4ade80;
}

.alert.error {
  color: #f97373;
}

/* ============= SECCIONES DEL LANDING / LOGIN ============= */

/* Si en la página principal quieres 2 columnas (texto + formulario) */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  body {
    padding-top: 20px;
  }
  .hero {
    grid-template-columns: 1fr;
  }
}

/* Lado izquierdo: texto de marketing */
.hero-copy h1 {
  margin-bottom: 0.6rem;
}

.hero-copy p {
  max-width: 460px;
}

/* Tabs de login / registro si los usas */
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 1rem;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.tab {
  flex: 1;
  text-align: center;
  padding: 0.45rem 0.6rem;
  font-size: 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  color: #9ca3af;
  transition: background 0.18s ease-out, color 0.18s ease-out;
}

.tab.active {
  background: linear-gradient(120deg, #22d3ee, #6366f1);
  color: #0f172a;
}

/* Ocultar secciones por defecto, usas JS para mostrar */
.section-hidden {
  display: none;
}
