/* سیستم نوتیفیکیشن حرفه‌ای و کاملاً رسپانسیو */
:root {
    --notification-primary: #2563eb;
    --notification-secondary: #8b5cf6;
    --notification-success: #10b981;
    --notification-warning: #f59e0b;
    --notification-danger: #ef4444;
    --notification-info: #06b6d4;
    --notification-bg: rgba(15, 23, 42, 0.98);
    --notification-border: rgba(255, 255, 255, 0.2);
    --notification-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    --notification-glass: rgba(255, 255, 255, 0.1);
}

/* 📱 کانتینر نوتیفیکیشن */
.notification-container {
    position: relative;
    display: inline-block;
}

/* 🔔 آیکون نوتیفیکیشن */
.notification-icon {
    position: relative;
    width: 44px;
    height: 44px;
    background: var(--notification-glass);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--notification-border);
    backdrop-filter: blur(10px);
}

.notification-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.notification-icon:active {
    transform: translateY(0);
}

.notification-icon i {
    font-size: 1.2rem;
    color: #e2e8f0;
    transition: all 0.3s ease;
}

.notification-icon:hover i {
    color: white;
    transform: scale(1.1);
}

/* 🔴 بدج کانتر */
.notification-badge {
    position: absolute;
    top: -6px;
    left: -6px;
    background: linear-gradient(135deg, var(--notification-danger), #dc2626);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulseBadge 2s ease-in-out infinite;
    border: 2px solid var(--notification-bg);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    z-index: 1;
}

/* 🎯 پاپ‌آپ نوتیفیکیشن */
.notification-popup {
    position: absolute;
    top: 100%;
    left: 0;
    width: 380px;
    max-height: 80vh;
    background: var(--notification-bg);
    backdrop-filter: blur(30px);
    border: 1px solid var(--notification-border);
    border-radius: 16px;
    box-shadow: var(--notification-shadow);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 8px;
}

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

/* 📝 هدر پاپ‌آپ */
.notification-header {
    padding: 20px;
    border-bottom: 1px solid var(--notification-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px 16px 0 0;
}

.notification-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

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

.notification-action-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-action-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* 📋 لیست نوتیفیکیشن‌ها */
.notification-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

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

.notification-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    margin: 4px;
}

.notification-list::-webkit-scrollbar-thumb {
    background: var(--notification-primary);
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: var(--notification-secondary);
}

/* 📨 آیتم نوتیفیکیشن */
.notification-item {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: transparent;
}

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

.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
    background: rgba(37, 99, 235, 0.08);
    border-right: 3px solid var(--notification-primary);
}

.notification-item.unread:hover {
    background: rgba(37, 99, 235, 0.12);
}

.notification-item-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notification-icon-small {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
    margin-top: 2px;
}

.notification-icon-small.system { background: rgba(37, 99, 235, 0.2); color: var(--notification-primary); }
.notification-icon-small.email { background: rgba(16, 185, 129, 0.2); color: var(--notification-success); }
.notification-icon-small.sms { background: rgba(245, 158, 11, 0.2); color: var(--notification-warning); }
.notification-icon-small.push { background: rgba(139, 92, 246, 0.2); color: var(--notification-secondary); }
.notification-icon-small.in_app { background: rgba(6, 182, 212, 0.2); color: var(--notification-info); }

.notification-details {
    flex: 1;
    min-width: 0;
}

.notification-item-title {
    font-weight: 600;
    color: white;
    margin-bottom: 6px;
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-item-message {
    color: #94a3b8;
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #64748b;
}

.notification-time {
    font-size: 0.7rem;
    direction: ltr;
    display: inline-block;
}

.notification-priority {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notification-priority.high { background: rgba(239, 68, 68, 0.2); color: var(--notification-danger); }
.notification-priority.medium { background: rgba(245, 158, 11, 0.2); color: var(--notification-warning); }
.notification-priority.low { background: rgba(100, 116, 139, 0.2); color: #64748b; }

/* 🔼 ایکس‌مارک برای خوانده شده */
.notification-read-indicator {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--notification-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification-item.unread .notification-read-indicator {
    opacity: 1;
    animation: pulseDot 2s ease-in-out infinite;
}

/* 🦶 فوتر نوتیفیکیشن */
.notification-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--notification-border);
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0 0 16px 16px;
}

.notification-view-all {
    background: transparent;
    border: 1px solid var(--notification-border);
    color: #94a3b8;
    padding: 10px 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    width: 100%;
    font-weight: 500;
}

.notification-view-all:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-color: var(--notification-primary);
    transform: translateY(-1px);
}

/* 📱 نوتیفیکیشن خالی */
.notification-empty {
    padding: 50px 20px;
    text-align: center;
    color: #64748b;
    display: none;
}

.notification-empty i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.notification-empty p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.notification-empty.show {
    display: block;
}

/* ✨ انیمیشن‌ها */
@keyframes pulseBadge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

@keyframes slideInNotification {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-item {
    animation: slideInNotification 0.25s ease;
}

/* 🎨 تم‌های مختلف برای انواع نوتیفیکیشن */
.notification-item.urgent {
    border-right: 3px solid var(--notification-danger);
    background: rgba(239, 68, 68, 0.08);
}

.notification-item.success {
    border-right: 3px solid var(--notification-success);
    background: rgba(16, 185, 129, 0.08);
}

.notification-item.warning {
    border-right: 3px solid var(--notification-warning);
    background: rgba(245, 158, 11, 0.08);
}

.notification-item.info {
    border-right: 3px solid var(--notification-info);
    background: rgba(6, 182, 212, 0.08);
}

/* 📱 رسپانسیو - تبلت */
@media (max-width: 1024px) {
    .notification-popup {
        width: 360px;
    }

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

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

/* 📱 رسپانسیو - موبایل بزرگ */
@media (max-width: 768px) {
    .notification-popup {
        position: fixed;
        top: 70px;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: calc(100vh - 100px);
        margin-top: 0;
    }

    .notification-container {
        margin-left: 8px;
    }

    .notification-icon {
        width: 40px;
        height: 40px;
    }

    .notification-icon i {
        font-size: 1.1rem;
    }

    .notification-badge {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
        top: -5px;
        left: -5px;
    }
}

/* 📱 رسپانسیو - موبایل کوچک */
@media (max-width: 480px) {
    .notification-popup {
        left: 8px;
        right: 8px;
        border-radius: 12px;
    }

    .notification-header {
        padding: 14px;
    }

    .notification-title {
        font-size: 1rem;
    }

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

    .notification-item-content {
        gap: 10px;
    }

    .notification-icon-small {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .notification-item-title {
        font-size: 0.85rem;
    }

    .notification-item-message {
        font-size: 0.75rem;
    }

    .notification-footer {
        padding: 14px;
    }

    .notification-view-all {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .notification-empty {
        padding: 40px 20px;
    }

    .notification-empty i {
        font-size: 2.5rem;
    }
}

/* 📱 رسپانسیو - موبایل خیلی کوچک */
@media (max-width: 360px) {
    .notification-popup {
        left: 5px;
        right: 5px;
    }

    .notification-item {
        padding: 10px 12px;
    }

    .notification-item-content {
        gap: 8px;
    }

    .notification-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .notification-priority {
        align-self: flex-start;
    }
}

/* 🎯 وضعیت‌های خاص */
.notification-list:empty + .notification-empty {
    display: block;
}

.notification-list:not(:empty) + .notification-empty {
    display: none;
}

/* 🔧 بهبود‌های تعاملی */
.notification-item:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

.notification-action-btn:active {
    transform: scale(0.9);
}

/* 🌙 پشتیبانی از حالت تاریک/روشن */
@media (prefers-color-scheme: light) {
    .notification-popup {
        --notification-bg: rgba(255, 255, 255, 0.98);
        --notification-border: rgba(0, 0, 0, 0.1);
        --notification-glass: rgba(0, 0, 0, 0.05);
    }

    .notification-item-title,
    .notification-title {
        color: #1e293b;
    }

    .notification-item-message {
        color: #64748b;
    }

    .notification-icon {
        background: var(--notification-glass);
    }

    .notification-icon i {
        color: #64748b;
    }
}

/* ♿ بهبود دسترسی */
.notification-icon:focus {
    outline: 2px solid var(--notification-primary);
    outline-offset: 2px;
}

.notification-action-btn:focus,
.notification-view-all:focus {
    outline: 2px solid var(--notification-primary);
    outline-offset: 1px;
}

.notification-item:focus {
    outline: 2px solid var(--notification-primary);
    outline-offset: -2px;
}
.notification-item {
    transition: all 0.3s ease;
    transform: translateX(0);
    opacity: 1;
}

.notification-item.removing {
    opacity: 0;
    transform: translateX(-20px);
}

/* انیمیشن برای حذف تدریجی */
@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

.notification-item.slide-out {
    animation: slideOut 0.3s ease forwards;
}
.notification-footer-btn.secondary {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.notification-footer-btn.secondary:hover {
    background: rgba(100, 116, 139, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(100, 116, 139, 0.3);
}
/* در notifications.css */
.notification-empty {
    padding: 50px 20px;
    text-align: center;
    color: #64748b;
    display: none; /* ابتدا مخفی */
}

.notification-empty i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.notification-empty p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.notification-empty small {
    font-size: 0.8rem;
    opacity: 0.7;
}

.notification-empty.show {
    display: block;
}
/* اضافه کردن به notifications.css */
/* 📱 رسپانسیو - موبایل بزرگ */
@media (max-width: 768px) {
    .notification-popup {
        position: fixed;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%) scale(0.95) !important;
        width: 95vw !important;
        max-width: 400px !important;
        max-height: 80vh !important;
        margin-top: 0 !important;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .notification-popup.show {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, -50%) scale(1) !important;
    }

    .notification-list {
        max-height: 50vh !important;
        overflow-y: auto;
    }

    .notification-container {
        margin-left: 8px;
    }

    .notification-icon {
        width: 40px;
        height: 40px;
    }

    .notification-icon i {
        font-size: 1.1rem;
    }

    .notification-badge {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
        top: -5px;
        left: -5px;
    }

    /* بهبود اسکرول در موبایل */
    .notification-list {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    /* حاشیه داخلی برای بهتر دیده شدن */
    .notification-popup {
        border: 2px solid rgba(255, 255, 255, 0.1);
    }
}

/* 📱 رسپانسیو - موبایل کوچک */
@media (max-width: 480px) {
    .notification-popup {
        width: 92vw !important;
        max-width: 350px !important;
        border-radius: 16px;
    }

    .notification-header {
        padding: 16px;
    }

    .notification-title {
        font-size: 1rem;
    }

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

    .notification-item-content {
        gap: 12px;
    }

    .notification-icon-small {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .notification-item-title {
        font-size: 0.9rem;
    }

    .notification-item-message {
        font-size: 0.8rem;
    }

    .notification-footer {
        padding: 16px;
    }

    .notification-footer-actions {
        flex-direction: column;
        gap: 8px;
    }

    .notification-footer-btn {
        min-width: auto;
        width: 100%;
    }

    .notification-empty {
        padding: 40px 20px;
    }

    .notification-empty i {
        font-size: 2.5rem;
    }
}

/* بهبود empty state */
.notification-empty {
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
    display: none;
}

.notification-empty.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* مدیریت نمایش footer actions */
.notification-footer-actions:empty {
    display: none !important;
}

/* بهبود اسکرول بار */
.notification-list::-webkit-scrollbar {
    width: 4px;
}

.notification-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.notification-list::-webkit-scrollbar-thumb {
    background: var(--notification-primary);
    border-radius: 2px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: var(--notification-secondary);
}
/* اضافه کردن به notifications.css */
.empty-state-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 99, 235, 0.2);
    color: var(--notification-primary);
    border: 1px solid rgba(37, 99, 235, 0.3);
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: 16px;
}

.empty-state-btn:hover {
    background: rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
    color: var(--notification-primary);
}

.empty-state-btn i {
    font-size: 0.9rem;
}

/* بهبود empty state */
.notification-empty {
    padding: 50px 20px;
    text-align: center;
    color: #64748b;
    display: none;
}

.notification-empty.show {
    display: block;
}

.notification-empty i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.notification-empty p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.notification-empty small {
    font-size: 0.8rem;
    opacity: 0.7;
    display: block;
    margin-bottom: 16px;
}