/**
 * Notification Center - Future Is Now
 * Centro notifiche real-time per il CEO
 */

/* ===== NOTIFICATION BELL ===== */
.notification-bell {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.notification-bell:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notification-bell-icon {
    font-size: 24px;
    color: white;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: notif-pulse 2s infinite;
}

.notification-badge.hidden {
    display: none;
}

@keyframes notif-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== NOTIFICATION PANEL ===== */
.notification-panel {
    position: absolute;
    top: 100%;
    right: 0;
    width: 380px;
    max-height: 500px;
    background: #1f2937;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    margin-top: 8px;
}

.notification-panel.open {
    display: flex;
    animation: notif-slideDown 0.2s ease;
}

@keyframes notif-slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== PANEL HEADER ===== */
.notification-header {
    padding: 16px 20px;
    background: #111827;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #374151;
}

.notification-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.notification-header-actions {
    display: flex;
    gap: 8px;
}

.notification-header-btn {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.notification-header-btn:hover {
    background: #374151;
    color: white;
}

/* ===== NOTIFICATION LIST ===== */
.notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 3px;
}

/* ===== NOTIFICATION ITEM ===== */
.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid #374151;
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #374151;
}

.notification-item.unread {
    background: rgba(102, 126, 234, 0.1);
    border-left: 3px solid #667eea;
}

.notification-item.unread:hover {
    background: rgba(102, 126, 234, 0.15);
}

/* Icon */
.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.notification-icon.info { background: #3b82f6; }
.notification-icon.success { background: #10b981; }
.notification-icon.warning { background: #f59e0b; }
.notification-icon.error { background: #ef4444; }
.notification-icon.task { background: #8b5cf6; }
.notification-icon.quote { background: #06b6d4; }
.notification-icon.discovery { background: #ec4899; }
.notification-icon.kpi { background: #667eea; }

/* Content */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 14px;
    font-weight: 500;
    color: #f3f4f6;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-message {
    font-size: 13px;
    color: #9ca3af;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 11px;
    color: #6b7280;
    margin-top: 6px;
}

/* Actions */
.notification-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.notification-item:hover .notification-actions {
    opacity: 1;
}

.notification-action-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.notification-action-btn:hover {
    background: #4b5563;
    color: white;
}

/* ===== EMPTY STATE ===== */
.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
}

.notification-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.notification-empty h4 {
    margin: 0 0 8px;
    color: #9ca3af;
    font-size: 16px;
}

.notification-empty p {
    margin: 0;
    font-size: 13px;
}

/* ===== FOOTER ===== */
.notification-footer {
    padding: 12px 20px;
    background: #111827;
    border-top: 1px solid #374151;
    text-align: center;
}

.notification-footer a {
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.notification-footer a:hover {
    text-decoration: underline;
}

/* ===== TOAST NOTIFICATIONS ===== */
.notification-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: #1f2937;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    min-width: 300px;
    max-width: 400px;
    animation: toast-slideIn 0.3s ease;
    border-left: 4px solid #667eea;
}

.notification-toast.info { border-left-color: #3b82f6; }
.notification-toast.success { border-left-color: #10b981; }
.notification-toast.warning { border-left-color: #f59e0b; }
.notification-toast.error { border-left-color: #ef4444; }

@keyframes toast-slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-toast.removing {
    animation: toast-slideOut 0.3s ease forwards;
}

@keyframes toast-slideOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.notification-toast-icon {
    font-size: 20px;
}

.notification-toast-content {
    flex: 1;
}

.notification-toast-title {
    font-size: 14px;
    font-weight: 600;
    color: #f3f4f6;
    margin-bottom: 2px;
}

.notification-toast-message {
    font-size: 13px;
    color: #9ca3af;
}

.notification-toast-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    line-height: 1;
}

.notification-toast-close:hover {
    color: white;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .notification-panel {
        position: fixed;
        top: 60px;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: calc(100vh - 80px);
    }

    .notification-toast-container {
        left: 10px;
        right: 10px;
    }

    .notification-toast {
        min-width: auto;
    }
}
