/* static/css/style.css (v5.2 MVP) */

/* GLOBAL DARK THEME */
body {
    background-color: #0d1117;
    color: #e6edf3;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9rem;
}

/* KPI CARDS */
.kpi-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.kpi-val { font-size: 1.8em; font-weight: bold; color: #e6edf3; }
.kpi-label { font-size: 0.8em; text-transform: uppercase; color: #8b949e; letter-spacing: 0.5px; margin-top: 5px; }

/* TABS */
.nav-tabs { border-bottom: 1px solid #30363d; }
.nav-tabs .nav-link { color: #8b949e; border: 1px solid transparent; transition: all 0.2s; cursor: pointer; }
.nav-tabs .nav-link.active { background-color: #1f6feb !important; color: #fff !important; border-color: #1f6feb; font-weight: bold; }
.nav-tabs .nav-link:hover:not(.active) { border-color: #30363d; color: #c9d1d9; }

/* TABLES */
.table-dark { background-color: #161b22; --bs-table-bg: #161b22; --bs-table-border-color: #30363d; color: #e6edf3 !important; }
.table-hover tbody tr:hover { background-color: rgba(56, 139, 253, 0.1) !important; }
.table td, .table th { border-color: #30363d; vertical-align: middle; color: #e6edf3; }
.text-muted { color: #8b949e !important; }

/* CSS DOTS */
.css-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    box-shadow: 0 0 4px rgba(0,0,0,0.5); 
}
.dot-red { background-color: #f85149; border: 1px solid #da3633; }
.dot-green { background-color: #3fb950; border: 1px solid #238636; }

/* COLUMN WIDTHS */
#resultsTable td:last-child {
    min-width: 160px;
    white-space: nowrap;
}

/* MODAL & CHART (MVP HEIGHT 350px) */
.modal-content { background-color: #161b22; color: #e6edf3; border: 1px solid #30363d; }
.modal-header { border-bottom: 1px solid #30363d; }

.chart-container, #chartContainer { 
    position: relative; 
    height: 350px !important; /* Уменьшили высоту по просьбе */
    width: 100%; 
    min-height: 350px;
}

/* HISTORY SCROLL (NEW) */
.history-scroll-wrapper {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #30363d;
    border-radius: 4px;
}
.history-scroll-wrapper::-webkit-scrollbar { width: 8px; height: 8px; }
.history-scroll-wrapper::-webkit-scrollbar-track { background: #0d1117; }
.history-scroll-wrapper::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }
.history-scroll-wrapper::-webkit-scrollbar-thumb:hover { background: #58a6ff; }

/* BADGES */
.badge-buy { background-color: rgba(35, 134, 54, 0.2); color: #3fb950; border: 1px solid rgba(63, 185, 80, 0.4); padding: 4px 8px; border-radius: 4px; font-weight: 600; }
.badge-sell { background-color: rgba(218, 54, 51, 0.2); color: #f85149; border: 1px solid rgba(248, 81, 73, 0.4); padding: 4px 8px; border-radius: 4px; font-weight: 600; }

/* FORMS */
.form-control-dark { background-color: #0d1117 !important; border: 1px solid #30363d !important; color: #ffffff !important; }
.form-control-dark:focus { border-color: #1f6feb !important; box-shadow: 0 0 0 0.25rem rgba(31, 111, 235, 0.25) !important; }

/* MAIN SCROLLBAR */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0d1117; }
::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #58a6ff; }

/* PRINT */
@media print {
    body { -webkit-print-color-adjust: exact; }
    .kpi-card, .card, .table-dark { background-color: #161b22 !important; color: #000 !important; }
}