/* QTB premium layer: deep black, quiet glass on the chrome, mono numbers, small lifts. Loaded last.
   Blur is used only on the header, tab bar and menus: a blur on every match card makes phones stutter. */
:root {
  --pm-bg: #050505;
  --pm-card: rgba(20, 20, 20, .82);
  --pm-line: #222;
  --pm-line-hi: #444;
  --pm-green: #00e676;
  --pm-label: #8a8a8a;
  --pm-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
html, body, #app, .app { background: var(--pm-bg) !important; }
body { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- header + tab bar */
.hdr { background: rgba(8, 8, 8, .78) !important; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--pm-line) !important; }
.tabs {
  position: relative; z-index: 10001 !important;   /* the Tools menu must open above the Live / Engine pages */
  background: rgba(10, 10, 10, .78) !important; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--pm-line) !important; border-radius: 14px !important;
}
html body .tabs .tab, html body .tabs-primary > button, html body .tabs-more > summary {
  font: 600 12.5px/1 var(--ui-font, inherit) !important; letter-spacing: .04em; text-transform: none;
  border-radius: 10px !important; transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.tabs .tab.on, #lc-btn.on, #ea-eng-btn.on, #ea-adm-btn.on {
  color: #fff !important; background: rgba(0, 230, 118, .10) !important; border-color: rgba(0, 230, 118, .55) !important;
  box-shadow: 0 0 14px rgba(0, 230, 118, .18) !important;
}
html body #qa-fab.docked { background: transparent !important; border: 1px solid transparent !important; box-shadow: none !important; color: #c9d3de !important; margin-left: 0 !important; }
html body #qa-fab.docked:hover { color: #fff !important; border-color: var(--pm-line-hi) !important; }
/* while Live / Engine / Admin is open, the app's own (hidden) page must not light up Tools */
html body.lc-open .tabs-more.active > summary, html body.ea-open .tabs-more.active > summary {
  color: #c9d3de !important; border-color: transparent !important; box-shadow: none !important; background: transparent !important; }
.tabs-menu { background: rgba(14, 14, 14, .92) !important; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--pm-line) !important; }
.tabs-group-title { color: var(--pm-label) !important; font-size: .7rem !important; letter-spacing: .12em !important; }

/* live dot: pulses only while matches are in play */
#lc-btn i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3a3a3a; margin-right: 7px; vertical-align: 1px; }
#lc-btn.has-live i { background: var(--pm-green); box-shadow: 0 0 0 0 rgba(0, 230, 118, .7); animation: pm-pulse 1.6s ease-out infinite; }
@keyframes pm-pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 230, 118, .7); } 80% { box-shadow: 0 0 0 7px rgba(0, 230, 118, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); } }

/* account button in the header, every screen size */
#qc-btn.in-hdr { margin: 0 0 0 8px; padding: 8px 14px; border-radius: 10px; font-size: 12px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- cards */
.lc-match, .lc-card, .mkt-card, .ea-card, .ea-tile, .ea-node, .sh-script {
  background: var(--pm-card) !important; border: 1px solid var(--pm-line) !important; border-radius: 14px !important;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
@media (hover: hover) {
  .lc-match:hover { border-color: var(--pm-line-hi) !important; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
  .ea-tile:hover, .mkt-card:hover { border-color: var(--pm-line-hi) !important; }
}
.lc-chance.likely {
  background: rgba(0, 230, 118, .05) !important; border: 1px solid var(--pm-green) !important;
  box-shadow: 0 0 20px rgba(0, 230, 118, .15) !important; border-radius: 12px !important;
}
.lc-chance.likely small, .ea-tile small, .mkt-card-title, .lc-ch, .ea-ch, .lc-league {
  color: var(--pm-label) !important; font-size: .7rem !important; letter-spacing: .1em !important; text-transform: uppercase;
}

/* ---------------------------------------------------------------- numbers in mono */
.lc-score, .lc-clock, .lc-odd b, .lc-odds b, .lc-nums, .lc-probs, .lc-when, .lc-xg, .lc-stat b, .mkt-prob, .mkt-odds,
.sh-cell b, .sh-script b, .ea-tile b, .ea-t td, .hdr-stat b, .tn {
  font-family: var(--pm-mono) !important; font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- buttons */
button, .btn, .lc-seg button, .lc-subtabs button, .lc-cats button { transition: background .2s ease, color .2s ease, border-color .2s ease, transform .1s ease; }
button:active { transform: scale(.98); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .lc-match:hover { transform: none; }
}

/* ---------------------------------------------------------------- phones: the five tabs fit without scrolling */
@media (max-width: 760px) {
  .tabs { padding: 5px !important; gap: 4px !important; border-radius: 12px !important; }
  .tabs-primary { -webkit-mask-image: none !important; mask-image: none !important; padding-right: 0 !important; flex: 1 1 auto; min-width: 0; gap: 2px !important; overflow-x: auto; }
  html body .tabs .tab, html body .tabs-primary > button, html body .tabs-more > summary { font-size: 11.5px !important; padding: 9px 8px !important; min-height: 36px; white-space: nowrap; letter-spacing: .01em; }
  #lc-btn i { margin-right: 5px; }
  .tabs-more { margin-left: 0 !important; flex: 0 0 auto; }
  .tabs-menu { position: fixed !important; left: 8px !important; right: 8px !important; top: 112px !important; min-width: 0 !important; max-height: 70vh; grid-template-columns: 1fr 1fr !important; }
  #qc-btn.in-hdr { max-width: 150px; padding: 7px 10px; font-size: 11.5px; }
}
@media (max-width: 380px) {
  html body .tabs .tab, html body .tabs-primary > button, html body .tabs-more > summary { font-size: 10.5px !important; padding: 9px 6px !important; }
}

/* calibrated 1X2 tag on Live rows */
.lc-nums .lc-cal { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #19e68c; border: 1px solid rgba(25,230,140,.35); border-radius: 6px; padding: 0 5px; margin-left: 4px; cursor: help; }
