/* ============================================
   LOGIN PAGE STYLES
   Elite High-End Client Portal
   ============================================ */

/* --- Ambient Background --- */
body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--color-bg-primary);
  position: relative;
}

/* --- Animated Particles --- */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--color-gold);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 8s infinite;
  box-shadow: 0 0 6px rgba(201, 168, 76, 0.4);
}

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

/* --- Ambient Light Effects --- */
.ambient-light {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.08;
}

.ambient-light--1 {
  top: -200px;
  right: -200px;
  background: radial-gradient(circle, var(--color-gold), transparent);
  animation: ambientPulse 8s ease-in-out infinite;
}

.ambient-light--2 {
  bottom: -200px;
  left: -200px;
  background: radial-gradient(circle, #D4AF37, transparent);
  animation: ambientPulse 8s ease-in-out infinite 4s;
}

@keyframes ambientPulse {
  0%, 100% { opacity: 0.08; }
  50% { opacity: 0.15; }
}

/* --- Login Container --- */
.login-container {
  display: flex;
  width: 1000px;
  max-width: 95vw;
  min-height: 600px;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg), var(--shadow-gold-lg);
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: fadeIn 0.8s ease;
}

/* --- Brand Side --- */
.login-brand {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
  background: linear-gradient(160deg, 
    rgba(201, 168, 76, 0.05) 0%, 
    rgba(10, 10, 11, 1) 50%,
    rgba(201, 168, 76, 0.03) 100%
  );
  position: relative;
  overflow: hidden;
}

.login-brand::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 30% 50%, rgba(201, 168, 76, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(212, 175, 55, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

.brand-content {
  text-align: center;
  max-width: 320px;
  position: relative;
  z-index: 1;
}

.brand-emblem {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-xl);
  color: var(--color-gold);
  animation: float 6s ease-in-out infinite;
}

.brand-emblem svg {
  width: 100%;
  height: 100%;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: 2px;
}

.brand-tagline {
  font-family: var(--font-elegant);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--color-gold);
  margin-bottom: var(--space-lg);
  letter-spacing: 4px;
}

.brand-divider {
  width: 60px;
  height: 1px;
  background: var(--gradient-gold);
  margin: 0 auto var(--space-lg);
}

.brand-description {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  font-weight: 300;
  letter-spacing: 0.3px;
}

/* --- Form Side --- */
.login-form-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
  background: var(--color-bg-primary);
}

.login-form-container {
  width: 100%;
  max-width: 360px;
}

.form-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.form-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-lg);
  color: var(--color-gold);
  opacity: 0.8;
}

.form-icon svg {
  width: 100%;
  height: 100%;
}

.form-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}

.form-subtitle {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  font-weight: 300;
}

/* --- Form --- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.input-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

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

.input-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  transition: color var(--transition-base);
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
  font-size: 0.9rem;
  font-weight: 400;
  transition: all var(--transition-base);
  outline: none;
}

.input-wrapper input::placeholder {
  color: var(--color-text-muted);
  font-weight: 300;
  font-size: 0.85rem;
}

.input-wrapper input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
  background: var(--color-bg-tertiary);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper input:focus ~ .input-icon {
  color: var(--color-gold);
}

.input-wrapper input.error {
  border-color: #E74C3C;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* --- Toggle Password --- */
.toggle-password {
  position: absolute;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: color var(--transition-base);
  border-radius: var(--radius-sm);
}

.toggle-password:hover {
  color: var(--color-text-secondary);
}

.toggle-password svg {
  width: 18px;
  height: 18px;
}

/* --- Form Options --- */
.form-options {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input {
  display: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.checkbox-label input:checked + .checkbox-custom {
  background: var(--color-gold);
  border-color: var(--color-gold);
  position: relative;
}

.checkbox-label input:checked + .checkbox-custom::after {
  content: '✓';
  color: var(--color-text-inverse);
  font-size: 12px;
  font-weight: 700;
}

.checkbox-label:hover .checkbox-custom {
  border-color: var(--color-gold);
}

/* --- Error Message --- */
.error-message {
  display: none;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 16px;
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #E74C3C;
}

.error-message.visible {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.error-message svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* --- Submit Button --- */
.login-form .btn-primary {
  width: 100%;
  padding: 16px 32px;
  font-size: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.btn-primary .btn-loader {
  display: none;
  width: 20px;
  height: 20px;
}

.btn-primary .btn-loader svg {
  animation: rotate 1s linear infinite;
}

.btn-primary.loading .btn-text {
  visibility: hidden;
}

.btn-primary.loading .btn-loader {
  display: block;
  position: absolute;
}

.btn-primary.loading {
  pointer-events: none;
  opacity: 0.8;
}

/* --- Form Footer --- */
.form-footer {
  text-align: center;
  margin-top: var(--space-xl);
}

.form-footer p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 300;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
    max-width: 95vw;
    min-height: auto;
  }

  .login-brand {
    padding: var(--space-2xl) var(--space-lg);
  }

  .brand-content {
    max-width: 100%;
  }

  .brand-title {
    font-size: 2rem;
  }

  .login-form-wrapper {
    padding: var(--space-2xl) var(--space-lg);
  }

  .login-form-container {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .login-container {
    border-radius: var(--radius-md);
  }

  .login-brand {
    padding: var(--space-xl) var(--space-md);
  }

  .brand-emblem {
    width: 60px;
    height: 60px;
    margin-bottom: var(--space-lg);
  }

  .brand-title {
    font-size: 1.6rem;
  }

  .login-form-wrapper {
    padding: var(--space-xl) var(--space-md);
  }

  .form-title {
    font-size: 1.5rem;
  }
}
