/* gamebase staff site (LB-1743).
   Layout and components follow the Portico Play Promos console (promo-tools
   apps/web/src/app/console/console.css): a dark rail, a topbar with the page
   title, cards, stat tiles, badges, tables and the sign-in card. The look is
   Luminbrane's brand kit (brands.luminbrane.com, v2, Oct 2026): Poppins, Ink on
   Mist with white cards, Lumin Blue for actions, the Night gradient for the rail,
   and the spectrum gradient used once per page, as the rule under the title. */

@font-face { font-family: "Poppins"; src: url("/admin/assets/fonts/Poppins-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/admin/assets/fonts/Poppins-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/admin/assets/fonts/Poppins-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/admin/assets/fonts/Poppins-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  /* The kit's palette (colours/luminbrane-palette.css). */
  --ink: #0d1635;
  --mist: #f3f7fc;
  --white: #ffffff;
  --blue: #227dec;
  --blue-deep: #1a63c0;
  --coral: #ff584d;
  --rose: #f73b57;
  --violet: #703ab6;
  --sun: #ffc61a;
  --night: #0e1633;
  --night-blue: #2a4299;
  --slate: #5d6a8a;      /* the kit's #99A5C2 darkened to 5.2:1 on Mist for small text */
  --slate-light: #99a5c2;
  --line: #cfd5e2;
  --spectrum: linear-gradient(135deg, #ffc61a 0%, #ff584d 20%, #f73b57 40%, #d926bb 60%, #703ab6 80%, #227dec 100%);
  --night-grad: linear-gradient(180deg, #0e1633 0%, #1a2766 70%, #2a4299 100%);

  /* States: green and red outside the palette, tuned to sit with Ink. */
  --ok: #157a4f;
  --ok-tint: #e3f4ec;
  --warn-tint: #fff4d1;
  --bad: #c0233c;
  --bad-tint: #fde7eb;

  --radius: 14px;
  --shadow: 0 1px 2px rgb(13 22 53 / 0.05), 0 8px 24px rgb(13 22 53 / 0.06);
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--ink);
  background: var(--mist);
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 0.9rem; line-height: 1.5; }
a { color: var(--blue); }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ----------------------------------------------------------------- shell */

.admin { display: grid; grid-template-columns: 16rem 1fr; min-height: 100vh; }
/* The rail's colour runs the full height of a long page, behind the sticky rail. */
@media (min-width: 861px) { .admin { background: linear-gradient(90deg, var(--night) 16rem, transparent 16rem); } }

.admin-rail {
  background: radial-gradient(90% 40% at 0% 100%, rgb(112 58 182 / 0.35), transparent 70%), var(--night-grad);
  color: var(--white);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden auto;
}
.admin-brand { display: block; padding: 0 0.5rem; text-decoration: none; color: var(--white); }
.admin-brand img { display: block; width: 100%; max-width: 12.5rem; height: auto; }
.admin-brand small { display: block; margin-top: 0.45rem; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate-light); }

.admin-nav { display: flex; flex-direction: column; gap: 0.2rem; }
.admin-navlabel { font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate-light); padding: 0 0.75rem; margin: 0.6rem 0 0.2rem; }
.admin-navitem {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  padding: 0.55rem 0.75rem; border-radius: 10px;
  color: rgb(255 255 255 / 0.82); text-decoration: none; font-weight: 500; font-size: 0.86rem;
}
.admin-navitem:hover { background: rgb(255 255 255 / 0.08); color: var(--white); }
.admin-navitem[aria-current="page"] { background: var(--blue); color: var(--white); }
.admin-navcount { font-size: 0.7rem; font-weight: 600; background: var(--coral); color: var(--white); border-radius: 999px; padding: 0.05rem 0.5rem; }

.admin-railfoot { margin-top: auto; display: grid; gap: 0.6rem; }
.admin-user { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.75rem; border-radius: 10px; background: rgb(255 255 255 / 0.07); font-size: 0.78rem; }
.admin-avatar { width: 1.9rem; height: 1.9rem; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--violet); color: var(--white); font-weight: 600; text-transform: uppercase; }
.admin-user-detail { min-width: 0; }
.admin-user-detail strong { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-detail small { color: var(--slate-light); }
.admin-signout { font: inherit; font-size: 0.75rem; background: none; border: 0; padding: 0; color: var(--slate-light); cursor: pointer; text-decoration: underline; }
.admin-signout:hover { color: var(--white); }

.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { padding: 1.6rem 2rem 0; }
.admin-crumb { margin: 0; font-size: 0.75rem; color: var(--slate); }
.admin-crumb a { color: inherit; }
.admin-title { margin: 0.15rem 0 0; font-size: 1.55rem; font-weight: 700; letter-spacing: -0.02em; }
/* The page's one spectrum moment. */
.admin-title::after { content: ""; display: block; width: 3rem; height: 4px; border-radius: 4px; margin-top: 0.55rem; background: var(--spectrum); }
.admin-content { padding: 1.4rem 2rem 3rem; display: grid; gap: 1.25rem; align-content: start; }

/* --------------------------------------------------------------- pieces */

.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgb(207 213 226 / 0.6); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid rgb(207 213 226 / 0.6); }
.card-head h2 { margin: 0; font-size: 1rem; font-weight: 600; }
.card-body { padding: 1.1rem 1.25rem; }
.card-body > :first-child { margin-top: 0; }
.card-body > :last-child { margin-bottom: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; }
.stat { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.15rem; display: grid; gap: 0.3rem; text-decoration: none; color: inherit; border: 1px solid rgb(207 213 226 / 0.6); }
a.stat:hover { border-color: var(--blue); }
.stat-value { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.76rem; color: var(--slate); }

.badge { display: inline-block; font-size: 0.7rem; font-weight: 500; border-radius: 999px; padding: 0.1rem 0.55rem; background: var(--mist); color: var(--ink); border: 1px solid var(--line); white-space: nowrap; }
.badge-ok { background: var(--ok-tint); color: var(--ok); border-color: transparent; }
.badge-warn { background: var(--warn-tint); color: var(--ink); border-color: transparent; }
.badge-bad { background: var(--bad-tint); color: var(--bad); border-color: transparent; }
.badge-blue { background: rgb(34 125 236 / 0.1); color: var(--blue-deep); border-color: transparent; }

.table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.table th { text-align: left; font-weight: 500; font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--slate); padding: 0.6rem 1.25rem; border-bottom: 1px solid var(--line); }
.table td { padding: 0.6rem 1.25rem; border-bottom: 1px solid rgb(207 213 226 / 0.5); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.tablescroll { overflow-x: auto; }

.btn {
  font: inherit; font-size: 0.8rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.42rem 0.95rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--white); color: var(--ink); text-decoration: none;
}
.btn:hover { border-color: var(--blue); color: var(--blue-deep); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: var(--white); }
.btn-danger { color: var(--bad); }
.btn-danger:hover { border-color: var(--bad); color: var(--bad); }
.btn-small { padding: 0.22rem 0.65rem; font-size: 0.74rem; }
.inline { display: inline; }
.row { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem; }

label.field { display: grid; gap: 0.25rem; font-size: 0.75rem; font-weight: 500; color: var(--slate); }
input[type="text"], input[type="email"], input[type="number"], input[type="search"], select {
  font: inherit; font-size: 0.85rem; color: var(--ink);
  padding: 0.45rem 0.7rem; border-radius: 10px; border: 1px solid var(--line); background: var(--white); min-width: 0;
}
input:focus, select:focus { outline: 2px solid rgb(34 125 236 / 0.35); border-color: var(--blue); }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.85rem; }

.notice { border-radius: 12px; padding: 0.75rem 1rem; font-size: 0.85rem; border-left: 4px solid var(--blue); background: rgb(34 125 236 / 0.08); }
.notice-ok { border-color: var(--ok); background: var(--ok-tint); }
.notice-bad { border-color: var(--bad); background: var(--bad-tint); }
.muted { color: var(--slate); }
.hint { font-size: 0.78rem; color: var(--slate); margin: 0; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.78rem; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1.25rem; }
.candidates { display: flex; flex-wrap: wrap; gap: 0.4rem; }

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

.signin {
  min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
  background: radial-gradient(60% 50% at 15% 10%, rgb(34 125 236 / 0.14), transparent 70%),
              radial-gradient(50% 45% at 90% 20%, rgb(112 58 182 / 0.12), transparent 70%),
              radial-gradient(55% 50% at 70% 100%, rgb(255 88 77 / 0.10), transparent 70%), var(--mist);
}
.signin-card { width: min(26rem, 100%); background: var(--white); border-radius: 20px; box-shadow: var(--shadow); padding: 2rem; display: grid; gap: 0.85rem; }
.signin-card img { height: 1.7rem; width: auto; justify-self: start; }
.signin-card h1 { margin: 0.4rem 0 0; font-size: 1.35rem; font-weight: 700; }
.signin-card h1::after { content: ""; display: block; width: 2.5rem; height: 4px; border-radius: 4px; margin-top: 0.5rem; background: var(--spectrum); }
.signin-card p { margin: 0; font-size: 0.85rem; color: var(--slate); }
.signin-card input { width: 100%; padding: 0.65rem 0.85rem; font-size: 0.95rem; }
.signin-code { letter-spacing: 0.35em; font-variant-numeric: tabular-nums; text-align: center; }
.signin-card .btn { justify-content: center; padding: 0.65rem; font-size: 0.9rem; }

/* ---------------------------------------------------------------- mobile */

@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .admin-rail { position: static; height: auto; padding: 1rem; gap: 1rem; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-navlabel { display: none; }
  .admin-railfoot { margin-top: 0; }
  .admin-topbar, .admin-content { padding-left: 1rem; padding-right: 1rem; }
}
