/* =============================================== */
/* HISTORIAL DE COMISIONES - GAINOVO DARK MODERN    */
/* Basado en gainovo-pay.css v7.2 - FULL RESPONSIVE */
/* =============================================== */

:root {
    /* Colores principales - DARK MODERN */
    --ghc-primary: #0F52AA;
    --ghc-primary-light: #167BFF;
    --ghc-primary-dark: #0a1a3a;
    --ghc-text: #ffffff;
    --ghc-text-light: rgba(255, 255, 255, 0.75);
    --ghc-text-dim: rgba(255, 255, 255, 0.5);
    --ghc-border: rgba(255, 255, 255, 0.12);
    --ghc-border-hover: rgba(255, 255, 255, 0.25);
    --ghc-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    --ghc-shadow-hover: 0 24px 48px rgba(0, 0, 0, 0.5);
    --ghc-radius: 20px;
    --ghc-card-bg: linear-gradient(145deg, #0F2B5C, #0a1a3a);
    
    /* Estados */
    --ghc-success: #28a745;
    --ghc-warning: #ffc107;
    --ghc-error: #dc3545;
    --ghc-info: #167BFF;
    
    /* Colores para tipos */
    --ghc-inversion: #167BFF;
    --ghc-bono-arg: #28a745;
    --ghc-bono-usdc: #0ea5e9;
}

/* ==================== */
/* ESTRUCTURA BASE - FULL WIDTH EN ESCRITORIO */
/* ==================== */
.ghcomisiones-container {
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    isolation: isolate;
    margin: 20px auto;
}

.ghcomisiones-card {
    width: 100%;
    max-width: 1200px; /* Amplio para escritorio */
    margin: 0 auto;
    padding: 2rem 2rem;
    background: var(--ghc-card-bg);
    border-radius: var(--ghc-radius);
    box-shadow: var(--ghc-shadow);
    color: var(--ghc-text);
    position: relative;
    border: 1px solid var(--ghc-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.ghcomisiones-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.ghcomisiones-card:hover {
    border-color: var(--ghc-border-hover);
    box-shadow: var(--ghc-shadow-hover);
    transform: translateY(-2px);
}

/* ==================== */
/* TÍTULO */
/* ==================== */
.ghcomisiones-title {
    font-size: 1.5rem;
    margin: 0 0 1.5rem 0;
    text-align: center;
    color: var(--ghc-text) !important;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--ghc-border);
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0.02em;
}

/* ==================== */
/* TOTALES - GRID RESPONSIVO */
/* ==================== */
.ghcomisiones-totales {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columnas en escritorio */
    gap: 1rem;
    margin-bottom: 2rem;
}

.ghcomisiones-total {
    padding: 1.25rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--ghc-border);
    transition: all 0.3s ease;
}

.ghcomisiones-total:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--ghc-border-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.ghcomisiones-total h3 {
    font-size: 0.75rem;
    color: var(--ghc-text-dim) !important;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ghcomisiones-total-monto {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ghc-primary-light);
    margin: 0;
    line-height: 1.2;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ghcomisiones-total-monto .moneda-simbolo {
    font-size: 0.65rem;
    color: var(--ghc-text-dim);
    font-weight: 500;
}

/* ==================== */
/* TABLA - FULL RESPONSIVE */
/* ==================== */
.ghcomisiones-tabla-container {
    width: 100%;
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--ghc-border);
}

.ghcomisiones-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-width: 600px; /* Solo para evitar que se rompa en pantallas muy pequeñas */
}

.ghcomisiones-tabla th {
    background: rgba(15, 82, 170, 0.3);
    color: var(--ghc-text);
    font-weight: 600;
    padding: 1rem 1.2rem;
    text-align: left;
    border-bottom: 1px solid var(--ghc-border);
    position: sticky;
    top: 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.ghcomisiones-tabla td {
    padding: 1rem 1.2rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.ghcomisiones-tabla tr:last-child td {
    border-bottom: none;
}

.ghcomisiones-tabla tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}

/* ==================== */
/* ELEMENTOS DE TABLA */
/* ==================== */
.ghcomisiones-fecha {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.ghcomisiones-fecha-dia {
    font-weight: 500;
    color: var(--ghc-text);
    font-size: 0.85rem;
}

.ghcomisiones-fecha-hora {
    font-size: 0.7rem;
    color: var(--ghc-text-dim);
}

.ghcomisiones-tipo-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
}

.ghcomisiones-tipo {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.ghcomisiones-tipo-inversion {
    background: rgba(22, 123, 255, 0.15);
    color: var(--ghc-inversion);
    border: 1px solid rgba(22, 123, 255, 0.2);
}

.ghcomisiones-tipo-bono-arg {
    background: rgba(40, 167, 69, 0.15);
    color: var(--ghc-bono-arg);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.ghcomisiones-tipo-bono-usdc {
    background: rgba(14, 165, 233, 0.15);
    color: var(--ghc-bono-usdc);
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.ghcomisiones-nivel {
    font-size: 0.65rem;
    color: var(--ghc-text-dim);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding-left: 0.2rem;
}

.ghcomisiones-monto-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ghcomisiones-monto {
    font-weight: 600;
    color: var(--ghc-primary-light);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95rem;
}

.ghcomisiones-moneda {
    font-size: 0.65rem;
    color: var(--ghc-text-dim);
    background: rgba(255, 255, 255, 0.06);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
}

/* ==================== */
/* ALERTA */
/* ==================== */
.ghcomisiones-alerta {
    background: rgba(255, 193, 7, 0.12);
    color: var(--ghc-warning);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 193, 7, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1200px;
    margin: 20px auto;
}

.ghcomisiones-alerta a {
    color: var(--ghc-primary-light);
    text-decoration: none;
    font-weight: 600;
}

.ghcomisiones-alerta a:hover {
    text-decoration: underline;
}

/* ==================== */
/* RESPONSIVE BREAKPOINTS */
/* ==================== */

/* === TABLET / ESCRITORIO PEQUEÑO === */
@media (max-width: 1024px) {
    .ghcomisiones-card {
        padding: 1.5rem 1.5rem;
    }
    
    .ghcomisiones-totales {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .ghcomisiones-total-monto {
        font-size: 1.4rem;
    }
}

/* === TABLET VERTICAL / MÓVIL GRANDE === */
@media (max-width: 768px) {
    .ghcomisiones-container {
        padding: 0 12px;
    }
    
    .ghcomisiones-card {
        padding: 1.25rem 1rem;
        border-radius: 16px;
    }
    
    .ghcomisiones-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .ghcomisiones-totales {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
        margin-bottom: 1.25rem;
    }
    
    .ghcomisiones-total {
        padding: 0.9rem 0.6rem;
    }
    
    .ghcomisiones-total h3 {
        font-size: 0.65rem;
    }
    
    .ghcomisiones-total-monto {
        font-size: 1.2rem;
    }
    
    .ghcomisiones-total-monto .moneda-simbolo {
        font-size: 0.55rem;
    }
    
    /* Tabla en formato móvil (stack) */
    .ghcomisiones-tabla {
        min-width: 100%;
        display: block;
    }
    
    .ghcomisiones-tabla thead {
        display: none;
    }
    
    .ghcomisiones-tabla tbody {
        display: block;
    }
    
    .ghcomisiones-tabla tr {
        display: block;
        margin-bottom: 0.75rem;
        border: 1px solid var(--ghc-border);
        border-radius: 10px;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.03);
    }
    
    .ghcomisiones-tabla td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.6rem 0.8rem;
        width: 100%;
        box-sizing: border-box;
        text-align: right;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        font-size: 0.85rem;
    }
    
    .ghcomisiones-tabla td:last-child {
        border-bottom: none;
    }
    
    .ghcomisiones-tabla td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--ghc-text-dim);
        margin-right: auto;
        padding-right: 1rem;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        flex-shrink: 0;
    }
    
    .ghcomisiones-fecha {
        flex-direction: row;
        justify-content: flex-end;
        gap: 0.5rem;
        align-items: center;
    }
    
    .ghcomisiones-fecha-dia {
        font-size: 0.8rem;
    }
    
    .ghcomisiones-fecha-hora {
        font-size: 0.65rem;
    }
    
    .ghcomisiones-tipo-container {
        align-items: flex-end;
    }
    
    .ghcomisiones-tipo {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .ghcomisiones-monto-container {
        justify-content: flex-end;
    }
    
    .ghcomisiones-monto {
        font-size: 0.85rem;
    }
}

/* === MÓVIL PEQUEÑO === */
@media (max-width: 480px) {
    .ghcomisiones-container {
        padding: 0 8px;
    }
    
    .ghcomisiones-card {
        padding: 1rem 0.75rem;
        border-radius: 14px;
    }
    
    .ghcomisiones-totales {
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
    }
    
    .ghcomisiones-total {
        padding: 0.6rem 0.4rem;
        border-radius: 8px;
    }
    
    .ghcomisiones-total h3 {
        font-size: 0.55rem;
        letter-spacing: 0.02em;
    }
    
    .ghcomisiones-total-monto {
        font-size: 1rem;
    }
    
    .ghcomisiones-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .ghcomisiones-tabla td {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.2rem;
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .ghcomisiones-tabla td::before {
        align-self: flex-start;
        margin-bottom: 0.1rem;
        font-size: 0.6rem;
        padding-right: 0;
    }
    
    .ghcomisiones-fecha {
        flex-direction: column;
        align-items: flex-end;
        gap: 0;
    }
    
    .ghcomisiones-fecha-dia {
        font-size: 0.75rem;
    }
    
    .ghcomisiones-fecha-hora {
        font-size: 0.6rem;
    }
    
    .ghcomisiones-tipo {
        font-size: 0.6rem;
        padding: 0.15rem 0.5rem;
    }
    
    .ghcomisiones-nivel {
        font-size: 0.55rem;
    }
    
    .ghcomisiones-monto {
        font-size: 0.8rem;
    }
    
    .ghcomisiones-moneda {
        font-size: 0.55rem;
        padding: 0.1rem 0.4rem;
    }
    
    .ghcomisiones-alerta {
        padding: 1rem 1rem;
        font-size: 0.85rem;
        margin: 10px auto;
    }
    
    .ghcomisiones-tabla-container {
        margin: 0.75rem 0;
        border-radius: 8px;
    }
}

/* === ESCRITORIO GRANDE (>= 1200px) === */
@media (min-width: 1200px) {
    .ghcomisiones-totales {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }
    
    .ghcomisiones-total {
        padding: 1.5rem 1.25rem;
    }
    
    .ghcomisiones-total-monto {
        font-size: 1.8rem;
    }
    
    .ghcomisiones-tabla th {
        padding: 1.25rem 1.5rem;
        font-size: 0.8rem;
    }
    
    .ghcomisiones-tabla td {
        padding: 1.25rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* ==================== */
/* ANIMACIONES */
/* ==================== */
.ghcomisiones-total {
    animation: ghcFadeIn 0.4s ease forwards;
    opacity: 0;
}

.ghcomisiones-total:nth-child(1) { animation-delay: 0.05s; }
.ghcomisiones-total:nth-child(2) { animation-delay: 0.10s; }
.ghcomisiones-total:nth-child(3) { animation-delay: 0.15s; }
.ghcomisiones-total:nth-child(4) { animation-delay: 0.20s; }

@keyframes ghcFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ghcomisiones-tabla tbody tr {
    animation: ghcFadeIn 0.3s ease forwards;
    opacity: 0;
}

.ghcomisiones-tabla tbody tr:nth-child(1) { animation-delay: 0.05s; }
.ghcomisiones-tabla tbody tr:nth-child(2) { animation-delay: 0.08s; }
.ghcomisiones-tabla tbody tr:nth-child(3) { animation-delay: 0.11s; }
.ghcomisiones-tabla tbody tr:nth-child(4) { animation-delay: 0.14s; }
.ghcomisiones-tabla tbody tr:nth-child(5) { animation-delay: 0.17s; }
.ghcomisiones-tabla tbody tr:nth-child(6) { animation-delay: 0.20s; }
.ghcomisiones-tabla tbody tr:nth-child(7) { animation-delay: 0.23s; }
.ghcomisiones-tabla tbody tr:nth-child(8) { animation-delay: 0.26s; }
.ghcomisiones-tabla tbody tr:nth-child(9) { animation-delay: 0.29s; }
.ghcomisiones-tabla tbody tr:nth-child(10) { animation-delay: 0.32s; }