/* === NUEVO DISEÑO MODERNO PORTAL ESTUDIANTIL === */

.student-portal-new-wrapper {
    display: grid;
    gap: 28px;
}

.student-hero-banner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
    gap: 24px;
    padding: 40px;
    border-radius: 32px;
    border: 1px solid rgba(231, 223, 209, 0.9);
    box-shadow: 0 18px 45px rgba(38, 52, 56, 0.08);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.16), transparent 24%),
        radial-gradient(circle at bottom right, rgba(202, 103, 2, 0.22), transparent 28%),
        linear-gradient(135deg, #0a4c5b 0%, #0d5e69 52%, #ca6702 120%);
    color: #fff;
    align-items: center;
}

.student-hero-content h1 {
    margin: 0 0 8px;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.student-hero-subheading {
    margin: 0;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

.student-hero-cta {
    margin-top: 24px;
}

.btn-primary-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 28px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    color: #0a4c5b;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary-hero:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.student-hero-profile-widget {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1.8rem;
    font-weight: 800;
    flex-shrink: 0;
}

.profile-info-stack {
    display: grid;
    gap: 12px;
    width: 100%;
}

.profile-info-mini strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1.18rem;
    color: #021d2b;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.profile-info-mini small {
    display: block;
    color: #021d2b;
    font-size: 0.92rem;
    font-weight: 800;
}

.student-hero-meta {
    display: grid;
    gap: 8px;
}

.hero-meta-row {
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 8px;
    align-items: baseline;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.88rem;
}

.hero-meta-row.is-date {
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-meta-row span {
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-meta-row strong {
    font-size: 0.96rem;
    font-weight: 900;
    color: #f6fbff;
    word-break: break-word;
    letter-spacing: -0.01em;
}

/* STATS CARDS */
.student-stats-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 0;
}

.stat-card {
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(231, 223, 209, 0.9);
    box-shadow: 0 10px 28px rgba(38, 52, 56, 0.06);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 45px rgba(38, 52, 56, 0.08);
}

.stat-card-primary {
    background: linear-gradient(135deg, #e0f0ed 0%, #f0fbf9 100%);
}

.stat-card-secondary {
    background: linear-gradient(135deg, #fff7ec 0%, #fffaf5 100%);
}

.stat-card-accent {
    background: linear-gradient(135deg, #fef3e0 0%, #fff9f0 100%);
}

.stat-card-info {
    background: linear-gradient(135deg, #e8f4f8 0%, #f5f9fc 100%);
}

.stat-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.stat-label {
    display: block;
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: #073b4c;
}

/* QUICK ACCESS */
.student-quick-access {
    margin: 0;
}

.section-title {
    margin: 0 0 18px;
    font-size: 1.5rem;
    color: #073b4c;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.quick-link-card {
    padding: 24px;
    border-radius: 24px;
    border: 2px solid rgba(0, 95, 115, 0.1);
    background: linear-gradient(135deg, #e8f4f8 0%, #ddeef5 100%);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: grid;
    gap: 12px;
    align-content: start;
}

.quick-link-card:hover {
    border-color: rgba(0, 95, 115, 0.3);
    background: linear-gradient(135deg, #f5fbfb 0%, #f0faf8 100%);
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 95, 115, 0.1);
}

.quick-link-icon {
    font-size: 2.4rem;
    line-height: 1;
}

.quick-link-card h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #073b4c;
}

.quick-link-card p {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* DETAILS */
.student-details-section {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
    gap: 20px;
}

.details-left {
    display: grid;
    gap: 20px;
}

.details-right {
    display: grid;
    gap: 20px;
}

.profile-card-large,
.program-card-large,
.subjects-preview {
    padding: 24px;
    border-radius: 28px;
    border: 1px solid rgba(231, 223, 209, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 246, 0.94));
    box-shadow: 0 10px 28px rgba(38, 52, 56, 0.06);
}

.profile-card-large h2,
.program-card-large h2,
.subjects-preview h2 {
    margin: 0 0 18px;
    font-size: 1.3rem;
    color: #073b4c;
}

.profile-detail {
    display: grid;
    gap: 6px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(231, 223, 209, 0.9);
}

.profile-detail:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.detail-label {
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.profile-detail strong {
    color: #073b4c;
    font-size: 1.05rem;
}

.program-info {
    display: grid;
    gap: 16px;
}

.program-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: #005f73;
    padding: 16px;
    border-radius: 16px;
    background: rgba(0, 95, 115, 0.08);
    text-align: center;
}

.program-stat {
    display: grid;
    gap: 4px;
}

.program-stat span {
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 700;
}

.program-stat strong {
    color: #073b4c;
    font-size: 1.1rem;
}

.subjects-mini-list {
    display: grid;
    gap: 12px;
}

.subject-mini-item {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(0, 95, 115, 0.04);
    border: 1px solid rgba(0, 95, 115, 0.08);
}

.subject-mini-item strong {
    color: #073b4c;
    font-size: 0.98rem;
}

.subject-code {
    color: #6b7280;
    font-size: 0.85rem;
}

.subject-grade {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 95, 115, 0.1);
    color: #005f73;
    font-weight: 800;
    font-size: 0.8rem;
}

.no-data {
    margin: 0;
    color: #6b7280;
    text-align: center;
    padding: 20px 0;
}

.see-more-link {
    display: inline-block;
    margin-top: 8px;
    color: #005f73;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.see-more-link:hover {
    color: #073b4c;
}

/* TABLE SECTION */
.student-subjects-table-section {
    padding: 24px;
    border-radius: 28px;
    border: 1px solid rgba(231, 223, 209, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 246, 0.94));
    box-shadow: 0 10px 28px rgba(38, 52, 56, 0.06);
}

.student-subjects-table-section > .section-title {
    margin: 0 0 18px;
    font-size: 1.3rem;
    color: #073b4c;
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
}

.table-responsive {
    overflow-x: auto;
}

.subjects-table {
    width: 100%;
    border-collapse: collapse;
}

.subjects-table thead th {
    padding: 16px 18px;
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #073b4c;
    border-bottom: 2px solid rgba(0, 95, 115, 0.15);
    background: rgba(0, 95, 115, 0.04);
}

.subjects-table tbody td {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(231, 223, 209, 0.9);
    color: #1f2933;
}

.subjects-table tbody tr:hover td {
    background: rgba(0, 95, 115, 0.02);
}

.subjects-table code {
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(0, 95, 115, 0.08);
    color: #073b4c;
    font-family: "Courier New", monospace;
    font-size: 0.9rem;
}

.text-center {
    text-align: center;
}

.grade-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(0, 95, 115, 0.12), rgba(202, 103, 2, 0.18));
    color: #073b4c;
    font-weight: 800;
}

@media (min-width: 769px) {
    .student-portal-new-wrapper {
        width: 100%;
        max-width: 1560px;
        gap: 24px;
        margin: 0 auto;
    }

    .student-hero-banner {
        grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
        gap: 24px;
        padding: 28px;
        border-radius: 24px;
        background: linear-gradient(120deg, #073b4c 0%, #0b5966 100%);
    }

    .student-hero-content h1 {
        font-size: 2.7rem;
        line-height: 1.08;
        letter-spacing: 0;
    }

    .student-hero-subheading {
        font-size: 1.05rem;
    }

    .student-hero-cta {
        margin-top: 18px;
    }

    .btn-primary-hero {
        min-height: 48px;
        padding: 13px 20px;
        border-radius: 10px;
    }

    .student-hero-profile-widget {
        align-items: center;
        gap: 14px;
        padding: 18px;
        border-radius: 18px;
        background: #fff;
        border: 1px solid rgba(255, 255, 255, 0.3);
        backdrop-filter: none;
    }

    .profile-avatar-large {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
        border-radius: 16px;
        background: #0b7280;
        border: 0;
        font-size: 1.4rem;
    }

    .profile-info-stack {
        min-width: 0;
        gap: 10px;
    }

    .profile-info-mini strong {
        color: #073b4c;
        font-size: 1.05rem;
        letter-spacing: 0;
        overflow-wrap: anywhere;
    }

    .profile-info-mini small {
        color: #526a70;
        font-size: 0.82rem;
    }

    .student-hero-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .hero-meta-row,
    .hero-meta-row.is-date {
        min-width: 0;
        grid-template-columns: minmax(0, 1fr);
        gap: 3px;
        padding: 8px 9px;
        border-radius: 10px;
        background: #f1f6f6;
        border: 1px solid #e1ebeb;
        color: #17323a;
        font-size: 0.78rem;
    }

    .hero-meta-row.is-date.is-email {
        grid-column: 1 / -1;
        grid-template-columns: max-content minmax(0, 1fr);
        align-items: center;
        gap: 12px;
    }

    .hero-meta-row.is-date.is-program {
        grid-column: 1 / -1;
        grid-template-columns: max-content minmax(0, 1fr);
        align-items: center;
        gap: 12px;
    }

    .hero-meta-row span {
        color: #65797e;
        font-size: 0.64rem;
        letter-spacing: 0.04em;
    }

    .hero-meta-row strong {
        color: #073b4c;
        font-size: 0.86rem;
        font-weight: 700;
        letter-spacing: 0;
        overflow-wrap: anywhere;
    }

    .hero-meta-row.is-date.is-email strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero-meta-row.is-date.is-program strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .student-stats-hero {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
    }

    .stat-card {
        min-width: 0;
        padding: 16px;
        border-radius: 16px;
        gap: 12px;
        box-shadow: 0 6px 18px rgba(38, 52, 56, 0.05);
    }

    .stat-icon {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.72rem;
        letter-spacing: 0.04em;
        line-height: 1.35;
    }

    .stat-value {
        font-size: 1.55rem;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    .section-title {
        margin-bottom: 14px;
        font-size: 1.35rem;
    }

    .quick-links-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .quick-link-card {
        min-width: 0;
        padding: 18px;
        border-width: 1px;
        border-radius: 16px;
        gap: 9px;
    }

    .quick-link-card h3 {
        font-size: 1.05rem;
    }

    .quick-link-card p {
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .student-details-section {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        gap: 16px;
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .student-hero-banner {
        grid-template-columns: minmax(0, 1fr);
    }

    .student-hero-profile-widget {
        align-items: flex-start;
    }

    .student-hero-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .student-stats-hero {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-links-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-details-section {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .student-portal-new-wrapper {
        min-width: 0;
        gap: 20px;
    }

    .student-hero-banner {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        padding: 28px 20px;
    }

    .student-hero-content,
    .student-hero-profile-widget,
    .profile-info-stack {
        min-width: 0;
    }

    .student-hero-profile-widget {
        gap: 12px;
        padding: 18px;
    }

    .profile-info-stack {
        width: auto;
        flex: 1;
    }

    .hero-meta-row {
        grid-template-columns: minmax(72px, 0.6fr) minmax(0, 1fr);
    }

    .hero-meta-row span,
    .hero-meta-row strong {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .hero-meta-row.is-date.is-email {
        grid-column: auto;
        grid-template-columns: minmax(72px, 0.6fr) minmax(0, 1fr);
    }

    .hero-meta-row.is-date.is-email strong {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .hero-meta-row.is-date.is-program {
        grid-column: auto;
        grid-template-columns: minmax(72px, 0.6fr) minmax(0, 1fr);
    }

    .hero-meta-row.is-date.is-program strong {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .student-details-section {
        grid-template-columns: minmax(0, 1fr);
    }

    .quick-links-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-stats-hero {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat-card {
        min-width: 0;
        grid-template-columns: auto minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    .student-hero-banner {
        gap: 14px;
        padding: 18px 14px;
        border-radius: 20px;
    }

    .student-hero-content h1 {
        font-size: 2rem;
        letter-spacing: 0;
        overflow-wrap: anywhere;
    }

    .student-hero-subheading {
        font-size: 1rem;
    }

    .student-hero-cta {
        margin-top: 16px;
    }

    .btn-primary-hero {
        box-sizing: border-box;
        width: 100%;
        min-height: 48px;
        justify-content: center;
        padding: 12px 16px;
    }

    .student-hero-profile-widget {
        align-items: center;
        gap: 10px;
        padding: 14px;
    }

    .profile-avatar-large {
        width: 60px;
        height: 60px;
        flex-basis: 60px;
        border-radius: 16px;
        font-size: 1.35rem;
    }

    .profile-info-stack {
        gap: 8px;
    }

    .profile-info-mini strong {
        font-size: 1rem;
        overflow-wrap: anywhere;
    }

    .profile-info-mini small {
        font-size: 0.82rem;
        overflow-wrap: anywhere;
    }

    .hero-meta-row {
        grid-template-columns: minmax(64px, 0.45fr) minmax(0, 1fr);
        gap: 6px;
        padding: 7px 8px;
        font-size: 0.78rem;
    }

    .hero-meta-row strong {
        font-size: 0.82rem;
    }

    .section-title {
        margin-bottom: 12px;
        font-size: 1.25rem;
    }

    .quick-links-grid,
    .student-stats-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .stat-card,
    .quick-link-card {
        min-width: 0;
        padding: 16px;
    }

    .stat-body,
    .quick-link-card h3,
    .quick-link-card p {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .stat-value {
        font-size: 1.6rem;
        overflow-wrap: anywhere;
    }
}
