:root {
  color-scheme: dark;
  --bg: #0e120d;
  --panel: #192218;
  --field: #111a11;
  --line: #34452f;
  --text: #f4f7f1;
  --muted: #b8c0b4;
  --accent: #9de770;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: radial-gradient(circle at 50% -15%, rgba(157, 231, 112, .11), transparent 36rem), var(--bg);
  color: var(--text);
}

button, input { font: inherit; }

.auth-shell {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(360px, 1fr);
  align-items: center;
  gap: clamp(42px, 7vw, 110px);
  width: min(920px, 100%);
}

.auth-brand { display: grid; justify-items: start; gap: 18px; }
.auth-icon { width: 72px; height: 72px; border-radius: 18px; }
.auth-wordmark { width: min(290px, 100%); height: auto; }
.auth-brand p { margin: -6px 0 0; color: var(--muted); font-size: 15px; }

.auth-card {
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(25, 34, 24, .94);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .35);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: #111811;
  border: 1px solid rgba(157, 231, 112, .12);
  border-radius: 8px;
}

.auth-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.auth-tabs button.is-active { background: #243121; color: var(--accent); font-weight: 700; }
.auth-heading { margin: 28px 0 22px; }
.auth-heading h1 { margin: 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.12; }
.auth-heading p { margin: 8px 0 0; color: var(--muted); }
#authForm { display: grid; gap: 16px; }
#authForm label { display: grid; gap: 7px; color: #dce7d8; font-size: 13px; }
#authForm input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  background: var(--field);
  color: var(--text);
  transition: border-color 150ms ease, background 150ms ease;
}
#authForm input:focus { border-color: var(--accent); background: #142014; }
.auth-message { min-height: 20px; margin: -2px 0; color: #ff8d84; font-size: 13px; }
.auth-message.is-success { color: var(--accent); }
.auth-submit {
  min-height: 50px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #0a1109;
  font-weight: 800;
  cursor: pointer;
}
.auth-submit:disabled { cursor: wait; opacity: .68; }
.auth-recover {
  display: block;
  margin: 18px auto 0;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.auth-recover:hover { color: var(--accent); }

@media (max-width: 720px) {
  body { align-items: start; padding: max(30px, env(safe-area-inset-top)) 18px max(30px, env(safe-area-inset-bottom)); }
  .auth-shell { grid-template-columns: 1fr; gap: 28px; width: min(430px, 100%); }
  .auth-brand { justify-items: center; gap: 12px; }
  .auth-icon { width: 56px; height: 56px; border-radius: 14px; }
  .auth-wordmark { width: 210px; }
  .auth-card { padding: 24px 20px; }
}
