/* Shared floating notifications */
body .success-message,
body .alert-success,
body .error-message,
body .alert-error {
    position: fixed;
    z-index: 1000;
    top: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
    margin: 0;
    padding: 14px 18px;
    border: 1px solid #86efac;
    border-radius: 10px;
    background: #f0fdf4;
    color: #166534;
    box-shadow: 0 12px 28px rgba(22, 101, 52, 0.18);
    font-size: 14px;
    font-weight: 600;
    animation: notification-enter 220ms ease-out;
}

body .success-message::before,
body .alert-success::before,
body .error-message::before,
body .alert-error::before {
    content: "✓";
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    font-size: 12px;
}

body .success-message.notification-hiding,
body .alert-success.notification-hiding,
body .error-message.notification-hiding,
body .alert-error.notification-hiding {
    animation: notification-exit 250ms ease-in forwards;
}

body .error-message,
body .alert-error {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #b91c1c;
    box-shadow: 0 12px 28px rgba(185, 28, 28, 0.18);
}

body .error-message::before,
body .alert-error::before {
    content: "!";
    background: #dc2626;
}

body .alert-success > svg,
body .alert-error > svg {
    display: none;
}

@keyframes notification-enter {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes notification-exit {
    to { opacity: 0; transform: translateX(24px); }
}

@media (max-width: 480px) {
    body .success-message,
    body .alert-success,
    body .error-message,
    body .alert-error {
        top: 16px;
        right: 16px;
    }
}
