@font-face { font-family: "Vazirmatn Local"; src: url("/fonts/Vazirmatn-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn Local"; src: url("/fonts/Vazirmatn-SemiBold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn Local"; src: url("/fonts/Vazirmatn-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #06101a;
  --surface: #0b1927;
  --surface-2: #0e2234;
  --surface-3: #07131f;
  --line: #1c3549;
  --line-strong: #2b536d;
  --text: #eef7fd;
  --muted: #89a2b7;
  --blue: #2baaff;
  --cyan: #53d7ff;
  --green: #45d69b;
  --amber: #f5bd58;
  --red: #ff7d89;
  --shadow: 0 24px 70px #01070d80;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 76% -10%, #16476f 0, transparent 34%),
    radial-gradient(circle at -5% 92%, #0d3340 0, transparent 30%),
    linear-gradient(180deg, #06101a, #07131e 58%, #050d15);
  color: var(--text);
  font-family: "Vazirmatn Local", Dubai, "Segoe UI", Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
button, input, select { font: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}
.hidden { display: none !important; }
.shell { width: min(2200px, calc(100% - 18px)); margin: auto; padding: 22px 0 24px; }

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 17px 24px;
  margin-bottom: 18px;
  border: 1px solid #25445b;
  border-radius: 22px;
  background: linear-gradient(125deg, #102a40e8, #091827df 58%, #0a2030dc);
  box-shadow: var(--shadow), inset 0 1px #ffffff0d;
  backdrop-filter: blur(16px);
}
.hero-copy { display: flex; align-items: center; gap: 18px; min-width: 0; }
.brand-mark {
  width: 57px;
  height: 57px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  padding: 13px;
  border: 1px solid #2b84b9;
  border-radius: 17px;
  background: linear-gradient(145deg, #164d70, #0c263a);
  box-shadow: 0 10px 30px #03162380, inset 0 1px #7bd9ff30;
  flex: 0 0 auto;
}
.brand-mark span { width: 7px; border-radius: 4px 4px 2px 2px; background: linear-gradient(#5ee0ff, #238ccd); box-shadow: 0 0 12px #42c8ff66; }
.brand-mark span:nth-child(1) { height: 15px; }
.brand-mark span:nth-child(2) { height: 29px; }
.brand-mark span:nth-child(3) { height: 21px; }
.eyebrow { color: #7edcff; font-size: 13px; font-weight: 600; letter-spacing: .15px; margin-bottom: 5px; }
.pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 6px #45d69b17, 0 0 16px #45d69b80; margin-left: 8px; }
.hero h1 { margin: 0; font-size: clamp(30px, 3.6vw, 45px); line-height: 1.08; letter-spacing: -1.4px; font-weight: 700; }
.hero h1 span { color: var(--cyan); text-shadow: 0 0 32px #2baaff50; }
.hero p { margin: 8px 0 0; color: #9bb2c6; font-size: 14px; }
.hero-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.refresh, .secondary-action, .reset-all {
  min-height: 43px;
  border-radius: 11px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 600;
  transition: transform .16s ease, filter .16s ease, border-color .16s ease;
  white-space: nowrap;
}
.refresh { border: 1px solid #3b9fd4; background: linear-gradient(135deg, #1788c9, #11608c); color: white; box-shadow: 0 10px 25px #03283f80; }
.secondary-action { border: 1px solid #31536a; background: #0a1c2a; color: #b4cadb; }
.refresh:hover, .secondary-action:hover, .reset-all:hover { transform: translateY(-1px); filter: brightness(1.12); }
.refresh.loading .refresh-icon { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(-360deg); } }

.warning { border: 1px solid #7b612d; background: linear-gradient(90deg, #332711, #291e0e); color: #ffdc8d; padding: 12px 16px; border-radius: 12px; margin-bottom: 15px; font-size: 13px; }
.metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 11px; margin-bottom: 15px; }
.metric {
  min-width: 0;
  position: relative;
  overflow: hidden;
  padding: 16px 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(145deg, #10263a, #091725);
  box-shadow: 0 12px 30px #020a1166, inset 0 1px #ffffff08;
}
.metric::after { content: ""; position: absolute; width: 85px; height: 85px; border-radius: 50%; background: #ffffff07; left: -32px; top: -38px; }
.metric span, .metric small { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric strong { display: block; margin: 5px 0 3px; font-size: 29px; line-height: 1.15; font-weight: 700; font-variant-numeric: tabular-nums; }
.metric-blue strong { color: var(--cyan); }
.metric-green strong { color: var(--green); }
.metric-amber strong { color: var(--amber); }
.metric-red strong { color: var(--red); }
.metric-purple strong { color: #c69cff; }

.watchlist-section { margin-bottom: 15px; padding: 18px; border: 1px solid #2d526b; border-radius: 17px; background: linear-gradient(135deg, #0d2435, #081823 62%, #0b1e2d); box-shadow: 0 16px 40px #020a1150, inset 0 1px #ffffff0a; }
.watchlist-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 14px; }
.watchlist-title-row { display: flex; align-items: center; gap: 9px; }
.watchlist-title-row h2 { margin: 0; font-size: 20px; }
.watchlist-star { color: #ffd36e; font-size: 20px; filter: drop-shadow(0 0 8px #ffd36e55); }
.watchlist-head p { max-width: 820px; margin: 4px 0 0; color: #819bb0; font-size: 12px; }
.watchlist-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.watch-order-label { display: flex; align-items: center; gap: 6px; color: #8faabd; font-size: 11px; white-space: nowrap; }
.watch-order-label select { min-height: 34px; padding: 0 9px; border: 1px solid #315a73; border-radius: 8px; background: #081d2b; color: #b7d8e9; }
.watchlist-counts { display: flex; gap: 7px; flex-wrap: wrap; }
.watchlist-counts span { padding: 6px 10px; border: 1px solid #2d4d62; border-radius: 999px; background: #071723; color: #8faabd; font-size: 11px; white-space: nowrap; }
.watchlist-counts b { color: #d8f1ff; font-size: 13px; }
.toggle-watchlist, .open-all-watchlist { min-height: 34px; padding: 0 10px; border: 1px solid #315a73; border-radius: 8px; background: #0a2131; color: #a8d9f3; cursor: pointer; font-size: 10px; white-space: nowrap; }
.open-all-watchlist { border-color: #39744c; background: #143522; color: #83e6aa; }
.open-all-watchlist:disabled { opacity: .45; cursor: not-allowed; }
.watchlist-body { display: block; }
.watchlist-section.collapsed { padding-bottom: 13px; }
.watchlist-section.collapsed .watchlist-head { margin-bottom: 0; }
.watchlist-section.collapsed .watchlist-body, .watchlist-section.collapsed .watchlist-head p { display: none; }
.watchlist-add { display: grid; grid-template-columns: auto minmax(260px, 520px); align-items: center; gap: 10px; margin-bottom: 15px; }
.watchlist-add > label { color: #a8c7da; font-size: 12px; font-weight: 600; }
.watchlist-input-row { display: flex; gap: 7px; }
.watchlist-input-row input { width: 100%; min-height: 41px; padding: 0 12px; border: 1px solid #2d5068; border-radius: 9px; outline: none; background: #06131f; color: var(--text); }
.watchlist-input-row input:focus { border-color: #3495c9; box-shadow: 0 0 0 3px #2585bd16; }
.watchlist-input-row button { min-height: 41px; padding: 0 14px; border: 1px solid #43804e; border-radius: 9px; background: #163d2a; color: #83e8af; cursor: pointer; white-space: nowrap; }
.watchlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(275px, 1fr)); gap: 9px; max-height: 520px; overflow: auto; padding-left: 3px; scrollbar-color: #315e79 #07141f; scrollbar-width: thin; }
.pick-card { min-width: 0; padding: 13px; border: 1px solid #24465c; border-radius: 13px; background: #071824; transition: border-color .15s, transform .15s; }
.pick-card:hover { transform: translateY(-1px); border-color: #397596; }
.pick-card.manual { border-color: #67582d; background: linear-gradient(145deg, #1d1c13, #081923 55%); }
.pick-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 9px; }
.pick-card-top div { min-width: 0; }
.pick-card-top strong { display: block; color: white; font-size: 16px; }
.pick-card-top span { display: block; overflow: hidden; color: #7992a7; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pick-card-top em { flex: 0 0 auto; padding: 3px 6px; border-radius: 5px; background: #11364f; color: #73caf7; font-size: 9px; font-style: normal; }
.pick-card.manual .pick-card-top em { background: #3b3115; color: #ffd875; }
.pick-meta { display: flex; align-items: center; gap: 7px; margin: 9px 0; color: #7e98aa; font-size: 10px; }
.pick-meta .freshness { padding: 2px 5px; font-size: 9px; }
.pick-reasons { display: flex; min-height: 24px; gap: 5px; flex-wrap: wrap; }
.pick-reasons span { padding: 3px 6px; border: 1px solid #24506c; border-radius: 999px; background: #0c2a3d; color: #8dd7fb; font-size: 9px; }
.priority-control { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; padding: 6px 8px; border: 1px solid #554a28; border-radius: 8px; background: #17170f; color: #d9c77f; font-size: 11px; }
.priority-control select { min-height: 30px; padding: 0 8px; border: 1px solid #6a5928; border-radius: 7px; background: #282111; color: #ffe08a; }
.pick-actions { display: flex; gap: 6px; margin-top: 11px; }
.pick-actions button, .pick-actions a { min-height: 30px; padding: 5px 9px; border: 1px solid #2b5b77; border-radius: 7px; background: #0b2a3e; color: #8ed9ff; cursor: pointer; font-size: 10px; text-decoration: none; }
.pick-actions .pick-remove { margin-right: auto; border-color: #71414a; background: #321c22; color: #f6a3ac; }
.pick-actions .pick-add { margin-right: auto; border-color: #3b744b; background: #143523; color: #82e6a9; }
.watchlist-empty { grid-column: 1 / -1; padding: 25px; border: 1px dashed #2f5066; border-radius: 11px; color: #718b9f; text-align: center; font-size: 12px; }
.watch-history { margin-top: 15px; padding-top: 14px; border-top: 1px solid #264458; }
.watch-history-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.watch-history-head h3 { margin: 0; color: #e8f6ff; font-size: 16px; }
.watch-history-head p { margin: 4px 0 0; color: #7894a8; font-size: 12px; }
.watch-history-head button, .watch-history-filters button { min-height: 36px; padding: 0 12px; border: 1px solid #315c76; border-radius: 8px; background: #0b2639; color: #91d7f8; cursor: pointer; white-space: nowrap; }
.watch-history-body { margin-top: 12px; }
.watch-history-filters { display: grid; grid-template-columns: minmax(190px, 1fr) auto auto 190px auto; gap: 8px; align-items: end; margin-bottom: 10px; }
.watch-history-filters > input, .watch-history-filters select, .watch-history-filters label input { min-height: 38px; padding: 0 10px; border: 1px solid #2b4d62; border-radius: 8px; outline: none; background: #061520; color: #d8eaf5; }
.watch-history-filters label { display: grid; gap: 3px; color: #829caf; font-size: 11px; }
.watch-history-scroll { max-height: 420px; overflow: auto; border: 1px solid #27475b; border-radius: 10px; scrollbar-color: #315e79 #07141f; }
.watch-history-table { width: 100%; min-width: 880px; border-collapse: collapse; font-size: 12px; }
.watch-history-table th { position: sticky; top: 0; z-index: 1; padding: 9px; background: #0d283a; color: #9fc6dd; text-align: right; white-space: nowrap; }
.watch-history-table td { padding: 8px 9px; border-top: 1px solid #1d384a; color: #b8cbd7; white-space: nowrap; }
.watch-history-table tr:hover td { background: #0b2231; }
.history-status { display: inline-flex; padding: 3px 7px; border-radius: 999px; background: #143d29; color: #80e5a8; }
.history-status.removed { background: #3b2028; color: #f4a2af; }
.history-open { padding: 5px 8px; border: 1px solid #315d77; border-radius: 7px; background: #0c2b3e; color: #8fd9fb; cursor: pointer; }
.watch-history-detail { margin-top: 10px; padding: 12px; border: 1px solid #31556c; border-radius: 10px; background: #071925; }
.watch-history-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.watch-history-detail-head h4 { margin: 0; font-size: 15px; }
.watch-history-detail-head button { border: 0; background: transparent; color: #9bb5c6; cursor: pointer; }
.history-timeline { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 7px; }
.history-point { padding: 9px; border: 1px solid #26485d; border-radius: 9px; background: #0a2231; }
.history-point strong, .history-point span { display: block; }
.history-point strong { color: #dff4ff; font-size: 12px; }
.history-point span { margin-top: 3px; color: #8ba5b7; font-size: 11px; }
.watch-star { width: 25px; height: 25px; margin-left: 5px; padding: 0; border: 1px solid #36536a; border-radius: 7px; background: #0b2232; color: #7892a5; cursor: pointer; vertical-align: middle; }
.watch-star:hover, .watch-star.selected { border-color: #806c2f; background: #322b16; color: #ffd66e; }

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) auto 160px 190px auto;
  gap: 9px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-bottom-color: #152c3e;
  border-radius: 15px 15px 0 0;
  background: #0a1927ee;
  box-shadow: 0 12px 32px #020a1160;
}
.search-wrap { min-height: 42px; display: flex; align-items: center; padding: 0 13px; border: 1px solid #29485f; border-radius: 10px; background: #06131f; color: var(--muted); transition: border-color .15s; }
.search-wrap:focus-within { border-color: #2d94ca; box-shadow: 0 0 0 3px #2585bd16; }
.search-wrap span { font-size: 20px; transform: rotate(-15deg); }
.search-wrap input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); padding: 0 9px; }
.search-wrap input::placeholder { color: #60798e; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip { min-height: 35px; padding: 0 11px; border: 1px solid #294458; border-radius: 999px; background: #0b2031; color: #8fa7ba; cursor: pointer; font-size: 12px; transition: .15s ease; }
.chip:hover { border-color: #397499; color: #d6ecf9; }
.chip.active { border-color: #2d8bc1; background: #154362; color: #e8f8ff; box-shadow: inset 0 0 18px #2baaff18; }
select { min-height: 42px; padding: 0 11px; border: 1px solid #29485f; border-radius: 10px; background: #091c2b; color: #dceaf4; outline: 0; cursor: pointer; }
select:hover { border-color: #376b8b; }
.reset-all { border: 1px solid #503d48; background: #241720; color: #d9aab4; font-size: 12px; }
.filter-status { color: #a8e1ff; font-size: .73rem; font-weight: 600; }

.table-card { overflow: hidden; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 17px 17px; background: #081622; box-shadow: var(--shadow); }
.table-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, #0b1b2a, #0b2030); }
.table-title h2 { margin: 0; font-size: 18px; font-weight: 700; }
.table-title p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.table-actions { display: flex; align-items: center; gap: 8px; }
.index-back { min-height: 35px; padding: 0 12px; border: 1px solid #2d789f; border-radius: 8px; background: #103b55; color: #bcecff; cursor: pointer; }
.symbol-link { padding: 0; border: 0; background: transparent; color: white; font: inherit; font-weight: 700; cursor: pointer; }
.symbol-link:hover { color: #6fd6ff; text-decoration: underline; }
.external-icon { color: #4f91b7; font-size: 10px; }
.mt5-icon, .mt5-direct { display: inline-block; margin-right: 4px; padding: 1px 5px; border: 1px solid #287ea9; border-radius: 5px; background: #10364d; color: #7ed8ff; font-size: 8px; text-decoration: none; vertical-align: middle; }
.source-link { display: inline-block; margin-top: 4px; margin-left: 7px; color: #77a9c5; font-size: 9px; text-decoration: none; }
.source-link:hover, .mt5-direct:hover { color: white; }
.toast { position: fixed; left: 24px; bottom: 24px; z-index: 50; max-width: min(420px, calc(100vw - 48px)); padding: 11px 15px; border: 1px solid #287aa1; border-radius: 10px; background: #0c3045; color: #c8efff; box-shadow: 0 14px 38px #0009; opacity: 0; pointer-events: none; transform: translateY(12px); transition: .2s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { border-color: #9c4650; background: #431f27; color: #ffc0c6; }
.option-badge { display: inline-block; margin-top: 4px; padding: 2px 6px; border: 1px solid #6b5522; border-radius: 5px; background: #302713; color: #ffd36e; font-size: 9px; }
.index-panel-cell { position: static !important; padding: 0 !important; background: #06111b !important; box-shadow: inset 0 0 0 1px #24516c !important; }
.index-panel { padding: 18px; background: linear-gradient(145deg, #0a2031, #071722); }
.index-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.index-panel-head h3 { margin: 0; color: #bdeaff; font-size: 16px; }
.index-panel-head p { margin: 3px 0 0; color: #718da2; font-size: 11px; }
.index-panel-head button { border: 1px solid #38566b; border-radius: 7px; background: #102635; color: #a8c0d0; cursor: pointer; padding: 6px 10px; }
.index-members-scroll { overflow: auto; max-height: min(50vh, 420px); border: 1px solid #244459; border-radius: 10px; }
.index-members-table { min-width: 100%; width: 100%; }
.index-members-table th { position: static; background: #0a1b29; color: #86a4b9; }
.index-members-table thead th { position: sticky; top: 0; z-index: 1; }
.index-members-table td { background: #081824; }
.index-members-table tbody tr:nth-child(even) td { background: #0a1c29; }
.index-members-table th:first-child, .index-members-table td:first-child { position: static; box-shadow: none; }
.index-panel-empty { padding: 28px; border: 1px dashed #31546a; border-radius: 10px; color: #7893a7; text-align: center; }
.clear-filters { min-height: 35px; padding: 0 11px; border: 1px solid #2a465c; border-radius: 8px; background: #0b2031; color: #9eb4c6; cursor: pointer; font-size: 11px; }
.clear-filters:hover { color: white; border-color: #347ba8; }
.column-settings { margin: 0 14px 12px; padding: 13px; border: 1px solid #31566d; border-radius: 11px; background: #081b29; }
.column-settings-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.column-settings-head strong, .column-settings-head span { display: block; }
.column-settings-head strong { color: #dff4ff; font-size: 14px; }
.column-settings-head span { margin-top: 2px; color: #7894a8; font-size: 11px; }
.column-settings-head button, .column-setting-row button { min-height: 30px; padding: 0 9px; border: 1px solid #31566d; border-radius: 7px; background: #0d2a3d; color: #9bd8f6; cursor: pointer; }
.column-settings-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 275px), 1fr)); gap: 6px; max-height: min(48vh, 420px); overflow: auto; }
.column-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; border: 1px solid #203e51; border-radius: 8px; background: #071722; }
.column-setting-row label { display: flex; align-items: center; gap: 6px; color: #afc8d8; font-size: 12px; }
.column-setting-row div { display: flex; gap: 4px; }
.column-position { width: 44px; min-height: 30px; padding: 0 2px; text-align: center; direction: ltr; border: 1px solid #31566d; border-radius: 7px; background: #071722; color: #d4efff; font: inherit; }
.column-setting-row :is(button, input):focus-visible { outline: 2px solid #62cfff; }
.column-setting-row button:disabled { opacity: .35; cursor: default; }
.column-hidden { display: none !important; }

.table-top-scroll { position: sticky; top: 0; z-index: 12; overflow-x: auto; overflow-y: hidden; height: 15px; border-bottom: 1px solid #173246; background: #06131e; scrollbar-color: #2f5b76 #081520; scrollbar-width: thin; }
.table-top-scroll > div { height: 1px; }
.table-top-scroll.hidden { display: none; }
.table-scroll { overflow: auto; max-height: calc(100vh - 185px); min-height: 320px; scrollbar-color: #2f5b76 #081520; scrollbar-width: thin; }
:is(.table-scroll, .smart-table-scroll, .watch-history-scroll, .watchlist-grid, .index-members-scroll, .smart-detail, .smart-financial-scroll, .financial-compare) {
  overscroll-behavior-x: contain;
  overflow-anchor: none;
  touch-action: pan-x pan-y pinch-zoom;
}
:is(#tableScroll, .smart-table-scroll, .watch-history-scroll, .watchlist-grid, .smart-detail, .research-scroll) {
  overscroll-behavior-y: contain;
}
@media (pointer: fine) {
  :is(.table-scroll, .smart-table-scroll, .watch-history-scroll, .watchlist-grid, .index-members-scroll, .smart-financial-scroll, .financial-compare) { cursor: grab; }
}
.panning, .panning * { cursor: grabbing !important; user-select: none; }
.scroll-controls {
  position: fixed;
  inset: auto auto max(12px, env(safe-area-inset-bottom)) 12px;
  z-index: 35;
  display: flex;
  direction: ltr;
  gap: 3px;
  padding: 4px;
  border: 1px solid #366180;
  border-radius: 10px;
  background: #081926;
  box-shadow: 0 5px 20px #0009;
}
.scroll-controls[hidden] { display: none; }
.scroll-controls input { width: clamp(94px, 15vw, 170px); margin: 0 3px; accent-color: #69cefb; cursor: ew-resize; }
.scroll-controls button {
  display: grid;
  place-items: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid #25485e;
  border-radius: 6px;
  background: #102c40;
  color: #c3ebff;
  font: 18px system-ui;
  cursor: pointer;
}
.scroll-controls button:hover:not(:disabled) { background: #1b4863; }
.scroll-controls button:disabled { opacity: .35; cursor: default; }
.scroll-controls button:focus-visible { outline: 2px solid #62cfff; }
.table-scroll button, .table-scroll a, .table-scroll input, .table-scroll select { cursor: pointer; }
.table-scroll input { cursor: text; }
.table-top-scroll::-webkit-scrollbar, .table-scroll::-webkit-scrollbar { width: 11px; height: 11px; }
.table-top-scroll::-webkit-scrollbar-thumb, .table-scroll::-webkit-scrollbar-thumb { border: 2px solid #081520; border-radius: 10px; background: #315e79; }
.table-top-scroll::-webkit-scrollbar-track, .table-scroll::-webkit-scrollbar-track { background: #07141f; }
table { width: 100%; min-width: 1480px; border-collapse: separate; border-spacing: 0; }
th { position: sticky; top: 0; z-index: 4; padding: 10px 9px; border-bottom: 1px solid #1d3649; background: #07131f; color: #8da8bc; text-align: right; font-size: 12px; font-weight: 600; }
.column-filters th { top: 43px; padding: 6px; background: #091a29; box-shadow: 0 4px 10px #02080d40; }
td { padding: 10px 9px; border-bottom: 1px solid #132a3c; background: #081622; color: #d5e5ef; font-size: 13px; line-height: 1.55; vertical-align: middle; }
tbody tr:nth-child(even) td { background: #091925; }
tbody tr:hover td { background: #0d2638; }
th:first-child, td:first-child { position: sticky; right: 0; z-index: 3; box-shadow: -8px 0 16px #02080d38; }
th:first-child { z-index: 6; }
.column-filters th:first-child { z-index: 7; }
.sort-btn { display: flex; align-items: center; gap: 6px; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: right; cursor: pointer; white-space: nowrap; }
.sort-btn:hover { color: #c1eaff; }
.sort-icon { color: #42647d; font-size: 12px; }
.sort-btn.active { color: #bfeaff; }
.sort-btn.active .sort-icon { color: var(--cyan); }
.column-filter { width: 100%; min-width: 88px; height: 35px; padding: 0 9px; border: 1px solid #213b50; border-radius: 7px; background: #06131f; color: #c9dbe7; outline: 0; font-size: 12px; }
.column-filter:focus { border-color: #2585bd; box-shadow: 0 0 0 2px #2585bd1f; }
.column-filter::placeholder { color: #526b80; }
.symbol-cell strong { display: block; color: white; font-size: 15px; font-weight: 700; }
.symbol-cell small, .market-cell small { display: block; max-width: 245px; margin-top: 2px; overflow: hidden; color: #7992a7; text-overflow: ellipsis; white-space: nowrap; }
.market-tag { display: inline-block; padding: 3px 7px; margin-left: 5px; border: 1px solid #2d506a; border-radius: 5px; color: #90ccef; font-size: 10px; }
.age, .freshness { display: inline-block; padding: 4px 8px; border-radius: 7px; font-weight: 600; white-space: nowrap; }
.age { background: #113753; color: #86d2ff; }
.age.fresh, .freshness.ok { background: #143f32; color: #74e4b5; }
.freshness.warn { background: #453716; color: #ffd06e; }
.freshness.stale { background: #482029; color: #ff8993; }
.vsa-count { display: inline-grid; place-items: center; min-width: 33px; height: 29px; border: 1px solid #236b9d; border-radius: 9px; background: #0d3656; color: #70d0ff; font-weight: 700; box-shadow: inset 0 0 18px #1ea5ff14; }
.fresh-cross { display: inline-flex; margin-right: 5px; padding: 3px 6px; border: 1px solid #28755a; border-radius: 999px; background: #123c2e; color: #7ee4af; font-size: 10px; white-space: nowrap; }
.sell-count { display: inline-grid; place-items: center; min-width: 33px; height: 29px; border: 1px solid #8c3c55; border-radius: 9px; background: #431d2d; color: #ff9bb2; font-weight: 700; }
.sell-age { color: #ff9bb2; white-space: nowrap; }
.change { display: inline-block; direction: ltr; font-weight: 700; }
.change.positive { color: #51dfa1; }
.change.negative { color: #ff7f89; }
.change.zero { color: #9eb1c2; }
.ma-state { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 7px; font-weight: 600; white-space: nowrap; }
.ma-state.above { background: #143f32; color: #74e4b5; }
.ma-state.below { background: #482029; color: #ff8993; }
.ma-state.unknown { background: #202e39; color: #91a5b5; }
.drawdown { display: inline-block; direction: ltr; padding: 4px 8px; border-radius: 7px; font-weight: 700; white-space: nowrap; }
.drawdown.mild { background: #173a33; color: #71d7ac; }
.drawdown.medium { background: #463817; color: #ffd06e; }
.drawdown.deep { background: #482029; color: #ff8993; }
.drawdown.unknown { background: #202e39; color: #91a5b5; }
.mtf-state { display: inline-block; direction: rtl; padding: 4px 8px; border-radius: 7px; font-weight: 700; white-space: nowrap; }
.mtf-state.signal { background: #123f4c; color: #72dff7; }
.mtf-state.none { background: #202e39; color: #91a5b5; }
.mtf-state.pending { background: #463817; color: #ffd06e; }
.mtf-state.error { background: #482029; color: #ff8993; }
.pattern { color: #7ccfff; white-space: nowrap; }
.num { direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 68px 20px; text-align: center; }
.empty .radar { color: #287caf; font-size: 55px; }
.empty h3 { margin: 6px; }
.empty p { color: var(--muted); }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 12px 5px; color: #637d94; font-size: 11px; }

.workspace.hidden { display: none !important; }

.smart-metrics { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 9px; margin: 11px 0; }
.smart-metrics article { padding: 16px; border: 1px solid #193a4e; border-radius: 13px; background: #081824; }
.smart-metrics span, .smart-metrics small { display: block; color: #7894a7; font-size: 10px; }
.smart-metrics strong { display: block; margin: 4px 0; color: #e8f8ff; font-size: 25px; }
.smart-toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) 220px 155px 150px auto; gap: 8px; padding: 11px; border: 1px solid #19394d; border-radius: 14px 14px 0 0; background: #081723; }
.smart-toolbar input, .smart-toolbar select, .smart-toolbar button { min-height: 40px; border: 1px solid #29495d; border-radius: 9px; background: #06131e; color: #c8dce8; outline: 0; }
.smart-toolbar select, .smart-toolbar button { padding: 0 10px; }
.smart-toolbar button { color: #7bcff3; cursor: pointer; }
.smart-metrics.compact-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 8px 0; }
.compact-metrics article { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 12px; }
.compact-metrics span { color: #a8becc; font-size: .78rem; }
.compact-metrics strong { margin: 0; font-size: 1.17rem; }
.smart-toolbar { grid-template-columns: minmax(190px,1.2fr) minmax(145px,1fr) minmax(108px,.65fr) minmax(130px,.9fr) auto auto; }
.smart-toolbar > * { min-width: 0; }
.smart-search { display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #29495d; border-radius: 9px; background: #06131e; }
.smart-search span { color: #5cbde8; font-size: 20px; }
.smart-search input { flex: 1; min-width: 0; padding: 0; border: 0; }
.score-filter { display: flex; align-items: center; gap: 6px; padding-right: 9px; color: #8da6b7; font-size: 11px; white-space: nowrap; }
.score-filter input { width: 55px; padding: 0 7px; text-align: center; }
.smart-table-card { position: relative; border: 1px solid #19394d; border-top: 0; border-radius: 0 0 15px 15px; background: #07141f; overflow: hidden; }
.smart-table-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 17px; border-bottom: 1px solid #173449; }
.smart-table-head h3 { margin: 0; color: #e6f6ff; font-size: 16px; }
.smart-table-head p { margin: 3px 0 0; color: #708da1; font-size: 10px; }
.score-legend { display: flex; gap: 12px; color: #7893a5; font-size: 10px; }
.score-legend i { display: inline-block; width: 7px; height: 7px; margin-left: 4px; border-radius: 50%; }
.score-legend .strong { background: #48dda0; }.score-legend .medium { background: #ffca67; }.score-legend .weak { background: #70889a; }
.smart-table-scroll { max-height: min(68vh, 780px); min-height: 82px; overflow: auto; scrollbar-color: #4c7b96 #081520; }
.smart-top-scroll { overflow-x: auto; overflow-y: hidden; scrollbar-color: #4c7b96 #081520; height: 20px; background: #081520; }
.smart-top-scroll > div { height: 1px; }
.smart-table { min-width: 100%; width: 100%; }
.smart-table th, .smart-table td { padding: 8px 9px; font-size: .875rem; }
.smart-table td { white-space: nowrap; }
.smart-table [data-col="symbol"] { width: 1%; }
.smart-table .smart-symbol-meta { max-inline-size: clamp(6rem, 12vw, 8rem); }
.smart-table td:is([data-col="setup"], [data-col="industry"], [data-col="companyActivity"]) {
  min-inline-size: 6.5rem;
  max-inline-size: 12rem;
  white-space: normal;
  overflow-wrap: anywhere;
}
.smart-column-groups { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; }
.smart-column-groups:empty { display: none; }
.smart-column-groups label { display: flex; align-items: center; gap: 6px; }
.smart-column-groups button, .smart-column-groups select, .smart-column-groups input { padding: 7px 10px; border: 1px solid #31566c; border-radius: 8px; background: #0b2030; color: #d8eefb; }
.smart-column-groups button { cursor: pointer; }
.smart-column-groups button[aria-pressed="true"] { background: #174764; border-color: #5bb5e1; }
.smart-column-groups input { width: 110px; }
.smart-column-groups small { color: #a5c4d6; }
.smart-method { margin: 12px 0; padding: 12px; border: 1px solid #29495d; border-radius: 10px; line-height: 1.85; }
.smart-method summary { cursor: pointer; font-weight: 700; }
.smart-strategies { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 12px; }
.smart-strategies button {
  padding: 5px 10px; min-height: 34px; color: #b4cddd; background: #0a2132; border: 1px solid #31536a;
  border-radius: 7px; cursor: pointer; font-size: .79rem;
}
.smart-strategies button b { margin-inline-start: 4px; color: #81e7da; }
.smart-strategies button[aria-pressed="true"] {
  background: #16445e; border-color: #65c3ef; color: #effaff;
}
.smart-advanced { margin: 4px 12px 8px; border: 1px solid #234154; border-radius: 7px; }
.smart-advanced summary { padding: 4px 9px; font-size: .8rem; color: #a8ccdf; cursor: pointer; }
.value-estimate { display: inline-block; margin-inline-start: 5px; color: #ffd08e; font-size: .68rem; }
.smart-table .value-estimate { display: block; margin-inline-start: 0; }
.smart-event-list { padding-inline-start: 22px; }
.smart-financial-scroll { overflow: auto; max-height: 340px; }
.smart-financial-lines { min-width: 360px; }
.smart-financial-lines th:first-child, .smart-financial-lines td:first-child { right: auto; box-shadow: none; }
.smart-table th button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  inline-size: max-content;
  max-inline-size: 7.5rem;
  min-block-size: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  white-space: normal;
  text-align: start;
  line-height: 1.4;
}
.smart-table th button > :first-child { text-wrap: balance; }
.smart-table .sort-icon { flex: none; white-space: nowrap; }
bdi[dir="ltr"], kbd[dir="ltr"] { unicode-bidi: isolate; }
.smart-table th button.active { color: #bfeaff; }
.smart-table th button.active .sort-icon { color: var(--cyan); }
.smart-table :is(th, td):first-child:not([data-col="symbol"]) { right: auto; box-shadow: none; }
.smart-table td:first-child:not([data-col="symbol"]) { position: static; }
.smart-table th:first-child:not([data-col="symbol"]) { z-index: 4; }
.opportunity-score { display: inline-grid; place-items: center; min-width: 44px; height: 36px; border-radius: 10px; direction: ltr; font-size: 15px; font-weight: 800; }
.opportunity-score.strong { background: #123f31; color: #72e4b0; }.opportunity-score.medium { background: #463817; color: #ffd06e; }.opportunity-score.weak { background: #202e39; color: #9ab0bf; }
.smart-symbol { padding: 3px 7px; border: 1px solid #2f576b; border-radius: 6px; background: #102d40; color: #bdeaff; font-size: 14px; font-weight: 700; cursor: pointer; }
.smart-symbol:hover { background: #195070; color: #f2fbff; }
.smart-symbol-meta { display: block; max-width: 190px; overflow: hidden; color: #6f899c; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.setup-badge { display: inline-block; padding: 4px 8px; border: 1px solid #2b5b72; border-radius: 999px; background: #0d2c3d; color: #8bd9f5; white-space: nowrap; }
.signed-value { font-weight: 700; white-space: nowrap; }
.table-number { display: inline-block; font-variant-numeric: tabular-nums; white-space: nowrap; }
.signed-value.positive { color: #51dfa1; }
.signed-value.negative { color: #ff7f89; }
.signed-value.zero, .flow-missing, .table-number-missing { color: #9eb1c2; }
.financial-state { display: inline-block; padding: 3px 7px; border-radius: 6px; white-space: nowrap; font-size: .76rem; }
.financial-state.partial { color: #ffd190; background: #382b1b; }
.financial-state.checked { color: #83e8b6; background: #153a2c; }
.financial-state.review { color: #ffb9bd; background: #422530; }
.financial-state.missing { color: #adc1ce; background: #172937; }
.financial-age { display: block; margin-top: 3px; color: #ffd190; font-size: .71rem; }
.finance-table-toolbar, .finance-report-meta, .finance-checks { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; }
.finance-table-toolbar { margin: 4px 12px 8px; padding: 7px 9px; border: 1px solid #234154; border-radius: 7px; }
.finance-table-toolbar.hidden { display: none; }
.finance-table-toolbar label, #smartFinanceCoverage, .finance-report-meta { color: #aecada; font-size: .78rem; }
.finance-table-toolbar select { padding: 4px 7px; color: #ecf6ff; background: #102636; border: 1px solid #36576d; border-radius: 6px; }
.finance-report-meta { padding: 5px 0 8px; }
.finance-report-meta a { color: #82d8ff; }
.finance-checks { padding-bottom: 5px; }
.finance-issue { color: #ffb9bd; }
.smart-financial-lines tbody tr:nth-child(even), .financial-compare tbody tr:nth-child(even) { background: #0a202e; }
.smart-financial-lines thead th { top: 0; z-index: 2; }
.smart-financial-lines td, .financial-compare td { font-variant-numeric: tabular-nums; }
.smart-detail { position: fixed; inset: auto 18px 18px auto; z-index: 30; width: min(620px, calc(100vw - 36px)); max-height: calc(100dvh - 36px); padding: 14px; overflow: auto; border: 1px solid #34769a; border-radius: 17px; background: #071722f5; box-shadow: 0 25px 80px #000a; backdrop-filter: blur(16px); }
.stock-detail-tabs { position: sticky; top: 0; z-index: 8; background: #0a1c29; }
.company-activity, .financial-review { margin: 8px 0; padding: 9px 11px; border: 1px solid #284659; border-radius: 9px; background: #0a2130; }
.company-activity h4, .financial-review h4, .company-activity p { margin: 0 0 3px; }
.company-activity p { font-size: .86rem; }
.company-activity :is(a,small), .financial-review small { color: #91bfd7; font-size: .74rem; }
.financial-compare { overflow: auto; margin-top: 5px; }
.financial-compare table { min-width: 290px; }
.financial-compare :is(td,th) { padding: 6px 5px; font-size: .75rem; white-space: nowrap; position: static; }
.investor-compare :is(td,th) { padding: 7px 8px; font-size: .84rem; }
.investor-compare tbody th { white-space: normal; box-shadow: none; line-height: 1.5; }
.investor-compare :is(td,th):not(:first-child) { text-align: center; }
.financial-review ul { margin: 6px 0 0; padding-inline-start: 18px; color: #c9e6ef; font-size: .8rem; }
.market-snapshot strong { min-width: 0; overflow-wrap: anywhere; }
.market-snapshot-date { margin: 6px 0 0; color: #a0beda; font-size: .76rem; }
.smart-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.smart-detail-head h3 { margin: 0; color: #f0fbff; font-size: 22px; }.smart-detail-head p { margin: 3px 0; color: #7894a7; font-size: 11px; }
.smart-detail-head button { border: 0; background: transparent; color: #8ca6b8; font-size: 20px; cursor: pointer; }
.score-components { display: grid; gap: 8px; margin: 15px 0; }.score-component { display: grid; grid-template-columns: 100px 1fr 42px; align-items: center; gap: 8px; color: #91aabd; font-size: 11px; }.score-bar { height: 7px; border-radius: 10px; background: #132b3a; overflow: hidden; }.score-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #238ac0, #57dbca); }
.smart-reasons { display: flex; flex-wrap: wrap; gap: 6px; }.smart-reasons span { padding: 5px 8px; border-radius: 7px; background: #102c3b; color: #9bd9f3; font-size: 10px; }
.fundamental-reasons span { background: #173526; color: #8de0ae; }.fundamental-risks span { background: #3e2027; color: #ff9eaa; }
.detail-section-title { margin: 15px 0 7px; color: #d9eef8; font-size: 12px; }
.smart-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 14px 0; }
.smart-detail-grid div { padding: 9px; border: 1px solid #1d3b4d; border-radius: 9px; background: #08141e; }
.smart-detail-grid small, .smart-detail-grid strong { display: block; overflow-wrap: anywhere; }
.smart-detail-grid small { color: #8da8bc; font-size: .72rem; }
.smart-detail-grid strong { margin-top: 3px; color: #dbeef8; font-size: .85rem; }
@media (max-width: 600px) {
  .smart-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.smart-detail-actions { display: flex; flex-wrap: wrap; gap: 7px; }.smart-detail-actions button,.smart-detail-actions a { flex: 1; padding: 7px; border: 1px solid #2e617b; border-radius: 9px; background: #0e3043; color: #8cdbf8; text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer; }

.terminal-nav {
  position: sticky; top: 6px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 6px 16px; margin-bottom: 12px; padding: 6px 12px;
  border: 1px solid #2c5067; border-radius: 14px; background: #0b1d2bf5;
  box-shadow: 0 8px 25px #020a1066; backdrop-filter: blur(14px);
}
.quick-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.quick-actions :is(a,button) {
  min-height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 4px 10px;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: #b6cfdf;
  text-decoration: none; white-space: nowrap; font-size: .83rem; cursor: pointer;
}
.quick-actions button { color: #a9ebff; border-color: #315c76; background: #0d2c40; }
.quick-actions :is(a,button):hover { color: white; background: #183c53; }
.quick-actions a:focus-visible { outline: 2px solid var(--cyan); }
.research-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 7px 0; }
.research-card { padding: clamp(10px, 2vw, 18px); border: 1px solid #2c4c61; border-radius: 14px; background: #0a1a27; }
.research-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 5px 0 10px; }
.research-head > div { margin-inline-end: auto; }
.research-head h2, .research-head h3, .research-strategy h3 { margin: 0; font-size: 1rem; }
.research-head p, .research-strategy p, .research-method, .research-muted, .research-pager span { margin: 4px 0; color: #a7c0d0; font-size: .82rem; }
.research-pager button, .research-head :is(select,input) {
  min-height: 35px; padding: 4px 9px; border: 1px solid #36596c; border-radius: 7px; color: #bde7fa; background: #0c2232;
}
.research-pager button { cursor: pointer; }
.research-pager button:disabled { opacity: .48; cursor: default; }
.research-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,510px),1fr)); gap: 10px; }
.research-strategy { min-width: 0; padding: 8px; border: 1px solid #26485e; border-radius: 9px; }
.research-method { margin: 12px 0; }
.research-method summary { cursor: pointer; }
.research-scroll.table-scroll { min-height: 0; max-height: 51vh; border-radius: 7px; outline-offset: 0; }
.research-scroll table { min-width: 540px; }
.research-scroll td, .research-scroll th { padding: 6px 7px; white-space: nowrap; font-size: .78rem; }
.research-scroll td, .smart-table td, .watch-history-table td { font-variant-numeric: tabular-nums; }
.research-scroll tbody th { position: static; box-shadow: none; }
:is(#scannerResults, #watchlistSection, #smartResults) { scroll-margin-top: 112px; }
.data-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-bottom: 14px; }
.data-strip div { display: grid; gap: 3px; align-content: start; padding: 10px 13px; min-width: 0; border: 1px solid #284859; border-radius: 11px; background: #0c1c29; }
.data-strip span, .data-strip small { color: #a8becc; font-size: .75rem; }
.data-strip strong { font-size: .91rem; color: #e4f4fc; }
.data-strip [data-status="ready"] strong { color: #8be0b9; }
.data-strip [data-status="attention"] :is(strong, small) { color: #ffd28b; }
.symbol-finder { display: flex; min-width: 0; border: 1px solid #365c73; border-radius: 10px; background: #081824; }
.symbol-finder input { width: clamp(10rem, 20vw, 21rem); min-width: 0; padding: 0 12px; border: 0; background: transparent; color: #edf7fc; }
.symbol-finder button, .finance-shortcuts button { min-height: 40px; padding: 0 12px; border: 1px solid #38627a; border-radius: 8px; background: #133246; color: #d6ecf8; cursor: pointer; }
.symbol-finder button { margin: 3px; }
.finance-shortcuts { display: flex; flex: 1 1 100%; flex-wrap: wrap; gap: 6px; }
.finance-shortcuts button { display: inline-flex; align-items: center; gap: 7px; text-align: start; }
.finance-shortcuts b { color: #9fdefa; }
.backtest-note { padding: .8rem 1rem; border-inline-start: 3px solid #deb06d; background: #2a231b; color: #ffe0ad; line-height: 1.8; }
#researchBacktest table { min-width: 32rem; }
#researchBacktest details { margin-top: 1rem; }
.backtest-filters { display: flex; flex-wrap: wrap; gap: .6rem; }
.backtest-totals-scroll { max-height: 28rem; overflow: auto; }
.live-controls { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.live-controls label { display: grid; gap: 4px; }
.live-controls :is(input, select) { max-width: 100%; padding: 8px; border: 1px solid #36566a; border-radius: 6px; background: #0c202e; color: #e6f4fb; }
.live-controls input[type="number"] { width: 7rem; }
.live-kpis, .live-group-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: .8rem; }
.live-kpis > div { background: #102837; padding: 12px; border-radius: 9px; }
.live-kpis dd { margin: 0; font-size: 1.15rem; }
.live-result { min-width: 0; margin-block: 12px; }
.live-result table { min-width: max(100%, 23rem); }
.finance-shortcuts button[aria-pressed="true"] { border-color: #7dd1fd; background: #20526e; }
.smart-toolbar :is(input,select,button):focus-visible, .symbol-finder :is(input,button):focus-visible { outline: 2px solid #80d3ff; outline-offset: 2px; }
@media (max-width: 820px) {
  .hero-actions { flex-wrap: wrap; }
  .symbol-finder { flex: 1 1 100%; }
  .symbol-finder input { flex: 1; width: auto; }
  .symbol-finder button { flex: 0 0 auto; }
}
.ranking-meta { display: flex; gap: 8px 14px; align-items: center; flex-wrap: wrap; }
.score-profile-label { padding: 4px 10px; border: 1px solid #41667b; border-radius: 999px; color: #b9e8fd; font-size: .75rem; }
.score-settings-dialog {
  width: min(740px, calc(100% - 22px)); max-height: 90dvh; padding: 0; overflow: hidden;
  border: 1px solid #3c7596; border-radius: 16px; color: #ebf6fc;
  background: #0b1a27; box-shadow: 0 25px 70px #000b;
}
.score-settings-dialog::backdrop { background: #030a11bd; }
.score-settings-dialog form { display: grid; grid-template-rows: auto minmax(0,1fr) auto; max-height: 89dvh; }
.score-settings-head, .score-settings-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 17px; background: #102537; }
.score-settings-head { border-bottom: 1px solid #27475b; }
.score-settings-head h2 { margin: 0; font-size: 1.2rem; }
.score-settings-head p, .score-settings-body p { margin: 4px 0; color: #a9c0d0; font-size: .82rem; }
.score-settings-body { overflow: auto; padding: 12px 16px; }
.score-settings-body fieldset { margin: 0 0 10px; padding: 10px 12px; min-width: 0; border: 1px solid #294d63; border-radius: 11px; }
.score-settings-body legend { padding: 0 7px; color: #b0e6fb; font-size: .9rem; font-weight: 700; }
.score-fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,185px),1fr)); gap: 8px; }
.score-fields label { display: grid; grid-template-columns: 1fr 58px; gap: 7px; align-items: center; min-width: 0; color: #d4e7f2; font-size: .78rem; }
.score-fields input { width: 100%; min-height: 36px; padding: 4px; text-align: center; direction: ltr; color: white; background: #08141e; border: 1px solid #3a6480; border-radius: 7px; }
#scoreMixPreview { display: block; margin: 8px 0; color: #7ce2da; font-size: .86rem; }
.score-settings-footer { justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid #27475b; }
.score-settings-footer p { margin: 0; margin-inline-end: auto; color: #ffb9be; font-size: .78rem; }
.score-settings-footer p:empty { display: none; }
.score-settings-dialog button:not(.refresh) { min-height: 38px; padding: 2px 12px; color: #cce7fa; border: 1px solid #3a6480; border-radius: 8px; background: #0b1b29; cursor: pointer; }

@media (max-width: 1280px) {
  .toolbar { grid-template-columns: minmax(250px, 1fr) auto 170px; }
  .reset-all { grid-column: auto; }
}
@media (max-width: 1140px) {
  .metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shell { width: min(100% - 12px, 2200px); padding-top: 16px; }
  .hero { align-items: flex-start; flex-direction: column; padding: 16px; gap: 12px; }
  .hero-actions { width: 100%; }
  .hero-actions button { flex: 1; }
  .toolbar { grid-template-columns: 1fr 1fr; border-radius: 14px 14px 0 0; }
  .search-wrap, .chips { grid-column: 1 / -1; }
  .reset-all { grid-column: 1 / -1; }
  .table-head { align-items: flex-start; flex-direction: column; }
  .table-actions { width: 100%; flex-wrap: wrap; }
  .watchlist-head { flex-direction: column; gap: 10px; }
  .watchlist-head-actions { width: 100%; justify-content: flex-start; }
  .smart-metrics { grid-template-columns: repeat(2, 1fr); }.smart-toolbar { grid-template-columns: 1fr 1fr; }.smart-search { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .smart-metrics.compact-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .smart-detail { inset: auto 9px 9px; width: calc(100% - 18px); max-height: 86dvh; }
  .brand-mark { display: none; }
  .hero-copy { display: block; }
  .hero h1 { font-size: 33px; }
  .hero-actions button { min-width: 0; padding: 0 9px; }
  .terminal-nav { padding: 5px 6px; }
  .data-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .smart-table-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .score-settings-footer { flex-direction: row; justify-content: space-between; }
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .metric { padding: 13px; }
  .metric strong { font-size: 25px; }
  .toolbar { grid-template-columns: 1fr; }
  .search-wrap, .chips, .reset-all { grid-column: auto; }
  footer { flex-direction: column; gap: 4px; }
  .table-scroll { max-height: 70vh; min-height: 260px; }
  .watchlist-section { padding: 14px; }
  .watchlist-add { grid-template-columns: 1fr; }
  .watchlist-input-row { flex-direction: column; }
  .watchlist-grid { grid-template-columns: 1fr; max-height: 620px; }
  .watch-history-head { align-items: flex-start; flex-direction: column; }
  .watch-history-filters { grid-template-columns: 1fr; }
  .smart-metrics, .smart-detail-grid { grid-template-columns: 1fr 1fr; }
  .smart-toolbar { grid-template-columns: 1fr; }
  .smart-search { grid-column: auto; }
}

.panel-tabs {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  min-width: 0; max-width: 100%; padding: 4px; border: 1px solid #28485e;
  border-radius: 10px; background: #081825;
}
.panel-tabs button {
  min-height: 36px; padding: 5px 11px; border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: #b9d1e0; font: inherit; font-size: .82rem;
  font-weight: 600; text-align: center; cursor: pointer;
}
.panel-tabs button:hover { background: #102b3e; color: #eff9ff; }
.panel-tabs button[aria-pressed="true"] {
  border-color: #3b7e9f; background: #16435b; color: #f1faff;
  box-shadow: inset 0 -2px #6ed4f5;
}
.panel-tabs button:focus-visible { outline: 2px solid #9be7ff; outline-offset: 1px; }
.panel-tabs button b { margin-inline-start: 3px; color: #a2e4ef; font-size: .76rem; }
.workspace-tabs { margin: 0; }
.scanner-tabs { margin: 8px 12px; }
.analysis-tab-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px;
  padding: 8px 12px 4px; min-width: 0;
}
.research-nav { width: fit-content; margin: 0 0 9px; }
.stock-detail-tabs button { flex: 1 1 auto; }
@media (max-width: 620px) {
  .workspace-tabs, .quick-actions { width: 100%; }
  .workspace-tabs button, .quick-actions :is(a,button) { flex: 1; }
  .panel-tabs button { min-height: 40px; padding-inline: 7px; font-size: .78rem; }
  .scanner-tabs, .analysis-tab-bar { margin-inline: 7px; }
  .analysis-tab-bar { padding-inline: 0; }
  .analysis-tab-bar .panel-tabs { width: 100%; }
  .stock-detail-tabs button { flex: 1 0 44%; }
}
