:root {
  --auth-ink: #0b2035;
  --auth-muted: #667a8d;
  --auth-blue: #1268e8;
  --auth-blue-dark: #0b4fae;
  --auth-teal: #26b8ad;
  --auth-line: #d8e3ec;
}

.auth-page,
.auth-page * {
  box-sizing: border-box;
}

.auth-page {
  color: var(--auth-ink);
  background:
    radial-gradient(circle at 18% 18%, rgba(42, 134, 255, .24), transparent 34%),
    radial-gradient(circle at 82% 74%, rgba(38, 184, 173, .18), transparent 30%),
    linear-gradient(145deg, #061321 0%, #0a243c 52%, #0b3550 100%);
  place-items: center;
  min-height: calc(100vh - 1px);
  padding: clamp(22px, 5vw, 64px) 16px;
  font-family: Arial, sans-serif;
  display: grid;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: "";
  pointer-events: none;
  opacity: .22;
  background-image:
    linear-gradient(rgba(136, 190, 235, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(136, 190, 235, .18) 1px, transparent 1px);
  background-size: 52px 52px;
  position: absolute;
  inset: 0;
  -webkit-mask-image: radial-gradient(circle at center, #000, transparent 78%);
  mask-image: radial-gradient(circle at center, #000, transparent 78%);
}

.auth-card {
  z-index: 1;
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 24px;
  width: min(540px, 100%);
  padding: clamp(28px, 5vw, 46px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 32px 90px rgba(0, 8, 20, .48), inset 0 1px #fff;
}

.auth-card::before {
  content: "";
  background: linear-gradient(90deg, var(--auth-blue), var(--auth-teal));
  height: 5px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.auth-logo {
  background: linear-gradient(145deg, #f8fbfe, #eef4f8);
  border: 1px solid #e0e9f0;
  border-radius: 15px;
  align-items: center;
  width: fit-content;
  min-height: 72px;
  padding: 12px 18px;
  display: flex;
}

.auth-logo img {
  object-fit: contain;
  width: 190px;
  max-width: 100%;
  height: auto;
  display: block;
}

.auth-card > small {
  color: var(--auth-blue);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-top: 30px;
  font-size: 10px;
  font-weight: 900;
  display: block;
}

.auth-card h1 {
  color: var(--auth-ink);
  letter-spacing: -.04em;
  margin: 9px 0 8px;
  font-size: clamp(34px, 6vw, 48px);
  font-weight: 850;
  line-height: 1.02;
}

.auth-card > p {
  color: var(--auth-muted);
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
}

.auth-card form {
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 28px 0 20px;
  display: grid;
}

.auth-card label {
  color: #395267;
  gap: 7px;
  min-width: 0;
  font-size: 11px;
  font-weight: 850;
  display: grid;
}

.auth-card input {
  color: #102a40;
  width: 100%;
  height: 48px;
  font: inherit;
  background: #f8fafb;
  border: 1px solid #cbd9e3;
  border-radius: 10px;
  outline: 0;
  padding: 0 13px;
  font-size: 14px;
  font-weight: 500;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.auth-card input:focus {
  background: #fff;
  border-color: var(--auth-blue);
  box-shadow: 0 0 0 4px rgba(18, 104, 232, .13);
}

.auth-card form > button,
.auth-actions a,
.auth-actions button {
  color: #fff;
  text-align: center;
  cursor: pointer;
  background: linear-gradient(135deg, var(--auth-blue), var(--auth-blue-dark));
  border: 1px solid #2779ec;
  border-radius: 11px;
  min-height: 50px;
  padding: 13px 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(18, 104, 232, .24);
  transition: transform .18s, box-shadow .18s, filter .18s;
}

.auth-card form > button:hover,
.auth-actions a:hover,
.auth-actions button:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(18, 104, 232, .3);
}

.auth-card form > button:disabled,
.auth-actions button:disabled {
  cursor: wait;
  opacity: .65;
  transform: none;
}

.auth-card form > button,
.auth-check {
  grid-column: 1 / -1;
}

.auth-check {
  color: #4f6578 !important;
  background: #eef7f6;
  border: 1px solid #c7e1de;
  border-radius: 10px;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px !important;
  padding: 13px;
  font-weight: 600 !important;
}

.auth-check input {
  accent-color: var(--auth-teal);
  width: 19px;
  height: 19px;
  margin: 0;
  padding: 0;
}

.auth-check a {
  color: var(--auth-blue);
  font-weight: 800;
  text-decoration: underline;
}

.auth-message {
  color: #155a55 !important;
  background: #e9f7f4;
  border: 1px solid #b9ded8;
  border-left: 4px solid var(--auth-teal);
  border-radius: 9px;
  margin: 0 0 18px !important;
  padding: 13px 14px;
  font-size: 12px !important;
  font-weight: 750;
}

.auth-card nav {
  border-top: 1px solid var(--auth-line);
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 8px;
  padding-top: 18px;
  display: flex;
}

.auth-card nav button,
.auth-back {
  color: var(--auth-blue);
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 5px 0;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.auth-card nav button:hover,
.auth-back:hover {
  text-decoration: underline;
}

.auth-back {
  color: #687d8f;
  margin-top: 18px;
  display: inline-flex;
}

.auth-actions {
  gap: 10px;
  margin-top: 26px;
  display: grid;
}

.auth-actions button {
  color: #8a3140;
  background: #fff2f3;
  border-color: #e9c8ce;
  box-shadow: none;
}

@media (max-width: 560px) {
  .auth-page {
    align-items: start;
    padding: 14px;
  }

  .auth-card {
    border-radius: 18px;
    padding: 27px 21px;
  }

  .auth-logo {
    min-height: 62px;
    padding: 10px 14px;
  }

  .auth-logo img {
    width: 160px;
  }

  .auth-card > small {
    margin-top: 24px;
  }

  .auth-card form {
    grid-template-columns: 1fr;
    margin-top: 23px;
  }

  .auth-card label,
  .auth-check,
  .auth-card form > button {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-card input,
  .auth-card button,
  .auth-actions a {
    transition: none;
  }
}
