/* ==========================================================================
   TradingAI V2.0 - Ultra Premium Fintech Dark Theme CSS
   ========================================================================== */

:root {
    --bg-main: #070a12;
    --bg-card: #0d121f;
    --bg-card-hover: #12192c;
    --bg-card-alt: #111728;
    --border-color: #1e293b;
    --border-focus: #3b82f6;
    
    --accent-cyan: #00f2fe;
    --accent-blue: #4facfe;
    --accent-emerald: #00e676;
    --accent-green-bg: rgba(0, 230, 118, 0.12);
    --accent-red: #ff1744;
    --accent-red-bg: rgba(255, 23, 68, 0.12);
    --accent-amber: #ffab00;
    --accent-purple: #7c4dff;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ================= HEADER & NAV ================= */
.app-header {
    background: rgba(13, 18, 31, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 36px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-pulse {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 14px var(--accent-cyan);
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 22px var(--accent-cyan); }
}

.logo-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
}

.highlight {
    color: var(--accent-cyan);
}

.logo-badge {
    background: linear-gradient(135deg, #7c4dff, #00f2fe);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    margin-left: 6px;
    vertical-align: middle;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
    color: #fff;
    background: rgba(0, 242, 254, 0.12);
    border-color: rgba(0, 242, 254, 0.35);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 4px;
}

.nav-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.nav-action-btn.expense-link {
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.3);
    color: #69f0ae;
}

.nav-action-btn.expense-link:hover {
    background: rgba(0, 230, 118, 0.2);
    color: #fff;
    box-shadow: 0 0 12px rgba(0, 230, 118, 0.25);
    transform: translateY(-1px);
}

.nav-action-btn.ios-link {
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: #00f0ff;
}

.nav-action-btn.ios-link:hover {
    background: rgba(0, 240, 255, 0.18);
    color: #fff;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
    transform: translateY(-1px);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.v1-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(124, 77, 255, 0.15);
    border: 1px solid rgba(124, 77, 255, 0.4);
    color: #d8b4fe;
    padding: 6px 11px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.v1-switch-btn:hover {
    background: rgba(124, 77, 255, 0.28);
    color: #fff;
    border-color: rgba(124, 77, 255, 0.8);
    box-shadow: 0 0 14px rgba(124, 77, 255, 0.35);
    transform: translateY(-1px);
}

.macro-stat-pill {
    background: var(--bg-card-alt);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-label {
    color: var(--text-muted);
}

.stat-value {
    font-weight: 700;
    font-family: var(--font-mono);
}

.stat-badge.positive {
    background: var(--accent-green-bg);
    color: var(--accent-emerald);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.system-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 10px var(--accent-emerald);
}

.status-txt {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--accent-emerald);
}

/* ================= CONTAINER & LAYOUT ================= */
.main-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px 24px;
    width: 100%;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 14px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

/* ================= RADAR GAUGE CARDS ================= */
.radar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.radar-card:hover {
    border-color: rgba(0, 242, 254, 0.3);
    transform: translateY(-2px);
}

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

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-badge {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--accent-cyan);
    font-weight: 600;
}

.gauge-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 14px;
}

.gauge-value {
    font-size: 38px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: #fff;
}

.gauge-max {
    color: var(--text-muted);
    font-size: 16px;
}

.progress-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s ease;
}

.fng-track .progress-fill {
    background: linear-gradient(90deg, #ff1744 0%, #ffab00 50%, #00e676 100%);
}

.alt-track .progress-fill {
    background: linear-gradient(90deg, #f7931a 0%, #00f2fe 100%);
}

.rsi-track .progress-fill {
    background: linear-gradient(90deg, #00e676 0%, #3b82f6 50%, #ff1744 100%);
}

.track-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

/* ================= MACRO BRIEF BOX ================= */
.macro-brief-box {
    background: linear-gradient(180deg, var(--bg-card) 0%, #0f172a 100%);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
}

.brief-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

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

.brief-title h3 {
    font-size: 17px;
    font-weight: 700;
}

.time-stamp {
    font-size: 12px;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
}

.macro-lead {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.macro-bullets h4 {
    font-size: 13px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.macro-bullets ul {
    list-style: none;
    padding: 0;
}

.macro-bullets li {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    position: relative;
    padding-left: 18px;
}

.macro-bullets li::before {
    content: "•";
    color: var(--accent-cyan);
    font-weight: bold;
    position: absolute;
    left: 4px;
}

/* ================= LONG/SHORT MATRIX ================= */
.ls-matrix-card, .volume-scanner-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
}

.sub-text {
    font-size: 13px;
    color: var(--text-muted);
}

.ls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.ls-item {
    background: var(--bg-card-alt);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
}

.ls-item-top {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 14px;
}

.ls-bar-track {
    display: flex;
    height: 10px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.ls-bar-long {
    background: var(--accent-emerald);
    transition: width 0.4s ease;
}

.ls-bar-short {
    background: var(--accent-red);
    transition: width 0.4s ease;
}

.ls-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-family: var(--font-mono);
}

.long-lbl { color: var(--accent-emerald); }
.short-lbl { color: var(--accent-red); }

/* ================= VOLUME SCANNER ================= */
.volume-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.volume-card {
    background: var(--bg-card-alt);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
}

.volume-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.volume-symbol {
    font-weight: 800;
    font-size: 15px;
}

.volume-tag {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.volume-tag.buy {
    background: var(--accent-green-bg);
    color: var(--accent-emerald);
}

.volume-tag.sell {
    background: var(--accent-red-bg);
    color: var(--accent-red);
}

.volume-metric {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
}

/* ================= PANEL CARDS & FORM ================= */
.panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
}

.filter-group {
    margin-bottom: 16px;
}

.filter-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.custom-select, .custom-input {
    width: 100%;
    background: var(--bg-card-alt);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font-main);
    outline: none;
    transition: border-color 0.2s;
}

.custom-select:focus, .custom-input:focus {
    border-color: var(--accent-cyan);
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--border-color);
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider { background-color: var(--accent-cyan); }
input:checked + .slider:before { transform: translateX(20px); }

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

.coin-chips-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.coin-chk {
    background: var(--bg-card-alt);
    border: 1px solid var(--border-color);
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.model-badge {
    background: rgba(124, 77, 255, 0.15);
    color: #b388ff;
    border: 1px solid rgba(124, 77, 255, 0.3);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

.tip-txt {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.primary-btn-block {
    width: 100%;
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    border: none;
    color: #070a12;
    padding: 12px;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.primary-btn-block:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.decision-box {
    margin-top: 16px;
    padding: 16px;
    border-radius: 10px;
    animation: fadeIn 0.3s ease;
}

.decision-box.approved {
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.3);
    color: #e8f5e9;
}

.decision-box.rejected {
    background: rgba(255, 23, 68, 0.1);
    border: 1px solid rgba(255, 23, 68, 0.3);
    color: #ffebee;
}

.hidden { display: none !important; }

/* ================= STREAM PANEL ================= */
.stream-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
}

.stream-panel h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

.signals-stream-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.signal-stream-card {
    background: var(--bg-card-alt);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sig-side-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
}

.sig-side-badge.long {
    background: var(--accent-green-bg);
    color: var(--accent-emerald);
}

.sig-side-badge.short {
    background: var(--accent-red-bg);
    color: var(--accent-red);
}

.sig-title {
    font-size: 16px;
    font-weight: 700;
}

.sig-targets {
    display: flex;
    gap: 16px;
    font-size: 13px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

.sig-status-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.sig-status-badge.approved {
    background: var(--accent-green-bg);
    color: var(--accent-emerald);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.sig-status-badge.rejected {
    background: var(--accent-red-bg);
    color: var(--accent-red);
    border: 1px solid rgba(255, 23, 68, 0.3);
}

/* ================= STRATEGY CARDS ================= */
.strat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    position: relative;
    transition: all 0.2s;
}

.strat-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}

.strat-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.strat-name {
    font-size: 18px;
    font-weight: 700;
}

.strat-cat {
    font-size: 12px;
    color: var(--accent-cyan);
    font-weight: 600;
}

.strat-desc {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-bottom: 18px;
    line-height: 1.5;
}

.strat-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    background: var(--bg-card-alt);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 16px;
}

.strat-stat-box .lbl {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.strat-stat-box .val {
    font-size: 20px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--accent-emerald);
    margin-top: 2px;
}

.strat-btn {
    width: 100%;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: var(--accent-cyan);
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.strat-btn:hover {
    background: var(--accent-cyan);
    color: #070a12;
}

/* ================= STRATEGY MODAL ================= */
.strategy-detail-box {
    background: var(--bg-card);
    border: 1px solid var(--accent-cyan);
    border-radius: 14px;
    padding: 24px;
    margin-top: 24px;
}

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

.close-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

/* ================= BOT CONTROLS & ACTIVITY ================= */
.bot-control-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
}

.bot-main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bot-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bot-icon {
    font-size: 32px;
}

.bot-status-tag.online {
    color: var(--accent-emerald);
    font-size: 12px;
    font-weight: 700;
}

.bot-mode-selector {
    display: flex;
    background: var(--bg-card-alt);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 10px;
}

.mode-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-toggle-btn.active {
    background: var(--accent-cyan);
    color: #070a12;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

.stats-ribbon {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    background: var(--bg-card-alt);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}

.stat-cell .label {
    font-size: 11.5px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

.stat-cell .val {
    font-size: 18px;
    font-weight: 800;
    font-family: var(--font-mono);
}

.stat-cell .val.positive { color: var(--accent-emerald); }
.stat-cell .val.highlight { color: var(--accent-cyan); }

.bot-quick-settings {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.setting-item {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mini-input, .mini-select {
    background: var(--bg-card-alt);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-family: var(--font-mono);
    outline: none;
}

.save-settings-btn {
    background: var(--accent-cyan);
    border: none;
    color: #070a12;
    padding: 7px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    margin-left: auto;
}

/* ================= ACTIVITY FEED ================= */
.activity-feed-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
}

.feed-header {
    margin-bottom: 16px;
}

.title-with-live {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-dot.green {
    background: var(--accent-emerald);
}

.feed-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.activity-feed-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feed-item {
    background: var(--bg-card-alt);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
}

.feed-item.rejected {
    border-left: 4px solid var(--accent-red);
    background: rgba(255, 23, 68, 0.04);
}

.feed-item.open {
    border-left: 4px solid var(--accent-emerald);
}

.feed-item.close {
    border-left: 4px solid var(--accent-cyan);
}

.feed-time {
    color: var(--text-muted);
    font-size: 12px;
    font-family: var(--font-mono);
}

/* ================= POSITIONS & DATA TABLES ================= */
.positions-panel, .history-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
}

.positions-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.emergency-close-btn {
    background: rgba(255, 23, 68, 0.15);
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.emergency-close-btn:hover {
    background: var(--accent-red);
    color: #fff;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.data-table th {
    text-align: left;
    padding: 12px 14px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    font-size: 12.5px;
    text-transform: uppercase;
}

.data-table td {
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-family: var(--font-mono);
}

.pos-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.pos-tag.long {
    background: var(--accent-green-bg);
    color: var(--accent-emerald);
}

.pos-tag.short {
    background: var(--accent-red-bg);
    color: var(--accent-red);
}

.close-single-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--accent-red);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.close-single-btn:hover {
    background: var(--accent-red);
    color: #fff;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .stats-ribbon { grid-template-columns: repeat(2, 1fr); }
}
