:root {
    --brand: #a01818;
    --brand-2: #dc2626;
    --brand-lt: #fef2f2;
    --brand-dk: #7f1212;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: #f9fafb;
    color: #111;
    margin: 0;
}

.app { display: flex; min-height: 100vh; }

.sidebar {
    width: 240px; background: #fff; border-right: 1px solid #e5e7eb;
    display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar .brand { padding: 14px 18px; border-bottom: 1px solid #f3f4f6; }
.sidebar .brand .label {
    font-size: 9px; color: #9ca3af; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.1em; margin-top: 6px;
}

.nav-link-custom {
    width: 100%; display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 8px; font-size: 12px; font-weight: 600;
    border: none; cursor: pointer; margin-bottom: 2px; background: transparent;
    color: #6b7280; text-align: left;
}
.nav-link-custom:hover { background: #f9fafb; }
.nav-link-custom.active { background: var(--brand); color: #fff; }

.main { flex: 1; overflow: auto; }
.main .container-app { max-width: 1200px; margin: 0 auto; padding: 24px; }

.card-soft { background: #fff; border-radius: 12px; border: 1px solid #e5e7eb; padding: 16px; }

.btn-brand { background: var(--brand); color: #fff; border: none; }
.btn-brand:hover { background: var(--brand-dk); color: #fff; }
.btn-brand:disabled { opacity: 0.5; }

.badge-brand { background: var(--brand-lt); color: var(--brand); border: 1px solid #fecaca; font-weight: 700; }
.badge-soft-green { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; font-weight: 700; }
.badge-soft-red { background: var(--brand-lt); color: var(--brand-2); border: 1px solid #fecaca; font-weight: 700; }
.badge-soft-amber { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; font-weight: 700; }
.badge-soft-gray { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; font-weight: 700; }
.badge-soft-blue { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; font-weight: 700; }

.label-mini {
    font-size: 10px; font-weight: 700; color: #9ca3af;
    text-transform: uppercase; letter-spacing: 0.05em;
}

.tahapan-row { border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 12px; background: #fff; margin-bottom: 8px; }
.tahapan-row.selected { border: 2px solid var(--brand); background: var(--brand-lt); }
.tahapan-row.disabled { opacity: 0.6; background: #fafafa; }

.text-brand { color: var(--brand); }

.kpi-card { border-radius: 12px; border: 1px solid #e5e7eb; padding: 14px; background: #fff; }
.kpi-card .kpi-label { font-size: 10px; font-weight: 700; color: #9ca3af; text-transform: uppercase; }
.kpi-card .kpi-value { font-size: 18px; font-weight: 800; margin-top: 4px; }

.section { display: none; }
.section.active { display: block; }

/* Print */
.doc {
    width: 210mm; min-height: 297mm; padding: 15mm 18mm; box-sizing: border-box;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; font-size: 10pt;
    color: #111; background: #fff; position: relative; margin: 24px auto;
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
}
@media print {
    body { background: #fff; }
    .doc { margin: 0; box-shadow: none; }
    @page { size: A4; margin: 0; }
    .no-print { display: none !important; }
}
.doc .accent-bar {
    position: absolute; top: 0; left: 0; right: 0; height: 6px;
    background: linear-gradient(90deg, var(--brand-dk) 0%, var(--brand) 50%, var(--brand-2) 100%);
}
.doc .label-pill {
    display: inline-block; padding: 2px 10px; background: var(--brand);
    color: #fff; font-weight: 700; font-size: 8.5pt; margin-bottom: 4px; border-radius: 2px;
}
.doc table.lines { width: 100%; border-collapse: collapse; }
.doc table.lines th { background: var(--brand); color: #fff; padding: 6px 8px; font-size: 8pt; text-align: left; }
.doc table.lines td { padding: 6px 8px; font-size: 9pt; border-bottom: 1px solid #fecaca; }
.doc table.totals { width: 100%; border-collapse: collapse; }
.doc table.totals td { padding: 4px 8px; font-size: 8.5pt; text-align: right; border-top: 1px solid #fecaca; }
.doc .total-row td { background: var(--brand); color: #fff; font-weight: 800; font-size: 10pt; }
.doc .terbilang {
    background: var(--brand-lt); border-left: 3px solid var(--brand);
    padding: 6px 12px; margin-top: 8px; font-size: 8pt; color: var(--brand); font-style: italic;
}
.doc .bank-box {
    border: 1.5px solid var(--brand); display: inline-block; padding: 6px 12px;
    margin-top: 4px; font-size: 8.5pt; font-weight: 700; line-height: 1.6;
    border-radius: 4px; background: var(--brand-lt); color: var(--brand);
}
.cancelled-watermark {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(-35deg);
    font-size: 72pt; font-weight: 900; color: rgba(220,38,38,0.1);
    letter-spacing: 8px; pointer-events: none; user-select: none;
    white-space: nowrap; z-index: 1;
}
