.notification-bell {
    position: relative;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    margin-right: 10px;
    color: var(--accent, #223a5e);
    background: #fffdfb;
    border: 1px solid var(--border-strong, rgba(34, 58, 94, 0.18));
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(31, 36, 48, 0.04);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.notification-bell:hover {
    color: var(--accent, #223a5e);
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(31, 36, 48, 0.08);
    text-decoration: none;
    transform: translateY(-1px);
}

.notification-bell svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notification-unread-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 10px;
    height: 10px;
    background: #d33c32;
    border: 2px solid #fffdfb;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(154, 31, 25, 0.08);
}

.notification-unread-dot[hidden] {
    display: none;
}

body.notification-modal-open {
    overflow: hidden;
}

.notification-standalone-page {
    min-height: 100vh;
    margin: 0;
    color: #1f2430;
    background:
        radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.78), transparent 34%),
        linear-gradient(135deg, #f3eee7 0%, #f8f5f0 52%, #eee8df 100%);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.notification-overlay,
.notification-overlay * {
    box-sizing: border-box;
}

.notification-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(18, 25, 36, 0.42);
    backdrop-filter: blur(5px);
    animation: notification-overlay-in 0.16s ease-out;
}

.notification-panel {
    display: flex;
    flex-direction: column;
    width: min(760px, 100%);
    max-height: min(720px, calc(100vh - 48px));
    overflow: hidden;
    color: #1f2430;
    background: #fffdf9;
    border: 1px solid rgba(48, 52, 64, 0.12);
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(17, 24, 36, 0.24);
    outline: none;
    animation: notification-panel-in 0.18s ease-out;
}

.notification-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid rgba(48, 52, 64, 0.10);
}

.notification-panel-head h1 {
    margin: 0;
    color: #162846;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.notification-panel-close {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    color: #223a5e;
    background: #f5f1eb;
    border: 1px solid rgba(34, 58, 94, 0.14);
    border-radius: 50%;
    text-decoration: none;
    transition: background 0.16s ease, transform 0.16s ease;
}

.notification-panel-close:hover {
    color: #162846;
    background: #ece6de;
    text-decoration: none;
    transform: rotate(3deg);
}

.notification-panel-close:focus-visible,
.notification-action-button:focus-visible,
.notification-selector input:focus-visible {
    outline: 3px solid rgba(34, 58, 94, 0.24);
    outline-offset: 2px;
}

.notification-panel-close svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.notification-panel-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 24px;
    background: #faf7f2;
    border-bottom: 1px solid rgba(48, 52, 64, 0.10);
}

.notification-action-button {
    min-height: 38px;
    padding: 8px 14px;
    color: #fff;
    background: #223a5e;
    border: 1px solid #223a5e;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.notification-action-button.secondary {
    color: #223a5e;
    background: #fffdf9;
    border-color: rgba(34, 58, 94, 0.24);
}

.notification-action-button:hover:not(:disabled) {
    filter: brightness(1.06);
}

.notification-action-button:disabled {
    opacity: 0.48;
    cursor: default;
}

.notification-panel-error {
    margin: 0;
    padding: 10px 24px;
    color: #9a2822;
    background: #fbecea;
    border-bottom: 1px solid #f0cfcb;
    font-size: 13px;
    font-weight: 700;
}

.notification-list {
    display: grid;
    min-height: 0;
    overflow-y: auto;
}

.notification-item {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 14px;
    padding: 20px 24px;
    background: #fffdf9;
    border-bottom: 1px solid rgba(48, 52, 64, 0.10);
}

.notification-item:last-child {
    border-bottom: 0;
}

.notification-item.unread {
    background: #f2f5f9;
}

.notification-selector {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2px;
}

.notification-selector input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #223a5e;
    cursor: pointer;
}

.notification-selector input:disabled {
    opacity: 0.42;
    cursor: default;
}

.notification-content {
    min-width: 0;
}

.notification-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 7px;
    color: #696969;
    font-size: 13px;
    font-weight: 700;
}

.new-label {
    padding: 3px 7px;
    color: #9a2822;
    background: #f8e5e2;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.notification-message {
    margin: 0;
    color: #1f2430;
    font-size: 15px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.notification-empty {
    margin: 0;
    padding: 46px 24px;
    color: #696969;
    text-align: center;
}

@keyframes notification-overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes notification-panel-in {
    from { opacity: 0; transform: translateY(8px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 600px) {
    .notification-bell {
        width: 38px;
        height: 38px;
        margin-right: 8px;
    }

    .notification-overlay {
        align-items: end;
        padding: 0;
    }

    .notification-panel {
        width: 100%;
        max-height: 92vh;
        border-radius: 20px 20px 0 0;
    }

    .notification-panel-head {
        padding: 18px 18px 15px;
    }

    .notification-panel-actions {
        padding: 12px 18px;
    }

    .notification-action-button {
        flex: 1 1 auto;
    }

    .notification-item {
        padding: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .notification-overlay,
    .notification-panel {
        animation: none;
    }
}
