/* ── Layout ─────────────────────────────────────────────────────────────── */
.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #0b0e11;
}

/* ── Top Bar ─────────────────────────────────────────────────────────────── */
.topbar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0 1rem;
    height: 48px;
    background: #181b20;
    border-bottom: 1px solid #2a2d35;
    flex-shrink: 0;
}

.logo {
    font-size: 1rem;
    font-weight: 700;
    color: #3b76ec;
    white-space: nowrap;
}

.symbol-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.symbol-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.current-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #20cc85;
    transition: color 0.2s;
}

.price-change {
    font-size: 0.8rem;
    color: #97a3ba;
}

/* ── OHLCV Bar ───────────────────────────────────────────────────────────── */
.ohlcv-bar {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #97a3ba;
    margin-left: auto;
}

.ohlcv-bar b {
    color: #fff;
    font-weight: 500;
}

/* ── Status Dot ──────────────────────────────────────────────────────────── */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #555;
    flex-shrink: 0;
    transition: background 0.3s;
}
.status-dot.connected    { background: #20cc85; box-shadow: 0 0 6px #20cc85; }
.status-dot.reconnecting { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }
.status-dot.disconnected { background: #fd6469; }
.status-dot.error        { background: #fd6469; }

/* ── Timeframe Bar ───────────────────────────────────────────────────────── */
.tf-bar {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.4rem 1rem;
    background: #181b20;
    border-bottom: 1px solid #2a2d35;
    flex-shrink: 0;
}

.tf-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #97a3ba;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s;
}

.tf-btn:hover {
    color: #fff;
    border-color: #3b4561;
}

.tf-btn.active {
    color: #fff;
    background: #3b76ec;
    border-color: #3b76ec;
}

/* ── Chart ───────────────────────────────────────────────────────────────── */
#chart {
    flex: 1;
    min-height: 0; /* important for flex child */
}
