/* Kantor DLMM — komponen tambahan di atas tema Forest-River */
.chip.info { background: var(--river-bg); color: var(--river-t); }
.chip.mute { background: #eef2f4; color: var(--muted); }
a.chip.info:hover { background: #d6eaf8; }
.modal .panel.wide { width: min(860px, 100%); }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--forest); }
.picked { font-size: 12px; min-height: 16px; }

/* toggle Autopilot */
.switch { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 4px; border-radius: 999px; border: 1px solid var(--line2); background: #eef2f4; cursor: pointer; font: 800 11px/1 var(--sans); color: var(--muted); letter-spacing: .04em; flex: 0 0 auto; }
.switch .knob { width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(19,48,74,.25); transition: transform .15s; }
.switch.on { background: var(--forest); border-color: var(--forest); color: #fff; flex-direction: row-reverse; padding: 0 4px 0 10px; }
.switch:disabled { opacity: .55; cursor: default; }
.switch:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }

/* panel posisi */
.pos-list { display: flex; flex-direction: column; gap: 12px; }
.pcard { border: 1px solid var(--line); border-radius: 13px; padding: 14px; display: flex; flex-direction: column; gap: 12px; background: var(--panel); }
.pcard.ap { border-color: #b9e2c8; box-shadow: inset 3px 0 0 var(--leaf); }
.pcard.closed { background: var(--bg2); opacity: .85; }
.pos-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pos-name { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; }
.pos-name b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-name span { font-size: 12px; }
.pos-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; border-top: 1px solid #edf3f0; padding-top: 10px; }
.pos-stats > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pos-stats .k { font-size: 11.5px; color: var(--muted); }
.pos-stats .x { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pos-stats small { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-stats .chip { align-self: flex-start; font-weight: 700; }
.pos-meta { font-size: 12px; }
.pos-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pos-stops { display: flex; gap: 6px 16px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.pos-stops .check { font-size: 12.5px; align-items: center; }
.pos-stops .check input { margin-top: 0; }
@media (max-width: 700px) { .pos-stats { grid-template-columns: 1fr 1fr; } }

/* papan temuan Scout */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.pool-card { border: 1px solid var(--line); border-radius: 13px; padding: 13px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; background: var(--panel); transition: border-color .12s, box-shadow .12s; }
.pool-card:hover, .pool-card:focus-visible { border-color: #9fd6b5; box-shadow: 0 6px 18px rgba(19,48,74,.08); outline: none; }
.pc-head { display: flex; align-items: center; gap: 10px; }
.pc-head .tok-av { width: 40px; height: 40px; }
.pc-title { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pc-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.pc-title span { font-size: 11.5px; }
.risk { width: 48px; height: 48px; border-radius: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 0 0 auto; }
.risk b { font-size: 18px; line-height: 1; font-weight: 800; }
.risk span { font-size: 8px; font-weight: 800; letter-spacing: .05em; margin-top: 3px; }
.risk.ok { background: var(--forest-bg); color: var(--forest-t); }
.risk.warn { background: var(--amber-bg); color: var(--amber-t); }
.risk.bad { background: var(--red-bg); color: var(--red-t); }
.risk.mute { background: #eef2f4; color: var(--muted); }
.risk.lg { width: 70px; height: 64px; }
.risk.lg b { font-size: 24px; }
.pc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 12px; }
.pc-stats div { display: flex; justify-content: space-between; gap: 6px; }
.pc-stats span { color: var(--muted); }
.pc-stats b { font-variant-numeric: tabular-nums; }
.pc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; margin-top: auto; }
.pool-card.sm { padding: 10px; gap: 8px; }
.pool-card.sm .pc-stats { grid-template-columns: 1fr 1fr; }

/* dossier */
.dos-top { display: flex; gap: 12px; align-items: center; }
.dos-top .tok-av { width: 56px; height: 56px; }
.dos-sec { border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.dos-sec h3 { font-size: 13.5px; }
.dos-sec .kv { grid-template-columns: minmax(150px, auto) 1fr; font-size: 12.5px; }

/* TV Treasury */
.tv { background: #1b232c; border-radius: 18px; padding: 12px; box-shadow: 0 14px 34px rgba(19,48,74,.22), inset 0 0 0 2px #2b3642; position: relative; }
.tv::after { content: ''; position: absolute; left: 50%; bottom: -10px; width: 90px; height: 10px; transform: translateX(-50%); background: #2b3642; border-radius: 0 0 8px 8px; }
.tv-screen { background: radial-gradient(ellipse at 30% 0%, #12324a 0%, #08131d 70%); border-radius: 10px; padding: 18px 20px; color: #f2f7fb; font-family: var(--sans); min-height: 200px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.tv-screen::before { content: none; }
.tv-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; letter-spacing: .12em; color: #f5c451; font-weight: 800; }
.tv-mode { font-size: 12px; letter-spacing: .06em; padding: 3px 10px; border-radius: 6px; background: #2a3b4b; color: #cfe0ee; font-weight: 800; }
.tv-mode.live { background: #145c36; color: #5be08f; }
.tv-big { font-size: 40px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; }
.tv-sub { font-size: 17px; font-weight: 700; color: #a8dcff; font-variant-numeric: tabular-nums; }
.tv-pnl { font-size: 15.5px; font-weight: 700; color: #dce7f0; }
.tv-pnl.pos { color: #5be08f; } .tv-pnl.neg { color: #ff8a80; }
.tv-pnl small { color: #a5b6c6; font-size: 12.5px; font-weight: 500; display: block; margin-top: 2px; }
.tv-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; border-top: 1px solid #1f3446; padding-top: 8px; }
.tv-h { font-size: 11.5px; font-weight: 800; color: #f5c451; letter-spacing: .08em; margin-bottom: 6px; text-transform: uppercase; }
.tv-row { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; padding: 3px 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.tv-row span:first-child { color: #dce7f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-row .pos { color: #5be08f; } .tv-row .neg { color: #ff8a80; }
.tv-row.dim span { color: #8fa3b5; }
.tv-dim { color: #a5b6c6; font-size: 13px; }
.tv-foot { margin-top: auto; font-size: 12px; color: #8ea2b4; }
@media (max-width: 520px) { .tv-cols { grid-template-columns: 1fr; } .tv-big { font-size: 27px; } }

/* dashboard */
.dash2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, 1fr); gap: 20px; align-items: start; }
.dash2 > div { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (max-width: 1180px) { .dash2 { grid-template-columns: minmax(0, 1fr); } }
.ev-list { list-style: none; margin: 0; padding: 0; max-height: 460px; overflow: auto; }
.ev-list li { display: grid; grid-template-columns: 58px 1fr; gap: 8px; padding: 7px 0; border-top: 1px solid #edf3f0; font-size: 12.5px; }
.ev-list li:first-child { border-top: 0; }
.ev-list .tm { font-family: var(--mono); font-size: 11px; color: var(--dim); padding-top: 2px; }
.ev-list .who { font-size: 11px; font-weight: 800; }
.ev-type { font-family: var(--mono); font-size: 11px; background: #eef4f1; color: var(--text2); padding: 1px 6px; border-radius: 5px; margin-right: 6px; }
.lv-warn { color: var(--amber-t); } .lv-error { color: var(--red-t); } .lv-ok { color: var(--forest-t); }
.stat-row { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-row span { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 12px; color: var(--muted); }
.stat-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.principles { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); display: grid; gap: 4px; }

/* roster kantor: per meja, kursi merah bila mati */
.desk-group { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--dim); text-transform: uppercase; margin: 6px 2px 0; }
.ag.dead { border-color: #f2c9c6; background: #fff6f5; }
.st.dead { background: var(--red-bg); color: var(--red-t); }
.office-grid.k3 { grid-template-columns: minmax(320px, 1.1fr) minmax(320px, 1fr) minmax(300px, 1fr); }
@media (max-width: 1240px) { .office-grid.k3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .office-grid.k3 { grid-template-columns: 1fr; } }

/* ================= PnL ================= */
.gain { color: #127a5c; } .loss { color: #b04a00; }
.pnl-hero { display: grid; grid-template-columns: minmax(280px, 0.9fr) minmax(0, 2fr); padding: 0; overflow: hidden; }
.pnl-left { border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.pnl-block { padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.pnl-block + .pnl-block { border-top: 1px solid var(--line); }
.pnl-k { font-size: 13px; font-weight: 700; color: var(--muted); }
.pnl-big { font-size: 34px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pnl-chip { font-size: 13px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: #eef4f1; }
.pnl-chip.gain { background: #e3f4ee; } .pnl-chip.loss { background: #fdeee3; }
.pnl-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pnl-stats div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pnl-stats span { font-size: 12px; color: var(--muted); }
.pnl-stats b { font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pnl-right { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pnl-toolbar { gap: 8px; }
.pnl-chart { position: relative; min-height: 300px; }
.pnl-chart svg { display: block; overflow: visible; }
.pnl-chart .grid { stroke: #e7eeea; stroke-width: 1; }
.pnl-chart .axis0 { stroke: #c9d6cf; stroke-width: 1; }
.pnl-chart .tick { fill: var(--muted); font: 600 11px var(--sans); }
.pnl-chart .endlabel { fill: var(--text); font: 800 12px var(--sans); }
.pnl-chart .cross { stroke: #9fb3a9; stroke-width: 1; }
.pnl-tip { position: absolute; transform: translate(-50%, calc(-100% - 12px)); background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 11px; font-size: 12.5px; box-shadow: 0 10px 24px rgba(19,48,74,.14); pointer-events: none; opacity: 0; transition: opacity .1s; white-space: nowrap; z-index: 5; display: flex; flex-direction: column; gap: 2px; }
.pnl-tip.on { opacity: 1; }
.cal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav b { min-width: 130px; text-align: center; }
.cal-month { font-size: 13px; color: var(--muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; padding: 4px 0; }
.cal-cell { min-height: 66px; border-radius: 8px; background: #f5f8f7; padding: 6px 7px; display: flex; flex-direction: column; gap: 2px; position: relative; }
.cal-cell.blank { background: transparent; }
.cal-cell.gain { background: rgba(27, 158, 119, var(--w, .12)); box-shadow: inset 3px 0 0 #1b9e77; }
.cal-cell.loss { background: rgba(217, 95, 2, var(--w, .12)); box-shadow: inset 3px 0 0 #d95f02; }
.cal-cell.today { outline: 2px solid var(--forest); outline-offset: -2px; }
.cal-day { font-size: 11.5px; font-weight: 700; color: var(--text2); }
.cal-val { font-size: 13px; font-weight: 800; text-align: center; margin-top: auto; font-variant-numeric: tabular-nums; }
.cal-n { font-size: 11px; color: var(--muted); text-align: center; }
.cal-grid.compact .cal-cell { min-height: 42px; padding: 4px 5px; }
.cal-grid.compact .cal-val { font-size: 11px; }
@media (max-width: 980px) { .pnl-hero { grid-template-columns: 1fr; } .pnl-left { border-right: 0; border-bottom: 1px solid var(--line); } }
@media (max-width: 560px) { .pnl-stats { grid-template-columns: 1fr 1fr; } .cal-cell { min-height: 48px; padding: 4px; } .cal-val { font-size: 10.5px; } .cal-n { display: none; } }

.pnl-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.pnl-mini div { display: flex; flex-direction: column; gap: 2px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.pnl-mini span { font-size: 11.5px; color: var(--muted); }
.pnl-mini b { font-size: 14.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* form open: daftar pool dari CA token */
.pool-pick { display: grid; gap: 6px; margin-top: 6px; }
.pool-pick:empty { display: none; }
.pp-head { font-size: 12px; }
.pp-item { display: grid; gap: 2px; text-align: left; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); cursor: pointer; font: inherit; }
.pp-item:hover:not(:disabled) { border-color: var(--leaf); }
.pp-item.on { border-color: var(--forest); box-shadow: 0 0 0 1px var(--forest) inset; background: #f1faf5; }
.pp-item:disabled { opacity: .55; cursor: not-allowed; }
.pp-item:focus-visible { outline: 2px solid var(--leaf); outline-offset: 1px; }
.pp-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pp-meta { font-size: 12px; overflow-wrap: anywhere; }
