/* Cadangan terang juga berlaku ketika bootstrap tema gagal atau diblokir. */
:root,
:root:not([data-theme]),
:root[data-theme="light"] {
  --bg: #EEF4FF;
  --panel: #FFFFFF;
  --panel2: #E3EDFF;
  --line: #CBDBF5;
  --text: #14305E;
  --muted: #3D5C93;
  --up: #077151;
  --down: #C62A3C;
  --warn: #805807;
  --info: #2556BC;
  --hot: #A74316;
  --accent: #2556BC;
  --green: var(--up);
  --red: var(--down);
  --link: var(--accent);
  --sky: #85C3E5;
  --gold: #ffd166;
  --on-accent: #FFFFFF;
  --purple: #7445A3;
  --pink: #A52B71;
  --cyan: #096C80;
  --grid: #E3EDFF;
  --border-hover: #85C3E5;
  --divider: #CBDBF5;
  --hover-bg: #E3EDFF;
  --nav-label: #4A6BA5;
  --down-soft: #FBE7ED;
  --accent-hover: #1B47A0;
  --up-soft: #E0F2EE;
  --selected-bg: #E3EDFF;
  --track-bg: #E3EDFF;
  --border-strong: #AFC8ED;
  --subtle-bg: #EAF2FF;
  --info-soft: #E3EDFF;
  --wash-bg: #EAF2FF;
  --focus-soft: #85C3E5;
  --skeleton-bg: #CBDBF5;
  --meter-start: #2556BC;
  --meter-end: #3A6CC7;
  --row-bg: #EAF2FF;
  --screener-bg: #EEF4FF;
  color-scheme: light;
  --heading: #0F2A57;
  --muted-weak: #3D5C93;
  --shadow: rgba(37,86,188,.10);
  --gradient-end: #EAF2FF;
  --primary-start: #2556BC;
  --primary-end: #3A6CC7;
}
:root[data-theme="dark"] {
  --bg: #0B1A33;
  --panel: #122A4C;
  --panel2: #17345D;
  --line: #27466F;
  --text: #E9F1FF;
  --muted: #B4C8E8;
  --up: #3FD9A6;
  --down: #FF8095;
  --warn: #F0C05A;
  --info: #6E9BFF;
  --hot: #FFB083;
  --accent: #6E9BFF;
  --green: var(--up);
  --red: var(--down);
  --link: var(--accent);
  --sky: #A8D8F5;
  --gold: #ffd166;
  --on-accent: #0B1A33;
  --purple: #c3a2f2;
  --pink: #f79bcf;
  --cyan: #7edbea;
  --grid: #17345D;
  --border-hover: #6E9BFF;
  --divider: #27466F;
  --hover-bg: #17345D;
  --nav-label: #B4C8E8;
  --down-soft: #402D50;
  --accent-hover: #85C3E5;
  --up-soft: #123940;
  --selected-bg: #17345D;
  --track-bg: #17345D;
  --border-strong: #416794;
  --subtle-bg: #17345D;
  --info-soft: #17345D;
  --wash-bg: #17345D;
  --focus-soft: #416794;
  --skeleton-bg: #27466F;
  --meter-start: #6E9BFF;
  --meter-end: #A8D8F5;
  --row-bg: #17345D;
  --screener-bg: #122A4C;
  color-scheme: dark;
  --heading: #E9F1FF;
  --muted-weak: #8AA3CC;
  --shadow: rgba(11,26,51,.45);
  --gradient-end: #17345D;
  --primary-start: color-mix(in srgb, #2556BC 20%, #6E9BFF);
  --primary-end: color-mix(in srgb, #467DDB 20%, #6E9BFF);
}
:root {
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-base: 15px;
  --fs-lg: 17px;
  --fs-xl: 22px;
  --fs-title: 24px;
  --fs-2xl: 26px;
  --fs-3xl: 34px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: var(--fs-base)/1.5 system-ui, 'Segoe UI', Arial, sans-serif; }
.mono { font-family: var(--mono); }
button, input, select { font: inherit; color: inherit; }

.top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--panel), var(--bg)); flex-wrap: wrap; }
.brand { display: flex; gap: var(--space-3); align-items: center; }
.brand h1 { margin: 0; font-size: var(--fs-lg); letter-spacing: .2px; }
.sub { color: var(--muted); font-size: var(--fs-xs); }
.status { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.pill { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-3); border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-weight: 600; font-size: var(--fs-xs); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.open .dot { background: var(--up); box-shadow: 0 0 0 4px color-mix(in srgb, var(--up) 18%, transparent); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--up) 0%, transparent); } }
.clock { color: var(--muted); }
.quota { min-width: 150px; }
.qlabel { font-size: var(--fs-xs); color: var(--muted); margin-bottom: var(--space-1); }
.qbar { height: 5px; border-radius: 4px; background: var(--line); overflow: hidden; }
.qbar > div { height: 100%; width: 0; background: var(--up); transition: width .18s; }

.controls { padding: var(--space-3) var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); border-bottom: 1px solid var(--line); }
.actions, .filters { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.filters label { display: flex; align-items: center; gap: var(--space-1); color: var(--muted); font-size: var(--fs-xs); }
.btn { background: var(--panel2); border: 1px solid var(--line); padding: var(--space-2) var(--space-3); border-radius: 8px; cursor: pointer; font-weight: 600; }
.btn:hover { border-color: var(--border-hover); }
.btn:disabled { opacity: .5; cursor: progress; }
.btn.primary { background: var(--accent); color: var(--panel); border-color: var(--accent); }
.btn.ghost { background: transparent; }
.btn.small { padding: var(--space-1) var(--space-2); font-size: var(--fs-xs); }
.auto { display: flex; gap: var(--space-1); align-items: center; color: var(--muted); }
.inp, select { background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: var(--space-1) var(--space-2); }
.inp.n { width: 70px; }
.inp:focus, select:focus { outline: 1px solid var(--accent); }
.chk { cursor: pointer; }
.hint { color: var(--muted); font-size: var(--fs-xs); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-2); padding: var(--space-3) var(--space-4); }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: var(--space-2) var(--space-3); }
.kpi .l { color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .5px; }
.kpi .v { font-size: var(--fs-lg); font-weight: 700; margin-top: var(--space-1); font-family: var(--mono); }
.kpi .s { font-size: var(--fs-xs); color: var(--muted); }

.tablewrap { padding: 0 var(--space-4) var(--space-4); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table.big { min-width: 1150px; }
thead th { position: sticky; top: 0; background: var(--bg); color: var(--muted); font-weight: 600; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .4px; text-align: left; padding: var(--space-2) var(--space-2); border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; white-space: nowrap; }
thead th.sorted { color: var(--text); }
thead th.sorted::after { content: attr(data-dir); margin-left: var(--space-1); color: var(--accent); }
th.r, td.r { text-align: right; }
tbody tr { border-bottom: 1px solid var(--divider); cursor: pointer; }
tbody tr:hover { background: var(--hover-bg); }
tbody tr.flash { animation: flash 1.2s; }
@keyframes flash { from { background: color-mix(in srgb, var(--accent) 18%, transparent); } }
td { padding: var(--space-2); white-space: nowrap; font-family: var(--mono); font-size: var(--fs-sm); }
td.code { font-family: system-ui, 'Segoe UI', Arial, sans-serif; }
td.code b { font-size: var(--fs-sm); }
td.code small { display: block; color: var(--muted); max-width: 170px; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-xs); }
.up { color: var(--up); } .down { color: var(--down); } .flat { color: var(--muted); }
.live-badge { font-size: var(--fs-xs); font-weight: 700; color: var(--panel); background: var(--up); padding: var(--space-1) var(--space-1); border-radius: 3px; margin-left: var(--space-1); vertical-align: 2px; font-family: system-ui, 'Segoe UI', Arial, sans-serif; }
.score { display: inline-flex; align-items: center; gap: var(--space-1); }
.score .bar { width: 46px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.score .bar i { display: block; height: 100%; }
.plan { font-size: var(--fs-xs); }
.plan .sl { color: var(--down); } .plan .tp { color: var(--up); }
.tags { display: flex; gap: var(--space-1); flex-wrap: wrap; white-space: normal; max-width: 300px; }
.tag { font-family: system-ui, 'Segoe UI', Arial, sans-serif; font-size: var(--fs-xs); font-weight: 600; padding: var(--space-1) var(--space-1); border-radius: 5px; border: 1px solid; }
.tag.good { color: var(--up); border-color: color-mix(in srgb, var(--up) 35%, transparent); background: color-mix(in srgb, var(--up) 8%, transparent); }
.tag.bad { color: var(--down); border-color: color-mix(in srgb, var(--down) 35%, transparent); background: color-mix(in srgb, var(--down) 0%, transparent); }
.tag.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.tag.hot { color: var(--hot); border-color: color-mix(in srgb, var(--hot) 40%, transparent); background: color-mix(in srgb, var(--hot) 10%, transparent); }
.tag.warm { color: var(--hot); border-color: color-mix(in srgb, var(--hot) 30%, transparent); }
.tag.info { color: var(--info); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.empty { text-align: center; color: var(--muted); padding: var(--space-8); font-family: system-ui, 'Segoe UI', Arial, sans-serif; }
svg.spark { display: block; }

.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(620px, 100vw); background: var(--panel); border-left: 1px solid var(--line); transform: translateX(100%); transition: transform .18s ease; z-index: 20; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.backdrop { position: fixed; inset: 0; background: color-mix(in srgb, var(--accent) 28%, transparent); opacity: 0; pointer-events: none; transition: opacity .18s; z-index: 15; }
.backdrop.open { opacity: 1; pointer-events: auto; }
.dhead { display: flex; justify-content: space-between; align-items: flex-start; padding: var(--space-4) var(--space-4); border-bottom: 1px solid var(--line); }
.dcode { font-size: var(--fs-xl); font-weight: 700; }
.dname { color: var(--muted); }
.dbody { overflow-y: auto; padding: var(--space-4) var(--space-4) var(--space-8); display: flex; flex-direction: column; gap: var(--space-4); }
.card { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: var(--space-3) var(--space-3); }
.card h3 { margin: 0 0 var(--space-2); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .5px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2) var(--space-3); }
.grid div span { display: block; color: var(--muted); font-size: var(--fs-xs); }
.grid div b { font-family: var(--mono); font-weight: 600; }
.chart { height: 300px; position: relative; }
.planrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); text-align: center; }
.planrow div { background: var(--panel); border-radius: 8px; padding: var(--space-2) var(--space-1); border: 1px solid var(--line); }
.planrow span { display: block; font-size: var(--fs-xs); color: var(--muted); }
.planrow b { font-family: var(--mono); font-size: var(--fs-base); }
.meter { height: 10px; border-radius: 5px; background: var(--down); overflow: hidden; margin: var(--space-1) 0; }
.meter i { display: block; height: 100%; background: var(--up); }
.mini { width: 100%; border-collapse: collapse; min-width: 0; }
.mini td, .mini th { padding: var(--space-1) var(--space-1); font-size: var(--fs-xs); border-bottom: 1px solid var(--line); text-align: left; position: static; cursor: default; background: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.analysis { white-space: pre-wrap; font-family: var(--mono); font-size: var(--fs-xs); line-height: 1.55; margin: 0; color: var(--muted); max-height: 560px; overflow: auto; }
.analysis b { color: var(--text); }
.analysis code { color: var(--warn); }
.parts { display: flex; gap: var(--space-1); flex-wrap: wrap; }
.parts span { font-size: var(--fs-xs); background: var(--panel); border: 1px solid var(--line); padding: var(--space-1) var(--space-2); border-radius: 5px; font-family: var(--mono); }

.foot { color: var(--muted); font-size: var(--fs-xs); padding: var(--space-3) var(--space-4) var(--space-8); border-top: 1px solid var(--line); }
.foot code { font-family: var(--mono); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--panel); border: 1px solid var(--border-hover); padding: var(--space-2) var(--space-4); border-radius: 8px; opacity: 0; transition: .18s; z-index: 30; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { border-color: var(--down); }

@media (max-width: 720px) {
  .top, .controls, .kpis, .tablewrap { padding-left: var(--space-3); padding-right: var(--space-3); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .two { grid-template-columns: 1fr; }
}

/* ---------- navigasi & layout multi-menu */
a { color: var(--info); }
.page { padding: var(--space-4) var(--space-4) var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.phead { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-3); flex-wrap: wrap; }
.phead h2 { margin: 0 0 var(--space-1); font-size: var(--fs-xl); }
.kpis.inline { padding: 0; }
.banner { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: 10px; padding: var(--space-2) var(--space-3); }
.links { display: flex; gap: var(--space-1); flex-wrap: wrap; }
.links a { text-decoration: none; color: var(--text); }
.star { color: var(--warn); font-family: system-ui, 'Segoe UI', Arial, sans-serif; }
.icon-btn { background: none; border: 1px solid transparent; color: var(--warn); cursor: pointer; font-size: var(--fs-base); padding: var(--space-1) var(--space-1); border-radius: 6px; line-height: 1; }
.icon-btn:hover { border-color: var(--line); background: var(--panel2); }
.icon-btn.big { font-size: var(--fs-xl); vertical-align: 3px; }
.spin { display: inline-block; width: 13px; height: 13px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: var(--space-1); }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-8) var(--space-4); text-align: center; }
.tablewrap.flush { padding: 0; }
.pager { display: flex; gap: var(--space-2); align-items: center; justify-content: flex-end; margin-top: var(--space-2); font-size: var(--fs-xs); }
.pager .flat { margin-right: auto; }
.hfilters { display: flex; gap: var(--space-2); text-transform: none; letter-spacing: 0; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--space-3); }
.split .col { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.legend { display: inline-flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: var(--fs-xs); color: var(--text); }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: var(--space-1); vertical-align: middle; }

/* header menu per saham */
.vhead { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; padding: var(--space-3) var(--space-4) 0; }
.vbody { padding: var(--space-3) var(--space-4) var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.vpick { width: 280px; max-width: 100%; }
.stabs { display: flex; gap: var(--space-1); background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: var(--space-1); flex-wrap: wrap; }
.stabs a { color: var(--muted); text-decoration: none; padding: var(--space-1) var(--space-3); border-radius: 6px; font-weight: 600; font-size: var(--fs-sm); }
.stabs a.on { background: var(--panel2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.picker { position: relative; }
.picker .inp { width: 100%; padding: var(--space-2) var(--space-2); font-weight: 600; }
.picker-list { display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0; min-width: 300px; background: var(--panel2); border: 1px solid var(--border-hover); border-radius: 9px; z-index: 40; overflow: hidden; box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 28%, transparent); }
.picker-list.open { display: block; }
.pi { display: grid; grid-template-columns: 56px 1fr auto; gap: var(--space-2); padding: var(--space-2) var(--space-2); cursor: pointer; font-size: var(--fs-sm); align-items: center; }
.pi span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi em { font-style: normal; font-family: var(--mono); font-size: var(--fs-xs); }
.pi.on, .pi:hover { background: var(--hover-bg); }
.toolbar { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.toolbar label { display: flex; gap: var(--space-1); align-items: center; color: var(--muted); font-size: var(--fs-xs); }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: var(--space-1); }
.seg button { background: none; border: 0; padding: var(--space-1) var(--space-3); border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: var(--fs-sm); }
.seg button.on { background: var(--accent); color: var(--panel); }
input[type=date] { color-scheme: light; }

/* hero analisa saham */
.hero { display: grid; grid-template-columns: auto auto 1fr; gap: var(--space-6); align-items: center; background: linear-gradient(135deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 12px; padding: var(--space-4) var(--space-4); }
.hero-code { font-size: var(--fs-2xl); font-weight: 700; }
.hp { font-size: var(--fs-3xl); font-weight: 700; font-family: var(--mono); line-height: 1.1; }
.hero-stats { display: grid; grid-template-columns: repeat(4, auto); gap: var(--space-1) var(--space-6); justify-content: end; }
.hero-stats span { display: block; color: var(--muted); font-size: var(--fs-xs); }
.hero-stats b { font-family: var(--mono); }

/* market bars */
.barrow { display: grid; grid-template-columns: 52px 1fr auto; gap: var(--space-2); align-items: center; padding: var(--space-1) 0; text-decoration: none; color: var(--text); font-size: var(--fs-xs); }
.barrow:hover b { color: var(--accent); }
.bartrack { height: 7px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bartrack i { display: block; height: 100%; background: linear-gradient(90deg, var(--sky), var(--accent)); border-radius: 4px; }
.barrow em { font-style: normal; font-family: var(--mono); color: var(--muted); font-size: var(--fs-xs); }

/* swing */
.swing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: var(--space-3); }
.swing-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); }
.sc-top { display: flex; justify-content: space-between; align-items: center; }
.sc-code { font-size: var(--fs-xl); font-weight: 700; color: var(--text); text-decoration: none; }
.sc-name { font-size: var(--fs-xs); margin-top: -var(--space-1); }
.sc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-1); }
.sc-stats span { display: block; font-size: var(--fs-xs); color: var(--muted); }
.sc-stats b { font-family: var(--mono); font-size: var(--fs-base); }
.sc-sum { font-size: var(--fs-xs); color: var(--muted); }
.sc-links { display: flex; gap: var(--space-3); font-size: var(--fs-xs); border-top: 1px solid var(--line); padding-top: var(--space-2); }
.sc-links a { text-decoration: none; }

/* bandarmologi */
.gauges { display: flex; flex-direction: column; gap: var(--space-1); margin-top: var(--space-1); font-size: var(--fs-xs); }
.gauges > div { display: grid; grid-template-columns: 22px 1fr 34px; align-items: center; gap: var(--space-1); font-family: var(--mono); }
.gauge { position: relative; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--down), var(--border-hover) 50%, var(--up)); }
.gauge i { position: absolute; top: -3px; width: 3px; height: 12px; background: var(--panel); border-radius: 2px; transform: translateX(-50%); }
.bsum td, .bsum th { font-family: var(--mono); }
.sepcol { width: 10px; border-left: 1px solid var(--line); }
.kpi .v.up { color: var(--up); } .kpi .v.down { color: var(--down); }

/* fundamental */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--space-2); }
.fcard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: var(--space-2) var(--space-3); }
.fl { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fv { font-family: var(--mono); font-weight: 700; font-size: var(--fs-base); margin: var(--space-1) 0 var(--space-1); }
.fbars { display: flex; align-items: flex-end; gap: var(--space-1); height: 34px; }
.fbars i { flex: 1; background: var(--info); opacity: .75; border-radius: 2px 2px 0 0; }
.fbars i:last-child { opacity: 1; background: var(--accent); }
.fbars i.neg { background: var(--down); }
.fs { font-size: var(--fs-xs); margin-top: var(--space-1); font-family: var(--mono); }
.fin td { font-family: var(--mono); white-space: nowrap; }
.fin td:first-child { font-family: system-ui, 'Segoe UI', Arial, sans-serif; white-space: normal; min-width: 260px; }
.fin tr.grp td { font-weight: 700; }
.fin tr.d0 td { color: var(--text); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.fin thead th { position: sticky; top: 0; background: var(--panel2); }
.ins td { white-space: nowrap; }

/* musiman */
table.heat { min-width: 760px; }
.heat th, .heat td { text-align: center; padding: var(--space-2) var(--space-1); font-family: var(--mono); font-size: var(--fs-xs); border: 1px solid var(--panel); }
.heat th { color: var(--muted); font-weight: 600; font-size: var(--fs-xs); position: static; cursor: default; background: none; border-bottom: 1px solid var(--line); }
.heat .yr { color: var(--muted); font-weight: 600; text-align: left; padding-left: var(--space-2); }
.heat th.cur, .heat td.cur { box-shadow: inset 2px 0 0 var(--warn), inset -2px 0 0 var(--warn); }
.heat .sumrow td { background: var(--panel); font-weight: 700; }
.heat .avg { font-weight: 700; }
.mbars { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-1); }
.mb { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); font-size: var(--fs-xs); }
.mb-track { position: relative; width: 100%; max-width: 34px; height: 120px; border-bottom: 0; background: linear-gradient(transparent calc(50% - .5px), var(--line) calc(50% - .5px), var(--line) calc(50% + .5px), transparent calc(50% + .5px)); }
.mb-track i { position: absolute; left: 15%; right: 15%; border-radius: 3px; }
.mb-track i.pos { background: var(--up); } .mb-track i.neg { background: var(--down); }
.mb span { color: var(--muted); }
.mb.cur span { color: var(--warn); font-weight: 700; }
.mb em { font-style: normal; font-family: var(--mono); }

@media (max-width: 1100px) {
  .split, .three { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr 1fr; }
  .hero-stats { grid-column: 1 / -1; justify-content: start; grid-template-columns: repeat(2, auto); }
}
@media (max-width: 720px) {
  .page, .vbody { padding-left: var(--space-3); padding-right: var(--space-3); }
  .vhead { padding-left: var(--space-3); padding-right: var(--space-3); }
  .mbars { grid-template-columns: repeat(6, 1fr); }
  .hero { grid-template-columns: 1fr; }
}

/* ---------- shell: sidebar + konten */
.shell { display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: start; }
.nav { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); padding: var(--space-2) var(--space-2) var(--space-4); display: flex; flex-direction: column; gap: var(--space-1); background: var(--bg); z-index: 10; }
.nav .ng { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .8px; color: var(--nav-label); padding: var(--space-3) var(--space-2) var(--space-1); font-weight: 700; }
.nav a { color: var(--muted); text-decoration: none; padding: var(--space-2) var(--space-2); border-radius: 7px; font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; display: flex; gap: var(--space-2); align-items: center; }
.nav a i { font-style: normal; width: 18px; text-align: center; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.on { color: var(--text); background: var(--panel2); box-shadow: inset 2px 0 0 var(--accent); }
.nav-out { margin-top: var(--space-3); background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 7px; padding: var(--space-1); cursor: pointer; }
#view { min-width: 0; }
.drawer { z-index: 30; } .backdrop { z-index: 25; }
.warn { color: var(--warn); } .info { color: var(--info); }
.four { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.bartrack i.neg { background: linear-gradient(90deg, var(--down-soft), var(--down)); }
.rsi { display: inline-block; position: relative; width: 50px; height: 5px; border-radius: 3px; vertical-align: middle; background: linear-gradient(90deg, var(--info) 0 30%, var(--border-hover) 30% 70%, var(--warn) 70%); }
.rsi i { position: absolute; top: -3px; width: 2px; height: 11px; background: var(--panel); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: var(--space-1); }

/* heatmap */
.treemap { position: relative; width: 100%; border-radius: 10px; overflow: hidden; background: var(--panel); }
.tile { position: absolute; box-sizing: border-box; border: 1px solid var(--bg); color: var(--text); text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; text-shadow: none; transition: filter .15s; }
.tile:hover { filter: brightness(1.25); z-index: 2; outline: 2px solid var(--panel); }
.tile b { line-height: 1.1; } .tile span { font-family: var(--mono); font-size: var(--fs-xs); opacity: .95; }
.hm-legend { display: flex; justify-content: center; gap: 0; }
.hm-legend span { padding: var(--space-1) var(--space-3); font-size: var(--fs-xs); font-family: var(--mono); color: var(--text); }

/* bandingkan */
.chips { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: var(--space-1); border: 1px solid; border-radius: 999px; padding: var(--space-1) var(--space-1) var(--space-1) var(--space-2); background: var(--panel); font-size: var(--fs-sm); }
.chip i { width: 8px; height: 8px; border-radius: 50%; }
.chip button { background: none; border: 0; color: var(--muted); cursor: pointer; }
.corr td, .corr th { font-family: var(--mono); }

/* running trade */
.tape td { font-size: var(--fs-xs); padding: var(--space-1) var(--space-1); }
.tape tr.bigtr td { font-weight: 700; background: color-mix(in srgb, var(--warn) 7%, transparent); }

/* kalkulator & jurnal */
.form, .jform { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-2); margin-bottom: var(--space-3); }
.fld { display: flex; flex-direction: column; gap: var(--space-1); position: relative; }
.fld span { font-size: var(--fs-xs); color: var(--muted); }
.fld em { position: absolute; right: 9px; bottom: 7px; font-style: normal; color: var(--muted); font-size: var(--fs-xs); }
.fld .inp { width: 100%; }
.fld.wide { grid-column: span 2; }
.jbtn { display: flex; gap: var(--space-2); align-items: end; }
.out { border-top: 1px solid var(--line); padding-top: var(--space-3); }
.big-out { display: flex; flex-direction: column; margin-bottom: var(--space-2); }
.big-out span { font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.big-out b { font-size: var(--fs-2xl); font-family: var(--mono); color: var(--accent); }
.big-out em { font-style: normal; color: var(--muted); font-size: var(--fs-xs); }
.avgrow { display: flex; gap: var(--space-2); align-items: end; grid-column: 1 / -1; }
.ladder { display: flex; flex-direction: column; gap: var(--space-1); max-width: 260px; }
.ladder span { display: flex; justify-content: space-between; font-family: var(--mono); font-size: var(--fs-xs); padding: var(--space-1) var(--space-2); border-radius: 4px; background: var(--panel); }
.ladder span.cur { background: var(--panel2); outline: 1px solid var(--warn); color: var(--warn); }
.ladder em { font-style: normal; color: var(--muted); }

/* login */
.login { position: fixed; inset: 0; background: color-mix(in srgb, var(--panel2) 94%, transparent); backdrop-filter: blur(6px); z-index: 100; display: grid; place-items: center; padding: var(--space-4); }
.login-box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: var(--space-6); width: min(360px, 100%); display: flex; flex-direction: column; gap: var(--space-2); align-items: stretch; text-align: center; }
.login-box svg { align-self: center; }
.login-box h2 { margin: var(--space-1) 0 0; }
.login-box p { margin: 0 0 var(--space-1); font-size: var(--fs-sm); }
.login-box .inp { padding: var(--space-2) var(--space-3); }
.login-box .btn { padding: var(--space-2); }

@media (max-width: 1100px) { .four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: sticky; top: 0; height: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: var(--space-1) var(--space-2); scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav .ng { display: none; }
  .nav a.on { box-shadow: inset 0 -2px 0 var(--accent); }
  .nav-out { margin: 0 0 0 var(--space-2); flex: none; }
  .four { grid-template-columns: 1fr; }
  .fld.wide { grid-column: auto; }
}

/* SwingMA200 */
.distbar { display: inline-block; position: relative; width: 80px; height: 6px; border-radius: 3px; vertical-align: middle; background: linear-gradient(90deg, var(--accent), var(--border-hover)); }
.distbar i { position: absolute; top: -3px; width: 3px; height: 12px; background: var(--panel); border-radius: 2px; transform: translateX(-50%); }
.hist { display: flex; align-items: flex-end; gap: var(--space-1); height: 110px; padding-bottom: var(--space-4); }
.hb { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.hb i { display: block; background: var(--border-hover); border-radius: 3px 3px 0 0; min-height: 1px; }
.hb.in i { background: var(--accent); }
.hb span { position: absolute; bottom: -16px; left: 0; font-size: var(--fs-xs); color: var(--muted); font-family: var(--mono); white-space: nowrap; }
tbody tr.sel { background: var(--panel2); box-shadow: inset 3px 0 0 var(--accent); }

/* Squant: titik Trend Template */
.ttd { display: inline-flex; align-items: center; gap: var(--space-1); }
.ttd i { width: 7px; height: 12px; border-radius: 2px; background: var(--line); }
.ttd i.on { background: var(--up); }
.ttd b { margin-left: var(--space-1); font-family: var(--mono); font-size: var(--fs-xs); }
.sigpick { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); margin: 0 0 var(--space-2); font-size: var(--fs-xs); }
.sigpick label { display: inline-flex; align-items: center; gap: var(--space-1); }
.sigpick label i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

/* Bright cinematic Jekardah theme: local fonts, restrained depth. */
:root { color-scheme: light; }
html { scrollbar-width: thin; scrollbar-color: var(--sky) var(--bg); }
body { background: radial-gradient(ellipse at 85% 0, color-mix(in srgb, var(--accent) 16%, transparent), transparent 48%), var(--bg); }
.mono, td, .kpi .v { font-variant-numeric: tabular-nums; }
.top { padding-block: var(--space-6); background: linear-gradient(115deg, var(--panel), var(--panel2)); box-shadow: 0 4px 20px color-mix(in srgb, var(--accent) 4%, transparent); }
.brand h1 { font-size: var(--fs-xl); letter-spacing: -.5px; }
.phead h2 { font-size: var(--fs-2xl); letter-spacing: -.6px; }
.nav { background: linear-gradient(180deg, var(--panel), var(--bg)); }
.nav a.on { color: var(--accent); }
.card, .kpi, .swing-card, .fcard, .banner, .hero, .login-box { border-radius: 14px; box-shadow: 0 2px 6px color-mix(in srgb, var(--accent) 4%, transparent), 0 12px 30px color-mix(in srgb, var(--accent) 8%, transparent); }
.card { background: var(--panel); }
.hero { background: linear-gradient(120deg, var(--panel), var(--panel2)); padding: var(--space-6); }
.kpi, .swing-card, .fcard, .btn, .nav a, .inp, select, .tag { transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.kpi:hover, .swing-card:hover, .fcard:hover { border-color: var(--sky); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 8%, transparent), 0 16px 32px color-mix(in srgb, var(--accent) 8%, transparent); }
.btn { border-radius: 10px; }
.btn:hover { background: var(--hover-bg); border-color: var(--sky); }
.btn.primary, .seg button.on { color: var(--panel); }
.btn.primary:hover { background: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input[type=checkbox] { accent-color: var(--accent); }
.tag, .parts span, .live-badge { border-radius: 999px; }
.live-badge { color: var(--up); background: var(--up-soft); padding: var(--space-1) var(--space-1); }
.tablewrap { min-width: 0; max-width: 100%; }
.tablewrap.flush { border: 1px solid var(--line); border-radius: 12px; }
thead th { z-index: 1; background: var(--panel2); color: var(--muted); }
tbody tr:nth-child(even) { background: var(--bg); }
tbody tr:hover { background: var(--hover-bg); }
tbody tr.sel { background: var(--panel2); }
.picker-list { min-width: 0; box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 8%, transparent); }
.toast { box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 8%, transparent); }
.gauge i, .rsi i, .distbar i { background: var(--text); }
.hm-legend { flex-wrap: wrap; }
.tile:hover { filter: brightness(.98); outline-color: var(--accent); }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--sky); border-radius: 999px; }
@media (max-width: 720px) {
 .page, .vbody { padding: var(--space-3) var(--space-3) var(--space-6); }
 .vhead { padding: var(--space-3) var(--space-3) 0; }
 .nav { width: 100%; min-width: 0; }
 .nav a { flex: 0 0 auto; }
 .status, .brand, .toolbar, .filters, .actions, .phead > *, .card, .kpi { min-width: 0; max-width: 100%; }
 .filters label, .toolbar label { flex-wrap: wrap; }
 .toolbar .seg { flex-wrap: wrap; }
 .swing-grid, .fgrid { grid-template-columns: minmax(0, 1fr); }
 .hero { gap: var(--space-4); padding: var(--space-4); }
 .hero-stats { gap: var(--space-2) var(--space-4); }
 .pager { flex-wrap: wrap; }
 .mbars { gap: var(--space-1); }
 .mb em { font-size: var(--fs-xs); }
 .avgrow, .jbtn { flex-wrap: wrap; }
 .planrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
 *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.v-undercovid .page{min-width:0}.uc-table{min-width:980px}.uc-sort{font:inherit;color:inherit;background:transparent;border:0;cursor:pointer;padding: var(--space-1) 0;white-space:nowrap}.uc-table tr[data-code]{cursor:pointer}.v-undercovid .toolbar{flex-wrap:wrap}.v-undercovid .tablewrap{max-width:100%;overflow-x:auto}.v-undercovid .flat{overflow-wrap:anywhere}

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

@media (max-width:720px) { .toolbar input[type="date"] { max-width:100%; min-width:0; } .toolbar label { min-width:0; max-width:100%; } .vbody, .vhead, #view > div { min-width:0; } .legend { overflow-wrap:anywhere; } }
/* Shared financial UI: light surfaces, compact tools, readable data. */
:root { }
.brand h1 { line-height: 1.25; }
.shell, .top, .foot { max-width: 1440px; margin-inline: auto; }
.top { position: sticky; top: 0; z-index: 20; padding: var(--space-3) var(--space-6); background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: none; min-height: 72px; }
.nav { top: 72px; height: calc(100dvh - 72px); background: var(--panel); padding: var(--space-2); gap: var(--space-1); }
.nav a { font-size: var(--fs-md); min-height: 40px; padding: var(--space-2) var(--space-3); }
.nav a i, .nav a svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav a.on { color: var(--accent); background: var(--selected-bg); }
.page, .vbody { padding: var(--space-6); gap: var(--space-6); }
.phead, .vhead { gap: var(--space-4); }
.phead h2, .vhead h2, .dcode { font-size: var(--fs-2xl); line-height: 1.25; font-weight: 600; }
.phead .flat, .vhead .flat { font-size: var(--fs-md); }
.card h3 { font-size: var(--fs-lg); line-height: 1.25; text-transform: none; letter-spacing: 0; color: var(--text); gap: var(--space-3); flex-wrap: wrap; }
.card, .swing-card, .fcard, .banner, .hero { border-radius: 8px; box-shadow: none; padding: var(--space-4); }
.card:hover, .kpi:hover, .swing-card:hover, .fcard:hover { box-shadow: none; }
.three, .four, .two, .swing-grid, .fgrid { gap: var(--space-4); }
.controls { padding: var(--space-4) var(--space-6); gap: var(--space-3); }
.toolbar, .filters, .actions { gap: var(--space-2) var(--space-3); }
.toolbar label, .filters label, .auto { font-size: var(--fs-sm); gap: var(--space-2); }
.btn, .inp, select { min-height: 36px; padding: var(--space-2) var(--space-3); border-radius: 6px; font-size: var(--fs-sm); }
.btn.small { min-height: 32px; }
.btn, .seg button { transition: background-color 150ms ease, border-color 150ms ease; }
.seg { padding: var(--space-1); flex-wrap: wrap; }
.seg button { min-height: 32px; font-size: var(--fs-sm); padding: var(--space-1) var(--space-3); }
.seg button.on { color: var(--accent); background: var(--selected-bg); }
.kpis, .kpis.inline { gap: 0; border-block: 1px solid var(--line); background: var(--panel); padding: var(--space-4) 0; }
.v-scalper .kpis { margin: 0 var(--space-6) var(--space-4); }
.kpi { border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 0 var(--space-4); }
.kpi:last-child { border-right: 0; }
.kpi .l { font-size: var(--fs-xs); letter-spacing: .02em; line-height: 1.5; }
.kpi .v { font-size: var(--fs-xl); line-height: 1.25; margin-top: var(--space-2); }
.kpi .s { font-size: var(--fs-xs); margin-top: var(--space-1); }
.tablewrap, .tablewrap.flush { padding: 0; overflow: auto; max-height: 560px; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 6px; position: relative; isolation: isolate; }
.v-scalper .tablewrap { margin: 0 var(--space-6) var(--space-6); }
table { border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
thead th { top: 0; z-index: 3; background: var(--track-bg); color: var(--muted); border-bottom: 1px solid var(--border-strong); font-size: var(--fs-xs); letter-spacing: .02em; padding: var(--space-2) var(--space-3); height: 36px; }
thead th[data-k] { cursor: pointer; }
td, .mini td, .tape td, .plan { font-size: var(--fs-sm); padding: var(--space-2) var(--space-3); height: 36px; border-bottom: 1px solid var(--line); }
td.code { font-size: var(--fs-md); }
td.code b { font-size: var(--fs-md); }
td.code small { font-size: var(--fs-xs); line-height: 1.5; }
tbody tr { background: var(--panel); }
tbody tr:nth-child(even) { background: var(--bg); }
tbody tr:hover, tbody tr:focus-within { background: var(--selected-bg); }
.sticky-code { position: sticky; left: 0; z-index: 2; background: inherit; box-shadow: 1px 0 0 var(--line); }
thead .sticky-code { z-index: 4; background: var(--track-bg); }
td a { color: var(--accent); text-decoration: none; }
td:not(.r) { font-family: system-ui, 'Segoe UI', Arial, sans-serif; }
td.r { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.uc-sort { min-height: 32px; }
.table-tools { display: flex; justify-content: flex-end; font-size: var(--fs-xs); margin-bottom: var(--space-2); }
.table-tools summary { cursor: pointer; min-height: 32px; padding: var(--space-2); }
.table-tools .column-options { display: flex; flex-wrap: wrap; gap: var(--space-3); padding: var(--space-2); }
.skip-link { position: fixed; left: 16px; top: -100px; background: var(--panel); color: var(--accent); padding: 12px 16px; z-index: 100; border: 1px solid var(--accent); }
.skip-link:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.loading-state { min-height: 420px; padding: var(--space-4); color: var(--muted); font-size: var(--fs-md); }
.skeleton-row { height: 36px; margin-top: var(--space-2); background: linear-gradient(90deg,var(--line) 20%,var(--subtle-bg) 50%,var(--line) 80%); background-size: 200% 100%; border-radius: 4px; animation: skeleton 1.2s linear infinite; }
@keyframes skeleton { to { background-position: -200% 0; } }
.empty { white-space: normal; font-size: var(--fs-md); padding: var(--space-8); }
.foot { padding: var(--space-6); font-size: var(--fs-xs); }
@media(max-width:860px) {
 .top { position: relative; padding: var(--space-3); }
 .nav { top: 0; height: auto; min-height: 56px; }
 .nav-toggle { display: block; width: calc(100% - 24px); margin: 8px 12px; min-height: 40px; }
 .nav.is-collapsed { display: none; }
 .page, .vbody { padding: var(--space-4) var(--space-3); gap: var(--space-4); }
 .vhead, .controls { padding: var(--space-4) var(--space-3); }
 .v-scalper .kpis, .v-scalper .tablewrap { margin-inline: var(--space-3); }
 .kpis { grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: var(--space-4); }
 .kpi { padding-inline: var(--space-3); }
 .kpi .v { font-size: var(--fs-lg); overflow-wrap: anywhere; }
 .btn, .btn.small, .inp, select, .seg button, .uc-sort { min-height: 40px; }
 .filters label, .toolbar label { min-height: 40px; }
 .three, .two { grid-template-columns: minmax(0,1fr); }
 .hfilters { flex-wrap: wrap; max-width: 100%; }
 .tablewrap { max-height: 480px; }
 .hm-legend span { padding: 8px; }
 .barrow { grid-template-columns: 48px minmax(0,1fr) auto; }
}
.nav-toggle { font: inherit; color: var(--accent); border: 1px solid var(--line); background: var(--panel); border-radius: 6px; }
@media(min-width:861px) { .nav-toggle { display: none; } }
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }


/* Touch-sized mobile heatmap retains every stock and signed value. */
@media(max-width:720px) {
 .treemap { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--space-1); height:auto !important; }
 .treemap .tile { position:static; width:auto !important; height:auto !important; min-height:56px; padding:var(--space-2); }
 .treemap .tile b { font-size:var(--fs-sm) !important; }
}
.mini thead th,.heat thead th { position:sticky; top:0; z-index:3; background:var(--track-bg); }
.heat td { font-size:var(--fs-sm); }
.table-tools[open] { flex-direction: column; align-items: flex-end; }
.table-tools label { display: inline-flex; gap: var(--space-1); align-items: center; min-height: 32px; }
@media(max-width:860px) { .table-tools label, .table-tools summary { min-height:40px; } }
.plan { font-family: var(--mono); font-variant-numeric: tabular-nums; }
/* Transaksi: angka rapi, tabel terkurung pada layar kecil. */
.trx-page { min-width:0; }
.trx-kpis { grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr)); }
.trx-kpis .kpi:first-child { background:linear-gradient(130deg,var(--info-soft),var(--wash-bg)); border-color:var(--focus-soft); }
.trx-kpis .v { font-size:clamp(20px,2vw,28px); font-variant-numeric:tabular-nums; }
.trx-concentration { margin:18px 0; }
.trx-meter { height:9px; border-radius:9px; background:var(--skeleton-bg); overflow:hidden; margin:12px 0; }
.trx-meter span { display:block;height:100%;background:linear-gradient(90deg,var(--meter-start),var(--meter-end)); }
.trx-tablewrap { max-width:100%; max-height:650px; overflow:auto; }
.trx-table { min-width:1050px; font-variant-numeric:tabular-nums; }
.trx-table td:nth-child(3) { min-width:220px; white-space:normal; }
.trx-table thead th { position:sticky;top:0;z-index:1;background:var(--row-bg); }
.trx-sort { font:inherit;color:inherit;background:none;border:0;cursor:pointer;padding:8px 0;white-space:nowrap; }
.trx-table th.r .trx-sort { text-align:right; }
.trx-table tr[role=link] { cursor:pointer; }
.trx-page .toolbar { flex-wrap:wrap; }
@media(max-width:600px) { .trx-page .toolbar label { max-width:100%; } .trx-page input.inp { width:100%;min-width:0; } .trx-page .phead p { overflow-wrap:anywhere; } }
.v-trxnominal .trx-table { min-width:920px; }
#nav a[data-v="trxnominal"] { white-space:normal; height:auto; min-height:44px; line-height:1.5; }

/* Running Trade: tabel menggulir di dalam kartu, termasuk layar 390px. */
.v-tape, .v-tape .vbody, .v-tape .card { min-width: 0; }
.v-tape .tablewrap { overflow-x: auto; max-width: 100%; }
.v-tape .tape { min-width: 690px; }
.v-tape .pager { flex-wrap: wrap; }
.tape-live { padding: var(--space-3); margin-bottom: var(--space-3); }
.tape-live h3 { margin: 0 0 var(--space-2); }
.tape-live .v { overflow-wrap: anywhere; }
.tape-pending { font-size: 10px; color: var(--warn); white-space: normal; }
@media(max-width: 480px) { .v-tape .toolbar > label { max-width: 100%; } .tape-live .kpis { display: grid; grid-template-columns: 1fr 1fr; } }

/* Live tape connection marker takes the connection color. */
.tape-pending.up, .tape-connection.up { color: var(--up); }
#tape-realtime .toolbar { flex-wrap: wrap; }

/* Kedalaman dan interaksi yang mengikuti tema. */
.top { background:linear-gradient(115deg,var(--panel),var(--gradient-end)); }
.card,.kpi,.swing-card,.fcard,.hero { border-radius:14px; background:linear-gradient(145deg,var(--panel),var(--gradient-end)); box-shadow:0 2px 6px var(--shadow),0 12px 28px var(--shadow); }
.btn.primary { background:linear-gradient(115deg,var(--primary-start),var(--primary-end)); color:var(--on-accent); }
body, .top,.nav,.card,.kpi,button,input,select { transition:background-color 180ms ease,color 180ms ease,border-color 180ms ease,box-shadow 180ms ease; }
.theme-toggle { width:44px;height:44px;display:grid;place-items:center; }
.theme-toggle svg { width:22px;height:22px; }
:root[data-theme="dark"] .theme-moon,:root[data-theme="light"] .theme-sun { display:none; }
:focus-visible { outline:2px solid var(--accent);outline-offset:3px; }
td.code { font-family:var(--mono); } td.r,.kpi .v { font-variant-numeric:tabular-nums; }
#view,.page,.vbody,.tablewrap { min-width:0;max-width:100%; }
@media(max-width:860px) { .nav-toggle { min-height:44px; } .nav:not(.is-collapsed) { flex-direction:column;position:relative;max-height:65dvh;overflow:auto; } .nav a { min-height:44px;white-space:normal; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important;animation:none!important;scroll-behavior:auto!important; } }


.two { grid-template-columns:repeat(2,minmax(0,1fr)); } .two > *, .three > *, .four > * { min-width:0; }
@media(max-width:860px) { .two { grid-template-columns:minmax(0,1fr); } }

.fin td:first-child,.fin th:first-child { position:sticky;left:0;z-index:2;background:var(--panel);box-shadow:1px 0 0 var(--line); }
.fin th:first-child { z-index:4;background:var(--bg); }

/* Judul mengikuti palet biru pada kedua tema. */
h1,h2,.hero-code,.dcode { color:var(--heading); }

/* TOP BROKER: contain wide data tables without widening the page. */
.v-topbroker section,.v-topbroker .two > * {min-width:0;max-width:100%}
.v-topbroker .toolbar{margin-bottom:var(--space-3)}
.v-topbroker select,.v-topbroker input{max-width:100%;min-width:0}
.v-topbroker progress{width:100%;accent-color:var(--accent)}
.v-topbroker [hidden]{display:none}
.v-topbroker th{white-space:nowrap}
.v-topbroker .legend{overflow-wrap:anywhere}

.v-topbroker .tb-quality-badge{display:inline-block;white-space:normal;overflow-wrap:anywhere;font-size:var(--fs-xs);font-weight:700;border:1px solid currentColor;border-radius:999px;padding:4px 8px;max-width:100%}
.v-topbroker .tb-quality-badge.balanced{color:var(--up);background:var(--up-soft)}
.v-topbroker .tb-quality-badge.warning{color:var(--warn)}
.v-topbroker #tb-quality{overflow-wrap:anywhere}

/* IHSG memakai token tema aplikasi. */
:root { --ihsg-grid: #eef3f9; }
:root[data-theme="dark"] { --ihsg-grid: var(--grid); }
.ihsg-home { min-width:0; max-width:100%; }
.ihsg-home h1 small { font-size:14px; color:var(--muted); font-weight:400; }
.ihsg-home h2 { font-size:16px; margin:0 0 14px; }
.ihsg-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.ihsg-kpis .card { margin:0; display:flex; flex-direction:column; gap:8px; }
.ihsg-kpis strong { font-size:24px; font-variant-numeric:tabular-nums; }
.ihsg-kpis small { font-size:13px; }
.ihsg-chart { width:100%; min-width:0; height:320px; }
.ihsg-tables { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.ihsg-tables .card { min-width:0; margin:0; }
.ihsg-scroll { overflow-x:auto; max-width:100%; }
.ihsg-scroll table { width:100%; font-size:13px; border-collapse:separate; border-spacing:0; }
.ihsg-scroll td { font-size:13px; }
.ihsg-scroll th button { color:var(--text); font:inherit; font-weight:600; background:transparent; border:0; cursor:pointer; white-space:nowrap; }
.ihsg-scroll td:nth-child(2) { min-width:150px; max-width:190px; white-space:normal; }
.ihsg-number { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.ihsg-scroll td:first-child,.ihsg-scroll th:first-child { position:sticky; left:0; background:var(--panel); z-index:1; font-weight:600; }
@media(max-width:700px) { .ihsg-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); } .ihsg-kpis strong { font-size:20px; } .ihsg-tables { grid-template-columns:minmax(0,1fr); } }
.ihsg-top { margin-top:16px; min-width:0; }
.ihsg-top-picker summary { cursor:pointer; padding:12px; border:1px solid var(--line); border-radius:8px; }
.ihsg-top-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:12px 0; }
.ihsg-top-options button { white-space:normal; text-align:left; color:var(--text); background:var(--panel); border:1px solid var(--line); padding:10px; }
.ihsg-top-options button[aria-pressed="true"] { border-color:var(--accent); background:var(--selected-bg); }
.ihsg-top-options button:disabled { color:var(--muted); cursor:not-allowed; }
.ihsg-top-result { min-width:0; }
@media(max-width:700px) { .ihsg-top-options { grid-template-columns:minmax(0,1fr); } }

.ihsg-top-options { max-height:340px; overflow-y:auto; }

.ihsg-stock-link { color:var(--accent); text-decoration:underline; text-underline-offset:3px; }
.ihsg-stock-link:hover { text-decoration-thickness:2px; }
.ihsg-stock-link:focus-visible { outline:2px solid var(--accent); outline-offset:3px; border-radius:2px; }
