/* Trading Specific Styles */

/* Chart Styles */
.trading-chart {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

/* Candlestick Colors */
.candle-bullish {
    fill: var(--accent-success);
    stroke: var(--accent-success);
}

.candle-bearish {
    fill: var(--accent-danger);
    stroke: var(--accent-danger);
}

.candle-doji {
    fill: var(--text-secondary);
    stroke: var(--text-secondary);
}

/* Price Line Styles */
.price-line-current {
    stroke: var(--accent-primary);
    stroke-width: 2;
    stroke-dasharray: 5, 5;
    opacity: 0.8;
}

.price-line-bid {
    stroke: var(--accent-success);
    stroke-width: 1;
    opacity: 0.6;
}

.price-line-ask {
    stroke: var(--accent-danger);
    stroke-width: 1;
    opacity: 0.6;
}

/* Order Markers */
.order-marker-buy {
    fill: var(--accent-success);
    stroke: var(--accent-success);
    stroke-width: 2;
}

.order-marker-sell {
    fill: var(--accent-danger);
    stroke: var(--accent-danger);
    stroke-width: 2;
}

.order-marker-stop-loss {
    fill: var(--accent-warning);
    stroke: var(--accent-warning);
    stroke-width: 2;
}

.order-marker-take-profit {
    fill: var(--accent-secondary);
    stroke: var(--accent-secondary);
    stroke-width: 2;
}

/* Drawing Tools */
.drawing-line {
    stroke: var(--accent-primary);
    stroke-width: 2;
    fill: none;
    opacity: 0.8;
}

.drawing-rectangle {
    stroke: var(--accent-primary);
    stroke-width: 2;
    fill: rgba(0, 212, 170, 0.1);
    opacity: 0.8;
}

.drawing-fibonacci {
    stroke: var(--accent-secondary);
    stroke-width: 1;
    fill: none;
    opacity: 0.7;
}

.drawing-channel {
    stroke: var(--accent-warning);
    stroke-width: 2;
    fill: rgba(255, 165, 2, 0.1);
    opacity: 0.8;
}

/* Technical Indicators */
.indicator-sma {
    stroke: var(--accent-primary);
    stroke-width: 2;
    fill: none;
}

.indicator-ema {
    stroke: var(--accent-secondary);
    stroke-width: 2;
    fill: none;
}

.indicator-bollinger-upper {
    stroke: var(--accent-warning);
    stroke-width: 1;
    fill: none;
    opacity: 0.7;
}

.indicator-bollinger-middle {
    stroke: var(--accent-warning);
    stroke-width: 2;
    fill: none;
}

.indicator-bollinger-lower {
    stroke: var(--accent-warning);
    stroke-width: 1;
    fill: none;
    opacity: 0.7;
}

.indicator-bollinger-fill {
    fill: rgba(255, 165, 2, 0.1);
    opacity: 0.3;
}

.indicator-rsi {
    stroke: var(--accent-primary);
    stroke-width: 2;
    fill: none;
}

.indicator-macd-line {
    stroke: var(--accent-primary);
    stroke-width: 2;
    fill: none;
}

.indicator-macd-signal {
    stroke: var(--accent-danger);
    stroke-width: 2;
    fill: none;
}

.indicator-macd-histogram-positive {
    fill: var(--accent-success);
    opacity: 0.7;
}

.indicator-macd-histogram-negative {
    fill: var(--accent-danger);
    opacity: 0.7;
}

/* Volume Bars */
.volume-bar {
    fill: var(--text-secondary);
    opacity: 0.6;
}

.volume-bar-high {
    fill: var(--accent-primary);
    opacity: 0.8;
}

/* Grid Lines */
.grid-line {
    stroke: var(--border-color);
    stroke-width: 1;
    opacity: 0.3;
}

.grid-line-major {
    stroke: var(--border-light);
    stroke-width: 1;
    opacity: 0.5;
}

/* Axis Labels */
.axis-label {
    fill: var(--text-secondary);
    font-size: 12px;
    font-family: 'Inter', sans-serif;
}

.axis-label-price {
    fill: var(--text-primary);
    font-size: 11px;
    font-weight: 500;
}

.axis-label-time {
    fill: var(--text-secondary);
    font-size: 10px;
}

/* Tooltip */
.chart-tooltip {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    box-shadow: var(--shadow-lg);
    font-size: 0.8rem;
    color: var(--text-primary);
    pointer-events: none;
    z-index: 1000;
}

.tooltip-header {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--accent-primary);
}

.tooltip-row {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.tooltip-label {
    color: var(--text-secondary);
}

.tooltip-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* Order Form Styles */
.order-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.order-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.order-form-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.order-form-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.order-form-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.order-form-body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.order-form-row {
    display: flex;
    gap: var(--spacing-md);
}

.order-form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.order-form-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.order-form-group input,
.order-form-group select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.order-form-group input:focus,
.order-form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 212, 170, 0.2);
}

.order-form-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.order-form-btn {
    flex: 1;
    border: none;
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.order-form-btn-primary:hover {
    background: #00b894;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.order-form-btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
}

/* Order List Styles */
.order-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.order-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--spacing-md);
    transition: var(--transition-fast);
}

.order-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.order-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}

.order-item-type {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-weight: 600;
    font-size: 0.9rem;
}

.order-item-type.buy {
    color: var(--accent-success);
}

.order-item-type.sell {
    color: var(--accent-danger);
}

.order-item-status {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
}

.order-item-status.pending {
    background: rgba(255, 165, 2, 0.2);
    color: var(--accent-warning);
}

.order-item-status.filled {
    background: rgba(46, 213, 115, 0.2);
    color: var(--accent-success);
}

.order-item-status.cancelled {
    background: rgba(255, 71, 87, 0.2);
    color: var(--accent-danger);
}

.order-item-body {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
    font-size: 0.8rem;
}

.order-item-field {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.order-item-field-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.order-item-field-value {
    color: var(--text-primary);
    font-weight: 600;
}

.order-item-actions {
    display: flex;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
}

.order-action-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.8rem;
}

.order-action-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
}

.order-action-btn.danger:hover {
    background: var(--accent-danger);
    border-color: var(--accent-danger);
    color: white;
}

/* Position Summary */
.position-summary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.position-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.position-summary-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.position-summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

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

.position-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.position-stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.position-stat-value.positive {
    color: var(--accent-success);
}

.position-stat-value.negative {
    color: var(--accent-danger);
}

/* Trading History */
.trading-history {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
}

.trading-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.trading-history-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.trading-history-filters {
    display: flex;
    gap: var(--spacing-sm);
}

.history-filter-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.8rem;
}

.history-filter-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
}

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

.trading-history-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.history-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    font-size: 0.8rem;
}

.history-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-xs);
}

.history-item-type {
    font-weight: 600;
}

.history-item-type.buy {
    color: var(--accent-success);
}

.history-item-type.sell {
    color: var(--accent-danger);
}

.history-item-time {
    color: var(--text-secondary);
    font-size: 0.7rem;
}

.history-item-body {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xs);
}

.history-item-field {
    display: flex;
    justify-content: space-between;
}

.history-item-field-label {
    color: var(--text-secondary);
}

.history-item-field-value {
    color: var(--text-primary);
    font-weight: 500;
}

.history-item-field-value.positive {
    color: var(--accent-success);
}

.history-item-field-value.negative {
    color: var(--accent-danger);
}

/* Loading States */
.loading-candles {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-secondary);
}

.loading-candles::before {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: var(--spacing-sm);
}

/* Error States */
.error-message {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid var(--accent-danger);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    color: var(--accent-danger);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
}

.error-message::before {
    content: "⚠️ ";
    margin-right: var(--spacing-xs);
}

/* Success States */
.success-message {
    background: rgba(46, 213, 115, 0.1);
    border: 1px solid var(--accent-success);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    color: var(--accent-success);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
}

.success-message::before {
    content: "✅ ";
    margin-right: var(--spacing-xs);
}

/* Warning States */
.warning-message {
    background: rgba(255, 165, 2, 0.1);
    border: 1px solid var(--accent-warning);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    color: var(--accent-warning);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
}

.warning-message::before {
    content: "⚠️ ";
    margin-right: var(--spacing-xs);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

.fade-out {
    animation: fadeOut 0.3s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.3s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

.slide-out-left {
    animation: slideOutLeft 0.3s ease-in;
}

.slide-out-right {
    animation: slideOutRight 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideOutLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

@keyframes slideOutRight {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

/* Smart Trading System Styles */
.order-item {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.order-item:hover {
    border-color: #00b894;
    box-shadow: 0 0 10px rgba(0, 184, 148, 0.3);
}

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

.order-type {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
}

.order-type.buy {
    background: #00b894;
    color: white;
}

.order-type.sell {
    background: #ff6b6b;
    color: white;
}

.order-time {
    color: #888;
    font-size: 12px;
}

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

.order-info {
    display: flex;
    gap: 10px;
}

.order-amount {
    font-weight: bold;
    color: #00b894;
}

.order-price {
    color: #888;
}

.profit-loss {
    font-weight: bold;
    font-size: 16px;
}

.profit-loss.positive {
    color: #00b894;
}

.profit-loss.negative {
    color: #ff6b6b;
}

.order-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

.status.filled {
    background: #00b894;
    color: white;
}

.manipulation-reason {
    color: #888;
    font-size: 11px;
    font-style: italic;
}

.no-orders {
    text-align: center;
    color: #888;
    padding: 20px;
    font-style: italic;
}

/* Eligibility Status */
.eligibility-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.eligibility-status .badge {
    font-size: 12px;
    padding: 4px 8px;
}

.eligibility-info {
    font-size: 11px;
    color: #888;
}

