/* ==========================================================================
   Notif — gaya toast & dialog (dipakai situs publik dan panel admin)
   Berdiri sendiri: tidak bergantung pada app.css maupun AdminLTE.
   ========================================================================== */
.ntf-stack, .ntf-modal {
	--ntf-paper: #fdfaf3;
	--ntf-ink: #1d1810;
	--ntf-ink-2: #4a4132;
	--ntf-line: rgba(29, 24, 16, .12);
	--ntf-gold: #b58a2c;
	--ntf-ease: cubic-bezier(.16, 1, .3, 1);
	font-family: "Plus Jakarta Sans", "Source Sans Pro", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}
.ntf--success { --ntf-c: #8a6516; --ntf-soft: #f7eed6; }
.ntf--error   { --ntf-c: #b23a22; --ntf-soft: #f8e5df; }
.ntf--warning { --ntf-c: #9a6a00; --ntf-soft: #f8edd3; }
.ntf--info    { --ntf-c: #80601a; --ntf-soft: #f4ead2; }
.ntf--question{ --ntf-c: #80601a; --ntf-soft: #f4ead2; }

/* Ikon: lingkaran & tanda digambar */
.ntf-ic { width: 100%; height: 100%; fill: none; stroke: var(--ntf-c); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ntf-ic__ring { stroke-dasharray: 63; stroke-dashoffset: 63; opacity: .35; }
.ntf-ic__mark path { stroke-dasharray: 20; stroke-dashoffset: 20; }
.is-in .ntf-ic__ring { animation: ntfDraw .7s var(--ntf-ease) .05s forwards; }
.is-in .ntf-ic__mark path { animation: ntfDraw .5s var(--ntf-ease) .35s forwards; }
@keyframes ntfDraw { to { stroke-dashoffset: 0; } }

/* Toast ------------------------------------------------------------------- */
.ntf-stack {
	position: fixed; top: 20px; right: 20px; z-index: 100000;
	display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
	width: min(380px, calc(100vw - 32px)); pointer-events: none;
}
.ntf-toast {
	position: relative; display: grid; grid-template-columns: 28px 1fr 24px; gap: 14px; align-items: start;
	width: 100%; padding: 16px 16px 18px; overflow: hidden; pointer-events: auto;
	background: var(--ntf-paper); color: var(--ntf-ink-2);
	border: 1px solid var(--ntf-line); border-left: 3px solid var(--ntf-c); border-radius: 4px;
	box-shadow: 0 18px 40px -18px rgba(29, 24, 16, .35), 0 2px 6px rgba(29, 24, 16, .06);
	opacity: 0; transform: translateX(calc(100% + 40px));
	transition: transform .55s var(--ntf-ease), opacity .3s;
}
.ntf-toast.is-in { opacity: 1; transform: none; }
.ntf-toast.is-out { opacity: 0; transform: translateX(40px) scale(.96); transition: transform .4s ease, opacity .3s; }
.ntf-toast .ntf-ic { width: 28px; height: 28px; }
.ntf-toast__title { margin: 2px 0 0; color: var(--ntf-ink); font-size: 15px; font-weight: 700; line-height: 1.35; }
.ntf-toast__text { margin: 4px 0 0; font-size: 14px; line-height: 1.5; }
.ntf-toast__x {
	width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer;
	color: var(--ntf-ink-2); font-size: 20px; line-height: 1; opacity: .6; transition: opacity .2s, background .2s;
}
.ntf-toast__x:hover, .ntf-toast__x:focus-visible { opacity: 1; background: var(--ntf-soft); }
.ntf-toast__bar {
	position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--ntf-c); opacity: .5;
	transform-origin: left; animation: ntfBar linear forwards;
}
.ntf-toast.is-paused .ntf-toast__bar { animation-play-state: paused; }
@keyframes ntfBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* Dialog ------------------------------------------------------------------ */
.ntf-modal { position: fixed; inset: 0; z-index: 100001; display: grid; place-items: center; padding: 20px; }
.ntf-modal__veil { position: absolute; inset: 0; background: rgba(20, 16, 10, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s; }
.ntf-modal.is-in .ntf-modal__veil { opacity: 1; }
.ntf-modal.is-out .ntf-modal__veil { opacity: 0; }
.ntf-modal__card {
	position: relative; width: min(420px, 100%); padding: 56px 32px 28px; text-align: center;
	background: var(--ntf-paper); color: var(--ntf-ink-2);
	border-radius: 999px 999px 6px 6px / 120px 120px 6px 6px;
	box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .5);
	opacity: 0; transform: translateY(24px) scale(.96);
	transition: transform .55s var(--ntf-ease), opacity .3s;
}
.ntf-modal__card::before {
	content: ""; position: absolute; inset: 8px 8px auto; height: 100px;
	border: 1px solid var(--ntf-line); border-bottom: 0; border-radius: inherit; pointer-events: none;
}
.ntf-modal.is-in .ntf-modal__card { opacity: 1; transform: none; }
.ntf-modal.is-out .ntf-modal__card { opacity: 0; transform: translateY(12px) scale(.98); transition: transform .3s ease, opacity .25s; }
.ntf-modal__card.is-nudge { animation: ntfNudge .45s ease; }
@keyframes ntfNudge { 0%, 100% { transform: none; } 30% { transform: scale(1.03); } 60% { transform: scale(.99); } }
.ntf-modal__crest {
	display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px;
	padding: 12px; border-radius: 50%; background: var(--ntf-soft);
}
.ntf-modal__title { margin: 0 0 8px; color: var(--ntf-ink); font: 600 24px/1.2 "Reem Kufi", "Plus Jakarta Sans", "Segoe UI", sans-serif; }
.ntf-modal__text { margin: 0 auto; max-width: 30em; font-size: 15px; line-height: 1.6; }
.ntf-modal__actions { display: flex; justify-content: center; gap: 10px; margin-top: 26px; }
.ntf-btn {
	min-height: 46px; min-width: 120px; padding: 0 22px; border: 1px solid transparent; border-radius: 3px; cursor: pointer;
	font-family: inherit; font-size: 14px; font-weight: 700; line-height: 1; letter-spacing: .03em; transition: background .25s, color .25s, border-color .25s, transform .15s;
}
.ntf-btn:active { transform: translateY(1px); }
.ntf-btn:focus-visible { outline: 2px solid var(--ntf-gold); outline-offset: 3px; }
.ntf-btn--main { background: var(--ntf-ink); color: #fdfaf3; }
.ntf-btn--main:hover { background: var(--ntf-gold); color: var(--ntf-ink); }
.ntf--danger .ntf-btn--main { background: #b23a22; color: #fff; }
.ntf--danger .ntf-btn--main:hover { background: #8f2c18; }
.ntf-btn--ghost { background: transparent; color: var(--ntf-ink); border-color: var(--ntf-line); }
.ntf-btn--ghost:hover { border-color: var(--ntf-ink); }

@media (max-width: 520px) {
	.ntf-stack { top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); right: 16px; left: 16px; width: auto; align-items: stretch; }
	.ntf-toast { transform: translateY(calc(100% + 40px)); }
	.ntf-toast.is-out { transform: translateY(20px); }
	.ntf-modal__actions { flex-direction: column-reverse; }
	.ntf-btn { width: 100%; }
}

/* Layar sentuh: target ketuk minimal 48 dp */
@media (hover: none) {
	.ntf-toast { grid-template-columns: 28px 1fr 40px; }
	.ntf-toast__x { width: 40px; height: 40px; margin: -8px -8px 0 0; }
	.ntf-btn { min-height: 50px; }
	.ntf-stack, .ntf-modal { -webkit-tap-highlight-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
	.ntf-toast, .ntf-modal__card, .ntf-modal__veil { transition: opacity .01ms !important; transform: none !important; }
	.ntf-ic__ring, .ntf-ic__mark path { stroke-dashoffset: 0 !important; animation: none !important; }
	.ntf-modal__card.is-nudge { animation: none; }
}
