:root { --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px); }
html { -webkit-text-size-adjust: 100%; }
body { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; overscroll-behavior-y: none; }
[x-cloak] { display: none !important; }
.inp { width: 100%; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: .75rem; padding: .7rem .85rem; font-weight: 700; font-size: 16px; color: #0f172a; outline: none; min-width: 0; }
.inp:focus { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.15); background: #fff; }
.inp-sm { padding: .5rem .6rem; font-size: 14px; }
.lbl { display: block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #64748b; margin-bottom: .3rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-weight: 900; border-radius: .75rem; padding: .8rem 1.1rem; font-size: .75rem; letter-spacing: .03em; border: 1px solid transparent; cursor: pointer; transition: transform .08s, box-shadow .08s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translateY(3px); box-shadow: none !important; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-emerald { background: #059669; color: #fff; border-color: #047857; box-shadow: 0 4px 0 #047857; }
.btn-rose { background: #e11d48; color: #fff; border-color: #be123c; box-shadow: 0 4px 0 #9f1239; }
.btn-violet { background: #7c3aed; color: #fff; border-color: #6d28d9; box-shadow: 0 4px 0 #6d28d9; }
.btn-amber { background: #d97706; color: #fff; border-color: #b45309; box-shadow: 0 4px 0 #b45309; }
.btn-slate { background: #1e293b; color: #fff; border-color: #0f172a; box-shadow: 0 3px 0 #0f172a; }
.btn-ghost { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.btn-wa { background: #25d366; color: #fff; border-color: #1ebe5d; }
.card { background: #fff; border: 1px solid #e2e8f0; border-radius: 1rem; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.chip { display: inline-flex; align-items: center; padding: .15rem .6rem; border-radius: 999px; font-size: 10px; font-weight: 900; border: 1px solid; white-space: nowrap; }
.nav-i { display: flex; align-items: center; gap: .85rem; width: 100%; border-radius: .75rem; padding: .75rem 1rem; font-size: .75rem; font-weight: 700; letter-spacing: .02em; color: #94a3b8; transition: background .15s; text-align: left; }
.nav-i:hover { background: #1e293b; color: #fff; }
.nav-i i { width: 1.1rem; text-align: center; }
.modal-wrap { position: fixed; inset: 0; background: rgba(15,23,42,.6); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.modal { background: #fff; width: 100%; max-height: 92vh; max-height: 92dvh; overflow-y: auto; border-radius: 1.25rem 1.25rem 0 0; padding: 1.25rem; padding-bottom: calc(1.25rem + var(--safe-b)); overscroll-behavior: contain; }
@media (min-width: 640px) { .modal-wrap { align-items: center; padding: 1rem; } .modal { border-radius: 1.25rem; max-width: 44rem; padding: 1.75rem; } .modal-sm { max-width: 26rem; } }
.bar-bg { height: 10px; background: #e5e7eb; border-radius: 10px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 10px; transition: width 1s; }
.custom-scroll::-webkit-scrollbar { height: 6px; width: 6px; } .custom-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.no-scrollbar { scrollbar-width: none; } .no-scrollbar::-webkit-scrollbar { display: none; }
.safe-top { padding-top: var(--safe-t); }
.bottom-nav { padding-bottom: var(--safe-b); }
@keyframes spin { to { transform: rotate(360deg); } } .spin { animation: spin .8s linear infinite; }
@media print { aside, header, .bottom-nav, .no-print, .toast-area { display: none !important; } main { padding: 0 !important; margin: 0 !important; } body { background: #fff; } .lg\:pl-64 { padding-left: 0 !important; } }

/* ===================== TEMA HIJAU DOORSTUDIO (V9.1) ===================== */
:root { --g900: #14301f; --g800: #1A3C2B; --g700: #285A41; --g600: #2f6f4e; --g100: #e3efe7; --g50: #f1f6f2; --gold: #C5A059; --gold-d: #A38241; }
body, .app-bg { background: var(--g50); }
.bg-g900 { background-color: var(--g800); }
.topbar { background: var(--g800); border-bottom: 4px solid var(--gold); }
.login-bg { background: linear-gradient(160deg, #e3efe7 0%, #cfe3d6 100%); }
.card { border-color: #dbe7df; }
.nav-i { color: #a9c5b4; }
.nav-i:hover { background: var(--g700); color: #fff; }
.nav-active { background: var(--g700) !important; color: #fff !important; box-shadow: inset 4px 0 0 var(--gold); }
.btn-emerald { background: var(--g700); color: #fff; border-color: var(--g800); box-shadow: 0 4px 0 var(--g800); }
.inp:focus { border-color: var(--g600); box-shadow: 0 0 0 3px rgba(47,111,78,.18); }
.mhead { background: var(--g800); color: #fff; border-left: 6px solid var(--gold); border-radius: .75rem; padding: .7rem 1rem; margin-top: .9rem; }

/* ===================== WARNA JENIS PENGELUARAN ===================== */
.jc-import { --jc: #0284c7; --jt: #e0f2fe; --jd: #075985; }   /* Kain TC / Satin Import  : biru  */
.jc-polly  { --jc: #7c3aed; --jt: #ede9fe; --jd: #5b21b6; }   /* Kain Polly A / B        : ungu  */
.jc-tinta  { --jc: #e11d48; --jt: #ffe4e6; --jd: #9f1239; }   /* Belanja Tinta           : merah */
.jc-lain   { --jc: #d97706; --jt: #fef3c7; --jd: #92400e; }   /* Pengeluaran lain-lain   : oranye */
.jc-campur { --jc: #0d9488; --jt: #ccfbf1; --jd: #115e59; }   /* Nota kain campuran      : tosca */
.jc-masuk  { --jc: #2f6f4e; --jt: #e3efe7; --jd: #14301f; }   /* Pemasukan               : hijau */
.jc-semua  { --jc: #285A41; --jt: #e3efe7; --jd: #14301f; }
.jrow { border-left: 6px solid var(--jc); }
.jchip { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; border-radius: 999px; font-size: 10px; font-weight: 900; background: var(--jt); color: var(--jd); border: 1px solid var(--jc); white-space: nowrap; }
.jchip-inv { display: inline-flex; align-items: center; gap: .35rem; padding: .1rem .6rem; border-radius: 999px; font-size: 11px; background: var(--jt); color: var(--jd); border-left: 4px solid var(--jc); }
.jdot { display: inline-block; width: .6rem; height: .6rem; border-radius: 999px; background: var(--jc); border: 2px solid #fff; }
.jtab { display: inline-flex; align-items: center; gap: .5rem; padding: .65rem 1rem; border-radius: .75rem; font-size: .75rem; font-weight: 900; white-space: nowrap; flex-shrink: 0; background: #fff; color: var(--jd); border: 1px solid var(--jc); border-bottom-width: 4px; transition: transform .08s; }
.jtab:active { transform: scale(.96); }
.jtab.on { background: var(--jc); color: #fff; border-color: var(--jd); }
.jtab.on .jdot { border-color: var(--jc); }
.jbtn { background: var(--jc); color: #fff; border-color: var(--jd); box-shadow: 0 4px 0 var(--jd); }
.jtitle { color: var(--jd); }
.jbar { border-top: 4px solid var(--jc); }

/* ===================== POLES TAMPILAN V9.2 ===================== */
html { scroll-behavior: smooth; }
body { font-size: 15px; line-height: 1.5; }
main { scroll-padding-top: 5rem; }
/* tombol: lebih besar & mudah disentuh */
.btn { min-height: 46px; font-size: .78rem; border-radius: .9rem; padding: .7rem 1.15rem; letter-spacing: .02em; }
.btn i { font-size: .95em; }
.btn-ghost { background: #fff; border: 1px solid #cfdcd3; color: #1f4d38; box-shadow: 0 2px 0 #dbe7df; }
.btn-ghost:hover { background: var(--g50); }
.btn-ghost:active { box-shadow: none; }
.icon-btn { width: 2.5rem; height: 2.5rem; display: inline-grid; place-items: center; border-radius: .75rem; background: #f1f5f9; color: #64748b; transition: background .15s, color .15s; flex-shrink: 0; }
.icon-btn:hover { background: #e2e8f0; color: #0f172a; }
/* kartu */
.card { border-radius: 1.1rem; box-shadow: 0 1px 2px rgba(20,48,31,.05), 0 4px 14px rgba(20,48,31,.04); }
/* judul halaman */
.page-head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.ph-ico { width: 3rem; height: 3rem; border-radius: 1rem; background: linear-gradient(135deg, var(--g600), var(--g800)); color: #fff; display: grid; place-items: center; font-size: 1.2rem; box-shadow: 0 6px 14px rgba(26,60,43,.28); flex-shrink: 0; border-bottom: 3px solid var(--gold); }
.ph-t { flex: 1; min-width: 12rem; }
.ph-t h1 { font-size: 1.35rem; font-weight: 800; color: var(--g900); line-height: 1.2; }
.ph-t p { font-size: .8rem; font-weight: 600; color: #64748b; margin-top: .1rem; }
.ph-act { display: flex; gap: .5rem; }
@media (max-width: 640px) { .ph-t h1 { font-size: 1.15rem; } .ph-ico { width: 2.6rem; height: 2.6rem; font-size: 1.05rem; } }
/* menu samping */
aside { box-shadow: 4px 0 24px rgba(0,0,0,.18); }
.nav-i { min-height: 48px; font-size: .85rem; font-weight: 700; padding: .45rem .7rem; gap: .8rem; border-radius: .95rem; color: #bcd3c5; }
.nav-i i { width: 2.1rem; height: 2.1rem; display: grid; place-items: center; border-radius: .7rem; background: rgba(255,255,255,.07); font-size: .9rem; flex-shrink: 0; transition: background .15s; }
.nav-i:hover i { background: rgba(255,255,255,.15); }
.nav-i.nav-active i { background: var(--gold); color: var(--g900); }
.nav-i.nav-active { font-weight: 800; }
/* menu bawah (HP) */
.bn-i { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .45rem 0 .5rem; font-size: 10.5px; font-weight: 800; color: #7b8b82; -webkit-tap-highlight-color: transparent; }
.bn-i i { font-size: 1.05rem; width: 3.1rem; height: 1.9rem; display: grid; place-items: center; border-radius: 999px; transition: background .2s, color .2s; }
.bn-on { color: var(--g800); }
.bn-on i { background: var(--g100); color: var(--g700); }
nav.bottom-nav { box-shadow: 0 -6px 20px rgba(20,48,31,.1); border-top: 0; }
/* ringkasan angka */
.stat { background: #fff; border: 1px solid #dbe7df; border-radius: 1rem; padding: .85rem 1rem; box-shadow: 0 1px 2px rgba(20,48,31,.05); }
.stat-l { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #64748b; }
.stat-v { font-size: 1.05rem; font-weight: 800; margin-top: .15rem; color: var(--g900); }
@media (min-width: 640px) { .stat-v { font-size: 1.25rem; } }
/* status sinkron */
.sync-bar { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem; border-radius: .9rem; font-size: .8rem; font-weight: 600; border: 1px solid; }
.sync-bar > i { font-size: 1.05rem; }
.sync-ok { background: #ecfdf3; border-color: #bbf0d1; color: #14532d; }
.sync-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.sync-warn { background: #fffbeb; border-color: #fcd34d; color: #78350f; }
.sync-err { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
/* dropdown (accordion) */
.acc-head { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .85rem 1rem; text-align: left; background: #fff; transition: background .15s; min-height: 62px; }
.acc-head:hover { background: var(--g50); }
.acc-ico { width: 2.5rem; height: 2.5rem; border-radius: .8rem; background: #ede9fe; color: #6d28d9; display: grid; place-items: center; flex-shrink: 0; }
.acc-chev { width: 2rem; height: 2rem; border-radius: 999px; background: #f1f5f9; color: #475569; display: grid; place-items: center; font-size: .8rem; transition: transform .25s, background .2s; }
.acc-chev.rot { transform: rotate(180deg); background: var(--g100); color: var(--g700); }
/* baris riwayat gaji */
.avatar { width: 2.6rem; height: 2.6rem; border-radius: 999px; background: linear-gradient(135deg, var(--g600), var(--g800)); color: #fff; font-weight: 800; display: grid; place-items: center; text-transform: uppercase; flex-shrink: 0; border: 2px solid var(--gold); }
.mini { background: var(--g50); border-radius: .7rem; padding: .45rem .6rem; min-width: 0; }
.mini-l { font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #64748b; }
.mini-v { font-weight: 800; color: #0f172a; font-size: .82rem; white-space: nowrap; }
.mini-s { font-size: 10.5px; font-weight: 600; color: #94a3b8; }
@media (max-width: 420px) { .mini-v { font-size: .74rem; } }
/* kolom input: sedikit lebih lega */
.inp { border-radius: .85rem; padding: .78rem .9rem; }
.mhead { box-shadow: 0 4px 12px rgba(26,60,43,.18); }

/* header minggu pada riwayat gaji */
.whead { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; background: #e6f0e9; color: var(--g800); border-left: 4px solid var(--gold); border-radius: .6rem; padding: .45rem .8rem; margin: .55rem 0 .15rem .6rem; font-size: .74rem; font-weight: 800; }
.whead-r { font-weight: 700; color: #3b6a50; }
.whead-r b { color: var(--g900); }
