/* ===================== NERACA LAJUR — fitur baru ===================== */

/* ----- "Tampilkan tahap" toggle pills ----- */
.tahap-toggle-wrap {
    display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
    padding: 9px 11px; background: #eceafc; border: 2px solid var(--primary);
    border-radius: 9px; margin-bottom: 14px;
}
.tahap-toggle-label {
    font-size: 11px; color: #3c3489; font-weight: 700; margin-right: 2px; white-space: nowrap;
}
.tahap-pill {
    background: #fff; color: #3c3489; font-size: 11px; font-weight: 600;
    padding: 5px 12px; border-radius: 14px; border: 1px solid #cec9f5;
    cursor: pointer; transition: background .12s ease, color .12s ease, transform .12s ease;
    font-family: inherit; white-space: nowrap;
}
.tahap-pill:hover { transform: translateY(-1px); }
.tahap-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tahap-pill-reset {
    border-style: dashed; color: #888;
}
.tahap-pill-reset:hover { color: var(--primary); border-color: var(--primary); }

/* ----- Tabel worksheet lebar: kolom Kode & Nama Akun dibekukan (sticky) ----- */
.worksheet-scroll { position: relative; overflow-x: auto; max-height: 640px; overflow-y: auto; }
.worksheet-scroll-indicator {
    height: 4px; background: #eee; border-radius: 2px; margin-bottom: 9px; overflow: hidden;
}
.worksheet-scroll-indicator-fill {
    height: 100%; background: var(--primary); border-radius: 2px; width: 0%;
    transition: width .08s linear;
}
.worksheet-scroll-hint { font-size: 10.5px; color: #999; margin: 7px 0 0; text-align: right; }

table.worksheet-table { min-width: 1500px; }
table.worksheet-table th.sticky-col,
table.worksheet-table td.sticky-col {
    position: sticky; background: #fff; z-index: 3;
}
table.worksheet-table th.sticky-col { z-index: 4; background: #fbfbff; }
table.worksheet-table td.sticky-kode, table.worksheet-table th.sticky-kode { left: 0; min-width: 68px; }
table.worksheet-table td.sticky-nama, table.worksheet-table th.sticky-nama { left: 68px; min-width: 170px; box-shadow: 2px 0 4px -2px rgba(0,0,0,0.08); }

/* Kolom tahap yang di-toggle sembunyi */
.stage-col.stage-hidden { display: none; }

/* ----- Baris rekap per tahap ----- */
.tahap-recap-section { margin-bottom: 18px; }
.tahap-recap-section:last-child { margin-bottom: 0; }

.tahap-recap-table-wrap { background: #fff; border-radius: 10px; padding: 12px; overflow-x: auto; }
table.tahap-recap-table { width: 100%; border-collapse: collapse; font-size: 11px; min-width: 480px; }
table.tahap-recap-table thead tr.group-row th {
    padding: 5px 4px; text-align: center; background: #eceafc; color: #3c3489;
    border: 2px solid var(--primary); border-radius: 6px; font-weight: 700;
}
table.tahap-recap-table thead tr.label-row th {
    color: #888; text-align: left; font-weight: 600; padding: 4px; font-size: 10.5px;
}
table.tahap-recap-table thead tr.label-row th.text-right { text-align: right; }
table.tahap-recap-table tbody td { padding: 7px 4px; color: #333; border-top: 0.5px solid #eee; }
table.tahap-recap-table tfoot td { padding: 8px 4px; }
table.tahap-recap-table tfoot tr.subtotal-row td { color: #666; border-top: 0.5px solid #eee; }
table.tahap-recap-table tfoot tr.plug-row td { font-weight: 600; }
/* ----- Tombol telusuri di dalam .balance-box (dipakai khusus Neraca Lajur) ----- */
.balance-box .btn-telusuri {
    flex-basis: 100%; margin-top: 2px;
}
.tahap-balance-box.balance-bad .txt { font-size: 12px; color: #a13c2e; }
.tahap-balance-box.balance-bad .txt b { font-weight: 700; }
.tahap-balance-box.balance-bad .selisih-line { font-size: 11px; color: #a13c2e; margin: 6px 0 0; }
.tahap-balance-box.balance-bad .btn-telusuri { margin-top: 9px; }

@media (max-width: 700px) {
    .tahap-toggle-wrap { padding: 8px; }
}
