:root {
  color-scheme: light;
  --accent-50: #E1F5EE;
  --accent-200: #5DCAA5;
  --accent-600: #0F6E56;
  --accent-800: #085041;
  --surface-page: #FAFAF9;
  --surface-card: #FFFFFF;
  --border: #E5E5E0;
  --text-primary: #1A1A18;
  --text-secondary: #6B6B66;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-primary);
  background: var(--surface-page);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--surface-page);
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgba(29, 111, 113, 0.12);
  border-radius: 50%;
  content: "";
}

body::before {
  top: -9rem;
  right: 18%;
}

body::after {
  bottom: -11rem;
  left: 12%;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.68fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 7rem);
  width: min(72rem, calc(100% - 3rem));
  min-height: 100vh;
  margin: 0 auto;
  padding: 3rem 0 4.5rem;
}

.intro {
  max-width: 38rem;
  padding-left: clamp(0rem, 2vw, 1rem);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 1.25rem;
  border-radius: 9px;
  background: var(--accent-50);
  color: var(--accent-800);
}

.brand-mark svg {
  display: block;
  width: 20px;
  height: 20px;
}

.eyebrow,
.card-label {
  margin: 0 0 0.7rem;
  color: var(--accent-600);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 500;
}

.lead {
  max-width: 34rem;
  margin: 1.75rem 0 2rem;
  color: var(--text-secondary);
  font-size: clamp(1.05rem, 2.2vw, 1.32rem);
  line-height: 1.55;
}

.modality-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.modality-list span {
  padding: 0.4rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent-50);
  color: var(--accent-600);
  font-size: 12px;
  font-weight: 500;
}

.login-card {
  width: min(100%, 22.5rem);
  justify-self: end;
  padding: clamp(1.6rem, 4vw, 2.35rem);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-card);
}

.lock-mark {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  margin-bottom: 1.15rem;
  border-radius: 8px;
  background: var(--accent-50);
  color: var(--accent-800);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0;
}

.card-copy {
  margin: 0.75rem 0 1.55rem;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.5;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.code-control {
  position: relative;
}

input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 6rem 0.75rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  background: var(--surface-card);
  color: var(--text-primary);
  font: inherit;
  letter-spacing: 0.04em;
  transition: border-color 150ms ease;
}

input:focus {
  border-color: var(--accent-200);
  box-shadow: none;
}

button {
  border: 0;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.show-code {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  background: transparent;
  color: var(--accent-600);
  font-size: 0.76rem;
  font-weight: 500;
  transform: translateY(-50%);
}

.submit {
  width: 100%;
  min-height: 3.2rem;
  margin-top: 0.9rem;
  border-radius: 8px;
  background: var(--accent-50);
  color: var(--accent-800);
  font-weight: 500;
  box-shadow: none;
}

.submit:hover {
  filter: none;
  background: color-mix(in srgb, var(--accent-50) 70%, var(--accent-200));
}

.submit:disabled {
  cursor: wait;
  opacity: 0.66;
}

.status {
  min-height: 1.3rem;
  margin: 0.7rem 0 0;
  color: #b13e3e;
  font-size: 0.82rem;
}

.status-ok {
  color: var(--accent-600);
}

[hidden] {
  display: none !important;
}

.auth-switch {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0;
  background: transparent;
  color: var(--accent-600);
  font-size: 0.84rem;
  font-weight: 500;
  text-align: left;
}

#loginName,
#loginEmail,
#resetPasswordConfirm {
  padding-right: 0.95rem;
  margin-bottom: 0.85rem;
  letter-spacing: 0;
}

#passwordBlock {
  margin-bottom: 0;
}

a.auth-switch {
  display: inline-block;
  margin-top: 0.85rem;
  color: var(--accent-600);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
}

.privacy-note {
  margin: 1.1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.76rem;
  line-height: 1.45;
}

footer {
  position: fixed;
  left: clamp(1rem, 3vw, 1.5rem);
  bottom: 1rem;
  z-index: 1;
  color: var(--text-secondary);
  font-size: 0.72rem;
}

@media (max-width: 760px) {
  .login-shell {
    grid-template-columns: 1fr;
    gap: 2.2rem;
    width: min(31rem, calc(100% - 2rem));
    min-height: auto;
    padding: 2rem 0 5rem;
  }

  .intro {
    padding: 0 0.4rem;
  }

  .login-card {
    justify-self: stretch;
    width: 100%;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    margin-bottom: 1rem;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 2.6rem);
  }

  .lead {
    margin: 1.15rem 0 1.35rem;
  }

  footer {
    position: static;
    width: calc(100% - 2rem);
    margin: 0 auto;
    padding: 0 1rem 1.2rem;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
