/* Jet Project UI v2 (2026-12-01): teks lebih terbaca + animasi.
   Untuk kembali ke tampilan lama: hapus baris ui-v2.css dan ui-v2.js di index.html. */

/* ---------- keterbacaan ---------- */
body .statlabel{font-size:12.5px}
body .card>small{font-size:13px;line-height:1.45}
body .top>span{font-size:13px}
body .sectionhead .link,body .notice .link,body .end .link{font-size:13px}
body .sectionhead .count{font-size:12px}
body .plotrow>div,body .plotrow>b{font-size:13px}
body .chartfooter>span{font-size:12.5px}
body .chartfooter>strong{font-size:14px}
body .body>small,body .taskitem>small{font-size:12.5px;line-height:1.45}
body .body>b,body .end>b{font-size:14px}
body .row>b,body .row>strong{font-size:13px}
body .entry>.body,body .entry>b{font-size:13.5px}
body .toolrow>button{font-size:13px}
body .mobile-dock button>span{font-size:11.5px}
aside .brand span{white-space:nowrap}
#nav button{white-space:nowrap}
/* desktop: semua kartu ringkasan muat sebaris */
body #main .stats .card strong{white-space:nowrap}
@media(min-width:1400px){body #main .stats.four{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}}
@media(min-width:1100px) and (max-width:1399px){body #main .stats.four:has(>:nth-child(5):last-child){grid-template-columns:repeat(6,minmax(0,1fr))}body #main .stats.four:has(>:nth-child(5):last-child)>*{grid-column:span 2}body #main .stats.four:has(>:nth-child(5):last-child)>:nth-child(n+4){grid-column:span 3}}

/* ---------- animasi ---------- */
@keyframes jp-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes jp-fade{from{opacity:0}to{opacity:1}}
@keyframes jp-pop{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}
@keyframes jp-slide{0%{transform:translateX(-110%)}100%{transform:translateX(260%)}}
@keyframes jp-spin{to{transform:rotate(360deg)}}

/* bilah progres tipis di atas layar saat menghubungi server */
#jpProgress{position:fixed;left:0;top:0;width:100%;height:3px;z-index:10000;pointer-events:none;overflow:hidden;opacity:0;transition:opacity .2s}
html.jp-busy #jpProgress{opacity:1;transition-delay:.18s}
#jpProgress i{display:block;width:40%;height:100%;background:#2563eb;border-radius:0 3px 3px 0;animation:jp-slide 1s cubic-bezier(.45,0,.2,1) infinite}

/* tombol berputar saat menyimpan */
button.is-loading{position:relative;color:transparent!important;pointer-events:none}
button.is-loading svg{opacity:0}
button.is-loading::after{content:'';position:absolute;inset:0;margin:auto;width:18px;height:18px;border-radius:50%;border:2px solid #ffffff59;border-top-color:#fff;animation:jp-spin .7s linear infinite}
button.is-loading:not(.primary)::after{border-color:#2563eb40;border-top-color:#2563eb}

/* kartu, panel, dan daftar muncul berurutan */
#main>.stats>*,#main>.mobile-overview,#main>.dashboard-grid>*,#main>.panel,#main>section,#main>details{animation:jp-rise .38s cubic-bezier(.22,1,.36,1) both}
#main>.stats>*:nth-child(2){animation-delay:.04s}#main>.stats>*:nth-child(3){animation-delay:.08s}#main>.stats>*:nth-child(4){animation-delay:.12s}#main>.stats>*:nth-child(5){animation-delay:.16s}
#main>.dashboard-grid>*:nth-child(2){animation-delay:.08s}
#main .entry,#main .notice{animation:jp-fade .25s ease-out both}

/* jendela formulir */
dialog#modal[open]{animation:jp-pop .24s cubic-bezier(.22,1,.36,1)}
dialog#modal[open]::backdrop{animation:jp-fade .2s ease-out}

/* halaman login */
main#main form.login{animation:jp-pop .45s cubic-bezier(.22,1,.36,1) both}
main:has(.login)::before{animation:jp-rise .55s cubic-bezier(.22,1,.36,1) both}

/* sentuhan kecil */
#main .card,#main .panel{transition:box-shadow .15s,border-color .15s}
@media(hover:hover){#main .stats .card:hover,#main .panel:hover{box-shadow:0 8px 24px #12305a10}}
#nav button,.mobile-dock button{transition:background-color .15s,color .15s,transform .12s}
.mobile-dock button:active{transform:scale(.96)}

@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-delay:0s!important;animation-iteration-count:1!important}#jpProgress i,button.is-loading::after{animation:none}}

/* ---------- daftar Nota & belanja jadi kartu di HP (2026-12-01) ---------- */
@media(max-width:640px){
#ledger .tablewrap{overflow:visible}
#ledger table,#ledger tbody,#ledger tr,#ledger td{display:block;width:auto}
#ledger thead{display:none}
#ledger tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;align-items:center;padding:14px 2px;border-bottom:1px solid #e6ebf3}
#ledger td{padding:0!important;border:0!important;background:none!important}
#ledger td:first-child{grid-column:1/-1}
#ledger td:nth-child(2){font-size:12.5px;color:#667286}
#ledger td:nth-child(3){text-align:right;font-size:15px}
#ledger td:nth-child(5){text-align:right}
}
/* teks tabel lebih terbaca */
body #main table th{font-size:12px}
body #main table td{font-size:13.5px}
body #main .tabletitle small{font-size:12.5px}
/* catatan AI pusat & tombol WhatsApp laporan */
.ai-central-note{background:#ecfdf3;border:1px solid #b7ebcd;color:#14532d;border-radius:10px;padding:12px 14px;font-size:13.5px;line-height:1.5}
.wa-share{display:inline-flex;align-items:center;gap:8px;background:#16a34a!important;border-color:#16a34a!important;color:#fff!important}
.wa-share:hover{filter:brightness(1.08)}

/* ===== Tema aplikasi & tema laporan PDF (2026-12-02) ===== */
:root{--th:#6026E3;--th-soft:#F3EBFF;--rc:#142c4b}
:root[data-theme="blue"]{--th:#2563eb;--th-soft:#edf3ff}
:root[data-theme="indigo"]{--th:#4338ca;--th-soft:#eef0ff}
:root[data-theme="teal"]{--th:#0f766e;--th-soft:#e6f6f4}
:root[data-theme="emerald"]{--th:#047857;--th-soft:#e8f7f1}
:root[data-theme="amber"]{--th:#b45309;--th-soft:#fdf3e3}
:root[data-theme="rose"]{--th:#be123c;--th-soft:#fdecef}
:root[data-theme="slate"]{--th:#475569;--th-soft:#eef1f5}
:root[data-theme]{--jet-accent:var(--th);--brand-accent:var(--th);--brand-primary:var(--th)}
:root[data-theme] .primary{background:var(--th)!important;border-color:var(--th)!important}
:root[data-theme] nav button.active{background:var(--th-soft)!important;color:var(--th)!important}
:root[data-theme] .link{color:var(--th)}
:root[data-theme] .mobile-dock .selected{color:var(--th)!important}
:root[data-theme] .mobile-dock .mobile-add .ico{background:var(--th)!important}
:root[data-theme] #jpProgress i{background:var(--th)}
:root[data-theme] .mobile-action .ico{color:var(--th)}

/* --- halaman Pengaturan --- */
.settings-savebar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;border-color:var(--th-soft)!important}
.settings-savebar b{display:block;font-size:15px}.settings-savebar small{color:#667286;font-size:13px}
.settings-savebar #settingsStatus{flex-basis:100%;margin:0;font-size:13px;color:#b42318}
.settings-sub{font-size:13px;font-weight:600;color:#4b5565;margin:16px 0 8px}
.theme-swatches{display:flex;flex-wrap:wrap;gap:8px}
.theme-swatch,.rcolor{position:relative;display:inline-flex!important;flex-direction:row!important;align-items:center;gap:8px;margin:0!important;padding:6px 12px 6px 6px;border:1px solid #dfe5ee;border-radius:24px;cursor:pointer;font-weight:500}
.theme-swatch input,.rcolor input,.rtheme-opt input{position:absolute;opacity:0;pointer-events:none}
.theme-swatch span,.rcolor span{width:26px;height:26px;border-radius:50%;background:var(--sw);box-shadow:inset 0 0 0 1px #0000001a}
.rcolor span.follow{background:conic-gradient(#2563eb 0 25%,#0f766e 0 50%,#b45309 0 75%,#be123c 0)}
.theme-swatch small,.rcolor small{font-size:13px;color:#1f2a37}
.theme-swatch:has(input:checked),.rcolor:has(input:checked){border-color:#1f2a37;box-shadow:inset 0 0 0 1px #1f2a37}
.theme-swatch:has(input:focus-visible),.rcolor:has(input:focus-visible),.rtheme-opt:has(input:focus-visible){outline:3px solid #93b4ff;outline-offset:2px}
.rcolor-row{display:flex;flex-wrap:wrap;gap:8px}
.rtheme-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.rtheme-opt{position:relative;display:flex!important;flex-direction:column;gap:4px;margin:0!important;padding:10px;border:1px solid #dfe5ee;border-radius:12px;cursor:pointer;transition:border-color .15s,background-color .15s}
.rtheme-opt:has(input:checked){border-color:var(--th);background:var(--th-soft);box-shadow:inset 0 0 0 1px var(--th)}
.rtheme-opt b{font-size:14px}.rtheme-opt small{font-size:12px;color:#667286;font-weight:400}
.rtheme-thumb{display:grid;gap:5px;height:74px;padding:8px;border-radius:8px;background:#fff;border:1px solid #eef1f6;margin-bottom:4px}
.rtheme-thumb i{display:block;border-radius:3px;background:#e7ebf2}
.rtheme-thumb i:nth-child(1){height:18px}.rtheme-thumb i:nth-child(2){height:8px;width:70%}.rtheme-thumb i:nth-child(3){height:14px}
.rt-klasik i:nth-child(1){background:none;border-top:4px solid var(--rc);border-radius:0}
.rt-modern i:nth-child(1){background:var(--rc)}.rt-modern i:nth-child(3){background:var(--rc);opacity:.85}
.rt-elegan i:nth-child(1){background:none;border-top:4px double var(--rc);border-radius:0}.rt-elegan i:nth-child(3){background:none;border-top:1px solid var(--rc);border-bottom:1px solid var(--rc);border-radius:0}
.rt-minimal i:nth-child(1){background:none;border-top:1px solid #111;border-radius:0}.rt-minimal i:nth-child(3){background:none;border-bottom:1px solid #111;border-radius:0}
.icon-row{display:flex;align-items:center;gap:14px;margin-top:6px}
.icon-row .settings-icon{width:64px;height:64px;border-radius:14px;object-fit:cover;border:1px solid #e3e8ef;flex:none}
.icon-pick{margin:0!important}.icon-pick small{display:block;font-weight:400;color:#667286;font-size:12.5px;margin-top:4px}
.ai-central-note.ok{background:#eef4ff;border-color:#c8d8ff;color:#1e3a8a}
.ai-central-note.warn{background:#fff7ed;border-color:#fed7aa;color:#9a3412}
.ai-usage{margin:12px 0 4px}.ai-usage>div{display:flex;justify-content:space-between;font-size:13px;color:#4b5565;margin-bottom:6px}.ai-usage b{color:#1f2a37}
.ai-usage i{display:block;height:8px;border-radius:5px;background:#eef1f5;overflow:hidden}.ai-usage em{display:block;height:100%;background:var(--th);border-radius:5px}
.ai-advanced{margin-top:14px;border:1px solid #e3e8ef;border-radius:10px;padding:4px 14px}
.ai-advanced summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-size:14px;font-weight:600;color:#4b5565}
.ai-advanced[open]{padding-bottom:14px}
.settings-links{display:flex;flex-wrap:wrap;gap:10px}
@media(max-width:900px){.rtheme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* --- tema laporan PDF (pratinjau layar & cetak) --- */
html[data-rtheme] :is(#print,#reportPreview) .report-cover{border-top-color:var(--rc)!important}
html[data-rtheme] :is(#print,#reportPreview) .report-kicker{color:var(--rc)!important}
html[data-rtheme] :is(#print,#reportPreview) .report-note{border-left-color:var(--rc)!important}
/* modern */
html[data-rtheme="modern"] :is(#print,#reportPreview) .report-cover{background:var(--rc)!important;color:#fff!important;border:0!important;border-radius:10px!important;padding:18pt 20pt!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}
html[data-rtheme="modern"] :is(#print,#reportPreview) .report-cover :is(h1,p,.report-kicker){color:#fff!important}
html[data-rtheme="modern"] :is(#print,#reportPreview) .report-cover p{opacity:.88}
html[data-rtheme="modern"] :is(#print,#reportPreview) th{background:var(--rc)!important;color:#fff!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}
html[data-rtheme="modern"] :is(#print,#reportPreview) tbody tr:nth-child(even) td{background:#f5f7fa!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}
html[data-rtheme="modern"] :is(#print,#reportPreview) .report-metrics div{background:#fff!important;border:1px solid #d9e0e8!important;border-left:4px solid var(--rc)!important}
html[data-rtheme="modern"] :is(#print,#reportPreview) .report h2{color:var(--rc)!important;border-bottom:0!important}
/* elegan */
html[data-rtheme="elegan"] :is(#print,#reportPreview) :is(.report,.client-financial){font-family:Georgia,'Times New Roman',serif!important}
html[data-rtheme="elegan"] :is(#print,#reportPreview) .report-cover{border-top:5px double var(--rc)!important;border-bottom:1px solid var(--rc)!important;text-align:center}
html[data-rtheme="elegan"] :is(#print,#reportPreview) .report-cover h1{font-weight:400!important;letter-spacing:.01em!important}
html[data-rtheme="elegan"] :is(#print,#reportPreview) .report-kicker{letter-spacing:.3em!important;font-weight:400!important}
html[data-rtheme="elegan"] :is(#print,#reportPreview) .report h2{font-weight:400!important;border-bottom:1px solid var(--rc)!important;color:#1f2937!important}
html[data-rtheme="elegan"] :is(#print,#reportPreview) th{background:none!important;color:var(--rc)!important;border-top:1px solid var(--rc)!important;border-bottom:1px solid var(--rc)!important;font-weight:400!important;text-transform:uppercase;letter-spacing:.06em}
html[data-rtheme="elegan"] :is(#print,#reportPreview) td{border-bottom:1px dotted #b9c1cc!important}
html[data-rtheme="elegan"] :is(#print,#reportPreview) .report-metrics div{background:none!important;border:0!important;border-top:1px solid var(--rc)!important;border-radius:0!important}
/* minimal */
html[data-rtheme="minimal"] :is(#print,#reportPreview) .report-cover{border-top:1px solid #111!important;border-bottom:1px solid #d1d5db!important}
html[data-rtheme="minimal"] :is(#print,#reportPreview) .report-kicker{color:#6b7280!important}
html[data-rtheme="minimal"] :is(#print,#reportPreview) th{background:none!important;color:#111!important;border-bottom:1px solid #111!important}
html[data-rtheme="minimal"] :is(#print,#reportPreview) td{border-bottom:1px solid #e5e7eb!important}
html[data-rtheme="minimal"] :is(#print,#reportPreview) .report-metrics div{background:none!important;border:1px solid #e5e7eb!important}
html[data-rtheme="minimal"] :is(#print,#reportPreview) .report-metrics strong{color:var(--rc)!important}
html[data-rtheme="minimal"] :is(#print,#reportPreview) .report h2{border-bottom:1px solid #e5e7eb!important}

/* ===== Poles tampilan (unslop, 2026-12-02) — arah: teliti & tenang seperti buku kas mandor ===== */
/* label: huruf biasa, tanpa jarak lebar */
.navlabel{font-size:12px!important;letter-spacing:0!important;font-weight:500!important;color:#7a8597!important;margin:0 12px 8px!important}
.eyebrow{font-size:12px!important;letter-spacing:0!important;font-weight:500!important;color:#7a8597!important;margin-bottom:4px!important}
aside .brand small{font-size:10px!important;letter-spacing:.06em!important;font-weight:500!important}
/* judul: hierarki dari ukuran, bukan ketebalan */
.pagehead h1{font-weight:600!important;letter-spacing:-.02em!important}
#main .sectionhead h1,#main .sectionhead h2{font-weight:600!important;letter-spacing:0!important}
#main>section>.sectionhead:first-child h2,#main>.sectionhead h2{font-size:18px!important}
#main .sectionhead small,#main .sectionhead p{font-size:13px!important;letter-spacing:0!important}
.stats .card strong,.mobile-overview strong{font-weight:600!important;letter-spacing:-.01em!important}
button,.primary{font-weight:600}
.projectmeta .status,#main .status,#main td .badge,#main td span[class*="status"]{font-size:12px!important;font-weight:500!important;letter-spacing:0!important}
.projectmeta{font-size:13px}
/* kartu angka: label + angka, tanpa kotak ikon */
#main .stats .statlabel .ico{background:none!important;padding:0!important;width:16px!important;height:16px!important;color:#8a94a6!important;border-radius:0!important}
#main .stats .statlabel{gap:8px!important;color:#4b5565}
/* perlu perhatian: titik status, bukan kotak oranye */
.noticeicon{position:relative;width:8px;height:8px;padding:0!important;border-radius:50%!important;background:#d97706!important;flex:none;align-self:center}
.noticeicon.blue{background:#2563eb!important}
.noticeicon .ico{display:none}
/* warna polos, bayangan netral */
.projectcover{background:#eef2f7!important}
.receipt-scanner{background:#f6f8fb!important;border-color:#e3e8ef!important}
.primary{box-shadow:none!important}
#main .card,#main .panel{box-shadow:0 1px 2px #0f172a0a!important}
@media(hover:hover){#main .stats .card:hover,#main .panel:hover{box-shadow:0 4px 12px #0f172a0f!important}}
/* tombol atas "Proyek baru" jadi tombol kedua, aksi halaman tetap tombol utama */
:root header.top .primary,:root[data-theme] header.top .primary{background:#fff!important;color:#1f2a37!important;border:1px solid #d6dde7!important}
:root[data-theme] header.top .primary .ico{color:var(--th,#2563eb)}
/* titik menonjol 1: kartu saldo di HP — biru tua polos */
.mobile-balance{background:var(--th-deep,#0b3a8c)!important;box-shadow:0 8px 20px #0f172a1f!important}
:root[data-theme] .mobile-balance{background:color-mix(in srgb,var(--th) 82%,#000)!important}
/* titik menonjol 2: grafik anggaran — batang lebih tegas */
.plotrow .track{height:20px;border-radius:6px;background:#eef1f5}
.plotrow .track i{border-radius:6px}
.plotrow>b{font-variant-numeric:tabular-nums}
/* tanda khas: garis progres bergaris ukur seperti meteran (tiap 10%) */
.bar{position:relative;height:8px!important;border-radius:4px!important}
.bar i{border-radius:4px!important}
.bar::after{content:'';position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(90deg,transparent 0 calc(10% - 1px),#ffffffcc calc(10% - 1px) 10%)}
.mobile-balance .bar::after{background:repeating-linear-gradient(90deg,transparent 0 calc(10% - 1px),#ffffff55 calc(10% - 1px) 10%)}
/* angka rupiah sejajar */
#main td,#main .row>b,#main .row>strong,#main .plotrow>b{font-variant-numeric:tabular-nums}

/* Jet Apps 4 Des 2026: logo dan palet Jet Project (design-system/PALET-APLIKASI.md).
   Tema bawaan "jet" = ungu #6026E3, latar aksen #F3EBFF. Permukaan bersama: latar #F8FAFC, kartu #FFF, teks #0F172A. */
:root[data-theme="jet"]{--th:#6026E3;--th-soft:#F3EBFF}
body:not(:has(main .login)){background:#F8FAFC;color:#0F172A}
/* Aksen biru yang tertulis langsung (app.js dan style.css) ikut ungu pada tema jet. */
:root[data-theme="jet"] .plotrow .track i[style*="#2b67e9"]{background:var(--th)!important}
:root[data-theme="jet"] .plotrow .track i[style*="#9bbafb"]{background:color-mix(in srgb,var(--th) 45%,#fff)!important}
:root[data-theme="jet"] .plotrow .track i[style*="#ccdcfc"]{background:color-mix(in srgb,var(--th) 22%,#fff)!important}
:root[data-theme="jet"] .dot{background:var(--th)}
:root[data-theme="jet"] .noticeicon.blue{background:var(--th)!important}
:root[data-theme="jet"] .avatar{color:var(--th);background:var(--th-soft);border-color:color-mix(in srgb,var(--th) 18%,#fff)}
:root[data-theme="jet"] .projectcover{color:color-mix(in srgb,var(--th) 55%,#fff)}
