/* EDUHUNT R455 — Student Portal only
   Exam Dates adaptive table + immediate-next date + compact 4-card dashboard.
   FT / CT / GT omit Subject and Chapter cells. CDF keeps both.
*/

/* ========================= STUDENT EXAM DATES ========================= */
body[data-portal-role="STUDENT"] .student-exam-table{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
}
body[data-portal-role="STUDENT"] .student-exam-table-head,
body[data-portal-role="STUDENT"] .student-exam-date-row{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}

/* Mixed/CDF view: Date | Test | Subject | Chapter | Status */
body[data-portal-role="STUDENT"] .student-exam-table--with-cdf .student-exam-table-head,
body[data-portal-role="STUDENT"] .student-exam-table--with-cdf .student-exam-date-row--cdf,
body[data-portal-role="STUDENT"] .student-exam-table--with-cdf .student-exam-date-row--standard{
  display:grid!important;
  grid-template-columns:minmax(66px,.72fr) minmax(78px,.95fr) minmax(82px,.95fr) minmax(118px,1.55fr) minmax(88px,.9fr)!important;
  align-items:stretch!important;
  gap:0!important;
}
/* FT/CT/GT have no Subject/Chapter cells. Test name consumes their space. */
body[data-portal-role="STUDENT"] .student-exam-table--with-cdf .student-exam-date-row--standard .student-exam-date{grid-column:1!important}
body[data-portal-role="STUDENT"] .student-exam-table--with-cdf .student-exam-date-row--standard .student-exam-test{grid-column:2 / 5!important}
body[data-portal-role="STUDENT"] .student-exam-table--with-cdf .student-exam-date-row--standard .student-exam-status{grid-column:5!important}

/* No visible CDF in the current filtered result: remove Subject/Chapter columns completely. */
body[data-portal-role="STUDENT"] .student-exam-table--standard-only .student-exam-table-head,
body[data-portal-role="STUDENT"] .student-exam-table--standard-only .student-exam-date-row--standard{
  display:grid!important;
  grid-template-columns:minmax(76px,.72fr) minmax(150px,2.2fr) minmax(92px,.82fr)!important;
  align-items:stretch!important;
  gap:0!important;
}

body[data-portal-role="STUDENT"] .student-exam-table-head{
  min-height:44px!important;
}
body[data-portal-role="STUDENT"] .student-exam-table-head>span{
  display:flex!important;
  align-items:center!important;
  min-width:0!important;
  padding:10px 10px!important;
  font-size:13px!important;
  line-height:1.1!important;
  font-weight:950!important;
  overflow-wrap:anywhere!important;
}
body[data-portal-role="STUDENT"] .student-exam-date-row{
  min-height:54px!important;
}
body[data-portal-role="STUDENT"] .student-exam-date-row>div{
  display:flex!important;
  align-items:center!important;
  min-width:0!important;
  padding:9px 10px!important;
  font-size:13px!important;
  line-height:1.25!important;
  overflow-wrap:anywhere!important;
}
body[data-portal-role="STUDENT"] .student-exam-date,
body[data-portal-role="STUDENT"] .student-exam-test strong,
body[data-portal-role="STUDENT"] .student-exam-subject,
body[data-portal-role="STUDENT"] .student-exam-chapter{
  font-size:13px!important;
  line-height:1.25!important;
}
body[data-portal-role="STUDENT"] .student-exam-date{white-space:nowrap!important}
body[data-portal-role="STUDENT"] .student-exam-test strong{font-weight:950!important}
body[data-portal-role="STUDENT"] .student-exam-status{
  justify-content:center!important;
  text-align:center!important;
}
body[data-portal-role="STUDENT"] .student-exam-status .status-badge{
  max-width:100%!important;
  padding:5px 7px!important;
  font-size:12px!important;
  line-height:1.05!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

/* Immediate next exam: label | exact date | test | status, one compact row. */
body[data-portal-role="STUDENT"] .student-next-exam-inline{
  display:grid!important;
  grid-template-columns:minmax(130px,1.3fr) auto minmax(64px,.65fr) auto!important;
  align-items:center!important;
  gap:10px!important;
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
body[data-portal-role="STUDENT"] .student-next-exam-inline>span:first-child,
body[data-portal-role="STUDENT"] .student-next-exam-inline>time,
body[data-portal-role="STUDENT"] .student-next-exam-inline>strong{
  min-width:0!important;
  margin:0!important;
  white-space:nowrap!important;
}
body[data-portal-role="STUDENT"] .student-next-exam-date{
  color:#69dcff!important;
  font-size:13px!important;
  font-weight:950!important;
}

@media(max-width:1024px){
  body[data-portal-role="STUDENT"] .student-exam-table--with-cdf .student-exam-table-head,
  body[data-portal-role="STUDENT"] .student-exam-table--with-cdf .student-exam-date-row--cdf,
  body[data-portal-role="STUDENT"] .student-exam-table--with-cdf .student-exam-date-row--standard{
    grid-template-columns:minmax(54px,.72fr) minmax(62px,.86fr) minmax(66px,.88fr) minmax(88px,1.42fr) minmax(72px,.88fr)!important;
  }
  body[data-portal-role="STUDENT"] .student-exam-table--standard-only .student-exam-table-head,
  body[data-portal-role="STUDENT"] .student-exam-table--standard-only .student-exam-date-row--standard{
    grid-template-columns:minmax(62px,.7fr) minmax(128px,2.2fr) minmax(76px,.82fr)!important;
  }
  body[data-portal-role="STUDENT"] .student-exam-table-head>span,
  body[data-portal-role="STUDENT"] .student-exam-date-row>div{
    padding:8px 5px!important;
    font-size:11.5px!important;
  }
  body[data-portal-role="STUDENT"] .student-exam-date,
  body[data-portal-role="STUDENT"] .student-exam-test strong,
  body[data-portal-role="STUDENT"] .student-exam-subject,
  body[data-portal-role="STUDENT"] .student-exam-chapter{font-size:11.5px!important}
  body[data-portal-role="STUDENT"] .student-exam-status .status-badge{font-size:10.5px!important;padding:5px 4px!important}

  body[data-portal-role="STUDENT"] .student-next-exam-inline{
    grid-template-columns:minmax(105px,1.35fr) auto minmax(48px,.62fr) auto!important;
    gap:6px!important;
    padding:9px 8px!important;
  }
  body[data-portal-role="STUDENT"] .student-next-exam-inline>span:first-child{font-size:8.5px!important}
  body[data-portal-role="STUDENT"] .student-next-exam-date{font-size:11px!important}
  body[data-portal-role="STUDENT"] .student-next-exam-inline>strong{font-size:13px!important}
}
@media(max-width:560px){
  body[data-portal-role="STUDENT"] .student-exam-table-head>span,
  body[data-portal-role="STUDENT"] .student-exam-date-row>div{
    padding:7px 3px!important;
    font-size:10.5px!important;
  }
  body[data-portal-role="STUDENT"] .student-exam-date,
  body[data-portal-role="STUDENT"] .student-exam-test strong,
  body[data-portal-role="STUDENT"] .student-exam-subject,
  body[data-portal-role="STUDENT"] .student-exam-chapter{font-size:10.5px!important}
  body[data-portal-role="STUDENT"] .student-exam-status .status-badge{font-size:9.5px!important;padding:4px 3px!important}
  body[data-portal-role="STUDENT"] .student-exam-table--with-cdf .student-exam-table-head,
  body[data-portal-role="STUDENT"] .student-exam-table--with-cdf .student-exam-date-row--cdf,
  body[data-portal-role="STUDENT"] .student-exam-table--with-cdf .student-exam-date-row--standard{
    grid-template-columns:minmax(48px,.72fr) minmax(58px,.9fr) minmax(58px,.9fr) minmax(82px,1.48fr) minmax(66px,.92fr)!important;
  }
  body[data-portal-role="STUDENT"] .student-next-exam-inline{
    grid-template-columns:minmax(92px,1.3fr) auto minmax(42px,.58fr) auto!important;
    gap:4px!important;
  }
  body[data-portal-role="STUDENT"] .student-next-exam-inline>span:first-child{font-size:7.5px!important;letter-spacing:.04em!important}
  body[data-portal-role="STUDENT"] .student-next-exam-date{font-size:9.5px!important}
  body[data-portal-role="STUDENT"] .student-next-exam-inline>strong{font-size:12px!important}
  body[data-portal-role="STUDENT"] .student-next-exam-inline .status-badge{font-size:8px!important;padding:4px!important}
}

/* ========================= STUDENT HOME DASHBOARD ========================= */
body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
  width:100%!important;
  overflow:visible!important;
  margin-top:10px!important;
}
body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis .kpi-card{
  position:relative!important;
  min-width:0!important;
  min-height:112px!important;
  padding:10px!important;
  margin:0!important;
  overflow:hidden!important;
  transform:none!important;
  text-align:left!important;
}
body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis .kpi-card:hover,
body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis .kpi-card:active{
  transform:none!important;
}
body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis .kpi-top{
  position:absolute!important;
  top:10px!important;
  left:10px!important;
  right:10px!important;
  width:auto!important;
  margin:0!important;
}
body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis .kpi-icon{
  width:40px!important;
  height:40px!important;
}
body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis .kpi-card:not([data-student-next-exam])>b{
  position:absolute!important;
  top:15px!important;
  right:12px!important;
  margin:0!important;
  font-size:25px!important;
  line-height:1!important;
  text-align:right!important;
}
body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis .kpi-card>span{
  position:absolute!important;
  left:8px!important;
  right:8px!important;
  bottom:10px!important;
  width:auto!important;
  margin:0!important;
  text-align:center!important;
  font-size:12px!important;
  line-height:1.15!important;
  font-weight:850!important;
}
/* Next Exam uses the same compact card, with the date occupying the top-right. */
body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis [data-student-next-exam] .kpi-trend{
  position:absolute!important;
  top:3px!important;
  right:0!important;
  max-width:calc(100% - 48px)!important;
  margin:0!important;
  font-size:11px!important;
  font-weight:900!important;
  white-space:nowrap!important;
}
body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis [data-student-next-exam]>b{
  position:absolute!important;
  left:10px!important;
  right:10px!important;
  top:57px!important;
  margin:0!important;
  font-size:19px!important;
  line-height:1.05!important;
  text-align:left!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

@media(max-width:1024px){
  body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis{gap:6px!important}
  body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis .kpi-card{min-height:102px!important;padding:7px!important;border-radius:12px!important}
  body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis .kpi-top{top:7px!important;left:7px!important;right:7px!important}
  body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis .kpi-icon{width:34px!important;height:34px!important}
  body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis .kpi-icon svg{width:19px!important;height:19px!important}
  body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis .kpi-card:not([data-student-next-exam])>b{top:11px!important;right:8px!important;font-size:21px!important}
  body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis .kpi-card>span{bottom:8px!important;font-size:9.5px!important}
  body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis [data-student-next-exam] .kpi-trend{font-size:8.5px!important}
  body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis [data-student-next-exam]>b{top:51px!important;left:7px!important;right:7px!important;font-size:15px!important}
}
@media(max-width:560px){
  body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis{gap:4px!important}
  body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis .kpi-card{min-height:94px!important;padding:5px!important;border-radius:10px!important}
  body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis .kpi-top{top:5px!important;left:5px!important;right:5px!important}
  body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis .kpi-icon{width:30px!important;height:30px!important}
  body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis .kpi-icon svg{width:17px!important;height:17px!important}
  body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis .kpi-card:not([data-student-next-exam])>b{top:9px!important;right:6px!important;font-size:18px!important}
  body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis .kpi-card>span{left:3px!important;right:3px!important;bottom:7px!important;font-size:7.8px!important;line-height:1.08!important}
  body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis [data-student-next-exam] .kpi-trend{font-size:7px!important}
  body[data-portal-role="STUDENT"][data-portal-module="dashboard"] .student-dashboard-kpis [data-student-next-exam]>b{top:47px!important;left:5px!important;right:5px!important;font-size:12.5px!important}
}
