/* ============ МИНИМАЛИСТИЧНАЯ НАВИГАЦИЯ ============ */

.table-nav-container {
    position: relative;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

.absolute-minimal-nav {
    display: flex;
    gap: 4px;
    padding: 15px 0;
    position: relative;
}

.absolute-item {
    width: 35px;
    height: 4px;
    background: rgba(95, 170, 184, 0.2);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.absolute-item:hover {
    background: var(--sea-turquoise);
    transform: scaleY(1.3);
}

.absolute-item.active {
    background: var(--sea-turquoise);
    box-shadow: 0 1px 4px rgba(95, 170, 184, 0.3);
}

/* Подсказки при наведении */
.absolute-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-blue);
    color: var(--light-beige);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    z-index: 100;
}

.absolute-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--dark-blue);
}

.absolute-item:hover .absolute-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

/* Анимация пульсации */
@keyframes absolutePulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.absolute-item.pulse {
    animation: absolutePulse 2s ease-in-out infinite;
}

/* ============ ВЕРХНИЕ ТАБЫ ДЛЯ МОБИЛЬНЫХ ============ */

.mobile-main-tabs {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.mobile-tabs-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mobile-tabs-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.mobile-tabs-scroll {
    display: flex;
    padding: 0 16px;
    gap: 8px;
    min-width: min-content;
}

.mobile-tab {
    flex: 0 0 auto;
    padding: 10px 16px;
    background: var(--section-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.mobile-tab.active {
    background: var(--sea-turquoise);
    color: var(--dark-blue);
    border-color: var(--sea-turquoise);
}

.mobile-tab:active {
    transform: scale(0.98);
}

/* ============ НИЖНЯЯ НАВИГАЦИЯ ДЛЯ МОБИЛЬНЫХ ============ */

.mobile-bottom-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    z-index: 1100;
    padding: 10px 16px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-bottom-navigation.visible {
    transform: translateY(0);
}

/* Адаптация MinimalNavigation для мобильных в нижней панели */
.mobile-bottom-navigation .table-nav-container {
    margin: 0;
    padding: 0;
    position: relative;
    height: auto;
}

.mobile-bottom-navigation .absolute-minimal-nav {
    display: flex;
    justify-content: space-between;
    gap: 2px;
}

.mobile-bottom-navigation .absolute-item {
    flex: 1;
    height: 4px;
    margin: 0;
    background: var(--border);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-bottom-navigation .absolute-item.active {
    background: var(--sea-turquoise);
    height: 6px;
}

.mobile-bottom-navigation .absolute-tooltip {
    display: none;
}

/* ============ УЛЬТРА-ЧИСТАЯ ВЕРСИЯ ============ */

.ultra-clean {
    border-top: none;
    padding-top: 25px;
}

.ultra-clean .absolute-minimal-nav {
    padding: 10px 0;
}

/* ============ ОТСТУП ДЛЯ МОБИЛЬНОЙ СТРАНИЦЫ ============ */

body.mobile-detail-page {
    padding-bottom: 70px;
}

/* ============ ТЕМНАЯ ТЕМА ДЛЯ НАВИГАЦИИ ============ */

:root[data-theme="dark"] .mobile-main-tabs {
    background: var(--card-bg);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .mobile-tab {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

:root[data-theme="dark"] .mobile-tab.active {
    background: var(--sea-turquoise);
    color: var(--dark-blue);
    border-color: var(--sea-turquoise);
}

:root[data-theme="dark"] .mobile-bottom-navigation {
    background: var(--card-bg);
    border-top-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .mobile-bottom-navigation .absolute-item {
    background: rgba(255, 255, 255, 0.2);
}

:root[data-theme="dark"] .mobile-bottom-navigation .absolute-item.active {
    background: var(--sea-turquoise);
}

/* ============ АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ ============ */

@media (max-width: 768px) {
    .table-nav-container {
        margin-top: 30px;
        padding-top: 15px;
    }
    
    .absolute-item {
        width: 30px;
        height: 3px;
    }
    
    .absolute-tooltip {
        font-size: 0.7rem;
        padding: 5px 8px;
    }
    
    /* На мобильных показываем подсказку при тапе на активном элементе */
    .absolute-item.active .absolute-tooltip {
        opacity: 1;
        transform: translateX(-50%) translateY(-2px);
    }
    
    /* Для нижней навигации на мобильных показываем подсказку только на активном элементе */
    .mobile-bottom-navigation .absolute-item.active .absolute-tooltip {
        display: block;
        opacity: 1;
    }
}

/* ============ ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (до 480px) ============ */

@media (max-width: 480px) {
    .table-nav-container {
        margin-top: 20px;
        padding-top: 10px;
    }
    
    .absolute-item {
        width: 25px;
        height: 3px;
    }
    
    .mobile-tab {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .mobile-bottom-navigation {
        padding: 8px 12px;
    }
    
    .mobile-bottom-navigation .absolute-item {
        height: 3px;
    }
    
    .mobile-bottom-navigation .absolute-item.active {
        height: 5px;
    }
    
    body.mobile-detail-page {
        padding-bottom: 60px;
    }
}

/* ============ ПЛАНШЕТЫ (от 481px до 768px) ============ */

@media (min-width: 481px) and (max-width: 768px) {
    .mobile-bottom-navigation .absolute-tooltip {
        display: block;
        opacity: 0;
    }
    
    .mobile-bottom-navigation .absolute-item:hover .absolute-tooltip {
        opacity: 1;
        transform: translateX(-50%) translateY(-2px);
    }
}

/* ============ ДЕСКТОПНЫЕ УЛУЧШЕНИЯ ============ */

@media (min-width: 769px) {
    /* На десктопе скрываем мобильную навигацию */
    .mobile-main-tabs,
    .mobile-bottom-navigation {
        display: none !important;
    }
}

/* ============ СТИЛИ ИЗ FINANCIALS.HTML ============ */
/* Добавлено для удаления inline-css */

/* Дополнительные стили для мобильных табов */
@media (max-width: 768px) {
    .mobile-main-tabs {
        padding: 10px 0;
        border-bottom: 1px solid var(--border-light);
    }
    
    .mobile-tabs-scroll-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .mobile-tabs-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }
    
    .mobile-tabs-scroll {
        display: flex;
        padding: 0 16px;
        gap: 8px;
        min-width: min-content;
    }
    
    .mobile-tab {
        flex: 0 0 auto;
        padding: 10px 16px;
        background: var(--section-bg);
        border: 1px solid var(--border);
        border-radius: 20px;
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--muted);
        cursor: pointer;
        white-space: nowrap;
        transition: all 0.2s ease;
    }
    
    .mobile-tab.active {
        background: var(--sea-turquoise);
        color: var(--dark-blue);
        border-color: var(--sea-turquoise);
    }
    
    .mobile-tab:active {
        transform: scale(0.98);
    }
}

/* ============ КОНЕЦ СТИЛЕЙ НАВИГАЦИИ ============ */