.dashboard-identity { display: flex; align-items: center; gap: 14px; }
.account-avatar, .profile-modal-avatar { display: grid; place-items: center; overflow: hidden; border-radius: 22px; color: #fff; background: linear-gradient(135deg, #6f42c1, #2563eb); box-shadow: 0 12px 25px #3d3b9b26; font: 900 1.25rem 'Manrope', sans-serif; }
.account-avatar { width: 72px; height: 72px; flex: 0 0 auto; }
.profile-modal-avatar { width: 60px; height: 60px; border-radius: 18px; flex: 0 0 auto; font-size: 1rem; }
.account-avatar img, .profile-modal-avatar img { width: 100%; height: 100%; object-fit: cover; }
.student-contact { display: block; min-height: 17px; margin-top: 5px; color: var(--muted); }
.student-alias { display: block; margin-top: 5px; color: #6f42c1; font-size: .82rem; font-weight: 800; }
.points-stat .value { color: #b66a00; }
.points-panel { margin-top: 20px; }
.points-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.points-panel-heading h2 { margin: 0; }
.points-panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: .82rem; }
.points-panel-heading > strong { padding: 9px 12px; border-radius: 12px; color: #9a5b00; background: #fff4cf; white-space: nowrap; }
.points-list { display: grid; gap: 9px; }
.point-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid #eee8d8; border-radius: 13px; background: #fffdf7; }
.point-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #b66a00; background: #fff1c4; }
.point-row strong, .point-row small { display: block; }
.point-row strong { font-size: .83rem; }
.point-row small { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.point-value { font-weight: 900; white-space: nowrap; }
.point-value.earned { color: #0d8a61; }
.point-value.removed { color: #c03958; }
.gamification-panel { margin-top: 20px; }
.gamification-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.gamification-heading h2 { margin: 0; }
.gamification-heading p { margin: 5px 0 0; color: var(--muted); font-size: .82rem; }
.badge-count { padding: 7px 10px; border-radius: 999px; color: #6334c5; background: #f0eaff; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.student-level-card { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; padding: 15px; border: 1px solid #ded5ff; border-radius: 16px; background: linear-gradient(135deg, #f8f5ff, #f5f9ff); }
.student-level-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #7c3aed, #2563eb); box-shadow: 0 10px 20px #5b3ac426; font-size: 1.35rem; }
.student-level-copy small { color: #765ca9; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.student-level-copy h3 { margin: 2px 0 3px; font: 800 1.08rem 'Manrope', sans-serif; }
.student-level-copy p { margin: 0 0 9px; color: var(--muted); font-size: .78rem; }
.level-progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: #e2e7f2; }
.level-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7c3aed, #2563eb); transition: width .35s ease; }
.achievement-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.achievement-stats span { display: grid; gap: 3px; padding: 9px 8px; border: 1px solid #e6e8f0; border-radius: 11px; color: var(--muted); font-size: .68rem; text-align: center; }
.achievement-stats i { color: #7c3aed; }
.achievement-stats b { color: #25314a; font-size: 1rem; }
.point-rules { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; color: #5d4c86; background: #f6f2ff; font-size: .74rem; line-height: 1.45; }
.point-rules i { margin-right: 4px; color: #f59e0b; }
.badges-heading { margin: 18px 0 10px; }
.badges-heading h3 { margin: 0; font: 800 1rem 'Manrope', sans-serif; }
.badge-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.student-badge { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; padding: 10px; border: 1px solid #e8e1ff; border-radius: 13px; background: #fcfbff; }
.student-badge-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #7c3aed; background: #eee9ff; }
.student-badge strong, .student-badge p { display: block; }
.student-badge strong { font-size: .78rem; }
.student-badge p { margin: 3px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.3; }
.profile-modal-title { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.profile-modal-title h2 { margin: 0; }
.profile-modal-title p { margin: 3px 0 0; color: var(--muted); font-size: .82rem; }
.modal-content > h3 { margin-top: 0; font: 800 1.02rem 'Manrope', sans-serif; }
.modal-content > p { color: var(--muted); font-size: .83rem; }
.profile-photo-field { padding: 13px; border: 1.5px dashed #9c86df; border-radius: 14px; background: #f8f5ff; }
.profile-photo-field > span { color: #5d3dc2; }
.profile-photo-field small { color: var(--muted); }
.student-messages-card { margin-top: 20px; }
.student-messages-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.student-messages-heading h2 { margin: 0; }
.message-count { padding: 6px 10px; border-radius: 999px; color: #6f42c1; background: #f0eaff; font-size: .75rem; font-weight: 800; }
.student-message-list { display: grid; gap: 10px; }
.student-message-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; padding: 13px; border: 1px solid #e4e7f0; border-radius: 15px; background: #f8f9fc; }
.student-message-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: #6f42c1; background: #eee9ff; }
.student-message-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.student-message-meta strong { font: 800 .9rem 'Manrope', sans-serif; }
.student-message-meta time { color: var(--muted); font-size: .72rem; }
.student-message-row p { margin: 6px 0 0; color: #465268; font-size: .82rem; line-height: 1.5; }
.teacher-message-compose { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.teacher-message-compose h3 { margin: 0 0 5px; font: 800 1rem 'Manrope', sans-serif; }
.teacher-message-compose p { margin: 0 0 15px; color: var(--muted); font-size: .83rem; }
.teacher-message-compose .form-grid { margin-top: 0; }
.task-submissions-panel { margin-top: 20px; }
.task-submissions-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.task-submissions-heading h2 { margin: 0; }
.task-submissions-heading p { margin: 5px 0 0; color: var(--muted); font-size: .82rem; }
.account-task-list { display: grid; gap: 10px; }
.account-task-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 13px; padding: 11px; border: 1px solid #f0d8df; border-radius: 14px; background: #fffafb; }
.account-task-photo { position: relative; display: block; height: 82px; overflow: hidden; border-radius: 10px; background: #f4e9ed; }
.account-task-photo img { width: 100%; height: 100%; object-fit: cover; }
.account-task-photo span { position: absolute; right: 5px; bottom: 5px; padding: 4px 6px; border-radius: 7px; color: #fff; background: #9f1737d9; font-size: .62rem; font-weight: 800; }
.account-task-copy { min-width: 0; }
.account-task-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.account-task-meta strong { color: #25314a; font: 800 .85rem/1.3 'Manrope', sans-serif; }
.account-task-copy > small { display: block; margin-top: 5px; color: var(--muted); font-size: .7rem; }
.account-task-copy > small i { margin-right: 3px; }
.account-task-score, .account-task-pending { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; padding: 5px 8px; border-radius: 99px; font-size: .68rem; font-weight: 900; white-space: nowrap; }
.account-task-score { color: #8a5600; background: #fff0c9; }
.account-task-score i { color: #f59e0b; }
.account-task-pending { color: #9f1737; background: #ffe7ec; }
.account-task-feedback { margin: 8px 0 0; padding: 7px 8px; border-radius: 8px; color: #5b4360; background: #f4efff; font-size: .72rem; line-height: 1.4; }
.account-task-feedback i { margin-right: 4px; color: #7c3aed; }
.account-task-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.account-task-actions a, .account-task-actions button { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #e0d5ee; border-radius: 8px; padding: 6px 8px; color: #5f3ec4; background: #f8f4ff; font: inherit; font-size: .68rem; font-weight: 900; text-decoration: none; cursor: pointer; }
.account-task-actions button { color: #b3122d; border-color: #f0c4cd; background: #fff0f3; }
.student-chat-window { display: grid; gap: 9px; max-height: 440px; overflow-y: auto; padding: 14px; border: 1px solid #e4e7f0; border-radius: 17px; background: linear-gradient(180deg, #f8f9fc, #f2f5fb); }
.student-chat-message { display: flex; }
.student-chat-message--mine { justify-content: flex-end; }
.student-chat-bubble { max-width: min(78%, 570px); padding: 10px 12px; border: 1px solid #e1e5ef; border-radius: 15px 15px 15px 5px; background: #fff; box-shadow: 0 5px 14px #25314a0b; }
.student-chat-message--mine .student-chat-bubble { border-color: #dcd1fb; border-radius: 15px 15px 5px 15px; background: #f0eaff; }
.student-chat-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.student-chat-meta strong { color: #536078; font-size: .72rem; }
.student-chat-message--mine .student-chat-meta strong { color: #6334c5; }
.student-chat-meta time { color: var(--muted); font-size: .65rem; }
.student-chat-subject { display: block; margin-top: 4px; color: #6334c5; font-size: .7rem; font-weight: 800; }
.student-chat-bubble p { margin: 5px 0 0; color: #303c55; font-size: .82rem; line-height: 1.5; overflow-wrap: anywhere; }
.chat-compose-form { display: grid; gap: 9px; }
.emoji-toolbar { display: flex; flex-wrap: wrap; gap: 5px; }
.emoji-toolbar button { width: 35px; height: 32px; padding: 0; border: 1px solid #ded5ff; border-radius: 9px; background: #faf8ff; font-size: 1rem; cursor: pointer; }
.emoji-toolbar button:hover, .emoji-toolbar button:focus-visible { border-color: #7c3aed; background: #f0eaff; outline: none; }
.student-assessments-panel { margin-top: 20px; }
.student-assessments-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.student-assessments-heading h2 { margin: 0; }
.student-assessments-heading p { margin: 5px 0 0; color: var(--muted); font-size: .82rem; }
.student-assessment-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 13px; }
.student-assessment-metrics span { display: grid; gap: 3px; padding: 10px 8px; border: 1px solid #e5e2f6; border-radius: 12px; color: var(--muted); background: linear-gradient(145deg, #fcfbff, #f7f9ff); text-align: center; }
.student-assessment-metrics b { color: #5033bd; font: 800 1.08rem 'Manrope', sans-serif; }
.student-assessment-metrics small { font-size: .68rem; font-weight: 700; }
.student-assessment-list { display: grid; gap: 10px; }
.student-assessment-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px; border: 1px solid #e1e5f0; border-left: 4px solid #6d3ee8; border-radius: 15px; background: #fff; }
.student-assessment-row.is-complete { border-left-color: #0d9f70; background: linear-gradient(145deg, #fff, #f8fffc); }
.student-assessment-row.is-pending { border-left-color: #e39a18; background: linear-gradient(145deg, #fff, #fffaf0); }
.student-assessment-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #fff; background: linear-gradient(135deg, #6d3ee8, #2563eb); }
.is-complete .student-assessment-icon { background: linear-gradient(135deg, #0d9f70, #0ea5e9); }
.student-assessment-copy { min-width: 0; }
.student-assessment-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.student-assessment-title > strong { color: #25314a; font: 800 .86rem/1.35 'Manrope', sans-serif; }
.student-assessment-result, .student-assessment-pending { flex: 0 0 auto; padding: 5px 8px; border-radius: 99px; font-size: .67rem; font-weight: 900; white-space: nowrap; }
.student-assessment-result { color: #087257; background: #e4f7ef; }
.student-assessment-result i { color: #f59e0b; }
.student-assessment-pending { color: #9a6100; background: #fff0c9; }
.student-assessment-copy > small { display: block; margin-top: 4px; color: var(--muted); font-size: .69rem; overflow-wrap: anywhere; }
.student-assessment-copy > small i { width: 14px; color: #7c3aed; text-align: center; }
.student-assessment-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.student-assessment-link { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border: 1px solid #ded5ff; border-radius: 9px; color: #5f3ec4; background: #f8f4ff; font-size: .68rem; font-weight: 900; text-decoration: none; }
.student-assessment-link:hover, .student-assessment-link:focus-visible { color: #fff; border-color: #6d3ee8; background: #6d3ee8; text-decoration: none; }
.student-assessment-link--start { color: #fff; border-color: #cf3151; background: linear-gradient(135deg, #cf3151, #6d3ee8); }
.student-assessment-link--repeat { color: #087257; border-color: #bfe7d6; background: #effbf6; }
@media (max-width: 620px) { .student-assessments-heading { flex-direction: column; } .student-assessment-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .student-assessment-title { align-items: flex-start; flex-direction: column; } .student-assessment-row { align-items: start; } }
@media (max-width: 480px) { .dashboard-identity { align-items: flex-start; } .account-avatar { width: 58px; height: 58px; border-radius: 17px; } .points-panel-heading, .gamification-heading { flex-direction: column; } .point-row { grid-template-columns: auto minmax(0, 1fr); } .point-value { grid-column: 2; } .achievement-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .badge-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .task-submissions-heading { flex-direction: column; } .account-task-row { grid-template-columns: 1fr; } .account-task-photo { height: 150px; } .account-task-meta { align-items: flex-start; flex-direction: column; } .student-chat-bubble { max-width: 90%; } }

/* v8: perfil compacto con módulos accesibles desde la parte superior. */
.student-profile-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    padding: 22px 24px;
    border: 1px solid #dfe5f2;
    border-radius: 24px;
    background: linear-gradient(135deg, #fff 0%, #f7f5ff 52%, #eef8ff 100%);
    box-shadow: 0 17px 38px #26385912;
}
.student-profile-hero .dashboard-identity { min-width: 0; align-items: center; }
.account-avatar--large { width: 108px; height: 108px; border: 5px solid #fff; border-radius: 30px; background: linear-gradient(145deg, #6d3ee8, #168ac4); box-shadow: 0 14px 30px #4f32c43d; font-size: 1.8rem; }
.student-profile-copy { min-width: 0; }
.student-profile-copy h1 { margin: 4px 0 6px; color: #1e2942; font: 800 clamp(1.35rem, 3vw, 2rem)/1.12 'Manrope', sans-serif; overflow-wrap: anywhere; }
.student-profile-copy .eyebrow { color: #7046d0; font-weight: 900; letter-spacing: .12em; }
.student-academic-line { margin: 0; color: #697894; font-size: .85rem; }
.student-academic-line b { color: #2d3d5d; }
.student-hero-side { display: grid; grid-template-columns: repeat(2, minmax(115px, 1fr)); gap: 8px; min-width: 270px; }
.student-hero-achievement, .student-hero-level { display: grid; gap: 3px; padding: 11px 12px; border: 1px solid #e4e8f3; border-radius: 14px; background: #fff; }
.student-hero-achievement span, .student-hero-level span { color: #71809a; font-size: .66rem; font-weight: 900; }
.student-hero-achievement span i { color: #f59e0b; }
.student-hero-level span i { color: #6d3ee8; }
.student-hero-achievement strong, .student-hero-level strong { color: #263553; font: 800 .95rem 'Manrope', sans-serif; }
.student-hero-achievement strong { color: #a56200; }
.student-hero-side .dashboard-actions { grid-column: 1 / -1; justify-content: flex-end; gap: 8px; }
.student-hero-side .dashboard-actions > * { min-height: 38px; padding: 8px 11px; font-size: .75rem; }
.student-quick-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin: 16px 0 18px; padding: 9px; border: 1px solid #e1e6f1; border-radius: 18px; background: #fff; box-shadow: 0 10px 24px #2638590c; }
.student-quick-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 43px; padding: 8px 9px; border: 1px solid #dbe3f3; border-radius: 12px; color: #53627c; background: #f8faff; font-size: .74rem; font-weight: 900; text-align: center; text-decoration: none; transition: transform .18s ease, color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.student-quick-link i { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; color: #fff; background: #3157d5; font-size: .72rem; }
.student-quick-link:hover, .student-quick-link:focus-visible { color: #263553; border-color: #aebfe8; background: #fff; box-shadow: 0 8px 16px #26385914; text-decoration: none; transform: translateY(-2px); outline: none; }
.student-quick-link.is-active { color: #fff; border-color: transparent; background: linear-gradient(135deg, #3157d5, #6d3ee8); box-shadow: 0 9px 19px #3157d52e; }
.student-quick-link.is-active i { color: #3157d5; background: #fff; }
.student-quick-link--purple i { background: #7c3aed; }
.student-quick-link--red i { background: #cf3151; }
.student-quick-link--blue i { background: #168ac4; }
.student-quick-link--gold i { background: #e39a18; }
.student-module-panel { scroll-margin-top: 18px; }
.student-module-panel[hidden] { display: none !important; }
.student-module-panel > .panel-card { margin-top: 0; }
.student-module-panel:not(#student-overview) { min-height: 220px; }
#student-overview { display: block; }
#student-overview .stat-grid { margin-top: 0; }
#student-overview .gamification-panel { margin-bottom: 2px; }
@media (max-width: 820px) {
    .student-profile-hero { grid-template-columns: 1fr; }
    .student-hero-side { grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; }
    .student-hero-side .dashboard-actions { justify-content: flex-start; }
    .student-quick-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .student-profile-hero { gap: 14px; padding: 17px; border-radius: 20px; }
    .student-profile-hero .dashboard-identity { align-items: flex-start; }
    .account-avatar--large { width: 86px; height: 86px; border-radius: 24px; font-size: 1.45rem; }
    .student-profile-copy h1 { font-size: 1.3rem; }
    .student-profile-copy .eyebrow { font-size: .64rem; }
    .student-academic-line { font-size: .76rem; }
    .student-hero-side { grid-template-columns: 1fr 1fr; }
    .student-hero-side .dashboard-actions > * { flex: 1 1 auto; }
    .student-quick-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 12px; padding: 7px; border-radius: 15px; }
    .student-quick-link { min-height: 42px; font-size: .68rem; }
    .student-quick-link:last-child { grid-column: 1 / -1; }
}
