/* 顶栏站内消息：与 base_layout 顶栏工具区一致，Bento 下拉卡片 */

.top-header-btn-notifications {
    position: relative;
}

.erp-notifications-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    display: none;
}

.top-header-btn-notifications.has-unread .erp-notifications-badge {
    display: inline-block;
}

.erp-notifications-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(17, 24, 39, 0.08);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.erp-notifications-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.erp-notifications-panel {
    position: fixed;
    z-index: 1050;
    top: 56px;
    right: 16px;
    width: min(400px, calc(100vw - 24px));
    max-height: min(480px, calc(100vh - 72px));
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transform: translateY(-6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

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

.erp-notifications-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
}

.erp-notifications-panel__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.erp-notifications-panel__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.erp-notifications-read-all-btn {
    padding: 6px 12px;
    font-size: 12px;
}

.erp-notifications-panel__list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 0;
}

.erp-notifications-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.erp-notifications-item:hover {
    background: #f9fafb;
}

.erp-notifications-item.is-unread {
    background: #eff6ff;
}

.erp-notifications-item__meta {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.erp-notifications-item__title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.erp-notifications-item__body {
    font-size: 13px;
    color: #374151;
    line-height: 1.45;
    white-space: pre-wrap;
}

.erp-notifications-empty {
    padding: 32px 20px;
    text-align: center;
    font-size: 14px;
    color: #6b7280;
}

.erp-notifications-foot {
    padding: 10px 16px;
    border-top: 1px solid #f3f4f6;
    font-size: 12px;
    color: #9ca3af;
    flex-shrink: 0;
}
