/* ============================================
   Auth / Login Page — Split Premium Design
   ============================================ */

.login-page {
  width: 100vw;
  height: 100vh;
  display: flex;
  background: linear-gradient(135deg, #090e1a 0%, #1c0e35 100%); /* Fondo unificado de gradiente para toda la pantalla */
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
}

/* --- Left Column: Decorative Visual Section --- */
.login-decor {
  flex: 1.2;
  position: relative;
  background: transparent; /* Fondo transparente para mostrar el gradiente unificado del padre */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5rem 4.5rem; /* Ajustado para dar aire y separación elegante del borde */
  color: white;
  overflow: hidden;
  border-right: 1px solid var(--border-primary);
}

/* Glassmorphism shapes (similar to CraftWeek, distribuidas en toda la pantalla) */
.login-decor-orb-1 {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.22) 0%, rgba(124, 58, 237, 0) 70%);
  top: -15%;
  left: -10%; /* Posicionado a la izquierda */
  filter: blur(40px);
  pointer-events: none;
  animation: floatOrb 10s ease-in-out infinite alternate;
}

.login-decor-orb-2 {
  position: absolute;
  width: 580px;
  height: 580px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 124, 255, 0.18) 0%, rgba(79, 124, 255, 0) 70%);
  bottom: -15%;
  right: -10%; /* Posicionado a la derecha */
  filter: blur(50px);
  pointer-events: none;
  animation: floatOrb 14s ease-in-out infinite alternate-reverse;
}

.login-decor-orb-3 {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.12) 0%, rgba(236, 72, 153, 0) 75%);
  top: 35%;
  left: 45%; /* Posicionado en el centro de la pantalla */
  filter: blur(35px);
  pointer-events: none;
  animation: floatOrb 8s ease-in-out infinite alternate;
}

.login-decor-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  z-index: 2;
}

.login-decor-logo-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(79, 124, 255, 0.3);
}

.login-decor-logo-icon svg {
  width: 22px;
  height: 22px;
  color: white;
}

.login-decor-logo-text {
  font-size: var(--font-size-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-decor-content {
  margin-top: auto;
  margin-bottom: auto;
  max-width: 540px;
  z-index: 2;
}

.login-decor-title {
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-4);
  background: linear-gradient(to right, #ffffff 30%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-decor-desc {
  font-size: var(--font-size-md);
  color: #94a3b8;
  line-height: 1.6;
}

.login-decor-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: var(--space-6);
  max-width: 500px;
  z-index: 2;
}

.login-decor-quote {
  font-style: italic;
  color: #cbd5e1;
  font-size: var(--font-size-base);
  line-height: 1.5;
  margin-bottom: var(--space-2);
}

.login-decor-author {
  font-size: var(--font-size-sm);
  color: var(--accent-indigo);
  font-weight: 700;
}

/* --- Right Column: Form Section --- */
.login-content {
  flex: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) 4rem; /* Ajustado para alinearse proporcionalmente */
  background: transparent; /* Fondo transparente para lucir el degradado unificado */
  overflow-y: auto;
  position: relative;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  animation: fadeInScale 0.4s ease-out;
}

.login-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-2);
  color: white;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: var(--font-size-base);
  margin-bottom: var(--space-8);
  text-align: left;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.login-field label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
}

.login-field input, .login-field select {
  padding: var(--space-3) var(--space-4);
}

.login-submit {
  margin-top: var(--space-2);
  padding: var(--space-4);
  font-size: var(--font-size-md);
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
}

.login-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin: var(--space-6) 0;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-primary);
}

/* Demo Role Selection */
.demo-roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.demo-role-card {
  padding: var(--space-4) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
  background: var(--bg-secondary);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}

.demo-role-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-elevated);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.demo-role-card.selected {
  border-color: var(--accent-blue);
  background: rgba(79, 124, 255, 0.08);
  box-shadow: var(--shadow-glow);
}

.demo-role-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-role-icon svg {
  width: 20px;
  height: 20px;
}

.demo-role-icon.admin {
  background: rgba(79, 124, 255, 0.12);
  color: var(--accent-blue);
}

.demo-role-icon.employee {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-green);
}

.demo-role-name {
  font-size: var(--font-size-base);
  font-weight: 700;
  margin-bottom: 2px;
}

.demo-role-desc {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
}

/* Floating Orb animation */
@keyframes floatOrb {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-24px) scale(1.05); }
}

/* Responsive configurations */
@media (max-width: 1024px) {
  .login-decor {
    display: none;
  }
  
  .login-content {
    flex: 1;
    background: linear-gradient(135deg, #070b14 0%, #100a21 100%);
  }
  
  .login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    padding: var(--space-8) var(--space-6);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    max-width: 460px;
  }
  
  .login-title {
    font-size: var(--font-size-2xl);
  }
}

/* Employees Page */
.employees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}

.employee-card {
  padding: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  cursor: pointer;
  opacity: 0;
  animation: fadeIn 0.4s ease-out forwards;
}

.employee-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.employee-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--font-size-md);
  color: white;
  flex-shrink: 0;
}

.employee-info {
  flex: 1;
  min-width: 0;
}

.employee-name {
  font-weight: 600;
  font-size: var(--font-size-md);
  margin-bottom: 2px;
}

.employee-section {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.employee-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-xs);
  margin-top: var(--space-1);
}

.employee-status-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
}

.employee-status-dot.active { background: var(--accent-green); }
.employee-status-dot.vacation { background: var(--accent-pink); }
.employee-status-dot.off { background: var(--text-muted); }

/* Settings Page */
.settings-container {
  max-width: 680px;
  margin: 0 auto;
}

.settings-section {
  margin-bottom: var(--space-8);
}

.settings-section-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: var(--space-4);
  letter-spacing: -0.01em;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
}

.settings-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-item-label {
  font-weight: 600;
  font-size: var(--font-size-base);
}

.settings-item-desc {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  border-radius: var(--radius-full);
  background: var(--text-secondary);
  transition: all var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: white;
}
