/* DIWARU Perdata - Components CSS
 * Paket awal WP-2C: tombol dan info badge yang sudah stabil.
 */

.info-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin-top: 12px;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    border: 1.5px solid;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.info-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.info-badge-label {
    opacity: 0.9;
    font-weight: 500;
}

.info-badge-value {
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.info-badge.berkas,
.info-badge.status-draft,
.info-badge.status-approved,
.info-badge.save-unsaved,
.info-badge.save-saved {
    background: rgba(255, 255, 255, 0.95);
    color: #dc2626;
    border-color: #dc2626;
}

.btn {
    border: 0;
    min-height: 44px;
    min-width: 44px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    color: #fff;
    box-shadow: 0 8px 20px rgba(196, 30, 58, .2);
    border: 1px solid rgba(255, 215, 0, .4);
}

.btn-primary:hover {
    box-shadow: 0 12px 28px rgba(196, 30, 58, .3);
    background: linear-gradient(135deg, var(--primary2), var(--gold-dark));
}

.btn-secondary {
    background: linear-gradient(135deg, var(--bg1), var(--bg2));
    color: #fff;
    box-shadow: 0 8px 20px rgba(196, 30, 58, .15);
    border: 1px solid var(--gold);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--bg2), var(--gold-dark));
}

.btn-ghost {
    background: #fff;
    color: #0f172a;
    border: 1px solid var(--line);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 8px 20px rgba(239, 68, 68, .15);
}

.btn-success {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    box-shadow: 0 8px 20px rgba(22, 163, 74, .15);
}

.btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    opacity: .95;
}

.btn-close {
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    color: #64748b;
}

.btn-close:hover {
    background: #fee;
    border-color: #fcc;
    color: #c00;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 8px;
}

.meta code {
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .25);
    padding: 4px 8px;
    border-radius: 10px;
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
}

.inline {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.badge b {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
}

.status-pill {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, .12);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, .25);
    font-size: 11px;
    font-weight: 700;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.action-buttons-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

.step4-confirm-card {
    margin-top: 16px;
    border: 1px solid rgba(220, 38, 38, .22);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 247, 237, .98), rgba(255, 255, 255, .96));
    box-shadow: 0 12px 28px rgba(127, 29, 29, .08);
    overflow: hidden;
}

.step4-confirm-head {
    padding: 16px 18px 8px;
}

.step4-confirm-head h3 {
    margin: 0 0 8px;
    color: #9a3412;
}

.step4-confirm-copy {
    color: #475569;
    line-height: 1.7;
}

.step4-confirm-summary {
    display: grid;
    gap: 10px;
    padding: 0 18px 18px;
}

.step4-confirm-item {
    border: 1px solid rgba(209, 213, 219, .9);
    border-radius: 12px;
    background: #fff;
    padding: 12px 14px;
}

.step4-confirm-item strong {
    display: block;
    margin-bottom: 6px;
}

.step4-confirm-meta {
    display: grid;
    gap: 4px;
    color: #475569;
    font-size: 13px;
}

.step4-confirm-empty {
    padding: 0 18px 18px;
    color: #64748b;
}

.step4-confirm-actions {
    border-top: 1px solid rgba(220, 38, 38, .14);
    background: rgba(255, 255, 255, .88);
    padding: 16px 18px 18px;
    display: grid;
    gap: 12px;
}

.step4-confirm-question {
    font-weight: 700;
    color: #0f172a;
}

.step4-confirm-choice {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.step4-confirm-choice .btn.active {
    box-shadow: 0 0 0 2px rgba(220, 38, 38, .18);
}

.step4-confirm-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(248, 250, 252, .9);
    border: 1px solid rgba(209, 213, 219, .85);
}

.step4-confirm-check input {
    margin-top: 3px;
}

.step4-confirm-status {
    font-size: 13px;
    line-height: 1.6;
    color: #475569;
}

.step4-confirm-status strong {
    color: #0f172a;
}

.step2-top {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
    justify-content: space-between;
}

.step2-top .left {
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
}

.step2-top .right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.step2-top .right .badge,
.step2-top .right .btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
}

.step2-shell {
    border: 1px solid rgba(254, 202, 202, .92);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 251, 235, .94));
    box-shadow: 0 14px 32px rgba(127, 29, 29, .10);
    padding: 14px;
    margin-bottom: 14px;
}

.step2-section-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 8px;
}

.step2-search-block {
    display: grid;
    gap: 8px;
}

.step2-search-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #1f2937;
}

.step2-search-hints {
    display: grid;
    gap: 8px;
    padding-top: 2px;
}

.step2-mode-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.step2-mode-btn {
    flex: 1 1 240px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    padding: 14px 16px;
    text-align: left;
    cursor: pointer;
    transition: .18s ease;
}

.step2-mode-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(127, 29, 29, .08);
}

.step2-mode-btn.active {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(127, 29, 29, .08), rgba(212, 175, 55, .14));
    box-shadow: 0 10px 26px rgba(127, 29, 29, .12);
}

.step2-mode-btn:not(.active) {
    opacity: .9;
}

.step2-mode-title {
    display: block;
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 4px;
}

.step2-mode-desc {
    display: block;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

.step2-panel {
    display: none;
}

.step2-panel.active {
    display: block;
}

.step2-checklist-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .98));
    border: 1px solid rgba(254, 202, 202, .92);
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(2, 6, 23, .06);
    padding: 14px;
}

.step2-checklist-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.step2-checklist-title {
    font-size: 16px;
    font-weight: 800;
    color: #7f1d1d;
    margin-bottom: 4px;
}

.step2-checklist-subtitle {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
    max-width: 640px;
}

.step2-bottom-actions {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .step2-top {
        flex-direction: column;
    }

    .step2-top .left,
    .step2-top .right {
        width: 100%;
    }

    .step2-top .right {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .step2-top .right .badge,
    .step2-top .right .btn,
    .step2-mode-btn,
    .step2-bottom-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .step2-checklist-panel,
    .step2-shell {
        padding: 12px;
        border-radius: 14px;
    }

    .step2-bottom-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-overlay {
        padding: 12px;
        align-items: flex-end;
    }

    .modal-content {
        max-width: none;
        max-height: min(88dvh, 720px);
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .modal-header,
    .modal-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .badge {
        font-size: 12px;
        padding: 8px 10px;
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .chip {
        font-size: 11px;
        padding: 4px 8px;
        white-space: normal;
        text-align: center;
    }

    .hint {
        font-size: 12px;
    }

    .content {
        padding: 18px 16px 24px;
    }

    .item {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .list {
        padding: 10px;
    }

    .row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .subhead {
        font-size: 13px;
    }

    .qty input {
        width: 50px;
        padding: 8px 4px;
    }

    .heir-grid {
        grid-template-columns: 1fr !important;
    }

    .btn,
    .button-group .btn,
    .action-buttons-container .btn {
        width: 100%;
        justify-content: center;
    }

    .wizard-perdata-answer-btn,
    .wizard-perdata-nav-left .btn,
    .wizard-perdata-nav-right .btn {
        width: 100%;
    }

    .wizard-perdata-card {
        padding: 12px;
        border-radius: 14px;
    }

    .wizard-perdata-question {
        font-size: 18px;
    }

    .wizard-perdata-nav,
    .wizard-perdata-nav-left,
    .wizard-perdata-nav-right {
        flex-direction: column;
        align-items: stretch;
    }

    .wizard-perdata-summary-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .perdata-guide {
        padding: 16px;
    }

    .perdata-guide-head {
        align-items: stretch;
    }

    .perdata-guide-item-btn {
        padding: 13px 14px;
    }

    .perdata-guide-item-content {
        padding: 0 14px 14px 14px;
    }

    .perdata-validation-group {
        padding: 12px;
    }

    .item > div:last-child {
        justify-content: space-between !important;
        margin-top: 10px;
        width: 100%;
        background: #f8fafc;
        padding: 8px;
        border-radius: 8px;
    }
}

@media (min-width: 640px) {
    .step2-heir-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    max-height: 90dvh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(79, 70, 229, .05), rgba(124, 58, 237, .05));
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.step2-mode-confirm-content {
    max-width: 520px;
}

.step2-mode-confirm-body p {
    margin: 0;
    color: #334155;
    line-height: 1.7;
}

.step2-mode-confirm-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    background: #f8fafc;
}

.card-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.card-header-flex h3 {
    margin: 0;
}

.chip {
    font-size: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-weight: 600;
    background: #f8fafc;
}

.hint {
    color: var(--muted);
    font-size: 13px;
    margin-top: 6px;
    line-height: 1.6;
    font-weight: 400;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #f8fafc;
    font-size: 14px;
    font-weight: 700;
}

.surat-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    color: var(--muted);
}

.storage-info {
    margin-top: 10px;
}

.storage-bar {
    width: 100%;
    height: 24px;
    background: #f1f5f9;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.storage-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    transition: width 0.3s ease, background 0.3s ease;
    border-radius: 12px;
}

.storage-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.storage-fill.danger {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.storage-stats {
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
    text-align: center;
}

.storage-warning {
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    color: #92400e;
    font-size: 12px;
    font-weight: 700;
}

.saved-list {
    max-height: 400px;
    overflow-y: auto;
}

.saved-item {
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: all 0.2s ease;
}

.saved-item:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.saved-item-info {
    flex: 1;
    min-width: 0;
}

.saved-item-title {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 4px;
}

.saved-item-meta {
    font-size: 11px;
    color: var(--muted);
}

.saved-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.content {
    padding: 26px 28px 32px;
}

.subhead {
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 18px;
    line-height: 1.6;
    font-weight: 500;
}

.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.group {
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 14px;
    background: #f8fafc;
    margin-bottom: 14px;
}

.group-title {
    background:
        linear-gradient(135deg, var(--primary), var(--primary2)),
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 255, 255, .05) 10px, rgba(255, 255, 255, .05) 20px);
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 800;
    margin-bottom: 12px;
}

.group-title small {
    font-weight: 650;
    opacity: .9;
    font-size: 11px;
}

.list {
    margin-top: 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    padding: 12px;
    background: #f8fafc;
}

.item {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 8px 0;
    font-size: 12px;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.heir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.heir-item {
    border: 1px solid var(--line);
    background: #fef2f2;
    border-radius: 8px;
    padding: 12px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.heir-item.disabled {
    opacity: .55;
    background: #f7f7f7;
    border-color: #e2e8f0;
}

.heir-check {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    flex: 0 0 auto;
}

.heir-label {
    flex: 1 1 auto;
    font-weight: 750;
    font-size: 13px;
    line-height: 1.35;
}

.heir-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
}

.heir-ref {
    font-size: 11px;
    color: var(--muted);
    font-weight: 650;
}

.qty {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.qty-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    font-weight: 900;
    color: #0f172a;
}

.qty-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.qty input {
    width: 64px;
    padding: 10px 10px;
    text-align: center;
    border-radius: 10px;
}

.qty input:disabled {
    background: #f1f5f9;
    color: #334155;
}

.step2-heir-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.step2-heir-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s ease;
}

/* ============================================================
 * Perdata Guide (Panduan KUHPerdata) — dipindah dari HTML
 * ============================================================ */
.perdata-guide {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 20px;
}

.perdata-guide-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.perdata-guide-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1 1 320px;
}

.perdata-guide-icon {
    font-size: 20px;
    line-height: 1;
    margin-top: 2px;
}

.perdata-guide-title h3 {
    margin: 0;
    font-size: 16px;
    color: #0f172a;
}

.perdata-guide-subtitle {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.perdata-guide-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.perdata-guide-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.perdata-guide-summary {
    margin-top: 14px;
    padding: 12px 14px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    color: #7c2d12;
    font-size: 13px;
    line-height: 1.65;
}

.perdata-guide-summary strong {
    color: #9a3412;
}

.perdata-guide-body {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.perdata-guide-body.hidden,
.perdata-guide-item-content.hidden,
.perdata-validation-detail.hidden {
    display: none;
}

.perdata-guide-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.perdata-guide-item-btn {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    text-align: left;
}

.perdata-guide-item-btn:hover {
    background: #f8fafc;
}

.perdata-guide-item-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.perdata-guide-item-number {
    display: inline-flex;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #1d4ed8;
    background: #dbeafe;
    flex-shrink: 0;
}

.perdata-guide-item-title {
    font-size: 13px;
    font-weight: 800;
    color: #1e293b;
}

.perdata-guide-item-priority {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.perdata-guide-item-toggle {
    color: #64748b;
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
}

.perdata-guide-item-content {
    padding: 0 16px 14px 52px;
    font-size: 13px;
    color: #334155;
    line-height: 1.7;
}

.perdata-guide-item-content strong {
    color: #1f2937;
}

.perdata-guide-item-content .note {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
}

/* ============================================================
 * Perdata Validation (Validasi Ahli Waris) — dipindah dari HTML
 * ============================================================ */
.perdata-validation-summary {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    background: #fff7f7;
    border-radius: 12px;
    color: #7f1d1d;
    font-size: 13px;
    line-height: 1.65;
}

.perdata-validation-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.perdata-validation-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.perdata-validation-chip.attention {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.perdata-validation-chip.info {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.perdata-validation-detail {
    margin-top: 14px;
    display: grid;
    gap: 12px;
}

.perdata-validation-group {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    padding: 14px;
}

.perdata-validation-group h4 {
    margin: 0 0 8px;
    font-size: 13px;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.perdata-validation-group ul {
    margin: 0;
    padding-left: 18px;
    color: #334155;
    font-size: 13px;
    line-height: 1.7;
}

.perdata-validation-group li + li {
    margin-top: 6px;
}

/* ============================================================
 * Wizard Perdata (Step 2 Checklist Wizard) — dipindah dari HTML
 * ============================================================ */
.wizard-perdata-card {
    border: 1px solid rgba(254, 202, 202, .96);
    border-radius: 14px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
    box-shadow: 0 12px 28px rgba(127, 29, 29, .08);
    margin-bottom: 14px;
}

.wizard-perdata-head {
    margin-bottom: 18px;
}

.wizard-perdata-progress {
    margin-bottom: 16px;
}

.wizard-perdata-progress-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--muted);
}

.wizard-perdata-progress-track {
    height: 8px;
    border-radius: 999px;
    background: #fee2e2;
    overflow: hidden;
}

.wizard-perdata-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--gold));
    transition: width .2s ease;
}

.wizard-perdata-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(127, 29, 29, .08);
    color: #7f1d1d;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.wizard-perdata-question {
    font-size: 21px;
    line-height: 1.35;
    font-weight: 800;
    margin-bottom: 10px;
    color: #7f1d1d;
}

.wizard-perdata-detail {
    font-size: 13px;
    line-height: 1.65;
    color: #334155;
    margin-bottom: 16px;
}

.wizard-perdata-body {
    display: grid;
    gap: 14px;
}

.wizard-perdata-answer-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.wizard-perdata-answer-btn {
    flex: 1 1 180px;
    min-height: 48px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: .18s ease;
    color: var(--text);
}

.wizard-perdata-answer-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(2, 6, 23, .08);
}

.wizard-perdata-answer-btn.selected-ya {
    background: linear-gradient(135deg, #991b1b, #b91c1c);
    border-color: #991b1b;
    color: #fff;
}

.wizard-perdata-answer-btn.selected-tidak {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.wizard-perdata-jumlah {
    display: none;
    border: 1px dashed #fca5a5;
    border-radius: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, .92);
    margin-bottom: 16px;
}

.wizard-perdata-jumlah.visible {
    display: block;
}

.wizard-perdata-jumlah-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wizard-perdata-jumlah-item {
    flex: 1 1 180px;
}

.wizard-perdata-jumlah-item label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #0f172a;
}

.wizard-perdata-jumlah-item input {
    width: 100%;
}

.wizard-perdata-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.wizard-perdata-nav-left,
.wizard-perdata-nav-right {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.wizard-perdata-summary {
    border: 1px solid rgba(212, 175, 55, .35);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(212, 175, 55, .10), rgba(255, 255, 255, .95));
    padding: 16px;
}

.wizard-perdata-intro {
    border: 1px solid rgba(254, 202, 202, .92);
    border-radius: 12px;
    background: rgba(255, 255, 255, .92);
    padding: 14px 16px;
}

.wizard-perdata-intro h3 {
    font-size: 14px;
    margin-bottom: 6px;
    color: #7f1d1d;
}

.wizard-perdata-intro p {
    font-size: 12px;
    line-height: 1.65;
    color: #475569;
    margin: 0;
}

.wizard-perdata-summary h3 {
    font-size: 15px;
    margin-bottom: 10px;
    color: #854d0e;
}

.wizard-perdata-summary-meta {
    font-size: 12px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 10px;
}

.wizard-perdata-summary-list {
    display: grid;
    gap: 8px;
}

.wizard-perdata-summary-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(212, 175, 55, .24);
    font-size: 13px;
}

.wizard-perdata-empty {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
}

/* ============================================================
 * Toggle + Switch (Step 3) — dipindah dari HTML
 * ============================================================ */
.toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    user-select: none;
    cursor: pointer;
    font-weight: 800;
    font-size: 11px;
    white-space: nowrap;
}

.toggle input {
    display: none;
}

.switch {
    width: 34px;
    height: 18px;
    background: #e2e8f0;
    border-radius: 999px;
    position: relative;
    transition: background .2s ease;
    flex: 0 0 auto;
}

.switch::after {
    content: "";
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 999px;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform .2s ease;
    box-shadow: 0 6px 16px rgba(2, 6, 23, .15);
    border: 1px solid rgba(2, 6, 23, .08);
}

.toggle input:checked + .switch {
    background: rgba(22, 163, 74, .35);
}

.toggle input:checked + .switch::after {
    transform: translateX(16px);
}

/* ============================================================
 * AW Card (Ahli Waris Card) — dipindah dari HTML
 * ============================================================ */
.aw-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 10px 30px rgba(2, 6, 23, .06);
}

.aw-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.aw-head h4 {
    font-size: 14px;
}

.aw-head .chip {
    background: rgba(79, 70, 229, .10);
    border-color: rgba(79, 70, 229, .20);
    color: var(--primary);
}

.checkline {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(245, 158, 11, .25);
    background: rgba(245, 158, 11, .10);
}

.checkline input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    flex: 0 0 18px;
    accent-color: var(--primary);
}

.checkline-copy {
    display: grid;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.checkline label {
    margin: 0;
    font-weight: 700;
}

.checkline-copy label {
    text-transform: none;
    letter-spacing: normal;
    font-size: 13px;
    line-height: 1.4;
}

.checkline p {
    margin: 0;
    color: #92400e;
    font-size: 11px;
    line-height: 1.45;
}

/* ============================================================
 * Golongan Header (Step 3) — dipindah dari HTML
 * ============================================================ */
.golongan-header {
    border-radius: 8px;
    padding: 14px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .25);
    box-shadow: 0 12px 28px rgba(2, 6, 23, .10);
    margin-top: 10px;
}

.golongan-title {
    font-weight: 900;
    font-size: 14px;
    margin-bottom: 6px;
}

.golongan-desc {
    font-size: 12px;
    opacity: .95;
    line-height: 1.45;
}

/* AWP builder */
.awp-case {
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
    margin-top: 10px;
}

.awp-case-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.awp-case-head b {
    font-size: 13px;
}

.mini {
    font-size: 11px;
    color: var(--muted);
    font-weight: 650;
}

/* ============================================================
 * Warning Box — dipindah dari HTML
 * ============================================================ */
.warning-box {
    border: 1px solid rgba(245, 158, 11, .35);
    background: rgba(245, 158, 11, .10);
    color: #92400e;
    border-radius: 16px;
    padding: 14px 16px;
    margin: 14px 0 16px;
}

.warning-box h3 {
    margin: 0 0 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #92400e;
}

.warning-box p {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.55;
}

.warning-box ul {
    margin: 6px 0 10px 18px;
    font-size: 12px;
    line-height: 1.55;
}

.warning-box li {
    margin: 4px 0;
}

.warning-box .danger-note {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(239, 68, 68, .10);
    border: 1px solid rgba(239, 68, 68, .25);
    color: #991b1b;
    font-weight: 800;
    font-size: 12px;
}

/* ============================================================
 * Adagium KUHPerdata — dipindah dari HTML
 * ============================================================ */
.adagium-container {
    text-align: center;
    padding: 20px 16px;
    margin: -10px -12px 24px;
    background: linear-gradient(135deg, rgba(196, 30, 58, .08), rgba(139, 0, 0, .08));
    border: 2px solid var(--primary);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.adagium-container::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: -20px;
    font-size: 120px;
    opacity: 0.05;
    color: var(--primary);
}

.adagium-container::after {
    content: '"';
    position: absolute;
    bottom: -20px;
    right: -20px;
    font-size: 120px;
    opacity: 0.05;
    color: var(--primary);
}

.adagium-text {
    font-family: 'Times New Roman', serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(196, 30, 58, .2);
    letter-spacing: 1px;
}

.adagium-translation {
    font-size: 13px;
    color: #475569;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.3px;
}

/* ============================================================
 * Step 6 layout + sign line — dipindah dari HTML
 * ============================================================ */
.sign-line {
    display: inline-block;
    border-bottom: 1px solid #000;
    min-width: 220px;
    height: 14px;
    vertical-align: bottom;
}

.grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.grid-2col-step6 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.grid-3col-step6 {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr;
    gap: 16px;
}

.section-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.section-header {
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.form-group-step6 {
    margin-bottom: 20px;
}

.form-group-step6 label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}

.form-group-step6 input[type="text"],
.form-group-step6 input[type="date"],
.form-group-step6 select,
.form-group-step6 textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.card-step6 {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.divider-step6 {
    height: 1px;
    background: #e5e7eb;
    margin: 24px 0;
}

/* ============================================================
 * Portal Back Button — dipindah dari HTML
 * ============================================================ */
.portal-back-btn {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 10020;
    min-height: 46px;
    padding: 12px 18px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.96);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.97), rgba(30, 41, 59, 0.95));
    color: #f8fafc;
    text-decoration: none;
    font: 700 14px/1.2 ui-sans-serif, system-ui, sans-serif;
    letter-spacing: 0.1px;
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.26), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.portal-back-btn:hover,
.portal-back-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(2, 6, 23, 0.34), 0 0 0 3px rgba(212, 175, 55, 0.16);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.99), rgba(30, 41, 59, 0.98));
    outline: none;
}

.portal-back-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

body.has-last-memory-banner .portal-back-btn {
    top: 84px;
}

#input_nomor_berkas {
    flex: 1 1 0;
    min-width: 0;
}

[data-action="ganti-nomor-berkas"] {
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .portal-back-btn {
        top: 12px;
        left: 12px;
        right: 12px;
        width: auto;
        justify-content: center;
        padding: 11px 16px;
        border-radius: 12px;
        font-size: 13px;
    }

    body.has-last-memory-banner .portal-back-btn {
        top: 132px;
    }
}

@media (max-width: 480px) {
    .portal-back-btn {
        top: 10px;
        left: 10px;
        right: 10px;
    }

    body.has-last-memory-banner .portal-back-btn {
        top: 146px;
    }
}
