/* ==========================================
   table.css — Table interactions: sort, filter,
   selection, bulk actions, inline edit
   ========================================== */

/* ─── Sort indicators ─── */
/* NOTE: do NOT set `position: relative` here — it would override the
   `position: sticky` set in styles.css. Sticky already acts as a containing
   block for absolutely-positioned children (like .th-col-icons below). */
.data-table thead th { user-select: none; }
.data-table thead th.sortable { cursor: pointer; }
.data-table thead th.sortable:hover { background: #edf2ff; }
.sort-indicator { display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; vertical-align: middle; }
.sort-arrow { font-size: 14px; color: #b0b8c9; transition: color 0.15s; }
.sort-arrow.asc, .sort-arrow.desc { color: #3a7cee; }
.sort-badge { font-size: 9px; color: #3a7cee; font-weight: 700; min-width: 12px; height: 12px; display: inline-flex; align-items: center; justify-content: center; background: #e8eeff; border-radius: 50%; }

/* Column header hover icons */
.th-col-icons { display: none; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); gap: 2px; align-items: center; }
.data-table thead th:hover .th-col-icons { display: inline-flex; }
.th-col-icon { font-size: 16px; color: #969dad; cursor: pointer; padding: 1px; border-radius: 3px; }
.th-col-icon:hover { color: #3a5ba2; background: rgba(58,91,162,0.1); }
.th-col-icon.has-filter { color: #3a7cee; }
.th-col-icon.has-filter::after { content: ''; position: absolute; top: 0; right: 0; width: 6px; height: 6px; background: #3a7cee; border-radius: 50%; }

/* ─── Per-column filter dropdown ─── */
.col-filter-drop { position: absolute; top: 100%; left: 0; min-width: 220px; max-width: 300px; background: #fff; border: 1px solid #d9e3f0; border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,0.12); z-index: 70; padding: 8px 0; display: none; }
.col-filter-drop.open { display: block; }
.cfd-row { display: flex; align-items: center; gap: 6px; padding: 4px 12px; }
.cfd-row select, .cfd-row input { font-family: 'Open Sans', sans-serif; font-size: 12px; padding: 4px 6px; border: 1px solid #d9e3f0; border-radius: 4px; color: #394463; outline: none; background: #fff; flex: 1; }
.cfd-row select:focus, .cfd-row input:focus { border-color: #3a7cee; }
.cfd-list { max-height: 200px; overflow-y: auto; padding: 4px 0; }
.cfd-list label { display: flex; align-items: center; gap: 6px; padding: 3px 12px; font-size: 12px; cursor: pointer; color: #394463; }
.cfd-list label:hover { background: #f4f7fc; }
.cfd-list input[type="checkbox"] { accent-color: #3a7cee; }
.cfd-actions { display: flex; justify-content: flex-end; gap: 6px; padding: 6px 12px 4px; border-top: 1px solid #d9e3f0; margin-top: 4px; }
.cfd-btn { font-family: 'Open Sans', sans-serif; font-size: 12px; padding: 4px 10px; border-radius: 4px; cursor: pointer; border: none; }
.cfd-btn-clear { background: none; color: #969dad; }
.cfd-btn-clear:hover { color: #394463; }
.cfd-btn-apply { background: #3a7cee; color: #fff; }
.cfd-btn-apply:hover { background: #2d6ad8; }

/* ─── Row selection — checkbox replaces number on cell hover ─── */
.idx-sel { position: relative; }
.idx-sel .idx-label { transition: opacity 0.15s 0.15s; }
.idx-sel .idx-cb { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); accent-color: #3a7cee; width: 15px; height: 15px; cursor: pointer; opacity: 0; transition: opacity 0.15s 0.15s; margin: 0; }
/* Only on hovering the idx cell itself */
.idx-sel:hover .idx-label { opacity: 0; }
.idx-sel:hover .idx-cb { opacity: 1; }
/* Selected rows: always show checkbox */
.data-table tbody tr.row-selected .idx-sel .idx-label { opacity: 0; transition-delay: 0s; }
.data-table tbody tr.row-selected .idx-sel .idx-cb { opacity: 1; transition-delay: 0s; }

.data-table tbody tr.row-selected { background: #edf3ff !important; }
.data-table tbody tr.row-selected:hover { background: #e0ecff !important; }

/* ─── Bulk action bar ─── */
.bulk-bar { display: none; align-items: center; gap: 12px; background: #1e2640; color: #fff; padding: 8px 16px; border-radius: 6px; margin-bottom: 8px; font-size: 13px; }
.bulk-bar.visible { display: flex; }
.bulk-count { font-weight: 600; white-space: nowrap; }
.bulk-actions { display: flex; gap: 6px; flex: 1; }
.bulk-btn { display: inline-flex; align-items: center; gap: 4px; background: rgba(255,255,255,0.15); border: none; color: #fff; padding: 4px 10px; border-radius: 4px; font-family: 'Open Sans', sans-serif; font-size: 12px; cursor: pointer; }
.bulk-btn:hover { background: rgba(255,255,255,0.25); }
.bulk-btn .material-symbols-outlined { font-size: 14px; }
.bulk-btn-danger { color: #f87171; }
.bulk-deselect { background: none; border: none; color: rgba(255,255,255,0.6); cursor: pointer; margin-left: auto; padding: 2px; }
.bulk-deselect:hover { color: #fff; }
.bulk-deselect .material-symbols-outlined { font-size: 18px; }

/* ─── Row hover actions — Gmail-style floating toolbar ─── */
/* The actions cell + matching <th> stick to the right edge of the table's
   scroll ancestor (.content on desktop, .data-table-wrapper on mobile),
   so the toolbar stays at the visible right edge during horizontal scroll
   on small / wide tables. The cell itself stays transparent — the toolbar
   inside fades in on tr:hover (any column reachable, not just the last
   cell) and overlays the content behind via absolute positioning + box
   shadow so it reads as a floating bubble. */
.row-actions-th {
  position: sticky;
  right: 0;
  z-index: 3;
}
.row-actions-cell {
  position: sticky;
  right: 0;
  background: transparent !important;
  z-index: 2;
  /* Critical: every other tbody td gets overflow:hidden (companion to
     table-layout:fixed). The toolbar inside this cell intentionally
     extends LEFT of the 40px column to overlay the rightmost data cells
     on hover, so we have to opt-out of the clip here. */
  overflow: visible !important;
}
.row-hover-acts {
  display: none;
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--card-bg);
  padding: 3px 6px;
  border-radius: 6px;
  box-shadow: -3px 0 12px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.08);
  white-space: nowrap;
  gap: 2px;
  align-items: center;
  z-index: 3;
}
/* Reveal on any hover that's anywhere on the row — the row itself, the
   sticky actions cell, OR the toolbar so the buttons stay visible while
   the user moves the cursor onto them. The previous rule used
   `pointer-events: none` on the wrapper to keep it click-through, but
   that combined with the sticky/z-index stack made the row's :hover
   fire inconsistently — making the buttons feel like they only
   appeared on click. */
.data-table tbody tr:hover .row-hover-acts,
.data-table tbody tr .row-actions-cell:hover .row-hover-acts,
.data-table tbody tr .row-hover-acts:hover { display: inline-flex; }
.row-act-btn { font-size: 16px; color: #969dad; cursor: pointer; padding: 4px; border-radius: 4px; background: none; border: none; }
.row-act-btn:hover { color: #394463; background: rgba(0,0,0,0.06); }
.row-act-btn.danger:hover { color: #e74c3c; }

/* ─── Inline edit ─── */
td.cell-editing { padding: 2px 4px !important; }
td.cell-editing input, td.cell-editing select { width: 100%; font-family: 'Open Sans', sans-serif; font-size: 13px; padding: 4px 6px; border: 2px solid #3a7cee; border-radius: 4px; color: #394463; outline: none; background: #fff; box-shadow: 0 0 0 3px rgba(58,124,238,0.15); }

/* ─── Multi-sort hint snackbar ─── */
.sort-hint { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: #1e2640; color: #fff; padding: 10px 16px; border-radius: 6px; font-size: 13px; z-index: 100; display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.sort-hint .material-symbols-outlined { font-size: 18px; color: #fbbf24; }
.sort-hint-dismiss { background: none; border: none; color: rgba(255,255,255,0.5); cursor: pointer; font-size: 11px; text-decoration: underline; }
.sort-hint-close { background: none; border: none; color: rgba(255,255,255,0.6); cursor: pointer; margin-left: 4px; }

/* ─── Symbol modal chart ─── */
.sym-chart-wrap { padding: 0 24px; border-bottom: 1px solid #d9e3f0; }
.sym-chart-toolbar { display: flex; align-items: center; gap: 18px; padding: 6px 0 4px; flex-wrap: wrap; }
.sym-chart-sma-group { display: flex; align-items: center; gap: 6px; }
.sym-chart-grp-label { font-size: 11px; font-weight: 700; letter-spacing: 0.4px; color: #969dad; text-transform: uppercase; }
.sym-chart-int { background: none; border: 1px solid #d9e3f0; border-radius: 4px; padding: 2px 10px; font-size: 11px; font-weight: 600; color: #969dad; cursor: pointer; font-family: 'Open Sans', sans-serif; transition: all 0.15s; }
.sym-chart-int:hover { color: #394463; border-color: #394463; }
.sym-chart-int.active { background: #3a7cee; color: #fff; border-color: #3a7cee; }
.sym-chart-sma-label { font-size: 10px; color: #969dad; margin-left: auto; }
.sym-chart-wrap #symChartContainer { height: 200px; width: 100%; }
.sym-chart-wrap #symChartContainer a[href*="tradingview"] { display: none !important; }

/* ─── Symbol modal content ─── */
.sym-grid { display: flex; gap: 32px; margin-bottom: 8px; }
.sym-col { flex: 1; }
.sym-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid rgba(0,0,0,0.05); font-size: 13px; gap: 12px; }
.sym-label { color: #969dad; white-space: nowrap; }
.sym-val { font-weight: 600; color: #394463; text-align: right; }
.sym-section { margin-top: 20px; }
.sym-section:first-child { margin-top: 0; }
.sym-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: #3a5ba2; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 2px solid #e8eeff; }
.sym-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.sym-table th { background: #f6faff; padding: 8px 10px; text-align: left; font-weight: 600; color: #3a5ba2; border-bottom: 1px solid #d9e3f0; font-size: 12px; }
.sym-table td { padding: 7px 10px; border-bottom: 1px solid rgba(0,0,0,0.05); }
.sym-filing-detail-cell { padding: 12px 16px; background: var(--search-bg); white-space: normal; line-height: 1.5; color: var(--text-primary); }
.sym-desc { font-size: 13px; color: #6b7a90; line-height: 1.7; border-top: 1px solid #d9e3f0; padding: 12px 0; margin-bottom: 4px; }
.sym-loading { padding: 24px; color: #969dad; text-align: center; }
.sym-md { font-size: 13px; color: #394463; line-height: 1.7; }
.sym-md h3, .sym-md h4 { margin: 8px 0 4px; }
.sym-md ul { margin: 4px 0; padding-left: 18px; }
.sym-md li { margin-bottom: 2px; }
.sym-flags { display: flex; flex-direction: column; gap: 4px; }
.sym-flag { font-size: 13px; padding: 4px 0; border-bottom: 1px solid rgba(0,0,0,0.04); }
.sym-news-item { padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.sym-news-item:last-child { border-bottom: none; }
.sym-news-line { display: flex; align-items: baseline; gap: 10px; }
.sym-news-dt { font-size: 12px; color: #969dad; font-family: monospace; white-space: nowrap; flex-shrink: 0; min-width: 42px; }
.sym-news-title { font-size: 13px; font-weight: 600; color: #394463; text-decoration: none; flex: 1; line-height: 1.4; }
.sym-news-title:hover { color: #3a7cee; }
.sym-news-summary { font-size: 12px; color: #6b7a90; margin-top: 3px; padding-left: 104px; line-height: 1.5; min-height: 0; }
.sym-news-summary:empty { display: none; }
.sym-news-sum-btn { background: none; border: none; color: #3a7cee; font-size: 11px; cursor: pointer; padding: 2px 0; margin-left: 104px; font-family: 'Open Sans', sans-serif; }
.sym-news-sum-btn:hover { text-decoration: underline; }
.sym-note { font-size: 13px; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.05); line-height: 1.5; }

/* ─── Kanban board ─── */
.kanban { display: flex; gap: 16px; height: calc(100vh - 260px); }
.kanban-col { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #f4f7fc; border-radius: 8px; overflow: hidden; }
.kanban-col-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; font-size: 14px; font-weight: 700; color: #394463; border-bottom: 1px solid #d9e3f0; background: #fff; }
.kanban-count { background: #e8eeff; color: #3a5ba2; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.kanban-cards { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 40px; transition: background 0.15s; }
.kanban-cards.drag-over { background: #e8eeff; }
.kanban-card { background: #fff; border: 1px solid #d9e3f0; border-radius: 6px; padding: 10px 12px; cursor: grab; transition: box-shadow 0.15s, opacity 0.15s; position: relative; }
.kanban-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.kanban-card.dragging { opacity: 0.4; }
.kanban-card-title { font-size: 13px; font-weight: 600; color: #394463; margin-bottom: 4px; }
.kanban-card-due { font-size: 11px; color: #f5a623; margin-bottom: 2px; }
.kanban-card-body { font-size: 11px; color: #969dad; line-height: 1.4; }
.kanban-card-actions { position: absolute; top: 8px; right: 8px; display: none; }
.kanban-card:hover .kanban-card-actions { display: flex; }
.kanban-col[data-status="bugs"] .kanban-col-header { color: #e74c3c; }
.kanban-col[data-status="bugs"] .kanban-count { background: #fff0f0; color: #e74c3c; }
.kanban-add-btn { display: none; align-items: center; justify-content: center; gap: 4px; margin: 4px 8px 8px; padding: 8px 0; background: none; border: 1px dashed #c5d0e0; border-radius: 6px; color: #8a94a6; font-size: 12px; font-family: 'Open Sans', sans-serif; cursor: pointer; transition: all 0.15s; flex-shrink: 0; }
.kanban-add-btn:hover { background: #e8eeff; color: #3a5ba2; border-color: #3a5ba2; }
.kanban-col:hover .kanban-add-btn { display: flex; }

/* ─── Ranking page ─── */
.ranking-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; padding: 4px; }
.ranking-card { background: #fff; border: 1px solid #d9e3f0; border-radius: 10px; padding: 16px; transition: box-shadow 0.15s; }
.ranking-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.ranking-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ranking-medal { font-size: 28px; line-height: 1; width: 36px; text-align: center; flex-shrink: 0; }
.ranking-user { flex: 1; min-width: 0; }
.ranking-name { font-size: 15px; font-weight: 700; color: #394463; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranking-meta { font-size: 11px; color: #969dad; margin-top: 2px; }
.ranking-pl { text-align: right; flex-shrink: 0; }
.ranking-pl-pct { font-size: 18px; font-weight: 700; }
.ranking-pl-val { font-size: 11px; opacity: 0.7; }
.ranking-stats { display: flex; gap: 8px; margin-bottom: 12px; }
.ranking-stat { flex: 1; background: #f4f7fc; border-radius: 6px; padding: 8px 10px; text-align: center; }
.ranking-stat-label { display: block; font-size: 10px; color: #969dad; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.ranking-stat-value { font-size: 13px; font-weight: 600; color: #394463; }
.ranking-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #f0f0f0; margin-bottom: 6px; }
.ranking-bar-seg { height: 100%; min-width: 2px; transition: width 0.3s; }
.ranking-bar-stock { background: #3a7cee; }
.ranking-bar-cash { background: #1ecb85; }
.ranking-bar-margin { background: #f5a623; }
.ranking-legend { display: flex; gap: 12px; font-size: 11px; color: #969dad; }
.ranking-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }

/* Owner avatar in the ranking card. Clickable — the user-profile.js
   document-level handler opens the profile modal (which has a Send
   Message button). */
.ranking-avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  border: 1px solid #d9e3f0; flex-shrink: 0; cursor: pointer;
  transition: border-color 0.12s, transform 0.12s;
}
.ranking-avatar:hover { border-color: #3a7cee; transform: scale(1.05); }
.ranking-avatar-empty {
  display: flex; align-items: center; justify-content: center;
  background: #3a7cee; color: #fff; font-weight: 600; font-size: 14px;
}

/* AI persona ranking card — left-edge accent so the row stands out
   amongst regular user portfolios without a separate section header. */
.ranking-card-ai { border-left: 3px solid #8c5ac8; }
.ranking-ai-badge {
  display: inline-block; vertical-align: middle; margin-left: 6px;
  padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 700;
  background: rgba(140, 90, 200, 0.18); color: #8c5ac8; letter-spacing: 0.4px;
}
/* Aggregate signals row — tucks under the stats grid before the bar viz. */
.ranking-signals { display: flex; flex-wrap: wrap; gap: 10px; padding: 6px 0 10px; font-size: 11px; color: #6b7280; }
.ranking-signals strong { color: #394463; font-weight: 600; margin-right: 2px; }
.ranking-sig-warn { color: #c75a30; font-weight: 600; }
.ranking-basis-tag {
  display: inline-block; margin-top: 2px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.4px;
  text-transform: uppercase; color: #969dad;
  padding: 1px 6px; border-radius: 999px;
  background: rgba(150, 157, 173, 0.12);
}
.ranking-basis-cost { color: #b48c1e; background: rgba(180, 140, 30, 0.12); }

/* ─── Local sidebar ─── */
.sidebar-mode-btn {
  margin-left: auto; background: rgba(255,255,255,0.1); border: none; color: rgba(255,255,255,0.6);
  cursor: pointer; border-radius: 4px; padding: 3px 5px; display: flex; align-items: center; transition: all 0.15s;
}
.sidebar-mode-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }
.sidebar.collapsed .sidebar-mode-btn { display: none !important; }
.sidebar.collapsed .local-sidebar { display: none !important; }
.sidebar.collapsed #sidebarPanelMain { display: flex !important; }

.sidebar-panel { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.local-sidebar { padding: 0; color: rgba(255,255,255,0.75); font-size: 13px; }

.local-sidebar-search {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1); flex-shrink: 0;
}
.local-sidebar-search input {
  flex: 1; background: transparent; border: none; color: rgba(255,255,255,0.8);
  font-family: 'Open Sans', sans-serif; font-size: 12px; outline: none;
}
.local-sidebar-search input::placeholder { color: rgba(255,255,255,0.3); }

.local-sidebar-content { flex: 1; overflow-y: auto; padding: 4px 0; }

.ls-section-title {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
  color: rgba(255,255,255,0.35); padding: 10px 14px 4px; font-weight: 700;
}
.ls-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 14px;
  cursor: pointer; transition: background 0.15s; color: rgba(255,255,255,0.65); font-size: 13px;
}
.ls-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.ls-item.active { background: rgba(255,255,255,0.12); color: #fff; }
.ls-item .material-symbols-outlined { font-size: 16px; flex-shrink: 0; }
.ls-item-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-item-meta { font-size: 11px; color: rgba(255,255,255,0.35); flex-shrink: 0; }
.ls-item-badge {
  font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: 600;
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.5);
}

.ls-filter-row {
  display: flex; gap: 4px; padding: 6px 12px; flex-wrap: wrap; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ls-chip {
  font-size: 11px; padding: 3px 8px; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.15s; white-space: nowrap;
}
.ls-chip:hover { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.8); }
.ls-chip.active { background: rgba(58,124,238,0.3); color: #fff; border-color: rgba(58,124,238,0.5); }

.ls-empty { padding: 16px 14px; color: rgba(255,255,255,0.3); font-size: 12px; text-align: center; }
.ls-actions { display: flex; gap: 6px; padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.ls-action-btn { display: flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.1); transition: all 0.15s; }
.ls-action-btn:hover { background: rgba(58,124,238,0.25); color: #fff; border-color: rgba(58,124,238,0.4); }

.sidebar.local-active .sidebar-logo .logo-text { font-size: 14px; }

/* ─── Dashboard ─── */
.dash-section { margin-bottom: 16px; background: #fff; border-radius: 8px; border: 1px solid #d9e3f0; overflow: hidden; }
.dash-section-hdr { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; user-select: none; }
.dash-section-hdr:hover { background: #f6faff; }
.dash-section-body { padding: 12px 14px; }
.dash-section-body.collapsed { display: none; }
.dash-info-btn { background: none; border: none; color: #c5d0e0; cursor: pointer; padding: 0 2px; margin-left: 4px; transition: color 0.15s; display: inline-flex; align-items: center; }
.dash-info-btn:hover { color: #3a7cee; }
.dash-info-pop { position: absolute; top: 100%; left: 0; z-index: 20; margin-top: 4px; width: 280px; }
.dash-info-pop-body { background: #394463; color: #e8eeff; font-size: 12px; line-height: 1.7; padding: 14px 16px; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
.dash-section-hdr { position: relative; }

.dash-mp-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-mp-card { background: #f6faff; border: 1px solid #e8eeff; border-radius: 6px; padding: 10px 14px; min-width: 110px; flex: 1; }
.dash-mp-sym { font-size: 11px; color: #969dad; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.dash-mp-price { font-size: 16px; font-weight: 700; color: #394463; margin: 2px 0; }
.dash-mp-chg { font-size: 12px; font-weight: 600; }
.dash-mp-ext { font-size: 11px; color: #969dad; margin-top: 2px; display: flex; align-items: center; gap: 3px; }

.dash-cal { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.dash-cal-day { min-width: 160px; flex: 1; background: #f6faff; border: 1px solid #e8eeff; border-radius: 8px; padding: 10px 12px; }
.dash-cal-today { border-color: #3a7cee; background: #f0f5ff; }
.dash-cal-day-hdr { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #e8eeff; }
.dash-cal-day-name { font-size: 13px; font-weight: 700; color: #394463; }
.dash-cal-day-date { font-size: 11px; color: #969dad; }
.dash-cal-today .dash-cal-day-name { color: #3a7cee; }
.dash-cal-item { display: flex; align-items: center; gap: 8px; padding: 3px 4px; font-size: 12px; color: #394463; border-radius: 4px; transition: background 0.12s; }
.dash-cal-item[onclick] { cursor: pointer; }
.dash-cal-item[onclick]:hover { background: #e8eeff; }
.dash-cal-time { font-size: 11px; color: #969dad; min-width: 36px; }
.dash-cal-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-cal-sym { font-size: 10px; font-weight: 700; color: #3a5ba2; background: #e8eeff; padding: 1px 5px; border-radius: 3px; }
.dash-cal-timing { font-size: 14px; flex-shrink: 0; }

/* Upcoming-Events click-to-details modal — read-only, focused. Reuses
   the .modal-overlay / .modal-content shell so dark/light theming and
   the focus/Esc/backdrop behavior come for free. */
.dash-ev-modal { max-width: 520px; width: 92vw; padding: 0; overflow: hidden; background: #fff; border: 1px solid #e8eeff; border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,.18); }
html.theme-dark .dash-ev-modal { background: #141412; border-color: #1f1d19; box-shadow: 0 8px 32px rgba(0,0,0,.55); }
.dash-ev-hdr { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid #e8eeff; }
.dash-ev-hdr-l { flex: 1; min-width: 0; }
.dash-ev-title { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: #394463; line-height: 1.3; }
.dash-ev-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.dash-ev-type { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; padding: 2px 8px; border-radius: 999px; background: #e8eeff; color: #3a5ba2; }
.dash-ev-src { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #f0f0eb; color: #6e6b63; }
.dash-ev-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.dash-ev-when { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #394463; }
.dash-ev-time { color: #969dad; }
.dash-ev-values { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.dash-ev-cell { background: #f6faff; border: 1px solid #e8eeff; border-radius: 6px; padding: 8px 10px; }
.dash-ev-cell-lbl { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; color: #969dad; margin-bottom: 2px; }
.dash-ev-cell-val { font-size: 14px; font-weight: 600; color: #394463; }
.dash-ev-desc { font-size: 13px; line-height: 1.45; color: #4a5468; max-height: 200px; overflow-y: auto; padding: 10px 12px; background: #fafbfd; border-left: 3px solid #d9e3f0; border-radius: 4px; white-space: pre-wrap; }
.dash-ev-actions { display: flex; justify-content: flex-end; }
.dash-ev-sym-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 6px; border: 1px solid #3a7cee; background: #3a7cee; color: #fff; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.dash-ev-sym-btn:hover { background: #2864d8; border-color: #2864d8; }

/* Dark-theme overrides. The .modal-content base is already dark-themed
   in styles.css; just retune the inner cells/badges/borders. */
html.theme-dark .dash-cal-item[onclick]:hover { background: #2a2520; }
html.theme-dark .dash-ev-hdr { border-bottom-color: #1f1d19; }
html.theme-dark .dash-ev-title { color: #e8e4d8; }
html.theme-dark .dash-ev-type { background: #2a2520; color: #d4c896; }
html.theme-dark .dash-ev-src { background: #2a2520; color: #969089; }
html.theme-dark .dash-ev-when { color: #d4cfc3; }
html.theme-dark .dash-ev-time { color: #969089; }
html.theme-dark .dash-ev-cell { background: #1c1a16; border-color: #2a2520; }
html.theme-dark .dash-ev-cell-lbl { color: #969089; }
html.theme-dark .dash-ev-cell-val { color: #e8e4d8; }
html.theme-dark .dash-ev-desc { color: #c8c3b6; background: #1c1a16; border-left-color: #3a342a; }
html.theme-dark .dash-ev-sym-btn { background: #d4af37; border-color: #d4af37; color: #141412; }
html.theme-dark .dash-ev-sym-btn:hover { background: #b8961d; border-color: #b8961d; }

.dash-status-row { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-stat-card { flex: 1; min-width: 130px; background: #f6faff; border: 1px solid #e8eeff; border-radius: 6px; padding: 10px 14px; position: relative; }
.dash-stat-dot { width: 8px; height: 8px; border-radius: 50%; position: absolute; top: 10px; right: 10px; }
.dash-stat-dot.online { background: #1ecb85; }
.dash-stat-dot.offline { background: #e74c3c; }
.dash-stat-label { font-size: 11px; color: #969dad; font-weight: 600; text-transform: uppercase; }
.dash-stat-val { font-size: 15px; font-weight: 700; color: #394463; margin: 2px 0; }
.dash-stat-detail { font-size: 11px; color: #969dad; }

.dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-action-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 6px; border: 1px solid #d9e3f0; background: #fff; color: #394463; font-family: 'Open Sans',sans-serif; font-size: 13px; cursor: pointer; transition: all 0.15s; }
.dash-action-btn:hover { background: #3a7cee; color: #fff; border-color: #3a7cee; }
.dash-action-btn .material-symbols-outlined { font-size: 16px; }
.dash-action-result { margin-top: 8px; background: #1e2640; color: #a4e8b0; padding: 10px 12px; border-radius: 6px; font-size: 12px; max-height: 200px; overflow: auto; white-space: pre-wrap; word-break: break-word; }

.dash-model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.dash-model-item { background: #f6faff; border-radius: 6px; padding: 8px 12px; }
.dash-model-label { font-size: 10px; color: #969dad; text-transform: uppercase; font-weight: 600; }
.dash-model-val { font-size: 14px; font-weight: 600; color: #394463; margin-top: 2px; }

.dash-tasks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; }
.dash-task-item { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 12px; }
.dash-task-dt { color: #969dad; font-size: 11px; min-width: 90px; }
.dash-task-link { cursor: pointer; color: inherit; text-decoration: none; }
.dash-task-link:hover { text-decoration: underline; }
.dash-stat-clickable { cursor: pointer; transition: box-shadow 0.15s; }
.dash-stat-clickable:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.dash-section-refresh { margin-left: 8px; }
.dash-more-wrap { position: relative; display: inline-flex; }
.dash-more-menu { display: none; position: absolute; top: 100%; right: 0; background: #fff; border: 1px solid #d9e3f0; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); min-width: 220px; padding: 6px 0; z-index: 20; }
.dash-more-menu.open { display: block; }
.dash-more-menu .menu-item { display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 13px; color: #394463; cursor: pointer; text-decoration: none; transition: background 0.1s; }
.dash-more-menu .menu-item:hover { background: #f4f7fc; }
.dash-more-menu .menu-item .material-symbols-outlined { font-size: 16px; color: #969dad; }
.dash-cron-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.dash-cron-item { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; font-size: 12px; }
.dash-cron-name { color: #394463; }

/* ─── Market Churning Detector ─── */
.churn-wrap { display: flex; flex-direction: column; gap: 14px; }
.churn-health { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 2px solid; border-radius: 10px; background: #fff; }
.churn-health-label { font-size: 16px; font-weight: 700; }
.churn-health-score { font-size: 11px; color: #969dad; margin-top: 1px; }
.churn-gauges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.churn-gauge { display: flex; align-items: flex-start; gap: 8px; background: #f6faff; border: 1px solid #e8eeff; border-radius: 8px; padding: 10px 12px; }
.churn-gauge-icon { flex-shrink: 0; padding-top: 1px; }
.churn-gauge-body { min-width: 0; }
.churn-gauge-val { font-size: 18px; font-weight: 700; color: #394463; }
.churn-gauge-label { font-size: 11px; font-weight: 600; color: #969dad; text-transform: uppercase; letter-spacing: 0.3px; }
.churn-gauge-sub { font-size: 11px; color: #969dad; margin-top: 2px; }
.churn-gauge-pending { opacity: 0.5; }
.churn-ts { display: block; font-size: 9px; color: #b8c0cc; margin-top: 3px; }
.churn-signals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.churn-signal { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 2px solid; border-radius: 10px; background: #fff; }
.churn-signal-icon { font-size: 32px; flex-shrink: 0; }
.churn-signal-body { min-width: 0; }
.churn-signal-val { font-size: 18px; font-weight: 700; line-height: 1.1; }
.churn-signal-label { font-size: 11px; color: #969dad; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.3px; }
.churn-signal-score { font-size: 30px; font-weight: 800; line-height: 1; flex-shrink: 0; }
.churn-signal-score-max { font-size: 13px; color: #969dad; margin-left: 2px; font-weight: 500; }

/* ─── Market Health (redesigned: Bear↔Bull gauge + feed metrics) ─── */
.mh-wrap { display: flex; flex-direction: column; gap: 16px; }
.mh-top { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.mh-gauge { width: 200px; flex-shrink: 0; }
.mh-gauge-svg { width: 200px; height: 122px; display: block; }
.mh-track { stroke: #e8eeff; }
.mh-gscore { font-size: 38px; font-weight: 800; fill: #394463; }
.mh-marker { fill: #fff; stroke-width: 3.5; }
.mh-gauge-ends { display: flex; justify-content: space-between; margin-top: -8px; padding: 0 6px; font-size: 11px; color: #969dad; font-weight: 600; }
.mh-read { flex: 1; min-width: 180px; }
.mh-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; border: 1px solid; border-radius: 999px; padding: 3px 10px; }
.mh-status .material-symbols-outlined { font-size: 14px; }
.mh-sentiment { display: flex; align-items: center; gap: 8px; font-size: 28px; font-weight: 800; margin: 10px 0 4px; }
.mh-sentiment .material-symbols-outlined { font-size: 30px; }
.mh-score-line { font-size: 12px; color: #969dad; }
.mh-score-line b { color: #394463; }
.mh-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.mh-metric { background: #f6faff; border: 1px solid #e8eeff; border-radius: 10px; padding: 11px 13px; }
.mh-metric-hdr { display: flex; align-items: center; justify-content: space-between; }
.mh-metric-label { font-size: 10.5px; font-weight: 700; color: #969dad; text-transform: uppercase; letter-spacing: 0.4px; }
.mh-metric-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.mh-metric-val { font-size: 22px; font-weight: 800; color: #394463; margin: 5px 0 1px; }
.mh-metric-sub { font-size: 11px; color: #969dad; min-height: 14px; }
.mh-metric-bar { height: 5px; border-radius: 3px; background: #e8eeff; overflow: hidden; margin-top: 8px; }
.mh-metric-fill { height: 100%; border-radius: 3px; transition: width 0.25s; }
.mh-pending { font-size: 13px; color: #969dad; font-weight: 500; }
.mh-feeds { font-size: 10px; color: #969dad; margin-left: 8px; font-family: monospace; }

/* ─── StopLoss Execute Confirm Modal ─── */
.slx-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.slx-modal { background: #fff; border-radius: 10px; max-width: 640px; width: 95vw; max-height: 85vh; overflow: auto; box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
.slx-help { margin: 0 0 12px; color: #6b7280; font-size: 13px; }
.slx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.slx-table th, .slx-table td { padding: 8px 6px; border-bottom: 1px solid #eef0f3; text-align: left; }
.slx-table th { color: #969dad; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; }
.slx-table .slx-num { text-align: right; font-variant-numeric: tabular-nums; }
.slx-table .slx-sym { font-weight: 700; }
.slx-price { width: 80px; padding: 4px 6px; border: 1px solid #d8dee9; border-radius: 4px; font-variant-numeric: tabular-nums; text-align: right; }
.slx-cb { width: 16px; height: 16px; cursor: pointer; }
.slx-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid #eef0f3; }
.slx-confirm-btn { background: #e74c3c; color: #fff; border-color: #e74c3c; }
.slx-confirm-btn:hover { background: #d04132; }
.slx-confirm-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.slx-test-toggle {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 20px; border-top: 1px solid #eef0f3;
  font-size: 12px; color: #586574; cursor: pointer; line-height: 1.4;
}
.slx-test-toggle input[type="checkbox"] { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; cursor: pointer; }
.slx-test-toggle b { color: var(--text-primary, #1f2733); font-weight: 700; }
html.theme-dark .slx-test-toggle { color: #b3b0a8; border-color: #2a2620; }
html.theme-dark .slx-test-toggle b { color: #e8e4d8; }

/* ─── No-Protection badge (Portfolio Δ Stop) ─── */
.np-badge { display: inline-block; padding: 1px 6px; border-radius: 4px; background: rgba(231,76,60,0.15); color: #e74c3c; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; }

/* ─── Volume Confidence widget ─── */
.vol-conf-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.vol-conf-legend { display: flex; align-items: center; gap: 16px; font-size: 11px; color: #969dad; }
.vol-conf-conviction { font-weight: 600; }
.vol-conf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.vol-conf-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px solid rgba(0,0,0,0.04); font-size: 12px; }
.vol-conf-sym { font-weight: 700; color: #394463; min-width: 44px; flex-shrink: 0; }
.vol-conf-pinned { color: #3a5ba2; }
.vol-conf-dir { display: flex; align-items: center; gap: 2px; min-width: 56px; flex-shrink: 0; }
.vol-conf-ratio { font-weight: 700; min-width: 34px; text-align: right; flex-shrink: 0; }
.vol-spark { display: flex; align-items: flex-end; gap: 2px; height: 20px; flex-shrink: 0; }
.vol-spark-bar { width: 5px; border-radius: 2px 2px 0 0; flex-shrink: 0; }
.vol-warn { font-size: 14px; color: #f5a623; flex-shrink: 0; }

/* ─── Volume Confidence (redesigned: RVOL meters + conviction summary) ─── */
.vc-summary { margin-bottom: 12px; }
.vc-summary-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.vc-signal { font-size: 16px; font-weight: 800; }
.vc-summary-detail { font-size: 12px; color: #969dad; }
.vc-segbar { display: flex; height: 8px; border-radius: 5px; overflow: hidden; background: #eef2f8; }
.vc-seg { display: block; }
.vc-legend { display: flex; align-items: center; gap: 14px; margin-top: 7px; font-size: 11px; color: #969dad; }
.vc-leg { display: inline-flex; align-items: center; gap: 5px; }
.vc-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.vc-leg-note { margin-left: auto; }
.vc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 28px; }
.vc-row { display: grid; grid-template-columns: 52px 64px 1fr 46px; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(0,0,0,0.04); font-size: 12px; }
.vc-sym { font-weight: 700; color: #394463; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-pinned { color: #3a5ba2; }
.vc-dir { display: inline-flex; align-items: center; gap: 1px; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vc-dir .material-symbols-outlined { font-size: 13px; }
.vc-meter { position: relative; height: 8px; border-radius: 5px; background: #eef2f8; overflow: hidden; }
.vc-meter-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; transition: width 0.25s; }
.vc-meter-base { position: absolute; left: 50%; top: -1px; bottom: -1px; width: 1px; background: rgba(0,0,0,0.22); }
.vc-rvol { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.vc-row-new { grid-template-columns: 52px 1fr; opacity: 0.85; }
.vc-new { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #969dad; font-style: italic; }
.vc-new .material-symbols-outlined { font-size: 13px; }

/* ─── Upcoming Events (redesigned: 7-day impact-coded grid) ─── */
.due-grid { display: grid; grid-template-columns: repeat(7, minmax(152px, 1fr)); gap: 1px; background: #e8eeff; border-radius: 8px; overflow: hidden; overflow-x: auto; }
.due-day { background: #fff; display: flex; flex-direction: column; min-width: 0; }
.due-day-quiet { background: #fbfcfe; }
.due-dh { padding: 9px 11px 8px; border-bottom: 1px solid #eef2f8; background: #f6faff; }
.due-dh-row { display: flex; align-items: baseline; gap: 6px; }
.due-wd { font-size: 13px; font-weight: 700; color: #394463; }
.due-rel { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 1px 6px; border-radius: 5px; }
.due-today { color: #3a7cee; background: rgba(58,124,238,0.12); }
.due-tom { color: #969dad; background: rgba(150,157,173,0.14); }
.due-count { margin-left: auto; font-size: 10px; color: #b8c0cc; font-family: monospace; }
.due-date { font-size: 10px; color: #969dad; margin-top: 2px; font-family: monospace; }
.due-eq { display: flex; flex-wrap: wrap; gap: 4px; padding: 7px 9px; border-bottom: 1px solid #eef2f8; }
.due-eqchip { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; padding: 2px 6px 2px 4px; border-radius: 6px; cursor: pointer; border: 1px solid transparent; }
.due-eqchip .material-symbols-outlined { font-size: 11px; }
.due-eqchip.earn { color: #6f63bf; background: rgba(124,111,212,0.1); border-color: rgba(124,111,212,0.25); }
.due-eqchip.div { color: #17a673; background: rgba(23,166,115,0.09); border-color: rgba(23,166,115,0.24); }
.due-eqchip.split { color: #5d6877; background: rgba(107,116,132,0.1); border-color: rgba(107,116,132,0.28); }
.due-eqchip.ipo { color: #7c6fd4; background: rgba(124,111,212,0.1); border-color: rgba(124,111,212,0.25); }
.due-eqtag { font-size: 8px; opacity: 0.7; font-weight: 600; }
.due-events { flex: 1; overflow-y: auto; padding: 4px 0 8px; max-height: 540px; }
.due-tgrp { padding: 5px 0 1px; }
.due-tlabel { font-size: 9.5px; font-weight: 600; color: #b8c0cc; padding: 0 11px 3px; font-family: monospace; }
.due-ev { display: flex; align-items: center; gap: 7px; padding: 4px 10px 4px 0; cursor: pointer; }
.due-ev:hover { background: #f4f7fc; }
.due-rail { width: 3px; align-self: stretch; min-height: 16px; border-radius: 0 3px 3px 0; background: #b8c0cc; flex-shrink: 0; }
.due-ev.hi .due-rail { background: #e74c3c; }
.due-ev.med .due-rail { background: #f5a623; }
.due-name { flex: 1; font-size: 12.5px; line-height: 1.3; color: #5d6877; padding-left: 4px; word-break: break-word; }
.due-ev.hi .due-name { color: #394463; font-weight: 600; }
.due-ev.med .due-name { color: #4a5568; }
.due-cnt { font-size: 9px; font-weight: 700; color: #394463; background: #e8eeff; border-radius: 5px; padding: 1px 5px; flex-shrink: 0; }
.due-empty { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 22px 10px; color: #b8c0cc; text-align: center; margin: auto; }
.due-empty .material-symbols-outlined { font-size: 20px; opacity: 0.6; }
.due-empty-h { font-size: 11px; font-weight: 600; }
.due-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: #969dad; padding: 5px 10px; border-radius: 8px; border: 1px solid #d9e3f0; background: #fff; cursor: pointer; margin-left: 8px; }
.due-toggle .material-symbols-outlined { font-size: 14px; }
.due-toggle:hover { border-color: #b8c5d8; color: #394463; }
.due-toggle.on { color: #e74c3c; border-color: rgba(231,76,60,0.4); background: rgba(231,76,60,0.07); }

/* ─── Risk Regions (regime contradictions) ─── */
.rr-list { display: flex; flex-direction: column; gap: 8px; }
.rr-row { background: #f6faff; border: 1px solid #e8eeff; border-left: 3px solid #f5a623; border-radius: 8px; padding: 9px 12px; }
.rr-head { display: flex; align-items: center; gap: 8px; }
.rr-kind { font-size: 11px; font-weight: 700; color: #b06f00; background: rgba(245,166,35,0.14); padding: 2px 7px; border-radius: 5px; font-family: monospace; }
.rr-scope { font-size: 11px; color: #969dad; }
.rr-conf { margin-left: auto; font-size: 11px; font-weight: 700; color: #394463; font-variant-numeric: tabular-nums; }
.rr-bar { height: 4px; border-radius: 2px; background: #e8eeff; overflow: hidden; margin: 6px 0; }
.rr-fill { display: block; height: 100%; background: #f5a623; border-radius: 2px; }
.rr-desc { font-size: 12.5px; line-height: 1.4; color: #5d6877; }

/* ─── Geopolitics (drivers + tag filter) ─── */
.geo-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #eef2f8; }
.geo-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: #4a5568; background: #f2f7ff; border: 1px solid #e8eeff; border-radius: 999px; padding: 3px 9px; cursor: pointer; transition: 0.12s; }
.geo-chip:hover { border-color: #3a7cee; color: #3a7cee; }
.geo-chip.active { background: #3a7cee; color: #fff; border-color: #3a7cee; }
.geo-chip-n { font-size: 10px; opacity: 0.7; font-variant-numeric: tabular-nums; }
.geo-list { display: flex; flex-direction: column; }
.geo-item { padding: 8px 0; border-bottom: 1px solid #f4f7fc; }
.geo-item:last-child { border-bottom: none; }
.geo-hl { font-size: 13px; line-height: 1.4; color: #394463; }
.geo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.geo-itag { font-size: 10px; color: #969dad; background: #f4f7fc; padding: 1px 6px; border-radius: 4px; }
.geo-src { font-size: 10px; color: #b8c0cc; font-style: italic; margin-left: auto; }
.geo-empty { font-size: 12px; color: #969dad; padding: 14px 0; text-align: center; }

/* ─── Stock News (hourly brief + enriched feed) ─── */
.sn-brief { background: #f6faff; border: 1px solid #e8eeff; border-radius: 8px; padding: 11px 13px; margin-bottom: 14px; }
.sn-tldr { font-size: 12.5px; line-height: 1.45; color: #394463; margin-bottom: 10px; }
.sn-tldr-k { font-size: 10px; font-weight: 700; color: #3a7cee; background: rgba(58,124,238,0.1); padding: 1px 6px; border-radius: 4px; letter-spacing: 0.4px; }
.sn-bsec { margin-top: 8px; }
.sn-bsec-h { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #969dad; margin-bottom: 5px; }
.sn-bline { font-size: 12.5px; line-height: 1.45; color: #5d6877; padding: 2px 0; }
.sn-raw { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 24px; }
.sn-grp-h { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #969dad; padding: 4px 0 6px; border-bottom: 1px solid #eef2f8; margin-bottom: 4px; }
.sn-grp-n { color: #b8c0cc; }
.sn-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; border-bottom: 1px solid #f4f7fc; }
.sn-sig { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.sn-body { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.4; color: #5d6877; }
.sn-tick { font-size: 11px; font-weight: 700; color: #3a5ba2; background: #e8eeff; padding: 1px 5px; border-radius: 4px; margin-right: 5px; }
.sn-src { font-size: 10px; color: #b8c0cc; margin-left: 5px; text-decoration: none; }
.sn-src:hover { color: #3a7cee; }
.sn-score { font-size: 11px; font-weight: 700; color: #b06f00; background: rgba(245,166,35,0.14); border-radius: 5px; padding: 1px 6px; flex-shrink: 0; font-variant-numeric: tabular-nums; }

.dash-cron-expr { font-size: 11px; color: #969dad; background: #f4f7fc; padding: 2px 6px; border-radius: 3px; }

.dash-logs { max-height: 250px; overflow-y: auto; font-family: monospace; font-size: 11px; background: #1e2640; color: #c8d6e5; padding: 8px 10px; border-radius: 6px; }
.dash-log-line { display: flex; gap: 8px; padding: 1px 0; }
.dash-log-time { color: #5a6e8a; min-width: 110px; flex-shrink: 0; }
.dash-log-src { color: #3a7cee; min-width: 70px; flex-shrink: 0; font-weight: 600; }

/* ─── Weekly Stock Cards ─── */
.wk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.wk-card { background: #fff; border: 1px solid #d9e3f0; border-radius: 8px; padding: 14px; cursor: pointer; transition: box-shadow 0.15s; }
.wk-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.wk-card-hdr { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.wk-rank { font-size: 18px; font-weight: 700; min-width: 32px; }
.wk-sym { font-size: 15px; font-weight: 700; color: #394463; flex: 1; }
.wk-score { font-size: 20px; font-weight: 700; color: #394463; }
.wk-bar { height: 6px; background: #e8eeff; border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.wk-bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.wk-pillars { display: flex; gap: 10px; justify-content: center; margin-bottom: 8px; }
.wk-pillar { text-align: center; flex: 1; }
.wk-pillar-bar { height: 40px; width: 24px; background: #f0f3f8; border-radius: 3px; margin: 0 auto 4px; display: flex; align-items: flex-end; overflow: hidden; }
.wk-pillar-bar > div { width: 100%; border-radius: 3px 3px 0 0; transition: height 0.3s; }
.wk-pillar-label { font-size: 10px; color: #969dad; text-transform: uppercase; }
.wk-pillar-val { font-size: 12px; font-weight: 700; color: #394463; }
.wk-metrics { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11px; color: #969dad; margin-bottom: 6px; }
.wk-metrics span { background: #f6faff; padding: 2px 6px; border-radius: 4px; }
.wk-reasons { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.wk-footer { text-align: right; }
.wk-swot-link { font-size: 12px; color: #3a7cee; cursor: pointer; font-weight: 600; }
.wk-swot-link:hover { text-decoration: underline; }

/* SWOT side panel */
.wk-swot-panel { position: fixed; top: 0; right: -420px; width: 400px; height: 100vh; background: #fff; box-shadow: -4px 0 20px rgba(0,0,0,0.12); z-index: 90; display: flex; flex-direction: column; transition: right 0.25s ease; }
.wk-swot-panel.open { right: 0; }
.wk-swot-hdr { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #d9e3f0; font-size: 15px; font-weight: 700; color: #394463; }
.wk-swot-close { background: none; border: none; cursor: pointer; color: #969dad; padding: 2px; }
.wk-swot-close:hover { color: #394463; }
.wk-swot-body { flex: 1; overflow-y: auto; padding: 16px; }

/* ─── Journal ─── */
.jrnl-form { max-width: 700px; }
.jrnl-field { margin-bottom: 12px; }
.jrnl-textarea { font-family: 'Open Sans', sans-serif; font-size: 13px; resize: vertical; }
.jrnl-week-sel { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.jrnl-week-sel select { max-width: 280px; }
.jrnl-autosave { font-size: 12px; color: #1ecb85; min-height: 16px; margin-bottom: 8px; }
.jrnl-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #3a5ba2; margin: 16px 0 8px; padding-bottom: 4px; border-bottom: 1px solid #d9e3f0; }
.jrnl-accuracy { display: flex; gap: 6px; margin-bottom: 12px; }
.jrnl-acc-btn { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #d9e3f0; background: #fff; font-weight: 700; font-size: 14px; cursor: pointer; color: #394463; transition: all 0.15s; }
.jrnl-acc-btn:hover { border-color: #3a7cee; }
.jrnl-acc-btn.active { background: #3a7cee; color: #fff; border-color: #3a7cee; }

/* ─── Settings ─── */
.set-search-wrap { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: #f4f7fc; border: 1px solid #d9e3f0; border-radius: 8px; margin-bottom: 16px; }
.set-search { flex: 1; background: transparent; border: none; font-size: 13px; font-family: 'Open Sans', sans-serif; outline: none; color: #394463; }
.set-search::placeholder { color: #b8c0cc; }
.set-category { margin-bottom: 12px; border: 1px solid #e8eeff; border-radius: 8px; overflow: hidden; }
.set-cat-header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #f8faff; cursor: pointer; transition: background 0.15s; }
.set-cat-header:hover { background: #f0f5ff; }
.set-cat-icon { font-size: 20px; color: #3a5ba2; flex-shrink: 0; }
.set-cat-info { flex: 1; }
.set-cat-title { font-size: 14px; font-weight: 700; color: #394463; }
.set-cat-desc { font-size: 11px; color: #969dad; margin-top: 1px; }
.set-cat-chevron { font-size: 18px; color: #969dad; }
.set-cat-body { padding: 4px 14px 8px; }
.set-cat-body.collapsed { display: none; }
.set-row { display: flex; align-items: flex-start; gap: 16px; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,0.04); }
.set-info { flex: 1; min-width: 0; }
.set-label { font-size: 13px; font-weight: 600; color: #394463; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.set-desc { font-size: 11px; color: #969dad; margin-top: 2px; line-height: 1.5; }
.set-default-hint { display: block; font-size: 10px; color: #b8c0cc; margin-top: 3px; }
.set-restart-badge { font-size: 9px; font-weight: 700; color: #f5a623; background: #fff8ee; padding: 1px 6px; border-radius: 3px; }
.set-control { flex-shrink: 0; min-width: 180px; max-width: 400px; }
.set-json { font-family: monospace; font-size: 12px; min-width: 280px; }
.set-unit { font-size: 11px; color: #969dad; white-space: nowrap; }
.set-cron-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.set-cron-input { width: 140px !important; font-family: monospace; font-size: 12px; }
.set-cron-human { font-size: 11px; color: #3a5ba2; font-weight: 600; }
.set-cron-preset { font-size: 12px !important; padding: 4px 6px !important; }
.set-tag-editor { }
.set-tag-list { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; min-height: 0; }
.set-tag { display: inline-flex; align-items: center; gap: 3px; background: #e8eeff; color: #3a5ba2; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 4px; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-tag-x { cursor: pointer; font-size: 13px; color: #969dad; }
.set-tag-x:hover { color: #e74c3c; }
.set-tag-add { display: flex; gap: 4px; align-items: center; }
.set-tag-input { font-size: 12px !important; padding: 4px 8px !important; }
.set-toggle { position: relative; display: inline-block; width: 40px; height: 22px; }
.set-toggle input { opacity: 0; width: 0; height: 0; }
.set-toggle-slider { position: absolute; cursor: pointer; inset: 0; background: #d9e3f0; border-radius: 11px; transition: 0.2s; }
.set-toggle-slider::before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.2s; }
.set-toggle input:checked + .set-toggle-slider { background: #3a7cee; }
.set-toggle input:checked + .set-toggle-slider::before { transform: translateX(18px); }

/* ─── Global Color Rules (settings page) ─── */
.gcr-rule { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.gcr-col-name { font-size: 13px; font-weight: 600; color: #394463; min-width: 140px; }
.gcr-ranges { display: flex; gap: 6px; flex: 1; }
.gcr-tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.gcr-tag.green { background: #e8f9f2; color: #1ecb85; }
.gcr-tag.yellow { background: #fff3e8; color: #f5a623; }
.gcr-tag.red { background: #fff0f0; color: #e74c3c; }
.gcr-edit, .gcr-del { background: none; border: none; cursor: pointer; font-size: 16px; color: #969dad; padding: 2px; }
.gcr-edit:hover { color: #3a7cee; }
.gcr-del:hover { color: #e74c3c; }
.gcr-add-row { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.gcr-editor { background: #f6faff; border: 1px solid #e8eeff; border-radius: 8px; padding: 16px; margin: 8px 0; }
.gcr-editor-title { font-size: 14px; font-weight: 700; color: #394463; margin-bottom: 12px; }
.gcr-editor-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.gcr-editor-row label { font-size: 13px; color: #394463; min-width: 50px; }
.gcr-editor-row .form-input { width: 80px; padding: 6px 8px; font-size: 13px; text-align: center; }
.gcr-sep { font-size: 12px; color: #969dad; }
.gcr-editor-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; padding-top: 8px; border-top: 1px solid #e8eeff; }

/* ─── Column Settings Modal ─── */
.cs-props { padding: 4px 0; }
.cs-section { margin-bottom: 16px; }
.cs-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #3a5ba2; margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid #d9e3f0; }
.cs-field { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cs-field-label { font-size: 13px; color: #394463; min-width: 140px; flex-shrink: 0; }
.cs-field .form-input { flex: 1; max-width: 300px; }

.cs-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.04); font-size: 13px; color: #394463; }
.cs-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.cs-switch input { opacity: 0; width: 0; height: 0; }
.cs-slider { position: absolute; cursor: pointer; inset: 0; background: #d9e3f0; border-radius: 11px; transition: 0.2s; }
.cs-slider::before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.2s; }
.cs-switch input:checked + .cs-slider { background: #3a7cee; }
.cs-switch input:checked + .cs-slider::before { transform: translateX(18px); }

/* Drag states */
.cs-dragging { opacity: 0.4 !important; }
.cs-drag-over { box-shadow: 0 -2px 0 #3a7cee inset; }
tr.cs-drag-over td { box-shadow: 0 -2px 0 #3a7cee inset; }
.cs-action-item { padding: 8px 4px; cursor: default; }

/* Table style toggles */
.data-table.cs-no-row-borders tbody td { border-bottom: none; }
.data-table.cs-col-borders td, .data-table.cs-col-borders th { border-right: 1px solid #d9e3f0; }
.data-table.cs-col-borders td:last-child, .data-table.cs-col-borders th:last-child { border-right: none; }
.data-table.cs-no-table-border { border: none; }
.data-table.cs-no-alt-rows tbody tr:nth-child(even) { background: transparent; }

/* Type badge */
.cs-type-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: #f0f3f8; color: #969dad; font-weight: 600; text-transform: lowercase; }

/* Color rule button */
.cs-color-btn { background: none; border: 1px solid #d9e3f0; border-radius: 4px; padding: 3px; cursor: pointer; color: #ccc; display: inline-flex; transition: all 0.15s; }
.cs-color-btn:hover { border-color: #3a7cee; color: #3a7cee; }
.cs-color-btn.active { border-color: #3a7cee; color: #3a7cee; background: #edf3ff; }
.settings-table td:has(.cs-color-btn) { position: relative; overflow: visible; }

/* Color rule popover */
.cs-color-popover { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); z-index: 80; background: #fff; border: 1px solid #d9e3f0; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,0.14); padding: 12px; min-width: 180px; }
.cs-pop-title { font-size: 12px; font-weight: 700; color: #394463; margin-bottom: 10px; }
.cs-color-range { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.cs-color-range:last-of-type { margin-bottom: 0; }
.cs-color-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cs-color-dot.green { background: var(--status-active-text); }
.cs-color-dot.yellow { background: var(--status-inactive-text); }
.cs-color-dot.red { background: var(--status-warn-text); }
.cs-range-sep { font-size: 11px; color: #969dad; flex-shrink: 0; }
.cs-color-range .form-input { width: 58px; padding: 4px 6px; font-size: 12px; text-align: center; }
.cs-pop-hint { font-size: 11px; color: #969dad; margin-bottom: 8px; }
.cs-pop-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; padding-top: 8px; border-top: 1px solid #eee; }
.cs-pop-clear { background: none; border: none; color: #969dad; font-size: 12px; cursor: pointer; padding: 4px 8px; }
.cs-pop-clear:hover { color: #394463; }
.cs-pop-apply { background: #3a7cee; color: #fff; border: none; font-size: 12px; padding: 4px 12px; border-radius: 4px; cursor: pointer; }
.cs-pop-apply:hover { background: #2d6ad8; }

#csFooter:not(:empty) { display: flex; }

/* ─── Filing summary expand/collapse ─── */
.filing-summary-cell {
  display: inline-block; max-width: 400px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
}
.filing-summary-cell.filing-summary-expanded {
  white-space: normal; max-width: none; overflow: visible;
  line-height: 1.5;
}

/* ─── Chat ─── */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 220px); }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-input-row { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #d9e3f0; }
.chat-input-row .form-input { flex: 1; }
.chat-bubble { padding: 10px 14px; border-radius: 12px; max-width: 85%; font-size: 13px; line-height: 1.6; }
.chat-user { align-self: flex-end; background: #3a7cee; color: #fff; border-radius: 12px 12px 2px 12px; }
.chat-bot { align-self: flex-start; background: #f4f7fc; color: #394463; border-radius: 12px 12px 12px 2px; }
.chat-reply-wrap { display: flex; flex-direction: column; gap: 6px; max-width: 85%; }
.chat-typing { color: #969dad; font-style: italic; }

/* Tool steps */
.chat-steps { display: flex; flex-direction: column; gap: 4px; }
.chat-step { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #969dad; padding: 3px 8px; background: #f6faff; border-radius: 6px; border: 1px solid #e8eeff; }
.chat-step-icon { font-size: 14px; color: #3a7cee; }
.chat-step-result .chat-step-icon { color: #1ecb85; }
.chat-step-label { flex: 1; }
.chat-step-args { font-family: monospace; font-size: 11px; color: #6b7a90; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Chat markdown table */
.chat-table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 8px 0; }
.chat-table th { background: #e8eeff; padding: 6px 10px; text-align: left; font-weight: 600; color: #3a5ba2; border-bottom: 2px solid #d9e3f0; white-space: nowrap; }
.chat-table td { padding: 5px 10px; border-bottom: 1px solid rgba(0,0,0,0.05); white-space: nowrap; }
.chat-table tbody tr:hover { background: #f6faff; }
.chat-bot h2, .chat-bot h3, .chat-bot h4 { margin: 8px 0 4px; color: #3a5ba2; }
.chat-bot h2 { font-size: 15px; } .chat-bot h3 { font-size: 14px; } .chat-bot h4 { font-size: 13px; }
.chat-bot code { background: #e8eeff; padding: 1px 4px; border-radius: 3px; font-size: 12px; }
.chat-bot ul { margin: 4px 0; padding-left: 18px; }
.chat-bot li { margin-bottom: 2px; }

/* Interactive chat grid */
.chat-grid-wrap { width: 100%; }
.chat-grid-summary { font-size: 13px; font-weight: 600; color: #3a5ba2; margin-bottom: 8px; }
.chat-grid-filter { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.chat-grid-search { flex: 1; padding: 4px 8px; font-size: 12px; border: 1px solid #d9e3f0; border-radius: 6px; }
.chat-grid-count { font-size: 11px; color: #969dad; white-space: nowrap; }
.chat-grid { max-height: 60vh; display: block; overflow-y: auto; }
.chat-grid thead, .chat-grid tbody, .chat-grid tr { display: table; width: 100%; table-layout: fixed; }
.chat-grid thead { position: sticky; top: 0; z-index: 1; }
.chat-grid th.sorted { background: #d4e1ff; }
.chat-grid th:hover { background: #d4e1ff; }
.chat-reply-wrap:has(.chat-grid-wrap) { max-width: 100%; }

/* BuyAlloc arguments modal form */
.ba-args-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #edf0f7; }
.ba-args-row:last-child { border-bottom: none; }
.ba-args-label { flex: 0 0 160px; font-size: 13px; font-weight: 500; color: #394463; }
.ba-args-input { flex: 1; padding: 7px 10px; font-size: 13px; border: 1px solid #d9e3f0; border-radius: 6px; background: #f7f9fc; color: #1a2744; }
.ba-args-input:focus { outline: none; border-color: #3a7cee; box-shadow: 0 0 0 2px rgba(58,124,238,0.15); background: #fff; }

/* Hint popover + hint-tip */
.hint-tip { cursor: help; border-bottom: 1px dotted #969dad; }
.hint-popover { position: fixed; z-index: 9999; max-width: 310px; padding: 10px 14px; background: #1a2744; color: #e8eeff; font-size: 12px; line-height: 1.5; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.25); pointer-events: auto; animation: hintIn 0.15s ease; }
@keyframes hintIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* BuyAlloc inline title edit */
.ba-title-input { font: inherit; font-size: inherit; font-weight: inherit; color: inherit; background: transparent; border: none; border-bottom: 2px solid #3a7cee; outline: none; width: 100%; padding: 0; }

/* BuyAlloc always-editable weight cell input */
.ba-weight-input {
  width: 100%;
  font: inherit;
  font-size: 13px;
  padding: 3px 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #394463;
  background: transparent;
  outline: none;
  text-align: right;
  -moz-appearance: textfield;
}
.ba-weight-input::-webkit-outer-spin-button,
.ba-weight-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ba-weight-input:hover { background: #f4f7fc; border-color: #e8eeff; }
.ba-weight-input:focus { background: #fff; border-color: #3a7cee; box-shadow: 0 0 0 3px rgba(58,124,238,0.15); }
