/* =========================================================
   AUTHENTICATION UI
   Login and account registration screens.
   Keep this file independent from dashboard styling.
   ========================================================= */

.authPage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: #f2f5fa;
  position: relative;
  overflow: hidden;
}

.authPage::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(23, 63, 115, 0.06);
  border-radius: 50%;
  top: -280px;
  left: -220px;
}

.authPage::after {
  content: "";
  position: absolute;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(225, 182, 0, 0.08);
  border-radius: 50%;
  right: -210px;
  bottom: -230px;
}

.authCard {
  width: min(480px, 100%);
  padding: 42px;
  background: #ffffff;
  border: 1px solid #e1e6ee;
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(23, 56, 102, 0.12);
  position: relative;
  z-index: 1;
}

.authCard.wide {
  width: min(820px, 100%);
}

.authLogo {
  display: block;
  width: 82px;
  height: 82px;
  object-fit: contain;
  margin: 0 auto 22px;
}

.authCard h1 {
  margin: 0;
  color: #173866;
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.15;
}

.authCard > p {
  margin: 10px 0 0;
  color: #68758a;
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
}

.authForm {
  margin-top: 30px;
}

.authField {
  display: block;
  margin: 0 0 18px;
}

.authFieldLabel {
  display: block;
  margin: 0 0 7px;
  color: #172033;
  font-size: 13px;
  font-weight: 700;
}

.authInput,
.authSelect {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid #cfd7e3;
  border-radius: 9px;
  background: #ffffff;
  color: #172033;
  font-size: 14px;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.authInput::placeholder {
  color: #98a5b7;
}

.authInput:focus,
.authSelect:focus {
  border-color: #173866;
  box-shadow: 0 0 0 3px rgba(23, 56, 102, 0.10);
}

.authPasswordField {
  position: relative;
  width: 100%;
}

.authPasswordField .authInput {
  padding-right: 52px;
}

.authPasswordField .passwordToggle {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #68758a;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
}

.authPasswordField .passwordToggle:hover {
  background: #f0f4f9;
  color: #173866;
}

.authPasswordField .passwordToggle:focus-visible {
  outline: 2px solid #173866;
  outline-offset: 1px;
}

.authPasswordField .passwordToggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.authSubmit {
  width: 100%;
  min-height: 50px;
  margin-top: 2px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  background: #173f73;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.authSubmit:hover {
  background: #12345f;
}

.authSubmit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.authLinks {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #edf0f4;
  color: #173866;
  font-size: 13px;
  font-weight: 700;
}

.authLinks a:hover {
  color: #0e2d57;
  text-decoration: underline;
}

.authRegisterGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}

.authRegisterGrid .authField.full {
  grid-column: 1 / -1;
}

@media (max-width: 700px) {
  .authPage {
    padding: 24px 14px;
  }

  .authCard,
  .authCard.wide {
    width: 100%;
    padding: 32px 20px 26px;
    border-radius: 15px;
  }

  .authLogo {
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
  }

  .authCard h1 {
    font-size: 28px;
  }

  .authRegisterGrid {
    grid-template-columns: 1fr;
  }

  .authRegisterGrid .authField.full {
    grid-column: auto;
  }

  .authLinks {
    flex-direction: column;
    text-align: center;
  }
}
