/* ========================================
   ИИ-ЧАТ: ПОЛНАЯ СТИЛИЗАЦИЯ
   ======================================== */

/* Контейнер сообщений */
#aiChatMessages {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem !important;
}

/* ========================================
   БАЗОВЫЕ СООБЩЕНИЯ
   ======================================== */

.ai-message-bubble {
    animation: fadeInUp 0.3s ease-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease;
}

.ai-message-bubble:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Сообщение пользователя */
.mb-3.text-end .ai-message-bubble {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%) !important;
    color: white !important;
    border: none !important;
}

/* Сообщение ИИ */
.mb-3:not(.text-end) .ai-message-bubble {
    background: white !important;
    border: 1px solid #dee2e6 !important;
}

/* ========================================
   КОНТЕНТ СООБЩЕНИЙ
   ======================================== */

.ai-message-content {
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 0.95rem;
}

.ai-message-content > *:first-child {
    margin-top: 0;
}

.ai-message-content > *:last-child {
    margin-bottom: 0;
}

/* Абзацы */
.ai-message-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.ai-message-content p:last-child {
    margin-bottom: 0;
}

/* ========================================
   ЗАГОЛОВКИ
   ======================================== */

.ai-message-content h1,
.ai-message-content h2,
.ai-message-content h3,
.ai-message-content h4,
.ai-message-content h5,
.ai-message-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    color: #212529;
}

.ai-message-content h1 {
    font-size: 1.6rem;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 0.5rem;
}

.ai-message-content h2 {
    font-size: 1.4rem;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.4rem;
}

.ai-message-content h3 {
    font-size: 1.25rem;
    color: #0d6efd;
}

.ai-message-content h4 {
    font-size: 1.15rem;
}

.ai-message-content h5 {
    font-size: 1.05rem;
}

.ai-message-content h6 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   СПИСКИ
   ======================================== */

.ai-message-content ul,
.ai-message-content ol {
    margin-bottom: 1rem;
    padding-left: 1.75rem;
}

.ai-message-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.ai-message-content li:last-child {
    margin-bottom: 0;
}

.ai-message-content li > ul,
.ai-message-content li > ol {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Маркированные списки */
.ai-message-content ul {
    list-style-type: disc;
}

.ai-message-content ul ul {
    list-style-type: circle;
}

.ai-message-content ul ul ul {
    list-style-type: square;
}

/* ========================================
   ТАБЛИЦЫ (АДАПТИВНЫЕ)
   ======================================== */

.ai-message-content table {
    width: 100%;
    margin: 1rem 0;
    border-collapse: collapse;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.9rem;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Обёртка для горизонтальной прокрутки */
.ai-message-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.ai-message-content table thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
}

.ai-message-content table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border: 1px solid #dee2e6;
    white-space: nowrap;
}

.ai-message-content table td {
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    vertical-align: top;
}

.ai-message-content table tbody tr {
    transition: background-color 0.2s ease;
}

.ai-message-content table tbody tr:hover {
    background-color: #f8f9fa;
}

.ai-message-content table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.ai-message-content table tbody tr:nth-child(even):hover {
    background-color: #f0f2f4;
}

/* Выравнивание ячеек */
.ai-message-content table th[align="left"],
.ai-message-content table td[align="left"] {
    text-align: left;
}

.ai-message-content table th[align="center"],
.ai-message-content table td[align="center"] {
    text-align: center;
}

.ai-message-content table th[align="right"],
.ai-message-content table td[align="right"] {
    text-align: right;
}

/* ========================================
   КОД
   ======================================== */

/* Инлайн-код */
.ai-message-content code {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.875em;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    word-break: break-word;
}

/* Блоки кода */
.ai-message-content pre {
    background: #282c34;
    color: #abb2bf;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    font-size: 0.875rem;
    line-height: 1.6;
    border: 1px solid #3e4451;
}

.ai-message-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    word-break: normal;
}

/* ========================================
   ЦИТАТЫ
   ======================================== */

.ai-message-content blockquote {
    border-left: 4px solid #0d6efd;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    background: rgba(13, 110, 253, 0.05);
    border-radius: 0 8px 8px 0;
    color: #495057;
    font-style: italic;
}

.ai-message-content blockquote p {
    margin-bottom: 0.5rem;
}

.ai-message-content blockquote p:last-child {
    margin-bottom: 0;
}

/* ========================================
   РАЗДЕЛИТЕЛИ
   ======================================== */

.ai-message-content hr {
    border: none;
    border-top: 2px solid #dee2e6;
    margin: 1.5rem 0;
}

/* ========================================
   ССЫЛКИ
   ======================================== */

.ai-message-content a {
    color: #0d6efd;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.ai-message-content a:hover {
    border-bottom-color: #0d6efd;
    text-decoration: none;
}

/* ========================================
   ЖИРНЫЙ ТЕКСТ
   ======================================== */

.ai-message-content strong {
    font-weight: 600;
    color: #212529;
}

/* В сообщениях пользователя */
.mb-3.text-end .ai-message-content strong {
    color: white;
}

/* ========================================
   КУРСИВ
   ======================================== */

.ai-message-content em {
    font-style: italic;
    color: #6c757d;
}

/* ========================================
   ИЗОБРАЖЕНИЯ
   ======================================== */

.ai-message-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ========================================
   АНИМАЦИИ
   ======================================== */

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

/* ========================================
   АДАПТИВНОСТЬ
   ======================================== */

/* Мобильные устройства */
@media (max-width: 768px) {
    .ai-message-content {
        font-size: 0.9rem;
    }
    
    .ai-message-content table {
        font-size: 0.85rem;
    }
    
    .ai-message-content table th,
    .ai-message-content table td {
        padding: 0.5rem 0.75rem;
    }
    
    .ai-message-content h1 {
        font-size: 1.4rem;
    }
    
    .ai-message-content h2 {
        font-size: 1.25rem;
    }
    
    .ai-message-content h3 {
        font-size: 1.1rem;
    }
    
    .ai-message-content pre {
        font-size: 0.8rem;
        padding: 0.75rem;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .ai-message-content table {
        font-size: 0.8rem;
    }
    
    .ai-message-content table th,
    .ai-message-content table td {
        padding: 0.4rem 0.6rem;
    }
}

/* ========================================
   ПРИВЕТСТВЕННОЕ СООБЩЕНИЕ
   ======================================== */

#aiChatMessages .text-center.text-muted {
    background: white;
    border-radius: 12px;
    padding: 3rem 2rem !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#aiChatMessages .text-center.text-muted i {
    color: #0d6efd;
    opacity: 0.5;
}

/* ========================================
   ИНДИКАТОР ЗАГРУЗКИ
   ======================================== */

.ai-message-bubble .fa-spinner {
    color: #0d6efd;
}

.mb-3.text-end .ai-message-bubble .fa-spinner {
    color: white;
}

/* ========================================
   МОДАЛЬНОЕ ОКНО ИИ-ЧАТА — ПРЕМИУМ
   ======================================== */

/* Диалог */
.ai-modal-dialog {
    max-width: 720px;
}

@media (max-width: 991px) {
    .ai-modal-dialog {
        max-width: 100%;
        margin: 0;
        height: 100vh;
        max-height: 100vh;
    }
    
    .ai-modal-content {
        height: 100vh;
        border-radius: 0 !important;
    }
}

/* Контент */
.ai-modal-content {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    background: #fff;
}

/* Шапка */
.ai-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.ai-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.ai-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    flex-shrink: 0;
}

.ai-status-line {
    align-items: flex-start;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-top: 2px;
}

.ai-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.95);
}

.ai-status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
    animation: statusPulse 2s ease-in-out infinite;
}

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

.ai-status-separator {
    color: rgba(255, 255, 255, 0.3);
}

.ai-header-btn {
    border-radius: 10px;
    padding: 0.35rem 0.6rem;
    font-size: 0.9rem;
    z-index: 999;
}

/* Панель информации */
.ai-info-panel {
    background: linear-gradient(180deg, #f8f9ff 0%, #ffffff 100%);
    border-bottom: 1px solid #e5e7eb;
    animation: slideDown 0.3s ease-out;
}

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

.ai-info-content {
    padding: 1.25rem;
}

.ai-info-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.875rem;
    display: flex;
    gap: 0.75rem;
    height: 100%;
    transition: all 0.2s ease;
}

.ai-info-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.ai-info-card i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Контейнер сообщений */
.ai-messages {
    height: 60vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #f8f9ff 0%, #ffffff 100%);
    padding: 1.5rem;
    scroll-behavior: smooth;
}

@media (max-width: 991px) {
    .ai-messages {
        height: calc(100vh - 260px);
    }
}

.ai-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-messages::-webkit-scrollbar-track {
    background: transparent;
}

.ai-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.ai-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Приветствие */
.ai-welcome {
    text-align: center;
    padding: 2rem 1rem;
    animation: fadeInUp 0.5s ease-out;
}

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

.ai-welcome-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Быстрые вопросы */
.ai-quick-section {
    max-width: 500px;
    margin: 0 auto;
}

.ai-quick-section .ls-1 {
    letter-spacing: 1px;
    font-size: 0.7rem;
}

.ai-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
}

@media (max-width: 575px) {
    .ai-quick-grid {
        grid-template-columns: 1fr;
    }
}

.ai-quick-btn {
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-align: left;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
}

.ai-quick-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.ai-quick-btn i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.ai-quick-btn span {
    line-height: 1.3;
}

/* Сообщения */
.ai-message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    animation: messageIn 0.3s ease-out;
}

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

.ai-message.user {
    flex-direction: row-reverse;
}

.ai-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.ai-message.assistant .ai-message-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ai-message.user .ai-message-avatar {
    background: #e0e7ff;
    color: #4f46e5;
}

.ai-message-bubble {
    max-width: 75%;
    padding: 0.875rem 1.125rem;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ai-message.assistant .ai-message-bubble {
    background: white;
    border: 1px solid #e5e7eb;
    border-top-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ai-message.user .ai-message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-top-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.ai-message-time {
    font-size: 0.7rem;
    color: #000;
    margin-top: 0.375rem;
    display: block;
}

.ai-message.user .ai-message-time {
    text-align: right;
    color: rgba(0, 0, 0, 0.7);
}

/* Дисклеймер под ответом */
.ai-message-disclaimer {
    margin-top: 0.75rem;
    padding-top: 0.625rem;
    border-top: 1px dashed #e5e7eb;
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
}

.ai-message-disclaimer i {
    color: #f59e0b;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Индикатор набора */
.ai-typing {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.ai-typing-bubble {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    border-top-left-radius: 4px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ai-typing-dot {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.ai-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-8px); opacity: 1; }
}

/* Футер */
.ai-footer {
    background: white;
}

.ai-input-wrapper {
    position: relative;
    flex-grow: 1;
}

.ai-input {
    border: 2px solid #e5e7eb !important;
    border-radius: 16px !important;
    padding: 0.75rem 1rem !important;
    padding-right: 1rem !important;
    font-size: 0.95rem;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    transition: all 0.2s ease;
    line-height: 1.5;
}

.ai-input:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1) !important;
}

.ai-input-meta {
display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.375rem;
    padding: 0 0.25rem;
    font-size: 0.7rem;
    color: #9ca3af;
    flex-direction: column;
}

.ai-input-counter {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.ai-input-counter.warning {
    color: #ef4444;
}

.ai-input-hint {
    font-size: 0.7rem;
}

@media (max-width: 575px) {
    .ai-input-hint {
        display: none;
    }
}

.ai-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.ai-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ai-send-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.ai-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1.5px solid #e5e7eb !important;
    transition: all 0.2s ease;
}

.ai-action-btn:hover {
    border-color: #ef4444 !important;
    color: #ef4444;
    background: #fef2f2;
}

.ai-footer-legal {
    font-size: 0.75rem;
}

/* Адаптивность сообщений */
@media (max-width: 575px) {
    .ai-message-bubble {
        max-width: 85%;
    }
    
    .ai-messages {
        padding: 1rem;
    }
    
    .ai-welcome {
        padding: 1.5rem 0.5rem;
    }
    
    .ai-welcome-icon {
        width: 64px;
        height: 64px;
        font-size: 1.8rem;
    }
}

/* Утилиты */
.btn-close-sm {
    font-size: 0.7rem;
    padding: 0.5rem;
}

/* Тёмная тема для кода в ответах */
.ai-message-content pre {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border-radius: 10px;
    padding: 1rem;
    margin: 0.75rem 0;
    overflow-x: auto;
    font-size: 0.85rem;
}

.ai-message-content code {
    background: rgba(102, 126, 234, 0.1);
    color: #4f46e5;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.875em;
}

.ai-message-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}
/* Список источников */
.ai-sources-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ai-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #374151;
    transition: all 0.2s ease;
}

.ai-source-badge:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.ai-source-badge i {
    font-size: 0.9rem;
}

.ai-source-badge.video { border-color: #dbeafe; color: #1e40af; }
.ai-source-badge.video i { color: #3b82f6; }

.ai-source-badge.pdf { border-color: #fee2e2; color: #991b1b; }
.ai-source-badge.pdf i { color: #ef4444; }

.ai-source-badge.docx { border-color: #dbeafe; color: #1e3a8a; }
.ai-source-badge.docx i { color: #2563eb; }

.ai-source-badge.txt { border-color: #f3f4f6; color: #374151; }
.ai-source-badge.txt i { color: #6b7280; }


/* ========================================
   ПАНЕЛЬ ЗНАНИЙ (в шапке модалки)
   ======================================== */

.ai-knowledge-bar {
    background: linear-gradient(180deg, #f8f9ff 0%, #ffffff 100%);
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ai-knowledge-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.ai-knowledge-label i {
    color: #667eea;
    font-size: 0.9rem;
}

.ai-knowledge-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

/* Бейджи источников */
.ai-knowledge-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.ai-knowledge-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.ai-knowledge-item i {
    font-size: 0.85rem;
}

/* Цвета по типам */
.ai-knowledge-item.video {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}
.ai-knowledge-item.video i { color: #3b82f6; }

.ai-knowledge-item.pdf {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}
.ai-knowledge-item.pdf i { color: #ef4444; }

.ai-knowledge-item.docx {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e3a8a;
}
.ai-knowledge-item.docx i { color: #2563eb; }

.ai-knowledge-item.txt {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #374151;
}
.ai-knowledge-item.txt i { color: #6b7280; }

/* Адаптивность */
@media (max-width: 575px) {
    .ai-knowledge-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .ai-knowledge-items {
        width: 100%;
    }
}