/* ===== PURE ENERGY - MODERN LOGIN PAGE ===== */
/* Ultra Modern, Minimal & Professional Design */

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.login-page {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0f172a;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Animated Background */
.animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  z-index: 0;
}

/* Animated Grid Pattern */
.animated-background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(229, 47, 46, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(229, 47, 46, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Gradient Orbs */
.animated-background::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(229, 47, 46, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  top: -250px;
  right: -250px;
  animation: float 15s ease-in-out infinite;
}

.energy-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(229, 47, 46, 0.3);
  border-radius: 50%;
  animation: particleFloat 8s ease-in-out infinite;
}

.particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { top: 40%; left: 30%; animation-delay: 1s; }
.particle:nth-child(3) { top: 60%; left: 50%; animation-delay: 2s; }
.particle:nth-child(4) { top: 80%; left: 70%; animation-delay: 3s; }
.particle:nth-child(5) { top: 30%; left: 80%; animation-delay: 4s; }
.particle:nth-child(6) { top: 50%; left: 20%; animation-delay: 5s; }

@keyframes particleFloat {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-30px) translateX(20px);
    opacity: 0.8;
  }
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(50px, 50px) scale(1.1);
  }
}

/* Main Login Container */
.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

/* Login Card */
.login-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 36px 32px 32px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo Section */
.brand-section {
  text-align: center;
  margin-bottom: 28px;
}

.brand-logo-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  margin: 0 auto 16px;
  transition: all 0.3s ease;
}

.brand-logo-container:hover {
  transform: translateY(-3px);
}

.brand-logo-container img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 4px 20px rgba(229, 47, 46, 0.15));
}

.brand-logo-fallback {
  display: none;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, #e52f2e 0%, #ff0000 100%);
  border-radius: 20px;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 48px;
  box-shadow: 0 4px 20px rgba(229, 47, 46, 0.3);
}

.brand-title {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  line-height: 1.3;
}

/* Form Header */
.form-header {
  margin-bottom: 24px;
  text-align: center;
}

.form-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #334155;
  margin: 0;
}

.form-header p {
  display: none;
}

/* Form Groups */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.form-label i {
  margin-right: 6px;
  color: #e52f2e;
  font-size: 13px;
}

/* Input Group */
.input-group {
  position: relative;
}

.form-input {
  width: 100%;
  height: 46px;
  padding: 0 16px 0 44px;
  font-size: 14px;
  color: #0f172a;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-input::placeholder {
  color: #94a3b8;
}

.form-input:hover {
  border-color: #cbd5e1;
  background: #ffffff;
}

.form-input:focus {
  outline: none;
  border-color: #e52f2e;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(229, 47, 46, 0.1);
}

.form-input.is-invalid {
  border-color: #ef4444;
  background: #fef2f2;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 16px;
  pointer-events: none;
  transition: color 0.3s ease;
}

.form-input:focus + .input-icon {
  color: #e52f2e;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  color: #e52f2e;
  background: rgba(229, 47, 46, 0.05);
}

/* Error Message */
.error-message {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 6px 10px;
  background: #fef2f2;
  border-left: 3px solid #ef4444;
  border-radius: 6px;
  font-size: 12px;
  color: #dc2626;
}

.error-message i {
  font-size: 12px;
  flex-shrink: 0;
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
}

/* Custom Checkbox */
.checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: #475569;
}

.checkbox-container input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1;
  border-radius: 5px;
  margin-right: 7px;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-container:hover .checkmark {
  border-color: #e52f2e;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
  background: #e52f2e;
  border-color: #e52f2e;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: bold;
}

/* Forgot Password Link */
.forgot-password {
  color: #e52f2e;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.forgot-password:hover {
  color: #dc2626;
  text-decoration: underline;
}

/* Login Button */
.login-btn {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #e52f2e 0%, #dc2626 100%);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(229, 47, 46, 0.4);
  position: relative;
  overflow: hidden;
}

.login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.login-btn:hover::before {
  left: 100%;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(229, 47, 46, 0.5);
}

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

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-text, .btn-icon {
  display: inline-flex;
  align-items: center;
}

.btn-loader {
  display: none;
}

.btn-loader .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Footer Links */
.form-footer {
  margin-top: 24px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.form-footer p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.form-footer a {
  color: #e52f2e;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}

.form-footer a:hover {
  text-decoration: underline;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e52f2e 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.energy-loader {
  text-align: center;
}

.bolt-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: boltPulse 2s ease-in-out infinite;
}

.bolt-icon i {
  font-size: 40px;
  color: white;
}

@keyframes boltPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 30px 10px rgba(255, 255, 255, 0);
  }
}

.loading-text {
  color: white;
  font-size: 18px;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 640px) {
  .login-card {
    padding: 28px 20px 24px;
    border-radius: 16px;
  }

  .brand-title {
    font-size: 24px;
  }

  .brand-subtitle {
    font-size: 12px;
  }

  .form-header h2 {
    font-size: 16px;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .forgot-password {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .login-container {
    padding: 16px;
  }

  .login-card {
    padding: 24px 18px 20px;
  }

  .brand-section {
    margin-bottom: 20px;
  }

  .brand-logo-container img {
    width: 100px;
    height: 100px;
  }

  .brand-logo-fallback {
    width: 100px;
    height: 100px;
    font-size: 42px;
  }

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

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

/* Focus Visible for Accessibility */
.login-btn:focus-visible,
.form-input:focus-visible,
.checkbox-container:focus-visible,
.forgot-password:focus-visible {
  outline: 2px solid #e52f2e;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .animated-background,
  .loading-overlay {
    display: none;
  }
}

