/* Более специфичные селекторы для иконок */
.navbar-brand img.brand-flag,
.navbar-brand img.brand-logo {
    display: inline-block;
    vertical-align: middle;
}

.navbar-brand img.brand-flag {
    height: 20px;
    margin-right: 8px;
}

.navbar-brand img.brand-logo {
    height: 40px;
    margin-right: 8px;
}

/* Иконки навигации */
.navbar-nav .nav-link img.nav-icon,
.dropdown-menu .dropdown-item img.nav-icon {
    width: 30px !important;
    height: 30px !important;
    margin-right: 8px;
    opacity: 0.9;
    vertical-align: middle;
}

/* Иконки алертов */
.alert img.action-icon {
    width: 25px !important;
    height: 25px !important;
    vertical-align: middle;
}

/* Иконка поиска */
.navbar-search-btn img.search-icon {
    width: 25px !important;
    height: 25px !important;
}

/* Остальные стили остаются без изменений */
.navbar-brand { 
    font-weight: bold; 
}

.pagination { 
    justify-content: center; 
    margin-top: 20px; 
}

.dance-checkbox { 
    cursor: pointer; 
}

.btn-icon {
    padding: 0.25rem 0.4rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-link:hover {
    background-color: #9e91911a;
    border-radius: 0.375rem;
}

.dance-link {
    color: #212529;
    text-decoration: none;
    transition: color 0.2s ease;
}

.dance-link:hover {
    color: #0d6efd;
    text-decoration: underline;
}

.pagination-icon {
    width: 12px;
    height: 12px;
    vertical-align: middle;
}

/* Стили для пользователя */
.user-info {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.username {
    color: #fff;
    font-weight: 500;
    margin-right: 10px;
}

.logout-btn {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.logout-btn:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Стили для массового импорта */
.batch-import-progress {
    height: 25px;
    margin-bottom: 10px;
}

.batch-import-status {
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.import-log {
    max-height: 300px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.85rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 10px;
}

.log-success { 
    color: #198754; 
}

.log-warning { 
    color: #ffc107; 
}

.log-error { 
    color: #dc3545; 
}

.log-info { 
    color: #0dcaf0; 
}

/* Широкий контейнер для всего сайта */
.wide-container {
    max-width: 1795px;
    margin: 0 auto;
}

/* Стили для поиска в навбаре */
.navbar-search-container {
    display: flex;
    align-items: center;
    flex-grow: 1;
    margin-left: 20px;
    max-width: 400px;
}

.navbar-search-form {
    width: 100%;
}

.navbar-search-input {
    border-right: 0;
    border-radius: 0.375rem 0 0 0.375rem;
    padding-right: 35px;
}

.navbar-search-btn {
    border-left: 0;
    border-radius: 0 0.375rem 0.375rem 0;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    background-color: #f8f9fa;
    border-color: #ced4da;
}

.navbar-search-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

/* Стили для кнопки очистки поиска */
.search-clear-btn {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    border: none;
    background: none;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    color: #6c757d;
    font-size: 18px;
    line-height: 1;
}

.search-clear-btn:hover {
    opacity: 1;
    color: #dc3545;
    background: none;
}

.search-clear-btn:focus {
    outline: none;
    box-shadow: none;
}

/* Выравнивание элементов навбара */
.navbar-nav.with-search {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

/* Отладочная панель */
.debug-panel {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: #f8f9fa;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-size: 12px;
    z-index: 1000;
    max-width: 300px;
}

@media (max-width: 1199.98px) {
    .navbar-search-container {
        max-width: 350px;
        margin-left: 15px;
    }
}

@media (max-width: 991.98px) {
    .navbar-search-container {
        max-width: 100%;
        margin: 10px 0;
        order: 2;
    }
    
    .navbar-nav.with-search {
        flex-direction: column;
        align-items: stretch;
    }
    
    .user-info {
        margin-left: 0;
        margin-top: 10px;
        justify-content: center;
    }
    
    .debug-panel {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .navbar-search-container {
        margin-left: 0;
    }
}