/*
 * CoinScanX 
 * Version: 2.0
 */

/* Estilos para el botón de soporte integrado */
.support-container {
    max-width: 480px;
    margin: 15px auto 25px auto;
    padding: 15px;
    background-color: #fffdf7; /* Cambiado a crema */
    border: 1px solid #ffe0b2; /* Cambiado a naranja claro */
    border-radius: 12px;
    text-align: center;
}

.support-message {
    color: #333333; /* Cambiado a texto oscuro */
    font-size: 14px;
    margin-bottom: 12px;
}

.support-controls {
    position: relative;
    display: inline-block;
}

.support-button {
    background-color: #ff9933; /* Cambiado a naranja */
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.support-button:hover {
    background-color: #ff6600; /* Cambiado a naranja intenso */
}

.button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-icon svg {
    vertical-align: middle;
    stroke: white;
}

.support-options {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, margin 0.3s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.support-options.expanded {
    max-height: 120px;
    margin-top: 10px;
}

.contact-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    color: white !important; /* Asegura que el texto siempre sea blanco */
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.whatsapp-button {
    background-color: #25D366; /* Mantener color oficial de WhatsApp */
}

.whatsapp-button:hover {
    background-color: #128C7E; /* Versión más oscura del verde de WhatsApp */
}

.telegram-button {
    background-color: #0088cc; /* Mantener color oficial de Telegram */
}

.telegram-button:hover {
    background-color: #0077b5; /* Versión más oscura del azul de Telegram */
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 153, 51, 0.7); /* Cambiado a naranja */
    }
    70% {
        box-shadow: 0 0 0 6px rgba(255, 153, 51, 0); /* Cambiado a naranja */
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 153, 51, 0); /* Cambiado a naranja */
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

        .crypto-top-list-container {
            max-width: 100%;
            margin: 100px auto;
            background: #ffffff;
            border-radius: 16px !important; 
            box-shadow: 0 6px 20px rgba(255, 153, 51, 0.1); /* Cambiado a naranja */
            border: 1px solid #ffe0b2; /* Cambiado a naranja claro */
            position: relative;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
        }

        .crypto-top-header {
            padding: 25px;
            background: #fff8e1; /* Cambiado a fondo ámbar claro */
            text-align: center;
            border-bottom: 1px solid #ffe0b2; /* Cambiado a naranja claro */
            border-radius: 16px 16px 0 0 !important;
        }

            .crypto-form-icon {
                width: 48px;
                height: 48px;
                margin-bottom: 15px;
            }

        .crypto-top-title {
            color: #333333; /* Cambiado a texto oscuro */
            font-size: 22px;
            margin: 0 0 5px;
            font-weight: 600;
        }

        .crypto-top-subtitle {
            color: #6c757d;
            font-size: 14px;
            letter-spacing: 0.5px;
        }

        .crypto-top-body {
            padding: 20px;
        }

        .crypto-table-responsive {
            width: 100%;
            overflow-x: auto;
        }

        .crypto-top-list-container table {
            width: 100%;
            border-collapse: collapse;
            border-spacing: 0;
        }

        .crypto-top-list-container th {
            text-align: left;
            padding: 14px;
            font-size: 14px;
            font-weight: 500;
            color: #333333; /* Cambiado a texto oscuro */
            background: #fff8e1; /* Cambiado a fondo ámbar claro */
            border-bottom: 1px solid #ffe0b2; /* Cambiado a naranja claro */
        }

        .crypto-top-list-container td {
            padding: 14px;
            border-bottom: 1px solid #e6f4ff;
            vertical-align: middle;
            font-size: 13px;
        }

        .crypto-top-list-container tr:last-child td {
            border-bottom: none;
        }

        .top-coin-row:hover {
            background-color: #fffdf7; /* Cambiado a crema */
        }

        /* Estilos para las diferentes columnas */
        .rank-col {
            width: 10%;
            text-align: center;
        }

        .coin-col {
            width: 18%;
        }

        .inclusion-col {
            width: 13%;
            font-size: 12px;
            color: #4a5568;
        }

        .initial-price-col {
            width: 10%;
            color: #4a5568;
        }

        .max-change-col {
            width: 10%;
            font-weight: 600;
        }

        .price-col {
            width: 10%;
            font-weight: 500;
            color: #1a237e;
        }

        .potential-col {
            width: 14%;
            text-align: center;
        }

        /* Estilos para indicadores de precio */
        .price-up {
            color: #26b34b;
        }

        .price-down {
            color: #ff3650;
        }

        .price-neutral {
            color: #6c757d;
        }

        /* Estilos para la lista de observación */
        .watchlist-header td {
            background: #fffdf7; /* Cambiado a crema */
            padding: 10px 14px;
            text-align: center;
        }

        .watchlist-title {
            color: #333333; /* Cambiado a texto oscuro */
            font-size: 15px;
            font-weight: 500;
        }

        .watchlist-subtitle {
            color: #6c757d;
            font-size: 13px;
            font-weight: normal;
            margin-left: 5px;
        }

        .watchlist-row {
            background: #fffdf7; /* Cambiado a crema */
        }

        .watchlist-row:hover {
            background: #fff8e1; /* Cambiado a ámbar claro */
        }

        .watchlist-rank {
            background: #ffcc80 !important; /* Cambiado a naranja claro */
        }

        .watchlist-indicator {
            background-color: rgba(158, 158, 158, 0.15);
            color: #757575; /* Gris */
        }

        .rank-number {
            display: inline-block;
            width: 28px;
            height: 28px;
            line-height: 28px;
            text-align: center;
            background: #ff9933; /* Cambiado a naranja */
            color: white;
            border-radius: 50%;
            font-size: 13px;
            font-weight: 600;
        }

        tr:first-child .rank-number {
            background: #ff6600; /* Cambiado a naranja más intenso */
        }

        .coin-symbol {
            font-weight: 600;
            font-size: 15px;
            color: #333333; /* Cambiado a texto oscuro */
        }

        .coin-name {
            font-size: 13px;
            color: #6c757d;
            margin-top: 3px;
        }

        .potential-indicator {
            display: inline-block;
            padding: 6px 12px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 500;
            text-align: center;
        }

        .high-potential {
            background-color: rgba(76, 175, 80, 0.15);
            color: #4CAF50; /* Verde vibrante */
        }

        .medium-potential {
            background-color: rgba(3, 169, 244, 0.15);
            color: #03A9F4; /* Azul */
        }

        .low-potential {
            background-color: rgba(255, 87, 34, 0.15);
            color: #FF5722; /* Naranja intenso/rojo */
        }

        /* Estilos responsive mejorados */
        @media (max-width: 768px) {
            .crypto-top-list-container {
                margin: 100px auto;
            }
            
            .crypto-top-header {
                padding: 18px;
            }
            
            .crypto-top-title {
                font-size: 16px;
            }
            
            .crypto-top-body {
                padding: 15px;
            }
            
            .crypto-top-list-container th, 
            .crypto-top-list-container td {
                padding: 12px;
            }
            
            .coin-symbol {
                font-size: 14px;
            }
            
            .coin-name, 
            .potential-indicator {
                font-size: 12px;
            }
            
            .inclusion-col {
                font-size: 11px;
            }
            
            .rank-number {
                width: 26px;
                height: 26px;
                line-height: 26px;
                font-size: 12px;
            }
            
            .watchlist-title {
                font-size: 14px;
            }
            
            .watchlist-subtitle {
                font-size: 12px;
                display: block;
                margin-top: 3px;
                margin-left: 0;
            }
        }

        /* Modo de tabla responsive para pantallas muy pequeñas */
        @media (max-width: 550px) {
            .crypto-top-list-container table, 
            .crypto-top-list-container thead, 
            .crypto-top-list-container tbody, 
            .crypto-top-list-container th, 
            .crypto-top-list-container td, 
            .crypto-top-list-container tr {
                display: block;
            }
            
            .crypto-top-list-container thead tr {
                position: absolute;
                top: -9999px;
                left: -9999px;
            }
            
            .crypto-top-list-container tr {
                background: #ffffff;
                padding: 12px 15px;
                margin-bottom: 0;
                position: relative;
            }
            
            .watchlist-row {
                background: #fafcff;
            }
            
            .watchlist-header {
                background: #f5f9ff;
                padding: 10px 15px;
            }
            
            .watchlist-header td {
                padding: 0;
                text-align: center;
            }
            
            .crypto-top-list-container tbody tr {
                border-bottom: 1px solid #e6f4ff;
            }
            
            .crypto-top-list-container tbody tr:last-child {
                border-bottom: none;
            }
            
            .crypto-top-list-container tbody tr:after {
                content: "";
                display: table;
                clear: both;
            }
            
            .crypto-top-list-container td {
                border: none;
                position: relative;
                padding: 6px 0;
                text-align: right;
                margin-top: 3px;
                margin-bottom: 3px;
            }
            
            .crypto-top-list-container td:before {
                position: absolute;
                top: 50%;
                transform: translateY(-50%);
                left: 0;
                width: 45%;
                white-space: nowrap;
                font-weight: 500;
                font-size: 13px;
                color: #6c757d;
                content: attr(data-label);
            }
            
            .rank-col, .coin-col, .inclusion-col, 
            .initial-price-col, .max-change-col, .price-col, .potential-col,
            .guidance-col {
                width: 100%;
                float: left;
                clear: both;
            }
            
            .coin-col {
                margin-bottom: 10px;
            }
            
            .coin-symbol, .coin-name {
                display: inline;
            }
            
            .coin-name {
                margin-left: 5px;
                color: #6c757d;
            }
            
            .coin-name:before {
                content: "(";
            }
            
            .coin-name:after {
                content: ")";
            }
            
            .price-col {
                font-weight: 600;
            }
            
            .potential-col {
                text-align: right;
                margin-top: 8px;
            }
        }

        /* Estilos para la alerta de mercado */
        .crypto-market-alert {
            display: flex;
            background-color: #fff8e1; /* Cambiado a fondo ámbar claro */
            border: 1px solid #ffe0b2; /* Cambiado a borde naranja claro */
            border-left: 4px solid #ff9933; /* Cambiado a borde izquierdo naranja */
            border-radius: 6px;
            padding: 16px;
            margin: 20px auto 30px auto;
            max-width: 100%;
            box-shadow: 0 2px 8px rgba(255, 153, 51, 0.05); /* Cambiada sombra a naranja */
        }

        .alert-icon {
            margin-right: 16px;
            display: flex;
            align-items: flex-start;
        }

        .alert-icon svg {
            min-width: 28px;
            stroke: #ff9933; /* Cambiado a naranja - IMPORTANTE: Cambia el color del ícono SVG */
        }

        .alert-content {
            flex: 1;
        }

        .alert-title {
            font-weight: 600;
            color: #333333; /* Cambiado a texto oscuro */
            margin-bottom: 8px;
            font-size: 16px;
        }

        .alert-message {
            font-size: 14px;
            color: #4a5568;
            line-height: 1.5;
        }
        /* Responsive para la alerta */
        @media (max-width: 768px) {
            .crypto-market-alert {
                flex-direction: column;
                padding: 14px;
            }
            
            .alert-icon {
                margin-right: 0;
                margin-bottom: 10px;
                justify-content: center;
            }
            
            .alert-title {
                text-align: center;
            }
        }

/* Estilos para la barra de condición del mercado */
.market-condition-container {
    max-width: 100%;
    margin: 25px auto 40px;
    background: #ffffff;
    border-radius: 16px !important;
    box-shadow: 0 6px 20px rgba(255, 153, 51, 0.1);
    border: 1px solid #ffe0b2;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

.market-condition-title {
    text-align: center;
    margin-bottom: 5px;
    color: #333333;
    font-size: 18px;
    font-weight: 600;
}

.market-condition-description {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 20px;
}

.market-condition-stats {
    background-color: #fffdf7;
    border: 1px solid #ffe0b2;
    border-radius: 8px;
    padding: 15px;
    font-size: 14px;
    color: #4a5568;
}

.condition-percentage {
    font-weight: 600;
    color: #ff9933;
    font-size: 15px;
}

.condition-bar-container {
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
}

.condition-bar {
    height: 100%;
    border-radius: 5px;
    transition: width 1.5s ease-in-out;
    background: linear-gradient(90deg, #ff6b6b 0%, #ffb347 50%, #4CAF50 100%);
}

.condition-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6c757d;
    padding: 0 2px;
    margin-bottom: 15px;
}

.market-condition-message {
    margin-top: 15px;
    font-size: 13px;
    line-height: 1.5;
    color: #4a5568;
}

/* Responsive */
@media (max-width: 768px) {
    .market-condition-container {
        padding: 15px;
        margin: 20px auto 30px;
    }
    
    .market-condition-title {
        font-size: 16px;
    }
    
    .market-condition-description {
        font-size: 13px;
    }
    
    .market-condition-message {
        font-size: 12px;
    }
}

            /* Contenedor del botón y el área colapsable */
            .grace-period-toggle-container {
                max-width: 100%;
                margin: 40px auto;
                position: relative;
            }
            
            /* Estilo del botón */
        .grace-period-button {
            background-color: #ff9933; /* Cambiado a naranja */
            color: white;
            border: none;
            border-radius: 8px;
            padding: 12px 20px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            margin: 0 auto;
            transition: all 0.3s ease;
            box-shadow: 0 4px 6px rgba(255, 153, 51, 0.2); /* Cambiado a naranja */
        }
            
        .grace-period-button:hover {
            background-color: #ff6600; /* Cambiado a naranja intenso */
            transform: translateY(-2px);
            box-shadow: 0 6px 8px rgba(255, 153, 51, 0.25); /* Cambiado a naranja */
        }
            
        .button-icon {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .button-icon svg {
            vertical-align: middle;
            stroke: white;
        }
            
            .coin-counter {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                background-color: rgba(255, 255, 255, 0.3);
                color: white;
                border-radius: 50%;
                width: 24px;
                height: 24px;
                font-size: 13px;
                margin-left: 5px;
            }
            
            /* Contenido colapsable (inicialmente oculto) */
            .grace-period-content {
                max-height: 0;
                overflow: hidden;
                transition: max-height 0.5s ease;
                margin-top: 0;
            }
            
            .grace-period-content.expanded {
                max-height: 24000px; /* Valor alto para asegurar que se muestre toda la tabla */
                margin-top: 20px;
            }
            
            /* Animación de pulso para el botón */
        @keyframes pulse {
            0% {
                box-shadow: 0 0 0 0 rgba(255, 153, 51, 0.7); /* Cambiado a naranja */
            }
            70% {
                box-shadow: 0 0 0 6px rgba(255, 153, 51, 0); /* Cambiado a naranja */
            }
            100% {
                box-shadow: 0 0 0 0 rgba(255, 153, 51, 0); /* Cambiado a naranja */
            }
        }
            
            .pulse-animation {
                animation: pulse 2s infinite;
            }

                /* Estilos para la sección de período de gracia */
        .crypto-grace-period-container {
            max-width: 100%;
            margin: 40px auto;
            background: #ffffff;
            border-radius: 16px !important;
            box-shadow: 0 6px 20px rgba(255, 153, 51, 0.1); /* Cambiado a naranja */
            border: 1px solid #ffe0b2; /* Cambiado a naranja claro */
            position: relative;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
        }
                
                .crypto-grace-period-header {
            padding: 20px;
            background: #fff8e1; /* Cambiado a ámbar claro */
            text-align: center;
            border-bottom: 1px solid #ffe0b2; /* Cambiado a naranja claro */
            border-radius: 16px 16px 0 0 !important;
        }
                
                .crypto-grace-period-title {
            color: #333333; /* Cambiado a texto oscuro */
            font-size: 18px;
            margin: 0 0 5px;
            font-weight: 600;
        }
                
                .crypto-grace-period-subtitle {
                    color: #6c757d;
                    font-size: 14px;
                    margin: 0;
                }
                
                .crypto-grace-period-body {
                    padding: 20px;
                }
                
                .grace-period-row {
            background: #fffdf7; /* Cambiado a crema */
        }
                
               .grace-period-row:hover {
            background: #fff8e1; /* Cambiado a ámbar claro */
        }
                
        .grace-indicator {
            display: inline-block;
            padding: 5px 12px;
            border-radius: 12px;
            font-size: 13px;
            font-weight: 500;
            background-color: rgba(33, 150, 243, 0.15); /* Azul claro */
            color: #2196F3; /* Azul */
        }
                
                .grace-status-col {
                    text-align: center;
                    width: 15%;
                }
                
                /* Adaptaciones responsive */
                @media (max-width: 768px) {
                    .crypto-grace-period-container {
                        margin: 30px auto;
                    }
                    
                    .crypto-grace-period-title {
                        font-size: 16px;
                    }
                    
                    .crypto-grace-period-subtitle {
                        font-size: 13px;
                    }
                }
                
                @media (max-width: 550px) {
                    .crypto-grace-period-container table, 
                    .crypto-grace-period-container thead, 
                    .crypto-grace-period-container tbody, 
                    .crypto-grace-period-container th, 
                    .crypto-grace-period-container td, 
                    .crypto-grace-period-container tr {
                        display: block;
                    }
                    
                    .crypto-grace-period-container thead tr {
                        position: absolute;
                        top: -9999px;
                        left: -9999px;
                    }
                    
                    .crypto-grace-period-container tr {
                        background: #ffffff;
                        padding: 12px 15px;
                        margin-bottom: 0;
                        position: relative;
                    }
                    
                    .grace-period-row {
                        background: #fafeff;
                    }
                    
                    .crypto-grace-period-container tbody tr {
                        border-bottom: 1px solid #e6f4ff;
                    }
                    
                    .crypto-grace-period-container tbody tr:last-child {
                        border-bottom: none;
                    }
                    
                    .crypto-grace-period-container tbody tr:after {
                        content: "";
                        display: table;
                        clear: both;
                    }
                    
                    .crypto-grace-period-container td {
                        border: none;
                        position: relative;
                        padding: 6px 0;
                        text-align: right;
                        margin-top: 3px;
                        margin-bottom: 3px;
                    }
                    
                    .crypto-grace-period-container td:before {
                        position: absolute;
                        top: 50%;
                        transform: translateY(-50%);
                        left: 0;
                        width: 45%;
                        white-space: nowrap;
                        font-weight: 500;
                        font-size: 13px;
                        color: #6c757d;
                        content: attr(data-label);
                    }
                    
                    .grace-status-col {
                        text-align: right;
                    }
                    
                    .coin-col, .inclusion-col, 
                    .initial-price-col, .max-change-col, .price-col, .grace-status-col,
                    .guidance-col {
                        width: 100%;
                        float: left;
                        clear: both;
                    }
                    
                    .coin-symbol, .coin-name {
                        display: inline;
                    }
                    
                    .coin-name {
                        margin-left: 5px;
                        color: #6c757d;
                    }
                    
                    .coin-name:before {
                        content: "(";
                    }
                    
                    .coin-name:after {
                        content: ")";
                    }
                }

        .crypto-admin-wrapper {
            max-width: 100%;
            margin-right: 20px;
        }
        .crypto-admin-tabs {
            margin: 15px 0;
            border-bottom: 1px solid #ccc;
            padding-bottom: 0;
        }
        .crypto-admin-tabs .nav-tab {
            font-size: 14px;
            margin-right: 5px;
        }
        .crypto-admin-search {
            margin: 15px 0;
            display: flex;
            align-items: center;
        }
        .crypto-admin-search form {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .crypto-admin-search input[type="text"] {
            width: 250px;
        }
        .crypto-admin-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
            background-color: #fff;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
        .crypto-admin-table th {
            background-color: #f8f9fa;
            font-weight: 600;
            text-align: left;
            padding: 12px;
            border-bottom: 2px solid #dee2e6;
        }
        .crypto-admin-table td {
            padding: 12px;
            border-bottom: 1px solid #e9ecef;
            vertical-align: middle;
        }
        .crypto-admin-table tr:hover {
            background-color: #f8f9fa;
        }
        .status-active {
            background-color: #d4edda;
            color: #155724;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 600;
        }
        .status-expired {
            background-color: #f8d7da;
            color: #721c24;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 600;
        }
        .status-warning {
            background-color: #fff3cd;
            color: #856404;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 600;
        }
        .action-form {
            display: flex;
            align-items: center;
            margin-bottom: 5px;
        }
        .time-bar-container {
            width: 100%;
            height: 6px;
            background-color: #e9ecef;
            border-radius: 3px;
            margin-top: 4px;
        }
        .time-bar {
            height: 100%;
            border-radius: 3px;
        }
        .time-active {
            background-color: #28a745;
        }
        .time-warning {
            background-color: #ffc107;
        }
        .time-expired {
            background-color: #dc3545;
        }
        .row-expired {
            background-color: rgba(248, 215, 218, 0.2);
        }
        .row-warning {
            background-color: rgba(255, 243, 205, 0.2);
        }
        .tablenav {
            display: flex;
            justify-content: flex-end;
            margin: 10px 0;
        }
        .no-items {
            padding: 20px;
            text-align: center;
            color: #6c757d;
            font-style: italic;
        }

        .crypto-admin-form {
            padding: 15px;
            background: #f8f9fa;
            border: 1px solid #ddd;
            border-radius: 5px;
            margin-bottom: 20px;
        }
        .status-label {
            display: inline-block;
            padding: 3px 8px;
            border-radius: 3px;
            font-size: 12px;
            font-weight: bold;
        }
        .status-active {
            background: #d4edda;
            color: #155724;
        }
        .status-expired {
            background: #f8d7da;
            color: #721c24;
        }
        .crypto-admin-actions {
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid #ddd;
        }
        .crypto-admin-button {
            margin-right: 10px !important;
        }

            .crypto-admin-table {
                width: 100%;
                border-collapse: collapse;
                margin-top: 20px;
                background: white;
                box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            }
            .crypto-admin-table th {
                background: #f1f1f1;
                padding: 10px;
                text-align: left;
                border-bottom: 1px solid #ccc;
            }
            .crypto-admin-table td {
                padding: 10px;
                border-bottom: 1px solid #eee;
            }
            .crypto-admin-table tr:hover {
                background: #f9f9f9;
            }
            .status-set {
                color: green;
                font-weight: bold;
            }
            .status-unset {
                color: #999;
                font-style: italic;
            }
            .coin-symbol {
                font-weight: bold;
                font-size: 15px;
            }
            .coin-id {
                color: #666;
                font-size: 12px;
            }
            .manual-price-form {
                display: flex;
                align-items: center;
            }
            .manual-price-form input[type="number"] {
                width: 120px;
                margin-right: 10px;
            }
            .price-change {
                margin-top: 5px;
                font-size: 12px;
            }
            .price-change.positive {
                color: #26b34b;
            }
            .price-change.negative {
                color: #ff3650;
            }
            .price-change.neutral {
                color: #6c757d;
            }
            .tablenav {
                display: flex;
                justify-content: space-between;
                margin: 8px 0 16px;
                height: auto;
            }
            .tablenav .tablenav-pages {
                float: none;
                margin: 0;
                display: flex;
                align-items: center;
            }
            .tablenav .displaying-num {
                margin-right: 15px;
            }
            .paging-info {
                margin-right: 15px;
            }

    /* Estilos del contenedor principal */
.crypto-history-container {
    max-width: 100%;
    margin: 30px auto;
    background: #ffffff;
    border-radius: 16px !important;
    box-shadow: 0 6px 20px rgba(255, 153, 51, 0.1); /* Cambiado a naranja */
    border: 1px solid #ffe0b2; /* Cambiado a naranja claro */
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

    /* Estilos del encabezado */
.crypto-history-header {
    padding: 20px;
    background: #fff8e1; /* Cambiado a ámbar claro */
    text-align: center;
    border-bottom: 1px solid #ffe0b2; /* Cambiado a naranja claro */
    border-radius: 16px 16px 0 0 !important;
}

.crypto-history-title {
    color: #333333; /* Cambiado a texto oscuro */
    font-size: 20px;
    margin: 0 0 5px;
    font-weight: 600;
}
    
    .crypto-history-subtitle {
        color: #6c757d;
        font-size: 14px;
        margin: 0;
    }

    /* Estilos del cuerpo */
    .crypto-history-body {
        padding: 15px;
    }
    
    /* Estilos del pie de página */
.crypto-history-footer {
    padding: 15px 20px;
    background: #fff8e1; /* Cambiado a ámbar claro */
    text-align: center;
    border-top: 1px solid #ffe0b2; /* Cambiado a naranja claro */
    border-radius: 0 0 16px 16px !important;
    font-size: 14px;
    color: #6c757d;
}

    /* Estilos de la tabla */
    .crypto-table-responsive {
        width: 100%;
        overflow-x: auto;
    }

    .crypto-history-container table {
        width: 100%;
        border-collapse: collapse;
        border-spacing: 0;
        font-size: 13px;
    }

.crypto-history-container th {
    text-align: left;
    padding: 12px 8px;
    font-size: 13px;
    font-weight: 500;
    color: #333333; /* Cambiado a texto oscuro */
    background: #fff8e1; /* Cambiado a ámbar claro */
    border-bottom: 1px solid #ffe0b2; /* Cambiado a naranja claro */
    white-space: nowrap;
}

    .crypto-history-container td {
        padding: 10px 8px;
        border-bottom: 1px solid #e6f4ff;
        vertical-align: middle;
        font-size: 13px;
    }

    .crypto-history-container tr:last-child td {
        border-bottom: none;
    }
    
.history-coin-row:hover {
    background-color: #fffdf7; /* Cambiado a crema */
}
    
    /* Estilos para las diferentes columnas - más compacto */
    .coin-col {
        width: 8%;
    }
    
    .date-col, .date-exit-col, .date-remove-col {
        width: 10%;
        font-size: 12px;
        color: #4a5568;
    }
    
    .price-col {
        width: 8%;
        color: #1a237e;
    }
    
    .max-col {
        width: 8%;
        font-weight: 600;
    }
    
    .change-col {
        width: 18%;
    }
    
    .profit-amount-col {
        width: 8%;
        text-align: center;
    }
    
    .performance-col {
        width: 8%;
        text-align: center;
    }

/* Indicadores de rendimiento */
.performance-indicator {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.performance-excellent {
    background-color: rgba(76, 175, 80, 0.15); /* Verde más intenso */
    color: #4CAF50; /* Verde */
}

.performance-good {
    background-color: rgba(255, 193, 7, 0.15); /* Amarillo ámbar */
    color: #FFC107; /* Amarillo ámbar */
}

.performance-minimal {
    background-color: rgba(3, 169, 244, 0.15); /* Azul claro */
    color: #03A9F4; /* Azul claro */
}

.performance-low {
    background-color: rgba(255, 152, 0, 0.15); /* Naranja */
    color: #FF9800; /* Naranja */
}


.performance-negative {
    background-color: rgba(211, 47, 47, 0.15);
    color: #d32f2f; /* Rojo */
}  
    /* Estilos de ganancia */
    .profit-positive {
        color: #26b34b;
    }
    
    .profit-negative {
        color: #ff3650;
    }
    
    /* Estilo detallado para cambios */
    .change-details {
        font-size: 12px;
        line-height: 1.5;
    }
    
    .change-price, .change-percentage {
        display: block;
    }
    
    .change-label {
        color: #000;
        font-weight: normal;
    }
    
    .change-value {
        font-weight: 500;
    }
    
    /* Estilo para montos de ganancia */
    .profit-amount {
        font-weight: 600;
        font-size: 13px;
    }
    
    /* Estilos adicionales para mejoras */
    .price-unchanged {
        font-style: italic;
        color: #6c757d;
        padding: 5px 0;
        font-size: 12px;
    }
    
    /* Otros estilos comunes */
    .price-up {
        color: #26b34b;
    }
    
    .price-down {
        color: #ff3650;
    }
    
    .coin-symbol {
        font-weight: 600;
        font-size: 13px;
        color: #1a237e;
        white-space: nowrap;
    }
    
    /* Estilos de paginación */
    .crypto-pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 20px;
        padding: 15px 0;
        border-top: 1px solid #e6f4ff;
    }
    
.page-nav {
    padding: 6px 12px;
    background: #fffdf7; /* Cambiado a crema */
    border: 1px solid #ffe0b2; /* Cambiado a naranja claro */
    border-radius: 5px;
    color: #ff9933; /* Cambiado a naranja */
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}
    
    .page-nav:hover {
    background: #fff8e1; /* Cambiado a ámbar claro */
}
    
    .page-nav.disabled {
        color: #d1d5db;
        cursor: not-allowed;
        background: #f8f9fa;
    }
    
    .page-numbers {
        display: flex;
        align-items: center;
        margin: 0 15px;
    }
    
    .page-number {
        display: inline-block;
        width: 30px;
        height: 30px;
        line-height: 30px;
        text-align: center;
        margin: 0 3px;
        border-radius: 5px;
        color: #4a5568;
        text-decoration: none;
        font-size: 13px;
        transition: all 0.2s ease;
    }
    
    .page-number:hover {
        background: #f8fdff;
    }
    
.page-number.current {
    background: #ff9933; /* Cambiado a naranja */
    color: white;
    font-weight: 600;
}
    
    .page-ellipsis {
        display: inline-block;
        width: 30px;
        text-align: center;
        font-size: 13px;
        color: #4a5568;
    }
    
    /* Nuevos estilos para búsqueda y filtros */
    .crypto-history-filters {
        padding: 20px;
        background: #fffdf7;
        border-bottom: 1px solid #ffe0b2;
    }
    
    .history-filter-form {
        margin: 0;
    }
    
    .filter-row {
        display: flex;
        gap: 15px;
        align-items: center;
        flex-wrap: wrap;
    }
    
    .search-container {
        flex: 1;
        min-width: 250px;
    }
    
    .search-input-wrapper {
        position: relative;
        display: flex;
        align-items: center;
    }
    
    .search-icon {
    position: absolute;
    right: 15px; /* Cambiado de left a right */
    color: #6c757d;
    pointer-events: none;
}
    
    .search-input {
    width: 100%;
    padding: 15px 50px 15px 20px; /* Más padding vertical y ajustado para la lupa a la derecha */
    border: 1px solid #ffe0b2;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white; /* Fondo blanco explícito */
    height: 50px; /* Altura fija para hacer la barra más gruesa */
}
    
    .search-input:focus {
        outline: none;
        border-color: #ff9933;
        box-shadow: 0 0 0 3px rgba(255, 153, 51, 0.1);
    }
    
    .clear-search {
    position: absolute;
    right: 40px; /* Ajustado para estar antes de la lupa */
    background: none;
    border: none;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}
    
    .clear-search:hover {
        color: #ff9933;
    }
    
    .filter-container {
        min-width: 200px;
    }
    
    .performance-filter {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ffe0b2;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    
    /* Estilos específicos para mejorar apariencia en Safari */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2712%27 height=%278%27 viewBox=%270 0 12 8%27%3E%3Cpath fill=%27%236c757d%27 d=%27M6 8L0 0h12z%27/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 40px;
    
    /* Altura fija para todos los navegadores */
    min-height: 45px;
    height: 45px;
    max-height: 45px;
    box-sizing: border-box;
}

/* Específico para Safari */
@media not all and (min-resolution:.001dpcm) {
    @supports (-webkit-appearance:none) {
        .performance-filter {
            height: 45px !important;
            line-height: normal;
            padding-top: 14px;
            padding-bottom: 14px;
        }
    }
}

.performance-filter:focus {
    outline: none;
    border-color: #ff9933;
    box-shadow: 0 0 0 3px rgba(255, 153, 51, 0.1);
}
    
    .filter-actions {
        display: flex;
        gap: 10px;
    }
    
    .filter-button {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 10px 18px;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    .apply-filters {
        background: #ff9933;
        color: white;
    }
    
    .apply-filters:hover {
        background: #ff6600;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(255, 153, 51, 0.2);
    }
    
    .reset-filters {
        background: white;
        color: #6c757d;
        border: 1px solid #dee2e6;
    }
    
    .reset-filters:hover {
        background: #f8f9fa;
        border-color: #6c757d;
        color: #495057;
    }
    
    .filter-info {
        margin-top: 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .results-count {
        font-size: 14px;
        color: #6c757d;
    }
    
    .results-count strong {
        color: #ff9933;
    }
    
    .active-filters {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .filter-tag {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 4px 12px;
        background: #fff8e1;
        border: 1px solid #ffe0b2;
        border-radius: 20px;
        font-size: 13px;
        color: #ff9933;
    }
    
    .filter-tag svg {
        width: 14px;
        height: 14px;
    }
    
    .no-results-message {
        text-align: center;
        padding: 60px 20px;
        color: #6c757d;
    }
    
    .no-results-icon {
        margin-bottom: 20px;
        color: #dee2e6;
    }
    
    .no-results-message h3 {
        color: #333;
        margin-bottom: 10px;
    }
    
    .no-results-message p {
        margin-bottom: 20px;
    }
    
    .no-results-message .filter-button {
        display: inline-flex;
        margin-top: 10px;
    }
    
    /* Responsive */
    @media (max-width: 768px) {
        .crypto-history-container {
            margin: 15px auto;
        }
        
        .crypto-history-header,
        .crypto-history-footer {
            padding: 15px;
        }
        
        .crypto-history-title {
            font-size: 16px;
        }
        
        .crypto-history-subtitle {
            font-size: 13px;
        }
        
        .crypto-history-body {
            padding: 10px;
        }
        
        .crypto-history-container th, 
        .crypto-history-container td {
            padding: 10px 6px;
        }
        
        .coin-symbol {
            font-size: 13px;
        }
        
        .date-col, .date-exit-col, .date-remove-col {
            font-size: 11px;
        }
        
        .page-nav {
            padding: 5px 10px;
            font-size: 12px;
        }
        
        .page-number {
            width: 28px;
            height: 28px;
            line-height: 28px;
            font-size: 12px;
        }
        
        .filter-row {
            flex-direction: column;
            gap: 10px;
        }
        
        .search-container,
        .filter-container {
            width: 100%;
            min-width: 100%;
        }
        
        .filter-actions {
            width: 100%;
            justify-content: stretch;
        }
        
        .filter-button {
            flex: 1;
            justify-content: center;
        }
        
        .filter-info {
            flex-direction: column;
            align-items: flex-start;
        }
    }
    
    /* Estilos para móviles */
    @media (max-width: 1px) { /* LEGACY NEUTRALIZADO v3 - reemplazado por bloque csxr- responsive */
        .crypto-history-container table, 
        .crypto-history-container thead, 
        .crypto-history-container tbody, 
        .crypto-history-container th, 
        .crypto-history-container td, 
        .crypto-history-container tr {
            display: block;
        }
        
        .crypto-history-container thead tr {
            position: absolute;
            top: -9999px;
            left: -9999px;
        }
        
        .crypto-history-container tr {
            background: #ffffff;
            padding: 10px;
            margin-bottom: 0;
            position: relative;
        }
        
        .crypto-history-container tbody tr {
            border-bottom: 1px solid #e6f4ff;
        }
        
        .crypto-history-container tbody tr:last-child {
            border-bottom: none;
        }
        
        .crypto-history-container tbody tr:after {
            content: "";
            display: table;
            clear: both;
        }
        
        .crypto-history-container td {
            border: none;
            position: relative;
            padding: 4px 0;
            text-align: right;
            margin-top: 2px;
            margin-bottom: 2px;
        }
        
        .crypto-history-container td:before {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            left: 0;
            width: 45%;
            white-space: nowrap;
            font-weight: 500;
            font-size: 12px;
            color: #6c757d;
            content: attr(data-label);
        }
        
        .date-remove-col, .coin-col, .date-col, .date-exit-col, 
        .price-col, .max-col, .change-col, .profit-amount-col, .performance-col {
            width: 100%;
            float: left;
            clear: both;
        }
        
        .change-col, .profit-amount-col {
            margin-top: 5px;
        }
    }

/* ============================================================
 * ANÁLISIS DE IA (v2.14) — estilos unificados
 * Migrados desde el <style> inline de archivo.php.
 * Aplican al TOP 10, Watchlist y Período de Gracia en todos los
 * breakpoints (desktop, tablet, móvil).
 * ============================================================ */

/* Desktop y tablet: columna con ancho limitado */
.guidance-col {
    min-width: 180px;
    max-width: 240px;
    vertical-align: top;
    padding: 10px 8px;
}

.cs-guidance-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    line-height: 1.35;
}

.cs-guidance-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 11.5px;
    width: fit-content;
    border: 1px solid transparent;
}
.cs-guidance-badge .cs-guidance-icon { display: inline-flex; align-items: center; }
.cs-guidance-badge .cs-guidance-icon svg { display: block; }

.cs-phase-detected      { background: #fff3e0; color: #d97706; border-color: #fcd9a8; }
.cs-phase-impulse       { background: #e6f6ee; color: #059669; border-color: #b6e5cb; }
.cs-phase-consolidating { background: #f3f4f6; color: #4b5563; border-color: #d1d5db; }
.cs-phase-mature_strong { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.cs-phase-mature        { background: #faf5ff; color: #7e22ce; border-color: #e9d5ff; }
.cs-phase-grace         { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.cs-phase-watchlist     { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }

.cs-guidance-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 11px;
    color: #6c757d;
}
.cs-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.cs-meta-item .cs-meta-icon { display: inline-flex; align-items: center; }
.cs-meta-item .cs-meta-icon svg { display: block; }
.cs-meta-label { color: #6c757d; }
.cs-meta-item strong { color: #333; font-weight: 600; }

.cs-conf-high strong   { color: #059669; }
.cs-conf-medium strong { color: #d97706; }
.cs-conf-low strong    { color: #b91c1c; }

.cs-risk-conservative { color: #059669; }
.cs-risk-balanced     { color: #d97706; }
.cs-risk-speculative  { color: #b91c1c; }

.cs-guidance-note {
    font-size: 11px;
    color: #6b7280;
    font-style: italic;
    padding: 4px 0 0;
    line-height: 1.4;
}

/* Tablet intermedio (iPad Mini, etc.): la tabla sigue en modo tabla, pero la
   columna necesita más aire y textos más pequeños para no apretar al resto. */
@media (min-width: 769px) and (max-width: 1024px) {
    .guidance-col {
        min-width: 200px;
        max-width: 260px;
        padding: 10px 8px;
        vertical-align: middle;
    }
    .guidance-col .cs-guidance-cell { gap: 6px; }
    .guidance-col .cs-guidance-badge { font-size: 11px; padding: 4px 10px; }
    .guidance-col .cs-guidance-meta  { font-size: 10.5px; gap: 3px 8px; }
    .guidance-col .cs-guidance-note  { font-size: 10.5px; line-height: 1.4; }

    /* En Grace Period hay 7 columnas (una más que el TOP), así que la columna
       de Análisis de IA debe ser más angosta aquí para que todo quepa sin
       scroll horizontal. */
    .crypto-grace-period-container .guidance-col {
        min-width: 170px;
        max-width: 200px;
        padding: 8px 6px;
    }
    .crypto-grace-period-container .guidance-col .cs-guidance-cell { gap: 5px; }
    .crypto-grace-period-container .guidance-col .cs-guidance-badge {
        font-size: 10.5px;
        padding: 3px 9px;
    }
    .crypto-grace-period-container .guidance-col .cs-guidance-meta  {
        font-size: 10px;
        gap: 2px 6px;
    }
    .crypto-grace-period-container .guidance-col .cs-guidance-note  {
        font-size: 10px;
        line-height: 1.35;
    }
}

/* Móvil (≤550px): la tabla colapsa a formato card. La guidance-col hereda
   el mismo marco crema/blanco que las demás filas (vía las reglas del plugin
   en .crypto-top-list-container tr). Aquí sólo ajustamos la alineación interna
   para que el contenido quede centrado, ya que tiene badge + meta + nota
   multilínea (a diferencia de las demás celdas que son label-valor en 1 línea). */
@media (max-width: 550px) {
    .crypto-top-list-container td.guidance-col,
    .crypto-grace-period-container td.guidance-col {
        max-width: none;
        padding: 10px 0 6px;
        text-align: center;
    }
    /* El label "Análisis de IA" del data-label: el plugin lo posiciona absoluto
       a la izquierda, pero esta celda no tiene un valor corto al lado sino
       contenido multilínea. Lo convertimos en encabezado centrado. */
    .crypto-top-list-container td.guidance-col::before,
    .crypto-grace-period-container td.guidance-col::before {
        position: static;
        transform: none;
        display: block;
        width: 100%;
        text-align: center;
        font-weight: 500;
        font-size: 13px;
        color: #6c757d;
        letter-spacing: 0.2px;
        margin-bottom: 10px;
        text-transform: none;
    }
    /* El contenido se centra horizontalmente */
    .guidance-col .cs-guidance-cell {
        align-items: center;
        text-align: center;
        gap: 8px;
    }
    .guidance-col .cs-guidance-badge {
        font-size: 12.5px;
        padding: 5px 13px;
        margin: 0 auto;
    }
    .guidance-col .cs-guidance-meta {
        justify-content: center;
        font-size: 12px;
        gap: 5px 14px;
    }
    .guidance-col .cs-guidance-note {
        font-size: 11.5px;
        line-height: 1.5;
        text-align: center;
        max-width: 100%;
    }
}

/* ============================================================
 * FIX Tablets (v2.18) — Card mode para TOP 10 y Período de Gracia
 * ------------------------------------------------------------
 * En iPads (Mini 744-768px portrait y 1024-1133px landscape,
 * Air 820px, Pro 11" 834px portrait y 1194px landscape) las
 * tablas con muchas columnas se ven apretadas y los headers
 * se parten en múltiples líneas.
 *
 * Solución: aplicar el mismo card mode que en móvil (≤550px)
 * también en todo el rango tablet, tanto a TOP 10 (incluye
 * Watchlist) como a Período de Gracia. Así las dos tablas son
 * consistentes visualmente en tablet.
 *
 * Las reglas duplican los bloques de card mode existentes para
 * ≤550px, prefijando con el container correspondiente para que
 * no se contaminen entre sí ni afecten el desktop.
 * ============================================================ */
@media (min-width: 551px) and (max-width: 1199px) {

    /* ============================================================
     * A) TOP 10 (incluye Watchlist) — card mode
     * ============================================================ */

    /* Colapsar la tabla a bloques */
    .crypto-top-list-container table,
    .crypto-top-list-container thead,
    .crypto-top-list-container tbody,
    .crypto-top-list-container th,
    .crypto-top-list-container td,
    .crypto-top-list-container tr {
        display: block;
    }

    /* Ocultar encabezados visualmente */
    .crypto-top-list-container thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    /* Cada fila = card */
    .crypto-top-list-container tr {
        background: #ffffff;
        padding: 12px 15px;
        margin-bottom: 0;
        position: relative;
    }

    /* Filas de Watchlist con fondo propio */
    .crypto-top-list-container .watchlist-row {
        background: #fafcff;
    }
    .crypto-top-list-container .watchlist-header {
        background: #f5f9ff;
        padding: 10px 15px;
    }
    .crypto-top-list-container .watchlist-header td {
        padding: 0;
        text-align: center;
    }

    .crypto-top-list-container tbody tr {
        border-bottom: 1px solid #e6f4ff;
    }
    .crypto-top-list-container tbody tr:last-child {
        border-bottom: none;
    }
    .crypto-top-list-container tbody tr:after {
        content: "";
        display: table;
        clear: both;
    }

    /* Celdas: par label→valor */
    .crypto-top-list-container td {
        border: none;
        position: relative;
        padding: 6px 0;
        text-align: right;
        margin-top: 3px;
        margin-bottom: 3px;
    }
    .crypto-top-list-container td:before {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        left: 0;
        width: 45%;
        white-space: nowrap;
        font-weight: 500;
        font-size: 13px;
        color: #6c757d;
        content: attr(data-label);
    }

    /* Todas las columnas ocupan 100% en stack */
    .crypto-top-list-container .rank-col,
    .crypto-top-list-container .coin-col,
    .crypto-top-list-container .inclusion-col,
    .crypto-top-list-container .initial-price-col,
    .crypto-top-list-container .max-change-col,
    .crypto-top-list-container .price-col,
    .crypto-top-list-container .potential-col,
    .crypto-top-list-container .guidance-col {
        width: 100%;
        float: left;
        clear: both;
    }

    /* Símbolo y nombre de moneda en la misma línea con paréntesis */
    .crypto-top-list-container .coin-col {
        margin-bottom: 10px;
    }
    .crypto-top-list-container .coin-symbol,
    .crypto-top-list-container .coin-name {
        display: inline;
    }
    .crypto-top-list-container .coin-name {
        margin-left: 5px;
        color: #6c757d;
    }
    .crypto-top-list-container .coin-name:before {
        content: "(";
    }
    .crypto-top-list-container .coin-name:after {
        content: ")";
    }

    .crypto-top-list-container .price-col {
        font-weight: 600;
    }
    .crypto-top-list-container .potential-col {
        text-align: right;
        margin-top: 8px;
    }

    /* Columna "Análisis de IA" del TOP 10: label como encabezado
       centrado arriba y contenido (badge + meta + nota) centrado
       abajo (contenido multilínea, no simple label-valor). */
    .crypto-top-list-container td.guidance-col {
        max-width: none;
        padding: 10px 0 6px;
        text-align: center;
    }
    .crypto-top-list-container td.guidance-col::before {
        position: static;
        transform: none;
        display: block;
        width: 100%;
        text-align: center;
        font-weight: 500;
        font-size: 13px;
        color: #6c757d;
        letter-spacing: 0.2px;
        margin-bottom: 10px;
        text-transform: none;
    }
    .crypto-top-list-container .guidance-col .cs-guidance-cell {
        align-items: center;
        text-align: center;
        gap: 8px;
    }
    .crypto-top-list-container .guidance-col .cs-guidance-badge {
        font-size: 12.5px;
        padding: 5px 13px;
        margin: 0 auto;
    }
    .crypto-top-list-container .guidance-col .cs-guidance-meta {
        justify-content: center;
        font-size: 12px;
        gap: 5px 14px;
    }
    .crypto-top-list-container .guidance-col .cs-guidance-note {
        font-size: 11.5px;
        line-height: 1.5;
        text-align: center;
        max-width: 100%;
    }

    /* ============================================================
     * B) Período de Gracia — card mode
     * ============================================================ */

    /* Colapsar la tabla a bloques (cada fila = una card) */
    .crypto-grace-period-container table,
    .crypto-grace-period-container thead,
    .crypto-grace-period-container tbody,
    .crypto-grace-period-container th,
    .crypto-grace-period-container td,
    .crypto-grace-period-container tr {
        display: block;
    }

    /* Ocultar encabezados visualmente (cada celda lleva su
       propio data-label que se muestra como label). */
    .crypto-grace-period-container thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    /* Cada fila se convierte en una card con su marco. */
    .crypto-grace-period-container tr {
        background: #ffffff;
        padding: 12px 15px;
        margin-bottom: 0;
        position: relative;
    }
    .crypto-grace-period-container .grace-period-row {
        background: #fafeff;
    }
    .crypto-grace-period-container tbody tr {
        border-bottom: 1px solid #e6f4ff;
    }
    .crypto-grace-period-container tbody tr:last-child {
        border-bottom: none;
    }
    .crypto-grace-period-container tbody tr:after {
        content: "";
        display: table;
        clear: both;
    }

    /* Celdas: pares label-valor, label absoluto a la izquierda,
       valor alineado a la derecha. */
    .crypto-grace-period-container td {
        border: none;
        position: relative;
        padding: 6px 0;
        text-align: right;
        margin-top: 3px;
        margin-bottom: 3px;
    }
    .crypto-grace-period-container td:before {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        left: 0;
        width: 45%;
        white-space: nowrap;
        font-weight: 500;
        font-size: 13px;
        color: #6c757d;
        content: attr(data-label);
    }

    /* Todas las columnas ocupan 100% en stack. */
    .crypto-grace-period-container .coin-col,
    .crypto-grace-period-container .inclusion-col,
    .crypto-grace-period-container .initial-price-col,
    .crypto-grace-period-container .max-change-col,
    .crypto-grace-period-container .price-col,
    .crypto-grace-period-container .grace-status-col,
    .crypto-grace-period-container .guidance-col {
        width: 100%;
        float: left;
        clear: both;
    }
    .crypto-grace-period-container .grace-status-col {
        text-align: right;
    }

    /* Símbolo y nombre de moneda en la misma línea con paréntesis */
    .crypto-grace-period-container .coin-symbol,
    .crypto-grace-period-container .coin-name {
        display: inline;
    }
    .crypto-grace-period-container .coin-name {
        margin-left: 5px;
        color: #6c757d;
    }
    .crypto-grace-period-container .coin-name:before {
        content: "(";
    }
    .crypto-grace-period-container .coin-name:after {
        content: ")";
    }

    /* Columna "Análisis de IA": label como encabezado centrado
       arriba y contenido (badge + meta + nota) centrado abajo,
       porque es contenido multilínea, no un simple par label-valor. */
    .crypto-grace-period-container td.guidance-col {
        max-width: none;
        padding: 10px 0 6px;
        text-align: center;
    }
    .crypto-grace-period-container td.guidance-col::before {
        position: static;
        transform: none;
        display: block;
        width: 100%;
        text-align: center;
        font-weight: 500;
        font-size: 13px;
        color: #6c757d;
        letter-spacing: 0.2px;
        margin-bottom: 10px;
        text-transform: none;
    }
    .crypto-grace-period-container .guidance-col .cs-guidance-cell {
        align-items: center;
        text-align: center;
        gap: 8px;
    }
    .crypto-grace-period-container .guidance-col .cs-guidance-badge {
        font-size: 12.5px;
        padding: 5px 13px;
        margin: 0 auto;
    }
    .crypto-grace-period-container .guidance-col .cs-guidance-meta {
        justify-content: center;
        font-size: 12px;
        gap: 5px 14px;
    }
    .crypto-grace-period-container .guidance-col .cs-guidance-note {
        font-size: 11.5px;
        line-height: 1.5;
        text-align: center;
        max-width: 100%;
    }
}



/* ============================================================
   ============  CSX BENTO v2 · 2-COL UNIFORM  ===============
   ============================================================
   v2 corrige los errores de v1:
   - Grid de 2 columnas (no 3): funciona en cualquier ancho >= 600px
   - #1 es HERO ancha (span 2 col), pero altura normal (sin huecos)
   - Rank siempre visible (círculo naranja sólido)
   - Card top/mid claros, sin elementos flotantes
   - Fecha compacta (j M H:i) sin año para no romper líneas
   - Móvil: 1 col limpia, padding optimizado
   Reversible: borrar este bloque entero.
   ============================================================ */

/* ===== CONTAINER (modo bento) ===== */
.crypto-top-list-container.csxb-mode {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #ffe0b2;
    box-shadow: 0 6px 20px rgba(255, 153, 51, 0.1);
    overflow: hidden;
    margin: 100px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Ocultar cualquier tabla residual */
.csxb-mode .crypto-table-responsive,
.csxb-mode table {
    display: none;
}

/* ===== HEADER ===== */
.csxb-header {
    background: #fff8e1;
    padding: 18px 24px;
    border-bottom: 1px solid #ffe0b2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    border-radius: 16px 16px 0 0;
}
.csxb-header-text { text-align: left; }
.csxb-eyebrow {
    margin: 0 0 2px;
    font-size: 11px;
    color: #ff6600;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.csxb-title {
    font-size: 20px;
    font-weight: 600;
    color: #333333;
    margin: 0;
    line-height: 1.3;
}
.csxb-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #ffe0b2;
    flex-shrink: 0;
}
.csxb-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff9933;
    display: inline-block;
    animation: csxbpulse 2s ease-in-out infinite;
}
@keyframes csxbpulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.csxb-live-text {
    font-size: 11px;
    color: #333333;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ===== BODY ===== */
.csxb-body {
    background: #fffdf7;
    padding: 18px;
}

/* ===== GRID PRINCIPAL · 2 COLUMNAS ===== */
.csxb-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Card HERO (#1): ancho doble · altura normal */
.csxb-card-hero {
    grid-column: span 2;
}

/* ===== WATCHLIST GRID ===== */
.csxb-watchlist-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 14px;
}

/* ===== GRACE GRID ===== */
.csxb-grace-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* ===== CARD BASE ===== */
.csxb-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px;
    border: 1px solid #ffe0b2;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-sizing: border-box;
}
.csxb-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(255, 153, 51, 0.12);
    background: #ffffff;
}

/* HERO con un toque distintivo */
.csxb-card-hero {
    background: linear-gradient(135deg, #ffffff 0%, #fffaf2 100%);
    border: 1px solid #ffd699;
    padding: 20px;
}

/* Watchlist: borde punteado para diferenciar */
.csxb-card-wl {
    border: 1px dashed #ffe0b2;
}

/* Grace: fondo crema sutil */
.csxb-card-grace {
    background: #fffaf2;
}
.csxb-card-grace:hover {
    background: #fffaf2;
}

/* ===== CARD TOP (rank + identity + phase) ===== */
.csxb-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}
.csxb-card-rank-id {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

/* RANK: círculo naranja visible */
.csxb-rank {
    background: #ff6600;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(255, 102, 0, 0.2);
}
.csxb-card-hero .csxb-rank {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 14px;
}
.csxb-rank-wl {
    background: #ff9933;
    box-shadow: none;
}

/* IDENTIDAD */
.csxb-id {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.csxb-mode .csxb-sym,
.csxb-grace-container .csxb-sym {
    font-size: 17px;
    font-weight: 700;
    color: #1d4380;
    letter-spacing: -0.2px;
    margin: 0;
    line-height: 1.2;
}
.csxb-card-hero .csxb-sym {
    font-size: 22px;
    letter-spacing: -0.4px;
}
.csxb-mode .csxb-name,
.csxb-grace-container .csxb-name {
    font-size: 11px;
    color: #86868b;
    margin: 2px 0 0;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.csxb-card-hero .csxb-name {
    font-size: 12px;
}

/* ===== CARD PHASE (badge guidance) ===== */
.csxb-card-phase {
    flex-shrink: 0;
    text-align: right;
    max-width: 50%;
}

/* Badge guidance heredado: simplificarlo dentro del card */
.csxb-card .cs-guidance-cell {
    text-align: right;
}
.csxb-card .cs-guidance-badge {
    font-size: 10px;
    padding: 4px 9px;
    border-radius: 6px;
    font-weight: 700;
    background: #fef3e6;
    color: #c44900;
    border: 1px solid #fdd9a8;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.3;
}
.csxb-card-hero .cs-guidance-badge {
    font-size: 11px;
    padding: 5px 11px;
}

/* Verde para fases tempranas / fuertes */
.csxb-card .cs-guidance-badge.cs-phase-detected,
.csxb-card .cs-guidance-badge.cs-phase-impulse,
.csxb-card .cs-guidance-badge.cs-phase-mature_strong {
    background: #e8f5ec;
    color: #00713a;
    border-color: #b8e0c5;
}

/* Rojo para grace */
.csxb-card .cs-guidance-badge.cs-phase-grace {
    background: #fee6e6;
    color: #c12d2d;
    border-color: #f8c4c4;
}

/* Azul para watchlist */
.csxb-card .cs-guidance-badge.cs-phase-watchlist {
    background: #e6f7ff;
    color: #0070b8;
    border-color: #b3e0ff;
}

/* Confianza + Riesgo (meta) compactos debajo del badge */
.csxb-card .cs-guidance-meta {
    display: flex;
    gap: 6px;
    margin-top: 5px;
    justify-content: flex-end;
    font-size: 10px;
    flex-wrap: wrap;
    line-height: 1.3;
}
.csxb-card .cs-meta-item {
    font-size: 10px;
    color: #86868b;
    background: transparent;
    padding: 0;
    border: none;
}
.csxb-card .cs-meta-item strong {
    color: #333333;
    font-weight: 600;
}

/* Ocultar la "note" en bento (ya está en el cuadro educativo arriba) */
.csxb-card .cs-guidance-note {
    display: none;
}

/* Iconos pequeños dentro del badge */
.csxb-card .cs-guidance-icon svg,
.csxb-card .cs-meta-icon svg {
    width: 11px;
    height: 11px;
}

/* ===== CARD MID (precios) ===== */
.csxb-card-mid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: end;
}
.csxb-price-block,
.csxb-initial-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.csxb-initial-block {
    text-align: right;
    align-items: flex-end;
}

.csxb-label {
    font-size: 9px;
    color: #86868b;
    letter-spacing: 0.8px;
    font-weight: 700;
    line-height: 1.2;
}

.csxb-price {
    font-size: 22px;
    font-weight: 700;
    color: #1d4380;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin-top: 1px;
}
.csxb-card-hero .csxb-price {
    font-size: 28px;
    letter-spacing: -0.8px;
}
.csxb-card-wl .csxb-price,
.csxb-card-grace .csxb-price {
    font-size: 20px;
}

.csxb-change {
    font-size: 12px;
    font-weight: 700;
    color: #00a651;
    font-variant-numeric: tabular-nums;
    margin-top: 3px;
    line-height: 1.2;
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
}
.csxb-card-hero .csxb-change {
    font-size: 14px;
}
.csxb-change-suffix {
    font-size: 10px;
    color: #86868b;
    font-weight: 400;
}
.csxb-change .price-up { color: #00a651; }
.csxb-change .price-down { color: #d94545; }
.csxb-change .price-neutral { color: #86868b; }

.csxb-initial {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    margin-top: 1px;
}
.csxb-card-hero .csxb-initial {
    font-size: 16px;
}

.csxb-date {
    font-size: 11px;
    color: #86868b;
    margin-top: 3px;
    line-height: 1.2;
}
.csxb-date-grace .grace-indicator {
    font-size: 10px;
    color: #ff6600;
    font-weight: 700;
    background: #fef3e6;
    padding: 3px 8px;
    border-radius: 5px;
    display: inline-block;
}

/* ===== SEPARATOR (watchlist + grace) ===== */
.csxb-separator,
.csxb-grace-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 22px 0 14px;
    padding: 10px 14px;
    background: #fff8e1;
    border-radius: 10px;
    border-left: 3px solid #ff9933;
    flex-wrap: wrap;
}
.csxb-sep-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #333333;
}
.csxb-sep-sub {
    margin: 0;
    font-size: 11px;
    color: #86868b;
    font-weight: 400;
}

/* ===== GRACE CONTAINER ===== */
.crypto-grace-period-container.csxb-mode {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #ffe0b2;
    overflow: visible;
}
.csxb-grace-container .csxb-grace-header {
    background: #fff8e1;
    border-radius: 10px;
    margin: 18px 18px 14px;
    padding: 10px 14px;
    text-align: left;
}
.csxb-grace-container .csxb-body {
    padding: 0 18px 18px;
    background: transparent;
}

/* Reset del rank-number original que era amarillo en bento (defensivo) */
.csxb-mode .rank-number {
    background: #ff6600;
    color: #ffffff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    line-height: 1;
}
.csxb-mode .watchlist-rank {
    background: #ff9933;
}

/* Asegurar block display de las cards (anular tr/td residual) */
.csxb-card.top-coin-row,
.csxb-card.watchlist-row,
.csxb-card.grace-period-row {
    display: block;
}

/* Hover defensivo */
.csxb-card.top-coin-row:hover,
.csxb-card.watchlist-row:hover {
    background-color: #ffffff;
}
.csxb-card-hero.top-coin-row:hover {
    background: linear-gradient(135deg, #ffffff 0%, #fffaf2 100%);
}
.csxb-card-grace.grace-period-row:hover {
    background-color: #fffaf2;
}

/* ===== MOBILE: 1 columna limpia ===== */
@media (max-width: 768px) {
    .crypto-top-list-container.csxb-mode {
        margin: 40px auto;
    }
    .csxb-header {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .csxb-title {
        font-size: 18px;
    }
    .csxb-body {
        padding: 14px;
    }
    .csxb-grid,
    .csxb-watchlist-grid,
    .csxb-grace-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .csxb-card-hero {
        grid-column: span 1;
    }
    .csxb-card {
        padding: 14px;
    }
    .csxb-card-hero {
        padding: 16px;
    }
    .csxb-card-hero .csxb-sym {
        font-size: 20px;
    }
    .csxb-card-hero .csxb-price {
        font-size: 24px;
    }
    .csxb-card-mid {
        gap: 10px;
    }
    .csxb-price {
        font-size: 20px;
    }
    .csxb-initial {
        font-size: 13px;
    }
    .csxb-grace-container .csxb-grace-header {
        margin: 14px 14px 10px;
    }
    .csxb-grace-container .csxb-body {
        padding: 0 14px 14px;
    }
}

/* ===== EXTRA SMALL (< 380px): badge debajo de identidad ===== */
@media (max-width: 379px) {
    .csxb-card-top {
        flex-direction: column;
        align-items: flex-start;
    }
    .csxb-card-phase {
        max-width: 100%;
        text-align: left;
        margin-top: 6px;
    }
    .csxb-card .cs-guidance-cell,
    .csxb-card .cs-guidance-meta {
        text-align: left;
        justify-content: flex-start;
    }
}

/* ===== FIN BLOQUE BENTO v2 ===== */



/* ============================================================
   ==========  CSX BENTO v2 · OPCIÓN D (HEADER+PROGRESS)  =====
   ============================================================
   Fusiona Escaneando + Membresía + Soporte dentro del header
   del Bento. Reemplaza el "panel azul" anterior.
   ============================================================ */

/* === Header enriquecido === */
.csxb-header-d {
    padding: 14px 20px;
    display: block;
    background: #fff8e1;
    border-bottom: 1px solid #ffe0b2;
}

.csxb-header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.csxb-header-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* === Pill de membresía === */
.csxb-membership-pill {
    background: #ffffff;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid #b8e0c5;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}
.csxb-membership-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.csxb-membership-text {
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* === Botón Soporte === */
.csxb-support-btn {
    background: #ff9933;
    color: #ffffff;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    line-height: 1.2;
    font-family: inherit;
    transition: background 0.18s ease, transform 0.18s ease;
}
.csxb-support-btn:hover {
    background: #ff6600;
    transform: translateY(-1px);
}
.csxb-support-btn svg {
    flex-shrink: 0;
}

/* === Barra de progreso inline === */
.csxb-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}
.csxb-progress-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff9933;
    display: inline-block;
    flex-shrink: 0;
    animation: csxbpulse 2s ease-in-out infinite;
}
.csxb-progress-label {
    font-size: 11px;
    color: #86868b;
    font-weight: 500;
    flex-shrink: 0;
}
.csxb-progress-track {
    flex: 1;
    height: 5px;
    background: #fff0d8;
    border-radius: 3px;
    overflow: hidden;
    min-width: 80px;
}
.csxb-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff9933, #ff6600);
    border-radius: 3px;
    transition: width 1s linear;
}
.csxb-progress-meta {
    font-size: 11px;
    color: #ff6600;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    white-space: nowrap;
}
.csxb-progress-sep {
    color: #86868b;
    font-weight: 400;
    margin: 0 3px;
}

/* === Banner de renovación (solo si ≤7 días) === */
.csxb-renewal-alert {
    max-width: 100%;
    margin: 20px auto 14px;
    padding: 12px 18px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #856404;
}
.csxb-renewal-icon {
    font-size: 16px;
    flex-shrink: 0;
}
.csxb-renewal-text {
    flex: 1;
    min-width: 200px;
}
.csxb-renewal-link {
    background: #ff6600;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
}
.csxb-renewal-link:hover {
    background: #e55c00;
    color: #ffffff;
    text-decoration: none;
}

/* === Anular el botón "Soporte Premium" suelto que ya no se usa === */
.support-container.csxb-support-options-wrap {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    margin: 0 auto;
    max-width: 480px;
    text-align: center;
}
.support-container.csxb-support-options-wrap .support-message {
    display: none;
}
.support-container.csxb-support-options-wrap .support-button {
    display: none; /* el viejo botón verde/naranja ya no se muestra */
}
.support-container.csxb-support-options-wrap .support-controls {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

/* === MOBILE: header en columna ordenada === */
@media (max-width: 768px) {
    .csxb-header-d {
        padding: 12px 14px;
    }
    .csxb-header-top-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 12px;
    }
    .csxb-header-meta {
        width: 100%;
        justify-content: space-between;
    }
    .csxb-membership-text {
        font-size: 10px;
    }
    .csxb-progress-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    .csxb-progress-track {
        width: 100%;
        flex-basis: 100%;
        order: 3;
    }
    .csxb-progress-meta {
        margin-left: auto;
    }
    .csxb-renewal-alert {
        margin: 14px;
        padding: 10px 14px;
        font-size: 12px;
    }
    .csxb-renewal-text {
        min-width: 0;
    }
}

/* === FIN OPCIÓN D === */

/* === Fix: Grace card muestra fecha COMPLETA + tiempo restante apilados === */
.csxb-date-grace-row {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    margin-top: 3px;
}
.csxb-date-grace-row .csxb-date-text {
    font-size: 11px;
    color: #86868b;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.csxb-date-grace-row .grace-indicator {
    font-size: 10px;
    color: #ff6600;
    font-weight: 700;
    background: #fef3e6;
    padding: 2px 7px;
    border-radius: 5px;
    display: inline-block;
    line-height: 1.3;
}

/* En móvil: la fila se queda en columna como ya está */
@media (max-width: 768px) {
    .csxb-date-grace-row {
        align-items: flex-end;
    }
}

/* ============================================================
   ==========  FIX: SOPORTE POPOVER (dropdown sutil)  =========
   ============================================================
   El #supportOptions se monta dinámicamente dentro de
   #csxb-support-anchor via JS (mount_support_popover).
   Cuando tiene clase .csxb-support-popover, se renderiza
   como dropdown sutil JUSTO debajo del botón Soporte.
   ============================================================ */

.csxb-support-wrapper {
    position: relative;
    display: inline-flex;
}

/* Estado por defecto del popover (montado, cerrado) */
#supportOptions.csxb-support-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #ffffff;
    border: 1px solid #ffe0b2;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(255, 102, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.06);
    padding: 8px;
    z-index: 1000;
    /* oculto por defecto */
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
    /* Reset de estilos legacy */
    display: block !important;
    max-height: none;
    overflow: visible;
    text-align: left;
    margin: 0;
    /* No mostrar el botón legacy interno si lo hubiera */
    box-sizing: border-box;
}

/* Estado abierto (clase .expanded toggled por toggleSupportOptions) */
#supportOptions.csxb-support-popover.expanded {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    visibility: visible;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0s;
}

/* Triángulo apuntando al botón */
#supportOptions.csxb-support-popover::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 16px;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-top: 1px solid #ffe0b2;
    border-left: 1px solid #ffe0b2;
    transform: rotate(45deg);
}

/* Estilos de los enlaces WhatsApp y Telegram dentro del popover */
#supportOptions.csxb-support-popover .contact-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    margin: 0;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    color: #333333;
    transition: background 0.14s ease, transform 0.14s ease;
    background: transparent;
    border: none;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.3;
}

#supportOptions.csxb-support-popover .contact-button + .contact-button {
    margin-top: 2px;
}

#supportOptions.csxb-support-popover .contact-button:hover {
    background: #fff8e1;
    transform: translateX(2px);
}

#supportOptions.csxb-support-popover .whatsapp-button .contact-icon {
    color: #25D366;
    flex-shrink: 0;
}

#supportOptions.csxb-support-popover .telegram-button .contact-icon {
    color: #0088cc;
    flex-shrink: 0;
}

#supportOptions.csxb-support-popover .contact-button span {
    font-size: 13px;
}

/* En móvil: el popover ocupa más espacio y se centra */
@media (max-width: 480px) {
    #supportOptions.csxb-support-popover {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-4px) scale(0.98);
        min-width: 220px;
    }
    #supportOptions.csxb-support-popover.expanded {
        transform: translateX(-50%) translateY(0) scale(1);
    }
    #supportOptions.csxb-support-popover::before {
        right: auto;
        left: 50%;
        margin-left: -5px;
    }
}

/* === FIN POPOVER === */

/* ============================================================
   ===  FIX: Texto del popover de Soporte (override legacy)  ==
   ============================================================
   El CSS legacy de .contact-button tenía 'color: white !important'
   porque eran botones llenos con fondo verde/azul. En nuestro
   popover sutil (fondo blanco) ese blanco no se ve.
   Forzamos texto oscuro con !important para ganarle al legacy.
   ============================================================ */

#supportOptions.csxb-support-popover .contact-button {
    color: #1d4380 !important;
    background-color: transparent !important;
    justify-content: flex-start !important;
}

#supportOptions.csxb-support-popover .contact-button:hover {
    background-color: #fff8e1 !important;
    color: #1d4380 !important;
}

#supportOptions.csxb-support-popover .whatsapp-button:hover .contact-icon {
    color: #128C7E !important;
}

#supportOptions.csxb-support-popover .telegram-button:hover .contact-icon {
    color: #0077b5 !important;
}

#supportOptions.csxb-support-popover .contact-button span {
    color: #1d4380 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

/* Asegurar que el max-height del legacy no corte el popover */
#supportOptions.csxb-support-popover {
    max-height: none !important;
    overflow: visible !important;
}

#supportOptions.csxb-support-popover.expanded {
    max-height: none !important;
    margin-top: 0 !important;
}

/* === FIN FIX TEXTO POPOVER === */

/* ============================================================
   ===========  CSX · CONDICIÓN DE MERCADO (gauge)  ==========
   ============================================================
   Velocímetro semicircular. Reemplaza la barra plana anterior.
   El % y el arco se calculan en PHP según monedas en Top 10.
   Responsive: desktop = gauge + texto en fila; móvil = apilado.
   ============================================================ */

.csxb-market-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #ffe0b2;
    box-shadow: 0 6px 20px rgba(255, 153, 51, 0.1);
    padding: 24px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 28px;
    align-items: center;
    max-width: 100%;
    margin: 20px auto;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* === Gauge === */
.csxb-market-gauge {
    text-align: center;
    flex-shrink: 0;
}
.csxb-gauge-svg {
    width: 170px;
    height: 105px;
    display: block;
}
.csxb-gauge-percent {
    font-size: 30px;
    font-weight: 700;
    fill: #333333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.csxb-gauge-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.csxb-gauge-ends {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #86868b;
    font-weight: 600;
    margin-top: -4px;
    padding: 0 6px;
}

/* === Texto === */
.csxb-market-text {
    min-width: 0;
}
.csxb-market-eyebrow {
    margin: 0 0 2px;
    font-size: 10px;
    color: #ff6600;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}
.csxb-market-title {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 600;
    color: #333333;
    line-height: 1.3;
}
.csxb-market-note {
    background: #fffdf7;
    border: 1px solid #ffe0b2;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    gap: 9px;
    align-items: flex-start;
}
.csxb-market-note-icon {
    color: #ff9933;
    font-size: 14px;
    flex-shrink: 0;
    line-height: 1.4;
}
.csxb-market-note-text {
    margin: 0;
    font-size: 12.5px;
    color: #666666;
    line-height: 1.55;
}

/* === MÓVIL: apilado, gauge centrado === */
@media (max-width: 768px) {
    .csxb-market-card {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 20px;
        text-align: center;
    }
    .csxb-market-gauge {
        order: 2;
    }
    .csxb-market-text {
        order: 1;
    }
    .csxb-market-eyebrow,
    .csxb-market-title {
        text-align: center;
    }
    .csxb-gauge-svg {
        width: 180px;
        height: 111px;
        margin: 0 auto;
    }
    .csxb-gauge-ends {
        padding: 0 8px;
        margin-top: -6px;
    }
    .csxb-market-note {
        text-align: left;
        margin-top: 4px;
    }
    .csxb-market-title {
        font-size: 15px;
    }
    .csxb-market-note-text {
        font-size: 12px;
    }
}

/* === FIN CONDICIÓN DE MERCADO === */

/* ============================================================
   =======  CSX · BOTÓN PERÍODO DE GRACIA (pill outline)  ====
   ============================================================
   Opción B: pill compacto centrado, naranja solo en el borde.
   Reemplaza el botón naranja sólido anterior.
   ============================================================ */

.csxb-grace-toggle-wrap {
    text-align: center;
    margin: 18px auto;
}

/* El pill en sí */
.grace-period-button.csxb-grace-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: #fffdf7;
    border: 1.5px solid #ffd699;
    border-radius: 24px;
    padding: 10px 20px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    /* Reset de estilos del botón legacy */
    width: auto;
    max-width: none;
    box-shadow: none;
    color: #333333;
    margin: 0;
}

.grace-period-button.csxb-grace-pill:hover {
    background: #fff8e1;
    border-color: #ff9933;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 153, 51, 0.15);
}

/* Ícono (reloj) */
.csxb-grace-pill-icon {
    display: inline-flex;
    align-items: center;
    color: #ff6600;
    flex-shrink: 0;
}

/* Texto */
.csxb-grace-pill-text {
    font-size: 13px;
    font-weight: 600;
    color: #333333;
    white-space: nowrap;
}

/* Contador de monedas */
.coin-counter.csxb-grace-pill-count {
    background: #ff6600;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
    /* Reset legacy */
    margin: 0;
    min-width: auto;
}

/* Chevron que gira al expandir */
.csxb-grace-pill-chevron {
    color: #ff9933;
    font-size: 13px;
    transition: transform 0.22s ease;
    display: inline-block;
    line-height: 1;
}
.grace-period-button.csxb-grace-pill.expanded .csxb-grace-pill-chevron {
    transform: rotate(180deg);
}

/* Pulso de atención (el JS legacy añade .pulse-animation) */
.grace-period-button.csxb-grace-pill.pulse-animation {
    animation: csxbGracePulse 1.6s ease-in-out infinite;
}
@keyframes csxbGracePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 153, 51, 0.35); }
    50%      { box-shadow: 0 0 0 6px rgba(255, 153, 51, 0); }
}

/* === MÓVIL: el pill se adapta sin romperse === */
@media (max-width: 480px) {
    .grace-period-button.csxb-grace-pill {
        padding: 9px 16px;
        gap: 7px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .csxb-grace-pill-text {
        font-size: 12px;
    }
}

/* === FIN BOTÓN PERÍODO DE GRACIA === */

/* ============================================================
   ====  CSX · CARD SOLA OCUPA ANCHO COMPLETO (no hueco)  ====
   ============================================================
   Cuando la última card de un grid quedaría sola en su fila,
   se expande a 2 columnas para no dejar un hueco vacío.

   - TOP 5 (.csxb-grid): la #1 es HERO y ya ocupa 2 espacios,
     así que el conteo se desplaza -> la última queda sola
     cuando su posición es PAR (:nth-child(even)).
   - Watchlist y Grace (sin hero): la última queda sola cuando
     su posición es IMPAR (:nth-child(odd)).
   ============================================================ */

/* TOP 5: última card sola -> ancho completo */
.csxb-grid > .csxb-card:last-child:nth-child(even) {
    grid-column: span 2;
}

/* Watchlist: última card sola -> ancho completo */
.csxb-watchlist-grid > .csxb-card:last-child:nth-child(odd) {
    grid-column: span 2;
}

/* Período de Gracia: última card sola -> ancho completo */
.csxb-grace-grid > .csxb-card:last-child:nth-child(odd) {
    grid-column: span 2;
}

/* En móvil los grids ya son de 1 columna: el span 2 no aplica
   pero lo reseteamos por limpieza para evitar cualquier efecto. */
@media (max-width: 768px) {
    .csxb-grid > .csxb-card:last-child:nth-child(even),
    .csxb-watchlist-grid > .csxb-card:last-child:nth-child(odd),
    .csxb-grace-grid > .csxb-card:last-child:nth-child(odd) {
        grid-column: auto;
    }
}

/* === FIN CARD SOLA ANCHO COMPLETO === */

/* ============================================================
   ====  FIX: Cards de Gracia idénticas a las del TOP  =======
   ============================================================
   Las grace cards ahora tienen un círculo a la izquierda
   (ícono de reloj). Esto ancla el layout igual que el rank
   numérico del TOP/watchlist. Además forzamos alineación a la
   izquierda por si algún estilo heredado la centraba.
   ============================================================ */

/* Círculo del ícono de reloj en grace */
.csxb-rank.csxb-rank-grace {
    background: #ff9933;
    color: #ffffff;
    box-shadow: none;
    padding: 0;
}
.csxb-rank.csxb-rank-grace svg {
    width: 15px;
    height: 15px;
    display: block;
}

/* Forzar layout izquierda en grace cards (defensivo contra herencia) */
.csxb-grace-grid .csxb-card-grace {
    display: block;
    text-align: left;
}
.csxb-grace-grid .csxb-card-grace .csxb-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
}
.csxb-grace-grid .csxb-card-grace .csxb-card-rank-id {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    text-align: left;
}
.csxb-grace-grid .csxb-card-grace .csxb-id {
    text-align: left;
}
.csxb-grace-grid .csxb-card-grace .csxb-card-mid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: end;
}
.csxb-grace-grid .csxb-card-grace .csxb-price-block {
    text-align: left;
    align-items: flex-start;
}
.csxb-grace-grid .csxb-card-grace .csxb-initial-block {
    text-align: right;
    align-items: flex-end;
}
.csxb-grace-grid .csxb-card-grace .csxb-card-phase {
    text-align: right;
}

/* === FIN FIX GRACE CARDS === */

/* ============================================================
   ====  CSX · CUADRO EDUCATIVO (pill outline, al final)  ====
   ============================================================
   "¿Cómo interpretar el Análisis de IA?" como pill colapsable,
   mismo estilo que el botón de Período de Gracia.
   ============================================================ */

.csxb-guide-wrap {
    margin: 24px auto 10px;
    text-align: center;
}

/* El pill (botón colapsable) */
.csxb-guide-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: #fffdf7;
    border: 1.5px solid #ffd699;
    border-radius: 24px;
    padding: 10px 20px;
    cursor: pointer;
    font-family: inherit;
    color: #333333;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.csxb-guide-pill:hover {
    background: #fff8e1;
    border-color: #ff9933;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 153, 51, 0.15);
}
.csxb-guide-pill svg {
    color: #ff6600;
    flex-shrink: 0;
}
.csxb-guide-pill-text {
    font-size: 13px;
    font-weight: 600;
    color: #333333;
    white-space: nowrap;
}
.csxb-guide-pill-icon {
    color: #ff9933;
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.2s ease;
}
.csxb-guide-pill.expanded .csxb-guide-pill-icon {
    transform: rotate(180deg);
}

/* El contenido desplegable */
.csxb-guide-content {
    text-align: left;
    max-width: 100%;
    margin: 14px auto 0;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #ffe0b2;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.65;
    color: #444444;
    box-shadow: 0 6px 20px rgba(255, 153, 51, 0.1);
    box-sizing: border-box;
}

/* === MÓVIL === */
@media (max-width: 768px) {
    .csxb-guide-pill {
        padding: 9px 16px;
        gap: 7px;
        max-width: 92%;
    }
    .csxb-guide-pill-text {
        font-size: 12px;
        white-space: normal;
        text-align: left;
    }
    .csxb-guide-content {
        padding: 16px 16px;
        margin: 12px 8px 0;
        font-size: 13px;
    }
}

/* === FIN CUADRO EDUCATIVO === */

/* ============================================================
   ==  CSX · GRIDS DEL CUADRO EDUCATIVO (Confianza/Riesgo)  ==
   ============================================================
   Desktop: 3 columnas. Móvil: 2 columnas, y la última card si
   queda sola ocupa ancho completo (igual que el TOP).
   ============================================================ */

.csxb-guide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.csxb-guide-cell {
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-sizing: border-box;
}

/* Móvil/tablet: 2 columnas, última card sola -> ancho completo */
@media (max-width: 768px) {
    .csxb-guide-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .csxb-guide-grid > .csxb-guide-cell:last-child:nth-child(odd) {
        grid-column: span 2;
    }
}

/* === FIN GRIDS CUADRO EDUCATIVO === */

/* ============================================================
   ====  FIX: Pill de membresía en estado de carga  ==========
   ============================================================
   La membresía se rellena vía AJAX (no va en el cache global).
   Mientras carga, la pill muestra "Cargando…" con un latido sutil.
   ============================================================ */
.csxb-membership-pill.csxb-membership-loading {
    opacity: 0.7;
}
.csxb-membership-pill.csxb-membership-loading .csxb-membership-dot {
    animation: csxbMembPulse 1.1s ease-in-out infinite;
}
@keyframes csxbMembPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}
/* Transición suave cuando se rellena con los datos reales */
.csxb-membership-pill {
    transition: opacity 0.25s ease, border-color 0.25s ease;
}
.csxb-membership-text,
.csxb-membership-dot {
    transition: color 0.25s ease, background 0.25s ease;
}
/* === FIN FIX PILL MEMBRESÍA === */

/* ============================================================
   =========  CSX · ALERTAS DE FALLO DE API  ================
   ============================================================
   Avisos cuando la API de datos falla. Coherentes con el Bento:
   card redondeada, borde lateral de acento, ícono en cajita.
   ============================================================ */

.csxb-alert {
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 auto 16px;
    max-width: 100%;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Variante AVISO (ámbar): datos cacheados / sin monedas */
.csxb-alert-warning {
    background: #fffdf7;
    border: 1px solid #ffe08a;
    border-left: 4px solid #ff9933;
}
.csxb-alert-warning .csxb-alert-icon {
    background: #fff3cd;
    color: #c44900;
}

/* Variante ERROR (rojo): fallo total */
.csxb-alert-error {
    background: #fff6f6;
    border: 1px solid #f5b5b5;
    border-left: 4px solid #d94545;
}
.csxb-alert-error .csxb-alert-icon {
    background: #fee6e6;
    color: #c12d2d;
}

/* Ícono en cajita */
.csxb-alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    flex-shrink: 0;
}

/* Texto */
.csxb-alert-body {
    min-width: 0;
}
.csxb-alert-title {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 700;
    color: #333333;
    line-height: 1.3;
}
.csxb-alert-text {
    margin: 0;
    font-size: 12.5px;
    color: #666666;
    line-height: 1.5;
}

/* === MÓVIL === */
@media (max-width: 768px) {
    .csxb-alert {
        padding: 12px 14px;
        gap: 10px;
    }
    .csxb-alert-title {
        font-size: 13px;
    }
    .csxb-alert-text {
        font-size: 12px;
    }
}

/* === FIN ALERTAS API === */

/* ============================================================
   ====  CSX · MONEDAS ELIMINADAS v3 (acento + responsive)  ==
   ============================================================
   - Acento lateral por rendimiento (vía ::before, robusto).
   - Responsive REAL: en móvil cada fila es una tarjeta apilada
     con etiquetas. SIN scroll horizontal.
   - Badges estilo C (suave con punto).
   - Solo estilos. Clases viejas conservadas.
   ============================================================ */

/* === Container === */
.crypto-history-container.csxr-container {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #ffe0b2;
    box-shadow: 0 6px 20px rgba(255, 153, 51, 0.1);
    overflow: hidden;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* === Header === */
.csxr-header {
    background: #fff8e1;
    padding: 18px 22px;
    border-bottom: 1px solid #ffe0b2;
}
.csxr-eyebrow {
    margin: 0 0 2px;
    font-size: 11px;
    color: #ff6600;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.crypto-history-title.csxr-title {
    font-size: 20px;
    font-weight: 600;
    color: #333333;
    margin: 0 0 3px;
}
.crypto-history-subtitle.csxr-subtitle {
    font-size: 12px;
    color: #86868b;
    line-height: 1.5;
    margin: 0;
}

/* === Filtros === */
.crypto-history-filters.csxr-filters {
    padding: 16px 22px;
    background: #fffdf7;
    border-bottom: 1px solid #fef0d8;
}
.csxr-filters .filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.csxr-filters .search-container {
    flex: 1;
    min-width: 200px;
}
.csxr-filters .search-input-wrapper {
    position: relative;
}
.csxr-filters .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #86868b;
    width: 16px;
    height: 16px;
}
.csxr-filters .search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px 9px 36px;
    border: 1.5px solid #ffe0b2;
    border-radius: 10px;
    font-size: 13px;
    background: #ffffff;
    color: #333333;
    outline: none;
    font-family: inherit;
    transition: border-color 0.16s ease;
}
.csxr-filters .search-input:focus {
    border-color: #ff9933;
}
.csxr-filters .clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #ffe0b2;
    color: #c44900;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.csxr-filters .performance-filter {
    padding: 9px 14px;
    border: 1.5px solid #ffe0b2;
    border-radius: 10px;
    font-size: 13px;
    background: #ffffff;
    color: #333333;
    outline: none;
    font-family: inherit;
    cursor: pointer;
}
.csxr-filters .performance-filter:focus {
    border-color: #ff9933;
}
.csxr-filters .filter-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.csxr-filters .filter-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: transform 0.16s ease, background 0.16s ease;
}
.csxr-filters .filter-button.apply-filters {
    background: #ff9933;
    color: #ffffff;
}
.csxr-filters .filter-button.apply-filters:hover {
    background: #ff6600;
    transform: translateY(-1px);
}
.csxr-filters .filter-button.reset-filters {
    background: #ffffff;
    color: #c44900;
    border: 1.5px solid #ffd699;
}
.csxr-filters .filter-button.reset-filters:hover {
    background: #fff8e1;
    transform: translateY(-1px);
}
.csxr-filters .filter-info {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.csxr-filters .results-count {
    font-size: 12px;
    color: #86868b;
}
.csxr-filters .results-count strong {
    color: #333333;
}
.csxr-filters .active-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.csxr-filters .filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fef3e6;
    color: #c44900;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 12px;
    border: 1px solid #fdd9a8;
}

/* === Body === */
.crypto-history-body.csxr-body {
    padding: 6px 22px 16px;
    background: #ffffff;
}

/* ============================================================
   === TABLA - VISTA DESKTOP ===
   ============================================================ */
.csxr-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.csxr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 1000px;
}
.csxr-table thead tr {
    background: linear-gradient(135deg, #ff6600 0%, #ff9933 100%);
}
.crypto-history-container.csxr-container .csxr-table thead th {
    padding: 13px 9px;
    text-align: left;
    font-size: 9.5px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    background: transparent !important;
    border-bottom: none !important;
}
.csxr-table thead th:first-child {
    border-radius: 8px 0 0 8px;
    padding-left: 16px;
}
.csxr-table thead th:last-child {
    border-radius: 0 8px 8px 0;
}
.csxr-table thead th.price-col,
.csxr-table thead th.max-col,
.csxr-table thead th.profit-amount-col {
    text-align: right;
}
.csxr-table thead th.performance-col {
    text-align: center;
}

/* Filas */
.csxr-table tbody tr.csxr-row {
    border-bottom: 1px solid #f3ece0;
    transition: background 0.14s ease;
}
.csxr-table tbody tr.csxr-row:last-child {
    border-bottom: none;
}
.csxr-table tbody tr.csxr-row:hover {
    background: #fffdf7;
}
.csxr-table tbody td {
    padding: 12px 9px;
    color: #666666;
    vertical-align: middle;
}

/* === ACENTO LATERAL por rendimiento (vía ::before) ===
   La primera celda tiene position:relative y un ::before que
   dibuja la franja de color. Inmune a border-collapse. */
.csxr-table tbody td.date-remove-col {
    position: relative;
    padding-left: 16px;
    color: #888888;
    font-size: 11px;
}
.csxr-table tbody td.date-remove-col::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #c9c9c9;
}
/* Colores del acento según rendimiento de la fila */
.csxr-table tbody tr.csxr-perf-excellent td.date-remove-col::before { background: #00a651; }
.csxr-table tbody tr.csxr-perf-good      td.date-remove-col::before { background: #0091d5; }
.csxr-table tbody tr.csxr-perf-minimal   td.date-remove-col::before { background: #ff9500; }
.csxr-table tbody tr.csxr-perf-low       td.date-remove-col::before { background: #8e7cc3; }
.csxr-table tbody tr.csxr-perf-negative  td.date-remove-col::before { background: #e63946; }

/* Alineaciones por columna */
.csxr-table tbody td.price-col,
.csxr-table tbody td.max-col,
.csxr-table tbody td.profit-amount-col {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.csxr-table tbody td.performance-col {
    text-align: center;
}

/* Símbolo de la moneda */
.csxr-table .coin-symbol {
    font-weight: 700;
    color: #1d4380;
    font-size: 13px;
}
/* Fechas */
.csxr-table td.date-col,
.csxr-table td.date-exit-col {
    color: #555555;
    font-size: 11px;
    line-height: 1.45;
}
/* Precios y cambios */
.csxr-table .price-up { color: #00a651; font-weight: 700; }
.csxr-table .price-down { color: #d94545; font-weight: 700; }
.csxr-table .price-unchanged { color: #888888; font-size: 11px; font-style: italic; }
.csxr-table td.price-col { color: #333333; font-weight: 600; }
.csxr-table .change-details { line-height: 1.5; }
.csxr-table .change-label { color: #999999; font-size: 10px; }
.csxr-table .change-value { font-weight: 700; color: #333333; font-size: 11px; }
.csxr-table .change-value.price-up { color: #00a651; }
.csxr-table .change-value.price-down { color: #d94545; }
.csxr-table .profit-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.csxr-table .profit-amount.profit-positive { color: #00a651; }
.csxr-table .profit-amount.profit-negative { color: #d94545; }

/* === Badges de rendimiento (estilo C: suave con punto) === */
.csxr-table .performance-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 12px 4px 9px;
    border-radius: 20px;
    white-space: nowrap;
}
.csxr-table .performance-indicator::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.csxr-table .performance-indicator.performance-excellent {
    background: #e3f9ec; color: #00873d;
}
.csxr-table .performance-indicator.performance-excellent::before { background: #00a651; }
.csxr-table .performance-indicator.performance-good {
    background: #e1f3fb; color: #0077b5;
}
.csxr-table .performance-indicator.performance-good::before { background: #0091d5; }
.csxr-table .performance-indicator.performance-minimal {
    background: #fff2db; color: #c47e00;
}
.csxr-table .performance-indicator.performance-minimal::before { background: #ff9500; }
.csxr-table .performance-indicator.performance-low {
    background: #f0ebf7; color: #6a5499;
}
.csxr-table .performance-indicator.performance-low::before { background: #8e7cc3; }
.csxr-table .performance-indicator.performance-negative {
    background: #fde8e9; color: #c1272d;
}
.csxr-table .performance-indicator.performance-negative::before { background: #e63946; }

/* === Paginación === */
.crypto-pagination.csxr-pagination {
    padding: 14px 22px 18px;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.csxr-pagination .page-nav,
.csxr-pagination .page-number,
.csxr-pagination .page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 0 8px;
    box-sizing: border-box;
}
.csxr-pagination .page-number {
    border: 1px solid #ffe0b2;
    color: #333333;
    transition: all 0.14s ease;
}
.csxr-pagination .page-number:hover {
    background: #fff8e1;
    border-color: #ff9933;
}
.csxr-pagination .page-number.current {
    background: #ff6600;
    color: #ffffff;
    border-color: #ff6600;
}
.csxr-pagination .page-nav {
    border: 1px solid #ffe0b2;
    color: #333333;
    transition: all 0.14s ease;
}
.csxr-pagination .page-nav:hover {
    background: #fff8e1;
    border-color: #ff9933;
}
.csxr-pagination .page-nav.disabled {
    color: #c9c9c9;
    border-color: #f0e6d8;
    cursor: default;
}
.csxr-pagination .page-ellipsis {
    color: #86868b;
    border: none;
}
.csxr-pagination .page-numbers {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* === Footer === */
.crypto-history-footer.csxr-footer {
    padding: 14px 22px 18px;
    background: #fffdf7;
    border-top: 1px solid #fef0d8;
}
.csxr-footer p {
    margin: 0;
    font-size: 11.5px;
    color: #86868b;
    line-height: 1.55;
    text-align: center;
}

/* === Estado vacío === */
.no-results-message.csxr-empty {
    text-align: center;
    padding: 36px 22px;
}
.csxr-empty .no-results-icon {
    width: 44px;
    height: 44px;
    color: #ff6600;
    background: #fef3e6;
    border-radius: 12px;
    padding: 10px;
    box-sizing: border-box;
    margin-bottom: 10px;
}
.csxr-empty h3 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: #333333;
}
.csxr-empty p {
    margin: 0 0 14px;
    font-size: 12.5px;
    color: #86868b;
}
.csxr-empty .filter-button {
    display: inline-flex;
    background: #fffdf7;
    border: 1.5px solid #ffd699;
    color: #333333;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}
.csxr-empty .filter-button:hover {
    background: #fff8e1;
}

/* ============================================================
   === RESPONSIVE MÓVIL - cada fila es una TARJETA apilada ===
   ============================================================
   En móvil Y TABLET (iPad incluido) no hay scroll horizontal.
   Cada fila se convierte en una tarjeta vertical. Se usa
   !important en lo crítico para ganar a reglas legacy sueltas.
   ============================================================ */
@media (max-width: 1024px) {
    .crypto-history-container.csxr-container {
        margin: 20px auto;
    }
    .csxr-header,
    .crypto-history-filters.csxr-filters {
        padding: 14px 16px;
    }
    .crypto-history-body.csxr-body {
        padding: 12px 12px 14px;
    }
    .csxr-title {
        font-size: 18px;
    }

    /* Filtros apilados */
    .csxr-filters .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    .csxr-filters .search-container,
    .csxr-filters .performance-filter,
    .csxr-filters .filter-actions {
        width: 100%;
    }
    .csxr-filters .performance-filter {
        box-sizing: border-box;
    }
    .csxr-filters .filter-actions {
        justify-content: stretch;
    }
    .csxr-filters .filter-button {
        flex: 1;
        justify-content: center;
    }

    /* La tabla deja de ser tabla: lista de tarjetas */
    .csxr-table-wrap {
        overflow-x: visible !important;
    }
    .csxr-table {
        min-width: 0 !important;
        width: 100% !important;
        display: block !important;
        border-collapse: separate !important;
    }
    .csxr-table thead {
        display: none !important;
    }
    .csxr-table tbody {
        display: block !important;
    }

    /* Cada fila = una tarjeta */
    .csxr-table tbody tr.csxr-row {
        display: block !important;
        float: none !important;
        width: auto !important;
        background: #ffffff !important;
        border: 1px solid #ffe8c4 !important;
        border-radius: 12px !important;
        margin: 0 0 12px 0 !important;
        padding: 6px 14px 6px 18px !important;
        position: relative !important;
        overflow: hidden !important;
        box-shadow: 0 2px 8px rgba(255, 153, 51, 0.06) !important;
    }
    .csxr-table tbody tr.csxr-row:last-child {
        margin-bottom: 0 !important;
    }
    .csxr-table tbody tr.csxr-row::after {
        content: none !important;
    }

    /* Franja de acento lateral en la tarjeta */
    .csxr-table tbody tr.csxr-row::before {
        content: "" !important;
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 5px !important;
        background: #c9c9c9 !important;
        transform: none !important;
    }
    .csxr-table tbody tr.csxr-perf-excellent::before { background: #00a651 !important; }
    .csxr-table tbody tr.csxr-perf-good::before      { background: #0091d5 !important; }
    .csxr-table tbody tr.csxr-perf-minimal::before   { background: #ff9500 !important; }
    .csxr-table tbody tr.csxr-perf-low::before       { background: #8e7cc3 !important; }
    .csxr-table tbody tr.csxr-perf-negative::before  { background: #e63946 !important; }

    /* Cada celda = una fila clave-valor en columna */
    .csxr-table tbody td {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 16px !important;
        width: auto !important;
        float: none !important;
        clear: none !important;
        margin: 0 !important;
        padding: 10px 0 !important;
        border: none !important;
        border-bottom: 1px solid #f5eee0 !important;
        text-align: right !important;
        font-size: 13px !important;
        color: #333333 !important;
        position: static !important;
        white-space: normal !important;
    }
    .csxr-table tbody td:last-child {
        border-bottom: none !important;
    }

    /* La etiqueta: se genera desde data-label, en flujo normal (NO absolute) */
    .csxr-table tbody td::before {
        content: attr(data-label) !important;
        position: static !important;
        transform: none !important;
        top: auto !important;
        left: auto !important;
        width: auto !important;
        max-width: 48% !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        color: #86868b !important;
        text-transform: uppercase !important;
        letter-spacing: 0.3px !important;
        text-align: left !important;
        flex-shrink: 0 !important;
        white-space: normal !important;
        line-height: 1.35 !important;
    }
    /* El valor de la celda: alineado a la derecha, no se encima */
    .csxr-table tbody td > * {
        text-align: right !important;
    }

    /* Celda del acento lateral (date-remove-col): su ::before es
       la etiqueta normal en móvil, NO la franja (la franja ya está
       en la tarjeta). */
    .csxr-table tbody td.date-remove-col {
        padding-left: 0 !important;
        position: static !important;
    }
    .csxr-table tbody td.date-remove-col::before {
        content: attr(data-label) !important;
        position: static !important;
        width: auto !important;
        max-width: 48% !important;
        background: none !important;
        transform: none !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        color: #86868b !important;
        text-transform: uppercase !important;
        text-align: left !important;
    }

    /* La moneda destacada arriba de la tarjeta */
    .csxr-table tbody td.coin-col {
        border-bottom: 2px solid #fef0d8 !important;
        padding-top: 4px !important;
    }
    .csxr-table tbody td.coin-col .coin-symbol {
        font-size: 16px !important;
    }

    /* Badge de rendimiento */
    .csxr-table tbody td.performance-col {
        text-align: right !important;
    }

    /* Paginación y footer */
    .crypto-pagination.csxr-pagination,
    .crypto-history-footer.csxr-footer {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* === FIN MONEDAS ELIMINADAS === */

