/* AppDialog — toast & konfirmasi ala mobile app */

.app-dialog-toast-wrap.swal2-popup {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    width: auto !important;
    max-width: min(92vw, 380px) !important;
}

.app-dialog-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 1.25rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.14);
    text-align: left;
}

.app-dialog-toast__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.app-dialog-toast__title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.3;
}

.app-dialog-toast__msg {
    margin: 4px 0 0;
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.45;
}

.app-dialog-toast__msg p {
    margin: 0;
}

.app-dialog-toast__msg ul {
    margin: 4px 0 0;
    padding-left: 1.1rem;
}

/* Konfirmasi — bottom sheet (mobile) / modal (desktop) */
.app-dialog-sheet.swal2-popup,
.app-dialog-modal.swal2-popup {
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 1.5rem 1.5rem 0 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    transform: none !important;
    box-shadow: 0 -12px 48px rgba(15, 23, 42, 0.18) !important;
}

@media (min-width: 768px) {
    .app-dialog-modal.swal2-popup {
        border-radius: 1.25rem !important;
        max-width: 400px !important;
        width: auto !important;
        position: relative !important;
        bottom: auto !important;
        margin: auto !important;
    }
}

.app-dialog-sheet .swal2-actions,
.app-dialog-modal .swal2-actions {
    flex-direction: column-reverse;
    gap: 8px;
    width: 100%;
    padding: 0 20px 20px;
    margin: 0;
}

@media (min-width: 768px) {
    .app-dialog-modal .swal2-actions {
        flex-direction: row;
        justify-content: flex-end;
        padding: 0 20px 20px;
    }
}

.app-dialog-confirm {
    padding: 8px 20px 4px;
    text-align: center;
}

.app-dialog-confirm__handle {
    width: 40px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 99px;
    margin: 0 auto 16px;
}

@media (min-width: 768px) {
    .app-dialog-confirm__handle {
        display: none;
    }
}

.app-dialog-confirm__icon {
    width: 56px;
    height: 56px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 1.35rem;
}

.app-dialog-confirm__icon--warning {
    background: #fef3c7;
    color: #d97706;
}

.app-dialog-confirm__icon--danger {
    background: #fee2e2;
    color: #dc2626;
}

.app-dialog-confirm__icon--info {
    background: #dbeafe;
    color: #2563eb;
}

.app-dialog-confirm__icon--success {
    background: #d1fae5;
    color: #059669;
}

.app-dialog-confirm__title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.3;
}

.app-dialog-confirm__text {
    margin: 0;
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.55;
    white-space: pre-line;
}

.app-dialog-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 13px 18px;
    border-radius: 14px;
    font-size: 0.875rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.12s, opacity 0.12s;
}

.app-dialog-btn:active {
    transform: scale(0.98);
}

.app-dialog-btn--primary {
    background: #2563eb;
    color: #fff;
}

.app-dialog-btn--danger {
    background: #ef4444;
    color: #fff;
}

.app-dialog-btn--ghost {
    background: #f3f4f6;
    color: #374151;
}

@media (min-width: 768px) {
    .app-dialog-btn {
        width: auto;
        min-width: 100px;
    }
}

.app-dialog-sheet .swal2-html-container,
.app-dialog-modal .swal2-html-container {
    margin: 0 !important;
    padding: 0 !important;
}

.app-dialog-sheet .swal2-close,
.app-dialog-modal .swal2-close {
    display: none !important;
}

/* Di atas bottom sheet keuangan (z-index 9999) */
body.swal2-shown .swal2-container {
    z-index: 10050 !important;
}

body.swal2-shown .swal2-backdrop {
    z-index: 10049 !important;
}
