/* Jinni login — Obsidian & Iris system (matches /styles.css) */
:root {
  color-scheme: dark;
  --ink: #e9ebf2;
  --muted: #9aa2b4;
  --faint: #6a7285;
  --line: #272c3b;
  --line-soft: #1d212c;
  --panel: #14161f;
  --accent: #918cff;
  --accent-bright: #b3aeff;
  --accent-ink: #0d0d1a;
  --accent-rgb: 145, 140, 255;
  --gold: #e3b25e;
  --green: #4bd68d;
  --amber: #e3b25e;
  --red: #f2736f;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(var(--accent-rgb), 0.13), transparent 34rem),
    radial-gradient(circle at 88% 86%, rgba(227, 178, 94, 0.07), transparent 30rem),
    #0a0b0f;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.login-card {
  width: min(100%, 430px);
  padding: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(233, 235, 242, 0.03);
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--accent-ink);
  background: linear-gradient(145deg, var(--accent-bright), var(--accent) 62%, #6f68e8);
  font-size: 25px;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.24);
}

.eyebrow {
  margin: 24px 0 8px;
  color: var(--accent-bright);
  font: 600 11px/1.4 var(--mono);
  letter-spacing: 0.18em;
}

h1 { margin: 0; font-size: clamp(27px, 5vw, 34px); letter-spacing: -0.035em; }
.lede { margin: 10px 0 30px; color: var(--muted); line-height: 1.55; }

form { display: grid; gap: 10px; }
form[hidden] { display: none; }
label { margin-top: 6px; color: var(--ink); font-size: 13px; font-weight: 600; }

input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #0a0b0f;
  font: inherit;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.16);
}

button {
  min-height: 50px;
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  color: var(--accent-ink);
  background: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease;
}

button:hover { background: var(--accent-bright); }
button:disabled { cursor: wait; opacity: 0.7; }
.error { min-height: 20px; margin: 2px 0 0; color: var(--red); font-size: 13px; }
.device-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--faint);
  font: 500 10.5px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.device-divider::before, .device-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.device-login {
  display: grid;
  place-items: center;
  min-height: 52px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  color: var(--accent-ink);
  background: var(--accent);
  text-decoration: none;
  font-weight: 700;
}
.device-login:hover { background: var(--accent-bright); }
.device-actions { display: grid; gap: 9px; }
.device-signup {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  border-radius: 10px;
  color: var(--accent-bright);
  background: rgba(var(--accent-rgb), 0.07);
  text-decoration: none;
  font-weight: 700;
  transition: border-color 140ms ease, background 140ms ease;
}
.device-signup:hover { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.12); }
.device-help { margin: 9px 0 0; color: var(--faint); font-size: 11px; text-align: center; }
.privacy { margin: 22px 0 0; color: var(--faint); font-size: 11px; text-align: center; }

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 4px;
  margin-bottom: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #0f1117;
}

.mode-tab {
  min-height: 40px;
  margin: 0;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-weight: 650;
}

.mode-tab.active {
  color: var(--ink);
  background: rgba(var(--accent-rgb), 0.14);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.2);
}

.signup-context {
  margin-bottom: 4px;
  padding: 11px 12px;
  border: 1px solid rgba(227, 178, 94, 0.28);
  border-radius: 10px;
  color: var(--amber);
  background: rgba(227, 178, 94, 0.06);
  font-size: 12px;
  line-height: 1.45;
}

.signup-context[data-ready="true"] {
  border-color: rgba(75, 214, 141, 0.3);
  color: var(--green);
  background: rgba(75, 214, 141, 0.06);
}

.field-help { margin: -3px 0 2px; color: var(--faint); font-size: 11px; }

@media (max-width: 520px) {
  .login-card { padding: 28px 22px; border-radius: 16px; }
}
