.futures-page-wrap {
    max-width: 1360px;
    margin: 1.5rem auto 3rem auto;
    padding: 0 1.25rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.futures-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.35rem 1.75rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
    margin-bottom: 1.25rem;
}
.futures-hero-title {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}
.futures-hero-title h1 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.01em;
}
.futures-hero-title p {
    margin: 0.28rem 0 0 0;
    font-size: 0.88rem;
    color: #94a3b8;
    line-height: 1.45;
}
.futures-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}
.futures-nav-btn {
    height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0 1rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(30, 41, 59, 0.8);
    color: #cbd5e1;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.15s ease;
}
.futures-nav-btn:hover {
    background: rgba(51, 65, 85, 0.95);
    color: #ffffff;
}
.futures-admin-btn {
    height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0 1.1rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

/* Controls Panel */
.futures-controls-card {
    background: var(--card-bg, var(--bg-secondary, #1e293b));
    border: 1px solid var(--border-color, rgba(148, 163, 184, 0.2));
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.futures-controls-row {
    display: flex;
    align-items: flex-end;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}
.fut-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1 1 220px;
}
.fut-field label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.fut-select,
.fut-input {
    height: 42px;
    padding: 0 0.85rem;
    border: 1px solid var(--border-color, rgba(148, 163, 184, 0.3));
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--bg-color, var(--bg-primary, #0f172a));
    color: var(--text-main, var(--text-primary, #f8fafc));
    box-sizing: border-box;
}
.fut-btn {
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0 1.15rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.86rem;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: all 0.15s ease;
    box-sizing: border-box;
}
.fut-btn.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
}
.fut-btn.btn-primary:hover {
    opacity: 0.94;
}
.fut-btn.btn-secondary {
    background: rgba(148, 163, 184, 0.14);
    border-color: rgba(148, 163, 184, 0.3);
    color: var(--text-main, var(--text-primary, #f8fafc));
}
.fut-btn.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.24);
}
.fut-quick-pills {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}
.fut-update-icon-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.62rem;
    min-width: 32px;
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.42);
    background: #dbeafe;
    color: #1e40af;
    cursor: pointer;
    transition: all 0.15s ease;
    box-sizing: border-box;
    line-height: 1;
}
.fut-update-icon-btn:hover {
    background: #bfdbfe;
    border-color: rgba(37, 99, 235, 0.58);
}
.fut-update-icon-btn svg {
    display: block;
    width: 15px;
    height: 15px;
}
.fut-sym-pill {
    padding: 0.28rem 0.68rem;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.4);
    color: var(--text-secondary, #cbd5e1);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.fut-sym-pill:hover,
.fut-sym-pill.active {
    background: rgba(37, 99, 235, 0.2);
    border-color: #3b82f6;
    color: #60a5fa;
}
.futures-status-bar {
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text-secondary, #cbd5e1);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
}

/* 5 Summary Metric Cards (matching format_futures_metrics_html in futures_tab.py) */
.futures-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin: 0 0 1rem 0;
}
.fut-metric-card {
    background: var(--card-bg, var(--bg-secondary, #1e293b));
    border: 1px solid var(--border-color, rgba(148, 163, 184, 0.2));
    border-left: 4px solid #2196f3;
    border-radius: 8px;
    padding: 10px 14px;
    min-width: 140px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.fut-metric-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary, #94a3b8);
    font-weight: 700;
}
.fut-metric-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main, var(--text-primary, #f8fafc));
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* TradingView Lightweight Charts Container (960px height for 50/50 Dual-Pane Sentiment + 1D Price) */
.futures-chart-wrapper {
    position: relative;
    width: 100%;
    height: 960px;
    background-color: #131722;
    border: 1px solid #2a2e39;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    user-select: none;
}
#futures-lwc-canvas {
    width: 100%;
    height: 100%;
}
#futures-chart-header-bar,
#futures-price-pane-bar {
    position: absolute;
    left: 15px;
    z-index: 10;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #d1d4dc;
    pointer-events: none;
    background: rgba(19, 23, 34, 0.88);
    padding: 7px 14px;
    border-radius: 6px;
    border: 1px solid #2a2e39;
    backdrop-filter: blur(4px);
    width: fit-content;
    max-width: calc(100% - 95px);
}
#futures-chart-header-bar {
    top: 10px;
}
#futures-price-pane-bar {
    top: 51%;
    font-size: 12px;
    padding: 5px 12px;
    gap: 10px;
}
.fut-hdr-sym {
    font-size: 14px;
    font-weight: 800;
    color: #f0b90b;
}
.fut-hdr-metric-badge {
    color: #2196f3;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(33, 150, 243, 0.15);
    border: 1px solid rgba(33, 150, 243, 0.4);
}
.fut-hdr-price-badge {
    color: #089981;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(8, 153, 129, 0.15);
    border: 1px solid rgba(8, 153, 129, 0.4);
}
.fut-hdr-val {
    font-weight: 800;
    color: #ffffff;
    font-size: 14px;
}
.fut-hdr-chg {
    font-weight: 800;
}
.fut-hdr-extra {
    color: #ff9800;
    font-weight: 600;
    font-size: 12px;
}
.fut-hdr-legend {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    display: flex;
    gap: 10px;
    color: #848e9c;
    margin-left: 4px;
}
.fut-leg-val {
    font-weight: 700;
    color: #ffffff;
}

/* 30-Day Historical Data Table */
.futures-table-card {
    background: var(--card-bg, var(--bg-secondary, #1e293b));
    border: 1px solid var(--border-color, rgba(148, 163, 184, 0.2));
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.futures-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}
.futures-table-header h3 {
    margin: 0;
    font-size: 1.08rem;
    color: var(--text-main, var(--text-primary, #f8fafc));
}
.futures-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}
.futures-data-table th {
    text-align: left;
    padding: 0.72rem 0.75rem;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary, #94a3b8);
    border-bottom: 2px solid var(--border-color, rgba(148, 163, 184, 0.22));
    white-space: nowrap;
}
.futures-data-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border-color, rgba(148, 163, 184, 0.12));
    color: var(--text-main, var(--text-primary, #f1f5f9));
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.futures-data-table tr:hover td {
    background: rgba(59, 130, 246, 0.06);
}

/* Light Mode Support */
[data-theme="light"] .futures-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    color: #0f172a;
    border: 1px solid #cbd5e1;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}
[data-theme="light"] .futures-hero-title h1 {
    color: #0f172a;
}
[data-theme="light"] .futures-hero-title p {
    color: #475569;
}
[data-theme="light"] .futures-nav-btn {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}
[data-theme="light"] .futures-controls-card,
[data-theme="light"] .fut-metric-card,
[data-theme="light"] .futures-table-card {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}
[data-theme="light"] .fut-select,
[data-theme="light"] .fut-input {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}
[data-theme="light"] .fut-btn.btn-secondary,
[data-theme="light"] .fut-sym-pill {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}
[data-theme="light"] .futures-status-bar {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}
[data-theme="light"] .fut-metric-value,
[data-theme="light"] .futures-table-header h3,
[data-theme="light"] .futures-data-table td {
    color: #0f172a;
}
[data-theme="light"] .futures-chart-wrapper {
    background-color: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}
[data-theme="light"] #futures-chart-header-bar,
[data-theme="light"] #futures-price-pane-bar {
    background: rgba(255, 255, 255, 0.9);
    border-color: #cbd5e1;
    color: #334155;
}
[data-theme="light"] .fut-hdr-sym {
    color: #b45309;
}
[data-theme="light"] .fut-hdr-val,
[data-theme="light"] .fut-leg-val {
    color: #0f172a;
}
[data-theme="light"] .fut-hdr-legend {
    color: #475569;
}
[data-theme="light"] .fut-hdr-extra {
    color: #c2410c;
}

@media (max-width: 768px) {
    .futures-page-wrap {
        margin: 0.75rem auto 2rem auto;
        padding: 0 0.6rem;
    }
    .futures-hero {
        padding: 0.9rem 1rem;
    }
    .futures-hero-title h1 {
        font-size: 1.08rem;
    }
    .futures-hero-title p {
        display: none;
    }
    .futures-chart-wrapper {
        height: 640px;
    }
    .futures-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
