/* ========================================
   Login Page Styles
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.login-page {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  background-image: url('../img/bg.jpg');
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

body.login-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../img/bg.jpg');
  background-repeat: repeat;
  background-size: 400px;
  opacity: 0.05;
  z-index: 0;
  pointer-events: none;
}

.login-wrapper {
  position: relative;
  z-index: 1;
  padding: 20px;
}

.login-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 480px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-logo {
  width: 100px;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  color: #102573;
  position: relative;
  padding-bottom: 15px;
  margin-bottom: 10px;
}

.login-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 170px;
  height: 4px;
  background: linear-gradient(90deg, #2d9bf0, #1b6fd6);
  border-radius: 2px;
}

.form-label {
  color: #0b3a6f;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.input-line-group {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #102573;
  font-size: 1.1rem;
  z-index: 2;
  transition: all 0.3s ease;
}

.login-input {
  padding: 14px 16px 14px 35px;
  border: none;
  border-bottom: 2px solid #ddd;
  border-radius: 0;
  background: transparent;
  font-size: 1rem;
  color: #333;
  transition: all 0.3s ease;
}

.login-input:focus {
  outline: none;
  border-bottom-color: #2d9bf0;
  background: rgba(45, 155, 240, 0.03);
  box-shadow: none;
}

.login-input:focus ~ .input-icon,
.login-input:not(:placeholder-shown) ~ .input-icon {
  color: #2d9bf0;
}

.login-input::placeholder {
  color: #aaa;
  font-size: 0.9rem;
}

.toggle-password {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  color: #102573;
  font-size: 1rem;
  cursor: pointer;
  z-index: 2;
  transition: all 0.3s ease;
  padding: 5px;
}

.toggle-password:hover {
  color: #2d9bf0;
}

.btn-gradient {
  background: linear-gradient(135deg, #2d9bf0 0%, #1b6fd6 50%, #102573 100%);
  background-size: 200% 100%;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.4s ease;
  box-shadow: 0 4px 15px rgba(45, 155, 240, 0.4);
}

.btn-gradient:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(45, 155, 240, 0.6);
  color: #fff;
}

.btn-gradient:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(45, 155, 240, 0.4);
}

/* ==================== 
   Responsive Design 
   ==================== */

/* Desktop Large (1200px and above) */
@media (min-width: 1200px) {
  .login-card {
    max-width: 500px;
  }
}

/* Tablet (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .login-card {
    max-width: 450px;
    padding: 2.5rem !important;
  }
  
  .login-logo {
    width: 90px;
  }
  
  .login-title {
    font-size: 1.8rem;
  }
  
  .btn-gradient {
    font-size: 1rem;
    padding: 14px 0 !important;
  }
}

/* Mobile (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .login-card {
    max-width: 400px;
    padding: 2rem !important;
  }
  
  .login-logo {
    width: 85px;
  }
  
  .login-title {
    font-size: 1.7rem;
  }
  
  .login-input {
    padding: 12px 14px 12px 32px;
    font-size: 0.95rem;
  }
  
  .input-icon {
    font-size: 1rem;
  }
  
  .btn-gradient {
    font-size: 1rem;
    padding: 13px 0 !important;
  }
}

/* Mobile Small (below 576px) */
@media (max-width: 575px) {
  body.login-page {
    padding: 0;
  }
  
  .login-wrapper {
    padding: 15px;
  }
  
  .login-card {
    padding: 1.8rem !important;
    border-radius: 16px;
  }
  
  .login-logo {
    width: 75px;
  }
  
  .login-title {
    font-size: 1.5rem;
    padding-bottom: 12px;
  }
  
  .login-title::after {
    width: 60px;
    height: 3px;
  }
  
  .text-muted {
    font-size: 13px;
  }
  
  .form-label {
    font-size: 0.9rem;
  }
  
  .login-input {
    padding: 12px 14px 12px 30px;
    font-size: 0.9rem;
  }
  
  .login-input::placeholder {
    font-size: 0.85rem;
  }
  
  .input-icon {
    font-size: 0.95rem;
  }
  
  .btn-gradient {
    font-size: 0.95rem;
    padding: 12px 0 !important;
    letter-spacing: 0.5px;
  }
  
  .btn-gradient i {
    font-size: 0.9rem;
  }
  
  .text-center a {
    font-size: 13px;
  }
  
  .mb-4 {
    margin-bottom: 1rem !important;
  }
  
  .mb-5 {
    margin-bottom: 1.5rem !important;
  }
}

/* Extra Small Mobile (below 380px) */
@media (max-width: 379px) {
  .login-card {
    padding: 1.5rem !important;
    border-radius: 14px;
  }
  
  .login-logo {
    width: 65px;
  }
  
  .login-title {
    font-size: 1.3rem;
  }
  
  .text-muted {
    font-size: 12px;
  }
  
  .form-label {
    font-size: 0.85rem;
  }
  
  .login-input {
    padding: 10px 12px 10px 28px;
    font-size: 0.85rem;
  }
  
  .login-input::placeholder {
    font-size: 0.8rem;
  }
  
  .input-icon {
    font-size: 0.9rem;
  }
  
  .btn-gradient {
    font-size: 0.9rem;
    padding: 11px 0 !important;
  }
  
  .text-center a {
    font-size: 12px;
  }
}

/* Landscape Orientation Fix for Mobile */
@media (max-height: 600px) and (orientation: landscape) {
  .login-wrapper {
    padding: 10px;
  }
  
  .login-card {
    padding: 1.5rem !important;
  }
  
  .login-logo {
    width: 60px;
    margin-bottom: 0.5rem !important;
  }
  
  .login-title {
    font-size: 1.3rem;
    padding-bottom: 8px;
    margin-bottom: 5px !important;
  }
  
  .text-center.mb-4 {
    margin-bottom: 1rem !important;
  }
  
  .mb-4 {
    margin-bottom: 0.8rem !important;
  }
  
  .mb-5 {
    margin-bottom: 1.2rem !important;
  }
  
  .btn-gradient {
    padding: 10px 0 !important;
  }
}