/* login.css */
/* --- Use existing .container class from base.css, but override for full width--- */

.login-wrapper {
    width: 100%;
    /* max-width: 1200px;  <-- REMOVE:  Use .container's max-width */
    padding: 0.1rem; /* Spacing on the sides */
    display: flex;
    justify-content: center;
    align-items: center;
}


.login-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

.login-card {
    background: var(--white);  /* Use CSS variable */
    box-shadow: 0 10px 25px var(--shadow); /* Use CSS variable */
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
}

/* --- Header --- */

.login-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #eee;
}

.login-header h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark); /* Use CSS variable */
}

.login-subtitle {
    color: var(--text-light); /* Use CSS variable */
    font-size: 1rem;
    margin: 0;
}

/* --- Form Styling --- */

.login-body {
    padding: 2rem;
    flex-grow: 1;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-dark);  /* Use CSS Variable*/
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    fill: #999;
    pointer-events: none;
    transition: fill 0.2s ease;
}

.form-control {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    color: var(--text-dark); /* Use CSS Variable*/
}

.form-control:focus {
    border-color: var(--primary-color); /* Use CSS variable */
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25); /* Use derived value from var */
}
.form-control:focus + .input-icon {
      fill: var(--primary-color);
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.password-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.forgot-password {
    color: var(--primary-color);  /* Use CSS variable */
    text-decoration: none;
    font-size: 0.875rem;
}
.forgot-password:hover {
    text-decoration: underline;
}

/* --- Form Options (Remember Me) --- */

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.remember-me {
    display: flex;
    align-items: center;
}

.form-check-input {
  margin-right: 0.5rem;
  appearance: none;
  width: 1.1rem;
  height: 1.1rem;
  border: 1px solid #999;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.form-check-input:checked {
  background-color: var(--primary-color);  /* Use CSS variable */
  border-color: var(--primary-color);  /* Use CSS variable */
}

.form-check-input:checked::before {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
}

.form-check-label {
    color: var(--text-light);  /* Use CSS variable */
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
}

/* --- Submit Button --- */

.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%); /* Use CSS variables */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px var(--shadow); /* Use CSS variable */
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #003366 100%); /* Use CSS variable, keep dark end*/
    transform: translateY(-2px);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px var(--shadow);  /* Use CSS variable */
}

/* --- Footer --- */
.login-footer {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: var(--text-light); /* Use CSS variable */
}
.login-footer a{
  color: var(--primary-color); /* Use CSS variable */
  font-weight: 500;
  text-decoration: none;
}

.login-footer a:hover{
  text-decoration: underline;
}

/* --- Alerts --- */
/*  These styles might be better defined globally in base.css if used elsewhere */
.alert {
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.join-button {
  display: inline-block;
  padding: 8px 16px;
  background-color: #34C759; /* Green color */
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.green-button:hover {
  background-color: #2E865F; /* Darker green on hover */
}


/* --- Responsive Adjustments --- */
/*  We'll largely rely on base.css's responsive rules.  Only add overrides if NECESSARY. */
@media (max-width: 768px) {
    .login-wrapper {
      padding: 0.1rem;
      /*  Keep this, as it overrides the 2rem from above  */
    }
    .login-card{
        border-radius: 0; /* Optional */
    }

    .login-header h1 {
        font-size: 2rem;
    }

    .form-control {
        padding: 0.8rem 0.8rem 0.8rem 2.5rem;
    }
      .form-options{
    flex-direction: column;  /*Stack items vertically*/
    gap: 0.5rem;
  }
}