/* Copy Lab — tema Forest-River (terang, hijau hutan & biru sungai) */
:root {
  --bg: #f2f7f5;
  --bg2: #f7fbf9;
  --panel: #ffffff;
  --line: #e2ece7;
  --line2: #d3e2db;
  --text: #13304a;
  --text2: #2b4a63;
  --muted: #5d7182;
  --dim: #8496a4;
  --forest: #17824a;
  --forest-d: #11663a;
  --forest-bg: #e5f5ec;
  --forest-t: #12733f;
  --leaf: #2fa866;
  --river: #2b8fd6;
  --river-bg: #e6f2fb;
  --river-t: #1d6fae;
  --amber: #e7a417;
  --amber-bg: #fdf4d8;
  --amber-t: #9a6a00;
  --red: #d94141;
  --red-bg: #fde9e8;
  --red-t: #c03232;
  --shadow: 0 1px 2px rgba(19, 48, 74, .04), 0 6px 18px rgba(19, 48, 74, .05);
  --radius: 14px;
  --sans: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --side-w: 232px;
  --top-h: 68px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 14px; line-height: 1.45; }
body { min-height: 100vh; }
a { color: var(--river-t); text-decoration: none; }
a:hover { color: var(--river); }
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-size: .93em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ================= kerangka aplikasi ================= */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: var(--top-h) 1fr; min-height: 100vh; }
.top { grid-column: 1 / -1; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); position: sticky; top: 0; z-index: 30; height: var(--top-h); border-bottom: 1px solid var(--line); background: var(--panel); }
.top .brand { display: flex; align-items: center; gap: 10px; padding: 0 22px; font-weight: 800; font-size: 25px; letter-spacing: -.02em; color: var(--text); background: #fbfdfc; border-right: 1px solid var(--line); }
.top .brand svg { flex: 0 0 auto; }
.top .topbar { display: flex; align-items: center; gap: 18px; padding: 0 26px; background: url(landscape.svg) center / cover no-repeat, #eef6f4; min-width: 0; }
.top .tagline { color: var(--text2); font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.top .pill { margin-left: 4px; }
.search { position: relative; flex: 0 1 290px; min-width: 160px; }
.search input { width: 100%; height: 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.94); padding: 0 12px 0 38px; box-shadow: var(--shadow); color: var(--text); }
.search input:focus { outline: 2px solid var(--leaf); outline-offset: 1px; }
.search svg { position: absolute; left: 12px; top: 11px; color: var(--muted); }
.cur-tog { display: inline-flex; flex: 0 0 auto; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); }
.cur-tog button { border: 0; background: none; min-width: 44px; height: 34px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
.cur-tog button:hover { color: var(--text); }
.cur-tog button.on { background: var(--forest); color: #fff; }
.cur-tog button:focus-visible { outline: 2px solid var(--leaf); outline-offset: 1px; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.75); display: grid; place-items: center; color: var(--text2); cursor: pointer; flex: 0 0 auto; }
.icon-btn:hover { background: #fff; }
.icon-btn .count { position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #2fa866, #1d6fae); color: #fff; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; box-shadow: var(--shadow); cursor: pointer; }
.menu { position: absolute; right: 18px; top: calc(var(--top-h) - 6px); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(19,48,74,.14); padding: 6px; min-width: 220px; z-index: 40; }
.menu .who { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu .who b { display: block; }
.menu a, .menu button { display: flex; width: 100%; padding: 9px 12px; border-radius: 8px; border: 0; background: none; color: var(--text2); text-align: left; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--bg); }

.side { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); display: flex; flex-direction: column; background: #fbfdfc; border-right: 1px solid var(--line); overflow: hidden; }
.side nav { display: flex; flex-direction: column; gap: 4px; padding: 18px 12px; }
.side nav a, .side nav button { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; color: var(--text2); font-weight: 500; border: 0; background: none; cursor: pointer; text-align: left; width: 100%; }
.side nav a:hover, .side nav button:hover { background: #eef6f2; color: var(--text); }
.side nav a.on { background: var(--forest-bg); color: var(--forest-t); font-weight: 700; }
.side nav svg { flex: 0 0 auto; }
.side .art { flex: 1 1 auto; min-height: 120px; background: url(forest-river.jpg) center bottom / cover no-repeat; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%); mask-image: linear-gradient(to bottom, transparent 0, #000 22%); }
.side .status { padding: 10px 18px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); background: #fbfdfc; }

main.wrap { min-width: 0; padding: 24px 26px 48px; display: flex; flex-direction: column; gap: 20px; max-width: 1640px; width: 100%; }

/* ================= elemen umum ================= */
h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
h3 { margin: 0; font-size: 14px; font-weight: 700; }
.sub { margin: 4px 0 0; color: var(--muted); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.page-head .title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.clockline { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; padding-top: 6px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--forest-t); background: var(--forest-bg); padding: 4px 10px; border-radius: 999px; }
.live.off { color: var(--red-t); background: var(--red-bg); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); display: inline-block; }
.dot.off { background: var(--red); }
.live .dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eef4f1; color: var(--muted); letter-spacing: .02em; white-space: nowrap; }
.pill.demo { background: var(--amber-bg); color: var(--amber-t); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head .ttl { display: flex; align-items: center; gap: 10px; }
.card-head .ttl svg { flex: 0 0 auto; }
.link { font-size: 13px; font-weight: 600; color: var(--river-t); background: none; border: 0; cursor: pointer; padding: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.kpi { display: flex; gap: 12px; align-items: center; padding: 14px 16px; }
.kpi .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; }
.kpi .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi .v { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 11.5px; color: var(--dim); }

.stack { display: flex; flex-direction: column; gap: 14px; }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.col-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

.btn { padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel); color: var(--text2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; font-weight: 600; }
.btn:hover { border-color: #b9cfc4; color: var(--text); background: #fbfdfc; }
.btn.primary { background: var(--forest); border-color: var(--forest); color: #fff; }
.btn.primary:hover { background: var(--forest-d); color: #fff; }
.btn.soft { background: #edf3f0; border-color: #edf3f0; color: var(--text2); }
.btn.soft:hover { background: #e3ece7; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.red:hover { background: #c23535; color: #fff; }
.btn.on { background: var(--forest); border-color: var(--forest); color: #fff; }
.btn.danger { color: var(--red-t); border-color: #f2c9c6; }
.btn.sm { min-height: 30px; padding: 4px 11px; font-size: 12.5px; }
.btn.block { width: 100%; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tabs { display: inline-flex; gap: 2px; background: #f0f5f3; padding: 3px; border-radius: 999px; }
.tabs button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--forest); color: #fff; }

/* tabel */
.scroll-x { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.t th { font-weight: 600; color: var(--muted); text-align: left; padding: 9px 10px; white-space: nowrap; background: #f5f9f7; font-size: 12px; }
table.t th:first-child { border-radius: 8px 0 0 8px; }
table.t th:last-child { border-radius: 0 8px 8px 0; }
table.t td { padding: 10px 10px; border-bottom: 1px solid #edf3f0; vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.r, table.t th.r { text-align: right; }
table.t.compact td { padding: 7px 8px; }
table.t.compact th { padding: 7px 8px; }

/* lencana */
.tier { font-size: 11px; font-weight: 800; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; display: inline-grid; place-items: center; }
.tier-A { background: var(--forest-bg); color: var(--forest-t); }
.tier-B { background: var(--river-bg); color: var(--river-t); }
.tier-U { background: #eef2f4; color: #5d7182; }
.tier-C { background: var(--red-bg); color: var(--red-t); }
.vtag { font-size: 11px; font-weight: 800; letter-spacing: .03em; padding: 3px 9px; border-radius: 6px; display: inline-block; }
.v-KUAT { background: var(--forest-bg); color: var(--forest-t); }
.v-PANTAU { background: var(--amber-bg); color: var(--amber-t); }
.v-HINDARI { background: var(--red-bg); color: var(--red-t); }
.side-tag { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 6px; display: inline-block; }
.side-tag.BUY { background: var(--forest-bg); color: var(--forest-t); }
.side-tag.SELL { background: var(--red-bg); color: var(--red-t); }
.chip { font-size: 12px; padding: 4px 9px; border-radius: 7px; display: inline-block; }
.chip.ok { background: var(--forest-bg); color: var(--forest-t); }
.chip.warn { background: var(--amber-bg); color: var(--amber-t); }
.chip.bad { background: var(--red-bg); color: var(--red-t); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pos { color: var(--forest-t); } .neg { color: var(--red-t); } .amb { color: var(--amber-t); }
.empty { padding: 28px; text-align: center; color: var(--dim); border: 1px dashed var(--line2); border-radius: 12px; background: var(--bg2); }
.plan { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; white-space: pre-wrap; }

/* ================= kartu sinyal (rekomendasi konsensus) ================= */
.sig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.sig { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 16px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 1px 0 rgba(19,48,74,.03); }
.sig.KUAT { border-color: #cfe9da; }
.sig.HINDARI { border-color: #f4d6d4; }
.sig-head { display: flex; gap: 12px; align-items: center; }
.tok-av { width: 50px; height: 50px; border-radius: 50%; flex: 0 0 auto; overflow: hidden; box-shadow: 0 2px 6px rgba(19,48,74,.12); }
.tok-av.sm { width: 22px; height: 22px; box-shadow: none; }
.tok-av svg { display: block; width: 100%; height: 100%; }
.sig-title { flex: 1 1 auto; min-width: 0; }
.sig-title .name { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sig-title .symb { color: var(--dim); font-size: 12.5px; }
.score { width: 54px; height: 54px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 0 0 auto; color: #fff; }
.score b { font-size: 22px; line-height: 1; font-weight: 800; }
.score span { font-size: 9px; font-weight: 800; letter-spacing: .04em; margin-top: 3px; }
.score.KUAT { background: linear-gradient(160deg, #23a35d, #13793f); }
.score.PANTAU { background: #fde9b2; color: #6b4a00; }
.score.HINDARI { background: linear-gradient(160deg, #e35b5b, #c43131); }
.sig-stats { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; border-top: 1px solid #edf3f0; padding-top: 12px; }
.sig-stats .k { font-size: 12px; color: var(--muted); }
.sig-stats .x { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sig-stats .x small { font-size: 12px; font-weight: 700; }
.box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fcfefd; }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.box-head h3 { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.count-chip { font-size: 11px; font-weight: 700; background: #eef4f1; color: var(--text2); padding: 2px 8px; border-radius: 999px; }
.buyers td, .buyers th { font-size: 12px; }
.buyers th { background: none; padding: 4px 6px; font-weight: 600; }
.buyers td { padding: 5px 6px; border-bottom: 0; }
.alert-box { background: var(--red-bg); border: 1px solid #f6cfcc; color: var(--red-t); border-radius: 10px; padding: 9px 12px; font-size: 12.5px; }
.alert-box b { display: flex; align-items: center; gap: 6px; }
.alert-box div { font-size: 11.5px; margin-top: 2px; }
.mini { display: flex; gap: 10px; align-items: flex-start; }
.mini svg { flex: 0 0 auto; margin-top: 1px; }
.mini h3 { font-size: 13px; }
.mini .tx { font-size: 12px; color: var(--muted); }
.mini .lvl-ok { color: var(--forest-t); font-weight: 700; }
.mini .lvl-warn { color: var(--amber-t); font-weight: 700; }
.mini .lvl-bad { color: var(--red-t); font-weight: 700; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 12px; margin-top: 4px; }
.kv span:nth-child(odd) { color: var(--muted); }
.kv span:nth-child(even) { font-weight: 600; color: var(--text2); font-variant-numeric: tabular-nums; }
.ai-note { background: var(--river-bg); border: 1px solid #cfe4f5; border-radius: 10px; padding: 9px 12px; font-size: 12.5px; color: var(--text2); }
.ai-note .who { font-size: 10.5px; font-weight: 800; color: var(--river-t); letter-spacing: .04em; margin-bottom: 3px; }
.sig-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.sig-links { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }
.sig-links a { font-weight: 600; }

/* feed & leaderboard */
.wallet-cell { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tok-cell { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-weight: 600; }
.feed-new { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: #e5f5ec; } to { background: transparent; } }
.bar { height: 6px; border-radius: 3px; background: #edf3f0; overflow: hidden; min-width: 60px; }
.bar > div { height: 6px; border-radius: 3px; }

/* form */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 600; }
.input, select.input, textarea.input { background: var(--panel); border: 1px solid var(--line2); border-radius: 9px; padding: 9px 11px; color: var(--text); min-height: 40px; width: 100%; }
.input::placeholder { color: #a9b7c1; }
.input:focus { outline: 2px solid var(--leaf); outline-offset: 0; border-color: transparent; }
textarea.input { min-height: 160px; font-family: var(--mono); font-size: 12px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--panel); border: 1px solid var(--line2); border-left: 4px solid var(--forest); padding: 12px 16px; border-radius: 10px; z-index: 80; max-width: 420px; box-shadow: 0 12px 30px rgba(19,48,74,.16); }
.toast.err { border-left-color: var(--red); }
.addr { font-family: var(--mono); font-size: 12px; }
.copy { background: none; border: 0; color: var(--dim); cursor: pointer; padding: 2px 4px; }
.copy:hover { color: var(--forest); }

/* dialog & login */
.login, .modal { position: fixed; inset: 0; background: rgba(19, 48, 74, .38); display: grid; place-items: center; z-index: 100; padding: 16px; backdrop-filter: blur(3px); }
.login form, .modal .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 26px; width: min(440px, 100%); display: flex; flex-direction: column; gap: 14px; box-shadow: 0 24px 60px rgba(19,48,74,.25); }
.modal .panel { width: min(620px, 100%); max-height: 86vh; overflow: auto; }
.login .logo-row { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; }

footer.note { font-size: 12px; color: var(--dim); }

/* ================= responsif ================= */
@media (max-width: 1100px) {
  .top .tagline { display: none; }
}
@media (max-width: 860px) {
  :root { --top-h: 60px; }
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; }
  .top { grid-template-columns: auto minmax(0, 1fr); position: sticky; }
  .top .brand { padding: 0 12px; font-size: 19px; border-right: 0; }
  .top .topbar { padding: 0 12px; gap: 8px; }
  .search { flex: 1 1 auto; min-width: 0; }
  .cur-tog button { min-width: 36px; padding: 0 8px; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .side nav { flex-direction: row; overflow-x: auto; padding: 8px 12px; }
  .side nav a, .side nav button { white-space: nowrap; padding: 8px 12px; }
  .side .art, .side .status { display: none; }
  main.wrap { padding: 16px 16px 40px; }
  .form-2 { grid-template-columns: 1fr; }
}
.card-head .filters .input, .row-between .filters .input { width: auto; }
@media (max-width: 480px) {
  .top .brand { font-size: 0; gap: 0; padding: 0 8px 0 12px; }
  .search input { padding-left: 34px; }
  .search svg { left: 10px; }
}
