/* Inbox de notificaciones — campana navbar + página. Alcance limitado a .erp-notif-* */

.erp-notif-bell {
    position: relative;
}

.erp-notif-bell > .nav-link,
.erp-notif-bell > a.nav-link {
    position: relative;
}

.erp-notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--danger-color, #E76F51);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    pointer-events: none;
}

.erp-notif-badge[hidden] {
    display: none !important;
}

.navbar .dropdown-menu.erp-notif-dropdown {
    width: 320px;
    max-width: min(320px, calc(100vw - 24px));
    min-width: 260px;
    padding: 0 !important;
    overflow: hidden;
}

.erp-notif-dropdown__header {
    padding: 0.75rem 1rem 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--secondary-color, #2C3E50);
    border-bottom: 1px solid var(--border-color, #E2E8F0);
}

.erp-notif-dropdown__list {
    max-height: 320px;
    overflow-y: auto;
}

.erp-notif-empty {
    padding: 1.25rem 1rem;
    text-align: center;
    color: var(--text-muted, #94A3B8);
    font-size: 0.85rem;
}

.erp-notif-item {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--border-color, #E2E8F0);
    padding: 0.7rem 1rem;
    cursor: pointer;
    color: var(--text-color, #2C3E50);
}

.erp-notif-item:hover,
.erp-notif-item:focus {
    background: var(--bg-color, #F5F5F1);
    outline: none;
}

.erp-notif-item--unread {
    background: color-mix(in srgb, var(--primary-color, #D4A373) 10%, #fff);
    font-weight: 600;
}

.erp-notif-item__title {
    font-size: 0.85rem;
    line-height: 1.3;
    margin-bottom: 0.15rem;
}

.erp-notif-item__message {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-muted, #94A3B8);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.erp-notif-item__meta {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted, #94A3B8);
    margin-top: 0.25rem;
}

.erp-notif-dropdown__footer {
    border-top: 1px solid var(--border-color, #E2E8F0);
    padding: 0.35rem 0;
}

.erp-notif-dropdown__footer .dropdown-item,
.erp-notif-dropdown__footer button.dropdown-item {
    font-size: 0.82rem;
    cursor: pointer;
    width: 100%;
    background: transparent;
    border: 0;
}

.erp-notif-page-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.erp-notif-page-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    border: 1px solid var(--border-color, #E2E8F0);
    border-radius: var(--radius-md, 12px);
    background: var(--card-bg, #fff);
    margin-bottom: 0.75rem;
}

.erp-notif-page-item--unread {
    box-shadow: inset 3px 0 0 var(--primary-color, #D4A373);
    background: color-mix(in srgb, var(--primary-color, #D4A373) 8%, #fff);
}

.erp-notif-page-item__title {
    font-size: 1rem;
    margin: 0 0 0.35rem;
}

.erp-notif-page-item__message {
    margin: 0 0 0.35rem;
    color: var(--text-color, #2C3E50);
    font-size: 0.9rem;
}

.erp-notif-page-item__meta {
    font-size: 0.75rem;
    color: var(--text-muted, #94A3B8);
}

.erp-notif-page-item__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.4rem;
}

.erp-user-nav-bell {
    display: inline-flex;
    align-items: center;
    margin-right: 0.5rem;
}

.erp-user-nav-bell .erp-notif-dropdown {
    right: 0;
    left: auto;
}
