/* The employee table is the visual reference for every data-entry table. */
#mainContent .unified-data-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.75rem;margin-bottom:.5rem!important;padding:.65rem .75rem;border-radius:.65rem;background:#f8f9fa}
#mainContent .unified-data-toolbar h2,#mainContent .unified-data-toolbar h3{margin:0}
#mainContent .unified-data-toolbar .form-control-sm,#mainContent .unified-data-toolbar .form-select-sm,#mainContent .unified-data-toolbar .btn-sm{min-height:34px}
/* scrollbar-gutter:stable eltávolítva: üres táblázatnál (nincs görgetősáv) fehér
   csíkot hagyott a kék fejléc mellett jobb oldalt. */
#mainContent .unified-data-table-wrap{position:relative;max-width:100%;overflow:auto!important;border:1px solid #dee2e6!important;border-radius:.65rem!important;background:#fff;isolation:isolate}
#mainContent .unified-data-table{width:100%;margin-bottom:0!important;border-collapse:separate;border-spacing:0;color:#0b2d64;font-size:.88rem}
#mainContent .unified-data-table thead th{position:sticky!important;top:0!important;z-index:70!important;padding:.65rem .75rem;border-bottom:2px solid #cfd8e6;background:#eef2f7!important;color:#243b67;font-weight:600;line-height:1.15;white-space:nowrap;box-shadow:none}
#mainContent .unified-data-table tbody td{padding:.58rem .75rem;border-bottom:1px solid #dbe3ed;background:#fff;vertical-align:middle}
#mainContent .unified-data-table tbody tr:nth-child(even)>td{background:#fbfcfe}
#mainContent .unified-data-table tbody tr:hover>td{background:#dff2e5!important}
#mainContent .unified-data-table tbody tr:last-child>td{border-bottom:0}
#mainContent .unified-data-table .drag,#mainContent .unified-data-table .drag-handle{color:#315b96!important;font-size:1.1rem;cursor:grab}
#mainContent .unified-data-table button img{display:block;width:19px!important;height:19px!important;object-fit:contain}
#mainContent .unified-data-table .btn-sm{display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:32px;padding:.25rem .4rem;border-radius:.5rem}


/* Uniform top controls: match the employee toolbar exactly. */
#mainContent .unified-data-toolbar>div:last-child{
  display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.5rem;
}
#mainContent .unified-data-toolbar>div:last-child>.btn,
#mainContent .unified-data-toolbar>div:last-child>.form-control,
#mainContent .unified-data-toolbar>div:last-child>.form-select,
#mainContent .unified-data-toolbar>div:last-child>input,
#mainContent .unified-data-toolbar>div:last-child>select{
  height:34px!important;min-height:34px!important;border-radius:.55rem!important;
  font-size:.86rem!important;line-height:1.2!important;margin:0!important;
}
#mainContent .unified-data-toolbar>div:last-child>.btn{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  padding:.25rem .75rem!important;white-space:nowrap;
}
#mainContent .unified-data-toolbar>div:last-child>.btn:has(>img:only-child){
  width:38px!important;min-width:38px!important;padding:.25rem!important;
}
#mainContent .unified-data-toolbar>div:last-child>.btn>img{
  width:19px!important;height:19px!important;object-fit:contain!important;
}
#mainContent .unified-data-toolbar>div:last-child>.form-select,
#mainContent .unified-data-toolbar>div:last-child>select{
  width:auto!important;padding-top:.25rem!important;padding-bottom:.25rem!important;
}

#mainContent .unified-sort-mark{color:#7a8491!important;font-weight:400!important;margin-left:.2rem}
/* Subject and classroom headers use the same solid style as the employee table. */
#mainContent #subjectTable thead,
#mainContent #subjectTable thead tr,
#mainContent #subjectTable thead th,
#mainContent #classroomTable thead,
#mainContent #classroomTable thead tr,
#mainContent #classroomTable thead th{
  background:#eef2f7!important;
  background-color:#eef2f7!important;
  background-image:none!important;
  color:#243b67!important;
  font-weight:600!important;
  box-shadow:none!important;
}


/* Subject and classroom: only selection, drag handle and name stay fixed on the left. */
#mainContent #subjectTable thead th:nth-child(3),
#mainContent #subjectTable tbody td:nth-child(3){
  position:sticky!important;left:64px!important;z-index:45!important;
  width:auto!important;min-width:260px!important;max-width:none!important;
}
#mainContent #classroomTable thead th:nth-child(3),
#mainContent #classroomTable tbody td:nth-child(3){
  position:sticky!important;left:64px!important;z-index:45!important;
  width:auto!important;min-width:240px!important;max-width:none!important;
}
#mainContent #subjectTable thead th:nth-child(4),
#mainContent #subjectTable tbody td:nth-child(4),
#mainContent #subjectTable thead th:nth-child(5),
#mainContent #subjectTable tbody td:nth-child(5),
#mainContent #classroomTable thead th:nth-child(4),
#mainContent #classroomTable tbody td:nth-child(4),
#mainContent #classroomTable thead th:nth-child(5),
#mainContent #classroomTable tbody td:nth-child(5){
  position:static!important;left:auto!important;z-index:auto!important;
  width:auto!important;min-width:0!important;max-width:none!important;
}
#mainContent #subjectTable thead th:nth-child(3),
#mainContent #classroomTable thead th:nth-child(3){
  top:0!important;z-index:170!important;background:#eef2f7!important;
}
#mainContent #subjectTable tbody td:nth-child(3),
#mainContent #classroomTable tbody td:nth-child(3){
  font-weight:600!important;
}


/* Subject/classroom row actions match employee edit and delete buttons. */
#mainContent #subjectTable .editSubjectBtn,
#mainContent #classroomTable .editClassroomBtn,
#mainContent #subjectTable .deleteSubjectBtn,
#mainContent #classroomTable .deleteClassroomBtn{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;
  padding:4px!important;border-radius:.5rem!important;background:#fff!important;
  box-shadow:none!important;
}

/* Minden alapadat-tábla férjen el a rendelkezésre álló képernyőszélességen.
   A hosszabb adatok több sorba törnek; vízszintes görgetés nem szükséges. */
html body #mainContent .teacher-data-table-wrap,
html body #mainContent #studentTableWrap,
html body #mainContent #classeTableWrap,
html body #mainContent #subjectTableWrap,
html body #mainContent #classroomTableWrap{
  width:100%!important;
  max-width:100%!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
}

html body #mainContent #teacherTable,
html body #mainContent #studentTable,
html body #mainContent #classeTable,
html body #mainContent #subjectTable,
html body #mainContent #classroomTable{
  width:100%!important;
  /* Üres táblázatnál (csak fejléc + „Nincs megjeleníthető…" sor) a tábla ne
     zsugorodjon a tartalomhoz: mindig töltse ki a panel teljes szélességét,
     különben a kék fejléc mellett fehér csík marad jobb oldalt. */
  min-width:100%!important;
  max-width:100%!important;
  table-layout:fixed!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  /* A custom.css .table{overflow:hidden} szabálya miatt a táblázat maga válna
     a sticky fejléc görgetési konténerévé, ezért a fejléc elgörögne. A görgetés
     a .*-table-wrap dolga; a táblázaton az overflow legyen látható. */
  overflow:visible!important;
}

html body #mainContent #teacherTable th,
html body #mainContent #teacherTable td,
html body #mainContent #studentTable th,
html body #mainContent #studentTable td,
html body #mainContent #classeTable th,
html body #mainContent #classeTable td,
html body #mainContent #subjectTable th,
html body #mainContent #subjectTable td,
html body #mainContent #classroomTable th,
html body #mainContent #classroomTable td{
  position:static!important;
  left:auto!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  padding:.42rem .35rem!important;
  white-space:normal!important;
  /* Ami nem fér ki a fix szélességű cellába, azt elválasztjuk (pl. az
     "Órakedvezmény"), hogy ne vágódjon le. A többszavas címkék szóhatáron
     tördelnek; csak a hosszú, szóköz nélküli szó törik el, ott is csak
     akkor, ha másképp kilógna. */
  overflow-wrap:break-word!important;
  word-break:normal!important;
  hyphens:auto!important;
  font-size:clamp(.67rem,.72vw,.84rem)!important;
  line-height:1.25!important;
  /* A fejlécek egységes magasságban, alulra igazítva üljenek – így a
     egysoros és a kétsoros feliratok alja egy vonalban van. */
  vertical-align:bottom!important;
}

/* A fejléc tartalma: felirat, rendezés és szűrő egy sorban, középre zárva.
   Korábban a szűrőgomb külön sorba csúszott, amitől a fejléc magas és
   egyenetlen lett. */
html body #mainContent .unified-data-table thead th{
  text-align:left;
}
html body #mainContent .unified-data-table tbody td{
  text-align:left!important;
}
/* Minden entitás-táblázatban a fejléc és a cellák szövege BALRA igazuljon
   (az Alkalmazottak táblázata nem .unified-data-table, ezért ID alapján is
   kell). A jelölő-, fogantyú-, szín- és műveleti oszlopok középre igazítását
   a specifikusabb :nth-child()/:last-child szabályok tartják meg. */
html body #mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) thead th{
  /* A fejléc balra zárjon. A korábbi sorkizárás (justify) a több szóból álló,
     két sorba törő feliratoknál (pl. "RELATÍV ÓRASZÁM") széthúzta az első sort,
     így az középre igazítottnak tűnt. */
  text-align:left!important;
}
html body #mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) tbody td{
  text-align:left!important;
}
/* A fejléc-szűrő (tölcsér) a felirat ALATT, külön sorban, balra igazítva
   jelenjen meg. */
html body #mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) thead th .ecf-button{
  float:none!important;
  display:flex!important;
  vertical-align:middle!important;
  margin:4px 0 0 0!important;
}
html body #mainContent .unified-data-table thead th .ecf-button{
  margin-left:.35rem;
  vertical-align:middle;
  flex:0 0 auto;
}
/* A szűrő-tölcsér helyét ELŐRE lefoglaljuk a fejlécben (alsó behúzás), és a
   gombot abszolút pozícióban tesszük oda. Így amikor a szűrők betöltéskor
   megjelennek, NEM nő meg a fejléc magassága → nincs "ugrálás"/vibrálás. */
html body #mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) thead th{
  position:relative!important;
  padding-bottom:30px!important;
}
html body #mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) thead th .ecf-button{
  position:absolute!important;
  left:.35rem!important;
  bottom:6px!important;
  margin:0!important;
  float:none!important;
}

/* A ragadós fejléchez a THEAD elemet is sticky-vé tesszük (nem csak a TH-t) –
   így az Alkalmazottak/Tanulók/Osztályok fejléce is úgy tapad, mint a
   Tantárgyaknál/Tantermeknél. */
html body #mainContent #teacherTable thead,
html body #mainContent #studentTable thead,
html body #mainContent #classeTable thead,
html body #mainContent #subjectTable thead,
html body #mainContent #classroomTable thead{
  position:sticky!important;
  top:0!important;
  z-index:160!important;
}
html body #mainContent #teacherTable thead th,
html body #mainContent #studentTable thead th,
html body #mainContent #classeTable thead th,
html body #mainContent #subjectTable thead th,
html body #mainContent #classroomTable thead th{
  position:sticky!important;
  top:0!important;
  z-index:170!important;
  background:#eef2f7!important;
  background-color:#eef2f7!important;
  vertical-align:middle!important;
}

/* Minden cella tartalma függőlegesen középen üljön – a magasabb sorokban
   (jelölő + fogantyú) is középre igazodjon a szöveg, minden entitásnál. */
html body #mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) tbody :is(th,td){
  vertical-align:middle!important;
}

/* Jelölés és rendezőfogantyú. */
html body #mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) :is(th,td):nth-child(1),
html body #mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) :is(th,td):nth-child(2){
  width:30px!important;
  min-width:30px!important;
  max-width:30px!important;
  padding-left:.15rem!important;
  padding-right:.15rem!important;
  text-align:center!important;
}

/* A név kapja a legtöbb helyet. */
html body #mainContent #teacherTable :is(th,td):nth-child(3){width:15%!important;}
html body #mainContent #studentTable :is(th,td):nth-child(3){width:18%!important;}
html body #mainContent #classeTable :is(th,td):nth-child(3){width:11%!important;}
html body #mainContent #subjectTable :is(th,td):nth-child(3){width:20%!important;}
html body #mainContent #classroomTable :is(th,td):nth-child(3){width:15%!important;}

/* Szín- és műveleti oszlopok kompaktak maradnak. */
html body #mainContent #teacherTable :is(th,td):nth-last-child(2),
html body #mainContent #studentTable :is(th,td):nth-last-child(2),
html body #mainContent #classeTable :is(th,td):nth-last-child(2){width:42px!important;text-align:center!important;}
html body #mainContent #teacherTable :is(th,td):last-child,
html body #mainContent #studentTable :is(th,td):last-child,
html body #mainContent #classeTable :is(th,td):last-child{width:74px!important;white-space:nowrap!important;text-align:center!important;}
html body #mainContent #teacherTable td.teacher-actions{display:table-cell!important;vertical-align:middle!important;}

html body #mainContent #subjectTable :is(th,td):nth-last-child(3),
html body #mainContent #classroomTable :is(th,td):nth-last-child(3){width:42px!important;text-align:center!important;}
html body #mainContent #subjectTable :is(th,td):nth-last-child(2),
html body #mainContent #subjectTable :is(th,td):last-child,
html body #mainContent #classroomTable :is(th,td):nth-last-child(2),
html body #mainContent #classroomTable :is(th,td):last-child{width:36px!important;text-align:center!important;}

/* A numerikus és logikai mezők keskenyebbek, középre igazítva. */
html body #mainContent #teacherTable :is(th,td):nth-child(9),
html body #mainContent #teacherTable :is(th,td):nth-child(10),
html body #mainContent #teacherTable :is(th,td):nth-child(11),
html body #mainContent #studentTable :is(th,td):nth-child(7),
html body #mainContent #studentTable :is(th,td):nth-child(8),
html body #mainContent #classeTable :is(th,td):nth-child(5),
html body #mainContent #classeTable :is(th,td):nth-child(7),
html body #mainContent #classeTable :is(th,td):nth-child(8),
html body #mainContent #classeTable :is(th,td):nth-child(9),
html body #mainContent #classeTable :is(th,td):nth-child(10),
html body #mainContent #subjectTable :is(th,td):nth-child(5),
html body #mainContent #subjectTable :is(th,td):nth-child(6),
html body #mainContent #subjectTable :is(th,td):nth-child(7),
html body #mainContent #subjectTable :is(th,td):nth-child(8),
html body #mainContent #subjectTable :is(th,td):nth-child(9),
html body #mainContent #classroomTable :is(th,td):nth-child(5),
html body #mainContent #classroomTable :is(th,td):nth-child(10){
  width:5.2%!important;
  text-align:left!important;
}

@media (max-width:1200px){
  html body #mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) :is(th,td){
    padding:.34rem .22rem!important;
    font-size:.66rem!important;
  }
  html body #mainContent :is(#teacherTable,#studentTable,#classeTable) :is(th,td):last-child{width:68px!important;}
}
#mainContent #subjectTable .editSubjectBtn,
#mainContent #classroomTable .editClassroomBtn{
  border:1px solid #315b96!important;
}
#mainContent #subjectTable .deleteSubjectBtn,
#mainContent #classroomTable .deleteClassroomBtn{
  border:1px solid #dc3545!important;
}
#mainContent #subjectTable .editSubjectBtn img,
#mainContent #subjectTable .deleteSubjectBtn img,
#mainContent #classroomTable .editClassroomBtn img,
#mainContent #classroomTable .deleteClassroomBtn img{
  width:19px!important;height:19px!important;object-fit:contain!important;
}

#mainContent .header-action-icons{display:flex;align-items:center;justify-content:center;gap:.35rem;min-width:60px}
#mainContent .header-action-icon{width:26px;height:26px;padding:2px;border:0;background:transparent;border-radius:4px;display:inline-flex;align-items:center;justify-content:center}
#mainContent .header-action-icon:hover{background:#dde5ef}
#mainContent .header-action-icon img,#simpleHeaderBulkModal .btn img{width:19px!important;height:19px!important;object-fit:contain}


/* Uniform records: classroom row height and white/gray zebra striping. */
#mainContent #teacherTable tbody tr,
#mainContent #studentTable tbody tr,
#mainContent #classeTable tbody tr,
#mainContent #subjectTable tbody tr,
#mainContent #classroomTable tbody tr{
  height:48px!important;
}
#mainContent #teacherTable tbody td,
#mainContent #studentTable tbody td,
#mainContent #classeTable tbody td,
#mainContent #subjectTable tbody td,
#mainContent #classroomTable tbody td{
  height:48px!important;padding:.48rem .6rem!important;vertical-align:middle!important;
  background:#fff!important;
}
#mainContent #teacherTable tbody tr:nth-child(even)>td,
#mainContent #studentTable tbody tr:nth-child(even)>td,
#mainContent #classeTable tbody tr:nth-child(even)>td,
#mainContent #subjectTable tbody tr:nth-child(even)>td,
#mainContent #classroomTable tbody tr:nth-child(even)>td{
  background:#f4f6f8!important;
}
#mainContent #teacherTable tbody tr:hover>td,
#mainContent #studentTable tbody tr:hover>td,
#mainContent #classeTable tbody tr:hover>td,
#mainContent #subjectTable tbody tr:hover>td,
#mainContent #classroomTable tbody tr:hover>td{
  background:#dff2e5!important;
}
/* Equal entity headers and centered numeric/action columns. */
#mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) thead tr,
#mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) thead th{
  /* Elég magas ahhoz, hogy a felirat ALATTI szűrőgomb is teljesen kiférjen és
     kattintható legyen (korábban a 40px-es fix magasság levágta). */
  height:auto!important;min-height:62px!important;max-height:none!important;
  padding:6px 8px!important;vertical-align:top!important;
}
#mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) :is(th,td):has(>button),
#mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) :is(th,td):has(input[type="checkbox"]),
#mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) :is(th,td).table-action-cell,
#mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) :is(th,td):nth-child(1),
#mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) :is(th,td):nth-child(2){
  text-align:center!important;vertical-align:middle!important;
}
#mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) :is(th,td):has(>button) > button,
#mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) :is(th,td) .header-action-icons{
  margin-left:auto!important;margin-right:auto!important;
}
#mainContent #teacherTable :is(th,td):is(:nth-child(5),:nth-child(9),:nth-child(10),:nth-child(11),:nth-child(13),:nth-child(14)),
#mainContent #studentTable :is(th,td):is(:nth-child(5),:nth-child(7),:nth-child(8),:nth-child(10),:nth-child(11)),
#mainContent #classeTable :is(th,td):is(:nth-child(5),:nth-child(7),:nth-child(8),:nth-child(9),:nth-child(10),:nth-child(14),:nth-child(15)),
#mainContent #subjectTable :is(th,td):is(:nth-child(5),:nth-child(6),:nth-child(7),:nth-child(8),:nth-child(9),:nth-child(12),:nth-child(13),:nth-child(14)),
#mainContent #classroomTable :is(th,td):is(:nth-child(5),:nth-child(10),:nth-child(12),:nth-child(13),:nth-child(14)){
  text-align:left!important;vertical-align:middle!important;
}
/* Row action spacing follows the employee table. */
html body #mainContent #teacherTable tbody .teacher-actions,
html body #mainContent #studentTable tbody td:last-child,
html body #mainContent #classeTable tbody td:last-child,
html body #mainContent #subjectTable tbody .table-action-cell,
html body #mainContent #classroomTable tbody .table-action-cell{
  height:48px!important;padding:4px!important;text-align:center!important;
  vertical-align:middle!important;white-space:nowrap!important;
}
html body #mainContent #teacherTable tbody .teacher-actions .btn,
html body #mainContent #studentTable tbody td:last-child .btn,
html body #mainContent #classeTable tbody td:last-child .btn,
html body #mainContent #subjectTable tbody .table-action-cell .btn,
html body #mainContent #classroomTable tbody .table-action-cell .btn{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;
  margin:0 2px!important;padding:4px!important;border-radius:.5rem!important;
}
html body #mainContent #subjectTable :is(thead,tbody) .table-action-cell,
html body #mainContent #classroomTable :is(thead,tbody) .table-action-cell{
  width:40px!important;min-width:40px!important;max-width:40px!important;
  padding-left:4px!important;padding-right:4px!important;
}

/* Employee toolbar and header actions: exact vertical centering. */
#mainContent #teacherDataRoot .teacher-data-toolbar > .btn:not(.d-none) {
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding-top:0!important;
  padding-bottom:0!important;
  line-height:1!important;
}
#mainContent #teacherTable thead th:has(.header-action-icon) {
  text-align:center!important;
  vertical-align:middle!important;
}
#mainContent #teacherTable thead .header-action-icons {
  width:100%!important;
  height:32px!important;
  min-height:32px!important;
  margin:0 auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}
#mainContent #teacherTable thead .header-action-icon {
  margin:0!important;
  align-self:center!important;
  vertical-align:middle!important;
}
/* Unified row edit/delete buttons for every main data table. */
html body #mainContent :is(
  #teacherTable .teacher-edit,
  #teacherTable .teacher-delete,
  #studentTable .edit,
  #studentTable .deleteStudentBtn,
  #classeTable .edit,
  #classeTable .deleteClasseBtn,
  #subjectTable .editSubjectBtn,
  #subjectTable .deleteSubjectBtn,
  #classroomTable .editClassroomBtn,
  #classroomTable .deleteClassroomBtn
) {
  display:inline-flex!important;
  visibility:visible!important;
  opacity:1!important;
  align-items:center!important;
  justify-content:center!important;
  width:32px!important;
  height:32px!important;
  min-width:32px!important;
  min-height:32px!important;
  margin:0 2px!important;
  padding:4px!important;
  border-style:solid!important;
  border-width:1px!important;
  border-radius:.5rem!important;
  background:#fff!important;
  box-shadow:none!important;
}
html body #mainContent :is(
  #teacherTable .teacher-edit,
  #studentTable .edit,
  #classeTable .edit,
  #subjectTable .editSubjectBtn,
  #classroomTable .editClassroomBtn
) {
  border-color:#315b96!important;
}
html body #mainContent :is(
  #teacherTable .teacher-delete,
  #studentTable .deleteStudentBtn,
  #classeTable .deleteClasseBtn,
  #subjectTable .deleteSubjectBtn,
  #classroomTable .deleteClassroomBtn
) {
  border-color:#dc3545!important;
}
html body #mainContent :is(
  #teacherTable .teacher-edit,
  #teacherTable .teacher-delete,
  #studentTable .edit,
  #studentTable .deleteStudentBtn,
  #classeTable .edit,
  #classeTable .deleteClasseBtn,
  #subjectTable .editSubjectBtn,
  #subjectTable .deleteSubjectBtn,
  #classroomTable .editClassroomBtn,
  #classroomTable .deleteClassroomBtn
) > img {
  display:block!important;
  width:19px!important;
  height:19px!important;
  object-fit:contain!important;
}
/* Bulk deletion belongs to table headers, never to top toolbars. */
html body #mainContent :is(
  #teacherDeleteSelected,
  #studentDelete,
  #classeDelete,
  #deleteSelectedSubjectBtn,
  #deleteSelectedClassroomBtn
) {
  display:none!important;
}
/* Nem szerkeszthető (a rendszer által számolt) mezők egységes szürke kinézete
   – Alkalmazottak, Tanulók, Tantárgyak, Osztályok, Tantermek űrlapjain.
   Pl. Tényleges óraszám, Kötelező óraszám (ahol számolt), Létszám. */
.form-control.readonly-computed,
input.readonly-computed[readonly],
input.readonly-computed:disabled {
  background-color:#e9ecef !important;
  color:#6c757d !important;
  cursor:not-allowed;
  opacity:1;
}

/* A színválasztó és a mellette lévő dobókocka mindig azonos magasságú. */
.random-color-input-group {
  align-items:stretch;
}
.random-color-input-group > .form-control-color,
.random-color-input-group > button {
  height:42px !important;
  min-height:42px !important;
  max-height:42px !important;
  box-sizing:border-box;
}
.random-color-input-group > .form-control-color {
  padding:.375rem !important;
}

/* Az oszlopszűrő külön sorban, a fejléc felirata alatt jelenjen meg. */
#teacherTable thead .ecf-button,
#studentTable thead .ecf-button,
#subjectTable thead .ecf-button,
#classroomTable thead .ecf-button,
#classeTable thead .ecf-button {
  display:flex !important;
  margin:4px auto 0 !important;
}

/* A Tantárgy és Tanterem szerkesztőben nincs szükség Naplózás fülre. */
#subjectModal #subjectTabs,
#classroomModal #classroomTabs,
#subjectModal [data-subject-section="naplozas"],
#classroomModal [data-classroom-section="naplozas"] {
  display:none !important;
}

/* A fejléc eszköztár villódzásának megszüntetése: a Műveletek menübe / a
   táblázat fejlécébe áthelyezett vezérlőket már a JS lefutása előtt elrejtjük,
   így betöltéskor nem villan fel a régi elrendezés. (A Műveletek menü ezeket
   rejtetten is meghajtja, a rendezést a fejléc ikon + a menü kezeli.) */
#mainContent #teacherDataSort,
#mainContent #studentSort,
#mainContent #classeSort,
#mainContent #subjectSortSelect,
#mainContent #classroomSortSelect,
#mainContent #teacherDataSearch,
#mainContent #studentSearch,
#mainContent #teacherImport,
#mainContent #studentImport,
#mainContent #classeImport,
#mainContent #importBtnSubject,
#mainContent #importBtnClassroom,
#mainContent #teacherExport,
#mainContent #studentExport,
#mainContent #classeExport,
#mainContent #exportSubjectBtn,
#mainContent #exportClassroomBtn,
#mainContent #teacherAttendancePrint,
#mainContent #studentAttendance,
/* A unified_data_controls.js által létrehozott, id nélküli / "Direct" másolatok
   (Alkalmazottaknál felvillanó sárga Import / kék Export) – ezek is a Műveletek
   menübe kerültek. */
#mainContent #teacherImportDirect,
#mainContent #teacherAttendanceDirect,
#mainContent a[href*="/export/"] {
  display: none !important;
}
/* Az Alkalmazottak eszköztárában a gombokat egy magas specifikusságú szabály
   (#mainContent #teacherDataRoot .teacher-data-toolbar > .btn) inline-flexre
   állítja, ami legyőzte a fenti elrejtést → a régi Import/Export/Jelenléti ív
   egy pillanatra felvillant. Ezért itt 3 azonosítós, erősebb szabállyal rejtünk. */
#mainContent #teacherDataRoot #teacherImport,
#mainContent #teacherDataRoot #teacherExport,
#mainContent #teacherDataRoot #teacherImportDirect,
#mainContent #teacherDataRoot #teacherAttendanceDirect,
#mainContent #teacherDataRoot #teacherAttendancePrint,
#mainContent #teacherDataRoot #teacherDataSort,
#mainContent #teacherDataRoot #teacherDataSearch {
  display: none !important;
}

/* Az "Új …" gombok ikonja CSS-ből (bootstrap-icons), hogy már az ELSŐ
   kirajzoláskor ott legyen – így a zöld gomb nem "vibrál" (nem a JS teszi be
   utólag, ami betöltéskor/újrarajzoláskor ugrálást okozott). */
#mainContent #teacherAdd::before,
#mainContent #studentAdd::before,
#mainContent #classeAdd::before,
#mainContent #newSubjectBtn::before,
#mainContent #newClassroomBtn::before {
  font-family: "bootstrap-icons" !important;
  font-weight: normal;
  font-style: normal;
  margin-right: .4rem;
  display: inline-block;
  vertical-align: -.1em;
  line-height: 1;
}
#mainContent #teacherAdd::before { content: "\f4db"; }
#mainContent #studentAdd::before { content: "\f4d0"; }
#mainContent #classeAdd::before { content: "\f4d0"; }
#mainContent #newSubjectBtn::before { content: "\f444"; }
#mainContent #newClassroomBtn::before { content: "\f308"; }

/* Biztos, hogy MINDIG fix elrendezés + 100% szélesség (üresen is teljes
   szélességű a fejléc), függetlenül attól, hogy a tábla a #mainContent alatt
   van-e éppen. Ugyanaz a specifikusság, mint a custom.css max-content
   szabályáé, de ez a fájl később töltődik → forrássorrend alapján ez nyer. */
html body #teacherTable,
html body #studentTable,
html body #subjectTable,
html body #classroomTable,
html body #classeTable {
  width: 100% !important;
  min-width: 100% !important;
  table-layout: fixed !important;
}

/* Az eszköztár gombjain csak a színek animálódjanak: a custom.css
   „transition: all" szabálya miatt betöltéskor a méret/padding/betűméret
   átállása 0,25 mp-es „animációként" látszott (Tantárgyak, Tantermek „Új" gombja). */
#mainContent .unified-data-toolbar .btn,
#mainContent #newSubjectBtn,
#mainContent #newClassroomBtn {
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s !important;
}

/* Két soros fejlécek: MINDEN karakter pontosan egymás alatt, balra zárva,
   semmilyen behúzás/sorkizárás (az "OSZTÁLY-BONTÁS", "RELATÍV ÓRASZÁM" stb.
   első sora ne legyen beljebb). A fájl végén, így forrássorrend szerint nyer. */
html body #mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) thead th,
html body #mainContent :is(#teacherTable,#studentTable,#classeTable,#subjectTable,#classroomTable) thead th * {
  text-align: left !important;
  text-align-last: left !important;
  text-indent: 0 !important;
  text-justify: none !important;
}
