/* ===========================
   NOTIFICATION DROPDOWN STYLES
   Design moderno e clean - Identidade visual branca
   =========================== */

/* Badge de notificações */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    z-index: 10;
    animation: badge-appear 0.3s ease;
}

.notification-badge.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes badge-appear {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

/* Container de notificações no header */
.notifications {
    position: relative;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notifications:hover {
    background: rgba(59, 130, 246, 0.08);
    transform: translateY(-1px);
}

.notifications .fa-bell {
    font-size: 20px;
    color: #6b7280;
    transition: all 0.3s ease;
}

.notifications:hover .fa-bell {
    color: #3b82f6;
}

/* Dropdown de notificações - Design moderno e clean */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 420px;
    max-width: 90vw;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.notification-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header do dropdown - Design clean e moderno */
.notification-dropdown-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
}

.notification-dropdown-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.02em;
}

.notification-dropdown-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-dropdown-actions .btn-icon {
    background: #f9fafb;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: #6b7280;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-dropdown-actions .btn-icon:hover {
    background: #3b82f6;
    color: white;
    transform: rotate(180deg);
}

.notification-dropdown-actions .btn-text {
    background: #f0f7ff;
    border: none;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 8px;
    color: #3b82f6;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.notification-dropdown-actions .btn-text:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Body do dropdown - Scroll clean e moderno */
.notification-dropdown-body {
    max-height: 450px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e5e7eb #ffffff;
    background: #ffffff;
}

.notification-dropdown-body::-webkit-scrollbar {
    width: 8px;
}

.notification-dropdown-body::-webkit-scrollbar-track {
    background: #ffffff;
}

.notification-dropdown-body::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 10px;
    border: 2px solid #ffffff;
}

.notification-dropdown-body::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

/* Item de notificação - Design clean e moderno */
.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 16px 24px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #ffffff;
}

.notification-item:hover {
    background: #f8f9fb;
    transform: translateX(4px);
}

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

.notification-item.unread {
    background: linear-gradient(to right, #eff6ff 0%, #ffffff 100%);
}

.notification-item.unread:hover {
    background: linear-gradient(to right, #dbeafe 0%, #f8f9fb 100%);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 0 10px 10px 0;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

/* Ícone da notificação - Design moderno com gradientes suaves */
.notification-item-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    font-size: 18px;
    transition: all 0.3s ease;
}

.notification-item:hover .notification-item-icon {
    transform: scale(1.05);
}

/* Ícones por tipo - Cores modernas e clean */
.notification-item.type-warning .notification-item-icon {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.notification-item.type-error .notification-item-icon {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.notification-item.type-info .notification-item-icon {
    background: linear-gradient(135deg, #eff6ff 0%, #bfdbfe 100%);
    color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.notification-item.type-success .notification-item-icon {
    background: linear-gradient(135deg, #f0fdf4 0%, #a7f3d0 100%);
    color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

/* Conteúdo da notificação */
.notification-item-content {
    flex: 1;
    min-width: 0;
}

.notification-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 4px;
    gap: 8px;
}

.notification-item-header strong {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.notification-item-time {
    font-size: 11px;
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
}

.notification-item-message {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Badge de prioridade */
.notification-item-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
}

.notification-item.priority-critical .notification-item-badge {
    background: #dc2626;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.5);
}

.notification-item.priority-high .notification-item-badge {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

/* Estados vazios e de loading - Design moderno */
.notification-empty,
.notification-loading,
.notification-error {
    padding: 70px 20px;
    text-align: center;
    color: #9ca3af;
    background: #ffffff;
}

.notification-empty i,
.notification-loading i,
.notification-error i {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.2;
    color: #d1d5db;
}

.notification-loading i {
    opacity: 1;
    color: #3b82f6;
}

.notification-empty p,
.notification-loading p,
.notification-error p {
    margin: 12px 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.01em;
}

.notification-empty small {
    font-size: 14px;
    color: #9ca3af;
    font-weight: 500;
}

/* Footer do dropdown - Design clean e moderno */
.notification-dropdown-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
    background: #ffffff;
}

.notification-dropdown-footer a {
    display: inline-block;
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.notification-dropdown-footer a:hover {
    background: #f0f7ff;
    color: #2563eb;
    transform: translateY(-1px);
}


/* Modal de todas as notificações */
#all-notifications-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

#all-notifications-modal.active {
    opacity: 1;
}

#all-notifications-modal .modal-content {
    background: #ffffff;
    width: 90vw;
    max-width: 800px;
    height: 85vh;
    max-height: 800px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    animation: scaleIn 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    to {
        transform: scale(1);
    }
}

#all-notifications-modal .modal-header {
    padding: 24px;
    background: linear-gradient(135deg, #111827 0%, #374151 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

#all-notifications-modal .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white !important;
}

#all-notifications-modal .modal-header h2 i {
    font-size: 1.2rem;
    opacity: 0.9;
}

#all-notifications-modal .close-modal {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

#all-notifications-modal .close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

#all-notifications-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: #ffffff;
}

.notifications-filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    padding-right: 20px;
    /* Space for scroll */
}

.notifications-filter-bar::-webkit-scrollbar {
    height: 4px;
}

.notifications-filter-bar::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 10px;
}

.filter-btn {
    padding: 10px 20px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #1f2937;
}

.filter-btn.active {
    background: #1f2937;
    color: white;
    border-color: #1f2937;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.all-notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.all-notifications-list .notification-item {
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    margin-bottom: 0;
    padding: 20px;
    transition: all 0.2s;
}

.all-notifications-list .notification-item:hover {
    border-color: #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

/* Responsividade - Mobile otimizado */
@media (max-width: 768px) {
    .notification-dropdown {
        width: 100vw;
        max-width: 100vw;
        right: -20px;
        border-radius: 0 0 16px 16px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    }

    .notification-dropdown-body {
        max-height: 60vh;
    }

    .notification-dropdown-header {
        padding: 16px 20px;
    }

    .notification-dropdown-actions .btn-text {
        font-size: 12px;
        padding: 6px 10px;
    }

    .notification-item {
        padding: 14px 20px;
    }

    .notification-item-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    #all-notifications-modal .modal-content {
        width: 100vw;
        height: 100vh;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }

    #all-notifications-modal .modal-header {
        padding: 16px 20px;
    }

    #all-notifications-modal .modal-header h2 {
        font-size: 1.2rem;
    }

    .notifications-filter-bar {
        padding-bottom: 12px;
        margin-bottom: 20px;
    }

    .filter-btn {
        font-size: 13px;
        padding: 8px 16px;
    }
}

/* Animações suaves */
.notification-item {
    animation: slide-in-notification 0.3s ease;
}

@keyframes slide-in-notification {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}