/* Styles for the server-rendered pages (sign-in, setup, accounts).
   The console itself is the React app in static/dist; its tokens are
   mirrored here so both surfaces share one visual language. */

:root {
  color-scheme: dark;
  --bg: #0b0d0c;
  --surface: #131714;
  --surface-raised: #191e1a;
  --surface-soft: #20261f;
  --line: #30382f;
  --line-strong: #465143;
  --ink: #f2f0e8;
  --muted: #a8afa3;
  --gold: #d8ad62;
  --gold-soft: #332a1b;
  --red: #df756d;
  --red-soft: #321d1b;
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font: 14px/1.55 inherit;
  background:
    radial-gradient(circle at 15% -10%, rgba(117, 142, 103, 0.18), transparent 34rem),
    linear-gradient(180deg, #101310 0, var(--bg) 42rem);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 100% 4px;
}

h1, h2, p { margin-top: 0; }
h1 {
  margin-bottom: 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 500;
  letter-spacing: -0.025em;
}
h2 { margin-bottom: 14px; font-size: 19px; letter-spacing: -0.015em; }

.eyebrow {
  margin-bottom: 5px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.subtle { color: var(--muted); }

header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  max-width: 1520px;
  margin: 0 auto;
  padding: 34px 42px 24px;
}
header::after {
  content: "";
  position: absolute;
  right: 42px;
  bottom: 0;
  left: 42px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), var(--line) 38%, transparent);
}
.account-bar { display: flex; align-items: center; gap: 9px; }

main {
  display: grid;
  gap: 20px;
  max-width: 1520px;
  margin: 0 auto;
  padding: 20px 42px 54px;
}

.card {
  position: relative;
  padding: 19px;
  background: rgba(19, 23, 20, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.18);
}

label {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  color: #bdc3b8;
  font-size: 12px;
  font-weight: 720;
}

input, select, button { font: inherit; }
input, select {
  width: 100%;
  padding: 10px 11px;
  color: var(--ink);
  background: #0d100e;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}
input:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216, 173, 98, 0.1); }

button {
  padding: 9px 12px;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
button:hover { border-color: #73806e; background: #293027; }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
button.primary { width: 100%; color: #17130c; background: var(--gold); border-color: #f0ca82; font-weight: 850; }
button.primary:hover { background: #e7bd72; border-color: #f6d495; }
button.danger-outline { color: #f2aaa5; background: transparent; border-color: #7d4641; }

.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  text-decoration: none;
}
.button-link:hover { border-color: #73806e; background: #293027; }

.alert { padding: 12px 14px; background: #2b281a; border: 1px solid #665d36; border-radius: 9px; }
.alert.error { color: #ffb4ae; background: var(--red-soft); border-color: #733f3b; }
.alert.success { color: #cce5c8; background: #18281a; border-color: #426542; }

/* --- sign-in / setup ------------------------------------------------------ */

.auth-page { display: grid; min-height: 100vh; place-items: center; }
.auth-shell {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 430px);
  align-items: center;
  gap: clamp(28px, 7vw, 100px);
  width: min(1040px, calc(100% - 32px));
  padding: 36px 0;
}
.auth-intro h1 { max-width: 620px; font-size: clamp(40px, 6vw, 72px); line-height: 1; }
.auth-intro > p:last-child { max-width: 50ch; color: var(--muted); font-size: 16px; }
.auth-card { padding: clamp(22px, 4vw, 34px); }
.auth-card button.primary { margin-top: 8px; }

/* --- accounts -------------------------------------------------------------- */

.accounts-layout { grid-template-columns: minmax(320px, 0.8fr) minmax(380px, 1.2fr); }
.account-list { display: grid; gap: 8px; }
.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  background: #101310;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.account-row p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.account-row form { margin: 0; }
.account-row button { width: auto; }

@media (max-width: 900px) {
  header { padding: 25px 20px 20px; }
  header::after { right: 20px; left: 20px; }
  main { padding: 16px 20px 38px; }
  .auth-shell, .accounts-layout { grid-template-columns: 1fr; }
}
