:root {
  --paper: #f1e4cd;
  --paper-light: #f8efdd;
  --ink: #1e2d25;
  --ink-soft: #46544a;
  --green: #1e3b2c;
  --green-deep: #11261d;
  --red: #b4462f;
  --line: rgba(30, 45, 37, 0.2);
  --display: 'Cormorant Garamond', 'Palatino Linotype', Georgia, serif;
  --ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: '';
  opacity: 0.3;
  background-image: radial-gradient(rgba(30, 45, 37, 0.18) 0.5px, transparent 0.5px);
  background-size: 8px 8px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 30% 20%, black, transparent 76%);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  min-height: 100vh;
}

.auth-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 660px;
  padding: 48px 7vw;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  color: var(--ink);
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
}

.auth-brand-mark {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--red);
  font-size: 19px;
}

.auth-copy {
  margin-top: 46px;
}

.auth-kicker {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.auth-copy h1 {
  max-width: 470px;
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(2.5rem, 4.1vw, 4.1rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.9;
  text-wrap: balance;
}

.auth-copy > p:last-child {
  max-width: 430px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 14px;
  max-width: 460px;
  margin-top: 30px;
}

.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-form label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-form input[type='text'],
.auth-form input[type='email'],
.auth-form input[type='password'],
.auth-form input:not([type]) {
  width: 100%;
  min-height: 48px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
}

.auth-form input::placeholder {
  color: rgba(30, 45, 37, 0.4);
}

.auth-form input:focus {
  border-bottom-color: var(--red);
}

.auth-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  margin-top: 8px;
  border: 1px solid var(--ink);
  color: var(--paper-light);
  background: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.auth-form button:hover,
.auth-form button:focus-visible {
  background: var(--green);
}

.auth-form button:disabled {
  opacity: 0.6;
}

.auth-status {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-size: 12px;
  line-height: 1.45;
}

.auth-status.success {
  color: var(--green);
}

.auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
}

.auth-consent input {
  width: 16px;
  min-height: 16px;
  margin: 2px 0 0;
  accent-color: var(--red);
}

.auth-consent span {
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.45;
}

.auth-switch {
  max-width: 460px;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.auth-switch a {
  color: var(--red);
  font-weight: 700;
}

.auth-demo {
  max-width: 460px;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
}

.auth-demo strong {
  color: var(--ink);
  font-weight: 700;
}

.auth-small {
  max-width: 460px;
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

.auth-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 54px 6vw;
  color: var(--paper-light);
  background:
    radial-gradient(ellipse 600px 500px at 90% 10%, rgba(231, 201, 143, 0.12), transparent 65%),
    linear-gradient(160deg, var(--green), var(--green-deep));
}

.auth-side-kicker {
  margin: 0 0 28px;
  color: #e7c98f;
  font-family: var(--display);
  font-size: 24px;
}

.auth-side-title {
  max-width: 480px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.7rem, 4.7vw, 4.8rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.92;
}

.auth-side a {
  width: fit-content;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(241, 228, 205, 0.45);
  color: rgba(241, 228, 205, 0.74);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-side {
    display: none;
  }

  .auth-main {
    min-height: 100vh;
    max-width: 620px;
    padding: 36px 24px;
  }

  .auth-copy {
    margin-top: 34px;
  }
}

@media (max-width: 520px) {
  .auth-row {
    grid-template-columns: 1fr;
  }

  .auth-copy h1 {
    font-size: clamp(2.8rem, 13vw, 4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
