*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0d0f12; --surface: #161920; --surface2: #1e2230; --border: #2a2f3e;
  --text: #e8eaf0; --muted: #8890a4; --accent: #4f8ef7;
  --green: #2ecc71; --yellow: #f1c40f; --red: #e74c3c; --orange: #e67e22;
}
body { background: var(--bg); color: var(--text); font-family: system-ui, sans-serif; font-size: 14px; }

header { display: flex; align-items: center; gap: 1.5rem; padding: 0.8rem 1.5rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg); z-index: 10; flex-wrap: wrap; }
.logo { font-size: 1.2rem; font-weight: 800; color: var(--accent); margin-right: 0.5rem; }
nav { display: flex; gap: 0.3rem; }
.tab { background: none; border: 1px solid var(--border); color: var(--muted); padding: 0.4rem 1rem; border-radius: 6px; cursor: pointer; font-size: 0.85rem; }
.tab.active { background: var(--accent); border-color: var(--accent); color: white; font-weight: 600; }
.last-updated { color: var(--muted); font-size: 0.75rem; margin-left: auto; }
.tab-updated  { color: var(--muted); font-size: 0.78rem; }

.tab-content { display: none; padding: 1.5rem; max-width: 1100px; margin: 0 auto; }
.tab-content.active { display: block; }

.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; flex-wrap: wrap; gap: 0.8rem; }
.toolbar h2 { font-size: 1.1rem; font-weight: 700; }
.search-row { display: flex; gap: 0.5rem; }
.search-row input { background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 0.4rem 0.8rem; border-radius: 6px; font-size: 0.85rem; width: 260px; outline: none; }
.search-row input:focus { border-color: var(--accent); }
.hint { color: var(--muted); font-size: 0.82rem; margin-bottom: 1.2rem; }

/* Toolbar right */
.toolbar-right { display: flex; align-items: center; gap: 0.8rem; }
.size-label { color: var(--muted); font-size: 0.85rem; display: flex; align-items: center; gap: 0.3rem; }
.size-label input { width: 70px; background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 0.3rem 0.5rem; border-radius: 5px; font-size: 0.85rem; outline: none; }
.size-label input:focus { border-color: var(--accent); }

/* Banners */
.banner-profit       { background: rgba(46,204,113,0.1);  border: 1px solid var(--green);  border-radius: 6px; padding: 0.6rem 1rem; margin-bottom: 1rem; color: var(--green);  font-weight: 700; font-size: 0.9rem; }
.banner-pending      { background: rgba(241,196,15,0.08); border: 1px solid rgba(241,196,15,0.5); border-radius: 6px; padding: 0.6rem 1rem; margin-bottom: 1rem; color: var(--yellow); font-weight: 700; font-size: 0.9rem; }
.banner-pending-note { color: var(--yellow); font-weight: 600; font-size: 0.85rem; }
.banner-muted        { color: var(--muted);  font-size: 0.85rem; margin-bottom: 1rem; }

/* Crypto table */
.table-wrap { overflow-x: auto; }
.crypto-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.crypto-table th { text-align: left; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--border); white-space: nowrap; cursor: default; }
.crypto-table th[title] { text-decoration: underline dotted; }
.crypto-table td { padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 0.85rem; }
.crypto-table tr:hover td { background: var(--surface2); }

.row-profit         td { background: rgba(46,204,113,0.05) !important; }
.row-profit-pending td { background: rgba(241,196,15,0.04) !important; }
.row-close          td { background: rgba(241,196,15,0.03) !important; }

.coin-name { font-weight: 700; font-size: 0.95rem; }
.arb-tag         { color: var(--green);  font-size: 0.68rem; font-weight: 700; }
.arb-tag-pending { color: var(--yellow); font-size: 0.68rem; font-weight: 700; }
.px-row    { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.3rem; }
.px-chip   { background: var(--surface2); border-radius: 3px; padding: 0.1rem 0.4rem; font-size: 0.72rem; color: var(--muted); }
.ex-pair   { font-size: 0.82rem; color: var(--muted); }
.ex-price  { font-weight: 600; font-size: 0.88rem; }

.val-neutral { color: var(--text); font-weight: 600; }
.val-cost    { color: var(--red); font-size: 0.82rem; }
.val-green   { color: var(--green); font-weight: 800; }
.val-yellow  { color: var(--yellow); font-weight: 700; }
.val-red     { color: var(--muted); font-size: 0.82rem; }
.val-orange  { color: #ffa000; font-weight: 700; }
.net-cell    { white-space: nowrap; }
.net-usd     { font-size: 0.75rem; color: var(--green); }

.liq-ok   { color: var(--green); font-size: 0.85rem; }
.liq-warn { color: var(--yellow); font-size: 0.8rem; cursor: help; }

/* Transfer time */
.transfer-fast      { color: var(--green); font-weight: 700; font-size: 0.82rem; cursor: help; }
.transfer-ok        { color: var(--yellow); font-size: 0.82rem; cursor: help; }
.transfer-slow      { color: var(--orange); font-size: 0.82rem; cursor: help; }
.transfer-very-slow { color: var(--red); font-size: 0.82rem; cursor: help; }

/* WS status */
.ws-live { color: var(--green); font-size: 0.75rem; margin-left: auto; }
.ws-dead { color: var(--muted); font-size: 0.75rem; margin-left: auto; }

.table-note { color: var(--muted); font-size: 0.75rem; margin-top: 1rem; line-height: 1.5; }
.no-opps { color: var(--muted); text-align: center; padding: 3rem; }

/* Trade Log */
.log-section { margin-top: 2rem; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.log-header { display: flex; align-items: center; gap: 0.8rem; padding: 0.65rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.log-title  { font-size: 0.88rem; font-weight: 800; }
.log-count  { color: var(--muted); font-size: 0.78rem; margin-right: auto; }
.log-actions { display: flex; gap: 0.4rem; }
.btn-export { background: var(--surface2); border: 1px solid var(--border); color: var(--accent); padding: 0.28rem 0.75rem; border-radius: 5px; cursor: pointer; font-size: 0.78rem; font-weight: 700; }
.btn-export:hover { border-color: var(--accent); background: rgba(79,142,247,0.1); }
.btn-clear  { background: none; border: 1px solid var(--border); color: var(--muted); padding: 0.28rem 0.75rem; border-radius: 5px; cursor: pointer; font-size: 0.78rem; }
.btn-clear:hover { border-color: var(--red); color: var(--red); }
.log-empty  { color: var(--muted); padding: 1.5rem; font-size: 0.83rem; text-align: center; }
.log-table  { width: 100%; border-collapse: collapse; min-width: 1060px; }
.log-table th { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.4px; padding: 0.45rem 0.7rem; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; background: var(--surface); }
.log-table td { padding: 0.48rem 0.7rem; border-bottom: 1px solid var(--border); font-size: 0.83rem; white-space: nowrap; }
.log-table tr:last-child td { border-bottom: none; }
.log-table tbody tr { background: rgba(46,204,113,0.02); }
.log-table tbody tr:hover td { background: rgba(46,204,113,0.06); }
.log-num     { color: var(--muted); font-size: 0.75rem; }
.log-time    { color: var(--muted); font-size: 0.78rem; }
.log-coin    { font-weight: 700; }
.log-net-usd { font-weight: 800; }
.log-size    { color: var(--muted);  font-size: 0.8rem; }
.log-persist { color: var(--accent); font-size: 0.8rem; font-weight: 600; }
.log-hb      { color: var(--accent); font-weight: 700; text-align: center; }
.type-flash      { color: var(--red);    font-size: 0.75rem; font-weight: 700; }
.type-short      { color: var(--yellow); font-size: 0.75rem; font-weight: 700; }
.type-medium     { color: var(--accent); font-size: 0.75rem; font-weight: 700; }
.type-persistent { color: var(--green);  font-size: 0.75rem; font-weight: 700; }
.duration-cell   { color: var(--accent); font-size: 0.8rem; font-weight: 600; }

/* Digital deals grid */
.deals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.deal-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; }
.deal-title { font-weight: 700; margin-bottom: 0.5rem; font-size: 0.95rem; line-height: 1.3; }
.deal-store { color: var(--muted); font-size: 0.78rem; margin-bottom: 0.5rem; }
.deal-price { display: flex; align-items: baseline; gap: 0.5rem; }
.deal-price .current { font-size: 1.2rem; font-weight: 800; color: var(--green); }
.deal-price .original { color: var(--muted); text-decoration: line-through; font-size: 0.85rem; }
.deal-cut { background: var(--green); color: #000; font-size: 0.72rem; font-weight: 800; padding: 0.15rem 0.4rem; border-radius: 4px; margin-left: auto; }
.deal-link { display: block; margin-top: 0.8rem; color: var(--accent); font-size: 0.82rem; text-decoration: none; }
.deal-link:hover { text-decoration: underline; }

.card-flip { border-color: rgba(46,204,113,0.4) !important; }

.flip-box { margin-top: 0.8rem; border-radius: 5px; padding: 0.6rem 0.7rem; font-size: 0.78rem; }
.flip-strong  { background: rgba(46,204,113,0.08); border: 1px solid rgba(46,204,113,0.3); }
.flip-marginal{ background: rgba(241,196,15,0.06); border: 1px solid rgba(241,196,15,0.2); }
.flip-weak    { background: var(--surface2); border: 1px solid var(--border); }

.flip-row { display: flex; justify-content: space-between; margin-bottom: 0.2rem; color: var(--muted); }
.flip-net { color: var(--text); font-weight: 700; border-top: 1px solid var(--border); padding-top: 0.3rem; margin-top: 0.2rem; }
.flip-strong .flip-net  { color: var(--green); }
.flip-marginal .flip-net{ color: var(--yellow); }
.flip-verdict { text-align: center; font-weight: 800; font-size: 0.75rem; margin-top: 0.4rem; }
.flip-strong .flip-verdict  { color: var(--green); }
.flip-marginal .flip-verdict{ color: var(--yellow); }

/* Search results */
.search-results { margin-top: 1.5rem; }
.price-compare { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1.2rem; margin-bottom: 1rem; }
.price-compare h3 { margin-bottom: 0.8rem; font-size: 1rem; }
.price-row { display: flex; justify-content: space-between; align-items: center; padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.price-row:last-child { border: none; }
.price-row .store { color: var(--muted); }
.price-row .price { font-weight: 700; }
.price-row.cheapest .store { color: var(--green); }
.price-row.cheapest .price { color: var(--green); }
.savings-badge { display: inline-block; background: var(--green); color: #000; padding: 0.2rem 0.6rem; border-radius: 4px; font-weight: 800; font-size: 0.82rem; margin-left: 0.5rem; }

/* Retail */
.retail-form { display: flex; flex-direction: column; gap: 0.7rem; max-width: 600px; margin-bottom: 1.5rem; }
.retail-form input { background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 0.7rem 1rem; border-radius: 6px; font-size: 0.9rem; outline: none; }
.retail-form input:focus { border-color: var(--accent); }
.retail-result { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; max-width: 480px; }
.ebay-volume { margin: 0.6rem 0; padding: 0.6rem 0.8rem; background: var(--surface2); border-radius: 5px; border: 1px solid var(--border); }
.vol-label { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.2rem; }
.vol-note  { font-size: 0.78rem; color: var(--muted); }
.retail-result .verdict { font-size: 1.4rem; font-weight: 800; margin-bottom: 1rem; }
.verdict-strong { color: var(--green); }
.verdict-marginal { color: var(--yellow); }
.verdict-avoid { color: var(--red); }
.retail-row { display: flex; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.retail-row:last-child { border: none; }
.retail-row .label { color: var(--muted); }
.retail-row .value { font-weight: 600; }

/* Buttons */
.btn-refresh, .btn-primary { background: var(--accent); border: none; color: white; padding: 0.45rem 1rem; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 0.85rem; }
.btn-refresh:hover, .btn-primary:hover { opacity: 0.85; }
.btn-primary { padding: 0.7rem 1.5rem; font-size: 0.95rem; }

.loading { color: var(--muted); text-align: center; padding: 3rem; }
.error { color: var(--red); padding: 1rem; }

/* Pre-Market Squeeze Cards */
.sq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.sq-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.7rem; }
.sq-a { border-color: rgba(46,204,113,0.5); box-shadow: 0 0 12px rgba(46,204,113,0.07); }
.sq-b { border-color: rgba(79,142,247,0.4); }
.sq-c { border-color: rgba(241,196,15,0.3); }
.sq-d { border-color: var(--border); }

.sq-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.sq-symbol { font-size: 1.1rem; font-weight: 800; color: var(--text); margin-right: 0.4rem; }
.sq-name   { font-size: 0.78rem; color: var(--muted); display: block; margin-top: 0.15rem; }

.sq-score-box { text-align: center; padding: 0.3rem 0.6rem; border-radius: 6px; min-width: 56px; flex-shrink: 0; }
.sq-a .sq-score-box { background: rgba(46,204,113,0.15); border: 1px solid rgba(46,204,113,0.4); }
.sq-b .sq-score-box { background: rgba(79,142,247,0.12); border: 1px solid rgba(79,142,247,0.35); }
.sq-c .sq-score-box { background: rgba(241,196,15,0.10); border: 1px solid rgba(241,196,15,0.3); }
.sq-d .sq-score-box { background: var(--surface2); border: 1px solid var(--border); }
.sq-grade { display: block; font-size: 1.1rem; font-weight: 900; line-height: 1; }
.sq-a .sq-grade { color: var(--green); }
.sq-b .sq-grade { color: var(--accent); }
.sq-c .sq-grade { color: var(--yellow); }
.sq-d .sq-grade { color: var(--muted); }
.sq-grade-label { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

.sq-score-bar-wrap { position: relative; background: var(--surface2); border-radius: 4px; height: 5px; overflow: visible; }
.sq-score-bar { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--green)); }
.sq-a .sq-score-bar { background: linear-gradient(90deg, #27ae60, #2ecc71); }
.sq-b .sq-score-bar { background: linear-gradient(90deg, var(--accent), #74b9ff); }
.sq-c .sq-score-bar { background: linear-gradient(90deg, #e67e22, var(--yellow)); }
.sq-d .sq-score-bar { background: var(--muted); }
.sq-score-num { position: absolute; right: 0; top: -16px; font-size: 0.7rem; color: var(--muted); }

.sq-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 0.8rem; }
.sq-metric-wide { grid-column: 1 / -1; }
.sq-metric { display: flex; flex-direction: column; gap: 0.1rem; }
.sq-metric-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.sq-metric-val { font-size: 0.88rem; font-weight: 600; }

.sq-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.sq-tag { background: var(--surface2); border: 1px solid var(--border); color: var(--muted); font-size: 0.68rem; font-weight: 700; padding: 0.15rem 0.45rem; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.sq-a .sq-tag { border-color: rgba(46,204,113,0.25); color: rgba(46,204,113,0.85); background: rgba(46,204,113,0.06); }
.sq-b .sq-tag { border-color: rgba(79,142,247,0.25); color: rgba(79,142,247,0.9); background: rgba(79,142,247,0.06); }

/* Premarket section labels */
.pm-section-label { font-size: 0.85rem; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 0.8rem; }
.pm-hot-label   { color: #e74c3c; }
.pm-watch-label { color: var(--yellow); }
.pm-watch-hint  { font-size: 0.78rem; color: var(--muted); margin: -0.4rem 0 0.8rem; line-height: 1.5; }
.sq-card-watch  { border-style: dashed; opacity: 0.92; }
.sq-card-watch:hover { opacity: 1; }

/* Live market data rows */
.rt-metric .sq-metric-label::after { content: ' ●'; color: var(--green); font-size: 0.6rem; vertical-align: middle; }

/* Vol delta */
.delta-up        { color: var(--green); font-weight: 700; }
.delta-up.delta-fire { color: #00ff88; text-shadow: 0 0 8px rgba(0,255,136,0.5); }
.delta-up.delta-soft { color: #5dbb80; }
.delta-flat      { color: var(--muted); }
.delta-down      { color: var(--red); font-weight: 700; }
.delta-down.delta-soft { color: #b06060; }

/* Signal badge button */
.sig-btn {
  width: 100%; padding: 0.55rem 0; border-radius: 7px; border: none;
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase;
  cursor: default; margin-top: 0.2rem;
}
.sig-buy-strong { background: rgba(0,255,136,0.18); color: #00ff88; border: 1px solid rgba(0,255,136,0.5); box-shadow: 0 0 12px rgba(0,255,136,0.2); }
.sig-buy        { background: rgba(46,204,113,0.15); color: #2ecc71; border: 1px solid rgba(46,204,113,0.4); }
.sig-watch-buy  { background: rgba(79,142,247,0.12); color: #4f8ef7; border: 1px solid rgba(79,142,247,0.35); }
.sig-watch      { background: rgba(241,196,15,0.1);  color: var(--yellow); border: 1px solid rgba(241,196,15,0.3); }
.sig-sell       { background: rgba(231,76,60,0.15);  color: #e74c3c; border: 1px solid rgba(231,76,60,0.4); }
.sig-avoid      { background: rgba(150,60,40,0.15);  color: #c0392b; border: 1px solid rgba(150,60,40,0.4); }
.sig-neutral    { background: rgba(255,255,255,0.04); color: var(--muted); border: 1px solid var(--border); }

/* Stocks toolbar */
.stocks-toolbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.exch-filter { display: flex; gap: 0.3rem; }
.exch-btn { background: none; border: 1px solid var(--border); color: var(--muted); padding: 0.3rem 0.8rem; border-radius: 5px; cursor: pointer; font-size: 0.8rem; font-weight: 600; }
.exch-btn.active { background: var(--surface2); border-color: var(--accent); color: var(--accent); }
.exch-btn:hover:not(.active) { border-color: var(--muted); }

/* Stocks */
.stocks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 720px) { .stocks-grid { grid-template-columns: 1fr; } }
.stocks-col { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.stocks-col-header { font-weight: 800; font-size: 0.9rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); }
.winners-header { color: var(--green); }
.losers-header  { color: var(--red); }
.stocks-table { width: 100%; border-collapse: collapse; }
.stocks-table th { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.stocks-table td { padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.stocks-table tr:last-child td { border-bottom: none; }
.stocks-table tr:hover td { background: var(--surface2); }
.rank-cell { color: var(--muted); font-size: 0.78rem; width: 22px; padding-right: 0.3rem !important; }
.stock-sym { font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; gap: 0.4rem; }
.stock-name { color: var(--muted); font-size: 0.75rem; margin-top: 0.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.stock-price { font-weight: 600; white-space: nowrap; }
.stock-chg { font-weight: 700; white-space: nowrap; }
.stock-vol { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }
.stock-red { color: var(--red); font-weight: 800; }
.exch-badge { background: var(--surface2); color: var(--muted); font-size: 0.65rem; padding: 0.1rem 0.35rem; border-radius: 3px; font-weight: 400; }
.market-status { font-size: 0.8rem; font-weight: 600; }
.market-open   { color: var(--green); }
.market-closed { color: var(--muted); }

/* Overnight tab */
.on-phase-banner { border-radius: 6px; padding: 0.7rem 1rem; margin-bottom: 1.2rem; font-weight: 700; font-size: 0.85rem; border: 1px solid; }
.on-phase-build    { background: rgba(79,142,247,0.08);  border-color: rgba(79,142,247,0.3);   color: var(--accent); }
.on-phase-enter    { background: rgba(0,255,136,0.08);   border-color: rgba(0,255,136,0.35);   color: #00ff88; }
.on-phase-hold     { background: rgba(241,196,15,0.06);  border-color: rgba(241,196,15,0.25);  color: var(--yellow); }
.on-phase-watch    { background: rgba(241,196,15,0.06);  border-color: rgba(241,196,15,0.25);  color: var(--yellow); }
.on-phase-exit     { background: rgba(46,204,113,0.08);  border-color: rgba(46,204,113,0.3);   color: var(--green); }
.on-phase-exit-now { background: rgba(0,255,136,0.15);  border-color: rgba(0,255,136,0.5);    color: #00ff88; box-shadow: 0 0 12px rgba(0,255,136,0.15); }
.on-phase-closing  { background: rgba(230,126,34,0.1);   border-color: rgba(230,126,34,0.5);   color: var(--orange); animation: on-pulse 1.8s ease-in-out infinite; }
.on-phase-closed   { background: rgba(255,255,255,0.03); border-color: var(--border);          color: var(--muted); }
@keyframes on-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.65; } }
.on-card-entered { border-color: rgba(46,204,113,0.55) !important; box-shadow: 0 0 14px rgba(46,204,113,0.07); }
.on-entry-btn  { width: 100%; margin-top: 0.5rem; padding: 0.4rem; border-radius: 6px; border: 1px solid var(--border); background: var(--surface2); color: var(--muted); font-size: 0.75rem; cursor: pointer; }
.on-entry-btn:hover  { border-color: var(--accent); color: var(--accent); }
.on-exit-btn   { width: 100%; margin-top: 0.3rem; padding: 0.4rem; border-radius: 6px; border: 1px solid rgba(46,204,113,0.4); background: rgba(46,204,113,0.08); color: var(--green); font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.on-exit-btn:hover   { background: rgba(46,204,113,0.15); }
.on-entry-info { font-size: 0.72rem; color: var(--muted); text-align: center; margin-top: 0.5rem; }
.on-setup-label    { color: var(--green);  font-size: 0.85rem; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 0.8rem; }
.on-watch-label    { color: var(--yellow); font-size: 0.85rem; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; }

/* AH Spike Tracker */
.ah-tracker { background: var(--surface); border: 1px solid rgba(241,196,15,0.25); border-radius: 8px; padding: 1rem 1.1rem; margin-bottom: 1.5rem; }
.ah-tracker-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem; flex-wrap: wrap; }
.ah-tracker-title  { font-size: 0.9rem; font-weight: 800; color: var(--yellow); }
.ah-tracker-note   { font-size: 0.75rem; color: var(--muted); }
.ah-table { width: 100%; border-collapse: collapse; }
.ah-table th { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.ah-table td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); font-size: 0.85rem; white-space: nowrap; }
.ah-table tr:last-child td { border-bottom: none; }
.ah-table tr:hover td { background: var(--surface2); }
.ah-sym        { font-weight: 700; }
.ah-chg-pos    { color: var(--green); font-weight: 700; }
.ah-chg-neg    { color: var(--red);   font-weight: 700; }
.ah-chg-neu    { color: var(--muted); }
.ah-vol-cell   { font-weight: 600; }
.ah-ratio-cell { color: var(--muted); font-size: 0.8rem; }
.ah-ts         { color: var(--muted); font-size: 0.78rem; }
.ah-spike      { font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.45rem; border-radius: 4px; }
.ah-spike-fire { background: rgba(0,255,136,0.15);  color: #00ff88;       border: 1px solid rgba(0,255,136,0.4); }
.ah-spike-high { background: rgba(46,204,113,0.12); color: var(--green);  border: 1px solid rgba(46,204,113,0.35); }
.ah-spike-mod  { background: rgba(241,196,15,0.1);  color: var(--yellow); border: 1px solid rgba(241,196,15,0.3); }
.ah-spike-low  { background: var(--surface2);       color: var(--muted);  border: 1px solid var(--border); }
.ah-spike-none { background: var(--surface2);       color: var(--muted);  border: 1px solid var(--border); }

/* ── ANALYTICS TAB ────────────────────────────────────────────────────────── */
.an-cards { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.an-card  { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.9rem 1.1rem; flex: 1 1 160px; min-width: 140px; }
.an-card-val  { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.an-card-lbl  { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 0.25rem; }
.an-card-sub  { font-size: 0.72rem; color: var(--muted); margin-top: 0.3rem; }
.an-red    { color: var(--red); }
.an-green  { color: var(--green); }
.an-accent { color: var(--accent); }
.an-yellow { color: var(--yellow); }
.an-muted  { color: var(--muted); }

.an-section { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.1rem; margin-bottom: 1.2rem; }
.an-section-title { font-size: 0.88rem; font-weight: 800; margin-bottom: 0.2rem; }
.an-section-note  { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.8rem; }

.an-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; min-width: 480px; }
.an-table-wide { min-width: 700px; }
.an-table th { color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.4px; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; cursor: default; }
.an-table th[title] { text-decoration: underline dotted; }
.an-table td { padding: 0.42rem 0.6rem; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
.an-table tr:last-child td { border-bottom: none; }
.an-table tr:hover td { background: var(--surface2); }
.an-row-top td { background: rgba(46,204,113,0.04) !important; }

.an-hb-num  { font-weight: 700; font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.an-hb-cnt  { font-weight: 700; text-align: right; padding-right: 0.8rem; }
.an-hb-dur  { color: var(--muted); font-size: 0.78rem; }
.an-hb-peak { font-size: 0.82rem; }
.an-bar-wrap { width: 140px; background: var(--surface2); border-radius: 3px; height: 10px; overflow: hidden; }
.an-bar      { height: 100%; border-radius: 3px; transition: width 0.3s; }
.an-bar-flash { background: var(--red); opacity: 0.6; }
.an-bar-multi { background: var(--yellow); opacity: 0.7; }
.an-bar-long  { background: var(--green); opacity: 0.75; }

.an-type-flash { color: var(--red);    font-size: 0.72rem; font-weight: 700; }
.an-type-short { color: var(--yellow); font-size: 0.72rem; font-weight: 700; }
.an-type-med   { color: var(--accent); font-size: 0.72rem; font-weight: 700; }
.an-type-long  { color: var(--green);  font-size: 0.72rem; font-weight: 700; }

.an-coin { font-weight: 700; }
.an-pair { font-size: 0.8rem; color: var(--muted); font-family: monospace; }
.an-rank { color: var(--muted); font-size: 0.78rem; text-align: right; padding-right: 0.8rem; }
.an-dur  { font-weight: 700; }
.an-hb-badge { background: var(--surface2); border: 1px solid var(--border); border-radius: 4px; padding: 0.1rem 0.4rem; font-size: 0.72rem; font-weight: 700; color: var(--accent); }
.bid-ask-tag { font-size: 0.65rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; }

/* ── PRE-EXECUTION CHECK ─────────────────────────────────────────────────────── */
.precheck-cell { white-space: nowrap; min-width: 90px; }
.btn-precheck  { background: rgba(79,142,247,0.12); border: 1px solid var(--accent); color: var(--accent); padding: 0.2rem 0.55rem; border-radius: 5px; cursor: pointer; font-size: 0.75rem; font-weight: 700; }
.btn-precheck:hover { background: rgba(79,142,247,0.25); }
.pc-loading  { color: var(--muted); font-size: 0.75rem; }
.pc-go       { color: var(--green); font-weight: 800; font-size: 0.82rem; }
.pc-abort    { color: var(--red);   font-weight: 800; font-size: 0.82rem; }
.pc-detail   { font-size: 0.72rem; color: var(--muted); margin-top: 0.1rem; }
.pc-latency  { color: var(--accent); opacity: 0.7; }

/* ── HAMBURGER — desktop hidden ─────────────────────────────────────────────── */
.hamburger        { display: none; }
.nav-label-mobile { display: none; }

@media (max-width: 700px) {
  header { gap: 0.5rem; padding: 0.7rem 1rem; }

  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.4rem 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
  }
  .hamburger span { display: block; width: 17px; height: 2px; background: var(--text); border-radius: 2px; }

  .nav-label-mobile {
    display: inline;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 700;
    flex: 1;
  }

  nav {
    display: none;
    flex-direction: column;
    width: 100%;
    order: 100;
    gap: 0.2rem;
    border-top: 1px solid var(--border);
    padding-top: 0.6rem;
    margin-top: 0.3rem;
  }
  nav.open { display: flex; }
  nav .tab { text-align: left; padding: 0.6rem 1rem; font-size: 0.9rem; border-radius: 6px; }

  .tab-content { padding: 1rem; }
  .last-updated { font-size: 0.68rem; }
}

/* ── PAPER TRADING ──────────────────────────────────────────────── */
.pt-go   { color: var(--green); font-weight: 700; }
.pt-abort { color: var(--red);  font-weight: 700; }
.pt-row-go   td:first-child { border-left: 3px solid var(--green); }
.pt-row-abort td:first-child { border-left: 3px solid var(--red); }
.pt-time { font-size: 0.78rem; white-space: nowrap; }
.pt-drift-warn { font-size: 0.72rem; background: rgba(255,80,80,0.15); color: var(--red); border: 1px solid rgba(255,80,80,0.4); border-radius: 3px; padding: 1px 4px; margin-left: 4px; white-space: nowrap; }
.pt-drift-high { font-weight: 600; }

/* ── Pre-Market sidebar layout ─────────────────────────────────────────────── */
.tab-premarket-wide { max-width: 1420px; }

.pm-layout {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}

#pm-sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  position: sticky;
  top: 4rem;
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
  flex-shrink: 0;
}

#pm-content { flex: 1; min-width: 0; }

.pm-sb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem 0.6rem;
  border-bottom: 1px solid var(--border);
  gap: 0.5rem;
}
.pm-sb-title { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.pm-sb-updated-badge { font-size: 0.72rem; color: var(--muted); }

.pm-sb-empty {
  padding: 1rem 0.9rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

#pm-sb-body { padding: 0.3rem 0; }

/* News feed items */
.pm-nf-item {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.pm-nf-item:last-child { border-bottom: none; }
.pm-nf-item:hover { background: rgba(79,142,247,0.04); }

.pm-nf-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}
.pm-nf-icon  { font-size: 0.85rem; }
.pm-nf-time  { font-size: 0.7rem; color: var(--muted); }
.pm-nf-src   { font-size: 0.68rem; color: var(--muted); background: var(--surface2); padding: 0.1rem 0.4rem; border-radius: 3px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pm-nf-ticker-row { margin-bottom: 0.2rem; }
.pm-nf-ticker {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--accent);
  cursor: pointer;
  letter-spacing: 0.3px;
}
.pm-nf-ticker:hover { text-decoration: underline; }

.pm-nf-sent {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.pm-nf-bull { background: rgba(46,204,113,0.15); color: var(--green); }
.pm-nf-bear { background: rgba(231,76,60,0.15);  color: var(--red); }

.pm-nf-price {
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 0.5rem;
  vertical-align: middle;
}
.pm-nf-price-up   { color: var(--green); }
.pm-nf-price-down { color: var(--red); }
.pm-nf-chg { font-weight: 400; opacity: 0.85; }

.pm-nf-title {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--muted);
}
.pm-nf-title a { color: inherit; text-decoration: none; }
.pm-nf-title a:hover { color: var(--text); }

/* Highlight card când se face click pe ticker din feed */
.sq-card.pm-card-highlighted { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Pre-Market Paper Bot ─────────────────────────────────────────────────── */
.pm-paper-buy-btn {
  width: 100%; padding: 0.5rem 0; border-radius: 7px; border: 1px solid rgba(79,142,247,0.5);
  background: rgba(79,142,247,0.12); color: #4f8ef7; font-size: 0.8rem; font-weight: 700;
  cursor: pointer; margin-top: 0.2rem; transition: background 0.15s, color 0.15s;
}
.pm-paper-buy-btn:hover { background: rgba(79,142,247,0.25); color: #7eb3ff; }
.pm-paper-buy-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pm-paper-buy-btn.in-position { background: rgba(231,76,60,0.12); color: #e74c3c; border-color: rgba(231,76,60,0.5); }

/* Positions table */
#pm-positions-wrap { margin-top: 2rem; }
#pm-positions-wrap .an-section-title { font-size: 0.95rem; font-weight: 800; color: var(--text); margin-bottom: 0.5rem; letter-spacing: 0.4px; text-transform: uppercase; }
.pm-pos-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.pm-pos-table th { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.pm-pos-table td { padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--border); }
.pm-pos-table tr:last-child td { border-bottom: none; }
.pm-pos-sl { color: var(--red); font-weight: 700; }
.pm-pos-tp { color: var(--green); font-weight: 700; }
.pm-pos-sell-btn {
  padding: 0.3rem 0.9rem; border-radius: 5px; border: 1px solid rgba(231,76,60,0.5);
  background: rgba(231,76,60,0.12); color: #e74c3c; font-size: 0.78rem; font-weight: 700;
  cursor: pointer; transition: background 0.15s;
}
.pm-pos-sell-btn:hover { background: rgba(231,76,60,0.25); }
.pm-pos-pnl-pos { color: var(--green); font-weight: 700; }
.pm-pos-pnl-neg { color: var(--red); font-weight: 700; }

/* ── Flux step cells — USDT live trades ── */
.flux-row { display: flex; gap: 1px; align-items: center; }
.sc-x { width: 11px; height: 11px; border-radius: 2px; flex-shrink: 0; cursor: default; }
.sc-x.pass    { background: #1a7f37; }
.sc-x.fail    { background: #da3633; }
.sc-x.warn    { background: #9e6a03; }
.sc-x.skip    { background: #21262d; }
.sc-x.success { background: #2ea043; box-shadow: 0 0 0 1px #3fb950; }
