/* ============================================================
   DATASOLAR - CSS Login / Auth
   ============================================================ */

body.auth-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #1B3A6B 0%, #2B5BA1 50%, #1B3A6B 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Fondo solar animado */
body.auth-body::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(245,197,24,.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(245,197,24,.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(75,127,193,.15) 0%, transparent 70%);
  animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0%   { opacity: .6; }
  100% { opacity: 1; }
}

/* Partículas decorativas */
.auth-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(245,197,24,.3);
  border-radius: 50%;
  animation: float linear infinite;
}

@keyframes float {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-10px) scale(1); opacity: 0; }
}

/* Card de login */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 24px 64px rgba(0,0,0,.25), 0 0 0 1px rgba(255,255,255,.1);
  position: relative;
  z-index: 10;
  animation: authCardIn .5s cubic-bezier(.34,1.56,.64,1) forwards;
}

@keyframes authCardIn {
  from { opacity: 0; transform: translateY(30px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #F5C518, #D4A500);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 8px 24px rgba(245,197,24,.35);
  margin-bottom: 12px;
}

.auth-logo-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1B3A6B;
  letter-spacing: -.5px;
}

.auth-logo-sub {
  font-size: .75rem;
  color: #6C757D;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.auth-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: .875rem;
  color: #6C757D;
  margin-bottom: 28px;
}

/* Inputs de auth */
.auth-input-wrap {
  position: relative;
  margin-bottom: 16px;
}

.auth-input {
  width: 100%;
  padding: 13px 14px 13px 44px;
  border: 1.5px solid #DEE2E6;
  border-radius: 12px;
  font-size: .9rem;
  font-family: inherit;
  color: #212529;
  background: #F8F9FA;
  transition: all .2s ease;
  outline: none;
}

.auth-input:focus {
  border-color: #2B5BA1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(43,91,161,.1);
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #ADB5BD;
  font-size: 1.1rem;
  pointer-events: none;
  transition: color .2s;
}

.auth-input:focus + .auth-input-icon { color: #2B5BA1; }

.auth-input-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #ADB5BD;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  transition: color .2s;
}

.auth-input-toggle:hover { color: #2B5BA1; }

/* Checkbox recordarme */
.auth-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
  color: #495057;
  cursor: pointer;
  user-select: none;
}

.auth-check-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2B5BA1;
  cursor: pointer;
}

/* Botón de submit */
.btn-auth {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #2B5BA1, #1B3A6B);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn-auth::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.1), transparent);
}

.btn-auth:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(27,58,107,.35);
}

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

.btn-auth:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

/* Links */
.auth-link {
  color: #2B5BA1;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s;
}

.auth-link:hover { color: #1B3A6B; text-decoration: underline; }

/* Divisor */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #ADB5BD;
  font-size: .8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #DEE2E6;
}

/* Alert dentro de auth */
.auth-alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: .855rem;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.auth-alert.error {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

.auth-alert.success {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.auth-alert.info {
  background: #DBEAFE;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

/* Solar dots decorativos */
.auth-decoration {
  position: absolute;
  pointer-events: none;
}

.auth-decoration.top-right {
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border: 2px dashed rgba(245,197,24,.2);
  border-radius: 50%;
}

.auth-decoration.bottom-left {
  bottom: -20px;
  left: -20px;
  width: 80px;
  height: 80px;
  background: rgba(245,197,24,.06);
  border-radius: 50%;
}

/* Footer del card */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #F0F0F0;
  font-size: .78rem;
  color: #ADB5BD;
}

/* Responsive */
@media (max-width: 480px) {
  .auth-card { padding: 28px 24px; margin: 16px; border-radius: 16px; }
}
