@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --bg:#090e18; --card:#0c1426; --ink:#e6e7ea; --muted:#9aa3b2;
  --stroke:#1b2740; --accent:#60a5fa; --up:#22c55e; --down:#ef4444;
  --warn:#f59e0b;
  --badge-up-bg:#122018; --badge-up-border:#1a3a22;
  --badge-down-bg:#22100f; --badge-down-border:#3a1a1a;
  --badge-warn-bg:#22180a; --badge-warn-border:#3a2a10;
  --surface:#0a1222; --surface2:#071225; --surface3:#0c1830;
  --overlay:rgba(9,14,24,.94);
  --ink3:#93c5fd; --stroke-h:#263a5c;
  --cols:4; --gap:10px; --chart-h:30vh;
  --shadow:0 4px 24px rgba(0,0,0,.28);
  --left-w:0px; --right-w:0px;
  --font: 'DM Sans', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

/* ── Light theme ─────────────────────────────────────────── */
[data-theme="light"] {
  --bg:#f4f6fb; --card:#ffffff; --ink:#111827; --muted:#6b7280;
  --stroke:#e2e8f0; --accent:#2563eb; --up:#16a34a; --down:#dc2626;
  --warn:#d97706;
  --badge-up-bg:#dcfce7; --badge-up-border:#86efac;
  --badge-down-bg:#fee2e2; --badge-down-border:#fca5a5;
  --badge-warn-bg:#fef3c7; --badge-warn-border:#fcd34d;
  --surface:#f1f5fb; --surface2:#e8eef7; --surface3:#ffffff;
  --overlay:rgba(244,246,251,.96);
  --ink3:#1e40af; --stroke-h:#bfdbfe;
  --shadow:0 4px 24px rgba(0,0,0,.10);
}
[data-theme="light"] select,
[data-theme="light"] option { color-scheme:light; background:var(--surface3); color:var(--ink); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background:var(--muted); }
[data-theme="light"] .wl-row:hover,
[data-theme="light"] .wl-row.active { background:var(--surface2); border-color:var(--accent); }
[data-theme="light"] .panel-ear:hover { background:var(--surface2); }
[data-theme="light"] .panel-ear.active { background:var(--surface); color:var(--accent); border-color:var(--accent); }
[data-theme="light"] #earRight .ear-btn:hover { background:var(--surface2); }
[data-theme="light"] .stab.active { background:var(--surface2); border-color:var(--accent); color:var(--accent); }
[data-theme="light"] .icon-btn:hover { background:var(--surface2); }
[data-theme="light"] .alm-bell:hover { background:var(--surface2) !important; border-color:var(--stroke) !important; }
[data-theme="light"] .sym-item:hover,
[data-theme="light"] .sym-item.active { background:var(--surface2); }
[data-theme="light"] .sym-item { border-bottom-color:var(--stroke); }
[data-theme="light"] .sym-item .si-sym { color:var(--accent); }
[data-theme="light"] .sym-item .si-ex { color:var(--muted); }
[data-theme="light"] .news-run-table tr:hover td { background:var(--surface2); }
[data-theme="light"] .news-run-table th { border-bottom-color:var(--stroke); }
[data-theme="light"] .news-run-table td { border-bottom-color:var(--stroke); }
[data-theme="light"] .nrt-ticker { color:var(--accent); }
[data-theme="light"] .nrt-zero { color:var(--muted); }
[data-theme="light"] .atm-pill.on { background:var(--surface2); border-color:var(--accent); color:var(--accent); }
[data-theme="light"] .atm-btn-add { background:var(--surface2) !important; border-color:var(--accent) !important; color:var(--accent) !important; }
[data-theme="light"] .atm-btn-add:hover { background:var(--surface) !important; }
[data-theme="light"] .card.drop-over { background:#dbeafe; }
[data-theme="light"] .dbg-item { background:var(--surface); }
[data-theme="light"] .dbg-cat { color:var(--ink); background:var(--surface2); }
[data-theme="light"] .dbg-lat { background:var(--surface2); border-color:var(--stroke); color:var(--ink3); }
[data-theme="light"] .dbg-lat.lat-med { border-color:var(--warn); color:var(--warn); }
[data-theme="light"] .dbg-lat.lat-slow { border-color:var(--down); color:var(--down); }
[data-theme="light"] .dbg-status.st-ok { color:#166534; border-color:#166534; background:#dcfce7; }
[data-theme="light"] .dbg-status.st-err { color:var(--down); border-color:var(--down); background:#fee2e2; }
[data-theme="light"] .dbg-kv .dbg-v { color:var(--ink); background:var(--surface); }
[data-theme="light"] .lvl-TRACE .dbg-msg { color:#0284c7; }
[data-theme="light"] .lvl-WARN  .dbg-msg { color:var(--warn); }
[data-theme="light"] .lvl-ERROR .dbg-msg { color:var(--down); }
[data-theme="light"] .wl-def-badge { background:#fef3c7; color:#92400e; border-color:#d97706; }
[data-theme="light"] .sck-badge.user { background:#dbeafe; border-color:var(--accent); color:var(--accent); }
[data-theme="light"] .sck-badge.backend { background:#fef3c7; border-color:#d97706; color:#92400e; }
[data-theme="light"] abbr.wg-tip { text-decoration-color:var(--accent); }
[data-theme="light"] .bp-bar-fill { background:var(--muted); }
[data-theme="light"] .pt-bar-dot { background:var(--ink); border-color:var(--surface3); }
[data-theme="light"] .mega-pt-bar-dot { background:var(--ink); border-color:var(--surface3); }

*, *::before, *::after { box-sizing: border-box; margin:0; padding:0; }
html, body { height:100%; }
body {
  background:var(--bg); color:var(--ink);
  font: 13px/1.5 var(--font);
}
select, option { color-scheme:dark; background:var(--surface); color:var(--ink); }
button { font: inherit; cursor: pointer; }
input { font: inherit; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:#1b2740; border-radius:4px; }

/* ── Toast ─────────────────────────────────────────────────── */
.toast {
  position:fixed; right:14px; bottom:14px; z-index:200;
  background:var(--surface); border:1px solid var(--stroke);
  color:var(--ink3); font-size:12px; padding:8px 14px;
  border-radius:10px; opacity:0; transition:opacity .15s ease;
  pointer-events:none;
}

/* ── Header ────────────────────────────────────────────────── */
header.app {
  position:sticky; top:0; z-index:40;
  background:var(--overlay); backdrop-filter:blur(8px);
  border-bottom:1px solid var(--stroke);
  padding: 0 12px;
  padding-left: calc(12px + var(--left-w));
  padding-right: calc(12px + var(--right-w));
  transition: padding .22s ease;
}
.hrow { display:flex; gap:6px; align-items:center; padding:7px 0; flex-wrap:wrap; }
.chip {
  display:inline-flex; align-items:center; gap:5px;
  padding:5px 9px; background:var(--surface); border:1px solid var(--stroke);
  border-radius:8px; color:var(--ink); white-space:nowrap;
  font-size:12px;
}
.chip label { color:var(--muted); font-size:11px; }
.chip select, .chip input[type=range], .chip input[type=text] {
  background:transparent; border:none; color:var(--ink); font:inherit;
  outline:none;
}
.chip select { padding-right:4px; }
.chip input[type=range] { width:110px; accent-color:var(--accent); }
.chip input[type=text] { width:150px; }
.chip input[type=text]::placeholder { color:var(--muted); }
.hbtn {
  display:inline-flex; align-items:center; gap:5px;
  padding:5px 10px; background:var(--surface); border:1px solid var(--stroke);
  border-radius:8px; color:var(--ink); font-size:12px;
  transition: border-color .15s;
}
.hbtn:hover { border-color:var(--stroke-h); }
.hbtn-accent { border-color:rgba(96,165,250,.4); color:var(--accent); background:rgba(96,165,250,.07); font-weight:600; }
.hbtn-accent:hover { border-color:rgba(96,165,250,.6); }
.hbtn-icon { padding:5px 8px; font-size:14px; }
.hdiv { width:1px; height:18px; background:var(--stroke); flex-shrink:0; }
.h-spacer { flex:1 1 auto; min-width:4px; }
#btnLockCharts { transition: border-color .15s, transform .1s; }
#btnLockCharts:active { transform: scale(0.88); }

/* ── Settings panel ────────────────────────────────────────── */
.settings-wrap {
  overflow:hidden; max-height:0;
  border-top:1px dashed var(--stroke);
  transition: max-height .3s ease;
}
header.app.open .settings-wrap { max-height:calc(100vh - 120px); overflow-y:auto; overflow-x:hidden; }
.stabs { display:flex; gap:6px; padding:8px 0 6px; }
.stab {
  padding:5px 10px; border:1px solid var(--stroke); border-radius:8px;
  background:var(--surface); color:var(--ink); font-size:12px;
  transition: background .12s;
}
.stab.active { background:#182541; border-color:#2a3f66; color:var(--ink3); }
.spanes { border:1px solid var(--stroke); border-radius:10px; background:var(--surface); padding:10px; margin-bottom:10px; }
.spane { display:none; } .spane.active { display:block; }
.frow { display:flex; gap:8px; align-items:center; margin:7px 0; flex-wrap:wrap; font-size:12.5px; }
.finput {
  padding:5px 8px; border-radius:8px; border:1px solid var(--stroke);
  background:var(--surface); color:var(--ink); font:inherit;
}
.finput.num { width:82px; text-align:right; }
.finput.wide { min-width:180px; }
.finput.time { width:100px; }
.btn-small {
  padding:4px 8px; border-radius:7px; border:1px solid var(--stroke);
  background:var(--surface); color:var(--ink); font-size:12px;
}
.btn-small:hover { border-color:var(--stroke-h); }
.note { color:var(--muted); font-size:11px; margin-top:4px; }
.vsep { height:1px; background:var(--stroke); margin:7px 0; }
.ftag { font-size:10px; padding:2px 6px; border:1px solid var(--stroke); border-radius:999px; color:var(--muted); }
.flist { display:flex; gap:6px; flex-wrap:wrap; }

/* ── Ears ──────────────────────────────────────────────────── */
/* ── Panel ear (ouško — fixní, pozice řízena JS) ────────── */
.panel-ear {
  position:fixed; z-index:51; width:28px;
  writing-mode:vertical-rl; text-orientation:mixed;
  padding:10px 7px; font-size:11px; letter-spacing:.5px;
  background:var(--surface); border:1px solid var(--stroke); color:var(--ink3);
  border-left:none; border-radius:0 8px 8px 0;
  cursor:pointer; user-select:none; white-space:nowrap;
  transition: left .22s ease, top .22s ease, background .12s;
}
.panel-ear:hover { background:#111e38; }
.panel-ear.active { background:#0f1e3a; color:var(--ink3); border-color:#3b82f6; }

#earRight { position:fixed; top:50%; transform:translateY(-50%); right:0; z-index:50; }
#earRight .ear-btn {
  writing-mode:vertical-rl; text-orientation:mixed;
  padding:8px 7px; font-size:11px; letter-spacing:.5px;
  background:var(--surface); border:1px solid var(--stroke); color:var(--ink3);
  border-right:none; border-radius:8px 0 0 8px; cursor:pointer;
  transition: background .12s;
}
#earRight .ear-btn:hover { background:#111e38; }

/* ── Side panels ─────────────────────────────────────────── */
.side-panel {
  position:fixed; top:0; height:100%; z-index:45;
  background:var(--surface); display:flex; flex-direction:column;
  transition: width .22s ease, left .22s ease;
  width:0; left:0; overflow:visible;
}
.side-panel .panel-head,
.side-panel .panel-body,
.side-panel .dbg-nsbar,
.side-panel .dbg-controls,
.side-panel .dbg-log {
  overflow:hidden;
  transition: opacity .15s ease;
}
.side-panel:not(.open) .panel-head,
.side-panel:not(.open) .panel-body { opacity:0; pointer-events:none; }
#sidePanel   { border-right:1px solid var(--stroke); box-shadow:6px 0 24px rgba(0,0,0,.35); }
#targetPanel { border-right:1px solid var(--stroke); box-shadow:6px 0 24px rgba(0,0,0,.35); }
#debugPanel  {
  right:0; left:auto; width:360px;
  border-left:1px solid var(--stroke);
  box-shadow:-6px 0 24px rgba(0,0,0,.35);
  transform: translateX(100%); transition: transform .22s ease;
}
#debugPanel.open { transform:translateX(0); }

.panel-head {
  display:flex; align-items:center; justify-content:space-between;
  gap:6px; padding:8px 10px; border-bottom:1px solid var(--stroke);
  font-weight:600; font-size:13px; flex-shrink:0;
}
.panel-body { flex:1; overflow-y:auto; padding:8px; }

/* watchlist rows */
.wl-row {
  display:flex; align-items:center; gap:6px;
  padding:6px 8px; border:1px solid var(--stroke); border-radius:8px;
  background:var(--surface); cursor:pointer; margin-bottom:6px;
  transition: border-color .12s, background .12s;
}
.wl-row:hover, .wl-row.active { background:#0f1e38; border-color:#2a3f66; }
.wl-name { font-size:12.5px; font-weight:600; flex:1; }
.wl-cnt  { font-size:11px; color:var(--muted); }
.wl-def-badge {
  font-size:10px; color:#fbbf24; background:#1c1400;
  border:1px solid #78350f; border-radius:4px; padding:1px 5px;
  white-space:nowrap;
}

/* ── Debug panel internals ─────────────────────────────────── */
.dbg-controls {
  display:flex; gap:5px; align-items:center; flex-wrap:wrap;
  padding:7px 10px; border-bottom:1px solid var(--stroke); flex-shrink:0;
}
.dbg-controls .finput { padding:4px 7px; font-size:11px; }
.dbg-filters { display:flex; flex-wrap:wrap; gap:5px; padding:6px 10px; border-bottom:1px dashed var(--stroke); flex-shrink:0; }
.dbg-body { flex:1; overflow-y:auto; padding:8px; font-family:var(--mono); font-size:11px; }
.dbg-item { border:1px solid var(--stroke); border-radius:7px; padding:5px 8px; margin-bottom:4px; background:var(--surface2); }
.dbg-meta { display:flex; gap:5px; align-items:center; flex-wrap:wrap; margin-bottom:2px; }
.dbg-ts   { color:#4b6fa8; font-size:10px; min-width:70px; }
.dbg-lvl  { font-size:10px; font-weight:700; min-width:58px; }
.dbg-cat  { font-size:10px; color:#7ca4d4; background:#0c1f3a; border-radius:4px; padding:1px 5px; }
.dbg-op   { font-size:10px; color:var(--muted); font-style:italic; flex:1; }
.dbg-lat  { font-size:10px; background:#0e1c35; border:1px solid #1e3a5f; border-radius:4px; padding:1px 5px; color:var(--ink3); }
.dbg-lat.lat-med  { border-color:#92400e; color:#fde68a; }
.dbg-lat.lat-slow { border-color:#7f1d1d; color:#fca5a5; }
.dbg-status { font-size:10px; border-radius:4px; padding:1px 5px; border:1px solid; }
.dbg-status.st-ok  { color:#86efac; border-color:#166534; background:#052e16; }
.dbg-status.st-err { color:#fca5a5; border-color:#7f1d1d; background:#2d0a0a; }
.dbg-msg  { color:var(--ink); font-size:11px; margin-bottom:2px; }
.dbg-kv   { display:flex; flex-wrap:wrap; gap:4px; margin-top:2px; }
.dbg-kv .dbg-k { color:#64748b; font-size:10px; }
.dbg-kv .dbg-k::after { content:':'; margin-right:2px; }
.dbg-kv .dbg-v { color:#cbd5e1; font-size:10px; background:var(--surface); border-radius:3px; padding:0 4px; max-width:200px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lvl-TRACE .dbg-msg { color:#7dd3fc; }
.lvl-WARN  .dbg-msg { color:#fde68a; }
.lvl-ERROR .dbg-msg { color:#fca5a5; }
.dbg-nsbar { font-size:11px; font-family:var(--mono); color:var(--muted); padding:4px 10px; border-bottom:1px dashed var(--stroke); flex-shrink:0; }

/* ── Main + Grid ────────────────────────────────────────────── */
main {
  padding:10px;
  margin-left: var(--left-w);
  margin-right: var(--right-w);
  transition: margin .22s ease;
}
.grid {
  display:grid;
  grid-template-columns: repeat(var(--cols), minmax(0,1fr));
  gap:var(--gap);
}

/* ── Card ───────────────────────────────────────────────────── */
.card {
  background:var(--card); border:1px solid var(--stroke);
  border-radius:12px; overflow:hidden; position:relative;
  transition: box-shadow .4s ease, border-color .4s ease;
}
.card.alm-near-high {
  border-color:#7f1d1d;
  box-shadow: 0 0 0 2px rgba(239,68,68,.18), var(--shadow);
}
.card.alm-near-low {
  border-color:#1e3a5f;
  box-shadow: 0 0 0 2px rgba(96,165,250,.18), var(--shadow);
}
.card.alm-near-high.alm-near-low {
  border-color:#4c1d95;
  box-shadow: 0 0 0 2px rgba(167,139,250,.18), var(--shadow);
}
.card.dragging { opacity:.35; outline:2px dashed var(--ink3); transition: opacity .15s; }
.card.drop-over { outline:2px solid var(--accent); background:var(--surface); }
.card.dnd-flying {
  position: fixed; z-index: 999;
  opacity: .75; transform: scale(1.03);
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
  border: 1px solid var(--accent);
  pointer-events: none;
  transition: transform .1s ease, box-shadow .1s ease;
}
.dnd-placeholder {
  border-radius: 12px;
  background: transparent;
  border: 2px dashed #2a4a7a;
  box-sizing: border-box;
  transition: all .18s ease;
}

/* card header */
.card-head {
  display:flex; align-items:center; gap:4px;
  padding:4px 7px; border-bottom:1px dashed var(--stroke); min-height:30px;
  flex-wrap:nowrap; overflow:hidden;
}
.card-sym {
  display:flex; align-items:baseline; gap:4px;
  overflow:hidden; white-space:nowrap; flex-shrink:1; min-width:0;
  font-weight:700; font-size:12px;
}
/* Název firmy — ořezává se jako druhý */
.card-sym-name {
  font-weight:400; font-size:10px; color:var(--muted);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  flex-shrink:2; min-width:0;
}
/* Exchange — ořezává se jako první (vyšší flex-shrink) */
.card-sym-exch {
  font-weight:400; font-size:10px; color:var(--muted);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  flex-shrink:3; min-width:0;
}
.gpills { display:inline-flex; gap:3px; flex-wrap:wrap; flex-shrink:1; overflow:hidden; }
.gpill {
  font-size:10px; padding:1px 5px; border-radius:999px;
  border:1px solid var(--stroke); background:var(--surface); color:#cbd5e1;
  display:inline-flex; gap:3px; align-items:center;
}
.gpill .gx { cursor:pointer; opacity:.7; font-size:10px; }
.gpill .gx:hover { opacity:1; }
.alm-label {
  display:inline-flex; gap:4px; align-items:center;
  font-size:11px; white-space:nowrap; margin-left:2px; flex-shrink:0;
}
.alm-low  { color:var(--accent); font-weight:600; }
.alm-high { color:#ef4444; font-weight:600; }
.alm-dist { font-size:10px; opacity:.75; }
.alm-bell {
  width:16px !important; height:16px !important;
  font-size:10px !important; border-radius:4px !important;
  border-color:transparent !important; background:transparent !important;
  margin-left:1px; flex-shrink:0;
}
.alm-bell:hover { background:#0f1e38 !important; border-color:var(--stroke) !important; }
.trend-badge { font-size:13px; flex-shrink:0; }

/* market status + timestamp */
.card-meta {
  display:flex; align-items:center; gap:5px;
  padding:2px 8px; border-top:1px solid var(--stroke);
  font-size:10px; color:var(--muted); flex-wrap:wrap;
  min-height:18px;
}
.mkt-badge {
  padding:1px 5px; border-radius:999px; font-size:10px; font-weight:600;
  border:1px solid;
}
.mkt-open   { color:#22c55e; border-color:#166534; background:#052e16; }
.mkt-closed { color:var(--muted); border-color:#1b2740; background:var(--surface); }
.mkt-pre    { color:#fbbf24; border-color:#78350f; background:#1c0f00; }
.mkt-post   { color:#a78bfa; border-color:#4c1d95; background:#130d2a; }
.card-ts    { font-size:10px; color:var(--muted); }
.card-meta .alm-label { margin-left:auto; margin-right:4px; font-size:10px; }
.card-price { margin-left:auto; font-weight:700; font-size:12px; flex-shrink:0; white-space:nowrap; }
.card-chg { font-size:11px; flex-shrink:0; white-space:nowrap; }
.card-chg.up { color:var(--up); } .card-chg.down { color:var(--down); }
.icon-btn {
  display:inline-flex; align-items:center; justify-content:center;
  width:22px; height:22px; border-radius:6px;
  border:1px solid var(--stroke); background:transparent; color:var(--ink);
  font-size:13px; flex-shrink:0; transition: background .1s;
}
.icon-btn:hover { background:#0f1e38; }
.icon-btn.close { border-color:#dc2626; color:#fca5a5; }

/* chart */
.card-chart { position:relative; height:var(--chart-h); min-height:140px; }
.card-chart .inner { position:absolute; inset:0; }
.card-chart .spin {
  position:absolute; inset:0; display:grid; place-items:center;
  color:var(--muted); font-size:11px; pointer-events:none;
}

/* TW chart lock overlay */
.tw-lock-overlay {
  position: absolute; inset: 0; z-index: 10;
  background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.tw-lock-icon {
  font-size: 52px; opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  filter: none;
  transform: scale(0.85);
}
[data-theme="light"] .tw-lock-overlay:hover .tw-lock-icon { opacity: 0.40; }
[data-theme="light"] .tw-lock-overlay.locking .tw-lock-icon { animation: twLockInLight 0.25s ease forwards; }
@keyframes twLockInLight {
  from { opacity: 0; transform: scale(1.3); }
  to   { opacity: 0.40; transform: scale(1); }
}
.tw-lock-overlay:hover .tw-lock-icon {
  opacity: 0.15;
  transform: scale(1);
}
@keyframes twLockIn {
  from { opacity: 0; transform: scale(1.3); }
  to   { opacity: 0.15; transform: scale(1); }
}
.tw-lock-overlay.locking .tw-lock-icon {
  animation: twLockIn 0.25s ease forwards;
}

/* detail infobar */
.infobar {
  cursor:pointer; padding:5px 8px; background:var(--surface);
  border-top:1px solid var(--stroke); font-size:12px; color:var(--ink3);
  display:flex; align-items:center; gap:7px; user-select:none;
}
.infobar .chev { display:inline-block; transition:transform .2s; font-style:normal; }
.infobar.open .chev { transform:rotate(90deg); }
.info-wrap { overflow:hidden; max-height:0; transition:max-height .28s ease; }
.info-grid {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
  gap:5px; padding:6px 8px;
}
.metric { background:var(--surface); border:1px solid var(--stroke); border-radius:8px; padding:6px; }
.mk { font-size:10px; color:var(--muted); margin-bottom:1px; }
.mv { font-size:12px; font-weight:600; }
.bar-wrap { height:5px; background:var(--surface2); border:1px solid var(--stroke); border-radius:999px; overflow:hidden; margin-top:3px; }
.bar-fill { display:block; height:100%; background:var(--accent); }

/* note bar (nahrazuje news sekci pod kartou) */
.note-bar {
  border-top:1px dashed var(--stroke); font-size:12px;
}
.note-toggle {
  cursor:pointer; user-select:none; color:var(--ink3);
  display:flex; align-items:center; gap:6px;
  padding:5px 8px 4px; transition: color .12s;
}
.note-toggle:hover { color:#bfdbfe; }
.note-toggle .chev { display:inline-block; transition:transform .2s; font-style:normal; }
.note-toggle.open .chev { transform:rotate(90deg); }
.note-toggle.has-note { color:#fde68a; }
.note-toggle.has-note .note-preview {
  font-size:10px; color:var(--muted); overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; max-width:160px;
}
.note-inner { overflow:hidden; max-height:0; transition:max-height .28s ease; }
.note-textarea {
  width:100%; min-height:72px; resize:vertical;
  background:var(--surface2); border:none; border-top:1px dashed var(--stroke);
  color:var(--ink); font:12px/1.5 var(--font); padding:7px 9px;
  outline:none;
}
.note-textarea::placeholder { color:var(--muted); }
.note-footer {
  display:flex; gap:6px; justify-content:flex-end;
  padding:4px 8px; border-top:1px dashed var(--stroke);
  background:var(--surface2);
}

/* news modal */
.news-modal {
  position:fixed; inset:0; background:rgba(0,0,0,.75);
  display:none; z-index:100; align-items:flex-start; justify-content:center;
  padding-top:5vh;
}
.news-modal.open { display:flex; }
.news-box {
  width:min(680px, 92vw); max-height:88vh;
  background:var(--surface3); border:1px solid var(--stroke);
  border-radius:14px; overflow:hidden; display:flex; flex-direction:column;
  box-shadow:0 20px 60px rgba(0,0,0,.55);
}
.news-head {
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 14px; border-bottom:1px solid var(--stroke);
  font-weight:600; font-size:13px; flex-shrink:0;
}
.news-body { overflow-y:auto; padding:10px 14px; flex:1; }
.nlist { list-style:none; display:grid; gap:6px; }
.nitem { display:flex; flex-direction:column; gap:3px; padding:8px 10px; background:var(--card-bg); border:1px solid var(--stroke); border-radius:8px; }
.nitem a { color:var(--fg); text-decoration:none; font-size:12.5px; line-height:1.4; }
.nitem a:hover { color:var(--accent); }
.nitem time { color:var(--muted); font-size:10px; }
.nitem .news-source { color:var(--muted); font-size:10px; }

/* ── ALM Popover ────────────────────────────────────────────── */
.popover {
  position:absolute; z-index:60; right:8px; top:32px;
  width:200px; background:var(--surface3); border:1px solid var(--stroke);
  border-radius:10px; padding:9px; box-shadow:0 12px 30px rgba(0,0,0,.4);
  display:none;
}
.popover.open { display:block; }
.pop-title { font-size:11px; color:var(--muted); margin-bottom:7px; }
.pop-fields { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-bottom:7px; }
.pop-field label { font-size:10px; color:var(--muted); display:block; margin-bottom:2px; }
.pop-field input {
  width:100%; padding:5px 7px; border-radius:7px;
  background:var(--surface); border:1px solid var(--stroke); color:var(--ink); font:inherit;
}
.pop-actions { display:flex; gap:5px; justify-content:flex-end; }

/* ── Ticker autocomplete ─────────────────────────────────── */
.sym-wrap { position: relative; display: inline-flex; align-items: center; gap: 4px; }
#symSearch { width: 160px; }
.sym-drop {
  position: absolute; top: calc(100% + 4px); left: 0;
  min-width: 260px; max-height: 260px; overflow-y: auto;
  background: #0c1830; border: 1px solid var(--stroke);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.5);
  z-index: 500; display: none;
}
.sym-drop.open { display: block; }
.sym-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; cursor: pointer; font-size: 12px;
  border-bottom: 1px solid #0e1c35;
  transition: background .1s;
}
.sym-item:last-child { border-bottom: none; }
.sym-item:hover, .sym-item.active { background: #1a2e52; }
.sym-item .si-sym { font-weight: 700; color:var(--ink3); min-width: 90px; font-size: 11px; }
.sym-item .si-name { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.sym-item .si-ex { font-size: 10px; color: #4b6fa8; margin-left: auto; flex-shrink: 0; }
.sym-drop-empty { padding: 10px; color: var(--muted); font-size: 12px; text-align: center; }
[data-tip] { position: relative; cursor: help; }
[data-tip]::after, [data-tip]::before { display: none !important; }
.set-card {
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background:var(--surface2);
}
.set-card-head {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 8px; font-size: 12px; font-weight: 600;
}
.set-card-head .sck-icon { font-size: 14px; }
.set-card-head .sck-badge {
  font-size: 10px; padding: 1px 6px; border-radius: 999px;
  border: 1px solid; margin-left: auto;
}
.sck-badge.user   { color:var(--ink3); border-color: #1e3a5f; background: #0a1e38; }
.sck-badge.backend{ color: #fbbf24; border-color: #78350f; background: #1c0f00; }
.altype-row {
  display:grid;
  grid-template-columns: 180px auto auto 1fr auto;
  align-items:center; gap:6px;
  padding:5px 0; border-bottom:1px dashed var(--stroke); font-size:12px;
}
.altype-row:last-child { border-bottom:none; }
.altype-row label { display:flex; align-items:center; gap:5px; cursor:pointer; }
.altype-row input[type=checkbox] { accent-color:var(--accent); flex-shrink:0; }
.altype-phase { font-size:10px; padding:1px 5px; border-radius:999px; border:1px solid;
  color:var(--muted); border-color:var(--stroke); white-space:nowrap; justify-self:start; }
.altype-phase.ready  { color:#22c55e; border-color:#166534; }
.altype-phase.faze2  { color:#fbbf24; border-color:#78350f; }
.altype-phase.faze3  { color:var(--muted); border-color:#1b2740; }
.altype-phase.future { color:#6366f1; border-color:#3730a3; }
.altype-params { display:flex; align-items:center; gap:5px; flex-wrap:wrap; }
.altype-params label { min-width:unset; font-size:11px; color:var(--muted); }
.altype-params input, .altype-params select {
  background:var(--surface); border:1px solid var(--stroke); color:var(--ink);
  border-radius:6px; padding:2px 5px; font:inherit; font-size:11px;
}
.altype-params input[type=number] { width:58px; }
.altype-row.disabled label { opacity:.5; }
.altype-row.disabled .altype-params { opacity:.4; pointer-events:none; }
.altype-row .altype-channel { justify-self:end; }
.pt-pop {
  position:absolute; z-index:60; right:8px; top:32px;
  width:240px; background:var(--surface3); border:1px solid var(--stroke);
  border-radius:10px; padding:10px; box-shadow:0 12px 30px rgba(0,0,0,.4);
  display:none;
}
.pt-pop.open { display:block; }
.pt-title { font-size:11px; color:var(--muted); margin-bottom:8px; }
.pt-consensus {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:8px;
}
.pt-rec {
  font-size:12px; font-weight:700; padding:3px 8px;
  border-radius:999px; border:1px solid;
}
.pt-rec.strong-buy  { color:#22c55e; border-color:#166534; background:#052e16; }
.pt-rec.buy         { color:#86efac; border-color:#166534; background:#052e16; }
.pt-rec.hold        { color:#fbbf24; border-color:#78350f; background:#1c0f00; }
.pt-rec.sell        { color:#f87171; border-color:#7f1d1d; background:#1c0000; }
.pt-rec.strong-sell { color:#ef4444; border-color:#7f1d1d; background:#1c0000; }
.pt-rec.unknown     { color:var(--muted); border-color:var(--stroke); background:var(--surface); }
.pt-analysts { font-size:10px; color:var(--muted); }
.pt-prices {
  display:grid; grid-template-columns:1fr 1fr 1fr; gap:5px; margin-bottom:8px;
}
.pt-cell { background:var(--surface2); border:1px solid var(--stroke); border-radius:7px; padding:5px 6px; text-align:center; }
.pt-cell .ptk { font-size:10px; color:var(--muted); margin-bottom:2px; }
.pt-cell .ptv { font-size:12px; font-weight:600; }
.pt-cell.mean .ptv { color:var(--ink3); }
.pt-dist { font-size:11px; text-align:center; margin-bottom:8px; }
.pt-dist.up   { color:var(--up); }
.pt-dist.down { color:var(--down); }
.pt-bar-wrap {
  height:6px; background:var(--surface2); border:1px solid var(--stroke);
  border-radius:999px; overflow:visible; position:relative; margin-bottom:4px;
}
.pt-bar-fill { height:100%; background:linear-gradient(90deg,#1d4ed8,#7c3aed); border-radius:999px; }
.pt-bar-dot  {
  position:absolute; top:50%; transform:translate(-50%,-50%);
  width:10px; height:10px; border-radius:50%;
  background:var(--ink); border:2px solid #0c1830;
}
.pt-bar-labels { display:flex; justify-content:space-between; font-size:9px; color:var(--muted); }
.pt-alert-row { display:flex; align-items:center; gap:6px; font-size:11.5px; padding-top:7px; border-top:1px dashed var(--stroke); }
.pt-alert-row label { display:flex; align-items:center; gap:5px; cursor:pointer; }
.pt-alert-row input { accent-color:var(--accent); }

/* ── Nový price target bar ───────────────────────────────── */
.pt-bar-outer { margin-bottom:8px; }
.pt-bar-track {
  position:relative; height:8px; background:var(--surface2);
  border:1px solid var(--stroke); border-radius:2px; margin-bottom:4px;
}
.pt-bar-analyst {
  position:absolute; top:1px; height:6px;
  background:#1e3a5f; border-radius:1px;
}
.pt-bar-mean {
  position:absolute; top:0; width:1px; height:8px;
  background:var(--ink); opacity:.6;
}
.pt-bar-cur {
  position:absolute; top:-2px; width:4px; height:12px;
  background:#3b82f6; border-radius:1px; transform:translateX(-50%);
}
.pt-bar-alm-lo {
  position:absolute; top:0; width:2px; height:8px;
  background:#ef4444; border-radius:1px; transform:translateX(-50%);
}
.pt-bar-alm-hi {
  position:absolute; top:0; width:2px; height:8px;
  background:#22c55e; border-radius:1px; transform:translateX(-50%);
}
.pt-bar-legend {
  display:flex; justify-content:space-between; font-size:9px; color:var(--muted);
}
.pt-analysts-row {
  display:flex; align-items:center; gap:5px;
  font-size:10px; margin-bottom:8px;
}
.pt-analysts-bar {
  flex:1; display:flex; height:5px; border-radius:2px; overflow:hidden; gap:1px;
}
.pt-dists { display:flex; flex-direction:column; gap:4px; margin-top:4px; }
.pt-dist-row {
  display:flex; justify-content:space-between; align-items:center;
  font-size:11px; color:var(--muted);
}
.pt-dist-label { font-size:10px; }
.pt-loading { color:var(--muted); font-size:11px; text-align:center; padding:10px 0; }
.pos-bar {
  display:none; align-items:center; gap:8px; flex-wrap:wrap;
  padding:3px 8px; background:var(--surface2); border-bottom:1px dashed var(--stroke);
  font-size:11px;
}
.pos-bar.has-position { display:flex; }
.pos-val  { color:var(--ink); font-weight:600; }
.pos-pl   { font-weight:700; }
.pos-pl.up   { color:var(--up); }
.pos-pl.down { color:var(--down); }
.pos-lbl  { color:var(--muted); }

/* ── Assign menu ─────────────────────────────────────────────── */
.assign-menu {
  position:fixed; z-index:80; width:210px;
  background:var(--surface3); border:1px solid var(--stroke); border-radius:10px;
  padding:9px; box-shadow:0 12px 30px rgba(0,0,0,.4);
}
.assign-menu-title { font-size:11px; color:var(--muted); margin-bottom:7px; }
.assign-list { display:grid; gap:4px; margin-bottom:8px; }
.assign-item { display:flex; align-items:center; gap:6px; font-size:12px; cursor:pointer; padding:2px 0; }
.assign-item input { accent-color:var(--accent); }
.assign-actions { display:flex; gap:5px; justify-content:flex-end; }

/* ── Zoom Modal ─────────────────────────────────────────────── */
.zoom-modal {
  position:fixed; inset:0; background:rgba(0,0,0,.7);
  display:none; z-index:100; align-items:center; justify-content:center;
}
.zoom-modal.open { display:flex; }
.zoom-box {
  position:relative; width:80vw; height:90vh;
  background:var(--surface3); border:1px solid var(--stroke);
  border-radius:12px; overflow:hidden;
  box-shadow:0 20px 60px rgba(0,0,0,.5);
}
.zoom-box .inner { flex:1; min-height:0; position:relative; }
.zoom-hdr {
  display:flex; align-items:center; justify-content:space-between;
  padding:8px 14px 7px; border-bottom:1px solid var(--stroke); flex-shrink:0;
}
.zoom-close {
  padding:4px 8px; border-radius:7px; border:1px solid var(--stroke);
  background:var(--surface); color:var(--ink); font-size:12px; cursor:pointer;
}

/* ── Drag and drop ──────────────────────────────────────────── */
.no-drag { pointer-events:none; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width:1100px){ :root{ --cols:3 } }
@media (max-width:760px) { :root{ --cols:2 } }
@media (max-width:500px) { :root{ --cols:1 } }

/* ── Mega Detail Modal ───────────────────────────────────── */
.mega-modal {
  position:fixed; inset:0; background:rgba(0,0,0,.75);
  display:none; z-index:110; align-items:center; justify-content:center;
}
.mega-modal.open { display:flex; }
.mega-box {
  position:relative; width:min(860px,94vw); max-height:92vh;
  background:var(--surface3); border:1px solid var(--stroke);
  border-radius:14px; overflow:hidden;
  box-shadow:0 24px 70px rgba(0,0,0,.6);
  display:flex; flex-direction:column;
}
.mega-modal-head {
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 18px; border-bottom:1px solid var(--stroke);
  font-size:15px; font-weight:600; color:var(--fg);
  flex-shrink:0;
}
.mega-body {
  overflow-y:auto; padding:16px 18px; flex:1;
}
.mega-loading {
  color:var(--muted); font-size:13px; padding:20px 0;
}
.mega-header {
  display:flex; align-items:center; gap:12px;
  margin-bottom:16px; padding-bottom:14px;
  border-bottom:1px solid var(--stroke);
}
.mega-price {
  font-size:28px; font-weight:700; color:var(--fg);
}
.mega-chg {
  font-size:15px; font-weight:600;
}
.mega-section {
  margin-bottom:18px;
}
.mega-section-title {
  font-size:11px; font-weight:700; letter-spacing:.08em;
  text-transform:uppercase; color:var(--muted);
  margin-bottom:8px; padding-bottom:4px;
  border-bottom:1px solid var(--stroke);
}
.mega-grid {
  display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:6px;
}
.mega-cell {
  background:var(--card-bg); border:1px solid var(--stroke);
  border-radius:7px; padding:7px 10px;
  display:flex; flex-direction:column; gap:2px;
}
.mega-lbl {
  font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:.05em;
}
.mega-val {
  font-size:13px; font-weight:600; color:var(--fg);
}
.mega-pt-bar-wrap {
  position:relative; height:6px; background:var(--stroke);
  border-radius:3px; margin:10px 0 4px;
}
.mega-pt-bar-fill {
  position:absolute; left:0; top:0; height:100%;
  background:var(--accent); border-radius:3px; transition:width .3s;
}
.mega-pt-bar-dot {
  position:absolute; top:-4px; width:14px; height:14px;
  background:var(--fg); border:2px solid var(--accent);
  border-radius:50%; transform:translateX(-50%);
}
.mega-pt-labels {
  display:flex; justify-content:space-between;
  font-size:10px; color:var(--muted);
}
.mega-news-list {
  list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px;
}
.mega-news-item {
  display:flex; flex-direction:column; gap:2px;
  padding:8px 10px; background:var(--card-bg);
  border:1px solid var(--stroke); border-radius:7px;
}
.mega-news-item a {
  color:var(--fg); font-size:12px; text-decoration:none; line-height:1.4;
}
.mega-news-item a:hover { color:var(--accent); }
.news-source {
  font-size:10px; color:var(--muted); margin-left:6px;
}
.mega-news-more a { color:var(--accent) !important; font-weight:600; }
.mega-news-src {
  font-size:10px; color:var(--muted);
}

/* ── Zvoneček v meta baru ────────────────────────────────── */
.meta-bell {
  margin-left:auto; font-size:13px; padding:1px 4px;
}

/* ── Status panel ────────────────────────────────────────── */
.status-row {
  background:var(--card);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 8px 12px;
}
.sc-head {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 4px;
}
.sc-icon { font-size: 14px; flex-shrink: 0; }
.sc-label { font-size: 12px; font-weight: 600; color: var(--fg); }
.sc-meta  { font-size: 11px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.sc-bar-wrap {
  height: 5px; background: var(--stroke);
  border-radius: 3px; overflow: hidden; margin-bottom: 4px;
}
.sc-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), #22c55e);
  border-radius: 3px;
  transition: width 0.9s linear;
}
.sc-bar-sse {
  background: linear-gradient(90deg, #6366f1, #a78bfa);
}
.sc-bar.warn { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.sc-detail { font-size: 11px; color: var(--muted); padding-top: 2px; }

/* ── Param row (label + input v jedné buňce) ─────────────── */
.param-row {
  display: contents;
}
.param-row label { color: var(--fg); font-size: 12px; align-self: center; }
.param-row .finput.num { width: 70px; text-align: right; }

/* ── Group row (Watchlist záložka) ───────────────────────── */
.grp-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 6px 8px; border-radius: 6px;
  border: 1px solid var(--stroke); margin-bottom: 4px;
  background: var(--card-bg);
}
.grp-row.active { border-color: var(--accent); }
.grp-row-left  { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.grp-row-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.grp-row-name  { font-size: 12px; font-weight: 600; min-width: 60px; }

/* ── Toast notifikace ────────────────────────────────────── */
#wgToast {
  position: fixed; bottom: 20px; right: 20px;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 8px;
  background:var(--card); border: 1px solid #1e2d47;
  font-size: 13px; color:var(--ink);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 9999; white-space: nowrap;
  box-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
#wgToast.show { opacity: 1; }
#wgToastDot {
  width: 8px; height: 8px; border-radius: 50%;
  background:var(--muted); flex-shrink: 0;
  transition: background 0.2s;
}
#wgToast.toast-ok   #wgToastDot { background: #22c55e; }
#wgToast.toast-err  #wgToastDot { background: #ef4444; }
#wgToast.toast-save #wgToastDot { background:var(--muted); animation: toastPulse 0.8s infinite alternate; }
@keyframes toastPulse { from { opacity:1; } to { opacity:0.3; } }

/* ── Dialog ──────────────────────────────────────────────── */
#wgDialogOverlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); z-index: 10000;
  align-items: center; justify-content: center;
}
#wgDialogOverlay.open { display: flex; }
#wgDialog {
  background:var(--bg); border: 1px solid #1e2d47;
  border-radius: 10px; padding: 20px 24px;
  min-width: 280px; max-width: 380px; width: 90%;
}
#wgDialogTitle {
  font-size: 13px; font-weight: 600; color:var(--ink);
  margin-bottom: 6px;
}
#wgDialogMsg {
  font-size: 12px; color:var(--muted); margin-bottom: 16px;
}
#wgDialogBtns {
  display: flex; gap: 8px; justify-content: flex-end;
}
#wgDialogOk.danger {
  background: #7f1d1d; border-color: #ef4444; color: #fca5a5;
}
#wgDialogOk.primary {
  background: #162844; border-color: #3b82f6; color:var(--ink3);
}

/* ── Add Ticker Modal ─────────────────────────────────────── */
.atm-box {
  background: var(--card); border: 1px solid var(--stroke);
  border-radius: 12px; width: 100%; max-width: 460px;
  max-height: 90vh; overflow-y: auto; overflow-x: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.atm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-bottom: 1px solid var(--stroke);
  position: sticky; top: 0; background: var(--card); z-index: 2;
}
.atm-title { font-size: 12px; font-weight: 600; color: var(--ink); }

/* Hero */
.atm-hero {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; background: var(--deep);
  border-bottom: 1px dashed var(--stroke);
}
.atm-badge {
  width: 42px; height: 42px; border-radius: 8px;
  background: #0d1f3a; border: 1px solid #1e3a5f;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color:var(--ink3);
  flex-shrink: 0; letter-spacing: .03em; text-align: center;
  line-height: 1.2;
}
.atm-hero-info { flex: 1; min-width: 0; }
.atm-sym { font-size: 14px; font-weight: 700; color: var(--ink); }
.atm-meta { font-size: 10px; color: var(--muted); margin-top: 2px; }
.atm-price-wrap { text-align: right; flex-shrink: 0; }
.atm-price { font-size: 17px; font-weight: 700; color: var(--ink); }
.atm-chg { font-size: 11px; font-weight: 600; }
.atm-chg.up { color: var(--up); } .atm-chg.down { color: var(--down); }

/* Sekce */
.atm-body { padding: 0; }
.atm-section { padding: 10px 14px; border-bottom: 1px solid var(--stroke); }
.atm-sec-label {
  font-size: 10px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px;
}
.atm-optional { font-size: 9px; font-weight: 400; text-transform: none; letter-spacing: 0; color:var(--muted); }

/* Pills skupin */
.atm-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.atm-pill {
  padding: 3px 10px; border-radius: 999px; font-size: 11px; cursor: pointer;
  border: 1px solid var(--stroke); background: var(--deep); color: var(--muted);
  transition: all .12s; user-select: none;
}
.atm-pill:hover { border-color: #2a3d5a; color: var(--ink); }
.atm-pill.on { background: #0d1f3a; border-color: #1e3a5f; color:var(--ink3); }
.atm-no-groups { font-size: 11px; color: var(--muted); }

/* Price target */
.atm-pt-body { min-height: 40px; }

/* Skeleton shimmer */
.atm-skel {
  border-radius: 4px;
  background: linear-gradient(90deg, #0d1a30 25%, #142135 50%, #0d1a30 75%);
  background-size: 200% 100%;
  animation: atmShimmer 1.4s infinite;
}
@keyframes atmShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.atm-skel-row { height: 10px; border-radius: 4px; margin-bottom: 6px; }
.atm-skel-bar { height: 8px; border-radius: 3px; margin-bottom: 5px; }
.atm-skel-cells {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 5px; margin: 6px 0;
}
.atm-skel-cell { height: 36px; border-radius: 7px; }

/* ALM + pozice layout */
.atm-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.atm-field-lbl { font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.atm-section .finput { width: 100%; }

/* Poznámka */
.atm-note {
  width: 100%; background: var(--deep); border: 1px solid var(--stroke);
  border-radius: 7px; color: var(--ink); font-size: 12px;
  padding: 6px 8px; outline: none; resize: none;
  transition: border-color .12s; font-family: inherit;
}
.atm-note:focus { border-color:var(--accent); }
.atm-note::placeholder { color:var(--muted); }

/* Footer */
.atm-footer {
  display: flex; justify-content: flex-end; align-items: center; gap: 8px;
  padding: 10px 14px; border-top: 1px solid var(--stroke);
  background: var(--deep); position: sticky; bottom: 0; z-index: 2;
}
.atm-btn-add {
  background:var(--surface) !important; border-color:var(--stroke-h) !important;
  color:var(--ink3) !important; font-weight: 600;
}
.atm-btn-add:hover { background:var(--surface2) !important; border-color:var(--accent) !important; }

/* PT alert row — přebije bílý checkbox prohlížeče */
#addTickerModal .pt-alert-row { color: var(--muted); }
#addTickerModal .pt-alert-row input[type=checkbox] { accent-color: var(--accent); width: 13px; height: 13px; cursor: pointer; }
#addTickerModal .pt-alert-row label { cursor: pointer; color: var(--muted); font-size: 11px; }

/* PT sekce v modalu — trochu více prostoru */
#addTickerModal .pt-prices { margin-bottom: 10px; }
#addTickerModal .pt-analysts-row { margin-bottom: 6px; }
#addTickerModal .pt-dists { margin-bottom: 2px; }

/* ALM ghost field — vizuálně zasedlá cena */
.atm-ghost::placeholder { color: var(--ink); opacity: 0.45; }

/* ── Price flash ─────────────────────────────────────────── */
@keyframes flashUp {
  0%   { color: var(--up); }
  100% { color: inherit; }
}
@keyframes flashDown {
  0%   { color: var(--down); }
  100% { color: inherit; }
}
.flash-up   { animation: flashUp   .7s ease-out forwards; }
.flash-down { animation: flashDown .7s ease-out forwards; }

/* ── Card enter stagger ──────────────────────────────────── */
@keyframes cardIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.card-enter {
  animation: cardIn .3s ease-out both;
}

/* ── Nová karta glow ─────────────────────────────────────── */
.card-new {
  border: 2px solid var(--accent);
}

/* ── Card fade out ───────────────────────────────────────── */
@keyframes cardOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
.card-exit {
  animation: cardOut .1s ease-in both;
  pointer-events: none;
}

/* ── Briefing modal ──────────────────────────────────────── */
#briefingModal .zoom-box {
  background:var(--card);
}

/* ── Briefing progress panel ─────────────────────────── */
.bp-layer { margin-bottom: 16px; }
.bp-layer-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:5px; }
.bp-layer-name { display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; color:var(--muted); transition:color .3s; }
.bp-layer-pct  { font-size:12px; font-weight:700; color:var(--muted); transition:color .3s; }
.bp-layer-meta { font-size:11px; color:var(--muted); margin-bottom:6px; min-height:16px; }
.bp-bar-track  { background:var(--surface2); border-radius:4px; height:5px; overflow:hidden; }
.bp-bar-fill   { height:100%; width:0%; border-radius:4px; background:#1b2740; transition:width .6s ease; }

.bp-layer.bp-done .bp-layer-name { color:#22c55e; }
.bp-layer.bp-done .bp-layer-pct  { color:#22c55e; }
.bp-layer.bp-done .bp-bar-fill   { background:#22c55e; width:100%; }

.bp-layer.bp-active .bp-layer-name { color:var(--accent); }
.bp-layer.bp-active .bp-layer-pct  { color:var(--accent); }
.bp-layer.bp-active .bp-bar-fill   { background:linear-gradient(90deg,#1d4ed8,#60a5fa,#1d4ed8); background-size:200% 100%; animation:bpShimmer 1.5s infinite linear; }

.bp-layer.bp-l4.bp-active .bp-layer-name { color:#a78bfa; }
.bp-layer.bp-l4.bp-active .bp-layer-pct  { color:#a78bfa; }
.bp-layer.bp-l4.bp-active .bp-bar-fill   { background:linear-gradient(90deg,#6d28d9,#a78bfa,#6d28d9); background-size:200% 100%; animation:bpShimmer 1.5s infinite linear; }
.bp-layer.bp-l4.bp-done .bp-layer-name   { color:#a78bfa; }
.bp-layer.bp-l4.bp-done .bp-layer-pct    { color:#a78bfa; }
.bp-layer.bp-l4.bp-done .bp-bar-fill     { background:#a78bfa; }

@keyframes bpShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── News panel ─────────────────────────────────────── */
.news-metric-card {
  background: var(--surface2, #071225);
  border: 1px solid var(--stroke, #1b2740);
  border-radius: 8px;
  padding: 10px 12px;
}
.nmc-label { font-size: 11px; color:var(--muted); margin-bottom: 3px; }
.nmc-val   { font-size: 18px; font-weight: 500; color:var(--ink); }
.nmc-sub   { font-size: 11px; color: var(--muted, #4a5568); margin-top: 2px; }

.news-run-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.news-run-table th {
  font-size: 10px;
  font-weight: 500;
  color:var(--muted);
  text-align: left;
  padding: 4px 8px;
  border-bottom: 1px solid #1b2740;
  white-space: nowrap;
}
.news-run-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #0f1e35;
  color:var(--ink);
  white-space: nowrap;
}
.news-run-table tr:last-child td { border-bottom: none; }
.news-run-table tr:hover td { background: #0a1628; }
.nrt-ticker { color: #60a5fa; font-weight: 500; }
.nrt-macro  { color: #22c55e; font-weight: 500; }
.nrt-sector { color: #f59e0b; font-weight: 500; }
.nrt-zero   { color: #4a5568; }
.nrt-pos    { color: #22c55e; }
.nrt-warn   { color: #f59e0b; }
.nrt-err    { color: #ef4444; }

/* ── Briefing tooltip (wg-tip) ──────────────────────────── */
abbr.wg-tip {
  text-decoration: underline dotted var(--accent);
  text-underline-offset: 3px;
  cursor: help;
  position: relative;
  white-space: nowrap;
}
abbr.wg-tip::after, abbr.wg-tip:hover::after { display: none !important; }

/* ══════════════════════════════════════════════════════════════
   Unified Detail Modal — u-* prefix
   ══════════════════════════════════════════════════════════════ */
.mega-box.mega-unified {
  width: clamp(360px, 96vw, 1800px);
  height: min(92vh, 960px);
  max-height: none;
}
.u-hdr {
  background: var(--surface); border-bottom: 1px solid var(--stroke);
  padding: clamp(10px,1vw,16px) clamp(14px,1.6vw,24px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; flex-shrink: 0;
}
.u-hdr-left { display: flex; align-items: baseline; gap: clamp(6px,.8vw,12px); flex-wrap: wrap; }
.u-sym   { font-size: clamp(18px,1.8vw,24px); font-weight: 700; color: var(--ink); }
.u-name  { font-size: clamp(11px,.9vw,13px); color: var(--muted); }
.u-price { font-size: clamp(20px,2vw,28px); font-weight: 300; color: var(--ink); margin-left: 4px; }
.u-chg   { font-size: clamp(12px,.9vw,13px); font-weight: 600; padding: 3px 10px; border-radius: 5px; }
.u-chg.up   { color: var(--up);   background: rgba(34,197,94,.12); }
.u-chg.down { color: var(--down); background: rgba(239,68,68,.12); }
.u-hdr-right { display: flex; align-items: center; gap: 10px; }
.u-close {
  background: none; border: none; cursor: pointer; line-height: 1;
  color: var(--muted); font-size: 18px; padding: 4px 10px; border-radius: 5px; transition: background .15s;
}
.u-close:hover { background: var(--stroke); color: var(--ink); }

/* Two-column body */
.u-body {
  display: grid; grid-template-columns: 1fr clamp(290px,27vw,410px);
  flex: 1; min-height: 0; overflow: hidden;
}
@media (max-width: 820px) {
  .u-body { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
}

/* Chart column */
.u-chart-col { display: flex; flex-direction: column; border-right: 1px solid var(--stroke); overflow: hidden; min-width: 0; }
.u-toolbar {
  background: var(--surface); border-bottom: 1px solid var(--stroke);
  padding: 7px clamp(10px,1.2vw,18px); display: flex; align-items: center; gap: 7px; flex-shrink: 0;
}
.u-tf-group { display: flex; gap: 2px; }
.u-tf-btn {
  padding: 4px clamp(8px,.8vw,12px); border-radius: 5px; font-size: 12px; font-weight: 500;
  cursor: pointer; border: 1px solid transparent; color: var(--muted); background: transparent; transition: all .15s;
}
.u-tf-btn:hover  { background: var(--stroke); color: var(--ink); }
.u-tf-btn.active { background: var(--surface2); color: var(--accent); border-color: rgba(96,165,250,.3); }
.u-chart-wrap { flex: 1; min-height: 0; overflow: hidden; position: relative; background: var(--surface2); }
.u-chart-wrap > div, .u-chart-wrap iframe { width: 100% !important; height: 100% !important; }
/* Overlay chips */
.u-chip-group { display: flex; gap: 5px; flex-wrap: wrap; }
.u-chip {
  display: flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 500; cursor: pointer; border: 1px solid; transition: opacity .15s; user-select: none;
}
.u-cdot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.chip-alerts { color: #f59e0b; border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.09); }
.chip-sma    { color: #60a5fa; border-color: rgba(96,165,250,.3);  background: rgba(96,165,250,.08); }
.chip-target { color: #a78bfa; border-color: rgba(167,139,250,.3); background: rgba(167,139,250,.08); }
.chip-events { color: #22c55e; border-color: rgba(34,197,94,.3);   background: rgba(34,197,94,.08); }
.u-chip.off  { opacity: .28; }
/* Chart tooltip */
.u-ctip {
  position: absolute; background: var(--card,#0d1e35); border: 1px solid var(--stroke,#1e3555);
  border-radius: 9px; padding: 10px 14px; font-size: 11px; pointer-events: none;
  opacity: 0; transition: opacity .12s; z-index: 20; min-width: 160px;
  box-shadow: 0 8px 28px rgba(0,0,0,.6);
}
.u-ctip.show { opacity: 1; }
.u-ctt { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.u-ctd { color: var(--muted); font-size: 10px; margin-bottom: 7px; }
.u-ctr { display: flex; justify-content: space-between; gap: 12px; margin-top: 3px; }
.u-ctl { color: var(--muted); }
.u-ctv { color: var(--ink); font-weight: 600; }
.u-chart-foot {
  background: var(--surface); border-top: 1px solid var(--stroke);
  padding: 7px clamp(10px,1.2vw,18px); display: flex; gap: clamp(12px,1.4vw,22px); flex-wrap: wrap; flex-shrink: 0;
}
.u-stat { display: flex; flex-direction: column; gap: 1px; cursor: default; }
.u-sl { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.u-sv { font-size: 12px; font-weight: 600; color: var(--ink); }

/* Right panel */
.u-panel { display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.u-tabs {
  display: flex; border-bottom: 1px solid var(--stroke); background: var(--surface);
  flex-shrink: 0; overflow-x: auto;
}
.u-tab {
  padding: 10px 12px; font-size: 11.5px; font-weight: 500; color: var(--muted);
  cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent;
  transition: all .15s; flex-shrink: 0;
}
.u-tab:hover { color: var(--ink); }
.u-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.u-tab-body { display: none; flex: 1; overflow-y: auto; min-height: 0; }
.u-tab-body.active { display: block; }

/* Sections */
.u-section { padding: 12px clamp(12px,1.2vw,16px); border-bottom: 1px solid var(--stroke); }
.u-section:last-child { border-bottom: none; }
.u-st { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 9px; }

/* Metrics grid */
.u-mg { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.u-mc {
  display: flex; flex-direction: column; gap: 2px; padding: 7px 9px;
  background: var(--card); border-radius: 6px; border: 1px solid var(--stroke);
  cursor: default; transition: border-color .1s;
}
.u-mc:hover { border-color: var(--stroke-h); }
.u-ml { font-size: 9.5px; color: var(--muted); }
.u-mv { font-size: 13px; font-weight: 600; color: var(--ink); }

/* Signals strip */
.u-signals { display: flex; flex-wrap: wrap; gap: 5px; padding: 9px clamp(12px,1.2vw,16px); border-bottom: 1px solid var(--stroke); }
.u-sig { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px; font-size: 10.5px; font-weight: 500; border: 1px solid; cursor: default; }
.sig-green  { color: var(--up);   border-color: rgba(34,197,94,.3);   background: rgba(34,197,94,.08); }
.sig-red    { color: var(--down); border-color: rgba(239,68,68,.3);   background: rgba(239,68,68,.08); }
.sig-orange { color: var(--warn); border-color: rgba(245,158,11,.3);  background: rgba(245,158,11,.08); }
.sig-purple { color: #a78bfa;     border-color: rgba(167,139,250,.3); background: rgba(167,139,250,.08); }
.sig-muted  { color: var(--muted); border-color: var(--stroke); }

/* Perf bars */
.u-pr { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; cursor: default; }
.u-pl { font-size: 11px; color: var(--muted); width: 26px; flex-shrink: 0; }
.u-pb-bg { flex: 1; height: 4px; background: var(--stroke); border-radius: 2px; overflow: hidden; }
.u-pb { height: 100%; border-radius: 2px; }
.u-pv { font-size: 11px; font-weight: 600; width: 46px; text-align: right; flex-shrink: 0; color: var(--ink); }

/* PT bar */
.u-pt-bg { position: relative; height: 5px; background: var(--stroke); border-radius: 3px; margin: 10px 0 5px; }
.u-pt-fill { height: 100%; background: linear-gradient(90deg, var(--stroke-h, #263a5c), #a78bfa); border-radius: 3px; }
.u-pt-dot { position: absolute; top: 50%; transform: translate(-50%,-50%); width: 11px; height: 11px; border-radius: 50%; background: var(--ink); border: 2px solid var(--surface3); box-shadow: 0 0 0 2px var(--accent); }
.u-pt-labels { display: flex; justify-content: space-between; font-size: 9px; color: var(--muted); }

/* ALM rows */
.u-alr { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; cursor: default; }
.u-all { font-size: 11px; color: var(--muted); flex: 1; }
.u-alv { font-size: 13px; font-weight: 600; }
.u-ald { font-size: 10px; padding: 2px 7px; border-radius: 4px; font-weight: 600; flex-shrink: 0; }
.u-ald.warn { color: var(--warn); background: rgba(245,158,11,.12); }
.u-ald.safe { color: var(--up);   background: rgba(34,197,94,.12); }

/* Alert type chips */
.u-atg { display: flex; flex-wrap: wrap; gap: 5px; }
.u-atc { font-size: 10px; padding: 3px 8px; border-radius: 20px; font-weight: 500; border: 1px solid; cursor: default; }
.at-on  { color: var(--accent); border-color: rgba(96,165,250,.3); background: rgba(96,165,250,.08); }
.at-off { color: var(--muted);  border-color: var(--stroke); background: transparent; }

/* Note */
.u-note {
  width: 100%; background: var(--card); border: 1px solid var(--stroke);
  border-radius: 7px; color: var(--ink); font-size: 12px;
  padding: 9px 11px; resize: vertical; font-family: inherit; line-height: 1.5; outline: none; min-height: 60px;
}
.u-note:focus { border-color: var(--accent); }

/* Analyst upgrades */
.u-upg { display: flex; align-items: center; gap: 8px; padding: 8px clamp(12px,1.2vw,16px); border-bottom: 1px solid var(--stroke); cursor: default; }
.u-upg:last-child { border-bottom: none; }
.u-ud { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.u-uf { color: var(--ink); font-weight: 500; flex: 1; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-ub { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 3px; flex-shrink: 0; }
.u-ub.up { color: var(--up);   background: rgba(34,197,94,.12); }
.u-ub.dn { color: var(--down); background: rgba(239,68,68,.12); }
.u-ub.nt { color: var(--muted); background: rgba(154,163,178,.1); }
.u-ugr { font-size: 10px; color: var(--muted); flex-shrink: 0; white-space: nowrap; }
.u-upt { color: var(--muted); font-size: 10px; min-width: 42px; text-align: right; flex-shrink: 0; }
.u-uts { color: var(--muted); font-size: 10px; white-space: nowrap; flex-shrink: 0; }
.u-apt-sum { font-size: 11px; color: var(--muted); margin-top: 7px; line-height: 1.6; }

/* News */
.u-news-item { padding: 9px clamp(12px,1.2vw,16px); border-bottom: 1px solid var(--stroke); }
.u-news-item:last-child { border-bottom: none; }
.u-news-a { color: var(--ink); font-size: 12px; line-height: 1.45; text-decoration: none; display: block; margin-bottom: 3px; }
.u-news-a:hover { color: var(--accent); }
.u-news-src { font-size: 10px; color: var(--muted); }

/* Alert log rows */
.u-alrt { display: flex; align-items: center; gap: 8px; padding: 8px clamp(12px,1.2vw,16px); border-bottom: 1px solid var(--stroke); cursor: default; transition: background .1s; }
.u-alrt:last-child { border-bottom: none; }
.u-alrt:hover { background: rgba(255,255,255,.015); }
.u-alrd { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.u-alrt-time { font-size: 10px; color: var(--muted); min-width: 64px; flex-shrink: 0; }
.u-alrt-type { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; min-width: 70px; flex-shrink: 0; }
.u-alrt-det  { font-size: 11px; color: var(--muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Loading placeholder */
.u-loading { color: var(--muted); font-size: 13px; padding: 20px clamp(12px,1.2vw,16px); }

/* Color utilities */
.c-pos  { color: var(--up); }
.c-neg  { color: var(--down); }
.c-acc  { color: #a78bfa; }
.c-blue { color: var(--accent); }
.c-org  { color: var(--warn); }

/* Global JS tooltip */
#gtip {
  position: fixed; z-index: 9999;
  background: var(--surface); border: 1px solid var(--stroke-h, #263a5c);
  border-radius: 8px; padding: 9px 13px;
  font-size: 11px; color: var(--muted); line-height: 1.5;
  max-width: 240px; pointer-events: none;
  opacity: 0; transition: opacity .12s;
  box-shadow: 0 6px 24px rgba(0,0,0,.5);
}
#gtip.show { opacity: 1; }
#gtip strong { color: var(--ink); display: block; margin-bottom: 3px; font-size: 11.5px; }

/* Event type filter panel */
.u-ef-btn { padding: 3px 7px; font-size: 13px; line-height: 1; }
.u-ef-panel { display: none; background: var(--surface2,#071225); border: 1px solid var(--stroke,#1b2740); border-radius: 6px; padding: 8px 10px; margin-top: 4px; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.u-ef-panel.open { display: grid; }
.u-ef-row { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink); cursor: pointer; white-space: nowrap; padding: 2px 0; }
.u-ef-row input[type=checkbox] { cursor: pointer; accent-color: var(--accent,#60a5fa); width: 13px; height: 13px; flex-shrink: 0; }

/* ── 24h News Modal ──────────────────────────────────────── */
.nm24-overlay {
  display: none; position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,.7); align-items: center; justify-content: center;
}
.nm24-overlay.open { display: flex; }

.nm24-panel {
  background: var(--surface,#0c1426); border: 1px solid var(--stroke,#1b2740); border-radius: 16px;
  width: 98vw; height: 97vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 32px 100px rgba(0,0,0,.7);
}

/* Header */
.nm-header {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 24px; border-bottom: 1px solid var(--stroke,#1b2740); flex-shrink: 0;
}
.logo { display:inline-flex; align-items:baseline; letter-spacing:0; white-space:nowrap; flex-shrink:0; }
.logo-watch { color:var(--accent,#60a5fa); font-weight:700; }
.logo-grid  { color:var(--muted,#9aa3b2); font-weight:400; }
.logo-hash  { color:var(--accent,#60a5fa); font-weight:300; }
.nm-logo { font-size: 16px; font-weight: 700; letter-spacing: 0; flex-shrink: 0; color: var(--ink,#e6e7ea); }
.nm-logo span { color: var(--accent,#60a5fa); }
.nm-logo-hash { color: var(--accent,#60a5fa); font-weight: 300; }
.nm-divider { width: 1px; height: 20px; background: var(--stroke,#1b2740); flex-shrink: 0; }
.nm-sym  { font-size: 19px; font-weight: 800; color: var(--ink,#e6e7ea); }
.nm-name { font-size: 13px; color: var(--muted,#9aa3b2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.nm-spacer { flex: 1; }
.nm-price { font-size: 16px; font-weight: 700; white-space: nowrap; color: var(--ink,#e6e7ea); }
.nm-change {
  font-size: 12px; padding: 3px 9px; border-radius: 7px;
  background: #0f2d1a; color: var(--up,#22c55e); white-space: nowrap; cursor: default;
}
.nm-change.down { background: #2d0f0f; color: var(--down,#ef4444); }
.nm-close {
  background: none; border: 1px solid var(--stroke,#1b2740); color: var(--muted,#9aa3b2);
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 8px;
  cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s;
}
.nm-close:hover { border-color: var(--down,#ef4444); color: var(--down,#ef4444); }

/* Sentiment strip */
.sentiment-strip {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 24px; border-bottom: 1px solid var(--stroke,#0d1828);
  flex-shrink: 0; flex-wrap: wrap;
}
.sent-pill {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; padding: 3px 11px; border-radius: 20px; font-weight: 500; cursor: default;
}
.sent-pill.bull { background: #0f2d1a; color: var(--up,#22c55e); }
.sent-pill.bear { background: #2d0f0f; color: var(--down,#ef4444); }
.sent-pill.neut { background: #111828; color: var(--muted,#9aa3b2); }
.sent-pill b { font-size: 13px; }
.sent-time { font-size: 11px; color: #374151; margin-left: auto; white-space: nowrap; cursor: default; }

/* Body grid */
.nm-body {
  display: grid; grid-template-columns: 1fr minmax(320px, 34%);
  flex: 1; overflow: hidden; min-height: 0;
}

/* Articles column */
.nm-articles { border-right: 1px solid var(--stroke,#1b2740); overflow-y: auto; padding: 6px 0; }
.nm-articles::-webkit-scrollbar { width: 4px; }
.nm-articles::-webkit-scrollbar-thumb { background: var(--stroke,#1b2740); border-radius: 2px; }

.day-sep {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px 6px; font-size: 11px; color: #374151;
  text-transform: uppercase; letter-spacing: .07em;
}
.day-sep::before, .day-sep::after { content: ''; flex: 1; height: 1px; background: #0d1828; }

/* Article rows */
.article { border-bottom: 1px solid #0d1828; }
.article:last-child { border-bottom: none; }
.art-head {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 20px 10px; cursor: pointer; transition: background .12s;
}
.art-head:hover { background: #0f1e38; }
.art-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; }
.art-dot.bullish { background: var(--up,#22c55e); }
.art-dot.bearish { background: var(--down,#ef4444); }
.art-dot.neutral { background: #374151; }
.art-dot.unknown { background: transparent; border: 1px solid #374151; }
.art-main { flex: 1; min-width: 0; }
.art-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; flex-wrap: wrap; }
.art-source { font-size: 11px; color: var(--muted,#9aa3b2); font-weight: 600; }
.art-age    { font-size: 11px; color: #374151; }
.art-badge  { font-size: 10px; padding: 1px 7px; border-radius: 9px; font-weight: 700; letter-spacing: .03em; cursor: default; }
.art-badge.bullish { background: #0f2d1a; color: var(--up,#22c55e); }
.art-badge.bearish { background: #2d0f0f; color: var(--down,#ef4444); }
.art-badge.neutral { background: #161e2e; color: #6b7280; }
.art-badge.unknown { background: #111828; color: #374151; border: 1px solid var(--stroke,#1b2740); }
.art-title-row { display: flex; align-items: flex-start; gap: 8px; }
.art-title { font-size: 13.5px; font-weight: 600; color: var(--ink,#e6e7ea); line-height: 1.45; flex: 1; transition: color .12s; }
.art-head:hover .art-title { color: #93c5fd; }
.art-link { color: #2a3a5c; font-size: 13px; text-decoration: none; flex-shrink: 0; margin-top: 1px; transition: color .12s; }
.art-link:hover { color: var(--accent,#60a5fa); }
.art-perex { font-size: 12px; color: #6b7a8e; line-height: 1.5; margin-top: 5px; }
.art-perex.art-perex-clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article.open .art-perex.art-perex-clamped { display: block; overflow: visible; -webkit-line-clamp: unset; }
.art-perex.ai-loaded { color: var(--muted,#9aa3b2); }
.art-perex-ai { display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: .06em; color: #374151; border: 1px solid #1e2d44; border-radius: 3px; padding: 0 4px; margin-right: 5px; vertical-align: middle; line-height: 15px; position: relative; top: -1px; }
.art-chevron { color: #2a3a5c; font-size: 10px; flex-shrink: 0; margin-top: 5px; transition: transform .2s; }
.article.open .art-chevron { transform: rotate(90deg); }
.art-body { max-height: 0; overflow: hidden; transition: max-height .4s ease; background: var(--bg-card,#071225); }
.article.open .art-body { max-height: 6000px; }
.art-body-inner { padding: 12px 20px 14px 37px; }
.art-fulltext { font-size: 12.5px; color: #c8cdd6; line-height: 1.7; border-left: 2px solid var(--stroke,#1b2740); padding-left: 12px; margin-top: 12px; }
.art-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.art-btn-full { border-color: var(--stroke,#1b2740); }
.art-btn-vytah { border-color: rgba(96,165,250,.3); color: var(--accent,#60a5fa); }
.art-btn-vytah:hover { border-color: var(--accent,#60a5fa); }
.art-btn { font-size: 11px; padding: 5px 11px; background: var(--surface,#0c1426); border: 1px solid var(--stroke,#1b2740); color: var(--muted,#9aa3b2); border-radius: 7px; cursor: pointer; transition: border-color .12s, color .12s; display: flex; align-items: center; gap: 4px; }
.art-btn:hover { border-color: var(--accent,#60a5fa); color: var(--accent,#60a5fa); }
.art-btn.loading { color: #374151; pointer-events: none; border-color: #111c2e; }

/* Article skeleton */
.art-skel { display: flex; align-items: flex-start; gap: 10px; padding: 14px 20px 13px; border-bottom: 1px solid #0d1828; }
.art-skel-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; background: linear-gradient(90deg,#0d1828 25%,#131f32 50%,#0d1828 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.art-skel-main { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.art-skel-meta { display: flex; gap: 8px; }

/* Briefing skeleton */
.skel-line { height: 11px; border-radius: 4px; background: linear-gradient(90deg,#0d1828 25%,#131f32 50%,#0d1828 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.bf-skeleton { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }

/* Loading notice */
.loading-notice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 28px 20px 20px; border-bottom: 1px solid #0d1828; }
.loading-notice-time { font-size: 15px; font-weight: 700; color: var(--accent,#60a5fa); letter-spacing: -.2px; }
.loading-notice-sub  { font-size: 11px; color: #374151; }
.loading-spinner { width: 18px; height: 18px; border: 2px solid var(--stroke,#1b2740); border-top-color: var(--accent,#60a5fa); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* AI column */
.nm-ai { display: flex; flex-direction: column; overflow: hidden; }
.nm-ai-hdr { padding: 12px 18px 11px; border-bottom: 1px solid #0d1828; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nm-ai-hdr-left { display: flex; flex-direction: column; gap: 2px; }
.nm-ai-hdr-label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #4b5568; cursor: default; }
.nm-ai-hdr-time  { font-size: 11px; color: #374151; }
.nm-ai-hdr-badge { font-size: 10px; padding: 2px 8px; border-radius: 6px; background: #0d1e3a; color: var(--accent,#60a5fa); border: 1px solid var(--stroke,#1b2740); cursor: default; white-space: nowrap; }
.bf-model-badge { display: inline-block; font-size: 10px; font-weight: 500; padding: 2px 8px; border-radius: 5px; background: var(--surface2,#0d1e3a); color: var(--muted,#9aa3b2); border: 1px solid var(--stroke,#1b2740); white-space: nowrap; }
.bf-model-strip { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.bf-model-strip .bf-model-badge { display: flex; align-items: center; gap: 4px; }
.bf-model-strip .bf-model-badge b { color: var(--accent,#60a5fa); font-weight: 600; }
.nm-ai-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.nm-ai-body::-webkit-scrollbar { width: 4px; }
.nm-ai-body::-webkit-scrollbar-thumb { background: var(--stroke,#1b2740); border-radius: 2px; }

/* Briefing sections */
.bf-section { margin-bottom: 20px; }
.bf-label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #4b5568; margin-bottom: 9px; display: flex; align-items: center; gap: 8px; }
.bf-label::after { content: ''; flex: 1; height: 1px; background: #0d1828; }
.bf-text { font-size: 13px; color: #c8cdd6; line-height: 1.75; }
.bf-text strong { color: var(--ink,#e6e7ea); }
.bf-text .up   { color: var(--up,#22c55e);   font-weight: 600; }
.bf-text .down { color: var(--down,#ef4444); font-weight: 600; }
.bf-text .warn { color: var(--warn,#f59e0b); }
.bf-text abbr  { text-decoration: underline dotted; text-underline-offset: 2px; cursor: help; color: inherit; }
.bf-text ul { padding-left: 16px; margin: 6px 0; }
.bf-text ul li { margin-bottom: 6px; }
.bf-divider { height: 1px; background: #0d1828; margin: 0 0 20px; }
.bf-signal { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 6px; letter-spacing: .04em; margin-bottom: 10px; cursor: default; }
.bf-signal.add   { background: var(--badge-up-bg,#0f2d1a);   color: var(--up,#22c55e);   border: 1px solid #1a4528; }
.bf-signal.watch { background: var(--badge-warn-bg,#1c1600);  color: var(--warn,#f59e0b); border: 1px solid #3a2a00; }
.bf-signal.cut   { background: var(--badge-down-bg,#2d0f0f);  color: var(--down,#ef4444); border: 1px solid #4a1a1a; }
.nm24-overlay .bf-label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #4b5568; margin-bottom: 9px; display: flex; align-items: center; gap: 8px; }
.nm24-overlay .bf-label::after { content: ''; flex: 1; height: 1px; background: #0d1828; }
.art-fulltext.translated { color: var(--ink,#e6e7ea); }
.sent-ai-pending { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted,#9aa3b2); }
.sent-ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent,#60a5fa); animation: nm-pulse 1.2s ease-in-out infinite; flex-shrink: 0; }
@keyframes nm-pulse { 0%,100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.2); } }
.art-dot-pending { background: var(--stroke,#1b2740) !important; animation: nm-pulse 1.4s ease-in-out infinite; }
.nm-irrelevant-badge { font-size: 11px; color: var(--muted,#9aa3b2); padding: 4px 12px; cursor: pointer; user-select: none; display: flex; align-items: center; gap: 4px; }
.nm-irrelevant-badge:hover { color: var(--ink,#e6e7ea); }
.nm-irr-arrow { font-size: 10px; transition: transform .2s; }
.nm-irrelevant-badge.open .nm-irr-arrow { transform: rotate(90deg); }
.art-irrelevant { opacity: 0.4; }
.art-irrelevant .art-title { font-style: italic; font-size: 12px; }
.art-irrelevant .art-dot { background: var(--stroke,#1b2740) !important; }
.art-irrelevant .art-perex { display: none; }
.art-irrelevant .art-head { padding: 6px 10px; min-height: 0; }
.art-irrelevant .art-badge { display: none; }
.art-top { border-left: 2px solid #f59e0b; background: linear-gradient(90deg,rgba(245,158,11,.06) 0,transparent 60%); }
.art-top .art-title { color: var(--ink,#e6e7ea); font-weight: 600; }
.art-top-badge { font-size: 10px; font-weight: 700; color: #f59e0b; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.3); border-radius: 3px; padding: 1px 5px; margin-left: 4px; }
.art-top-sep { color: #f59e0b !important; border-color: rgba(245,158,11,.25) !important; }
.nm-cache-banner { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted,#9aa3b2); background: var(--surface2,#071225); border: 1px solid var(--stroke,#1b2740); border-radius: 6px; padding: 6px 10px; margin-bottom: 10px; }
.nm-cache-banner.stale { color: var(--warn,#f59e0b); border-color: #3a2a00; background: var(--badge-warn-bg,#1c1600); }
.nm-refresh-btn { margin-left: auto; background: none; border: 1px solid var(--stroke,#1b2740); border-radius: 4px; color: var(--accent,#60a5fa); font-size: 11px; padding: 2px 8px; cursor: pointer; }
.nm-refresh-btn:hover { background: var(--stroke,#1b2740); }

/* Mobile tabs */
.nm-tabs { display: none; flex-shrink: 0; border-bottom: 1px solid var(--stroke,#1b2740); }
.nm-tab { flex: 1; padding: 12px 8px; font-size: 13px; font-weight: 600; background: none; border: none; border-bottom: 2px solid transparent; color: var(--muted,#9aa3b2); cursor: pointer; transition: color .15s, border-color .15s; }
.nm-tab.active { color: var(--accent,#60a5fa); border-bottom-color: var(--accent,#60a5fa); }

/* Tablet ≤750px */
@media (max-width: 750px) and (min-width: 601px) {
  .nm24-overlay .nm-body { grid-template-columns: 1fr; grid-template-rows: 1fr auto; overflow: hidden; }
  .nm24-overlay .nm-articles { border-right: none; border-bottom: 1px solid var(--stroke,#1b2740); }
  .nm24-overlay .nm-ai { max-height: 320px; border-top: 1px solid var(--stroke,#1b2740); }
}

/* Mobile ≤600px */
@media (max-width: 600px) {
  .nm24-panel { border-radius: 0; width: 100vw; height: 100vh; }
  .nm24-overlay .nm-header { padding: 12px 16px; gap: 10px; }
  .nm24-overlay .nm-logo, .nm24-overlay .nm-divider { display: none; }
  .nm24-overlay .nm-name { display: none; }
  .nm24-overlay .nm-sym  { font-size: 17px; }
  .nm24-overlay .nm-price { font-size: 15px; }
  .nm24-overlay .nm-body { grid-template-columns: 1fr; overflow: visible; }
  .nm24-overlay .nm-tabs { display: flex; }
  .nm24-overlay .nm-ai { display: none; }
  .nm24-overlay .nm-ai.tab-active { display: flex; flex: 1; }
  .nm24-overlay .nm-articles.tab-hidden { display: none; }
  .nm24-overlay .sentiment-strip { padding: 8px 16px; }
  .nm24-overlay .sent-time { display: none; }
  .nm24-overlay .art-head { padding: 12px 16px 10px; }
  .nm24-overlay .art-body-inner { padding: 12px 16px 14px 32px; }
}
