
/* =========================================
   PREPARATUENSAYO - MI PROGRESO
   Integración con el diseño de Mi cuenta
========================================= */

.progress-account-page {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 45px 0 80px;
}

/* =========================================
   ENCABEZADO
========================================= */

.progress-account-page .account-heading {
    margin-bottom: 32px;
}

.progress-account-page .account-heading h1 {
    margin-bottom: 10px;
}

.progress-account-page .account-heading p {
    max-width: 650px;
    line-height: 1.7;
}

.progress-account-page .account-primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 12px 19px;
    border: 0;
    border-radius: 9px;
    background: #1D4ED8;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.progress-account-page .account-primary-button:hover {
    background: #12316B;
    transform: translateY(-1px);
}

.progress-account-page .account-primary-button i {
    width: 17px;
    height: 17px;
}

/* =========================================
   ESTRUCTURA PRINCIPAL
========================================= */

.progress-account-page .account-layout {
    display: grid;
    grid-template-columns: 265px minmax(0, 1fr);
    align-items: start;
    gap: 25px;
}

/* =========================================
   BARRA LATERAL
========================================= */

.progress-account-page .account-sidebar {
    position: sticky;
    top: 25px;
    min-width: 0;
}

.progress-account-page .account-navigation {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-account-page .account-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 45px;
    padding: 11px 13px;
    border-radius: 9px;
    color: #64748B;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s, color .2s;
}

.progress-account-page .account-nav-link i {
    width: 18px;
    height: 18px;
}

.progress-account-page .account-nav-link:hover {
    background: #F1F5F9;
    color: #12316B;
}

.progress-account-page .account-nav-link.active {
    background: #EFF6FF;
    color: #1D4ED8;
    font-weight: 700;
}

/* =========================================
   CONTENIDO
========================================= */

.progress-account-page .account-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.progress-account-page .account-card {
    min-width: 0;
    padding: 25px;
    overflow: hidden;
}

/* =========================================
   ENCABEZADOS DE TARJETAS
========================================= */

.progress-account-page .card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 23px;
}

.progress-account-page .card-heading h2 {
    margin: 5px 0 7px;
    color: #172033;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
}

.progress-account-page .card-heading p {
    margin: 0;
    color: #64748B;
    font-size: 13px;
    line-height: 1.6;
}

.progress-account-page .section-label {
    color: #1D4ED8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.1px;
}

.progress-account-page .card-heading-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    border-radius: 12px;
    background: #EFF6FF;
    color: #1D4ED8;
}

.progress-account-page .card-heading-icon i {
    width: 21px;
    height: 21px;
}

/* =========================================
   BIENVENIDA
========================================= */

.progress-account-page .progress-welcome {
    background: linear-gradient(120deg, #FFFFFF 0%, #F0F6FF 100%);
}

.progress-account-page .progress-welcome .card-heading {
    margin-bottom: 0;
}

.progress-account-page .progress-welcome .card-heading h2 {
    font-size: 23px;
}

/* =========================================
   ESTADÍSTICAS
========================================= */

.progress-account-page .statistics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.progress-account-page .stat-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 18px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background: #FFFFFF;
    transition: border-color .2s, transform .2s;
}

.progress-account-page .stat-card:hover {
    border-color: #BFDBFE;
    transform: translateY(-2px);
}

.progress-account-page .stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-bottom: 15px;
    border-radius: 10px;
}

.progress-account-page .stat-icon i {
    width: 19px;
    height: 19px;
}

.progress-account-page .stat-icon.blue {
    background: #EFF6FF;
    color: #2563EB;
}

.progress-account-page .stat-icon.purple {
    background: #F5F3FF;
    color: #7C3AED;
}

.progress-account-page .stat-icon.green {
    background: #ECFDF5;
    color: #059669;
}

.progress-account-page .stat-icon.orange {
    background: #FFF7ED;
    color: #EA580C;
}

.progress-account-page .stat-label {
    margin-bottom: 7px;
    color: #64748B;
    font-size: 12px;
    font-weight: 600;
}

.progress-account-page .stat-card strong {
    color: #172033;
    font-size: 27px;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.progress-account-page .stat-card small {
    margin-top: 7px;
    color: #94A3B8;
    font-size: 11px;
    line-height: 1.5;
}

/* =========================================
   RENDIMIENTO
========================================= */

.progress-account-page .performance-card {
    display: flex;
    flex-direction: column;
    gap: 23px;
}

.progress-account-page .performance-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress-account-page .performance-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    color: #475569;
    font-size: 13px;
}

.progress-account-page .performance-heading > span {
    display: flex;
    align-items: center;
    gap: 9px;
}

.progress-account-page .performance-heading strong {
    color: #172033;
    font-size: 14px;
    font-weight: 700;
}

.progress-account-page .legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.progress-account-page .correct-dot {
    background: #10B981;
}

.progress-account-page .incorrect-dot {
    background: #EF4444;
}

.progress-account-page .unanswered-dot {
    background: #94A3B8;
}

.progress-account-page .performance-track {
    width: 100%;
    height: 9px;
    overflow: hidden;
    border-radius: 20px;
    background: #F1F5F9;
}

.progress-account-page .performance-fill {
    height: 100%;
    border-radius: inherit;
    transition: width .6s ease;
}

.progress-account-page .correct-fill {
    background: #10B981;
}

.progress-account-page .incorrect-fill {
    background: #EF4444;
}

.progress-account-page .unanswered-fill {
    background: #94A3B8;
}

/* =========================================
   HISTORIAL
========================================= */

.progress-account-page .history-heading {
    align-items: center;
    flex-wrap: wrap;
}

.progress-account-page .history-filters select {
    min-width: 175px;
    max-width: 100%;
    padding: 10px 34px 10px 12px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    outline: none;
    background: #FFFFFF;
    color: #334155;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

.progress-account-page .history-filters select:focus {
    border-color: #1D4ED8;
    box-shadow: 0 0 0 3px #DBEAFE;
}

.progress-account-page .history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-account-page .history-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 17px;
    border: 1px solid #E2E8F0;
    border-radius: 11px;
    background: #FFFFFF;
    transition: border-color .2s, background .2s;
}

.progress-account-page .history-card:hover {
    border-color: #BFDBFE;
    background: #FAFCFF;
}

.progress-account-page .history-main {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.progress-account-page .history-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #EFF6FF;
    color: #1D4ED8;
}

.progress-account-page .history-icon i {
    width: 19px;
    height: 19px;
}

.progress-account-page .history-info {
    min-width: 0;
}

.progress-account-page .history-info h3 {
    margin: 0 0 5px;
    color: #172033;
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.progress-account-page .history-info p {
    margin: 0;
    color: #94A3B8;
    font-size: 11px;
    line-height: 1.6;
}

.progress-account-page .history-result {
    flex-shrink: 0;
    text-align: right;
}

.progress-account-page .history-result strong {
    display: block;
    color: #1D4ED8;
    font-size: 19px;
    font-weight: 800;
}

.progress-account-page .history-result span {
    display: block;
    margin-top: 4px;
    color: #94A3B8;
    font-size: 10px;
}

.progress-account-page .history-details {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 9px;
}

.progress-account-page .history-detail {
    padding: 5px 8px;
    border-radius: 6px;
    background: #F8FAFC;
    color: #64748B;
    font-size: 10px;
    font-weight: 600;
}

/* =========================================
   ESTADO VACÍO
========================================= */

.progress-account-page .history-empty {
    padding: 35px 20px;
    border: 1px dashed #CBD5E1;
    border-radius: 12px;
    text-align: center;
}

.progress-account-page .history-empty .state-icon {
    margin: 0 auto 14px;
}

.progress-account-page .history-empty h3 {
    margin: 0 0 8px;
    color: #172033;
    font-size: 16px;
}

.progress-account-page .history-empty p {
    max-width: 390px;
    margin: 0 auto 18px;
    color: #64748B;
    font-size: 12px;
    line-height: 1.7;
}

/* =========================================
   ESTADOS DE CARGA Y ERROR
========================================= */

.progress-account-page .progress-state {
    padding: 45px 20px;
    margin-bottom: 25px;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    background: #FFFFFF;
    text-align: center;
}

.progress-account-page .progress-state[hidden],
.progress-account-page [hidden] {
    display: none !important;
}

.progress-account-page .progress-state h2 {
    margin: 16px 0 8px;
    color: #172033;
    font-size: 18px;
}

.progress-account-page .progress-state p {
    margin: 0 auto 17px;
    color: #64748B;
    font-size: 13px;
    line-height: 1.6;
}

.progress-account-page .loading-spinner {
    width: 35px;
    height: 35px;
    margin: 0 auto;
    border: 3px solid #DBEAFE;
    border-top-color: #1D4ED8;
    border-radius: 50%;
    animation: progress-spin .8s linear infinite;
}

@keyframes progress-spin {
    to {
        transform: rotate(360deg);
    }
}

.progress-account-page .state-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto;
    border-radius: 13px;
    background: #EFF6FF;
    color: #1D4ED8;
}

.progress-account-page .state-icon i {
    width: 23px;
    height: 23px;
}

.progress-account-page .error-state .state-icon {
    background: #FEF2F2;
    color: #DC2626;
}

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

@media (max-width: 900px) {
    .progress-account-page .account-layout {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 17px;
    }

    .progress-account-page .account-card {
        padding: 20px;
    }
}

@media (max-width: 700px) {
    .progress-account-page {
        width: calc(100% - 28px);
        padding-top: 30px;
    }

    .progress-account-page .account-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 17px;
    }

    .progress-account-page .account-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .progress-account-page .account-sidebar {
        position: static;
    }

    .progress-account-page .account-navigation {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 5px;
    }

    .progress-account-page .account-nav-link {
        justify-content: center;
        flex-direction: column;
        gap: 6px;
        min-height: 68px;
        padding: 9px 5px;
        font-size: 10px;
        text-align: center;
    }

    .progress-account-page .account-nav-link i {
        width: 19px;
        height: 19px;
    }

    .progress-account-page .statistics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .progress-account-page .history-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .progress-account-page .history-filters,
    .progress-account-page .history-filters select {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .progress-account-page .account-card {
        padding: 16px;
    }

    .progress-account-page .statistics-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .progress-account-page .stat-card {
        padding: 16px;
    }

    .progress-account-page .history-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .progress-account-page .history-result {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        text-align: left;
    }

    .progress-account-page .history-result span {
        margin-top: 0;
    }
}


/* =========================================
   INTEGRACIÓN CON EL NUEVO DISEÑO DE CUENTA
========================================= */

.progress-account-page {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 45px 0 80px;
}

.progress-account-page .account-layout {
    grid-template-columns: 265px minmax(0, 1fr);
    gap: 25px;
}

.progress-account-page .account-sidebar {
    position: sticky;
    top: 25px;
    min-width: 0;
}

.progress-account-page .sidebar-profile {
    min-width: 0;
}

.progress-account-page .profile-summary-info {
    min-width: 0;
}

.progress-account-page .profile-summary-info h2,
.progress-account-page .profile-summary-info span {
    overflow-wrap: anywhere;
}

.progress-account-page .account-content {
    min-width: 0;
}

.progress-account-page .account-card {
    border-radius: 16px;
}

.progress-account-page .progress-welcome {
    border-color: #DBEAFE;
    background: linear-gradient(120deg, #FFFFFF 0%, #F0F6FF 100%);
}

.progress-account-page .stat-card {
    border-radius: 14px;
}

.progress-account-page .history-card {
    border-radius: 13px;
}

@media (max-width: 900px) {
    .progress-account-page .account-layout {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 17px;
    }
}

@media (max-width: 700px) {
    .progress-account-page {
        width: calc(100% - 28px);
        padding-top: 30px;
    }

    .progress-account-page .account-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .progress-account-page .account-sidebar {
        position: static;
    }
}
