/* ============================================================
   auth.css — Estilos de las páginas de autenticación
   ============================================================ */

@import url('variables.css');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: var(--font-body);
  background:  var(--admin-bg);
  color:       var(--text-primary);
  min-height:  100vh;
  display:     flex;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout auth ──────────────────────────────────────────── */
.auth-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Panel izquierdo: decorativo */
.auth-panel {
  flex: 1;
  background: var(--admin-surface);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.auth-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255,107,53,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(255,107,53,0.06) 0%, transparent 50%);
}

/* Grid decorativo de fondo */
.auth-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--admin-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--admin-border) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  opacity: 0.4;
}

.auth-panel-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 400px;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
  text-decoration: none;
}

.auth-logo-icon {
  width: 48px; height: 48px;
  background: var(--accent);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: var(--accent-glow);
}

.auth-logo-text {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.auth-logo-text span { color: var(--accent); }

.auth-headline {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 16px;
}

.auth-headline em {
  font-style: normal;
  color: var(--accent);
}

.auth-subheadline {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Features list */
.auth-features {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-feature-icon {
  width: 36px; height: 36px;
  background: var(--accent-dim);
  border: 1px solid rgba(255,107,53,0.2);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* Panel derecho: formulario */
.auth-form-panel {
  width: 480px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  background: var(--admin-bg);
  border-left: 1px solid var(--admin-border);
}

.auth-form-wrap {
  width: 100%;
  max-width: 360px;
}

.auth-form-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-form-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* Form elements */
.auth-form-group {
  margin-bottom: 18px;
}

.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
  transition: color var(--transition-fast);
}

.auth-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: all var(--transition-fast);
}

.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: var(--admin-surface-2);
}

.auth-input:focus + .auth-input-icon,
.auth-input-wrap:focus-within .auth-input-icon {
  color: var(--accent);
}

.auth-input::placeholder { color: var(--text-muted); }

/* Password toggle */
.auth-input-toggle {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  transition: color var(--transition-fast);
  background: none;
  border: none;
  padding: 4px;
}
.auth-input-toggle:hover { color: var(--text-primary); }

/* Remember + forgot */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 13px;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  cursor: pointer;
}

.auth-remember input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.auth-forgot {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}
.auth-forgot:hover { color: var(--accent-light); }

/* Submit button */
.auth-submit {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.auth-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.auth-submit:hover {
  background: var(--accent-light);
  box-shadow: var(--accent-glow);
  transform: translateY(-1px);
}

.auth-submit:active { transform: translateY(0); }

/* Alert */
.auth-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: 20px;
  animation: shake 0.4s ease;
}
.auth-alert-error {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.2);
}
.auth-alert-success {
  background: var(--success-dim);
  color: var(--success);
  border: 1px solid rgba(34,197,94,0.2);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-top: 24px;
  transition: color var(--transition-fast);
}
.auth-back:hover { color: var(--text-primary); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-panel { display: none; }
  .auth-form-panel {
    width: 100%;
    border-left: none;
    padding: 40px 24px;
  }
}