/* Admin console chrome (GAMES-336). The sections themselves use styles.css,
   which the console loads first, so a moved section looks as it did. */

/* styles.css pins body to one viewport; a sticky banner can only stick inside
   its parent, so the console's body grows with the page instead. */
body.adm { background: var(--bg); height: auto; }

/* --- environment banner: every page, never hidden ------------------------ */
.adm-banner {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px;
  padding: 10px 20px; min-height: 44px;
  font-size: 14px; font-weight: 500;
}
.adm-banner-t { font-weight: 800; letter-spacing: 1px; text-transform: uppercase; font-size: 15px; }
.adm-banner a { margin-left: auto; color: inherit; font-weight: 700; white-space: nowrap; }
.adm-banner.prod { background: var(--danger); color: #1f0609; }
.adm-banner.dev { background: var(--warn); color: var(--accent-ink); }
.adm-banner.unknown { background: var(--card-2); color: var(--muted); }

/* --- shell --------------------------------------------------------------- */
.adm-shell { flex: 1; display: flex; align-items: stretch; min-height: 0; }
.adm-side {
  flex: none; width: 240px; padding: 20px 14px;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: var(--banner-h, 44px); align-self: flex-start;
  height: calc(100vh - var(--banner-h, 44px)); overflow-y: auto;
}
.adm-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; text-decoration: none; }
.adm-tag {
  font: 700 11px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 1.2px;
  color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px;
}
#adm-nav { display: flex; flex-direction: column; gap: 4px; }
#adm-nav a {
  display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px;
  border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 550; font-size: 15px;
}
#adm-nav a:hover { background: var(--card-2); }
#adm-nav a.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
#adm-nav svg {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
#adm-nav a:not(.on) svg { stroke: var(--muted); }
.adm-foot { margin-top: auto; padding: 0 8px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.adm-who { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.adm-main { flex: 1; min-width: 0; padding: 18px 28px 48px; }
.adm-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
#adm-h { margin: 14px 2px 12px; }

/* --- page tabs, for a group with more than one page ---------------------- */
.adm-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.adm-tabs a {
  color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 650;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap;
}
.adm-tabs[hidden] { display: none; }
.adm-tabs a:hover { color: var(--text); }
.adm-tabs a.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* --- search -------------------------------------------------------------- */
.adm-search { position: relative; flex: 1; max-width: 560px; }
.adm-search input { padding: 11px 14px; font-size: 15px; }
.adm-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 15;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 8px; max-height: 70vh; overflow-y: auto;
}
.adm-rh { font-size: 11px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase;
  color: var(--faint); padding: 8px 10px 4px; }
.adm-hit {
  display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0;
  padding: 8px 10px; border-radius: 10px; color: var(--text); text-decoration: none;
}
.adm-hit b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-hit .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-hit:hover, .adm-hit:focus, .adm-peek:hover, .adm-peek:focus { background: var(--card-2); outline: none; }
.adm-hit-row { display: flex; align-items: center; gap: 4px; }
.adm-peek { flex: none; color: var(--accent); font-weight: 650; font-size: 13px;
  text-decoration: none; padding: 8px 10px; border-radius: 10px; }
.adm-more, .adm-none { padding: 6px 10px; }

/* --- sidebar badges (GAMES-337) ------------------------------------------- */
#adm-nav a > span { flex: 1; }
.adm-badge {
  flex: none; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 11.5px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .4px;
}
.adm-badge[hidden] { display: none; }
.adm-badge.bad { background: var(--danger); color: #1f0609; }
.adm-badge.warn { background: var(--warn); color: var(--accent-ink); }
.adm-badge.info { background: var(--card-2); color: var(--text); border: 1px solid var(--line); }
#adm-nav a.on .adm-badge.warn { background: var(--accent-ink); color: var(--warn); }

/* --- Needs attention (GAMES-337) ------------------------------------------ */
.att-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.att-head h2 { white-space: nowrap; }
.att-head .spacer { flex: 1; }
.att-head h2 { margin: 0; }
.att-count { min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; }
.att-sub { margin: 4px 0 14px; }
.att-item { border: 1px solid var(--line); border-left: 4px solid var(--line);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: var(--bg-2); }
.att-item.bad { border-left-color: var(--danger); }
.att-item.warn { border-left-color: var(--warn); }
.att-item.info { border-left-color: var(--faint); }
.att-kind { font-size: 11px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase;
  color: var(--faint); margin-bottom: 2px; }
.att-item.bad .att-kind { color: var(--danger); }
.att-item.warn .att-kind { color: var(--warn); }
.att-title { font-weight: 700; font-size: 15.5px; }
.att-detail { color: var(--muted); font-size: 13.5px; margin: 4px 0 0; }
.att-rows { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; }
.att-rows li { margin: 2px 0; overflow-wrap: anywhere; }
.att-rows a { color: var(--text); }
.att-go { display: inline-block; margin-top: 8px; color: var(--accent); font-weight: 650;
  font-size: 13.5px; text-decoration: none; }
.att-go:hover { text-decoration: underline; }
/* GAMES-359: tick an item off as seen. */
.att-tick { float: right; width: auto; margin: -2px 0 6px 10px; padding: 4px 10px;
  font-size: 12px; }
.att-ticked { margin: 4px 0 10px; }
.att-ticked summary { cursor: pointer; }
.att-ticked-row { display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.att-ticked-row .att-untick { width: auto; margin: 0; padding: 3px 10px; font-size: 12px;
  flex: 0 0 auto; }
.att-clear { font-weight: 650; margin: 6px 0 10px; }
.att-fine { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.att-ok { font-size: 12.5px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 10px; }
.att-ok::before { content: "✓ "; color: var(--accent); }
.att-unchecked { margin-top: 10px; }
.att-unchecked p { margin: 6px 0 0; }

/* --- one box on one page (GAMES-345) ---------------------------------------- */
.bx-crumbs { margin: -4px 2px 10px; color: var(--muted); }
.bx-head .bx-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.bx-name { font-size: 22px; font-weight: 760; margin: 0; }
.bx-seen { color: var(--muted); font-size: 14px; }
.bx-facts { margin: 6px 0 2px; overflow-wrap: anywhere; }
.bx-facts code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.bx-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 0 16px; align-items: start; }
.bx-col { min-width: 0; }
.bx-h { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.bx-h h2 { margin: 0; }
.bx-panel { margin-top: 12px; background: #08080b; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.bx-panel canvas { display: block; width: 100%; height: auto; border-radius: 6px; }
.bx-panel-sm { margin: 10px 0 0; }
.bx-cap { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }
.bx-links { white-space: nowrap; }
.bx-links a { cursor: pointer; }
.bx-rawout { margin: 10px 0 0; max-height: 360px; overflow: auto; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 12px; }
.bx-sub { margin: 16px 0 8px; font: 600 11.5px/1.2 ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.bx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bx-chip { width: auto; margin: 0; padding: 6px 12px; font-size: 13px; font-weight: 550;
  border-radius: 999px; background: var(--card-2); color: var(--text); border: 1px solid var(--line);
  box-shadow: none; }
button.bx-chip + button.bx-chip { margin-top: 0; }
.bx-chip.live::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px;
  border-radius: 50%; background: #3cdc78; vertical-align: 1px; }
.bx-chip.on { border-color: var(--accent); color: var(--accent); }
.bx-chip.off { color: var(--muted); }
a.bx-chip { text-decoration: none; display: inline-block; }
.bx-switch { margin-top: 10px; }
.bx-why { margin: 2px 0 10px; }
.bx-steps { margin: 0; padding-left: 22px; }
.bx-steps > li { padding: 10px 0 12px; border-top: 1px solid var(--line); }
.bx-steps > li:first-child { border-top: 0; padding-top: 4px; }
.bx-step-h { font-weight: 650; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 4px; }
.bx-effect { flex: none; font-size: 12.5px; color: var(--muted); max-width: 45%; text-align: right; }
.bx-effect.on { color: var(--accent); font-weight: 650; }
.bx-effect.bad { color: var(--danger); font-weight: 650; }
.bx-kv { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 6px 0; }
.bx-kv > div { overflow-wrap: anywhere; }
.bx-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.bx-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 6px 0 0; font-size: 14px; }
.bx-dl dt { color: var(--muted); }
.bx-dl dd { margin: 0; }
.bx-inline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.bx-inline select { width: auto; padding: 8px 10px; font-size: 14px; }
.bx-kv .bx-inline { margin-top: 4px; }
button.bx-sm, .bx-inline button { width: auto; margin: 0; padding: 7px 12px; font-size: 13px; }
button.bx-sm + button.bx-sm { margin-top: 0; }
button.bx-danger { border-color: var(--danger); color: var(--danger); }
.bx-danger-h { margin: 14px 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .7px;
  text-transform: uppercase; color: var(--danger); }
.bx-act { padding: 8px 0; }
.bx-act p { margin: 6px 0 0; }
#bx-compose { padding: 0 0 10px; }
#bx-compose textarea { font-size: 14px; }
.bx-mono { font: 500 13.5px/1.4 ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; margin: 4px 0; }
.bx-msg, .bx-fault { padding: 8px 0; border-top: 1px solid var(--line); }
.bx-msg:first-of-type, .bx-fault:first-of-type { border-top: 0; }
.bx-msg .bx-sm { float: right; }
.bx-head .msg:empty, .bx-col .msg.small:empty { display: none; }
@media (max-width: 1099px) {
  .bx-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .bx-two { grid-template-columns: 1fr; }
  .bx-kv { grid-template-columns: 1fr; gap: 2px; }
  .bx-effect { max-width: none; }
}

/* --- one customer on one page (GAMES-369) ---------------------------------- */
.cu-alert { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: start;
  margin: 0 0 16px; padding: 16px 20px; border-radius: var(--radius);
  background: rgba(239,90,107,.08); border: 1px solid rgba(239,90,107,.55); }
.cu-alert h2 { margin: 0; font-size: 17px; }
.cu-alert p { margin: 6px 0 0; line-height: 1.5; }
.cu-alert .bx-inline { margin-top: 0; }
a.cu-btnlink { display: inline-flex; align-items: center; text-decoration: none; border: 1px solid var(--line);
  border-radius: 12px; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--text); background: var(--card-2); }
.cu-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.cu-box { display: block; padding: 10px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card-2); color: var(--text); text-decoration: none; }
.cu-box:hover, .cu-box:focus { border-color: var(--accent); outline: none; }
.cu-box .bx-panel { margin: 0 0 10px; padding: 6px; }
.cu-box-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.cu-box-h b { font-size: 16px; }
.cu-seen { font-size: 12px; color: var(--muted); white-space: nowrap; }
.cu-seen.on { color: #3cdc78; }
.cu-box code { font-size: 12px; }
.cu-open { margin-top: 8px; color: var(--accent); font-weight: 650; font-size: 14px; }
.cu-plans { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-top: 12px; }
.cu-plan + .cu-plan { border-top: 1px solid var(--line); }
.cu-plan-h { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; }
.cu-plan.ended .cu-plan-h b { color: var(--muted); }
.cu-plan-t { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 2px; }
.cu-plan-r { display: flex; align-items: center; gap: 12px; }
.cu-price { font: 500 14px ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }
.cu-choose { padding: 14px; border-top: 1px solid var(--line); background: var(--bg-2); }
.cu-choose fieldset { border: 0; margin: 0; padding: 0; }
.cu-choose legend { padding: 0; font-weight: 650; }
.cu-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.cu-opt { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; cursor: pointer;
  margin: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  /* not the form-field caption styles.css gives every label */
  font-size: 15px; font-weight: 400; letter-spacing: normal; text-transform: none; color: var(--text); }
.cu-opt.on { border-color: var(--accent); }
.cu-opt input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.cu-opt b { display: block; }
.cu-opt .small { display: block; margin-top: 4px; line-height: 1.45; }
.cu-red { color: var(--danger); }
.cu-ended { margin-top: 10px; }
.cu-ended summary, .cu-pays summary { cursor: pointer; color: var(--muted); }
.cu-steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.cu-step { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); }
.cu-when { font: 500 11.5px ui-monospace, Menlo, Consolas, monospace; letter-spacing: 1px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.cu-total { font: 500 30px/1.1 ui-monospace, Menlo, Consolas, monospace; margin: 6px 0 2px; }
.cu-total .muted { font-size: 16px; }
.cu-payline { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14px; }
.cu-payline > span:last-child { white-space: nowrap; margin: 0; }
.cu-offer { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); line-height: 1.5; }
.cu-cardrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; }
.cu-pays { margin-top: 10px; }
.cu-danger { border-color: rgba(239,90,107,.55); }
.cu-list { margin: 8px 0 12px; padding-left: 20px; line-height: 1.5; }
.cu-danger label { margin: 0; font-size: 13px; letter-spacing: normal; text-transform: none; color: var(--text); font-weight: 600; }
.cu-danger input { margin: 6px 0 10px; }
.cu-danger button { width: 100%; }
#cu-compose { padding: 8px 0 0; }
#cu-compose textarea { font-size: 14px; }
@media (max-width: 700px) {
  .cu-alert, .cu-plan-h { grid-template-columns: 1fr; }
  .cu-opts { grid-template-columns: 1fr; }
}

/* --- Sports: one card per sport (GAMES-370) ---------------------------------- */
.sp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 16px; align-items: start; }
.sp-card .bx-h > span { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.sp-card .bx-chips { margin: 8px 0 6px; }
.sp-card .bx-kv { border-top: 1px solid var(--line); padding: 8px 0; }
.sp-more summary { cursor: pointer; color: var(--muted); }
.sp-more p { margin: 6px 0 0; line-height: 1.5; }

/* --- Sales: plans & prices (GAMES-371) ---------------------------------------- */
.pl-plan .bx-kv { border-top: 1px solid var(--line); padding: 8px 0; }
.pl-point { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 4px 0; }
.pl-plan .bx-kv > div > .bx-sm { margin-left: 8px; }

/* --- Content: a message sent by name, previewed first (GAMES-372) ----------- */
.ct-target { margin: 8px 0 4px; }
.ct-target input { margin: 0; }
.ct-reach { margin: 8px 0 2px; }
.ct-reach code, .ct-hit code, .ct-sec code { font-size: 12px; }
.ct-hits { display: grid; gap: 6px; margin-top: 6px; }
button.ct-hit { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px;
  width: 100%; margin: 0; padding: 9px 12px; text-align: left; font-size: 14px; font-weight: 400;
  background: var(--card-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; box-shadow: none; }
button.ct-hit:hover, button.ct-hit:focus { border-color: var(--accent); outline: none; }
button.ct-hit + button.ct-hit { margin-top: 0; }
.ct-grow { flex: 1; }
#bc-text { font-size: 14px; }
.ct-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 12px; }
.ct-pic { margin: 10px 0 0; min-width: 0; }
.ct-pic figcaption { margin-top: 6px; }
.ct-sec + .ct-sec { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.ct-sec h3 { margin: 0; }
.ct-note { margin: 4px 0 6px; }

/* --- Releases: the deploy, firmware by model (GAMES-373) ------------------- */
.rl-commits { margin: 6px 0 4px; padding-left: 20px; line-height: 1.5; }
.rl-commits code, .rl-moves code { font-size: 12px; }
.rl-moves { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--accent);
  background: rgba(245,197,24,.08); }
.rl-moves p { margin: 6px 0 0; }
.rl-models { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 20px; }
.rl-model .bx-kv { border-top: 1px solid var(--line); }

/* Signed out or not an admin: nothing to navigate or search. */
body.adm-locked #adm-nav, body.adm-locked .adm-top { display: none; }

/* --- phones: the sidebar becomes a strip under the banner ---------------- */
@media (max-width: 819px) {
  .adm-shell { flex-direction: column; }
  .adm-side {
    width: auto; height: auto; position: static; overflow: visible;
    align-self: stretch; min-width: 0;
    border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; gap: 10px;
  }
  .adm-banner { position: static; padding: 10px 16px; }
  .adm-banner a { margin-left: 0; }
  #adm-nav { flex-direction: row; overflow-x: auto; gap: 6px; }
  #adm-nav a { flex: none; min-height: 38px; padding: 0 12px; font-size: 14px; border: 1px solid var(--line); border-radius: 999px; }
  #adm-nav svg { width: 16px; height: 16px; }
  .adm-foot { flex-direction: row; justify-content: space-between; padding: 0; }
  .adm-main { padding: 14px 16px 40px; }
}
