/* Osprey Command Deck — Dashboard Styles */

/* === Theme Variables === */
:root,
:root[data-theme="light"] {
  --bg-primary: #f0f2f5;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f8f9fb;
  --bg-elevated: #ffffff;
  --bg-inset: #f5f6f8;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --text-inverse: #ffffff;
  --accent: #1e40af;
  --accent-hover: #1e3a8a;
  --accent-subtle: #dbeafe;
  --accent-text: #1e40af;
  --success: #059669;
  --success-bg: #d1fae5;
  --warning: #d97706;
  --warning-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 2px 8px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,.10);
  --radius: 8px;
  --radius-sm: 4px;
  --sidebar-bg: #1a1d2e;
  --sidebar-text: #94a3b8;
  --sidebar-active: #ffffff;
  --sidebar-accent: #3b82f6;
  --header-bg: #ffffff;
  --header-border: #e5e7eb;
  --table-stripe: #f9fafb;
  --scrollbar-thumb: #d1d5db;
  --scrollbar-track: transparent;
}

:root[data-theme="dark"] {
  --bg-primary: #0b0e14;
  --bg-surface: #151923;
  --bg-surface-hover: #1c2030;
  --bg-elevated: #1c2030;
  --bg-inset: #111520;
  --text-primary: #e5e7eb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-inverse: #111827;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-subtle: #1e3a5f;
  --accent-text: #60a5fa;
  --success: #34d399;
  --success-bg: #064e3b;
  --warning: #fbbf24;
  --warning-bg: #78350f;
  --danger: #f87171;
  --danger-bg: #7f1d1d;
  --border: #1f2937;
  --border-light: #1a1f2e;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.20);
  --shadow-md: 0 2px 8px rgba(0,0,0,.30);
  --shadow-lg: 0 4px 16px rgba(0,0,0,.40);
  --sidebar-bg: #0d1017;
  --sidebar-text: #6b7280;
  --sidebar-active: #e5e7eb;
  --sidebar-accent: #3b82f6;
  --header-bg: #111520;
  --header-border: #1f2937;
  --table-stripe: #111520;
  --scrollbar-thumb: #374151;
  --scrollbar-track: transparent;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }

/* === App Layout === */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* === Header === */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 16px;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  flex-shrink: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.logo svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.header-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

.header-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === Selectors === */
.select-control {
  height: 30px;
  padding: 0 28px 0 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239ca3af'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.select-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-subtle);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-inverse);
  border-color: var(--accent);
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.btn-icon {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
  font-size: 16px;
}

.btn-icon:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.btn-sm {
  height: 24px;
  padding: 0 8px;
  font-size: 11px;
}

/* === Main Layout === */
.main-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* === Sidebar === */
.sidebar {
  width: 56px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 4px;
  flex-shrink: 0;
  z-index: 50;
}

.nav-item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--sidebar-text);
  text-decoration: none;
  transition: all .15s;
  position: relative;
  cursor: pointer;
  border: none;
  background: none;
}

.nav-item:hover {
  background: rgba(255,255,255,.08);
  color: var(--sidebar-active);
}

.nav-item.active {
  background: rgba(59,130,246,.15);
  color: var(--sidebar-accent);
}

.nav-item svg {
  width: 20px;
  height: 20px;
}

.nav-item[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 52px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 8px;
  background: #1f2937;
  color: #f9fafb;
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  z-index: 200;
}

.nav-item[data-tooltip]:hover::after { opacity: 1; }

.sidebar-spacer { flex: 1; }

/* === Canvas === */
.canvas {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
}

/* === Widget Cards === */
.widget-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.widget-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.widget-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.widget-action-btn {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: all .15s;
}

.widget-action-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.widget-body {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  overflow-x: hidden;
}

.widget-body.no-pad { padding: 0; }

/* === Data Tables === */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  white-space: nowrap;
}

.data-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  white-space: nowrap;
}

.data-table tr:hover td {
  background: var(--bg-surface-hover);
}

.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.data-table .ticker {
  font-weight: 600;
  color: var(--accent-text);
}

/* === Metric Cards === */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.metric-card {
  background: var(--bg-inset);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.metric-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 4px;
}

.metric-value.success { color: var(--success); }
.metric-value.danger { color: var(--danger); }
.metric-value.warning { color: var(--warning); }

/* === Score Display === */
.score-display {
  text-align: center;
  padding: 8px 0;
}

.score-big {
  font-size: 36px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.score-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

.score-sub {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
}

.score-sub-item {
  font-size: 12px;
  color: var(--text-secondary);
}

.score-sub-item strong {
  font-weight: 600;
}

/* === Status Badges === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  line-height: 1.4;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-neutral { background: var(--bg-inset); color: var(--text-muted); }

/* M2G: client-meeting historical-snapshot disclosure badges/captions. Small pill style,
   matching the M1 Command Center "Prototype" caption convention. Presentation only — no
   data/logic implication. */
.snapshot-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 500;
  border-radius: 10px;
  background: var(--bg-inset);
  color: var(--text-muted);
  white-space: nowrap;
}

.snapshot-caption {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* R7F2 B3: the DATA STATUS widget shows the daily state (the one daily-state table's lines) */
.daily-state {
  font-size: 12px;
  line-height: 1.45;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--bg-inset);
  margin-bottom: 8px;
}

.daily-state-warn {
  background: var(--warning-bg);
  color: var(--warning);
}

.daily-state-line + .daily-state-line {
  margin-top: 4px;
}

.daily-state-dates {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* === Trend Indicators === */
.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }
.trend-flat { color: var(--text-muted); }

.trend-arrow::before {
  display: inline-block;
  margin-right: 2px;
}

.trend-up.trend-arrow::before { content: "\25B2"; font-size: 9px; }
.trend-down.trend-arrow::before { content: "\25BC"; font-size: 9px; }

/* === Alert List === */
.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.alert-item:last-child { border-bottom: none; }

.alert-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.alert-icon.buy { background: var(--success-bg); color: var(--success); }
.alert-icon.sell { background: var(--danger-bg); color: var(--danger); }
.alert-icon.info { background: var(--accent-subtle); color: var(--accent-text); }

.alert-content { flex: 1; min-width: 0; }

.alert-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.alert-detail {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.alert-time {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* === Loading / Empty / Error States === */
.state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
  height: 100%;
  min-height: 100px;
}

.state-icon {
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.5;
}

.state-text {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.state-subtext {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  opacity: 0.7;
}

/* Loading spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Pulse for loading values */
.loading-pulse {
  background: linear-gradient(90deg, var(--bg-inset) 25%, var(--border-light) 50%, var(--bg-inset) 75%);
  background-size: 200% 100%;
  animation: pulse 1.5s infinite;
  border-radius: 4px;
  height: 14px;
}

@keyframes pulse { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* === Rank Change Pills === */
.rank-changes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border-radius: 4px;
  background: var(--bg-inset);
  color: var(--text-secondary);
}

.rank-pill.up { background: var(--success-bg); color: var(--success); }
.rank-pill.down { background: var(--danger-bg); color: var(--danger); }

.rank-period {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 10px;
}

/* === Chart Container === */
.chart-container {
  width: 100%;
  height: 100%;
  min-height: 200px;
  position: relative;
}

.chart-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  background: var(--bg-inset);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
}

/* === Export Panel === */
.export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.export-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  text-align: left;
}

.export-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent);
}

.export-btn-icon {
  font-size: 18px;
  color: var(--accent-text);
}

.export-btn-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.export-btn-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* === Ingestion Status === */
.job-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.job-item:last-child { border-bottom: none; }

.job-info {
  display: flex;
  flex-direction: column;
}

.job-type {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.job-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* === Gridstack Overrides === */
.grid-stack {
  min-height: calc(100vh - 80px);
}

.grid-stack-item-content {
  inset: 0 !important;
  overflow: visible !important;
}

.grid-stack > .grid-stack-item > .grid-stack-item-content {
  display: flex;
}

.grid-stack > .grid-stack-item > .grid-stack-item-content > .widget-card {
  flex: 1;
}

.grid-stack-item > .ui-resizable-handle {
  z-index: 10;
}

/* Drag placeholder */
.grid-stack-placeholder > .placeholder-content {
  background: var(--accent-subtle) !important;
  border: 2px dashed var(--accent) !important;
  border-radius: var(--radius) !important;
}

/* === Responsive === */
@media (max-width: 768px) {
  .header-center { display: none; }
  .header-title { display: none; }
  .sidebar { width: 44px; }
  .nav-item { width: 32px; height: 32px; }
  .canvas { padding: 8px; }
}

/* === Utility === */
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.fw-600 { font-weight: 600; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mb-8 { margin-bottom: 8px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.tabular { font-variant-numeric: tabular-nums; }

/* === Toast Notifications === */
.toast-container {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 10px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  animation: slideIn .3s ease;
  max-width: 320px;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Save indicator === */
.save-indicator {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.save-indicator.saving { color: var(--warning); }
.save-indicator.saved { color: var(--success); }

/* === Symbol Search === */
.search-wrapper {
  position: relative;
}

.search-input {
  height: 30px;
  width: 200px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-primary);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-subtle);
}

.search-input::placeholder { color: var(--text-muted); }

.search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  margin-top: 4px;
}

.search-result-item {
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  border-bottom: 1px solid var(--border-light);
}

.search-result-item:hover { background: var(--bg-surface-hover); }
.search-result-item:last-child { border-bottom: none; }
.search-result-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.search-result-ticker {
  font-weight: 600;
  color: var(--accent-text);
}

.search-result-name {
  color: var(--text-muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}

/* === Symbol Drawer === */
.symbol-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  justify-content: flex-end;
}

.symbol-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}

.symbol-drawer {
  position: relative;
  width: 380px;
  max-width: 90vw;
  height: 100%;
  background: var(--bg-surface);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.2s ease;
  z-index: 1;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.drawer-ticker {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-text);
  letter-spacing: -0.3px;
}

.drawer-name {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.drawer-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.drawer-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.drawer-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* === Indicator Grid (Drawer) === */
.indicator-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.indicator-cell {
  background: var(--bg-inset);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.indicator-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.indicator-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

/* === Key Values (FN05 / C4) — reuses the same tokens as .indicator-grid, no new design
   language; a labeled-row layout rather than a 2-col grid because each field also carries an
   availability state and a legacy/modern label pair the indicator grid has no room for. === */
.kv-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  background: var(--bg-inset);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

.kv-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
}

.kv-label-modern {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

.kv-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kv-value.kv-unavailable {
  color: var(--text-muted);
  font-weight: 400;
  font-style: italic;
}

/* === Tag Chips === */
.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  background: var(--accent-subtle);
  color: var(--accent-text);
  border-radius: 12px;
}

.tag-remove {
  cursor: pointer;
  opacity: 0.6;
  font-size: 14px;
  line-height: 1;
}

.tag-remove:hover { opacity: 1; }

/* === Watchlist Panel === */
.watchlist-item {
  border-bottom: 1px solid var(--border-light);
}

.watchlist-item:last-child { border-bottom: none; }

.watchlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  cursor: pointer;
}

.watchlist-header:hover { color: var(--accent-text); }

.watchlist-symbols { padding-bottom: 8px; }

/* === Clickable Tickers === */
.ticker.clickable { cursor: pointer; transition: color .15s; }
.ticker.clickable:hover { text-decoration: underline; color: var(--accent-hover); }

/* === Alert read state === */
.alert-item.read { opacity: 0.6; }
.alert-item.read:hover { opacity: 0.8; }

/* === Table horizontal scroll === */
.table-scroll { overflow-x: auto; }

/* === Quick action buttons === */
.quick-action-btn {
  text-transform: capitalize;
}

/* === Disabled button state === */
.btn:disabled, .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* === Tag chip hover === */
.tag-chip:hover { opacity: 0.85; }
.tag-remove:hover { color: var(--danger); opacity: 1; }
