/* Campus Rikytoon CESBA — Student 4.0 | UX visual sin modificar registros. */
body.cesba-role-student{
 --cr40-surface:#0b1c2e;
 --cr40-raised:#132e45;
 --cr40-border:rgba(147,200,233,.22);
 --cr40-accent:#9ee8ff;
 --cr40-text:#f0f9ff;
 --cr40-muted:#bbd1e1;
}
body.cesba-role-student .student-dashboard-home{
 background:linear-gradient(165deg,#0c2034 0%,#081625 100%)!important;
 border:1px solid var(--cr40-border)!important;
 border-radius:24px!important;
 box-shadow:0 20px 54px rgba(0,0,0,.18)!important;
}
body.cesba-role-student .student-dashboard-head{gap:18px;margin-bottom:20px!important}
body.cesba-role-student .student-dashboard-head h2{
 font-size:clamp(1.7rem,3.15vw,2.55rem)!important;
 line-height:1.13!important;letter-spacing:-.045em;
}
body.cesba-role-student .student-dashboard-head p{
 font-size:.88rem!important;line-height:1.65!important;color:var(--cr40-muted)!important;
}
body.cesba-role-student .student-dashboard-head .student-meta{align-self:flex-start}
body.cesba-role-student .student-dashboard-head .student-meta span{
 padding:7px 11px!important;font-size:.76rem!important;
 border:1px solid rgba(151,198,234,.25)!important;border-radius:10px!important;
 background:#102d44!important;
}
/* La sesión principal es lo primero; los datos secundarios se leen después. */
body.cesba-role-student .student-bento{gap:12px;grid-template-columns:repeat(12,minmax(0,1fr))}
body.cesba-role-student .student-bento-card{
 border-color:var(--cr40-border);border-radius:17px;min-width:0;
}
body.cesba-role-student .bento-continue{
 order:0;grid-column:span 8;min-height:222px;
 padding:clamp(19px,2.4vw,27px);
 background:linear-gradient(120deg,#17435e,#10324b 58%,#0c2339)!important;
 border-color:rgba(138,224,253,.48)!important;
 box-shadow:0 12px 34px rgba(0,0,0,.13);
}
body.cesba-role-student .bento-continue .bento-subject{margin-top:14px}
body.cesba-role-student .bento-continue h3{
 font-size:clamp(1.35rem,2.35vw,1.98rem);
 color:#f4fbff;line-height:1.28;overflow-wrap:anywhere;
}
body.cesba-role-student .bento-continue .student-continue{
 min-height:47px;font-size:.85rem;padding:10px 16px;
 background:#adeeff;color:#0b2638;border-radius:11px;
 font-weight:850;
}
body.cesba-role-student .bento-continue .student-continue:hover{background:#d0f7ff;color:#092130}
body.cesba-role-student .bento-overall{
 order:1;grid-column:span 4;min-height:222px;
 padding:20px;flex-direction:column;align-items:flex-start;justify-content:center;gap:14px;
 background:linear-gradient(135deg,#133844,#0c2839)!important;
}
body.cesba-role-student .bento-overall .student-progress-ring{width:83px;height:83px;flex:0 0 83px}
body.cesba-role-student .bento-overall .student-progress-ring strong{font-size:1.45rem}
body.cesba-role-student .bento-overall-copy>span{font-size:.75rem;color:#abeed9}
body.cesba-role-student .bento-overall-copy>strong{font-size:.88rem}
body.cesba-role-student .bento-overall-copy>small{font-size:.74rem;line-height:1.55}
body.cesba-role-student .bento-metric{
 order:2;grid-column:span 4;min-height:99px;
 padding:17px 20px;background:#10283e!important;
}
body.cesba-role-student .bento-metric>span{font-size:.79rem;color:#c1d4e3}
body.cesba-role-student .bento-metric>strong{font-size:1.7rem;color:#f5fbff}
body.cesba-role-student .bento-metric>small{font-size:.72rem;color:#b3ccdc}
body.cesba-role-student .bento-next{
 order:3;grid-column:span 4;min-height:190px;
 padding:20px;background:#102838!important;border-color:rgba(140,227,208,.24);
}
body.cesba-role-student .bento-next h3{font-size:clamp(1.05rem,1.7vw,1.25rem)}
body.cesba-role-student .bento-next p{font-size:.8rem;color:#c2d6e2}
body.cesba-role-student .bento-recent{
 order:4;grid-column:span 8;min-height:190px;
 background:#0e263b!important;padding:18px 20px;
}
body.cesba-role-student .bento-recent .bento-card-top{
 display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px;
}
body.cesba-role-student .bento-recent .bento-card-top>div{margin-right:auto}
body.cesba-role-student .bento-recent .bento-card-top a{
 min-height:38px;display:inline-flex;align-items:center;
 font-size:.76rem;font-weight:800;white-space:nowrap;
}
body.cesba-role-student .bento-recent .cr39-entry-link{
 margin-left:0;padding:7px 11px;border-radius:10px;background:#1b4965;
 border-color:rgba(143,221,250,.42);
}
body.cesba-role-student .student-recent-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
body.cesba-role-student .student-recent-item{background:#102f45;border-color:rgba(145,206,239,.18)}
body.cesba-role-student .student-route-panel{
 margin-top:13px;border-radius:17px;background:#0b2034;
 border-color:var(--cr40-border);padding:19px 23px;
}

/* Student 4.1 — portada enfocada en acciones y materias autorizadas.
 * Superposición aislada, sin cambiar cursos ni evaluaciones. */
body.cesba-role-student #cesbaStudentHome{
  border-radius:21px!important;
}
body.cesba-role-student .student-dashboard-head{
  margin-bottom:16px!important;
}
body.cesba-role-student .student-dashboard-head h2{
  font-size:clamp(1.6rem,2.6vw,2.15rem)!important;
}
body.cesba-role-student #cr40ViewToggle{margin-top:9px!important}
body.cesba-role-student .student-dashboard-head p{
  font-size:.79rem!important;
}
/* Las métricas históricas y "Mi ruta" siguen en el DOM para el motor
   académico, pero ya no compiten con la navegación del alumno. */
body.cesba-role-student .student-bento>.bento-metric,
body.cesba-role-student .student-bento>.bento-next,
body.cesba-role-student #cesbaStudentHome>.student-route-panel{
  display:none!important;
}
body.cesba-role-student .student-bento>.bento-continue{
  min-height:196px;
}
body.cesba-role-student .student-bento>.bento-overall{
  min-height:196px;
}
body.cesba-role-student .student-bento>.bento-recent{
  order:3;grid-column:span 12;min-height:0;
  margin-top:2px;padding:17px 20px;
}
body.cesba-role-student .student-recent-list{
  grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;
}
body.cesba-role-student .student-recent-item{min-width:0}
body.cesba-role-student .student-recent-score{
  color:#c4e6f0;font-variant-numeric:tabular-nums;
}
body.cesba-role-student .cr41-preview{
  order:2;grid-column:span 12;min-width:0;
  padding:21px 22px 18px;margin-top:4px;
  border:1px solid rgba(145,206,236,.24);
  border-radius:16px;
  background:linear-gradient(140deg,#112d43,#0c2235);
}
body.cesba-role-student .cr41-preview[hidden]{display:none!important}
body.cesba-role-student .cr41-preview-header{
  display:flex;align-items:center;justify-content:space-between;
  gap:10px 20px;flex-wrap:wrap;margin-bottom:16px;
}
body.cesba-role-student .cr41-kicker{
  display:block;font-size:.68rem;font-weight:850;
  color:#9bdff8;letter-spacing:.08em;
}
body.cesba-role-student .cr41-preview h3{
  margin:5px 0 4px;font:850 clamp(1.2rem,2vw,1.55rem)/1.2 Manrope,Inter,Arial,sans-serif;color:#f3fbff;
}
body.cesba-role-student .cr41-preview-caption{
  font-size:.77rem;color:#b5d0e1;line-height:1.55;
}
body.cesba-role-student .cr41-see-all{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:44px;padding:9px 13px;border-radius:10px;
  color:#d4f5ff;border:1px solid rgba(145,220,248,.36);
  background:#174058;text-decoration:none;font-size:.8rem;font-weight:850;
}
body.cesba-role-student .cr41-see-all:hover{color:#fff;background:#215b77}
body.cesba-role-student .cr41-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;
}
body.cesba-role-student .cr41-course-card{
  min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:8px;
  padding:17px;border-radius:13px;
  background:#0b2134;border:1px solid rgba(142,204,235,.21);
  border-top:3px solid #52c8e4;
}
body.cesba-role-student .cr41-course-card.is-pinned{
  border-top-color:#a0f0da;background:#0b2736;
}
body.cesba-role-student .cr41-course-top{
  width:100%;display:flex;justify-content:space-between;align-items:center;gap:8px;
}
body.cesba-role-student .cr41-course-code{
  font-size:.69rem;color:#a2ddef;font-weight:850;letter-spacing:.06em;
}
body.cesba-role-student .cr41-pin{
  width:44px;height:44px;display:grid;place-items:center;
  border:1px solid rgba(139,207,237,.34);background:#153951;color:#d4edfa;
  border-radius:11px;font-size:1.2rem;cursor:pointer;flex-shrink:0;
}
body.cesba-role-student .cr41-pin[aria-pressed="true"]{
  background:#1c4b4b;color:#b4f6e1;border-color:rgba(165,240,217,.62);
}
body.cesba-role-student .cr41-course-card h4{
  color:#f1faff;line-height:1.35;font-size:.97rem;margin:0;
  font-weight:800;overflow-wrap:anywhere;
}
body.cesba-role-student .cr41-course-status{
  color:#b1e9d8;font-size:.76rem;font-weight:800;
}
body.cesba-role-student .cr41-course-detail{
  color:#bad2e1;font-size:.73rem;line-height:1.5;margin:0;
}
body.cesba-role-student .cr41-course-track{
  width:100%;height:7px;border-radius:10px;overflow:hidden;
  background:#071725;border:1px solid rgba(140,198,235,.15);margin-top:auto;
}
body.cesba-role-student .cr41-course-fill{
  display:block;height:100%;border-radius:10px;
  background:linear-gradient(90deg,#42bbdc,#a1f0d6);
}
body.cesba-role-student .cr41-course-percent{
  color:#b3d4e5;font-size:.7rem;
}
body.cesba-role-student .cr41-course-open{
  display:inline-flex;align-items:center;justify-content:center;
  margin-top:auto;min-height:44px;padding:9px 13px;
  color:#0b283a;background:#aaedff;border:1px solid #aaedff;
  border-radius:10px;text-decoration:none;font-size:.77rem;font-weight:850;
}
body.cesba-role-student .cr41-course-open:hover{background:#d4f7ff;color:#081c2b}
body.cesba-role-student .cr41-feedback{
  min-height:0;margin:10px 0 0;color:#e8d4b2;font-size:.76rem;line-height:1.5;
}
body.cesba-role-student .cr41-feedback:empty{display:none}
body.cesba-role-student .cr41-empty{
  border:1px dashed rgba(149,209,241,.28);border-radius:12px;
  padding:22px;text-align:center;color:#bdd8e7;font-size:.82rem;
}
body.cesba-role-student .cr41-empty[hidden]{display:none!important}
body.cesba-role-student :is(.cr41-course-open,.cr41-pin,.cr41-see-all):focus-visible{
  outline:3px solid #a8efff;outline-offset:3px;
}
@media(max-width:1080px){
 body.cesba-role-student .student-recent-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
 body.cesba-role-student .student-bento>.bento-continue,
 body.cesba-role-student .student-bento>.bento-overall{min-height:0}
 body.cesba-role-student .cr41-preview{padding:18px}
 body.cesba-role-student .cr41-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.cesba-role-student .student-recent-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px){
 body.cesba-role-student .cr41-preview{padding:15px;border-radius:14px}
 body.cesba-role-student .cr41-grid,
 body.cesba-role-student .student-recent-list{grid-template-columns:1fr}
 body.cesba-role-student .cr41-course-card{padding:14px;gap:7px}
 body.cesba-role-student .cr41-preview-header{gap:12px}
 body.cesba-role-student .cr41-see-all{width:100%}
 body.cesba-role-student .student-bento>.bento-recent{padding:15px}
 body.cesba-role-student .bento-continue .student-continue{min-height:48px}
}
@media(prefers-reduced-motion:reduce){
 body.cesba-role-student .cr41-preview *{transition:none!important;animation:none!important}
}
@media print{
 body.cesba-role-student .cr41-preview{break-inside:avoid;box-shadow:none}
 body.cesba-role-student .cr41-pin,
 body.cesba-role-student .cr41-feedback{display:none!important}
}

/* Student 4.2 — tokens y jerarquía de los bloques educativos. */
body.cesba-role-student{
 --cr42-panel:#0c253a;--cr42-line:rgba(170,210,239,.24);
 --cr42-mute:#c4d9e8;--cr42-ink:#f3faff;
}
body.cesba-role-student .student-dashboard-head h2{font-size:clamp(1.64rem,2.8vw,2.26rem)!important}
body.cesba-role-student .student-dashboard-head p{font-size:.88rem!important;line-height:1.6!important}
body.cesba-role-student .student-bento>.bento-continue,
body.cesba-role-student .student-bento>.bento-overall{min-height:199px}
body.cesba-role-student .bento-overall-copy>small{font-size:.78rem;line-height:1.6}
body.cesba-role-student .cr41-preview{
 padding:21px;border-radius:17px;border-color:var(--cr42-line);
 background:linear-gradient(145deg,#112d43,#0b2034);
}
body.cesba-role-student .cr41-preview h3{font-size:clamp(1.3rem,2.15vw,1.6rem)}
body.cesba-role-student .cr41-preview-caption{font-size:.82rem;color:var(--cr42-mute)}
body.cesba-role-student .cr41-kicker{font-size:.75rem;letter-spacing:.04em}
body.cesba-role-student .cr41-grid{gap:12px;grid-template-columns:repeat(3,minmax(0,1fr))}
body.cesba-role-student .cr41-grid.cr42-count-1{grid-template-columns:minmax(0,min(100%,440px))}
body.cesba-role-student .cr41-grid.cr42-count-2{grid-template-columns:repeat(2,minmax(0,1fr))}
body.cesba-role-student .cr41-course-card{
 display:grid;grid-template-columns:44px minmax(0,1fr);
 grid-template-areas:"icon copy" "link link";
 align-items:start;gap:11px 13px;padding:16px;min-height:178px;
 border:1px solid var(--cr42-line);border-top:3px solid #60c9df;
 background:var(--cr42-panel);border-radius:14px;
}
body.cesba-role-student .cr41-course-card.is-pinned{border-top-color:#adf1d8}
body.cesba-role-student .cr42-course-icon{
 grid-area:icon;display:flex;align-items:center;justify-content:center;
 width:44px;height:44px;border-radius:11px;background:#16425a;
 border:1px solid rgba(171,226,245,.28);
 color:#caeffb;font-size:.78rem;font-weight:900;
}
body.cesba-role-student .cr42-course-copy{
 grid-area:copy;display:flex;flex-direction:column;align-items:flex-start;
 gap:6px;min-width:0;
}
body.cesba-role-student .cr41-course-top{width:100%;min-height:40px;gap:7px}
body.cesba-role-student .cr41-course-code{font-size:.76rem}
body.cesba-role-student .cr41-course-card h4{font-size:1.01rem;line-height:1.35}
body.cesba-role-student .cr41-course-status{font-size:.82rem}
body.cesba-role-student .cr41-course-detail{font-size:.81rem;color:var(--cr42-mute);line-height:1.5}
body.cesba-role-student .cr42-course-progress{width:100%;display:grid;gap:6px;margin-top:4px}
body.cesba-role-student .cr41-course-track{width:100%;margin:0}
body.cesba-role-student .cr41-course-percent{font-size:.76rem}
body.cesba-role-student .cr41-course-open{
 grid-area:link;justify-self:start;margin:0;min-height:44px;min-width:88px;
 font-size:.83rem;
}
body.cesba-role-student .cr41-pin{width:44px;height:44px;min-width:44px}
body.cesba-role-student .cr41-see-all[hidden]{display:none!important}


/* Favoritos disponibles también en el listado completo. */
body.cesba-role-student #materias .card-footer{
 display:flex;flex-wrap:wrap;align-items:center;gap:9px;
}
body.cesba-role-student #materias .card-footer>span{margin-right:auto}
body.cesba-role-student .cr42-catalog-pin{
 display:inline-flex;align-items:center;justify-content:center;
 flex:0 0 44px;width:44px;height:44px;min-height:44px;
 border-radius:11px;border:1px solid rgba(160,210,239,.42);
 background:#153b50;color:#e1f4ff;font-size:1.28rem;cursor:pointer;
}
body.cesba-role-student .cr42-catalog-pin[aria-pressed="true"]{
 color:#baf1d5;border-color:rgba(164,237,210,.59);background:#174b42;
}
body.cesba-role-student :is(.cr42-catalog-pin,.cr42-retry):hover{background:#23576b;color:white}
body.cesba-role-student .cr42-state{
 min-height:118px;display:flex;flex-direction:column;align-items:flex-start;
 gap:8px;text-align:left;padding:20px;
}
body.cesba-role-student .cr42-state.cr42-error{
 border-style:solid;border-color:rgba(245,174,151,.44);
 background:rgba(119,75,60,.12);
}
body.cesba-role-student .cr42-state-title{font-size:.97rem;font-weight:850;color:#f0faff}
body.cesba-role-student .cr42-state-copy{
 font-size:.83rem;line-height:1.6;color:#c4d9e8;margin:0;
}
body.cesba-role-student .cr42-retry{
 margin-top:4px;padding:10px 15px;min-height:44px;
 border:1px solid rgba(151,220,239,.38);border-radius:10px;
 background:#164c64;color:#edfcff;font-size:.83rem;font-weight:800;cursor:pointer;
}
body.cesba-role-student .cr41-feedback{font-size:.81rem;line-height:1.5}
body.cesba-role-student :is(.cr41-pin,.cr41-see-all,.cr41-course-open,.cr42-catalog-pin,.cr42-retry):focus-visible{
 outline:3px solid #b4f1ff;outline-offset:3px;
}
@media(max-width:980px){
 body.cesba-role-student .cr41-grid,
 body.cesba-role-student .cr41-grid.cr42-count-3{
  grid-template-columns:repeat(2,minmax(0,1fr));
 }
 body.cesba-role-student .cr41-grid.cr42-count-1{
  grid-template-columns:minmax(0,min(100%,440px));
 }
}
@media(max-width:620px){
 body.cesba-role-student .cr41-preview{padding:15px}
 body.cesba-role-student .cr41-grid,
 body.cesba-role-student .cr41-grid.cr42-count-1,
 body.cesba-role-student .cr41-grid.cr42-count-2,
 body.cesba-role-student .cr41-grid.cr42-count-3{grid-template-columns:minmax(0,1fr)}
 body.cesba-role-student .cr41-course-card{
  min-height:0;padding:12px;gap:10px;align-items:center;
  grid-template-columns:43px minmax(0,1fr) 65px;
  grid-template-areas:"icon copy link";
 }
 body.cesba-role-student .cr42-course-icon{width:43px;height:43px;font-size:.73rem}
 body.cesba-role-student .cr42-course-copy{gap:4px}
 body.cesba-role-student .cr41-course-card h4{font-size:.91rem;line-height:1.32}
 body.cesba-role-student .cr41-course-status{font-size:.78rem}
 body.cesba-role-student .cr41-course-detail{
  font-size:.78rem;display:-webkit-box;-webkit-box-orient:vertical;
  -webkit-line-clamp:2;overflow:hidden;
 }
 body.cesba-role-student .cr41-course-top{min-height:38px}
 body.cesba-role-student .cr41-pin{min-width:40px;width:40px;min-height:44px}
 body.cesba-role-student .cr41-course-open{
  width:65px;min-width:0;justify-self:end;min-height:44px;
  padding:9px 5px;margin:0;font-size:.79rem;
 }
 body.cesba-role-student .cr41-course-track{height:6px}
 body.cesba-role-student .cr42-course-progress{gap:4px;margin-top:3px}
 body.cesba-role-student .cr41-course-percent{font-size:.75rem}
 body.cesba-role-student .cr41-preview-caption{font-size:.8rem}
 body.cesba-role-student .student-icon-link>span{font-size:.73rem!important}
 body.cesba-role-student #materias .subject-card{
  min-height:0!important;padding:17px!important;
 }
 body.cesba-role-student #materias .subject-copy{
  font-size:.82rem;display:-webkit-box;-webkit-box-orient:vertical;
  -webkit-line-clamp:3;overflow:hidden;
 }
 body.cesba-role-student #materias .subject-stack{display:none}
}
@media(hover:none){
 body.cesba-role-student #materias .subject-card:hover{transform:none}
}
@media(prefers-reduced-motion:reduce){
 body.cesba-role-student :is(.cr41-course-card,.cr42-catalog-pin,.cr42-retry){transition:none!important;animation:none!important}
}
@media print{
 body.cesba-role-student :is(.cr42-catalog-pin,.cr42-retry){display:none!important}
}

/* Corrección crítica de la cuadrícula heredada: una columna en móvil. */
@media(max-width:760px){
 body.cesba-role-student .student-bento>.bento-continue,
 body.cesba-role-student .student-bento>.bento-overall{
  grid-column:span 12!important;min-height:0;
 }
 body.cesba-role-student .bento-overall{
  flex-direction:row;align-items:center;justify-content:flex-start;
 }
}

/* Resumen del catálogo legible en móvil: sobreescribe ocultación heredada. */
@media(max-width:620px){body.cesba-role-student #materias .subject-card .subject-copy{display:-webkit-box!important}}

/* Jerarquía estable en todos los breakpoints: Continuar siempre primero. */
body.cesba-role-student .student-bento>.bento-continue{order:0!important}
body.cesba-role-student .student-bento>.bento-overall{order:1!important}
