/* ── BettorGames (Chalkline) historical UI — reconstruction ─────────────────
   A small component set that rebuilds the BettorGames dashboard as it was, in
   HTML/CSS, so the case-study visuals stay sharp at any resolution.

   THESE ARE RECONSTRUCTIONS. Every screen assembled from these components is
   redrawn from the original hand-off/portfolio screenshots — colours, layout,
   labels and figures are taken from that material. They are cleaned up (crisp
   type, exact spacing) but NOT redesigned: nothing here is a 2026 reinvention
   of the product. Class prefix `bg-` = BettorGames, and everything is scoped
   under `.bg-app` / `.bg-legacy` so it cannot leak into the portfolio shell.

   Used by:
     · case-04-dashboard-overview.html  (static figures)
     · mock-dashboard.html              (interactive prototype)
   ─────────────────────────────────────────────────────────────────────────── */

.bg-app,
.bg-legacy,
.bg-scope {
  /* Sampled from the original screenshots */
  --bgn-navy: #061238;
  --bgn-navy-2: #0d1c46;
  --bgn-navy-active: #16305c;
  --bgn-page: #f7f8fa;
  --bgn-card: #ffffff;
  --bgn-line: #eaecf1;
  --bgn-line-2: #dfe3ea;
  --bgn-ink: #1b1e28;
  --bgn-ink-2: #5b6070;
  --bgn-ink-3: #9497a3;
  --bgn-link: #2f8fe0;

  --bgn-amber-bg: #fff3d9;   --bgn-amber-fg: #efa128;
  --bgn-blue-bg:  #dcedfe;   --bgn-blue-fg:  #2f8fe0;
  --bgn-red-bg:   #ffe1e3;   --bgn-red-fg:   #f0405c;
  --bgn-teal-bg:  #c5fcf6;   --bgn-teal-fg:  #12c3ae;
  --bgn-violet-bg:#ece2fe;   --bgn-violet-fg:#7e38eb;
  --bgn-chip-bg:  #dfefff;   --bgn-chip-fg:  #2f8fe0;

  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--bgn-ink);
  -webkit-font-smoothing: antialiased;
}

/* ── Application shell ───────────────────────────────────────────────────── */
.bg-app {
  display: grid;
  grid-template-columns: 224px 1fr;
  width: 1180px;
  background: var(--bgn-card);
  border-radius: 10px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
}
.bg-app--narrow { grid-template-columns: 200px 1fr; width: 880px; }

/* ── Side navigation ─────────────────────────────────────────────────────── */
.bg-side {
  background: var(--bgn-navy);
  color: #cbd2e2;
  padding: 0 0 26px;
  min-height: 100%;
}
.bg-side-logo {
  display: flex; align-items: center; gap: 9px;
  padding: 20px 18px 22px;
  font-weight: 800; font-size: 15px; letter-spacing: .04em; color: #fff;
}
.bg-side-logo svg { width: 22px; height: 22px; flex: none; }
.bg-nav-label {
  padding: 16px 18px 7px;
  font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #5b6788;
}
.bg-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px;
  font-size: 12.5px; color: #cbd2e2;
  border: 0; background: none; width: 100%; text-align: left; font: inherit; font-size: 12.5px;
  cursor: default;
}
.bg-nav-item svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bg-nav-item .bg-nav-caret { margin-left: auto; opacity: .55; }
.bg-nav-item.is-active { background: var(--bgn-navy-active); color: #fff; font-weight: 600; }
.bg-nav-item.is-active svg { stroke: #5aa9f0; }
.bg-nav-pill {
  margin-left: auto;
  padding: 1px 6px; border-radius: 4px;
  background: #f0405c; color: #fff;
  font-size: 8.5px; font-weight: 700; letter-spacing: .04em; text-transform: lowercase;
}
.bg-nav-sub { list-style: none; margin: 2px 0 6px; padding: 0; }
.bg-nav-sub li {
  padding: 5px 18px 5px 34px;
  font-size: 12px; color: #9aa5c0;
  position: relative;
}
.bg-nav-sub li::before {
  content: ""; position: absolute; left: 23px; top: 11px;
  width: 3px; height: 3px; border-radius: 50%; background: #67739a;
}

/* ── Main column ─────────────────────────────────────────────────────────── */
.bg-main { background: var(--bgn-page); display: flex; flex-direction: column; min-width: 0; }
.bg-topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  background: var(--bgn-card);
  border-bottom: 1px solid var(--bgn-line);
}
.bg-tab {
  padding: 5px 11px; border-radius: 6px;
  font-size: 12px; font-weight: 500; color: var(--bgn-ink-2);
}
.bg-tab.is-active { background: var(--bgn-chip-bg); color: var(--bgn-chip-fg); font-weight: 600; }
.bg-topbar-meta {
  margin-left: auto; display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--bgn-ink-3);
}
.bg-topbar-meta b { color: var(--bgn-ink); font-weight: 600; }
.bg-avatar {
  width: 20px; height: 20px; border-radius: 5px;
  background: var(--bgn-chip-bg); color: var(--bgn-chip-fg);
  display: grid; place-items: center; font-size: 10px; font-weight: 700;
}
.bg-crumb {
  padding: 10px 20px 0;
  font-size: 9px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--bgn-ink-3);
}
.bg-canvas { padding: 14px 20px 18px; flex: 1; }
.bg-foot { padding: 0 20px 12px; text-align: right; font-size: 9.5px; color: #b9bcc7; }

/* ── Dashboard grid ──────────────────────────────────────────────────────── */
.bg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.bg-grid--2 { grid-template-columns: repeat(2, 1fr); }
.bg-grid + .bg-grid { margin-top: 14px; }

.bg-card {
  background: var(--bgn-card);
  border: 1px solid var(--bgn-line);
  border-radius: 9px;
  padding: 14px 15px 15px;
  min-height: 168px;
}
.bg-card--tall { min-height: 196px; }
.bg-card-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.bg-card-title { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--bgn-ink); }
.bg-card-sub { margin: 2px 0 0; font-size: 10.5px; color: var(--bgn-ink-3); white-space: nowrap; }
.bg-card-sub b { color: var(--bgn-ink-2); font-weight: 700; }
.bg-card-more { margin-left: auto; color: var(--bgn-ink-3); letter-spacing: 1px; font-size: 13px; line-height: 1; }

/* Coloured metric tiles (Events Overview, Games) */
.bg-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.bg-tile {
  border-radius: 7px;
  padding: 10px 11px 9px;
  background: var(--tile-bg, var(--bgn-blue-bg));
  min-height: 62px;
  display: flex; flex-direction: column; justify-content: space-between;
  border: 0; width: 100%; text-align: left; font: inherit;
}
.bg-tile--amber  { --tile-bg: var(--bgn-amber-bg);  --tile-fg: var(--bgn-amber-fg); }
.bg-tile--blue   { --tile-bg: var(--bgn-blue-bg);   --tile-fg: var(--bgn-blue-fg); }
.bg-tile--red    { --tile-bg: var(--bgn-red-bg);    --tile-fg: var(--bgn-red-fg); }
.bg-tile--teal   { --tile-bg: var(--bgn-teal-bg);   --tile-fg: var(--bgn-teal-fg); }
.bg-tile--violet { --tile-bg: var(--bgn-violet-bg); --tile-fg: var(--bgn-violet-fg); }
.bg-tile-num {
  font-size: 24px; font-weight: 700; line-height: 1; letter-spacing: -.02em;
  color: var(--tile-fg); font-variant-numeric: tabular-nums;
}
.bg-tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.bg-tile-label { font-size: 10.5px; font-weight: 600; color: var(--tile-fg); white-space: nowrap; }
.bg-tile-arrow { color: var(--tile-fg); font-size: 12px; line-height: 1; }

/* Chip + label rows (Series, Automation, Winners) */
.bg-rows { display: grid; gap: 8px; }
.bg-row {
  display: flex; align-items: center; gap: 11px;
  border: 0; background: none; padding: 0; width: 100%; text-align: left; font: inherit;
}
.bg-chip {
  flex: none;
  min-width: 42px; height: 34px; padding: 0 8px;
  border-radius: 7px;
  background: var(--bgn-chip-bg); color: var(--bgn-chip-fg);
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.bg-row-text { min-width: 0; }
.bg-row-title { display: block; font-size: 11.5px; font-weight: 700; color: var(--bgn-ink); white-space: nowrap; }
.bg-row-sub { display: block; font-size: 10px; color: var(--bgn-ink-3); white-space: nowrap; }
.bg-row-arrow { margin-left: auto; color: #55aefe; font-size: 13px; line-height: 1; flex: none; }
.bg-row-spark { margin-left: auto; flex: none; }

/* Sparkline (Winners / Prize value) */
.bg-spark { display: block; width: 118px; height: 34px; overflow: visible; }
.bg-spark path.line { fill: none; stroke: #2f8fe0; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.bg-spark path.area { fill: url(#bgSparkFill); stroke: none; }

/* Pending Tie-Breakers table */
.bg-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.bg-table th {
  text-align: left; font-weight: 500; color: var(--bgn-ink-3); font-size: 10px;
  padding: 0 6px 7px; border-bottom: 1px solid var(--bgn-line);
}
.bg-table th:last-child, .bg-table td:last-child { text-align: right; }
.bg-table td { padding: 10px 6px; vertical-align: middle; }
.bg-thumb {
  width: 40px; height: 30px; border-radius: 5px;
  background: #eef1f6; color: var(--bgn-ink-3);
  display: grid; place-items: center; font-size: 9px; font-weight: 700; letter-spacing: .04em;
}
.bg-game-name { display: block; font-size: 11px; font-weight: 700; color: var(--bgn-link); text-decoration: underline; }
.bg-game-sub { display: block; font-size: 10px; color: var(--bgn-ink-3); }
.bg-pill {
  display: inline-block; padding: 2px 7px; border-radius: 5px;
  font-size: 9.5px; font-weight: 600; white-space: nowrap;
}
.bg-pill--age { background: var(--bgn-red-bg); color: var(--bgn-red-fg); }
.bg-pill--type { background: #eef1f6; color: var(--bgn-ink-2); }
.bg-empty-note { margin: 10px 0 0; font-size: 10.5px; color: var(--bgn-ink-3); }

/* ── The original (pre-redesign) dashboard ───────────────────────────────── */
.bg-legacy {
  display: grid;
  grid-template-columns: 226px 1fr;
  width: 1180px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  font-size: 13px;
}
.bg-legacy .bg-side { background: #0b1b3f; }
.bg-legacy .bg-nav-item { font-size: 12px; padding: 8px 16px; }
.bg-legacy .bg-nav-item span { white-space: nowrap; }
.bg-legacy .bg-nav-sub li { font-size: 11.5px; padding-left: 32px; }
.bg-legacy-main { background: #f5f6f8; display: flex; flex-direction: column; }
.bg-legacy-top {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; background: #fff; border-bottom: 1px solid var(--bgn-line);
  font-size: 14px; font-weight: 600;
}
.bg-legacy-burger { display: grid; gap: 3px; }
.bg-legacy-burger i { display: block; width: 15px; height: 1.8px; background: var(--bgn-ink-2); border-radius: 2px; }
.bg-legacy-user { margin-left: auto; font-size: 11px; font-weight: 400; color: var(--bgn-ink-2); }
.bg-legacy-body { background: #fff; margin: 12px 16px 16px; border-radius: 6px; padding: 16px 18px 22px; flex: 1; }
.bg-legacy-h {
  display: flex; align-items: baseline; gap: 10px;
  padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--bgn-line);
}
.bg-legacy-h h4 { margin: 0; font-size: 21px; font-weight: 600; color: #2c4d7a; letter-spacing: -.01em; }
.bg-legacy-h span { font-size: 11px; color: var(--bgn-ink-3); }
.bg-legacy-cards { display: flex; gap: 14px; flex-wrap: wrap; }
.bg-legacy-card {
  width: 152px; min-height: 108px;
  border-radius: 5px; padding: 12px 13px 10px;
  display: flex; flex-direction: column;
  background: var(--lc-bg); color: var(--lc-fg);
}
.bg-legacy-card--yellow { --lc-bg: #f5b301; --lc-fg: #1b1e28; }
.bg-legacy-card--blue   { --lc-bg: #1279bd; --lc-fg: #ffffff; }
.bg-legacy-card--red    { --lc-bg: #e0212b; --lc-fg: #ffffff; }
.bg-legacy-card--grey   { --lc-bg: #e8eaed; --lc-fg: #8b8d94; }
.bg-legacy-num { font-size: 24px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.bg-legacy-label { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.bg-legacy-more {
  margin-top: auto; display: inline-flex; align-items: center; gap: 5px;
  font-size: 9.5px; font-weight: 600; opacity: .92;
}
.bg-legacy-more i {
  width: 11px; height: 11px; border-radius: 50%;
  background: currentColor; opacity: .75;
  display: inline-block;
}
.bg-legacy-void { flex: 1; min-height: 150px; }

/* ── Wireframe treatment (exploration 01) ────────────────────────────────── */
.bg-wire { --bgn-navy: #f0f1f3; }
.bg-wire .bg-side { background: #f4f5f7; color: #6f7480; border-right: 1px solid var(--bgn-line-2); }
.bg-wire .bg-side-logo { color: #1b1e28; }
.bg-wire .bg-nav-item { color: #5b6070; }
.bg-wire .bg-nav-item.is-active { background: #e7e9ee; color: #1b1e28; }
.bg-wire .bg-nav-label { color: #9497a3; }
.bg-wire .bg-nav-icon { width: 13px; height: 13px; border-radius: 2px; background: #c9cdd6; flex: none; }
.bg-wire .bg-main { background: #fff; }
.bg-wire .bg-topbar { border-bottom: 1px solid var(--bgn-line); }
.bg-wire .bg-tab { background: #eef0f3; color: #6f7480; }
.bg-wire .bg-tab.is-active { background: #eef0f3; color: #6f7480; font-weight: 500; }
.bg-wire .bg-card { background: #fafbfc; border-color: var(--bgn-line-2); }
.bg-wire-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px; border-radius: 5px;
  background: #eceef2; color: #55585f;
  font-size: 11.5px;
}
.bg-wire-row .hash { color: #9497a3; font-weight: 700; }
.bg-wire-row .arrow { margin-left: auto; color: #6f7480; }
.bg-wire-rows { display: grid; gap: 8px; }

/* The scaled-stage rules that used to live here are now shared case-study
   infrastructure in styles.css, so every reconstruction (BettorGames, Once For
   All) fits its column the same way. */

/* A card fragment shown inside a case-study figure. Fixed design width so the
   scaled-stage machinery can fit it to narrow columns instead of clipping the
   product's own labels, which do not wrap. */
.bg-frag { width: 300px; }
