/* Rambidend Retur — gaya dasar (mengikuti mockup) */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Inter, system-ui, -apple-system, sans-serif; background: #0B0D11; color: #15181E; -webkit-tap-highlight-color: transparent; }
button { font-family: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid #60A5FA; outline-offset: 2px; }
#app { max-width: 480px; margin: 0 auto; min-height: 100%; position: relative; }

.scr { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.gelap { background: #15181E; color: #FFFFFF; padding: 22px 20px 20px; gap: 16px; }
.terang { background: #F4F5F7; color: #15181E; }

.demo { background: #FEF3C7; color: #78350F; border-radius: 12px; padding: 8px 12px; font-size: 12px; line-height: 1.45; }
.terang .demo { margin: 10px 14px 0; }
.offline { background: #374151; color: #F9FAFB; border-radius: 12px; padding: 8px 12px; font-size: 12px; line-height: 1.45; }
.terang .offline { margin: 10px 14px 0; }

.brand { display: flex; flex-direction: column; gap: 6px; }
.brand.tengah { margin: auto; align-items: center; text-align: center; }
.brand h1 { margin: 8px 0 0; font-size: 24px; font-weight: 800; }
.brand p { margin: 0; color: #C9CED8; font-size: 14px; line-height: 1.45; }
.logo { width: 44px; height: 44px; border-radius: 12px; background: #1D4ED8; display: flex; align-items: center; justify-content: center; color: #FFF; }
.langkah { font-size: 12px; color: #93C5FD; font-weight: 700; }

.names { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.name { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; border: 2px solid transparent; background: #2B303B; color: #FFF; min-height: 44px; }
.name.on { border-color: #3B82F6; background: #1E2A44; }
.name .nm { font-size: 13px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name .rl { font-size: 10px; color: #C9CED8; }
.ava { width: 36px; height: 36px; border-radius: 999px; background: #3A4150; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; color: #FFF; flex: none; }
.ava.besar { width: 44px; height: 44px; background: #2B303B; }
.ava.ungu { background: #E0E7FF; color: #312E81; }
.kosong { color: #C9CED8; font-size: 14px; text-align: center; padding: 16px; background: #2B303B; border-radius: 14px; margin: 0; }
.kosong.terang { background: #FFF; color: #5B6270; border: 1px dashed #D5D9E0; }

.pinarea { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 92px; }
.untuk { margin: 0; color: #C9CED8; font-size: 14px; }
.untuk b { color: #FFF; }
.dots { display: flex; gap: 14px; }
.dot { width: 14px; height: 14px; border-radius: 99px; border: 2px solid #6B7280; }
.dot.on { background: #FFF; border-color: #FFF; }
.pesan { margin: 0; font-size: 13px; font-weight: 600; color: #FCA5A5; text-align: center; }
.terang .pesan, .pesan.merah { color: #B91C1C; }
.sibuk { margin: 0; font-size: 13px; color: #93C5FD; }
.tips { margin: 0; font-size: 12px; color: #9CA3AF; }

.pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: auto; }
.key { height: 58px; border-radius: 14px; border: 0; background: #2B303B; color: #FFF; font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.key:active { background: #3A4150; }

.kaki { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; color: #C9CED8; }
.lnk { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: #93C5FD; font-weight: 700; font-size: 13px; min-height: 44px; padding: 0 4px; }
.terang .lnk { color: #1D4ED8; }
.lnk.putih { color: #E0E7FF; }

.hdr { background: #15181E; color: #FFF; padding: 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hdr.ungu { background: #312E81; }
.hdr h1 { margin: 2px 0 0; font-size: 20px; font-weight: 800; }
.hdr .kecil { font-size: 12px; color: #C9CED8; overflow-wrap: anywhere; }
.hdr.ungu .kecil { color: #C7D2FE; }

.isi { padding: 14px 16px 24px; display: flex; flex-direction: column; gap: 12px; }
.isi.tengah { margin: auto 0; }
.kartu { background: #FFF; border: 1px solid #E3E6EB; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.kartu h2 { margin: 0; font-size: 16px; font-weight: 800; }
.kartu p { margin: 0; font-size: 14px; line-height: 1.5; color: #374151; }
.kartu.sukses { background: #ECFDF5; border-color: #6EE7B7; }
.kartu.sukses h2, .kartu.sukses p { color: #065F46; }
.kartu.kuning { background: #FEF3C7; border-color: #FCD34D; color: #78350F; font-size: 13px; line-height: 1.5; display: block; }

.baris { display: flex; gap: 8px; }
.baris .btn { flex: 1; }
.btn { min-height: 48px; border-radius: 12px; border: 0; background: #1D4ED8; color: #FFF; font-weight: 700; font-size: 15px; padding: 0 14px; }
.btn.garis { background: #FFF; color: #15181E; border: 1px solid #D5D9E0; }
.btn.ungu { background: #312E81; }
.btn.gelap { background: #15181E; }
.btn.bahaya { background: #B91C1C; }
.btn.kecil { min-height: 40px; font-size: 13px; }
.btn.penuh { width: 100%; }
.merah-teks { color: #B91C1C !important; }
.hijau-teks { color: #15803D !important; }

.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.fld input { height: 48px; border-radius: 12px; border: 1px solid #D5D9E0; padding: 0 12px; font-size: 16px; font-family: inherit; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; background: #F1F3F6; padding: 4px; border-radius: 12px; }
.seg button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: #5B6270; font-weight: 600; font-size: 13px; }
.seg button.on { background: #FFF; color: #15181E; font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.catatan { margin: 0; font-size: 12px; color: #5B6270; }

.judul-list { display: flex; justify-content: space-between; align-items: center; }
.judul-list h2 { margin: 0; font-size: 15px; font-weight: 800; }
.akun { background: #FFF; border: 1px solid #E3E6EB; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.akun-atas { display: flex; align-items: center; gap: 10px; }
.akun-nm { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.akun-nm b { font-size: 14px; }
.akun-nm span { font-size: 12px; color: #5B6270; }
.akun-nm em { color: #92400E; font-style: normal; font-weight: 600; }
.badge { font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; }
.badge.hijau { color: #14532D; background: #DCFCE7; }
.badge.abu { color: #374151; background: #E5E7EB; }

.overlay { position: fixed; inset: 0; background: rgba(17,24,39,.55); display: flex; align-items: flex-end; justify-content: center; z-index: 10; }
.sheet { background: #FFF; color: #15181E; width: 100%; max-width: 480px; border-radius: 20px 20px 0 0; padding: 14px 18px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.sheet h2 { margin: 0; font-size: 18px; font-weight: 800; }
.grip { width: 40px; height: 4px; border-radius: 9px; background: #D5D9E0; align-self: center; }
.sh-isi { margin: 0; font-size: 14px; color: #374151; line-height: 1.5; }
.sh-catatan { margin: 0; font-size: 12px; color: #92400E; }
.pin-besar { font-size: 40px; font-weight: 800; letter-spacing: .12em; text-align: center; background: #EEF2FF; color: #312E81; border-radius: 14px; padding: 14px 0; font-variant-numeric: tabular-nums; }

/* ---------- aplikasi utama ---------- */
.utama { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.hdr-t { flex: 1; min-width: 0; }
.bawah { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; display: flex; background: #FFF; border-top: 1px solid #E3E6EB; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 5; }
.nv { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: transparent; color: #5B6270; font-size: 11px; font-weight: 600; min-height: 52px; padding: 4px 0; }
.nv svg { width: 22px; height: 22px; }
.nv.on { color: #1D4ED8; }
.nv i { font-style: normal; background: #1D4ED8; color: #FFF; border-radius: 9px; padding: 0 5px; font-size: 10px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); background: #15181E; color: #FFF; padding: 10px 14px; border-radius: 12px; font-size: 13px; max-width: 440px; width: calc(100% - 32px); z-index: 20; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.btn.besar { min-height: 56px; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn.besar svg { width: 22px; height: 22px; }
.kecil-abu { font-size: 12px; color: #5B6270; }
.tengah-teks { text-align: center; }
.angka3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.angka3 div { background: #F4F5F7; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.angka3 b { font-size: 20px; font-weight: 800; overflow-wrap: anywhere; }
.angka3 span { font-size: 11px; color: #5B6270; }
.toko-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.toko-k { background: #FFF; border: 1px solid #E3E6EB; border-radius: 16px; padding: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; color: #15181E; min-height: 44px; }
.toko-k:disabled { opacity: 1; }
.tk-id { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.t-RB { background: #DBEAFE; color: #1E3A8A; } .t-SC { background: #FCE7F3; color: #831843; } .t-BO { background: #DCFCE7; color: #14532D; } .t-LH { background: #FEF3C7; color: #78350F; }
.tk-n { font-size: 26px; font-weight: 800; }
.tk-n small { font-size: 13px; font-weight: 600; color: #5B6270; }
.tk-nm { font-size: 13px; font-weight: 700; }
.tk-s { font-size: 11px; color: #5B6270; min-height: 14px; }
.kuning-lembut { background: #FFFBEB; border-color: #FCD34D; }
.daftar-kecil { display: flex; flex-direction: column; gap: 4px; font-size: 13px; max-height: 240px; overflow: auto; }
.rowbtn { text-align: left; border: 0; background: transparent; padding: 6px 0; font-size: 13px; color: #374151; border-bottom: 1px solid #F1F3F6; min-height: 36px; }
.kardus-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.kd { background: #F4F5F7; border-radius: 10px; padding: 8px; display: flex; flex-direction: column; font-size: 12px; }
.kd b { font-size: 13px; }

.grup { display: flex; flex-direction: column; gap: 6px; }
.lbl { font-size: 13px; font-weight: 700; color: #374151; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid #D5D9E0; background: #FFF; color: #15181E; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: #1D4ED8; border-color: #1D4ED8; color: #FFF; }
.chip small { font-size: 11px; opacity: .75; }
.chip.tambah { border-style: dashed; color: #1D4ED8; }
.sw { width: 14px; height: 14px; border-radius: 999px; border: 1px solid #D5D9E0; display: inline-block; flex: none; }
.form { gap: 14px; }
.catatan.kuning { background: #FEF3C7; color: #78350F; padding: 8px 10px; border-radius: 10px; }
.baris-tog { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #FFF; border: 1px solid #E3E6EB; border-radius: 14px; padding: 8px 12px; font-size: 14px; font-weight: 600; }
.baris-tog small { font-weight: 400; color: #5B6270; }
.tog { width: 48px; height: 28px; border-radius: 999px; border: 0; background: #D5D9E0; position: relative; flex: none; }
.tog i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px; background: #FFF; transition: left .15s; }
.tog.on { background: #1D4ED8; }
.tog.on i { left: 23px; }

.kamera { display: flex; flex-direction: column; gap: 8px; }
.tempat-kamera { aspect-ratio: 4 / 3; background: #15181E; border-radius: 16px; overflow: hidden; display: flex; align-items: center; justify-content: center; position: relative; }
.tempat-kamera::after { content: ''; position: absolute; inset: 18% 26%; border: 3px solid rgba(255,255,255,.8); border-radius: 14px; pointer-events: none; }
.video { width: 100%; height: 100%; object-fit: cover; }
.kamera-mati { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #C9CED8; font-size: 13px; }
.kamera-mati svg { width: 40px; height: 40px; }
.info-scan { margin: 0; padding: 10px 12px; border-radius: 12px; background: #FEE2E2; color: #991B1B; font-size: 14px; font-weight: 600; }
.info-scan.ok { background: #DCFCE7; color: #14532D; }
.input-btn { display: flex; gap: 8px; }
.input-btn input { flex: 1; min-width: 0; height: 48px; border-radius: 12px; border: 1px solid #D5D9E0; padding: 0 12px; font-size: 16px; font-family: inherit; }
.fld select, .fld textarea { border-radius: 12px; border: 1px solid #D5D9E0; padding: 10px 12px; font-size: 16px; font-family: inherit; background: #FFF; }
.fld select { height: 48px; }
.fld { position: relative; }
.hitung { align-self: flex-end; font-size: 11px; color: #5B6270; font-weight: 400; }

.item { background: #FFF; border: 1px solid #E3E6EB; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.item-t { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 0; background: transparent; padding: 0; color: #15181E; min-height: 36px; }
.item-t b { font-size: 15px; }
.item-t span, .item .kecil { font-size: 13px; color: #374151; margin: 0; }
.balasan { margin: 0; font-size: 13px; background: #EEF2FF; color: #312E81; border-radius: 10px; padding: 8px 10px; }
.ringkas { display: flex; flex-direction: column; }
.rb { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #F1F3F6; font-size: 13px; }
.rb span { color: #5B6270; }
.rb b { text-align: right; overflow-wrap: anywhere; }
.badge.biru { color: #1E3A8A; background: #DBEAFE; } .badge.kuning { color: #78350F; background: #FEF3C7; } .badge.merah { color: #7F1D1D; background: #FEE2E2; } .badge.ungu { color: #312E81; background: #E0E7FF; }
.riw { display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: #374151; max-height: 320px; overflow: auto; }
.riw div { border-left: 3px solid #E3E6EB; padding-left: 8px; line-height: 1.45; }
.hasil { background: #FFF; border: 1px solid #E3E6EB; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.hasil-a { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.pcs { font-weight: 800; color: #1D4ED8; white-space: nowrap; }
.kardus-list { display: flex; flex-wrap: wrap; gap: 6px; }
.kd-tag { font-size: 14px; font-weight: 800; background: #15181E; color: #FFF; border-radius: 8px; padding: 4px 10px; letter-spacing: .03em; }
.menu { display: flex; flex-direction: column; gap: 8px; }
.menu-i { background: #FFF; border: 1px solid #E3E6EB; border-radius: 14px; padding: 14px; text-align: left; display: flex; flex-direction: column; gap: 2px; color: #15181E; min-height: 56px; }
.menu-i b { font-size: 15px; } .menu-i span { font-size: 12px; color: #5B6270; }
.seg.empat { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kartu.rapat { padding: 4px 14px; gap: 0; }
.pil { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #F1F3F6; min-height: 48px; }
.pil:last-child { border-bottom: 0; }
.pil-t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.pil-t b { font-size: 14px; } .pil-t b.abu { color: #9CA3AF; }
.mini { border: 1px solid #D5D9E0; background: #F4F5F7; border-radius: 999px; font-size: 11px; padding: 4px 8px; color: #374151; min-height: 28px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 6px 4px; border-bottom: 1px solid #F1F3F6; text-align: right; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl th { font-size: 11px; color: #5B6270; font-weight: 700; }
.grafik { display: flex; gap: 3px; align-items: flex-end; height: 110px; padding-top: 6px; }
.gb { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; height: 100%; min-width: 0; }
.gb-b { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 1px; }
.gb-b i { width: 45%; max-width: 10px; border-radius: 3px 3px 0 0; display: block; min-height: 1px; }
.gb span { font-size: 9px; color: #5B6270; }
.gm { background: #1D4ED8; } .gk { background: #F59E0B; }
.leg { display: flex; gap: 12px; font-size: 11px; color: #5B6270; }
.leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.pratinjau { background: #FFF; border: 1px solid #E3E6EB; border-radius: 14px; padding: 10px; display: flex; justify-content: center; overflow: auto; }
.pratinjau .lembar { width: 300px; height: 450px; border: 1px dashed #D5D9E0; }
.lembar { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(5, 1fr); width: 100mm; height: 150mm; padding: 3mm; gap: 2mm; background: #FFF; color: #000; box-sizing: border-box; }
.stk { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1mm; overflow: hidden; }
.stk svg { width: 21mm; height: 21mm; }
.pratinjau .stk svg { width: 60px; height: 60px; }
.stk span { font: 800 11pt/1 Inter, Arial, sans-serif; letter-spacing: .04em; }
.pratinjau .stk span { font-size: 11px; }
.daftar-kecil div { padding: 2px 0; }
#areaCetak { display: none; }

/* ---------- cetak ---------- */
@page stiker { size: 100mm 150mm; margin: 0; }
@media print {
  body { background: #FFF; }
  body.mode-cetak-stiker #app { display: none !important; }
  body.mode-cetak-stiker #areaCetak { display: block; }
  body.mode-cetak-stiker .lembar { page: stiker; break-after: page; }
  body.mode-cetak-laporan .bawah, body.mode-cetak-laporan .tidak-cetak, body.mode-cetak-laporan .seg, body.mode-cetak-laporan .demo, body.mode-cetak-laporan .offline, body.mode-cetak-laporan .toast { display: none !important; }
  body.mode-cetak-laporan .utama { padding-bottom: 0; }
  body.mode-cetak-laporan .kartu { break-inside: avoid; }
}
