/* ═══════════════════════════════════════════════════════════════
   QuantView — Modern Dark Finance UI
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg-base:        #080c14;
  --bg-surface:     #0d1220;
  --bg-elevated:    #121829;
  --bg-card:        #141c2e;
  --bg-card-hover:  #182134;
  --bg-input:       #0f1623;

  --border:         rgba(255,255,255,0.06);
  --border-focus:   rgba(99,130,255,0.5);

  --text-primary:   #e8edf8;
  --text-secondary: #7a8aaa;
  --text-muted:     #4a5670;
  --text-inverse:   #080c14;

  --accent:         #4361ee;
  --accent-light:   #6382ff;
  --accent-dim:     rgba(67,97,238,0.15);

  --green:          #00d97e;
  --green-dim:      rgba(0,217,126,0.12);
  --red:            #e84040;
  --red-dim:        rgba(232,64,64,0.12);
  --yellow:         #f7b731;
  --yellow-dim:     rgba(247,183,49,0.12);
  --purple:         #9b59b6;

  --sidebar-width:  240px;
  --sidebar-collapsed: 64px;
  --topbar-height:  64px;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 24px rgba(67,97,238,0.2);

  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ══════════════════════════════════ SIDEBAR ══ */

.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: width var(--transition);
  overflow: hidden;
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .badge,
.sidebar.collapsed .sidebar-portfolio-summary,
.sidebar.collapsed .status-text { display: none; }
.sidebar.collapsed .sidebar-toggle { transform: rotate(180deg); }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  font-size: 22px;
  color: var(--accent-light);
  line-height: 1;
}

.logo-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  white-space: nowrap;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  line-height: 1;
  transition: color var(--transition), transform 0.3s;
}
.sidebar-toggle:hover { color: var(--text-primary); }

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

.nav-item.active {
  color: var(--accent-light);
  background: var(--accent-dim);
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.badge {
  margin-left: auto;
  background: linear-gradient(135deg, #4361ee, #9b59b6);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 10px;
}

/* Summary */
.sidebar-portfolio-summary {
  padding: 16px;
  margin: 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.summary-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.summary-value {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.summary-change {
  font-size: 12px;
  margin-top: 3px;
  font-family: var(--font-mono);
}

/* Footer */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  transition: background var(--transition);
}
.status-dot.online { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-dot.error  { background: var(--red); }

.status-text {
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* ══════════════════════════════════ MAIN AREA ══ */

.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition);
}

.sidebar.collapsed ~ .main { margin-left: var(--sidebar-collapsed); }

/* ── Topbar ── */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 16px;
}

.topbar-left { flex-shrink: 0; display: flex; align-items: center; gap: 4px; }

.page-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: flex-end;
}

/* Search */
.search-wrapper {
  position: relative;
  width: 260px;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}

.search-input:focus { border-color: var(--border-focus); }
.search-input::placeholder { color: var(--text-muted); }

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 200;
  overflow: hidden;
}

.search-dropdown.open { display: block; }

.search-result-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background var(--transition);
}
.search-result-item:hover { background: rgba(255,255,255,0.05); }

.search-result-ticker {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  color: var(--accent-light);
  min-width: 60px;
}

.search-result-name {
  font-size: 12px;
  color: var(--text-secondary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ══════════════════════════════════ VIEWS ══ */

.view {
  display: none;
  padding: 24px;
  animation: fadeSlide 0.25s ease;
}
.view.active { display: block; }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.stat-card:hover { border-color: rgba(255,255,255,0.12); }

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* ── Dashboard Grid ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  grid-template-rows: auto auto;
  gap: 16px;
}

.card-large  { grid-column: 1; }
.card-wide   { grid-column: 1 / -1; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition);
  position: relative;
}

.card:hover { border-color: rgba(255,255,255,0.1); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.card-body {
  padding: 20px;
}

.card-actions {
  display: flex;
  gap: 4px;
}

.card-action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all var(--transition);
}
.card-action-btn:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }

/* Pill buttons */
.pill {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.pill:hover { border-color: rgba(255,255,255,0.15); color: var(--text-primary); }
.pill.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* ── Chart containers ── */
/* Pevná výška zabraňuje Chart.js infinite-resize smyčce */
.chart-wrap {
  position: relative;
  width: 100%;
  height: 260px;
}
.chart-wrap--donut { height: 200px; }
.chart-wrap--tall  { height: 300px; }

.chart-wrap canvas,
.chart-wrap--donut canvas,
.chart-wrap--tall canvas {
  position: absolute;
  inset: 0;
}

.chart-donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.donut-legend {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-name { flex: 1; color: var(--text-secondary); }
.legend-pct  { font-family: var(--font-mono); color: var(--text-primary); font-weight: 500; }

/* ── Table ── */
.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table th.num { text-align: right; }

.data-table td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-primary);
  vertical-align: middle;
}
.data-table td.num { text-align: right; font-family: var(--font-mono); }

.data-table tbody tr {
  transition: background var(--transition);
  cursor: pointer;
}
.data-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.data-table tbody tr:last-child td { border-bottom: none; }

.ticker-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent-light);
}

.company-name {
  font-size: 12px;
  color: var(--text-secondary);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.up   { color: var(--green); }
.down { color: var(--red); }
.flat { color: var(--text-secondary); }

.change-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}
.change-badge.up   { background: var(--green-dim); color: var(--green); }
.change-badge.down { background: var(--red-dim);   color: var(--red); }
.change-badge.flat { background: rgba(255,255,255,0.06); color: var(--text-secondary); }

.volume-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.mktcap-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

/* Empty state */
.empty-row td { padding: 40px; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 32px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 13px;
}

/* Row actions */
.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity var(--transition);
}
tr:hover .row-actions { opacity: 1; }

.icon-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  transition: all var(--transition);
}
.icon-btn:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.icon-btn.danger:hover { background: var(--red-dim); border-color: var(--red); color: var(--red); }

/* ── News ── */
.news-list { display: flex; flex-direction: column; gap: 0; }

.news-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all var(--transition);
}
.news-item:last-child { border-bottom: none; }
.news-item:hover .news-title { color: var(--accent-light); }

.news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.news-source {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-light);
  background: var(--accent-dim);
  padding: 2px 6px;
  border-radius: 3px;
}

.news-time {
  font-size: 11px;
  color: var(--text-muted);
}

.news-title {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.4;
  transition: color var(--transition);
}

.sentiment-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 4px;
}
.sentiment-tag.positive { background: var(--green-dim); color: var(--green); }
.sentiment-tag.negative { background: var(--red-dim);   color: var(--red); }
.sentiment-tag.neutral  { background: rgba(255,255,255,0.06); color: var(--text-secondary); }

.news-loading {
  color: var(--text-muted);
  font-size: 13px;
  padding: 20px 0;
  text-align: center;
}

.news-fetch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.news-last-update {
  font-size: 11px;
  color: var(--text-muted);
}

/* ══════════════════════════════════ STOCK DETAIL ══ */

.stock-detail-layout { display: flex; flex-direction: column; gap: 20px; }

/* ── Watchlist ticker switcher ── */
.watchlist-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
}
.watchlist-switcher:empty { display: none; }

.wl-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
  white-space: nowrap;
}
.wl-chip:hover {
  border-color: rgba(255,255,255,0.15);
  background: var(--bg-card);
}
.wl-chip.active {
  border-color: var(--accent);
  background: rgba(99,130,255,0.1);
}
.wl-chip-ticker {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
}
.wl-chip-chg {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
}

.stock-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.stock-hero-left { display: flex; flex-direction: column; gap: 8px; }

.stock-ticker-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-light);
  background: var(--accent-dim);
  border: 1px solid rgba(99,130,255,0.2);
  padding: 4px 12px;
  border-radius: 6px;
  display: inline-block;
  letter-spacing: 1px;
}

.stock-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.stock-price-block {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.stock-price {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
}

.stock-change {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
}

.stock-exchange {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  padding: 3px 8px;
  border-radius: 4px;
}

.stock-hero-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stock-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.stat-mini {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.stat-mini-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-mini-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.stock-detail-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
}

.card-chart { grid-column: 1; }

/* KV list */
.kv-list { display: flex; flex-direction: column; gap: 0; }

.kv-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
}
.kv-item:last-child { border-bottom: none; }

.kv-key { color: var(--text-secondary); }
.kv-val { font-family: var(--font-mono); font-weight: 500; color: var(--text-primary); }

/* Indicators */
.indicators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.indicator-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.indicator-name {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.indicator-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.indicator-signal {
  font-size: 11px;
  font-weight: 600;
}
.indicator-signal.buy  { color: var(--green); }
.indicator-signal.sell { color: var(--red); }
.indicator-signal.neutral { color: var(--yellow); }

/* ── AI Card ── */
.card-ai {
  grid-column: 1 / -1;
  border-color: rgba(99,130,255,0.25);
  background: linear-gradient(135deg, #141c2e 0%, #0f1528 100%);
}

.card-ai .card-header {
  border-bottom-color: rgba(99,130,255,0.15);
}

.ai-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-light);
  display: inline-block;
  animation: aiPulse 2s infinite;
  flex-shrink: 0;
}

@keyframes aiPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--accent-light); }
  50%       { opacity: 0.6; box-shadow: 0 0 12px var(--accent-light); }
}

/* Prediction layout */
.prediction-layout {
  display: grid;
  grid-template-columns: 200px 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.pred-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px;
  color: var(--text-secondary);
}

.pulse-ring {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 3px solid var(--accent-dim);
  border-top-color: var(--accent-light);
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.pred-direction {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.pred-arrow {
  font-size: 48px;
  line-height: 1;
}

.pred-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.pred-direction-text {
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pred-prob {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
}

.pred-factors { display: flex; flex-direction: column; gap: 10px; }
.pred-factor  { display: flex; flex-direction: column; gap: 5px; }

.pred-factor-name {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.pred-factor-bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.pred-factor-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transition: width 0.6s ease;
}

.pred-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pred-summary-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.pred-summary-key { color: var(--text-secondary); }
.pred-summary-val { font-family: var(--font-mono); font-weight: 600; }

.pred-earnings-warn {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(247,183,49,0.08);
  border: 1px solid rgba(247,183,49,0.25);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--yellow);
  margin-bottom: 4px;
}
.pred-earnings-soon {
  background: rgba(232,64,64,0.08);
  border-color: rgba(232,64,64,0.25);
  color: var(--red);
}

/* ── Prediction explanation ── */
.pred-explain { margin-top: 12px; }

.pred-explain-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 10px 14px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  transition: all var(--transition);
}
.pred-explain-toggle:hover { border-color: rgba(255,255,255,0.12); color: var(--text-primary); }
.pred-explain-toggle .expl-chevron { font-size: 10px; transition: transform 0.2s; }
.pred-explain-toggle.open .expl-chevron { transform: rotate(180deg); }
.pred-explain-toggle.open { border-radius: var(--radius-md) var(--radius-md) 0 0; border-bottom-color: transparent; }

.pred-explain-list {
  display: none; flex-direction: column;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-top: none; border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow: hidden;
}
.pred-explain-list.open { display: flex; }

.pred-explain-item {
  display: grid; grid-template-columns: 18px 1fr;
  gap: 10px; padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.pred-explain-item:last-child { border-bottom: none; }

.pred-explain-icon { font-size: 13px; padding-top: 1px; }

.pred-explain-body { display: flex; flex-direction: column; gap: 2px; }
.pred-explain-row  { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pred-explain-signal { font-weight: 700; color: var(--text-primary); font-size: 12px; }
.pred-explain-val  {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  padding: 1px 5px; border-radius: 4px;
}
.pred-explain-val.up   { color: var(--green); background: var(--green-dim); }
.pred-explain-val.down { color: var(--red);   background: var(--red-dim); }
.pred-explain-val.neutral { color: var(--text-secondary); background: rgba(255,255,255,0.05); }
.pred-explain-text { color: var(--text-secondary); line-height: 1.5; font-size: 11px; }

/* ── Signals card — standalone karta ── */
/* Když je signálová karta samostatná, skryjeme border a rounded rohy kolem listu */
#predSignalsPanel .pred-explain-list {
  border: none;
  border-radius: 0;
  background: transparent;
}
#predSignalsPanel .pred-explain-item {
  border-bottom: 1px solid var(--border);
}
#predSignalsPanel .pred-explain-item:last-child {
  border-bottom: none;
}

.pred-signals-horizon {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.pred-signals-h-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.pred-signals-h-dir {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ── Legenda predikce v grafu ── */
.chart-pred-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 6px 4px 0;
  font-size: 11px;
  color: var(--text-secondary);
}
.chart-pred-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.chart-pred-legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.chart-pred-legend-line {
  width: 18px; height: 2px;
  border-top: 2px dashed currentColor;
  flex-shrink: 0;
}
.pred-toggle-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  padding: 2px 7px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 11px;
  transition: opacity .15s, border-color .15s;
}
.pred-toggle-btn:hover {
  border-color: rgba(255,255,255,0.28);
}
.pred-toggle-btn.inactive {
  opacity: 0.35;
  text-decoration: line-through;
}

/* ── Multi-horizon prediction ── */
.pred-multi-wrap { display: flex; flex-direction: column; gap: 14px; grid-column: 1 / -1; }

.pred-overall {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: var(--radius-md);
  background: var(--bg-elevated); border: 1px solid var(--border);
  flex-wrap: wrap;
}
.pred-overall.up  { border-color: rgba(0,217,126,0.3); background: rgba(0,217,126,0.05); }
.pred-overall.down { border-color: rgba(232,64,64,0.3); background: rgba(232,64,64,0.05); }
.pred-overall-arrow { font-size: 20px; font-weight: 900; line-height: 1; }
.pred-overall.up  .pred-overall-arrow { color: var(--green); }
.pred-overall.down .pred-overall-arrow { color: var(--red); }
.pred-overall-dir { font-weight: 700; font-size: 14px; }
.pred-overall-meta { font-size: 12px; color: var(--text-secondary); margin-left: auto; font-family: var(--font-mono); }

.pred-horizon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.pred-hcard {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 14px 10px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
}
.pred-hcard:hover { border-color: rgba(255,255,255,0.15); }
.pred-hcard.up.active  { border-color: var(--green); background: rgba(0,217,126,0.07); }
.pred-hcard.down.active { border-color: var(--red); background: rgba(232,64,64,0.07); }
.pred-hcard.up  .phc-arrow, .pred-hcard.up  .phc-dir  { color: var(--green); }
.pred-hcard.down .phc-arrow, .pred-hcard.down .phc-dir { color: var(--red); }
.phc-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.phc-arrow { font-size: 26px; line-height: 1; font-weight: 900; }
.phc-dir   { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; }
.phc-prob  { font-size: 22px; font-weight: 800; font-family: var(--font-mono); margin-top: 2px; }
.phc-meta  { font-size: 10px; color: var(--text-secondary); font-family: var(--font-mono); }

.pred-detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start;
}
.pred-detail-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 8px;
}

@media (max-width: 600px) {
  .pred-horizon-grid { grid-template-columns: repeat(2, 1fr); }
  .pred-detail-grid  { grid-template-columns: 1fr; }
  .pred-overall-meta { margin-left: 0; }
}

/* ══════════════════════════════════ DRAG & DROP ══ */

/* Grip handle — zobrazí se při hoveru nad kartou */
.drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: var(--text-muted);
  padding: 0;
  margin-right: 8px;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-drag: none;
  border-radius: 3px;
}
.drag-handle:hover { color: var(--text-secondary); background: rgba(255,255,255,0.05); }
.drag-handle:active { cursor: grabbing; }
.drag-handle svg { display: block; pointer-events: none; }

/* Handle v rohu stat-card (karty bez záhlaví) */
.drag-handle--corner {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
  padding: 3px;
}
.stat-card { position: relative; }

/* Zobrazit handle při hoveru nad kartou */
.card:hover       .drag-handle,
.stat-card:hover  .drag-handle { opacity: 1; }

/* ── Stavy při přetahování ── */

/* Přetahovaná karta — zprůhledníme */
[data-card-id].dnd-dragging {
  opacity: 0.35;
  cursor: grabbing;
}

/* Drop indikátor — čára nad / pod cílovou kartou */
[data-card-id].dnd-before {
  box-shadow: 0 -3px 0 0 var(--accent-light), 0 0 0 1px rgba(99,130,255,0.15);
}
[data-card-id].dnd-after {
  box-shadow: 0 3px 0 0 var(--accent-light), 0 0 0 1px rgba(99,130,255,0.15);
}

/* ── Resize handle ── */
.resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  bottom: 0;
  cursor: col-resize;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.resize-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 2px;
  transform: translateY(-50%);
  width: 2px;
  height: 28px;
  border-radius: 1px;
  background: var(--text-muted);
  transition: background 0.15s;
}
.card:hover       .resize-handle,
.stat-card:hover  .resize-handle { opacity: 1; }
.resize-handle:hover              { background: rgba(99,130,255,0.08); }
.resize-handle:hover::after       { background: var(--accent-light); }

/* Aktivní resize */
[data-card-id].resizing {
  user-select: none;
  cursor: col-resize;
  transition: none;
}
[data-card-id].resizing .resize-handle { opacity: 1; background: rgba(99,130,255,0.12); }
[data-card-id].resizing .resize-handle::after { background: var(--accent-light); }

/* Tooltip s aktuální šířkou */
.resize-tip {
  position: absolute;
  bottom: 8px;
  right: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 20;
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════ PORTFOLIO VIEW ══ */

.portfolio-header-row { margin-bottom: 16px; }

.lot-toggle-btn {
  background: none; border: 1px solid var(--border);
  border-radius: 4px; color: var(--text-muted);
  cursor: pointer; font-size: 9px; width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); padding: 0; flex-shrink: 0;
}
.lot-toggle-btn:hover { border-color: var(--accent); color: var(--accent-light); }

.portfolio-lots-row td { padding: 0 !important; }

.lot-sub-row {
  background: rgba(255,255,255,0.02);
  border-top: 1px dashed rgba(255,255,255,0.05);
}
.lot-sub-row td { padding: 5px 8px !important; }
.lot-sub-row:hover { background: rgba(255,255,255,0.04); }

.portfolio-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

/* ══════════════════════════════════ WATCHLIST ══ */

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

.watchlist-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition);
}
.watchlist-card:hover {
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.wc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.wc-ticker { font-family: var(--font-mono); font-weight: 700; color: var(--accent-light); font-size: 14px; }
.wc-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 14px; transition: color var(--transition); }
.wc-remove:hover { color: var(--red); }
.wc-name   { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }
.wc-price  { font-family: var(--font-mono); font-size: 20px; font-weight: 700; margin-bottom: 4px; }

/* ══════════════════════════════════ AI PREDICTIONS VIEW ══ */

.ai-hero {
  background: linear-gradient(135deg, #141c2e 0%, #0d1528 50%, #141c2e 100%);
  border: 1px solid rgba(99,130,255,0.2);
  border-radius: var(--radius-xl);
  padding: 36px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.ai-hero-text h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(90deg, var(--text-primary), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ai-hero-text p {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 460px;
  line-height: 1.6;
}

.ai-search-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

/* Row 1: input + watchlist chips */
.pred-ticker-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.pred-wl-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.pred-wl-chip {
  padding: 5px 10px;
  border-radius: 20px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.pred-wl-chip:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.pred-wl-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Row 2: horizon pills */
.horizon-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.horizon-pills .pill {
  padding: 6px 12px;
  font-size: 12px;
}
.pill-all {
  margin-left: 6px;
  border-left: 1px solid var(--border);
  padding-left: 14px !important;
}
.pill-all.active {
  background: var(--accent-warn, #f7b731);
  border-color: var(--accent-warn, #f7b731);
  color: #000;
}

/* Row 3: action buttons */
.pred-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* Batch run progress */
.pred-batch-progress {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--bg-card-2);
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
}
.pred-batch-progress strong {
  color: var(--text-primary);
}
.pred-batch-bar-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.pred-batch-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s;
}

.ai-search-input {
  width: 200px;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid rgba(99,130,255,0.2);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-mono);
  outline: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.ai-search-input:focus { border-color: var(--accent); }

/* ══════════════════════════════════ BUTTONS ══ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-light); border-color: var(--accent-light); }

.btn-secondary {
  background: rgba(255,255,255,0.07);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.15); }

.btn-ghost {
  background: none;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(232,64,64,0.3);
}
.btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }

.btn-ai {
  background: linear-gradient(135deg, #4361ee, #9b59b6);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(67,97,238,0.3);
}
.btn-ai:hover { box-shadow: 0 4px 20px rgba(67,97,238,0.5); transform: translateY(-1px); }

.btn-claude {
  background: linear-gradient(135deg, #92400e, #d97706);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(217,119,6,0.3);
}
.btn-claude:hover { box-shadow: 0 4px 20px rgba(217,119,6,0.5); transform: translateY(-1px); }

/* ── Claude analysis panel ── */
.claude-analysis-panel {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(217,119,6,0.35);
  background: rgba(217,119,6,0.06);
  display: flex; flex-direction: column; gap: 8px;
}
.claude-analysis-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.claude-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .6px;
  background: linear-gradient(135deg, #92400e, #d97706);
  color: #fff; padding: 2px 8px; border-radius: 20px;
}
.claude-direction { font-size: 13px; font-weight: 700; }
.claude-direction.up  { color: var(--green); }
.claude-direction.down { color: var(--red); }
.claude-conf { font-size: 11px; color: var(--text-secondary); margin-left: auto; }
.claude-reasoning { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
.claude-factors { display: flex; gap: 6px; flex-wrap: wrap; }
.claude-factor-tag {
  font-size: 11px; padding: 2px 8px;
  border-radius: 12px; border: 1px solid rgba(217,119,6,0.3);
  color: #d97706; background: rgba(217,119,6,0.08);
}

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 20px; font-size: 14px; }

/* ══════════════════════════════════ MODAL ══ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}
.modal-overlay.open { display: flex; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  width: 460px;
  max-width: 95vw;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
}

@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-title { font-size: 16px; font-weight: 700; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  transition: color var(--transition);
  padding: 4px;
}
.modal-close:hover { color: var(--text-primary); }

.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }

.form-input {
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.form-input:focus { border-color: var(--border-focus); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ticker-input-wrap {
  display: flex;
  gap: 8px;
}
.ticker-input-wrap .form-input { flex: 1; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 1px; font-size: 15px; }

.ticker-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 2px;
}

.ticker-preview-name { font-weight: 600; margin-bottom: 4px; }
.ticker-preview-info { font-size: 12px; color: var(--text-secondary); display: flex; gap: 12px; }
.ticker-preview-info span { font-family: var(--font-mono); }

.radio-group { display: flex; gap: 20px; }

.edit-calc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.edit-calc-item { display: flex; flex-direction: column; gap: 3px; }
.edit-calc-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.edit-calc-value { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--text-primary); }
.radio-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-secondary);
  cursor: pointer;
}
.radio-label input[type=radio] { accent-color: var(--accent); }

/* ══════════════════════════════════ TOASTS ══ */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  min-width: 260px;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  animation: toastIn 0.2s ease;
  pointer-events: auto;
}

@keyframes toastIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.toast-icon { font-size: 16px; flex-shrink: 0; }
.toast-text { flex: 1; }
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--accent); }
.toast.warning { border-left: 3px solid var(--yellow); }

/* ══════════════════════════════════ COMING SOON ══ */

.horizon-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  white-space: nowrap;
}

.pred-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.pred-result-badge.correct  { background: var(--green-dim); color: var(--green); }
.pred-result-badge.wrong    { background: var(--red-dim);   color: var(--red); }
.pred-result-badge.pending  { background: rgba(255,255,255,0.06); color: var(--text-muted); }

.ticker-accuracy-pill {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 80px;
}
.tap-ticker { font-family: var(--font-mono); font-weight: 700; color: var(--accent-light); }
.tap-acc    { font-size: 14px; font-weight: 700; }
.tap-sub    { font-size: 10px; color: var(--text-muted); }

.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 16px;
  color: var(--text-muted);
}

.cs-icon {
  font-size: 48px;
  opacity: 0.3;
}

.coming-soon h2 { font-size: 20px; font-weight: 700; color: var(--text-secondary); }
.coming-soon p  { font-size: 13px; text-align: center; max-width: 360px; line-height: 1.6; }

/* ══════════════════════════════════ RESPONSIVE ══ */

@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .card-wide { grid-column: 1; }
  .stock-detail-grid { grid-template-columns: 1fr; }
}

/* Na mobilech ignorujeme uložené šířky a jdeme na plnou šířku */
@media (max-width: 768px) {
  .draggable-grid {
    grid-template-columns: 1fr !important;
  }
  .draggable-grid > [data-card-id] {
    grid-column: 1 / -1 !important;
  }
  .resize-handle { display: none; }
}

/* Mobile menu button (hidden on desktop) */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  margin-right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.25s;
}
.mobile-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile overlay backdrop */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 99;
}
.mobile-overlay.visible { display: block; }

@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }
  .mobile-menu-btn { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 100;
    position: fixed;
    height: 100vh;
  }
  .sidebar.mobile-open { transform: translateX(0); width: 240px; }
  .sidebar-toggle { display: none; }
  .main { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .topbar { padding: 0 16px; }
  .view { padding: 16px; }
  .prediction-layout { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════ ALERT BELL ══ */

.alert-bell-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  font-size: 18px;
  line-height: 1;
}
.alert-bell-btn:hover { background: rgba(255,255,255,0.07); }

.alert-bell-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.alert-nav-badge {
  background: var(--red) !important;
  color: #fff !important;
}

/* ══════════════════════════════════ BACKTEST ══ */

.bt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.bt-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}
.bt-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bt-ticker-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.bt-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}
.bt-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.bt-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.bt-card:hover,
.bt-card--active {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.bt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.bt-ticker {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.bt-trades {
  font-size: 11px;
  color: var(--text-muted);
}

.bt-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.bt-metric {
  text-align: center;
}
.bt-metric-val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.bt-metric-lbl {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Badge UP/DOWN pro backtest tabulku */
.badge-up   { background: rgba(0,217,126,0.15); color: var(--green); padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge-down { background: rgba(232,64,64,0.15);  color: var(--red);   padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge-dir.up   { background: rgba(0,217,126,0.15); color: var(--green); padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge-dir.down { background: rgba(232,64,64,0.15);  color: var(--red);   padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; }

/* ══════════════════════════════════ ALERTS ══ */

.alerts-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.alerts-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) { .alerts-layout { grid-template-columns: 1fr; } }

.alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.alert-item:last-child { border-bottom: none; }

.alert-item-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.alert-ticker {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.alert-name {
  font-size: 12px;
  color: var(--text-muted);
}
.alert-condition {
  font-size: 13px;
  font-weight: 500;
}
.alert-triggered-info {
  font-size: 11px;
  color: var(--yellow);
  margin-top: 2px;
}
.alert-paused-badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  color: var(--text-muted);
  width: fit-content;
}

.alert-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.alert-item.alert-triggered {
  background: rgba(247,183,49,0.04);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  margin: 0 -8px;
}
.alert-item.alert-paused { opacity: 0.6; }

/* ══════════════════════════════════ VIEW FOOTER ══ */

/* ══════════════════════════════════ MODEL SETTINGS VIEW ══ */

.mset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.mset-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.mset-card-header {
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.07em;
  display: flex; align-items: center; gap: 8px;
}
.mset-card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }

.mset-row {
  display: grid; grid-template-columns: 1fr auto auto;
  align-items: center; gap: 10px; font-size: 12px;
}
.mset-row.with-toggle { grid-template-columns: 24px 1fr auto; }
.mset-label { color: var(--text-secondary); }
.mset-note  { font-size: 10px; color: var(--text-muted); margin-top: -6px; grid-column: 2/-1; }

.mset-input {
  width: 70px; padding: 4px 8px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-family: var(--font-mono); font-size: 12px; text-align: right;
  transition: border-color var(--transition);
}
.mset-input:focus { outline: none; border-color: var(--border-focus); }

.mset-toggle {
  width: 32px; height: 18px; position: relative; cursor: pointer;
}
.mset-toggle input { opacity: 0; width: 0; height: 0; }
.mset-toggle-track {
  position: absolute; inset: 0;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 9px; transition: all var(--transition);
}
.mset-toggle input:checked + .mset-toggle-track {
  background: var(--accent); border-color: var(--accent);
}
.mset-toggle-track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 12px; height: 12px; background: var(--text-muted);
  border-radius: 50%; transition: all var(--transition);
}
.mset-toggle input:checked + .mset-toggle-track::after {
  transform: translateX(14px); background: #fff;
}

.mset-ens-sum {
  font-size: 11px; padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--green-dim); color: var(--green);
  text-align: center; font-weight: 700;
}
.mset-ens-sum.invalid { background: var(--red-dim); color: var(--red); }

.mset-pipeline {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px 20px;
  margin-bottom: 20px; font-size: 12px;
}
.mset-pipe-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 12px;
}
.mset-pipe-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--border);
}
.mset-pipe-row:last-child { border-bottom: none; }
.mset-pipe-step {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent-light);
  font-size: 10px; font-weight: 700; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.mset-pipe-name  { flex: 1; color: var(--text-primary); }
.mset-pipe-value { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); }
.mset-pipe-arrow { color: var(--text-muted); font-size: 14px; }

/* event impact tabulka */
.mset-ei-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.mset-ei-table th { padding: 6px 8px; text-align: left; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border); }
.mset-ei-table td { padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,0.03); }
.mset-ei-table tr:last-child td { border-bottom: none; }
.mset-ei-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 12px; }

.mset-save-bar {
  display: flex; align-items: center; gap: 12px; justify-content: flex-end;
  padding: 12px 0; border-top: 1px solid var(--border); margin-top: 8px;
}
.mset-save-msg { font-size: 12px; color: var(--green); display: none; }
.mset-save-msg.show { display: block; }

/* event pattern impact barvy */
.impact-pos { color: var(--green); font-weight: 700; }
.impact-neg { color: var(--red);   font-weight: 700; }

/* ══════════════════════════════════ FOOTER ══ */

.view-footer {
  margin-top: 40px;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
}

.vf-section {
  flex: 1 1 220px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.vf-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.vf-section strong {
  color: var(--text-secondary);
  font-weight: 600;
}

/* ══════════════════════════════════ UTILITIES ══ */

.text-green  { color: var(--green) !important; }
.text-red    { color: var(--red) !important; }
.text-yellow { color: var(--yellow) !important; }
.text-muted  { color: var(--text-muted) !important; }
.text-mono   { font-family: var(--font-mono) !important; }

.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-card-hover) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── Analysis view ──────────────────────────────────────────── */
.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 1100px) { .analysis-grid { grid-template-columns: 1fr; } }

.perf-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
  font-size: 13px;
}
.perf-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
}
.perf-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.perf-legend-item .up   { color: var(--up);   font-weight: 600; }
.perf-legend-item .down { color: var(--down);  font-weight: 600; }

/* Correlation heatmap */
.corr-table-wrap {
  overflow-x: auto;
}
.corr-table {
  border-collapse: separate;
  border-spacing: 3px;
  font-size: 12px;
  width: 100%;
}
.corr-table th {
  padding: 6px 8px;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}
.corr-table td {
  padding: 8px 10px;
  text-align: center;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: #fff;
}
.corr-table td.corr-diag {
  background: rgba(100,100,120,0.15) !important;
  color: var(--text-muted);
}

/* ── Scheduler view ─────────────────────────────────────────── */
.scheduler-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}
.scheduler-last-refresh {
  font-size: 12px;
  color: var(--text-muted);
}
.scheduler-loading,
.scheduler-offline {
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.scheduler-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 28px 0 12px;
}
.scheduler-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 16px;
}
.scheduler-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: border-color 0.2s;
}
.scheduler-card:hover { border-color: var(--accent); }
.scheduler-card-icon {
  font-size: 22px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: 8px;
  flex-shrink: 0;
  color: var(--accent);
}
.scheduler-card-body {
  flex: 1;
  min-width: 0;
}
.scheduler-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.scheduler-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}
.scheduler-card-timing {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.scheduler-next-human {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(99,102,241,0.12);
  padding: 3px 10px;
  border-radius: 20px;
}
.scheduler-next-abs {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.scheduler-card-actions {
  flex-shrink: 0;
  align-self: center;
}

/* ── Login Screen ─────────────────────────────────────────────── */
#loginScreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-wrap {
  width: 100%;
  max-width: 380px;
  padding: 24px;
}
.login-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px 32px;
}
.login-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-light);
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: 1px;
}
.login-logo .logo-icon {
  color: var(--accent);
}
.login-title {
  text-align: center;
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.login-error {
  color: #f87171;
  font-size: 13px;
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.25);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 10px;
}

/* ── User menu (topbar) ───────────────────────────────────────── */
.user-menu {
  position: relative;
}
.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s;
  white-space: nowrap;
  max-width: 200px;
}
.user-menu-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}
.user-menu-email {
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 1000;
  overflow: hidden;
  display: none;
}
.user-dropdown.open {
  display: block;
}
.user-dd-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  text-align: left;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.user-dd-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.user-dd-logout {
  color: #f87171;
  border-top: 1px solid var(--border);
}
.user-dd-logout:hover {
  background: rgba(248,113,113,0.1);
  color: #f87171;
}

/* ── Custom chart tooltip ─────────────────────────────────────── */
#_chartTooltip {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  display: none;
  background: #0f1623;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 13px;
  min-width: 180px;
  max-width: 240px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
}
.ct-date {
  font-size: 11px;
  color: #7a8aaa;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.ct-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #c8d0e0;
  margin-bottom: 3px;
  font-size: 12px;
}
.ct-row-key { color: #7a8aaa; }
.ct-row-val { font-weight: 500; }
.ct-sep {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin: 7px 0;
}
.ct-pred-block { margin-top: 5px; }
.ct-pred-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}
.ct-horizon-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  color: #0f1623;
  letter-spacing: .03em;
}
.ct-pred-dir {
  font-weight: 600;
  font-size: 12px;
}
.ct-pred-dir.up   { color: #00d97e; }
.ct-pred-dir.down { color: #e84040; }
.ct-pred-result {
  font-size: 11px;
  font-weight: 600;
  margin-left: auto;
}
.ct-pred-result.ok     { color: #00d97e; }
.ct-pred-result.fail   { color: #e84040; }
.ct-pred-result.pending{ color: #7a8aaa; }
.ct-pred-stats {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: #9aaac4;
  margin-bottom: 3px;
}
.ct-pred-created {
  font-size: 10px;
  color: #5a6a85;
  margin-top: 2px;
}
