/**
 * MODERN POLISH - Визуальные улучшения интерфейса
 * Только CSS - НЕ влияет на функционал!
 * Версия: 1.0
 */

/* ===============================================
   1. СОВРЕМЕННЫЕ КНОПКИ
   =============================================== */

/* Кнопка отправки сообщения */
.send-button {
    background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 136, 204, 0.3) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 8px !important;
}

.send-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 14px rgba(0, 136, 204, 0.4) !important;
}

.send-button:active {
    transform: translateY(0) !important;
}

/* Основные кнопки (primary) */
.modal-btn-primary,
.create-campaign-btn,
.btn-primary,
.login-button {
    background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 136, 204, 0.25) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 8px !important;
}

.modal-btn-primary:hover,
.create-campaign-btn:hover,
.btn-primary:hover,
.login-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 136, 204, 0.35) !important;
}

.modal-btn-primary:active,
.create-campaign-btn:active,
.btn-primary:active {
    transform: translateY(0) !important;
}

/* Вторичные кнопки */
.modal-btn-secondary,
.btn-secondary {
    transition: all 0.2s ease !important;
    border-radius: 8px !important;
}

.modal-btn-secondary:hover,
.btn-secondary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Кнопки удаления */
.btn-danger,
.delete-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25) !important;
    transition: all 0.2s ease !important;
}

.btn-danger:hover,
.delete-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35) !important;
}

/* ===============================================
   2. КАРТОЧКИ ДИАЛОГОВ
   =============================================== */

.dialog-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
}

.dialog-item:hover {
    background: #f8f9fa !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    transform: translateX(3px) !important;
}

.dialog-item.active {
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.15) !important;
}

/* ===============================================
   3. АВАТАРЫ
   =============================================== */

.dialog-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3) !important;
    color: white !important;
    transition: all 0.2s ease !important;
}

.dialog-item:hover .dialog-avatar {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4) !important;
}

.dialog-item.active .dialog-avatar {
    background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%) !important;
    box-shadow: 0 4px 10px rgba(0, 136, 204, 0.4) !important;
}

/* Аватар пользователя в меню */
.user-avatar {
    background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%) !important;
    box-shadow: 0 2px 4px rgba(0, 136, 204, 0.3) !important;
}

/* ===============================================
   4. НАВИГАЦИОННЫЕ ТАБЫ
   =============================================== */

.nav-tab {
    transition: all 0.2s ease !important;
    border-radius: 10px !important;
}

.nav-tab:hover:not(.active) {
    background: #f1f5f9 !important;
    transform: translateY(-2px) !important;
}

.nav-tab.active {
    background: linear-gradient(135deg, #e6f5fc 0%, #d0ebf7 100%) !important;
    box-shadow: 0 2px 6px rgba(0, 136, 204, 0.2) !important;
}

/* ===============================================
   5. СООБЩЕНИЯ В ЧАТЕ
   =============================================== */

.message-bubble.outgoing {
    background: linear-gradient(135deg, #0088cc 0%, #0077b3 100%) !important;
    border-radius: 16px 16px 4px 16px !important;
    box-shadow: 0 2px 8px rgba(0, 136, 204, 0.25) !important;
}

.message-bubble.incoming {
    border-radius: 16px 16px 16px 4px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.message {
    animation: messageSlideIn 0.3s ease-out !important;
}

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

/* ===============================================
   6. INPUT ПОЛЯ
   =============================================== */

.message-input,
.search-input-modern,
.modal-input,
.form-input {
    border-width: 2px !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
}

.message-input:focus,
.search-input-modern:focus,
.modal-input:focus,
.form-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1) !important;
    transform: scale(1.005) !important;
}

.input-container:focus-within {
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1) !important;
}

/* ===============================================
   7. МОДАЛЬНЫЕ ОКНА
   =============================================== */

.modal-content,
.confirm-modal,
.schedule-modal-content {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    border-radius: 16px !important;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal,
.confirm-modal-overlay {
    backdrop-filter: blur(2px) !important;
}

/* ===============================================
   8. BADGES И СЧЁТЧИКИ
   =============================================== */

.unread-count {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35) !important;
    border-radius: 14px !important;
}

.priority-badge.high {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%) !important;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.2) !important;
}

.priority-badge.low {
    box-shadow: 0 1px 3px rgba(107, 114, 128, 0.15) !important;
}

/* ===============================================
   9. ФИЛЬТРЫ И СЕЛЕКТОРЫ
   =============================================== */

.filter-tab {
    transition: all 0.2s ease !important;
    border-radius: 8px !important;
}

.filter-tab:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

.filter-tab.active {
    box-shadow: 0 2px 6px rgba(0, 136, 204, 0.25) !important;
}

.campaign-selector,
.filter-select,
select {
    transition: all 0.2s ease !important;
    border-radius: 8px !important;
}

.campaign-selector:hover,
.filter-select:hover,
select:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

.campaign-selector:focus,
.filter-select:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1) !important;
}

/* ===============================================
   10. ОБЩИЕ УЛУЧШЕНИЯ
   =============================================== */

/* Smooth scrolling */
* {
    scroll-behavior: smooth !important;
}

/* Убираем старые outline, добавляем современные */
*:focus {
    outline: none !important;
}

*:focus-visible {
    outline: 2px solid #0088cc !important;
    outline-offset: 2px !important;
    border-radius: 4px !important;
}

/* Улучшенные transitions для всех интерактивных элементов */
button,
a,
input,
select,
.dialog-item,
.nav-tab,
.filter-tab {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ===============================================
   11. УЛУЧШЕННЫЕ КАРТОЧКИ КАМПАНИЙ
   =============================================== */

.campaign-item {
    transition: all 0.2s ease !important;
    border-radius: 12px !important;
}

.campaign-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px) !important;
}

.campaign-item.active {
    box-shadow: 0 4px 16px rgba(0, 136, 204, 0.2) !important;
}

/* ===============================================
   12. СТАТУС ИНДИКАТОРЫ
   =============================================== */

.status-badge {
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* ===============================================
   13. ТАБЛИЦЫ (для Blocklist и Accounts)
   =============================================== */

.accounts-table tr,
.blocklist-table tr,
table tr {
    transition: all 0.15s ease !important;
}

.accounts-table tr:hover,
.blocklist-table tr:hover,
table tbody tr:hover {
    background: #f8f9fa !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04) !important;
}

/* ===============================================
   14. SEARCH INPUT
   =============================================== */

.search-input-modern {
    border-width: 2px !important;
    border-radius: 12px !important;
}

.search-input-modern:focus {
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1) !important;
}

/* ===============================================
   15. SIDEBAR И PANELS
   =============================================== */

.sidebar {
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04) !important;
}

.campaigns-panel {
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04) !important;
}

/* ===============================================
   16. CHAT HEADER
   =============================================== */

.chat-header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

/* ===============================================
   17. УЛУЧШЕННЫЕ ФОРМЫ
   =============================================== */

.form-group input,
.form-group select,
.form-group textarea {
    border-width: 2px !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1) !important;
}

/* ===============================================
   18. PRIORITY СЕЛЕКТОР
   =============================================== */

#prioritySelect {
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

#prioritySelect:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

/* ===============================================
   19. FILTER DROPDOWN
   =============================================== */

.filter-dropdown {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    border-radius: 12px !important;
    animation: dropdownSlideIn 0.2s ease-out !important;
}

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

/* ===============================================
   20. EMPTY STATES
   =============================================== */

.empty-state {
    animation: fadeIn 0.4s ease-out !important;
}

.loader {
    animation: fadeIn 0.3s ease-out !important;
}

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

/* ===============================================
   21. УЛУЧШЕННЫЕ READ STATUS (галочки)
   =============================================== */

.dialog-read-status {
    transition: all 0.2s ease !important;
}

/* ===============================================
   22. FOLLOWUP BUTTON
   =============================================== */

.followup-button {
    transition: all 0.2s ease !important;
    border-radius: 8px !important;
}

.followup-button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

/* ===============================================
   23. FILTER BUTTON
   =============================================== */

.filter-button {
    transition: all 0.2s ease !important;
    border-radius: 8px !important;
}

.filter-button:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

/* ===============================================
   24. УЛУЧШЕННАЯ ТИПОГРАФИКА
   =============================================== */

.dialog-name {
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
}

.chat-title {
    font-weight: 600 !important;
    letter-spacing: -0.02em !important;
}

/* ===============================================
   25. СТРАНИЦА ЛОГИНА
   =============================================== */

.login-container {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25) !important;
    border-radius: 20px !important;
    animation: loginSlideIn 0.4s ease-out !important;
}

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

/* ===============================================
   26. CAMPAIGN STATS
   =============================================== */

.campaign-stats,
.stats-grid {
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

/* ===============================================
   27. PROGRESS BARS
   =============================================== */

.progress-bar {
    border-radius: 8px !important;
    overflow: hidden !important;
}

.progress-fill {
    transition: width 0.4s ease !important;
}

/* ===============================================
   28. УЛУЧШЕННЫЕ HOVER ДЛЯ ИНТЕРАКТИВНЫХ ЭЛЕМЕНТОВ
   =============================================== */

.clickable,
[onclick],
[data-action] {
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

/* ===============================================
   29. УЛУЧШЕННАЯ НАВИГАЦИЯ
   =============================================== */

.nav-tabs {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

/* ===============================================
   30. RESPONSIVE IMPROVEMENTS
   =============================================== */

/* Плавные переходы при изменении размера */
.sidebar,
.chat-area,
.campaigns-panel {
    transition: width 0.3s ease, transform 0.3s ease !important;
}

/* ===============================================
   31. УЛУЧШЕННЫЕ CHECKBOX И RADIO
   =============================================== */

input[type="checkbox"],
input[type="radio"] {
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
    transform: scale(1.1) !important;
}

/* ===============================================
   32. УЛУЧШЕННЫЙ LOADER
   =============================================== */

.loader {
    color: #0088cc !important;
    font-weight: 500 !important;
}

/* ===============================================
   33. УЛУЧШЕННЫЕ ТЕНИ ДЛЯ ГЛУБИНЫ
   =============================================== */

.panel-header {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04) !important;
}

/* ===============================================
   34. ACCOUNT CARDS
   =============================================== */

.account-card {
    transition: all 0.2s ease !important;
    border-radius: 12px !important;
}

.account-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px) !important;
}

/* ===============================================
   35. УЛУЧШЕННЫЕ ФОРМЫ СОЗДАНИЯ
   =============================================== */

.create-form {
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* ===============================================
   КОНЕЦ УЛУЧШЕНИЙ
   Все изменения - ТОЛЬКО визуальные!
   Функционал остаётся нетронутым.
   =============================================== */

