/* H-BOT Activity panel UI (2026-10-18): Summary / Transactions / Journal + confirmation dialogs.
   Modern, compact, readable on phones. Loaded after hbot-sim-theme.v6.css. 10px = 10px in this app.
   Also fixes the mobile Transactions list collapsing to 0px height (rows existed but were never visible). */
:root {
  /* 2026-10-19: follow the H-BOT theme engine (hbot-theme.v1.js); the old fixed colours stay as fallbacks */
  --hba-bg: var(--hb-bg, #070d1a); --hba-card: var(--hb-surface, #0d1628); --hba-card2: var(--hb-card-2, #111d33); --hba-line: var(--hb-line, rgba(129, 140, 248, .18));
  --hba-text: var(--hb-text, #e7ecf7); --hba-muted: var(--hb-muted, #8b98b4); --hba-accent: var(--hb-a, #22d3ee); --hba-indigo: var(--hb-b, #818cf8);
  --hba-a-rgb: var(--hb-a-rgb, 34, 211, 238); --hba-b-rgb: var(--hb-b-rgb, 129, 140, 248); --hba-ink: var(--hb-ink, #04121c);
  --hba-win: var(--hb-ok, #34d399); --hba-loss: var(--hb-bad, #f87171); --hba-warn: var(--hb-warn, #fbbf24);
  --hba-font: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---------- panel shell ---------- */
html:not(#hba) .run-panel-activity__panel {
  font-family: var(--hba-font) !important; background: var(--hba-bg) !important; color: var(--hba-text);
  border: 1px solid var(--hba-line) !important; border-radius: 16px !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .6) !important;
}
html:not(#hba) .run-panel-activity__header {
  background: linear-gradient(180deg, var(--hba-card), var(--hba-bg)) !important; border-bottom: 1px solid var(--hba-line) !important;
  min-height: 0 !important; padding: 10px 12px !important;
}
html:not(#hba) .run-panel-activity__title { font-size: 15px !important; font-weight: 800 !important; letter-spacing: -.01em !important; color: var(--hba-text) !important; }
html:not(#hba) .run-panel-activity__title::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--hba-accent); box-shadow: 0 0 8px var(--hba-accent); margin-right: 8px; vertical-align: 1px; }
html:not(#hba) .run-panel-activity__actions { gap: 6px !important; }
html:not(#hba) .run-panel-activity__reset, html:not(#hba) .run-panel-activity__close {
  min-width: 0 !important; height: 30px !important; padding: 0 12px !important; border-radius: 99px !important;
  font-size: 12px !important; font-weight: 700 !important; letter-spacing: .01em !important;
}
html:not(#hba) .run-panel-activity__reset { background: rgba(248, 113, 113, .1) !important; border: 1px solid rgba(248, 113, 113, .35) !important; color: #fecaca !important; }
html:not(#hba) .run-panel-activity__reset .dc-btn__text, html:not(#hba) .run-panel-activity__close .dc-btn__text { font-size: 12px !important; color: inherit !important; }
html:not(#hba) .run-panel-activity__reset[disabled] { opacity: .35 !important; }
html:not(#hba) .run-panel-activity__close { background: rgba(148, 163, 184, .08) !important; border: 1px solid rgba(148, 163, 184, .25) !important; color: var(--hba-text) !important; }

/* ---------- tabs: segmented control ---------- */
html:not(#hba) .run-panel-activity__panel .dc-tabs__list {
  margin: 10px 12px 4px !important; padding: 3px !important; border: 1px solid var(--hba-line) !important; border-radius: 99px !important;
  background: var(--hba-card) !important; display: flex !important; gap: 2px;
}
html:not(#hba) .run-panel-activity__panel .dc-tabs__item {
  flex: 1 1 0 !important; height: 32px !important; line-height: 32px !important; padding: 0 4px !important; border-radius: 99px !important;
  font-size: 12px !important; font-weight: 700 !important; letter-spacing: .02em !important; text-transform: none !important;
  color: var(--hba-muted) !important; background: transparent !important; text-align: center; transition: background .2s, color .2s;
}
html:not(#hba) .run-panel-activity__panel .dc-tabs__item.dc-tabs__active { color: var(--hba-text) !important; background: linear-gradient(135deg, rgba(var(--hba-a-rgb), .28), rgba(var(--hba-b-rgb), .34)) !important; border: 1px solid rgba(var(--hba-b-rgb), .45) !important; box-shadow: 0 4px 14px rgba(var(--hba-a-rgb), .15); text-shadow: none !important; -webkit-text-fill-color: var(--hba-text) !important; animation: none !important; }
html:not(#hba) .run-panel-activity__panel .dc-tabs__item::before, html:not(#hba) .run-panel-activity__panel .dc-tabs__item::after { display: none !important; }
html:not(#hba) .run-panel-activity__panel .dc-tabs__active-line { display: none !important; }
html:not(#hba) .run-panel-activity__panel .dc-tabs__content { background: transparent !important; }

html:not(#hba) .run-panel-activity__panel .dc-tabs > div:first-child { width: auto !important; max-width: 100% !important; overflow: visible !important; }
html:not(#hba) .run-panel-activity__panel .dc-tabs__list { width: auto !important; max-width: calc(100% - 24px) !important; box-sizing: border-box !important; }
html:not(#hba) .run-panel-activity__panel .transactions__item .dc-popover, html:not(#hba) .run-panel-activity__panel .transactions__item .dc-popover__target,
html:not(#hba) .run-panel-activity__panel .transactions__item .transactions__cell, html:not(#hba) .run-panel-activity__panel .transactions__item .transactions__loader-container { background: transparent !important; box-shadow: none !important; border: 0 !important; }
html:not(#hba) .run-panel-activity__panel .transactions__summary { margin: 6px 12px 10px !important; border-radius: 12px !important; border: 1px solid var(--hba-line) !important; background: var(--hba-card) !important; }

/* v2 (2026-10-18): the theme painted #0e0e0e blocks over Summary and journal rows */
html:not(#hba) .run-panel-activity__panel .dc-themed-scrollbars, html:not(#hba) .run-panel-activity__panel .summary,
html:not(#hba) .run-panel-activity__panel .ReactVirtualized__Grid, html:not(#hba) .run-panel-activity__panel .ReactVirtualized__Grid__innerScrollContainer,
html:not(#hba) .run-panel-activity__panel .ReactVirtualized__Grid__innerScrollContainer > div, html:not(#hba) .run-panel-activity__panel .data-list__item--wrapper,
html:not(#hba) .run-panel-activity__panel .data-list__item, html:not(#hba) .run-panel-activity__panel .data-list__body, html:not(#hba) .run-panel-activity__panel .data-list__body-wrapper,
html:not(#hba) .run-panel-activity__panel .journal, html:not(#hba) .run-panel-activity__panel .journal__item-list, html:not(#hba) .run-panel-activity__panel .transactions,
html:not(#hba) .run-panel-activity__panel .transactions__list, html:not(#hba) .run-panel-activity__panel .transactions__scrollbar, html:not(#hba) .run-panel-activity__panel .transactions__content--mobile,
html:not(#hba) .run-panel-activity__panel .transactions__item-wrapper, html:not(#hba) .run-panel-activity__panel .journal-tools__container, html:not(#hba) .run-panel-activity__panel .journal-tools__search,
html:not(#hba) .run-panel-activity__panel .journal__activity-summary, html:not(#hba) .run-panel-activity__panel .download__container,
html:not(#hba) .run-panel-activity__panel .run-panel-tab__content--mobile, html:not(#hba) .run-panel-activity__panel .run-panel-tab__content--no-stat {
  background: transparent !important; background-image: none !important; box-shadow: none !important;
}
html:not(#hba) .run-panel-activity__panel .journal__item-list .data-list__row--wrapper { background: transparent !important; }
html:not(#hba) .run-panel-activity__panel .journal__item-list .data-list__row--wrapper > *, html:not(#hba) .run-panel-activity__panel .journal__item, html:not(#hba) .run-panel-activity__panel .journal__item > * { background: transparent !important; }
/* the journal card is the row wrapper itself */
html:not(#hba) .run-panel-activity__panel .journal__item-list .ReactVirtualized__Grid__innerScrollContainer > div > * { background: var(--hba-card) !important; }
/* Transactions: rows scroll inside the list instead of drawing past it */
html:not(#hba) .run-panel-activity__panel .transactions__list, html:not(#hba) .run-panel-activity__panel .transactions__list .data-list,
html:not(#hba) .run-panel-activity__panel .transactions__list .data-list__body-wrapper, html:not(#hba) .run-panel-activity__panel .transactions__list .data-list__body { overflow: hidden !important; position: relative !important; }
html:not(#hba) .run-panel-activity__panel .transactions__list .ReactVirtualized__Grid, html:not(#hba) .run-panel-activity__panel .journal__item-list .ReactVirtualized__Grid {
  overflow-y: auto !important; overflow-x: hidden !important; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y;
}
html:not(#hba) .run-panel-activity__panel .transactions__list .ReactVirtualized__Grid__innerScrollContainer { overflow: visible !important; max-height: none !important; }

/* v3 (2026-10-18): with a real contract the Summary card (~350px) was squeezed into ~135px above the stat tiles and clipped,
   leaving a dark empty block. On the Summary tab the whole tab scrolls as one page (card, then stats), and the card is compact. */
html:not(#hba) .run-panel-activity__panel:has(#db-run-panel-tab__summary.dc-tabs__active) .run-panel-activity__content { overflow-y: auto !important; overflow-x: hidden !important; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; display: block !important; }
html:not(#hba) .run-panel-activity__panel:has(#db-run-panel-tab__summary.dc-tabs__active) .dc-tabs,
html:not(#hba) .run-panel-activity__panel:has(#db-run-panel-tab__summary.dc-tabs__active) .dc-tabs__content,
html:not(#hba) .run-panel-activity__panel:has(#db-run-panel-tab__summary.dc-tabs__active) .run-panel-tab__content--mobile,
html:not(#hba) .run-panel-activity__panel:has(#db-run-panel-tab__summary.dc-tabs__active) .summary,
html:not(#hba) .run-panel-activity__panel:has(#db-run-panel-tab__summary.dc-tabs__active) .dc-themed-scrollbars {
  flex: 0 0 auto !important; height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; display: block !important;
}
html:not(#hba) .run-panel-activity__panel .db-summary-card:not(.db-summary-card--inactive) { padding: 10px !important; height: auto !important; min-height: 0 !important; display: block !important; }
html:not(#hba) .run-panel-activity__panel .dc-contract-card { background: transparent !important; padding: 2px !important; border: 0 !important; box-shadow: none !important; min-height: 0 !important; height: auto !important; }
html:not(#hba) .run-panel-activity__panel .dc-contract-card__grid, html:not(#hba) .run-panel-activity__panel .dc-contract-card__underlying-name, html:not(#hba) .run-panel-activity__panel .dc-contract-card__type,
html:not(#hba) .run-panel-activity__panel .dc-contract-card__body-wrapper, html:not(#hba) .run-panel-activity__panel .dc-contract-card-items-wrapper,
html:not(#hba) .run-panel-activity__panel .dc-contract-card-item, html:not(#hba) .run-panel-activity__panel .dc-contract-card-item__body { background: transparent !important; box-shadow: none !important; }
html:not(#hba) .run-panel-activity__panel .dc-contract-card__grid { gap: 8px !important; padding: 0 0 8px !important; border-bottom: 1px solid var(--hba-line) !important; min-height: 0 !important; height: auto !important; }
html:not(#hba) .run-panel-activity__panel .dc-contract-card__underlying-name, html:not(#hba) .run-panel-activity__panel .dc-contract-card__type { height: auto !important; min-height: 0 !important; padding: 0 !important; }
html:not(#hba) .run-panel-activity__panel .dc-contract-card__symbol, html:not(#hba) .run-panel-activity__panel .dc-contract-type__type-label { font-size: 13px !important; font-weight: 800 !important; color: var(--hba-text) !important; }
html:not(#hba) .run-panel-activity__panel .dc-contract-card__underlying-name svg, html:not(#hba) .run-panel-activity__panel .dc-contract-type__type-wrapper svg { width: 22px !important; height: 22px !important; }
html:not(#hba) .run-panel-activity__panel .dc-contract-card__body-wrapper { padding: 8px 0 0 !important; height: auto !important; min-height: 0 !important; }
html:not(#hba) .run-panel-activity__panel .dc-contract-card-items-wrapper { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px 12px !important; height: auto !important; }
html:not(#hba) .run-panel-activity__panel .dc-contract-card-item { padding: 6px 8px !important; border-radius: 10px !important; border: 1px solid var(--hba-line) !important; background: var(--hba-card2) !important; height: auto !important; min-height: 0 !important; }
html:not(#hba) .run-panel-activity__panel .dc-contract-card-item__header { font-size: 10.5px !important; font-weight: 700 !important; letter-spacing: .03em !important; color: var(--hba-muted) !important; margin: 0 0 2px !important; }
html:not(#hba) .run-panel-activity__panel .dc-contract-card-item__body, html:not(#hba) .run-panel-activity__panel .dc-contract-card-item__body * { font-size: 14px !important; font-weight: 800 !important; height: auto !important; }
html:not(#hba) .run-panel-activity__panel .dc-contract-card-item__body--profit, html:not(#hba) .run-panel-activity__panel .dc-contract-card-item__body--profit * { color: var(--hba-win) !important; }
html:not(#hba) .run-panel-activity__panel .dc-contract-card-item__body--loss, html:not(#hba) .run-panel-activity__panel .dc-contract-card-item__body--loss * { color: var(--hba-loss) !important; }
html:not(#hba) .run-panel-activity__panel .dc-contract-card .dc-currency-badge { font-size: 10px !important; padding: 2px 6px !important; border-radius: 99px !important; }
html:not(#hba) .run-panel-activity__panel .dc-contract-card__footer, html:not(#hba) .run-panel-activity__panel .dc-contract-card__result { background: transparent !important; }

/* the app reserves 140px under the tab content (old absolutely-placed stats): that was the empty dark band */
html:not(#hba) .run-panel-activity__panel .dc-tabs__content { padding-bottom: 0 !important; }
/* dark pills behind every label/value inside the contract card */
html:not(#hba) .run-panel-activity__panel .dc-contract-card *:not(.dc-contract-card-item):not(.dc-currency-badge):not(.dc-progress-slider--completed) { background-color: transparent !important; background-image: none !important; box-shadow: none !important; border-color: transparent !important; }
html:not(#hba) .run-panel-activity__panel .dc-contract-card__sell-button, html:not(#hba) .run-panel-activity__panel .dc-contract-card__result,
html:not(#hba) .run-panel-activity__panel [class*="dc-result__container"], html:not(#hba) .run-panel-activity__panel [class*="contract-card__footer"] { border-radius: 10px !important; border: 1px solid var(--hba-line) !important; }
html:not(#hba) .run-panel-activity__panel [class*="dc-result__caption"], html:not(#hba) .run-panel-activity__panel [class*="dc-result__"] { font-size: 15px !important; }

/* ---------- small buttons (Download / View Detail / Reset Logs / Filters) ---------- */
html:not(#hba) .run-panel-activity__panel .download__container, html:not(#hba) .run-panel-activity__panel .transaction-details__button-container {
  display: flex !important; gap: 6px !important; padding: 6px 12px !important; flex-wrap: nowrap !important; align-items: center;
}
html:not(#hba) .run-panel-activity__panel .download__button, html:not(#hba) .run-panel-activity__panel .download__container__view-detail-button, html:not(#hba) .run-panel-activity__panel .journal-tools__container-filter {
  height: 30px !important; min-width: 0 !important; padding: 0 11px !important; border-radius: 99px !important; margin: 0 !important;
  background: var(--hba-card2) !important; border: 1px solid var(--hba-line) !important; color: var(--hba-text) !important; white-space: nowrap;
}
html:not(#hba) .run-panel-activity__panel .download__button .dc-btn__text, html:not(#hba) .run-panel-activity__panel .download__container__view-detail-button .dc-btn__text,
html:not(#hba) .run-panel-activity__panel .journal-tools__container-filter--label { font-size: 11.5px !important; font-weight: 700 !important; color: inherit !important; }
html:not(#hba) .run-panel-activity__panel .journal-tools__container-filter svg { width: 14px; height: 14px; }
html:not(#hba) .run-panel-activity__panel .dc-btn[disabled] { opacity: .4 !important; }
html:not(#hba) .run-panel-activity__panel .dc-popover__target__icon { display: none !important; }

/* ---------- journal ---------- */
html:not(#hba) .run-panel-activity__panel .journal-tools__container { display: flex !important; gap: 6px !important; align-items: center !important; padding: 6px 12px !important; flex-wrap: wrap !important; }
html:not(#hba) .run-panel-activity__panel .journal-tools__search { flex: 1 1 100% !important; min-width: 0 !important; margin: 0 !important; position: relative; }
html:not(#hba) .run-panel-activity__panel .journal-tools__container > div { margin: 0 !important; }
html:not(#hba) .run-panel-activity__panel .journal-tools__search-label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
html:not(#hba) .run-panel-activity__panel .journal-tools__search input {
  width: 100% !important; height: 32px !important; padding: 0 12px 0 32px !important; border-radius: 99px !important; font-size: 12.5px !important;
  background: var(--hba-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%238b98b4' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center !important;
  border: 1px solid var(--hba-line) !important; color: var(--hba-text) !important; box-shadow: none !important;
}
html:not(#hba) .run-panel-activity__panel .journal__activity-summary {
  display: flex !important; gap: 10px !important; align-items: center; flex-wrap: wrap; padding: 2px 14px 6px !important;
  font-size: 11.5px !important; color: var(--hba-muted) !important;
}
html:not(#hba) .run-panel-activity__panel .journal__activity-summary strong { color: var(--hba-text) !important; font-weight: 800; }
html:not(#hba) .run-panel-activity__panel .journal__activity-error-count strong { color: var(--hba-loss) !important; }
html:not(#hba) .run-panel-activity__panel .journal__activity-status { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; background: var(--hba-card); border: 1px solid var(--hba-line); }
html:not(#hba) .run-panel-activity__panel .journal__item { padding: 0 12px !important; border: 0 !important; }
html:not(#hba) .run-panel-activity__panel .journal__item-list .ReactVirtualized__Grid__innerScrollContainer > div { padding: 3px 10px !important; box-sizing: border-box !important; }
html:not(#hba) .run-panel-activity__panel .journal__item-list .ReactVirtualized__Grid__innerScrollContainer > div > * {
  background: var(--hba-card) !important; border: 1px solid var(--hba-line) !important; border-left: 3px solid var(--hba-indigo) !important;
  border-radius: 10px !important; padding: 7px 10px !important; height: 100% !important; box-sizing: border-box !important; overflow: hidden;
}
html:not(#hba) .run-panel-activity__panel .journal__text, html:not(#hba) .run-panel-activity__panel .journal__text-datetime, html:not(#hba) .run-panel-activity__panel .journal__item-list p, html:not(#hba) .run-panel-activity__panel .journal__item-list span {
  font-size: 12.5px !important; line-height: 1.45 !important; color: var(--hba-text) !important;
}
html:not(#hba) .run-panel-activity__panel .journal__text-datetime, html:not(#hba) .run-panel-activity__panel .journal__item-list [class*="datetime"], html:not(#hba) .run-panel-activity__panel .journal__item-list [class*="date"] {
  font-size: 10.5px !important; color: var(--hba-muted) !important; margin-top: 2px !important;
}
html:not(#hba) .run-panel-activity__panel [class*="journal__text--error"], html:not(#hba) .run-panel-activity__panel [class*="--error"] .journal__text { color: #fecaca !important; }
html:not(#hba) .run-panel-activity__panel .journal-empty__message, html:not(#hba) .run-panel-activity__panel .transactions-empty__message { font-size: 13px !important; color: var(--hba-muted) !important; }

/* ---------- transactions ---------- */
html:not(#hba) .run-panel-activity__panel .transactions__header {
  padding: 4px 20px !important; margin: 0 !important;
  border: 0 !important; border-bottom: 1px solid var(--hba-line) !important; background: transparent !important;
}
html:not(#hba) .run-panel-activity__panel .transactions__header-column { font-size: 10.5px !important; font-weight: 800 !important; letter-spacing: .06em !important; text-transform: uppercase; color: var(--hba-muted) !important; }
html:not(#hba) .run-panel-activity__panel .transactions__header-profit { text-align: right; }
html:not(#hba) .run-panel-activity__panel .transactions__header-column { background: transparent !important; border: 0 !important; box-shadow: none !important; }
html:not(#hba) .run-panel-activity__panel .transactions__item-wrapper { padding: 3px 10px !important; box-sizing: border-box !important; }
html:not(#hba) .run-panel-activity__panel .transactions__item {
  background: var(--hba-card) !important; border: 1px solid var(--hba-line) !important; border-radius: 12px !important;
  padding: 6px 10px !important; min-height: 0 !important;
}
html:not(#hba) .run-panel-activity__panel .transactions__cell { font-size: 12px !important; color: var(--hba-text) !important; }
html:not(#hba) .run-panel-activity__panel .transactions__entry-spot, html:not(#hba) .run-panel-activity__panel .transactions__exit-spot { font-variant-numeric: tabular-nums; font-size: 11.5px !important; }
html:not(#hba) .run-panel-activity__panel .transactions__stake { color: var(--hba-muted) !important; font-variant-numeric: tabular-nums; }
html:not(#hba) .run-panel-activity__panel .transactions__profit { font-weight: 800 !important; font-variant-numeric: tabular-nums; text-align: right; }
html:not(#hba) .run-panel-activity__panel .transactions__profit--win { color: var(--hba-win) !important; }
html:not(#hba) .run-panel-activity__panel .transactions__profit--loss { color: var(--hba-loss) !important; }
html:not(#hba) .run-panel-activity__panel .transactions__divider { display: none !important; }
html:not(#hba) .run-panel-activity__panel .transactions-empty__icon-box svg { opacity: .35; }

/* ---------- summary card + stat tiles ---------- */
html:not(#hba) .run-panel-activity__panel .db-summary-card {
  margin: 8px 12px !important; background: var(--hba-card) !important; border: 1px solid var(--hba-line) !important; border-radius: 12px !important;
  padding: 12px !important; box-shadow: none !important;
}
html:not(#hba) .run-panel-activity__panel .summary.dc-themed-scrollbars { overflow-y: auto !important; display: block !important; }
html:not(#hba) .run-panel-activity__panel .db-summary-card--inactive { display: block !important; height: auto !important; min-height: 0 !important; }
html:not(#hba) .run-panel-activity__panel .db-summary-card p { font-size: 13px !important; line-height: 1.5 !important; color: var(--hba-muted) !important; }
html:not(#hba) .run-panel-activity__panel .summary-panel-inactive__strong { color: var(--hba-accent) !important; }
html:not(#hba) .run-panel-activity__panel .run-panel__stat {
  margin: 0 !important; padding: 10px 12px 12px !important; background: linear-gradient(180deg, transparent, rgba(129, 140, 248, .05)) !important;
  border-top: 1px solid var(--hba-line) !important;
}
html:not(#hba) .run-panel-activity__panel .run-panel__stat--info { display: flex; justify-content: flex-end; margin-bottom: 6px; }
html:not(#hba) .run-panel-activity__panel .run-panel__stat--info-item { font-size: 11px !important; color: var(--hba-indigo) !important; text-decoration: none !important; }
html:not(#hba) .run-panel-activity__panel .run-panel__stat--tiles { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 6px !important; }
html:not(#hba) .run-panel-activity__panel .run-panel__tile {
  background: var(--hba-card) !important; border: 1px solid var(--hba-line) !important; border-radius: 10px !important; padding: 7px 8px !important;
  min-width: 0 !important; height: auto !important; display: flex !important; flex-direction: column; gap: 2px; align-items: flex-start !important; justify-content: flex-start !important; text-align: left !important;
}
html:not(#hba) .run-panel-activity__panel .run-panel__tile-title { min-height: 0 !important; margin: 0 !important; line-height: 1.3 !important; font-size: 9px !important; font-weight: 700 !important; letter-spacing: .04em !important; text-transform: uppercase; color: var(--hba-muted) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
html:not(#hba) .run-panel-activity__panel .run-panel__tile-content { height: auto !important; line-height: 1.3 !important; margin: 0 !important; font-size: 14px !important; font-weight: 800 !important; color: var(--hba-text) !important; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
html:not(#hba) .run-panel-activity__panel .run-panel__stat-amount--positive, html:not(#hba) .run-panel-activity__panel .run-panel__stat-amount.run-panel__stat-amount--positive { color: var(--hba-win) !important; }
html:not(#hba) .run-panel-activity__panel .run-panel__stat-amount--negative { color: var(--hba-loss) !important; }

/* ---------- confirmation dialogs (Reset "Are you sure?", stop bot, etc.) ---------- */
html:not(#hba) .dc-dialog__wrapper--has-portal { z-index: 2147480000 !important; background: rgba(2, 6, 16, .72) !important; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
html:not(#hba) .dc-dialog__wrapper--has-portal .dc-dialog__dialog {
  font-family: var(--hba-font) !important; background: linear-gradient(180deg, var(--hba-card), var(--hba-bg)) !important; border: 1px solid var(--hba-line) !important;
  border-radius: 18px !important; padding: 20px 20px 16px !important; width: min(360px, calc(100vw - 32px)) !important; max-width: none !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .65) !important;
}
html:not(#hba) .dc-dialog__wrapper--has-portal .dc-dialog__header-wrapper { border: 0 !important; padding: 0 !important; margin-bottom: 8px !important; align-items: center; }
html:not(#hba) .dc-dialog__wrapper--has-portal .dc-dialog__header--title { font-size: 18px !important; font-weight: 800 !important; letter-spacing: -.01em !important; color: var(--hba-text) !important; }
html:not(#hba) .dc-dialog__wrapper--has-portal .dc-dialog__header--close { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(148, 163, 184, .08); }
html:not(#hba) .dc-dialog__wrapper--has-portal .dc-dialog__header--close svg { width: 14px; height: 14px; }
html:not(#hba) .dc-dialog__wrapper--has-portal .dc-dialog__content { font-size: 13.5px !important; line-height: 1.55 !important; color: var(--hba-muted) !important; margin: 0 0 18px !important; padding: 0 !important; }
html:not(#hba) .dc-dialog__wrapper--has-portal .dc-dialog__footer { display: flex !important; flex-direction: row !important; gap: 10px !important; padding: 0 !important; margin: 0 !important; }
html:not(#hba) .dc-dialog__wrapper--has-portal .dc-dialog__button {
  flex: 1 1 0 !important; width: auto !important; height: 44px !important; margin: 0 !important; border-radius: 12px !important;
  font-size: 14px !important; font-weight: 800 !important;
}
html:not(#hba) .dc-dialog__wrapper--has-portal .dc-dialog__button .dc-btn__text { font-size: 14px !important; color: inherit !important; }
html:not(#hba) .dc-dialog__wrapper--has-portal .dc-dialog__button.dc-btn--secondary { background: rgba(148, 163, 184, .08) !important; border: 1px solid rgba(148, 163, 184, .28) !important; color: var(--hba-text) !important; }
html:not(#hba) .dc-dialog__wrapper--has-portal .dc-dialog__button.dc-btn--primary { background: linear-gradient(135deg, var(--hba-accent), var(--hba-indigo)) !important; border: 0 !important; color: var(--hba-ink) !important; box-shadow: 0 8px 20px rgba(var(--hba-a-rgb), .25) !important; }

/* tile values and summary text sit in spans/p that set their own size */
html:not(#hba) .run-panel-activity__panel .run-panel__tile-content *, html:not(#hba) .run-panel-activity__panel .db-summary-card p * { font-size: inherit !important; }
/* stat tiles belong to Summary: hide them on Transactions so the list gets the room */
html:not(#hba) .run-panel-activity__panel:has(#db-run-panel-tab__transactions.dc-tabs__active) .run-panel__stat,
html:not(#hba) .run-panel-activity__panel:has(#db-run-panel-tab__journal.dc-tabs__active) .run-panel__stat { display: none !important; }
/* while a confirmation dialog is open, the floating Run / Max loss buttons must not cover it */
body:has(.dc-dialog__wrapper--has-portal) #hbot-primary-run, body:has(.dc-dialog__wrapper--has-portal) #hbot-risk-control { visibility: hidden !important; }

/* ---------- phones ---------- */
@media (max-width: 767px) {
  html:not(#hba) .run-panel-activity__panel--mobile {
    left: 8px !important; right: 8px !important; width: auto !important; top: auto !important;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important; height: min(72dvh, 620px) !important; border-radius: 18px !important;
  }
  html:not(#hba) .run-panel-activity__panel--mobile::before { content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 99px; background: rgba(148, 163, 184, .3); }
  html:not(#hba) .run-panel-activity__panel--mobile .run-panel-activity__header { padding-top: 16px !important; }
  /* the mobile Transactions list collapsed to 0px: give every level of the list a real height */
  html:not(#hba) .run-panel-activity__panel--mobile .dc-tabs { flex: 1 1 auto !important; min-height: 0 !important; display: flex !important; flex-direction: column !important; }
  html:not(#hba) .run-panel-activity__panel--mobile .dc-tabs__content { flex: 1 1 auto !important; min-height: 0 !important; height: auto !important; display: flex !important; flex-direction: column !important; overflow: hidden !important; }
  html:not(#hba) .run-panel-activity__panel--mobile .run-panel-tab__content--mobile,
  html:not(#hba) .run-panel-activity__panel--mobile .run-panel-tab__content--no-stat { flex: 1 1 auto !important; min-height: 0 !important; height: auto !important; display: flex !important; flex-direction: column !important; }
  html:not(#hba) .run-panel-activity__panel--mobile .transactions__content--mobile { flex: 1 1 auto !important; min-height: 0 !important; height: auto !important; display: flex !important; flex-direction: column !important; }
  html:not(#hba) .run-panel-activity__panel--mobile .transactions__scrollbar { flex: 1 1 auto !important; min-height: 0 !important; height: auto !important; display: flex !important; flex-direction: column !important; }
  html:not(#hba) .run-panel-activity__panel--mobile .transactions__list { flex: 1 1 auto !important; min-height: 200px !important; height: 100% !important; }
  html:not(#hba) .run-panel-activity__panel--mobile .transactions__list > .data-list, html:not(#hba) .run-panel-activity__panel--mobile .transactions__list .data-list__body-wrapper,
  html:not(#hba) .run-panel-activity__panel--mobile .transactions__list .data-list__body { height: 100% !important; }
  html:not(#hba) .run-panel-activity__panel--mobile .journal__item-list { flex: 1 1 auto !important; min-height: 0 !important; }
  html:not(#hba) .run-panel-activity__panel--mobile .run-panel__stat--mobile { flex: 0 0 auto !important; }
}
