/* Login-page refresh. Loaded after app.css so these styles take priority. */
.auth-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 12% 20%, rgba(12, 112, 78, .09), transparent 38%),
    linear-gradient(145deg, #f4f8f6 0%, #edf3f0 55%, #f8faf9 100%);
  color: #172a23;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.portal-masthead {
  width: 100%;
  overflow: hidden;
  background: #064b37;
  box-shadow: 0 3px 16px rgba(4, 38, 28, .16);
}

.portal-banner {
  display: block;
  width: 100%;
  height: auto;
  max-height: 150px;
  object-fit: contain;
  object-position: center;
}

.auth-main {
  width: 100%;
  flex: 1;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 30px;
}

.auth-card {
  width: min(100%, 440px);
  box-sizing: border-box;
  padding: 38px 40px 30px;
  border: 1px solid rgba(16, 73, 53, .10);
  border-radius: 18px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 18px 55px rgba(21, 58, 43, .12);
}

.auth-card-heading {
  margin-bottom: 27px;
  text-align: center;
}

.welcome-label {
  display: inline-block;
  margin-bottom: 12px;
  color: #14724f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
}

.auth-card h1 {
  margin: 0;
  color: #17392b;
  font-size: clamp(27px, 4vw, 32px);
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -.035em;
}

.auth-card .subtitle {
  margin: 10px 0 0;
  color: #65756d;
  font-size: 14px;
  line-height: 1.55;
}

.login-form label {
  display: block;
  margin: 0 0 8px;
  color: #263d32;
  font-size: 13px;
  font-weight: 650;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.input-wrap input {
  width: 100%;
  min-width: 0;
  height: 51px;
  box-sizing: border-box;
  padding: 0 15px 0 43px;
  border: 1px solid #d6e1db;
  border-radius: 9px;
  outline: none;
  background: #fbfdfc;
  color: #172a23;
  font: inherit;
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.input-wrap input::placeholder {
  color: #9aa9a1;
}

.input-wrap input:focus {
  border-color: #16805a;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(22, 128, 90, .12);
}

.field-icon {
  position: absolute;
  left: 15px;
  z-index: 1;
  color: #789087;
  font-size: 14px;
  pointer-events: none;
}

.password-wrap input {
  padding-right: 65px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  padding: 7px 5px;
  border: 0;
  background: transparent;
  color: #14724f;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.password-toggle:hover {
  color: #084b35;
  text-decoration: underline;
}

.login-button {
  width: 100%;
  min-height: 51px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(105deg, #07563d, #11815a);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 7px 16px rgba(8, 91, 62, .18);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.login-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 10px 20px rgba(8, 91, 62, .23);
}

.login-button:active {
  transform: translateY(0);
}

.login-button:focus-visible,
.password-toggle:focus-visible,
.auth-footer a:focus-visible {
  outline: 3px solid rgba(22, 128, 90, .3);
  outline-offset: 3px;
}

.auth-error {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.45;
}

.error-mark {
  display: inline-grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #a52d2d;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 25px 0 17px;
  color: #84938b;
  font-size: 11px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e8eeea;
}

.auth-footer {
  margin: 0;
  color: #68786f;
  text-align: center;
  font-size: 13px;
}

.auth-footer a {
  margin-left: 4px;
  color: #08734e;
  font-weight: 700;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.portal-note {
  margin: 22px 0 0;
  color: #819087;
  text-align: center;
  font-size: 11px;
  letter-spacing: .02em;
}

@media (max-width: 600px) {
  .portal-banner {
    max-height: 100px;
  }

  .auth-main {
    justify-content: flex-start;
    padding: 34px 16px 24px;
  }

  .auth-card {
    padding: 30px 23px 25px;
    border-radius: 15px;
  }

  .portal-note {
    max-width: 300px;
    line-height: 1.5;
  }
}

@media (max-width: 360px) {
  .auth-card {
    padding-right: 18px;
    padding-left: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
