/* Trade Flow Analysis v2 — Mini UI */

.tf-hero {
    border: 1px solid rgba(245, 197, 24, 0.35);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(20, 24, 32, 0.95), rgba(12, 16, 22, 0.98));
}

.tf-hero-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tf-action-badge {
    font-size: 1.15rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 8px;
    letter-spacing: 0.02em;
}

.tf-action-badge.buy,
.tf-action-badge.sell { background: rgba(0, 230, 118, 0.2); color: #00e676; border: 1px solid rgba(0, 230, 118, 0.45); }
.tf-action-badge.sell { background: rgba(255, 82, 82, 0.2); color: #ff5252; border: 1px solid rgba(255, 82, 82, 0.45); }
.tf-action-badge.wait { background: rgba(245, 197, 24, 0.15); color: #f5c518; border: 1px solid rgba(245, 197, 24, 0.4); }
.tf-action-badge.no_trade { background: rgba(255, 82, 82, 0.12); color: #ff8a80; border: 1px solid rgba(255, 82, 82, 0.35); }

.tf-bias-chip {
    font-size: 0.9rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    color: #ccc;
}

.tf-pipeline {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-left: auto;
}

.tf-pipe-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    color: #111;
    transition: transform 0.15s;
}

.tf-pipe-dot:hover { transform: scale(1.1); }
.tf-pipe-dot.ok { background: #00e676; }
.tf-pipe-dot.caution { background: #f5c518; }
.tf-pipe-dot.stop { background: #ff5252; color: #fff; }
.tf-pipe-dot.dimmed { background: #444; color: #888; }

.tf-hero-rows {
    display: grid;
    gap: 6px;
    font-size: 0.92rem;
    color: #d8dce6;
}

.tf-hero-row strong { color: #f5c518; min-width: 3.5em; display: inline-block; }

.tf-hero-wait {
    color: #90caf9;
    font-size: 0.88rem;
    margin-top: 4px;
}

.tf-hero-glossary {
    font-size: 0.78rem;
    color: #888;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    line-height: 1.45;
}

.tf-mini {
    margin: 10px 0 6px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    font-size: 0.85rem;
}

.tf-mini-feed { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.tf-light { display: flex; align-items: center; gap: 6px; }
.tf-light-dot { width: 10px; height: 10px; border-radius: 50%; }
.tf-light-dot.ok { background: #00e676; }
.tf-light-dot.stop { background: #ff5252; }
.tf-light-dot.caution { background: #f5c518; }

.tf-session-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.tf-session-chip {
    padding: 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    text-align: center;
}

.tf-session-chip .name { font-weight: 600; color: #f5c518; font-size: 0.8rem; }
.tf-session-chip .range { font-size: 0.78rem; color: #bbb; margin: 4px 0; }
.tf-session-chip .state { font-size: 0.72rem; color: #888; }

.tf-ladder {
    position: relative;
    height: 8px;
    background: linear-gradient(90deg, #ff5252 0%, #444 50%, #00e676 100%);
    border-radius: 4px;
    margin: 12px 0 8px;
}

.tf-ladder-marker {
    position: absolute;
    top: -6px;
    width: 4px;
    height: 20px;
    background: #fff;
    border-radius: 2px;
    transform: translateX(-50%);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

.tf-ladder-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #999;
}

.tf-strike-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.tf-strike-table th,
.tf-strike-table td {
    padding: 4px 6px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tf-conf-high { color: #00e676; }
.tf-conf-mid { color: #f5c518; }
.tf-conf-low { color: #888; }

.tf-gex-line { display: flex; flex-direction: column; gap: 4px; }
.tf-gex-row { display: flex; justify-content: space-between; gap: 8px; }

.tf-align-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 3px 0;
}

.tf-align-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.tf-align-fill {
    height: 100%;
    border-radius: 3px;
}

.tf-align-fill.up { background: #00e676; }
.tf-align-fill.down { background: #ff5252; }
.tf-align-fill.neutral { background: #666; }

.tf-flow-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
}

.tf-flow-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tf-flow-badge.confirm { background: rgba(0, 230, 118, 0.2); color: #00e676; }
.tf-flow-badge.conflict { background: rgba(255, 82, 82, 0.2); color: #ff5252; }
.tf-flow-badge.neutral { background: rgba(245, 197, 24, 0.15); color: #f5c518; }

.tf-playbook {
    border: 1px solid rgba(245, 197, 24, 0.25);
    border-radius: 8px;
    padding: 12px;
}

.tf-playbook-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 8px;
    color: #f5c518;
}

.tf-playbook-row { margin: 4px 0; font-size: 0.88rem; }
.tf-do { color: #00e676; }
.tf-dont { color: #ff5252; }

.tf-step.dimmed {
    opacity: 0.45;
    pointer-events: none;
}

.tf-step-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.78rem;
    color: #90caf9;
    text-decoration: none;
}

.tf-step-link:hover { text-decoration: underline; }

@media (max-width: 600px) {
    .tf-pipeline { margin-left: 0; width: 100%; }
    .tf-flow-grid { grid-template-columns: 1fr; }
}
