/* ═══════════════════════════════════════════════════════════════════════════
   F-INTEL: REAL-TIME IV SURFACE & EXHAUSTION RADAR STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

.iv-terminal-card {
    background: var(--bg-surface, #1e222d);
    border: 1px solid var(--border-card, #363c4e);
    border-radius: var(--radius-md, 6px);
    padding: 16px;
    margin-bottom: 20px;
    font-family: var(--font-sans, 'Inter', sans-serif);
    color: var(--text-primary, #d1d4dc);
    box-shadow: var(--shadow-card, 0 1px 4px rgba(0,0,0,0.35));
}

/* ── Header ── */
.iv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle, #2a2e39);
    margin-bottom: 14px;
}

.iv-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.iv-title {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #00e5ff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.iv-status-badge {
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(0, 230, 118, 0.4);
    background: rgba(0, 230, 118, 0.12);
    color: #00e676;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.iv-status-badge.rewound {
    background: rgba(255, 213, 79, 0.15);
    color: #ffd54f;
    border-color: rgba(255, 213, 79, 0.5);
}

.iv-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.iv-spot-pill {
    font-family: var(--font-mono, monospace);
    font-size: 12px;
    font-weight: 600;
    background: rgba(41, 98, 255, 0.12);
    border: 1px solid rgba(41, 98, 255, 0.35);
    color: #64b5f6;
    padding: 4px 10px;
    border-radius: 4px;
}

/* ── Mathematical Movement & Exhaustion Panel ── */
.iv-exhaustion-panel {
    background: rgba(19, 23, 34, 0.65);
    border: 1px solid var(--border-subtle, #2a2e39);
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 14px;
}

.iv-exhaustion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.iv-metric-tile {
    background: rgba(30, 34, 45, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 10px 12px;
}

.iv-metric-label {
    font-family: var(--font-sans, sans-serif);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary, #868993);
    margin-bottom: 4px;
}

.iv-metric-value {
    font-family: var(--font-mono, monospace);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.iv-metric-sub {
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    color: var(--text-muted, #555d6b);
    margin-top: 2px;
}

/* Gauge Bar */
.iv-gauge-wrap {
    margin-top: 10px;
}

.iv-gauge-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    color: var(--text-secondary, #868993);
    margin-bottom: 5px;
}

.iv-gauge-track {
    position: relative;
    height: 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.iv-gauge-bar-range {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0%;
    background: rgba(0, 229, 255, 0.22);
    border-right: 2px solid rgba(0, 229, 255, 0.7);
    border-radius: 6px;
    transition: width 0.4s ease;
    z-index: 1;
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05) 5px, transparent 5px, transparent 10px);
}

.iv-gauge-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    height: 100%;
    width: 0%;
    border-radius: 6px;
    transition: width 0.4s ease, background-color 0.4s ease;
    background: linear-gradient(90deg, #00e5ff, #00b0ff);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.35);
    z-index: 2;
}

.iv-gauge-marker-1sigma {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 80%; /* 100% consumption scaled into 80% mark of gauge track */
    width: 2px;
    background: #ffd54f;
    box-shadow: 0 0 6px rgba(255, 213, 79, 0.6);
    z-index: 3;
}

.iv-gauge-legend {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    font-family: var(--font-mono, monospace);
    font-size: 10px;
    color: var(--text-secondary, #868993);
}

.iv-gauge-legend-items {
    display: flex;
    align-items: center;
    gap: 14px;
}

.legend-box {
    display: inline-block;
    width: 12px;
    height: 8px;
    border-radius: 2px;
    margin-right: 5px;
    vertical-align: middle;
}

.legend-box.solid {
    background: #00e5ff;
    box-shadow: 0 0 6px rgba(0, 229, 255, 0.5);
}

.legend-box.shaded {
    background: rgba(0, 229, 255, 0.25);
    border: 1px solid rgba(0, 229, 255, 0.6);
}

.iv-regime-tag {
    font-family: var(--font-mono, monospace);
    font-weight: 700;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    display: inline-block;
}

.iv-regime-tag.consolidation {
    background: rgba(0, 229, 255, 0.15);
    color: #00e5ff;
    border: 1px solid rgba(0, 229, 255, 0.3);
}

.iv-regime-tag.normal {
    background: rgba(38, 166, 154, 0.15);
    color: #26a69a;
    border: 1px solid rgba(38, 166, 154, 0.3);
}

.iv-regime-tag.exhaustion {
    background: rgba(255, 152, 0, 0.18);
    color: #ffa726;
    border: 1px solid rgba(255, 152, 0, 0.4);
}

.iv-regime-tag.expansion {
    background: rgba(239, 83, 80, 0.2);
    color: #ef5350;
    border: 1px solid rgba(239, 83, 80, 0.4);
}

/* ── Rewind Toolbar ── */
.iv-rewind-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(19, 23, 34, 0.4);
    border: 1px solid var(--border-subtle, #2a2e39);
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.iv-rewind-slider-wrap {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.iv-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #2a2e39;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.iv-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00e5ff;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0, 229, 255, 0.6);
    border: 2px solid #131722;
}

.iv-btn-group {
    display: inline-flex;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px;
    gap: 2px;
}

.iv-tool-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary, #868993);
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.iv-tool-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.iv-tool-btn.active {
    background: var(--accent, #2962ff);
    color: #fff;
}

.iv-btn-live {
    background: rgba(0, 230, 118, 0.15);
    border: 1px solid rgba(0, 230, 118, 0.4);
    color: #00e676;
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 4px;
}

.iv-btn-live:hover {
    background: rgba(0, 230, 118, 0.25);
}

/* ── Total Shifts Strip ── */
.iv-shifts-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.iv-shift-pill {
    flex: 1;
    min-width: 140px;
    background: rgba(19, 23, 34, 0.5);
    border: 1px solid var(--border-subtle, #2a2e39);
    border-radius: 4px;
    padding: 8px 10px;
}

.iv-shift-title {
    font-size: 10px;
    color: var(--text-secondary, #868993);
    text-transform: uppercase;
    font-weight: 600;
}

.iv-shift-val {
    font-family: var(--font-mono, monospace);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-top: 2px;
}

/* ── Charts Grid ── */
.iv-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 1100px) {
    .iv-charts-grid {
        grid-template-columns: 1fr;
    }
}

.iv-chart-box {
    background: rgba(19, 23, 34, 0.4);
    border: 1px solid var(--border-subtle, #2a2e39);
    border-radius: 6px;
    padding: 10px;
    min-height: 480px;
    height: 480px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.iv-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.iv-chart-title {
    font-family: var(--font-mono, monospace);
    font-size: 12px;
    font-weight: 700;
    color: #90caf9;
    letter-spacing: 0.5px;
}

.iv-plot-canvas {
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 430px;
}
