/* cardkit — BAS-brand tokens + card polish (adapted from CARDKIT_PROMPT.md;
   cremrkt palette replaced with the BOT BAS navy/gold, Arial only). */
:root{
  --bot-navy:#1b2a4a; --bot-navy-2:#16223c; --bot-navy-panel:#152038;
  --bot-gold:#b8860b; --bot-gold-2:#d5a636; --bot-gold-text:#8a6508;
  --bot-bg-card:#FFFFFF; --bot-bg-subtle:#f4f2ec; --bot-gray-bg:#fbfaf6;
  --bot-text:#1F2733; --bot-text-muted:#5C564F;
  --bot-border:#d8d2c2; --bot-border-subtle:#e6e1d4;
  --bot-shadow-sm:0 1px 2px rgba(16,24,40,.06),0 1px 3px rgba(16,24,40,.08);
  --bot-radius-lg:6px;
  --bot-font-body:Arial,'Segoe UI',Roboto,sans-serif;
}

/* ---- Cards ---------------------------------------------------------------- */
.fun-card{ border:1px solid var(--bot-border-subtle); box-shadow:var(--bot-shadow-sm);
  border-radius:var(--bot-radius-lg); background:var(--bot-bg-card); }
.fun-card .fun-card-head{ background:#fff; border-bottom:2px solid var(--bot-gold);
  color:var(--bot-navy); font-family:var(--bot-font-body); font-weight:600;
  font-size:.95rem; padding:.55rem .9rem; }
.fun-card .fun-card-title{ font-family:var(--bot-font-body); font-weight:600; }
.fun-card .fun-act{ color:var(--bot-navy); padding:.05rem .35rem; font-size:1rem;
  line-height:1; border:0; }
.fun-card .fun-act:hover{ color:var(--bot-gold-text); background:var(--bot-bg-subtle);
  border-radius:4px; }

/* ---- Resizable tables ("make bigger" by dragging lower-right corner) ------ */
.fun-resizable{ resize:vertical; overflow:hidden; height:480px; min-height:260px;
  max-height:85vh; border-bottom:6px solid var(--bot-bg-subtle);
  border-radius:0 0 6px 6px; }
/* Every AG Grid: user-resizable from the lower-right corner. */
body div[class*="ag-theme-"]{ resize:vertical; overflow:auto; }

/* ---- Energy sub-tab pills (Fleet Analysis | Device Analysis) -------------- */
/* !important throughout: bootstrap's btn-* variants also carry !important
   in the theme layer and otherwise win the specificity war */
.nrg-esub-pill{ background:#e9ecef !important; color:var(--bot-navy) !important;
  border:1px solid var(--bot-border) !important; font-weight:600;
  font-family:var(--bot-font-body); padding:.45rem 1.4rem; }
.nrg-esub-pill.active{ background:var(--bot-navy) !important; color:#fff !important;
  border-bottom:3px solid var(--bot-gold) !important; }
.nrg-esub-pill:hover{ color:var(--bot-gold-text) !important;
  background:var(--bot-bg-subtle) !important; }
.nrg-esub-pill.active:hover{ color:#fff !important;
  background:var(--bot-navy) !important; }
@media (max-width: 480px){
  .nrg-esub-pill{ padding:.35rem .8rem; font-size:.85rem; }
}

/* ---- Info icon + explanation tooltip -------------------------------------- */
.fun-info{ color:var(--bot-gold-text); cursor:help; font-size:.85rem; opacity:.75; }
.fun-info:hover{ opacity:1; }
.fun-tip .tooltip-inner{ max-width:340px; text-align:left; font-size:.8rem;
  line-height:1.5; padding:.6rem .75rem; background:var(--bot-navy-panel);
  border:1px solid var(--bot-gold); border-radius:6px; }
.fun-tip.show{ opacity:1; }

/* Billing tab (rbas/billing): line-item confidence rows and stage strip */
.ag-theme-alpine .ag-row.blg-conf-high { background: #f2faf4; }
.ag-theme-alpine .ag-row.blg-conf-mid  { background: #fff7e0; }
.ag-theme-alpine .ag-row.blg-conf-low  { background: #fdecea; }
.blg-stage { font-weight: 600; letter-spacing: .02em; }

/* Chart-card information popover: faint BOT logo watermark behind the text */
.bot-info-popover .popover-body { position: relative; }
.bot-info-popover .popover-body::before {
  content: ""; position: absolute; inset: 0;
  background: url(/assets/Logo.png) center / 42% no-repeat;
  opacity: .07; pointer-events: none;
}
.bot-info-popover .popover-body > * { position: relative; }
