:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #596862;
  --paper: #fffef9;
  --line: #dce4df;
  --green: #176149;
  --green-dark: #104735;
  --cream: #f2f0e7;
  --danger: #9b2c2c;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #e4eee8, transparent 42%), var(--cream);
}

.auth-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(24px + var(--safe-top)) calc(24px + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(24px + var(--safe-left));
}

.auth-card {
  width: min(100%, 460px);
  padding: clamp(28px, 6vw, 48px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 20px 55px rgb(27 52 43 / 12%);
}

.brand-mark {
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  box-shadow: 0 9px 24px rgb(27 52 43 / 14%);
}

.eyebrow {
  margin: 24px 0 4px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 { margin: 0; font-size: clamp(28px, 7vw, 40px); line-height: 1.08; }
.intro { margin: 16px 0 26px; color: var(--muted); }
form { display: grid; gap: 9px; }
label { margin-top: 8px; font-weight: 700; }

input {
  width: 100%;
  min-height: 48px;
  padding: 13px 14px;
  border: 1px solid #b9c6bf;
  border-radius: 9px;
  background: white;
  color: var(--ink);
  font: inherit;
}

input:focus { outline: 3px solid rgb(23 97 73 / 18%); border-color: var(--green); }

button {
  margin-top: 18px;
  min-height: 48px;
  padding: 13px 18px;
  border: 0;
  border-radius: 9px;
  background: var(--green);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover, button:focus-visible { background: var(--green-dark); }
.notice, .error { padding: 11px 13px; border-radius: 8px; }
.notice { background: #e7f1ec; }
.error { color: var(--danger); background: #faeaea; }
.micro { margin: 24px 0 0; color: var(--muted); font-size: 13px; }

@media (max-width: 480px) {
  .auth-shell { place-items: start center; padding-top: calc(18px + var(--safe-top)); }
  .auth-card { padding: 24px 20px; border-radius: 18px; }
  .eyebrow { margin-top: 18px; }
  h1 { font-size: 30px; }
  input, button { font-size: 16px; }
}
