:root {
  --p: #5B4CF0; --p2: #4B3BD9; --pl: #EEEBFE; --pll: #F6F5FF; --track: #ECEAFB;
  --bg: #F1F1F6; --panel: #F7F7FA; --card: #fff; --ink: #1E1B3A; --muted: #7A7894; --line: #ECEBF3;
  --g: #16A34A; --gl: #E8F7EE; --o: #D97706; --ol: #FEF3E2; --r: #DC2626; --rl: #FDECEC; --b: #2563EB; --bl: #E8F0FE; --t: #0D9488; --tl: #E2F6F4;
  --wa: #25D366; --rad: 20px; --sh: 0 1px 2px rgba(30, 27, 58, .04), 0 8px 24px rgba(30, 27, 58, .05);
}
* { box-sizing: border-box; }
body { margin: 0; font: 14.5px/1.5 'Plus Jakarta Sans', system-ui, sans-serif; color: var(--ink); background: var(--bg); -webkit-tap-highlight-color: transparent; }
a { color: var(--p); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
svg.lucide { width: 18px; height: 18px; stroke-width: 2; flex-shrink: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
code { background: var(--pl); padding: 1px 6px; border-radius: 6px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.sub { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .nowrap { flex-wrap: nowrap; }
.row-end { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.stack { display: grid; gap: 14px; }
.only-m { display: none; }
:focus-visible { outline: 3px solid rgba(91, 76, 240, .35); outline-offset: 2px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; justify-content: center; border: 0; border-radius: 12px; padding: 10px 18px; min-height: 42px; background: var(--p); color: #fff; font-weight: 600; cursor: pointer; transition: .15s; white-space: nowrap; box-shadow: 0 6px 16px rgba(91, 76, 240, .25); }
.btn:hover { background: var(--p2); }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--p); color: var(--p); }
.btn.green { background: var(--g); box-shadow: 0 6px 16px rgba(22, 163, 74, .25); }
.btn.red { background: var(--r); box-shadow: none; }
.btn.wa { background: var(--wa); box-shadow: none; color: #fff; } .btn.wa:hover { background: #1fb958; }
.btn.wa.soft { background: #E7F9EE; color: #128C4B; }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn.lg { min-height: 50px; padding: 12px 24px; font-size: 15.5px; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; position: relative; flex-shrink: 0; }
.icon-btn:hover { border-color: var(--p); color: var(--p); }
.icon-btn.wa-i { color: #128C4B; }

/* badges */
.bd { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.bd-g { background: var(--gl); color: var(--g); border-color: #bfe8cf; } .bd-o { background: var(--ol); color: var(--o); border-color: #f8d9a8; }
.bd-r { background: var(--rl); color: var(--r); border-color: #f6c4c4; } .bd-b { background: var(--bl); color: var(--b); border-color: #c7d8fb; }
.bd-v { background: var(--pl); color: var(--p); border-color: #d9d3fc; } .bd-t { background: var(--tl); color: var(--t); border-color: #b9e6e1; }
.bd-n { background: #F1F1F6; color: var(--muted); }

/* layout — panel membulat seperti referensi */
.layout { display: flex; gap: 16px; padding: 16px; min-height: 100vh; }
.side { width: 240px; flex-shrink: 0; background: var(--panel); border-radius: 24px; padding: 24px 16px; position: sticky; top: 16px; height: calc(100vh - 32px); display: flex; flex-direction: column; overflow-y: auto; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 22px; color: var(--ink); letter-spacing: -.3px; }
.logo b { color: var(--p); font-weight: 800; }
.mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #8B7CF8, var(--p2)); color: #fff; flex-shrink: 0; }
.side .logo { padding: 0 8px; }
.side-lbl { font-size: 11px; font-weight: 600; color: #A9A7BD; letter-spacing: 1px; margin: 28px 8px 8px; }
.side nav { display: grid; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-weight: 500; position: relative; }
.side nav a:hover { color: var(--ink); background: #fff; }
.side nav a.on { color: var(--ink); font-weight: 700; background: #fff; }
.side nav a.on::before { content: ''; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--p); }
.side nav a.on svg { color: var(--p); }
.side nav em, .bnav em { margin-left: auto; font-style: normal; background: var(--p); color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 99px; display: grid; place-items: center; padding: 0 6px; }
.side-card { margin-top: auto; background: linear-gradient(160deg, #2A2552, #1E1B3A); color: #fff; border-radius: 18px; padding: 16px; display: grid; gap: 4px; }
.side-card .mark { margin-bottom: 6px; } .side-card small { color: #B9B6D6; font-size: 12px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.top { display: flex; align-items: center; gap: 12px; background: var(--panel); border-radius: 20px; padding: 12px 16px; position: sticky; top: 16px; z-index: 20; }
.m-greet { display: none; }
.gsearch { flex: 1; max-width: 380px; display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 0 14px; color: var(--muted); }
.gsearch input { border: 0; background: none; flex: 1; min-height: 42px; outline: none; min-width: 0; }
.bell { margin-left: auto; }
.bell b { position: absolute; top: -5px; right: -5px; background: var(--r); color: #fff; font-size: 10px; min-width: 18px; height: 18px; border-radius: 99px; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--panel); }
.who { display: flex; align-items: center; gap: 10px; color: var(--ink); padding-left: 4px; }
.who strong { display: block; font-size: 14px; } .who small { color: var(--muted); font-size: 12px; }
.av { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--pl); color: var(--p); font-weight: 700; font-size: 13px; flex-shrink: 0; }
.av.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; background: linear-gradient(135deg, #8B7CF8, var(--p2)); color: #fff; }
.av.xl { width: 88px; height: 88px; border-radius: 24px; font-size: 30px; background: linear-gradient(135deg, #8B7CF8, var(--p2)); color: #fff; }
.content { background: var(--panel); border-radius: 24px; padding: 28px; flex: 1; }
.bnav { display: none; }

/* page parts */
.ph { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.ph h1 { font-size: 28px; letter-spacing: -.5px; } .ph p { margin: 6px 0 0; color: var(--muted); }
.ph-act { display: flex; gap: 10px; flex-wrap: wrap; }
.live { display: inline-flex; align-items: center; gap: 6px; background: var(--gl); color: var(--g); font-weight: 700; font-size: 12px; padding: 2px 10px; border-radius: 99px; margin-right: 6px; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--g); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .6); } 70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }
.card { background: var(--card); border-radius: var(--rad); box-shadow: var(--sh); padding: 20px; margin-bottom: 16px; min-width: 0; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-h h2 { font-size: 15.5px; font-weight: 700; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.kpis.two { grid-template-columns: repeat(2, minmax(0, 280px)); }
.kpi { background: #fff; border-radius: var(--rad); box-shadow: var(--sh); padding: 18px; color: var(--ink); display: flex; flex-direction: column; gap: 8px; transition: .2s; }
.kpi:hover { transform: translateY(-3px); }
.kpi-t { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 13.5px; }
.kpi-go { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line); }
.kpi-go svg { width: 15px; height: 15px; }
.kpi b { font-size: 38px; font-weight: 700; line-height: 1.1; letter-spacing: -1px; }
.kpi small { color: var(--p); font-size: 12px; font-weight: 500; }
.kpi.hero { background: linear-gradient(145deg, #7B6CF6, var(--p2)); color: #fff; box-shadow: 0 12px 28px rgba(91, 76, 240, .35); }
.kpi.hero .kpi-go { background: #fff; color: var(--p); border: 0; }
.kpi.hero small { color: #E4E0FF; }
.quick { display: none; }
.g3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.g-detail { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 12px; color: var(--muted); text-align: center; }
.empty svg { width: 30px; height: 30px; opacity: .5; }
.note { display: flex; gap: 8px; align-items: center; color: var(--muted); margin: 14px 0 0; }

/* charts */
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; height: 220px; align-items: end; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; }
.bar-t { flex: 1; width: 100%; max-width: 46px; background: var(--pll); border-radius: 99px; display: flex; align-items: flex-end; }
.bar-f { width: 100%; border-radius: 99px; background: linear-gradient(180deg, #8B7CF8, var(--p2)); display: flex; justify-content: center; padding-top: 10px; transition: height .6s; }
.bar-f span { color: #fff; font-size: 12px; font-weight: 700; }
.bar small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.gauge { position: relative; max-width: 240px; margin: 0 auto; }
.gauge svg { display: block; width: 100%; }
.gauge-v { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; }
.gauge-v b { display: block; font-size: 32px; letter-spacing: -1px; } .gauge-v small { color: var(--muted); font-size: 12px; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 6px; } .legend b { color: var(--ink); margin-left: auto; }
.legend i { width: 10px; height: 10px; border-radius: 50%; }

/* lists */
.list { display: grid; gap: 4px; }
/* kolom grid default = min-content → teks nowrap bisa mendorong isi keluar kartu */
.list, .doclist, .demo, .stack, .drops, .tl { grid-template-columns: minmax(0, 1fr); }
.li > .btn, .li > .bd { flex-shrink: 0; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; color: var(--ink); }
a.li:hover { background: var(--pll); }
.li > div { flex: 1; min-width: 0; } .li b { display: block; font-size: 14px; color: var(--ink); }
.li small { color: var(--muted); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li.new { background: var(--pll); } .li.new b::after { content: ' •'; color: var(--p); }
.date { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--pl); color: var(--p); font-size: 11px; font-weight: 600; line-height: 1.1; flex-shrink: 0; }
.date b { font-size: 18px; color: var(--p); }
.grp { font-size: 14px; margin: 18px 0 10px; display: flex; gap: 8px; align-items: center; }
.grp span { background: var(--pl); color: var(--p); font-size: 12px; padding: 1px 9px; border-radius: 99px; }
.grp.red span { background: var(--rl); color: var(--r); }

/* tables */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--pll); }
.tbl tr.new { background: #FBFAFF; } .tbl tr.new td:first-child { box-shadow: inset 3px 0 0 var(--p); }
.pcell { display: flex; gap: 10px; align-items: center; color: var(--ink); }
.pcell b { display: block; } .pcell small { color: var(--muted); font-size: 12px; }
.docs-n { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters select, .search { min-height: 42px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; background: #fff; }
.search { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 220px; color: var(--muted); }
.search input { border: 0; outline: none; flex: 1; min-height: 38px; min-width: 0; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 7px 14px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); white-space: nowrap; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; color: var(--muted); font-size: 13px; }
.pg { min-width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; margin-left: 4px; }
.pg.on { background: var(--p); color: #fff; border-color: var(--p); }
.mini { border: 1.5px solid var(--line); border-radius: 10px; padding: 6px 8px; background: #fff; }

/* forms */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 14px; }
.f { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); align-content: start; }
.f.full { grid-column: 1 / -1; }
.f input, .f select, .f textarea { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 46px; background: #fff; font-weight: 500; width: 100%; }
.f textarea { resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus, .logf input:focus { outline: none; border-color: var(--p); box-shadow: 0 0 0 4px var(--pl); }
.f input:user-invalid, .f textarea:user-invalid, .f select:user-invalid { border-color: var(--r); }
.req { color: var(--r); font-style: normal; }
.fsec-h { display: flex; gap: 14px; align-items: flex-start; }
.fsec-h h2 { font-size: 16px; } .fsec-h p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--pl); color: var(--p); font-weight: 800; flex-shrink: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.seg-o input { position: absolute; opacity: 0; }
.seg-o span { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 16px; cursor: pointer; }
.seg-o svg { grid-row: span 2; width: 26px; height: 26px; color: var(--muted); }
.seg-o small { color: var(--muted); }
.seg-o input:checked + span { border-color: var(--p); background: var(--pll); box-shadow: 0 0 0 4px var(--pl); }
.seg-o input:checked + span svg { color: var(--p); }
.seg-o input:focus-visible + span { outline: 3px solid rgba(91, 76, 240, .35); }
.drops { display: grid; gap: 12px; margin-top: 16px; }
.docs-ri { display: grid; gap: 12px; }
.kirim:has(input[value="Rawat Inap"]:checked) .docs-rj, .kirim:has(input[value="Rawat Jalan"]:checked) .docs-ri { display: none; }
.drop { border: 2px dashed #D9D5F7; border-radius: 16px; padding: 14px; background: var(--pll); display: grid; gap: 12px; transition: .15s; }
.drop-m { display: flex; gap: 14px; align-items: center; min-width: 0; }
.drop-i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--p); flex-shrink: 0; }
.drop-t { min-width: 0; } .drop-t b { display: block; } .drop-t small { color: var(--muted); font-weight: 400; }

.drop-m { flex-wrap: wrap; row-gap: 10px; }
.drop-t { flex: 1 1 170px; }
.drop-m .btn { flex-shrink: 0; margin-left: auto; }
.drop.has .drop-s { color: var(--g); font-weight: 600; }
/* popup pilihan upload */
.sheet-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sheet-o { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line); cursor: pointer; margin-top: 10px; }
.sheet-o:hover, .sheet-o:active { border-color: var(--p); background: var(--pll); }
.sheet-o > span:nth-child(2) { flex: 1; } .sheet-o b { display: block; } .sheet-o small { color: var(--muted); font-size: 12.5px; }
.sheet-o > svg { color: var(--muted); }
.sheet-i { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--pl); color: var(--p); flex-shrink: 0; }
.sheet-i.cam { background: var(--p); color: #fff; }
.drop.has { border-style: solid; border-color: #9FDDB7; background: var(--gl); } .drop.has .drop-i { color: var(--g); }
.drop.err { border-color: var(--r); background: var(--rl); animation: shake .3s; }
@keyframes sheet { from { transform: translateY(100%); } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.thumbs:empty { display: none; }
.th { position: relative; background: #fff; border-radius: 12px; padding: 6px; box-shadow: var(--sh); display: grid; gap: 4px; }
.th img, .th-pdf { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; background: var(--bg); }
.th-pdf { display: grid; place-items: center; align-content: center; gap: 4px; color: var(--r); font-weight: 700; font-size: 12px; }
.th small { font-size: 10.5px; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-x { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: var(--r); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.th-x svg { width: 14px; height: 14px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 16px; }
.chk { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 13.5px; }
.chk:has(input:checked) { background: var(--pll); border-color: #cfc8fb; }
.chk input { width: 18px; height: 18px; accent-color: var(--p); }
.jrow { display: grid; grid-template-columns: 160px 110px 1fr 1fr 42px; gap: 10px; align-items: end; padding: 12px; border-radius: 14px; background: var(--pll); margin: 12px 0; }
.jrow .del { color: var(--r); }
.submit-bar { position: sticky; bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px); padding: 12px 12px 12px 18px; border-radius: 18px; box-shadow: 0 10px 30px rgba(30, 27, 58, .12); flex-wrap: wrap; }
.submit-bar .muted { display: flex; gap: 6px; align-items: center; }
.logf { display: grid; grid-template-columns: 180px 1fr auto; gap: 8px; margin-top: 14px; }
.logf select, .logf input { border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; min-height: 42px; background: #fff; min-width: 0; }

/* detail */
.back { display: inline-flex; gap: 6px; align-items: center; margin-bottom: 12px; font-weight: 600; color: var(--muted); }
.phead { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.phead-m { display: flex; gap: 16px; min-width: 0; flex: 1; }
.phead h1 { font-size: 22px; margin-bottom: 6px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.meta span { display: inline-flex; gap: 6px; align-items: center; } .meta svg { width: 15px; height: 15px; }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.stp { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 16px; padding: 12px; box-shadow: var(--sh); }
.stp > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #F1F1F6; color: var(--muted); flex-shrink: 0; }
.stp.ok > span { background: var(--p); color: #fff; }
.stp b { display: block; font-size: 13px; } .stp small { color: var(--muted); font-size: 11.5px; }
.doclist { display: grid; gap: 8px; }
.doc { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); }
.doc > div { flex: 1; min-width: 0; } .doc b { display: block; } .doc small { color: var(--muted); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--pl); color: var(--p); flex-shrink: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; gap: 4px; align-items: center; background: var(--pl); color: var(--p); padding: 5px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; }
.tag svg { width: 14px; height: 14px; }
.instr { background: var(--pll); border-radius: 14px; padding: 12px 14px; margin: 14px 0 10px; white-space: pre-wrap; }
.tl { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--pl); }
.tl li { position: relative; padding: 0 0 16px 12px; display: grid; gap: 2px; }
.tl li::before { content: ''; position: absolute; left: -26px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--p); box-shadow: 0 0 0 4px var(--pl); }
.tl time { font-size: 12px; color: var(--muted); }
.contact { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.contact:last-child { border: 0; }
.contact > div:not(.c-act) { flex: 1; min-width: 0; } .contact small { color: var(--muted); font-size: 12px; display: block; } .contact b { display: block; } .contact span:not(.av) { font-size: 13px; color: var(--muted); }
.c-act { display: flex; gap: 6px; }
.kv { display: grid; margin: 0; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv div:last-child { border: 0; }
.kv dt { color: var(--muted); font-size: 13px; } .kv dd { margin: 0; font-weight: 600; text-align: right; }
.prof { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 12px 0; }
.prof h2 { margin-top: 8px; } .prof p { margin: 0; } .prof .btn { margin-top: 12px; }

/* dialog, toast */
dialog { border: 0; border-radius: 22px; padding: 24px; max-width: 460px; width: calc(100% - 32px); box-shadow: 0 30px 80px rgba(30, 27, 58, .3); color: var(--ink); }
dialog.wide { max-width: 760px; padding: 16px; }
dialog::backdrop { background: rgba(30, 27, 58, .5); backdrop-filter: blur(3px); }
dialog h3 { font-size: 18px; } dialog p { color: var(--muted); }
.wa-prev { white-space: pre-wrap; font: 13px/1.5 inherit; background: #E7F9EE; border-radius: 14px 14px 14px 4px; padding: 12px 14px; margin: 0; color: #134E2E; font-family: inherit; }
.doc-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; padding: 4px 4px 0; }
.doc-v { background: var(--bg); border-radius: 14px; overflow: auto; max-height: 72vh; display: grid; place-items: center; }
.doc-v img { max-width: 100%; display: block; } .doc-v iframe { width: 100%; height: 70vh; border: 0; }
.toast { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); z-index: 100; font-weight: 600; animation: down .3s; max-width: calc(100% - 32px); }
.toast.bad { background: var(--r); }
@keyframes down { from { opacity: 0; transform: translate(-50%, -12px); } }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; padding: 16px; gap: 16px; }
.login-art { background: linear-gradient(150deg, #7B6CF6, var(--p2) 60%, #2A2176); border-radius: 28px; color: #fff; padding: 48px; display: flex; align-items: center; position: relative; overflow: hidden; }
.login-art::after { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: rgba(255, 255, 255, .06); right: -120px; bottom: -120px; }
.login-art .logo { color: #fff; } .login-art .logo b { color: #CFC8FF; } .login-art .mark { background: rgba(255, 255, 255, .18); }
.login-art h1 { font-size: clamp(30px, 3.4vw, 46px); margin: 36px 0; letter-spacing: -1px; } .login-art h1 span { color: #CFC8FF; }
.feat { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.feat li { display: flex; gap: 14px; align-items: center; } .feat li > span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .14); }
.feat small { display: block; color: #D6D1FF; }
.login-form { display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 420px; }
.login-card h2 { font-size: 26px; letter-spacing: -.5px; } .login-card > .muted { margin: 6px 0 24px; }
.demo-l { font-size: 12px; color: var(--muted); font-weight: 600; margin: 28px 0 8px; text-transform: uppercase; letter-spacing: .8px; }
.demo { display: grid; gap: 8px; }
.demo-u { display: flex; gap: 12px; align-items: center; text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 16px; padding: 10px 14px; cursor: pointer; }
.demo-u:hover { border-color: var(--p); background: var(--pll); }
.demo-u > span:nth-child(2) { flex: 1; } .demo-u b { display: block; } .demo-u small { color: var(--muted); font-size: 12px; }
.tip { display: flex; gap: 8px; font-size: 12.5px; color: var(--muted); background: #fff; border-radius: 14px; padding: 12px; margin-top: 16px; }
.tip svg { color: var(--o); }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .g3, .g2, .g-detail { grid-template-columns: 1fr; }
  .jrow { grid-template-columns: 1fr 1fr; } .jrow .grow { grid-column: span 2; } .jrow .del { grid-column: 2; justify-self: end; }
}
@media (max-width: 860px) {
  body { background: var(--panel); }
  .layout { padding: 0; gap: 0; display: block; }
  .side { display: none; }
  .main { gap: 0; }
  .top { position: sticky; top: 0; border-radius: 0; padding: 14px 16px; background: rgba(247, 247, 250, .92); backdrop-filter: blur(10px); }
  .m-greet { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 0; }
  .m-greet small { display: block; color: var(--muted); font-size: 12px; } .m-greet b { font-size: 17px; }
  .gsearch, .who { display: none; }
  .content { border-radius: 0; padding: 4px 16px 110px; }
  .ph h1 { font-size: 22px; } .ph { margin-bottom: 16px; }
  .ph-act { width: 100%; } .ph-act .btn { flex: 1; }
  .quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 16px; }
  .quick a { display: grid; justify-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink); text-align: center; }
  .quick span { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: #fff; color: var(--p); box-shadow: var(--sh); }
  .kpis { gap: 12px; } .kpis.two { grid-template-columns: 1fr 1fr; }
  .kpi.hero { grid-column: 1 / -1; padding: 22px; } .kpi.hero b { font-size: 44px; }
  .kpi b { font-size: 30px; }
  .kpis:not(.two) { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .kpis:not(.two) .kpi:not(.hero) { padding: 14px 12px; gap: 4px; }
  .kpis:not(.two) .kpi:not(.hero) .kpi-go { display: none; }
  .kpis:not(.two) .kpi:not(.hero) .kpi-t { font-size: 12px; line-height: 1.3; min-height: 32px; align-items: flex-start; }
  .kpis:not(.two) .kpi:not(.hero) b { font-size: 26px; }
  .kpis:not(.two) .kpi:not(.hero) small { font-size: 11px; }
  .bnav { display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; position: fixed; left: 12px; right: 12px; bottom: 12px; background: #fff; border-radius: 24px; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 10px 40px rgba(30, 27, 58, .15); z-index: 30; }
  .bnav a { display: grid; justify-items: center; gap: 2px; color: #A9A7BD; font-size: 11px; font-weight: 600; position: relative; padding: 4px 0; }
  .bnav a.on { color: var(--p); }
  .bnav a em { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 8px; height: 8px; padding: 0; background: var(--r); }
  .bnav .fab { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(145deg, #7B6CF6, var(--p2)); color: #fff; place-items: center; justify-self: center; margin-top: -30px; box-shadow: 0 10px 24px rgba(91, 76, 240, .45); border: 4px solid var(--panel); }
  .bnav .fab svg { width: 24px; height: 24px; }
  .stepper { grid-template-columns: 1fr 1fr; }
  .login { grid-template-columns: 1fr; padding: 0; }
  .login-art { display: none; } .only-m { display: block; margin-bottom: 28px; }
  .toast { top: auto; bottom: 100px; }
  .submit-bar { bottom: 96px; }
}
@media (max-width: 860px) {
  /* tabel → kartu */
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { border: 1.5px solid var(--line); border-radius: 16px; padding: 10px 14px; margin-bottom: 10px; background: #fff; }
  .tbl td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0; padding: 5px 0; text-align: right; }
  .tbl td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; flex-shrink: 0; }
    .tbl td:first-child { justify-content: flex-start; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
  .tbl td:first-child::before, .tbl td:empty { display: none; }
  .tbl tr.new td:first-child { box-shadow: none; }
  .tbl td .cv { min-width: 0; }
  .tbl td:first-child { text-align: left; }
  .tbl td .row.nowrap { flex-wrap: wrap; justify-content: flex-end; }
  .tbl-wrap { overflow: visible; }
}
@media (max-width: 560px) {
  dialog.sheet { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 24px 24px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); animation: sheet .25s ease-out; }
  .drop-m .btn { width: 100%; }
  .card { padding: 16px; }
  .li { padding: 8px 4px; gap: 10px; }
  .li .btn.wa { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 12px; }
  .li .bt { display: none; }
  .tbl .bt { display: inline; }
  .seg { grid-template-columns: 1fr; }
  .logf { grid-template-columns: 1fr; }
  .bars { gap: 6px; height: 180px; }
  .phead-m { flex-direction: column; }
  .submit-bar { justify-content: stretch; } .submit-bar .btn { width: 100%; } .submit-bar .muted { display: none; }
  .filters .search { min-width: 100%; }
}

@media print {
  .side, .top, .bnav, .ph-act, .back, .logf, .btn, .c-act, .submit-bar { display: none !important; }
  body, .content, .card { background: #fff; box-shadow: none; }
  .layout { display: block; padding: 0; } .g-detail { grid-template-columns: 1fr; }
}
