/* ==========================================
   NeuralTrade Pro - AI Trading Dashboard
   Professional Dark Theme Styles
   ========================================== */

/* CSS Variables */
:root {
    /* Colors */
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2234;
    --bg-card: #151c2c;
    --bg-hover: #1e2a3e;
    
    /* Accent Colors */
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    
    /* Status Colors */
    --green: #10b981;
    --green-light: #34d399;
    --green-dark: #059669;
    --red: #ef4444;
    --red-light: #f87171;
    --red-dark: #dc2626;
    --yellow: #f59e0b;
    --orange: #f97316;
    --purple: #8b5cf6;
    --blue: #3b82f6;
    --cyan: #06b6d4;
    
    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Border */
    --border-color: #1e293b;
    --border-light: rgba(255, 255, 255, 0.1);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);
    
    /* Sizes */
    --sidebar-width: 260px;
    --header-height: 70px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Selection */
::selection {
    background: var(--accent-primary);
    color: white;
}

/* ==========================================
   Preloader
   ========================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.neural-loader {
    position: relative;
    width: 100px;
    height: 100px;
}

.neural-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: var(--accent-gradient);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

.neural-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid transparent;
    border-top-color: var(--accent-primary);
    border-radius: 50%;
}

.neural-ring:nth-child(2) {
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

.neural-ring:nth-child(3) {
    width: 70px;
    height: 70px;
    animation: spin 1.5s linear infinite reverse;
}

.neural-ring:nth-child(4) {
    width: 90px;
    height: 90px;
    animation: spin 2s linear infinite;
}

.loader-text {
    margin-top: 30px;
    color: var(--text-secondary);
    font-size: 14px;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.7; }
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

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

/* ==========================================
   App Layout
   ========================================== */
#app {
    display: flex;
    min-height: 100vh;
}

/* ==========================================
   Sidebar
   ========================================== */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform var(--transition-normal);
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: var(--accent-gradient);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    box-shadow: var(--shadow-glow);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-text .pro {
    font-size: 12px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: 4px;
    vertical-align: super;
}

/* Navigation */
.nav-menu {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.nav-item .badge {
    margin-left: auto;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    background: var(--green);
    color: white;
    border-radius: 10px;
}

.nav-item .badge.pulse {
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

/* AI Status */
.ai-status {
    padding: 16px;
    margin: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.ai-status-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 14px;
}

.ai-status-header i {
    color: var(--accent-primary);
}

.ai-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

.ai-status-item:first-of-type {
    border-top: none;
}

.status-indicator {
    font-size: 10px;
}

.status-indicator.online {
    color: var(--green);
    animation: statusPulse 2s ease-in-out infinite;
}

.status-indicator.offline {
    color: var(--red);
}

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

/* ==========================================
   Main Content
   ========================================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================
   Header
   ========================================== */
.header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

/* Market Selector */
.market-selector {
    display: flex;
    gap: 8px;
}

.market-btn {
    padding: 10px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

.market-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.market-btn.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
}

/* Search */
.header-center {
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 100;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.search-result-item:hover {
    background: var(--bg-hover);
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-stats {
    display: flex;
    gap: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.stat-value.success {
    color: var(--green);
}

/* Notification Button */
.notification-btn {
    position: relative;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.notification-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: var(--red);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================
   Sections
   ========================================== */
.section {
    display: none;
    padding: 24px;
    flex: 1;
}

.section.active {
    display: block;
}

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

.section-header h1 {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h1 i {
    color: var(--accent-primary);
}

/* ==========================================
   Stats Grid
   ========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue);
}

.stat-icon.purple {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple);
}

.stat-icon.orange {
    background: rgba(249, 115, 22, 0.15);
    color: var(--orange);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-title {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.stat-number.green {
    color: var(--green);
}

.stat-number.red {
    color: var(--red);
}

/* ==========================================
   Chart Container
   ========================================== */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 24px;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.pair-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pair-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.pair-details h2 {
    font-size: 18px;
    font-weight: 600;
}

.pair-exchange {
    font-size: 12px;
    color: var(--text-muted);
}

.price-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: 24px;
    padding-left: 24px;
    border-left: 1px solid var(--border-color);
}

.current-price {
    font-size: 24px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.price-change {
    font-size: 14px;
    font-weight: 600;
}

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

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

/* Chart Controls */
.chart-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.timeframe-selector {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: var(--border-radius-sm);
}

.tf-btn {
    padding: 8px 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.tf-btn:hover {
    color: var(--text-primary);
}

.tf-btn.active {
    background: var(--accent-primary);
    color: white;
}

.chart-type-selector {
    display: flex;
    gap: 4px;
}

.chart-type-btn {
    width: 38px;
    height: 38px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chart-type-btn:hover {
    color: var(--text-primary);
}

.chart-type-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* Chart Wrapper */
.chart-wrapper {
    position: relative;
    height: 400px;
    padding: 20px;
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

/* AI Signal Overlay */
.ai-signal-overlay {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 10;
    opacity: 0;
    transform: translateX(20px);
    transition: all var(--transition-normal);
}

.ai-signal-overlay.visible {
    opacity: 1;
    transform: translateX(0);
}

.signal-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.signal-content.buy {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--green);
}

.signal-content.sell {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--red);
}

.signal-content.hold {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid var(--yellow);
}

.signal-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.signal-content.buy .signal-icon {
    background: var(--green);
    color: white;
}

.signal-content.sell .signal-icon {
    background: var(--red);
    color: white;
}

.signal-content.hold .signal-icon {
    background: var(--yellow);
    color: white;
}

.signal-type {
    font-size: 14px;
    font-weight: 700;
    display: block;
}

.signal-content.buy .signal-type {
    color: var(--green);
}

.signal-content.sell .signal-type {
    color: var(--red);
}

.signal-content.hold .signal-type {
    color: var(--yellow);
}

.signal-confidence {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==========================================
   Indicators Panel
   ========================================== */
.indicators-panel {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.indicator-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.indicator-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    min-height: 100px;
    max-height: 150px;
    overflow: hidden;
}

.indicator-card canvas {
    width: 100% !important;
    height: 60px !important;
    max-height: 60px;
}

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

.indicator-name {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.indicator-value {
    font-size: 15px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.indicator-value.green {
    color: var(--green);
}

.indicator-value.red {
    color: var(--red);
}

.indicator-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width var(--transition-normal);
}

.bar-fill.rsi {
    background: linear-gradient(90deg, var(--green) 0%, var(--yellow) 50%, var(--red) 100%);
}

.bar-fill.stoch {
    background: var(--accent-gradient);
}

.indicator-zones {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
}

/* Bollinger Visual */
.bb-visual {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    height: 50px;
    justify-content: space-between;
    padding: 5px 0;
}

.bb-band {
    width: 100%;
    height: 2px;
    background: var(--text-muted);
    border-radius: 1px;
}

.bb-price {
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
    position: relative;
}

/* ==========================================
   Bottom Panels
   ========================================== */
.bottom-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h3 {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-header h3 i {
    color: var(--accent-primary);
}

.refresh-btn {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.refresh-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.refresh-btn.spinning i {
    animation: spin 1s linear infinite;
}

/* Signals List */
.signals-list {
    max-height: 300px;
    overflow-y: auto;
}

.signal-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.signal-item:hover {
    background: var(--bg-hover);
}

.signal-item:last-child {
    border-bottom: none;
}

.signal-pair {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 120px;
}

.signal-pair img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.signal-pair-name {
    font-weight: 600;
    font-size: 14px;
}

.signal-direction {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 20px;
}

.signal-direction.buy {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

.signal-direction.sell {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

.signal-confidence-bar {
    flex: 1;
    margin: 0 20px;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.signal-confidence-fill {
    height: 100%;
    border-radius: 3px;
    transition: width var(--transition-normal);
}

.signal-confidence-fill.high {
    background: var(--green);
}

.signal-confidence-fill.medium {
    background: var(--yellow);
}

.signal-confidence-fill.low {
    background: var(--red);
}

.signal-percent {
    font-size: 13px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    min-width: 45px;
    text-align: right;
}

.signal-time {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 60px;
    text-align: right;
}

/* Market List */
.market-list {
    max-height: 300px;
    overflow-y: auto;
}

.market-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.market-item:hover {
    background: var(--bg-hover);
}

.market-item:last-child {
    border-bottom: none;
}

.market-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
}

.market-name {
    flex: 1;
}

.market-name span {
    display: block;
}

.market-name span:first-child {
    font-weight: 600;
    font-size: 14px;
}

.market-name span:last-child {
    font-size: 12px;
    color: var(--text-muted);
}

.market-price {
    text-align: right;
}

.market-price span {
    display: block;
}

.market-price span:first-child {
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.market-price span:last-child {
    font-size: 12px;
}

.market-price span:last-child.green {
    color: var(--green);
}

.market-price span:last-child.red {
    color: var(--red);
}

/* ==========================================
   Signals Section
   ========================================== */
.signal-filters {
    display: flex;
    gap: 12px;
}

.signal-filters select {
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

.signal-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.signal-stat-card {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    text-align: center;
}

.stat-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 28px;
    font-weight: 700;
}

.stat-circle.buy {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
    border: 2px solid var(--green);
}

.stat-circle.sell {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
    border: 2px solid var(--red);
}

.stat-circle.neutral {
    background: rgba(245, 158, 11, 0.15);
    color: var(--yellow);
    border: 2px solid var(--yellow);
}

.signal-stat-card span {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Signals Table */
.signals-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.signals-table {
    width: 100%;
    border-collapse: collapse;
}

.signals-table th,
.signals-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.signals-table th {
    background: var(--bg-tertiary);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.signals-table td {
    font-size: 14px;
}

.signals-table tbody tr:hover {
    background: var(--bg-hover);
}

.signals-table .pair-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.signals-table .pair-cell img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.type-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.type-badge.buy {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

.type-badge.sell {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

.confidence-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.confidence-badge .bar {
    width: 60px;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.confidence-badge .bar-inner {
    height: 100%;
    border-radius: 3px;
}

.ai-source {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.ai-source i {
    color: var(--accent-primary);
}

.action-btn {
    padding: 6px 12px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.action-btn:hover {
    transform: scale(1.05);
}

/* ==========================================
   Neural Analysis Section
   ========================================== */
.neural-dashboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.neural-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
}

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

.neural-card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.neural-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.neural-status.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

.neural-visualization {
    height: 200px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    overflow: hidden;
}

.neural-visualization canvas {
    width: 100% !important;
    height: 100% !important;
}

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

.metric {
    text-align: center;
}

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

.metric-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Prediction Panel */
.prediction-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
}

.prediction-panel h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.prediction-panel h3 i {
    color: var(--accent-primary);
}

.prediction-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

.prediction-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.prediction-direction {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px;
    border-radius: var(--border-radius);
}

.prediction-direction.buy {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--green);
}

.prediction-direction.sell {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--red);
}

.prediction-direction i {
    font-size: 32px;
}

.prediction-direction.buy i,
.prediction-direction.buy span {
    color: var(--green);
}

.prediction-direction.sell i,
.prediction-direction.sell span {
    color: var(--red);
}

.prediction-direction span {
    font-size: 18px;
    font-weight: 700;
}

.prediction-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prediction-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
}

.prediction-item .label {
    font-size: 13px;
    color: var(--text-secondary);
}

.prediction-item .value {
    font-size: 14px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.prediction-item .value.green {
    color: var(--green);
}

.prediction-chart {
    height: 250px;
}

.prediction-chart canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ==========================================
   Journal Section
   ========================================== */
.journal-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.journal-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
}

.journal-stat .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
}

.journal-stat .stat-value {
    font-size: 24px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.journal-stat .stat-value.green {
    color: var(--green);
}

.journal-stat .stat-value.red {
    color: var(--red);
}

.journal-chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 24px;
    height: 350px;
}

.journal-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.journal-table {
    width: 100%;
    border-collapse: collapse;
}

.journal-table th,
.journal-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.journal-table th {
    background: var(--bg-tertiary);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.journal-table td {
    font-size: 14px;
}

.journal-table tbody tr:hover {
    background: var(--bg-hover);
}

.pnl-positive {
    color: var(--green);
    font-weight: 600;
}

.pnl-negative {
    color: var(--red);
    font-weight: 600;
}

/* ==========================================
   Calculators Section
   ========================================== */
.calculators-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.calc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
}

.calc-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.calc-card h3 i {
    color: var(--accent-primary);
}

.calc-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.calc-result {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    margin-top: 8px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.result-item:last-child {
    border-bottom: none;
}

.result-item span {
    font-size: 14px;
}

.result-item .value {
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.result-item .value.green {
    color: var(--green);
}

.result-item .value.red {
    color: var(--red);
}

/* ==========================================
   Settings Section
   ========================================== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
}

.settings-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-card h3 i {
    color: var(--accent-primary);
}

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

.api-item {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
}

.api-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.api-name {
    font-weight: 600;
}

.api-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
}

.api-status.online {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

.api-requests {
    font-size: 12px;
    color: var(--text-muted);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item label:first-child {
    font-size: 14px;
    color: var(--text-secondary);
}

.setting-item input[type="range"] {
    width: 150px;
}

.setting-item select {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 13px;
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 26px;
    transition: var(--transition-fast);
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: var(--transition-fast);
}

input:checked + .slider {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

input:checked + .slider:before {
    transform: translateX(22px);
    background: white;
}

/* ==========================================
   Modal
   ========================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform var(--transition-normal);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.close-modal:hover {
    color: var(--text-primary);
}

.modal form {
    padding: 24px;
}

/* ==========================================
   Notification Panel
   ========================================== */
.notification-panel {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: 360px;
    height: calc(100vh - var(--header-height));
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    z-index: 200;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
}

.notification-panel.active {
    transform: translateX(0);
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.notif-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.clear-notif {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 13px;
    cursor: pointer;
}

.notif-list {
    max-height: calc(100% - 70px);
    overflow-y: auto;
}

.notif-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.notif-item.unread {
    background: var(--bg-tertiary);
}

.notif-content {
    display: flex;
    gap: 12px;
}

.notif-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-icon.buy {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

.notif-icon.sell {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

.notif-icon.info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue);
}

.notif-text h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.notif-text p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.notif-text span {
    font-size: 11px;
    color: var(--text-muted);
}

/* ==========================================
   Toast Notifications
   ========================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid var(--green);
}

.toast.error {
    border-left: 4px solid var(--red);
}

.toast.warning {
    border-left: 4px solid var(--yellow);
}

.toast.info {
    border-left: 4px solid var(--blue);
}

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

.toast.success .toast-icon {
    color: var(--green);
}

.toast.error .toast-icon {
    color: var(--red);
}

.toast.warning .toast-icon {
    color: var(--yellow);
}

.toast.info .toast-icon {
    color: var(--blue);
}

.toast-message {
    font-size: 14px;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ==========================================
   Utilities
   ========================================== */
.green { color: var(--green) !important; }
.red { color: var(--red) !important; }
.yellow { color: var(--yellow) !important; }
.blue { color: var(--blue) !important; }
.purple { color: var(--purple) !important; }

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .indicator-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1200px) {
    .bottom-panels {
        grid-template-columns: 1fr;
    }
    
    .neural-dashboard {
        grid-template-columns: 1fr;
    }
    
    .prediction-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .header-stats {
        display: none;
    }
    
    .calculators-grid,
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .journal-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .indicator-row {
        grid-template-columns: 1fr;
    }
    
    .header-center {
        display: none;
    }
    
    .chart-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .chart-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .signal-stats {
        flex-direction: column;
    }
    
    .signals-table-container,
    .journal-table-container {
        overflow-x: auto;
    }
    
    .signals-table,
    .journal-table {
        min-width: 800px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0 16px;
    }
    
    .section {
        padding: 16px;
    }
    
    .market-selector {
        display: none;
    }
    
    .notification-panel {
        width: 100%;
    }
}

/* ==========================================
   OANDA API & Demo Trading Styles
   ========================================== */

/* OANDA Settings */
.oanda-settings, .demo-trading-settings {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.api-key-input {
    display: flex;
    gap: 8px;
}

.api-key-input input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.api-key-input .btn-icon {
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.api-key-input .btn-icon:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.setting-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.oanda-help {
    margin-top: 12px;
    padding: 10px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--border-radius-sm);
}

.oanda-help a {
    color: var(--accent-primary);
    text-decoration: none;
}

.oanda-help a:hover {
    text-decoration: underline;
}

/* Demo Account Info */
.demo-account-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
}

.demo-stat {
    text-align: center;
}

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

.demo-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.demo-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0;
}

.demo-stat-item {
    text-align: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
}

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

.demo-stat-item .stat-value {
    font-size: 16px;
    font-weight: 600;
}

/* Positions Panel */
.positions-panel {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 20px;
    border: 1px solid var(--border-color);
}

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

.positions-panel .badge {
    background: var(--accent-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 8px;
}

.demo-balance-mini {
    font-size: 14px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.demo-balance-mini span {
    color: var(--green);
    font-weight: 600;
}

.positions-list {
    max-height: 300px;
    overflow-y: auto;
}

.no-positions {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}

.position-item {
    display: grid;
    grid-template-columns: 1fr 1.5fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    margin-bottom: 8px;
    border-left: 3px solid var(--accent-primary);
    transition: all var(--transition-fast);
}

.position-item:hover {
    background: var(--bg-tertiary);
}

.position-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.position-type {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.position-type.buy {
    background: rgba(16, 185, 129, 0.2);
    color: var(--green);
}

.position-type.sell {
    background: rgba(239, 68, 68, 0.2);
    color: var(--red);
}

.position-instrument {
    font-weight: 600;
    color: var(--text-primary);
}

.position-lot {
    font-size: 12px;
    color: var(--text-muted);
}

.position-prices {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.position-profit {
    font-size: 16px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    min-width: 80px;
    text-align: right;
}

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

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

.close-position-btn {
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    color: var(--red);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.close-position-btn:hover {
    background: var(--red);
    color: white;
}

/* Clickable Signal */
.signal-clickable {
    cursor: pointer;
    transition: all var(--transition-fast);
}

.signal-clickable:hover {
    transform: translateX(4px);
    background: var(--bg-tertiary);
}

/* Trade Button */
.trade-btn {
    padding: 6px 12px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.trade-btn:hover {
    box-shadow: var(--shadow-glow);
}

.trade-btn.buy-btn {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
}

.trade-btn.sell-btn {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
}

/* Signal Item Enhanced */
.signal-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.signal-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
}

.signal-item.buy {
    border-left: 3px solid var(--green);
}

.signal-item.sell {
    border-left: 3px solid var(--red);
}

.signal-item.hold {
    border-left: 3px solid var(--yellow);
}

/* Btn Danger */
.btn-danger {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}
