* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    background: #fef7ed;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 8px;
}

.assistant {
    width: 100%;
    height: 100%;
    background: white;
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(300px, 1fr) minmax(300px, 380px);
    gap: 1rem;
    padding: 1rem;
    border: none;
    box-shadow: none;
    overflow: hidden;
}

/* Добавляем стиль для модалки регистрации */
#authModal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.auth-form {
    background: white; padding: 2rem; border-radius: 1.5rem; border: 2px solid #f97316;
    display: flex; flex-direction: column; gap: 1rem; width: 320px;
}
.auth-form input {
    padding: 0.8rem; border: 1px solid #ffdec4; border-radius: 0.8rem; outline: none;
}
.auth-form button {
    background: #f97316; color: white; border: none; padding: 0.8rem; border-radius: 0.8rem; cursor: pointer; font-weight: bold;
}

/* Скрытые элементы */
#fileInput { display: none; }

/* ДЕСКТОП - элементы масштабируются */
@media (min-width: 1001px) {
    .assistant {
        grid-template-columns: minmax(240px, 280px) minmax(300px, 1fr) minmax(300px, 380px);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.fa-spin-custom {
    animation: spin 1.5s linear infinite;
}

/* МОБИЛЬНАЯ ВЕРСИЯ - вся страница прокручивается */
@media (max-width: 1000px) {
    html, body {
        overflow: auto;
        height: auto;
        min-height: 100%;
    }
    
    body {
        padding: 4px;
        display: block;
    }
    
    .assistant {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 100%;
        overflow: visible;
        padding: 0.8rem;
        gap: 1rem;
    }
    
    .left-panel,
    .center-panel,
    .right-panel {
        width: 100%;
        height: auto !important;
        min-height: auto;
        max-height: none;
    }
    
    .center-panel {
        min-height: 350px;
    }
    
    .right-panel {
        min-height: 400px;
    }
    
    .folder-list {
        max-height: 350px;
        overflow-y: auto;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .assistant {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .center-panel {
        min-height: 300px;
    }
    
    .right-panel {
        min-height: 350px;
    }
    
    .folder-list {
        max-height: 300px;
    }
}

/* ЛЕВАЯ КОЛОНКА */
.left-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 0 0.3rem 0;
    height: 100%;
    overflow: hidden;
}

.chat-header {
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 1.2rem 1.2rem 0.8rem 1.2rem;
    border: 2px solid #fee3c8;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-title i {
    color: #f97316;
    font-size: 1.4rem;
}

.chat-title h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d2a27;
    letter-spacing: -0.3px;
}

.chat-title span {
    color: #f97316;
}

.new-chat-btn {
    background: #fff3e6;
    padding: 0.6rem 1rem;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #f97316;
    border: 1px solid #ffba7a;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.9rem;
    width: fit-content;
}

.new-chat-btn i {
    font-size: 0.9rem;
}

.new-chat-btn:hover {
    background: #f97316;
    color: white;
}

.admin-card {
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 1.2rem;
    border: 2px solid #fee3c8;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem; /* Отступ от верхнего блока */
    width: 100%;
    box-sizing: border-box;
}

/* Заголовок внутри карточки */
.admin-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.admin-title i {
    color: #f97316;
    font-size: 1.1rem;
}

.admin-title span {
    font-size: 1rem;
    font-weight: 700;
    color: #2d2a27;
}

/* Кнопка управления */
.admin-btn {
    background: #fff3e6;
    padding: 0.7rem 1rem;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #f97316;
    border: 1px solid #ffba7a;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.9rem;
    width: 100%;
}

.admin-btn:hover {
    background: #f97316;
    color: white;
}





.account-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: auto;
    background: #fffbf5;
    border-radius: 1.5rem;
    padding: 1rem 0.9rem;
    border: 2px solid #ffcf9e;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.08);
}

.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f97316, #fcb045);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}

.account-info h4 {
    font-size: 0.9rem;
    color: #2d2a27;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-info p {
    font-size: 0.7rem;
    color: #b26b38;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

/* ЦЕНТР (чат) */
.center-panel {
    background: #ffffff;
    border-radius: 1.5rem;
    border: 2px solid #ffdec4;
    display: flex;
    flex-direction: column;
    padding: 1rem 1rem 0.8rem 1rem;
    height: 100%;
    overflow: hidden;
}

.response-area {
    flex: 1;
    background: #fffafa;
    border-radius: 1.2rem;
    border: 2px solid #ffe4d0;
    padding: 1.2rem;
    overflow-y: auto;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    line-height: 1.4;
    box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.02);
    position: relative;
    min-height: 0;
}

.response-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #f97316;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ffdec4;
    flex-shrink: 0;
}

.response-content {
    color: #2d2a27;
    line-height: 1.5;
    position: relative;
    z-index: 1;
    white-space: normal; /* ИСПРАВЛЕНО: убираем pre-wrap, чтобы пустые строки из Markdown не ломали верстку */
    word-wrap: break-word;
}

/* 1. Главные списки (первый уровень) */
#streamingText ul, #streamingText ol {
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    padding-left: 1.5rem !important;
    list-style-type: disc !important; /* Делаем точки для первого уровня */
}

/* 2. ВЛОЖЕННЫЕ списки (второй и третий уровни) - вот тут плодились дыры */
#streamingText ul ul, 
#streamingText ol ol, 
#streamingText ul ol, 
#streamingText ol ul {
    margin-top: 0.3rem !important;
    margin-bottom: 0 !important;
    list-style-type: circle !important; /* Делаем пустые кружочки для вложенных, чтобы не сливалось */
}

/* 3. Отступы между самими пунктами */
#streamingText li {
    margin-top: 0.2rem !important;
    margin-bottom: 0.3rem !important;
    line-height: 1.5 !important;
}

/* 4. Жестко глушим абзацы внутри списков (если Markdown их создает) */
#streamingText li p {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 5. Убираем "дыры" вокруг жирных шрифтов внутри списка */
#streamingText li strong {
    display: inline; /* inline-block иногда дает лишний отступ вниз */
}

/* 6. Обычные абзацы текста */
#streamingText p {
    margin-top: 0.6rem !important;
    margin-bottom: 0.6rem !important;
}

/* 7. Заголовки */
#streamingText h1, #streamingText h2, #streamingText h3 {
    margin: 1rem 0 0.4rem 0 !important; 
}
.input-wrapper {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    align-items: center;
    flex-shrink: 0;
}

.input-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: #fff7ed;
    border-radius: 30px;
    padding: 0.3rem 0.3rem 0.3rem 1.2rem;
    border: 2px solid #ffb06f;
    flex: 1;
    min-width: 0;
    
}


.input-container textarea {
    flex: 1;
    border: none !important;
    background: transparent;
    font-size: 0.9rem;
    outline: none;
    resize: none;            
    overflow-y: auto;     
    font-family: inherit;
    min-width: 0;
    width: 100%;
    scrollbar-width: none; 
    -ms-overflow-style: none;
    line-height: 1.2 !important;
    max-height: 24px;

    appearance: none; 
    -moz-appearance: none;
}

.input-container textarea::-webkit-scrollbar {
    display: none;
}

.voice-btn {
    background: #f97316;
    min-width: 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
    position: relative;
    top: -1px;
}

.voice-btn:hover {
    background: #e05f0e;
}

/* Обращаемся максимально конкретно */
.voice-btn i.fa-solid, 
.voice-btn i.fa-microphone,
.voice-btn svg { 
    width: 18px !important;
    height: 18px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.voice-btn.recording {
    background: #f97316 !important; /* Белый фон при записи */
    color: #fff !important;   /* Оранжевый микрофон */
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
}

.send-btn {
    background: #f97316;
    min-width: 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.send-btn:hover {
    background: #e05f0e;
}

.send-btn i {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.send-btn:focus,
.send-btn:focus-visible {
    outline: none !important;  
}

/* ПРАВАЯ КОЛОНКА (папки) */
.right-panel {
    background: #ffffff;
    border-radius: 1.5rem;
    border: 2px solid #ffdec4;
    padding: 1rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.08);
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #c26e2b;
    font-weight: 600;
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ffdec4;
    flex-shrink: 0;
}

.add-button {
    background: #fff3e6;
    width: 30px;
    height: 30px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f97316;
    border: 2px solid #ffba7a;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.add-button:hover {
    background: #f97316;
    color: white;
}

.folder-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-right: 4px;
}

.folder-list::-webkit-scrollbar {
    width: 6px;
}

.folder-list::-webkit-scrollbar-track {
    background: #fff3e6;
    border-radius: 10px;
}

.folder-list::-webkit-scrollbar-thumb {
    background: #f97316;
    border-radius: 10px;
}

.folder-item {
    display: flex;
    flex-direction: column;
    background: #fefaf5;
    border-radius: 1rem;
    padding: 0.8rem 0.8rem;
    border: 2px solid #ffdcc0;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.folder-item:hover {
    background: #fff2e6;
    border-color: #f97316;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(249, 115, 22, 0.15);
}

.folder-item.active {
    background: #ffe9db;
    border-color: #f97316;
    border-width: 2px;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

.folder-header {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Прижимаем всё к левому краю */
    gap: 0;
    width: 100%;
    margin-bottom: 0.3rem;
}

.folder-name {
    display: flex;
    padding-left: 0;
    margin-left: 0;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #2d2a27;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-name i {
    display: none;
}

.folder-controls {
    display: none; /* По умолчанию скрыты */
    margin-left: auto; /* МАГИЯ: выталкивает блок вправо */
    gap: 6px;
    align-items: center;
    padding-left: 10px; /* Чтобы текст не прилипал к кнопкам */
}


.add-file-btn {
    background: transparent;
    min-width: 28px;
    width: 28px;
    height: 28px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f97316;
    border: 2px solid #ffba7a;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.add-file-btn:hover {
    background: #f97316;
    color: white;
    transform: rotate(90deg);
}

.folder-files {
    margin-top: 0.5rem;
    margin-left: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.folder-item.expanded .folder-files {
    display: flex;
}

.folder-files::-webkit-scrollbar {
    width: 4px;
}

.folder-files::-webkit-scrollbar-track {
    background: #fff3e6;
    border-radius: 10px;
}

.folder-files::-webkit-scrollbar-thumb {
    background: #f97316;
    border-radius: 10px;
}

.file-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #a35115;
    padding: 0.25rem 0.25rem 0.25rem 0.3rem;
    border-bottom: 1px dashed #ffe1c6;
    flex-wrap: wrap;
    transition: all 0.2s;
    position: relative;
    border-radius: 6px;
}

.file-row:hover {
    background: rgba(249, 115, 22, 0.1);
    padding-left: 0.5rem;
}

.file-row i {
    font-size: 0.7rem;
    color: #f58c3a;
    width: 14px;
    flex-shrink: 0;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    color: #5f3b1c;
    word-break: break-word;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delete-file-btn {
    background: transparent;
    min-width: 22px;
    width: 22px;
    height: 22px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f97316;
    border: 2px solid #ffba7a;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
    font-size: 0.8rem;
    opacity: 0.7;
}

.delete-file-btn:hover {
    background: #f97316;
    opacity: 1;
    transform: scale(1.1);
}

.delete-file-btn:hover i {
    color: white !important;
}

.typing-indicator::after {
    content: '|';
    animation: blink 1s infinite;
    font-weight: bold;
    color: #b26b38; /* Цвет под твой интерфейс */
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Стиль для блока ответа, чтобы ссылки не сливались */
.pdf-link {
    color: #f97316;
    text-decoration: none;
    display: inline-block;
    padding: 1px 4px;            /* Уменьшаем внутренние отступы плашки */
    margin: 0;
    font-size: 13px;
    border-radius: 4px;
    background: rgba(249, 115, 22, 0.1);
}
.pdf-link:hover {
    text-decoration: underline;
    color: #fbfbfb;
    background: #f97316
}

/* Убираем все старые статистические элементы */
.stat-card, .stat-header, .stat-grid, .stat-item, .stat-label, .stat-value {
    display: none;
}
/* Зона стрелки */
.chevron-wrapper {
    width: 28px;
    height: 28px;
    min-width: 28px; 
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid; 
    display: flex;  
    align-items: center; 
    justify-content: center;
    color: #f97316;
    border-color: #ffba7a;
    background: transparent;
    transition: all 0.3s ease;
    margin-right: 8px;
    cursor: pointer;
}
.chevron-wrapper:hover {
    background: #f97316;
    color: white;
}

.chevron-wrapper i {
    font-size: 0.7rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block; /* Важно для корректного вращения */
}

/* Состояние развернутой папки */
.folder-item.expanded .chevron-wrapper i {
    transform: rotate(90deg);
}

/* Дополнительно: если папка развернута, кружок может оставаться подсвеченным */
.folder-item.expanded .chevron-wrapper {
    border-color: #f97316;
    transform: scale(0.9);
}

.file-link {
    text-decoration: none;
    color: #000000; /* Делаем текст черным */
    font-size: 0.85rem;
    font-weight: 400;
    transition: color 0.2s ease; /* Плавный переход цвета */
    word-break: break-all;
}

.file-link:hover { color: #f97316; text-decoration: underline; }

/* Анимация поворота стрелки */
.fa-chevron-right { transition: transform 0.3s; }
.folder-item.expanded .fa-chevron-right { transform: rotate(90deg); }
.folder-item.expanded .folder-files { display: flex; }
.folder-item.expanded .folder-controls { display: flex; }

.typing-indicator::after { content: '|'; animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

#uploadStatusContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upload-toast {
    background: #2d2a27;
    color: white;
    padding: 10px 15px;
    border-left: 4px solid #ff8c00;
    border-radius: 4px;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideInRight 0.3s ease;
}

.upload-toast.success { border-left: 4px solid #28a745; }
.upload-toast.error { border-left: 4px solid #dc3545; }
.upload-toast.process { border-left: 4px solid #658cf9; }
.upload-toast.info { border-left: 4px solid #f7791f; }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}


/*модальное окно*/
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Темный полупрозрачный фон */
    backdrop-filter: blur(4px);    /* Размытие заднего плана */
    display: none;                 /* Скрыто по умолчанию */
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: all 0.3s ease;
}

.modal-content {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    width: 350px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
}

.modal-content h3 { margin-bottom: 15px; color: #333; }

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
}

/* Общие стили для кнопок модалки */
.modal-actions button {
    padding: 8px 17px;
    border-radius: 10px; /* Скругление */
    border: none;        /* Убираем черную рамку */
    font-family: 'Inter', 'Segoe UI', sans-serif; /* Современный шрифт */
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease; /* Плавность при наведении */
    outline: none;
}

.folder-item button{
    outline: none !important;
}
        /* Кнопка "Отмена" */
#modalCancel {
    background-color: #f1f5f9;
    color: #64748b;
}

#modalCancel:hover {
    background-color: #e2e8f0;
    color: #475569;
}

/* Кнопка "Ок" (оранжевая, под стиль диплома) */
#modalConfirm {
    background-color: #ff6b00; /* Яркий оранжевый */
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.2); /* Легкое свечение */
}

#modalConfirm:hover {
    background-color: #e66000;
    transform: translateY(-1px); /* Эффект приподнимания */
    box-shadow: 0 6px 15px rgba(255, 107, 0, 0.3);
}

#modalConfirm:active {
    transform: translateY(0);
}

.modal-confirm-danger {
    background: #ef4444 !important;
}

/* Стили для инпута внутри модалки */
.modal-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    outline: none;
}

#modalTitle {
    white-space: nowrap;      /* Запрещаем перенос на новую строку */
    overflow: hidden;         /* Прячем хвост, который не влез */
    text-overflow: ellipsis;  /* Рисуем те самые три точки "..." */
    max-width: 100%;          /* Чтобы заголовок не был шире самой модалки */
    display: block;           /* Чтобы свойства выше работали корректно */
}

/* Анимация тряски */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

/* Класс, который мы будем вешать на инпут */
.input-error {
    border: 2px solid #ef4444 !important; /* Красная рамка */
    animation: shake 0.3s ease-in-out;    /* Запуск тряски */
    background-color: #fef2f2;            /* Легкий красный фон */
}

.modal-overlay {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.3); /* Затенение фона */
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid #ffb06f; /* Твой оранжевый цвет */
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.2);
}

.modal-icon {
    width: 50px; height: 50px;
    background: #fff7ed;
    color: #f97316;
    border-radius: 50%;
    display: flex;
    align-items: center; justify-content: center;
    font-size: 24px; font-weight: bold;
    margin: 0 auto 1rem;
    border: 2px solid #ffb06f;
}

.modal-btn {
    background: #f97316;
    color: white;
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
    margin-top: 1.5rem;
}

.modal-btn:hover {
    background: #e05f0e;
}

/* 1. Основа модального окна */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Затемнение фона */
    backdrop-filter: blur(4px);    /* Легкое размытие */
    display: none;                 /* Управляется через JS */
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.admin-main-panel {
    background: #ffffff;
    width: 95%;
    max-width: 1100px;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 2. Шапка (Заголовок + Крестик) */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #fee3c8; /* Твой фирменный цвет */
}

.admin-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-title i {
    font-size: 1.5rem;
    color: #f97316; /* Оранжевый акцент */
    margin-top: -2px; /* Чуть приподнимаем иконку, как ты просил */
}

.admin-title h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* Красивая кнопка закрытия */
.close-btn {
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    
    justify-content: center;
    transition: all 0.2s;
    color: #666;
}

.close-btn:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

/* 3. Контейнер таблицы со СКРОЛЛОМ */
.admin-table-container {
    max-height: 65vh;       /* Таблица займет 65% высоты экрана, остальное скролл */
    overflow-y: auto;       /* Вертикальный скролл включен */
    border-radius: 1rem;
    border: 1px solid #eee;
}

/* Тюнинг скроллбара, чтобы не был уродливым */
.admin-table-container::-webkit-scrollbar {
    width: 8px;
}
.admin-table-container::-webkit-scrollbar-track {
    background: #f9fafb;
}
.admin-table-container::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 10px;
}
.admin-table-container::-webkit-scrollbar-thumb:hover {
    background: #f97316;
}

/* 4. Стили самой таблицы */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.95rem;
}

.admin-table thead th {
    position: sticky; /* Шапка не уезжает при скролле! */
    top: 0;
    background: #f9fafb;
    padding: 1rem;
    text-align: center;
    color: #6b7280;
    font-weight: 600;
    border-bottom: 2px solid #eee;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle; 
    text-align: center; 
}

.admin-table td:last-child {
    display: flex;           /* Включаем флекс */
    justify-content: center; /* Центрируем по горизонтали */
    align-items: center;     /* Центрируем по вертикали */
    gap: 12px;               /* Расстояние МЕЖДУ кнопками */
    border-bottom: 1px solid #f3f4f6; /* Возвращаем бордер, т.к. flex может его игнорировать */
    min-height: 60px;        /* Чтобы ячейка не сплющилась */
}

/* Убираем лишние отступы у кнопок, если они есть */
.admin-table td:last-child button {
    margin: 0 !important;
}

.admin-table tr:hover {
    background: #fffaf5; /* Легкая подсветка строки */
}

/* Статусы (Badge) */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}
.status-approved { background: #dcfce7; color: #166534; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-rejected { background: #fee2e2; color: #991b1b; }

/* Кнопки действий */
.action-group {
    display: flex;
    gap: 10px;
}

.btn-action {
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.btn-approve { background: #f0fdf4; color: #16a34a; }
.btn-approve:hover { background: #16a34a; color: white; }

.btn-delete { background: #fef2f2; color: #dc2626; }
.btn-delete:hover { background: #dc2626; color: white; }