:root {
    --navy: #1f3a5f;
    --navy-gelap: #162b47;
    --biru: #2563eb;
    --biru-muda: #eff6ff;
    --hijau: #16a34a;
    --merah: #dc2626;
    --ungu: #7c3aed;
    --oranye: #b45309;
    --latar: #f3f4f6;
    --kartu: #ffffff;
    --garis: #e5e7eb;
    --teks: #1f2937;
    --redup: #6b7280;
    --radius: 10px;
    --bayang: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px; color: var(--teks); background: var(--latar);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--biru); text-decoration: none; }
h1:focus { outline: none; }

/* ===== kerangka ===== */
.kerangka { display: flex; min-height: 100vh; }
.sidebar {
    width: 240px; flex: 0 0 240px; background: var(--navy); color: #dbeafe;
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .merek { padding: 22px 22px 18px; font-weight: 700; font-size: 18px; color: #fff; letter-spacing: .2px; }
.sidebar .merek small { display: block; font-weight: 400; font-size: 12px; color: #93c5fd; margin-top: 2px; }
.sidebar nav { flex: 1; padding: 6px 12px; }
.sidebar nav a {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px; margin-bottom: 4px;
    border-radius: 8px; color: #dbeafe; font-weight: 500;
}
.sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar nav a.active { background: rgba(255,255,255,.14); color: #fff; }
.sidebar nav .ikon { width: 20px; text-align: center; font-size: 16px; }
.sidebar .profil { padding: 16px 22px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }
.sidebar .profil b { display: block; color: #fff; font-size: 14px; }
.sidebar .profil span { color: #93c5fd; }
.sidebar .profil form button {
    margin-top: 12px; width: 100%; background: transparent; color: #fca5a5;
    border: 1px solid rgba(252,165,165,.4); border-radius: 8px; padding: 8px; cursor: pointer; font: inherit;
}
.sidebar .profil form button:hover { background: rgba(252,165,165,.1); }

.utama { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.atas {
    background: #fff; border-bottom: 1px solid var(--garis); padding: 14px 28px;
    display: flex; align-items: center; gap: 18px; position: sticky; top: 0; z-index: 5;
}
.atas h1 { font-size: 18px; margin: 0; color: var(--navy); font-weight: 600; }
.atas .sub { color: var(--redup); font-size: 12.5px; }
.atas .kanan { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.isi { padding: 22px 28px 40px; }

/* pilihan mode HO / Project */
.mode { display: inline-flex; border: 1px solid var(--navy); border-radius: 8px; overflow: hidden; }
.mode form { margin: 0; }
.mode button {
    border: 0; background: #fff; color: var(--navy); padding: 7px 16px; font: inherit; font-weight: 600; cursor: pointer;
}
.mode button.aktif { background: var(--navy); color: #fff; cursor: default; }
.mode button:disabled:not(.aktif) { color: #9ca3af; cursor: not-allowed; }

/* ===== kartu & tombol ===== */
.kartu { background: var(--kartu); border: 1px solid var(--garis); border-radius: var(--radius); box-shadow: var(--bayang); }
.kartu-kepala { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px 6px; flex-wrap: wrap; }
.kartu-kepala h2 { margin: 0; font-size: 15.5px; color: var(--navy); font-weight: 600; }
.kartu-kepala .sub { color: var(--redup); font-size: 12.5px; margin-top: 3px; }
.kartu-kepala .alat { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kartu-isi { padding: 8px 18px 18px; }

.tombol {
    display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--navy); background: #fff; color: var(--navy);
    border-radius: 8px; padding: 7px 14px; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.tombol:hover { background: var(--biru-muda); }
.tombol.utama { background: var(--biru); border-color: var(--biru); color: #fff; }
.tombol.utama:hover { background: #1d4ed8; }
.tombol.hijau { border-color: var(--hijau); color: var(--hijau); }
.tombol.hijau:hover { background: #f0fdf4; }
.tombol.biru { border-color: var(--biru); color: var(--biru); }
.tombol:disabled { opacity: .5; cursor: not-allowed; }
select.pilih, input.isian {
    border: 1px solid #d1d5db; border-radius: 8px; padding: 7px 10px; font: inherit; background: #fff; color: var(--teks);
}
select.pilih:focus, input.isian:focus { outline: 2px solid #bfdbfe; border-color: var(--biru); }

.segmen { display: inline-flex; border: 1px solid #d1d5db; border-radius: 8px; overflow: hidden; }
.segmen button { border: 0; background: #fff; padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; color: var(--teks); }
.segmen button + button { border-left: 1px solid #d1d5db; }
.segmen button.aktif { background: var(--navy); color: #fff; }

/* ===== KPI ===== */
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 18px; }
.kpi .kartu { padding: 16px 18px; position: relative; overflow: hidden; }
.kpi .kartu::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--aksen, var(--biru)); }
.kpi .judul { color: var(--redup); font-size: 12.5px; }
.kpi .nilai { font-size: 26px; font-weight: 700; margin: 6px 0 4px; letter-spacing: -.3px; }
.kpi .ket { font-size: 12px; color: var(--redup); }
.naik { color: var(--merah); } .turun { color: var(--hijau); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1200px) { .grid-2 { grid-template-columns: 1fr; } }

/* jejak drill-down */
.jejak { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; padding: 2px 18px 6px; color: var(--redup); }
.jejak button { border: 0; background: none; color: var(--biru); cursor: pointer; font: inherit; padding: 0; }
.jejak b { color: var(--teks); }
.petunjuk { color: var(--redup); font-size: 12px; padding: 0 18px; }
.grafik { position: relative; height: 380px; padding: 6px 12px 14px; }
.status { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--redup); text-align: center; padding: 20px; }

/* menu periode */
.dropdown { position: relative; }
.dropdown .panel {
    position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--garis); border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 12px; z-index: 20; min-width: 260px;
}
.dropdown .panel label { display: block; color: var(--redup); font-size: 12px; margin: 6px 0 4px; }
.dropdown .panel .baris { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== tabel ===== */
.tabel-wadah { overflow: auto; border: 1px solid var(--garis); border-radius: 8px; }
table.tabel { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tabel th {
    background: var(--navy); color: #fff; font-weight: 600; padding: 9px 10px; text-align: right; position: sticky; top: 0; white-space: nowrap; z-index: 1;
}
table.tabel th:first-child, table.tabel td:first-child { text-align: left; }
table.tabel td { padding: 7px 10px; border-bottom: 1px solid #f1f5f9; text-align: right; white-space: nowrap; }
table.tabel tbody tr:nth-child(even) td { background: #fafbfc; }
table.tabel tbody tr:hover td { background: var(--biru-muda); cursor: pointer; }
table.tabel tr.pilih td { background: #dbeafe !important; }
table.tabel tr.total td { font-weight: 700; background: #eff6ff; }
table.tabel tr.bagian td { background: #f3f4f6 !important; color: var(--redup); font-weight: 600; font-size: 11.5px; letter-spacing: .4px; cursor: default; }
table.tabel td.plus { color: var(--merah); } table.tabel td.minus { color: var(--hijau); }
table.tabel td.nama { max-width: 340px; overflow: hidden; text-overflow: ellipsis; }

/* ===== login: dua panel seperti aplikasi desktop (kiri biru navy dengan lingkaran dekoratif, kanan formulir) ===== */
.masuk-halaman { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 36%) 1fr; background: #fff; color: #1e293b; }
.masuk-kiri { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 56px 64px; color: #fff;
    background: linear-gradient(165deg, #0f2342 0%, #17315a 55%, #1f3f6e 100%); }
.masuk-kiri .lingkar { position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .07); pointer-events: none; }
.masuk-kiri .l1 { width: 640px; height: 640px; right: -300px; top: -260px; }
.masuk-kiri .l2 { width: 440px; height: 440px; right: -200px; top: -170px; }
.masuk-kiri .l3 { width: 280px; height: 280px; right: -110px; bottom: 18%; background: rgba(255, 255, 255, .06); border: 0; }
.masuk-kiri .l4 { width: 520px; height: 520px; left: -270px; bottom: -330px; }
.kiri-isi { position: relative; z-index: 1; max-width: 520px; animation: masuk-geser .7s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes masuk-geser { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.kiri-merek { display: flex; align-items: center; gap: 14px; margin-bottom: 56px; }
.kiri-merek img { width: 62px; height: 62px; object-fit: contain; }
.kiri-merek b { display: block; font-size: 22px; letter-spacing: .5px; }
.kiri-merek small { display: block; color: #d4af37; letter-spacing: 3.5px; font-size: 11.5px; margin-top: 3px; font-weight: 600; }
.kiri-isi h2 { font-size: 36px; line-height: 1.3; margin: 0 0 18px; font-weight: 600; }
.garis-emas { width: 56px; height: 3px; background: #d4af37; border-radius: 2px; margin-bottom: 22px; }
.kiri-isi p { color: #cbd5e1; font-size: 15px; line-height: 1.6; margin: 0 0 36px; }
.kiri-fitur { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; font-size: 14px; color: #e2e8f0; }
.kiri-fitur li { display: flex; align-items: center; gap: 14px; }
.kiri-fitur i { width: 26px; height: 26px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .13); position: relative; }
.kiri-fitur i::after { content: ""; position: absolute; left: 9px; top: 6px; width: 5px; height: 9px; border: solid #d4af37; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.kiri-kaki { position: absolute; left: 64px; bottom: 28px; font-size: 12px; color: #94a3b8; z-index: 1; }

.masuk-kanan { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px 70px; }
.kanan-isi { width: min(380px, 100%); animation: masuk-naik .6s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes masuk-naik { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.kanan-isi h1 { font-size: 30px; margin: 0; color: #0f172a; font-weight: 700; }
.kanan-isi p.sub { color: #64748b; margin: 6px 0 22px; font-size: 14px; }
.kanan-isi label { display: block; font-size: 13px; font-weight: 600; color: #1e293b; margin: 16px 0 6px; }
.kolom { display: flex; align-items: center; gap: 10px; height: 46px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 0 12px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.kolom:focus-within { border-color: #17315a; box-shadow: 0 0 0 3px rgba(23, 49, 90, .14); border-width: 1px; }
.kolom input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 15px; color: #0f172a; height: 100%; }
.kolom input:disabled { color: #64748b; }
.kolom .ikon { width: 16px; height: 16px; flex: none; opacity: .6; background-repeat: no-repeat; background-position: center; background-size: contain; }
.ikon-user { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317315a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4.4 3.6-7 8-7s8 2.6 8 7'/%3E%3C/svg%3E"); }
.ikon-kunci { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317315a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); }
.kolom .mata { border: 0; background: transparent; color: #64748b; font-size: 12px; cursor: pointer; padding: 4px 2px; }
.kolom .mata:hover { color: #17315a; }
.tombol-masuk { width: 100%; height: 46px; margin-top: 22px; border: 0; border-radius: 6px; background: #17315a; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .2s, box-shadow .2s, transform .1s; }
.tombol-masuk:hover:not(:disabled) { background: #1f3f6e; box-shadow: 0 8px 20px rgba(23, 49, 90, .3); }
.tombol-masuk:active:not(:disabled) { transform: translateY(1px); }
.tombol-masuk:disabled { opacity: .5; cursor: not-allowed; }
.kanan-isi .galat { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-left: 4px solid #dc2626; border-radius: 6px; padding: 10px 12px; font-size: 13px; margin: 0 0 6px; }
.kanan-isi .berhasil { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; border-left: 4px solid #16a34a; border-radius: 6px; padding: 10px 12px; font-size: 13px; margin: 0 0 6px; }
.status-koneksi { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 22px 0 0; font-size: 12.5px; color: #15803d; padding-bottom: 16px; border-bottom: 1px solid #e2e8f0; }
.status-koneksi i { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); animation: denyut 2s infinite; }
.status-koneksi.putus { color: #b91c1c; } .status-koneksi.putus i { background: #dc2626; animation: none; }
@keyframes denyut { 70% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }
.versi { text-align: center; color: #94a3b8; font-size: 12px; margin-top: 14px; }
.kanan-kaki { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-size: 12px; color: #94a3b8; }
@media (max-width: 860px) {
    .masuk-halaman { grid-template-columns: 1fr; }
    .masuk-kiri { padding: 28px 24px; min-height: 0; }
    .kiri-isi h2, .kiri-isi p, .kiri-fitur, .garis-emas, .kiri-kaki { display: none; }
    .kiri-merek { margin-bottom: 0; }
    .masuk-kanan { padding-bottom: 60px; }
}

/* ===== modal ===== */
.modal-latar { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: #fff; border-radius: 14px; width: min(1000px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.modal-kepala { padding: 18px 22px; border-bottom: 1px solid var(--garis); display: flex; gap: 12px; align-items: flex-start; }
.modal-kepala h3 { margin: 0; font-size: 18px; }
.modal-kepala .sub { color: var(--redup); font-size: 13px; margin-top: 4px; }
.modal-isi { padding: 16px 22px; overflow: auto; }
.modal-kepala .tutup { margin-left: auto; }

.muat { display: inline-block; width: 16px; height: 16px; border: 2px solid #bfdbfe; border-top-color: var(--biru); border-radius: 50%; animation: putar .8s linear infinite; vertical-align: -3px; }
@keyframes putar { to { transform: rotate(360deg); } }

#blazor-error-ui {
    background: #fef2f2; color: #991b1b; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none;
    left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

@media (max-width: 860px) {
    /* layar sempit (HP): menu pindah ke bar bawah, nama & tombol Keluar tetap ada */
    .kerangka { flex-direction: column; }
    .sidebar {
        position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: 100%; height: auto; flex: none; z-index: 30;
        flex-direction: row; align-items: stretch; box-shadow: 0 -2px 10px rgba(0,0,0,.18);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .sidebar .merek { display: none; }
    .sidebar nav { flex: 1; display: flex; padding: 4px 4px; gap: 2px; min-width: 0; }
    .sidebar nav a {
        flex: 1; min-width: 0; flex-direction: column; justify-content: center; gap: 2px; margin: 0; padding: 6px 2px;
        font-size: 10.5px; line-height: 1.15; text-align: center; border-radius: 8px;
    }
    .sidebar nav .ikon { font-size: 19px; width: auto; }
    .sidebar nav a .badge { margin-left: 0; }
    .sidebar .profil { padding: 4px 6px; border-top: 0; border-left: 1px solid rgba(255,255,255,.12); display: flex; align-items: center; }
    .sidebar .profil b, .sidebar .profil span { display: none; }
    .sidebar .profil form { margin: 0; }
    .sidebar .profil form button, .sidebar .profil > button {
        margin: 0; width: auto; padding: 8px 10px; font-size: 11px; background: transparent; color: #fca5a5;
        border: 1px solid rgba(252,165,165,.4); border-radius: 8px; font-family: inherit; cursor: pointer;
    }
    .isi { padding: 16px 16px calc(84px + env(safe-area-inset-bottom)); }
    .atas { padding: calc(12px + env(safe-area-inset-top)) 16px 12px; flex-wrap: wrap; }
}

/* ===== monitor proses ===== */
.tahap-baris { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tahap-kartu {
    text-align: left; background: #fff; border: 1px solid var(--garis); border-radius: var(--radius); box-shadow: var(--bayang);
    padding: 12px 14px; cursor: pointer; font: inherit; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px;
}
.tahap-kartu::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--aksen); }
.tahap-kartu:hover { border-color: var(--aksen); }
.tahap-kartu.aktif { border-color: var(--aksen); box-shadow: 0 0 0 2px color-mix(in srgb, var(--aksen) 25%, transparent); }
.tahap-kartu .judul { color: var(--redup); font-size: 12px; }
.tahap-kartu .nilai { font-size: 24px; font-weight: 700; color: var(--teks); }
.tahap-kartu .ket { color: var(--redup); font-size: 11.5px; }
.tabel-progres td { vertical-align: middle; }
.tabel-progres td .sub { color: var(--redup); font-size: 11.5px; }
.pil { display: inline-block; min-width: 42px; text-align: center; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pil.penuh { background: #dcfce7; color: #166534; }
.pil.sebagian { background: #fef3c7; color: #92400e; }
.pil.kosong { background: #f3f4f6; color: #9ca3af; }
.bar { height: 6px; background: #f1f5f9; border-radius: 999px; overflow: hidden; margin-bottom: 4px; }
.bar span { display: block; height: 100%; border-radius: 999px; }

/* ===== persetujuan memo ===== */
.daftar-memo { max-height: 70vh; overflow: auto; padding: 4px 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.item-memo { text-align: left; font: inherit; background: #fff; border: 1px solid var(--garis); border-radius: 10px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.item-memo:hover { border-color: #93c5fd; background: #f8fbff; }
.item-memo.aktif { border-color: var(--biru); box-shadow: 0 0 0 2px #dbeafe; }
.item-memo .baris1 { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.item-memo .baris2 { color: var(--redup); font-size: 12px; }
.item-memo .baris3 { display: flex; justify-content: space-between; gap: 8px; color: var(--redup); font-size: 12px; }
.pil.ditolak { background: #fee2e2; color: #991b1b; }
.ringkas-memo { display: flex; gap: 12px; padding: 4px 18px 10px; flex-wrap: wrap; }
.ringkas-memo div { flex: 1; min-width: 120px; background: #f8fafc; border: 1px solid var(--garis); border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; }
.ringkas-memo span { color: var(--redup); font-size: 12px; }
.ringkas-memo b { font-size: 16px; }
.langkah-memo { display: flex; gap: 10px; padding: 4px 18px 12px; overflow-x: auto; }
.langkah { flex: 1; min-width: 170px; display: flex; gap: 10px; border: 1px solid var(--garis); border-radius: 10px; padding: 10px 12px; background: #fff; }
.langkah .titik { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #f3f4f6; color: var(--redup); font-weight: 700; flex: 0 0 28px; }
.langkah .label { color: var(--redup); font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; }
.langkah .sub { color: var(--redup); font-size: 12px; }
.langkah .catatan { font-size: 12px; color: var(--teks); font-style: italic; margin-top: 4px; }
.langkah.setuju .titik { background: #dcfce7; color: #166534; }
.langkah.tolak .titik { background: #fee2e2; color: #991b1b; }
.langkah.aktif { border-color: #f59e0b; box-shadow: 0 0 0 2px #fef3c7; }
.langkah.aktif .titik { background: #fef3c7; color: #92400e; }
.keputusan { margin: 0 18px 12px; padding: 14px; border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 10px; display: flex; flex-direction: column; gap: 8px; }
.keputusan .judul { font-weight: 600; color: var(--navy); }
.keputusan textarea { width: 100%; resize: vertical; }
.keputusan .baris { display: flex; gap: 8px; flex-wrap: wrap; }
.keputusan .baris input { flex: 1; min-width: 220px; }
.tombol.setuju { background: var(--hijau); border-color: var(--hijau); color: #fff; }
.tombol.setuju:hover { background: #15803d; }
.tombol.tolak { border-color: var(--merah); color: var(--merah); }
.tombol.tolak:hover { background: #fef2f2; }
.pesan { font-size: 13px; padding: 8px 10px; border-radius: 8px; }
.pesan.ok { background: #dcfce7; color: #166534; }
.pesan.gagal { background: #fee2e2; color: #991b1b; }
.dokumen-memo { padding: 0 18px 18px; }
.dokumen-memo iframe { width: 100%; height: 72vh; border: 1px solid var(--garis); border-radius: 8px; background: #fff; }
.badge { display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 11.5px; font-weight: 700; text-align: center; margin-left: auto; }
.lonceng { position: relative; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--garis); border-radius: 8px; padding: 6px 12px; color: var(--teks); font-weight: 600; }
.lonceng:hover { background: var(--biru-muda); }
.lonceng.ada { border-color: #fca5a5; background: #fef2f2; color: #991b1b; }
.banner-memo { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px; border-radius: 10px; background: #fff7ed; border: 1px solid #fdba74; color: #9a3412; }
.banner-memo a { margin-left: auto; }

/* Panduan Deploy */
.panduan { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.daftar-isi { position: sticky; top: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.daftar-isi b { color: var(--navy); margin-bottom: 4px; }
.daftar-isi a { color: var(--teks); text-decoration: none; padding: 3px 0; }
.daftar-isi a:hover { color: var(--biru); }
.isi-panduan { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.isi-panduan section { padding: 18px 22px; scroll-margin-top: 16px; font-size: 14px; line-height: 1.6; }
.isi-panduan h2 { margin: 0 0 10px; font-size: 17px; color: var(--navy); }
.isi-panduan h3 { margin: 20px 0 6px; font-size: 14.5px; color: var(--navy); }
.isi-panduan code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.isi-panduan ol li, .isi-panduan ul li { margin-bottom: 8px; }
.isi-panduan kbd { border: 1px solid var(--garis); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: 12px; background: #fff; }
.kode { position: relative; margin: 8px 0 12px; }
.kode pre { margin: 0; background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 14px 16px; padding-right: 86px; overflow-x: auto; font-size: 12.5px; line-height: 1.55; }
.isi-panduan .kode code { background: none; padding: 0; color: inherit; font-family: Consolas, "Cascadia Mono", monospace; }
.kode .salin { position: absolute; top: 8px; right: 8px; background: #334155; color: #fff; border: 0; border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.kode .salin:hover { background: var(--biru); }
.alur { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.alur span { background: var(--biru-muda); border: 1px solid #bfdbfe; border-radius: 8px; padding: 8px 12px; text-align: center; font-weight: 600; color: var(--navy); font-size: 13px; }
.alur small { font-weight: 400; color: var(--redup); }
.alur i { color: var(--redup); font-style: normal; font-size: 12px; }
.catatan-info, .catatan-awas { border-radius: 8px; padding: 10px 14px; margin: 10px 0; font-size: 13.5px; }
.catatan-info { background: var(--biru-muda); border-left: 4px solid var(--biru); }
.catatan-awas { background: #fef2f2; border-left: 4px solid var(--merah); }
ul.centang { list-style: none; padding-left: 0; }
ul.centang li::before { content: "☐ "; color: var(--hijau); font-weight: 700; }
@media (max-width: 900px) { .panduan { grid-template-columns: 1fr; } .daftar-isi { position: static; } }
/* tabel di halaman panduan: teks panjang boleh terlipat, tidak melebar keluar kartu */
.isi-panduan table.tabel { table-layout: fixed; margin: 8px 0 12px; border: 1px solid var(--garis); border-radius: 8px; overflow: hidden; }
.isi-panduan table.tabel th, .isi-panduan table.tabel td { white-space: normal; text-align: left; vertical-align: top; line-height: 1.5; overflow-wrap: anywhere; }
.isi-panduan table.tabel th { position: static; }
.isi-panduan table.tabel th:first-child, .isi-panduan table.tabel td:first-child { width: 28%; }
.isi-panduan table.tabel tbody tr:hover td { background: inherit; cursor: default; }
.isi-panduan table.tabel td code { white-space: nowrap; }
@media (max-width: 700px) { .isi-panduan table.tabel { table-layout: auto; } .isi-panduan table.tabel td code { white-space: normal; } }

/* kartu progres unduhan Excel (payroll.js) */
.progres-unduh { position: fixed; right: 24px; bottom: 24px; z-index: 1000; display: flex; gap: 12px; align-items: center; width: 340px; padding: 14px 16px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 10px 30px rgba(15, 23, 42, .18);
  opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s; }
.progres-unduh.tampil { opacity: 1; transform: none; }
.progres-unduh .pu-ikon { flex: none; width: 40px; height: 40px; border-radius: 8px; background: #16a34a; color: #fff; font: 700 11px/40px system-ui, sans-serif; text-align: center; }
.progres-unduh .pu-isi { flex: 1; min-width: 0; }
.progres-unduh b { display: block; font-size: 13px; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progres-unduh span { display: block; font-size: 12px; color: #64748b; margin: 2px 0 8px; }
.progres-unduh .pu-bar { height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; position: relative; }
.progres-unduh .pu-bar i { display: block; height: 100%; width: 0; background: #2563eb; border-radius: 3px; transition: width .15s; }
.progres-unduh.berjalan .pu-bar i { width: 35%; position: absolute; animation: pu-jalan 1.1s ease-in-out infinite; }
.progres-unduh.selesai .pu-bar i { background: #16a34a; }
.progres-unduh.selesai span { color: #15803d; }
.progres-unduh.gagal .pu-bar i { background: #dc2626; }
.progres-unduh.gagal .pu-ikon { background: #dc2626; }
.progres-unduh.gagal span { color: #b91c1c; }
@keyframes pu-jalan { from { left: -35%; } to { left: 100%; } }
@media (max-width: 480px) { .progres-unduh { left: 16px; right: 16px; width: auto; bottom: 16px; } }

.kp-ubin { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kp-ubin > div { background: #fff; border: 1px solid var(--garis); border-left: 4px solid #1f3a5f; border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; }
.kp-ubin span, .kp-ubin i { font-size: 11px; color: #6b7280; font-style: normal; }
.kp-ubin b { font-size: 16px; }
.kp-status { display: inline-block; padding: 2px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.kp-Baru { background: #dbeafe; color: #2563eb; } .kp-Hilang { background: #fef3c7; color: #d97706; } .kp-Naik { background: #dcfce7; color: #15803d; }
.kp-Turun { background: #fee2e2; color: #dc2626; } .kp-Tetap { background: #f3f4f6; color: #6b7280; }
.kp-an { border-left: 4px solid #9ca3af; background: #f9fafb; padding: 10px 14px; margin: 0 0 10px 0; border-radius: 0 6px 6px 0; }
.kp-an-naik { border-color: #10b981; } .kp-an-turun { border-color: #ef4444; } .kp-an-waspada { border-color: #f59e0b; background: #fffbeb; } .kp-an-info { border-color: #6366f1; }
.kp-an-judul { font-weight: 700; font-size: 14px; }
.kp-an ul { margin: 6px 0 0; padding-left: 20px; } .kp-an li { margin: 3px 0; line-height: 1.4; font-size: 13px; }

/* ===== dashboard Regional Office ===== */
.tren-ro { display: flex; gap: 10px; align-items: flex-end; height: 210px; padding-top: 6px; }
.tren-ro .tren-kolom { flex: 1; display: flex; flex-direction: column; align-items: stretch; height: 100%; min-width: 0; }
.tren-ro .tren-nilai { text-align: center; font-size: 11.5px; color: var(--redup); height: 18px; white-space: nowrap; }
.tren-ro .tren-batang { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 4px; border-bottom: 1px solid var(--garis); }
.tren-ro .tren-batang span { display: block; width: 38%; max-width: 28px; border-radius: 4px 4px 0 0; min-height: 2px; }
.tren-ro .tren-batang .gross { background: var(--biru); }
.tren-ro .tren-batang .thp { background: var(--hijau); }
.tren-ro .tren-label { text-align: center; font-size: 12px; color: var(--redup); padding-top: 6px; }
.tren-ro .tren-kolom.aktif .tren-label { color: var(--navy); font-weight: 700; }
.tren-ro .tren-kolom.aktif .tren-nilai { color: var(--navy); font-weight: 700; }
.titik-ro { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.chip.ok { background: #dcfce7; color: #166534; }
.chip.mati { background: #f1f5f9; color: #64748b; }

/* ===== slip gaji Regional Office ===== */
.slip { background: #fff; border: 1px solid var(--garis); border-radius: 10px; padding: 22px 26px; font-size: 12.5px; color: #1e293b; }
.slip-kepala { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 2px solid var(--navy); padding-bottom: 10px; }
.slip-perusahaan { font-size: 15px; font-weight: 700; color: var(--navy); letter-spacing: .2px; }
.slip-sub { color: var(--redup); margin-top: 3px; }
.slip-judul { text-align: right; font-size: 18px; font-weight: 700; color: var(--navy); letter-spacing: 1px; }
.slip-judul small { display: block; font-size: 12.5px; font-weight: 500; color: var(--redup); letter-spacing: 0; }
.slip-id { display: grid; grid-template-columns: 1fr 2fr 1.5fr 1.5fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--garis); }
.slip-id small, .slip-total small { display: block; color: var(--redup); font-size: 11px; margin-bottom: 1px; }
.slip-kolom { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding: 12px 0; }
.slip h4 { margin: 0 0 6px; font-size: 11.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--navy); border-bottom: 1px solid var(--garis); padding-bottom: 4px; }
.slip .baris { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.slip .baris b { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.slip .baris.kosong { color: var(--redup); }
.slip-total { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--garis); border-radius: 8px; overflow: hidden; margin: 4px 0 12px; }
.slip-total > div { padding: 9px 12px; border-right: 1px solid var(--garis); background: #f8fafc; }
.slip-total > div:last-child { border-right: 0; }
.slip-total b { font-size: 15px; font-variant-numeric: tabular-nums; }
.slip-total .bayar { background: var(--navy); color: #fff; }
.slip-total .bayar small { color: #cbd5e1; }
.slip-bawah { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.slip-judul-kecil { margin-top: 12px !important; }
.slip-bu { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 22px; }
table.slip-lembur { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 4px; }
table.slip-lembur th { text-align: left; color: var(--redup); font-weight: 600; padding: 3px 6px; border-bottom: 1px solid var(--garis); }
table.slip-lembur td { padding: 3px 6px; border-bottom: 1px solid #f1f5f9; }
table.slip-lembur td.angka { text-align: right; font-variant-numeric: tabular-nums; }
.cetak-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--garis); position: sticky; top: 0; z-index: 5; }
.slip-halaman { max-width: 1100px; margin: 16px auto; padding: 0 16px; }

table.slip-lembur th.angka { text-align: right; }
table.slip-lembur tfoot td { border-top: 1px solid var(--garis); border-bottom: 0; padding-top: 5px; }
table.slip-ts { width: 100%; border-collapse: collapse; font-size: 11px; margin: 8px 0 4px; table-layout: fixed; }
table.slip-ts th, table.slip-ts td { border: 1px solid var(--garis); text-align: center; padding: 2px 0; }
table.slip-ts th { background: #f1f5f9; color: var(--navy); font-weight: 600; }
table.slip-ts td.lbl { text-align: left; padding-left: 5px; font-weight: 600; width: 44px; }
.slip.slip-sempit { max-width: 720px; margin: 0 auto; }
@media print {
    @page { size: A4 landscape; margin: 8mm; }
    .tanpa-cetak, .sidebar, .atas { display: none !important; }
    body { background: #fff !important; }
    .slip-halaman { max-width: none; margin: 0; padding: 0; page-break-after: always; break-after: page; page-break-inside: avoid; break-inside: avoid; }
    .slip { border: 0; border-radius: 0; padding: 4px 6px; font-size: 11.5px; }
    .slip-total .bayar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ===== slip gaji format lama (template admin_ro), tampilan dirapikan ===== */
.slip-asli-wadah { background: #fff; border: 1px solid var(--garis); border-radius: 10px; padding: 20px 24px; overflow-x: auto; margin-bottom: 16px; }
.slip-asli table { width: 100% !important; height: auto !important; border-collapse: collapse; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-size: 12.5px; color: #1e293b; margin-top: 4px; }
.slip-asli td { padding: 2px 6px; vertical-align: top; line-height: 1.55; }
.slip-asli td strong, .slip-asli td b { font-weight: 600; }
.slip-asli td u { text-decoration-thickness: 1px; text-underline-offset: 3px; color: var(--navy); }
.slip-asli .pic { max-height: 50px; width: auto; max-width: 220px; object-fit: contain; display: block; margin-bottom: 6px; }
.slip-asli tr:hover td { background: #f8fafc; }
@media print {
    .slip-asli-wadah { border: 0; border-radius: 0; padding: 0; margin: 0; overflow: visible; page-break-after: always; break-after: page; page-break-inside: avoid; break-inside: avoid; }
    .slip-asli table { font-size: 11px; }
    .slip-asli tr:hover td { background: transparent; }
}

/* tabel rincian overtime di slip detail */
.slip-asli table.slip-ot { width: 100% !important; margin: 10px 0 0; border-collapse: collapse; font-size: 11.5px; }
.slip-asli table.slip-ot th { background: #f1f5f9; color: var(--navy); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--garis); }
.slip-asli table.slip-ot td { padding: 3px 6px; border-bottom: 1px solid #f1f5f9; }

/* ===== filter halaman slip: grid dengan label dan isian sejajar ===== */
.filter-slip { display: grid; grid-template-columns: minmax(300px, 1.7fr) minmax(190px, 1fr) minmax(250px, 1fr) auto; gap: 14px 22px; align-items: start; padding: 18px 20px 6px; }
.filter-slip label { display: block; font-size: 12.5px; color: var(--redup); font-weight: 600; margin-bottom: 6px; }
.filter-slip label .sub { font-weight: 400; }
.filter-slip .isian, .filter-slip .pilih { width: 100%; height: 38px; box-sizing: border-box; }
.filter-slip .f-project .isian { margin-bottom: 8px; }
.filter-slip .dua { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.filter-slip label.centang { display: flex; align-items: center; gap: 7px; font-weight: 400; margin: 10px 0 0; cursor: pointer; }
.filter-slip label.centang input { width: 16px; height: 16px; margin: 0; }
.filter-slip .f-aksi { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-self: end; padding-top: 24px; }
.filter-slip .f-aksi .tombol { box-sizing: border-box; height: 38px; padding-top: 0; padding-bottom: 0; line-height: 1; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.filter-info { padding: 6px 20px 16px; }
@media (max-width: 1250px) { .filter-slip { grid-template-columns: 1fr 1fr; } .filter-slip .f-aksi { grid-column: 1 / -1; justify-content: flex-start; padding-top: 4px; } }
@media (max-width: 700px) { .filter-slip { grid-template-columns: 1fr; } }

/* ===== bilah kemajuan memuat ===== */
.progres-muat { display: flex; flex-direction: column; gap: 6px; width: min(560px, 100%); }
.progres-muat .bar-isi { height: 10px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.progres-muat .bar-isi span { display: block; height: 100%; background: var(--biru); border-radius: 999px; transition: width .25s ease; }
.progres-muat .ket { color: var(--redup); font-size: 12.5px; }
.progres-muat .ket b { color: var(--navy); }

/* ===== slip format lama: penyegaran tampilan (susunan baris dan kolom tidak berubah) slip-asli-desain ===== */
.slip-asli-wadah { border: 1px solid #dbe3ee; border-top: 4px solid var(--navy); border-radius: 12px; padding: 22px 28px 20px; box-shadow: 0 4px 18px rgba(31, 58, 95, .08); }
.slip-asli { color: #1e293b; }
.slip-asli .perusahaan { font-size: 15.5px; font-weight: 700; color: var(--navy); letter-spacing: .3px; }
.slip-asli .pic { max-height: 46px; margin-bottom: 8px; }
.slip-asli table { font-size: 12.5px; }
.slip-asli td { padding: 3.5px 8px; }
/* judul bagian (PENDAPATAN / POTONGAN / Iuran / ...) menjadi pita */
.slip-asli tr:has(> td > b > u), .slip-asli tr:has(> td > strong > u) { background: #eef3f9; }
.slip-asli tr:has(> td > b > u) td, .slip-asli tr:has(> td > strong > u) td { border-top: 1px solid #d6e0ec; border-bottom: 2px solid var(--navy); padding-top: 5px; padding-bottom: 5px; }
.slip-asli td u { text-decoration: none; letter-spacing: .6px; color: var(--navy); font-size: 11.5px; text-transform: uppercase; }
/* nilai nol samar supaya angka yang berisi menonjol */
.slip-asli .nol { color: #b9c3d1; font-weight: 400; }
/* garis tipis antar baris */
.slip-asli tr[height] td { border-bottom: 1px solid #f1f4f8; }
.slip-asli tr:has(> td > b > u) td { border-bottom-color: var(--navy); }
/* baris total */
.slip-asli td:has(> b.total-baris), .slip-asli td:has(> b.total-baris) + td { font-weight: 700; color: var(--navy); background: #f6f9fc; }
.slip-asli td:has(> b.total-akhir), .slip-asli td:has(> b.total-akhir) + td { background: var(--navy); color: #fff; font-weight: 700; font-size: 13.5px; border-bottom-color: var(--navy); }
.slip-asli td:has(> b.total-akhir) { border-radius: 6px 0 0 6px; }
.slip-asli td:has(> b.total-akhir) + td { border-radius: 0 6px 6px 0; }
.slip-asli td:has(> b.total-akhir) b { color: #fff; }
.slip-asli tr:hover td { background: inherit; }
@media print {
    .slip-asli-wadah { border: 0; box-shadow: none; border-top: 0; padding: 0; }
    .slip-asli td:has(> b.total-akhir), .slip-asli td:has(> b.total-akhir) + td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .slip-asli tr:has(> td > b > u), .slip-asli tr:has(> td > strong > u) { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ===== grafik dashboard RO: bertumpuk Non Staff / Staff, ringkasan, baris project terpilih ===== */
.ringkas-ro { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.ringkas-ro > div { background: #f6f9fc; border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; }
.ringkas-ro span { font-size: 11.5px; color: var(--redup); }
.ringkas-ro b { font-size: 18px; color: var(--navy); }
.ringkas-ro em { font-size: 11px; color: var(--redup); font-style: normal; }
.tren-ro .tumpuk { width: 54%; max-width: 44px; display: flex; flex-direction: column; border-radius: 5px 5px 0 0; overflow: hidden; min-height: 2px; }
.tren-ro .tumpuk span { display: block; width: 100%; max-width: none; border-radius: 0; min-height: 0; }
.tren-ro .tumpuk .staff { background: #f59e0b; }
.tren-ro .tumpuk .nonstaff { background: var(--biru); }
.tren-ro .tren-delta { text-align: center; font-size: 11px; padding-top: 4px; height: 16px; }
.tabel tr.dipilih td { background: #e3edfb !important; box-shadow: inset 3px 0 0 var(--biru); }
.tabel tbody tr:hover td { background: #f0f6ff; }

/* ===== meter kekuatan password (form wajib ganti password) ===== */
.kuat { margin: 10px 0 4px; }
.kuat-bar { height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.kuat-bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: #cbd5e1; transition: width .45s cubic-bezier(.22, 1, .36, 1), background-color .35s ease; }
.kuat-info { display: flex; justify-content: space-between; font-size: 12.5px; margin-top: 6px; }
.kuat-info b { transition: color .35s ease; }
.kuat-info span { color: var(--redup); }
.kuat-syarat { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 12px; color: var(--redup); }
.kuat-syarat li { display: flex; align-items: center; gap: 6px; transition: color .25s ease; }
.kuat-syarat li::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 1.5px solid #cbd5e1; box-sizing: border-box; transition: all .25s ease; }
.kuat-syarat li.ok { color: #15803d; }
.kuat-syarat li.ok::before { content: "\2713"; background: #16a34a; border-color: #16a34a; color: #fff; font-size: 10px; font-weight: 700; line-height: 11px; text-align: center; transform: scale(1.12); }
.cocok-sandi { min-height: 18px; font-size: 12.5px; margin-top: 6px; transition: color .25s ease; }
.cocok-sandi.ok { color: #15803d; }
.cocok-sandi.salah { color: #dc2626; }
button[data-simpan]:disabled { opacity: .5; cursor: not-allowed; }

/* ===== lapisan memuat di tengah layar ===== */
.muat-tengah { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(248, 250, 252, .72); backdrop-filter: blur(3px); animation: muat-masuk .2s ease both; }
@keyframes muat-masuk { from { opacity: 0; } to { opacity: 1; } }
.muat-kotak { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 28px 40px; background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(15, 35, 66, .22); }
.muat-logo { position: relative; width: 88px; height: 88px; display: grid; place-items: center; }
.muat-logo img { width: 46px; height: 46px; object-fit: contain; animation: muat-denyut 1.4s ease-in-out infinite; }
.muat-logo .cincin { position: absolute; inset: 0; border-radius: 50%; border: 4px solid #e2e8f0; border-top-color: #d4af37; border-right-color: #17315a; animation: muat-putar 1s linear infinite; }
@keyframes muat-putar { to { transform: rotate(360deg); } }
@keyframes muat-denyut { 0%, 100% { transform: scale(.92); opacity: .85; } 50% { transform: scale(1.08); opacity: 1; } }
.muat-teks { color: #17315a; font-weight: 600; font-size: 14px; letter-spacing: .3px; }
.muat-teks .titik-titik i { font-style: normal; animation: muat-titik 1.2s infinite; opacity: .2; }
.muat-teks .titik-titik i:nth-child(2) { animation-delay: .2s; } .muat-teks .titik-titik i:nth-child(3) { animation-delay: .4s; }
@keyframes muat-titik { 0%, 60%, 100% { opacity: .2; } 30% { opacity: 1; } }

/* ===== tema modern: palet slate, kartu lembut, sidebar bergradasi, tabel ringan (tema-modern) ===== */
:root { --latar: #f1f5f9; --garis: #e2e8f0; --radius: 14px; --bayang: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .05); --teks: #0f172a; --redup: #64748b; }
body { background: var(--latar); }
.sidebar { background: linear-gradient(180deg, #0f2342 0%, #17315a 100%); }
.sidebar .merek { display: flex; align-items: center; gap: 12px; padding: 22px 20px 20px; font-size: 17px; }
.sidebar .merek img { width: 38px; height: 38px; object-fit: contain; flex: none; }
.sidebar .merek small { color: #d4af37; font-size: 11.5px; letter-spacing: .3px; margin-top: 3px; line-height: 1.3; }
.sidebar nav { padding: 8px 12px; }
.sidebar nav a { position: relative; border-radius: 10px; padding: 11px 14px; color: #cbd5e1; transition: background .18s, color .18s; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar nav a.active { background: rgba(255, 255, 255, .11); color: #fff; font-weight: 600; }
.sidebar nav a.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: #d4af37; }
.sidebar .profil { margin: 0 12px 12px; padding: 14px 16px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.sidebar .profil span { color: #94a3b8; font-size: 12px; }
.sidebar .profil form button { border-color: rgba(255, 255, 255, .18); color: #e2e8f0; border-radius: 8px; transition: background .18s; }
.sidebar .profil form button:hover { background: rgba(255, 255, 255, .1); }
.atas { background: rgba(255, 255, 255, .88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--garis); padding: 16px 32px; }
.atas h1 { font-size: 19px; letter-spacing: -.2px; color: #0f172a; }
.isi { padding: 26px 32px 48px; max-width: 1680px; }
.kartu { border: 1px solid var(--garis); border-radius: var(--radius); box-shadow: var(--bayang); }
.kartu-kepala { padding: 18px 22px 8px; }
.kartu-kepala h2 { font-size: 16px; color: #0f172a; letter-spacing: -.1px; }
.kartu-isi { padding: 10px 22px 22px; }
.tombol { border-color: #cbd5e1; color: #17315a; border-radius: 10px; padding: 8px 16px; transition: background .15s, border-color .15s, box-shadow .15s; }
.tombol:hover { background: #f8fafc; border-color: #94a3b8; }
.tombol.utama { background: #17315a; border-color: #17315a; } .tombol.utama:hover { background: #1f3f6e; border-color: #1f3f6e; }
.tombol.hijau { border-color: #86efac; color: #15803d; background: #f0fdf4; } .tombol.hijau:hover { background: #dcfce7; }
select.pilih, input.isian { border: 1px solid #cbd5e1; border-radius: 10px; padding: 8px 12px; height: 38px; }
select.pilih:focus, input.isian:focus { outline: 0; border-color: #17315a; box-shadow: 0 0 0 3px rgba(23, 49, 90, .12); }
.segmen { border-color: #cbd5e1; border-radius: 10px; background: #f8fafc; padding: 3px; gap: 2px; }
.segmen button { border-radius: 8px; padding: 6px 14px; background: transparent; transition: background .15s, color .15s; }
.segmen button + button { border-left: 0; }
.segmen button.aktif { background: #17315a; color: #fff; box-shadow: 0 2px 6px rgba(23, 49, 90, .25); }

/* KPI: tanpa garis warna, titik aksen kecil */
.kpi { gap: 18px; margin-bottom: 20px; }
.kpi .kartu { padding: 18px 22px; }
.kpi .kartu::before { display: none; }
.kpi .judul { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--redup); text-transform: uppercase; letter-spacing: .5px; }
.kpi .judul::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--aksen, var(--biru)); }
.kpi .nilai { font-size: 30px; font-weight: 700; margin: 10px 0 6px; color: #0f172a; }

/* tabel: header terang */
.tabel-wadah { border: 1px solid var(--garis); border-radius: 12px; }
table.tabel th { background: #f8fafc; color: #475569; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; padding: 11px 12px; border-bottom: 1px solid var(--garis); }
table.tabel td { padding: 11px 12px; border-bottom: 1px solid #f1f5f9; }
table.tabel tbody tr:nth-child(even) td { background: transparent; }
table.tabel tbody tr:hover td { background: #f8fafc; }
table.tabel tr.total td { background: #f1f5f9; color: #0f172a; border-top: 1px solid var(--garis); }
.chip { border-radius: 999px; }

/* ===== dashboard RO: toolbar dan susunan utama ===== */
.bar-filter { display: flex; align-items: flex-end; gap: 14px 18px; flex-wrap: wrap; padding: 18px 22px 6px; width: 100%; }
.bar-filter .f-periode label { display: block; font-size: 12px; font-weight: 600; color: var(--redup); margin-bottom: 6px; }
.bar-filter .f-periode { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: flex-end; }
.bar-filter .f-periode label { flex-basis: 100%; }
.bar-filter .f-cari { flex: 1 1 240px; max-width: 360px; }
.bar-filter .alat { margin-left: auto; display: flex; gap: 8px; }
.ro-utama { display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1200px) { .ro-utama { grid-template-columns: 1fr; } .ro-utama > .kartu { position: static !important; } }
.ringkas-ro > div { background: #f8fafc; border: 1px solid #f1f5f9; border-radius: 10px; }
@media (max-width: 700px) { .isi { padding: 16px 14px 90px; } .atas { padding: 12px 16px; } .bar-filter .f-cari { max-width: none; } .ringkas-ro { grid-template-columns: 1fr 1fr; } }

/* ===== sidebar terang (white smoke) ===== */
.sidebar { background: #e8ebf0; color: #334155; border-right: 1px solid #d5dae2; }
.sidebar .merek { color: #0f2342; }
.sidebar .merek small { color: #a9852a; }
.sidebar nav a { color: #475569; }
.sidebar nav a .ikon { color: #64748b; }
.sidebar nav a:hover { background: #dde2e9; color: #0f2342; }
.sidebar nav a.active { background: #fff; color: #0f2342; box-shadow: 0 1px 3px rgba(15, 35, 66, .10), 0 0 0 1px #e2e8f0; }
.sidebar nav a.active .ikon { color: #17315a; }
.sidebar .profil { background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 1px 2px rgba(15, 35, 66, .05); }
.sidebar .profil b { color: #0f2342; }
.sidebar .profil span { color: #64748b; }
.sidebar .profil form button { border-color: #e2e8f0; color: #b91c1c; background: #fff; }
.sidebar .profil form button:hover { background: #fef2f2; border-color: #fecaca; }
.sidebar .badge { background: #dc2626; color: #fff; }
@media (max-width: 860px) { .sidebar { border-right: 0; border-top: 1px solid #e2e8f0; box-shadow: 0 -2px 10px rgba(15, 35, 66, .08); } }

/* ===== pilihan dengan pencarian dan banyak pilihan (PilihCari) ===== */
.pilih-cari { position: relative; }
.pc-kotak { min-height: 42px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 5px 34px 5px 10px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; cursor: pointer; position: relative; transition: border-color .15s, box-shadow .15s; }
.pilih-cari.buka .pc-kotak, .pc-kotak:focus { outline: 0; border-color: #17315a; box-shadow: 0 0 0 3px rgba(23, 49, 90, .12); }
.pc-kosong { color: #94a3b8; font-size: 14px; }
.pc-panah { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #64748b; font-size: 13px; transition: transform .2s; }
.pilih-cari.buka .pc-panah { transform: translateY(-50%) rotate(180deg); }
.pc-chip { display: inline-flex; align-items: center; gap: 4px; background: #e8eef7; color: #17315a; border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 12.5px; font-weight: 600; }
.pc-chip.lebih { padding-right: 10px; background: #f1f5f9; color: #475569; }
.pc-chip button { border: 0; background: transparent; color: #17315a; cursor: pointer; width: 18px; height: 18px; border-radius: 50%; line-height: 16px; font-size: 14px; padding: 0; }
.pc-chip button:hover { background: #cbd5e1; }
.pc-latar { position: fixed; inset: 0; z-index: 40; }
.pc-panel { position: absolute; z-index: 41; left: 0; right: 0; top: calc(100% + 6px); min-width: 340px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 18px 50px rgba(15, 35, 66, .20); padding: 12px; animation: pc-turun .16s ease both; }
@keyframes pc-turun { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.pc-cari { width: 100%; }
.pc-filter { display: flex; align-items: center; gap: 6px; margin: 10px 0 6px; font-size: 12.5px; color: #64748b; flex-wrap: wrap; }
.pc-filter button { border: 1px solid #e2e8f0; background: #f8fafc; border-radius: 999px; padding: 3px 12px; font: inherit; font-size: 12.5px; cursor: pointer; color: #334155; }
.pc-filter button.aktif { background: #17315a; border-color: #17315a; color: #fff; }
.pc-hitung { margin-left: auto; }
.pc-aksi { display: flex; gap: 14px; margin-bottom: 6px; }
.pc-aksi button { border: 0; background: transparent; color: #2563eb; font: inherit; font-size: 12.5px; cursor: pointer; padding: 2px 0; }
.pc-aksi button:disabled { color: #94a3b8; cursor: default; }
.pc-daftar { max-height: 300px; overflow: auto; border: 1px solid #f1f5f9; border-radius: 8px; }
.pc-baris { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; cursor: pointer; border-bottom: 1px solid #f8fafc; margin: 0 !important; font-weight: 400; }
.pc-baris:hover { background: #f8fafc; }
.pc-baris.dipilih { background: #eef4fc; }
.pc-baris input { margin-top: 3px; width: 16px; height: 16px; flex: none; }
.pc-baris b { display: block; font-size: 13.5px; color: #0f172a; font-weight: 600; }
.pc-baris small { color: #64748b; font-size: 12px; }
.pc-baris small i { font-style: normal; font-weight: 600; } .pc-baris small i.ok { color: #15803d; } .pc-baris small i.mati { color: #94a3b8; }
.pc-tak-ada { padding: 18px; text-align: center; color: #94a3b8; }
.pc-kaki { display: flex; justify-content: flex-end; margin-top: 10px; }
.filter-slip .pc-baris { font-size: 13px; font-weight: 400; color: inherit; margin: 0; }
.filter-slip .pc-panel .isian { margin-bottom: 0; }
.filter-slip .f-project { min-width: 0; }

.ket-bayar { font-size: 11.5px; color: #92400e; margin-top: 4px; max-width: 250px; line-height: 1.35; }
.legenda-bayar { margin-top: 8px; font-size: 12px; color: var(--redup); line-height: 1.9; }

/* ===== sidebar putih bersih ===== */
.sidebar { background: #fff; border-right: 1px solid #e5e9f0; }
.sidebar .merek { background: transparent; }
.sidebar nav a:hover { background: #f3f6fa; }
.sidebar nav a.active { background: #eef3fa; box-shadow: none; color: #0f2342; }
.sidebar .profil { background: #f8fafc; border: 1px solid #e5e9f0; box-shadow: none; }
.sidebar .profil form button { background: #fff; }
@media (max-width: 860px) { .sidebar { border-right: 0; border-top: 1px solid #e5e9f0; } }

.pc-ket { font-size: 12px; color: #475569; background: #f1f5f9; border-radius: 8px; padding: 6px 10px; margin-bottom: 6px; }
.pc-teks { flex: 1; min-width: 0; }
.pc-jumlah { flex: none; text-align: right; font-weight: 700; font-size: 14px; color: #17315a; line-height: 1.1; min-width: 58px; }
.pc-jumlah small { display: block; font-size: 10.5px; font-weight: 400; color: #64748b; }
.pc-jumlah.nol { color: #cbd5e1; font-weight: 400; } .pc-jumlah.nol small { color: #cbd5e1; }

/* ===== filter slip: tiga kolom isian, tombol aksi di baris sendiri ===== */
.filter-slip { grid-template-columns: minmax(300px, 1.7fr) minmax(190px, 1fr) minmax(250px, 1fr); align-items: start; padding-bottom: 14px; }
.filter-slip .f-aksi { grid-column: 1 / -1; justify-content: flex-start; align-self: auto; padding-top: 14px; margin-top: 2px; border-top: 1px solid #eef2f6; gap: 10px; }
.filter-slip .f-aksi .tombol { height: 40px; padding: 0 20px; }
.filter-slip .f-aksi .tombol.utama { min-width: 130px; justify-content: center; }
.filter-slip .pilih, .filter-slip .pc-kotak { height: 42px; }
.filter-slip .pc-kotak { min-height: 42px; height: auto; }
@media (max-width: 1250px) { .filter-slip { grid-template-columns: 1fr 1fr; } .filter-slip .f-project { grid-column: 1 / -1; } }
@media (max-width: 700px) { .filter-slip { grid-template-columns: 1fr; } .filter-slip .f-aksi .tombol { flex: 1 1 auto; } }

/* baris daftar project: kotak centang, nama, dan jumlah personel sejajar (menimpa aturan label blok di filter) */
.filter-slip .pc-baris, .pilih-cari .pc-baris { display: flex; align-items: center; gap: 12px; padding: 9px 12px; font-size: 13px; font-weight: 400; color: inherit; margin: 0; }
.pilih-cari .pc-baris input { margin: 0; }
.pilih-cari .pc-jumlah { margin-left: auto; padding-left: 10px; }

/* ===== watermark slip: logo Nawakara samar dan tulisan CONFIDENTIAL (tampil di layar, cetak, dan PDF) ===== */
.slip-asli-wadah { position: relative; overflow-x: auto; overflow-y: hidden; }
.slip-asli-wadah > * { position: relative; z-index: 1; }
.slip-asli-wadah::before { content: ""; position: absolute; left: 50%; top: 50%; width: 360px; height: 360px; transform: translate(-50%, -50%); background: url("/img/logo-login.png") center / contain no-repeat; opacity: .07; pointer-events: none; z-index: 0; }
.slip-asli-wadah::after { content: "CONFIDENTIAL"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-30deg); font-size: 78px; font-weight: 800; letter-spacing: 10px; color: rgba(23, 49, 90, .075); white-space: nowrap; pointer-events: none; z-index: 0; font-family: "Segoe UI", Arial, sans-serif; }
@media print {
    .slip-asli-wadah::before, .slip-asli-wadah::after { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ===== sidebar biru navy dengan lingkaran dekoratif (sama dengan panel kiri halaman masuk) ===== */
.sidebar { background: linear-gradient(165deg, #0f2342 0%, #17315a 55%, #1f3f6e 100%); border-right: 0; color: #cbd5e1; position: sticky; overflow: hidden; }
.sidebar::before { content: ""; position: absolute; width: 360px; height: 360px; right: -190px; top: -150px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .08); pointer-events: none; }
.sidebar::after { content: ""; position: absolute; width: 190px; height: 190px; right: -95px; bottom: 150px; border-radius: 50%; background: rgba(255, 255, 255, .05); pointer-events: none; }
.sidebar > * { position: relative; z-index: 1; }
.sidebar .merek { color: #fff; background: transparent; }
.sidebar .merek small { color: #d4af37; letter-spacing: .6px; font-weight: 600; }
.sidebar nav a { color: #cbd5e1; }
.sidebar nav a .ikon { color: #94a3b8; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar nav a.active { background: rgba(255, 255, 255, .13); color: #fff; box-shadow: none; }
.sidebar nav a.active .ikon { color: #d4af37; }
.sidebar nav a.active::before { background: #d4af37; }
.sidebar .profil { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .10); box-shadow: none; }
.sidebar .profil b { color: #fff; }
.sidebar .profil span { color: #94a3b8; }
.sidebar .profil form button { background: transparent; color: #e2e8f0; border-color: rgba(255, 255, 255, .22); }
.sidebar .profil form button:hover { background: rgba(255, 255, 255, .10); border-color: rgba(255, 255, 255, .35); }
@media (max-width: 860px) { .sidebar { border-top: 1px solid rgba(255, 255, 255, .12); } .sidebar::before, .sidebar::after { display: none; } }

.info-data { font-size: 12px; line-height: 1.5; color: #475569; background: #f1f6fd; border: 1px solid #dbe7f7; border-left: 3px solid #17315a; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }
.info-data b { color: #17315a; }

/* slip rincian overtime: cetak portrait (halaman bernama), layar dibatasi lebarnya seperti kertas A4 portrait */
@page potret { size: A4 portrait; margin: 8mm; }
.slip-halaman.potret { page: potret; max-width: 820px; margin-left: auto; margin-right: auto; }
@media print { .slip-halaman.potret { page-break-inside: auto; break-inside: auto; max-width: none; } }
