/* =====================================================================
   Saham Syariah — sistem reka bentuk (gaya AQ Saham: navy gelap, kad kaca)
   =====================================================================
   1. Token (:root) — warna & saiz. Carta (Lightweight Charts) membaca token
      ini melalui getComputedStyle, jadi nama pemboleh ubah mesti dikekalkan:
      --bg --surface --surface-2 --border --text --muted --accent --ok --bad
      --warn --manual --line-fast --line-mid --line-long (+ versi -soft).
   2. Asas, kawalan borang, butang.
   3. Shell aplikasi: bar sisi (≥1100px) / jalur tab (<1100px) + bar atas.
   4. Komponen ikut halaman.
   ===================================================================== */

:root {
  /* --- asas: navy hampir hitam; setiap lapisan sedikit lebih terang --- */
  --bg: #04070d;
  --surface: #0b1220;
  --surface-2: #101829;
  --surface-3: #18223a;
  --border: #1a2438;
  --border-strong: #27324c;
  --border-soft: #161e3099;
  --text: #eaeef7;
  --text-2: #aeb9cf;
  --muted: #7a87a3;

  /* --- semantik (warna dagangan) --- */
  --accent: #4f7dff;
  --accent-2: #7aa2ff;
  --accent-soft: #4f7dff1f;
  --grad-accent: linear-gradient(135deg, #4f7dff 0%, #7c5cff 100%);
  --ok: #0ecb81;
  --ok-soft: #0ecb8117;
  --bad: #f6465d;
  --bad-soft: #f6465d17;
  --warn: #f0b90b;
  --warn-soft: #f0b90b17;
  --manual: #a855f7;
  --manual-soft: #a855f71a;
  --cyan: #22d3ee;

  /* garis purata bergerak pada carta */
  --line-fast: #4f7dff;
  --line-mid: #f97316;
  --line-long: #a855f7;

  /* --- kedalaman --- */
  --radius: 16px;
  --radius-ctl: 10px;
  --radius-sm: 8px;
  --sorot: inset 0 1px 0 #ffffff0b;
  --shadow: var(--sorot), 0 1px 2px #00000066, 0 14px 30px -22px #000000d9;
  --shadow-2: var(--sorot), 0 12px 32px -12px #000000b3;
  --kad: linear-gradient(180deg, #0f172ae3 0%, #0a111edb 100%);
  --kad-hover: linear-gradient(180deg, #131d35eb 0%, #0d1526e3 100%);
  --carta-bg: #050a12;

  /* --- tipografi --- */
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", ui-monospace, Consolas, monospace;

  --sisi: 0px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { color-scheme: dark; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "tnum" 1, "cv05" 1, "cv11" 1;
  min-height: 100vh;
}
/* Latar: cahaya lembut di penjuru + grid halus seperti terminal dagangan */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1300px 640px at 6% -10%, #2a55d65c, transparent 62%),
    radial-gradient(1100px 580px at 96% -8%, #7c3aed47, transparent 60%),
    radial-gradient(1100px 760px at 104% 104%, #0e749047, transparent 64%),
    radial-gradient(1100px 700px at -4% 104%, #3730a347, transparent 64%),
    linear-gradient(180deg, #0a1122 0%, #070b17 42%, #050810 100%);
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(#ffffff06 1px, transparent 1px), linear-gradient(90deg, #ffffff06 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 75% 48% at 50% 0%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 48% at 50% 0%, #000 15%, transparent 72%);
}
body > * { position: relative; z-index: 1; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #a5bdff; }
::selection { background: #4f7dff4d; }
:where(a, button, summary, select, [tabindex]):focus-visible { outline: 2px solid #7aa2ffb3; outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: #27354f transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #223049; border-radius: 99px; border: 2.5px solid transparent; background-clip: padding-box; }

h1 { font-size: clamp(18px, .45vw + 13.5px, 22px); font-weight: 680; letter-spacing: -.022em; margin: 0 0 4px; }
h2 { font-size: 15px; font-weight: 650; letter-spacing: -.012em; margin: 0 0 12px; }
h3 { letter-spacing: -.012em; }
code { background: #0b1120; border: 1px solid var(--border); padding: 1.5px 6px; border-radius: 5px; font-size: 12px; font-family: var(--font-mono); }

.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.pos { color: var(--ok); }
.neg { color: var(--bad); }

/* ---------- kawalan borang ---------- */
input, select, button, textarea { font: inherit; color: var(--text); }
input[type=text], input[type=search], input[type=number], input[type=date], input[type=email], input:not([type]), select, textarea {
  background: #070c16; border: 1px solid var(--border-strong); border-radius: var(--radius-ctl);
  padding: 7px 11px; min-height: 36px; box-shadow: inset 0 1px 2px #00000059;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: #58647e; }
input:hover, select:hover, textarea:hover { border-color: #34446a; }
input:focus, select:focus, textarea:focus {
  outline: 0; border-color: var(--accent); background: #0a1120;
  box-shadow: 0 0 0 3px #4f7dff2e, inset 0 1px 2px #00000059;
}
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 15px; height: 15px; }
select { cursor: pointer; }
textarea { width: 100%; min-height: 80px; resize: vertical; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
  min-height: 36px; padding: 8px 16px; border-radius: var(--radius-ctl); cursor: pointer;
  font-weight: 620; font-size: 13.5px; color: #fff;
  background: var(--grad-accent); border: 1px solid #6f7dff;
  box-shadow: inset 0 1px 0 #ffffff38, 0 8px 22px -10px #5b6cffd9;
  transition: filter .15s, transform .1s, box-shadow .15s, background .15s, border-color .15s;
}
.btn:hover { color: #fff; filter: brightness(1.1); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: none; }
.btn-ghost {
  background: linear-gradient(180deg, #151f35 0%, #101829 100%); color: var(--text-2);
  border-color: var(--border-strong); box-shadow: var(--sorot), 0 1px 2px #00000059; font-weight: 550;
}
.btn-ghost:hover { background: linear-gradient(180deg, #1b2742 0%, #141e33 100%); border-color: #3a4b74; color: var(--text); filter: none; }
.btn-danger { background: transparent; color: var(--bad); border-color: #f6465d55; box-shadow: none; padding: 4px 10px; min-height: 0; font-size: 12px; font-weight: 600; }
.btn-danger:hover { background: var(--bad-soft); color: #ff8f9f; filter: none; }

/* =====================================================================
   Shell aplikasi — <1100px: jalur tab melekat di atas; ≥1100px: bar sisi
   ===================================================================== */
.logo {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: var(--grad-accent); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 14px; letter-spacing: -.02em;
  box-shadow: inset 0 1px 0 #ffffff47, 0 8px 22px -8px #5b6cffb3;
}
.nav2 { position: sticky; top: 0; z-index: 30; background: #060a13de; backdrop-filter: blur(14px) saturate(150%); border-bottom: 1px solid var(--border); }
.nav2-jenama, .nav2-kaki { display: none; }
.nav2-in { display: flex; align-items: center; gap: 4px; padding: 9px 18px; overflow-x: auto; scrollbar-width: none; }
.nav2-in::-webkit-scrollbar { display: none; }
.nav2-kumpulan { flex: none; width: 1px; height: 22px; margin: 0 6px; background: var(--border-strong); font-size: 0; overflow: hidden; }
.nav2-kumpulan:first-child { display: none; }
.nav2-in a {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 13px;
  color: var(--muted); font-size: 13.5px; font-weight: 500; white-space: nowrap;
  border-radius: 10px; border: 1px solid transparent; transition: color .15s, background .15s, border-color .15s;
}
.nav2 .ikon { width: 18px; height: 18px; flex: none; }
.nav2-in a:hover { color: var(--text); background: #ffffff09; }
.nav2-in a.on {
  color: #fff; font-weight: 600; border-color: #4f7dff59;
  background: linear-gradient(180deg, #4f7dff36 0%, #4f7dff14 100%);
  box-shadow: inset 0 1px 0 #ffffff17, 0 6px 18px -10px #4f7dffcc;
}
.nav2-in a.on .ikon { color: #a5bdff; }

.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 14px 20px; flex-wrap: wrap;
  padding: 18px 24px 16px; background: linear-gradient(180deg, #ffffff04, transparent);
  border-bottom: 1px solid var(--border-soft);
}
.brand { display: flex; gap: 14px; align-items: center; min-width: 0; color: var(--text); }
.brand h1 { line-height: 1.2; margin: 0; }
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.run-meta { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.run-meta b { color: var(--text-2); font-weight: 600; }
.status-titik { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px #0ecb8126, 0 0 10px #0ecb81; }
.status-titik.lapuk { background: var(--warn); box-shadow: 0 0 0 3px #f0b90b26; }

.container { max-width: 1480px; margin: 0 auto; padding: 22px 24px 40px; }
.footer { max-width: 1480px; margin: 0 auto; padding: 0 24px 32px; color: #56627d; font-size: 11.5px; line-height: 1.6; }

@media (min-width: 1100px) {
  /* :root (bukan html) — mesti mengatasi ":root { --sisi: 0px }" di atas; "html" kalah spesifisiti dan bar sisi jadi 0px */
  :root { --sisi: 232px; }
  :root.sisi-kecil { --sisi: 76px; }
  .shell { padding-left: var(--sisi); }
  .topbar .brand .logo { display: none; }
  .topbar { padding: 22px 30px 18px; }
  .container { padding: 24px 30px 44px; }
  .footer { padding: 0 30px 32px; }

  .nav2 {
    position: fixed; top: 0; left: 0; bottom: 0; width: var(--sisi);
    display: flex; flex-direction: column; backdrop-filter: none;
    background: linear-gradient(180deg, #0a1122d9 0%, #060a14e6 100%);
    border-bottom: 0; border-right: 1px solid var(--border);
    box-shadow: inset -1px 0 0 #ffffff05, 16px 0 40px -34px #000;
  }
  .nav2-jenama { display: flex; align-items: center; gap: 12px; padding: 18px 18px 16px; flex: none; color: var(--text); border-bottom: 1px solid var(--border-soft); }
  .nav2-jenama:hover { color: var(--text); }
  .nav2-nama { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
  .nav2-nama b { font-size: 15px; font-weight: 700; letter-spacing: -.015em; }
  .nav2-nama small { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
  .nav2-in { flex: 1; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px 12px; overflow-y: auto; overflow-x: hidden; }
  .nav2-kumpulan { display: block; width: auto; height: auto; margin: 16px 12px 6px; background: none; font-size: 10px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: #56627d; }
  .nav2-kumpulan:first-child { display: block; margin-top: 8px; }
  .nav2-in a { padding: 9px 12px; gap: 12px; }
  .nav2-in a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad-accent); box-shadow: 0 0 12px #5b6cff; }
  .nav2-kaki { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 14px; flex: none; border-top: 1px solid var(--border-soft); }
  .nav2-kaki button { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border-radius: 10px; background: none; border: 0; color: var(--muted); font-size: 13px; text-align: left; cursor: pointer; }
  .nav2-kaki button:hover { color: var(--text); background: #ffffff09; }

  /* Rel ikon: label menjadi tooltip terapung */
  html.sisi-kecil .nav2-jenama { justify-content: center; padding: 18px 0 16px; }
  html.sisi-kecil .nav2-nama, html.sisi-kecil .nav2-kumpulan { display: none; }
  html.sisi-kecil .nav2-in { padding: 14px 12px; gap: 4px; overflow: visible; }
  html.sisi-kecil .nav2-in a, html.sisi-kecil .nav2-kaki button { justify-content: center; padding: 11px 0; }
  html.sisi-kecil .nav2 .ikon { width: 20px; height: 20px; }
  html.sisi-kecil .nav2-lipat .ikon { transform: scaleX(-1); }
  html.sisi-kecil .nav2-in a span, html.sisi-kecil .nav2-kaki span {
    position: absolute; left: calc(100% + 16px); top: 50%; transform: translate(-4px, -50%);
    padding: 6px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 550; color: var(--text); white-space: nowrap;
    background: #111a2e; border: 1px solid var(--border-strong); box-shadow: var(--shadow-2);
    opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s;
  }
  html.sisi-kecil .nav2-in a:hover span, html.sisi-kecil .nav2-kaki button:hover span { opacity: 1; transform: translate(0, -50%); }
}

/* ---------- kad & makluman ---------- */
.card {
  background: var(--kad); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-body { padding: 18px 20px; }
.card h2 { color: var(--text); }
.alert {
  padding: 11px 14px; border-radius: var(--radius-ctl); margin-bottom: 14px; font-size: 13px;
  background: #0ecb8114; border: 1px solid #0ecb8138; border-left: 3px solid var(--ok); color: #9df0c9;
}
.alert-error { background: #f6465d14; border-color: #f6465d38; border-left-color: var(--bad); color: #ffb3bd; }
.note-warn {
  margin-top: 12px; padding: 9px 12px; border-radius: var(--radius-ctl); font-size: 13px;
  background: var(--warn-soft); border: 1px solid #f0b90b33; border-left: 3px solid var(--warn); color: #f7d774;
}
.caveat { margin-bottom: 14px; background: linear-gradient(180deg, #f0b90b12, #0a111ed9) !important; border-color: #f0b90b40 !important; font-size: 13px; color: var(--text-2); }
.page-intro { margin: -4px 0 16px; font-size: 13px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- kad ringkasan (dashboard) ---------- */
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.summary .card-body { display: flex; flex-direction: column; gap: 10px; }
.summary-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; }
.summary-hero { display: flex; align-items: baseline; gap: 10px; color: var(--text); }
.summary-hero:hover { color: var(--text); }
.summary-hero strong { font-size: clamp(24px, .9vw + 15px, 32px); line-height: 1; font-weight: 750; letter-spacing: -.02em; color: var(--ok); font-variant-numeric: tabular-nums; }
.summary-counts { display: flex; flex-wrap: wrap; gap: 8px; }
.count-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
}
.count-pill:hover { color: var(--text); border-color: var(--border-strong); }
.count-pill b { font-variant-numeric: tabular-nums; }
.card-highlight {
  border-color: #4f7dff59; background: linear-gradient(180deg, #4f7dff24 0%, #0a111ee0 70%);
  box-shadow: var(--shadow), 0 0 0 1px #4f7dff1f, 0 10px 30px -18px #4f7dff99;
}

/* ---------- penapis ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding: 14px 16px; margin-bottom: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 10.5px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.field-grow { flex: 1 1 220px; }
.field-grow input { width: 100%; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; min-height: 36px; cursor: pointer; color: var(--text-2); }

/* ---------- tab (segmen pil) ---------- */
.tabs {
  display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 4px; margin: 0 0 12px;
  background: #070c16cc; border: 1px solid var(--border); border-radius: 12px;
}
.tabs a { padding: 7px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 13px; }
.tabs a:hover { color: var(--text); background: #ffffff08; }
.tabs a.active { color: #fff; background: linear-gradient(180deg, #4f7dff3d 0%, #4f7dff1a 100%); box-shadow: inset 0 0 0 1px #4f7dff59; }
.seg { display: inline-flex; gap: 3px; padding: 4px; background: #070c16cc; border: 1px solid var(--border); border-radius: 12px; }
.seg a { padding: 6px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 13px; }
.seg a:hover { color: var(--text); background: #ffffff08; }
.seg a.active { color: #fff; background: linear-gradient(180deg, #4f7dff3d 0%, #4f7dff1a 100%); box-shadow: inset 0 0 0 1px #4f7dff59; }

/* ---------- jadual ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
th {
  font-size: 10.5px; font-weight: 650; color: var(--muted); text-align: left; text-transform: uppercase; letter-spacing: .07em;
  background: #0a1120f2; white-space: nowrap; position: sticky; top: 0; z-index: 1; border-bottom: 1px solid var(--border);
}
th.num { text-align: right; }
th a { color: inherit; }
th a:hover, th a.active { color: var(--text); }
th.group { text-align: center; border-left: 1px solid var(--border); }
td.group-start, th.group-start { border-left: 1px solid var(--border-soft); }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #4f7dff0d; }
tbody tr:last-child td { border-bottom: 0; }
.card > .table-wrap:first-child table thead th:first-child { border-top-left-radius: var(--radius); }
.card > .table-wrap:first-child table thead th:last-child { border-top-right-radius: var(--radius); }
.ticker { font-weight: 750; letter-spacing: .01em; color: var(--text); }
a.ticker:hover { color: #a5bdff; }
.company-name { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.over { color: var(--bad); font-weight: 650; }
.changed { font-size: 11px; color: var(--manual); white-space: nowrap; }
.facts td:first-child { color: var(--muted); }
.facts code { font-size: 11px; color: var(--muted); word-break: break-all; }

/* ---------- lencana ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650; white-space: nowrap; border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.badge-patuh { background: var(--ok-soft); color: var(--ok); border-color: #0ecb8133; }
.badge-tidak_patuh { background: var(--bad-soft); color: var(--bad); border-color: #f6465d33; }
.badge-semak { background: var(--warn-soft); color: var(--warn); border-color: #f0b90b33; }
.badge-none { background: var(--surface-2); color: var(--muted); border-color: var(--border); }
.badge-lg { font-size: 14px; padding: 5px 14px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: 11px; font-weight: 650; letter-spacing: .02em; }

.trend { font-size: 12px; font-weight: 650; white-space: nowrap; }
.trend-uptrend { color: var(--ok); }
.trend-downtrend { color: var(--bad); }
.trend-sideways { color: var(--warn); }
.trend-data_kurang { color: var(--muted); }
.setup { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 650; white-space: nowrap; border: 1px solid var(--border-strong); color: var(--text-2); }
.setup-pullback, .setup-momentum, .setup-sr_retest, .setup-aqv { border-color: #0ecb8166; color: var(--ok); background: var(--ok-soft); }
.setup-terlanjur { border-color: #f0b90b66; color: var(--warn); background: var(--warn-soft); }
.setup-breakout { border-color: #a855f766; color: var(--manual); background: var(--manual-soft); }
.vol-high { color: var(--manual); font-weight: 700; }
td.faded { color: var(--muted); opacity: .55; }
td.sl, .sl { color: var(--bad); }
td.tp, .tp { color: var(--ok); }

/* ---------- penomboran (bootstrap-3 & -4) ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; margin: 16px 0 0; }
.pagination > li > a, .pagination > li > span, .page-link {
  display: inline-block; min-width: 34px; padding: 6px 10px; text-align: center; font-size: 13px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-2);
}
.pagination > li > a:hover, .page-link:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.pagination > .active > span, .pagination > .active > a, .page-item.active .page-link { background: var(--grad-accent); border-color: #6f7dff; color: #fff; }
.pagination > .disabled > span, .page-item.disabled .page-link { opacity: .45; }

/* ---------- halaman butiran saham ---------- */
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.back:hover { color: var(--text); }
.detail-head {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 16px;
  padding: 18px 20px; background: var(--kad); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.detail-head h1 { font-size: 26px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-head h1 span { color: var(--muted); font-weight: 500; font-size: 16px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; align-items: center; margin-top: 4px; }
.quote { text-align: right; }
.quote .price { font-size: clamp(24px, .9vw + 15px, 32px); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.standards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.standard-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.standard-head h2 { margin: 0; }
.standard-basis { color: var(--muted); font-size: 12px; margin-bottom: 16px; }
.meter { margin-bottom: 14px; }
.meter-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; color: var(--text-2); }
.meter-track { position: relative; height: 8px; border-radius: 99px; background: #0a1120; box-shadow: inset 0 1px 2px #0008; overflow: visible; }
.meter-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #0ecb8199, var(--ok)); box-shadow: 0 0 10px #0ecb8155; }
.meter-fill.over { background: linear-gradient(90deg, #f6465d99, var(--bad)); box-shadow: 0 0 10px #f6465d55; }
.meter-limit { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); opacity: .6; border-radius: 1px; }
.meter-na { font-size: 12px; color: var(--muted); }
.reasons { list-style: none; padding: 12px 0 0; margin: 16px 0 0; border-top: 1px solid var(--border-soft); }
.reasons li { display: flex; gap: 8px; padding: 3px 0; font-size: 13px; color: var(--text-2); }
.reasons .icon { flex: 0 0 16px; font-weight: 800; text-align: center; }
.r-ok .icon { color: var(--ok); }
.r-fail .icon { color: var(--bad); }
.r-warn .icon { color: var(--warn); }
.r-manual .icon { color: var(--manual); }
.override-note { margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: var(--manual-soft); border: 1px solid #a855f733; color: #d3a8ff; font-size: 12px; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.three-col { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 14px; }
.three-col .facts th { background: transparent; position: static; padding-left: 0; }
.three-col .facts td:first-child, .three-col .facts th:first-child { padding-left: 0; }
.warnings { margin: 12px 0 0; padding-left: 18px; color: var(--warn); font-size: 13px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.form-row select { width: 100%; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
.override-list { list-style: none; padding: 0; margin: 0 0 16px; }
.override-list li { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.error { color: var(--bad); font-size: 12px; margin-top: 4px; }

/* ---------- pelan & teknikal ---------- */
.plans-card, .tech-card, .tech-grid { margin-bottom: 14px; }
.plans-table tr.selected td { background: #4f7dff14; }
.plans-table tr.selected td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.plans-table td { vertical-align: top; }
.plan-rules {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; margin-bottom: 14px;
  background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.plan-rules > div { background: #0a111e; padding: 9px 12px; display: flex; flex-direction: column; gap: 3px; }
.plan-rules > div.wide { grid-column: 1 / -1; }
.plan-rules span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 650; }
.plan-rules b { font-size: 13px; font-weight: 600; color: var(--text-2); }
.tech-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.tech-head h2 { margin-bottom: 2px; }
.tech-badges { display: flex; gap: 10px; align-items: center; }
.indicators { margin-top: 14px; }
.indicators td:nth-child(3) { color: var(--muted); padding-left: 20px; }
.backtest-mini td, .backtest-mini th { font-size: 13px; }

/* legenda & lapisan carta */
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin-bottom: 8px; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; }
.legend i.dash { height: 0; border-top: 2px dashed; background: none; }
.legend i.box { height: 10px; opacity: .45; }
.legend i.dot { width: 9px; height: 9px; border-radius: 50%; }
.legend[hidden] { display: none; }
.legend .overlay-toggles { margin-left: auto; display: inline-flex; flex-wrap: wrap; gap: 6px; }
.legend .overlay-toggles label {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text-2);
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: #070c16b3; font-size: 12px;
}
.legend .overlay-toggles label:has(input:checked) { border-color: #4f7dff66; background: #4f7dff1f; color: #fff; }
.smc-legend { padding: 8px 12px; border: 1px solid var(--border); border-radius: 12px; background: #070c16b3; }
.smc-legend + .smc-legend { margin-top: -2px; }
.smc-legend .smc-note { display: block; flex-basis: 100%; font-style: italic; }
.smc-legend .smc-note span { display: inline; white-space: nowrap; }

/* bekas carta: lebih gelap daripada kad supaya terasa "tenggelam" */
#chart-stack { background: var(--carta-bg); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.chart-main { height: 400px; }
.chart-rsi { height: 120px; }
.chart-dragon { height: 120px; }
.chart-sub-label { margin: 0; padding: 4px 12px; color: var(--muted); border-top: 1px solid var(--border-soft); font-size: 11px; }
.chart-equity { height: 320px; }
.attribution { margin-top: 8px; }

/* ---------- money management ---------- */
.mm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.mm-grid input[type=number] { width: 100%; }
.mm-out { border-top: 1px solid var(--border-soft); }
.mm-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.mm-row span { color: var(--muted); }
.mm-row b { font-variant-numeric: tabular-nums; text-align: right; }
.paper-add { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.paper-add h3 { font-size: 14px; margin: 0 0 8px; }
.paper-add select, .paper-add textarea { width: 100%; }
.paper-add textarea { min-height: 60px; }

/* ---------- backtest ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.compare tr.selected td { background: #4f7dff14; }
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; }
.kpi b { font-size: clamp(19px, .45vw + 13px, 24px); line-height: 1.15; font-weight: 720; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.kpi small { font-size: 12px; color: var(--muted); }
.dist-row { display: grid; grid-template-columns: 70px 1fr 40px; gap: 8px; align-items: center; font-size: 12px; padding: 4px 0; }
.dist-row span { color: var(--muted); }
.dist-row b { text-align: right; font-variant-numeric: tabular-nums; }
.dist-bar { height: 10px; background: #0a1120; border-radius: 99px; overflow: hidden; }
.dist-bar i { display: block; height: 100%; border-radius: 99px; }
.dist-bar i.pos { background: linear-gradient(90deg, #0ecb8188, var(--ok)); }
.dist-bar i.neg { background: linear-gradient(90deg, #f6465d88, var(--bad)); }
.setup-stat { margin-bottom: 12px; }
.setup-stat > div:first-child { margin-bottom: 4px; }

/* ---------- jurnal kertas ---------- */
.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 16px; }
.account-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; color: var(--text); transition: border-color .15s, background .15s; }
.account-card:hover { color: var(--text); border-color: #4f7dff66; background: var(--kad-hover); }
.account-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.account-equity { font-size: 22px; font-weight: 700; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.account-equity span { font-size: 14px; font-weight: 600; margin-left: 6px; }
.steps { margin: 0 0 12px; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.steps li { margin-bottom: 6px; }
.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form input { min-height: 30px; padding: 4px 8px; font-size: 12px; width: 90px; }
.inline-form input[name=note] { width: 130px; }
.inline-form .btn { min-height: 30px; padding: 4px 10px; font-size: 12px; }
.note-text { max-width: 260px; white-space: pre-line; }

/* ---------- screener ---------- */
.presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.preset {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; color: var(--text);
  background: var(--kad); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
  transition: border-color .15s, background .15s;
}
.preset:hover { color: var(--text); border-color: #4f7dff66; background: var(--kad-hover); }
.preset.active { border-color: #4f7dff99; background: linear-gradient(180deg, #4f7dff26 0%, #0a111ee0 80%); box-shadow: var(--shadow), 0 0 0 1px #4f7dff33; }
.preset-name { font-weight: 650; font-size: 13px; }
.preset b { font-size: 24px; line-height: 1.15; font-weight: 750; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.screener-form { padding: 14px 16px; margin-bottom: 12px; }
.screener-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 12px; }
.criteria { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.criteria fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px 10px; margin: 0; min-width: 0; background: #070c1680; }
.criteria legend { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 4px; }
.criterion { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; font-size: 13px; cursor: pointer; color: var(--text-2); }
.criterion input { margin-top: 3px; }
.criterion .evidence { display: block; font-size: 11px; color: var(--muted); font-style: italic; }
.screener-table td { vertical-align: top; }
.chips { max-width: 220px; }
.chip { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border-strong); margin: 0 3px 3px 0; white-space: nowrap; color: var(--text-2); }
.chip-strong { border-color: #0ecb8166; background: var(--ok-soft); color: var(--ok); font-weight: 650; }
.chip-ok { border-color: #0ecb8166; color: var(--ok); }
.chip-watch { border-color: #f0b90b66; color: var(--warn); }
.chip-info { color: var(--muted); }
.aqv-cell { white-space: nowrap; }
.aqv-cell i.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 2px; }
.grade { display: inline-block; min-width: 22px; text-align: center; padding: 0 6px; border-radius: 5px; font-size: 12px; font-weight: 700; border: 1px solid var(--border-strong); }
.grade-ap, .grade-a { border-color: #0ecb8166; color: var(--ok); }
.grade-ap { background: var(--ok-soft); }
.grade-b { border-color: #f0b90b66; color: var(--warn); }
.grade-c { color: var(--muted); }

/* ---------- mod carta AQ VAR (gaya carta AQ Saham) ---------- */
#chart-stack.aqv-mode { background: var(--carta-bg); }
#chart-stack.aqv-mode .chart-main { height: 520px; }
#chart-stack.aqv-mode .chart-rsi { height: 100px; }
.aqv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 12px; background: #0a111e; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.aqv-bar-top { border-top: 1px solid var(--border); }
.aqv-bar b { color: var(--text); font-weight: 750; }
.aqv-bar .dim { color: #6b7896; }
.aqv-bar .lbl { color: #6b7896; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.aqv-bar .mono { font-family: var(--font-mono); font-weight: 700; }
.aqv-bar .sep { width: 1px; height: 12px; background: var(--border-strong); }
.aqv-bar .sq { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.aqv-bar[hidden] { display: none; }
.aqv-mtf { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; font-size: 8px; font-weight: 700; color: #6b7896; }
.aqv-mtf i { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.aqv-btn { background: transparent; color: var(--muted); border: 0; border-radius: 6px; padding: 3px 10px; font-size: 10.5px; font-weight: 700; cursor: pointer; }
.aqv-btn:hover { color: var(--text); background: #ffffff08; }
.aqv-btn.active { background: #4f7dff2e; color: #fff; box-shadow: inset 0 0 0 1px #4f7dff59; }
#aqv-bottom { gap: 2px; border-bottom: 0; }
#aqv-bottom .sep { height: 14px; margin: 0 6px; }

/* ---------- responsif ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .summary { grid-template-columns: 1fr 1fr; }
  .three-col { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .standards, .two-col { grid-template-columns: 1fr; }
  .quote { text-align: left; }
  .chart-main, #chart-stack.aqv-mode .chart-main { height: 340px; }
  .plan-rules { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .summary, .mm-grid, .form-row { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .hide-sm { display: none; }
  .topbar, .container, .footer { padding-left: 16px; padding-right: 16px; }
  .brand p { display: none; }
  .detail-head { padding: 14px 16px; }
}

/* ---------- logo syarikat ---------- */
.co-cell { display: flex; align-items: center; gap: 10px; }
.co-logo {
  width: 28px; height: 28px; flex: none; border-radius: 8px; overflow: hidden;
  display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 800; letter-spacing: -.02em; color: #fff;
  background: color-mix(in srgb, var(--mono, #4f7dff) 30%, #0b1220); border: 1px solid color-mix(in srgb, var(--mono, #4f7dff) 45%, transparent);
}
.co-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 3px; }
.co-logo-lg { width: 44px; height: 44px; border-radius: 12px; font-size: 15px; }
.detail-head h1 .co-logo { vertical-align: middle; }
.compare td:first-child { min-width: 200px; }
.compare td:first-child a { font-weight: 650; }
@media (min-width: 900px) { .presets { grid-template-columns: repeat(4, 1fr); } }

/* ---------- keputusan (Verdict) & kualiti syarikat ---------- */
.alert-bad { background: #f6465d14; border-color: #f6465d38; border-left-color: var(--bad); color: #ffb3bd; }
.alert-warn { background: var(--warn-soft); border-color: #f0b90b33; border-left-color: var(--warn); color: #f7d774; }
.verdict {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; white-space: nowrap;
  font-size: 12px; font-weight: 700; border: 1px solid var(--border-strong); color: var(--text-2); background: var(--surface-2);
}
.verdict::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.verdict-ok { color: var(--ok); background: var(--ok-soft); border-color: #0ecb8140; }
.verdict-warn { color: var(--warn); background: var(--warn-soft); border-color: #f0b90b40; }
.verdict-accent { color: #8fb0ff; background: var(--accent-soft); border-color: #4f7dff47; }
.verdict-manual { color: #c79bff; background: var(--manual-soft); border-color: #a855f747; }
.verdict-bad { color: var(--bad); background: var(--bad-soft); border-color: #f6465d40; }
.verdict-lg { font-size: 17px; padding: 6px 16px; }
.qgrade {
  display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 5px; border-radius: 6px;
  font-size: 12px; font-weight: 800; border: 1px solid var(--border-strong); color: var(--muted); vertical-align: middle;
}
.qgrade-a { color: var(--ok); border-color: #0ecb8166; background: var(--ok-soft); }
.qgrade-b { color: #7ee2b3; border-color: #0ecb8140; }
.qgrade-c { color: var(--warn); border-color: #f0b90b55; }
.qgrade-d { color: #ff9a5c; border-color: #ff9a5c55; }
.qgrade-e { color: var(--bad); border-color: #f6465d66; background: var(--bad-soft); }
.qgrade-xl { min-width: 64px; height: 64px; font-size: 34px; border-radius: 16px; }
.quote-verdict { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; }

.decision { margin-bottom: 16px; background: linear-gradient(180deg, #4f7dff10, transparent 140px), var(--kad, var(--surface)); }
.decision h3, .fundamental h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; margin: 0 0 8px; }
.decision h3.pos, .fundamental h3.pos { color: var(--ok); }
.decision h3.neg, .fundamental h3.neg { color: var(--bad); }
.decision-head { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; align-items: start; }
.decision-verdict { display: flex; align-items: center; gap: 12px; margin: 8px 0 10px; flex-wrap: wrap; }
.decision-reasons { margin: 0 0 10px; padding-left: 18px; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.decision-scores { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: #070c16aa; }
.score-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--text-2); }
.score-top b { font-size: 20px; font-variant-numeric: tabular-nums; color: var(--text); }
.score-top small, .fund-grade b small, .fund-tool b small { font-size: 11px; color: var(--muted); font-weight: 500; }
.score-track { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 5px 0 3px; }
.score-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4f7dff, #7c5cff); }
.flags { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: #f6465d10; border: 1px solid #f6465d33; }
.flags h3 { color: var(--bad) !important; }
.flags ul { margin: 0; padding-left: 18px; color: #ffb3bd; font-size: 13.5px; line-height: 1.6; }
.decision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 18px; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; align-items: baseline; }
.checklist .ck-icon { font-weight: 800; text-align: center; }
.checklist .ck-val { color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; max-width: 240px; }
.ck-ok .ck-icon { color: var(--ok); }
.ck-fail .ck-icon { color: var(--bad); }
.ck-na .ck-icon, .ck-na .ck-label { color: var(--muted); }
.pk { list-style: none; margin: 0; padding: 0; }
.pk li { padding: 6px 0 6px 10px; border-left: 2px solid var(--border); margin-bottom: 4px; font-size: 13px; color: var(--text-2); }
.pk-pro li.w3 { border-left-color: var(--ok); color: var(--text); font-weight: 600; }
.pk-pro li.w2 { border-left-color: #0ecb8180; }
.pk-kontra li.w3 { border-left-color: var(--bad); color: var(--text); font-weight: 600; }
.pk-kontra li.w2 { border-left-color: #f6465d80; }
.pk li.pk-merah { color: #ffb3bd; }
.pk-tag { display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 8px; font-weight: 700; min-width: 64px; }
.decision-more { margin-top: 16px; border-top: 1px solid var(--border-soft); padding-top: 10px; }
.decision-more summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 600; }
.notes { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-2); line-height: 1.55; }
.disclaimer { margin: 14px 0 0; }

.fundamental { margin-bottom: 16px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.fund-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 14px; }
.fund-grade, .fund-tool { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: #070c16aa; }
.fund-tool { flex-direction: column; align-items: flex-start; gap: 4px; }
.fund-grade b, .fund-tool b { font-size: 24px; font-variant-numeric: tabular-nums; }
.fund-metrics { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; margin-top: 14px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--border); }
.fund-metrics div { background: var(--surface); padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.fund-metrics span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
.fund-metrics b { font-size: 15px; font-variant-numeric: tabular-nums; }
.years th { font-size: 11px; }
@media (max-width: 1100px) { .fund-metrics { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px) {
  .decision-head, .decision-grid, .fund-top { grid-template-columns: 1fr; }
  .fund-metrics { grid-template-columns: repeat(2, 1fr); }
}
.decision-head > *, .decision-grid > *, .fund-top > * { min-width: 0; }
.checklist .ck-label { overflow-wrap: anywhere; }

/* ---------- konteks pasaran, sektor & ringkasan harian ---------- */
.rejim-cip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--border-strong); white-space: nowrap; }
.rejim-ok { color: var(--ok); background: var(--ok-soft); border-color: #0ecb8140; }
.rejim-warn { color: var(--warn); background: var(--warn-soft); border-color: #f0b90b40; }
.rejim-bad { color: var(--bad); background: var(--bad-soft); border-color: #f6465d40; }
.big { font-size: 20px; font-weight: 720; letter-spacing: -.01em; }
.sub-head { margin: 22px 0 10px; font-size: 16px; }
.mini-bar { display: inline-block; width: 64px; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; vertical-align: middle; margin-right: 6px; }
.mini-bar i { display: block; height: 100%; border-radius: 999px; background: #4f7dff; }
.mini-bar i.pos { background: var(--ok); }
.mini-bar i.neg { background: var(--bad); }
.sektor-dua { grid-template-columns: 1.5fr 1fr; margin-bottom: 14px; }
.sektor-dua > * { min-width: 0; }
.putaran { width: 100%; height: auto; display: block; }
.putaran .grid-line { stroke: #ffffff0d; }
.putaran .mid-line { stroke: #ffffff33; stroke-dasharray: 4 4; }
.putaran .ax { fill: var(--muted); font-size: 10.5px; }
.putaran .quad { fill: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; opacity: .75; }
.putaran .quad.pos { fill: var(--ok); }
.putaran .quad.neg { fill: var(--bad); }
.putaran .lbl { fill: var(--text-2); font-size: 11px; font-weight: 600; }
.aliran { display: flex; flex-direction: column; gap: 7px; }
.aliran-baris { display: grid; grid-template-columns: 130px 1fr 48px; gap: 8px; align-items: center; font-size: 12.5px; }
.aliran-nama { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.aliran-bar { position: relative; height: 10px; background: var(--surface-2); border-radius: 4px; }
.aliran-bar::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: #ffffff40; }
.aliran-bar i { position: absolute; top: 0; height: 100%; border-radius: 4px; }
.aliran-bar i.naik { background: linear-gradient(90deg, #0ecb8155, var(--ok)); }
.aliran-bar i.turun { background: linear-gradient(270deg, #f6465d55, var(--bad)); }
.aliran-nilai { text-align: right; font-variant-numeric: tabular-nums; }
.peta { position: relative; width: 100%; border-radius: 12px; overflow: hidden; background: #070c16; }
.peta-sektor { position: absolute; box-sizing: border-box; border: 1px solid #04070d; overflow: hidden; }
.peta-tajuk { position: absolute; left: 0; right: 0; top: 0; height: 16px; padding: 1px 6px; font-size: 10.5px; font-weight: 700; color: var(--text-2); background: #0a1120; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peta-jubin { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; text-decoration: none; overflow: hidden; line-height: 1.15; }
.peta-jubin:hover { outline: 2px solid #ffffffaa; z-index: 2; }
.peta-jubin b { font-size: 11.5px; }
.peta-jubin small { font-size: 10px; opacity: .85; }
.sektor-saham { margin-bottom: 8px; }
.sektor-saham > summary { cursor: pointer; padding: 12px 18px; list-style: none; }
.sektor-saham > summary::-webkit-details-marker { display: none; }
.sektor-saham > summary::before { content: "▸ "; color: var(--muted); }
.sektor-saham[open] > summary::before { content: "▾ "; }
.spark { width: 96px; height: 28px; display: block; }
@media (max-width: 900px) { .sektor-dua { grid-template-columns: 1fr; } .aliran-baris { grid-template-columns: 100px 1fr 44px; } }
.harian-atas { display: grid; grid-template-columns: 1.1fr 1.2fr 1fr; gap: 14px; margin-bottom: 14px; }
.harian-atas > * { min-width: 0; }
.harian-atas .card-body { display: flex; flex-direction: column; gap: 10px; }
.rejim-baris { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pulangan { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); }
.angka-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.angka-grid div { display: flex; flex-direction: column; gap: 2px; }
.angka-grid b { font-size: 24px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.angka-grid span { font-size: 11px; color: var(--muted); }
.luas-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.luas-bar i.naik { background: var(--ok); }
.luas-bar i.turun { background: var(--bad); }
.sektor-ringkas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 13px; }
.sektor-ringkas b, .sektor-ringkas span.pos, .sektor-ringkas span.neg { font-variant-numeric: tabular-nums; font-weight: 700; margin-right: 4px; }
.tindakan { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tindakan span { padding: 6px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; border: 1px solid var(--border); }
.tindakan-ok { color: var(--ok); background: var(--ok-soft); border-color: #0ecb8140 !important; }
.tindakan-awas { color: var(--warn); background: var(--warn-soft); border-color: #f0b90b40 !important; }
.tindakan-halang { color: var(--bad); background: var(--bad-soft); border-color: #f6465d40 !important; }
.harian-jadual { margin-bottom: 14px; }
.harian-jadual h2 { margin: 0; }
.warn-text { color: var(--warn); }
.rs-card .rs-parts { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.rakan { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rakan a { display: inline-flex; gap: 6px; align-items: center; padding: 3px 9px; border-radius: 8px; border: 1px solid var(--border); font-size: 12px; color: var(--text-2); }
.rakan a.kitaran { border-color: #0ecb8155; }
.rakan a b { color: var(--text); }
@media (max-width: 1100px) { .harian-atas { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .harian-atas, .sektor-ringkas { grid-template-columns: 1fr; } .angka-grid { grid-template-columns: 1fr 1fr; } }
.konteks-saham { margin-bottom: 16px; } .konteks-saham > * { min-width: 0; }
.two-col > *, .standards > * { min-width: 0; }
table.indicators { display: block; max-width: 100%; overflow-x: auto; }

/* ---------- halaman Pasaran ---------- */
.pasaran-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.pasaran-status { margin-left: auto; font-size: 13px; }
.sesi { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--border-strong); }
.sesi-buka { color: var(--ok); border-color: #0ecb8155; background: var(--ok-soft); }
.sesi-pra, .sesi-lepas { color: var(--warn); border-color: #f0b90b55; }
.sesi-tutup { color: var(--muted); }
.kad-indeks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 14px; }
.kad-indeks .card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; }
.kad-atas { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-2); }
.kad-indeks b { font-size: 19px; font-variant-numeric: tabular-nums; }
.ps-spark { width: 100%; height: 34px; display: block; }
.luas-3 { height: 12px; margin: 4px 0 10px; }
.luas-3 i.sama { background: #3a4660; }
.luas-angka { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; }
.luas-angka b { font-size: 16px; font-variant-numeric: tabular-nums; }
.pasaran-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0; }
.pasaran-grid > * { min-width: 0; }
.seg-kecil a { padding: 4px 10px; font-size: 12px; }
.ps-jadual td, .ps-jadual th { padding: 7px 8px; }
.sy { color: var(--ok); font-size: 9px; vertical-align: middle; }
.btn-kecil { margin-top: 8px; padding: 5px 12px; font-size: 12px; }
#ps-global .card { margin-bottom: 14px; }
@media (max-width: 1100px) { .kad-indeks { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .pasaran-grid { grid-template-columns: 1fr; } .pasaran-status { margin-left: 0; } }
@media (max-width: 600px) { .kad-indeks { grid-template-columns: 1fr 1fr; } }

/* ---------- keyakinan & penganalisis ---------- */
.wawasan { margin-bottom: 16px; }
.wawasan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 12px; }
.wawasan-grid > * { min-width: 0; }
.wawasan-kad { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: #070c16aa; }
.wawasan-kad > b { font-size: 18px; }
.wawasan-kad p { margin: 0; }
.wawasan-baris { margin: 0; padding-left: 16px; font-size: 13px; color: var(--text-2); line-height: 1.55; }
.div-bar { display: flex; align-items: flex-end; gap: 6px; height: 64px; margin-top: 4px; }
.div-bar > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; flex: 1; height: 100%; }
.div-bar i { display: block; width: 100%; max-width: 26px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #0ecb81, #0ecb8166); }
.div-bar span { font-size: 10px; color: var(--muted); }
.div-bar .separa i { opacity: .4; }
.ky-amaran { margin-top: 6px; padding: 9px 12px; border-radius: 10px; background: #f0b90b12; border: 1px solid #f0b90b33; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.konsensus-meter { position: relative; height: 8px; border-radius: 999px; background: linear-gradient(90deg, #0ecb81, #7ad69c 30%, #f0b90b 55%, #f97316 78%, #f6465d); margin-top: 6px; }
.konsensus-meter i { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: #fff; box-shadow: 0 0 6px #000; }
.konsensus-skala { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
.banding-sehala { padding: 6px 9px; border-radius: 8px; background: var(--ok-soft); }
.banding-canggah { padding: 6px 9px; border-radius: 8px; background: #f9731618; color: #fdba74; }
.banding-neutral { color: var(--muted); }
.sasaran-bar { position: relative; height: 10px; border-radius: 999px; background: var(--surface-2); margin: 10px 0 4px; }
.sasaran-bar .julat { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: #4f7dff55; }
.sasaran-bar i { position: absolute; top: -4px; width: 4px; height: 18px; margin-left: -2px; border-radius: 2px; }
.sasaran-bar i.purata { background: #8fb0ff; }
.sasaran-bar i.semasa { background: #fff; box-shadow: 0 0 6px #000; }
.sasaran-label { display: flex; justify-content: space-between; gap: 6px; color: var(--muted); }
.trend-cadangan { margin: 6px 0 14px; }
.trend-bar { display: flex; gap: 10px; align-items: flex-end; margin-top: 6px; }
.trend-lajur { flex: 1; max-width: 120px; display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.trend-lajur > span { text-align: center; font-size: 11px; color: var(--muted); }
.trend-tindan { display: flex; flex-direction: column; height: 110px; border-radius: 6px; overflow: hidden; }
.trend-tindan i { display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; color: #04070d; }
.tc-beli_kuat { background: #0ecb81; } .tc-beli { background: #7ad69c; } .tc-pegang { background: #f0b90b; } .tc-jual { background: #f97316; } .tc-jual_kuat { background: #f6465d; }
.rekod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 12px; }
.rekod-grid > div { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); }
.rekod-grid b { font-size: 22px; font-variant-numeric: tabular-nums; }
.gred-cip { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 650; border: 1px solid var(--border-strong); color: var(--muted); }
.gred-cip.g1 { color: var(--ok); border-color: #0ecb8155; } .gred-cip.g0 { color: var(--warn); border-color: #f0b90b55; } .gred-cip.g-1 { color: var(--bad); border-color: #f6465d55; }
@media (max-width: 900px) { .wawasan-grid, .rekod-grid { grid-template-columns: 1fr; } }
.rekod-grid span b { font-size: inherit; }
.tf-tabs { display: flex; width: fit-content; margin: 14px 20px 0; }
.tf-tabs a { display: inline-flex; align-items: center; gap: 8px; }
.tf-tabs .verdict { font-size: 10.5px; padding: 1px 8px; }
.tf-pilih { margin-left: auto; align-self: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 600; }
.verdict-muted { color: #a9b6cf; background: #8fa2c414; border-color: #8fa2c440; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.heat-track { position: relative; height: 8px; border-radius: 999px; background: var(--surface-2); margin: 6px 0 4px; }
.heat-track .score-fill { height: 100%; }
.heat-track .heat-pos { background: var(--ok); } .heat-track .heat-warn-text { background: var(--warn); } .heat-track .heat-neg { background: var(--bad); }
.heat-had { position: absolute; top: -4px; width: 2px; height: 16px; background: #fff; opacity: .7; }
.kalendar { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 3px; }
.kalendar th { font-size: 10.5px; color: var(--muted); font-weight: 650; text-align: center; padding: 2px; }
.kalendar td { height: 58px; vertical-align: top; padding: 4px 5px; border-radius: 8px; background: #070c16aa; font-size: 11px; }
.kalendar td.kosong { background: transparent; }
.kalendar td .hari { display: block; color: var(--muted); font-size: 10.5px; }
.kalendar td b { display: block; font-variant-numeric: tabular-nums; font-size: 11.5px; }
.kalendar td small { color: var(--text-2); font-size: 10px; }
.kalendar td.jumlah { vertical-align: middle; text-align: right; font-weight: 700; background: transparent; }
.seg a.pudar { opacity: .35; pointer-events: none; }
@media (max-width: 600px) { .kalendar td { height: 46px; padding: 3px; } .kalendar td small { display: none; } }

/* ---------- watchlist ---------- */
.bintang { background: none; border: 0; padding: 0 2px; font-size: 15px; line-height: 1; color: #3a4660; cursor: pointer; transition: color .15s, transform .15s; }
.bintang:hover { color: #f0b90b99; transform: scale(1.15); }
.bintang.on { color: #f0b90b; text-shadow: 0 0 8px #f0b90b66; }
.detail-head h1 .bintang { font-size: 24px; }
.wl-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.wl-tabs a { padding: 6px 12px; border-radius: 10px; border: 1px solid var(--border); color: var(--text-2); font-size: 13px; font-weight: 600; }
.wl-tabs a.active { color: #fff; border-color: #4f7dff80; background: var(--accent-soft); }
.wl-tabs a span { color: var(--muted); font-weight: 500; margin-left: 4px; }
.wl-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 14px; }
.wl-bar form { display: flex; gap: 6px; align-items: end; flex-wrap: wrap; }
.wl-grid { display: grid; gap: 10px; }
.wl-grid.g4 { grid-template-columns: repeat(2, 1fr); } .wl-grid.g9 { grid-template-columns: repeat(3, 1fr); } .wl-grid.g16 { grid-template-columns: repeat(4, 1fr); }
.wl-kad { border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; background: #070c16aa; min-width: 0; }
.wl-kad-atas { display: flex; justify-content: space-between; gap: 6px; align-items: center; font-size: 13px; }
.wl-carta { height: 180px; margin-top: 6px; }
.g16 .wl-carta { height: 140px; }
.wl-senarai-cip { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.wl-senarai-cip button { font-size: 10.5px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border-strong); background: none; color: var(--muted); cursor: pointer; }
.wl-senarai-cip button.on { color: #8fb0ff; border-color: #4f7dff66; background: var(--accent-soft); }
@media (max-width: 900px) { .wl-grid.g9, .wl-grid.g16 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .wl-grid.g4, .wl-grid.g9, .wl-grid.g16 { grid-template-columns: 1fr; } }

/* ---------- tag Syariah (header saham) & Multi-carta Pasaran ---------- */
.tag-sy { background: var(--ok-soft); color: var(--ok); border-color: #0ecb8140; }
/* ---------- Semak pantas (/semak) & kotak carian bar atas ---------- */
.semak-cari input { width: 132px; padding: 5px 10px; font-size: 12.5px; border-radius: 999px; }
.semak-cari input:focus { width: 170px; }
.semak-borang .card-body { display: flex; flex-direction: column; gap: 8px; }
.semak-borang label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.semak-baris { display: flex; gap: 8px; }
.semak-baris input { flex: 1; max-width: 320px; text-transform: uppercase; font-size: 15px; }
.semak-borang p { margin: 0; }
.semak-harga { text-align: right; }
.semak-harga b { font-size: 24px; margin-right: 8px; }
.semak-nota { margin: -6px 0 10px; }
.semak-ringkasan { font-size: 13px; line-height: 1.6; max-width: 980px; margin: 0 0 16px; }
.semak-carta { height: 360px; }
.semak-kunci { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 4px; }
.semak-kunci.stop { background: #f0b90b; }
.tag-luar { background: #f0b90b14; border-color: #f0b90b45; color: #f5cf5c; }
@media (max-width: 640px) {
  .semak-harga { text-align: left; }
  .semak-carta { height: 280px; }
  .semak-cari { display: none; }       /* telefon: guna halaman /semak */
}

/* ---------- Kemaskini sekarang (Ringkasan harian) ---------- */
.km-panel { display: flex; align-items: center; gap: 14px; margin: -6px 0 16px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.km-panel.jalan { border-color: #4f7dff55; background: var(--accent-soft); }
.km-btn { flex: none; white-space: nowrap; }
.km-isi { flex: 1; min-width: 0; font-size: 13px; }
.km-baris { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; }
.km-bar { height: 4px; margin-top: 8px; border-radius: 999px; background: #ffffff12; overflow: hidden; }
.km-bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .6s ease; }
@media (max-width: 640px) { .km-panel { flex-direction: column; align-items: stretch; } }

/* ---------- Log masuk (AuthController) ---------- */
.masuk-halaman { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.masuk-kotak { width: 100%; max-width: 380px; }
.masuk-jenama { text-align: center; margin-bottom: 22px; }
.masuk-jenama .logo { display: inline-flex; margin-bottom: 12px; }
.masuk-jenama h1 { margin: 0; font-size: 22px; }
.masuk-jenama p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.masuk-borang { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.masuk-borang > label:first-child { font-size: 13px; font-weight: 600; color: var(--text-2); }
.masuk-medan { position: relative; }
.masuk-medan input { width: 100%; padding: 11px 44px 11px 12px; font-size: 15px; }
.masuk-mata { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: 8px; }
.masuk-mata:hover { color: var(--text); background: #ffffff0d; }
.masuk-mata svg { width: 19px; height: 19px; }
.masuk-caps { margin: -2px 0 0; color: var(--warn, #f0b90b); font-size: 12px; }
.masuk-kekal { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.masuk-btn { width: 100%; justify-content: center; padding: 11px; font-size: 14px; margin-top: 4px; }
.masuk-nota { text-align: center; margin-top: 16px; line-height: 1.6; }
.masuk-kotak .alert { margin-bottom: 14px; }
.ralat-kotak { max-width: 440px; }
.ralat-kod { margin: 0 0 2px; font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--muted); }
.ralat-kotak .card-body p { margin: 0 0 10px; line-height: 1.6; }
.ralat-pautan { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.footer-keluar { display: inline; }
.footer-keluar button { background: none; border: 0; padding: 0; margin-left: 6px; color: var(--accent-2); font: inherit; cursor: pointer; text-decoration: underline; }

/* Bursa tempat tersenarai (App\Support\Bursa) */
.tag-bursa { font-weight: 600; }
.tag.b-nasdaq { background: #0ea5e91a; border-color: #0ea5e952; color: #67d3f5; }
.tag.b-nyse { background: #a855f71a; border-color: #a855f752; color: #cfa3fb; }
.tag.b-lain { color: var(--muted); }
td .small .tag-bursa { font-size: 9.5px; padding: 0 5px; margin-right: 2px; vertical-align: 1px; }
.ps-lagi { margin-left: 8px; background: none; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--accent-2); font-size: 11px; font-weight: 600; padding: 1px 9px; cursor: pointer; vertical-align: middle; }
.ps-lagi:hover { border-color: var(--accent); color: var(--text); }
tr.ps-klik { cursor: pointer; }
tr.ps-klik:hover td { background: #ffffff06; }
.ps-kat { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ps-kat button { background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: 12.5px; font-weight: 600; padding: 6px 13px; border-radius: 9px; cursor: pointer; }
.ps-kat button:hover { border-color: var(--border-strong); color: var(--text); }
.ps-kat button.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.ps-kat em { font-style: normal; font-size: 11px; opacity: .6; margin-left: 6px; font-variant-numeric: tabular-nums; }
.ps-kat .ps-kat-sektor { background: var(--accent-soft); border-color: #4f7dff59; color: var(--accent-2); }
.ps-alat { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ps-susun { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.ps-susun select { padding: 5px 8px; font-size: 12.5px; }
.ps-ruang { flex: 1 1 0; }
.ps-hal { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ps-hal .btn-kecil { margin-top: 0; padding: 4px 11px; font-size: 14px; line-height: 1; }
.ps-hal .btn-kecil:disabled { opacity: .35; cursor: default; }
.ps-papan { display: grid; gap: 10px; }
.ps-papan.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); --tinggi: 420px; }
.ps-papan.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); --tinggi: 330px; }
.ps-papan.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); --tinggi: 260px; }
.ps-kosong { grid-column: 1 / -1; padding: 30px; text-align: center; }
.ps-petak { height: var(--tinggi, 330px); display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-top: 2px solid var(--border-strong); border-radius: 12px; overflow: hidden; }
.ps-petak.naik { border-top-color: var(--ok); }
.ps-petak.turun { border-top-color: var(--bad); }
.ps-petak-kepala { display: flex; align-items: center; gap: 7px; padding: 8px 10px 1px; min-width: 0; font-size: 13px; white-space: nowrap; }
.ps-petak-sym { color: var(--text); font-weight: 750; flex-shrink: 0; }
.ps-petak-sym:hover { color: var(--accent-2); text-decoration: underline; }
.ps-petak-kepala .sy { margin-left: -4px; flex-shrink: 0; }
.ps-petak-nama { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.ps-petak-harga { font-weight: 700; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.ps-petak-ubah { font-variant-numeric: tabular-nums; flex-shrink: 0; font-size: 12px; }
.ps-petak-ruang { flex: 1 1 0; min-width: 4px; }
.ps-petak-kepala .tag { flex-shrink: 0; padding: 1px 6px; font-size: 9.5px; }
.ps-petak-kepala .tag-entry { background: var(--ok-soft); color: var(--ok); border-color: #0ecb8144; }
.ps-petak-kepala .tag-exit { background: var(--bad-soft); color: var(--bad); border-color: #f6465d44; }
.ps-petak-kepala .tag-cycle { background: var(--accent-soft); color: var(--accent-2); border-color: #4f7dff44; }
.ps-petak-kepala .bintang { flex-shrink: 0; font-size: 14px; }
.ps-petak-ohlc { padding: 1px 10px 2px; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ps-petak-ohlc b { font-weight: 500; color: var(--text-2); margin-right: 4px; }
.ps-petak-ohlc i, .ps-petak-ohlc em { font-style: normal; }
.ps-petak-ohlc em { margin-left: 4px; }
.ps-petak-vol { margin-left: 4px; }
.ps-petak-carta { flex: 1; min-height: 0; position: relative; cursor: crosshair; }
.ps-petak-muat { display: grid; place-items: center; height: 100%; margin: 0; color: var(--muted); font-size: 11.5px; }
.ps-papan.g4 .ps-petak-nama, .ps-papan.g4 .ps-petak-idx, .ps-papan.g4 .ps-petak-vol { display: none; }   /* petak kecil: utamakan harga */
.ps-tape { position: fixed; left: var(--sisi, 0px); right: 0; scrollbar-width: none; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 22px; padding: 8px 20px; font-size: 12.5px; white-space: nowrap; overflow-x: auto; background: #060a13eb; backdrop-filter: blur(14px) saturate(150%); border-top: 1px solid var(--border); }
.ps-tape .tk b { color: var(--text-2); font-weight: 600; margin-right: 7px; }
.ps-tape .tk i { font-style: normal; color: var(--text); font-variant-numeric: tabular-nums; margin-right: 7px; }
.ps-tape .tk em { font-style: normal; font-variant-numeric: tabular-nums; }
.ps-tape .tk-nota { margin-left: auto; color: var(--muted); font-size: 11px; }
.ps-tape .tk-nota a { color: var(--text-2); }
body.ps-tape-on { padding-bottom: 46px; }
@media (max-width: 1200px) { .ps-papan.g4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 980px) { .ps-papan.g3, .ps-papan.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .ps-papan.g2, .ps-papan.g3, .ps-papan.g4 { grid-template-columns: 1fr; --tinggi: 300px; }
  .ps-petak-idx { display: none; }   /* utamakan lencana isyarat & ★ */
  .ps-ruang { display: none; }
  .ps-kat button { padding: 5px 10px; font-size: 12px; }
}

/* ---------- Pasaran → Global (port psg-* AQ Saham) ---------- */
#ps-global { display: flex; flex-direction: column; gap: 12px; }
.psg-kepala { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.psg-atas { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px; align-items: stretch; }
.psg-ringkasan, .psg-sesi, .psg-blok { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; min-width: 0; }
.psg-ringkasan { padding: 14px 18px; display: flex; flex-direction: column; }
.psg-ringkasan h3, .psg-sesi h3, .psg-blok h3 { margin: 0; font-size: 15px; font-weight: 700; }
.psg-ringkasan ul { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.psg-ringkasan li { font-size: 13px; line-height: 1.55; color: var(--text-2); padding-left: 16px; position: relative; }
.psg-ringkasan li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.psg-ringkasan li b { color: var(--text); font-weight: 650; }
.psg-kaki { margin: auto 0 0; padding-top: 12px; font-size: 11px; color: var(--muted); line-height: 1.5; }
.psg-sesi { padding: 14px 18px; display: flex; flex-direction: column; }
.psg-sesi header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.psg-petunjuk { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.psg-petunjuk > span { display: inline-flex; align-items: center; gap: 5px; }
.psg-petunjuk i { display: block; width: 14px; height: 7px; border-radius: 2px; }
.psg-petunjuk i.sg-biasa, .psg-trek i.sg-biasa { background: #4f7dffcc; }
.psg-petunjuk i.sg-lanjutan, .psg-trek i.sg-lanjutan { background: #4f7dff4d; }
.psg-kini-petunjuk { display: block; width: 2px; height: 11px; background: var(--warn); }
.psg-baris { display: grid; grid-template-columns: 130px minmax(0, 1fr) 240px; align-items: center; gap: 10px; height: 26px; font-size: 13px; }
.psg-bursa { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psg-bursa em { font-style: normal; font-size: 10px; color: var(--muted); display: inline-block; width: 24px; }
.psg-baris.utama .psg-bursa { color: var(--text); font-weight: 650; }
.psg-trek { position: relative; height: 10px; background: #0a1020; border-radius: 3px; }
.psg-trek i { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.psg-kini { position: absolute; top: -8px; bottom: -8px; width: 2px; margin-left: -1px; background: var(--warn); box-shadow: 0 0 8px #f0b90b88; }
.psg-status { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psg-status.buka { color: #34d99f; }
.psg-status.lanjutan, .psg-status.rehat { color: #ffd970; }
.psg-paksi { height: 18px; }
.psg-paksi .psg-trek { background: none; height: 18px; }
.psg-paksi .psg-trek span { position: absolute; transform: translateX(-50%); font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.psg-paksi .psg-trek span:first-child { transform: none; }
.psg-paksi .psg-trek span:last-child { transform: translateX(-100%); }
.psg-wilayah { display: flex; flex-direction: column; gap: 12px; }
.psg-blok { padding: 14px 16px 16px; }
.psg-blok header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; font-size: 12.5px; }
.psg-blok header b { font-weight: 650; }
.psg-pil { font-size: 11px; padding: 2px 10px; border-radius: 99px; background: #1a2440; color: var(--muted); }
.psg-pil.buka { background: #0ecb811f; color: #34d99f; }
.psg-petak-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.psg-petak, .psg-kad { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px 9px; min-width: 0; display: flex; flex-direction: column; }
.psg-petak .psg-garis { height: 32px; margin: 8px 0 4px; }
.psg-petak-atas { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 650; min-width: 0; }
.psg-petak-atas span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psg-petak-atas em { font-style: normal; font-size: 10px; font-weight: 650; color: var(--muted); padding: 1px 5px; border-radius: 4px; background: #ffffff0d; flex-shrink: 0; }
.psg-hidup { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-left: auto; box-shadow: 0 0 0 3px #0ecb8133; }
.psg-harga { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; margin-top: 4px; }
.psg-harga small { font-size: 12px; font-weight: 500; color: var(--text-2); margin-left: 1px; }
.psg-ubah { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.psg-ubah b { font-weight: 650; margin-right: 4px; }
.psg-masa { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: auto; }
.psg-nota { font-size: 11px; color: var(--text-2); margin-bottom: 2px; }
.psg-garis { display: block; width: 100%; }
.psg-garis.kosong { display: grid; place-items: center; font-size: 10px; color: var(--muted); border: 1px dotted var(--border-strong); border-radius: 6px; }
.psg-kumpulan { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.psg-blok-hadapan, .psg-blok-komoditi, .psg-blok-fx { grid-column: 1 / -1; }
.psg-kad-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.psg-kad { background: var(--surface-2); border-top: 2px solid var(--border-strong); }
.psg-kad.naik { border-top-color: #0ecb8199; }
.psg-kad.turun { border-top-color: #f6465d99; }
.psg-kad .psg-garis { height: 38px; margin: 8px 0 4px; }
.psg-tiada { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.6; padding: 10px 14px; border: 1px dashed var(--border); border-radius: 10px; }
.psg-tiada b { color: var(--text-2); font-weight: 600; }
@media (max-width: 1500px) { .psg-atas { grid-template-columns: minmax(0, 1fr); } }   /* bar sisi 232px — trek sesi perlu ruang */
@media (max-width: 1100px) { .psg-kumpulan { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .psg-baris { grid-template-columns: 84px minmax(0, 1fr); height: auto; row-gap: 2px; margin-bottom: 6px; }
  .psg-bursa em { display: none; }
  .psg-status { grid-column: 2; }
  .psg-petunjuk { margin-left: 0; }
  .psg-petak-grid, .psg-kad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psg-harga { font-size: 16px; }
}

/* ---------- harga live (public/js/live.js) ---------- */
.live-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.live-status i { width: 7px; height: 7px; border-radius: 50%; background: #34425f; display: inline-block; }
.live-status.live { color: #34d99f; }
.live-status.live i { background: var(--ok); animation: liveDenyut 2s infinite; }
.live-status.sambung i { background: var(--warn); }
@keyframes liveDenyut { 0% { box-shadow: 0 0 0 0 #0ecb8199; } 70% { box-shadow: 0 0 0 6px #0ecb8100; } 100% { box-shadow: 0 0 0 0 #0ecb8100; } }
.kilat-naik { animation: kilatNaik .9s ease-out; border-radius: 4px; }
.kilat-turun { animation: kilatTurun .9s ease-out; border-radius: 4px; }
@keyframes kilatNaik { from { background-color: #0ecb8166; } to { background-color: transparent; } }
@keyframes kilatTurun { from { background-color: #f6465d66; } to { background-color: transparent; } }
.ps-tape .live-status { margin-right: -8px; }

/* ---------- sejarah pendek (versi ringan Bilik Menunggu) ---------- */
.verdict-pendek { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; white-space: nowrap;
  color: var(--warn); background: var(--warn-soft); border: 1px dashed #f0b90b55; }
.sejarah-tanda { cursor: help; font-size: 12px; margin-left: 2px; }
.tf-pendek { padding: 6px 12px; font-size: 12px; color: var(--warn); border: 1px dashed #f0b90b55; border-radius: 9px; align-self: center; cursor: help; }
.sejarah-nota { margin: 10px 0 0; padding: 8px 12px; font-size: 12.5px; color: var(--text-2); background: var(--warn-soft); border: 1px solid #f0b90b33; border-radius: 10px; }
.ps-petak-kepala .tag-pendek { background: var(--warn-soft); color: var(--warn); border-color: #f0b90b44; cursor: help; }
details.menunggu > summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; gap: 4px; }
details.menunggu > summary::-webkit-details-marker { display: none; }
details.menunggu > summary h2 { margin: 0; }
details.menunggu > summary h2::after { content: " ▸"; color: var(--muted); font-size: 13px; }
details.menunggu[open] > summary h2::after { content: " ▾"; }

/* ---------- alat sistem: status sandaran (Tetapan akaun) ---------- */
.sandaran-status { margin-top: 14px; }
.sandaran-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 10px 0; }
.sandaran-kotak { border: 1px solid var(--border); border-left: 3px solid var(--border-strong); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.sandaran-kotak.ok { border-left-color: var(--ok); }
.sandaran-kotak.ok b { color: var(--ok); }
.sandaran-kotak.gagal { border-left-color: var(--bad); }
.sandaran-kotak.gagal b { color: var(--bad); }
@media (max-width: 760px) { .sandaran-grid { grid-template-columns: 1fr; } }
