/* ==========================================================================
   ALERT OVERLAY (Disesuaikan agar backdrop sedikit adaptif)
   ========================================================================== */
.app-alert-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45); /* Sedikit lebih transparan di mode terang */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    backdrop-filter: blur(3px);
}

body.dark-mode .app-alert-overlay {
    background: rgba(0, 0, 0, 0.65); /* Lebih pekat saat mode gelap */
}

/* ==========================================================================
   ALERT BOX (DEFAULT: MODE TERANG / LIGHT MODE)
   ========================================================================== */
.app-alert-box {
    width: 100%;
    max-width: 340px;
    
    /* Menggunakan warna cerah untuk mode terang */
    background: #ffffff;
    color: #4a5568; 
    border: 1px solid #e2e8f0;
    
    border-radius: 20px;
    padding: 24px 20px;
    box-sizing: border-box;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    animation: popupFade .2s ease;
}

/* ADAPTASI ALERT BOX SAAT MODE GELAP */
body.dark-mode .app-alert-box {
    background: #111827; /* Kembali ke warna asli Anda */
    color: #b0b3b9;      /* Kembali ke warna asli Anda */
    border: 1px solid #1f2937;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   ICON (Tetap mempertahankan skema warna fungsional Anda)
   ========================================================================== */
.app-alert-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #fff;
    font-size: 34px;
}

/* SUCCESS */
.app-alert-success .app-alert-icon {
    background: #16a34a;
}

/* ERROR */
.app-alert-error .app-alert-icon {
    background: #dc2626;
}

/* WARNING */
.app-alert-warning .app-alert-icon {
    background: #f59e0b;
}

/* ==========================================================================
   TITLE (Dibuat kontras dinamis)
   ========================================================================== */
.app-alert-title {
    color: #1a202c;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    display: block; 
    text-align: center;
}

body.dark-mode .app-alert-title {
    color: #ffffff;
}

/* ==========================================================================
   MESSAGE (Dibuat kontras dinamis)
   ========================================================================== */
.app-alert-message {
    color: #4a5568; /* Abu-abu gelap di mode terang */
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 22px;
    word-break: break-word;
}

body.dark-mode .app-alert-message {
    color: #d1d5db; /* Abu-abu terang di mode gelap */
}

/* ==========================================================================
   BUTTONS & ACTIONS (Layout asli dipertahankan penuh)
   ========================================================================== */
.app-alert-button {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 14px;
    background: #2563eb;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.app-alert-button:hover {
    opacity: .9;
}

.app-alert-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.btn-cancel {
    min-width: 100px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: #6c757d;
    color: #fff;
    cursor: pointer;
}

.btn-confirm {
    min-width: 100px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: #28a745;
    color: #fff;
    cursor: pointer;
}

.btn-confirm.danger {
    background: #dc3545;
}

/* ==========================================================================
   ANIMATION
   ========================================================================== */
@keyframes popupFade {
    from {
        opacity: 0;
        transform: scale(.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}