/* =========================================================================
   NOTIFIKASI TERPUSAT (toast + dialog konfirmasi) untuk seluruh elfitra-website.
   Dipakai halaman publik, login/register, pendaftaran, dan panel admin.
   Warna mengikuti palet yang sudah ada; font mengikuti halaman (inherit).
   ========================================================================= */

.nt-wrap {
    --nt-ok: #198754;
    --nt-err: #dc3545;
    --nt-warn: #ff8c00;
    --nt-info: #0d6efd;
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(400px, calc(100vw - 28px));
    pointer-events: none;
    font-family: inherit;
}

.nt-toast {
    --c: var(--nt-info);
    --cb: rgba(13, 110, 253, .12);
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 40px 16px 14px;
    background: #fff;
    color: #374050;
    border-radius: 16px;
    border: 1px solid #edf0f3;
    box-shadow: 0 18px 40px rgba(55, 64, 80, .18), 0 2px 6px rgba(55, 64, 80, .06);
    overflow: hidden;
    pointer-events: auto;
    animation: ntMasuk .5s cubic-bezier(.2, .9, .25, 1.15) both;
}
.nt-toast::before {          /* garis aksen di kiri */
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 5px;
    background: var(--c);
}
.nt-toast.nt-success { --c: var(--nt-ok);   --cb: rgba(25, 135, 84, .12); }
.nt-toast.nt-error   { --c: var(--nt-err);  --cb: rgba(220, 53, 69, .12); }
.nt-toast.nt-warning { --c: var(--nt-warn); --cb: rgba(255, 140, 0, .14); }
.nt-toast.nt-info    { --c: var(--nt-info); --cb: rgba(13, 110, 253, .12); }

.nt-ico {
    flex: 0 0 42px;
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 14px;
    font-size: 1.35rem;
    color: var(--c);
    background: var(--cb);
}
.nt-toast.nt-success .nt-ico i { animation: ntCentang .6s .2s ease both; }
.nt-body { min-width: 0; flex: 1; padding-top: 1px; }
.nt-title { margin: 0 0 2px; font-size: .98rem; font-weight: 700; line-height: 1.3; color: #374050; }
.nt-msg { margin: 0; font-size: .92rem; line-height: 1.5; color: #5b6573; overflow-wrap: anywhere; }
.nt-list { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.nt-list li {
    position: relative; padding-left: 16px;
    font-size: .88rem; line-height: 1.45; color: #5b6573; overflow-wrap: anywhere;
}
.nt-list li::before {
    content: ''; position: absolute; left: 2px; top: .55em;
    width: 6px; height: 6px; border-radius: 50%; background: var(--c);
}
.nt-x {
    position: absolute; top: 8px; right: 8px;
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%;
    background: transparent; color: #98a2b0; font-size: .9rem;
    cursor: pointer; transition: background .2s ease, color .2s ease;
}
.nt-x:hover { background: #f1f3f5; color: #374050; }
.nt-bar {
    position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
    background: var(--c); opacity: .55;
    transform-origin: left; animation: ntBar var(--dur, 5000ms) linear forwards;
}
.nt-toast:hover .nt-bar { animation-play-state: paused; }
.nt-toast.nt-keluar { animation: ntKeluar .35s ease forwards; }

@keyframes ntMasuk  { from { opacity: 0; transform: translateX(60px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes ntKeluar { to { opacity: 0; transform: translateX(60px) scale(.96); max-height: 0; margin-top: -12px; padding-top: 0; padding-bottom: 0; } }
@keyframes ntBar    { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes ntCentang { from { transform: scale(.2) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- HP: tampil di atas, selebar layar ---------- */
@media (max-width: 575.98px) {
    .nt-wrap { top: 10px; right: 10px; left: 10px; width: auto; }
    .nt-toast { padding: 12px 38px 14px 12px; border-radius: 14px; }
    .nt-ico { flex-basis: 38px; width: 38px; height: 38px; font-size: 1.2rem; border-radius: 12px; }
    @keyframes ntMasuk  { from { opacity: 0; transform: translateY(-24px) scale(.97); } to { opacity: 1; transform: none; } }
    @keyframes ntKeluar { to { opacity: 0; transform: translateY(-24px); max-height: 0; margin-top: -12px; padding-top: 0; padding-bottom: 0; } }
}

/* =========================================================================
   DIALOG KONFIRMASI (menggantikan confirm()/alert() bawaan browser)
   ========================================================================= */
.nt-overlay {
    position: fixed; inset: 0; z-index: 20010;
    display: flex; align-items: center; justify-content: center;
    padding: 18px;
    background: rgba(33, 41, 54, .55);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    animation: ntFade .25s ease both;
    font-family: inherit;
}
.nt-dialog {
    --c: #0d6efd; --cb: rgba(13, 110, 253, .12);
    width: min(420px, 100%);
    padding: 30px 26px 24px;
    text-align: center;
    background: #fff; color: #374050;
    border-radius: 24px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .3);
    animation: ntPop .4s cubic-bezier(.2, .9, .25, 1.2) both;
}
.nt-dialog.nt-success { --c: #198754; --cb: rgba(25, 135, 84, .12); }
.nt-dialog.nt-error   { --c: #dc3545; --cb: rgba(220, 53, 69, .12); }
.nt-dialog.nt-warning { --c: #ff8c00; --cb: rgba(255, 140, 0, .14); }
.nt-dialog .nt-ico { width: 64px; height: 64px; flex: none; margin: 0 auto 16px; border-radius: 50%; font-size: 1.9rem; }
.nt-dialog h3 { margin: 0 0 8px; font-size: 1.25rem; font-weight: 700; color: #374050; }
.nt-dialog p { margin: 0; font-size: .98rem; line-height: 1.55; color: #5b6573; }
.nt-actions { display: flex; gap: 10px; margin-top: 24px; }
.nt-btn {
    flex: 1; padding: 12px 16px;
    border: 1.5px solid #e2e8f0; border-radius: 999px;
    background: #fff; color: #374050;
    font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.nt-btn:hover { background: #f8f9fa; transform: translateY(-1px); }
.nt-btn.nt-ya { border-color: var(--c); background: var(--c); color: #fff; box-shadow: 0 8px 18px rgba(55, 64, 80, .18); }
.nt-btn.nt-ya:hover { filter: brightness(.94); }
.nt-overlay.nt-tutup { animation: ntFade .2s ease reverse both; }
.nt-overlay.nt-tutup .nt-dialog { animation: ntPop .2s ease reverse both; }
@keyframes ntFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ntPop  { from { opacity: 0; transform: scale(.85) translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 420px) { .nt-actions { flex-direction: column-reverse; } }

/* =========================================================================
   SweetAlert2 (dipakai untuk konfirmasi keluar) agar senada
   ========================================================================= */
.swal2-container { z-index: 20020 !important; }
.swal2-popup { border-radius: 24px !important; padding: 1.8rem 1.4rem 1.5rem !important; font-family: inherit !important; box-shadow: 0 30px 70px rgba(0, 0, 0, .3) !important; }
.swal2-title { font-size: 1.3rem !important; font-weight: 700 !important; color: #374050 !important; }
.swal2-html-container { color: #5b6573 !important; font-size: .98rem !important; }
.swal2-actions { gap: 10px; width: 100%; }
.swal2-confirm, .swal2-cancel, .swal2-deny { border-radius: 999px !important; padding: .7rem 1.5rem !important; font-weight: 700 !important; }
.swal2-styled:focus { box-shadow: 0 0 0 4px rgba(255, 140, 0, .25) !important; }
@media (max-width: 420px) { .swal2-actions { flex-direction: column-reverse; } .swal2-actions button { width: 100%; margin: 0 !important; } }

@media (prefers-reduced-motion: reduce) {
    .nt-toast, .nt-overlay, .nt-dialog, .nt-bar, .nt-ico i { animation-duration: .01ms !important; }
}
