/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-deep:      #0d0711;
    --bg-main:      #140a18;
    --bg-card:      #1a0e20;
    --bg-input:     #1e1228;
    --border:       rgba(255, 80, 130, 0.08);
    --border-light: rgba(255, 80, 130, 0.15);
    --grid-line:    rgba(255, 80, 130, 0.07);
    --grid-dot:     rgba(255, 80, 130, 0.12);
    --line-bright:  #ffffff;
    --line-mid:     #ff7ea8;
    --line-faded:   #b84670;
    --accent:       #ff4081;
    --accent-glow:  rgba(255, 64, 129, 0.35);
    --text-primary: #f0e6f0;
    --text-secondary: rgba(240, 230, 240, 0.65);
    --text-dim:     rgba(240, 230, 240, 0.4);
    --green:        #00e676;
    --green-bg:     rgba(0, 230, 118, 0.08);
    --green-border: rgba(0, 230, 118, 0.25);
    --red:          #ff1744;
    --red-bg:       rgba(255, 23, 68, 0.08);
    --red-border:   rgba(255, 23, 68, 0.25);
    --font:         -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    --mono:         'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    --panel-width:  320px;
}

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* ===== Header ===== */
#header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    z-index: 10;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pair-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-primary);
}

.exchange-label {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.live-price-container {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.live-price {
    font-family: var(--mono);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    transition: color 0.15s ease;
}

.live-price.up { color: var(--green); }
.live-price.down { color: var(--red); }

.price-change {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
}

.price-change.positive { color: var(--green); }
.price-change.negative { color: var(--red); }

.timestamp-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ts-label {
    font-size: 9px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ts-value {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
}

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

.ws-status {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
}

.ws-status.connected {
    color: var(--green);
    background: var(--green-bg);
    border: 1px solid var(--green-border);
}

.ws-status.disconnected {
    color: var(--red);
    background: var(--red-bg);
    border: 1px solid var(--red-border);
}

.ws-status.connecting {
    color: #ffab40;
    background: rgba(255, 171, 64, 0.1);
    border: 1px solid rgba(255, 171, 64, 0.25);
}

/* ===== Theme Picker ===== */
.theme-picker {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 6px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.theme-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--dot);
    cursor: pointer;
    padding: 0;
    outline: none;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    box-shadow: 0 0 0 0 transparent;
}

.theme-dot:hover {
    transform: scale(1.25);
    box-shadow: 0 0 6px var(--dot);
}

.theme-dot.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 4px var(--dot);
    transform: scale(1.15);
}

/* ===== Main Content (Charts + Panel) ===== */
#main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* ===== Charts Column ===== */
#charts-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

#chart-area {
    flex: 2;
    position: relative;
    background: var(--bg-main);
    overflow: hidden;
    min-height: 200px;
}

#chart {
    display: block;
    width: 100%;
    height: 100%;
}

/* ===== Price Badge ===== */
#price-badge {
    position: absolute;
    bottom: 48px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-main);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 6px 14px;
    z-index: 5;
}

.badge-icon {
    font-size: 16px;
    color: #f7931a;
}

.badge-price {
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== RSI Area ===== */
#rsi-area {
    flex: 1;
    position: relative;
    background: var(--bg-main);
    border-top: 1px solid var(--border);
    min-height: 100px;
    max-height: 180px;
}

.rsi-label {
    position: absolute;
    top: 6px;
    left: 12px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.rsi-label span {
    font-family: var(--mono);
    color: var(--text-secondary);
}

#rsi-chart {
    display: block;
    width: 100%;
    height: 100%;
}

/* ===== Trading Panel ===== */
#trading-panel {
    width: var(--panel-width);
    flex-shrink: 0;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-section {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

/* Balance */
.balance-section {
    padding: 14px 16px;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-row + .balance-row {
    margin-top: 6px;
}

.balance-label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.balance-value {
    font-family: var(--mono);
    font-size: 16px;
    font-weight: 700;
}

.pnl-neutral { color: var(--text-secondary); }
.pnl-positive { color: var(--green); }
.pnl-negative { color: var(--red); }

/* Controls */
.controls-section {
    padding: 14px 16px;
}

.control-group {
    margin-bottom: 14px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-label {
    display: block;
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

/* Leverage Selector */
.leverage-selector {
    display: flex;
    gap: 4px;
}

.lev-btn {
    flex: 1;
    padding: 6px 0;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-dim);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.lev-btn:hover {
    border-color: var(--border-light);
    color: var(--text-secondary);
}

.lev-btn.active {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
}

/* Liquidation Estimate */
.liq-estimate {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.liq-estimate-row {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 5px 4px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.liq-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}

.liq-label.long-text { color: var(--green); }
.liq-label.short-text { color: var(--red); }

.liq-price {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Amount Input */
.amount-input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    margin-bottom: 8px;
    transition: border-color 0.15s ease;
}

.amount-input-wrap:focus-within {
    border-color: var(--accent);
}

.amount-prefix {
    font-family: var(--mono);
    font-size: 14px;
    color: var(--text-dim);
    margin-right: 4px;
}

#trade-amount,
#live-trade-amount {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--mono);
    font-size: 16px;
    font-weight: 600;
    padding: 10px 0;
    width: 100%;
}

#trade-amount::-webkit-inner-spin-button,
#trade-amount::-webkit-outer-spin-button,
#live-trade-amount::-webkit-inner-spin-button,
#live-trade-amount::-webkit-outer-spin-button {
    opacity: 0.3;
}

.amount-presets {
    display: flex;
    gap: 4px;
}

.preset-btn {
    flex: 1;
    padding: 5px 0;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-dim);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.preset-btn:hover {
    border-color: var(--border-light);
    color: var(--text-secondary);
}

.preset-btn.active {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
}

/* Trade Buttons */
#trade-buttons {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.trade-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 0;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.trade-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.trade-btn .btn-label {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1px;
}

.trade-btn .btn-sub {
    font-size: 10px;
    opacity: 0.6;
}

.long-btn {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.2), rgba(0, 230, 118, 0.08));
    border: 1px solid var(--green-border);
    color: var(--green);
}

.long-btn:hover {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.3), rgba(0, 230, 118, 0.15));
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.15);
}

.short-btn {
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.2), rgba(255, 23, 68, 0.08));
    border: 1px solid var(--red-border);
    color: var(--red);
}

.short-btn:hover {
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.3), rgba(255, 23, 68, 0.15));
    box-shadow: 0 0 20px rgba(255, 23, 68, 0.15);
}

.exit-btn {
    background: linear-gradient(135deg, rgba(255, 171, 64, 0.2), rgba(255, 171, 64, 0.08));
    border: 1px solid rgba(255, 171, 64, 0.3);
    color: #ffab40;
    padding: 14px 0;
    margin-top: 10px;
}

.exit-btn:hover {
    background: linear-gradient(135deg, rgba(255, 171, 64, 0.3), rgba(255, 171, 64, 0.15));
    box-shadow: 0 0 20px rgba(255, 171, 64, 0.15);
}

/* Open Trade Info */
.open-trade-info {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
}

.ot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
}

.ot-label {
    font-size: 11px;
    color: var(--text-dim);
}

.ot-value {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.ot-value.long-text { color: var(--green); }
.ot-value.short-text { color: var(--red); }

.pnl-live .ot-value {
    font-size: 14px;
    font-weight: 700;
}

/* Hidden */
.hidden {
    display: none !important;
}

/* ===== Trade History ===== */
.history-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 8px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.reset-btn {
    padding: 4px 12px;
    background: rgba(255, 23, 68, 0.1);
    border: 1px solid rgba(255, 23, 68, 0.2);
    border-radius: 5px;
    color: var(--red);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.reset-btn:hover {
    background: rgba(255, 23, 68, 0.2);
    border-color: rgba(255, 23, 68, 0.4);
}

.trade-history-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) transparent;
}

.trade-history-list::-webkit-scrollbar {
    width: 4px;
    display: block;
}

.trade-history-list::-webkit-scrollbar-track {
    background: transparent;
}

.trade-history-list::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 2px;
}

.trade-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: var(--bg-input);
    border-radius: 6px;
    border: 1px solid var(--border);
    cursor: default;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.trade-item:hover {
    border-color: var(--border-light);
    background: rgba(40, 22, 50, 0.8);
}

.trade-dir {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 3px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.trade-dir.long {
    color: var(--green);
    background: var(--green-bg);
    border: 1px solid var(--green-border);
}

.trade-dir.short {
    color: var(--red);
    background: var(--red-bg);
    border: 1px solid var(--red-border);
}

.trade-dir.liquidated {
    color: #ff6d00;
    background: rgba(255, 109, 0, 0.08);
    border: 1px solid rgba(255, 109, 0, 0.25);
}

.trade-details {
    flex: 1;
    min-width: 0;
}

.trade-prices {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trade-meta {
    font-size: 9px;
    color: var(--text-dim);
    margin-top: 2px;
}

.trade-profit {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    text-align: right;
}

.trade-profit.positive { color: var(--green); }
.trade-profit.negative { color: var(--red); }

/* ===== HMA Settings Popup ===== */
.hma-popup {
    position: fixed;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px) scale(0.97);
    transition: opacity 0.18s ease, transform 0.18s ease;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px 18px;
    min-width: 220px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 1px var(--border-light);
}

.hma-popup.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.hma-popup-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    letter-spacing: 0.3px;
}

.hma-popup-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.hma-popup-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.hma-input {
    width: 64px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--text-primary);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: border-color 0.15s ease;
}

.hma-input:focus {
    border-color: #00e5ff;
}

.hma-color {
    width: 36px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-input);
    cursor: pointer;
    padding: 2px;
}

.hma-color::-webkit-color-swatch-wrapper {
    padding: 0;
}

.hma-color::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

/* Toggle switch */
.hma-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.hma-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.hma-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.hma-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    bottom: 2px;
    background: var(--text-dim);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.hma-toggle input:checked + .hma-slider {
    background: rgba(0, 229, 255, 0.2);
    border-color: rgba(0, 229, 255, 0.4);
}

.hma-toggle input:checked + .hma-slider::before {
    transform: translateX(18px);
    background: #00e5ff;
}

.hma-popup-actions {
    margin-top: 4px;
    text-align: right;
}

.hma-btn {
    padding: 6px 18px;
    background: rgba(0, 229, 255, 0.12);
    border: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 6px;
    color: #00e5ff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.hma-btn:hover {
    background: rgba(0, 229, 255, 0.2);
    border-color: rgba(0, 229, 255, 0.4);
}

/* ===== Trade Breakdown Tooltip ===== */
.trade-tooltip {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 14px 16px;
    min-width: 240px;
    max-width: 280px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 1px var(--border-light);
}

.trade-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.tt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.tt-dir {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.tt-time {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-dim);
}

.tt-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

.tt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
}

.tt-label {
    font-size: 11px;
    color: var(--text-dim);
}

.tt-val {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.tt-fee .tt-label {
    font-size: 10px;
    color: rgba(240, 230, 240, 0.3);
    padding-left: 8px;
}

.tt-fee .tt-val {
    font-size: 10px;
    color: rgba(255, 120, 120, 0.5);
}

.tt-net .tt-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
}

.tt-net .tt-val {
    font-size: 13px;
    font-weight: 800;
}

.tt-liq-note {
    margin-top: 6px;
    font-size: 10px;
    font-weight: 600;
    color: #ff6d00;
    text-align: center;
    padding: 4px 0;
    background: rgba(255, 109, 0, 0.06);
    border-radius: 4px;
}

/* ===== Scrollbar (global hide except trade history) ===== */
::-webkit-scrollbar {
    display: none;
}

.trade-history-list::-webkit-scrollbar {
    display: block;
}

/* ===== Mode Toggle ===== */
.mode-toggle {
    display: flex;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.mode-btn {
    padding: 5px 14px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mode-btn:hover {
    color: var(--text-secondary);
}

.mode-btn.active {
    background: var(--accent-glow);
    color: var(--accent);
}

/* ===== Demo / Live Panel Wrappers ===== */
#demo-panel,
#live-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

#live-setup {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
}

/* ===== Live Setup (API Connect) ===== */
.live-setup-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

.live-setup-info {
    margin-bottom: 16px;
}

.live-setup-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.5;
}

.live-setup-info ol {
    padding-left: 18px;
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.8;
}

.live-setup-info strong {
    color: var(--text-secondary);
}

.api-input-group {
    margin-bottom: 12px;
}

.api-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: var(--mono);
    font-size: 12px;
    outline: none;
    transition: border-color 0.15s ease;
}

.api-input:focus {
    border-color: var(--accent);
}

.api-input::placeholder {
    color: var(--text-dim);
    font-family: var(--font);
}

.api-error {
    padding: 8px 12px;
    margin-bottom: 12px;
    background: var(--red-bg);
    border: 1px solid var(--red-border);
    border-radius: 6px;
    color: var(--red);
    font-size: 11px;
    font-weight: 500;
}

.connect-btn {
    background: var(--accent-glow);
    border: 1px solid var(--border-light);
    color: var(--accent);
    margin-top: 4px;
}

.connect-btn:hover {
    background: var(--accent-glow);
    filter: brightness(1.2);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ===== Live Panel (Connected) ===== */
.live-connected-badge {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--green);
    padding: 2px 8px;
    background: var(--green-bg);
    border: 1px solid var(--green-border);
    border-radius: 4px;
}

.section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 10px;
}

.live-positions-list {
    min-height: 40px;
}

.live-pos-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: var(--bg-input);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.no-pos {
    text-align: center;
    padding: 12px;
    color: rgba(240, 230, 240, 0.2);
    font-size: 11px;
}

.disconnect-btn {
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.15), rgba(255, 23, 68, 0.05));
    border: 1px solid var(--red-border);
    color: var(--red);
    padding: 10px 0;
}

.disconnect-btn:hover {
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.25), rgba(255, 23, 68, 0.12));
    box-shadow: 0 0 15px rgba(255, 23, 68, 0.1);
}
