/* login.css — Modern styles for Login page */

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* =========================================
   Background Animation
   ========================================= */
.login-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #0099FF 0%, #0066CC 100%);
}

.circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 20s infinite ease-in-out;
}

.circle-1 {
  width: 300px;
  height: 300px;
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.circle-2 {
  width: 400px;
  height: 400px;
  bottom: -150px;
  right: -150px;
  animation-delay: 5s;
}

.circle-3 {
  width: 200px;
  height: 200px;
  top: 50%;
  left: 50%;
  animation-delay: 10s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(50px, -50px) scale(1.1);
  }
  50% {
    transform: translate(-30px, 30px) scale(0.9);
  }
  75% {
    transform: translate(30px, 50px) scale(1.05);
  }
}

/* =========================================
   Login Wrapper
   ========================================= */
.login-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 450px;
  padding: 1rem;
}

/* =========================================
   Login Container
   ========================================= */
.login-container {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: slideUp 0.6s ease-out;
}

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

/* =========================================
   Logo Section
   ========================================= */
.logo-section {
  text-align: center;
  margin-bottom: 2rem;
}

.company-logo {
  max-width: 180px;
  height: auto;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.welcome-text {
  font-size: 2rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1rem;
  color: #7f8c8d;
  margin: 0;
}

/* =========================================
   Alert Messages
   ========================================= */
.alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-error {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.alert-success {
  background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(81, 207, 102, 0.3);
}

.alert i {
  font-size: 1.2rem;
}

/* =========================================
   Login Form
   ========================================= */
.login-form {
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.form-group label i {
  color: #0099FF;
  font-size: 1rem;
}

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

.input-icon {
  position: absolute;
  left: 1rem;
  color: #0099FF;
  font-size: 1.1rem;
  z-index: 2;
}

.input-wrapper input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 3rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
  color: #2c3e50;
}

.input-wrapper input:focus {
  outline: none;
  border-color: #0099FF;
  box-shadow: 0 0 0 4px rgba(0, 153, 255, 0.1);
}

.input-wrapper input::placeholder {
  color: #bdc3c7;
}

/* Toggle Password Button */
.toggle-password {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: #7f8c8d;
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.3s ease;
  z-index: 2;
}

.toggle-password:hover {
  color: #0099FF;
}

.toggle-password i {
  font-size: 1.1rem;
}

/* =========================================
   Login Button
   ========================================= */
.btn-login {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #0099FF 0%, #0066CC 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 153, 255, 0.3);
  margin-top: 2rem;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 153, 255, 0.4);
}

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

.btn-login i {
  font-size: 1.1rem;
}

/* =========================================
   Login Footer
   ========================================= */
.login-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
}

.login-footer p {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin: 0;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 768px) {
  .login-wrapper {
    max-width: 100%;
    padding: 1rem;
  }

  .login-container {
    padding: 2rem 1.5rem;
    border-radius: 15px;
  }

  .company-logo {
    max-width: 150px;
  }

  .welcome-text {
    font-size: 1.75rem;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .form-group label {
    font-size: 0.9rem;
  }

  .input-wrapper input {
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    font-size: 0.95rem;
  }

  .btn-login {
    padding: 0.9rem;
    font-size: 1rem;
  }

  .circle-1,
  .circle-2,
  .circle-3 {
    display: none;
  }
}

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

  .company-logo {
    max-width: 120px;
  }

  .welcome-text {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 0.85rem;
  }
}

/* =========================================
   Accessibility
   ========================================= */
.input-wrapper input:focus-visible,
.btn-login:focus-visible,
.toggle-password:focus-visible {
  outline: 2px solid #0099FF;
  outline-offset: 2px;
}

/* =========================================
   Print Styles
   ========================================= */
@media print {
  .login-background,
  .circle {
    display: none;
  }

  body {
    background: white;
  }

  .login-container {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
