/* EDUHUNT R228
   Principal Portal only: Student Result History dark-mode completion.
   No result logic, API, permissions, ranks, marks, or database behavior is changed.
*/

/* Desktop dark mode */
@media screen and (min-width:1025px){
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history{
    color:#eaf4ff!important;
  }

  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .principal-student-profile>div{
    background:#08213a!important;
    border-color:#315873!important;
    box-shadow:none!important;
  }
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .principal-student-profile span{
    color:#92aac0!important;
  }
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .principal-student-profile b{
    color:#ffffff!important;
  }

  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .principal-student-test{
    background:#071b31!important;
    border-color:#315873!important;
    box-shadow:none!important;
  }
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .principal-student-test>summary{
    background:#0a2b48!important;
    border-color:#315873!important;
    color:#eaf4ff!important;
  }
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .principal-student-test>summary:hover{
    background:#0d365a!important;
  }
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .principal-student-test>summary b{
    color:#72c4ff!important;
  }
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .principal-student-test>summary small{
    color:#9db3c8!important;
  }
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .principal-student-test-body{
    background:#061a2d!important;
    color:#eaf4ff!important;
    border-top:1px solid #315873!important;
  }

  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .metric-strip,
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .metric{
    background:#071b31!important;
    border-color:#315873!important;
  }
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .metric b{
    color:#ffffff!important;
  }
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .metric span{
    color:#9ab0c5!important;
  }
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .section-title{
    color:#72c4ff!important;
    border-color:#315873!important;
  }

  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .table-card,
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .table-toolbar,
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .table-wrap{
    background:#071b31!important;
    border-color:#315873!important;
    color:#eaf4ff!important;
  }
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .table-toolbar strong,
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .table-toolbar small{
    color:#eaf4ff!important;
  }
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history table,
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history thead,
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history tbody,
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history tr{
    background:#071b31!important;
    color:#eaf4ff!important;
  }
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history th{
    background:#0a2b48!important;
    color:#dff1ff!important;
    border-color:#315873!important;
  }
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history td{
    background:#071b31!important;
    color:#eaf4ff!important;
    border-color:#244760!important;
  }
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history tbody tr:nth-child(even) td{
    background:#08213a!important;
  }

  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .principal-wrong-grid>div{
    background:#32171d!important;
    border-color:#7c3d46!important;
  }
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .principal-wrong-grid b{
    color:#ff9ba6!important;
  }
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .principal-wrong-grid span{
    color:#f2c7cd!important;
  }

  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .empty-state,
  body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] .principal-student-history .notice{
    background:#08213a!important;
    border-color:#315873!important;
    color:#eaf4ff!important;
  }
}

/* Mobile/tablet dark mode safety: the existing Principal mobile dialog is already dark;
   these rules prevent any white result/table surface from leaking through. */
@media screen and (max-width:1024px){
  body[data-portal-role="PRINCIPAL"] .principal-student-history .principal-student-test>summary,
  body[data-portal-role="PRINCIPAL"] .principal-student-history .table-toolbar,
  body[data-portal-role="PRINCIPAL"] .principal-student-history th{
    background:#0a2b48!important;
    color:#eaf4ff!important;
    border-color:#315873!important;
  }
  body[data-portal-role="PRINCIPAL"] .principal-student-history .principal-student-test,
  body[data-portal-role="PRINCIPAL"] .principal-student-history .principal-student-test-body,
  body[data-portal-role="PRINCIPAL"] .principal-student-history .table-card,
  body[data-portal-role="PRINCIPAL"] .principal-student-history .table-wrap,
  body[data-portal-role="PRINCIPAL"] .principal-student-history td{
    background:#061a2d!important;
    color:#eaf4ff!important;
    border-color:#315873!important;
  }
}
