:root {
  --auth-blue: #1469e8;
  --auth-violet: #6252c8;
  --auth-coral: #e44870;
  --auth-ink: #162237;
  --auth-muted: #647084;
  --auth-border: #dce2eb;
  --auth-surface: #ffffff;
}

html,
body {
  min-height: 100%;
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  padding: 32px 18px;
  background: linear-gradient(145deg, var(--auth-blue) 0%, var(--auth-violet) 52%, var(--auth-coral) 100%);
  color: var(--auth-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-ui);
}

.auth-shell {
  width: min(100%, 480px);
  margin: auto;
}

.auth-home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.auth-home-link:hover,
.auth-home-link:focus-visible {
  color: #ffffff;
  text-decoration: underline;
}

.auth-card {
  width: 100%;
  padding: 32px;
  background: var(--auth-surface);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(22, 34, 55, 0.22);
}

.auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.auth-brand img {
  display: block;
  width: auto;
  max-width: 190px;
  height: 31px;
}

.auth-heading {
  margin: 0;
  color: var(--auth-ink);
  font-size: clamp(1.65rem, 4vw, 2rem);
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
}

.auth-description {
  max-width: 390px;
  margin: 10px auto 24px;
  color: var(--auth-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  text-align: center;
}

.auth-state-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
}

.auth-state-icon--primary {
  color: #185ec4;
  background: #e9f2ff;
}

.auth-state-icon--success {
  color: #11855d;
  background: #e6f8f1;
}

.auth-state-icon--danger {
  color: #c43b54;
  background: #fff0f3;
}

.auth-card .form-label {
  margin-bottom: 6px;
  color: #344157;
  font-size: 0.875rem;
  font-weight: 650;
}

.auth-card .form-control,
.auth-card .input-group > .form-control {
  min-height: 46px;
  border-color: var(--auth-border);
  border-radius: 6px;
  color: var(--auth-ink);
  font-size: 0.95rem;
}

.auth-card .form-control:focus {
  border-color: var(--auth-blue);
  box-shadow: 0 0 0 3px rgba(20, 105, 232, 0.14);
}

.auth-card .input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.auth-card .input-group .btn {
  min-width: 46px;
  border-color: var(--auth-border);
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

.auth-card .form-check-input:checked {
  background-color: var(--auth-blue);
  border-color: var(--auth-blue);
}

.auth-card .btn {
  min-height: 44px;
  border-radius: 6px;
  font-size: 0.925rem;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-card .btn-primary {
  background: var(--auth-blue);
  border-color: var(--auth-blue);
}

.auth-card .btn-primary:hover,
.auth-card .btn-primary:focus-visible {
  background: #0d58c7;
  border-color: #0d58c7;
}

.auth-card .btn-outline-primary {
  color: #145fc9;
  border-color: #9fbce7;
}

.auth-card .alert {
  border-radius: 6px;
  font-size: 0.875rem;
  line-height: 1.45;
}

.auth-card .form-text,
.auth-card .text-muted {
  color: var(--auth-muted) !important;
}

.auth-card a:not(.btn) {
  color: #145fc9;
  font-weight: 600;
}

.auth-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  font-size: 0.875rem;
}

.auth-form-options .form-check {
  margin: 0;
}

.auth-secondary-action {
  margin-top: 18px;
  color: var(--auth-muted);
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
}

.auth-secondary-action .btn-link {
  min-height: 0;
  padding: 0;
  border: 0;
  display: inline;
  color: #145fc9;
  font: inherit;
  font-weight: 600;
  vertical-align: baseline;
}

.auth-email {
  overflow-wrap: anywhere;
}

.auth-detail-list {
  margin: 20px 0;
  padding: 16px;
  background: #f6f8fb;
  border: 1px solid #e3e8f0;
  border-radius: 6px;
  color: var(--auth-muted);
  font-size: 0.825rem;
  line-height: 1.55;
}

.auth-detail-list p:last-child {
  margin-bottom: 0;
}

.auth-footer {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}

.auth-footer-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 4px;
}

.auth-footer a {
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

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

.auth-countdown {
  color: var(--auth-blue);
  font-size: 1.1rem;
  font-weight: 750;
}

@media (max-width: 575.98px) {
  body.auth-page {
    padding: 18px 12px;
    align-items: flex-start;
  }

  .auth-shell {
    margin-top: auto;
    margin-bottom: auto;
  }

  .auth-card {
    padding: 26px 20px;
  }

  .auth-form-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-height: 720px) and (min-width: 576px) {
  body.auth-page {
    padding-top: 20px;
    padding-bottom: 20px;
    align-items: flex-start;
  }

  .auth-card {
    padding-top: 26px;
    padding-bottom: 26px;
  }

  .auth-brand {
    margin-bottom: 18px;
  }
}

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