/* Modern Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  min-height: 100vh; /* Changed to min-height: 100vh to fix the scrolling/centering issue */
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: 
              url('dist/images/main-new-blur.jpg') center/cover no-repeat fixed;
  background-color: #eef2f6; 
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Container & Card Layout */
.login-container {
  width: 100%;
  max-width: 540px; /* Widened for better visibility */
  padding: 20px;
}

.login-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); /* Deeper shadow for pop */
  padding: 50px; /* Increased padding */
  animation: scaleIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: scale(0.95) translateY(10px);
}

/* Smoother Entrance Animation */
@keyframes scaleIn {
  to {
      opacity: 1;
      transform: scale(1) translateY(0);
  }
}

/* Header Styling */
.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #0f203f; 
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.login-header p {
  font-size: 15px;
  color: #64748b;
}

/* Form & Floating Labels */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-floating {
  position: relative;
}

.form-floating input {
  width: 100%;
  padding: 20px 16px 10px; /* Padded for the floating label */
  font-size: 16px;
  color: #1e293b;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  transition: all 0.3s ease;
  outline: none;
}

.form-floating label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #94a3b8;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Floating Label Animation Triggers */
.form-floating input:focus,
.form-floating input:not(:placeholder-shown) {
  border-color: #1e3c72;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.08);
}

.form-floating input:focus + label,
.form-floating input:not(:placeholder-shown) + label {
  top: 14px;
  font-size: 12px;
  color: #1e3c72;
  font-weight: 600;
}

/* Modern Button Styling */
.form-actions {
  margin-top: 10px;
}

.btn-primary {
  width: 100%;
  padding: 16px;
  background: #1e3c72;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(30, 60, 114, 0.3);
}

.btn-primary:hover {
  background: #152b52;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(30, 60, 114, 0.4);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 5px rgba(30, 60, 114, 0.3);
}

/* Footer & Reset Link */
.login-footer {
  text-align: center;
  margin-top: 30px;
}

.reset-link {
  font-size: 14px;
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.reset-link:hover {
  color: #1e3c72;
}

/* =========================================================
 RESPONSIVENESS (Mobile Portrait & Landscape Breakpoints)
 ========================================================= */

/* Mobile Portrait (Shrinks the large desktop paddings) */
@media screen and (max-width: 576px) {
  .login-card {
      padding: 35px 25px; /* Shrinks the 50px padding to fit narrow screens */
  }
  .login-header {
      margin-bottom: 30px;
  }
  .login-header h1 {
      font-size: 24px;
  }
  .login-form {
      gap: 18px; /* Tighter spacing between inputs */
  }
  .login-footer {
      margin-top: 25px;
  }
}

/* Mobile Landscape & Short Screens (Prevents vertical scrolling) */
@media screen and (max-height: 650px) {
  .login-card {
      padding: 25px 30px; /* Aggressively shrinks vertical footprint */
  }
  .login-header {
      margin-bottom: 20px;
  }
  .login-header h1 {
      font-size: 22px;
      margin-bottom: 5px;
  }
  .login-form {
      gap: 14px;
  }
  .form-floating input {
      padding: 16px 14px 8px; /* Compact inputs for short heights */
  }
  .form-actions {
      margin-top: 5px;
  }
  .btn-primary {
      padding: 12px;
  }
  .login-footer {
      margin-top: 15px;
  }
}