:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #18222e;
  background: #f4f7fa;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(circle at 12% 16%, rgb(23 135 118 / 12%), transparent 24rem),
    linear-gradient(145deg, #f8fafc 0%, #eef4f5 100%);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.site-header,
footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  padding: 24px 0;
}

.brand {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, #157c70, #0d5d58);
  box-shadow: 0 8px 24px rgb(21 124 112 / 24%);
  font-size: 1.2rem;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 1px;
  color: #607080;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

main {
  display: grid;
}

.hero {
  width: min(1120px, calc(100% - 40px));
  margin: auto;
  padding: 72px 0 100px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  align-items: center;
  gap: 72px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #157c70;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #14202b;
  font-size: clamp(2rem, 4.8vw, 4.25rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.lead {
  max-width: 650px;
  margin: 28px 0 0;
  color: #536474;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.hero-card,
.auth-card {
  border: 1px solid rgb(26 64 75 / 10%);
  background: rgb(255 255 255 / 84%);
  box-shadow: 0 24px 70px rgb(23 49 64 / 10%);
  backdrop-filter: blur(16px);
}

.hero-card {
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-radius: 22px;
}

.hero-card strong {
  font-size: 1rem;
}

.hero-card p {
  margin: 6px 0 0;
  color: #667684;
  font-size: 0.92rem;
  line-height: 1.5;
}

.status-dot {
  width: 11px;
  height: 11px;
  margin-top: 5px;
  flex: 0 0 auto;
  border: 3px solid #c9f1e8;
  border-radius: 50%;
  background: #148779;
  box-shadow: 0 0 0 5px #e9f8f4;
}

.auth-shell {
  width: min(100% - 32px, 510px);
  margin: auto;
  padding: 42px 0 72px;
}

.auth-card {
  padding: clamp(28px, 6vw, 48px);
  border-radius: 28px;
}

.auth-card h1 {
  font-size: clamp(1.75rem, 5vw, 2.4rem);
  line-height: 1.12;
}

.state-panel {
  text-align: center;
}

.state-panel > p:not(.eyebrow),
.form-intro {
  margin: 18px 0 0;
  color: #607080;
  line-height: 1.6;
}

.state-help {
  font-size: 0.92rem;
}

.spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 24px;
  display: block;
  border: 4px solid #d8e7e5;
  border-top-color: #157c70;
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

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

.state-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 1.35rem;
  font-weight: 800;
}

.error-icon {
  color: #a83f42;
  background: #feecee;
}

.success-icon {
  color: #0e6d60;
  background: #e1f5ef;
}

.pending-icon {
  color: #526879;
  background: #ebf0f4;
  font-size: 1rem;
}

form h1 {
  margin-bottom: 14px;
}

.form-intro {
  margin: 0 0 30px;
}

label {
  margin: 20px 0 8px;
  display: block;
  color: #2c3b48;
  font-size: 0.9rem;
  font-weight: 700;
}

.password-field {
  position: relative;
}

input {
  width: 100%;
  min-height: 52px;
  padding: 13px 88px 13px 15px;
  border: 1px solid #c8d3dc;
  border-radius: 12px;
  outline: none;
  color: #17222d;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus {
  border-color: #157c70;
  box-shadow: 0 0 0 4px rgb(21 124 112 / 12%);
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  padding: 7px;
  transform: translateY(-50%);
  border: 0;
  color: #356c68;
  background: transparent;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

.form-error {
  margin: 18px 0 0;
  padding: 11px 13px;
  border-radius: 10px;
  color: #8f3035;
  background: #fff0f1;
  font-size: 0.88rem;
  line-height: 1.45;
}

.primary-button {
  width: 100%;
  min-height: 52px;
  margin-top: 24px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #126f66;
  box-shadow: 0 12px 28px rgb(18 111 102 / 22%);
  cursor: pointer;
  font-weight: 800;
  transition: background 160ms ease, transform 160ms ease;
}

.primary-button:hover:not(:disabled) {
  background: #0d5d56;
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.secondary-link {
  margin-top: 22px;
  display: inline-block;
  color: #126f66;
  font-weight: 800;
  text-underline-offset: 4px;
}

footer {
  padding: 22px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #71808e;
  font-size: 0.78rem;
}

@media (max-width: 760px) {
  .hero {
    padding: 42px 0 70px;
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .hero-card {
    max-width: 420px;
  }
}

@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;
  }
}

