/* Case Track - Основные стили */

/* ===== ОСНОВНЫЕ СТИЛИ ===== */
body {
    background: #0a0e1a;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== НАВИГАЦИЯ ===== */
.navbar-brand {
    font-weight: bold;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-dark {
    background: linear-gradient(135deg, #1a1f2e 0%, #2d3748 100%) !important;
}

/* ===== КАРТОЧКИ ===== */
.card {
    background: #1a1f2e;
    border: 1px solid #2d3748;
    border-radius: 15px;
}

.card-header {
    background: #2d3748;
    border-bottom: 1px solid #2d3748;
    color: #667eea;
    font-weight: bold;
}

.card, .card-body, .card-title, .card-text {
    color: #fff !important;
}

.table,
.table th,
.table td {
    background-color: transparent !important;
    color: #fff !important;
}

.list-group-item {
    background: transparent;
    color: #fff;
    border-color: #2d3748;
}

.card .form-label, .card .form-control, .card .form-check-label {
    color: #fff;
}

/* ===== КНОПКИ ===== */
.btn-outline-primary {
    border-color: #667eea;
    color: #667eea;
}

.btn-outline-primary:hover,
.btn-outline-primary.active {
    background-color: #667eea;
    border-color: #667eea;
    color: #ffffff;
}

/* ===== ИНДИКАТОРЫ ===== */
.indicator-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    border: 1px solid #2d3748;
}

.indicator-value {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.indicator-label {
    font-size: 12px;
    color: #a0aec0;
}

/* ===== ТОРГОВЫЕ БОТЫ ===== */
.bot-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
}

.status-badge {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
}

.status-active {
    background: #48bb78;
    color: #ffffff;
}

.status-stopped {
    background: #f56565;
    color: #ffffff;
}

.status-paused {
    background: #ed8936;
    color: #ffffff;
}

.profit-positive {
    color: #48bb78;
}

.profit-negative {
    color: #f56565;
}

/* ===== ГРАФИКИ ===== */
.chart-container {
    height: 500px;
    position: relative;
}

/* ===== ЗАГРУЗКА ===== */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #a0aec0;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .chart-container {
        height: 300px;
    }
    
    .indicator-value {
        font-size: 16px;
    }
}

/* ===== ФОРМА АВТОРИЗАЦИИ ===== */
.card.auth-card {
    background: #fff;
    color: #222;
    border-radius: 15px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.15);
}
.auth-card .form-label,
.auth-card .form-control,
.auth-card .form-check-label {
    color: #222;
}
.auth-card .form-control {
    background: #f5f6fa;
    color: #222;
    border: 1px solid #cbd5e1;
}
.auth-card .form-control:focus {
    background: #fff;
    color: #222;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102,126,234,.15);
}
.auth-card .btn-primary {
    background: #667eea;
    border-color: #667eea;
}
.auth-card .btn-primary:hover {
    background: #5a67d8;
    border-color: #5a67d8;
}
.auth-card .invalid-feedback {
    color: #e53e3e;
}

/* ===== TRADING VIEW PANEL ===== */
.trading-view-panel {
    background: #1a1f2e;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.controls {
    background: #2d3748;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.chart-container {
    background: #1e222d;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.chart-area {
    height: 400px;
    width: 100%;
    position: relative;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.connected {
    background: #48bb78;
}

.status-dot.disconnected {
    background: #f56565;
}

.symbol-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.symbol-item {
    padding: 8px 12px;
    cursor: pointer;
    color: #fff;
    border-bottom: 1px solid #4a5568;
}

.symbol-item:hover {
    background: #4a5568;
}

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

.analytics-panels {
    margin-top: 20px;
}

.panel {
    background: #2d3748;
    border-radius: 10px;
    padding: 15px;
    height: 300px;
    overflow-y: auto;
}

.panel h5 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: bold;
}

.indicators-list,
.levels-list,
.patterns-list,
.trades-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.indicator-item,
.level-item,
.pattern-item,
.trade-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
    border-left: 3px solid #667eea;
}

.indicator-name,
.level-type,
.pattern-name,
.trade-symbol {
    font-weight: bold;
    color: #fff;
    font-size: 14px;
    margin-bottom: 5px;
}

.indicator-value,
.level-price,
.pattern-direction,
.trade-price {
    font-size: 16px;
    font-weight: bold;
    color: #48bb78;
    margin-bottom: 3px;
}

.indicator-probability,
.level-strength,
.pattern-probability {
    font-size: 12px;
    color: #a0aec0;
}

.trade-side {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
}

.trade-side.buy {
    background: #48bb78;
    color: #fff;
}

.trade-side.sell {
    background: #f56565;
    color: #fff;
}

.trade-amount {
    font-size: 12px;
    color: #a0aec0;
}

.trade-profit {
    font-size: 12px;
    font-weight: bold;
}

/* ===== PROBABILITY TOOLTIPS ===== */
.probability-tooltip {
    position: absolute;
    background: rgba(26, 31, 46, 0.95);
    border: 1px solid #4a5568;
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-size: 12px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.tooltip-content {
    min-width: 200px;
}

.tooltip-title {
    font-weight: bold;
    color: #667eea;
    margin-bottom: 8px;
    font-size: 14px;
}

.tooltip-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    padding: 2px 0;
}

.level-type {
    color: #a0aec0;
    text-transform: capitalize;
}

.probability {
    font-weight: bold;
    color: #48bb78;
}

/* ===== CHART ENHANCEMENTS ===== */
.chart-area {
    position: relative;
}

.chart-container {
    position: relative;
}

/* Стили для индикаторов на графике */
.chart-indicator {
    position: absolute;
    background: rgba(26, 31, 46, 0.9);
    border: 1px solid #4a5568;
    border-radius: 4px;
    padding: 8px;
    font-size: 11px;
    color: #fff;
    z-index: 100;
}

/* Цвета для индикаторов */
.text-success {
    color: #48bb78 !important;
}

.text-danger {
    color: #f56565 !important;
}

.text-warning {
    color: #ed8936 !important;
}

.text-info {
    color: #4299e1 !important;
}

.no-data {
    text-align: center;
    color: #a0aec0;
    font-style: italic;
    padding: 20px;
}

/* ===== УЛУЧШЕННЫЕ СТИЛИ ДЛЯ АНАЛИТИКИ ===== */

/* Индикаторы */
.indicator-item {
    border-bottom: 1px solid #2d3748;
    padding: 10px 0;
}

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

.indicator-probability.bullish {
    color: #48bb78;
    font-weight: bold;
}

.indicator-probability.bearish {
    color: #f56565;
    font-weight: bold;
}

.indicator-probability.neutral {
    color: #a0aec0;
}

.indicator-probability.volatile {
    color: #ed8936;
    font-weight: bold;
}

.indicator-probability.consolidation {
    color: #a0aec0;
}

.indicator-probability.high {
    color: #48bb78;
    font-weight: bold;
}

.indicator-probability.normal {
    color: #a0aec0;
}

.indicator-probability.stable {
    color: #a0aec0;
}

.overall-analysis {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    margin-top: 10px;
    padding: 15px;
    border: 1px solid #667eea;
}

.indicator-value.bullish {
    color: #48bb78;
}

.indicator-value.bearish {
    color: #f56565;
}

.indicator-value.volatile {
    color: #ed8936;
}

.indicator-value.stable {
    color: #a0aec0;
}

/* Уровни */
.level-item {
    border-bottom: 1px solid #2d3748;
    padding: 10px 0;
}

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

.level-type {
    font-weight: bold;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 5px;
}

.level-type.vwap {
    background: #667eea;
    color: #ffffff;
}

.level-type.fibonacci {
    background: #ed8936;
    color: #ffffff;
}

.level-type.order-block {
    background: #48bb78;
    color: #ffffff;
}

.level-type.pivot {
    background: #9f7aea;
    color: #ffffff;
}

.level-type.support {
    background: #48bb78;
    color: #ffffff;
}

.level-type.resistance {
    background: #f56565;
    color: #ffffff;
}

.level-type.unknown {
    background: #a0aec0;
    color: #ffffff;
}

.strength-label {
    color: #a0aec0;
    font-size: 12px;
}

.strength-value {
    font-weight: bold;
    margin-left: 5px;
}

.strength-value.very-strong {
    color: #48bb78;
}

.strength-value.strong {
    color: #9f7aea;
}

.strength-value.medium {
    color: #ed8936;
}

.strength-value.weak {
    color: #a0aec0;
}

.strength-value.neutral {
    color: #a0aec0;
}

.level-confirmed {
    color: #48bb78;
    font-size: 12px;
    font-weight: bold;
    margin-top: 5px;
}

.level-touches {
    color: #a0aec0;
    font-size: 12px;
    margin-top: 2px;
}

/* Паттерны */
.pattern-item {
    border-bottom: 1px solid #2d3748;
    padding: 10px 0;
}

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

.pattern-name {
    font-weight: bold;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 5px;
}

.pattern-name.pivot-high,
.pattern-name.missed-pivot-high {
    background: #f56565;
    color: #ffffff;
}

.pattern-name.pivot-low,
.pattern-name.missed-pivot-low {
    background: #48bb78;
    color: #ffffff;
}

.pattern-name.order-block-bullish {
    background: #48bb78;
    color: #ffffff;
}

.pattern-name.order-block-bearish {
    background: #f56565;
    color: #ffffff;
}

.pattern-name.bos-bullish {
    background: #48bb78;
    color: #ffffff;
}

.pattern-name.bos-bearish {
    background: #f56565;
    color: #ffffff;
}

.pattern-name.choch-bullish {
    background: #48bb78;
    color: #ffffff;
}

.pattern-name.choch-bearish {
    background: #f56565;
    color: #ffffff;
}

.pattern-name.unknown {
    background: #a0aec0;
    color: #ffffff;
}

.pattern-direction {
    font-weight: bold;
    margin-bottom: 5px;
}

.pattern-direction.BULLISH {
    color: #48bb78;
}

.pattern-direction.BEARISH {
    color: #f56565;
}

.pattern-direction.NEUTRAL {
    color: #a0aec0;
}

.probability-label {
    color: #a0aec0;
    font-size: 12px;
}

.probability-value {
    font-weight: bold;
    margin-left: 5px;
}

.pattern-figure {
    color: #ed8936;
    font-size: 12px;
    font-weight: bold;
    margin-top: 5px;
}

.pattern-confirmed {
    color: #48bb78;
    font-size: 12px;
    font-weight: bold;
    margin-top: 5px;
}

.pattern-size {
    color: #a0aec0;
    font-size: 12px;
    margin-top: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .trading-view-panel {
        padding: 15px;
    }
    
    .controls {
        padding: 15px;
    }
    
    .chart-area {
        height: 300px;
    }
    
    .panel {
        height: 250px;
        margin-bottom: 15px;
    }
}
