/* ============================================
   RESET & BASE STYLES
   ============================================ */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: #0d1117;
    color: #e1e8ed;
    overflow: hidden;
    line-height: 1.5;
}

/* ============================================
   HEADER
   ============================================ */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, #1c2128 0%, #161b22 100%);
    border-bottom: 2px solid #30363d;
    padding: 0 24px;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: #58a6ff;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(88, 166, 255, 0.3);
}

.header-stats {
    display: flex;
    gap: 32px;
    align-items: center;
}

.header-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 10px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 18px;
    font-weight: 800;
    color: #e1e8ed;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.connection {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.connection.connected {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
    border: 2px solid rgba(63, 185, 80, 0.3);
}

.connection.disconnected {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
    border: 2px solid rgba(248, 81, 73, 0.3);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.connection.connected .dot {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.5;
        transform: scale(0.9);
    }
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.main-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 0;
    height: calc(100vh - 64px);
    overflow: hidden;
}

/* LEFT PANEL */
.left-panel {
    background: #0d1117;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 2px solid #21262d;
}

.left-panel::-webkit-scrollbar {
    width: 10px;
}

.left-panel::-webkit-scrollbar-track {
    background: #0d1117;
}

.left-panel::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 5px;
    border: 2px solid #0d1117;
}

.left-panel::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}



/* ═══════════════════════════════════════════════════════════════ */
/* WALLET STYLES */
/* ═══════════════════════════════════════════════════════════════ */

.wallet-overview {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.balance-card-large {
    background: linear-gradient(135deg, #1c2128 0%, #161b22 100%);
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.balance-card-large .balance-label {
    font-size: 13px;
    color: #7d8590;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-card-large .balance-value {
    font-size: 42px;
    font-weight: 700;
    color: #3fb950;
    margin-bottom: 16px;
    font-family: 'SF Mono', 'Monaco', monospace;
}

.balance-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.btn-wallet {
    padding: 10px 24px;
    background: #238636;
    border: 1px solid #2ea043;
    border-radius: 6px;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-wallet:hover {
    background: #2ea043;
    box-shadow: 0 0 12px rgba(46, 160, 67, 0.4);
}

/* Wallet Stats Grid */
.wallet-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.wallet-stat-item {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.wallet-stat-label {
    font-size: 11px;
    color: #7d8590;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.wallet-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #c9d1d9;
    font-family: 'SF Mono', monospace;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon {
    font-size: 24px;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 11px;
    color: #7d8590;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #c9d1d9;
    font-family: 'SF Mono', monospace;
}

/* Transaction List */
.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.transaction-item {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transaction-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.transaction-icon {
    font-size: 20px;
}

.transaction-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.transaction-type {
    font-size: 13px;
    font-weight: 600;
    color: #c9d1d9;
}

.transaction-time {
    font-size: 10px;
    color: #7d8590;
}

.transaction-amount {
    font-size: 15px;
    font-weight: 700;
    font-family: 'SF Mono', monospace;
}

.transaction-amount.positive {
    color: #3fb950;
}

.transaction-amount.negative {
    color: #f85149;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(1, 4, 9, 0.8);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #30363d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #c9d1d9;
}

.modal-close {
    background: none;
    border: none;
    color: #7d8590;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #21262d;
    color: #c9d1d9;
}

.modal-body {
    padding: 24px;
}

.fund-info {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.fund-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.fund-info-item:last-child {
    margin-bottom: 0;
}

.fund-info-item span:first-child {
    color: #7d8590;
}

.fund-info-item span:last-child {
    color: #c9d1d9;
    font-weight: 600;
}

.fund-quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 16px;
}

.btn-amount {
    padding: 10px;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #58a6ff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-amount:hover {
    background: #30363d;
    border-color: #58a6ff;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #30363d;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.error-text {
    color: #f85149;
    font-size: 13px;
    margin-top: 12px;
    padding: 10px;
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    border-radius: 6px;
}


/* RIGHT PANEL */
.right-panel {
    background: #161b22;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.3);
}

.right-panel::-webkit-scrollbar {
    width: 10px;
}

.right-panel::-webkit-scrollbar-track {
    background: #161b22;
}

.right-panel::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 5px;
    border: 2px solid #161b22;
}

.right-panel::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

/* ============================================
   PANEL SECTIONS
   ============================================ */
.panel-section {
    background: #161b22;
    padding: 24px;
    border-bottom: 2px solid #21262d;
}

.section-header {
    font-size: 14px;
    font-weight: 700;
    color: #8b949e;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.section-badge {
    background: #30363d;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    color: #e1e8ed;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
}

.panel-title {
    font-size: 15px;
    font-weight: 700;
    color: #e1e8ed;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 12px;
    border-bottom: 2px solid #30363d;
}

/* ============================================
   CAPITAL & RISK OVERVIEW
   ============================================ */
.capital-risk-grid {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 20px;
    margin-bottom: 20px;
}

.balance-card {
    background: linear-gradient(135deg, #1c2128 0%, #161b22 100%);
    padding: 24px;
    border-radius: 12px;
    border: 2px solid #30363d;
}

.balance-main {
    text-align: center;
}

.balance-label {
    font-size: 11px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 600;
}

.balance-value {
    font-size: 48px;
    font-weight: 900;
    color: #58a6ff;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    text-shadow: 0 4px 16px rgba(88, 166, 255, 0.4);
    letter-spacing: -2px;
    margin-bottom: 8px;
    line-height: 1;
}

.balance-change {
    font-size: 16px;
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    color: #8b949e;
}

.risk-gauge-card {
    background: #0d1117;
    border-radius: 12px;
    border: 2px solid #30363d;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.gauge-svg {
    width: 180px;
    height: 110px;
}

.gauge-value {
    font-size: 32px;
    font-weight: 900;
    fill: #58a6ff;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.gauge-label {
    font-size: 12px;
    font-weight: 700;
    fill: #8b949e;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    grid-column: 1 / -1;
}

.metric-item {
    background: #0d1117;
    padding: 16px;
    border-radius: 10px;
    border: 2px solid #21262d;
    transition: all 0.2s ease;
}

.metric-item:hover {
    border-color: #30363d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.metric-label {
    font-size: 11px;
    color: #8b949e;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 20px;
    font-weight: 800;
    color: #e1e8ed;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.metric-value.positive {
    color: #3fb950;
}

.metric-value.negative {
    color: #f85149;
}

/* ============================================
   ALERTS
   ============================================ */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert-success,
.alert-warning,
.alert-critical,
.alert-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid;
}

.alert-success {
    background: rgba(63, 185, 80, 0.1);
    border-color: rgba(63, 185, 80, 0.3);
    color: #3fb950;
}

.alert-warning {
    background: rgba(240, 136, 62, 0.1);
    border-color: rgba(240, 136, 62, 0.3);
    color: #f0883e;
}

.alert-critical {
    background: rgba(248, 81, 73, 0.1);
    border-color: rgba(248, 81, 73, 0.3);
    color: #f85149;
    animation: alertPulse 2s ease-in-out infinite;
}

@keyframes alertPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.alert-info {
    background: rgba(88, 166, 255, 0.1);
    border-color: rgba(88, 166, 255, 0.3);
    color: #58a6ff;
}

.alert-icon {
    font-size: 18px;
    font-weight: 700;
}

.alert-text {
    flex: 1;
}

/* ============================================
   DIRECTIONAL EXPOSURE
   ============================================ */
.directional-visual {
    margin-bottom: 20px;
}

.balance-bar {
    display: flex;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #21262d;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.balance-fall,
.balance-rise {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: width 0.4s ease;
    padding: 12px;
    position: relative;
}

.balance-fall {
    background: linear-gradient(135deg, #da3633, #f85149);
    box-shadow: inset 0 0 30px rgba(248, 81, 73, 0.3);
}

.balance-rise {
    background: linear-gradient(135deg, #238636, #3fb950);
    box-shadow: inset 0 0 30px rgba(63, 185, 80, 0.3);
}

.balance-label {
    font-size: 12px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.balance-value {
    font-size: 20px;
    font-weight: 900;
    color: white;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.balance-percent {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.bias-indicator {
    text-align: center;
    padding: 12px;
    background: #0d1117;
    border-radius: 10px;
    border: 2px solid #21262d;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.bias-label {
    font-size: 12px;
    color: #8b949e;
    font-weight: 600;
}

.bias-value {
    font-size: 20px;
    font-weight: 900;
    color: #58a6ff;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.bias-direction {
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
}

.dir-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.dir-metric {
    background: #0d1117;
    padding: 14px;
    border-radius: 8px;
    border: 2px solid #21262d;
    text-align: center;
}

.dir-metric-label {
    font-size: 10px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 600;
}

.dir-metric-value {
    font-size: 18px;
    font-weight: 800;
    color: #58a6ff;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

/* ============================================
   CONTRACT LISTS
   ============================================ */
.contract-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contract-card {
    background: #0d1117;
    border: 2px solid #21262d;
    border-radius: 10px;
    padding: 14px;
    transition: all 0.2s ease;
}

.contract-card:hover {
    border-color: #30363d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

.contract-type {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contract-type.rise {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
    border: 1px solid rgba(63, 185, 80, 0.3);
}

.contract-type.fall {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, 0.3);
}

.contract-timer {
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    font-weight: 700;
    color: #58a6ff;
}

.contract-timer.urgent {
    color: #f85149;
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.contract-details {
    font-size: 12px;
    color: #8b949e;
    line-height: 1.6;
}

.contract-exposure {
    font-weight: 600;
    color: #58a6ff;
}

/* ============================================
   BARRIER ANALYSIS
   ============================================ */
.barrier-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.barrier-stat {
    background: #0d1117;
    padding: 14px;
    border-radius: 8px;
    border: 2px solid #21262d;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.barrier-stat-label {
    font-size: 10px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.barrier-stat-value {
    font-size: 18px;
    font-weight: 800;
    color: #58a6ff;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.barrier-clusters {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.barrier-cluster {
    background: #0d1117;
    border-left: 4px solid;
    border-radius: 8px;
    padding: 14px 16px;
    transition: all 0.2s ease;
}

.barrier-cluster:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.barrier-cluster.critical {
    border-left-color: #f85149;
    background: rgba(248, 81, 73, 0.05);
}

.barrier-cluster.near {
    border-left-color: #f0883e;
    background: rgba(240, 136, 62, 0.05);
}

.barrier-cluster.moderate {
    border-left-color: #58a6ff;
    background: rgba(88, 166, 255, 0.05);
}

.barrier-cluster.distant {
    border-left-color: #8b949e;
    background: rgba(139, 148, 158, 0.05);
}

.barrier-price {
    font-size: 18px;
    font-weight: 800;
    color: #e1e8ed;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    margin-bottom: 8px;
}

.barrier-distance {
    font-size: 12px;
    color: #8b949e;
    margin-bottom: 10px;
}

.barrier-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 11px;
    color: #8b949e;
}

.barrier-info-item {
    display: flex;
    justify-content: space-between;
}

.barrier-info-value {
    color: #e1e8ed;
    font-weight: 600;
}

.distance-distribution {
    background: #0d1117;
    border-radius: 10px;
    border: 2px solid #21262d;
    padding: 16px;
}

.dist-title {
    font-size: 12px;
    font-weight: 700;
    color: #8b949e;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dist-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dist-bar {
    display: grid;
    grid-template-columns: 60px 1fr 40px;
    gap: 10px;
    align-items: center;
}

.dist-bar-label {
    font-size: 11px;
    font-weight: 600;
    color: #8b949e;
}

.dist-bar-track {
    height: 20px;
    background: #161b22;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #21262d;
}

.dist-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #238636, #3fb950);
    transition: width 0.4s ease;
}

.dist-bar-count {
    font-size: 12px;
    font-weight: 700;
    color: #58a6ff;
    text-align: right;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

/* ============================================
   DIGIT EXPOSURE
   ============================================ */
.digit-summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 14px;
    background: #0d1117;
    border-radius: 10px;
    border: 2px solid #21262d;
}

.digit-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.digit-label {
    font-size: 10px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.digit-current,
.digit-target {
    font-size: 24px;
    font-weight: 900;
    color: #58a6ff;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.digit-distribution {
    background: #0d1117;
    border-radius: 10px;
    border: 2px solid #21262d;
    padding: 16px;
    margin-bottom: 20px;
}

.digit-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.digit-bar {
    display: grid;
    grid-template-columns: 30px 1fr 80px 70px;
    gap: 10px;
    align-items: center;
}

.digit-num {
    font-size: 14px;
    font-weight: 700;
    color: #8b949e;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.digit-track {
    height: 24px;
    background: #161b22;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #21262d;
    position: relative;
}

.digit-fill {
    height: 100%;
    background: linear-gradient(90deg, #238636, #3fb950);
    transition: width 0.4s ease;
    border-radius: 12px;
}

.digit-amount {
    font-size: 12px;
    font-weight: 700;
    color: #58a6ff;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.digit-contracts {
    font-size: 11px;
    color: #8b949e;
}

.digit-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.digit-metric {
    background: #0d1117;
    padding: 14px;
    border-radius: 8px;
    border: 2px solid #21262d;
    text-align: center;
}

.digit-metric-label {
    font-size: 10px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 600;
}

.digit-metric-value {
    font-size: 16px;
    font-weight: 800;
    color: #58a6ff;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

/* ============================================
   VOLATILITY & RANGE RISK
   ============================================ */
.vol-summary {
    margin-bottom: 20px;
}

.vol-main {
    background: #0d1117;
    padding: 18px;
    border-radius: 10px;
    border: 2px solid #21262d;
    text-align: center;
}

.vol-label {
    font-size: 11px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.vol-value {
    font-size: 32px;
    font-weight: 900;
    color: #58a6ff;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    text-shadow: 0 2px 8px rgba(88, 166, 255, 0.3);
}

.vol-breakdown {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.vol-item {
    background: #0d1117;
    border-radius: 10px;
    border: 2px solid #21262d;
    padding: 16px;
}

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

.vol-item-label {
    font-size: 13px;
    font-weight: 700;
    color: #e1e8ed;
}

.vol-item-value {
    font-size: 16px;
    font-weight: 800;
    color: #58a6ff;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.vol-item-detail {
    font-size: 12px;
    color: #8b949e;
    line-height: 1.6;
}

/* ============================================
   TIME-BASED RISK
   ============================================ */
.time-visual {
    margin-bottom: 20px;
}

.time-bar {
    display: flex;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #21262d;
    margin-bottom: 12px;
}

.time-segment {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    transition: width 0.4s ease;
    padding: 8px 4px;
}

.time-segment.expiring {
    background: linear-gradient(135deg, #da3633, #f85149);
}

.time-segment.near {
    background: linear-gradient(135deg, #d29922, #f0883e);
}

.time-segment.mid {
    background: linear-gradient(135deg, #1f6feb, #58a6ff);
}

.time-segment.long {
    background: linear-gradient(135deg, #238636, #3fb950);
}

.time-label {
    font-size: 9px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.time-value {
    font-size: 16px;
    font-weight: 900;
    color: white;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.time-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.time-metric {
    background: #0d1117;
    padding: 14px;
    border-radius: 8px;
    border: 2px solid #21262d;
    text-align: center;
}

.time-metric-label {
    font-size: 10px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 600;
}

.time-metric-value {
    font-size: 18px;
    font-weight: 800;
    color: #58a6ff;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

/* ============================================
   PRICE STEERING
   ============================================ */
.steering-status {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.steering-indicator {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #0d1117;
    border-radius: 10px;
}

.steering-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #0d1117;
    border: 3px solid #30363d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.steering-indicator.active .steering-icon {
    border-color: #58a6ff;
    background: rgba(88, 166, 255, 0.1);
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.steering-text {
    flex: 1;
}

.steering-label {
    font-size: 11px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 600;
}

.steering-value {
    font-size: 18px;
    font-weight: 800;
    color: #58a6ff;
}

.steering-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.steering-metric {
    background: #161b22;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #21262d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.steering-metric-label {
    font-size: 11px;
    color: #8b949e;
    font-weight: 600;
}

.steering-metric-value {
    font-size: 14px;
    font-weight: 800;
    color: #58a6ff;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

/* ============================================
   PRICE CHART
   ============================================ */
.chart-section {
    padding: 20px;
}

.chart-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.timeframe-buttons {
    display: flex;
    gap: 8px;
}

.chart-wrapper {
    background: #0d1117;
    border-radius: 12px;
    border: 2px solid #21262d;
    padding: 20px;
    height: 400px;
    position: relative;
}

#priceChart {
    width: 100%;
    height: 100%;
}

/* ============================================
   TRADES LIST
   ============================================ */
.trades-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trade-card {
    background: #0d1117;
    border: 2px solid #21262d;
    border-radius: 10px;
    padding: 16px;
    transition: all 0.2s ease;
}

.trade-card:hover {
    border-color: #30363d;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.trade-card.settled {
    opacity: 0.7;
}

.trade-card.won {
    border-left: 4px solid #3fb950;
    background: rgba(63, 185, 80, 0.03);
}

.trade-card.lost {
    border-left: 4px solid #f85149;
    background: rgba(248, 81, 73, 0.03);
}

.trade-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.trade-type-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
}

.trade-type-badge.rise {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
    border-color: rgba(63, 185, 80, 0.3);
}

.trade-type-badge.fall {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
    border-color: rgba(248, 81, 73, 0.3);
}

.trade-type-badge.match {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
    border-color: rgba(88, 166, 255, 0.3);
}

.trade-type-badge.touch {
    background: rgba(240, 136, 62, 0.15);
    color: #f0883e;
    border-color: rgba(240, 136, 62, 0.3);
}

.trade-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.trade-timer {
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 16px;
    font-weight: 800;
    color: #58a6ff;
}

.trade-timer.urgent {
    color: #f85149;
    animation: blink 1s ease-in-out infinite;
}

.trade-outcome {
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}

.trade-outcome.won {
    background: rgba(63, 185, 80, 0.2);
    color: #3fb950;
}

.trade-outcome.lost {
    background: rgba(248, 81, 73, 0.2);
    color: #f85149;
}

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

.trade-info-item {
    font-size: 12px;
    color: #8b949e;
}

.trade-info-label {
    font-weight: 600;
    margin-right: 4px;
}

.trade-info-value {
    color: #e1e8ed;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.trade-footer {
    padding-top: 12px;
    border-top: 1px solid #21262d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trade-pnl {
    font-size: 14px;
    font-weight: 800;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.trade-pnl.positive {
    color: #3fb950;
}

.trade-pnl.negative {
    color: #f85149;
}

.trade-id {
    font-size: 10px;
    color: #8b949e;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

/* ============================================
   RIGHT PANEL - TRADING CONTROLS
   ============================================ */
.price-display {
    background: linear-gradient(135deg, #1c2128 0%, #161b22 100%);
    padding: 10px 4px;
    text-align: center;
    border-bottom: 2px solid #21262d;
}

.price-label {
    font-size: 2px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
    font-weight: 600;
}

.price-value {
    font-size: 2px;
    font-weight: 900;
    color: #58a6ff;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    text-shadow: 0 4px 16px rgba(88, 166, 255, 0.4);
    letter-spacing: -2px;
    margin-bottom: 2px;
    line-height: 1;
}

.price-change {
    font-size: 5px;
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    padding: 6px 14px;
    border-radius: 8px;
    display: inline-block;
}

.price-change.positive {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
}

.price-change.negative {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}

.price-change.neutral {
    background: rgba(139, 148, 158, 0.15);
    color: #8b949e;
}

.trading-panel {
    padding: 24px;
    background: #161b22;
    border-bottom: 2px solid #21262d;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #8b949e;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: #0d1117;
    border: 2px solid #30363d;
    border-radius: 8px;
    color: #e1e8ed;
    font-size: 14px;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-weight: 600;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.form-group input:hover,
.form-group select:hover {
    border-color: #484f58;
}

.payout-display {
    background: #0d1117;
    border: 2px solid #30363d;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    font-size: 24px;
    font-weight: 900;
    color: #3fb950;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.validation-indicator {
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    border: 2px solid;
}

.validation-indicator.valid {
    background: rgba(63, 185, 80, 0.1);
    border-color: rgba(63, 185, 80, 0.3);
    color: #3fb950;
}

.validation-indicator.invalid {
    background: rgba(248, 81, 73, 0.1);
    border-color: rgba(248, 81, 73, 0.3);
    color: #f85149;
}

.trade-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-trade {
    padding: 18px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-trade:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.btn-trade:active {
    transform: translateY(0);
}

.btn-rise {
    background: linear-gradient(135deg, #238636, #3fb950);
    color: white;
}

.btn-rise:hover {
    background: linear-gradient(135deg, #2ea043, #4ac15f);
}

.btn-fall {
    background: linear-gradient(135deg, #da3633, #f85149);
    color: white;
}

.btn-fall:hover {
    background: linear-gradient(135deg, #e5534b, #ff6b6b);
}

.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #1f6feb;
    color: white;
}

.btn-primary:hover {
    background: #388bfd;
}

.btn-suggest {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6e40c9, #8957e5);
    color: white;
    margin-bottom: 16px;
}

.btn-suggest:hover {
    background: linear-gradient(135deg, #8957e5, #a371f7);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 11px;
}

.info-panel {
    padding: 24px;
    background: #161b22;
}

.info-content {
    font-size: 13px;
    color: #8b949e;
    line-height: 1.8;
}

.info-content ul {
    list-style: none;
    padding-left: 0;
}

.info-content li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.info-content li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #58a6ff;
    font-weight: 700;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
    position: fixed;
    top: 80px;
    right: 24px;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    border: 2px solid;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-error {
    background: rgba(248, 81, 73, 0.95);
    border-color: #f85149;
    color: white;
}

.toast-info {
    background: rgba(88, 166, 255, 0.95);
    border-color: #58a6ff;
    color: white;
}

.toast-success {
    background: rgba(63, 185, 80, 0.95);
    border-color: #3fb950;
    color: white;
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #8b949e;
    font-size: 13px;
    font-weight: 600;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.positive {
    color: #3fb950 !important;
}

.negative {
    color: #f85149 !important;
}

.neutral {
    color: #8b949e !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1400px) {
    .main-container {
        grid-template-columns: 1fr 360px;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 1fr;
    }
    
    .right-panel {
        border-left: none;
        border-top: 2px solid #21262d;
    }
}

@media (max-width: 768px) {
    .header-stats {
        display: none;
    }
    
    .capital-risk-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .dir-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
