/* ============================================================
   auth.css — Estilos para páginas de autenticación
   Login, Register, Forgot Password, Reset Password
   ============================================================ */

/* ── Reset base ──────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Variables de color ──────────────────────────────────────────────────── */
:root {
  --auth-navy:      #0D1B2A;
  --auth-navy-2:    #080f1a;
  --auth-cyan:      #00B4D8;
  --auth-cyan-dim:  #0090ad;
  --auth-white:     #FFFFFF;
  --auth-error:     #EF4444;
  --auth-success:   #10B981;
}

/* ── Body ────────────────────────────────────────────────────────────────── */
body {
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(0,180,216,.2)  0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(15,52,96,.7)   0%, transparent 50%),
    radial-gradient(ellipse at 60% 5%,  rgba(0,120,180,.15) 0%, transparent 40%),
    #060e1a;
}

/* ── Fondo grid ──────────────────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(0,180,216,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,180,216,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* ── Contenedor centrado ─────────────────────────────────────────────────── */
.auth-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 400px;
}

/* ── Logo area ───────────────────────────────────────────────────────────── */
.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--auth-cyan);
  box-shadow: 0 4px 20px rgba(0,180,216,.4);
  margin-bottom: 16px;
}

.auth-logo-icon svg {
  width: 26px; height: 26px;
}

.auth-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 900;
  font-size: 26px;
  color: var(--auth-white);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 13.5px;
  color: rgba(255,255,255,.35);
}

/* ── Glass card ──────────────────────────────────────────────────────────── */
.auth-card {
  background: rgba(255,255,255,.045);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow:
    0 8px 40px rgba(0,0,0,.5),
    0  1px 0 rgba(255,255,255,.1) inset,
    0 -1px 0 rgba(0,0,0,.2) inset;
  overflow: hidden;
  position: relative;
}

/* Reflejo de luz superior */
.auth-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,.3) 30%,
    rgba(255,255,255,.5) 50%,
    rgba(255,255,255,.3) 70%,
    transparent 100%
  );
}

/* Brillo esquina superior izquierda */
.auth-card::after {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 180px; height: 180px;
  background: radial-gradient(ellipse at top left,
    rgba(0,180,216,.07) 0%, transparent 60%
  );
  pointer-events: none;
}

/* ── Secciones del card ──────────────────────────────────────────────────── */
.auth-card-body {
  padding: 28px 36px 32px;
  position: relative; z-index: 1;
}

.auth-card-footer {
  padding: 16px 36px 22px;
  border-top: 1px solid rgba(255,255,255,.06);
  text-align: center;
  font-size: 13.5px;
  color: rgba(255,255,255,.35);
  position: relative; z-index: 1;
}

/* ── Campos del formulario ───────────────────────────────────────────────── */
.auth-field {
  margin-bottom: 20px;
}

.auth-field:last-of-type {
  margin-bottom: 20px;
}

.auth-label {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: .09em;
}

.auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}

.auth-label-row .auth-label {
  margin-bottom: 0;
}

.auth-label-link {
  font-size: 12px;
  color: rgba(255,255,255,.35);
  text-decoration: none;
  transition: color .15s;
}

.auth-label-link:hover {
  color: var(--auth-cyan);
}

/* ── Inputs ──────────────────────────────────────────────────────────────── */
.auth-input {
  width: 100%;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14.5px;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--auth-white);
  outline: none;
  transition: all .2s;
}

.auth-input:focus {
  background: rgba(0,180,216,.1);
  border-color: rgba(0,180,216,.6);
  box-shadow: 0 0 0 3px rgba(0,180,216,.12);
}

.auth-input::placeholder {
  color: rgba(255,255,255,.2);
}

.auth-input.error {
  border-color: rgba(239,68,68,.5);
}

/* ── Remember me ─────────────────────────────────────────────────────────── */
.auth-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.auth-remember input[type="checkbox"] {
  width: 17px; height: 17px;
  accent-color: var(--auth-cyan);
  cursor: pointer;
  flex-shrink: 0;
}

.auth-remember label {
  font-size: 13px;
  color: rgba(255,255,255,.4);
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  font-weight: 400;
}

/* ── Botón principal ─────────────────────────────────────────────────────── */
.auth-btn {
  width: 100%;
  background: linear-gradient(135deg, #00C8F0 0%, #0090ad 100%);
  color: var(--auth-navy);
  font-weight: 700;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all .2s;
  font-family: 'Inter', system-ui, sans-serif;
  box-shadow: 0 4px 16px rgba(0,180,216,.35);
}

.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,180,216,.45);
}

.auth-btn:active {
  transform: translateY(0);
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.auth-error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.2);
  color: #fca5a5;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 20px;
}

.auth-success {
  background: rgba(16,185,129,.1);
  border: 1px solid rgba(16,185,129,.2);
  color: #6ee7b7;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 20px;
}

.auth-field-error {
  color: #fca5a5;
  font-size: 12px;
  margin-top: 5px;
}

/* ── Links generales ─────────────────────────────────────────────────────── */
a {
  color: var(--auth-cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Section label (register) ────────────────────────────────────────────── */
.auth-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--auth-cyan);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,180,216,.2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-section-label svg {
  width: 13px; height: 13px;
}

/* ── Hint text ───────────────────────────────────────────────────────────── */
.auth-hint {
  font-size: 11px;
  color: rgba(255,255,255,.25);
  margin-top: 5px;
}

/* ── [x-cloak] para Alpine.js ────────────────────────────────────────────── */
[x-cloak] { display: none !important; }