/* CHANGED: Complete redesign of login page CSS for proper styling and responsiveness */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
}

body {
  font-family: 'DM Sans', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden;
}

/* Login Page Container */
.login-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Overlay for background blur/darken */
.login-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(17, 17, 17, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Login Card - Glassmorphism effect */
.login-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 48px 32px 40px 32px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin: 20px;
}

/* Header Section */
.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-title {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.login-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: #ffffff;
  opacity: 0.9;
  font-family: 'DM Sans', sans-serif;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Form Group */
.form-group {
  position: relative;
  width: 100%;
}

.password-group {
  position: relative;
}

/* Input Fields */
.form-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 400;
  color: #333333;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.3s ease;
  outline: none;
}

.form-input::placeholder {
  color: #c9c9c9;
}

.form-input:focus {
  background-color: #fafafa;
  border-color: #79976e;
  box-shadow: 0 0 0 3px rgba(121, 151, 110, 0.1);
}

/* Password Toggle Button */
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  transition: opacity 0.2s ease;
}

.password-toggle:hover {
  opacity: 0.7;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

/* Forgot Password Link */
.forgot-link {
  color: #ffffff;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  text-align: left;
  opacity: 0.85;
  transition: opacity 0.2s ease;
  margin-top: -8px;
  margin-bottom: 8px;
}

.forgot-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Form Buttons Container */
.form-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

/* Button Base Styles */
.btn {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Plus Jakarta Sans', sans-serif;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Log In Button */
.btn-login {
  background-color: #79976e;
  color: #ffffff;
  width: 100%;
}

.btn-login:hover {
  background-color: #6a8260;
  box-shadow: 0 4px 12px rgba(121, 151, 110, 0.3);
}

.btn-login:active {
  transform: scale(0.98);
}

/* Sign Up Button */
.btn-signup {
  background-color: #ffffff;
  color: #79976e;
  width: 100%;
  border: 1px solid #79976e;
}

.btn-signup:hover {
  background-color: #f9fdf7;
  box-shadow: 0 4px 12px rgba(121, 151, 110, 0.2);
}

.btn-signup:active {
  transform: scale(0.98);
}

/* Responsive Design */
@media (max-width: 480px) {
  .login-card {
    max-width: 100%;
    margin: 16px;
    padding: 40px 24px 32px 24px;
  }

  .login-title {
    font-size: 28px;
    margin-bottom: 6px;
  }

  .login-subtitle {
    font-size: 13px;
  }

  .login-header {
    margin-bottom: 24px;
  }

  .form-input {
    padding: 10px 12px;
    font-size: 13px;
  }

  .btn {
    padding: 11px 20px;
    font-size: 14px;
  }
}

@media (max-width: 320px) {
  .login-card {
    padding: 32px 16px 24px 16px;
  }

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .form-input {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
  }

  .form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
  }

  .form-input:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #79976e;
  }
}

/* CHANGED: Added signup form field styling */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
  background-color: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 14px !important;
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  background-color: #fafafa !important;
  border-color: #79976e !important;
  box-shadow: 0 0 0 3px rgba(121, 151, 110, 0.1) !important;
  outline: none !important;
}

input::placeholder {
  color: #c9c9c9;
}

.form-label {
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
  color: #ffffff;
  font-size: 14px;
}

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

.invalid-feedback {
  color: #cc3434 !important;
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

.alert {
  font-size: 13px;
  margin-bottom: 16px;
}

.login-form {
  max-height: 600px;
  overflow-y: auto;
}

/* CHANGED: Make scrollbar slimmer */
.login-form::-webkit-scrollbar {
  width: 6px;
}

.login-form::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.login-form::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.login-form::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}
