/* ScalpScreener v2 — tokenii sunt citiți direct din CSS-ul ScalpX (computed styles),
   nu aproximați: fundal #0B0E16, accent #0F8BFD→#31C6F5, Manrope, Font Awesome 6. */

@import url('/static/vendor/manrope.css');
@import url('/static/vendor/fontawesome.css');

:root {
  /* suprafețe */
  --bg:        #0B0E16;
  --bg-1:      #0E1220;
  --bg-2:      #131826;
  --bg-3:      #1A2133;
  --panel:     #131826;
  --surface:   rgba(255, 255, 255, .04);
  --surface-2: rgba(255, 255, 255, .07);
  --border:    rgba(255, 255, 255, .06);
  --border-2:  #22293B;

  /* text */
  --text:       #E8EEF7;
  --text-2:     #DBE4F0;
  --text-dim:   #9FAEC4;
  --text-mute:  #7D8AA3;
  --text-faint: #66748C;
  /* Textul cel mai contrastant — pe teme închise e alb, pe cea deschisă aproape negru.
     Albul rămas direct în reguli e cel de pe umpluturi colorate: acolo nu se schimbă. */
  --text-strong: #fff;
  --switch-off:  #2a3446;
  --scroll-thumb:       #263248;
  --scroll-thumb-hover: #33405a;
  /* distanțele din terminalul de densități — verde/roz, mai palide decât semnalul */
  --dens-long:  #7FE0B4;
  --dens-short: #FF9FB0;
  /* bara de unelte plutește peste grafic: fundal semitransparent, în tonul temei */
  --overlay: rgba(11, 14, 22, .82);

  /* accente */
  --accent:    #0F8BFD;
  --accent-2:  #31C6F5;
  --grad:      linear-gradient(135deg, #0F8BFD 0%, #31C6F5 100%);
  --grad-soft: linear-gradient(135deg, rgba(15,139,253,.20) 0%, rgba(49,198,245,.13) 100%);
  --grad-bar:  linear-gradient(90deg, rgba(15,139,253,.45), rgba(49,198,245,.28));

  /* semnal */
  --up:    #16C784;
  --down:  #F6455F;
  --warn:  #E6B325;

  /* platformă (dashboard) — paleta violet din ScalpX */
  --p-bg:        #0D0B14;
  --p-container: #161222;
  --p-hover:     #221D31;
  --p-purple:    #9438D8;
  --p-blue:      #31A8E0;
  --p-pink:      #F61C5E;
  --p-border:    rgba(148, 56, 216, .25);

  /* grafic — citite de `chart.js`, ca tema să prindă și pânza, nu doar interfața */
  --chart-bg:        #0d1421;
  --chart-text:      #7d8799;
  --chart-grid:      rgba(38, 50, 71, .45);
  --chart-border:    #1e2836;
  --chart-crosshair: #4a5568;
  --level-line:      #969aa8;
  --level-label:     rgba(178, 182, 198, .9);

  --radius:    8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --nav-h:     46px;
  --bar-h:     44px;
  --sidebar-w: 64px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.4 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Font Awesome se randează ca text: forțăm dimensiunea din `icon(name, size)`. */
i.icon { display: inline-flex; align-items: center; justify-content: center; line-height: 1; flex: none; }
svg.chart-tool-svg { display: block; flex: none; }

button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
.icon { display: block; flex: none; }
.up { color: var(--up); }
.down { color: var(--down); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }

/* ================================================= shell + meniu lateral */

.shell { display: flex; height: 100%; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* Pe dashboard fundalul trece pe paleta violet a platformei. */
.shell.platform { background: var(--p-bg); }

.sidebar {
  width: var(--sidebar-w); flex: none; z-index: 50;
  display: flex; flex-direction: column;
  background: var(--p-bg); border-right: 1px solid rgba(255, 255, 255, .05);
  transition: width .22s cubic-bezier(.4, 0, .2, 1);
  overflow: hidden;
}
.sidebar:hover, .sidebar.pinned { width: 224px; }
/* În screener bara laterală dispare complet, ca la ScalpX — ecranul e integral pentru grafice.
   Întoarcerea se face din butonul-brand din bara de taburi. */
.shell:not(.platform) .sidebar { width: 0; border-right: 0; }

.sb-brand {
  display: flex; align-items: center; gap: 8px;
  height: 52px; padding: 0 18px; flex: none;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.sb-brand-mark { font-size: 18px; font-weight: 800; letter-spacing: -1px; white-space: nowrap; }
.sb-brand-s { color: var(--text-strong); }
.sb-brand-x { color: var(--p-pink); }
.sb-pin {
  margin-left: auto; color: var(--text-mute); padding: 5px; border-radius: 5px;
  opacity: 0; transition: opacity .2s;
}
.sidebar:hover .sb-pin { opacity: 1; }
.sb-pin:hover { background: var(--p-hover); color: var(--text-strong); }

.sb-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 0 16px; }
.sb-nav::-webkit-scrollbar { width: 0; }
.sb-group-title {
  padding: 12px 18px 5px; font-size: 9px; font-weight: 700; letter-spacing: .9px;
  color: var(--text-faint); text-transform: uppercase;
  opacity: 0; transition: opacity .18s; white-space: nowrap;
}
.sidebar:hover .sb-group-title, .sidebar.pinned .sb-group-title { opacity: 1; }

.sb-item {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 18px; color: var(--text-dim); text-decoration: none;
  white-space: nowrap; position: relative; transition: background .15s, color .15s;
}
.sb-item:hover { background: var(--p-hover); color: var(--text); }
.sb-item.active { color: var(--text-strong); background: rgba(148, 56, 216, .16); }
.sb-item.active::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; border-radius: 0 2px 2px 0; background: var(--p-purple);
}
.sb-item-icon { width: 16px; display: grid; place-items: center; flex: none; }
.sb-item.active .sb-item-icon { color: var(--p-purple); }
.sb-item-text {
  font-size: 13px; opacity: 0; transition: opacity .18s;
}
.sidebar:hover .sb-item-text, .sidebar.pinned .sb-item-text { opacity: 1; }
.sb-item.locked { opacity: .45; }
.sb-item-lock, .sb-item-badge { margin-left: auto; opacity: 0; transition: opacity .18s; }
.sidebar:hover .sb-item-lock, .sidebar:hover .sb-item-badge,
.sidebar.pinned .sb-item-lock, .sidebar.pinned .sb-item-badge { opacity: .6; }
.sb-item-badge {
  min-width: 17px; padding: 1px 5px; border-radius: 9px;
  background: var(--p-hover); color: var(--text-mute);
  font-size: 10px; text-align: center;
}
.sb-item-badge.on { background: var(--p-pink); color: #fff; opacity: 1 !important; }

/* ============================================== bara de taburi a screener-ului */

.screener-tabs {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px 0; flex: none;
  border-bottom: 1px solid var(--border); background: var(--bg);
}
.screener-tabs-list { display: flex; align-items: center; gap: 2px; flex: 1; overflow-x: auto; }
.screener-tabs-list::-webkit-scrollbar { height: 0; }
.tabs-home {
  display: flex; align-items: baseline; flex: none;
  padding: 6px 12px 6px 4px; margin-bottom: 8px;
  font-size: 17px; font-weight: 800; letter-spacing: -1px;
  opacity: .85; transition: opacity .16s;
}
.tabs-home:hover { opacity: 1; }
.tabs-home-s { color: var(--text-strong); }
.tabs-home-x { color: var(--p-pink); }
.screener-tabs-right { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; }

.build-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 11px; font-weight: 600; color: var(--text-dim); white-space: nowrap;
}
.build-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.build-ver { color: var(--text-faint); font-size: 10px; }

/* Taburile replică exact ScalpX: 13px/600, 9px 13px, colț rotunjit doar sus,
   activ = gradient albastru translucid + text alb. */
.topnav-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 13px; border-radius: 8px 8px 0 0;
  color: var(--text-dim); text-decoration: none; white-space: nowrap;
  font-size: 13px; font-weight: 600;
  border: 1px solid transparent; border-bottom: none;
  transition: background .2s, color .2s;
}
.topnav-tab:hover { background: var(--surface); color: var(--text); }
.topnav-tab.active {
  background: var(--grad-soft); color: var(--text-strong); border-color: var(--border);
}

.topnav-status {
  font-size: 10px; font-weight: 700; letter-spacing: .8px;
  color: var(--text-mute); padding: 4px 8px; border-radius: 4px;
  background: var(--surface); white-space: nowrap;
}
.topnav-status.live { color: var(--up); background: rgba(22, 199, 132, .12); }
/* Galben, nu verde: datele vin, dar prin interogare, nu prin stream. */
.topnav-status.polling { color: var(--warn); background: rgba(230, 179, 37, .12); }
/* Roșu, nu galben: nu doar că nu curge stream — nici interogarea nu merge. */
.topnav-status.throttled { color: var(--down); background: rgba(246, 69, 95, .12); }
.topnav-status.offline { color: var(--text-mute); }

.topnav-bell { position: relative; color: var(--text-dim); padding: 7px; border-radius: 6px; }
.topnav-bell:hover { background: var(--surface); color: var(--text); }
.topnav-badge {
  position: absolute; top: 1px; right: 1px;
  min-width: 14px; height: 14px; padding: 0 3px;
  border-radius: 7px; background: var(--bg-3); color: var(--text-mute);
  font-size: 9px; line-height: 14px; text-align: center; font-weight: 700;
}
.topnav-bell.has-unread .topnav-badge { background: var(--down); color: #fff; }

.view { flex: 1; min-height: 0; overflow: hidden; }

/* ============================================================ controale */

.search-box, .coins-search, .density-search, .lst-search {
  display: flex; align-items: center; gap: 9px;
  padding: 0 12px; height: 35px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-mute);
}
.search-input {
  background: none; border: 0; outline: none; width: 100%;
  color: var(--text-2); font-size: 13px;
}
.search-input::placeholder { color: var(--text-mute); }

.market-toggle { display: flex; background: var(--surface); border-radius: var(--radius); padding: 2px; }
.market-btn {
  padding: 6px 16px; border-radius: 6px; font-size: 13px; font-weight: 600;
  color: var(--text-dim); white-space: nowrap; transition: .18s;
}
.market-btn:hover { color: var(--text-strong); }
.market-btn.active { background: var(--accent); color: #fff; }

.tf-group { display: flex; gap: 2px; background: var(--surface); border-radius: var(--radius-sm); padding: 2px; }
.tf-btn {
  padding: 5px 9px; border-radius: 5px;
  font-size: 13px; font-weight: 600; color: var(--text-dim); transition: .18s;
}
.tf-btn:hover { color: var(--text-strong); }
.tf-btn.active { background: rgba(15, 139, 253, .32); color: var(--text-strong); }
/* Pe cardurile din grilă butoanele sunt mai mici, iar cel activ e gradient plin. */
.tf-group.compact { background: none; padding: 0; gap: 1px; }
.tf-group.compact .tf-btn {
  padding: 2px 7px; border-radius: 4px; font-size: 10px;
  background: var(--surface); color: var(--text-dim);
}
.tf-group.compact .tf-btn.active { background: var(--grad); color: #fff; }

.col-group { display: flex; gap: 2px; background: var(--surface); border-radius: var(--radius-sm); padding: 2px; }
.col-btn {
  width: 26px; height: 26px; border-radius: 5px;
  font-size: 13px; font-weight: 600; color: var(--text-dim);
}
.col-btn:hover { color: var(--text-strong); }
.col-btn.active { background: rgba(15, 139, 253, .32); color: var(--text-strong); }

.bar-sep { width: 1px; height: 20px; background: var(--border-2); flex: none; }
.bar-actions { display: flex; gap: 3px; }
.bar-icon-btn {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: var(--radius-sm); color: var(--text-dim);
  background: var(--surface); border: 1px solid var(--border); transition: .18s;
}
.bar-icon-btn:hover { background: var(--surface-2); color: var(--text-strong); }
.bar-icon-btn.active { background: rgba(15, 139, 253, .32); color: var(--text-strong); border-color: transparent; }

.dd { position: relative; }
.dd-button {
  display: flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 10px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 12px;
}
/* Montat pe <body> cu poziție fixă: barele cu `overflow-x: auto` l-ar tăia. */
.dd-menu {
  position: fixed; z-index: 200; padding: 4px;
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
  max-height: 60vh; overflow-y: auto;
}
.dd.open .dd-button { border-color: var(--accent); }
.dd-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 9px; border-radius: 5px; color: var(--text-dim); font-size: 12px; text-align: left;
}
.dd-item:hover { background: var(--bg-3); color: var(--text); }
.dd-item.active { color: var(--accent); }

.switch-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.switch-text { flex: 1; }
.switch-title { font-size: 13px; }
.switch-sub { font-size: 11px; color: var(--text-mute); margin-top: 3px; line-height: 1.45; }
.switch {
  width: 38px; height: 21px; border-radius: 11px; background: var(--switch-off);
  position: relative; flex: none; transition: background .16s;
}
.switch.on { background: var(--accent); }
.switch-knob {
  position: absolute; top: 2px; left: 2px; width: 17px; height: 17px;
  border-radius: 50%; background: #fff; transition: transform .16s;
}
.switch.on .switch-knob { transform: translateX(17px); }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--border-2);
  color: var(--text); font-size: 12px; cursor: pointer;
}
.btn:hover { background: var(--bg-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { border-color: #4a2028; color: var(--down); }

/* =============================================================== modale */

.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4,8,14,.72); backdrop-filter: blur(2px);
  display: grid; place-items: center; padding: 24px;
}
.modal {
  width: 100%; max-height: 88vh; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border-2);
  border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 13px; font-weight: 600; letter-spacing: .5px; }
.modal-close { color: var(--text-mute); padding: 4px; border-radius: 5px; }
.modal-close:hover { background: var(--bg-2); color: var(--text); }
.modal-body { padding: 16px 18px; overflow: auto; }
.modal-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 18px; border-top: 1px solid var(--border);
}
.confirm-text { color: var(--text-dim); line-height: 1.6; }

.toast-host { position: fixed; bottom: 18px; right: 18px; z-index: 200; display: grid; gap: 8px; }
.toast {
  padding: 10px 15px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--border-2);
  box-shadow: 0 8px 24px rgba(0,0,0,.45); font-size: 12px;
  animation: toast-in .2s ease;
}
.toast-success { border-left: 3px solid var(--up); }
.toast-error { border-left: 3px solid var(--down); }
.toast.out { opacity: 0; transform: translateY(6px); transition: .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ================================================================ grafic */

.chart-root { display: flex; flex-direction: column; height: 100%; position: relative; }
.chart-pane { position: relative; }
.chart-pane-main { flex: 1; min-height: 60px; }
.chart-panes { display: flex; flex-direction: column; }
.chart-pane-sub { border-top: 1px solid var(--border); }
/* Decalat spre dreapta ca să nu intre sub bara verticală de unelte. */
.chart-pane-label {
  position: absolute; top: 3px; left: 40px; z-index: 3;
  font-size: 9px; color: var(--text-mute); pointer-events: none; letter-spacing: .4px;
}
.chart-levels-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.chart-draw-layer { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
/* Stratul de măsurare stă peste desene, dar nu prinde niciodată evenimente:
   ascultătorii sunt pe container, ca să nu blocheze panoramarea. */
.chart-measure-layer { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
/* „Объём" stă la începutul benzii de volum (ultimii ~22% din înălțime), ca la ScalpX. */
.chart-vol-label {
  position: absolute; left: 8px; top: 78%; z-index: 3;
  font-size: 9px; color: var(--text-faint); pointer-events: none;
}
/* Pe panourile mari bara de unelte ocupă marginea stângă — mutăm eticheta lângă ea. */
.chart-panel .chart-vol-label { left: 40px; }
.card-error {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--text-mute); font-size: 11px;
}

/* bara verticală de unelte */
/* Bara verticală: strip îngust lipit de marginea stângă a graficului, ca la ScalpX. */
.lwc-tb {
  position: absolute; left: 0; top: 78px; z-index: 20;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 3px;
  background: var(--overlay); backdrop-filter: blur(3px);
  border: 1px solid var(--border); border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.lwc-tb.collapsed > *:not(.lwc-tb-toggle) { display: none; }
.lwc-tb.collapsed .lwc-tb-toggle .icon { transform: rotate(0); }
.lwc-tb-toggle .icon { transform: rotate(180deg); }
.lwc-tb-btn {
  width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: 4px; color: var(--text-dim);
  border: 1px solid transparent; transition: .14s;
}
.lwc-tb-btn:hover { background: var(--surface); color: var(--text-strong); }
.lwc-tb-btn.active {
  background: rgba(15, 139, 253, .28); color: var(--text-strong); border-color: rgba(15, 139, 253, .5);
}
/* Culorile stau într-o singură coloană de bulinuțe. */
.lwc-tb-colors {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 6px 0; margin: 2px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.lwc-tb-color { width: 11px; height: 11px; border-radius: 50%; opacity: .5; transition: .14s; }
.lwc-tb-color:hover { opacity: .85; transform: scale(1.15); }
.lwc-tb-color.active {
  opacity: 1; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px rgba(255, 255, 255, .55);
}

.lwc-tb-popup {
  position: fixed; z-index: 120; min-width: 190px; padding: 10px;
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.55);
}
.lwc-pop-title { font-size: 10px; color: var(--text-mute); letter-spacing: .5px; margin: 6px 0 4px; }
.lwc-pop-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-dim); }
.lwc-pop-row input[type=range] { flex: 1; accent-color: var(--accent); }
.lwc-pop-value { width: 26px; text-align: right; color: var(--text); }
.lwc-pop-input {
  width: 100%; padding: 6px 8px; background: var(--bg-1);
  border: 1px solid var(--border); border-radius: 5px; font-size: 11px; outline: none;
}
.lwc-pop-group { display: flex; gap: 4px; }
.lwc-pop-btn {
  flex: 1; padding: 5px; border-radius: 5px; background: var(--bg-1);
  color: var(--text-dim); font-size: 11px;
}
.lwc-pop-btn.active { background: var(--accent); color: #fff; }

/* panoul mare de grafic */
.chart-panel { display: flex; flex-direction: column; height: 100%; position: relative; min-width: 0; }
.cp-head {
  display: flex; align-items: center; gap: 5px;
  height: 54px; padding: 8px 14px; flex: none;
  border-bottom: 1px solid var(--border-2); background: var(--bg-1);
}
.cp-symbol { display: flex; align-items: center; gap: 8px; margin-right: 6px; cursor: pointer; }
.cp-symbol-badge {
  width: 26px; height: 26px; border-radius: 50%; background: var(--grad);
  display: grid; place-items: center; font-size: 9px; font-weight: 800; color: #fff;
}
.cp-symbol-text { font-weight: 700; font-size: 15px; color: var(--text-2); letter-spacing: -.2px; }
.cp-symbol-mkt { font-size: 10px; color: var(--text-mute); }
.cp-head-spacer { flex: 1; }
.cp-head-sep { width: 1px; height: 20px; background: var(--border-2); margin: 0 3px; }
.cp-btn {
  width: 32px; height: 32px; display: grid; place-items: center; flex: none;
  border-radius: var(--radius-sm); color: var(--text-dim);
  background: var(--surface); transition: .15s;
}
.cp-btn:hover { background: var(--surface-2); color: var(--text-strong); }
.cp-btn.on { color: var(--warn); }
.cp-btn-wide {
  width: auto; display: flex; gap: 7px; padding: 0 12px;
  font-size: 12px; font-weight: 600; color: var(--text-dim);
}
.cp-btn-wide:hover { color: var(--text-strong); }
.cp-tech { border-bottom: 1px solid var(--border); background: var(--bg-1); flex: none; }
.chart-settings { display: grid; }
.tf-custom { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tf-custom .btn { justify-content: center; }
.cp-body { flex: 1; min-height: 0; position: relative; }

.techdata {
  position: relative; display: flex; align-items: center; gap: 16px;
  padding: 5px 26px 5px 12px; overflow-x: auto;
}
.techdata::-webkit-scrollbar { height: 0; }
.td-cell { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.td-value {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.td-strong .td-value { color: var(--text); font-weight: 700; }
.td-label { font-size: 9px; color: var(--text-mute); }
/* Modul compact: doar cifre, ca în ScalpX pe ecrane înguste. */
.techdata.compact { gap: 14px; }
.techdata.compact .td-label { display: none; }
.techdata-toggle {
  position: absolute; top: 2px; right: 4px;
  width: 14px; height: 14px; display: grid; place-items: center;
  color: var(--text-mute); border-radius: 3px;
}
.techdata-toggle:hover { color: var(--text-strong); }

.chart-modal-overlay {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(4,8,14,.8); padding: 20px;
}
.chart-modal {
  position: relative; height: 100%;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: 12px; overflow: hidden;
}
.chart-modal-close {
  position: absolute; top: 10px; right: 12px; z-index: 30;
  color: var(--text-dim); padding: 5px; border-radius: 5px; background: var(--bg-2);
}
.chart-modal-body { height: 100%; }

/* ================================================================= grilă */

.grid-section { display: flex; flex-direction: column; height: 100%; }
.screener-bar {
  display: flex; align-items: center; gap: 10px;
  height: var(--bar-h); padding: 0 12px; flex: none;
  background: var(--bg-1); border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.screener-bar::-webkit-scrollbar { height: 0; }
.screener-bar .search-box { width: 190px; flex: none; }

.sfs { display: flex; align-items: center; background: var(--surface); border-radius: var(--radius-sm); }
.sfs-arrow, .sfs-caret {
  width: 26px; height: 30px; display: grid; place-items: center;
  color: var(--text-mute); border-radius: 5px;
}
.sfs-arrow:hover, .sfs-caret:hover { color: var(--text-strong); }
.sfs-caret.open { color: var(--accent); }
.sfs-caret.open .icon { transform: rotate(180deg); }
.sfs-current {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--text-strong);
  min-width: 150px; justify-content: center;
}
.sfs-icon { display: grid; place-items: center; color: var(--accent); }

/* Lista de filtre: un singur popup ancorat de buton, nu un panou sub bară. */
.sfs-menu {
  position: fixed; z-index: 200; min-width: 250px; padding: 6px;
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-lg); box-shadow: 0 14px 40px rgba(0, 0, 0, .6);
}
.sfs-item { display: flex; align-items: center; border-radius: var(--radius-sm); }
.sfs-item:hover { background: var(--surface); }
.sfs-item.active { background: var(--grad-soft); }
.sfs-item-main {
  flex: 1; display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; color: var(--text-dim); font-size: 13px; font-weight: 600; text-align: left;
}
.sfs-item:hover .sfs-item-main { color: var(--text); }
.sfs-item.active .sfs-item-main { color: var(--text-strong); }
.sfs-item-btn {
  width: 24px; height: 24px; display: grid; place-items: center;
  color: var(--text-mute); border-radius: 4px; opacity: 0; transition: opacity .14s;
}
.sfs-item:hover .sfs-item-btn { opacity: 1; }
.sfs-item-btn:hover { background: var(--surface-2); color: var(--text-strong); }
.sfs-item-btn.danger:hover { color: var(--down); }
.sfs-create {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  margin-top: 6px; padding: 10px; border-top: 1px solid var(--border);
  color: var(--accent); font-size: 13px; font-weight: 600;
}
.sfs-create:hover { background: var(--surface); }

.grid-area { flex: 1; overflow-y: auto; padding: 8px; position: relative; }
.chart-grid { display: grid; gap: 8px; }
/* Modul „Страницы": două rânduri umplu exact înălțimea ecranului. */
.chart-grid.pages .grid-card { height: calc((100vh - var(--bar-h) - 74px) / 2); }
.grid-empty {
  display: none; position: absolute; inset: 0;
  place-items: center; color: var(--text-mute); font-size: 12px;
}

.grid-card {
  display: flex; flex-direction: column;
  height: 300px; overflow: hidden;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .16s;
}
.grid-card:hover { border-color: var(--border-2); }
.grid-card:fullscreen { height: 100%; border-radius: 0; }
.card-head { display: flex; align-items: center; gap: 6px; padding: 6px 10px 2px; flex: none; }
.card-ticker { font-weight: 700; font-size: 13px; letter-spacing: -.2px; }
.card-mkt { font-size: 9px; color: var(--text-mute); }
.card-head-spacer { flex: 1; }
.card-btn {
  width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: 4px; color: var(--text-mute); transition: .15s;
}
.card-btn:hover { color: var(--text-strong); background: var(--surface); }
.card-btn.on { color: var(--warn); }
.card-metrics {
  display: flex; align-items: center; gap: 11px;
  padding: 2px 10px 5px; font-size: 10.5px; flex: none;
  font-variant-numeric: tabular-nums;
}
.cm { color: var(--text-dim); white-space: nowrap; }
.cm-vol { display: flex; align-items: center; gap: 3px; color: var(--text); font-weight: 700; }
.card-chart { flex: 1; min-height: 0; position: relative; }

/* ====================================================== modal de filtru */

.sfm { display: grid; grid-template-columns: 1fr 260px; gap: 20px; }
.sfm-left { min-width: 0; }
.sfm-name-row { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.sfm-name-icon {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  background: var(--bg-2); display: grid; place-items: center; color: var(--accent);
}
.sfm-name-input {
  flex: 1; padding: 9px 12px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); outline: none;
}
.sfm-name-input:focus { border-color: var(--accent); }

.sfm-section { margin-bottom: 18px; }
.sfm-section-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.sfm-section-title { font-size: 12px; font-weight: 600; }
.sfm-section-hint { font-size: 10px; color: var(--text-mute); }

.sfm-conditions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.sfm-cond { padding: 8px 10px; background: var(--bg-2); border-radius: var(--radius-sm); }
.sfm-cond-head { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.sfm-cond-head input { accent-color: var(--accent); }
.sfm-cond-label { font-size: 12px; flex: 1; }
.sfm-cond-help {
  width: 14px; height: 14px; border-radius: 50%; background: var(--bg-3);
  color: var(--text-mute); font-size: 9px; display: grid; place-items: center; cursor: help;
}
.sfm-cond-inputs { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.sfm-cond-dash { color: var(--text-mute); }
.sfm-cond-unit { color: var(--text-mute); font-size: 11px; }

.sfm-input {
  padding: 7px 10px; background: var(--bg-1);
  border: 1px solid var(--border); border-radius: 5px; color: var(--text);
  outline: none; width: 100%;
}
.sfm-input:focus { border-color: var(--accent); }
.sfm-input-sm { width: 84px; padding: 5px 8px; font-size: 11px; }
.sfm-select {
  padding: 7px 10px; background: var(--bg-1);
  border: 1px solid var(--border); border-radius: 5px; color: var(--text); outline: none;
}

.sfm-display { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.sfm-field-label { font-size: 9px; color: var(--text-mute); letter-spacing: .6px; margin-bottom: 6px; }
.sfm-icons { display: flex; flex-wrap: wrap; gap: 4px; }
.sfm-icon {
  width: 26px; height: 26px; border-radius: 5px; background: var(--bg-2);
  display: grid; place-items: center; color: var(--text-dim);
}
.sfm-icon.active { background: var(--accent); color: #fff; }
.sfm-blacklist { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.sfm-chip {
  display: flex; align-items: center; gap: 4px;
  padding: 3px 5px 3px 9px; background: var(--bg-2); border-radius: 12px; font-size: 11px;
}
.sfm-chip-x { color: var(--text-mute); display: grid; place-items: center; }

.sfm-right {
  background: var(--bg-2); border-radius: var(--radius); padding: 14px;
  display: flex; flex-direction: column; min-height: 0;
}
.sfm-preview-title { font-size: 9px; color: var(--text-mute); letter-spacing: .6px; margin-bottom: 10px; }
.sfm-preview { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.sfm-preview-count { display: flex; align-items: baseline; gap: 7px; }
.sfm-preview-num { font-size: 30px; font-weight: 700; color: var(--accent); }
.sfm-preview-word { font-size: 11px; color: var(--text-dim); }
.sfm-preview-note { font-size: 10px; color: var(--text-mute); margin: 4px 0 10px; line-height: 1.4; }
.sfm-preview-list { overflow-y: auto; display: grid; gap: 2px; }
.sfm-preview-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; font-size: 11px; padding: 3px 0; }
.sfm-pr-ticker { font-weight: 600; }
.sfm-pr-vol { color: var(--text-mute); }
.sfm-preview-more, .sfm-preview-empty { font-size: 10px; color: var(--text-mute); padding-top: 6px; }

/* ==================================================== список наблюдения */

.coins-section { display: flex; height: 100%; }
.coins-chart { flex: 1; min-width: 0; }
.coins-resizer {
  width: 4px; flex: none; cursor: col-resize;
  background: transparent; transition: background .15s;
}
.coins-resizer:hover { background: var(--accent); }
.coins-sidebar {
  width: 400px; flex: none; display: flex; flex-direction: column;
  background: var(--bg-1); border-left: 1px solid var(--border-2);
  transition: width .18s;
}
.coins-sidebar.collapsed { width: 34px; }
.coins-sidebar.collapsed > *:not(.coins-foot) { display: none; }
.coins-sidebar.collapsed .coins-collapse span { display: none; }

.coins-tabs { display: flex; border-bottom: 1px solid var(--border); }
.coins-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 6px; font-size: 12px; font-weight: 600; color: var(--text-dim);
  border-bottom: 2px solid transparent; transition: .16s;
}
.coins-tab:hover { color: var(--text-strong); }
.coins-tab.active { color: var(--text-strong); border-bottom-color: var(--accent); background: var(--grad-soft); }
.coins-search { margin: 6px 8px; }
.coins-sort {
  display: flex; align-items: center; gap: 6px;
  margin: 0 8px 6px; padding: 5px 8px 5px 10px;
  background: var(--surface); border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 600; color: var(--text-mute);
}
.coins-sort-prefix { letter-spacing: .5px; }
.coins-sort-label { flex: 1; text-align: center; color: var(--text-2); }
.coins-sort-arrow, .coins-sort-dir {
  width: 22px; height: 22px; display: grid; place-items: center;
  color: var(--text-mute); border-radius: 4px; transition: .15s;
}
.coins-sort-arrow:hover, .coins-sort-dir:hover { color: var(--text-strong); background: var(--surface-2); }
.coins-sort-dir.asc .icon { transform: rotate(180deg); }

.coins-list { flex: 1; overflow-y: auto; }
/* Grila și dimensiunile sunt cele măsurate în ScalpX: 20px | flexibil | 78px, rând ~56px. */
.coin-row {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) 78px;
  align-items: center; gap: 7px;
  padding: 7px 14px 7px 9px; cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  border-left: 2px solid transparent;
}
.coin-row:hover { background: var(--surface); }
.coin-row.active { background: var(--grad-soft); border-left-color: var(--accent); }
.coin-bookmark { color: var(--text-mute); opacity: .35; padding: 2px; transition: .15s; }
.coin-row:hover .coin-bookmark { opacity: .8; }
.coin-bookmark.on { color: var(--warn); opacity: 1; }
.coin-main { min-width: 0; }
.coin-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.coin-name { font-weight: 600; font-size: 12.5px; color: var(--text); }
.coin-change { font-size: 12.5px; font-weight: 600; }
.coin-bottom { margin-top: 4px; }

/* Pilula de volum: fundal discret, umplere în gradient albastru sub text. */
.coin-volume {
  position: relative; display: inline-flex; align-items: center; justify-content: flex-end;
  width: 72px; height: 15px; padding: 0 5px; border-radius: 4px;
  background: var(--surface); color: var(--text-2);
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  overflow: hidden; z-index: 0;
}
.coin-volume::before {
  content: ''; position: absolute; inset: 0 auto 0 0;
  width: var(--vol-fill, 0%); background: var(--grad-bar);
  z-index: -1; transition: width .35s ease;
}
.coin-spark { display: block; height: 22px; }
.coins-empty { padding: 26px 10px; text-align: center; color: var(--text-mute); font-size: 11px; }
.coins-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px; border-top: 1px solid var(--border);
}
.coins-count { font-size: 10px; color: var(--text-mute); }
.coins-collapse {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--text-dim); padding: 4px 8px;
  background: var(--bg-2); border-radius: 12px;
}

/* ========================================================= радар объёмов */

.radar-section { display: flex; height: 100%; }
.radar-chart { flex: 1; min-width: 0; }
.radar-panel {
  width: 360px; flex: none; display: flex; flex-direction: column; min-width: 0;
  background: var(--bg-1); border-left: 1px solid var(--border);
}
.radar-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 4px; color: var(--accent); }
.radar-title { font-size: 14px; font-weight: 600; color: var(--text); flex: 1; }
.radar-gear { color: var(--text-mute); padding: 4px; border-radius: 5px; }
.radar-gear:hover { color: var(--text); background: var(--bg-2); }
.radar-sub { font-size: 10px; color: var(--text-mute); padding: 0 12px 10px; }
.radar-tabs { display: flex; gap: 3px; padding: 0 10px 8px; }
.radar-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 4px; border-radius: var(--radius-sm);
  background: var(--bg-2); color: var(--text-dim); font-size: 11px;
}
.radar-tab.active { background: var(--accent); color: #fff; }
.radar-meta { display: flex; flex-direction: column; gap: 2px; padding: 0 12px 8px; }
.radar-updated, .radar-shown { font-size: 10px; color: var(--text-mute); }
/* Flex-wrap, nu grid: pe grid rândurile se rezolvau la înălțimea primului rând al
   cardului (17px în loc de 104px) și restul conținutului rămânea tăiat. */
.radar-cards {
  flex: 1; overflow-y: auto; padding: 0 10px 10px;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 7px;
}
/* Fără `overflow: hidden` aici: taie cardul la înălțimea primului rând.
   `min-width: 0` e de ajuns ca sparkline-ul să nu lățească coloana. */
.radar-card {
  flex: 1 1 calc(50% - 4px); min-width: 0; max-width: calc(50% - 4px);
  padding: 8px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid transparent; cursor: pointer;
}
.radar-card-spark svg { width: 100%; display: block; }
.radar-card:hover { border-color: var(--border-2); }
.radar-card.active { border-color: var(--accent); background: #14243d; }
.radar-card-top { display: flex; align-items: center; gap: 3px; }
.radar-card-mark { color: var(--text-mute); opacity: .4; padding: 1px; }
.radar-card-mark.on { color: var(--warn); opacity: 1; }
.radar-card-ticker { font-weight: 600; font-size: 12px; }
.radar-card-quote { font-size: 8px; color: var(--text-mute); flex: 1; }
.radar-card-mult {
  padding: 1px 6px; border-radius: 9px; background: #1d3a63;
  color: var(--accent-2); font-size: 10px; font-weight: 700;
}
.radar-card-spark { margin: 6px 0 4px; }
.radar-card-bottom { display: flex; justify-content: space-between; font-size: 10px; }
.radar-card-vol { color: var(--text-mute); }
.radar-empty { flex: 1 1 100%; max-width: 100%; padding: 26px 10px; text-align: center; color: var(--text-mute); font-size: 11px; }
.radar-settings { display: grid; gap: 12px; }
.radar-set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; }

/* ==================================================== терминал плотностей */

.density-section { display: flex; flex-direction: column; height: 100%; }
.density-bar {
  display: flex; align-items: center; gap: 14px;
  height: var(--bar-h); padding: 0 12px; flex: none;
  background: var(--bg-1); border-bottom: 1px solid var(--border); overflow-x: auto;
}
.density-bar::-webkit-scrollbar { height: 0; }
.density-check { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.density-check input { accent-color: var(--accent); }
.density-field { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.density-field-label { font-size: 9px; color: var(--text-mute); letter-spacing: .5px; }
.density-field-suffix { font-size: 10px; color: var(--text-mute); }
.density-input {
  width: 78px; padding: 5px 8px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 5px; color: var(--text);
  font-size: 11px; outline: none;
}
.density-range { width: 110px; accent-color: var(--accent); }
.density-count { font-size: 10px; color: var(--text-mute); margin-left: auto; white-space: nowrap; }

.density-body { flex: 1; display: flex; min-height: 0; }
.density-chart { flex: 1; min-width: 0; }
.density-panel {
  width: 400px; flex: none; display: flex; flex-direction: column;
  background: var(--bg-1); border-left: 1px solid var(--border);
}
/* Chip-uri independente, nu taburi: se pot combina mai multe deodată.
   «Следовать» e mod, nu filtru — de aceea are gradient verde, ca la ei. */
.dterm-chips { display: flex; align-items: stretch; flex: none; border-bottom: 1px solid var(--border-2); }
.dterm-chip {
  flex: 1 1 0; min-width: 0; padding: 7px 4px;
  color: var(--text-mute); font-size: 13px; font-weight: 600; white-space: nowrap; text-align: center;
  transition: color .18s, background .18s, box-shadow .18s;
}
.dterm-chip:hover:not(.is-on) { background: rgba(15, 139, 253, .12); color: var(--text); }
.dterm-chip.is-on {
  background: var(--grad); color: #fff; box-shadow: 0 2px 12px rgba(15, 139, 253, .4);
}
.dterm-chip.is-mode { flex: 0 0 auto; padding: 7px 12px; border-left: 1px solid var(--border-2); }
.dterm-chip.is-mode.is-on {
  background: linear-gradient(135deg, #22A06B 0%, #3FD6A0 100%);
  box-shadow: 0 2px 12px rgba(63, 168, 127, .4);
}

.density-search { margin: 8px; }
.density-head, .dpanel-row {
  display: grid; grid-template-columns: 22px 1fr 70px 62px 48px 50px;
  align-items: center; gap: 8px; padding: 0 8px;
}
.density-head { height: 26px; border-bottom: 1px solid var(--border); padding: 0 10px; }
.density-head .density-th:first-child { grid-column: 2; }
.density-th {
  display: flex; align-items: center; gap: 3px;
  font-size: 9px; color: var(--text-mute); letter-spacing: .4px;
}
.density-th .icon { opacity: 0; }
.density-th.sorted { color: var(--text); }
.density-th.sorted .icon { opacity: .8; }
.density-th.sorted.desc .icon { transform: rotate(180deg); }

.density-rows { flex: 1; overflow-y: auto; padding: 4px; display: grid; gap: 2px; align-content: start; }

/* Cumpărare = verde, vânzare = roșu: bordură groasă la stânga plus un gradient care se
   stinge spre dreapta — exact ca `.dpanel-row.is-long/.is-short` la ei. */
.dpanel-row {
  height: 30px; cursor: pointer; border-radius: 6px;
  border: 1px solid transparent; border-left-width: 3px;
  transition: background .14s, border-color .14s;
}
.dpanel-row.is-long {
  border-left-color: #3FA87F;
  background: linear-gradient(90deg, rgba(63, 168, 127, .20), rgba(63, 168, 127, .05));
}
.dpanel-row.is-short {
  border-left-color: #C4596E;
  background: linear-gradient(90deg, rgba(196, 89, 110, .20), rgba(196, 89, 110, .05));
}
.dpanel-row.is-long:hover {
  background: linear-gradient(90deg, rgba(63, 168, 127, .32), rgba(63, 168, 127, .10));
}
.dpanel-row.is-short:hover {
  background: linear-gradient(90deg, rgba(196, 89, 110, .32), rgba(196, 89, 110, .10));
}
.dpanel-row.is-selected {
  border-color: rgba(15, 139, 253, .75);
  box-shadow: inset 0 0 0 1px rgba(15, 139, 253, .25);
}
/* Punct albastru pe zidurile abia apărute. */
.dpanel-row.is-fresh .dpc-ticker::before {
  content: ''; display: inline-block; width: 5px; height: 5px;
  margin-right: 5px; vertical-align: middle; border-radius: 50%;
  background: #4DB4FF; box-shadow: 0 0 6px rgba(15, 139, 253, .8);
}

.dpc-fav {
  display: inline-flex; align-items: center; justify-content: center; width: 16px;
  color: var(--text-faint); transition: color .14s;
}
.dpanel-row:hover .dpc-fav { color: var(--text-dim); }
.dpc-fav.is-on, .dpanel-row:hover .dpc-fav.is-on { color: #F2C14E; }
.dpc-ticker {
  font-size: 12px; font-weight: 700; color: var(--text); letter-spacing: .01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dpc-amount {
  font-size: 12px; font-weight: 600; color: var(--text-2); text-align: right;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.dpc-dist { text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; }
.is-long .dpc-dist { color: var(--dens-long); }
.is-short .dpc-dist { color: var(--dens-short); }
.dpc-age, .dpc-share {
  text-align: right; font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums;
}
.dpc-age.is-old { color: var(--dens-long); }
.density-empty { padding: 26px 10px; text-align: center; color: var(--text-mute); font-size: 11px; }

/* ==================================================== календарь листингов */

.listings-section { height: 100%; overflow-y: auto; padding: 16px; }
.lst-card {
  max-width: 1400px; margin: 0 auto; padding: 18px;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px;
}
.lst-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lst-title { margin: 0; font-size: 19px; font-weight: 600; }
.lst-counts { display: flex; gap: 10px; }
.lst-count { font-size: 10px; color: var(--text-mute); }
.lst-filters { display: flex; align-items: center; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.lst-search { width: 210px; }
.lst-pills { display: flex; gap: 3px; background: var(--bg-2); border-radius: var(--radius-sm); padding: 2px; }
.lst-pill { padding: 5px 12px; border-radius: 5px; font-size: 11px; color: var(--text-dim); }
.lst-pill.active { background: var(--accent); color: #fff; }
.lst-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.lst-nav-btn { padding: 6px; border-radius: 5px; background: var(--bg-2); color: var(--text-dim); }
.lst-month { font-size: 15px; font-weight: 600; min-width: 150px; text-align: center; }
.lst-today { padding: 5px 12px; border-radius: 5px; background: var(--accent); color: #fff; font-size: 11px; }
.lst-legend { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 10px; color: var(--text-mute); }
.lst-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-mute); }
.lst-dot.upcoming { background: var(--accent); }

.lst-weekdays, .lst-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.lst-weekdays span { font-size: 9px; color: var(--text-mute); letter-spacing: .6px; padding: 4px 6px; }
.lst-day {
  min-height: 110px; padding: 7px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid transparent;
}
.lst-day.outside { opacity: .38; }
.lst-day.today { border-color: var(--accent); }
.lst-day-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.lst-day-num { font-size: 12px; font-weight: 600; }
.lst-day-count { font-size: 9px; color: var(--text-mute); }
.lst-item {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 5px; margin-bottom: 3px; border-radius: 5px; background: var(--bg-1);
}
.lst-item.upcoming { box-shadow: inset 2px 0 0 var(--accent); }
.lst-item-ex {
  width: 17px; height: 17px; border-radius: 4px; background: #22304a;
  display: grid; place-items: center; font-size: 7px; font-weight: 700; color: var(--text-dim); flex: none;
}
.lst-item-body { min-width: 0; }
.lst-item-sym { display: block; font-size: 10px; font-weight: 600; }
.lst-item-meta {
  display: block; font-size: 8px; color: var(--text-mute);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lst-more { font-size: 9px; color: var(--accent); padding: 2px 0; }
.lst-hint { grid-column: 1 / -1; padding: 22px; text-align: center; color: var(--text-mute); font-size: 11px; }

/* ============================================================= настройки */

.settings-section { height: 100%; overflow-y: auto; padding: 18px; }
.set-tabs {
  display: flex; gap: 6px; max-width: 900px; margin: 0 auto 16px;
  padding: 6px; background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px;
}
.set-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px; border-radius: var(--radius); color: var(--text-dim); font-size: 12px;
}
.set-tab.active { background: var(--accent); color: #fff; }
.set-body { max-width: 900px; margin: 0 auto; display: grid; gap: 14px; }
.set-card { padding: 18px; background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; }
.set-card-head { display: flex; align-items: center; gap: 9px; color: var(--accent); }
.set-card-head h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--text); }
.set-card-sub { font-size: 11px; color: var(--text-mute); line-height: 1.6; margin: 8px 0 14px; }
.set-link-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; margin-bottom: 12px;
  background: var(--bg-2); border-radius: var(--radius); font-size: 12px;
}
.set-status { width: 8px; height: 8px; border-radius: 50%; background: var(--text-mute); }
.set-status.on { background: var(--up); }
.set-link-row .btn { margin-left: auto; text-decoration: none; }
.set-note { margin-left: auto; font-size: 10px; color: var(--text-mute); max-width: 320px; text-align: right; }
/* --- тренажёр --- */
.train-section { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.train-stats { margin-left: auto; display: flex; gap: 12px; }
.train-stat { font-size: 11px; color: var(--text-mute); }
.train-stat.hot { color: var(--warn); font-weight: 700; }
.train-chart { flex: 1; min-height: 0; margin: 12px 18px; border-radius: var(--radius); overflow: hidden; }
.train-bar {
  display: flex; align-items: center; gap: 10px; flex: none;
  padding: 12px 18px; border-top: 1px solid var(--border);
}
.train-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 22px; border-radius: var(--radius);
  font-family: inherit; font-size: 13px; font-weight: 800; letter-spacing: .4px; cursor: pointer;
  border: 1px solid transparent;
}
.train-btn.long { background: rgba(22, 199, 132, .16); color: var(--up); border-color: var(--up); }
.train-btn.short { background: rgba(246, 69, 95, .16); color: var(--down); border-color: var(--down); }
.train-btn:disabled { opacity: .35; cursor: default; }
.train-speed-lbl { margin-left: 10px; font-size: 10px; color: var(--text-faint); }
.train-speeds { display: flex; gap: 3px; }
.train-speed {
  padding: 4px 9px; border-radius: 5px; background: var(--surface);
  color: var(--text-mute); font-family: inherit; font-size: 10px; font-weight: 700; cursor: pointer;
}
.train-speed.active { background: var(--accent); color: #fff; }
.train-verdict { margin-left: auto; font-size: 13px; }
.train-verdict-ok { color: var(--up); }
.train-verdict-bad { color: var(--down); }
.train-verdict-flat { color: var(--text-mute); }

/* --- проверенная статистика --- */
.ver-card {
  display: grid; gap: 10px; padding: 16px;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: var(--radius);
}
.ver-head { display: flex; align-items: center; gap: 9px; color: var(--up); }
.ver-head h3 { margin: 0; font-size: 14px; color: var(--text); }
.ver-sub { margin-left: auto; font-size: 10px; color: var(--text-mute); }
.ver-key {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 11px; border-radius: var(--radius); background: var(--bg-2); font-size: 12px;
}
.ver-key-ex { font-weight: 700; text-transform: capitalize; }
.ver-key-hint { color: var(--text-mute); font-family: monospace; }
.ver-key-ok { margin-left: auto; font-size: 10px; color: var(--up); }
.ver-key-err { margin-left: auto; font-size: 10px; color: var(--down); }
.ver-add { display: flex; gap: 8px; flex-wrap: wrap; }
.ver-warn {
  display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px;
  border-radius: var(--radius); background: rgba(230, 179, 37, .12);
  color: var(--warn); font-size: 11.5px; line-height: 1.5;
}

/* --- отчёты и поддержка --- */
.topnav-bug {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 5px;
  background: var(--surface); color: var(--text-mute);
  font-family: inherit; font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.topnav-bug:hover { background: var(--surface-2); color: var(--warn); }
.reports-hint { font-size: 11px; color: var(--text-mute); }
.rep-nums { display: flex; gap: 8px; }
.rep-num {
  flex: 1; display: grid; gap: 2px; padding: 9px 12px;
  background: var(--bg-2); border-radius: var(--radius);
}
.rep-num-v { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rep-num.up .rep-num-v { color: var(--up); }
.rep-num.down .rep-num-v { color: var(--down); }
.rep-num-k { font-size: 10px; color: var(--text-mute); }
.rep-shot:not(:empty) { margin-top: 2px; }
.rep-attach { justify-self: start; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.rep-exists {
  padding: 8px 11px; border-radius: var(--radius);
  background: var(--grad-soft); color: var(--accent-2); font-size: 11px;
}

/* --- блок пользователя внизу меню --- */
.sb-footer { margin-top: auto; padding: 8px; border-top: 1px solid var(--p-border); }
.sb-login, .sb-user-main {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px; border-radius: var(--radius-sm);
  background: none; color: var(--text-dim); font-family: inherit; cursor: pointer; text-align: left;
}
.sb-login:hover, .sb-user-main:hover { background: var(--p-hover); color: var(--text-strong); }
.sb-user { display: flex; align-items: center; gap: 4px; }
.sb-user-main { min-width: 0; }
.sb-user-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #0B0E16;
}
.sb-user-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sb-user-nick { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user-rank { font-size: 10px; color: var(--text-mute); white-space: nowrap; }
.sb-logout { flex: none; padding: 7px; border-radius: 5px; color: var(--text-mute); cursor: pointer; }
.sb-logout:hover { background: var(--p-hover); color: var(--down); }
/* Meniul strâns arată doar iconițe — textul apare la desfășurare, ca restul rândurilor. */
.sidebar:not(.pinned):not(:hover) .sb-user-txt,
.sidebar:not(.pinned):not(:hover) .sb-logout,
.sidebar:not(.pinned):not(:hover) .sb-login .sb-item-text { display: none; }

/* --- страница для незалогиненных --- */
.guest { display: grid; place-items: center; min-height: 100%; padding: 40px 20px; }
.guest-card {
  width: min(560px, 100%); display: grid; gap: 14px; padding: 30px;
  background: var(--p-container); border: 1px solid var(--p-border); border-radius: var(--radius-lg);
}
.guest-mark { font-size: 26px; font-weight: 800; letter-spacing: -1px; }
.guest-title { margin: 0; font-size: 22px; }
.guest-sub { margin: 0; font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.guest-points { display: grid; gap: 10px; margin-top: 4px; }
.guest-point { display: flex; gap: 11px; align-items: flex-start; }
.guest-point-ico {
  width: 30px; height: 30px; flex: none; border-radius: 8px;
  display: grid; place-items: center; background: var(--grad-soft); color: var(--accent-2);
}
.guest-point-t { display: block; font-size: 13px; font-weight: 700; }
.guest-point-x { display: block; font-size: 11.5px; color: var(--text-mute); line-height: 1.5; margin-top: 2px; }
.guest-actions { display: flex; gap: 8px; margin-top: 6px; }
.guest-note { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 11px; color: var(--text-faint); }

/* --- раскладка 1 / 2 / 4 графика --- */
.coins-chart { display: flex; flex-direction: column; min-width: 0; }
.coins-laybar {
  display: flex; gap: 3px; flex: none;
  padding: 5px 8px; border-bottom: 1px solid var(--border);
}
.coins-lay {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 5px; background: none;
  color: var(--text-mute); font-family: inherit; font-size: 10px; font-weight: 700; cursor: pointer;
}
.coins-lay:hover { background: var(--surface); color: var(--text-strong); }
.coins-lay.active { background: var(--accent); color: #fff; }
.coins-panes { flex: 1; min-height: 0; display: grid; gap: 1px; background: var(--border); }
.coins-panes.n1 { grid-template-columns: 1fr; }
.coins-panes.n2 { grid-template-columns: 1fr 1fr; }
.coins-panes.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
/* `overflow: hidden` nu e cosmetic: bara de sus a panoului e mai lată decât panoul
   la două coloane și se revărsa peste lista de monede din dreapta. */
.coins-pane { min-width: 0; min-height: 0; background: var(--bg); display: flex; overflow: hidden; }
.coins-pane .chart-panel { flex: 1; min-width: 0; }
.coins-panes:not(.n1) .cp-head { overflow-x: auto; scrollbar-width: none; }
.coins-panes:not(.n1) .cp-head::-webkit-scrollbar { height: 0; }

/* --- «Поделиться»: мост между скринером и сообществом --- */
.share-menu {
  position: fixed; z-index: 1300; display: grid; gap: 2px; padding: 5px; min-width: 190px;
  background: var(--panel); border: 1px solid var(--border-2);
  border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.share-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border-radius: var(--radius-sm); background: none;
  color: var(--text-dim); font-family: inherit; font-size: 12px; cursor: pointer; text-align: left;
}
.share-item:hover { background: var(--surface-2); color: var(--text-strong); }
.share-box { display: grid; gap: 10px; }
.share-sym { display: flex; align-items: center; gap: 10px; }
.share-price { font-size: 12px; font-weight: 700; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.share-preview {
  width: 100%; max-height: 240px; object-fit: cover; object-position: top;
  border-radius: var(--radius); border: 1px solid var(--border-2);
}
.idea-now {
  padding: 0 14px; border-radius: var(--radius); white-space: nowrap;
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text-dim); font-family: inherit; font-size: 11px; font-weight: 600; cursor: pointer;
}
.idea-now:hover { border-color: var(--accent); color: var(--accent-2); }
.idea-form-shot { display: grid; gap: 5px; }
.idea-form-shotnote { font-size: 10px; color: var(--text-faint); }
.chat-symbol {
  display: inline-flex; align-items: center; gap: 5px; margin: 3px 0;
  padding: 2px 7px; border-radius: 5px; background: var(--surface);
  color: var(--accent-2); font-family: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
}
.chat-symbol:hover { background: var(--surface-2); }
.chat-shot {
  display: block; margin-top: 5px; max-width: min(420px, 100%); border-radius: var(--radius);
  border: 1px solid var(--border-2); cursor: zoom-in;
}
.idea-shot {
  width: 100%; max-height: 260px; object-fit: cover; object-position: top;
  border-radius: var(--radius); border: 1px solid var(--border-2); cursor: zoom-in;
}

/* --- профиль --- */
.profile-section { height: 100%; overflow-y: auto; padding: 20px 24px; display: grid; gap: 16px; align-content: start; max-width: 900px; }
.profile-guest { display: grid; gap: 12px; justify-items: center; padding: 60px 20px; }
.profile-head { display: flex; align-items: center; gap: 16px; }
.profile-avatar {
  width: 60px; height: 60px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 800; color: #0B0E16;
}
.profile-nick-row { display: flex; align-items: center; gap: 8px; }
.profile-nick { margin: 0; font-size: 22px; }
.profile-rank { display: flex; align-items: center; gap: 7px; margin-top: 3px; font-size: 12px; font-weight: 700; }
.profile-rating { color: var(--text-mute); font-weight: 600; }
.profile-since { margin-top: 3px; font-size: 11px; color: var(--text-faint); }

.profile-progress { display: grid; gap: 5px; }
.profile-progress-bar { height: 6px; border-radius: 3px; background: var(--bg-3); overflow: hidden; }
.profile-progress-bar span { display: block; height: 100%; border-radius: 3px; transition: width .35s; }
.profile-progress-txt { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-mute); }

.profile-tiles { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.profile-tile {
  display: grid; gap: 2px; padding: 12px 14px;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: var(--radius);
}
.profile-tile-ico { color: var(--text-faint); }
.profile-tile-v { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.profile-tile-k { font-size: 10px; color: var(--text-mute); }
.profile-tile.up .profile-tile-v { color: var(--up); }
.profile-tile.down .profile-tile-v { color: var(--down); }
.profile-bio { margin: 0; padding: 12px 14px; background: var(--panel); border: 1px solid var(--border-2); border-radius: var(--radius); font-size: 12px; line-height: 1.6; }
.profile-bio-edit { display: grid; gap: 7px; justify-items: start; }
.profile-bio-edit .idea-form-text { width: 100%; }
.profile-sub { margin: 4px 0 0; font-size: 13px; color: var(--text-dim); }
.ideas-list.plain { display: grid; gap: 6px; padding: 0; overflow: visible; grid-template-columns: 1fr; }
.profile-idea {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 12px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border-2); border-left-width: 3px;
  color: var(--text); font-family: inherit; cursor: pointer; text-align: left;
}
.profile-idea.open { border-left-color: var(--accent); }
.profile-idea.worked { border-left-color: var(--up); }
.profile-idea.failed { border-left-color: var(--down); }
.profile-idea-sym { font-size: 12px; font-weight: 700; }
.profile-idea-votes { margin-left: auto; font-size: 11px; color: var(--text-mute); font-variant-numeric: tabular-nums; }

/* --- лидеры рейтинга --- */
.lb-section { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.lb-search { margin-left: auto; max-width: 240px; padding: 6px 10px; }
.lb-podium {
  display: flex; align-items: flex-end; justify-content: center; gap: 12px;
  flex: none; padding: 20px 18px 8px;
}
.lb-empty { padding: 24px; }
.lb-place {
  display: grid; gap: 4px; justify-items: center; min-width: 132px;
  padding: 14px 16px; border-radius: var(--radius-lg);
  background: var(--panel); border: 1px solid var(--border-2);
  color: var(--text); font-family: inherit; cursor: pointer;
}
.lb-place:hover { border-color: var(--accent); }
/* Locul întâi stă mai sus, ca pe un podium adevărat. */
.lb-place.p1 { padding-bottom: 26px; border-color: #F2C14E; }
.lb-medal { font-size: 20px; }
.lb-nick { font-size: 13px; font-weight: 700; }
.lb-rank { font-size: 10px; color: var(--text-mute); }
.lb-rating { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lb-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 18px 18px; display: grid; gap: 5px; align-content: start; }
.lb-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; cursor: pointer; text-align: left;
}
.lb-row:hover { border-color: var(--border-2); }
.lb-row.me { border-color: var(--accent); background: var(--grad-soft); }
.lb-pos { min-width: 22px; font-size: 11px; font-weight: 700; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.lb-row .lb-rank { margin-left: auto; }
.lb-row .lb-rating { font-size: 13px; min-width: 38px; text-align: right; }

/* --- торговые идеи --- */
.ideas-section { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ideas-head {
  display: flex; align-items: center; gap: 14px; flex: none;
  padding: 12px 18px; border-bottom: 1px solid var(--border);
}
.ideas-title { margin: 0; font-size: 15px; }
.ideas-tabs { display: flex; gap: 4px; }
.ideas-tab {
  padding: 5px 11px; border-radius: 6px; background: none;
  color: var(--text-mute); font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.ideas-tab:hover { color: var(--text-strong); background: var(--surface); }
.ideas-tab.active { background: var(--accent); color: #fff; }
.ideas-new { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.ideas-list {
  flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px;
  display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  align-content: start;
}
.ideas-empty { grid-column: 1/-1; padding: 60px 20px; text-align: center; color: var(--text-mute); font-size: 13px; }
.ideas-empty-sub { margin-top: 6px; font-size: 11px; color: var(--text-faint); }

.idea-card {
  display: grid; gap: 10px; padding: 14px;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: var(--radius);
  border-left-width: 3px;
}
.idea-card.open { border-left-color: var(--accent); }
.idea-card.worked { border-left-color: var(--up); }
.idea-card.failed { border-left-color: var(--down); }
.idea-head { display: flex; align-items: center; gap: 9px; }
.idea-who { display: flex; flex-direction: column; line-height: 1.3; }
.idea-author { background: none; padding: 0; font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer; text-align: left; }
.idea-author:hover { text-decoration: underline; }
.idea-when { font-size: 10px; color: var(--text-faint); }
.idea-status {
  margin-left: auto; padding: 2px 8px; border-radius: 10px;
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px;
}
.idea-status.open { background: var(--grad-soft); color: var(--accent-2); }
.idea-status.worked { background: rgba(22, 199, 132, .16); color: var(--up); }
.idea-status.failed { background: rgba(246, 69, 95, .16); color: var(--down); }

.idea-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.idea-symbol {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 6px; background: var(--surface);
  color: var(--text); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.idea-symbol:hover { background: var(--surface-2); color: var(--accent-2); }
.idea-dir { padding: 3px 8px; border-radius: 5px; font-size: 10px; font-weight: 800; letter-spacing: .5px; }
.idea-dir.long { background: rgba(22, 199, 132, .16); color: var(--up); }
.idea-dir.short { background: rgba(246, 69, 95, .16); color: var(--down); }
.idea-setup { padding: 3px 8px; border-radius: 5px; background: var(--surface); font-size: 10px; color: var(--text-dim); }

.idea-prices { display: grid; gap: 4px; }
.idea-price {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 9px; border-radius: 5px; background: var(--bg-2); font-size: 11px;
}
.idea-price-k { color: var(--text-mute); min-width: 42px; }
.idea-price-v { font-weight: 700; font-variant-numeric: tabular-nums; }
.idea-price-p { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.idea-price-p.up { color: var(--up); }
.idea-price-p.down { color: var(--down); }
.idea-text { margin: 0; font-size: 12px; line-height: 1.55; color: var(--text-dim); white-space: pre-wrap; }

/* Urmărirea automată: faptele, vizual despărțite de voturi. */
.idea-track { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.idea-track-chip {
  padding: 2px 8px; border-radius: 10px; background: var(--surface);
  font-size: 10px; font-weight: 700; color: var(--text-mute);
}
.idea-track-chip.hit { background: rgba(22, 199, 132, .16); color: var(--up); }
.idea-track-chip.stop { background: rgba(246, 69, 95, .16); color: var(--down); }
.idea-track-run { margin-left: auto; display: flex; gap: 8px; font-size: 10px; font-variant-numeric: tabular-nums; }
.idea-track-run .up { color: var(--up); }
.idea-track-run .down { color: var(--down); }

.idea-votes { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--border); }
.idea-vote {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 6px;
  background: var(--surface); border: 1px solid transparent;
  color: var(--text-dim); font-family: inherit; font-size: 11px; font-weight: 600; cursor: pointer;
}
.idea-vote:disabled { opacity: .45; cursor: not-allowed; }
.idea-vote.up:hover:not(:disabled), .idea-vote.up.mine { border-color: var(--up); color: var(--up); }
.idea-vote.down:hover:not(:disabled), .idea-vote.down.mine { border-color: var(--down); color: var(--down); }
.idea-vote-n { font-weight: 800; font-variant-numeric: tabular-nums; }
.idea-vote-hint { margin-left: auto; font-size: 9.5px; color: var(--text-faint); text-align: right; }
.idea-vote-hint.worked { color: var(--up); }
.idea-vote-hint.failed { color: var(--down); }

/* formularul de idee nouă */
.idea-form { display: grid; gap: 9px; }
.idea-form-row { display: flex; gap: 8px; align-items: stretch; }
.auth-field.grow { flex: 1; }
.idea-dirs { display: flex; gap: 4px; }
.idea-dirbtn {
  padding: 0 14px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text-mute); font-family: inherit; font-size: 11px; font-weight: 800; cursor: pointer;
}
.idea-dirbtn.long.active { background: rgba(22, 199, 132, .18); border-color: var(--up); color: var(--up); }
.idea-dirbtn.short.active { background: rgba(246, 69, 95, .18); border-color: var(--down); color: var(--down); }
.idea-form-label { font-size: 10px; font-weight: 700; color: var(--text-mute); text-transform: uppercase; letter-spacing: .5px; }
.idea-setups { display: flex; flex-wrap: wrap; gap: 5px; }
.idea-setup-btn {
  padding: 5px 10px; border-radius: 6px;
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text-dim); font-family: inherit; font-size: 11px; cursor: pointer;
}
.idea-setup-btn.active { background: var(--grad-soft); border-color: var(--accent); color: var(--text-strong); }
.idea-lines { display: grid; gap: 5px; }
.idea-line { display: flex; align-items: center; gap: 7px; }
.idea-line-k { min-width: 40px; font-size: 11px; color: var(--text-mute); }
.auth-input.mini {
  flex: 1; padding: 7px 10px; border-radius: 6px;
  background: var(--bg-2); border: 1px solid var(--border); font-size: 12px;
}
.idea-form-text {
  padding: 9px 11px; border-radius: var(--radius); resize: vertical;
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: 12px; line-height: 1.5; outline: none;
}
.idea-form-text:focus, .auth-input.mini:focus { border-color: var(--accent); }

/* --- сообщество: вход --- */
.auth { display: grid; gap: 10px; }
.auth-title { margin: 0; font-size: 16px; }
.auth-hint { margin: 0 0 4px; font-size: 11px; color: var(--text-mute); line-height: 1.5; }
.auth-field {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text-mute);
}
.auth-field:focus-within { border-color: var(--accent); }
.auth-input {
  flex: 1; background: none; border: 0; outline: none;
  color: var(--text); font-family: inherit; font-size: 13px;
}
.auth-error { min-height: 15px; font-size: 11px; color: var(--down); }
.auth-submit { width: 100%; justify-content: center; }
.auth-switch {
  background: none; color: var(--text-mute); font-family: inherit; font-size: 11px;
  cursor: pointer; padding: 4px;
}
.auth-switch:hover { color: var(--accent); }

/* --- общий чат --- */
.chat-section { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-head {
  display: flex; align-items: center; gap: 9px; flex: none;
  padding: 12px 18px; border-bottom: 1px solid var(--border);
}
.chat-title { margin: 0; font-size: 15px; }
.chat-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--up); }
.chat-online { font-size: 11px; color: var(--text-mute); }
.chat-user { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.chat-me { display: flex; flex-direction: column; line-height: 1.25; }
.chat-me-nick { font-size: 12px; font-weight: 700; }
.chat-me-status { font-size: 10px; color: var(--text-mute); }
.chat-logout { padding: 6px; border-radius: 5px; color: var(--text-mute); cursor: pointer; }
.chat-logout:hover { background: var(--surface-2); color: var(--down); }

.chat-body { position: relative; flex: 1; min-height: 0; }
.chat-list { height: 100%; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.chat-empty { margin: auto; font-size: 12px; color: var(--text-mute); }
.chat-day {
  align-self: center; padding: 3px 12px; border-radius: 10px;
  background: var(--surface); font-size: 10px; color: var(--text-mute); font-weight: 600;
}
/* Linia de necitite: se vede dintr-o privire unde ai rămas. */
.chat-unread-line {
  display: flex; align-items: center; gap: 10px; margin: 2px 0;
  font-size: 10px; font-weight: 700; color: var(--down); text-transform: uppercase; letter-spacing: .5px;
}
.chat-unread-line::before, .chat-unread-line::after {
  content: ''; flex: 1; height: 1px; background: var(--down); opacity: .45;
}
.chat-msg { display: flex; gap: 10px; align-items: flex-start; }
.chat-avatar {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #0B0E16;
}
.chat-avatar.sm { width: 24px; height: 24px; font-size: 9px; }
.chat-body-col { min-width: 0; }
.chat-meta { display: flex; align-items: baseline; gap: 7px; }
.chat-author { background: none; font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0; }
.chat-author:hover { text-decoration: underline; }
.chat-role {
  padding: 1px 5px; border-radius: 3px; background: var(--grad); color: #fff;
  font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px;
}
.chat-time { font-size: 10px; color: var(--text-faint); }
.chat-text { font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.chat-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chat-react {
  display: flex; align-items: center; gap: 4px;
  padding: 1px 6px; border-radius: 10px;
  background: var(--surface); border: 1px solid transparent;
  font-size: 11px; cursor: pointer;
}
.chat-react.mine { border-color: var(--accent); background: var(--grad-soft); }
.chat-react-n { font-size: 10px; color: var(--text-mute); font-weight: 700; }
.chat-picker {
  position: fixed; z-index: 1300; display: flex; gap: 2px; padding: 5px;
  background: var(--panel); border: 1px solid var(--border-2);
  border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.chat-picker-btn { padding: 4px 6px; border-radius: 5px; background: none; font-size: 16px; cursor: pointer; }
.chat-picker-btn:hover { background: var(--surface-2); }
.chat-jump {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 16px;
  background: var(--accent); color: #fff; font-family: inherit; font-size: 11px; font-weight: 700;
  cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}
.chat-jump.hidden { display: none; }

.chat-composer {
  display: flex; align-items: flex-end; gap: 8px; flex: none;
  padding: 12px 18px; border-top: 1px solid var(--border);
}
.chat-input {
  flex: 1; resize: none; max-height: 140px;
  padding: 10px 12px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: 13px; line-height: 1.45;
  outline: none;
}
.chat-input:focus { border-color: var(--accent); }
.chat-input:disabled { opacity: .6; cursor: not-allowed; }
.chat-send {
  flex: none; width: 38px; height: 38px; border-radius: var(--radius);
  display: grid; place-items: center;
  background: var(--accent); color: #fff; cursor: pointer;
}
.chat-send:disabled { opacity: .45; cursor: not-allowed; }

/* --- глобальный поиск: начни печатать тикер где угодно --- */
.gsearch {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 14vh; background: rgba(0, 0, 0, .45);
}
.gsearch-box {
  width: min(440px, 92vw);
  background: var(--panel); border: 1px solid var(--border-2);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
.gsearch-head {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  color: var(--text-mute);
}
.gsearch-input {
  flex: 1; background: none; border: 0; outline: none;
  color: var(--text); font-family: inherit; font-size: 15px; font-weight: 600;
  text-transform: uppercase;
}
.gsearch-input::placeholder { color: var(--text-faint); text-transform: none; font-weight: 500; }
.gsearch-list { max-height: 46vh; overflow-y: auto; padding: 5px; }
.gsearch-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border-radius: var(--radius-sm);
  background: none; color: var(--text); font-family: inherit; cursor: pointer;
}
.gsearch-item.active { background: var(--surface-2); }
.gsearch-sym { font-size: 13px; font-weight: 700; }
.gsearch-vol { margin-left: auto; font-size: 11px; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.gsearch-pct { width: 62px; text-align: right; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gsearch-pct.up { color: var(--up); }
.gsearch-pct.down { color: var(--down); }
.gsearch-empty { padding: 18px; text-align: center; font-size: 12px; color: var(--text-mute); }
.gsearch-hint {
  display: flex; gap: 14px; padding: 8px 14px;
  border-top: 1px solid var(--border); background: var(--bg-2);
  font-size: 10px; color: var(--text-faint);
}

/* --- плавающее окно BTC --- */
.btcw {
  position: fixed; z-index: 900;
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border-2);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .45);
}
.btcw-head {
  display: flex; align-items: center; gap: 8px; flex: none;
  height: 30px; padding: 0 6px 0 10px;
  background: var(--bg-2); border-bottom: 1px solid var(--border);
  cursor: move; user-select: none;
}
.btcw-title { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; letter-spacing: .4px; }
.btcw-title .icon { color: #F7931A; }          /* portocaliul bitcoinului, în orice temă */
.btcw-price { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-dim); }
.btcw-price.up { color: var(--up); }
.btcw-price.down { color: var(--down); }
.btcw-tfs { display: flex; gap: 2px; margin-left: auto; }
.btcw-tf {
  padding: 2px 5px; font-size: 9px; font-weight: 700; border-radius: 3px;
  color: var(--text-mute); background: none; cursor: pointer;
}
.btcw-tf:hover { color: var(--text-strong); }
.btcw-tf.active { background: var(--accent); color: #fff; }
.btcw-close { padding: 4px; border-radius: 4px; color: var(--text-mute); cursor: pointer; }
.btcw-close:hover { background: var(--surface-2); color: var(--text-strong); }
.btcw-body { flex: 1; min-height: 0; position: relative; }
/* Colțul de tras: fără el nu e evident că fereastra se redimensionează. */
.btcw-grip {
  position: absolute; right: 0; bottom: 0; width: 14px; height: 14px;
  cursor: nwse-resize; z-index: 2;
  background: linear-gradient(135deg, transparent 50%, var(--text-faint) 50%, var(--text-faint) 60%, transparent 60%);
}

/* --- оформление: темы и цвета свечей --- */
.set-themes {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.set-theme {
  display: grid; gap: 7px; padding: 13px 14px; text-align: left; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--radius);
  color: var(--text); font-family: inherit; transition: border-color .15s, background .15s;
}
.set-theme:hover { border-color: var(--accent); background: var(--bg-3); }
.set-theme.active { border-color: var(--accent); background: var(--grad-soft); }
/* Mostrele arată paleta reală a temei, nu una descrisă în cuvinte. */
.set-theme-swatch { display: flex; gap: 4px; }
.set-theme-swatch i {
  width: 26px; height: 20px; border-radius: 4px;
  border: 1px solid rgba(127, 127, 127, .25);
}
.set-theme-name { font-size: 13px; font-weight: 700; }
.set-theme-hint { font-size: 10px; color: var(--text-mute); line-height: 1.45; }

.set-candles { display: grid; gap: 8px; }
.set-color-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--border); cursor: pointer;
}
.set-color-row:hover { border-color: var(--border-2); }
.set-color-dot {
  width: 18px; height: 18px; border-radius: 5px; flex: none;
  border: 1px solid rgba(127, 127, 127, .3);
}
.set-color-label { font-size: 12px; }
.set-color-code {
  margin-left: auto; font-size: 11px; font-weight: 600;
  color: var(--text-mute); font-variant-numeric: tabular-nums;
}
/* Câmpul nativ e ascuns sub rând: rândul întreg deschide selectorul. */
.set-color-input { width: 0; height: 0; padding: 0; border: 0; opacity: 0; }
.set-color-reset { justify-self: start; margin-top: 4px; }
.set-color-reset:disabled { opacity: .45; cursor: default; }

.set-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.set-hotkeys { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-top: 12px; }
.set-hotkey { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-dim); }
.set-hotkey kbd {
  min-width: 62px; padding: 3px 7px; text-align: center;
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 4px;
  font: 10px/1.5 ui-monospace, monospace; color: var(--text);
}
.set-alerts { display: grid; gap: 5px; margin-top: 12px; }
.set-alert {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; background: var(--bg-2); border-radius: var(--radius-sm); font-size: 12px;
}
.set-alert.fired { opacity: .5; }
.set-alert-sym { font-weight: 600; min-width: 90px; }
.set-alert-price { color: var(--warn); }
.set-alert-meta { color: var(--text-mute); font-size: 10px; margin-left: auto; }
.set-alert-del { color: var(--text-mute); padding: 3px; }
.set-alert-del:hover { color: var(--down); }
.set-empty { padding: 18px; text-align: center; color: var(--text-mute); font-size: 11px; }

/* ============================================================ indicatori */

.ind-modal { display: flex; flex-direction: column; gap: 12px; }
.ind-search {
  padding: 9px 12px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); outline: none;
}
.ind-list { max-height: 56vh; overflow-y: auto; }
.ind-group-title {
  font-size: 9px; color: var(--text-mute); letter-spacing: .7px;
  margin: 14px 0 4px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.ind-row { border-bottom: 1px solid var(--border); }
.ind-row:last-child { border-bottom: 0; }
.ind-empty { padding: 24px; text-align: center; color: var(--text-mute); font-size: 11px; }

/* =========================================================== notificări */

.notif-panel {
  position: fixed; top: calc(var(--nav-h) + 6px); right: 12px; z-index: 130;
  width: 330px; max-height: 60vh; display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0,0,0,.55);
}
.notif-head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border-bottom: 1px solid var(--border); font-size: 12px;
}
.notif-clear { margin-left: auto; font-size: 10px; color: var(--text-mute); }
.notif-clear:hover { color: var(--down); }
.notif-close { color: var(--text-mute); }
.notif-list { overflow-y: auto; padding: 5px; }
.notif { padding: 8px 10px; border-radius: 5px; }
.notif.unread { background: #14243d; }
.notif-time { display: block; font-size: 9px; color: var(--text-mute); }
.notif-text { display: block; font-size: 11px; margin-top: 3px; line-height: 1.45; }
.notif-empty { padding: 24px; text-align: center; color: var(--text-mute); font-size: 11px; }

/* ============================================================== дашборд */

.dash {
  height: 100%; overflow-y: auto; padding: 26px 30px 40px;
  background: var(--p-bg);
}
.dash-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  max-width: 1500px; margin: 0 auto 22px;
}
.dash-title { margin: 0; font-size: 27px; font-weight: 800; letter-spacing: -.4px; }
.dash-title-accent {
  background: linear-gradient(135deg, var(--p-purple), var(--p-blue));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dash-sub { margin: 6px 0 0; font-size: 12.5px; color: var(--text-mute); max-width: 620px; line-height: 1.6; }
.dash-cta {
  display: flex; align-items: center; gap: 10px; flex: none;
  padding: 13px 24px; border-radius: 10px;
  background: linear-gradient(135deg, var(--p-purple), #7B2FC4);
  color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .7px;
  box-shadow: 0 6px 22px rgba(148, 56, 216, .32); transition: .2s;
}
.dash-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(148, 56, 216, .45); }

.dash-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px;
  max-width: 1500px; margin: 0 auto 16px;
}
.dash-stat {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 17px; border-radius: var(--radius-lg);
  background: var(--p-container); border: 1px solid var(--p-border);
}
.dash-stat-icon {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: rgba(148, 56, 216, .14); color: var(--p-purple);
}
.dash-stat-body { display: flex; flex-direction: column; min-width: 0; }
.dash-stat-value { font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.dash-stat-label { font-size: 10px; color: var(--text-mute); margin-top: 2px; }

.dash-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px;
  max-width: 1500px; margin: 0 auto 14px;
}
.dash-grid-2 { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }

.dash-card {
  padding: 17px 19px; border-radius: var(--radius-lg);
  background: var(--p-container); border: 1px solid var(--p-border);
}
.dash-card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; color: var(--p-purple); }
.dash-card-head h2 {
  margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .8px;
  color: var(--text); text-transform: uppercase;
}
.dash-card-up .dash-card-head { color: var(--up); }
.dash-card-down .dash-card-head { color: var(--down); }
.dash-card-spike .dash-card-head { color: var(--warn); }

.dash-list { display: grid; gap: 1px; }
.dash-row {
  display: grid; grid-template-columns: 62px 60px 1fr 62px;
  align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: 7px; text-align: left; transition: background .14s;
}
.dash-row:hover { background: var(--p-hover); }
.dash-row-sym { font-size: 12px; font-weight: 700; }
.dash-row-spark { display: block; height: 18px; }
.dash-row-vol { font-size: 11px; color: var(--text-mute); text-align: right; font-variant-numeric: tabular-nums; }
.dash-row-change { font-size: 12px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.dash-row-mult {
  font-size: 11px; font-weight: 700; text-align: right;
  color: var(--warn); font-variant-numeric: tabular-nums;
}
.dash-row-wall { grid-template-columns: 62px 1fr 70px 62px; }
.dash-row-side { font-size: 10px; color: var(--text-mute); }
.dash-row-wall.bid .dash-row-side { color: var(--up); }
.dash-row-wall.ask .dash-row-side { color: var(--down); }
.dash-empty { padding: 16px 4px; font-size: 11px; color: var(--text-mute); }

.dash-tools { display: grid; gap: 4px; }
.dash-tool {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: 9px; text-align: left; transition: background .14s;
  color: var(--text-dim);
}
.dash-tool:hover { background: var(--p-hover); color: var(--text); }
.dash-tool-icon {
  width: 32px; height: 32px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: rgba(49, 168, 224, .12); color: var(--p-blue);
}
.dash-tool-text { flex: 1; min-width: 0; }
.dash-tool-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); }
.dash-tool-hint { display: block; font-size: 10.5px; color: var(--text-mute); margin-top: 1px; }

.dash-about { display: grid; gap: 11px; }
.dash-about-row { display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: baseline; }
.dash-about-key { font-size: 10px; font-weight: 700; letter-spacing: .5px; color: var(--p-purple); text-transform: uppercase; }
.dash-about-val { font-size: 11.5px; color: var(--text-dim); line-height: 1.6; }

.boot-error { padding: 30px; color: var(--down); font-size: 13px; }

/* ========================================================== responsive */

@media (max-width: 1280px) {
  .coins-sidebar { width: 260px; }
  .density-panel { width: 340px; }
  .radar-panel { width: 290px; }
}
@media (max-width: 900px) {
  .sfm { grid-template-columns: 1fr; }
  .sfm-conditions, .sfm-display { grid-template-columns: 1fr; }
  .brand-text, .brand-build { display: none; }
  .topnav-tab span { display: none; }
}
