body {
	margin: 0;
	padding: 0;
	font-family: Verdana, sans-serif;
	background: #f5f6f5;
	font-size: 12px;
}

#price-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin-top: 20px;
    table-layout: fixed;
    background: transparent;
}
#price-table th, #price-table td {
    padding: 10px;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    text-align: left;
    font-size: 12px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: normal;
    vertical-align: middle;
}
#price-table th:nth-child(1), #price-table td:nth-child(1) { width: 20px; }
#price-table th:nth-child(2), #price-table td:nth-child(2) { width: 70px; }
#price-table th:nth-child(3), #price-table td:nth-child(3) { width: 75px; }
#price-table th:nth-child(4), #price-table td:nth-child(4) { width: 70px; }
#price-table th:nth-child(5), #price-table td:nth-child(5) { width: 50px; }
#price-table th:nth-child(6), #price-table td:nth-child(6) { width: 70px; }
#price-table th:nth-child(7), #price-table td:nth-child(7) { width: 110px; }
#price-table th:nth-child(8), #price-table td:nth-child(8) { width: 120px; }
#price-table th:nth-child(9), #price-table td:nth-child(9) { width: 60px; }
#price-table th:nth-child(10), #price-table td:nth-child(10) { width: 60px; }
#price-table th:nth-child(11), #price-table td:nth-child(11) { width: 60px; }
#price-table th:nth-child(12), #price-table td:nth-child(12) { width: 60px; }
#price-table th:nth-child(13), #price-table td:nth-child(13) { width: 60px; }
#price-table th:nth-child(14), #price-table td:nth-child(14) { width: 60px; }
#price-table th:nth-child(15), #price-table td:nth-child(15) { width: 60px; }
#price-table th:nth-child(16), #price-table td:nth-child(16) { width: 60px; }
#price-table th:nth-child(17), #price-table td:nth-child(17) { width: 60px; }
#price-table th {
    background: #34495e;
    color: white;
    font-weight: 500;
}
#price-table th[data-sort] {
    cursor: pointer;
    position: relative;
    padding-right: 20px;
}
#price-table th[data-sort]::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
}
#price-table th.sorted-asc::after {
    border-bottom-color: white;
}
#price-table th.sorted-desc::after {
    border-top-color: white;
}
#price-table th[data-sort]:hover {
    background: #2c3e50;
}
#price-table th[data-sort="ao"],
#price-table th[data-sort="aoChange"],
#price-table th[data-sort="rsi"],
#price-table th[data-sort="rsiChange"],
#price-table th[data-sort="adx"],
#price-table th[data-sort="adxChange"],
#price-table th[data-sort="atr"],
#price-table th[data-sort="atrChange"],
#price-table th[data-sort="volume"],
#price-table th[data-sort="volumeChange"] {
    cursor: pointer;
    position: relative;
    padding-right: 20px;
}

#price-table th[data-sort="ao"]::after,
#price-table th[data-sort="aoChange"]::after,
#price-table th[data-sort="rsi"]::after,
#price-table th[data-sort="rsiChange"]::after,
#price-table th[data-sort="adx"]::after,
#price-table th[data-sort="adxChange"]::after,
#price-table th[data-sort="atr"]::after,
#price-table th[data-sort="atrChange"]::after,
#price-table th[data-sort="volume"]::after,
#price-table th[data-sort="volumeChange"]::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
}

#price-table th.sorted-asc[data-sort="ao"]::after,
#price-table th.sorted-asc[data-sort="aoChange"]::after,
#price-table th.sorted-asc[data-sort="rsi"]::after,
#price-table th.sorted-asc[data-sort="rsiChange"]::after,
#price-table th.sorted-asc[data-sort="adx"]::after,
#price-table th.sorted-asc[data-sort="adxChange"]::after,
#price-table th.sorted-asc[data-sort="atr"]::after,
#price-table th.sorted-asc[data-sort="atrChange"]::after,
#price-table th.sorted-asc[data-sort="volume"]::after,
#price-table th.sorted-asc[data-sort="volumeChange"]::after {
    border-bottom-color: white;
}

#price-table th.sorted-desc[data-sort="ao"]::after,
#price-table th.sorted-desc[data-sort="aoChange"]::after,
#price-table th.sorted-desc[data-sort="rsi"]::after,
#price-table th.sorted-desc[data-sort="rsiChange"]::after,
#price-table th.sorted-desc[data-sort="adx"]::after,
#price-table th.sorted-desc[data-sort="adxChange"]::after,
#price-table th.sorted-desc[data-sort="atr"]::after,
#price-table th.sorted-desc[data-sort="atrChange"]::after,
#price-table th.sorted-desc[data-sort="volume"]::after,
#price-table th.sorted-desc[data-sort="volumeChange"]::after {
    border-top-color: white;
}
#price-table td:nth-child(1) {
    font-weight: 600;
}
#price-table td:nth-child(2) {
    font-weight: 500;
}
#price-table td:nth-child(3) {
    font-weight: 500;
}
#price-table td:nth-child(10),
#price-table td:nth-child(11),
#price-table td:nth-child(12),
#price-table td:nth-child(13),
#price-table td:nth-child(14) {
    font-weight: normal;
}
#price-table tr {
    background: #fff;
    transition: background 0.2s;
}
#price-table tr:hover {
    background: #f9f9f9;
}
#price-table tr.overall-header {
    background: #fff;
    cursor: pointer;
    user-select: none;
}
#price-table tr.timeframe-row {
    display: none;
    background: #f5f5f5;
    opacity: 1;
}
#price-table tr.detail-row {
    /* display: none;
    background: #fafafa; */
}
#price-table tr.detail-row td {
    padding: 0;
    position: relative;
}
#price-table .trade-open {
    background: #fff;
    opacity: 1;
}
#price-table .trade-closed {
    background: #f5f5f5;
    opacity: 1;
}
#price-table .trade-closed td {
    color: #555;
}
#price-table .trade-closed a, #price-table .trade-closed button {
    color: #2980b9;
}
#price-table .trade-closed a:hover, #price-table .trade-closed button:hover {
    color: #1b5e91;
}
#price-table a {
    color: #2980b9;
    text-decoration: none;
    font-weight: 500;
}
#price-table a:hover {
    color: #1b5e91;
    text-decoration: underline;
}
#price-table .bullish, #price-table .bearish, #price-table .neutral {
    color: #27ae60;
    font-weight: 500;
}
#price-table .bearish {
    color: #c0392b;
}
#price-table .neutral {
    color: #7f8c8d;
}
#price-table .profit-positive {
    color: #27ae60;
    font-weight: 500;
}
#price-table .profit-negative {
    color: #c0392b;
    font-weight: 500;
}
#price-table .profit-neutral {
    color: #7f8c8d;
    font-weight: 500;
}
#price-table .rsi-overbought, #price-table .rsi-oversold, #price-table .rsi-neutral,
#price-table .adx-strong, #price-table .adx-weak, #price-table .adx-neutral,
#price-table .ao-positive, #price-table .ao-negative, #price-table .ao-neutral,
#price-table .atr-value, #price-table .volume-high, #price-table .volume-low {
    font-weight: normal;
}
#price-table .rsi-overbought {
    color: #c0392b;
}
#price-table .rsi-oversold {
    color: #27ae60;
}
#price-table .rsi-neutral {
    color: #7f8c8d;
}
#price-table .adx-strong {
    color: #27ae60;
}
#price-table .adx-weak {
    color: #c0392b;
}
#price-table .adx-neutral {
    color: #7f8c8d;
}
#price-table .ao-positive {
    color: #27ae60;
}
#price-table .ao-negative {
    color: #c0392b;
}
#price-table .ao-neutral {
    color: #7f8c8d;
}
#price-table .atr-value {
    color: #2980b9;
}
#price-table .volume-high {
    color: #2980b9;
}
#price-table .volume-low {
    color: #7f8c8d;
}
#price-table .change-indicator {
    margin-left: 5px;
    font-size: 10px;
    vertical-align: middle;
    opacity: 1;
    transition: opacity 1s ease-in-out;
}
#price-table .change-indicator.fade-out {
    opacity: 0;
}
#price-table .updating-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 10px;
    color: #7f8c8d;
    display: none;
}
#price-table .updating-indicator.active {
    display: inline-block;
}
#price-table .updating-indicator::before {
    content: '🔄';
    margin-right: 5px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
#price-table .high-probability {
    color: #FFD700;
    font-size: 12px;
    text-align: center;
}
#price-table .row-updated {
    animation: highlightRow 1s ease-in-out;
}
@keyframes highlightRow {
    0% { background-color: #ffeb3b; }
    100% { background-color: transparent; }
}


.detail-content {
    position: absolute;
    top: 0;
    left: 0;
    padding: 20px 5px;
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    box-sizing: border-box;
    background: #fafafa;
    border-radius: 0;
    margin: 0;
    align-items: stretch;
}
.detail-column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.detail-column:nth-child(1) {
    width: 60%;
    box-sizing: border-box;
    min-width: 0;
}
.detail-column:nth-child(2) {
    width: 40%;
    box-sizing: border-box;
    min-width: 0;
}
.indicators-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.tradingview-widget-container {
    position: relative;
    width: 100%;
    height: 400px;
    margin: 15px 0;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}
.chart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent; /* Fully transparent */
    z-index: 10; /* Ensure it’s above the chart */
    cursor: pointer; /* Indicate it’s clickable */
}
.chart-overlay.unlocked {
    display: none; /* Hide the overlay when unlocked */
}
/* Cajas blancas, sin bordes innecesarios, estilo plano */
.detail-table-wrapper {
    margin-top: 15px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    height: 175px; /* (400px - 15px gap) / 2 to match TradingView chart height on desktop */
    overflow-y: auto; /* Allow scrolling if content overflows */
}
.signals-table-wrapper {
    margin-bottom: 15px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    height: 175px; /* (400px - 15px gap) / 2 to match TradingView chart height on desktop */
    overflow-y: auto; /* Allow scrolling if content overflows */
}
/* Updated styles for detail-table */
.detail-table {
    width: 97%;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: auto;
    background: #ffffff;
	margin-left:10px;
	margin-top:10px;
}
.detail-table th, .detail-table td {
    padding: 10px 15px;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    text-align: left; /* Changed from justify to left */
    font-size: 12px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: normal;
    vertical-align: middle;
}
.detail-table th {
    background: #ffffff; /* White background for headers */
    color: #555; /* Match text color with cells */
    font-weight: 500;
	text-align:left;
}
.detail-table tr {
    background: #ffffff; /* White background for rows */
    transition: background 0.2s;
	margin-left:10px;
	text-align:left;
}
.detail-table tr:hover {
    background: #ffffff;
}
.detail-table .modal-bullish, .detail-table .modal-bearish {
    font-weight: 500;
}
.detail-table .modal-bullish {
    color: #27ae60;
}
.detail-table .modal-bearish {
    color: #c0392b;
}
.detail-table .modal-rsi-overbought, .detail-table .modal-rsi-oversold, .detail-table .modal-rsi-neutral,
.detail-table .modal-adx-strong, .detail-table .modal-adx-weak, .detail-table .modal-adx-neutral,
.detail-table .modal-ao-positive, .detail-table .modal-ao-negative, .detail-table .modal-ao-neutral,
.detail-table .modal-atr-value, .detail-table .modal-volume-high, .detail-table .modal-volume-low {
    font-weight: normal;
}
.detail-table .modal-rsi-overbought {
    color: #c0392b;
}
.detail-table .modal-rsi-oversold {
    color: #27ae60;
}
.detail-table .modal-rsi-neutral {
    color: #7f8c8d;
}
.detail-table .modal-adx-strong {
    color: #27ae60;
}
.detail-table .modal-adx-weak {
    color: #c0392b;
}
.detail-table .modal-adx-neutral {
    color: #7f8c8d;
}
.detail-table .modal-ao-positive {
    color: #27ae60;
}
.detail-table .modal-ao-negative {
    color: #c0392b;
}
.detail-table .modal-ao-neutral {
    color: #7f8c8d;
}
.detail-table .modal-atr-value {
    color: #2980b9;
}
.detail-table .modal-volume-high {
    color: #2980b9;
}
.detail-table .modal-volume-low {
    color: #7f8c8d;
}
.detail-table .indicator-name {
    font-weight: 600;
}
/* Styles for arrows in detail-table */
.detail-table .change-indicator.buy-arrow {
    margin-left: 2px;
    font-size: 10px;
    vertical-align: middle;
    color: #27ae60; /* Green for Buy, matching modal-bullish */
}

.detail-table .change-indicator.sell-arrow {
    margin-left: 2px;
    font-size: 10px;
    vertical-align: middle;
    color: #c0392b; /* Red for Sell, matching modal-bearish */
}



/* Updated styles for signals-table */
.signals-table {
    width: 97%;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: auto;
    background: #ffffff;
	margin-left:10px;
	margin-top:10px;
}

.signals-table th, .signals-table td {
    padding: 10px 10px 10px 5px; /* Reduced left padding to 5px to bring text closer to the left edge */
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    text-align: left;
    font-size: 12px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: normal;
    vertical-align: middle;
}

.signals-table th {
    background: #ffffff; /* Already white, ensuring no blue stripe */
    color: #555; /* Match text color with cells */
    font-weight: 500;
}

.signals-table tr {
    background: #ffffff; /* Already white */
    transition: background 0.2s;
}

.signals-table tr:hover {
    background: #ffffff;
}

.signals-table .modal-bullish, .signals-table .modal-bearish, .signals-table .modal-neutral {
    font-weight: 500;
}

.signals-table .modal-bullish {
    color: #27ae60;
}

.signals-table .modal-bearish {
    color: #c0392b;
}

.signals-table .modal-neutral {
    color: #7f8c8d;
}

.notes-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.notes-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.notes-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.notes-modal-close:hover,
.notes-modal-close:focus {
    color: black;
    text-decoration: none;
}

.notes-modal h2 {
    margin-top: 0;
}
/* Ensure detail-row and detail-content are independent */
.detail-row {
    display: none; /* Moved from #price-table tr.detail-row */
    background: #fafafa; /* Moved from #price-table tr.detail-row */
}
.detail-row:not(.row-hidden) {
    display: table-row; /* Ensure table row display */
}
/* En tu archivo CSS */
.row-hidden {
    display: none !important; /* !important para asegurar que sobreescriba otros display */
}


@media (max-width: 768px) {
    .content {
        padding: 15px;
    }
    #price-table {
        width: 100%;
    }
    #price-table th, #price-table td {
        padding: 8px;
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    #price-table th:nth-child(1), #price-table td:nth-child(1) { width: 30px; }
    #price-table th:nth-child(2), #price-table td:nth-child(2) { width: 40px; }
    #price-table th:nth-child(3), #price-table td:nth-child(3) { width: 50px; }
    #price-table th:nth-child(4), #price-table td:nth-child(4) { width: 70px; }
    #price-table th:nth-child(5), #price-table td:nth-child(5) { width: 50px; }
    #price-table th:nth-child(6), #price-table td:nth-child(6) { width: 50px; }
    #price-table th:nth-child(7), #price-table td:nth-child(7) { width: 50px; }
    #price-table th:nth-child(8), #price-table td:nth-child(8) { width: 30px; }
    #price-table th:nth-child(9), #price-table td:nth-child(9) { width: 30px; }
    #price-table th:nth-child(10), #price-table td:nth-child(10) { width: 30px; }
    #price-table th:nth-child(11), #price-table td:nth-child(11) { width: 60px; }
    #price-table th:nth-child(12), #price-table td:nth-child(12) { width: 50px; }
    #price-table th:nth-child(13), #price-table td:nth-child(13) { width: 50px; }
    #price-table th:nth-child(14), #price-table td:nth-child(14) { width: 50px; }
    #price-table th:nth-child(15), #price-table td:nth-child(15) { width: 40px; }
	#price-table th:nth-child(16), #price-table td:nth-child(16) { width: 40px; }
    .header {
        flex-direction: column;
        gap: 15px;
    }
    .nav {
        flex-direction: column;
        margin-right: 0;
        padding-left: 0;
    }
    .selectors {
        flex-direction: column;
        gap: 10px;
    }
    #pairSearch {
        width: 100%;
    }
    .detail-content {
        position: static;
        flex-direction: column;
        gap: 10px;
        padding: 15px;
        margin: 5px 0;
    }
    .detail-column:nth-child(1), .detail-column:nth-child(2) {
        width: 100%;
        min-width: 0;
    }
    .tradingview-widget-container {
        height: 300px;
        margin: 10px 0;
    }
    .detail-table-wrapper,
    .signals-table-wrapper {
        height: 145px; /* (300px - 10px gap) / 2 to match TradingView chart height on mobile */
        margin: 10px;
        box-shadow: none;
    }
    .detail-table th, .detail-table td,
    .signals-table th, .signals-table td {
        padding: 8px 12px; /* Adjusted padding for mobile, still maintaining margin from edges */
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
