/* ==========================================================================
   login.css — Pantalla de acceso (split screen)
   ========================================================================== */

.auth-wrap {
  min-height: 100vh;
  display: flex;
}

/* ---------------------------------------------------------------------
   Panel izquierdo — identidad de marca
--------------------------------------------------------------------- */
.auth-brand {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 82% 88%, rgba(53, 197, 232, 0.20), transparent 45%),
    radial-gradient(circle at 12% 18%, rgba(47, 111, 237, 0.25), transparent 40%),
    var(--bg);
}

.auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.5) 0, transparent 100%),
    radial-gradient(1px 1px at 70% 15%, rgba(255,255,255,.4) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 40% 70%, rgba(255,255,255,.5) 0, transparent 100%),
    radial-gradient(1px 1px at 85% 55%, rgba(255,255,255,.35) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 55% 40%, rgba(255,255,255,.4) 0, transparent 100%),
    radial-gradient(1px 1px at 10% 80%, rgba(255,255,255,.4) 0, transparent 100%);
  opacity: .6;
  pointer-events: none;
}

.auth-brand-logo {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}
.auth-brand-logo span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .02em;
}
.auth-brand-logo .mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: #04101f;
}

.auth-brand-copy {
  position: relative;
  z-index: 1;
  max-width: 460px;
}
.auth-brand-copy .badge { margin-bottom: 18px; }
.auth-brand-copy h1 {
  font-size: 34px;
  line-height: 1.2;
  margin-bottom: 14px;
}
.auth-brand-copy h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-brand-copy p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 28px;
}

.auth-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text);
}
.auth-features .dot {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.auth-brand-footer {
  position: relative;
  z-index: 1;
  color: var(--text-faint);
  font-size: 12px;
}

/* ---------------------------------------------------------------------
   Panel derecho — formulario
--------------------------------------------------------------------- */
.auth-form-side {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--surface);
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-tabs {
  display: flex;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 28px;
}
.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 10px;
  border-radius: 6px;
  transition: background .15s ease, color .15s ease;
}
.auth-tab.active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--border);
}

.auth-card h2 {
  font-size: 22px;
  margin-bottom: 6px;
}
.auth-card .subtitle {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-bottom: 26px;
}

/* ====================================================================
   Mensajes de autenticación
   ==================================================================== */
.auth-message {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}

.auth-message.success {
  background: #143a2a;
  border-color: #44ff88;
  color: #9bffc9;
}

.auth-message.error {
  background: #3a1414;
  border-color: #ff4444;
  color: #ff9b9b;
}

/* ====================================================================
   Campos del formulario
   ==================================================================== */
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  transition: border-color .15s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--cyan);
}
.field input::placeholder {
  color: var(--text-faint);
}

.field-password {
  position: relative;
}
.field-password input {
  padding-right: 44px;
}
.field-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  cursor: pointer;
}
.field-toggle:hover {
  color: var(--cyan);
}
.field-toggle svg {
  display: block;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 13px;
}
.field-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}
.field-check input {
  width: 15px;
  height: 15px;
  padding: 0;
  accent-color: var(--cyan);
}
.link-muted {
  color: var(--cyan);
  font-size: 13px;
  text-decoration: none;
}
.link-muted:hover {
  text-decoration: underline;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-faint);
  font-size: 12px;
  margin: 22px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.social-row {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}
.social-row .btn-outline {
  flex: 1;
  font-size: 13px;
}

.btn-primary {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: opacity .15s ease;
}
.btn-primary:hover {
  opacity: .85;
}
.btn-primary.is-loading {
  pointer-events: none;
  color: transparent;
  position: relative;
}
.btn-primary.is-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin .6s linear infinite;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 20px;
}
.auth-switch a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 500;
}
.auth-switch a:hover {
  text-decoration: underline;
}

.hidden {
  display: none;
}

.brand-logo-img {
  height: 170px;
  width: auto;
  object-fit: contain;
}

@media (max-width: 900px) {
  .auth-brand {
    display: none;
  }
  .auth-form-side {
    padding: 24px 16px;
  }
  .auth-card {
    max-width: 100%;
  }
}