/* Saham IDX — dark theme screener */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0B101E; --bg2: #0F1626; --card: #182338; --card2: #1F2E47;
  --accent: #3E7CB1; --accent2: #2E6391;
  --green: #1F9D55; --red: #D64545; --gold: #B7791F;
  --ink: #102A43; --text: #E8ECF1; --muted: #9AA7B5;
  --line: #243349; --radius: 10px;
}
body { font-family: "Segoe UI", Arial, sans-serif; background: var(--bg); color: var(--text); }
.hidden { display: none !important; }
.r { text-align: right; } .c { text-align: center; }

/* topbar */
.topbar { display: flex; align-items: center; gap: 24px; padding: 16px 28px;
  background: var(--bg2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { font-size: 18px; font-weight: 800; color: var(--text); white-space: nowrap; }
.brand small { font-weight: 400; color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 6px; }
.tab { background: none; border: none; color: var(--muted); font-size: 14px; font-weight: 700;
  padding: 8px 16px; border-radius: 8px; cursor: pointer; transition: .15s; }
.tab:hover { color: var(--text); background: rgba(255,255,255,.05); }
.tab.active { background: var(--accent); color: #fff; }
.scan-badge { margin-left: auto; font-size: 12px; color: var(--muted); }
.scan-badge .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); margin-right: 6px; }
.scan-badge.running .dot { background: var(--gold); animation: pulse 1s infinite; }
.scan-badge.done .dot { background: var(--green); }
@keyframes pulse { 50% { opacity: .3; } }

main { padding: 24px 28px; max-width: 1280px; margin: 0 auto; }

/* toolbar */
.toolbar { margin-bottom: 16px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.input { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px;
  background: var(--bg2); color: var(--text); }
select.input { min-width: 170px; }
.btn { padding: 9px 16px; border: none; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* cards & tables */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.table-card { padding: 6px 10px; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase;
  letter-spacing: .5px; padding: 10px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid #1B2740; white-space: nowrap; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: rgba(62,124,177,.08); }
.sym { font-weight: 800; color: var(--text); font-size: 14px; }
.sub { color: var(--muted); font-size: 11px; }
.up { color: var(--green); } .down { color: var(--red); }
.empty { text-align: center; color: var(--muted); padding: 28px 0; font-size: 14px; }

/* recommendation pills */
.rec-pill { display: inline-block; padding: 3px 12px; border-radius: 12px; font-size: 11px;
  font-weight: 800; color: #fff; letter-spacing: .3px; }
.score-pill { display: inline-block; min-width: 26px; padding: 2px 8px; border-radius: 10px;
  font-size: 12px; font-weight: 800; background: var(--card2); color: var(--text); text-align: center; }
.icon-btn { background: none; border: 1px solid var(--line); color: var(--text); font-size: 13px;
  padding: 4px 12px; border-radius: 6px; cursor: pointer; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

/* intro / about */
.intro h2 { font-size: 20px; margin-bottom: 6px; }
.intro p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.about-card h2 { font-size: 20px; margin-bottom: 12px; }
.about-card h3 { font-size: 16px; margin: 16px 0 8px; color: var(--text); }
.about-card p, .about-card li { color: var(--muted); font-size: 14px; line-height: 1.6; }
.about-card ul { margin: 10px 0 0 20px; }
.rec-legend { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.warn-box { background: rgba(183,119,31,.12); border: 1px solid rgba(183,119,31,.4); color: #E8D9B0;
  border-radius: 8px; padding: 14px 16px; font-size: 13.5px; line-height: 1.6; margin: 14px 0; }
.muted { color: var(--muted); font-size: 12.5px; }
.disclaimer { color: var(--muted); font-size: 12px; margin-top: 8px; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(11,16,30,.7); display: flex;
  align-items: center; justify-content: center; z-index: 50; }
.modal-box { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; width: 560px; max-width: 94vw; max-height: 86vh; overflow-y: auto; }
.modal-box.wide { width: 640px; }
.modal-box h3 { font-size: 19px; margin-bottom: 4px; }
.modal-box h4 { font-size: 14px; margin: 18px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.modal-close { float: right; background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; }
.modal-close:hover { color: #fff; }
.chart-wrap { position: relative; height: 200px; margin: 12px 0; }
.stat-line { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; border-bottom: 1px solid #1B2740; }
.stat-line .k { color: var(--muted); }
.stat-line .v { font-weight: 700; }
.signal-list { list-style: none; margin: 8px 0; }
.signal-list li { padding: 6px 10px; border-radius: 6px; margin-bottom: 6px; font-size: 13px; background: var(--bg2); }
.signal-list li.pos { border-left: 3px solid var(--green); }
.signal-list li.neg { border-left: 3px solid var(--red); }
.signal-list li.neu { border-left: 3px solid var(--muted); }
.btn-close-modal { margin-top: 16px; width: 100%; background: var(--card2); color: var(--text); }

/* toast */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--card2);
  color: #fff; padding: 12px 22px; border-radius: 10px; font-size: 14px; font-weight: 600; z-index: 100;
  border: 1px solid var(--line); }

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
  .scan-badge { margin-left: 0; }
  main { padding: 16px; }
}
