/* ERP Devata. Token dari Pedoman Identitas Brand Devata Edisi 1.0 (ops/brand_guideline/build.py).
   Kontras: teks Ink di Cream 16:1, tombol kuning + Ink 10,07:1, tautan Teal Ink #14757F di Cream 4,9:1.
   Devata Teal #2FBAC8 TIDAK dipakai untuk teks di Cream (2,15:1, gagal). */
:root {
  --yellow: #FFB82E; --ydeep: #F5A623; --ysoft: #fff6e2;
  --teal: #2FBAC8; --tdeep: #1A8A96; --tink: #14757F; --tlight: #6FD3DC; --tbg: #d7f3f5;
  --ink: #1A1A1A; --cream: #F7F5F0; --cream2: #F0EDE6; --white: #fff; --maroon: #803030;
  --muted: #5d5b57; --line: rgba(26, 26, 26, .12); --edge: rgba(26, 26, 26, .22);
  --ok: #1f7a4d; --okbg: #e3f4ea; --warn: #8a5a00; --warnbg: #fff1d1; --bad: #9b1c1c; --badbg: #fbeaea; --info: #14757F; --infobg: #d7f3f5;
  --inkbg: #1A1A1A; --dark: #1A1A1A; --on-bad: #fff; --glass: rgba(247, 245, 240, .88); --glass2: rgba(255, 255, 255, .94); --line2: rgba(26, 26, 26, .2); --gridline: rgba(26, 26, 26, .08); --notefg: #0e4f56;
  --r-card: 28px; --r-sm: 14px; --shadow: 0 4px 12px rgba(0, 0, 0, .06); --shadow-h: 0 10px 28px rgba(26, 138, 150, .16);
  /* Skala (19 Nov 2026, rombak UI/UX): spasi kelipatan 4px, ukuran teks 12/14/16/20/24/32, elevasi dan radius. Token warna di atas tidak berubah. */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 28px; --s8: 32px;
  --t12: 12px; --t14: 14px; --t16: 16px; --t20: 20px; --t24: 24px; --t32: 32px;
  --elev1: 0 1px 2px rgba(26, 26, 26, .08); --elev2: 0 4px 12px rgba(26, 26, 26, .08); --elev3: 0 12px 32px rgba(26, 26, 26, .16);
  --r-xs: 8px; --r-md: 12px; --r-pill: 99px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 15px/1.55 Poppins, system-ui, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3 { font-family: 'Baloo 2', Poppins, sans-serif; font-weight: 800; line-height: 1.12; margin: 0 0 .35em; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4vw, 40px); } h2 { font-size: 22px; } h3 { font-size: 19px; }
a { color: var(--tink); font-weight: 600; } a:hover { color: var(--ink); }
p { margin: 0 0 .6em; }
code, pre { font-family: Consolas, ui-monospace, monospace; }
.ic { flex: none; vertical-align: middle; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 24px 16px 40px; flex: 1; }
.foot { text-align: center; font-size: 12px; color: var(--muted); padding: 18px 16px 26px; }

/* bar atas */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 10px 20px;
  background: var(--glass); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-erp { font: 800 13px Poppins; letter-spacing: .14em; background: var(--inkbg); color: var(--yellow); border-radius: 99px; padding: 2px 10px; }
.top-nav { display: flex; gap: 4px; margin-left: 8px; }
.top-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; padding: 7px 14px; border-radius: 99px; }
.top-nav a:hover { background: var(--cream2); } .top-nav a.on { background: var(--inkbg); color: #fff; }
.who { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.who form { margin: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; font: 800 15px 'Baloo 2'; }
.who-n { font-weight: 600; font-size: 14px; }
.icon-btn { border: 0; background: transparent; cursor: pointer; padding: 6px; border-radius: 10px; color: var(--ink); }
.icon-btn:hover { background: var(--cream2); }

/* komponen dasar */
.card { background: var(--white); border-radius: var(--r-card); border: 1px solid var(--edge); box-shadow: var(--shadow); }
.sec { padding: 22px 24px; margin-bottom: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border-radius: 99px;
  border: 2px solid var(--ink); background: var(--white); color: var(--ink); font: 700 14px Poppins; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--cream2); color: var(--ink); }
.btn.primary { background: var(--yellow); border-color: var(--yellow); box-shadow: 0 4px 12px rgba(245, 166, 35, .28); }
.btn.primary:hover { background: var(--ydeep); border-color: var(--ydeep); }
.btn.ghost { border-color: var(--line); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .chip:focus-visible { outline: 3px solid var(--tink); outline-offset: 2px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 3px 12px; font: 700 12px Poppins; letter-spacing: .02em; text-decoration: none; white-space: nowrap; }
.pill.ok { background: var(--okbg); color: var(--ok); } .pill.warn { background: var(--warnbg); color: var(--warn); }
.pill.bad { background: var(--badbg); color: var(--bad); } .pill.info { background: var(--infobg); color: var(--info); }
.pill.mute { background: var(--cream2); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.badge { width: 48px; height: 48px; border-radius: 14px; background: var(--tbg); color: var(--tink); display: grid; place-items: center; flex: none; }
.badge.solid { background: var(--tdeep); color: #fff; }
.badge.big { width: 60px; height: 60px; border-radius: 18px; }
.eyebrow { font: 700 12px Poppins; letter-spacing: .14em; text-transform: uppercase; color: var(--tink); margin-bottom: 4px; }
.alert { border-radius: var(--r-sm); padding: 10px 14px; margin: 0 0 14px; font-size: 14px; }
.alert.bad { background: var(--badbg); color: var(--bad); border-left: 5px solid var(--bad); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.merah { background: #d64545; } .dot.kuning { background: var(--yellow); } .dot.hijau { background: #2fa36b; } .dot.abu { background: #b9b5ad; }
.dot-t { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 6px; }

/* beranda */
.hero { position: relative; display: flex; align-items: center; gap: 24px; padding: 30px 34px; margin-bottom: 22px; border-radius: var(--r-card);
  background: var(--white); border: 1px solid var(--edge); overflow: hidden; }
.hero-txt { position: relative; z-index: 1; max-width: 680px; }
.hero .eyebrow { color: var(--ink); opacity: .8; }
.hero .lead { font-size: 16px; font-weight: 500; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.dcard { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--white); border-radius: var(--r-card); border: 1px solid var(--edge);
  box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; overflow: hidden; min-height: 230px; }
.dcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); color: var(--ink); }
.dcard h2 { font-size: 22px; margin: 0; }
.dcard-h { display: flex; gap: 12px; align-items: center; }
.dcard .pic { font-size: 12px; font-weight: 600; color: var(--muted); margin: 0; }
.dcard .health { margin-left: auto; display: flex; align-items: center; }
.dcard .tag { font-weight: 400; font-size: 14px; color: var(--muted); margin: 0; }
.kpi-row { display: flex; gap: 10px; flex-wrap: wrap; }
.kpi-s { background: var(--cream); border-radius: var(--r-sm); padding: 8px 12px; min-width: 120px; flex: 1; }
.kpi-s span { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.kpi-s b { font: 800 18px 'Baloo 2'; }
.dcard-f { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.dcard .go { color: var(--tink); display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.dcard.gm { grid-column: span 2; background: var(--white); border: 2px solid var(--yellow); }
.dcard.gm .badge { background: var(--yellow); color: var(--ink); }
.dcard.gm h2 { font-size: 28px; }
.dcard.masukan { background: var(--inkbg); color: #fff; border-color: var(--inkbg); padding-right: 150px; }
.dcard.masukan .tag, .dcard.masukan .pic, .dcard.masukan .dcard-f { color: rgba(255, 255, 255, .78); }
.dcard.masukan .kpi-s { background: rgba(255, 255, 255, .1); } .dcard.masukan .kpi-s span { color: rgba(255, 255, 255, .7); }
.dcard.masukan .go { color: var(--yellow); }
.dcard.masukan:hover { color: #fff; }
.flow ol.steps, ol.steps { list-style: none; counter-reset: s; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
ol.steps li { counter-increment: s; background: var(--cream); border-radius: var(--r-sm); padding: 14px; font-size: 13px; }
ol.steps li::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tdeep); color: #fff; font: 800 14px 'Baloo 2'; margin-bottom: 8px; }
ol.steps li b { display: block; font-size: 14px; } ol.steps li span { color: var(--muted); }
.flow { padding: 22px 24px; }
aside ol.steps, ol.steps.small { grid-template-columns: 1fr; }

/* dashboard */
.dhead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 24px; margin-bottom: 20px; }
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 14px; width: 100%; }
.dtitle { display: flex; gap: 16px; align-items: center; flex: 1; min-width: 260px; }
.dtitle h1 { margin: 0; } .dtitle p { margin: 0; }
.pill-h { display: inline-flex; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 99px; padding: 3px 12px; }
.dgrid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.dmain { min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--white); border-radius: 18px; padding: 14px 16px; border: 1px solid var(--edge); }
.kpi span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.kpi b { display: block; font: 800 24px 'Baloo 2'; margin: 2px 0; word-break: break-word; }
.kpi small { font-size: 12px; color: var(--muted); }
.kpi.ok span::before, .kpi.warn span::before, .kpi.bad span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.kpi.ok span::before { background: #2fa36b; } .kpi.warn span::before { background: var(--yellow); } .kpi.bad span::before { background: #d64545; }
.src { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.tbl { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:hover { background: var(--cream); }
ul.plain { margin: 0; padding-left: 18px; } ul.plain li { margin-bottom: 6px; }
.findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.finding { background: var(--cream); border-radius: 18px; padding: 12px 16px; }
.finding .f-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.finding p { font-size: 14px; margin: 6px 0 0; } .finding .rec { color: var(--tink); font-weight: 500; }
.finding .src { margin-top: 6px; }
.fat-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--ysoft); border-color: var(--yellow); }

/* chat agent */
.chat { position: sticky; top: 76px; padding: 18px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 96px);
  background: var(--glass2); backdrop-filter: blur(20px); border-color: var(--line); }
.chat-h { display: flex; gap: 12px; align-items: center; } .chat-h h3 { margin: 0; } .chat-h p { margin: 0; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; min-height: 220px; max-height: 52vh; padding-right: 4px; }
.msg { border-radius: 18px; padding: 10px 14px; font-size: 14px; max-width: 92%; overflow-wrap: anywhere; }
.msg.model { background: var(--cream); align-self: flex-start; border-bottom-left-radius: 6px; }
.msg.user { background: var(--inkbg); color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; }
.msg.err { background: var(--badbg); color: var(--bad); }
.msg ul { margin: 6px 0; padding-left: 18px; }
.msg.typing { color: var(--muted); font-style: italic; }
.draft { border: 2px dashed var(--tdeep); border-radius: 18px; padding: 12px 14px; font-size: 13px; background: var(--tbg); }
.draft b { display: block; margin-bottom: 4px; }
.chat-f { display: flex; gap: 8px; align-items: flex-end; }
.chat-f textarea { flex: 1; resize: none; }
.chip { border: 1px solid var(--line); background: var(--white); border-radius: 99px; padding: 6px 12px; font: 600 12px Poppins; cursor: pointer; color: var(--ink); }
.chip:hover { border-color: var(--tink); color: var(--tink); }

/* form */
.form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
input, select, textarea { font: 400 15px Poppins; color: var(--ink); background: var(--white); border: 1.5px solid var(--line2); border-radius: var(--r-sm); padding: 10px 12px; width: 100%; }
textarea { line-height: 1.5; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: center; }
.filters select, .filters input { width: auto; flex: 1 1 160px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; } .chk input { width: auto; }

/* masukan */
.fb-list { display: grid; gap: 8px; }
.fb-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px; background: var(--cream); color: var(--ink); text-decoration: none; }
.fb-row:hover { background: var(--cream2); color: var(--ink); }
.fb-id { font: 800 16px 'Baloo 2'; color: var(--muted); min-width: 40px; }
.fb-t { flex: 1; min-width: 0; } .fb-t b { display: block; font-weight: 600; } .fb-t small { color: var(--muted); }
.stepper { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; flex-wrap: wrap; }
.stepper li { flex: 1 1 120px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--cream); border-radius: 99px; padding: 6px 12px 6px 6px; }
.stepper li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--white); border: 1px solid var(--line); font: 800 13px 'Baloo 2'; flex: none; }
.stepper li.done { color: var(--ok); } .stepper li.done span { background: #2fa36b; color: #fff; border-color: #2fa36b; }
.stepper li.now { background: var(--inkbg); color: #fff; } .stepper li.now span { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.side { margin: 12px 0 0; font-size: 14px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv span { font-size: 13px; font-weight: 700; color: var(--muted); } .kv p { margin: 0; font-size: 14px; }
.body { white-space: normal; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--tbg); }
.timeline li { position: relative; padding: 0 0 14px 16px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 5px; width: 13px; height: 13px; border-radius: 50%; background: var(--tdeep); border: 2px solid var(--white); }
.timeline .t { display: block; font-size: 12px; color: var(--muted); }
.timeline p { margin: 4px 0 0; color: var(--muted); }
.btns { display: flex; gap: 10px; flex-wrap: wrap; } form.inline { display: inline; margin: 0; }
.patch summary { cursor: pointer; font-weight: 700; color: var(--tink); margin: 12px 0 8px; }
.patch pre { background: #14181a; color: #e6e6e6; border-radius: 18px; padding: 14px; overflow-x: auto; font-size: 12.5px; line-height: 1.45; max-height: 560px; }
.patch .add { color: #8fe3a5; } .patch .del { color: #ff9a9a; } .patch .hunk { color: #6FD3DC; }
.tips h3 { margin-top: 0; }

/* login */
.login { display: flex; align-items: center; justify-content: center; gap: 30px; min-height: 78vh; flex-wrap: wrap; }
.login-card { padding: 30px; width: 100%; max-width: 420px; }
.login-card h1 { margin-top: 14px; }

@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dgrid { grid-template-columns: 1fr; }
  .chat { position: static; max-height: none; }
  ol.steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  .topbar { padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  .top-nav { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .who-n { display: none; }
  .wrap { padding: 16px 16px 30px; }
  .hero { padding: 22px; flex-direction: column; align-items: flex-start; }
  .hero .lead { font-size: 14px; }
  .dcard-h { flex-wrap: wrap; }
  .dcard .health { margin-left: 60px; width: 100%; }
  .dcard h2, .dcard.gm h2 { font-size: 22px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .dcard.gm { grid-column: auto; }
  .dcard.masukan { padding-right: 22px; }
  .sec { padding: 18px 16px; }
  .row2 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 4px; }
  ol.steps { grid-template-columns: 1fr; }
}
@media print { .topbar, .chat, .foot { display: none; } .dgrid { grid-template-columns: 1fr; } }
.more summary{cursor:pointer;font-weight:700;color:var(--tink);margin:10px 0}
/* masuk lewat Portal (Google) */
.btn.google { gap: 10px; margin: 6px 0 4px; }
.btn.google svg { background: #fff; border-radius: 50%; padding: 2px; }
.center { text-align: center; }
.or { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ================================================================== ERP v2: kerangka aplikasi
   Sidebar kiri (seperti FAT), bar atas, konten, bot melayang. Warna tetap token brand Edisi 1.0. */
body.app { display: block; min-height: 100vh; }
.sb { position: fixed; inset: 0 auto 0 0; width: 252px; z-index: 40; display: flex; flex-direction: column; background: var(--white); border-right: 1px solid var(--line); }
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 12px; text-decoration: none; }
.sb-nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.nv-g { margin: 16px 10px 6px; font: 700 11px Poppins; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nv { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.nv:hover { background: var(--cream); color: var(--ink); }
.nv.on { background: var(--inkbg); color: #fff; }
.nv.on .ic { color: var(--yellow); }
.nv span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv .dot { width: 8px; height: 8px; }
.nv .cnt { background: var(--yellow); color: var(--ink); border-radius: 99px; font-size: 11px; padding: 1px 8px; }
.nv .cnt.bad { background: var(--badbg); color: var(--bad); } .nv.on .cnt.bad { background: var(--bad); color: var(--on-bad); }
.nv.ext { font-weight: 500; color: var(--muted); }
.nv-sub { margin: 4px 0 8px 22px; padding-left: 12px; border-left: 2px solid var(--tbg); display: grid; gap: 2px; }
.nv-sub a { display: block; padding: 6px 10px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; }
.nv-sub a:hover { background: var(--cream); color: var(--ink); }
.nv-sub a.on { background: var(--ysoft); color: var(--ink); box-shadow: inset 3px 0 0 var(--yellow); }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.sb-user div { flex: 1; min-width: 0; } .sb-user b { display: block; font-size: 14px; } .sb-user small { color: var(--muted); font-size: 12px; }
.sb-user form { margin: 0; }
.sb-scrim { display: none; }
.main { margin-left: 252px; min-height: 100vh; display: flex; flex-direction: column; }
.bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px 28px; background: var(--glass); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bar .menu { display: none; }
.bar-t { flex: 1; min-width: 0; }
.bar-t h1 { font-size: 26px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs { margin: 0; font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); font-weight: 600; text-decoration: none; } .crumbs a:hover { color: var(--tink); }
.crumbs i { font-style: normal; opacity: .5; } .crumbs i:last-child { display: none; }
.bar-a { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pagehead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 28px 0; }
.pagehead p { margin: 0; }
.content { padding: 18px 28px 30px; flex: 1; width: 100%; max-width: 1500px; }
.content > .kpis { margin-bottom: 18px; }
.sec-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sec-h h3 { margin: 0; } .sec-h p { margin: 2px 0 0; }
.sec-a { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sec-a form { margin: 0; }
.sec h4 { font: 700 15px 'Baloo 2'; margin: 16px 0 8px; }
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.g2 > .sec { margin-bottom: 18px; }
.kpis.two { grid-template-columns: repeat(2, 1fr); } .kpis.three { grid-template-columns: repeat(3, 1fr); }
.kpi.link { text-decoration: none; color: var(--ink); transition: transform .12s, box-shadow .12s; }
.kpi.link:hover, .kpi.askable:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); color: var(--ink); }
.kpi.askable { cursor: pointer; }
.empty-box { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--cream); color: var(--muted); font-size: 14px; }
.empty-box.ok { background: var(--okbg); color: var(--ok); } .empty-box.bad { background: var(--badbg); color: var(--bad); }
p.empty { margin: 4px 0; }
.note-strip { display: flex; gap: 10px; align-items: flex-start; background: var(--tbg); color: var(--notefg); border-radius: 18px; padding: 12px 16px; margin-bottom: 18px; font-size: 14px; }
.note-strip .ic { margin-top: 2px; }
.bad-t { color: var(--bad); }
.prog { height: 10px; border-radius: 99px; background: var(--cream2); overflow: hidden; min-width: 60px; }
.prog i { display: block; height: 100%; background: var(--tdeep); border-radius: 99px; }
.prog.ok i { background: #2fa36b; } .prog.warn i { background: var(--yellow); } .prog.bad i { background: #d64545; }
.prog.big { height: 16px; margin: 10px 0; }
.prog.sm { height: 7px; display: inline-block; width: 70px; vertical-align: middle; margin-right: 6px; }
.btn.ghost { background: transparent; }
pre.log { background: #14181a; color: #e6e6e6; border-radius: 18px; padding: 14px; font-size: 12px; line-height: 1.45; max-height: 420px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
iframe.report { width: 100%; height: 78vh; border: 1px solid var(--edge); border-radius: 18px; background: #fff; }

/* tabel interaktif */
.dt-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.dt-tools input, .dt-tools select { width: auto; flex: 0 1 200px; padding: 7px 10px; font-size: 13px; }
.dt-tools .dt-n { margin-left: auto; }
.th-b { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: inherit; }
.th-b:hover { color: var(--ink); }
th[aria-sort="ascending"] .th-b::after { content: " \2191"; } th[aria-sort="descending"] .th-b::after { content: " \2193"; }
th.r, td.r { text-align: right; white-space: nowrap; }
td { white-space: nowrap; } td.w { white-space: normal; min-width: 220px; max-width: 520px; }
tr.click { cursor: pointer; } tr.click:focus-visible { outline: 3px solid var(--tink); outline-offset: -3px; }
tr.t-bad td:first-child { box-shadow: inset 4px 0 0 #d64545; } tr.t-warn td:first-child { box-shadow: inset 4px 0 0 var(--yellow); } tr.t-ok td:first-child { box-shadow: inset 4px 0 0 #2fa36b; }
td small { color: var(--muted); }
.dt-pg { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 10px; }

/* grafik */
.chart { width: 100%; min-height: var(--h, 220px); position: relative; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--gridline); }
.chart .ax { font: 500 11px Poppins; fill: var(--muted); }
.chart-lg { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.chart-lg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart-tip { position: fixed; z-index: 120; pointer-events: none; background: var(--inkbg); color: #fff; font-size: 12px; border-radius: 10px; padding: 7px 10px; box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }
.chart-tip b { display: block; color: var(--yellow); }

/* panel detail */
.drawer { position: fixed; inset: 0; z-index: 90; background: rgba(26, 26, 26, 0); transition: background .18s; }
.drawer.on { background: rgba(26, 26, 26, .35); }
.drawer-p { position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--white); box-shadow: -10px 0 40px rgba(0, 0, 0, .18); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
.drawer.on .drawer-p { transform: none; }
.drawer-h { display: flex; align-items: flex-start; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-h h3 { flex: 1; margin: 0; }
.drawer-b { padding: 6px 20px 20px; overflow-y: auto; }
.drawer-b .kv { grid-template-columns: 1fr; gap: 4px; }
.drawer-b .kv p { white-space: pre-wrap; overflow-wrap: anywhere; }
.drawer-b .btns { margin-top: 16px; }

/* beranda v2 */
.homegrid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; margin-bottom: 18px; }
.homegrid .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.dcard-l { display: flex; flex-wrap: wrap; gap: 6px; } .dcard-l span { font-size: 11px; font-weight: 600; color: var(--tink); background: var(--tbg); border-radius: 99px; padding: 2px 9px; }
.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.todo li { background: var(--cream); border-radius: 14px; padding: 9px 12px; }
.todo a { color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; display: block; }
.todo small { color: var(--muted); font-size: 12px; }
.vital { display: flex; gap: 20px; align-items: center; padding: 22px 26px; margin-bottom: 18px; background: var(--white); border: 2px solid var(--yellow); }
.vital-l { flex: 1; } .vital h2 { font-size: 30px; margin: 0; } .vital h2 small { font-size: 16px; color: var(--muted); }
.narr { margin: 10px 0 0; padding-left: 18px; font-size: 14px; } .narr li { margin-bottom: 4px; }

/* antrean CEO, pertanyaan */
.qcols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; align-items: start; }
.qcol > h3 { display: flex; align-items: center; gap: 8px; margin: 0; } .qcol > p { margin: 2px 0 10px; }
.qcard { background: var(--white); border: 1px solid var(--edge); border-radius: 20px; padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.qcard.late { border-left: 5px solid #d64545; }
.qcard h4 { font: 700 16px 'Baloo 2'; margin: 8px 0 6px; line-height: 1.25; }
.qcard p { margin: 0 0 6px; }
.qcard-h { display: flex; gap: 6px; flex-wrap: wrap; }
.qcard-a { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-top: 8px; }
.op-f { display: flex; gap: 8px; flex: 1 1 260px; align-items: flex-end; margin: 0; }
.op-f input, .op-f textarea { padding: 7px 10px; font-size: 13px; }

/* kanban content plan */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.kcol { background: var(--cream); border-radius: 18px; padding: 10px; min-height: 120px; }
.kcol h5 { margin: 2px 4px 10px; font: 700 13px Poppins; display: flex; justify-content: space-between; }
.kcol h5 span { background: var(--white); border-radius: 99px; padding: 0 8px; font-size: 12px; }
.kcard { background: var(--white); border-radius: 14px; padding: 9px 11px; margin-bottom: 8px; border: 1px solid var(--edge); }
.kcard.late { border-left: 4px solid #d64545; }
.kcard b { display: block; font-size: 13px; font-weight: 600; line-height: 1.35; } .kcard span { display: block; margin-top: 4px; }

/* kartu platform */
.pcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.pcard { background: var(--white); border: 1px solid var(--edge); border-radius: 22px; padding: 16px 18px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.pcard:hover { box-shadow: var(--shadow-h); color: var(--ink); }
.pcard-h { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.pcard .big { font: 800 24px 'Baloo 2'; margin: 10px 0 2px; }
.pcard p { margin: 0; }

/* bot agent melayang (gaya Asisten Portal, warna brand) */
.dock { position: fixed; z-index: 70; top: 0; right: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px;
  border-radius: 99px; background: var(--glass2); border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(26, 26, 26, .18); backdrop-filter: blur(8px); transition: opacity .18s, transform .18s; }
.dock[data-side="left"] { right: auto; left: 14px; }
.dock.drag { transition: none; box-shadow: 0 16px 36px rgba(26, 26, 26, .28); }
.dock.off, .dock.hide-for-panel { opacity: 0; pointer-events: none; transform: scale(.85); }
.dock-grip, .dock-hide { display: flex; align-items: center; justify-content: center; width: 40px; border: 0; background: transparent; color: var(--muted); padding: 0; cursor: pointer; }
.dock-grip { height: 14px; cursor: grab; touch-action: none; } .dock-grip:active { cursor: grabbing; }
.dock-grip i { display: block; width: 18px; height: 4px; border-radius: 4px; background: currentColor; opacity: .7; }
.dock-hide { height: 22px; border-radius: 99px; } .dock-hide:hover { background: var(--cream); color: var(--ink); }
.bot-launch { width: 54px; height: 54px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; touch-action: none; filter: drop-shadow(0 4px 8px rgba(26, 26, 26, .22)); transition: transform .18s cubic-bezier(.34, 1.56, .64, 1); }
.bot-launch:hover { transform: scale(1.07); } .bot-launch svg { display: block; width: 100%; height: 100%; }
.bot-launch .eye { transform-box: fill-box; transform-origin: center; animation: blink 6s infinite; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.15); } }
.dock-tab { position: fixed; z-index: 70; right: 0; top: 50%; display: none; align-items: center; justify-content: center; width: 24px; height: 48px; padding: 0; border: 0; border-radius: 12px 0 0 12px; cursor: pointer; background: var(--yellow); color: var(--ink); box-shadow: 0 6px 16px rgba(26, 26, 26, .2); }
.dock-tab[data-side="left"] { right: auto; left: 0; border-radius: 0 12px 12px 0; }
.dock-tab.on { display: flex; }
.bot { position: fixed; z-index: 80; right: 20px; bottom: 20px; width: 400px; max-width: calc(100vw - 24px); height: min(640px, calc(100vh - 40px)); display: none; flex-direction: column; overflow: hidden;
  background: var(--white); border: 1px solid var(--edge); border-radius: 24px; box-shadow: 0 24px 60px rgba(26, 26, 26, .25); }
.bot[data-side="left"] { right: auto; left: 20px; }
.bot.on { display: flex; animation: pop .2s cubic-bezier(.16, 1, .3, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.bot-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--inkbg); color: #fff; }
.bot-ic { width: 36px; height: 36px; flex: none; } .bot-ic svg { width: 100%; height: 100%; display: block; }
.bot-t { flex: 1; min-width: 0; } .bot-t b { display: block; font: 800 16px 'Baloo 2'; } .bot-t span { display: block; font-size: 11px; opacity: .75; }
.bot-hb { width: 32px; height: 32px; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; }
.bot-hb:hover { background: rgba(255, 255, 255, .14); }
.bot-tabs { display: flex; gap: 4px; padding: 8px 10px 0; background: var(--inkbg); }
.bot-tabs button { flex: 1; border: 0; border-radius: 12px 12px 0 0; padding: 8px; font: 700 13px Poppins; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .8); cursor: pointer; }
.bot-tabs button.on { background: var(--cream); color: var(--ink); }
.bot-pane { display: none; flex: 1; min-height: 0; flex-direction: column; background: var(--cream); }
.bot-pane.on { display: flex; }
.bot-b { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.bot .msg.model { background: var(--white); }
.bot-chips { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 10px; }
.bot-f { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--line); background: var(--white); }
.bot-f textarea { flex: 1; resize: none; min-height: 42px; max-height: 120px; padding: 9px 12px; font-size: 14px; }
.bot-send { width: 42px; height: 42px; flex: none; border: 0; border-radius: 14px; background: var(--yellow); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.bot-send:hover { background: var(--ydeep); }
.bot-foot { padding: 0 12px 8px; font-size: 11px; color: var(--muted); background: var(--white); }
.bot-fb { padding: 14px; display: grid; gap: 10px; overflow-y: auto; }
.bot-fb p { margin: 0; } .bot-fb input, .bot-fb select, .bot-fb textarea { font-size: 14px; padding: 8px 10px; }
.draft .btn { margin: 6px 6px 0 0; }
.draft .err { color: var(--bad); }

@media (max-width: 1280px) {
  .homegrid { grid-template-columns: minmax(0, 1fr); }
  .pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .sb { transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0, 0, 0, .2); }
  body.side-on .sb { transform: none; }
  body.side-on .sb-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(26, 26, 26, .35); }
  .main { margin-left: 0; }
  .bar .menu { display: grid; }
  .g2, .qcols { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .bar { padding: 10px 16px; flex-wrap: wrap; }
  .bar-t h1 { font-size: 20px; }
  .bar-a { width: 100%; justify-content: flex-start; }
  .pagehead, .content { padding-left: 16px; padding-right: 16px; }
  .homegrid .cards, .pcards { grid-template-columns: minmax(0, 1fr); }
  .kpis.three { grid-template-columns: 1fr; }
  .vital { flex-direction: column; align-items: flex-start; }
  .bot { right: 8px; left: 8px; bottom: 8px; width: auto; height: calc(100dvh - 16px); }
  .bot[data-side="left"] { left: 8px; }
  .dt-tools input, .dt-tools select { flex: 1 1 140px; }
  iframe.report { height: 70vh; }
}
@media (prefers-reduced-motion: reduce) { .bot-launch .eye { animation: none; } .bot.on { animation: none; } .drawer-p { transition: none; } }
@media print { .sb, .bar, .dock, .dock-tab, .bot { display: none !important; } .main { margin: 0; } }

/* panel agent di dalam iframe (aplikasi FAT) */
body.botframe { background: var(--white); min-height: 0; }
.botframe .dock, .botframe .dock-tab, .botframe .drawer { display: none !important; }
.botframe .bot { position: static; display: flex; width: 100%; max-width: none; height: 100vh; border: 0; border-radius: 0; box-shadow: none; animation: none; }

/* bot versi ringkas (6 Okt siang): bola maskot saja, panel putih sederhana, chip rata kiri */
.dock { padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; border-radius: 50%; right: 18px; }
.dock[data-side="left"] { left: 18px; }
.dock.drag { box-shadow: none; }
.bot-launch { width: 58px; height: 58px; cursor: pointer; }
.dock.drag .bot-launch { cursor: grabbing; transform: scale(1.08); }
.bot-h { background: var(--white); color: var(--ink); border-bottom: 1px solid var(--line); padding: 10px 12px; }
.bot-ic { width: 30px; height: 30px; }
.bot-t { font: 800 16px 'Baloo 2'; }
.bot-hb { color: var(--muted); } .bot-hb:hover { background: var(--cream); color: var(--ink); }
.bot-pane { background: var(--white); }
.bot-b { background: var(--white); }
.bot .msg.model { background: var(--cream); }
.bot-chips { align-items: stretch; }
.bot-chips .chip { text-align: left; border-radius: 12px; padding: 8px 12px; font-weight: 500; line-height: 1.35; white-space: normal; }
.bot-f { border-top: 1px solid var(--line); }
.bot-foot { display: flex; gap: 14px; align-items: center; padding: 0 12px 10px; }
.bot-foot span { margin-left: auto; }
.lnk { border: 0; background: none; padding: 0; font: 600 12px Poppins; color: var(--tink); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.lnk:hover { color: var(--ink); text-decoration: underline; }
.lnk.back { justify-self: start; }

/* aplikasi divisi (seperti FAT): identitas divisi + kembali ke ERP + menu divisi */
.sb-app { display: flex; align-items: center; gap: 10px; padding: 18px 18px 10px; }
.sb-app .badge { width: 40px; height: 40px; border-radius: 12px; background: var(--yellow); color: var(--ink); }
.sb-app b { display: block; font: 800 17px 'Baloo 2'; line-height: 1.15; } .sb-app small { color: var(--muted); font-size: 12px; }
.sb-back { display: flex; align-items: center; gap: 8px; margin: 0 14px 6px; padding: 8px 12px; border-radius: 12px; background: var(--cream); color: var(--ink); font-size: 13px; font-weight: 700; text-decoration: none; }
.sb-back:hover { background: var(--ysoft); color: var(--ink); }
.sb-dept .nv { padding: 8px 12px; font-size: 13.5px; }
/* halaman tertanam di FAT */
body.embed { background: transparent; }
.embed .content { padding: 0 2px 20px; max-width: none; }

/* tab Tanya / Kirim masukan di atas (versi ringkas berkepala putih) */
.bot-tabs { background: var(--white); padding: 8px 12px 0; gap: 6px; border-bottom: 1px solid var(--line); }
.bot-tabs button { background: transparent; color: var(--muted); border-radius: 10px 10px 0 0; padding: 7px 10px; border-bottom: 3px solid transparent; }
.bot-tabs button.on { background: transparent; color: var(--ink); border-bottom-color: var(--yellow); }
.bot-tabs button:hover { color: var(--ink); }
.bot-foot span { margin-left: 0; }

/* ================================================================== Sensor privasi / blur nominal uang
   Default: BLUR aktif. Angka uang tampak buram demi privasi saat screen-share / proyektor / ruang publik.
   Pengguna dapat mengarahkan kursor untuk mengintip (peek), klik angka untuk membuka/mengunci,
   atau menekan tombol di bar atas untuk mematikan sensor secara global di sesi browser. */
.amt-blur {
  display: inline-block;
  filter: blur(5.5px);
  user-select: none;
  -webkit-user-select: none;
  transition: filter .18s cubic-bezier(.16, 1, .3, 1), transform .12s ease;
  border-radius: 4px;
  cursor: pointer;
}
.kpi b.amt-blur, .kpi-s b.amt-blur, .pcard .big.amt-blur {
  display: block;
}
td.amt-blur {
  display: table-cell;
}
/* Mengintip saat kursor diarahkan atau fokus keyboard */
.amt-blur:hover,
.amt-blur:focus-visible,
.amt-blur.is-revealed {
  filter: none !important;
  user-select: auto;
  -webkit-user-select: auto;
}

/* Privasi dimatikan secara global lewat tombol header */
body.privacy-off .amt-blur {
  filter: none !important;
  user-select: auto;
  -webkit-user-select: auto;
  cursor: inherit;
}

/* Grafik dengan format mata uang (Rp) */
.chart-rp svg {
  filter: blur(6px);
  transition: filter .2s ease;
}
.chart-rp:hover svg,
body.privacy-off .chart-rp svg {
  filter: none !important;
}

/* Tombol sensor nominal di header bar */
.btn-privacy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 99px;
  padding: 4px 12px;
  font: 600 12px Poppins, sans-serif;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  height: 28px;
}
.btn-privacy:hover {
  background: var(--cream2);
  color: var(--ink);
}
.btn-privacy .priv-ic {
  display: inline-flex;
  align-items: center;
}
.btn-privacy .priv-ic-on {
  display: none;
}
.btn-privacy .priv-ic-off {
  display: inline-flex;
  color: var(--warn);
}
body.privacy-off .btn-privacy {
  background: var(--ysoft);
  border-color: var(--yellow);
  color: var(--ink);
}
body.privacy-off .btn-privacy .priv-ic-off {
  display: none;
}
body.privacy-off .btn-privacy .priv-ic-on {
  display: inline-flex;
  color: var(--ok);
}

@media (max-width: 720px) {
  .btn-privacy .priv-t {
    display: none;
  }
}
@media print {
  .amt-blur, .chart-rp svg {
    filter: none !important;
  }
  .btn-privacy {
    display: none !important;
  }
}

/* Penyesuaian HP tambahan (masukan #6): bar, KPI dua kolom, alat tabel */
@media (max-width: 720px) {
  .bar { padding: 10px 14px; }
  .bar-t { min-width: 0; max-width: calc(100% - 44px); }
  .bar-t h1 { font-size: 19px; }
  .crumbs { white-space: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 2px; }
  .pagehead, .content { padding-left: 14px; padding-right: 14px; }
  .kpis, .kpis.three { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 10px 12px; border-radius: 14px; }
  .kpi span { font-size: 11px; }
  .kpi b { font-size: 18px; }
  .dt-tools { gap: 6px; }
  .dt-tools input, .dt-tools select { flex: 1 1 100%; min-width: 0; width: 100%; }
}
@media (max-width: 480px) {
  .kpis, .kpis.two, .kpis.three { grid-template-columns: 1fr; }
}

/* Responsif HP (6 Okt 2026, masukan ERP #6): isi tidak boleh melebihi lebar layar.
   Penyebab: item grid/flex bawaan min-width:auto sehingga ikut selebar konten terlebar (tabel, grafik, dropdown). */
@media (max-width: 1080px) {
  .content > *, .g2 > *, .dgrid > *, .qcols > *, .qcol, .sec, .card { min-width: 0; max-width: 100%; }
  .dgrid, .g2, .qcols { grid-template-columns: minmax(0, 1fr); }
  .dt { max-width: 100%; overflow-x: auto; }
  .chart, .chart svg { max-width: 100%; }
}
@media (max-width: 720px) {
  .sec { padding: 16px; }
  .chart svg { height: auto; }
  select, input, textarea { max-width: 100%; }
  .qcard, .qcard-h { min-width: 0; max-width: 100%; }
  .qcard-h, .sec-h { flex-wrap: wrap; }
  .qcard p, .qcard h3, .fb-t b, .fb-t small, td.w { overflow-wrap: anywhere; }
  td.w { min-width: 160px; }
}

/* Lampiran gambar masukan & chatbot */
.fb-attach { margin-top: 10px; display: inline-flex; flex-direction: column; gap: 6px; }
.fb-attach-img { max-width: 280px; max-height: 200px; border-radius: 12px; border: 1.5px solid var(--line); object-fit: cover; cursor: pointer; transition: transform .15s ease; }
.fb-attach-img:hover { transform: scale(1.02); }
.bot-attach-btn { border: 0; background: transparent; padding: 6px; border-radius: 10px; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.bot-attach-btn:hover { background: var(--cream); color: var(--ink); }
.bot-img-preview { display: none; align-items: center; gap: 8px; padding: 6px 12px; background: var(--cream); border-top: 1px solid var(--line); font-size: 12px; }
.bot-img-preview.on { display: flex; }
.bot-img-preview img { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; border: 1px solid var(--line); }
.bot-img-preview .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 500; }
.bot-img-preview .del { border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; padding: 0 4px; line-height: 1; }
.bot-img-preview .del:hover { color: var(--bad); }
.chat-thumb { max-width: 180px; max-height: 140px; border-radius: 10px; display: block; margin-bottom: 6px; border: 1px solid var(--line); cursor: pointer; }
#fbAttachmentPreview { margin-top: 8px; display: none; }
#fbAttachmentPreview.on { display: block; }
#fbAttachmentPreview img { max-width: 240px; max-height: 160px; border-radius: 10px; border: 1px solid var(--line); display: block; }
@media (max-width: 1080px) {
  p.src, .src, .muted.small { overflow-wrap: anywhere; }
  iframe.report { width: 100%; max-width: 100%; }
}

/* ── persetujuan: popup login + daftar ── */
.apv-pop { position: fixed; inset: 0; z-index: 95; background: rgba(26, 26, 26, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.apv-pop[hidden] { display: none; }
.apv-box { background: var(--white); border: 1px solid var(--edge); border-radius: 22px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.apv-h { display: flex; align-items: center; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.apv-h h3 { flex: 1; margin: 0; }
.apv-b { padding: 12px 20px; overflow-y: auto; display: grid; gap: 14px; }
.apv-g h4 { margin: 0 0 6px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.apv-g .more { background: none; color: var(--muted); font-size: 12px; padding: 0 12px; }
.apv-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* ── jam data GM + banner data baru ── */
.snapbar { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; border-radius: 16px; padding: 10px 16px; margin-bottom: 18px; font-size: 13px; background: var(--okbg); color: var(--ok); }
.snapbar.warn { background: var(--warnbg); color: var(--warn); } .snapbar.bad { background: var(--badbg); color: var(--bad); }
.snapbar b { font-weight: 700; } .snapbar .muted { color: var(--muted); }
.newdata { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px);
  background: var(--inkbg); color: #fff; border-radius: 99px; padding: 10px 12px 10px 20px; box-shadow: 0 10px 28px rgba(0, 0, 0, .25); font-size: 14px; }
.newdata[hidden] { display: none; }
.newdata .btn { background: var(--yellow); border-color: var(--yellow); color: var(--ink); padding: 6px 14px; }
.newdata .icon-btn { color: #fff; }
@media (max-width: 560px) { .newdata { border-radius: 18px; flex-wrap: wrap; bottom: 12px; font-size: 13px; } .snapbar { font-size: 12px; } }

/* ── tab (ui_tabs) + halaman Penomoran Surat (10 Okt 2026) ── */
.tabbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.tab { border: 1px solid var(--line); background: var(--white); border-radius: 99px; padding: 7px 14px; font: 600 13px Poppins; color: var(--ink); cursor: pointer; }
.tab:hover { border-color: var(--tink); color: var(--tink); }
.tab.on { background: var(--inkbg); border-color: var(--ink); color: var(--white); }
.tab:focus-visible { outline: 3px solid var(--tink); outline-offset: 2px; }
.tabp { display: none; } .tabp.on { display: block; }
.sr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.sr-aside { position: sticky; top: 84px; }
.sr-grid > * { min-width: 0; }
.sr-form .row2 { gap: 10px; } .sr-form label { font-size: 13px; } .sr-form input, .sr-form select { padding: 8px 10px; font-size: 14px; }
.seg { display: flex; background: var(--cream2); border-radius: 99px; padding: 4px; gap: 4px; }
.seg-o { flex: 1; margin: 0; position: relative; } .seg-o input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.seg-o span { display: block; text-align: center; border-radius: 99px; padding: 8px 10px; font: 600 13px Poppins; cursor: pointer; color: var(--muted); }
.seg-o input:checked + span { background: var(--white); color: var(--ink); box-shadow: var(--shadow); }
.seg-o input:focus-visible + span { outline: 3px solid var(--tink); outline-offset: 1px; }
.sr-prev { display: grid; gap: 2px; background: var(--ysoft); border: 1px dashed var(--ydeep); border-radius: var(--r-sm); padding: 10px 14px; }
.sr-prev b { font: 700 17px Poppins; word-break: break-all; } .sr-prev b.muted { font-size: 14px; font-weight: 500; color: var(--muted); }
.sr-num { font-family: ui-monospace, Consolas, monospace; font-weight: 700; word-break: break-all; }
.sr-ok { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; background: var(--okbg); border: 1px solid var(--ok); border-radius: var(--r-sm); padding: 14px 18px; margin: 0 0 18px; }
.sr-big { font: 800 22px Poppins; margin: 6px 0 2px; word-break: break-all; }
.sr-ok-a { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.alert.ok { background: var(--okbg); color: var(--ok); border-left: 5px solid var(--ok); }
.sr-ceks { display: grid; gap: 12px; }
.sr-cek { border: 1px solid var(--line); border-left: 5px solid var(--warn); border-radius: var(--r-sm); padding: 12px 14px; background: var(--white); }
.sr-cek-h { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; } .sr-cek-h .btn { margin-left: auto; }
.sr-cek p { margin: 6px 0; }
.sr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.sr-inline { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 8px; margin-top: 8px; }
.sr-inline input { padding: 7px 10px; font-size: 13px; }
.sr-batal { margin-top: 14px; }
@media (max-width: 1180px) { .sr-grid { grid-template-columns: minmax(0, 1fr); } .sr-aside { position: static; order: -1; } }
@media (max-width: 720px) { .sr-inline { grid-template-columns: minmax(0, 1fr); } .sr-ok { padding: 12px 14px; } .sr-big { font-size: 18px; } }
.sr-main .dt { max-width: 100%; overflow-x: auto; }

/* Sosmed: baris aksi sejajar (28 Okt 2026) */
.op-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:6px 0}
.op-row .op-f{display:inline-flex;gap:8px;align-items:center;margin:0}

/* Sosmed: pratinjau konten (28 Okt 2026) */
.pv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.pv-card{border:1px solid var(--line);border-radius:14px;padding:12px;background:var(--cream);min-width:0}
.pv-strip{display:flex;gap:6px;overflow-x:auto;margin:8px 0}
.pv-strip img{height:170px;width:auto;border-radius:8px;flex:none}
.pv-cap{white-space:pre-wrap;max-height:120px;overflow:auto;margin:6px 0 0}

/* Sosmed: form ide (28 Okt 2026) */
.ide-f{display:flex;flex-direction:column;gap:8px;max-width:640px}
.ide-f input,.ide-f textarea,.ide-f select{width:100%}
.ide-row{display:flex;gap:8px;flex-wrap:wrap}.ide-row select{width:auto}.ide-row input{flex:1;min-width:200px}

/* Sosmed: kalender planner 14 hari (29 Okt 2026), HP jadi daftar per hari */
.cal-sum { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; margin: 0 0 12px; }
.bad-t { color: var(--bad); font-weight: 600; }
.cal-brand { margin: 0 0 10px; display: flex; gap: 8px; align-items: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-day { border: 1px solid var(--edge); border-radius: 12px; padding: 8px; background: var(--white); min-width: 0; }
.cal-day.today { border-color: var(--info); box-shadow: 0 0 0 2px var(--infobg); }
.cal-day.off { opacity: .35; background: transparent; }
.cal-dh { font-size: 12px; font-weight: 700; margin-bottom: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cal-cell { margin-bottom: 6px; }
.cal-slot { display: flex; gap: 7px; align-items: center; width: 100%; text-align: left; border: 1px solid var(--edge); border-left: 1px solid var(--muted);
  border-radius: 10px; padding: 5px 7px; margin-bottom: 6px; background: var(--white); font: inherit; font-size: 12px; cursor: pointer; color: var(--ink); }
.cal-cell .cal-slot { margin-bottom: 0; }
.cal-slot b { font-size: 11.5px; flex: none; }
.cal-slot img, .cal-nothumb { width: 36px; height: 45px; object-fit: cover; border-radius: 5px; flex: none; background: var(--cream2); }
.cal-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; align-items: flex-start; }
.cal-slot.ok { border-left-color: var(--ok); } .cal-slot.info { border-left-color: var(--info); }
.cal-slot.warn { border-left-color: #d9a400; } .cal-slot.bad { border-left-color: var(--bad); }
.cal-slot.kosong { border-color: var(--bad); border-left: 1px solid var(--bad); background: var(--badbg); color: var(--bad); font-weight: 700; justify-content: space-between; cursor: default; }
.cal-slot.lewat { opacity: .55; justify-content: space-between; cursor: default; }
.cal-imgs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; }
.cal-imgs img { height: 220px; width: auto; border-radius: 8px; flex: none; }
@media (max-width: 1100px) {
  .cal-grid { grid-template-columns: 1fr; }
  .cal-day.off { display: none; }
  .cal-day { display: grid; grid-template-columns: 80px 1fr; gap: 4px 10px; align-items: start; }
  .cal-dh { grid-row: 1 / span 4; }
}
.cal-meta { overflow: hidden; } .cal-meta .pill { font-size: 10.5px; padding: 1px 7px; max-width: 100%; white-space: normal; line-height: 1.2; }
.cal-slot .small { white-space: normal; line-height: 1.25; }

.cal-ig { display: block; font-size: 11.5px; margin: 2px 0 6px 4px; }

/* Tipografi lebih ringkas (Mas Radev, 2 Nov 2026: teks ERP terlalu besar). Dasar 14px; judul, menu, dan tabel sedikit lebih kecil. */
body { font-size: 14px; }
h1 { font-size: clamp(24px, 3.4vw, 32px); } h2 { font-size: 19px; } h3 { font-size: 16px; }
.bar-t h1 { font-size: 22px; }
input, select, textarea { font-size: 14px; }
table { font-size: 13px; }
.nv, .sb-dept .nv { font-size: 13px; padding: 8px 12px; }
.nv-g { font-size: 10.5px; }
.dcard h2 { font-size: 19px; } .dcard.gm h2 { font-size: 24px; } .vital h2 { font-size: 26px; }
@media (max-width: 720px) { .bar-t h1 { font-size: 18px; } h1 { font-size: 22px; } }

/* Menu samping desktop: ikon saja (sb-mini) atau tersembunyi (sb-hide). Di HP tetap menu geser lama. */
.sb-ctl { display: none; }
.sb-open { display: none; }
@media (min-width: 1081px) {
  .sb, .main { transition: width .18s, margin-left .18s, transform .18s; }
  .sb-ctl { display: flex; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--line); }
  .sb-tg { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); font: 600 12px Poppins, sans-serif; cursor: pointer; }
  .sb-tg:hover { background: var(--cream); } .sb-tg:focus-visible, .sb-open:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
  html.sb-hide .sb { transform: translateX(-100%); } html.sb-hide .main { margin-left: 0; }
  html.sb-hide .sb-open { display: grid; place-items: center; position: fixed; left: 0; top: 12px; width: 34px; height: 36px; z-index: 45; border: 1px solid var(--line); border-left: 0; border-radius: 0 12px 12px 0; background: var(--white); color: var(--ink); cursor: pointer; box-shadow: var(--shadow); }
  html.sb-hide .ibx-tools { padding-left: 44px; } html.sb-hide .content:has(.ibx) .ibx-banner { padding-left: 46px; }
  html.sb-mini .sb { width: 68px; } html.sb-mini .main { margin-left: 68px; }
  html.sb-mini .sb-brand, html.sb-mini .sb-app { padding: 16px 0 8px; justify-content: center; }
  html.sb-mini .sb-brand img, html.sb-mini .sb-app > div { display: none; }
  html.sb-mini .sb-back { margin: 0 10px 6px; padding: 8px 0; justify-content: center; font-size: 0; gap: 0; }
  html.sb-mini .sb-nav { padding: 4px 8px 12px; }
  html.sb-mini .nv, html.sb-mini .sb-dept .nv { justify-content: center; padding: 10px 0; position: relative; gap: 0; }
  html.sb-mini .nv span, html.sb-mini .nv .dot { display: none; }
  html.sb-mini .nv .cnt { position: absolute; top: 1px; right: 3px; min-width: 16px; padding: 0 4px; font-size: 9.5px; text-align: center; }
  html.sb-mini .nv-g { height: 1px; margin: 8px 12px; padding: 0; font-size: 0; overflow: hidden; background: var(--line); }
  html.sb-mini .sb-ctl { flex-direction: column; align-items: center; padding: 8px 0; }
  html.sb-mini .sb-tg { flex: none; width: 40px; padding: 0; } html.sb-mini .sb-tg span { display: none; }
  html.sb-mini .sb-tg[data-sb="mini"] svg { transform: rotate(180deg); }
  html.sb-mini .sb-user { justify-content: center; padding: 10px 0; } html.sb-mini .sb-user div, html.sb-mini .sb-user form { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sb, .main { transition: none; } }

/* Sidebar ala Portal: tombol lipat bulat di tepi, mode ikon dengan kotak membulat seragam, pemisah grup, tooltip. Warna tetap tema ERP. */
.sb-fold { display: none; }
@media (min-width: 1081px) {
  .sb-fold { display: grid; place-items: center; position: absolute; top: 24px; right: -14px; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); cursor: pointer; z-index: 3; }
  .sb-fold:hover { background: var(--ysoft); } .sb-fold:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
  .sb-fold svg { transition: transform .18s; }
  html.sb-mini .sb-fold svg { transform: rotate(180deg); }
  .sb-ctl { padding: 8px 12px 10px; }
  .sb-tg { min-height: 36px; justify-content: flex-start; padding: 0 12px; color: var(--muted); }
  html.sb-mini .nv, html.sb-mini .sb-dept .nv, html.sb-mini .sb-back { width: 44px; height: 44px; margin: 3px auto; padding: 0; border-radius: 12px; justify-content: center; }
  html.sb-mini .sb-back { background: var(--cream); }
  html.sb-mini .sb-tg { width: 44px; height: 44px; margin: 0 auto; padding: 0; justify-content: center; } html.sb-mini .sb-tg span { display: none; }
  html.sb-mini .sb-tg svg { transform: none; }
  html.sb-mini .nv-g { margin: 8px 14px; }
  html.sb-mini .sb-nav { overflow-x: hidden; scrollbar-width: none; } html.sb-mini .sb-nav::-webkit-scrollbar { display: none; }
  html.sb-mini .nv-g { background: var(--line2); }
}

/* ===== Tema gelap: hanya menimpa token. Warna komponen memakai token, bukan nilai tetap. data-theme diatur theme.js (pilihan pengguna atau ikuti sistem). ===== */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #ecebe8; --cream: #131315; --cream2: #1f1f23; --white: #1b1b1f; --maroon: #f0a0a0; --muted: #a9a8a3; --line: rgba(255, 255, 255, .14);
  --edge: rgba(255, 255, 255, .20); --ysoft: #3a2f12; --tbg: #12353a; --tlight: #2a7f89; --tink: #6fd3dc;
  --ok: #5fd08f; --okbg: #12342a; --warn: #ffd180; --warnbg: #3a2e10; --bad: #ff8a8f; --badbg: #3d1d20; --info: #6fd3dc; --infobg: #12353a;
  --on-bad: #1A1A1A; --inkbg: #2b2b32; --glass: rgba(19, 19, 21, .88); --glass2: rgba(27, 27, 31, .94); --line2: rgba(255, 255, 255, .24); --gridline: rgba(255, 255, 255, .1); --notefg: #9fe3ea;
  --shadow: 0 4px 12px rgba(0, 0, 0, .45); --shadow-h: 0 10px 28px rgba(0, 0, 0, .5);
  --elev1: 0 1px 2px rgba(0, 0, 0, .5); --elev2: 0 4px 12px rgba(0, 0, 0, .45); --elev3: 0 12px 32px rgba(0, 0, 0, .6);
}
/* Permukaan kuning/oranye tetap terang di tema gelap, jadi teksnya tetap gelap. */
.avatar, .btn.primary, .dcard.gm .badge, .stepper li.now span, .nv .cnt, .dock-tab, .bot-send, .sb-app .badge, .newdata .btn { --ink: var(--dark); --muted: #4a4743; }
html[data-theme="dark"] .nv .cnt.bad { --ink: var(--ink); }
.sb-theme { display: flex; gap: 4px; padding: 0 12px 8px; }
html.sb-mini .sb-theme { padding: 0 0 6px; justify-content: center; } html.sb-mini .sb-th { flex: none; width: 44px; min-height: 44px; border-radius: 12px; } html.sb-mini .sb-th:not([aria-pressed="true"]) { display: none; }
.sb-th { flex: 1; display: inline-flex; align-items: center; justify-content: center; min-height: 32px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--muted); cursor: pointer; }
.sb-th[aria-pressed="true"] { background: var(--ysoft); color: var(--ink); border-color: var(--yellow); }
.sb-th:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }


/* ==========================================================================
   Kalender Devata: Styling antarmuka kalender tim, kategori, dan modal
   ========================================================================== */

:root {
  --kal-agenda-bg: #ccfbf1;
  --kal-agenda-fg: #0f766e;
  --kal-agenda-border: #99f6e4;
  --kal-cu-bg: #ede9fe;
  --kal-cu-fg: #6d28d9;
  --kal-cu-border: #ddd6fe;
  --kal-mkt-bg: #ffedd5;
  --kal-mkt-fg: #c2410c;
  --kal-mkt-border: #fed7aa;
  --kal-libur-bg: #ffe4e6;
  --kal-libur-fg: #be123c;
  --kal-libur-border: #fecdd3;
  --kal-goog-bg: #dbeafe;
  --kal-goog-fg: #1d4ed8;
  --kal-goog-border: #bfdbfe;
}

html[data-theme="dark"] {
  --kal-agenda-bg: #134e4a;
  --kal-agenda-fg: #5eead4;
  --kal-agenda-border: #115e59;
  --kal-cu-bg: #3b0764;
  --kal-cu-fg: #c4b5fd;
  --kal-cu-border: #581c87;
  --kal-mkt-bg: #7c2d12;
  --kal-mkt-fg: #fdba74;
  --kal-mkt-border: #9a3412;
  --kal-libur-bg: #881337;
  --kal-libur-fg: #fda4af;
  --kal-libur-border: #9f1239;
  --kal-goog-bg: #1e3a8a;
  --kal-goog-fg: #93c5fd;
  --kal-goog-border: #1e40af;
}

.kal-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kal-sync-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.kal-card {
  padding: 20px;
}

.kal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.kal-nav-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.kal-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kal-views {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.kal-views button {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
}

.kal-views button:hover {
  background: var(--cream);
  color: var(--ink);
}

.kal-views button.on {
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
}

.kal-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--line);
}

.kal-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kal-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  user-select: none;
  transition: all .15s;
}

.kal-filter-tag:hover {
  border-color: var(--muted);
}

.kal-filter-tag input {
  margin: 0;
  cursor: pointer;
}

.kal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.kal-tag-agenda .kal-dot { background: #0d9488; }
.kal-tag-clickup .kal-dot { background: #7c3aed; }
.kal-tag-marketing .kal-dot { background: #ea580c; }
.kal-tag-libur .kal-dot { background: #e11d48; }
.kal-tag-google .kal-dot { background: #2563eb; }

.kal-user-filters {
  display: flex;
  align-items: center;
  gap: 14px;
}

.kal-opt-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
}

.kal-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.kal-cat-agenda {
  background: var(--kal-agenda-bg);
  color: var(--kal-agenda-fg);
  border-color: var(--kal-agenda-border);
}

.kal-cat-clickup {
  background: var(--kal-cu-bg);
  color: var(--kal-cu-fg);
  border-color: var(--kal-cu-border);
}

.kal-cat-marketing {
  background: var(--kal-mkt-bg);
  color: var(--kal-mkt-fg);
  border-color: var(--kal-mkt-border);
}

.kal-cat-libur {
  background: var(--kal-libur-bg);
  color: var(--kal-libur-fg);
  border-color: var(--kal-libur-border);
}

.kal-cat-google {
  background: var(--kal-goog-bg);
  color: var(--kal-goog-fg);
  border-color: var(--kal-goog-border);
}

/* Tampilan Bulan */
.kal-month {
  width: 100%;
  margin-top: 14px;
}

.kal-month-header {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}

.kal-month-col-head {
  background: var(--cream);
  padding: 8px 4px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.kal-month-col-head.is-weekend {
  color: var(--bad);
}

.kal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}

.kal-cell {
  background: var(--white);
  min-height: 105px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: background .12s;
  position: relative;
}

.kal-cell:hover {
  background: var(--cream);
}

.kal-cell.is-other-month {
  background: var(--cream2);
  opacity: 0.55;
}

.kal-cell.is-today {
  background: var(--ysoft);
}

.kal-cell.is-holiday {
  background: var(--kal-libur-bg);
}

.kal-cell-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.kal-day-num {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.kal-cell.is-holiday .kal-day-num {
  color: var(--kal-libur-fg);
}

.kal-today-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--teal);
  color: #fff;
  padding: 2px 6px;
  border-radius: 10px;
}

.kal-cell-events {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.kal-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .1s;
}

.kal-pill:hover {
  transform: scale(1.02);
  filter: brightness(0.96);
}

.kal-pill-time {
  font-size: 0.7rem;
  opacity: 0.85;
  flex-shrink: 0;
}

.kal-pill-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kal-pill-more {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal);
  padding: 1px 4px;
  cursor: pointer;
}

.kal-pill-more:hover {
  text-decoration: underline;
}

/* Tampilan Minggu */
.kal-week {
  margin-top: 14px;
}

.kal-week-cols {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.kal-week-col {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  min-height: 240px;
}

.kal-week-col.is-today {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}

.kal-week-col.is-holiday {
  background: var(--kal-libur-bg);
}

.kal-week-col-head {
  text-align: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.kal-week-day-name {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.kal-week-day-num {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.kal-week-events {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.kal-week-card {
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  border-left: 3px solid;
  transition: transform .12s;
}

.kal-week-card:hover {
  transform: translateY(-1px);
}

.kal-card-time {
  font-size: 0.7rem;
  opacity: 0.85;
  margin-bottom: 2px;
}

.kal-card-title {
  font-weight: 600;
  line-height: 1.3;
}

.kal-card-loc {
  margin-top: 4px;
}

.kal-week-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 80px;
  color: var(--muted);
  font-size: 0.75rem;
  border: 1px dashed var(--line);
  border-radius: 6px;
  cursor: pointer;
}

/* Tampilan Daftar */
.kal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.kal-list-group {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
}

.kal-list-group.is-today {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}

.kal-list-date-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.kal-list-date-title {
  font-size: 0.92rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.kal-list-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kal-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--edge);
  border-left: 1px solid;
  background: var(--white);
  gap: 12px;
}

.kal-list-item-main {
  flex: 1;
  min-width: 0;
}

.kal-list-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.kal-list-time {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.kal-list-title {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--ink);
}

.kal-list-loc {
  margin: 0;
  color: var(--muted);
}

.kal-list-desc {
  margin: 4px 0 0;
  color: var(--muted);
}

/* Modals */
.kal-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.kal-modal[hidden] {
  display: none;
}

.kal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(2px);
}

.kal-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(540px, 100%);
  max-height: 90vh;
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow-h);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  animation: kalModalIn .18s ease-out;
}

@keyframes kalModalIn {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: scale(1); }
}

.kal-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.kal-detail-head-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kal-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--ink);
}

.kal-modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.kal-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--cream);
}

/* <form> berada di antara dialog dan isi: harus ikut flex supaya badan form bisa di-scroll
   dan footer (tombol Simpan) tidak terpotong di layar pendek. */
.kal-modal-dialog > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.kal-modal-body {
  flex: 1 1 auto;
  min-height: 0;
}

.kal-modal-footer {
  flex: 0 0 auto;
}

/* CSS global input memberi lebar penuh; kotak centang harus seukuran kotaknya saja. */
.kal-check-inline input[type="checkbox"],
.kal-check-item input[type="checkbox"] {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
}

.kal-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kal-form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.kal-form-group label .req {
  color: var(--bad);
}

.kal-form-group input[type="text"],
.kal-form-group input[type="datetime-local"],
.kal-form-group textarea,
.kal-form-group select {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.88rem;
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
}

.kal-form-group input:focus,
.kal-form-group textarea:focus,
.kal-form-group select:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}

.kal-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kal-check-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: normal;
}

.kal-team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  max-height: 140px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
}

.kal-check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  cursor: pointer;
}

.kal-detail-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.kal-detail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--ink);
}

.kal-detail-desc {
  padding: 4px 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink);
}

.kal-detail-source {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.kal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 20px;
  color: var(--muted);
}

.kal-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: kalSpin .7s linear infinite;
}

@keyframes kalSpin {
  to { transform: rotate(360deg); }
}

.kal-empty {
  text-align: center;
  padding: 36px 20px;
}

/* Home Card Styling */
.kal-home-card {
  border-radius: 12px;
}

.kal-home-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kal-home-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kal-home-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--cream);
}

.kal-home-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: var(--ink);
}

@media (max-width: 640px) {
  .kal-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .kal-nav-group,
  .kal-actions-group {
    justify-content: space-between;
    flex-wrap: wrap;
    min-width: 0;
  }
  .kal-title {
    font-size: 1.05rem;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .kal-month {
    overflow-x: auto;
  }
  .kal-month-header,
  .kal-month-grid {
    min-width: 540px;
  }
  .kal-week-cols {
    grid-template-columns: 1fr;
  }
  .kal-form-row {
    grid-template-columns: 1fr;
  }
  .kal-team-grid {
    grid-template-columns: 1fr;
  }
}

/* SOP (13 Nov 2026) */
.sop-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; align-items: center; }
.sop-filter input[type=search] { flex: 1 1 240px; min-width: 0; }
.sop-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .sop-inline { display: inline; margin: 0; }
.sop-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 18px; margin: 0 0 14px; }
.sop-meta dt { font-size: 12px; color: var(--muted); } .sop-meta dd { margin: 2px 0 0; font-weight: 600; }
.sop-sum { font-weight: 500; } .sop-back { margin: 0 0 10px; }
.sop-body { line-height: 1.65; max-width: 80ch; } .sop-body h2 { font-size: 19px; margin: 20px 0 6px; } .sop-body h3 { font-size: 16px; margin: 16px 0 4px; }
.sop-body ol, .sop-body ul { padding-left: 22px; margin: 6px 0; } .sop-body code { background: var(--cream2); border-radius: 6px; padding: 1px 6px; font-size: .92em; }
.sop-old { background: var(--warnbg); color: var(--warn); border-left: 5px solid var(--warn); }
.sop-ver { margin: 0; padding-left: 18px; line-height: 1.8; } .sop-src { margin: 0; padding-left: 18px; word-break: break-all; }
.sop-ta { width: 100%; font: 13.5px/1.55 ui-monospace, Consolas, monospace; min-height: 360px; } .sop-fa { display: flex; gap: 8px; }
@media (max-width: 640px) { .sop-tbl thead { display: none; } .sop-tbl tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); } .sop-tbl td { display: flex; gap: 10px; border: 0; padding: 3px 4px; white-space: normal; max-width: none; } .sop-tbl td > * { min-width: 0; overflow-wrap: anywhere; } .sop-tbl { min-width: 0 !important; width: 100%; } .sop-tbl td::before { content: attr(data-l); min-width: 82px; color: var(--muted); font-size: 12px; } }
@media print { .sop-actions, .sop-filter, .sop-back { display: none !important; } }
.sop-meta-wrap { margin: 0 0 14px; } .sop-meta-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sop-meta-tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--cream2); white-space: nowrap; }
.sop-meta-tbl td { padding: 10px 12px; font-weight: 600; vertical-align: top; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .sop-meta-tbl thead { display: none; } .sop-meta-tbl tr { display: block; } .sop-meta-tbl td { display: flex; gap: 10px; padding: 7px 4px; } .sop-meta-tbl td::before { content: attr(data-l); min-width: 104px; color: var(--muted); font-size: 12px; font-weight: 500; } }

/* Rekap Meeting (13 Nov 2026), mengikuti pola .sop-* */
.mt-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; align-items: center; }
.mt-filter input[type=search] { flex: 1 1 240px; min-width: 0; }
.mt-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .mt-inline { display: inline; margin: 0; }
.mt-tbl { width: 100%; border-collapse: collapse; } .mt-tbl td { vertical-align: top; } .mt-tgl { white-space: nowrap; }
.mt-sum { margin-top: 2px; max-width: 70ch; } .mt-pdf { white-space: nowrap; }
.mt-sum-lead { font-weight: 500; } .mt-back { margin: 0 0 10px; }
.mt-body { line-height: 1.65; max-width: 80ch; } .mt-body h2 { font-size: 19px; margin: 20px 0 6px; } .mt-body h3 { font-size: 16px; margin: 16px 0 4px; }
.mt-body ol, .mt-body ul { padding-left: 22px; margin: 6px 0; } .mt-body code { background: var(--cream2); border-radius: 6px; padding: 1px 6px; font-size: .92em; }
.mt-old { background: var(--warnbg); color: var(--warn); border-left: 5px solid var(--warn); }
.mt-ver { margin: 0; padding-left: 18px; line-height: 1.8; }
.mt-ta { width: 100%; font: 13.5px/1.55 ui-monospace, Consolas, monospace; min-height: 320px; } .mt-fa { display: flex; gap: 8px; }
.mt-meta-wrap { margin: 0 0 14px; } .mt-meta-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.mt-meta-tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--cream2); white-space: nowrap; }
.mt-meta-tbl td { padding: 10px 12px; font-weight: 600; vertical-align: top; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) {
  .mt-tbl thead, .mt-meta-tbl thead { display: none; }
  .mt-tbl tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .mt-tbl td { display: flex; gap: 10px; border: 0; padding: 3px 4px; white-space: normal; max-width: none; }
  .mt-tbl td > * { min-width: 0; overflow-wrap: anywhere; } .mt-tbl { min-width: 0 !important; width: 100%; }
  .mt-tbl td::before { content: attr(data-l); min-width: 82px; color: var(--muted); font-size: 12px; }
  .mt-meta-tbl tr { display: block; } .mt-meta-tbl td { display: flex; gap: 10px; padding: 7px 4px; }
  .mt-meta-tbl td::before { content: attr(data-l); min-width: 104px; color: var(--muted); font-size: 12px; font-weight: 500; }
}
@media print { .mt-actions, .mt-filter, .mt-back { display: none !important; } }
/* Rekap Meeting: perbaikan lebar (filter sebaris, tabel tidak melebar, metadata HP tidak terpotong) */
.mt-filter select { width: auto; flex: 0 1 200px; min-width: 0; }
.mt-tbl { table-layout: auto; } .mt-tbl td { white-space: normal; max-width: none; } .mt-tbl td.mt-tgl { white-space: nowrap; }
.mt-tbl th:nth-child(1), .mt-tbl th:nth-child(5) { white-space: nowrap; } .mt-tbl td:nth-child(3) { min-width: 240px; }
.mt-meta-tbl td { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .mt-filter select { flex: 1 1 100%; }
  .mt-tbl td:nth-child(3) { min-width: 0; }
  .mt-meta-tbl { min-width: 0 !important; width: 100%; } .mt-meta-tbl td > * { min-width: 0; } .mt-meta-tbl td { max-width: none; }
}

/* ==========================================================================
   Devata Chat (chat.devatastudio.com, 15 Nov 2026): menu ringkas, kepala judul saja, popover akun.
   Semua aturan di bawah dibatasi html.chat-mode (kelas dari shell() saat erp_chat()); ERP biasa tidak tersentuh.
   ========================================================================== */
html.chat-mode .bar-t h1 { font-size: 19px; }
html.chat-mode .chat-tabs { padding-top: 12px; }
/* Kaki sidebar: tombol lipat + avatar; avatar membuka popover (tema, sensor nominal, Keluar) */
html.chat-mode .sb-me { position: relative; border-top: 1px solid rgba(255, 255, 255, .14); }
html.chat-mode .sb-me > summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; list-style: none; cursor: pointer; border-radius: 12px; }
html.chat-mode .sb-me > summary::-webkit-details-marker { display: none; }
html.chat-mode .sb-me > summary:hover { background: rgba(255, 255, 255, .08); }
html.chat-mode .sb-me > summary:focus-visible { outline: 2px solid var(--yellow); outline-offset: -2px; }
html.chat-mode .sb-me .avatar { flex: none; color: #1A1A1A; }
html.chat-mode .sb-me-n { flex: 1; min-width: 0; white-space: nowrap; }
html.chat-mode .sb-me-n b { display: block; font-size: 14px; color: #fff; overflow: hidden; text-overflow: ellipsis; }
html.chat-mode .sb-me-n small { display: block; font-size: 12px; color: rgba(255, 255, 255, .6); overflow: hidden; text-overflow: ellipsis; }
/* fixed: tidak terpotong rail 76px (overflow hidden); di HP sidebar bertransform, jadi tetap relatif ke sidebar 252px */
html.chat-mode .sb-me-pop { position: fixed; left: 12px; bottom: 68px; z-index: 80; width: 228px; box-sizing: border-box; padding: 12px; border-radius: 14px;
  background: var(--white); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0, 0, 0, .3); display: grid; gap: 6px; }
html.chat-mode .sb-me-h { margin: 0 0 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
html.chat-mode .sb-me-h b { display: block; font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.chat-mode .sb-me-h small { color: var(--muted); font-size: 12px; }
html.chat-mode .sb-me-l { margin: 4px 0 0; font: 600 11px Poppins, sans-serif; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
html.chat-mode.sbv2 .sb .sb-me[open] .sb-me-pop .sb-theme { display: flex; padding: 0; }
html.chat-mode .sb .sb-me-pop .sb-th { background: var(--white); border-color: var(--line); color: var(--muted); }
html.chat-mode .sb .sb-me-pop .sb-th[aria-pressed="true"] { background: var(--ysoft); border-color: var(--yellow); color: var(--ink); }
html.chat-mode .sb-me-pop .btn-privacy { width: 100%; justify-content: flex-start; height: 34px; border-radius: 10px; }
html.chat-mode .sb-me-pop .btn-privacy .priv-t { display: inline; }
html.chat-mode .sb-me-pop form { margin: 4px 0 0; padding-top: 8px; border-top: 1px solid var(--line); }
html.chat-mode .sb-me-out { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: 600 13px Poppins, sans-serif; cursor: pointer; }
html.chat-mode .sb-me-out:hover { background: var(--cream2); color: var(--bad, #d64545); }
@media (min-width: 1081px) {
  html.chat-mode.sbv2:not(.sb-pin) .sb:not(:hover):not(:focus-within) .sb-me > summary { justify-content: center; padding: 10px 0; }
  html.chat-mode.sbv2:not(.sb-pin) .sb:not(:hover):not(:focus-within) .sb-me-n { display: none; }
}
/* Maskot bot: di Inbox pindah ke kanan bawah area isi, di atas bilah bot dan kotak ketik, tidak menimpa sidebar atau daftar
   percakapan. Di 761-1499px (tanpa kolom profil) area pesan diberi jalur kanan supaya gelembung tidak tertutup maskot. */
html.chat-mode body:has(.ibx) .dock { left: auto !important; right: 18px !important; bottom: 146px; transform-origin: right bottom; }
html.chat-mode.sb-mini body:has(.ibx) .dock { left: auto !important; }
@media (min-width: 761px) and (max-width: 1499px) { html.chat-mode .ibx-msgs { padding-right: 64px; } }
/* Inbox: tanpa percakapan terbuka, kolom profil kosong disembunyikan supaya area percakapan selebar layar */
html.chat-mode .ibx:not(.in-thread) .ibx-side { display: none; }
@media (min-width: 1500px) { html.chat-mode .ibx:not(.in-thread) { grid-template-columns: 340px minmax(0, 1fr); } }
/* Tab status Inbox tidak terpotong: angka di bawah label (muat 4 tab berangka ribuan di kolom 300px);
   kalau tetap tidak muat, bilah digulir mendatar di dalam kolom daftar tanpa menggeser halaman */
html.chat-mode .ibx-tabs { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
html.chat-mode .ibx-tabs::-webkit-scrollbar { display: none; }
html.chat-mode .ibx-tabs button { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 6px 5px; line-height: 1.25; }
html.chat-mode .ibx-tabs i { margin-left: 0; font-size: 12px; }
