:root {
  color-scheme: light;
  --primary: #59392f;
  --accent: #c58a45;
  --canvas: #f7f6f3;
  --surface: #ffffff;
  --text: #252321;
  --muted: #67625d;
  --border: #dedad4;
  --success: #18794e;
  --danger: #b42318;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.setup-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.setup-card {
  width: min(100%, 560px);
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(89, 57, 47, 0.09);
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: var(--primary);
  font-weight: 700;
  letter-spacing: .04em;
}

.eyebrow {
  margin: 24px 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
}

h1 { margin: 0; font-size: clamp(28px, 6vw, 38px); line-height: 1.15; }
.intro { margin: 16px 0 24px; color: var(--muted); line-height: 1.65; }

.health {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-weight: 600;
}

.health-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.health.ok .health-dot { background: var(--success); }
.health.error .health-dot { background: var(--danger); }

.details { margin: 18px 0 0; }
.details div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 600; text-align: right; }
.footnote { margin: 24px 0 0; color: var(--muted); font-size: 13px; }

.auth-form { display: grid; gap: 16px; }
.auth-form label { display: grid; gap: 7px; color: var(--text); font-size: 14px; font-weight: 600; }
.auth-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
}
.auth-form input:focus { outline: 3px solid rgba(37, 99, 235, .2); border-color: #2563eb; }
.auth-form button {
  min-height: 46px;
  border: 0;
  border-radius: 9px;
  background: var(--primary);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.auth-form button:disabled { opacity: .6; cursor: wait; }
.setup-warning, .notice { padding: 12px 14px; border: 1px solid var(--border); border-radius: 9px; background: #f8ead7; line-height: 1.45; }
.notice.error { color: var(--danger); background: #fff1f0; border-color: #f0b7b2; }
.notice.ok { color: var(--success); background: #effaf5; border-color: #a8d9c3; }
.auth-form small { margin-top: -10px; color: var(--muted); }

@media (max-width: 520px) {
  .setup-shell { padding: 12px; }
  .setup-card { padding: 24px; }
  .details div { align-items: flex-start; flex-direction: column; gap: 4px; }
  .details dd { text-align: left; }
}
