/* PROF Rebrand V2.1 — Login page styles.
   All rules scoped under .prof-login-page so nothing leaks to other pages.
   Consumes --prof-primary / --prof-primary-hover from prof-theme.css. */

.prof-login-page {
  background-image: url("../img/background/prof_login_background.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100vw;
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: auto;
  padding: 2rem 1rem;
  box-sizing: border-box;
}

.prof-login-page__logo {
  display: block;
  width: 200px;
  height: auto;
  margin: 0 auto 1.75rem auto;
  /* The PNG has a stray hairline near its top edge — clip the top 4% to hide it. */
  clip-path: inset(4% 0 0 0);
}

.prof-login-page__field,
.prof-login-page form,
.prof-login-page__forgot {
  text-align: left;
}

.prof-login-page__forgot {
  text-align: center;
}

.prof-login-page__card {
  background-color: #ffffff;
  width: 100%;
  max-width: 500px;
  padding: 2rem 2.75rem 2.25rem 2.75rem;
  /* SCT-1067 AC#4: square / minimally-rounded corners, no heavy shadow */
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  text-align: center;
}

.prof-login-page__heading {
  color: #212529;
  font-weight: 600;
  font-size: 1.5rem;
  text-align: center;
  margin: 0 0 1.5rem 0;
}

.prof-login-page__field {
  margin-bottom: 1rem;
}

.prof-login-page__label {
  display: block;
  color: var(--prof-primary);
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.prof-login-page__input,
.prof-login-page .form-control,
.prof-login-page select {
  display: block;
  width: 100%;
  border: 1px solid #d0d0d0 !important;
  border-radius: 8px !important;
  padding: 0.625rem 0.75rem !important;
  font-size: 1rem;
  background-color: #ffffff !important;
  color: #212529;
  box-sizing: border-box;
  height: auto !important;
}

.prof-login-page__input:focus,
.prof-login-page .form-control:focus,
.prof-login-page select:focus {
  border-color: var(--prof-primary) !important;
  box-shadow: 0 0 0 0.15rem rgba(0, 61, 165, 0.15) !important;
  outline: none !important;
}

.prof-login-page__button,
.prof-login-page input[type="submit"].btn,
.prof-login-page button[type="submit"] {
  display: block;
  width: 100%;
  background-color: var(--prof-primary) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 0.875rem 1rem !important;
  font-weight: 600;
  font-size: 1rem;
  margin-top: 0.75rem;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
  height: auto !important;
}

.prof-login-page__button:hover,
.prof-login-page input[type="submit"].btn:hover,
.prof-login-page button[type="submit"]:hover {
  background-color: var(--prof-primary-hover) !important;
}

.prof-login-page__forgot {
  display: block;
  text-align: center;
  margin-top: 1rem;
  color: var(--prof-primary);
  font-size: 0.875rem;
  text-decoration: none;
}

.prof-login-page__forgot:hover {
  color: var(--prof-primary-hover);
  text-decoration: underline;
}

.prof-login-page__bullets {
  width: 100%;
  max-width: 420px;
  margin: 1.25rem auto 0 auto;
  padding: 0 0 0 1.5rem;
  list-style: disc;
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.5;
}

.prof-login-page__bullets li {
  margin-bottom: 0.125rem;
}

/* Error message styling (Django form errors) */
.prof-login-page__error,
.prof-login-page .errorlist,
.prof-login-page .alert-danger {
  color: #d9534f;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  padding: 0;
  list-style: none;
  text-align: center;
}

/* Hide the legacy main-panel background that leaks through */
.prof-login-page ~ .main-panel,
body.store:has(.prof-login-page) .main-panel {
  background-color: transparent !important;
}

/* Hide the legacy store-base.html .navbar (paper-dashboard sets a 1px gray
   border-bottom that shows as a line above the logo on the login page). */
body.store:has(.prof-login-page) .main-panel > .navbar,
body.store:has(.prof-login-page) .navbar.navbar-default {
  display: none !important;
}

/* Responsive: tighten padding on narrow viewports */
@media (max-width: 480px) {
  .prof-login-page {
    padding: 1.5rem 0.75rem;
  }
  .prof-login-page__card {
    padding: 1.5rem 1.25rem;
  }
  .prof-login-page__logo {
    width: 150px;
    margin: 0 auto 1.25rem auto;
  }
}
