/* Dashboards: Ratings + Symbol Analysis */

/* ---------- Toolbar ---------- */
.dash-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.dash-toolbar__picker {
    width: 280px;
    max-width: 100%;
}

.dash-toolbar__updated {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
}

/* ---------- Chart pills ---------- */
.chart-pills {
    display: flex;
    gap: 4px;
}

.chart-pill {
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.chart-pill:hover {
    background: var(--bg-soft);
    color: var(--text);
}

.chart-pill.is-active {
    background: var(--bg-soft);
    color: var(--link);
}

/* ---------- Analysis header ---------- */
.analysis-head {
    margin-bottom: 18px;
}

.analysis-head__price {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
}

.analysis-head__value {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
}

.analysis-head__chg {
    font-size: 16px;
    font-weight: 600;
}

.analysis-head__summary {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    max-width: 820px;
}

/* ---------- Stat cards ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.stat-card__label {
    font-size: 12px;
    color: var(--text-muted);
}

.stat-card__value {
    font-size: 18px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.stat-card__value.up {
    color: var(--bid);
}

.stat-card__value.down {
    color: var(--ask);
}

/* ---------- Chart cards ---------- */
.chart-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 14px 16px 8px;
    margin-bottom: 18px;
}

.chart-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.chart-card__head h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.chart-card__legend {
    font-size: 13px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.chart-card__legend.up {
    color: var(--bid);
}

.chart-card__legend.down {
    color: var(--ask);
}

.candle-chart {
    width: 100%;
    min-height: 150px;
}

.chart-empty {
    padding: 60px;
    text-align: center;
    color: var(--text-muted);
}

/* ---------- SVG chart ---------- */
.candle-chart svg {
    display: block;
    width: 100%;
}

.candle.up {
    fill: var(--bid);
    stroke: var(--bid);
}

.candle.down {
    fill: var(--ask);
    stroke: var(--ask);
}

.candle.up-wick {
    stroke: var(--bid);
}

.candle.down-wick {
    stroke: var(--ask);
}

.grid-line {
    stroke: var(--border);
    stroke-width: 1;
    stroke-dasharray: 3 4;
}

.axis-label {
    fill: var(--text-muted);
    font-size: 11px;
    font-family: inherit;
}

.axis-label--x {
    text-anchor: middle;
}

/* ---------- Rating score ---------- */
.rating-table .col-score {
    width: 150px;
    text-align: left;
}

.score {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}

.score__val {
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.score__label {
    font-size: 12px;
    font-weight: 600;
}

.score__track {
    height: 6px;
    border-radius: 3px;
    background: var(--bg-soft);
    overflow: hidden;
}

.score__fill {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: var(--text-muted);
}

.score__label.score--strong,
.score__val.score--strong {
    color: var(--bid);
}

.score__fill.score--strong {
    background: var(--bid);
}

.score__label.score--good {
    color: var(--bid);
}

.score__fill.score--good {
    background: var(--bid);
    opacity: 0.75;
}

.score__label.score--fair {
    color: #f0b90b;
}

.score__fill.score--fair {
    background: #f0b90b;
}

.score__label.score--weak {
    color: #ff9f43;
}

.score__fill.score--weak {
    background: #ff9f43;
}

.score__label.score--poor {
    color: var(--ask);
}

.score__fill.score--poor {
    background: var(--ask);
}

/* ---------- Forecast ---------- */
.fc-card {
    display: grid;
    grid-template-columns: minmax(280px, 340px) 1fr;
    gap: 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 18px;
}

.fc-verdict {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fc-verdict__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.fc-pair {
    font-size: 15px;
    font-weight: 700;
}

.fc-price {
    font-size: 14px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.fc-verdict__main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fc-dir {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.fc-dir__arrow {
    font-size: 14px;
    line-height: 1;
}

.fc-dir.up {
    color: var(--bid);
    background: rgba(14, 203, 129, 0.12);
}

.fc-dir.down {
    color: var(--ask);
    background: rgba(246, 70, 93, 0.12);
}

.fc-dir.flat {
    color: var(--text-muted);
    background: var(--bg-soft);
}

.fc-dir.up .fc-dir__arrow {
    transform: rotate(-90deg);
}

.fc-dir.down .fc-dir__arrow {
    transform: rotate(90deg);
}

.fc-prob {
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.fc-meter {
    height: 8px;
    border-radius: 4px;
    background: var(--bg-soft);
    overflow: hidden;
}

.fc-meter__fill {
    display: block;
    height: 100%;
    border-radius: 4px;
    background: var(--text-muted);
    transition: width 0.3s ease;
}

.fc-meter__fill.up {
    background: var(--bid);
}

.fc-meter__fill.down {
    background: var(--ask);
}

.fc-meter__fill.flat {
    background: var(--text-muted);
}

.fc-verdict__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.fc-verdict__meta strong {
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.fc-indicators {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    align-content: start;
}

.fc-ind {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-soft);
}

.fc-ind__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.fc-ind__label {
    font-size: 12px;
    color: var(--text-muted);
}

.fc-ind__value {
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.fc-ind__note {
    font-size: 11px;
    color: var(--text-muted);
}

.fc-ind__bar {
    position: relative;
    height: 6px;
    border-radius: 3px;
    background: var(--bg);
    overflow: hidden;
}

.fc-ind__bar::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border-strong);
}

.fc-ind__fill {
    position: absolute;
    top: 0;
    bottom: 0;
    border-radius: 3px;
}

.fc-ind__fill.up {
    background: var(--bid);
}

.fc-ind__fill.down {
    background: var(--ask);
}

/* Scan table */
.forecast-table .col-signal {
    width: 130px;
}

.signal-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.signal-badge.up {
    color: var(--bid);
    background: rgba(14, 203, 129, 0.12);
}

.signal-badge.down {
    color: var(--ask);
    background: rgba(246, 70, 93, 0.12);
}

.signal-badge.flat {
    color: var(--text-muted);
    background: var(--bg-soft);
}

.forecast-table tbody tr.is-selected {
    background: var(--row-hover);
}

.fc-num {
    font-variant-numeric: tabular-nums;
}

@media (max-width: 860px) {
    .analysis-head__value {
        font-size: 28px;
    }

    .dash-toolbar__picker {
        width: 100%;
    }

    .rating-table .col-score {
        width: 110px;
    }

    .fc-card {
        grid-template-columns: 1fr;
    }
}
