/* =========================================
   HISTÓRICO DE OPERACIONES - ENCABEZADO
========================================= */

.at-historico-trimestre {
    margin: 34px 0 12px 0;
    font-size: 35px;
    font-weight: 700;
    color: #ffffff;
}

.at-historico-resumen {
    margin: 0 0 12px 0;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.05);
    color: #f3f6fb;
    font-size: 15px;
    font-weight: 600;
}

/* =========================================
   TABLA HISTÓRICO OPERACIONES
========================================= */

.at-historico-tabla {
    width: 100%;
    border-collapse: collapse;
	margin-bottom: 18px;
}

/* Header */
.at-historico-tabla thead th {
    background: rgba(255,255,255,0.05);
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
}

/* Hover */
.at-historico-tabla tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

/* Alternancia */
.at-historico-tabla tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.015);
}

/* Colores resultado */
.at-pos {
    color: #3ecf8e;
    font-weight: 600;
}

.at-neg {
    color: #ff5c5c;
    font-weight: 600;
}

/* =========================================
   TABLA RESUMEN POR TRIMESTRES
========================================= */

.at-resumen-tabla {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.at-resumen-tabla thead th {
    background: rgba(255,255,255,0.06);
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.2px;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 12px 14px;
    text-align: center;
}

.at-resumen-tabla tbody td {
    border: 1px solid rgba(255,255,255,0.12);
    padding: 14px 16px;
    font-size: 15px;
    vertical-align: middle;
    text-align: right;
}

.at-resumen-tabla tbody td:first-child {
    text-align: left;
}
.at-resumen-tabla tbody td {
    font-weight: 400;
}
.at-resumen-tabla tbody td:first-child {
    font-weight: 600;
}

.at-resumen-tabla tbody tr:hover {
    background: rgba(255,255,255,0.04);
    transition: background 0.2s ease;
}

.at-trimestre-pos {
    background: rgba(62,207,142,0.04);
}

.at-trimestre-neg {
    background: rgba(255,92,92,0.04);
}

.at-trimestre-neutro {
    background: rgba(255,255,255,0.02);
}

/* =========================================
   RESUMEN GLOBAL DEL HISTÓRICO
========================================= */

.at-resumen-global {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0 0 24px 0;
    border: 1px solid rgba(255,255,255,0.16);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.01) 100%);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.02) inset,
        0 10px 28px rgba(0,0,0,0.18);
    overflow: hidden;
}

.at-resumen-global-col {
    width: 50%;
    vertical-align: top;
    padding: 16px 20px 24px 20px;
}

.at-resumen-global-col-right {
    border-left: 1px solid rgba(255,255,255,0.14);
    background: linear-gradient(180deg, rgba(255,255,255,0.015) 0%, rgba(255,255,255,0.005) 100%);
}

.at-resumen-global strong {
    color: #ffffff;
    font-weight: 700;
}

/* Primera línea de cada columna */
.at-resumen-global-col strong:first-child {
    display: block;
    font-size: 18px;
    line-height: 1.6;
    letter-spacing: -0.3px;
    color: #ffffff;
    border-bottom: 1px dashed rgba(255,255,255,0.25);
    padding-bottom: 6px;
    margin-bottom: 6px;
}

/* Reduce el espacio extra de los <br><br> tras el título */
.at-resumen-global-col strong:first-child + br {
    display: none;
}

/* Texto general */
.at-resumen-global-col {
    font-size: 15px;
    line-height: 1.45;
    color: #e8eef7;
}

/* Separación visual entre bloques internos */
.at-resumen-global-col br + br {
    line-height: 1.9;
}

/* Valores destacados ya existentes */
.at-resumen-global .at-pos {
    color: #3ecf8e;
    font-weight: 700;
}

.at-resumen-global .at-neg {
    color: #ff5c5c;
    font-weight: 700;
}

/* Línea final explicativa */
.at-resumen-global-col-right {
    position: relative;
}

.at-resumen-global-col-right::after {
    content: "";
    display: block;
    margin-top: 16px;
    width: 72px;
    height: 1px;
    background: rgba(255,255,255,0.10);
}

/* SOLO MÓVIL */
@media (max-width: 768px) {
    
    .at-mb-mobile {
        margin-bottom: 4px;
    }

}

@media (max-width: 768px) {

    /* Contenedor principal */
    .at-equity-mobile-fix {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Columnas */
    .at-equity-mobile-fix > div {
        width: 100% !important;
        border-left: none !important;
        padding: 12px 15px !important;
    }

}
@media (max-width: 768px) {

    .at-equity-mobile-fix > div:last-child {
        padding-bottom: 18px !important;
    }

}

@media (max-width: 768px) {

    /* Convertir tabla en bloque vertical */
    .at-resumen-global tr {
        display: flex;
        flex-direction: column;
    }

    /* Columnas → ancho completo */
    .at-resumen-global-col {
        width: 100% !important;
        display: block;
    }

    /* Quitar línea vertical */
    .at-resumen-global-col-right {
        border-left: none !important;
    }

    /* Separación entre columnas (clave) */
	.at-resumen-global-col-right {
		border-top: 1px dashed rgba(255,255,255,0.22);
		margin-top: 0;
		padding-top: 10px;
	}

    /* Separación ligera entre líneas */
    .at-resumen-global-col br {
        line-height: 1.8;
    }

}

@media (max-width: 768px) {

    /* Eliminar bordes internos duplicados */
    .at-resumen-global tr {
        border: none !important;
    }

    /* Quitar cualquier borde que venga heredado de las celdas */
    .at-resumen-global-col {
        border: none !important;
    }

    /* Mantener SOLO la separación que queremos */
    /* Limpiar bordes problemáticos */
    .at-resumen-global tr {
        border: none !important;
    }

    .at-resumen-global-col {
        border: none !important;
    }

    /* Crear separación limpia */
    .at-resumen-global-col-right {
        position: relative;
        padding-top: 14px;
        margin-top: 6px;
    }

    .at-resumen-global-col-right::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        border-top: 1px dashed rgba(255,255,255,0.22);
    }

}

@media (max-width: 768px) {

    .at-resumen-scroll {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .at-resumen-scroll .at-resumen-tabla {
        min-width: 760px;
    }
	.at-resumen-tabla th,
    .at-resumen-tabla td {
        white-space: nowrap;
        padding: 10px 12px;
    }

}

@media (max-width: 768px) {

    .at-historico-scroll {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .at-historico-scroll table {
        min-width: 900px;
    }

    .at-historico-scroll th,
    .at-historico-scroll td {
        white-space: nowrap;
    }

}

.at-resumen-tabla thead th {
    font-size: 14.5px; /* sube 1-2px desde lo que tienes */
    background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.06) 100%);
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.08);
    border-bottom: 1px dashed rgba(255,255,255,0.22);
}

.at-resultado {
    font-weight: 900 !important;
}

.at-rentabilidad {
    font-weight: 400 !important;
}