/* Calypso — тъмна „glassmorphism" тема (Manrope), по дизайн-мокъпа Account.dc.
   Класовете са същите, които audit.js/app.js очакват — само визуалният слой е сменен. */
:root {
  --bg: #0c0d13;
  /* плътни повърхности (без backdrop blur) — много по-бърз скрол от полупрозрачни стъклени слоеве */
  --surface: #15171f;        /* основна карта */
  --surface-2: #1b1e28;      /* инпути / по-светъл слой */
  --surface-3: #232634;      /* hover / акцентен слой */
  --panel: #15171f;          /* legacy alias → плътно */
  --panel-2: #1b1e28;        /* legacy alias → плътно */
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);
  --text: #f4f6fb;
  --text-2: #e7e9f2;
  --muted: #838aa0;
  --muted-2: #71768c;
  --accent: #5b8cff;        /* основен (Views, силни) */
  --accent-2: #2fd0c0;      /* тийл (позитив, табове) */
  --teal: #23c4b6;
  --amber: #ffb84d;         /* бранд / действия / тренд */
  --amber-2: #f5891f;
  --good: #5fd6a0;
  --mid: #ffc15c;
  --bad: #ff6f88;
  --purple: #9b8cff;
  --tiktok: #ff6f88;
  --ig: #c98bd0;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.7);
  --shadow-pop: 0 24px 60px -28px rgba(0, 0, 0, 0.8);
  --inset: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --ring: 0 0 0 3px rgba(35, 196, 182, 0.22);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 560px at 84% -10%, rgba(245, 166, 35, 0.07), transparent 56%),
    radial-gradient(950px 500px at 0% -4%, rgba(35, 196, 182, 0.06), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 6px; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 30px 22px 80px; }

/* повърхност на карта — ПЛЪТНА (без backdrop-filter) → плавен скрол дори при десетки карти */
.glass, .search, .pcard, .vcard, .au-head, .kpi-card, .ch-card, .rl-row, .scorebox, .card-block, .job-progress {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--inset), var(--shadow);
}

/* ── Header (index) ── */
header.top { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
header.top .logo {
  width: 44px; height: 44px; border-radius: 13px;
  background: linear-gradient(150deg, var(--teal), var(--accent));
  display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #06201d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 6px 18px -6px rgba(0, 0, 0, 0.5);
}
header.top h1 { font-size: 21px; margin: 0; font-weight: 800; letter-spacing: -0.3px; }
header.top p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.niche-trend-btn {
  margin-left: auto; white-space: nowrap;
  background: linear-gradient(135deg, var(--amber), var(--amber-2)); color: #2a1500;
  box-shadow: 0 12px 26px -12px rgba(245, 150, 35, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* ── Search bar ── */
.search { border-radius: var(--radius); padding: 18px; display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 30px; }
.search .field { display: flex; flex-direction: column; gap: 6px; }
.search .field.grow { flex: 1; min-width: 220px; }
.search label { font-size: 12px; color: var(--muted); font-weight: 700; }
.search input, .search select {
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-strong); color: var(--text);
  padding: 11px 13px; border-radius: 11px; font-size: 14px; outline: none; font-family: inherit;
}
.search input:focus, .search select:focus { border-color: var(--teal); }
.search input[type="number"] { width: 90px; }

.btn {
  background: linear-gradient(135deg, var(--amber), var(--amber-2)); color: #2a1500; border: 0;
  padding: 12px 22px; border-radius: 12px; font-size: 14px; font-weight: 800; cursor: pointer;
  font-family: inherit; transition: transform 0.08s ease, filter 0.15s ease;
  box-shadow: 0 12px 26px -14px rgba(245, 150, 35, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Section ── */
.section-title { font-size: 16px; font-weight: 800; margin: 28px 0 16px; color: var(--text); display: flex; align-items: center; gap: 10px; }
.section-title .count { color: var(--muted); font-weight: 500; font-size: 13px; }
.back { color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.back:hover { color: var(--text); }

/* ── Grid ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

/* profile card */
.pcard { position: relative; border-radius: var(--radius); padding: 18px; cursor: pointer; transition: transform 0.14s ease, border-color 0.15s ease, box-shadow 0.15s ease; overflow: hidden; }
.pcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--teal), var(--accent)); opacity: 0; transition: opacity .15s; }
.pcard:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-pop); }
.pcard:hover::before { opacity: 1; }
.pcard .pname { font-weight: 800; font-size: 16px; margin-bottom: 9px; letter-spacing: -.01em; }
.pcard .pmeta { color: var(--muted); font-size: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pcard .pmeta span:not(.badge-pill) { background: var(--surface-2); border-radius: 7px; padding: 3px 8px; font-weight: 600; }

/* video card */
.vcard { border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform 0.14s ease, border-color 0.15s ease, box-shadow 0.15s ease; display: flex; flex-direction: column; }
.vcard:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-pop); }
.vcard .thumb { position: relative; aspect-ratio: 9 / 12; background: linear-gradient(135deg, #1a1d28, #242838); display: grid; place-items: center; overflow: hidden; }
.vcard .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(8,9,13,.55)); pointer-events: none; }
.vcard .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.vcard:hover .thumb img { transform: scale(1.05); }
.vcard .thumb .ph { font-size: 30px; opacity: 0.4; }
.vcard .score { position: absolute; top: 9px; right: 9px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #06140f; z-index: 1; box-shadow: 0 4px 12px -3px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.35); }
.vcard .body { padding: 12px 13px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.vcard .cap { font-size: 13px; line-height: 1.4; color: var(--text-2); font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.vcard .stats { display: flex; gap: 12px; color: var(--muted); font-size: 12px; }
.vcard .stats b { color: var(--text); font-weight: 700; }
.vcard .link { font-size: 12px; color: var(--teal); display: inline-flex; align-items: center; gap: 5px; margin-top: auto; font-weight: 600; }
.vcard .link:hover { text-decoration: underline; }

/* score colors */
.s-good { background: linear-gradient(135deg, var(--good), #43c98a); } .s-mid { background: linear-gradient(135deg, var(--mid), var(--amber)); } .s-bad { background: linear-gradient(135deg, var(--bad), #e85575); }
.badge-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.plat-tiktok { background: rgba(255, 70, 100, 0.14); color: #ff6f88; }
.plat-instagram { background: rgba(201, 139, 208, 0.16); color: #d79fde; }

/* ── empty / loading text ── */
.empty { color: var(--muted); padding: 40px; text-align: center; font-size: 14px; }

/* ════════════ LOADING OVERLAY ════════════ */
.overlay { position: fixed; inset: 0; background: rgba(8, 9, 13, 0.92); backdrop-filter: blur(8px); z-index: 100; display: none; flex-direction: column; align-items: center; justify-content: center; padding: 30px; }
.overlay.show { display: flex; }
.arranger { position: relative; width: 120px; height: 120px; margin-bottom: 28px; }
.arranger .tile { position: absolute; width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, var(--amber), var(--amber-2)); top: 47px; left: 47px; animation: orbit 1.8s cubic-bezier(0.5, 0, 0.5, 1) infinite; }
.arranger .tile:nth-child(1) { animation-delay: 0s; }
.arranger .tile:nth-child(2) { animation-delay: -0.45s; opacity: 0.85; }
.arranger .tile:nth-child(3) { animation-delay: -0.9s; opacity: 0.7; }
.arranger .tile:nth-child(4) { animation-delay: -1.35s; opacity: 0.55; }
@keyframes orbit {
  0%   { transform: rotate(0deg) translateX(40px) rotate(0deg) scale(0.8); }
  50%  { transform: rotate(180deg) translateX(40px) rotate(-180deg) scale(1.15); }
  100% { transform: rotate(360deg) translateX(40px) rotate(-360deg) scale(0.8); }
}
.overlay h2 { font-size: 20px; margin: 0 0 4px; font-weight: 800; }
.overlay .sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.steps { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 380px; margin-bottom: 22px; }
.step { display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: 14px; transition: color 0.3s; }
.step .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; font-size: 12px; flex-shrink: 0; transition: all 0.3s; }
.step.active { color: var(--text); }
.step.active .dot { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(35, 196, 182, 0.18); animation: pulse 1.2s infinite; }
.step.done { color: var(--text); }
.step.done .dot { background: var(--teal); border-color: var(--teal); color: #06201d; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(35, 196, 182, 0.18);} 50% { box-shadow: 0 0 0 7px rgba(35, 196, 182, 0.06);} }
.found { width: 100%; max-width: 420px; max-height: 160px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.found-item { background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px; padding: 8px 12px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; animation: popin 0.35s ease; }
.found-item .mini-score { font-weight: 800; border-radius: 6px; padding: 2px 7px; font-size: 12px; color: #06140f; }
@keyframes popin { from { opacity: 0; transform: translateY(8px) scale(0.96);} to { opacity: 1; transform: none;} }
.log { width: 100%; max-width: 540px; margin-top: 18px; }
.log summary { color: var(--muted); font-size: 12px; cursor: pointer; }
.log pre { background: #07080c; border: 1px solid var(--border); border-radius: 9px; padding: 12px; font-size: 11px; color: #9aa3bd; max-height: 200px; overflow: auto; white-space: pre-wrap; }

/* ════════════ DETAIL PAGE (sticky 2-колонен layout) ════════════ */
.dt-page { max-width: 1280px; }
.dt-grid { display: grid; grid-template-columns: minmax(300px, 340px) 1fr; gap: 26px; align-items: start; }

/* ЛЯВО: плеър + метрики, остава видим докато скролваш анализа */
.dt-left { position: sticky; top: 18px; display: flex; flex-direction: column; gap: 14px; }
.player-frame { border: 0; border-radius: var(--radius); background: #000; box-shadow: var(--shadow); display: block; width: 100%; }
.player-frame.tt { aspect-ratio: 9 / 16; height: min(660px, 74vh); width: auto; max-width: 100%; margin: 0 auto; }
.player-frame.ig { width: 100%; height: 540px; }
.detail-thumb { width: 100%; aspect-ratio: 9/12; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dt-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dt-metric { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.dt-metric .n { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.dt-metric .l { font-size: 11px; color: var(--muted-2); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }
.dt-orig { display: flex; align-items: center; justify-content: center; gap: 7px; height: 42px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-2); font-size: 13px; font-weight: 700; transition: border-color .15s, color .15s; }
.dt-orig:hover { border-color: var(--teal); color: var(--teal); }

/* ДЯСНО: скролируем анализ */
.dt-right { min-width: 0; }
.dt-titlebar { display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }
.dt-titlebar h1 { font-size: 20px; margin: 0; line-height: 1.42; font-weight: 800; letter-spacing: -.01em; }

/* verdict карта: оценка + ER + 4 под-оценки в едно */
.verdict { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.verdict-score { width: 76px; height: 76px; border-radius: 18px; display: grid; place-items: center; flex-shrink: 0; position: relative; font-weight: 800; color: #06140f; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.verdict-score b { font-size: 30px; line-height: 1; }
.verdict-score small { font-size: 11px; opacity: .75; font-weight: 800; }
.verdict-main { min-width: 0; }
.verdict-er { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.verdict-er .tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.verdict-er .tag.viral { color: var(--good); background: rgba(95,214,160,.13); }
.verdict-er .tag.добро, .verdict-er .tag.good { color: var(--mid); background: rgba(255,193,92,.13); }
.verdict-er .tag.слабо, .verdict-er .tag.weak { color: var(--bad); background: rgba(255,111,136,.13); }
.verdict-subs { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 18px; }
.sub .lbl { font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 5px; font-weight: 700; }
.sub .lbl b { color: var(--text); }
.sub .bar { height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 99px; overflow: hidden; }
.sub .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--accent)); border-radius: 99px; }
@media (max-width: 540px) { .verdict { grid-template-columns: 1fr; } .verdict-subs { grid-template-columns: 1fr 1fr; } }

/* блок-карта с ляв акцент */
.card-block { border-radius: var(--radius); padding: 16px 20px 18px; margin-bottom: 14px; }
.card-block h3 { margin: 0 0 12px; font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .07em; text-transform: uppercase; display: flex; align-items: center; gap: 9px; }
.card-block h3:empty { display: none; }
.card-block h3::before { content: ""; width: 4px; height: 14px; border-radius: 3px; background: var(--teal); flex-shrink: 0; }
.card-block h3:empty::before { display: none; }
.card-block.accent-amber h3::before { background: var(--amber); }
.card-block p { margin: 0 0 8px; line-height: 1.62; font-size: 14px; color: var(--text-2); }

/* hook → цитат */
.hook-quote { position: relative; padding: 4px 0 2px 16px; border-left: 3px solid var(--teal); }
.hook-quote .q { font-size: 16px; line-height: 1.5; font-weight: 600; color: var(--text); font-style: italic; }
.hook-meta { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; flex-wrap: wrap; }
.hook-type { display: inline-flex; align-items: center; background: rgba(35, 196, 182, 0.15); color: var(--teal); border-radius: 7px; padding: 3px 10px; font-size: 12px; font-weight: 800; }
.hook-strength { font-size: 12px; color: var(--muted); font-weight: 700; }

/* механика → определения */
.mech-grid { display: grid; gap: 13px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 14px; align-items: baseline; }
.kv .k { font-size: 12px; color: var(--muted); font-weight: 700; }
.kv .v { font-size: 14px; line-height: 1.55; color: var(--text-2); }
@media (max-width: 480px) { .kv { grid-template-columns: 1fr; gap: 3px; } }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
ul.clean { margin: 0; padding-left: 4px; line-height: 1.6; font-size: 14px; list-style: none; }
ul.clean li { position: relative; padding-left: 20px; margin-bottom: 8px; color: var(--text-2); }
ul.clean li::before { content: "⚠"; position: absolute; left: 0; top: 0; color: var(--mid); font-size: 12px; }
.struct .row { margin-bottom: 10px; }
.struct .row .s { font-size: 12px; font-weight: 800; color: var(--accent-2); }

/* транскрипт */
.transcript { white-space: pre-wrap; line-height: 1.65; font-size: 13.5px; color: var(--text-2); margin-top: 12px; max-height: 360px; overflow-y: auto; padding-right: 6px; }
details.transcript-d summary { cursor: pointer; font-weight: 800; font-size: 13px; color: var(--text-2); list-style: none; display: flex; align-items: center; gap: 8px; }
details.transcript-d summary::-webkit-details-marker { display: none; }
details.transcript-d summary::before { content: "▸"; color: var(--teal); transition: transform .15s; }
details.transcript-d[open] summary::before { transform: rotate(90deg); }

/* ── СЦЕНАРИИ (редизайн) ── */
.scn-list { display: flex; flex-direction: column; gap: 14px; }
.scn { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.scn-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; user-select: none; background: var(--surface-2); border-bottom: 1px solid transparent; transition: border-color .15s; }
.scn[open] .scn-head, .scn.open .scn-head { border-bottom-color: var(--border); }
.scn-head .twist { color: var(--teal); transition: transform .15s; flex-shrink: 0; }
.scn.open .scn-head .twist { transform: rotate(90deg); }
.scn-title { font-weight: 800; font-size: 14px; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.corr-tag { font-size: 11px; font-weight: 800; color: var(--accent-2); background: rgba(47, 208, 192, 0.14); border-radius: 6px; padding: 3px 8px; flex-shrink: 0; }
.scn-body { display: none; padding: 16px; }
.scn.open .scn-body { display: block; }
.scn-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .scn-panes { grid-template-columns: 1fr; } }
.scn-pane { display: flex; flex-direction: column; min-width: 0; }
.sp-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 7px; }
.sp-label .copy-btn { font-size: 11px; font-weight: 700; color: var(--teal); background: none; border: 0; cursor: pointer; padding: 2px 6px; border-radius: 6px; text-transform: none; letter-spacing: 0; }
.sp-label .copy-btn:hover { background: rgba(35,196,182,.12); }
.scenario { white-space: pre-wrap; line-height: 1.62; font-size: 13.5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 14px; color: var(--text-2); flex: 1; max-height: 420px; overflow-y: auto; }
.correction-edit textarea { width: 100%; box-sizing: border-box; min-height: 280px; flex: 1; resize: vertical; white-space: pre-wrap; line-height: 1.62; font-size: 13.5px; font-family: inherit; background: #0e0f16; border: 1px solid var(--border-strong); border-radius: 11px; padding: 14px; color: var(--text); }
.correction-edit textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: var(--ring); }
.corr-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.save-corr { background: linear-gradient(135deg, var(--teal), var(--accent-2)); color: #06201d; font-size: 13px; padding: 9px 16px; }
.corr-status { font-size: 12px; color: var(--muted); }

/* action bar */
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; }
.action-btn { border: 0; cursor: pointer; font-size: 14px; font-weight: 800; padding: 12px 22px; border-radius: 12px; display: inline-flex; align-items: center; gap: 8px; font-family: inherit; transition: transform 0.08s, filter 0.15s; }
.action-btn:hover { filter: brightness(1.08); }
.action-btn:active { transform: translateY(1px); }
.action-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.action-btn.analyze { background: linear-gradient(135deg, var(--accent), #7d6cd6); color: #fff; box-shadow: 0 12px 26px -14px rgba(91,140,255,.7); }
.action-note { color: var(--muted); font-size: 13px; line-height: 1.5; }
.action-btn.rewrite { background: linear-gradient(135deg, var(--teal), var(--good)); color: #06140f; box-shadow: 0 12px 26px -14px rgba(35,196,182,.7); }
.job-progress { display: none; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; }
.job-progress.show { display: block; }
.job-progress.error { border-color: rgba(255, 107, 122, .32); }
.job-progress.error .spin { display: none; }
.job-progress .jp-title { font-weight: 800; font-size: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.job-progress .spin { width: 16px; height: 16px; border: 2px solid var(--border-strong); border-top-color: var(--teal); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.job-progress pre { background: #07080c; border: 1px solid var(--border); border-radius: 9px; padding: 11px; font-size: 11.5px; color: #9aa3bd; max-height: 200px; overflow: auto; white-space: pre-wrap; margin: 0; }

@media (max-width: 880px) {
  .dt-grid { grid-template-columns: 1fr; }
  .dt-left { position: static; }
  .player-frame.tt { height: 70vh; }
}

/* ════════════ AUDIT PAGE ════════════ */
.audit-link { margin-left: auto; background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px; padding: 7px 13px; font-size: 13px; font-weight: 700; color: var(--teal); transition: border-color .15s, color .15s; }
.audit-link:hover { border-color: var(--teal); }

/* header card */
.au-head { display: flex; align-items: center; gap: 18px; border-radius: 20px; padding: 22px 26px; margin: 0 0 4px; flex-wrap: wrap; }
.au-avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: linear-gradient(150deg, var(--ig), #7d6cd6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 6px 18px -6px rgba(0, 0, 0, 0.5); }
.au-avatar.ph { display: grid; place-items: center; font-size: 26px; color: #fff; }
.au-id { min-width: 180px; }
.au-tag { font-size: 11px; letter-spacing: 0.12em; color: var(--muted-2); font-weight: 800; margin-bottom: 5px; }
.au-id h1 { font-size: 25px; margin: 0; font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.au-stats { display: flex; gap: 24px; margin-left: auto; }
.au-stat { text-align: center; }
.au-stat .n { font-size: 20px; font-weight: 800; }
.au-stat .l { font-size: 10px; color: var(--muted-2); letter-spacing: 0.08em; font-weight: 700; margin-top: 3px; }
.au-newscan { height: 44px; padding: 0 20px; font-size: 14px; }

/* tabs */
.au-tabs { display: flex; align-items: center; gap: 30px; padding: 22px 6px 0; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.au-tab { position: relative; background: none; border: 0; color: var(--muted); font-size: 16px; font-weight: 800; font-family: inherit; padding: 0 0 15px; cursor: pointer; white-space: nowrap; transition: color .15s; }
.au-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2.5px; border-radius: 3px; background: var(--teal); opacity: 0; transition: opacity .15s; }
.au-tab:hover { color: var(--text-2); }
.au-tab.active { color: var(--text); }
.au-tab.active::after { opacity: 1; }
.au-tab[data-tab="trend"].active::after { background: var(--amber); }

/* KPIs */
.kpi-section { display: flex; align-items: center; gap: 11px; font-size: 19px; font-weight: 800; margin: 4px 0 18px; color: #eef0f7; }
.kpi-badge { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #06140f; }
.kpi-badge.a { background: var(--teal); } .kpi-badge.b { background: var(--purple); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 15px; margin-bottom: 26px; }
.kpi-card { border-radius: 15px; padding: 16px 17px; }
.kpi-card.kpi-disabled { opacity: .55; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; }
.kpi-label { font-size: 13px; font-weight: 800; color: var(--teal); letter-spacing: .02em; }
.kpi-disabled .kpi-label { color: var(--muted); }
.kpi-i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.22); color: #6b7188; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; cursor: help; position: relative; flex-shrink: 0; }
.kpi-i:hover::after { content: attr(data-info); position: absolute; right: 0; top: 18px; width: 220px; background: #07080c; border: 1px solid var(--border-strong); border-radius: 8px; padding: 9px 11px; font-size: 12px; font-weight: 400; color: var(--text); line-height: 1.45; z-index: 50; box-shadow: var(--shadow); letter-spacing: 0; }
.kpi-sub { font-size: 11.5px; color: var(--muted-2); margin: 4px 0 10px; line-height: 1.3; }
.kpi-val { font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.kpi-na { color: var(--muted); font-size: 18px; font-style: italic; }
/* basic KPI карти с иконки (по мокъпа) */
.kpi-head2 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.kpi-ico { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; border: 1px solid; }
.kpi-cat { font-size: 9.5px; font-weight: 800; letter-spacing: 0.1em; }
.kpi-name { font-size: 13px; font-weight: 700; color: #cdd1de; margin-top: 5px; }
.kpi-subnote { font-size: 11.5px; font-weight: 500; color: var(--muted-2); margin-top: 1px; }
/* executive KPI карти (стойност + табелка + прогрес-барче) */
.kpi-exec .kpi-top { margin-bottom: 3px; }
.kpi-desc { font-size: 11.5px; font-weight: 500; color: var(--muted-2); line-height: 1.3; min-height: 30px; margin-bottom: 13px; }
.kpi-exec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
.kpi-bignum { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.kpi-pill { font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 7px; white-space: nowrap; }
.kpi-pill.good { color: var(--good); background: rgba(95, 214, 160, 0.12); }
.kpi-pill.mid { color: var(--mid); background: rgba(255, 193, 92, 0.12); }
.kpi-pill.weak { color: var(--bad); background: rgba(255, 111, 136, 0.12); }
.kpi-track { position: relative; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); }
.kpi-track i { display: block; height: 100%; border-radius: 3px; }
.kpi-track i.good { background: var(--good); } .kpi-track i.mid { background: var(--mid); } .kpi-track i.weak { background: var(--bad); }
.kpi-marker { position: absolute; top: -2.5px; left: 60%; width: 2px; height: 10px; border-radius: 1px; background: rgba(255, 255, 255, 0.4); }

/* Reels */
.rl-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.rl-sort { display: flex; flex-direction: column; gap: 8px; }
.rl-sort label { font-size: 11px; color: var(--muted-2); font-weight: 700; letter-spacing: .06em; }
.rl-sort select { height: 42px; background: var(--panel-2); border: 1px solid var(--border-strong); color: var(--text); padding: 0 16px; border-radius: 11px; font-size: 14px; font-weight: 700; font-family: inherit; outline: none; }
.rl-tools { display: flex; gap: 10px; }
.rl-tbtn { height: 42px; background: var(--panel-2); border: 1px solid var(--border-strong); color: var(--text-2); padding: 0 16px; border-radius: 11px; font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer; transition: border-color .15s; }
.rl-tbtn:hover { border-color: var(--teal); }
.rl-legend { font-size: 11px; color: var(--muted-2); font-weight: 700; letter-spacing: .06em; margin-bottom: 12px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.lg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #9197aa; font-weight: 700; letter-spacing: 0; }
.lg i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.rl-list { display: flex; flex-direction: column; gap: 12px; }
.rl-row { display: grid; grid-template-columns: 38px 1fr 300px 110px; gap: 18px; align-items: center; border-radius: var(--radius); padding: 18px 20px; }
.rl-rank { font-size: 17px; font-weight: 800; color: var(--muted-2); }
.rl-url { font-size: 14px; color: var(--text-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-date { font-size: 12px; color: var(--muted); font-weight: 600; margin: 8px 0 12px; }
.rl-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.rl-btn { font-size: 12px; font-weight: 700; padding: 7px 12px; border-radius: 9px; cursor: pointer; border: 1px solid var(--border); }
.rl-btn.dl { background: rgba(255, 255, 255, 0.05); color: #9197aa; border-color: var(--border-strong); }
.rl-btn.dl.disabled { color: var(--muted); cursor: not-allowed; opacity: .6; }
.rl-btn.save { background: rgba(124, 108, 255, 0.13); color: #a99cff; border-color: rgba(124, 108, 255, 0.3); }
.rl-btn.analyze { background: rgba(35, 196, 182, 0.13); color: #5fe0d0; border-color: rgba(35, 196, 182, 0.32); }
.rl-bars { display: flex; flex-direction: column; gap: 7px; }
.rl-metric { display: grid; grid-template-columns: 70px 1fr 56px; gap: 9px; align-items: center; }
.rl-ml { font-size: 10px; color: var(--muted-2); font-weight: 700; letter-spacing: .04em; text-align: right; }
.rl-bar { height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 99px; overflow: hidden; }
.rl-bar i { display: block; height: 100%; border-radius: 99px; }
.rl-mv { font-size: 12px; font-weight: 800; text-align: right; }
.rl-open { font-size: 12px; color: var(--text-2); border: 1px solid var(--border-strong); border-radius: 9px; padding: 9px 10px; text-align: center; font-weight: 700; transition: border-color .15s; }
.rl-open:hover { border-color: var(--teal); }
@media (max-width: 820px) { .rl-row { grid-template-columns: 1fr; } .rl-bars { order: 3; } }

/* Charts */
.ch-card { border-radius: 18px; padding: 22px 24px; margin-bottom: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)); }
.ch-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 820px) { .ch-row { grid-template-columns: 1fr; } }
.ch-head { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; margin-bottom: 18px; }
.ch-head h3 { margin: 0; font-size: 17px; font-weight: 800; color: #f1f2f8; position: relative; padding-left: 15px; }
.ch-head h3::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 18px; border-radius: 3px; background: var(--amber); }
.ch-sub { font-size: 13px; color: var(--muted-2); font-weight: 500; }
.ch-toggle, .ch-legend { margin-left: auto; display: flex; gap: 7px; flex-wrap: wrap; }
.ch-tg { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-strong); color: #aeb3c4; font-size: 13px; font-weight: 700; font-family: inherit; padding: 7px 14px; border-radius: 9px; cursor: pointer; }
.ch-tg.active { background: linear-gradient(135deg, var(--amber), var(--amber-2)); color: #2a1500; border-color: transparent; }
.ch-svg { width: 100%; height: auto; display: block; overflow: visible; }
.ch-foot { display: flex; gap: 16px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.ch-foot.heat-lg { align-items: center; gap: 8px; font-size: 12px; color: var(--muted); border: 0; }
.ch-legend .lg i { width: 10px; height: 10px; }
.chart-tip { display: none; position: fixed; z-index: 200; background: #07080c; border: 1px solid var(--border-strong); border-radius: 9px; padding: 9px 12px; font-size: 12.5px; line-height: 1.5; color: var(--text); pointer-events: none; box-shadow: var(--shadow); max-width: 220px; }
.chart-tip b { color: var(--teal); }

/* ════════════ WATCHLIST ════════════ */
.track-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--amber); font-weight: 700; cursor: pointer; white-space: nowrap; padding-bottom: 11px; }
.track-check input { width: 16px; height: 16px; accent-color: var(--amber); cursor: pointer; }
.wl-add { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.wl-add input[type="text"] { flex: 1; min-width: 220px; background: var(--panel-2); border: 1px solid var(--border-strong); color: var(--text); padding: 11px 13px; border-radius: 11px; font-size: 14px; font-family: inherit; outline: none; }
.wl-add input[type="text"]:focus { border-color: var(--amber); }
.wl-add select { background: var(--panel-2); border: 1px solid var(--border-strong); color: var(--text); padding: 11px 13px; border-radius: 11px; font-size: 14px; font-family: inherit; outline: none; }
.wl-add .btn { background: linear-gradient(135deg, var(--amber), var(--amber-2)); }
.wl-status { font-size: 13px; color: var(--muted); min-height: 18px; margin-bottom: 12px; }
.wgrid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 8px; }
.wcard { position: relative; display: flex; align-items: center; gap: 12px; border-radius: var(--radius); padding: 14px 16px; cursor: pointer; transition: transform .12s, border-color .15s; box-shadow: inset 2px 0 0 rgba(255, 184, 77, 0.6), var(--inset); }
.wcard:hover { transform: translateY(-2px); border-color: var(--amber); }
.wcard .wstar { color: var(--amber); font-size: 18px; flex-shrink: 0; }
.wcard .wbody { flex: 1; min-width: 0; }
.wcard .pname { font-weight: 800; font-size: 15px; margin-bottom: 5px; }
.wremove { position: absolute; top: 8px; right: 8px; background: none; border: 0; color: var(--muted); font-size: 13px; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.wremove:hover { color: var(--bad); background: rgba(255, 111, 136, 0.12); }

/* audit header track бутон */
.au-track { height: 44px; background: rgba(245, 166, 35, 0.12); border: 1px solid rgba(255, 193, 92, 0.55); color: #ffc878; font-size: 14px; font-weight: 800; padding: 0 18px; border-radius: 12px; font-family: inherit; cursor: pointer; transition: border-color .15s, background .15s; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.au-track:hover { border-color: var(--amber); }
.au-track.tracked { background: rgba(245, 166, 35, 0.18); border-color: var(--amber); }
.au-track:disabled { opacity: .6; cursor: wait; }

/* ── Тренд tab ── */
.trend-cta { text-align: center; padding: 48px 24px; }
.trend-cta h3 { margin: 0 0 10px; font-size: 20px; font-weight: 800; }
.trend-cta .trend-sub { color: var(--muted); font-size: 14px; max-width: 560px; margin: 0 auto 22px; line-height: 1.55; }
.btn.trend-run { font-size: 15px; padding: 13px 26px; }
.trend-err { color: var(--bad); background: rgba(255, 111, 136, 0.1); border: 1px solid rgba(255, 111, 136, 0.3); border-radius: 11px; padding: 11px 14px; font-size: 13px; max-width: 560px; margin: 0 auto 18px; }
.trend-prog { color: var(--text); font-size: 14px; margin: 14px 0 18px; min-height: 20px; }
.loadbar { height: 4px; background: var(--panel-2); border-radius: 99px; overflow: hidden; max-width: 360px; margin: 0 auto; position: relative; }
.loadbar i { position: absolute; left: -40%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, var(--amber), transparent); animation: loadslide 1.1s infinite linear; }
@keyframes loadslide { to { left: 100%; } }
.tr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tr-brief .tr-md { font-size: 14px; line-height: 1.6; color: var(--text-2); }
.tr-md p { margin: 0 0 10px; }
.tr-md ul { margin: 4px 0 14px; padding-left: 20px; }
.tr-md li { margin-bottom: 5px; }
.tr-md strong { color: var(--teal); }
.tr-bars { display: flex; flex-direction: column; gap: 7px; }
.tr-bar .rl-ml { min-width: 130px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tr-chip { background: var(--panel-2); border: 1px solid var(--border); border-radius: 99px; padding: 6px 12px; font-size: 13px; color: var(--text); }
.tr-chip.new { border-color: var(--amber); color: var(--amber); background: rgba(255, 184, 77, 0.08); font-weight: 700; }
.tr-chip b { color: var(--teal); margin-left: 4px; }
.tr-emerge-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.tr-lbl { color: var(--muted); font-size: 13px; font-weight: 700; }
.tr-cites { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 11px; }
.tr-cite { display: block; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px; text-decoration: none; color: var(--text); transition: border-color .15s, transform .12s; }
.tr-cite:hover { border-color: var(--teal); transform: translateY(-2px); }
.tr-cite-top { font-weight: 800; font-size: 13px; margin-bottom: 5px; display: flex; justify-content: space-between; gap: 8px; }
.tr-vel { color: var(--good); font-weight: 700; }
.tr-cite-cap { color: var(--muted); font-size: 12px; line-height: 1.45; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tr-cite-meta { color: var(--muted); font-size: 11px; }

/* ════════════ НАЧАЛЕН DASHBOARD (competitor-analysis дизайн) ════════════ */
.dash-wrap { max-width: 1480px; margin: 0 auto; padding: 34px 22px 80px; }
.dash { border-radius: 26px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.06); background: linear-gradient(180deg, #171922, #111219); box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.7); }

/* header */
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 30px 40px 26px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent); }
.brand { display: flex; align-items: center; gap: 15px; }
.brand .logo { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 25px; color: #062826; background: linear-gradient(150deg, var(--teal), #1f9bd6); box-shadow: 0 8px 22px -6px rgba(35, 196, 182, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.45); overflow: hidden; }
.brand .logo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.brand h1 { font-size: 22px; margin: 0; font-weight: 800; letter-spacing: -0.01em; }
.brand p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.dash-head-right { display: flex; align-items: center; gap: 10px; }
.active-pill { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 15px; border-radius: 11px; background: rgba(255, 255, 255, 0.045); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: #aeb3c4; }
.active-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.dash-head-right .niche-trend-btn { margin: 0; }

/* scrape конзола */
.console { display: flex; align-items: center; height: 62px; margin: 26px 40px; padding: 0 8px 0 18px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 16px 36px -26px rgba(0, 0, 0, 0.7); transition: border-color .15s; }
.console:focus-within { border-color: rgba(35, 196, 182, 0.55); }
.console-ico { color: #787e93; flex-shrink: 0; margin-right: 13px; }
.console input#target { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: 500 16px "Manrope", sans-serif; }
.console input#target::placeholder { color: #646a7e; }
.console-sep { width: 1px; height: 30px; background: rgba(255, 255, 255, 0.1); margin: 0 14px; flex-shrink: 0; }
.seg { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: rgba(0, 0, 0, 0.22); flex-shrink: 0; }
.seg-opt { display: flex; align-items: center; gap: 6px; padding: 7px 13px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 700 13px "Manrope", sans-serif; cursor: pointer; }
.seg-opt.active { background: rgba(255, 255, 255, 0.12); color: #f1f2f8; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.stepper { display: flex; align-items: center; gap: 9px; flex-shrink: 0; margin-right: 14px; }
.console-lbl { font-size: 13px; color: var(--muted); font-weight: 500; }
.stepper-box { display: flex; align-items: center; gap: 2px; height: 34px; padding: 0 4px; border-radius: 9px; background: rgba(0, 0, 0, 0.22); }
.stepper-box button { width: 24px; border: 0; background: none; color: #9aa0b5; font: 700 16px "Manrope", sans-serif; cursor: pointer; }
.stepper-box input { width: 30px; text-align: center; background: none; border: 0; outline: none; color: #f1f2f8; font: 800 16px "Manrope", sans-serif; -moz-appearance: textfield; }
.stepper-box input::-webkit-outer-spin-button, .stepper-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.console .btn { height: 46px; padding: 0 26px; flex-shrink: 0; }

/* тяло: rail + топ видеа */
.dash-body { display: flex; align-items: stretch; }
.rail { width: 392px; flex-shrink: 0; padding: 28px 26px 40px; border-right: 1px solid rgba(255, 255, 255, 0.07); background: linear-gradient(180deg, rgba(35, 196, 182, 0.06), rgba(35, 196, 182, 0.015) 38%, transparent 72%); }
.topv { flex: 1; min-width: 0; padding: 28px 34px 42px; }
.rail-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.tr-star { color: var(--mid); }
.rail-title { font-size: 18px; font-weight: 800; color: #eef0f7; }
.rail-badge { background: rgba(35, 196, 182, 0.18); color: #5fe0d0; font: 800 12px "Manrope", sans-serif; padding: 2px 9px; border-radius: 999px; }
.rail-sub { font-size: 12px; color: var(--muted-2); margin-bottom: 18px; }
.rail .wl-add { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.rail .wl-add input[type="text"] { min-width: 0; height: 46px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.09); padding: 0 15px; color: var(--text); font: 500 14px "Manrope", sans-serif; outline: none; }
.rail .wl-add input[type="text"]:focus { border-color: var(--teal); }
.wl-add-row { display: flex; gap: 10px; }
.wl-add-row select { flex: 1; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.09); padding: 0 14px; color: var(--text-2); font: 600 14px "Manrope", sans-serif; outline: none; }
.btn.ghost-teal { height: 44px; padding: 0 18px; white-space: nowrap; background: rgba(35, 196, 182, 0.16); border: 1px solid rgba(35, 196, 182, 0.4); color: #7fe9db; box-shadow: none; }
.track-list { display: flex; flex-direction: column; gap: 12px; }
.track-row { border-radius: 14px; padding: 15px 16px; cursor: pointer; background: linear-gradient(158deg, rgba(35, 196, 182, 0.1), rgba(255, 255, 255, 0.02)); border: 1px solid rgba(35, 196, 182, 0.26); transition: transform .12s, border-color .15s; }
.track-row:hover { transform: translateY(-2px); border-color: rgba(35, 196, 182, 0.5); }
.tr-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.tr-name { display: flex; align-items: center; gap: 9px; font: 800 15px "Manrope", sans-serif; color: #f1f2f8; min-width: 0; }
.tr-nametxt { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid rgba(255, 255, 255, 0.14); background: #2a2f40; }
.tr-avatar.mono { display: grid; place-items: center; color: #fff; font: 800 13px "Manrope", sans-serif; }
.tr-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tr-when { font-size: 12px; color: var(--muted); font-weight: 500; }
.tr-when b { color: #cdd1de; font-weight: 700; }

/* топ видеа таблица */
.topv-head { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; margin-bottom: 18px; }
.topv-title { font-size: 18px; font-weight: 800; color: #eef0f7; }
.pill-amber { background: rgba(245, 166, 35, 0.16); color: #ffc878; font: 700 12px "Manrope", sans-serif; padding: 2px 10px; border-radius: 999px; }
.topv-sub { font-size: 12px; color: var(--muted-2); }
.topv-thead, .topv-row { display: grid; grid-template-columns: 34px 2.2fr 1fr .9fr .9fr 1fr; gap: 14px; align-items: center; }
.topv-thead { padding: 0 16px 12px; border-bottom: 1px solid var(--border); font: 700 11px "Manrope", sans-serif; color: var(--muted-2); text-transform: uppercase; letter-spacing: .05em; }
.topv-row { padding: 13px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); cursor: pointer; }
.topv-row:hover { background: rgba(255, 255, 255, 0.03); }
.topv-row.first { background: linear-gradient(90deg, rgba(255, 193, 92, 0.07), transparent 60%); box-shadow: inset 2px 0 0 rgba(255, 193, 92, 0.75); }
.topv-rank { font: 800 17px "Manrope", sans-serif; color: #646a7e; text-align: center; }
.topv-rank.gold { color: var(--mid); }
.topv-vid { display: flex; align-items: center; gap: 13px; min-width: 0; }
.topv-thumb { flex-shrink: 0; display: grid; place-items: center; }
.topv-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid rgba(255, 255, 255, 0.16); background: #2a2f40; }
.topv-avatar.mono { display: grid; place-items: center; color: #fff; font: 800 15px "Manrope", sans-serif; }
.topv-ph { display: grid; place-items: center; width: 100%; height: 100%; }
.topv-cap { font: 600 14px "Manrope", sans-serif; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topv-acc { font: 700 13px "Manrope", sans-serif; color: #aeb3c4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topv-views { text-align: right; font: 800 15px "Manrope", sans-serif; color: #f1f2f8; }
.topv-eng { text-align: right; font: 800 13px "Manrope", sans-serif; }
.topv-eng.up { color: var(--good); }
.topv-eng.down { color: #d98a8a; }

/* анализирани грид под dashboard-а */
#view > .section-title { padding: 0 34px; }
#view > .grid { padding: 0 34px 36px; }

@media (max-width: 900px) {
  .dash-head, .console { margin: 18px; }
  .console { height: auto; flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
  .console input#target { flex: 1 1 100%; }
  .console-sep { display: none; }
  .dash-body { flex-direction: column; }
  .rail { width: auto; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
  .topv-thead { display: none; }
  .topv-thead, .topv-row { grid-template-columns: 28px 1fr auto auto; }
  .topv-row > div:nth-child(3) { display: none; }
  #view > .section-title, #view > .grid { padding-left: 18px; padding-right: 18px; }
}

/* ── Вход (login.html) ── */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px 28px;
  display: flex; flex-direction: column; gap: 14px; backdrop-filter: blur(10px);
}
.login-logo {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  font-weight: 800; font-size: 22px; color: #0c0d13;
  background: linear-gradient(135deg, var(--amber), var(--amber-2)); margin-bottom: 4px; overflow: hidden;
}
.login-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.login-card h1 { margin: 0; font-size: 21px; font-weight: 800; }
.login-sub { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.login-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.login-field input {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 11px;
  padding: 11px 13px; color: var(--text); font-size: 15px; font-family: inherit; outline: none;
}
.login-field input:focus { border-color: var(--accent); }
.login-btn { margin-top: 6px; justify-content: center; width: 100%; }
.login-error { color: var(--bad); font-size: 13px; min-height: 16px; text-align: center; }
.login-note { margin: 4px 0 0; color: var(--muted-2); font-size: 12px; text-align: center; }

/* ════════════ КЛАСАЦИЯ (leaderboard) ════════════ */
.lb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.lb-sub { color: var(--muted); font-size: 13px; font-weight: 500; margin-top: 4px; }
.lb-window .seg-opt { font-size: 13px; }
.lb-note { color: var(--muted-2); font-size: 12px; margin: 14px 4px 0; }

/* класация на криейтърите */
.lb-ctable { margin-top: 4px; }
.lb-thead, .lb-crow { display: grid; grid-template-columns: 34px 2.2fr .9fr .7fr .8fr .9fr 1.1fr 1fr; gap: 14px; align-items: center; }
.lb-thead { padding: 0 16px 12px; border-bottom: 1px solid var(--border); font: 700 11px "Manrope", sans-serif; color: var(--muted-2); text-transform: uppercase; letter-spacing: .05em; }
.lb-th { cursor: pointer; user-select: none; }
.lb-th:hover { color: var(--text-2); }
.lb-th.active { color: var(--teal); }
.lb-crow { padding: 13px 16px; border-radius: 12px; cursor: pointer; transition: background .12s; }
.lb-crow:hover { background: var(--surface-3); }
.lb-cname { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lb-cname .topv-avatar { width: 38px; height: 38px; }
.lb-nm { font: 700 14px "Manrope", sans-serif; color: var(--text-2); margin-right: 8px; }
.lb-num { text-align: right; font: 800 14px "Manrope", sans-serif; color: #f1f2f8; }
.lb-growth { font: 800 12.5px "Manrope", sans-serif; }
.lb-growth.up { color: var(--good); } .lb-growth.down { color: #d98a8a; } .lb-growth.flat { color: var(--muted); }
.lb-best { background: rgba(91, 140, 255, 0.14); color: var(--accent); border: 0; border-radius: 8px; padding: 5px 10px; font: 800 12px "Manrope", sans-serif; cursor: pointer; }
.lb-best:hover { background: rgba(91, 140, 255, 0.24); }
@media (max-width: 760px) {
  .lb-thead { display: none; }
  .lb-thead, .lb-crow { grid-template-columns: 28px 1.6fr .8fr .9fr; }
  .lb-crow > .lb-num:nth-of-type(n+3), .lb-crow > div:nth-last-child(2) { display: none; }
}

/* ════════════ СРАВНИ (compare) ════════════ */
.cmp-pickers { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 14px 0 26px; }
.cmp-select { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); border-radius: 10px; padding: 11px 14px; font: 600 14px "Manrope", sans-serif; min-width: 240px; cursor: pointer; }
.cmp-vs-sm { color: var(--muted); font: 800 12px "Manrope", sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.cmp-board { border: 1px solid var(--border); border-radius: 16px; padding: 8px 20px 22px; background: var(--surface); }
.cmp-heads { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 22px 0 8px; }
.cmp-phead { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.cmp-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.16); background: #2a2f40; }
.cmp-avatar.mono { display: grid; place-items: center; color: #fff; font: 800 22px "Manrope", sans-serif; }
.cmp-pname { font: 800 18px "Manrope", sans-serif; color: var(--text); }
.cmp-pmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.cmp-foll { color: var(--muted); font-size: 12px; font-weight: 600; }
.cmp-vs { font: 800 16px "Manrope", sans-serif; color: var(--muted-2); padding: 0 6px; }
.cmp-section { font: 800 12px "Manrope", sans-serif; text-transform: uppercase; letter-spacing: .07em; color: var(--teal); margin: 22px 0 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.cmp-row { display: grid; grid-template-columns: 1fr 2fr 1fr; align-items: center; gap: 16px; padding: 11px 6px; }
.cmp-row.basic { padding: 8px 6px; }
.cmp-v { font: 800 20px "Manrope", sans-serif; color: var(--text); }
.cmp-v.left { text-align: right; } .cmp-v.right { text-align: left; }
.cmp-v .kpi-na { font-size: 15px; }
.cmp-v.win { color: var(--good); }
.cmp-mid { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.cmp-klabel { display: flex; align-items: center; gap: 6px; font: 700 12.5px "Manrope", sans-serif; color: var(--muted); text-align: center; }
.cmp-bar { display: flex; width: 100%; height: 6px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, 0.06); }
.cmp-bar i.a { background: var(--accent); } .cmp-bar i.b { background: var(--amber); }
@media (max-width: 640px) { .cmp-v { font-size: 16px; } .cmp-select { min-width: 160px; } }

/* ═══ Езиков тогъл (BG/EN) — фиксиран горе вдясно ═══ */
.lang-toggle { position: fixed; top: 12px; right: 14px; z-index: 9999; display: inline-flex;
  background: rgba(46, 54, 78, 0.95); border: 1px solid rgba(255,255,255,0.22); border-radius: 999px;
  padding: 3px; gap: 2px; box-shadow: 0 6px 20px rgba(0,0,0,0.5); }
.lang-toggle button { border: 0; background: transparent; color: #c7cede; cursor: pointer;
  font: 800 12px "Manrope", sans-serif; letter-spacing: 0.5px; padding: 6px 12px; border-radius: 999px;
  transition: background .15s, color .15s; }
.lang-toggle button:hover { color: #fff; background: rgba(255,255,255,0.08); }
.lang-toggle button.on { background: var(--accent, #3ad0c4); color: #06231f; }
.lang-toggle button.on:hover { color: #06231f; }

/* ════════════════════ TREND FINDER (ниши) ════════════════════ */
#view { padding: 26px 40px 48px; }
.btn.ghost { background: rgba(255,255,255,0.05); border: 1px solid var(--border-strong); color: var(--text-2); box-shadow: none; }

/* ── HERO ── */
.nf-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(99,102,241,0.16), rgba(139,92,246,0.10) 60%, transparent);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px 28px; margin-bottom: 26px; }
.nf-hero-tag { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: var(--teal); margin-bottom: 8px; }
.nf-hero h2 { margin: 0 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.nf-hero p { margin: 0; color: var(--muted); font-size: 14px; max-width: 480px; }
.nf-section-title { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 14px; }

/* ── NICHE CARDS ── */
.nf-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.nf-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 18px 16px; box-shadow: var(--inset), var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.nf-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nf-card-name { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 16px; }
.nf-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(255,255,255,0.05); }
.nf-badge { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 7px; white-space: nowrap; }
.nf-badge.ok { background: rgba(95,214,160,0.14); color: var(--good); }
.nf-badge.muted { background: rgba(255,255,255,0.06); color: var(--muted); }
.nf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nf-chips.center { justify-content: center; margin-top: 14px; }
.nf-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 3px 10px 3px 3px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.nf-chip-av { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.nf-chip-av.mono { display: grid; place-items: center; font-size: 9px; font-weight: 800; color: #fff; }
.nf-chip.more { padding: 3px 10px; color: var(--muted); }
.nf-chip.add { cursor: pointer; padding: 4px 11px; border-style: dashed; color: var(--teal); background: none; }
.nf-chip.add:hover { background: rgba(35,196,182,0.1); }
.nf-empty-chip { font-size: 12px; color: var(--muted-2); font-style: italic; }
.nf-chip-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; margin-left: 2px; }
.nf-chip-x:hover { color: var(--bad); }
.nf-stats, .nf-detail-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px 0; border-top: 1px solid var(--border); }
.nf-stats div, .nf-detail-stats div { text-align: center; }
.nf-stats b, .nf-detail-stats b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.nf-stats b.hl, .nf-detail-stats b.hl { color: var(--amber); }
.nf-stats span, .nf-detail-stats span { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); }
.nf-card-actions { display: flex; gap: 8px; }
.nf-card-actions .btn { flex: 1; height: 40px; padding: 0 10px; font-size: 13px; }
.nf-icon-btn { width: 40px; flex-shrink: 0; border: 1px solid var(--border-strong); background: rgba(255,255,255,0.03); color: var(--muted); border-radius: 10px; cursor: pointer; font-size: 15px; }
.nf-icon-btn:hover { color: var(--bad); border-color: rgba(255,111,136,0.4); }

/* ── DETAIL ── */
.nf-detail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.nf-back { color: var(--muted); font-size: 13px; font-weight: 600; }
.nf-back:hover { color: var(--text); }
.nf-detail-title h2 { margin: 8px 0 0; font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.nf-detail-actions { display: flex; gap: 10px; }
.nf-detail-stats { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 20px; padding: 16px 0; }
.nf-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.nf-toolbar-l { font-size: 13px; font-weight: 700; color: var(--muted); }
.nf-toolbar-r { display: flex; gap: 10px; align-items: center; }
.nf-toggle { border: 1px solid var(--border-strong); background: rgba(255,255,255,0.04); color: var(--muted); border-radius: 9px; padding: 8px 13px; font: 700 13px "Manrope"; cursor: pointer; }
.nf-toggle.on { background: linear-gradient(135deg, var(--amber), var(--amber-2)); color: #2a1500; border-color: transparent; }
.nf-select { border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); border-radius: 9px; padding: 8px 12px; font: 700 13px "Manrope"; cursor: pointer; }
.nf-accounts-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }

/* ── READY / EMPTY ── */
.nf-ready { text-align: center; padding: 60px 20px; }
.nf-ready-ico { width: 64px; height: 64px; border-radius: 50%; background: rgba(35,196,182,0.12); color: var(--teal); display: grid; place-items: center; font-size: 28px; margin: 0 auto 16px; }
.nf-ready h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.nf-ready p { margin: 0; color: var(--muted); font-size: 14px; }

/* ── REEL GRID ── */
.nf-reels { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.nf-reel { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.12s, border-color 0.12s; }
.nf-reel:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.nf-reel-thumb { position: relative; aspect-ratio: 9/14; background: linear-gradient(160deg, #2a2d3a, #191b24); overflow: hidden; }
.nf-reel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nf-mult { position: absolute; top: 8px; left: 8px; background: rgba(20,22,30,0.85); color: #cfd3e6; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 7px; backdrop-filter: blur(4px); }
.nf-mult.trending { background: linear-gradient(135deg, var(--amber), var(--amber-2)); color: #2a1500; box-shadow: 0 4px 14px -4px rgba(245,150,35,0.7); }
.nf-reel-handle { position: absolute; left: 8px; bottom: 8px; background: rgba(20,22,30,0.8); color: #e7e9f2; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 20px; max-width: calc(100% - 60px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nf-reel-dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,0.7); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.nf-reel-body { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 8px; }
.nf-reel-date { font-size: 11px; color: var(--muted-2); font-weight: 600; }
.nf-reel-metrics { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--text-2); }
.nf-reel-rates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.nf-rate { background: var(--surface-2); border-radius: 7px; padding: 5px 4px; text-align: center; font-size: 9px; font-weight: 700; letter-spacing: 0.03em; color: var(--muted); }
.nf-rate b { display: block; font-size: 12px; color: var(--text); margin-bottom: 1px; }
.nf-rate.hl { background: rgba(245,166,35,0.12); }
.nf-rate.hl b { color: var(--amber); }

/* ── SCAN OVERLAY (ring loader) ── */
.nf-ring { position: relative; width: 130px; height: 130px; margin-bottom: 20px; }
.nf-ring svg { transform: rotate(-90deg); width: 130px; height: 130px; }
.nf-ring-bg { fill: none; stroke: rgba(255,255,255,0.09); stroke-width: 8; }
.nf-ring-fg { fill: none; stroke: url(#g); stroke: var(--teal); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 0.4s ease; }
.nf-ring-pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; font-weight: 800; color: var(--text); }
.nf-scan-log { margin-top: 20px; width: min(440px, 90vw); max-height: 180px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.nf-scan-line { font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 8px; background: rgba(255,255,255,0.04); color: var(--muted); }
.nf-scan-line.ok { color: var(--good); }
.nf-scan-line.err { color: var(--bad); }

/* ── MODALS ── */
.nf-modal-host { position: fixed; inset: 0; z-index: 200; }
.nf-modal-bg { position: absolute; inset: 0; background: rgba(8,9,13,0.7); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 24px; }
.nf-modal { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-pop); }
.nf-modal h3 { margin: 0 0 4px; font-size: 19px; font-weight: 800; }
.nf-modal-sub { margin: 0 0 18px; font-size: 13px; color: var(--muted); }
.nf-label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin: 14px 0 6px; }
.nf-input { width: 100%; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 10px; padding: 11px 13px; color: var(--text); font: 600 14px "Manrope"; }
.nf-input:focus { outline: none; box-shadow: var(--ring); }
.nf-textarea { min-height: 130px; resize: vertical; font-family: "Manrope", monospace; line-height: 1.6; }
.nf-drop { margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border: 1.5px dashed var(--border-strong); border-radius: 10px; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s, color .15s; text-align: center; }
.nf-drop:hover { border-color: var(--accent, #6366f1); color: var(--text); }
.nf-drop.drag { border-color: var(--accent, #6366f1); border-style: solid; background: color-mix(in srgb, var(--accent, #6366f1) 8%, transparent); color: var(--text); }
.nf-drop .nf-drop-ico { font-size: 16px; opacity: .8; }
.nf-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.nf-sw { width: 30px; height: 30px; border-radius: 9px; border: 2px solid transparent; cursor: pointer; }
.nf-sw.sel { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,0.15); }
.nf-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.nf-modal #nfPlat { margin-top: 2px; }

/* ── TOAST ── */
.nf-toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text); padding: 12px 20px; border-radius: 12px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-pop); z-index: 300; opacity: 0; transition: opacity 0.25s, transform 0.25s; }
.nf-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 640px) {
  #view { padding: 18px 16px 40px; }
  .nf-cards { grid-template-columns: 1fr; }
  .nf-reels { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ════════════════════ APP SHELL: ляв SIDEBAR (Statly-style ергономия) ════════════════════ */
body.has-side { padding-left: 220px; }
body.has-side #langToggle { display: none; }
.side { position: fixed; left: 0; top: 0; bottom: 0; width: 220px; z-index: 60;
  display: flex; flex-direction: column; padding: 18px 12px 16px;
  background: #101219; border-right: 1px solid var(--border); }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; }
.side-brand img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; display: block;
  box-shadow: 0 6px 16px -6px rgba(35, 196, 182, 0.5); }
.side-brand span { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; color: var(--text); }
.side-sec { font-size: 10px; font-weight: 800; letter-spacing: 0.12em; color: var(--muted-2); padding: 8px 10px 7px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 11px; padding: 10px 10px; border-radius: 10px;
  color: var(--muted); font-size: 13.5px; font-weight: 700; cursor: pointer; border: 0; background: none;
  font-family: inherit; text-align: left; width: 100%; transition: background .12s, color .12s; }
.side-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.side-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.045); }
.side-link.on { color: var(--text); background: rgba(35, 196, 182, 0.13); }
.side-link.on svg { color: var(--teal); }
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.side-lang { display: flex; gap: 4px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
  border-radius: 10px; padding: 3px; }
.side-lang button { flex: 1; border: 0; background: none; color: var(--muted); cursor: pointer;
  font: 800 12px "Manrope", sans-serif; letter-spacing: 0.4px; padding: 7px 0; border-radius: 8px;
  transition: background .12s, color .12s; }
.side-lang button:hover { color: var(--text); }
.side-lang button.on { background: rgba(35, 196, 182, 0.18); color: #7fe9db; }
.side-logout:hover { color: var(--bad); background: rgba(255, 111, 136, 0.08); }

/* ── страница без dash-кутия ── */
.page { max-width: 1180px; margin: 0 auto; padding: 34px 30px 80px; }
.page-wide { max-width: 1380px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.page-head p { margin: 5px 0 0; font-size: 13.5px; color: var(--muted); }
.page .console { margin: 0 0 30px; }
.page #view { padding: 0; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--inset), var(--shadow); padding: 22px 24px; }
.panel + .panel { margin-top: 18px; }
.page .section-title { padding: 0; }
.page .grid { padding: 0; }

/* ════════════ WATCHLIST страница ════════════ */
.wl-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(35, 196, 182, 0.14), rgba(31, 155, 214, 0.08) 60%, transparent);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px 28px; margin-bottom: 22px; }
.wl-hero-tag { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: var(--teal); margin-bottom: 8px; }
.wl-hero h2 { margin: 0 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.wl-hero p { margin: 0; color: var(--muted); font-size: 14px; max-width: 460px; }
.wl-hero-stats { display: flex; gap: 10px; }
.wl-stat { min-width: 96px; text-align: center; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; }
.wl-stat b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.wl-stat span { font-size: 9.5px; font-weight: 800; letter-spacing: 0.08em; color: var(--muted); }
.wl-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.wl-bar input[type="text"] { flex: 1; min-width: 230px; height: 46px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border-strong); padding: 0 15px;
  color: var(--text); font: 500 14px "Manrope", sans-serif; outline: none; }
.wl-bar input[type="text"]:focus { border-color: var(--teal); }
.wl-bar select { height: 46px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border-strong);
  padding: 0 14px; color: var(--text-2); font: 600 14px "Manrope", sans-serif; outline: none; }
.wl-rows { display: flex; flex-direction: column; }
.wl-row { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 16px; align-items: center;
  padding: 14px 16px; border-radius: 12px; cursor: pointer; transition: background .12s; }
.wl-row:hover { background: rgba(255, 255, 255, 0.03); }
.wl-row + .wl-row { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.wl-row .tr-avatar { width: 40px; height: 40px; }
.wl-row-id { min-width: 0; }
.wl-row-name { font: 800 14.5px "Manrope", sans-serif; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-row-meta { display: flex; align-items: center; gap: 9px; margin-top: 4px; flex-wrap: wrap; }
.wl-row-when { font-size: 12px; color: var(--muted); font-weight: 500; }
.wl-row-when b { color: #cdd1de; font-weight: 700; }
.wl-open { font-size: 12.5px; color: var(--text-2); border: 1px solid var(--border-strong); border-radius: 9px;
  padding: 8px 13px; font-weight: 700; transition: border-color .15s, color .15s; white-space: nowrap; }
.wl-open:hover { border-color: var(--teal); color: var(--teal); }
.wl-x { background: none; border: 0; color: var(--muted); font-size: 15px; cursor: pointer;
  padding: 6px 8px; border-radius: 8px; }
.wl-x:hover { color: var(--bad); background: rgba(255, 111, 136, 0.12); }
@media (max-width: 640px) { .wl-row { grid-template-columns: auto 1fr auto; } .wl-row > .badge-pill, .wl-open { display: none; } }

/* ════════════ TREND FINDER: ляв под-панел с нишите ════════════ */
.nf-layout { display: grid; grid-template-columns: 250px 1fr; gap: 26px; align-items: start; }
.nf-sidepanel { position: sticky; top: 26px; display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px 14px; box-shadow: var(--inset), var(--shadow); max-height: calc(100vh - 52px); overflow-y: auto; }
.nf-side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nf-side-top span { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: var(--muted-2); }
.nf-new-btn { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.nf-side-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.nf-side-stats div { text-align: center; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 4px; }
.nf-side-stats b { display: block; font-size: 15px; font-weight: 800; }
.nf-side-stats span { font-size: 8.5px; font-weight: 800; letter-spacing: 0.07em; color: var(--muted-2); }
.nf-tree { display: flex; flex-direction: column; gap: 2px; }
.nf-tree-niche { display: flex; align-items: center; gap: 8px; padding: 8px 8px; border-radius: 9px;
  cursor: pointer; font-size: 13px; font-weight: 700; color: var(--text-2); transition: background .12s; }
.nf-tree-niche:hover { background: rgba(255, 255, 255, 0.045); }
.nf-tree-niche.on { background: rgba(35, 196, 182, 0.12); color: var(--text); }
.nf-tree-niche .nf-dot { width: 9px; height: 9px; box-shadow: none; }
.nf-tree-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nf-tree-count { font-size: 11px; font-weight: 800; color: var(--muted-2); }
.nf-tree-caret { border: 0; background: none; color: var(--muted-2); cursor: pointer; font-size: 11px;
  padding: 2px 4px; transition: transform .15s; }
.nf-tree-caret.open { transform: rotate(90deg); }
.nf-tree-accts { display: none; flex-direction: column; gap: 1px; padding: 2px 0 6px 14px; }
.nf-tree-accts.open { display: flex; }
.nf-tree-acct { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 7px;
  font-size: 12px; font-weight: 600; color: var(--muted); }
.nf-tree-acct:hover { background: rgba(255, 255, 255, 0.035); color: var(--text-2); }
.nf-tree-acct .nf-chip-av { width: 18px; height: 18px; }
.nf-tree-acct span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nf-tree-x { border: 0; background: none; color: var(--muted-2); cursor: pointer; font-size: 13px; padding: 0 3px; border-radius: 5px; opacity: 0; }
.nf-tree-acct:hover .nf-tree-x { opacity: 1; }
.nf-tree-x:hover { color: var(--bad); }
.nf-tree-add { border: 0; background: none; color: var(--teal); cursor: pointer; text-align: left;
  font: 700 12px "Manrope", sans-serif; padding: 5px 6px; border-radius: 7px; }
.nf-tree-add:hover { background: rgba(35, 196, 182, 0.1); }
.nf-tree-empty { font-size: 12px; color: var(--muted-2); font-style: italic; padding: 6px 8px; }
.nf-scanall { height: 40px; font-size: 13px; padding: 0 12px; }
.nf-main { min-width: 0; }
@media (max-width: 980px) {
  .nf-layout { grid-template-columns: 1fr; }
  .nf-sidepanel { position: static; max-height: none; }
}

/* ════════════ COMPARE: центриран прозорец ════════════ */
.cmp-stage { display: flex; justify-content: center; padding: 8px 0 26px; }
.cmp-stage.tall { min-height: calc(100vh - 320px); align-items: center; }
.cmp-card { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-pop); }
.cmp-card h3 { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.cmp-card .cmp-select { width: 100%; min-width: 0; }
.cmp-note { margin-top: 14px; font-size: 12px; color: var(--muted-2); text-align: center; }

/* ── мобилен: sidebar → горна лента ── */
@media (max-width: 860px) {
  body.has-side { padding-left: 0; padding-top: 58px; }
  .side { right: 0; bottom: auto; width: auto; height: 58px; flex-direction: row; align-items: center;
    gap: 4px; padding: 0 10px; border-right: 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
  .side-brand { padding: 0 6px 0 0; }
  .side-brand span, .side-sec, .side-link span { display: none; }
  .side-nav { flex-direction: row; }
  .side-link { padding: 9px; width: auto; }
  .side-bottom { margin-top: 0; margin-left: auto; flex-direction: row; align-items: center; }
  .page { padding: 20px 16px 60px; }
}
