:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #66716d;
  --line: #dfe5e1;
  --paper: #f4f2ec;
  --card: #fffefb;
  --green: #1f7255;
  --green-dark: #15513d;
  --mint: #dff3e8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(360px, 0.92fr) minmax(520px, 1.08fr);
}

.auth-story {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 5vw, 72px);
  color: #f6fff9;
  background:
    radial-gradient(circle at 18% 22%, rgba(144, 235, 190, 0.28), transparent 30%),
    radial-gradient(circle at 88% 82%, rgba(255, 229, 157, 0.18), transparent 28%),
    #123f31;
}

.auth-story::after {
  position: absolute;
  right: -16%;
  bottom: 12%;
  width: 360px;
  height: 360px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(255, 255, 255, 0.025),
    0 0 0 140px rgba(255, 255, 255, 0.018);
}

.brand {
  z-index: 1;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 12px;
  color: inherit;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #123f31;
  background: #baf0cf;
}

.story-copy {
  z-index: 1;
  max-width: 590px;
}

.eyebrow,
.form-eyebrow {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.eyebrow {
  color: #a9dfc0;
}

.story-copy h1 {
  max-width: 14ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 5.2vw, 74px);
  font-weight: 500;
  line-height: 0.99;
  letter-spacing: -0.055em;
}

.story-copy > p:last-child {
  max-width: 570px;
  margin: 28px 0 0;
  color: rgba(246, 255, 249, 0.72);
  font-size: 17px;
  line-height: 1.6;
}

.story-note {
  z-index: 1;
  display: flex;
  max-width: 420px;
  align-items: center;
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.story-note span {
  font-family: Georgia, serif;
  font-size: 52px;
  line-height: 1;
}

.story-note p {
  margin: 0;
  color: rgba(246, 255, 249, 0.7);
  line-height: 1.45;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 32px;
}

.auth-card {
  width: min(100%, 460px);
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid rgba(23, 32, 29, 0.07);
  border-radius: 26px;
  background: var(--card);
  box-shadow: 0 28px 80px rgba(34, 48, 43, 0.1);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 42px;
  padding: 4px;
  border-radius: 14px;
  background: #eef1ee;
}

.auth-tab {
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.auth-tab.active {
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 2px 8px rgba(23, 32, 29, 0.08);
}

.form-eyebrow {
  margin-bottom: 9px;
  color: var(--green);
}

.auth-card h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.form-hint {
  margin: 12px 0 30px;
  color: var(--muted);
  line-height: 1.55;
}

form {
  display: grid;
  gap: 20px;
}

label {
  display: grid;
  gap: 8px;
}

label > span {
  font-size: 13px;
  font-weight: 750;
}

input {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus {
  border-color: #69a88f;
  box-shadow: 0 0 0 4px rgba(78, 151, 121, 0.13);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 92px;
}

.password-field button {
  position: absolute;
  top: 50%;
  right: 12px;
  padding: 4px 6px;
  transform: translateY(-50%);
  border: 0;
  color: var(--green);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.submit-button {
  min-height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: 13px;
  color: white;
  background: var(--green);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(31, 114, 85, 0.22);
  transition: transform 160ms ease, background 160ms ease;
}

.submit-button:hover {
  transform: translateY(-1px);
  background: var(--green-dark);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.auth-error {
  padding: 12px 14px;
  border: 1px solid #efc6c0;
  border-radius: 10px;
  color: #8b2f25;
  background: #fff2f0;
  font-size: 13px;
  line-height: 1.45;
}

.auth-docs-link {
  display: block;
  margin-top: 18px;
  color: #2b678f;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.auth-docs-link:hover,
.auth-docs-link:focus-visible {
  color: #174e73;
  text-decoration: underline;
  text-underline-offset: 3px;
  outline: none;
}

.switch-text {
  margin: 28px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.switch-text button {
  padding: 0;
  border: 0;
  color: var(--green);
  background: transparent;
  font-weight: 800;
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-story {
    min-height: 300px;
    padding: 28px;
  }

  .story-copy {
    margin: 56px 0 24px;
  }

  .story-copy h1 {
    max-width: 18ch;
    font-size: clamp(36px, 9vw, 58px);
  }

  .story-note {
    display: none;
  }

  .auth-panel {
    padding: 20px 16px 36px;
  }

  .auth-card {
    margin-top: -32px;
  }
}
