.app-notification-host {
    display: grid;
    gap: 0.55rem;
    max-width: min(420px, calc(100vw - 2rem));
    position: fixed;
    right: 1rem;
    top: 5.25rem;
    width: 420px;
    z-index: 1100;
}

.app-notification {
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #d9e2ef;
    border-left: 4px solid #2f6df6;
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.72);
    color: #142f52;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: 28px minmax(0, 1fr) 24px;
    min-height: 54px;
    padding: 0.7rem 0.75rem;
}

.app-notification__icon {
    align-items: center;
    align-self: flex-start;
    background: #eaf2ff;
    border-radius: 999px;
    color: #1d4ed8;
    display: inline-flex;
    font-size: 0.68rem;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    line-height: 1;
    width: 28px;
}

.app-notification__content {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.app-notification__title {
    color: #0f2945;
    font-size: 0.86rem;
    line-height: 1.25;
}

.app-notification__message {
    color: #334155;
    font-size: 0.88rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.app-notification__close {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    font-size: 1.1rem;
    height: 24px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 24px;
}

.app-notification__close:hover {
    background: #eef4fb;
    color: #142f52;
}

.app-notification--success {
    border-left-color: #16a34a;
}

.app-notification--success .app-notification__icon {
    background: #dcfce7;
    color: #166534;
}

.app-notification--error {
    border-left-color: #dc2626;
}

.app-notification--error .app-notification__icon {
    background: #fee2e2;
    color: #b91c1c;
}

.app-notification--warning {
    border-left-color: #f97316;
}

.app-notification--warning .app-notification__icon {
    background: #ffedd5;
    color: #c2410c;
}

html.theme-dark .app-notification,
body.theme-dark .app-notification {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 38px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(148, 163, 184, 0.08);
    color: #e2e8f0;
}

html.theme-dark .app-notification__title,
body.theme-dark .app-notification__title {
    color: #f8fafc;
}

html.theme-dark .app-notification__message,
body.theme-dark .app-notification__message {
    color: #cbd5e1;
}

html.theme-dark .app-notification__close,
body.theme-dark .app-notification__close {
    color: #94a3b8;
}

html.theme-dark .app-notification__close:hover,
body.theme-dark .app-notification__close:hover {
    background: rgba(148, 163, 184, 0.12);
    color: #f8fafc;
}

@media (max-width: 720px) {
    .app-notification-host {
        left: 0.75rem;
        max-width: none;
        right: 0.75rem;
        top: 4.25rem;
        width: auto;
    }
}
