/* Estilos Premium para Login Khala */
:root {
  --bg-primary: #0a0518;
  --bg-card: rgba(18, 10, 36, 0.65);
  --border-card: rgba(147, 51, 234, 0.2);
  --accent-purple: #9333ea;
  --accent-purple-glow: rgba(147, 51, 234, 0.4);
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-error: #ef4444;
  --bg-error: rgba(239, 68, 68, 0.1);
  --font-family: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 30px 15px;
  position: relative;
}

/* Efectos de Brillo de Fondo */
.bg-glow-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
  pointer-events: none;
}

.bg-glow-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--accent-purple-glow) 0%, rgba(147, 51, 234, 0) 70%);
  top: -10%;
  left: -10%;
}

.bg-glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0) 70%);
  bottom: -15%;
  right: -10%;
}

.bg-glow-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(147, 51, 234, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 51, 234, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
  pointer-events: none;
}

/* Contenedor Principal */
.login-container {
  width: 100%;
  max-width: 460px;
  z-index: 10;
}

/* Tarjeta Glassmorphic */
.login-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 35px 28px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 
              0 0 40px rgba(147, 51, 234, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Área del Logo */
.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
  justify-content: center;
}

.logo-icon {
  font-size: 2.2rem;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.logo-text h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 50%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.logo-text .subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
  display: block;
}

/* Caja de Descarga de Cliente para Visitantes */
.client-download-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 25px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.download-badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.client-download-box h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #ffffff;
}

.download-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 15px;
  line-height: 1.35;
}

.btn-download {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  padding: 12px 18px;
  font-size: 0.92rem;
  text-decoration: none;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
  gap: 8px;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  filter: brightness(1.1);
  color: #ffffff;
}

.download-btn-icon {
  font-size: 1.1rem;
}

.client-features {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.72rem;
  color: #94a3b8;
}

/* Divisor elegante */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0 25px 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(147, 51, 234, 0.15);
}

.divider span {
  padding: 0 10px;
}

/* Formulario */
.auth-box h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.auth-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.4;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  background: rgba(10, 5, 24, 0.6);
  border: 1px solid rgba(147, 51, 234, 0.2);
  border-radius: 10px;
  padding: 12px 14px 12px 42px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

.input-wrapper input::placeholder {
  color: rgba(156, 163, 175, 0.4);
}

.input-wrapper input:focus {
  border-color: var(--accent-purple);
  background: rgba(10, 5, 24, 0.8);
  box-shadow: 0 0 12px rgba(147, 51, 234, 0.25);
}

/* Botón Premium */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family);
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(147, 51, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.5);
  filter: brightness(1.1);
}

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

.btn-full {
  width: 100%;
  padding: 13px;
}

.mt-4 {
  margin-top: 1.2rem;
}

/* Cuadro de Error */
.error-box {
  background: var(--bg-error);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  font-size: 0.85rem;
  color: #fca5a5;
  animation: shake 0.4s ease-in-out;
}

.error-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
