/* KMS BUSY PRO - top-right notifications */
#kms-toasts {
    position: fixed; top: 64px; right: 16px; z-index: 100001;
    display: flex; flex-direction: column; gap: 10px;
    width: min(370px, calc(100vw - 32px)); pointer-events: none;
}
.kt {
    --c1: #10b981; --c2: #059669; --tint: rgba(16, 185, 129, .10);
    pointer-events: auto; position: relative; overflow: hidden;
    display: grid; grid-template-columns: 38px 1fr 22px; gap: 12px; align-items: start;
    padding: 13px 12px 15px 16px; border-radius: 14px;
    background: linear-gradient(135deg, var(--tint), rgba(255, 255, 255, 0) 55%), rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
    box-shadow: 0 22px 44px -18px rgba(15, 23, 42, .38), 0 0 0 1px rgba(148, 163, 184, .22);
    font-family: 'Inter', 'Segoe UI', sans-serif; color: #0f172a;
    transform-origin: 100% 0;
    animation: ktIn .6s cubic-bezier(.34, 1.56, .64, 1) both;
}
.kt::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(var(--c1), var(--c2)); }
.kt-error   { --c1: #f43f5e; --c2: #dc2626; --tint: rgba(244, 63, 94, .10); }
.kt-warning { --c1: #f59e0b; --c2: #d97706; --tint: rgba(245, 158, 11, .12); }
.kt-info    { --c1: #06b6d4; --c2: #0284c7; --tint: rgba(6, 182, 212, .10); }
.kt-loading { --c1: #6366f1; --c2: #06b6d4; --tint: rgba(99, 102, 241, .10); }

.kt-icon {
    position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    box-shadow: 0 8px 18px -6px var(--c1);
    animation: ktPop .55s .12s cubic-bezier(.34, 1.56, .64, 1) both;
}
.kt-icon::after { /* ring pulse */
    content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--c1);
    opacity: 0; animation: ktRing 1.1s .25s ease-out 1;
}
.kt-loading .kt-icon::after { animation: ktRing 1.4s ease-out infinite; }
.kt-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.kt-draw { stroke-dasharray: 30; stroke-dashoffset: 30; animation: ktDraw .5s .35s ease-out forwards; }
.kt-spin { animation: ktSpin .8s linear infinite; }

.kt-body { min-width: 0; padding-top: 1px; }
.kt-title { font-weight: 700; font-size: 14px; letter-spacing: .1px; animation: ktText .45s .18s ease-out both; }
.kt-msg { margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: #475569; word-wrap: break-word; animation: ktText .45s .26s ease-out both; }
.kt-close {
    border: 0; background: transparent; color: #94a3b8; font-size: 20px; line-height: 1; cursor: pointer; padding: 0;
    width: 22px; height: 22px; border-radius: 6px; transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.kt-close:hover { background: rgba(148, 163, 184, .18); color: #0f172a; transform: rotate(90deg); }
.kt-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(148, 163, 184, .18); }
.kt-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--c1), var(--c2)); transform-origin: 0 50%; }
.kt-loading .kt-bar span { width: 35%; animation: ktIndet 1.1s ease-in-out infinite !important; }
.kt-hold .kt-bar span { animation-play-state: paused !important; }
.kt-morph .kt-icon { animation: ktMorph .55s cubic-bezier(.34, 1.56, .64, 1) both; }
.kt-morph .kt-title, .kt-morph .kt-msg { animation: ktText .4s ease-out both; }
.kt-out { animation: ktOut .45s cubic-bezier(.7, 0, .84, 0) forwards; }

@keyframes ktIn    { 0% { opacity: 0; transform: translateX(110%) scale(.92); } 100% { opacity: 1; transform: none; } }
@keyframes ktOut   { 0% { opacity: 1; transform: none; } 60% { opacity: 0; transform: translateX(60%) scale(.96); } 100% { opacity: 0; transform: translateX(60%); height: 0; padding-top: 0; padding-bottom: 0; margin-top: -10px; } }
@keyframes ktPop   { 0% { transform: scale(0) rotate(-45deg); } 100% { transform: none; } }
@keyframes ktMorph { 0% { transform: scale(.4); } 100% { transform: none; } }
@keyframes ktRing  { 0% { opacity: .7; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes ktDraw  { to { stroke-dashoffset: 0; } }
@keyframes ktSpin  { to { transform: rotate(360deg); } }
@keyframes ktText  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ktCount { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes ktIndet { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }

@media (max-width: 480px) { #kms-toasts { top: 12px; right: 12px; left: 12px; width: auto; } }
@media (prefers-reduced-motion: reduce) {
    .kt, .kt *, .kt::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
    .kt-draw { stroke-dashoffset: 0; }
}
@media print { #kms-toasts { display: none !important; } }
