@import url("https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Source+Sans+3:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap");

:root {
  --navy: #003256;
  --navy-dark: #002440;
  --navy-soft: #0d6191;
  --gold: #b8975d;
  --bg: #eef2f6;
  --surface: #ffffff;
  --ink: #1b1b1b;
  --muted: #5b616b;
  --line: #dfe1e2;
  --danger-bg: #fef2f2;
  --danger-border: #b50909;
  --danger-text: #7a1d1d;
  --focus: rgba(0, 50, 86, 0.18);
  --shadow: 0 24px 48px -12px rgba(0, 36, 64, 0.18);
  --radius: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--navy);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.auth-header {
  background: var(--navy);
}

.auth-header__official {
  background: #f0f0f0;
  border-bottom: 1px solid #dfe1e2;
  color: #1b1b1b;
  font-size: 0.72rem;
  line-height: 1.4;
}

.auth-header__official-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.35rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-header__official-flag {
  flex-shrink: 0;
  display: block;
  line-height: 0;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.auth-header__official-flag img {
  display: block;
  width: 19px;
  height: 13px;
}

.auth-header__bar {
  border-bottom: 3px solid var(--gold);
}

.auth-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.auth-header__brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.auth-header__brand:hover {
  text-decoration: none;
  opacity: 0.95;
}

.auth-header__logo {
  height: 52px;
  width: auto;
  display: block;
}

.auth-header__nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.auth-header__nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.45rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.auth-header__nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
  text-decoration: none;
}

.auth-header__nav-link--active {
  background: #fff;
  border-color: #fff;
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.auth-header__nav-link--active:hover {
  background: #fff;
  border-color: #fff;
  color: var(--navy-dark);
}

@media (max-width: 479px) {
  .auth-header__inner {
    padding: 0.75rem 1rem;
  }

  .auth-header__logo {
    height: 40px;
  }

  .auth-header__nav-link {
    min-height: 2rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.66rem;
    letter-spacing: 0.08em;
  }
}

.auth-shell {
  min-height: calc(100vh - 108px);
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 960px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, 480px);
    min-height: calc(100vh - 108px);
  }
}

.auth-brand {
  display: none;
  position: relative;
  overflow: hidden;
  padding: 3.5rem 3rem;
  color: #fff;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 55%, #001a30 100%);
}

@media (min-width: 960px) {
  .auth-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.auth-brand__seal {
  position: absolute;
  right: -2rem;
  bottom: -3rem;
  width: min(420px, 70%);
  opacity: 0.08;
  pointer-events: none;
}

.auth-brand__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin: 0 0 1rem;
}

.auth-brand__title {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1rem;
  max-width: 16ch;
}

.auth-brand__copy {
  margin: 0;
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
}

.auth-brand__list {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.auth-brand__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
}

.auth-brand__list svg {
  flex-shrink: 0;
  margin-top: 0.1rem;
  opacity: 0.9;
}

.auth-brand__privacy {
  display: inline-flex;
  margin-top: 1.5rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(184, 151, 93, 0.55);
  background: rgba(184, 151, 93, 0.14);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f5ead5;
}

.auth-brand__restricted {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  max-width: 34rem;
}

.auth-brand__restricted-title {
  margin: 0 0 0.5rem;
  font-family: "Public Sans", "Source Sans 3", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.auth-brand__restricted-copy {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

.auth-brand__restricted-copy strong {
  color: #fff;
  font-weight: 700;
}

.auth-brand__notice {
  margin: 1.25rem 0 0;
  max-width: 34rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}

.auth-brand__notice strong {
  color: #fff;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem 3rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.75rem 1.75rem;
}

@media (min-width: 480px) {
  .auth-card {
    padding: 2.25rem 2rem 2rem;
  }
}

.auth-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-soft);
  margin-bottom: 0.65rem;
}

.auth-card__title {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.auth-page-signin .auth-card__title,
.auth-page-activate .auth-card__title {
  font-family: "Public Sans", "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.auth-page-signin .auth-brand__title,
.auth-page-activate .auth-brand__title {
  font-family: "Public Sans", "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-card__subtitle {
  margin: 0 0 1.75rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--muted);
}

.auth-alert {
  display: none;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: var(--danger-bg);
  color: var(--danger-text);
  font-size: 0.9rem;
  line-height: 1.45;
}

.auth-field {
  margin-bottom: 1.15rem;
}

.auth-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--navy-dark);
}

.auth-input {
  width: 100%;
  border: 1px solid #adb5bd;
  border-radius: 8px;
  padding: 0.78rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input::placeholder {
  color: #8b949e;
}

.auth-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px var(--focus);
}

.auth-btn {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--navy);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.auth-btn:hover {
  background: var(--navy-dark);
}

.auth-btn:active {
  transform: translateY(1px);
}

.auth-btn--ghost {
  margin-top: 0.65rem;
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
  font-weight: 600;
}

.auth-btn--ghost:hover {
  background: #f8fafc;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
  margin-top: 1.35rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.auth-help {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.auth-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
  margin: 0 0 1.5rem;
}

.auth-step {
  text-align: center;
}

.auth-step__bar {
  height: 4px;
  border-radius: 999px;
  background: #d9e2ec;
  margin-bottom: 0.45rem;
}

.auth-step__label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.auth-step.on .auth-step__bar {
  background: linear-gradient(90deg, var(--navy), var(--navy-soft));
  animation: auth-step-bar-fill 0.55s ease-out;
}

.auth-step.on .auth-step__label {
  color: var(--navy);
  animation: auth-step-label-in 0.4s ease-out;
}

@keyframes auth-step-bar-fill {
  from {
    transform: scaleX(0.35);
    transform-origin: left center;
    opacity: 0.55;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes auth-step-label-in {
  from {
    opacity: 0.45;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-panel {
  display: none;
}

.auth-panel.on {
  display: block;
  animation: auth-panel-in 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes auth-panel-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-confirm-stack {
  margin-bottom: 0.25rem;
}

.auth-confirm-label {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-soft);
}

.auth-confirm-value {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}

.auth-confirm-block {
  position: relative;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition:
    border-color 0.35s ease,
    background 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.35s ease;
}

.auth-panel.on .auth-confirm-stack .auth-confirm-block {
  animation: auth-confirm-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-panel.on .auth-confirm-stack .auth-confirm-block:nth-child(1) {
  animation-delay: 0.06s;
}

.auth-panel.on .auth-confirm-stack .auth-confirm-block:nth-child(2) {
  animation-delay: 0.14s;
}

@keyframes auth-confirm-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-confirm-block.is-verified {
  border-color: #2f5d50;
  background: linear-gradient(180deg, #f0fdf4 0%, #f8fafc 100%);
  box-shadow:
    inset 0 0 0 1px rgba(47, 93, 80, 0.08),
    0 8px 20px -12px rgba(47, 93, 80, 0.35);
  transform: translateY(-1px);
}

.auth-confirm-block.is-verified::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(47, 93, 80, 0.08) 50%, transparent 60%);
  transform: translateX(-120%);
  animation: auth-confirm-shimmer 0.75s ease-out forwards;
}

.auth-confirm-block.is-verified::after {
  content: "✓";
  position: absolute;
  top: 50%;
  right: 1rem;
  width: 1.65rem;
  height: 1.65rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid #2f5d50;
  background: linear-gradient(180deg, #3a6b5c 0%, #2f5d50 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  transform: translateY(-50%) scale(0.4);
  opacity: 0;
  animation: auth-check-pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes auth-confirm-shimmer {
  to {
    transform: translateX(120%);
  }
}

@keyframes auth-check-pop {
  to {
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }
}

.auth-confirm-banner {
  display: none;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
  color: #166534;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
  animation: auth-banner-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-confirm-banner.on {
  display: flex;
}

.auth-confirm-banner__icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #2f5d50;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  animation: auth-check-pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

@keyframes auth-banner-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-btn.is-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.auth-btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 999px;
  animation: auth-btn-spin 0.65s linear infinite;
}

@keyframes auth-btn-spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-btn.is-success {
  background: #2f5d50;
  animation: auth-btn-success 0.35s ease-out;
}

@keyframes auth-btn-success {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

.auth-secure {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
}

.auth-secure svg {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: var(--navy);
}

.auth-footer {
  padding: 1.25rem 1.5rem 2rem;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--muted);
}

.auth-footer strong {
  color: var(--navy-dark);
}
