/* Fonlarda Bugün — Hybrid Market Pulse (Command Cockpit + Dual Flow & Sparkline) */
#today-workspace {
  padding: 12px 16px 14px;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--line) var(--bg);
}
#today-workspace::-webkit-scrollbar { width: 7px; }
#today-workspace::-webkit-scrollbar-track { background: var(--bg); }
#today-workspace::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; }

.ft-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.ft-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 14px;
}

.ft-hero-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.ft-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
  font: 800 10.5px/1.2 Manrope, sans-serif;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.ft-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
}

.ft-hero-title h1 {
  margin: 0;
  font: 800 19px/1.2 Manrope, sans-serif;
  letter-spacing: -0.02em;
  color: var(--text);
}

.ft-hint-pill {
  font: 700 10.5px/1.2 Manrope, sans-serif;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
}

.ft-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ft-seg {
  display: inline-flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.ft-seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 700 11px/1.2 Manrope, sans-serif;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.ft-seg button:hover {
  color: var(--text);
}

.ft-seg button[aria-pressed="true"] {
  background: #1d4ed8;
  color: #ffffff;
}

.ft-seg button:focus-visible,
.ft-pill:focus-visible,
.ft-btn:focus-visible,
.ft-expand-btn:focus-visible,
.ft-row:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

.ft-date-chip {
  background: var(--panel2);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 8px;
  font: 700 11.5px/1.2 Manrope, sans-serif;
  color: #fbbf24;
  white-space: nowrap;
}

.ft-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 6px 11px;
  border-radius: 8px;
  font: 700 11px/1.2 Manrope, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.ft-btn:hover:not(:disabled) {
  border-color: #fbbf24;
  color: #fde68a;
}

.ft-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* 4-KPI Summary Strip */
.ft-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.ft-kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

.ft-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.ft-kpi-clickable {
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.ft-kpi-clickable:hover {
  border-color: #3b82f6;
  background: var(--panel2);
}

.ft-kpi small {
  display: block;
  font: 700 9.5px/1.2 Manrope, sans-serif;
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ft-kpi strong {
  display: block;
  font: 800 14.5px/1.25 Manrope, sans-serif;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ft-kpi-pill {
  font: 700 10px/1.2 Manrope, sans-serif;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Filter Chips & Search Bar */
.ft-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ft-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.ft-pill {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font: 700 11px/1.2 Manrope, sans-serif;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.14s ease, color 0.14s ease, background-color 0.14s ease;
}

.ft-pill:hover {
  color: var(--text);
  border-color: var(--muted);
}

.ft-pill[aria-pressed="true"] {
  background: rgba(59, 130, 246, 0.18);
  border-color: #3b82f6;
  color: #dbeafe;
}

.ft-search-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ft-search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
  min-width: 240px;
}

.ft-search-box:focus-within {
  border-color: #fbbf24;
}

.ft-search-box input {
  border: 0;
  background: transparent;
  color: var(--text);
  font: 600 12px/1.2 Manrope, sans-serif;
  width: 100%;
  outline: 0;
}

.ft-search-box input::placeholder {
  color: var(--muted);
}

/* 3 Symmetric Dual-Flow Grid */
.ft-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  align-items: stretch;
}

.ft-col {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.ft-col-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.ft-col-head h2 {
  margin: 0;
  font: 800 12px/1.25 Manrope, sans-serif;
  letter-spacing: 0.01em;
  color: var(--text);
}

.ft-col-head small {
  display: block;
  margin-top: 3px;
  font: 600 10.5px/1.25 Manrope, sans-serif;
  color: var(--muted);
}

.ft-expand-btn {
  background: var(--panel2);
  border: 1px solid var(--line);
  color: #93c5fd;
  font: 700 10.5px/1.2 Manrope, sans-serif;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.ft-expand-btn:hover:not(:disabled) {
  border-color: #3b82f6;
  color: #dbeafe;
}

.ft-expand-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.ft-balance {
  height: 5px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  gap: 2px;
  background: var(--bg);
}

.ft-balance i {
  display: block;
  height: 100%;
  transition: width 0.2s ease;
}

.ft-subhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font: 800 10px/1.2 Manrope, sans-serif;
  letter-spacing: 0.03em;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.ft-subhead.pos {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

.ft-subhead.neg {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.ft-subhead small {
  font-size: 9px;
  opacity: 0.9;
  flex-shrink: 0;
}

.ft-half {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ft-row {
  display: grid;
  grid-template-columns: 14px 26px minmax(0, 1fr) 44px auto;
  align-items: center;
  gap: 7px;
  width: 100%;
  flex: 0 0 auto;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 8px;
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.ft-row:hover {
  background: var(--panel2);
  border-color: rgba(251, 191, 36, 0.55);
}

.ft-idx {
  font: 800 10.5px/1 Manrope, sans-serif;
  color: var(--muted);
  text-align: center;
}

.ft-row .fund-logo {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 7px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.ft-mid {
  display: block;
  min-width: 0;
  overflow: hidden;
}

.ft-line1 {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

.ft-code {
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
  font: 800 10.5px/1.2 Manrope, sans-serif;
  padding: 1px 5px;
  border-radius: 4px;
  flex-shrink: 0;
}

.ft-fname {
  font: 600 11.5px/1.25 Manrope, sans-serif;
  color: var(--text);
  min-width: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ft-anomaly {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  font: 800 9px/1.2 Manrope, sans-serif;
  padding: 1px 5px;
  border-radius: 4px;
  flex-shrink: 0;
}

.ft-sub {
  display: block;
  font: 500 10px/1.25 Manrope, sans-serif;
  color: var(--muted);
  margin: 2px 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ft-track {
  display: block;
  height: 3px;
  background: var(--panel2);
  border-radius: 999px;
  overflow: hidden;
}

.ft-bar {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.ft-spark {
  display: block;
  width: 44px;
  height: 20px;
  opacity: 0.95;
}

.ft-rval {
  text-align: right;
  min-width: 68px;
}

.ft-rval b {
  display: block;
  font: 800 11.5px/1.2 Manrope, sans-serif;
  white-space: nowrap;
}

.ft-pos-text { color: #4ade80; }
.ft-neg-text { color: #f87171; }
.ft-flat-text { color: var(--muted); }
.ft-pos-bg { background: #22c55e; }
.ft-neg-bg { background: #ef4444; }

.ft-source-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 700 10px/1.2 Manrope, sans-serif;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 6px;
  padding: 4px 8px;
}

.ft-pending-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 26px 16px;
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.ft-pending-box strong {
  font: 800 13px/1.3 Manrope, sans-serif;
  color: var(--text);
}

.ft-pending-box p {
  margin: 0;
  font: 500 11.5px/1.55 Manrope, sans-serif;
  color: var(--muted);
  max-width: 320px;
}

.ft-empty-half {
  padding: 14px 10px;
  text-align: center;
  font: 600 11.5px/1.4 Manrope, sans-serif;
  color: var(--muted);
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.ft-footnote {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font: 500 11px/1.45 Manrope, sans-serif;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.ft-warning {
  padding: 9px 12px;
  border: 1px solid var(--amber);
  background: var(--panel2);
  color: var(--text);
  border-radius: 8px;
  font: 600 12px/1.4 Manrope, sans-serif;
}

/* Expanded Institutional Leaderboard Modal */
.ft-modal {
  width: min(1040px, 95vw);
  height: min(86dvh, 840px);
  max-height: 90dvh;
  background: linear-gradient(180deg, #09151e 0%, #060d14 100%);
  color: var(--text);
  border: 1px solid rgba(16, 232, 160, 0.24);
  border-radius: 16px;
  padding: 0;
  margin: auto;
  overflow: hidden;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.78), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ft-modal::backdrop {
  background: rgba(3, 7, 12, 0.80);
  backdrop-filter: blur(5px);
}

.ft-modal-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  min-height: 0;
}

.ft-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid rgba(168, 224, 214, 0.11);
  background: radial-gradient(ellipse 360px 140px at 14% 0%, rgba(16, 232, 160, 0.10), transparent 72%), rgba(10, 22, 31, 0.92);
  flex-shrink: 0;
}

.ft-modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ft-modal-head h2 {
  margin: 0;
  font: 800 16.5px/1.2 Manrope, sans-serif;
  letter-spacing: 0.015em;
  color: #f3fbf8;
}

.ft-modal-period-chip {
  font: 800 10px/1 Manrope, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(16, 232, 160, 0.14);
  border: 1px solid rgba(16, 232, 160, 0.36);
  color: #6ee7b7;
}

.ft-modal-head small {
  display: block;
  margin-top: 4px;
  font: 600 12px/1.3 Manrope, sans-serif;
  color: #8aaab2;
}

.ft-modal-head small b {
  color: #e2f5f0;
  font-weight: 800;
}

.ft-modal-close {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  border: 1px solid rgba(176, 230, 220, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font: 700 20px/1 Manrope, sans-serif;
  cursor: pointer;
  transition: border-color 0.14s ease, color 0.14s ease, background-color 0.14s ease;
}

.ft-modal-close:hover {
  border-color: #10e8a0;
  color: #ffffff;
  background: rgba(16, 232, 160, 0.14);
}

.ft-modal-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(168, 224, 214, 0.09);
  background: rgba(6, 13, 20, 0.72);
  flex-shrink: 0;
}

.ft-modal-dir-seg {
  display: inline-flex;
  gap: 5px;
  padding: 4px;
  border-radius: 10px;
  background: rgba(3, 9, 14, 0.85);
  border: 1px solid rgba(176, 230, 220, 0.14);
}

.ft-modal-dir-seg button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: #8aaab2;
  font: 800 12px/1 Manrope, sans-serif;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ft-modal-dir-seg button span {
  font: 700 11px/1 'IBM Plex Mono', Consolas, monospace;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.ft-modal-dir-seg .ft-dir-pos[aria-pressed="true"] {
  background: linear-gradient(135deg, #10e8a0 0%, #059669 100%);
  color: #04130d;
  border-color: rgba(167, 243, 208, 0.5);
  box-shadow: 0 4px 14px rgba(16, 232, 160, 0.25);
}

.ft-modal-dir-seg .ft-dir-pos[aria-pressed="true"] span {
  background: rgba(4, 19, 13, 0.82);
  color: #6ee7b7;
}

.ft-modal-dir-seg .ft-dir-neg[aria-pressed="true"] {
  background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);
  color: #ffffff;
  border-color: rgba(253, 164, 175, 0.45);
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.28);
}

.ft-modal-dir-seg .ft-dir-neg[aria-pressed="true"] span {
  background: rgba(0, 0, 0, 0.32);
  color: #ffe4e6;
}

.ft-modal-search {
  min-width: 290px;
  padding: 7px 12px;
  border-radius: 9px;
  background: rgba(3, 9, 14, 0.86);
  border: 1px solid rgba(176, 230, 220, 0.16);
  color: #7e9fa8;
}

.ft-modal-search:focus-within {
  border-color: #10e8a0;
  box-shadow: 0 0 0 2px rgba(16, 232, 160, 0.15);
}

.ft-modal-cols {
  display: grid;
  grid-template-columns: 44px minmax(260px, 1.85fr) minmax(115px, 0.72fr) 118px 72px 136px;
  align-items: center;
  gap: 12px;
  padding: 9px 22px;
  background: rgba(9, 20, 29, 0.96);
  border-bottom: 1px solid rgba(168, 224, 214, 0.14);
  font: 800 10px/1.2 Manrope, sans-serif;
  letter-spacing: 0.08em;
  color: #6e949e;
  text-transform: uppercase;
  flex-shrink: 0;
}

.ft-modal-cols .num { text-align: right; }
.ft-modal-cols .ctr { text-align: center; }

.ft-modal-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(110, 231, 183, 0.28) transparent;
}

.ft-modal-list::-webkit-scrollbar { width: 7px; }
.ft-modal-list::-webkit-scrollbar-thumb { background: rgba(110, 231, 183, 0.25); border-radius: 6px; }
.ft-modal-list::-webkit-scrollbar-thumb:hover { background: rgba(16, 232, 160, 0.45); }

.ft-mrow {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 44px minmax(260px, 1.85fr) minmax(115px, 0.72fr) 118px 72px 136px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 9px 10px;
  border-radius: 11px;
  border: 1px solid rgba(176, 230, 220, 0.09);
  background: rgba(255, 255, 255, 0.024);
  color: #f1f5f9;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, transform 0.12s ease;
}

.ft-mrow:nth-child(even) {
  background: rgba(13, 27, 38, 0.56);
}

.ft-mrow:hover,
.ft-mrow:focus-visible {
  background: rgba(16, 232, 160, 0.09);
  border-color: rgba(16, 232, 160, 0.46);
  box-shadow: inset 3px 0 0 #10e8a0;
  outline: 0;
}

.ft-mrank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 26px;
  margin: 0 auto;
  border-radius: 7px;
  font: 800 12px/1 'IBM Plex Mono', Consolas, monospace;
  color: #8aaab2;
  background: rgba(255, 255, 255, 0.04);
}

.ft-mrank.top1 { background: rgba(251, 191, 36, 0.22); color: #fde68a; border: 1px solid rgba(251, 191, 36, 0.45); }
.ft-mrank.top2 { background: rgba(148, 163, 184, 0.22); color: #e2e8f0; border: 1px solid rgba(148, 163, 184, 0.42); }
.ft-mrank.top3 { background: rgba(217, 119, 6, 0.22); color: #fdba74; border: 1px solid rgba(217, 119, 6, 0.42); }

.ft-mfund {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.ft-mfund .fund-logo {
  width: 36px;
  height: 36px;
  min-width: 36px;
  flex-shrink: 0;
  border-radius: 9px;
  background: #ffffff;
  border: 1px solid rgba(176, 230, 220, 0.22);
  padding: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.ft-mfund .fund-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ft-mcopy {
  min-width: 0;
  flex: 1;
}

.ft-mline1 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ft-mcode {
  flex-shrink: 0;
  font: 800 12px/1 'IBM Plex Mono', Consolas, monospace;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.34);
  color: #bae6fd;
  letter-spacing: 0.03em;
}

.ft-mname {
  min-width: 0;
  flex: 1;
  font: 700 13px/1.3 Manrope, sans-serif;
  color: #f3fbf8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ft-mcat {
  min-width: 0;
  display: flex;
  align-items: center;
}

.ft-mcat-pill {
  display: inline-block;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 6px;
  font: 700 10.5px/1.2 Manrope, sans-serif;
  color: #9ec0c8;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(176, 230, 220, 0.12);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ft-msec {
  text-align: right;
  font: 700 12px/1.2 'IBM Plex Mono', Consolas, monospace;
  font-variant-numeric: tabular-nums;
  color: #cbd5e1;
  white-space: nowrap;
}

.ft-mspark {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ft-mspark .ft-spark {
  width: 62px;
  height: 22px;
}

.ft-mval {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.ft-mval-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 4px 10px;
  border-radius: 7px;
  font: 800 13px/1.15 'IBM Plex Mono', Consolas, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ft-mval-pill.pos {
  background: rgba(16, 232, 160, 0.15);
  border: 1px solid rgba(16, 232, 160, 0.42);
  color: #34d399;
}

.ft-mval-pill.neg {
  background: rgba(244, 63, 94, 0.16);
  border: 1px solid rgba(244, 63, 94, 0.42);
  color: #fb7185;
}

.ft-mval-pill.flat {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
}

.ft-mtrack {
  width: 100%;
  height: 3.5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

/* Light theme modal refinements */
html[data-theme="light"] .ft-modal {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}
html[data-theme="light"] .ft-modal-head {
  background: #ffffff;
  border-bottom-color: #e2e8f0;
}
html[data-theme="light"] .ft-modal-head h2,
html[data-theme="light"] .ft-modal-head small b,
html[data-theme="light"] .ft-mname,
html[data-theme="light"] .ft-msec {
  color: #0f172a;
}
html[data-theme="light"] .ft-modal-tools,
html[data-theme="light"] .ft-modal-cols {
  background: #f1f5f9;
  border-bottom-color: #e2e8f0;
  color: #475569;
}
html[data-theme="light"] .ft-modal-dir-seg {
  background: #e2e8f0;
  border-color: #cbd5e1;
}
html[data-theme="light"] .ft-modal-search {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}
html[data-theme="light"] .ft-mrow {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
}
html[data-theme="light"] .ft-mrow:nth-child(even) {
  background: #f8fafc;
}
html[data-theme="light"] .ft-mrow:hover {
  background: #ecfdf5;
  border-color: #10b981;
}
html[data-theme="light"] .ft-mcode {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}
html[data-theme="light"] .ft-mcat-pill {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}
html[data-theme="light"] .ft-mval-pill.pos {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}
html[data-theme="light"] .ft-mval-pill.neg {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

@media (max-width: 820px) {
  .ft-modal-cols,
  .ft-mrow {
    grid-template-columns: 36px minmax(0, 1fr) 114px;
    gap: 8px;
  }
  .ft-modal-cols > span:nth-child(3),
  .ft-modal-cols > span:nth-child(4),
  .ft-modal-cols > span:nth-child(5),
  .ft-mcat,
  .ft-msec,
  .ft-mspark {
    display: none;
  }
}

/* Light theme refinements */
html[data-theme="light"] .ft-live-pill {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

html[data-theme="light"] .ft-hint-pill {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
}

html[data-theme="light"] .ft-pill[aria-pressed="true"] {
  background: #dbeafe;
  color: #1e40af;
  border-color: #3b82f6;
}

html[data-theme="light"] .ft-pos-text { color: #15803d; }
html[data-theme="light"] .ft-neg-text { color: #b91c1c; }
html[data-theme="light"] .ft-subhead.pos { background: #dcfce7; color: #166534; }
html[data-theme="light"] .ft-subhead.neg { background: #fee2e2; color: #991b1b; }
html[data-theme="light"] .ft-code { background: #dbeafe; color: #1d4ed8; }
html[data-theme="light"] .ft-expand-btn { color: #1d4ed8; }
html[data-theme="light"] .ft-date-chip { color: #b45309; }
html[data-theme="light"] .ft-anomaly { background: #fef3c7; color: #b45309; border-color: #f59e0b; }

/* Responsive layout */
@media (max-width: 1260px) {
  .ft-grid {
    grid-template-columns: 1fr;
  }
  .ft-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  #today-workspace {
    padding: 10px 10px 14px;
  }
  .ft-kpi-strip {
    grid-template-columns: 1fr;
  }
  .ft-search-box {
    min-width: 0;
    flex: 1;
  }
  .ft-search-group {
    width: 100%;
  }
  .ft-seg {
    flex-wrap: wrap;
  }
  .ft-rval {
    min-width: 82px;
  }
}
