/* Login Page Styles - Optimized and Extracted */

:root {
  --eagle-blue: #1C3A5B;
  --eagle-blue-light: #2C4A6B;
  --copper: #B87333;
  --copper-light: #D4A574;
  --burgundy: #9B1C31;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
}

/* Hero-Style Background Design */
.login-main {
  background: linear-gradient(135deg, #1a365d 0%, #2d3748 50%, #4a5568 100%);
  position: relative;
  min-height: calc(100vh - 120px);
  padding: 2rem 0;
  overflow: hidden;
}

/* Enhanced Background Pattern Overlay */
.login-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(237, 137, 54, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 60% 10%, rgba(184, 115, 51, 0.1) 0%, transparent 35%),
    radial-gradient(circle at 10% 70%, rgba(221, 107, 32, 0.08) 0%, transparent 30%),
    radial-gradient(circle at 90% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 25%),
    linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.02) 50%, transparent 70%);
  opacity: 0.9;
  animation: backgroundPulse 15s ease-in-out infinite;
}

@keyframes backgroundPulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 0.7; }
}

/* Advanced Floating Geometric Elements */
.login-main::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 600"><g><circle cx="120" cy="120" r="50" fill="rgba(255,255,255,0.08)" opacity="0.6"/><circle cx="480" cy="480" r="35" fill="rgba(237,137,54,0.12)" opacity="0.7"/><polygon points="300,80 360,140 300,200 240,140" fill="rgba(184,115,51,0.1)" opacity="0.5"/><polygon points="100,400 140,440 100,480 60,440" fill="rgba(221,107,32,0.08)" opacity="0.4"/><circle cx="500" cy="150" r="25" fill="rgba(255,255,255,0.06)" opacity="0.3"/><polygon points="150,500 180,530 150,560 120,530" fill="rgba(237,137,54,0.09)" opacity="0.6"/></g></svg>');
  background-size: 600px 600px;
  background-position: -150px -150px;
  animation: floatBackground 25s ease-in-out infinite;
}

@keyframes floatBackground {
  0%, 100% {
    transform: translateY(0px) rotate(0deg) scale(1);
    opacity: 0.8;
  }
  33% {
    transform: translateY(-15px) rotate(1deg) scale(1.02);
    opacity: 0.6;
  }
  66% {
    transform: translateY(-8px) rotate(-0.5deg) scale(0.98);
    opacity: 0.9;
  }
}

/* Floating Particles Effect */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  background: radial-gradient(circle, rgba(237, 137, 54, 0.6) 0%, rgba(237, 137, 54, 0.2) 50%, transparent 100%);
  border-radius: 50%;
  animation: floatParticle linear infinite;
}

.particle:nth-child(1) {
  width: 4px;
  height: 4px;
  left: 10%;
  animation-duration: 15s;
  animation-delay: 0s;
}

.particle:nth-child(2) {
  width: 6px;
  height: 6px;
  left: 20%;
  animation-duration: 18s;
  animation-delay: 2s;
}

.particle:nth-child(3) {
  width: 3px;
  height: 3px;
  left: 30%;
  animation-duration: 12s;
  animation-delay: 4s;
}

.particle:nth-child(4) {
  width: 5px;
  height: 5px;
  left: 40%;
  animation-duration: 20s;
  animation-delay: 1s;
}

.particle:nth-child(5) {
  width: 4px;
  height: 4px;
  left: 50%;
  animation-duration: 16s;
  animation-delay: 3s;
}

.particle:nth-child(6) {
  width: 7px;
  height: 7px;
  left: 60%;
  animation-duration: 14s;
  animation-delay: 5s;
}

.particle:nth-child(7) {
  width: 3px;
  height: 3px;
  left: 70%;
  animation-duration: 22s;
  animation-delay: 2s;
}

.particle:nth-child(8) {
  width: 5px;
  height: 5px;
  left: 80%;
  animation-duration: 17s;
  animation-delay: 4s;
}

.particle:nth-child(9) {
  width: 4px;
  height: 4px;
  left: 90%;
  animation-duration: 19s;
  animation-delay: 1s;
}

@keyframes floatParticle {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Premium Login Card with Advanced Effects */
.login-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
  border-radius: 20px;
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.2),
    0 12px 24px rgba(0, 0, 0, 0.12),
    0 6px 12px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(25px);
  padding: 2rem 1.75rem;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.3) 100%);
  background-size: 200% 100%;
  border-radius: 24px 24px 0 0;
  animation: shimmer 3s ease-in-out infinite;
}

.login-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.login-card:hover {
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.3),
    0 24px 48px rgba(0, 0, 0, 0.2),
    0 12px 24px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-6px) scale(1.02);
  background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.login-card:hover::after {
  opacity: 1;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Premium Form Styling */
.form-input {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
  border: 2px solid rgba(237, 137, 54, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--gray-800);
  position: relative;
  backdrop-filter: blur(10px);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.form-input:focus {
  border-color: #ed8936;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 0 0 4px rgba(237, 137, 54, 0.15),
    0 8px 20px rgba(237, 137, 54, 0.1),
    0 4px 12px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  outline: none;
  transform: translateY(-2px) scale(1.01);
}

.form-input:hover:not(:focus) {
  border-color: rgba(237, 137, 54, 0.4);
  box-shadow:
    0 6px 12px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* Input field icons */
.input-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  transition: color 0.3s ease;
}

.form-input:focus + .input-icon {
  color: var(--copper);
}

/* Premium Button Styling */
.btn-primary {
  background:
    linear-gradient(135deg, #ed8936 0%, #dd6b20 50%, #c05621 100%),
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
  border: 2px solid #ed8936;
  color: var(--white);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow:
    0 8px 16px rgba(237, 137, 54, 0.3),
    0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

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

.btn-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transition: all 0.4s ease;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

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

.btn-primary:hover::after {
  width: 300px;
  height: 300px;
}

.btn-primary:hover {
  /* Keep the same blue color on hover */
  background:
    linear-gradient(135deg, var(--eagle-blue) 0%, var(--eagle-blue-light) 50%, var(--eagle-blue) 100%),
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.25) 0%, transparent 50%);
  border-color: var(--eagle-blue);
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 12px 24px rgba(28, 58, 91, 0.4),
    0 8px 16px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:active {
  transform: translateY(-1px) scale(1.01);
  box-shadow:
    0 6px 12px rgba(28, 58, 91, 0.3),
    0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Premium Logo Styling */
.logo-container {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.logo-container::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: radial-gradient(circle, rgba(237, 137, 54, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  transition: all 0.5s ease;
  animation: logoPulse 4s ease-in-out infinite;
}

.logo-container:hover {
  transform: scale(1.08) rotate(2deg);
}

.logo-container:hover::before {
  opacity: 1;
  transform: scale(1.2);
}

@keyframes logoPulse {
  0%, 100% {
    opacity: 0;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.1);
  }
}

/* Logo Image Styling */
.company-logo {
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
  padding: 16px;
  border-radius: 16px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--gray-200);
}

.company-logo:hover {
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.15),
    0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* Logo Container Background */
.logo-bg {
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
  border: 2px solid var(--gray-200);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.8);
  position: relative;
}

.logo-bg::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(135deg, var(--copper) 0%, var(--eagle-blue) 100%);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.logo-container:hover .logo-bg::before {
  opacity: 0.1;
}

/* Loading Animation */
.loading-dots {
  display: inline-flex;
  gap: 4px;
}

.loading-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  animation: loadingDots 1.4s infinite ease-in-out;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes loadingDots {
  0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* Enhanced Header Styling - Compact */
.login-header {
  text-align: center;
  margin-bottom: 1.75rem;
  position: relative;
}

.login-title {
  color: var(--eagle-blue);
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--eagle-blue) 0%, var(--eagle-blue-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  color: var(--copper);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.25rem;
  position: relative;
}

.login-subtitle::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--copper) 0%, var(--eagle-blue) 100%);
  border-radius: 1px;
}

.login-description {
  color: var(--gray-600);
  font-size: 1rem;
  line-height: 1.5;
}

.login-portal-title {
  color: var(--gray-700);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Enhanced Form Labels */
.form-label {
  color: var(--gray-700);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-label i {
  color: var(--copper);
  font-size: 1rem;
}

/* Security Badge Enhancement */
.security-badge {
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
}

.security-badge:hover {
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Additional Links Styling */
.additional-links {
  border-top: 1px solid var(--gray-200);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.forgot-password-link {
  color: var(--copper);
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.forgot-password-link:hover {
  color: var(--eagle-blue);
  transform: translateX(2px);
}

.register-link {
  color: var(--copper);
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}

.register-link:hover {
  color: var(--eagle-blue);
  text-decoration: underline;
}
