/* ============================================================
   WP TRADING VIEW EXP1 - ESTILOS
   ============================================================ */

/* Contenedor principal */
#wptv-exp1-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f7fb;
    border-radius: 12px;
}

/* ============================================================
   HEADER Y ESTADÍSTICAS - AZUL MARINO SIN GRADIENTE
   ============================================================ */
.wptv-header {
    background: #0a1628;
    border-radius: 12px;
    padding: 24px 30px;
    margin-bottom: 24px;
    color: #fff;
}

.wptv-header-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.wptv-header-title h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.wptv-badge {
    background: #f7931a;
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.wptv-stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.wptv-stat-item {
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 12px 16px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.2s;
}

.wptv-stat-item:hover {
    background: rgba(255,255,255,0.15);
}

.stat-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
}

.wptv-stat-item.total .stat-value { color: #a8b5c5; }
.wptv-stat-item.pending .stat-value { color: #ffd93d; }
.wptv-stat-item.in-progress .stat-value { color: #6bcbff; }
.wptv-stat-item.win .stat-value { color: #6fcf97; }
.wptv-stat-item.loss .stat-value { color: #eb5757; }
.wptv-stat-item.cancelled .stat-value { color: #888; }

/* ============================================================
   FILTROS
   ============================================================ */
.wptv-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    align-items: center;
}

.wptv-filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wptv-filter-group label {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.wptv-filter-group select,
.wptv-filter-group input {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fafafa;
    min-width: 130px;
}

.wptv-filter-group input {
    min-width: 180px;
}

.wptv-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.wptv-btn-refresh {
    background: #2d9cdb;
    color: #fff;
    margin-left: auto;
}

.wptv-btn-refresh:hover {
    background: #1a7ab3;
}

/* ============================================================
   GRID DE CARDS
   ============================================================ */
.wptv-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

/* ============================================================
   CARD INDIVIDUAL
   ============================================================ */
.wptv-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border-left: 4px solid #ddd;
}

.wptv-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}

/* Estados - Borde izquierdo */
.wptv-card.pending { border-left-color: #ffd93d; }
.wptv-card.in_progress { border-left-color: #6bcbff; }
.wptv-card.win { border-left-color: #6fcf97; }
.wptv-card.loss { border-left-color: #eb5757; }
.wptv-card.cancelled { border-left-color: #888; }

.wptv-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #f0f0f0;
}

.wptv-card-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wptv-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2d9cdb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.wptv-username {
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

.wptv-status-badge {
    font-size: 11px;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}

.wptv-status-badge.status-pending { background: #ffd93d; color: #6b5900; }
.wptv-status-badge.status-in_progress { background: #6bcbff; color: #003d66; }
.wptv-status-badge.status-win { background: #6fcf97; color: #004d2e; }
.wptv-status-badge.status-loss { background: #eb5757; color: #fff; }
.wptv-status-badge.status-cancelled { background: #e0e0e0; color: #555; }

.wptv-card-body {
    padding: 14px 16px;
}

.wptv-card-asset {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.wptv-asset-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
}

.wptv-asset-icon-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #e8ecf1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: #555;
}

.wptv-asset-name {
    font-size: 16px;
    font-weight: 700;
    color: #222;
}

.wptv-asset-type {
    font-size: 12px;
    color: #888;
    display: block;
}

/* Nombre de la apuesta */
.wptv-bet-name {
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 12px;
    border-left: 3px solid #2d9cdb;
}

.wptv-bet-label {
    font-weight: 600;
    color: #555;
}

.wptv-bet-text {
    color: #333;
    font-weight: 500;
}

/* Cuota grande y llamativa */
.wptv-card-trade {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #f0f4ff;
    border-radius: 10px;
    border: 1px solid #d6e4ff;
}

.wptv-trade-type {
    font-weight: 700;
    font-size: 14px;
}

.wptv-trade-type.long { color: #6fcf97; }
.wptv-trade-type.short { color: #eb5757; }

.wptv-trade-odds-large {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1a1a2e;
    padding: 4px 16px 4px 12px;
    border-radius: 20px;
    color: #fff;
}

.wptv-odds-label {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.6;
    letter-spacing: 0.5px;
}

.wptv-odds-value-large {
    font-size: 24px;
    font-weight: 800;
    color: #ffd93d;
}

.wptv-favorite-badge {
    font-size: 14px;
}

.wptv-card-prices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
}

.wptv-price-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 2px 0;
}

.wptv-price-row.highlight {
    background: #f0f7ff;
    border-radius: 4px;
    padding: 2px 8px;
    margin: 2px -8px;
}

.wptv-price-label {
    color: #888;
    font-size: 11px;
}

.wptv-price-value {
    font-weight: 600;
    color: #222;
    font-size: 12px;
}

/* Progress Bar */
.wptv-progress-bar {
    margin-top: 10px;
    height: 6px;
    background: #e8ecf1;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.wptv-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6bcbff, #2d9cdb);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.wptv-progress-text {
    font-size: 10px;
    color: #888;
    float: right;
    margin-top: 2px;
}

.wptv-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px 14px;
    border-top: 1px solid #f0f0f0;
    background: #fafbfc;
}

.wptv-card-date {
    font-size: 12px;
    color: #999;
}

.wptv-btn-detail {
    background: transparent;
    color: #2d9cdb;
    padding: 4px 14px;
    border: 1px solid #2d9cdb;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.wptv-btn-detail:hover {
    background: #2d9cdb;
    color: #fff;
}

/* ============================================================
   PAGINACIÓN
   ============================================================ */
.wptv-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
}

.wptv-btn-prev,
.wptv-btn-next {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 600;
}

.wptv-btn-prev:hover,
.wptv-btn-next:hover {
    background: #f0f0f0;
}

.wptv-btn-prev:disabled,
.wptv-btn-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.wptv-page-info {
    font-size: 14px;
    color: #555;
}

/* ============================================================
   MODAL
   ============================================================ */
.wptv-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.55);
    animation: wptvFadeIn 0.25s ease;
}

.wptv-modal-content {
    background: #fff;
    margin: 4% auto;
    padding: 0;
    border-radius: 14px;
    max-width: 620px;
    width: 92%;
    box-shadow: 0 12px 48px rgba(0,0,0,0.3);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.wptv-modal-close {
    position: absolute;
    right: 16px;
    top: 12px;
    font-size: 28px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.wptv-modal-close:hover {
    color: #222;
}

@keyframes wptvFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* ============================================================
   MODAL - DETALLE
   ============================================================ */
.wptv-modal-detail {
    padding: 28px 32px 24px;
}

.wptv-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.wptv-modal-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wptv-modal-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #2d9cdb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
}

.wptv-modal-user h3 {
    margin: 0;
    font-size: 18px;
    color: #222;
}

.wptv-modal-email {
    font-size: 13px;
    color: #888;
}

.wptv-modal-asset {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 16px;
}

.wptv-modal-asset-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: contain;
}

.wptv-modal-asset h4 {
    margin: 0;
    font-size: 18px;
    color: #222;
}

.wptv-modal-asset span {
    font-size: 13px;
    color: #888;
}

/* Modal - Apuesta */
.wptv-modal-bet {
    background: #f0f7ff;
    padding: 12px 16px;
    border-radius: 10px;
    border-left: 4px solid #2d9cdb;
    margin-bottom: 16px;
}

.wptv-modal-bet-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 4px;
}

.wptv-modal-bet-text {
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

.wptv-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.wptv-modal-item {
    background: #f8f9fa;
    padding: 10px 14px;
    border-radius: 8px;
}

.wptv-modal-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #999;
    margin-bottom: 2px;
}

.wptv-modal-value {
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.wptv-modal-value.long { color: #6fcf97; }
.wptv-modal-value.short { color: #eb5757; }

.wptv-modal-prices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 10px;
}

.wptv-modal-price-item.highlight {
    background: #e8f4fd;
    border-radius: 6px;
    padding: 6px 10px;
    grid-column: span 2;
}

.wptv-modal-price-item .wptv-modal-label {
    font-size: 11px;
    color: #888;
}

.wptv-modal-price-item .wptv-modal-value {
    font-size: 16px;
    font-weight: 700;
    color: #222;
}

.wptv-modal-price-item.highlight .wptv-modal-value {
    color: #2d9cdb;
}

.wptv-modal-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: #f8f9fa;
    border-radius: 10px;
}

.wptv-modal-date-item .wptv-modal-label {
    font-size: 11px;
    color: #888;
}

.wptv-modal-date-item .wptv-modal-value {
    font-size: 14px;
    font-weight: 500;
    color: #444;
}

.wptv-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.wptv-modal-updated {
    font-size: 12px;
    color: #999;
}

.wptv-btn-close-modal {
    background: #2d9cdb;
    color: #fff;
    padding: 8px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.wptv-btn-close-modal:hover {
    background: #1a7ab3;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
    .wptv-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .wptv-grid {
        grid-template-columns: 1fr;
    }

    .wptv-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .wptv-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .wptv-btn-refresh {
        margin-left: 0;
    }

    .wptv-modal-content {
        margin: 10% auto;
        width: 96%;
    }

    .wptv-modal-detail {
        padding: 20px;
    }

    .wptv-modal-grid,
    .wptv-modal-prices,
    .wptv-modal-dates {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .wptv-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wptv-header-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* No results */
.wptv-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
    grid-column: 1 / -1;
}

/* Loading */
.wptv-loading {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 16px;
    grid-column: 1 / -1;
}

/* Error */
.wptv-error {
    text-align: center;
    padding: 60px 20px;
    color: #eb5757;
    font-size: 16px;
    grid-column: 1 / -1;
}