/* ═══════════════════════════════════════ */
/* === styles.css === */
/* ═══════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800&display=swap');



body { 

    font-family: 'Inter', sans-serif; 

    background-color: #0F172A; 

    color: #E2E8F0; 

}



/* Эффект стекла */

.glass-panel { 

    background: rgba(30, 41, 59, 0.7); 

    backdrop-filter: blur(12px); 

    border: 1px solid rgba(255, 255, 255, 0.1); 

}



/* Таблицы (Десктоп) */

.trade-table th { 

    text-align: left; 

    padding: 12px; 

    color: #94A3B8; 

    font-size: 11px; 

    border-bottom: 1px solid #334155; 

    text-transform: uppercase; 

    letter-spacing: 0.05em; 

}



.trade-table td { 

    padding: 12px; 

    border-bottom: 1px solid #334155; 

    font-size: 13px; 

    vertical-align: middle; 

}



/* === МОБИЛЬНАЯ АДАПТАЦИЯ (Cards View) === */

@media screen and (max-width: 768px) {

    /* Прячем заголовки таблицы, они не нужны в карточках */

    .trade-table thead { display: none; }

    

    /* Превращаем строку в блочную карточку */

    .trade-table tr { 

        display: block; 

        margin-bottom: 16px; 

        background: #1E293B; 

        border: 1px solid #334155; 

        border-radius: 12px; 

        padding: 12px;

        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);

    }



    /* Ячейки становятся строками внутри карточки */

    .trade-table td { 

        display: flex; 

        justify-content: space-between; 

        align-items: center;

        border-bottom: 1px solid #334155; 

        padding: 8px 0;

        text-align: right;

    }

    

    .trade-table td:last-child { 

        border-bottom: none; 

        padding-top: 12px; 

    }



    /* Добавляем название поля слева (берем из data-label) */

    .trade-table td::before { 

        content: attr(data-label); 

        float: left; 

        font-weight: bold; 

        color: #64748B; 

        text-transform: uppercase; 

        font-size: 10px;

    }

    

    /* Кнопка на всю ширину */

    .trade-table button { 

        width: 100%; 

        margin-top: 8px; 

    }

}



/* Загрузчик */

.loader { 

    border: 4px solid #334155; 

    border-top: 4px solid #3B82F6; 

    border-radius: 50%; 

    width: 40px; 

    height: 40px; 

    animation: spin 1s linear infinite; 

}



@keyframes spin { 

    0% { transform: rotate(0deg); } 

    100% { transform: rotate(360deg); } 

}



/* Всплывающие подсказки (Tooltip) */

[data-tooltip] { 

    position: relative; 

    cursor: help; 

}



[data-tooltip]:hover::after {

    content: attr(data-tooltip); 

    position: absolute; 

    bottom: 100%; 

    left: 50%; 

    transform: translateX(-50%);

    background: #020617; 

    color: white; 

    padding: 8px 12px; 

    border-radius: 6px; 

    font-size: 11px; 

    border: 1px solid #334155; 

    z-index: 100; 

    width: 200px; 

    text-align: center; 

    margin-bottom: 8px;

    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);

    pointer-events: none;

}



/* Кино-режим */

#cinemaOverlay { 

    background: radial-gradient(circle at center, #1e293b 0%, #020617 100%); 

}



.cinema-text { 

    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5); 

}



/* Элементы интерфейса */

.grade-a { 

    background: #065f46; 

    color: #34d399; 

    border: 1px solid #059669; 

    padding: 2px 6px; 

    border-radius: 4px; 

    font-weight: bold; 

}



.grade-b { 

    background: #1e40af; 

    color: #60a5fa; 

    border: 1px solid #2563eb; 

    padding: 2px 6px; 

    border-radius: 4px; 

    font-weight: bold; 

}



.nav-tab.active { 

    color: white; 

    border-bottom: 2px solid #3B82F6; 

}



.nav-tab { 

    color: #94A3B8; 

    border-bottom: 2px solid transparent; 

}



/* === АВТОДОПОЛНЕНИЕ ТИКЕРОВ === */

.suggestions-box {

    position: absolute;

    top: 100%;

    left: 0;

    right: 0;

    background: #1E293B;

    border: 1px solid #334155;

    border-radius: 0.5rem;

    z-index: 100;

    max-height: 280px;

    overflow-y: auto;

    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);

    margin-top: 4px;

}



.suggestion-item {

    padding: 12px 16px;

    cursor: pointer;

    border-bottom: 1px solid #334155;

    display: flex;

    justify-content: space-between;

    align-items: center;

    transition: all 0.2s ease;

}



.suggestion-item:last-child {

    border-bottom: none;

}



.suggestion-item:hover {

    background-color: #334155;

    transform: translateX(2px);

}



/* Скрываем выпадашку при клике вне */

.suggestions-box.hidden {

    display: none;

}



/* Анимация появления */

.suggestions-box {

    animation: fadeInDown 0.2s ease-out;

}



@keyframes fadeInDown {

    from {

        opacity: 0;

        transform: translateY(-10px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}



/* Стилизация селектора языков */

select {

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");

    background-position: right 0.5rem center;

    background-repeat: no-repeat;

    background-size: 1.5em 1.5em;

    padding-right: 2.5rem;

}



/* Стили скроллбара */

::-webkit-scrollbar { 

    width: 8px; 

    height: 8px; 

}



::-webkit-scrollbar-track { 

    background: #0F172A; 

}



::-webkit-scrollbar-thumb { 

    background: #334155; 

    border-radius: 4px; 

}



::-webkit-scrollbar-thumb:hover { 

    background: #475569; 

}



/* Печать PDF */

@media print { 

    body * { visibility: hidden; } 

    #planContent, #planContent * { visibility: visible; } 

    #planContent { 

        position: absolute; 

        left: 0; 

        top: 0; 

        width: 100%; 

        margin: 0; 

        box-shadow: none; 

    } 

    #planModalBtn { display: none; } 

}



.doc-paper { 

    background-color: #fff; 

    color: #1e293b; 

    font-family: 'Georgia', serif; 

    box-shadow: 0 0 20px rgba(0,0,0,0.5); 

}
/* Date Picker стили */
input[type="date"] {
    color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

input[type="date"]::-webkit-datetime-edit-text,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
    color: white;
}

/* ═══════════════════════════════════════ */
/* === market_regime_indicator.css === */
/* ═══════════════════════════════════════ */
/* ========================================
   🎯 MRI SPEEDOMETER - COMPACT STYLES
   Только необходимые стили для интеграции
======================================== */

.mri-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(145deg, #1e293b 0%, #334155 100%);
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    width: fit-content;
    transition: all 0.3s ease;
}

.mri-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(96, 165, 250, 0.2);
}

/* ========================================
   СПИДОМЕТР SVG
======================================== */

.mri-dial {
    width: 140px;
    height: 85px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* Основная дуга с градиентом */
.speedometer-arc {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Стрелка спидометра */
.speedometer-needle {
    stroke: #ffffff;
    stroke-width: 3;
    stroke-linecap: round;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Центральная точка стрелки */
.speedometer-center {
    fill: #ffffff;
    stroke: #64748b;
    stroke-width: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* ========================================
   СТАТУС
======================================== */

.mri-status {
    text-align: center;
    max-width: 180px;
}

.mri-status-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    transition: color 0.5s ease;
}

.mri-status-subtitle {
    font-size: 9px;
    color: #94a3b8;
    line-height: 1.3;
    font-weight: 500;
}

/* Цвета статусов */
.status-bearish { color: #ef4444; }
.status-cautious { color: #f59e0b; }
.status-neutral { color: #6b7280; }
.status-optimistic { color: #84cc16; }
.status-bullish { color: #22c55e; }

/* ========================================
   МЕТКИ НА СПИДОМЕТРЕ
======================================== */

.scale-label {
    font-size: 8px;
    font-weight: 600;
    fill: #64748b;
    text-anchor: middle;
    dominant-baseline: middle;
}

.scale-tick {
    stroke: #475569;
    stroke-width: 1;
    stroke-linecap: round;
}

/* ========================================
   АНИМАЦИИ
======================================== */

.mri-updating .speedometer-needle {
    animation: needle-update 0.8s ease-out;
}

@keyframes needle-update {
    0% { opacity: 1; }
    30% { opacity: 0.7; transform: scale(1.02); }
    100% { opacity: 1; transform: scale(1); }
}

/* ========================================
   HOVER ЭФФЕКТЫ
======================================== */

.mri-container:hover .speedometer-needle {
    stroke: #60a5fa;
    filter: drop-shadow(0 3px 6px rgba(96, 165, 250, 0.4));
}

.mri-container:hover .speedometer-center {
    fill: #60a5fa;
}

/* ========================================
   АДАПТИВНОСТЬ
======================================== */

@media (max-width: 1024px) {
    .mri-dial {
        width: 120px;
        height: 75px;
    }
    
    .speedometer-arc {
        stroke-width: 10;
    }
    
    .speedometer-needle {
        stroke-width: 2;
    }
    
    .mri-container {
        padding: 10px;
        gap: 6px;
    }
    
    .mri-status-title {
        font-size: 10px;
    }
    
    .mri-status-subtitle {
        font-size: 8px;
    }
}

@media (max-width: 640px) {
    .mri-dial {
        width: 100px;
        height: 60px;
    }
    
    .speedometer-arc {
        stroke-width: 8;
    }
    
    .speedometer-needle {
        stroke-width: 2;
    }
    
    .mri-container {
        padding: 8px;
        gap: 4px;
    }
    
    .mri-status-title {
        font-size: 9px;
    }
    
    .mri-status-subtitle {
        font-size: 7px;
    }
}

/* ═══════════════════════════════════════ */
/* === mri_landing_widget.css === */
/* ═══════════════════════════════════════ */
/* ========================================
   🎯 MRI LANDING WIDGET STYLES
   Компактный виджет с "невидимым полем"
======================================== */

.mri-landing-widget {
    position: fixed;
    top: 72px;
    right: 16px;
    z-index: 35;
    width: 155px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(71, 85, 105, 0.4);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.mri-landing-widget:hover {
    /* Убрал transform для стабильной позиции */
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(96, 165, 250, 0.2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* ========================================
   HEADER
======================================== */

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px 4px 12px;  /* Еще меньше padding */
    border-bottom: 1px solid rgba(71, 85, 105, 0.15); /* Слабая граница */
}

.widget-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #cbd5e1;
}

.widget-score {
    font-size: 13px;
    font-weight: 800;
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(96, 165, 250, 0.25);
}

/* ========================================
   СПИДОМЕТР
======================================== */

.speedometer-container {
    display: flex;
    justify-content: center;
    padding: 4px 12px 2px 12px;  /* Меньше padding */
}

.mri-dial-landing {
    width: 110px;
    height: 68px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

.speedometer-arc-landing {
    fill: none;
    stroke-width: 7;    /* Тоньше - было 8 */
    stroke-linecap: round;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
}

.speedometer-needle-landing {
    stroke: #ffffff;
    stroke-width: 2;    
    stroke-linecap: round;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.speedometer-arc-landing {
    fill: none;
    stroke-width: 8;    /* Уменьшил с 10 */
    stroke-linecap: round;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.speedometer-needle-landing {
    stroke: #ffffff;
    stroke-width: 2;    /* Уменьшил с 3 */
    stroke-linecap: round;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.speedometer-center-landing {
    fill: #ffffff;
    stroke: #64748b;
    stroke-width: 1;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

.scale-label-landing {
    display: none; /* Скрываем BEAR/NEUTRAL/BULL — дублируют русский текст */
}

.scale-tick-landing {
    stroke: #475569;
    stroke-width: 1;
    stroke-linecap: round;
}

.scale-tick-landing {
    stroke: #475569;
    stroke-width: 1;
    stroke-linecap: round;
}

/* ========================================
   КОНТЕНТ
======================================== */

.widget-content {
    padding: 4px 12px 10px 12px;  /* Меньше padding */
}

.status-text {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    margin-bottom: 5px;
    transition: color 0.5s ease;
}

.smart-phrase {
    font-size: 11px;
    line-height: 1.35;
    color: #e2e8f0;
    text-align: center;
    margin-bottom: 5px;
    font-weight: 500;
}

.update-date {
    font-size: 9px;
    color: #64748b;
    text-align: center;
    font-weight: 500;
    border-top: 1px solid rgba(71, 85, 105, 0.2);
    padding-top: 4px;
}

/* ========================================
   ЦВЕТА СТАТУСОВ
======================================== */

.status-bearish { color: #ef4444; }
.status-cautious { color: #f59e0b; }
.status-neutral { color: #6b7280; }
.status-optimistic { color: #84cc16; }
.status-bullish { color: #22c55e; }

/* ========================================
   HOVER ЭФФЕКТЫ
======================================== */

.mri-landing-widget:hover .speedometer-needle-landing {
    stroke: #60a5fa;
    filter: drop-shadow(0 3px 8px rgba(96, 165, 250, 0.4));
}

.mri-landing-widget:hover .speedometer-center-landing {
    fill: #60a5fa;
}

.mri-landing-widget:hover .widget-score {
    background: rgba(96, 165, 250, 0.2);
    border-color: rgba(96, 165, 250, 0.4);
}

/* ========================================
   АНИМАЦИИ
======================================== */

.mri-updating .speedometer-needle-landing {
    animation: needle-update-landing 1s ease-out;
}

@keyframes needle-update-landing {
    0% { opacity: 1; }
    30% { opacity: 0.7; transform: scale(1.03); }
    100% { opacity: 1; transform: scale(1); }
}

.mri-updating .status-text {
    animation: status-flash-landing 0.8s ease-out;
}

@keyframes status-flash-landing {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* ========================================
   АДАПТИВНОСТЬ
======================================== */

/* Планшеты */
@media (max-width: 1024px) {
    .mri-landing-widget {
        width: 160px;       /* Еще меньше на планшетах */
        top: 85px;          /* Под меню на планшетах */
        right: 8px;         /* Под кнопками управления */
    }
    
    .mri-dial-landing {
        width: 110px;       /* Компактнее */
        height: 70px;       
    }
    
    .speedometer-arc-landing {
        stroke-width: 6;    
    }
    
    .widget-title {
        font-size: 8px;     
    }
    
    .widget-score {
        font-size: 10px;    
    }
    
    .status-text {
        font-size: 9px;    
    }
    
    .smart-phrase {
        font-size: 8px;     
    }
}

/* Мобильные */
@media (max-width: 640px) {
    .mri-landing-widget {
        width: 140px;       /* Очень компактно */
        top: 90px;          /* Под меню на мобильных */
        right: 5px;         /* С учетом меньшего экрана */
    }
    
    .mri-dial-landing {
        width: 95px;       
        height: 60px;       
    }
    
    .speedometer-arc-landing {
        stroke-width: 5;    
    }
    
    .widget-header {
        padding: 6px 8px 3px 8px;
    }
    
    .widget-content {
        padding: 3px 8px 8px 8px; 
    }
    
    .widget-title {
        font-size: 7px;     
    }
    
    .widget-score {
        font-size: 9px;    
        padding: 1px 4px;   
    }
    
    .status-text {
        font-size: 8px;    
    }
    
    .smart-phrase {
        font-size: 7px;     
    }
    
    .update-date {
        font-size: 6px;     
    }
}

/* Очень маленькие экраны - скрываем */
@media (max-width: 480px) {
    .mri-landing-widget {
        display: none;
    }
}

/* ========================================
   СОСТОЯНИЯ ЗАГРУЗКИ
======================================== */

.mri-landing-widget.loading .speedometer-needle-landing {
    animation: loading-spin 2s linear infinite;
}

@keyframes loading-spin {
    0% { transform: rotate(180deg); }
    100% { transform: rotate(360deg); }
}

.mri-landing-widget.error {
    border-color: rgba(239, 68, 68, 0.4);
}

.mri-landing-widget.error .widget-score {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}
