:root { --primary: #f59e0b; --bg: #0b1120; --card: #1e293b; --text: #f8fafc; --success: #10b981; --danger: #ef4444; --info: #3b82f6; --gray: #94a3b8; }
        body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); margin: 0; padding: 20px; }

        .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 15px; flex-wrap: wrap; }
        .header > div:first-child { flex: 1; min-width: 200px; }
        .header > div:last-child { text-align: right; }
        
        .market-badge { padding: 6px 12px; border-radius: 8px; font-size: 0.75rem; font-weight: bold; border: 1px solid rgba(255,255,255,0.1); }
        
        .current-mode-display {
            display: inline-block;
            padding: 6px 12px;
            border-radius: 8px;
            font-size: 0.8rem;
            font-weight: 600;
        }
        .current-mode-display.mode-shadow {
            background: rgba(245, 158, 11, 0.15);
            border: 1px solid var(--primary);
            color: var(--primary);
        }
        .current-mode-display.mode-live {
            background: rgba(16, 185, 129, 0.15);
            border: 1px solid var(--success);
            color: var(--success);
        }
        .current-mode-display.mode-paused {
            background: rgba(148, 163, 184, 0.15);
            border: 1px solid var(--gray);
            color: var(--gray);
        }
        
        .trade-mode-icon { margin-left: 6px; }
        .trade-mode-icon-shadow { color: var(--primary); }
        .trade-mode-icon-live { color: var(--success); }
        
        .mode-panic { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border-color: var(--danger); }
        .mode-protect { background: rgba(59, 130, 246, 0.2); color: #93c5fd; border-color: var(--info); }
        .mode-agressive { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border-color: var(--success); }
        .mode-bearish { background: rgba(239, 68, 68, 0.25); color: #fca5a5; border-color: var(--danger); }
        .mode-bullish { background: rgba(16, 185, 129, 0.25); color: #6ee7b7; border-color: var(--success); }
        .mode-neutral { background: rgba(148, 163, 184, 0.25); color: #cbd5e1; border-color: var(--gray); }

        .stats-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 20px; }
        .kpi-card { background: var(--card); padding: 12px 10px; border-radius: 12px; border: 1px solid #334155; text-align: center; }
        .kpi-value { display: block; font-size: 1rem; font-weight: bold; color: var(--primary); }
        .kpi-label { font-size: 0.6rem; color: var(--gray); text-transform: uppercase; }

        @media (min-width: 768px) {
            .stats-bar { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; }
            .kpi-card { padding: 15px; }
            .kpi-value { font-size: 1.2rem; }
            .kpi-label { font-size: 0.65rem; }
        }

        #active-trades-section { margin-bottom: 30px; }
        .active-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
        .active-card { background: linear-gradient(145deg, #1e293b, #0f172a); border: 1px solid var(--info); border-radius: 12px; padding: 15px; border-left: 4px solid var(--info); }

        @media (min-width: 600px) {
            .active-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }
        }

        .grid-container { background: var(--card); border-radius: 12px; border: 1px solid #334155; overflow: hidden; margin-bottom: 30px; overflow-x: auto; }
        table100%; border-collapse { width: : collapse; text-align: left; min-width: 700px; }
        th { background: #0f172a; padding: 12px 10px; font-size: 0.7rem; color: var(--gray); text-transform: uppercase; white-space: nowrap; }
        td { padding: 10px 12px; border-bottom: 1px solid #334155; font-size: 0.8rem; white-space: nowrap; }
        
        .price { font-family: 'monospace'; font-weight: 600; }
        
        .sort-btn { border:1px solid var(--gray); background:transparent; color:var(--gray); padding: 4px 8px; border-radius: 6px; font-size:0.7rem; font-weight:bold; cursor:pointer; transition: all 0.2s ease-in-out; }
        .sort-btn.active { border-color: var(--primary); background: var(--primary); color: var(--bg); }

        .modal { 
            display: none; /* Hidden by default */
            position: fixed; 
            z-index: 1000; 
            left: 0; 
            top: 0; 
            width: 100%; 
            height: 100%; 
            background: rgba(0,0,0,0.85); 
            backdrop-filter: blur(4px);
            /* Flexbox properties for when it's displayed */
            justify-content: center;
            align-items: center;
        }
        .modal-content { 
            background: var(--card); 
            position: relative; /* Keep relative for stacking context */
            padding: 25px; 
            border-radius: 15px; 
            width: 90%; 
            max-width: 600px;
            height: 90vh;
            display: flex;
            flex-direction: column;
            border: 1px solid var(--primary); 
            box-shadow: 0 0 30px rgba(0,0,0,0.5); 
            /* Removed margin and transform properties */
        }
        .modal-header { font-size: 1.1rem; font-weight: bold; color: var(--primary); border-bottom: 1px solid #334155; padding-bottom: 10px; margin-bottom: 15px; }
        .config-text { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; line-height: 1.6; color: #cbd5e1; white-space: pre-wrap; }
        .rr-info { margin-top: 15px; padding: 10px; background: rgba(59, 130, 246, 0.1); border-radius: 8px; font-size: 0.75rem; color: #93c5fd; border: 1px solid var(--info); }
        .close-btn {
            position: absolute;
            top: 10px;
            right: 15px;
            cursor: pointer;
            color: var(--gray);
            font-size: 1.8rem; /* Larger font size */
            font-weight: bold;
            line-height: 1;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%; /* Circular shape */
            transition: background-color 0.2s, color 0.2s;
        }
        .close-btn:hover {
            background-color: rgba(255, 255, 255, 0.1);
            color: var(--text);
        }
        .manual-close-btn { background: var(--danger); color: white; border: none; padding: 10px; border-radius: 8px; cursor: pointer; font-weight: bold; text-align: center; }

        .heatmap-bar { background: #334155; height: 6px; border-radius: 3px; width: 100%; margin-top: 12px; overflow: hidden; }
        .heatmap-bar-inner { height: 100%; border-radius: 3px; transition: width 0.5s ease, background-color 0.5s ease; }
        
        /* v3.9.22: Estilos barra LED VU Meter */
        .heatmap-bar-inner { 
            display: flex; 
            align-items: center; 
            gap: 2px; 
            padding: 2px 4px;
        }
        .heatmap-bar-inner .led-white,
        .heatmap-bar-inner .led-red,
        .heatmap-bar-inner .led-green,
        .heatmap-bar-inner .led-yellow {
            display: inline-block;
            width: 6px;
            height: 10px;
            border-radius: 1px;
            flex-shrink: 0;
        }
        .heatmap-bar-inner .led-white { background-color: #555; }
        .heatmap-bar-inner .led-red { background-color: #ef4444; }
        .heatmap-bar-inner .led-green { background-color: #22c55e; }
        .heatmap-bar-inner .led-yellow { background-color: #f59e0b; }
        
        #loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg); display: flex; justify-content: center; align-items: center; z-index: 9999; transition: opacity 0.5s ease; }
        .spinner { border: 4px solid rgba(255, 255, 255, 0.1); width: 36px; height: 36px; border-radius: 50%; border-left-color: var(--primary); animation: spin 1s ease infinite; }
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

        .stale-trade {
            animation: stale-pulse 2.5s infinite;
            border-color: var(--primary);
        }

        @keyframes stale-pulse {
            0% {
                box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
            }
            70% {
                box-shadow: 0 0 5px 8px rgba(245, 158, 11, 0);
            }
            100% {
                box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
            }
        }
        .spinner-small {
            display: inline-block;
            border: 2px solid rgba(255, 255, 255, 0.3);
            width: 14px;
            height: 14px;
            border-radius: 50%;
            border-left-color: #fff;
            animation: spin 1s ease infinite;
            vertical-align: middle;
            margin-right: 8px;
        }

        #fear-greed-container {
            max-width: 300px; /* Adjust as needed */
            margin: 20px auto;
        }

        .trade-type-icon {
            font-size: 0.8rem;
            margin-left: 8px;
            font-weight: bold;
        }

        #equity-chart-container {
            margin-bottom: 40px;
        }

        #modalBody { /* For scrollable content within the modal */
            flex-grow: 1;
            overflow-y: auto;
            padding-right: 15px; /* Space for scrollbar */
        }

        /* Custom Scrollbar for Modal Body */
        #modalBody::-webkit-scrollbar {
            width: 8px;
        }

        #modalBody::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.2);
            border-radius: 4px;
        }

        #modalBody::-webkit-scrollbar-thumb {
            background-color: var(--primary);
            border-radius: 4px;
            border: 2px solid transparent;
            background-clip: content-box;
        }

        #modalBody::-webkit-scrollbar-thumb:hover {
            background-color: #fca51a; /* A slightly lighter shade of primary for hover */
        }
/* --- Stale Trade Visuals --- */
.stale-trade {
    position: relative; /* Needed for the overlay */
    border-left-color: var(--primary) !important; /* Make border more prominent */
}

/* Add a semi-transparent overlay to stale cards */
.stale-trade::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 12px;
    pointer-events: none; /* Allows clicking through the overlay */
}

.stale-indicator {
    display: inline-block;
    margin-right: 6px;
    color: var(--primary);
    animation: tick-tock 1.5s infinite;
}

@keyframes tick-tock {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-15deg); }
    100% { transform: rotate(0deg); }
}

/* Estilos para actualizaciones de Stop Loss */
.sl-updated {
    background-color: rgba(40, 167, 69, 0.1) !important;
    border-left: 4px solid #28a745 !important;
    animation: pulse-green 2s ease-in-out;
    transition: all 0.3s ease;
}

.sl-updated-modal {
    background-color: rgba(40, 167, 69, 0.15) !important;
    border: 2px solid #28a745 !important;
    animation: pulse-green 3s ease-in-out;
    transition: all 0.3s ease;
}

.sl-update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
    max-width: 300px;
    font-size: 14px;
    border-left: 4px solid #20c997;
}

.sl-update-notification .notification-content {
    line-height: 1.4;
}

.sl-update-notification .notification-content strong {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

.sl-update-notification .notification-content small {
    opacity: 0.8;
    font-style: italic;
}

/* Animaciones */
@keyframes pulse-green {
    0% { background-color: rgba(40, 167, 69, 0); border-left-color: transparent; }
    50% { background-color: rgba(40, 167, 69, 0.2); border-left-color: #28a745; }
    100% { background-color: rgba(40, 167, 69, 0.1); border-left-color: #28a745; }
}

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

/* Sistema de Tabs Principal */
.main-tabs {
    display: flex;
    gap: 5px;
    padding: 15px 20px 0;
    background: var(--bg);
    border-bottom: 2px solid #0f3460;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--gray);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.tab-btn:hover {
    background: rgba(15, 52, 96, 0.5);
    opacity: 1;
}

.tab-btn.active {
    background: #0f3460;
    color: var(--primary);
    opacity: 1;
    border-bottom: 3px solid var(--primary);
}

.tab-content {
    display: none;
    padding: 0 20px 20px;
}

.tab-content.active {
    display: block;
}

/* Panel de Administración */
.admin-section {
    background: var(--card);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #334155;
}

.admin-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.admin-tool-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.admin-tool-btn:hover {
    border-color: var(--primary);
    background: linear-gradient(145deg, #1e293b, #1a1a3e);
    transform: translateY(-2px);
}

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

.tool-icon {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.tool-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}

.tool-desc {
    font-size: 0.75rem;
    color: var(--gray);
}

.admin-result {
    background: var(--card);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #334155;
}

.admin-result pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--success);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Export/Backup Actions */
.export-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.export-action-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    border-radius: 10px;
}

.export-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.export-icon-large {
    font-size: 2rem;
}

.export-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    display: block;
}

.export-desc {
    font-size: 0.75rem;
    color: var(--gray);
}

.export-action-btn {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-action-btn:hover:not(:disabled) {
    background: #6366f1;
    transform: translateY(-2px);
}

.export-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Database Selector */
.database-select {
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--card);
    border: 1px solid #334155;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.85rem;
    min-width: 200px;
    cursor: pointer;
}

.database-select:focus {
    outline: none;
    border-color: var(--primary);
}

.database-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Exports List */
.exports-list-container {
    margin-top: 20px;
}

.exports-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.export-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(15, 52, 96, 0.3);
    border-radius: 6px;
    border: 1px solid #334155;
}

.export-item:hover {
    background: rgba(15, 52, 96, 0.5);
}

.export-icon {
    font-size: 1.2rem;
}

.export-name {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
}

.export-size {
    font-size: 0.75rem;
    color: var(--gray);
}

.export-download-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-download-btn:hover {
    background: var(--primary);
    color: white;
}

/* Tool Cards */
.tool-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    border-radius: 8px;
    margin-bottom: 12px;
}

.tool-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tool-icon-large {
    font-size: 1.5rem;
}

.tool-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    display: block;
}

.tool-desc {
    font-size: 0.75rem;
    color: var(--gray);
}

.tool-action-btn {
    padding: 8px 16px;
    background: var(--card);
    color: var(--text);
    border: 1px solid #334155;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tool-action-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.tool-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tool-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tool-inputs input {
    padding: 8px 12px;
    background: var(--card);
    border: 1px solid #334155;
    border-radius: 4px;
    color: var(--text);
    font-size: 0.8rem;
    width: 120px;
}

.tool-inputs input:disabled {
    opacity: 0.5;
}

/* Calculator */
.calculator-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.calc-input {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.calc-input label {
    font-size: 0.75rem;
    color: var(--gray);
}

.calc-input input {
    padding: 10px;
    background: var(--card);
    border: 1px solid #334155;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9rem;
}

.calc-input input:disabled {
    opacity: 0.5;
}

.calc-result {
    padding: 12px;
    background: rgba(15, 52, 96, 0.3);
    border-radius: 6px;
    color: var(--success);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-btn {
    padding: 12px 24px;
    background: var(--card);
    border: 1px solid #334155;
    border-radius: 8px;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-btn:hover:not(:disabled) {
    border-color: var(--primary);
}

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

.mode-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Config Grid */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.config-input {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.config-input label {
    font-size: 0.75rem;
    color: var(--gray);
}

.config-input input {
    padding: 10px;
    background: var(--card);
    border: 1px solid #334155;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9rem;
}

.config-input input:disabled {
    opacity: 0.5;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text);
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    accent-color: var(--primary);
}

.checkbox-group input:disabled {
    opacity: 0.5;
}

/* Strategy Grid */
.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.strategy-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text);
    cursor: pointer;
}

/* Danger Zone */
.danger-zone {
    border: 1px solid var(--danger);
    background: rgba(220, 38, 38, 0.1);
}

.danger-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.danger-btn {
    padding: 12px 20px;
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.danger-btn:hover:not(:disabled) {
    background: var(--danger);
    color: white;
}

.danger-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Disabled state for all inputs/buttons in placeholder sections */
.tab-content input:disabled,
.tab-content button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Responsive Mobile - Dispositivos pequeños */
@media (max-width: 480px) {
    body { padding: 10px; }
    
    .header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .header > div:last-child { text-align: left; }
    
    .main-tabs { padding: 10px 10px 0; gap: 3px; }
    .tab-btn { padding: 10px 12px; font-size: 12px; }
    
    .tab-content { padding: 0 10px 15px; }
    
    .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .kpi-card { padding: 10px 8px; }
    .kpi-value { font-size: 0.9rem; }
    .kpi-label { font-size: 0.55rem; }
    
    .active-card { padding: 12px; }
    
    #sort-controls { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
    .sort-btn { padding: 4px 6px; font-size: 0.65rem; }
    
    #active-trades-section h3 { font-size: 0.7rem; }
    .grid-container h3 { font-size: 0.7rem; }
    
    .admin-section { padding: 15px; }
    .admin-tool-btn { padding: 15px; }
    
    .mode-selector { flex-direction: column; gap: 8px; }
    .mode-btn { width: 100%; padding: 10px; }
    
    .danger-buttons { flex-direction: column; }
    .danger-btn { width: 100%; text-align: center; }
    
    .export-action-card { padding: 15px; }
    .export-action-btn { width: 100%; }
    
    #fear-greed-container { margin-top: 15px; }
    #equity-chart-container { height: 200px; margin-top: 15px; }
}

/* Responsive Tablet */
@media (min-width: 481px) and (max-width: 768px) {
    body { padding: 15px; }
    
    .stats-bar { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
    
    .active-card { padding: 14px; }
    
    .mode-selector { flex-wrap: wrap; }
    .mode-btn { flex: 1 1 120px; }
}

/* Mejoras para accesibilidad y touch */
@media (hover: none) {
    .admin-tool-btn:hover,
    .export-action-btn:hover:not(:disabled),
    .tool-action-btn:hover:not(:disabled),
    .danger-btn:hover:not(:disabled) {
        transform: none;
    }
    
    .mode-btn:hover:not(:disabled) {
        border-color: var(--primary);
    }
}

/* ============================================ */
/* REPORTS & ANALYTICS STYLES         */
/* ============================================ */

/* Reports Container */
.reports-container {
    padding: 20px;
}

.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.reports-header h2 {
    color: var(--primary);
    margin: 0;
}

.btn-refresh {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.btn-refresh:hover {
    background: #d97706;
    transform: scale(1.05);
}

.btn-refresh:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Report Sections */
.report-section {
    margin-bottom: 30px;
}

.report-section h3 {
    color: var(--text);
    border-bottom: 1px solid var(--gray);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Stats Grid for Reports */
.reports-container .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.reports-container .stat-card {
    background: var(--card);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    border: 1px solid #334155;
}

.reports-container .stat-card .value {
    display: block;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 4px;
}

.reports-container .stat-card .label {
    display: block;
    font-size: 0.65rem;
    color: var(--gray);
    text-transform: uppercase;
}

.reports-container .stat-card.positive {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.reports-container .stat-card.negative {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Reports Grid */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.report-card {
    background: var(--card);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #334155;
}

.report-card.full-width {
    grid-column: 1 / -1;
}

.report-card h4 {
    color: var(--text);
    margin: 0 0 12px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #334155;
    font-size: 0.9rem;
}

/* Emoji sizes in report headers - ensure consistent size */
.report-card h4 span,
.report-card h4::before {
    font-size: 1.1em;
}

/* Normalize emoji display in report titles */
.report-card h4 {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Fix emoji size in report titles - ensure all emojis are same size */
.report-card h4 .emoji {
    font-size: 1.1rem;
}

/* Report Tables */
.report-table-container {
    overflow-x: auto;
}

.report-table {
    width: 100%;
    font-size: 0.8rem;
    border-collapse: collapse;
}

.report-table th {
    text-align: left;
    padding: 8px;
    color: var(--gray);
    font-size: 0.65rem;
    text-transform: uppercase;
    border-bottom: 1px solid #334155;
    white-space: nowrap;
}

.report-table td {
    padding: 8px;
    border-bottom: 1px solid #334155;
    white-space: nowrap;
}

.report-table tr:last-child td {
    border-bottom: none;
}

.report-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 30px;
    color: var(--gray);
}

.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid var(--gray);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Reports */
@media (max-width: 768px) {
    .reports-grid {
        grid-template-columns: 1fr;
    }
    
    .reports-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .reports-container .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reports-container .stat-card .value {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .reports-container {
        padding: 10px;
    }
    
    .reports-container .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .reports-container .stat-card {
        padding: 8px;
    }
    
    .reports-container .stat-card .value {
        font-size: 0.95rem;
    }
    
    .reports-container .stat-card .label {
        font-size: 0.55rem;
    }
}

/* v4.0.24: Scrollbar estilizada para tabla de señales laterales */
#lateral-table-container::-webkit-scrollbar {
    width: 10px;
}

#lateral-table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

#lateral-table-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, #c77d00 100%);
    border-radius: 5px;
    border: 2px solid rgba(0, 0, 0, 0.3);
}

#lateral-table-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #fca51a 0%, var(--primary) 100%);
}

#lateral-table-container::-webkit-scrollbar-corner {
    background: rgba(0, 0, 0, 0.3);
}

/* v4.0.26: Scrollbar para modal de detalles de señales laterales */
#lateralDetailsModal .modal-content::-webkit-scrollbar {
    width: 8px;
}

#lateralDetailsModal .modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

#lateralDetailsModal .modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, #c77d00 100%);
    border-radius: 4px;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

#lateralDetailsModal .modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #fca51a 0%, var(--primary) 100%);
}

#lateralDetailsModal .modal-content::-webkit-scrollbar-corner {
    background: rgba(0, 0, 0, 0.2);
}

/* v5.13.0: Top Trending Styles */
.strength-bar {
    background: #334155;
    height: 8px;
    border-radius: 4px;
    width: 100%;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }

.action-long {
    color: var(--success) !important;
    font-weight: bold;
}

.action-short {
    color: var(--danger) !important;
    font-weight: bold;
}

/* v5.14.0: Heatmap, Badges, Filters */
.heatmap-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px 0;
    justify-content: center;
}

.heatmap-cell {
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    text-align: center;
    overflow: hidden;
}

.heatmap-cell:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0,0,0,0.4);
    z-index: 10;
}

.heatmap-cell-symbol {
    font-weight: bold;
    font-size: 0.75rem;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.heatmap-cell-price {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.8);
}

.heatmap-cell-change {
    font-size: 0.65rem;
    font-weight: bold;
}

.badge-breakout {
    background: rgba(0, 230, 118, 0.15);
    color: #00e676;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    white-space: nowrap;
}

.badge-breakdown {
    background: rgba(255, 23, 68, 0.15);
    color: #ff1744;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    white-space: nowrap;
}

.badge-up {
    background: rgba(0, 200, 83, 0.15);
    color: #00c853;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    white-space: nowrap;
}

.badge-down {
    background: rgba(255, 109, 0, 0.15);
    color: #ff6d00;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    white-space: nowrap;
}

.sort-select {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary);
}



/* v5.51.0: Partial TP Status Bar */
.partial-status { margin-top:8px; padding:4px 0; }
.partial-bar { display:flex; height:6px; border-radius:3px; overflow:hidden; gap:2px; }
.partial-segment { height:100%; border-radius:2px; transition:width 0.5s ease; }
.tp1-filled { background:#22c55e; }
.tp2-filled { background:#16a34a; }
.tp1-waiting, .tp2-waiting { background:#334155; }
.remaining-trailing { background:#3b82f6; animation:pulse-trailing 2s infinite; }
.remaining-waiting { background:#334155; }
@keyframes pulse-trailing { 0%,100%{opacity:1} 50%{opacity:0.6} }
.partial-labels { font-size:0.65rem; color:var(--gray); }
