/* HME Labs theme, ported from hl-leaderboard-service (web/src/theme.css) so the
   portal reads as the same product: dark navy stage, translucent card, Archivo
   headings over Roboto body, HME Labs mark top-left.

   The tables and preset/user rows below are this app's own — the leaderboard has
   no equivalent — but they are built from the same tokens. */
:root {
  --navy-0: #001233;
  --navy-1: #021336;
  --navy-3: #0a1f4d;
  --row: #06204e;
  --row-alt: #07255a;
  --line: rgba(255, 255, 255, 0.08);
  --fg: #ffffff;
  --muted: #9fb3d8;
  --blue: #1a6ceb;
  --blue-2: #196df4;
  --gold: #ffc72c;
  --red: #ff9a9a;
  --green: #2ecc71;
  --font-head: "Archivo", "Roboto Condensed", Arial, sans-serif;
  --font-cond: "Roboto Condensed", Arial, sans-serif;
  --font-body: "Roboto", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background: radial-gradient(1200px 800px at 50% -10%, var(--navy-3), var(--navy-0) 60%);
  color: var(--fg);
  min-height: 100vh;
}

/* Page frame: brand bar across the top, content centered beneath. */
.stage { min-height: 100vh; display: flex; flex-direction: column; }
.brandbar { display: flex; align-items: center; gap: 10px; padding: 18px 24px; }
.brandbar img { height: 22px; }
.brandbar .spacer { flex: 1; }
.brandbar .who { color: var(--muted); font-size: 13px; }
.center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.top { flex: 1; display: flex; justify-content: center; padding: 8px 24px 48px; }

.card {
  background: rgba(2, 19, 54, 0.85);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  width: min(440px, 92vw);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.card.wide { width: min(1040px, 96vw); }
.card h1 { font-family: var(--font-head); font-weight: 800; font-size: 26px; margin-bottom: 6px; }
.card h2 {
  font-family: var(--font-head); font-weight: 700; font-size: 18px;
  margin: 28px 0 6px; padding-top: 20px; border-top: 1px solid var(--line);
}
.card h2:first-of-type { border-top: 0; padding-top: 0; }
.card h3 { font-family: var(--font-cond); font-weight: 600; font-size: 16px; }
.card > p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }

.btn {
  background: var(--blue); color: #fff; border: none; border-radius: 8px;
  padding: 11px 16px; font-family: var(--font-cond); font-weight: 600; font-size: 15px;
  cursor: pointer; width: 100%; text-align: center; text-decoration: none; display: inline-block;
}
.btn:hover { background: var(--blue-2); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn.ghost:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.btn.auto { width: auto; white-space: nowrap; }

.linkbtn {
  background: none; border: none; color: var(--muted); font-size: 13px;
  cursor: pointer; padding: 4px; text-decoration: underline; font-family: var(--font-body);
}
.linkbtn:hover { color: #fff; }
.linkbtn.danger { color: #ff9a9a; }

.field {
  background: var(--row); border: 1px solid var(--line); border-radius: 8px;
  padding: 11px 14px; color: #fff; font-family: var(--font-body); font-size: 15px; width: 100%;
}
.field:focus { outline: none; border-color: var(--blue); }
.field::placeholder { color: var(--muted); }
select.field { width: auto; min-width: 130px; }

.err { color: var(--red); font-size: 13px; margin-top: 12px; min-height: 18px; }
.ok { color: var(--green); font-size: 13px; margin-top: 12px; min-height: 18px; }
.note { color: var(--muted); font-size: 13px; margin-top: 12px; }

/* Sign-in */
.gbtn { display: flex; justify-content: center; min-height: 44px; }
.divider-or {
  display: flex; align-items: center; gap: 12px; color: var(--muted);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin: 18px 0;
}
.divider-or::before, .divider-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.email-form { display: flex; flex-direction: column; gap: 10px; }

/* Preset picker — same shape as the leaderboard's dashboard picker. */
.picklist { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.pick {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--row); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; color: #fff;
}
.pick:hover { border-color: var(--blue); background: var(--row-alt); }
.pick .pname { font-family: var(--font-cond); font-size: 17px; font-weight: 600; }
.pick .pdesc { color: var(--muted); font-size: 13px; margin-top: 2px; }
.pick .actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Admin tables */
.tbl { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.tbl th {
  text-align: left; font-family: var(--font-cond); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line);
}
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: rgba(255, 255, 255, 0.02); }
.tbl .right { text-align: right; white-space: nowrap; }
.tbl .empty { color: var(--muted); padding: 16px 8px; }
.flags { color: var(--muted); font-size: 12px; font-family: var(--font-cond); }
.flag-on { color: var(--gold); }

.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.box {
  border: 1px solid var(--line); border-radius: 10px; padding: 16px;
  margin-top: 12px; background: rgba(255, 255, 255, 0.02);
}
label { font-size: 13px; color: var(--muted); }
.chk {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 12px 6px 0;
  font-size: 13px; color: var(--fg); font-family: var(--font-cond);
}
.chk input { accent-color: var(--blue); }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
legend { font-size: 12px; color: var(--muted); padding: 0 6px; text-transform: uppercase; letter-spacing: 0.06em; }
summary { cursor: pointer; color: var(--muted); font-size: 13px; }
summary:hover { color: #fff; }
