:root {
    --notif-panel-bg: #ffffff;
    --notif-panel-border: #e9e9e9;
    --notif-panel-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

#notifications-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 0;
    background: transparent;
    color: #374151;
    cursor: pointer;
    transition: color 0.15s ease;
}

#notifications-bell:hover {
    color: #2563eb;
}

#notifications-bell .notifications-bell-icon {
    width: 18px;
    height: 18px;
}

#notifications-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 14px;
    height: 14px;
    padding: 0 4px;
    border-radius: 7px;
    background: #e14a3b;
    color: #ffffff;
    font-size: 10px;
    line-height: 14px;
    text-align: center;
}

.notifications-state {
    position: absolute;
    right: 4px;
    bottom: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid #ffffff;
    background: #b9b9b9;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    pointer-events: none;
}

.notifications-state--ok { background: #2f9b61; }
.notifications-state--warn { background: #e2a746; }
.notifications-state--off { background: #d65454; }
.notifications-state--pending { background: #5b8de8; }

.notifications-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    max-height: 420px;
    overflow: auto;
    background: var(--notif-panel-bg);
    border: 1px solid var(--notif-panel-border);
    border-radius: 12px;
    box-shadow: var(--notif-panel-shadow);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 6000;
    padding: 12px;
}

.notifications-panel.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.notifications-panel__title {
    padding: 0 2px 8px;
    font-weight: 600;
    font-size: 14px;
    color: #2b2b2b;
}

.notifications-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.notifications-panel__header .notifications-panel__title {
    padding: 0;
}

.notifications-panel__mark-all {
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    cursor: pointer;
}

.notifications-panel__mark-all:hover {
    color: #1d4ed8;
}

#notifications-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notifications__empty {
    padding: 12px;
    font-size: 13px;
    color: #7a7a7a;
    background: #fafafa;
    border: 1px dashed #e6e6e6;
    border-radius: 10px;
}

.notifications__hint {
    margin-bottom: 8px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.35;
    color: #6a5200;
    background: #fff7df;
    border: 1px solid #f1deb0;
    border-radius: 10px;
}

#notifications-list .notifications__item {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 4px;
    text-align: left;
    border: 1px solid #efefef;
    background: #ffffff;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

#notifications-list .notifications__item-title {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #2b2b2b;
    margin: 0;
    line-height: 1.25;
    white-space: normal;
}

#notifications-list .notifications__item-body {
    display: block;
    margin: 0;
    font-size: 12px;
    color: #5f5f5f;
    line-height: 1.35;
}

.notifications__item.is-read {
    opacity: 0.6;
}

.notifications-toasts {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 7000;
}

.notifications-toast {
    width: 300px;
    border: none;
    text-align: left;
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.notifications-toast.is-hide {
    opacity: 0;
    transform: translateY(6px);
}

.notifications-toast__title {
    font-weight: 700;
    font-size: 13px;
    color: #2b2b2b;
    margin-bottom: 4px;
}

.notifications-toast__body {
    font-size: 12px;
    color: #5f5f5f;
}

@media (max-width: 700px) {
    .notifications-panel {
        width: 280px;
        right: 8px;
    }

    .notifications-toasts {
        right: 12px;
        bottom: 12px;
    }

    .notifications-toast {
        width: 260px;
    }
}
