/* Shared portal toasts (success / error / warning / info). Used by layout.html and login.html. */
/* License-admin style confirmation toasts (global after POST/save) */
.lm-toast-host {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: min(420px, calc(100vw - 32px));
}
.lm-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(145deg, #064e3b 0%, #0E2918 55%, #0E2918 100%);
    color: #E7F2E9;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 18px 40px rgba(14,41,24, 0.28), 0 2px 8px rgba(15, 23, 42, 0.12);
    animation: lmToastIn 0.28s ease-out;
}
.lm-toast.lm-toast--error {
    background: linear-gradient(145deg, #7f1d1d 0%, #991b1b 55%, #b91c1c 100%);
    box-shadow: 0 18px 40px rgba(127, 29, 29, 0.28), 0 2px 8px rgba(15, 23, 42, 0.12);
}
.lm-toast.lm-toast--warn {
    background: linear-gradient(145deg, #78350f 0%, #92400e 55%, #b45309 100%);
    box-shadow: 0 18px 40px rgba(120, 53, 15, 0.28), 0 2px 8px rgba(15, 23, 42, 0.12);
}
.lm-toast.lm-toast--info {
    background: linear-gradient(145deg, #0c4a6e 0%, #075985 55%, #0369a1 100%);
    box-shadow: 0 18px 40px rgba(12, 74, 110, 0.28), 0 2px 8px rgba(15, 23, 42, 0.12);
}
.lm-toast.is-hiding {
    animation: lmToastOut 0.22s ease-in forwards;
}
.lm-toast-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #E7F2E9;
}
.lm-toast-body {
    flex: 1 1 auto;
    min-width: 0;
}
.lm-toast-title {
    margin: 0 0 3px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(236, 253, 245, 0.82);
}
.lm-toast-msg {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
}
.lm-toast-msg code {
    color: #E7F2E9;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.84em;
}
.lm-toast-msg a {
    color: #B9D3C3;
    font-weight: 700;
    text-decoration: underline;
}
.lm-toast--error .lm-toast-msg a,
.lm-toast--warn .lm-toast-msg a,
.lm-toast--info .lm-toast-msg a {
    color: #fff;
}
.lm-toast-close {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 2px 4px;
}
.lm-toast-close:hover { color: #fff; }
@keyframes lmToastIn {
    from { opacity: 0; transform: translateY(-10px) translateX(8px); }
    to { opacity: 1; transform: translateY(0) translateX(0); }
}
@keyframes lmToastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-8px); }
}
@media (max-width: 560px) {
    .lm-toast-host { left: 16px; right: 16px; top: 16px; max-width: none; }
}
/* One shared stack: every success / error / warning toast lands here, aligned and stacked */
#qc-toast-stack {
    position: fixed; top: 22px; right: 22px; z-index: 10050; display: flex; flex-direction: column; gap: 10px;
    pointer-events: none; width: min(420px, calc(100vw - 32px));
}
#qc-toast-stack .lm-toast { pointer-events: auto; }
@media (max-width: 560px) { #qc-toast-stack { left: 16px; right: 16px; top: 16px; width: auto; } }
