/* ============================================
   PANELS STYLES
   ICT Analyzer Pro V29.5
============================================ */

/* Signals Panel */
.signals-filters {
    display: flex;
    gap: 0.3rem;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.signals-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.4rem;
}

/* Signal Card - Ultra Compact Design */
.signal-item {
    background: var(--bg-tertiary);
    border-radius: 4px;
    padding: 0.5rem;
    margin-bottom: 0.35rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.signal-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-color);
}

.signal-item.active {
    border-color: var(--accent-yellow);
    background: rgba(240, 185, 11, 0.08);
}

.signal-item.buy {
    border-right: 2px solid var(--buy-green);
}

.signal-item.sell {
    border-right: 2px solid var(--sell-red);
}

/* Row 1: Symbol + Type Badge + Confidence */
.signal-row-1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.3rem;
}

.signal-symbol-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.signal-symbol {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.signal-type-mini {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.1rem 0.3rem;
    border-radius: 2px;
}

.signal-type-mini.buy {
    background: var(--buy-green);
    color: white;
}

.signal-type-mini.sell {
    background: var(--sell-red);
    color: white;
}

.signal-meta {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.signal-grade-mini {
    font-size: 0.55rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.signal-confidence {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-yellow);
}

/* Row 2: Prices Grid */
.signal-prices-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.15rem;
    background: var(--bg-secondary);
    border-radius: 3px;
    padding: 0.3rem;
    margin-bottom: 0.3rem;
}

.price-cell {
    text-align: center;
}

.price-cell-label {
    font-size: 0.5rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.price-cell-value {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-primary);
}

.price-cell-value.entry { color: var(--text-primary); }
.price-cell-value.sl { color: var(--sell-red); }
.price-cell-value.tp { color: var(--buy-green); }

/* Row 3: Strategy + R:R + Time */
.signal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.55rem;
    color: var(--text-muted);
}

.signal-strategy-mini {
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.signal-rr {
    color: var(--accent-blue);
    font-weight: 600;
}

.signal-time {
    font-size: 0.55rem;
    color: var(--text-muted);
}

/* Execute Button - Only shows on hover */
.signal-execute-row {
    display: none;
    margin-top: 0.3rem;
}

.signal-item:hover .signal-execute-row,
.signal-item.active .signal-execute-row {
    display: flex;
    gap: 0.25rem;
}

.signal-exec-btn {
    flex: 1;
    padding: 0.3rem;
    border: none;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    transition: all 0.15s;
}

.signal-exec-btn.execute {
    background: var(--accent-yellow);
    color: var(--bg-primary);
}

.signal-exec-btn.execute:hover {
    filter: brightness(1.1);
}

.signal-exec-btn.view {
    background: var(--bg-hover);
    color: var(--text-muted);
}

.signal-exec-btn.view:hover {
    color: var(--text-primary);
}

.signal-exec-btn i {
    font-size: 0.55rem;
}

.no-signals {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-muted);
}

.no-signals i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Positions Panel */
.positions-panel {
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.positions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.positions-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.positions-count {
    background: var(--accent-yellow);
    color: var(--bg-primary);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

.positions-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.summary-item {
    background: var(--bg-tertiary);
    padding: 0.5rem;
    border-radius: 6px;
    text-align: center;
}

.summary-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.summary-value {
    font-size: 0.9rem;
    font-weight: 600;
}

.summary-value.positive { color: var(--buy-green); }
.summary-value.negative { color: var(--sell-red); }

.positions-list {
    max-height: 300px;
    overflow-y: auto;
}

.position-item {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-right: 3px solid var(--border-color);
    transition: all 0.2s ease;
}

.position-item.buy { border-right-color: var(--buy-green); }
.position-item.sell { border-right-color: var(--sell-red); }

.position-item:hover {
    background: var(--bg-hover);
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.position-symbol {
    font-weight: 600;
    font-size: 0.9rem;
}

.position-direction {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.position-direction.buy {
    background: rgba(14, 203, 129, 0.2);
    color: var(--buy-green);
}

.position-direction.sell {
    background: rgba(246, 70, 93, 0.2);
    color: var(--sell-red);
}

.position-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
    font-size: 0.8rem;
}

.position-detail {
    display: flex;
    justify-content: space-between;
}

.position-detail-label {
    color: var(--text-muted);
}

.position-detail-value {
    color: var(--text-primary);
    font-weight: 500;
}

.position-pnl {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pnl-value {
    font-size: 1rem;
    font-weight: 700;
}

.pnl-value.positive { color: var(--buy-green); }
.pnl-value.negative { color: var(--sell-red); }

.position-actions {
    display: flex;
    gap: 0.5rem;
}

.no-positions {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.no-positions i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* Replay Panel */
.replay-panel {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 320px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.replay-panel.active {
    display: block;
    animation: modalSlideIn 0.3s ease-out;
}

.replay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.replay-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.replay-title i {
    color: var(--accent-yellow);
}

.replay-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
}

.replay-close:hover {
    color: var(--text-primary);
}

.replay-content {
    padding: 1rem;
}

.replay-section {
    margin-bottom: 1rem;
}

.replay-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.replay-date-row {
    display: flex;
    gap: 0.5rem;
}

.replay-quick-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.replay-quick-dates button {
    padding: 0.4rem 0.6rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.15s;
}

.replay-quick-dates button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.replay-speed-row, .replay-step-row {
    display: flex;
    gap: 0.35rem;
}

.speed-btn, .step-btn {
    flex: 1;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.15s;
}

.speed-btn:hover, .step-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.speed-btn.active, .step-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

.replay-settings {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.replay-start-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--accent-blue);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-family);
    transition: all 0.15s;
    margin-top: 0.5rem;
}

.replay-start-btn:hover {
    background: #1976d2;
}

.replay-controls {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.replay-progress {
    height: 4px;
    background: var(--bg-hover);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.replay-progress-bar {
    height: 100%;
    background: var(--accent-blue);
    width: 0%;
    transition: width 0.3s ease;
}

.replay-time-display {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.replay-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.replay-buttons button {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.replay-buttons button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.replay-buttons button#replayPlayBtn {
    width: 50px;
    height: 50px;
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

.replay-buttons button#replayPlayBtn:hover {
    background: #1976d2;
}

.replay-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.replay-info strong {
    color: var(--text-primary);
}

/* Order Ticket Panel */
.order-ticket-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 380px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    display: none;
}

.order-ticket-panel.active {
    display: block;
    animation: modalSlideIn 0.3s ease-out;
}

.order-ticket-body {
    padding: 1rem;
}

.ticket-section {
    margin-bottom: 1rem;
}

.ticket-section label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.order-type-buttons {
    display: flex;
    gap: 0.5rem;
}

.order-type-btn {
    flex: 1;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--font-family);
    transition: all 0.2s ease;
}

.order-type-btn.active {
    background: var(--accent-yellow);
    border-color: var(--accent-yellow);
    color: var(--bg-primary);
    font-weight: 600;
}

.direction-section {
    display: flex;
    gap: 0.75rem;
}

.direction-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--font-family);
    font-weight: 600;
    transition: all 0.2s ease;
}

.direction-btn.buy {
    background: rgba(14, 203, 129, 0.15);
    color: var(--buy-green);
    border: 2px solid transparent;
}

.direction-btn.buy:hover, .direction-btn.buy.active {
    background: var(--buy-green);
    color: white;
}

.direction-btn.sell {
    background: rgba(246, 70, 93, 0.15);
    color: var(--sell-red);
    border: 2px solid transparent;
}

.direction-btn.sell:hover, .direction-btn.sell.active {
    background: var(--sell-red);
    color: white;
}

.direction-btn .price {
    font-size: 0.85rem;
    opacity: 0.8;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.section-header label {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-tp-btn {
    width: 24px;
    height: 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.add-tp-btn:hover {
    background: var(--buy-green);
    color: white;
}

.tp-level {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tp-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.tp-reward {
    font-size: 0.8rem;
    color: var(--buy-green);
    min-width: 60px;
}

.risk-summary {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
}

.risk-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.risk-row:last-child {
    margin-bottom: 0;
}

.risk-row .risk {
    color: var(--sell-red);
}

.risk-row .reward {
    color: var(--buy-green);
}

.ticket-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.ticket-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-family);
    transition: all 0.2s ease;
}

.ticket-btn.cancel {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.ticket-btn.cancel:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.ticket-btn.submit {
    background: var(--accent-yellow);
    color: var(--bg-primary);
}

.ticket-btn.submit:hover {
    background: #d9a00a;
}

/* Quick Order Panel */
.quick-order-panel {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    width: 280px;
    overflow: hidden;
}

.qop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.qop-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.qop-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.qop-body {
    padding: 1rem;
}

.qop-size {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.qop-size button {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1rem;
}

.qop-size input {
    flex: 1;
    text-align: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.qop-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.qop-btn {
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-family: var(--font-family);
    transition: all 0.15s;
}

.qop-btn.buy {
    background: var(--buy-green);
    color: white;
}

.qop-btn.sell {
    background: var(--sell-red);
    color: white;
}

.qop-btn:hover {
    filter: brightness(1.1);
}

.qop-btn-label {
    font-size: 0.85rem;
    font-weight: 600;
}

.qop-btn-price {
    font-size: 1rem;
    font-weight: 700;
}

/* ============================================
   AUTO TRADING SECTION
   ICT Analyzer Pro V29.5
============================================ */

.auto-trading-section {
    padding: 0.6rem;
    background: linear-gradient(135deg, rgba(240, 185, 11, 0.08) 0%, rgba(240, 185, 11, 0.02) 100%);
    border-bottom: 1px solid var(--border-color);
    border-top: 1px solid rgba(240, 185, 11, 0.2);
}

.auto-trading-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auto-trading-info {
    flex: 1;
}

.auto-trading-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.auto-trading-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.3s ease;
}

.auto-trading-status.active .status-dot {
    background: var(--buy-green);
    box-shadow: 0 0 8px var(--buy-green);
    animation: pulse 2s infinite;
}

/* V29.15: @keyframes pulse moved to base.css */

.auto-trading-status .status-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.auto-trading-status.active .status-text {
    color: var(--buy-green);
}

.auto-trading-stats {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.auto-trading-stats span {
    color: var(--accent-yellow);
    font-weight: 600;
}

/* Toggle Switch */
.auto-trading-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.auto-trading-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.auto-trading-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    transition: 0.3s;
    border-radius: 26px;
}

.auto-trading-switch .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    transition: 0.3s;
    border-radius: 50%;
}

.auto-trading-switch input:checked + .slider {
    background: var(--buy-green);
    border-color: var(--buy-green);
}

.auto-trading-switch input:checked + .slider:before {
    transform: translateX(24px);
    background: white;
}

/* Auto Trading Settings */
.auto-trading-settings {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auto-trading-settings .setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.auto-trading-settings .setting-row label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.auto-trading-settings .setting-row select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.3rem 0.5rem;
    color: var(--text-primary);
    font-size: 0.75rem;
    font-family: var(--font-family);
    cursor: pointer;
}

.auto-trading-settings .setting-row select:focus {
    outline: none;
    border-color: var(--accent-yellow);
}

.auto-trading-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(246, 70, 93, 0.15);
    border: 1px solid rgba(246, 70, 93, 0.3);
    border-radius: 6px;
    font-size: 0.7rem;
    color: var(--sell-red);
}

.auto-trading-warning i {
    font-size: 0.9rem;
}

/* ============================================
   AUTO TRADING PANEL V29.5 - COMPACT DESIGN
============================================ */

/* Auto Trading Header - V27.9.2 */
.auto-header {
    padding: 0.6rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.auto-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.auto-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.7rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.auto-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.3s;
}

.auto-status-indicator.active .auto-status-dot {
    background: var(--buy-green);
    box-shadow: 0 0 8px var(--buy-green);
    animation: pulse 2s infinite;
}

.auto-status-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.auto-status-indicator.active .auto-status-label {
    color: var(--buy-green);
}

.auto-toggle-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.auto-toggle-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.auto-toggle-btn.active {
    background: var(--buy-green);
    border-color: var(--buy-green);
    color: white;
}

/* Broker Connection Line */
.auto-broker-line {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem 0;
    transition: color 0.2s;
}

.auto-broker-line:hover {
    color: var(--text-secondary);
}

.auto-broker-line i {
    font-size: 0.65rem;
}

.auto-broker-line.connected {
    color: var(--buy-green);
}

.auto-broker-line.connected i {
    color: var(--buy-green);
}

/* Stats Grid */
.auto-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 0.75rem;
}

.auto-stat-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.stat-icon.green {
    background: rgba(14, 203, 129, 0.15);
    color: var(--buy-green);
}

.stat-icon.blue {
    background: rgba(33, 150, 243, 0.15);
    color: var(--accent-blue);
}

.stat-icon.yellow {
    background: rgba(240, 185, 11, 0.15);
    color: var(--accent-yellow);
}

.stat-icon.red {
    background: rgba(246, 70, 93, 0.15);
    color: var(--sell-red);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Config Badge */
.config-badge {
    margin: 0 0.75rem 0.75rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(240, 185, 11, 0.12) 0%, rgba(240, 185, 11, 0.04) 100%);
    border: 1px solid rgba(240, 185, 11, 0.25);
    border-radius: 8px;
}

.config-badge-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-yellow);
    margin-bottom: 0.5rem;
}

.config-badge-header i {
    font-size: 0.8rem;
}

.config-badge-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-primary);
}

.config-badge-stats strong {
    color: var(--buy-green);
}

.config-badge-params {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.config-badge-params span {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
    color: var(--text-muted);
}

/* Trade History Panel */
.trade-history-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
}

.history-header > span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.history-header i {
    color: var(--accent-yellow);
    font-size: 0.75rem;
}

.refresh-btn {
    width: 26px;
    height: 26px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all 0.2s;
}

.refresh-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.history-stats {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.stat-mini {
    flex: 1;
    text-align: center;
}

.stat-mini-value {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-mini-value.green { color: var(--buy-green); }
.stat-mini-value.red { color: var(--sell-red); }

.stat-mini-label {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.trade-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.no-trades {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.no-trades i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.no-trades p {
    font-size: 0.85rem;
}

/* Trade History Item */
.trade-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s;
}

.trade-history-item:hover {
    background: var(--bg-hover);
}

.trade-history-item.win {
    border-right: 2px solid var(--buy-green);
}

.trade-history-item.loss {
    border-right: 2px solid var(--sell-red);
}

.trade-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.trade-history-item .trade-symbol {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.trade-dir {
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

.trade-dir.buy {
    background: rgba(14, 203, 129, 0.2);
    color: var(--buy-green);
}

.trade-dir.sell {
    background: rgba(246, 70, 93, 0.2);
    color: var(--sell-red);
}

.trade-pnl {
    font-size: 0.8rem;
    font-weight: 700;
}

.trade-pnl.profit {
    color: var(--buy-green);
}

.trade-pnl.loss {
    color: var(--sell-red);
}

/* Auto Badge for sidebar */
.auto-badge {
    background: var(--buy-green) !important;
    font-size: 0.5rem !important;
    padding: 0.1rem 0.25rem !important;
    animation: pulse 2s infinite;
}
