:root {
    --primary-color: #9367E8;
    --primary-light: #B792FF;
    --primary-hover: #7747DE;
    --secondary-color: #70C4BF;
    --accent-color: #4CCBF6;
    --success-color: #4CAF50;
    --info-color: #4CCBF6;
    --warning-color: #FFC107;
    --danger-color: #F85977;
    --light-bg: #F5F6FA;
    --dark-bg: #212529;
    --text-primary: #333333;
    --text-secondary: #6c757d;
    --border-color: #E0E0E5;
    --border-radius: 12px;
    --box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
    --sidebar-width: 220px;
    --sidebar-collapsed-width: 70px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Отключаем подчеркивание ссылок при наведении */
a {
    text-decoration: none !important;
}

a:hover, a:focus, a:active {
    text-decoration: none !important;
}

/* Стили боковой панели */
.sidebar {
    width: var(--sidebar-width);
    background-color: #6366F1;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Добавляем прокрутку при необходимости */
    -webkit-overflow-scrolling: touch; /* Плавная прокрутка на iOS */
}

.sidebar-logo {
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-icon {
    width: 108px;
    height: 108px;
    background-color: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366F1;
    font-size: 22px;
}

.sidebar-nav {
    padding: 20px 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-bottom-menu {
    margin-top: auto;
}

.sidebar-item {
    margin: 4px 15px;
    border-radius: 8px;
    transition: var(--transition);
}

.sidebar-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    transition: var(--transition);
    border-radius: 8px;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1); /* Убираем стандартное выделение на iOS */
}

.sidebar-item a i {
    margin-right: 12px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
}

.sidebar-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Стиль для обычных активных пунктов меню */
.sidebar-item.active {
    background-color: white;
}

.sidebar-item.active a {
    color: #6366F1;
    font-weight: 500;
}

.sidebar-item.active a i {
    color: #6366F1;
}

/* Стиль для раскрытых пунктов меню (новый класс) */
.sidebar-item.expanded {
    background-color: rgba(255, 255, 255, 0.2);
}

.sidebar-item.expanded > a {
    color: white;
    font-weight: 500;
}

.sidebar-item.expanded > a i {
    color: white;
}

/* Инверсия цвета для активного пункта "Настройки" */
.sidebar-item:nth-child(2).expanded,
.sidebar-item:nth-child(3).expanded {
    background-color: rgba(255, 255, 255, 0.2);
}

.sidebar-item:nth-child(2).expanded > a,
.sidebar-item:nth-child(3).expanded > a {
    color: white;
    font-weight: 500;
}

.sidebar-item:nth-child(2).expanded > a i,
.sidebar-item:nth-child(3).expanded > a i {
    color: white;
}

/* Стили для активных подпунктов в разделе Настройки и Аналитика - переопределение стандартного поведения */
.sidebar-item:nth-child(2) .sidebar-subitem.active a,
.sidebar-item:nth-child(3) .sidebar-subitem.active a {
    background-color: rgba(255, 255, 255, 0.15);
    color: white !important;
    font-weight: 500;
}

.sidebar-item:nth-child(2) .sidebar-subitem.active a i,
.sidebar-item:nth-child(3) .sidebar-subitem.active a i {
    color: white !important;
}

/* Гарантируем белый текст во всех подпунктах меню "Настройки" и "Аналитика" */
.sidebar-item:nth-child(2) .submenu.show .sidebar-subitem a,
.sidebar-item:nth-child(3) .submenu.show .sidebar-subitem a {
    color: rgba(255, 255, 255, 0.75) !important;
}

.sidebar-item:nth-child(2) .submenu.show .sidebar-subitem a i,
.sidebar-item:nth-child(3) .submenu.show .sidebar-subitem a i {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* Стиль для активного пункта подменю переопределяет базовый */
.sidebar-item:nth-child(2) .submenu.show .sidebar-subitem.active a,
.sidebar-item:nth-child(3) .submenu.show .sidebar-subitem.active a {
    color: white !important;
}

.sidebar-item:nth-child(2) .submenu.show .sidebar-subitem.active a i,
.sidebar-item:nth-child(3) .submenu.show .sidebar-subitem.active a i {
    color: white !important;
}

/* Стиль для наведения на подпункты */
.sidebar-item:nth-child(2) .submenu.show .sidebar-subitem a:hover,
.sidebar-item:nth-child(3) .submenu.show .sidebar-subitem a:hover {
    color: white !important;
}

.sidebar-item:nth-child(2) .submenu.show .sidebar-subitem a:hover i,
.sidebar-item:nth-child(3) .submenu.show .sidebar-subitem a:hover i {
    color: white !important;
}

/* Специфическое правило для исправления цвета подпунктов при активном пункте Users или Operators */
.sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem:not(.active) a,
.sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem:not(.active) a {
    color: rgba(255, 255, 255, 0.75) !important;
}

.sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem:not(.active) a i,
.sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem:not(.active) a i {
    color: rgba(255, 255, 255, 0.75) !important;
}

.sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem.active a,
.sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem.active a {
    color: white !important;
}

.sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem.active a i,
.sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem.active a i {
    color: white !important;
}

/* Добавляем максимально специфичные правила для гарантии корректного отображения в любом состоянии */
body .sidebar .sidebar-nav .sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem a,
body .sidebar .sidebar-nav .sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem span,
body .sidebar .sidebar-nav .sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem a,
body .sidebar .sidebar-nav .sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem span {
    color: rgba(255, 255, 255, 0.75) !important;
}

body .sidebar .sidebar-nav .sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem a i,
body .sidebar .sidebar-nav .sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem a i {
    color: rgba(255, 255, 255, 0.75) !important;
}

body .sidebar .sidebar-nav .sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem.active a,
body .sidebar .sidebar-nav .sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem.active span,
body .sidebar .sidebar-nav .sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem.active a,
body .sidebar .sidebar-nav .sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem.active span {
    color: white !important;
    font-weight: 500 !important;
}

body .sidebar .sidebar-nav .sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem.active a i,
body .sidebar .sidebar-nav .sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem.active a i {
    color: white !important;
}

/* Отменяем темно-синий цвет для активных элементов настроек и аналитики */
body .sidebar .sidebar-nav .sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem a:not(.active),
body .sidebar .sidebar-nav .sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem a *:not(.active),
body .sidebar .sidebar-nav .sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem a:not(.active),
body .sidebar .sidebar-nav .sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem a *:not(.active) {
    color: rgba(255, 255, 255, 0.75) !important;
}

.sidebar-item a.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sidebar-logout {
    margin-top: auto;
}

/* Стили для подменю в боковой панели */
.submenu {
    list-style: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.submenu.show {
    max-height: 200px; /* Достаточное место для подпунктов */
}

.sidebar-item > a {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1); /* Убираем стандартное выделение на iOS */
}

.sidebar-item > a .bi-chevron-down {
    transition: transform 0.3s ease;
}

.sidebar-item.expanded > a .bi-chevron-down,
.sidebar-item.active > a .bi-chevron-down {
    transform: rotate(180deg);
}

.sidebar-subitem a {
    display: flex;
    align-items: center;
    padding: 8px 12px 8px 30px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1); /* Убираем стандартное выделение на iOS */
}

.sidebar-subitem a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-subitem.active a {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 500;
}

/* Эффект активного нажатия для сенсорных устройств */
.sidebar-item > a:active,
.sidebar-subitem a:active,
.sidebar-subitem a.touch-active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(0.98);
}

/* Стили основного содержимого */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

/* Стили заголовка */
.header {
    height: var(--header-height);
    background-color: white;
    display: flex;
    align-items: center;
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 900;
}

.header-title {
    flex: 1;
}

.header-title h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.header-search {
    flex: 2;
    display: flex;
    justify-content: center;
}

.search-wrapper {
    width: 300px;
    position: relative;
}

.search-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-wrapper input {
    width: 100%;
    height: 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 0 15px 0 40px;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.search-wrapper input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(147, 103, 232, 0.1);
}

.header-user {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.user-info {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-circle {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.user-email {
    font-size: 12px;
    color: var(--text-secondary);
}

.login-btn {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    display: flex;
    align-items: center;
}

.login-btn:hover {
    text-decoration: underline;
}

/* Стили содержимого */
.content-wrapper {
    padding: 30px;
    flex-grow: 1;
}

.content-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Стили для аналитики */
.analytics-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.analytics-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.analytics-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

.analytics-card.primary {
    background-color: var(--primary-color);
    color: white;
}

.analytics-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.analytics-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.analytics-card.primary .analytics-label {
    color: rgba(255, 255, 255, 0.8);
}

.analytics-trend {
    font-size: 12px;
    border-radius: 12px;
    padding: 3px 8px;
    display: inline-flex;
    align-items: center;
}

.analytics-trend.increase {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
}

.analytics-trend.decrease {
    background-color: rgba(248, 89, 119, 0.1);
    color: var(--danger-color);
}

/* Стили для организаций */
.organizations-container {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.organizations-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.organizations-title {
    font-size: 18px;
    font-weight: 600;
}

.organizations-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.organization-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.organization-avatar {
    width: 36px;
    height: 36px;
    background-color: #f0f0f0;
    border-radius: 50%;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    text-transform: uppercase;
}

.organization-avatar span {
    line-height: 1;
}

.organization-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.organization-info {
    flex-grow: 1;
}

.organization-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 3px;
}

.organization-type {
    font-size: 12px;
    color: var(--text-secondary);
}

.organization-action {
    margin-left: 10px;
}

.organization-status {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #f0f0f0;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}

.organization-status.active {
    background-color: var(--success-color);
}

.add-button {
    width: 30px;
    height: 30px;
    background-color: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.add-button:hover {
    background-color: var(--primary-color);
}

/* Стили для графиков и отчетов */
.chart-container {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
}

.chart-period {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.chart-period i {
    margin-right: 5px;
}

.visitors-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.visitors-card {
    flex: 1;
    min-width: 200px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.visitors-card-title {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.visitors-card-value {
    font-size: 22px;
    font-weight: 600;
}

.visitors-chart {
    height: 250px;
    margin-top: 20px;
    position: relative;
}

.conversation-today {
    font-size: 60px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.percentage-indicator {
    font-size: 14px;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
}

/* Адаптивные стили */
@media (max-width: 992px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }
    
    .sidebar-item a span {
        display: none;
    }
    
    .sidebar-item a i {
        margin-right: 0;
        font-size: 20px;
    }
    
    .main-content {
        margin-left: var(--sidebar-collapsed-width);
        width: calc(100% - var(--sidebar-collapsed-width));
    }
    
    /* Скрываем иконку стрелки в режиме иконок */
    .sidebar-item > a .bi-chevron-down {
        display: none;
    }
    
    /* Скрываем подменю в режиме иконок */
    .submenu {
        display: none;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 15px;
        flex-wrap: wrap;
        height: auto;
        min-height: var(--header-height);
    }
    
    .header-title {
        flex: 100%;
        margin-bottom: 10px;
    }
    
    .header-search {
        flex: 70%;
        justify-content: flex-start;
    }
    
    .header-user {
        flex: 30%;
    }
    
    .search-wrapper {
        width: 100%;
    }
    
    .analytics-overview {
        grid-template-columns: 1fr;
    }
    
    .content-wrapper {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 0;
        left: -var(--sidebar-width);
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar.show {
        width: var(--sidebar-width);
        left: 0;
    }
    
    /* В мобильном виде показываем и текст, и иконки */
    .sidebar.show .sidebar-item a span {
        display: inline;
    }
    
    .sidebar.show .sidebar-item a i {
        margin-right: 12px;
    }
    
    /* Восстанавливаем видимость стрелки для подменю */
    .sidebar.show .sidebar-item > a .bi-chevron-down {
        display: inline-block;
    }
    
    /* Восстанавливаем возможность открытия подменю */
    .sidebar.show .submenu.show {
        display: block;
        max-height: 200px;
    }
    
    /* Увеличиваем область нажатия для пунктов меню на мобильных */
    .sidebar.show .sidebar-item a,
    .sidebar.show .sidebar-subitem a {
        padding: 14px 15px;
        min-height: 48px; /* Минимальная высота для удобства нажатия */
    }
    
    /* Добавляем затемнение фона при открытом меню */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .mobile-menu-overlay.show {
        display: block;
    }
    
    .user-details {
        display: none;
    }
    
    /* Увеличиваем размер кнопки мобильного меню для удобства нажатия */
    .mobile-menu-button {
        width: 48px;
        height: 48px;
        border-radius: 8px;
        font-size: 28px;
        margin-right: 10px;
    }
    
    /* Улучшаем отзывчивость меню на мобильных */
    .sidebar-item.expanded > a {
        background-color: rgba(255, 255, 255, 0.15);
    }
    
    /* Увеличиваем область для распознавания нажатия */
    .sidebar-item > a {
        position: relative;
    }
    
    .sidebar-item > a::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
    }
    
    /* Увеличиваем максимальную высоту подменю для мобильных */
    .submenu.show {
        max-height: 300px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Индикатор для подменю на мобильных */
    .sidebar-item > a .bi-chevron-down {
        position: relative;
        z-index: 2;
    }
    
    /* Предотвращаем скролл основного контента при открытом меню */
    body.menu-open {
        overflow: hidden;
    }
    
    /* Анимация появления меню */
    .sidebar {
        transition: left 0.3s ease, width 0.3s ease;
    }
}

/* Общие компоненты */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 12px 16px;
    margin-bottom: 20px;
}

.card {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: none;
    margin-bottom: 20px;
    transition: var(--transition);
    overflow: hidden;
    background-color: white;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
}

.card-header .d-flex {
    align-items: center;
}

.card-header i {
    margin-right: 10px;
    color: var(--primary-color);
}

.card-header h5 {
    margin-bottom: 0;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.badge {
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
}

.badge.bg-info {
    background-color: var(--info-color) !important;
}

.badge.bg-danger {
    background-color: var(--danger-color) !important;
}

.badge.bg-success {
    background-color: var(--success-color) !important;
}

.badge.bg-secondary {
    background-color: var(--text-secondary) !important;
}

.btn {
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Переопределение стилей компонентов Bootstrap */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(147, 103, 232, 0.1);
}

.badge {
    padding: 5px 10px;
    font-weight: 500;
}

.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* Стили для аудио плеера */
.audio-player {
    width: 100%;
    height: 40px;
}

audio::-webkit-media-controls-panel {
    background-color: var(--light-bg);
}

audio::-webkit-media-controls-play-button {
    background-color: var(--primary-color);
    border-radius: 50%;
}

/* Остальные необходимые стили приложения */
.navbar {
    background-color: #6366F1 !important;
    box-shadow: var(--box-shadow);
    padding: 15px 0;
}

/* Улучшение отображения меню на мобильных устройствах */
@media (max-width: 992px) {
    .navbar {
        padding: 10px 0;
    }
    
    .navbar .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .navbar-collapse {
        background-color: #6366F1;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        padding: 10px;
        margin-top: 5px;
    }
    
    .navbar-nav .nav-item {
        margin-bottom: 5px;
    }
    
    .navbar-nav .nav-link {
        padding: 8px 12px;
        border-radius: var(--border-radius);
    }
    
    .navbar-nav .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

.navbar-brand {
    color: white !important;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.navbar-dark .navbar-brand {
    color: white !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: white !important;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

.dropdown-menu {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.dropdown-item {
    padding: 8px 16px;
}

.dropdown-item:hover {
    background-color: var(--light-bg);
}

.container {
    max-width: 1200px;
    padding-left: 16px;
    padding-right: 16px;
}

.container-fluid {
    flex: 1;
}

.card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

.btn-info {
    background-color: var(--info-color);
    color: white;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    line-height: 1.2;
}

.btn-info:hover {
    background-color: #2978f0;
    color: white;
}

.btn-secondary {
    background-color: #e9ecef;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: #dde2e6;
    color: var(--text-primary);
}

.btn-outline-secondary {
    border: 1px solid #dee2e6;
    color: var(--text-secondary);
}

.btn-outline-secondary:hover {
    background-color: #dde2e6;
    color: var(--text-primary);
}

/* Стили для кнопки транскрибирования */
.btn-light.border {
    background-color: #f8f9fa;
    border-color: #dee2e6 !important;
    color: #495057;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    line-height: 1.2;
}

.btn-light.border:hover {
    background-color: #e9ecef;
    border-color: #ced4da !important;
}

.call-row {
    margin-bottom: 1.5rem;
    padding: 0;
    border-radius: var(--border-radius);
    transition: var(--transition);
    background-color: white;
}

.call-row:hover {
    box-shadow: var(--box-shadow);
}

/* Стиль для подсветки карточки диалога */
.call-row.highlighted {
    box-shadow: 0 0 0 3px var(--primary-color), var(--box-shadow);
    animation: pulse 3s ease-in-out;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2), var(--box-shadow); }
    50% { box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.8), var(--box-shadow); }
    100% { box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2), var(--box-shadow); }
}

/* Улучшение адаптивности карточек на мобильных устройствах */
@media (max-width: 576px) {
    .call-row .card-body {
        padding: 10px;
    }
    
    .call-row .audio-player {
        margin: 10px 0;
    }
    
    .call-row .row {
        row-gap: 0.5rem;
    }
    
    .call-row .card-title {
        font-size: 1.1rem;
    }
}

.transcription-container {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 10px;
    padding: 16px;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    background-color: white;
}

.speaker-1 {
    color: var(--primary-color);
    font-weight: 600;
}

.speaker-2 {
    color: var(--secondary-color);
    font-weight: 600;
}

.speaker-3 {
    color: var(--accent-color);
    font-weight: 600;
}

/* Добавляем стили для дополнительных говорящих */
.speaker-4 {
    color: #e74c3c; /* Красный */
    font-weight: 600;
}

.speaker-5 {
    color: #27ae60; /* Зеленый */
    font-weight: 600;
}

.speaker-6 {
    color: #f39c12; /* Оранжевый */
    font-weight: 600;
}

.speaker-7 {
    color: #8e44ad; /* Фиолетовый */
    font-weight: 600;
}

.speaker-8 {
    color: #16a085; /* Бирюзовый */
    font-weight: 600;
}

.speaker-9 {
    color: #d35400; /* Темно-оранжевый */
    font-weight: 600;
}

.speaker-10 {
    color: #2980b9; /* Синий */
    font-weight: 600;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(67, 97, 238, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 8px 12px;
    word-wrap: break-word;
}

@media (min-width: 768px) {
    .alert {
        padding: 12px 16px;
    }
}

.pagination {
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .pagination {
        margin-top: 2rem;
    }
}

.pagination .page-link {
    border: none;
    margin: 0 3px;
    border-radius: 8px;
    color: var(--text-primary);
    padding: 6px 12px;
}

@media (min-width: 768px) {
    .pagination .page-link {
        margin: 0 5px;
        padding: 8px 16px;
    }
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    color: white;
}

.pagination .page-item:not(.active) .page-link:hover {
    background-color: #e9ecef;
}

.form-control {
    border-radius: 8px;
    padding: 8px 10px;
    border: 1px solid #dee2e6;
}

@media (min-width: 768px) {
    .form-control {
        padding: 8px 12px;
    }
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
}

.footer {
    background-color: white !important;
    border-top: 1px solid #e9ecef;
    padding: 20px 0;
}

@media (min-width: 768px) {
    .footer {
        padding: 25px 0;
    }
}

/* Стилизация скроллбара */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Улучшение адаптивности */
.text-break {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Размер шрифта для мобильных */
@media (max-width: 576px) {
    h1 {
        font-size: 1.8rem;
    }
    h4 {
        font-size: 1.3rem;
    }
    h5 {
        font-size: 1.1rem;
    }
}

/* Адаптивные отступы */
.g-3 {
    --bs-gutter-y: 0.5rem;
}

/* Стили для заголовка страницы */
.page-header {
    position: relative;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.page-header .text-muted {
    font-size: 0.9rem;
}

.gradient-text {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color, #7e91f5));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.display-5 {
    font-weight: 700;
    letter-spacing: -0.5px;
}

@media (max-width: 576px) {
    .display-5 {
        font-size: 1.9rem;
    }
}

/* Уменьшаем отступы у элементов внутри карточек */
.card .mb-2 {
    margin-bottom: 0.4rem !important;
}

.card .mb-3 {
    margin-bottom: 0.6rem !important;
}

.card .mb-4 {
    margin-bottom: 1rem !important;
}

/* Уменьшаем отступ между заголовком страницы и контентом */
.mb-4 {
    margin-bottom: 1rem !important;
}

/* Уменьшаем отступы в формах */
.mb-3 {
    margin-bottom: 0.8rem !important;
}

/* Специальные стили для кнопок большого размера */
.btn-lg {
    padding: 8px 16px !important;
}

@media (min-width: 768px) {
    .btn-lg {
        padding: 10px 20px !important;
    }
}

/* Уменьшаем отступы внутри .card-body */
.card-body.p-4 {
    padding: 1.25rem !important;
}

/* Уменьшаем вертикальные отступы внутри строк */
.py-3 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

/* Стили для таблицы пользователей */
.table th:last-child, .table td:last-child {
    width: 200px;
    min-width: 200px;
    text-align: center;
}

.table .btn-sm {
    min-width: 140px;
    text-align: center;
    transition: all 0.2s ease;
}

.table .btn-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.table td {
    vertical-align: middle;
    padding: 12px 16px;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    background-color: #f8f9fa;
}

/* Стили для статусов и ролей */
.table .badge {
    min-width: 100px;
    display: inline-block;
    padding: 6px 10px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Стилизация таблицы */
.table-hover tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

/* Анимация перехода для кнопок */
.btn {
    transition: all 0.2s ease;
}

/* Улучшение стилей для таблицы */
.table-responsive {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Улучшение адаптивности таблиц для мобильных устройств */
@media (max-width: 576px) {
    .table {
        font-size: 0.85rem;
    }
    
    .table th:last-child, .table td:last-child {
        width: auto;
        min-width: auto;
    }
    
    .table .btn-sm {
        min-width: auto;
        padding: 4px 8px;
        margin-bottom: 0;
    }
    
    /* Улучшаем отображение кнопок действий на мобильных */
    .table .btn-outline-warning,
    .table .btn-outline-success {
        display: inline-block;
        width: auto;
        min-width: 80px;
        border-width: 2px;
    }
    
    /* Делаем видимым статус пользователя на самых маленьких экранах */
    .table tr {
        position: relative;
    }
    
    .table td i.bi {
        font-size: 1.1rem;
    }
}

.card.border-0 {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card.border-0 .card-body {
    padding: 0;
}

/* Стили для уведомления о копировании ссылки */
.copy-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: rgba(55, 55, 55, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 9999;
    font-size: 14px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
}

.copy-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.copy-notification i {
    color: #4CD964;
}

/* Стили для кнопки копирования ссылки */
.btn-link.btn-sm {
    color: #6c757d;
    transition: color 0.2s ease;
}

.btn-link.btn-sm:hover {
    color: var(--primary-color);
}

.btn-link.btn-sm i.bi-link-45deg {
    font-size: 1.1rem;
}

/* Стили для мобильного вида списка пользователей */
.user-card {
    background-color: white;
    transition: var(--transition);
    border-bottom: 1px solid #eee;
}

.user-card:hover {
    background-color: #f8f9fa;
}

.user-card:last-child {
    border-bottom: none !important;
}

@media (max-width: 576px) {
    .user-card .badge {
        padding: 5px 8px;
        font-size: 0.75rem;
        margin-bottom: 0;
    }
    
    .user-card .btn-sm {
        margin-top: 5px;
        min-width: 80px;
        padding: 0.3rem 0.5rem;
        border-width: 2px;
    }
    
    .user-card {
        padding: 12px;
    }
    
    .user-card .text-end .badge {
        display: inline-block;
        padding: 0.4rem 0.6rem;
    }
    
    .user-card .btn-outline-warning,
    .user-card .btn-outline-success {
        font-weight: 500;
    }
}

/* Улучшение адаптивности форм аутентификации на мобильных устройствах */
@media (max-width: 576px) {
    .card .card-header h4 {
        font-size: 1.2rem;
    }
    
    .card .card-body.p-4 {
        padding: 1rem !important;
    }
    
    .card .btn-primary,
    .card .btn-secondary {
        padding: 0.4rem 0.8rem;
        font-size: 0.95rem;
    }
    
    .card .form-label {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
    }
    
    .card .form-text {
        font-size: 0.8rem;
    }
    
    .card .card-footer {
        padding: 0.75rem;
    }
}

/* Стили для кнопок на странице диалогов */
.call-row .btn {
    display: flex;
    align-items: center;
}

/* Класс для кнопок с уменьшенной высотой */
.btn-sm-height {
    height: 31px !important;  /* Уменьшение высоты примерно на 30% от стандартной */
    padding-top: 0.15rem !important;
    padding-bottom: 0.15rem !important;
    line-height: 1.2;
}

/* Стили для круговых индикаторов прогресса */
.circular-progress {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
}

.circular-progress::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid;
    border-color: inherit;
    border-right-color: transparent !important;
    border-bottom-color: transparent !important;
    transform: rotate(45deg);
    box-sizing: border-box;
    left: -3px;
    top: -3px;
}

.progress-text {
    font-size: 20px;
    font-weight: 600;
}

.account-summary-item {
    padding: 15px;
}

/* Блоки статистики кликов */
.click-stat-block {
    width: 100%;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.click-stat-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

/* Стили для мобильной кнопки меню */
.mobile-menu-button {
    width: 40px;
    height: 40px;
    background-color: transparent;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
    margin-right: 10px;
    /* Новые стили для фиксированной позиции */
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1010;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-menu-button:hover {
    background-color: rgba(147, 103, 232, 0.1);
}

@media (max-width: 576px) {
    .header {
        padding: 0 15px;
    }
    
    .mobile-menu-button {
        margin-right: 0;
    }
    
    /* На странице авторизации скрываем кнопку меню */
    body:has(.main-content[style*="margin-left: 0"]) .mobile-menu-button {
        display: none !important;
    }
}

.bi-calendar-event, .bi-telephone, .bi-stopwatch, .bi-arrow-down-up, .bi-question-circle, .bi-gear-fill, .bi-bar-chart-fill, .bi-telephone-fill, .bi-grid-1x2-fill, .bi-box-arrow-right, .bi-person-fill {
    color: #6366F1;
}

/* Стили для тултипов Bootstrap */
.tooltip {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    opacity: 1 !important;
}

.tooltip .tooltip-inner {
    max-width: 250px;
    padding: 8px 12px;
    color: white;
    background-color: rgba(33, 37, 41, 0.95);
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: rgba(33, 37, 41, 0.95);
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: rgba(33, 37, 41, 0.95);
}

.tooltip.bs-tooltip-start .tooltip-arrow::before {
    border-left-color: rgba(33, 37, 41, 0.95);
}

.tooltip.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: rgba(33, 37, 41, 0.95);
}

/* Стили для мобильных тултипов */
@media (max-width: 576px) {
    .tooltip .tooltip-inner {
        max-width: 200px;
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

/* Стиль для отключенных кнопок с тултипами */
button.btn:disabled[data-bs-toggle="tooltip"] {
    pointer-events: auto;
    cursor: not-allowed;
}

/* Стили для новой системы уведомлений */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: 350px;
    max-width: calc(100vw - 40px);
}

.notification {
    background-color: #6366F1; /* Цвет боковой панели */
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    padding: 15px;
    transform: translateX(120%);
    transition: transform 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.notification.show {
    transform: translateX(0);
}

.notification-icon {
    margin-right: 12px;
    font-size: 20px;
    flex-shrink: 0;
}

.notification-content {
    flex-grow: 1;
}

.notification-close {
    background: transparent;
    border: none;
    color: white;
    padding: 0;
    margin-left: 15px;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.8;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.notification-close:hover {
    opacity: 1;
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.3);
}

.notification-progress-bar {
    height: 100%;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    transform-origin: left;
    transform: scaleX(0);
    transition: transform linear;
}

.notification.success {
    background-color: #4CAF50;
}

.notification.danger {
    background-color: #F85977;
}

.notification.info {
    background-color: #4CCBF6;
}

.notification.warning {
    background-color: #FFC107;
    color: #333;
}

.notification.warning .notification-close {
    color: #333;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 576px) {
    .notification-container {
        width: calc(100% - 30px);
        right: 15px;
        top: 15px;
    }
    
    .notification {
        padding: 12px;
    }
}

/* Стили для градиентных кнопок и пагинации */
.btn-primary,
.btn-info {
    background-image: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    border: none;
    transition: all 0.3s;
    color: white !important;
}

.btn-primary:hover, 
.btn-primary:focus,
.btn-info:hover,
.btn-info:focus {
    background-image: linear-gradient(135deg, #5457E5 0%, #7D4FE8 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    border: none;
    color: white !important;
}

/* Стили для пагинации */
.pagination .page-item.active .page-link {
    background-image: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    border-color: #5457E5;
}

/* GLOBAL OVERRIDES FOR SETTINGS MENU - HIGHEST PRIORITY */
.sidebar-item:nth-child(2).expanded .submenu.show *,
.sidebar-item:nth-child(3).expanded .submenu.show * {
    color: rgba(255, 255, 255, 0.75) !important;
}

.sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem.active *,
.sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem.active * {
    color: white !important;
}

/* Specifically target icon and text elements */
.sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem a,
.sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem span,
.sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem i,
.sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem a,
.sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem span,
.sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem i {
    color: rgba(255, 255, 255, 0.75) !important;
}

.sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem.active a,
.sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem.active span,
.sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem.active i,
.sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem.active a,
.sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem.active span,
.sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem.active i {
    color: white !important;
}

/* Отключение любых переопределений темного цвета для текста в подпунктах настроек */
.sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem:not(.active) a,
.sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem:not(.active) a span,
.sidebar-item:nth-child(2).expanded .submenu.show .sidebar-subitem:not(.active) a i,
.sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem:not(.active) a,
.sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem:not(.active) a span,
.sidebar-item:nth-child(3).expanded .submenu.show .sidebar-subitem:not(.active) a i {
    color: rgba(255, 255, 255, 0.75) !important;
}

@media (max-width: 992px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }
    
    .sidebar-item a span {
        display: none;
    }
    
    .sidebar-item a i {
        margin-right: 0;
        font-size: 20px;
    }
    
    .main-content {
        margin-left: var(--sidebar-collapsed-width);
        width: calc(100% - var(--sidebar-collapsed-width));
    }
    
    /* Скрываем иконку стрелки в режиме иконок */
    .sidebar-item > a .bi-chevron-down {
        display: none;
    }
    
    /* Скрываем подменю в режиме иконок */
    .submenu {
        display: none;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 15px;
        flex-wrap: wrap;
        height: auto;
        min-height: var(--header-height);
    }
    
    .header-title {
        flex: 100%;
        margin-bottom: 10px;
    }
    
    .header-search {
        flex: 70%;
        justify-content: flex-start;
    }
    
    .header-user {
        flex: 30%;
    }
    
    .search-wrapper {
        width: 100%;
    }
    
    .analytics-overview {
        grid-template-columns: 1fr;
    }
    
    .content-wrapper {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 0;
        left: -var(--sidebar-width);
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar.show {
        width: var(--sidebar-width);
        left: 0;
    }
    
    /* В мобильном виде показываем и текст, и иконки */
    .sidebar.show .sidebar-item a span {
        display: inline;
    }
    
    .sidebar.show .sidebar-item a i {
        margin-right: 12px;
    }
    
    /* Восстанавливаем видимость стрелки для подменю */
    .sidebar.show .sidebar-item > a .bi-chevron-down {
        display: inline-block;
    }
    
    /* Восстанавливаем возможность открытия подменю */
    .sidebar.show .submenu.show {
        display: block;
        max-height: 200px;
    }
    
    /* Увеличиваем область нажатия для пунктов меню на мобильных */
    .sidebar.show .sidebar-item a,
    .sidebar.show .sidebar-subitem a {
        padding: 14px 15px;
        min-height: 48px; /* Минимальная высота для удобства нажатия */
    }
    
    /* Добавляем затемнение фона при открытом меню */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .mobile-menu-overlay.show {
        display: block;
    }
    
    .user-details {
        display: none;
    }
    
    /* Увеличиваем размер кнопки мобильного меню для удобства нажатия */
    .mobile-menu-button {
        width: 48px;
        height: 48px;
        border-radius: 8px;
        font-size: 28px;
        margin-right: 10px;
    }
    
    /* Улучшаем отзывчивость меню на мобильных */
    .sidebar-item.expanded > a {
        background-color: rgba(255, 255, 255, 0.15);
    }
    
    /* Увеличиваем область для распознавания нажатия */
    .sidebar-item > a {
        position: relative;
    }
    
    .sidebar-item > a::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
    }
    
    /* Увеличиваем максимальную высоту подменю для мобильных */
    .submenu.show {
        max-height: 300px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Индикатор для подменю на мобильных */
    .sidebar-item > a .bi-chevron-down {
        position: relative;
        z-index: 2;
    }
    
    /* Предотвращаем скролл основного контента при открытом меню */
    body.menu-open {
        overflow: hidden;
    }
    
    /* Анимация появления меню */
    .sidebar {
        transition: left 0.3s ease, width 0.3s ease;
    }
} 