/* ============================================================
   Tokens de diseño — espejo del sistema de diseño del frontend
   ============================================================ */
:root {
  /* Paleta */
  --color-bg:            #1F1647;
  --color-bg-surface:    #2A1D52;
  --color-bg-elevated:   #352566;
  --color-bg-card:       #2D2058;

  --color-primary:       #8232F0;
  --color-primary-dark:  #561BDB;
  --color-accent:        #77EDED;
  --color-gold:          #F5B800;
  --color-danger:        #FF3D57;
  --color-success:       #00C853;
  --color-warning:       #F5B800;

  --color-text:          #FFFFFF;
  --color-text-muted:    rgba(255, 255, 255, 0.70);
  --color-text-dim:      rgba(255, 255, 255, 0.40);
  --color-border:        rgba(255, 255, 255, 0.10);

  /* Gradientes */
  --gradient-primary:    linear-gradient(135deg, #561BDB, #8232F0);

  /* Sombras */
  --shadow-card:         0 4px 24px rgba(0, 0, 0, 0.40);
  --shadow-primary:      0 0 20px rgba(130, 50, 240, 0.40);

  /* Geometría */
  --radius-sm:   0.5rem;
  --radius-md:   0.75rem;
  --radius-lg:   1rem;
  --radius-full: 9999px;

  /* Tipografía */
  --font-sans: system-ui, -apple-system, sans-serif;
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;

  /* Espaciado base (múltiplos de 4 px) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;

  /* Transición estándar */
  --transition: 150ms ease;
}

/* ============================================================
   Reset mínimo
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================================
   Base
   ============================================================ */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text);
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }

p {
  line-height: 1.6;
  color: var(--color-text-muted);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity var(--transition);
}
a:hover { opacity: 0.85; }

/* ============================================================
   Fondo con glow — igual que LoginView.vue del frontend
   ============================================================ */
.bg-glow {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.bg-glow::before {
  content: '';
  position: absolute;
  top: 25%;
  left: 50%;
  translate: -50% 0;
  width: 300px;
  height: 300px;
  background: rgba(130, 50, 240, 0.20);
  border-radius: 50%;
  filter: blur(100px);
}

.bg-glow::after {
  content: '';
  position: absolute;
  bottom: 25%;
  left: 50%;
  translate: -50% 0;
  width: 250px;
  height: 250px;
  background: rgba(119, 237, 237, 0.08);
  border-radius: 50%;
  filter: blur(80px);
}

/* ============================================================
   Logo
   ============================================================ */
.logo-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-6);
}

.logo-wrap img {
  height: 128px;
  width: auto;
  object-fit: contain;
}

/* ============================================================
   Card / glass-card
   ============================================================ */
.card {
  position: relative;
  z-index: 1;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  width: 100%;
  max-width: 420px;
  text-align: center;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
}

/* ============================================================
   Botones
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    opacity var(--transition);
}

.btn:hover  { transform: scale(1.02); opacity: 0.95; }
.btn:active { transform: scale(0.98); }
.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
}
.btn-primary:hover { box-shadow: var(--shadow-primary); }

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
}

.btn-danger {
  background: linear-gradient(135deg, #FF3D57, #C42040);
  color: #fff;
}

.btn-block { width: 100%; display: flex; }

/* ============================================================
   Alertas / mensajes flash
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  text-align: left;
  line-height: 1.5;
}

.alert-danger {
  background: rgba(255, 61, 87, 0.12);
  border: 1px solid rgba(255, 61, 87, 0.28);
  color: #ff7b8a;
}

.alert-warning {
  background: rgba(245, 184, 0, 0.10);
  border: 1px solid rgba(245, 184, 0, 0.25);
  color: var(--color-gold);
}

.alert-success {
  background: rgba(0, 200, 83, 0.10);
  border: 1px solid rgba(0, 200, 83, 0.25);
  color: #2ddd7a;
}

/* ============================================================
   Tipografía utilitaria
   ============================================================ */
.text-muted   { color: var(--color-text-muted); }
.text-dim     { color: var(--color-text-dim); }
.text-primary { color: var(--color-primary); }
.text-accent  { color: var(--color-accent); }
.text-gold    { color: var(--color-gold); }
.text-danger  { color: var(--color-danger); }
.text-success { color: var(--color-success); }

.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }

.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.uppercase     { text-transform: uppercase; letter-spacing: 0.05em; }

/* ============================================================
   Espaciado utilitario (márgenes y paddings más comunes)
   ============================================================ */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* ============================================================
   Divisor
   ============================================================ */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-6) 0;
}
