/*NAPOMENA: zajednička pravila za sve tablice*/

.table-wrap{
  position:relative;
  border:1px solid var(--tableWrapBorder);
  border-radius:0 14px 14px 14px;
  background:var(--tableWrapBg);
  box-shadow:0 8px 22px rgba(15,23,42,.05);
  flex:1;
  min-height:0;
  overflow-x:auto;
  overflow-y:auto;
  overflow-anchor:none;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  isolation:isolate;

  transition:
    opacity .22s ease,
    transform .28s cubic-bezier(.2,.8,.2,1),
    box-shadow .22s ease;
  transform-origin:top center;
}


.table-wrap.isLoading{
  opacity:.72;
}

.table-wrap.isReveal{
  animation:tableReveal .34s cubic-bezier(.2,.8,.2,1);
}

table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  min-width:1200px;
  font-size:14px;
}

thead{
  position:sticky;
  top:0;
  z-index:20;
}

thead tr{
  position:relative;
  background:var(--tableHeadGradient, var(--tableHeadBg));
  z-index:20;
}

thead th{
  position:sticky;
  top:0;
  background:transparent;
  color:var(--tableHeadText, #fff);
  padding:12px 12px;
  font-weight:700;
  font-size:14px;
  letter-spacing:.02em;
  white-space:nowrap;
  z-index:21;
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.08);
}



th.thSort{
  cursor:pointer;
  position:relative;
}

th.thSort::after{
  content:"⇅";
  position:absolute;
  right:6px;
  opacity:.4;
  font-size:11px;
}

tbody td{
  padding:12px 12px;
  border-bottom:1px solid var(--cardBorder);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--tableText);
  font-weight:500;
  font-size:14px;
}



.tdWrap{
  white-space:normal;
}

tbody tr:nth-child(odd){
  background:var(--tableRowOdd);
}

tbody tr:nth-child(even){
  background:var(--tableRowEven);
}

tbody tr:hover{
  background:var(--tableRowHover);
  transform:none;
  box-shadow:inset 0 0 0 1px rgba(25,55,102,.08);
}


tbody tr{
  transition:
    background-color .18s ease,
    transform .18s ease,
    box-shadow .18s ease;
}

tbody{
  transition:opacity .15s ease, transform .15s ease;
}

tbody.sorting{
  opacity:.25;
  transform:scale(.98);
}

#table thead.isIn th{
  animation:headIn .26s ease both;
}

#table tbody.isIn tr{
  animation:rowIn .28s cubic-bezier(.2,.8,.2,1) both;
}

/* širine i poravnanja po stvarnim nazivima stupaca */
th.col-ImePrezimeUcenika,
td.col-ImePrezimeUcenika{
  width:220px;
}

th.col-NazivNatjecanja,
td.col-NazivNatjecanja{
  width:340px;
}

th.col-Disciplina,
td.col-Disciplina{
  width:120px;
}

th.col-Kategorija,
td.col-Kategorija{
  width:120px;
}

th.col-Bodovi,
td.col-Bodovi{
  width:90px;
  text-align:center;
}

th.col-Nagrada,
td.col-Nagrada{
  width:90px;
  text-align:center;
}

th.col-PlasmanDrzavno,
td.col-PlasmanDrzavno{
  width:150px;
  text-align:center;
}

th.col-Mentor,
td.col-Mentor{
  width:190px;
}

th.col-Korepetitor,
td.col-Korepetitor{
  width:190px;
}

th.col-DatumNatjecanja,
td.col-DatumNatjecanja{
  width:120px;
  text-align:center;
}

th.col-Lokacija,
td.col-Lokacija{
  width:260px;
}

th.col-Razina,
td.col-Razina{
  width:120px;
  text-align:center;
}



#rowHoverCard{
  position:fixed;
  z-index:9999;
  pointer-events:none;
  background:#ffffff;
  border:1px solid var(--cardBorder);
  border-radius:16px;
  padding:14px 15px;
  min-width:260px;
  max-width:340px;
  box-shadow:0 18px 42px rgba(16,24,40,.18);
  opacity:0;
  transform:translateY(8px) scale(.98);
  transition:opacity .18s ease, transform .18s ease;
}

#rowHoverCard.visible{
  opacity:1;
  transform:translateY(0) scale(1);
}

#rowHoverCard .name{
  font-weight:900;
  font-size:15px;
  line-height:1.2;
  color:var(--headerBg);
  margin-bottom:4px;
}

#rowHoverCard .hoverCardHead{
  margin-bottom:8px;
}

#rowHoverCard .hoverMentor,
#rowHoverCard .hoverKorep{
  font-size:12.5px;
  line-height:1.35;
  color:#475569;
}

#rowHoverCard .hoverKorep{
  margin-top:2px;
}

#rowHoverCard .hoverDiscipline{
  font-size:13px;
  font-weight:800;
  letter-spacing:.15px;
  color:#0f172a;
  margin-bottom:10px;
  text-transform:uppercase;
}

#rowHoverCard .hoverSection{
  padding:12px 12px;
  margin:10px 0 10px;
  border-radius:16px;
  border:1px solid #e7edf5;
  background:linear-gradient(180deg,#f8fafc 0%, #f1f5f9 100%);
}

#rowHoverCard .hoverSection.tone-aw1{
  background:linear-gradient(180deg,#fff8db 0%, #fef1b8 100%);
  border-color:#ecd67a;
}

#rowHoverCard .hoverSection.tone-aw1 .hoverSectionTitle,
#rowHoverCard .hoverSection.tone-aw1 .hoverScoreLabel{
  color:#8a6a00;
}

#rowHoverCard .hoverSection.tone-aw1 .hoverScoreValue{
  color:#5f4700;
}

#rowHoverCard .hoverSection.tone-aw2{
  background:linear-gradient(180deg,#f3f6fb 0%, #e4ebf5 100%);
  border-color:#c7d3e3;
}

#rowHoverCard .hoverSection.tone-aw2 .hoverSectionTitle,
#rowHoverCard .hoverSection.tone-aw2 .hoverScoreLabel{
  color:#5f6f86;
}

#rowHoverCard .hoverSection.tone-aw2 .hoverScoreValue{
  color:#334155;
}

#rowHoverCard .hoverSection.tone-aw3{
  background:linear-gradient(180deg,#f8eee7 0%, #efd9c9 100%);
  border-color:#ddb79c;
}

#rowHoverCard .hoverSection.tone-aw3 .hoverSectionTitle,
#rowHoverCard .hoverSection.tone-aw3 .hoverScoreLabel{
  color:#8a5a3b;
}

#rowHoverCard .hoverSection.tone-aw3 .hoverScoreValue{
  color:#6b3f24;
}

#rowHoverCard .hoverSection.tone-neutral{
  background:linear-gradient(180deg,#f8fafc 0%, #eef2f7 100%);
  border-color:#d7dee8;
}

#rowHoverCard .hoverSection.tone-neutral .hoverSectionTitle,
#rowHoverCard .hoverSection.tone-neutral .hoverScoreLabel{
  color:#64748b;
}

#rowHoverCard .hoverSection.tone-neutral .hoverScoreValue{
  color:#0f172a;
}

#rowHoverCard .hoverSectionTitle{
  font-size:11px;
  font-weight:800;
  letter-spacing:.6px;
  text-transform:uppercase;
  color:#64748b;
  margin-bottom:8px;
}

#rowHoverCard .hoverScoreRow{
  display:flex;
  align-items:flex-end;
  gap:6px;
  margin-bottom:10px;
}

#rowHoverCard .hoverScoreValue{
  font-size:26px;
  line-height:1;
  font-weight:900;
  color:#0f172a;
}

#rowHoverCard .hoverScoreLabel{
  font-size:12px;
  font-weight:700;
  color:#64748b;
  padding-bottom:3px;
}

#rowHoverCard .hoverBadgesRow{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

#rowHoverCard .hoverAwardBadge,
#rowHoverCard .hoverStateBadge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:999px;
  padding:6px 11px;
  font-size:12px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.45);
}

#rowHoverCard .hoverAward1{
  background:#fff3bf;
  border:1px solid #f4d35e;
  color:#7a5b00;
}

#rowHoverCard .hoverAward2{
  background:#eef2f7;
  border:1px solid #d5dde7;
  color:#475569;
}

#rowHoverCard .hoverAward3{
  background:#f6e7de;
  border:1px solid #ddb89d;
  color:#8a4b24;
}

#rowHoverCard .hoverAward0{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  color:#64748b;
}

#rowHoverCard .hoverStateBadge.yes{
  background:#dff5e8;
  border:1px solid #a7d9bb;
  color:#1f7a46;
}

#rowHoverCard .hoverStateBadge.no{
  background:#f1f5f9;
  border:1px solid #d9e2ec;
  color:#64748b;
}

#rowHoverCard .hoverStateBadge.neutral{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  color:#64748b;
}

#rowHoverCard .hoverMeta{
  display:grid;
  gap:4px;
  font-size:12.5px;
  line-height:1.35;
  color:#334155;
}

#rowHoverCard .hoverMetaLabel{
  font-weight:800;
  color:#475569;
}

@keyframes rowIn{
  from{
    opacity:0;
    transform:translateY(4px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

@keyframes tableReveal{
  from{
    opacity:0;
    transform:translateY(10px) scale(.995);
  }
  to{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}

@keyframes headIn{
  from{
    opacity:0;
    transform:translateY(-6px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

.cell-student{
  position:relative;
  font-weight:800;
  color:var(--headerBg);
  padding-right:88px !important;
  cursor:pointer;
}


.cellStudentName{
  display:inline-block;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  vertical-align:middle;
}

.cellStudentOpenHint{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%) translateX(6px);
  opacity:0;
  pointer-events:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:64px;
  height:28px;
  padding:0 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  letter-spacing:.04em;
  background:rgba(255,255,255,.82);
  color:var(--headerBg);
  border:1px solid rgba(0,0,0,.08);
  box-shadow:0 6px 14px rgba(15,23,42,.08);
  backdrop-filter:blur(6px);
  transition:
    opacity .18s ease,
    transform .18s ease,
    background-color .18s ease;
}

tbody tr:hover .cellStudentOpenHint{
  opacity:1;
  transform:translateY(-50%) translateX(0);
}

tbody tr:hover .cell-student{
  text-decoration:none;
}

body.tableBorders tbody td{
  border-bottom:1px solid var(--tableGridLine);
  border-right:1px solid var(--tableGridLine);
}

body.tableBorders tbody td:last-child{
  border-right:none;
}

thead tr{
  position:relative;
  z-index:8;
}

tbody{
  position:relative;
  z-index:1;
}

body.tableBorders tbody tr:hover{
  background:var(--tableRowHover);
  box-shadow:inset 0 0 0 1px rgba(25,55,102,.05);
}