/* ============================================
   ТЕМНАЯ ТЕМА ДЛЯ ПАНЕЛИ УВЕДОМЛЕНИЙ
   На основе прототипа AsistentBaza.tsx
   ============================================ */

/* ============================================
   NOTIFICATION PANEL - Выдвижная панель
   ============================================ */

.notification-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100vh;
    background: #0f172a;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid rgba(148, 163, 184, 0.15);
}

.notification-panel.open {
    right: 0;
}

/* Header панели */
.notification-panel-header {
    padding: 28px 32px;
    background: rgba(15, 23, 42, 0.5);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.notification-panel-title {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-panel-close {
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.notification-panel-close:hover {
    background: rgba(100, 116, 139, 0.2);
    color: #ffffff;
}

/* Body панели */
.notification-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Custom scrollbar */
.notification-panel-body::-webkit-scrollbar {
    width: 6px;
}

.notification-panel-body::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
}

.notification-panel-body::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 3px;
}

.notification-panel-body::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.3);
}

.notification-panel-empty {
    padding: 80px 20px;
    text-align: center;
    color: #64748b;
}

.notification-panel-empty-icon {
    font-size: 64px;
    margin-bottom: 15px;
    opacity: 0.3;
}

.notification-panel-empty-text {
    font-size: 15px;
}

/* Footer панели */
.notification-panel-footer {
    padding: 32px;
    background: rgba(15, 23, 42, 0.5);
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    text-align: center;
    flex-shrink: 0;
}

.notification-panel-link {
    display: block;
    width: 100%;
    padding: 16px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    transition: all 0.3s ease;
    border: 2px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
}

.notification-panel-link:hover {
    color: #6366f1;
    border-color: #6366f1;
}

/* ============================================
   NOTIFICATION ITEM - Элемент уведомления
   ============================================ */

.notification-item {
    padding: 20px;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    background: transparent;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.notification-item:last-child {
    margin-bottom: 0;
}

.notification-item:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
}

.notification-item.unread {
    border-color: rgba(99, 102, 241, 0.3);
}

.notification-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: rgba(100, 116, 139, 0.2);
    border: 1px solid rgba(100, 116, 139, 0.3);
    color: #64748b;
    transition: all 0.3s ease;
}

.notification-item:hover .notification-icon {
    background: #6366f1;
    color: #ffffff;
    border-color: rgba(99, 102, 241, 0.5);
}

.notification-icon.new-document {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.notification-icon.updated-document {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.notification-icon.manual-message {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

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

.notification-title {
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 6px;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-item:hover .notification-title {
    color: #a5b4fc;
}

.notification-message {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.7;
}

.notification-time {
    font-size: 10px;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* ============================================
   OVERLAY - Затемнение фона
   ============================================ */

.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification-overlay.show {
    display: block;
    opacity: 1;
}

/* ============================================
   NOTIFICATION MODAL - Модальное окно (светлое)
   ============================================ */

.notification-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification-modal-overlay.show {
    display: block;
    opacity: 1;
}

.notification-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    background: #ffffff;
    border-radius: 32px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    display: none;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
}

.notification-modal.show {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Header модального окна */
.notification-modal-header {
    padding: 32px 40px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-shrink: 0;
}

.notification-modal-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    flex: 1;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    max-width: 90%;
}

.notification-modal-close {
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.2s ease;
    margin-left: 16px;
    flex-shrink: 0;
}

.notification-modal-close:hover {
    background: #f1f5f9;
}

/* Body модального окна */
.notification-modal-body {
    padding: 40px;
    overflow-y: auto;
    flex: 1;
}

.notification-modal-message {
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 32px;
    font-weight: 500;
}

.notification-modal-meta {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 32px;
    background: #f8fafc;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
}

.notification-modal-meta-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.notification-modal-meta-item > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-modal-meta-label {
    font-weight: 800;
    color: #94a3b8;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.notification-modal-meta-value {
    color: #0f172a;
    font-weight: 700;
    font-size: 14px;
}

.notification-modal-meta-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    width: fit-content;
}

.notification-modal-meta-badge.priority {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.notification-modal-meta-badge.normal {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.notification-modal-meta-badge.acknowledged {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Footer модального окна */
.notification-modal-footer {
    padding: 32px 40px;
    background: rgba(248, 250, 252, 0.5);
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    flex-shrink: 0;
}

.notification-modal-btn {
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.notification-modal-btn-secondary {
    background: #ffffff;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.notification-modal-btn-secondary:hover {
    background: #f8fafc;
}

.notification-modal-btn-primary {
    background: #4caf50;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 15px -3px rgba(76, 175, 80, 0.2);
}

.notification-modal-btn-primary:hover {
    background: #43a047;
    box-shadow: 0 20px 25px -5px rgba(76, 175, 80, 0.3);
}

.notification-modal-btn-primary:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
}

/* Responsive */
@media (max-width: 768px) {
    .notification-panel {
        width: 100%;
        right: -100%;
    }
    
    .notification-modal {
        width: 95%;
        max-width: none;
        max-height: 90vh;
        border-radius: 24px;
    }
    
    .notification-modal-header {
        padding: 24px;
    }
    
    .notification-modal-body {
        padding: 24px;
    }
    
    .notification-modal-footer {
        padding: 20px 24px;
        flex-direction: column;
    }
    
    .notification-modal-btn {
        width: 100%;
        justify-content: center;
    }
    
    .notification-modal-meta-item {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
