/* local/batchreport/style.css */

.br-wrap {
  max-width: 1600px;
  margin: 0 auto;
  padding: 10px 8px 22px;
}

.br-headerrow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 10px;
}

.br-title{
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.br-kra-btn { white-space: nowrap; }

.br-filterform{
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  margin-bottom: 14px;
}

.br-filtersrow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
}

.br-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 190px;
}

.br-field label {
  font-size: 12px;
  color: #555;
  margin: 0;
}

.br-field select,
.br-field input[type="date"] {
  height: 36px;
  padding: 6px 10px;
  border: 1px solid #cfcfcf;
  border-radius: 10px;
  background: #fff;
}

.br-excludeold{
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.br-excludeold input[type="checkbox"]{
  width: 16px;
  height: 16px;
}

.br-excludeold-label{
  margin: 0;
  font-size: 13px;
  color: #444;
  cursor: pointer;
}

.br-actionsrow{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top: 12px;
}

.br-tablewrap {
  overflow: auto;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  background: #fff;
}

table.br-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px; /* forces horizontal scroll when needed */
}

table.br-table th,
table.br-table td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
  white-space: nowrap;
}

table.br-table th {
  position: sticky;
  top: 0;
  background: #fafafa;
  z-index: 1;
  font-weight: 650;
}

/* Course + faculty in the same cell */
.br-coursecell{
  display:flex;
  justify-content:space-between;
  gap:10px;
}

/* ---------- Sortable header links + arrows ---------- */
/* Make header links look like normal text (not blue) */
table.br-table th a.br-sort{
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Default: show both arrows (▲▼) */
table.br-table th a.br-sort::after{
  content: "▲▼";
  font-size: 11px;
  opacity: 0.55;
  line-height: 1;
}

/* Active sorted column shows only one arrow */
table.br-table th a.br-sort-active.br-sort-asc::after{
  content: "▲";
  opacity: 1;
}

table.br-table th a.br-sort-active.br-sort-desc::after{
  content: "▼";
  opacity: 1;
}

.br-coursename{
  font-weight: 600;
}

.br-facultyname{
  color:#666;
  font-size: 12px;
  white-space: nowrap;
}
/* ---------- Faculty column only (no stretch) ---------- */
table.br-table {
  table-layout: fixed; /* required for ellipsis to work */
}

.br-col-faculty {
  width: 260px;
  max-width: 260px;
}

.br-td-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.br-empty td{
  padding: 14px 10px;
  color:#666;
  white-space: normal;
}

/* keep these classes but disable row background highlight */
.br-row-bad { background: transparent; }
.br-row-warn { background: transparent; }

/* ---------- KPI cell highlight (fails) ---------- */
/* New: cleaner gradient badge inside the cell (no bar) */
/* ---------- KPI cell highlight (fails) ---------- */
/* IMPORTANT:
   In index.php the classes are applied to the <td>, not to a <span>.
   So DO NOT use inline-block/pill styles that change layout.
   We style the TD background softly instead (safe for tables).
*/
.br-kpi-fail{
  font-weight: 700;
  border-radius: 0;
  border: 0;
  background: linear-gradient(135deg, rgba(244,67,54,0.22), rgba(244,67,54,0.08));
}

/* Remove any old bar */
.br-kpi-fail::before{
  content: none;
}



.br-pagination{
  margin-top: 12px;
}

.br-debugwrap{
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed #d9d9d9;
  border-radius: 12px;
  background: #fcfcfc;
}

.br-debugtitle{
  font-weight: 650;
  margin-bottom: 8px;
}

.br-debuglist{
  margin: 0;
  padding-left: 18px;
}

.br-muted { color: #666; font-size: 12px; }

.br-kra-table td{ white-space: normal; }
.br-kra-key{
  margin-top: 4px;
  font-size: 12px;
  color: #666;
}

.br-kra-input{
  width: 260px;
  max-width: 100%;
  height: 36px;
  padding: 6px 10px;
  border: 1px solid #cfcfcf;
  border-radius: 10px;
}
/* ---------- Summary band (below Debug) ---------- */
.br-summaryband{
  margin: 10px 0 12px;       /* normal spacing */
  display: inline-flex;      /* shrink to content width */
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: #fff;
}
/* Center the inline-flex summary band */
.br-wrap{
  text-align: center;
}
.br-wrap .br-filterform,
.br-wrap .br-tablewrap,
.br-wrap .br-debugwrap,
.br-wrap .br-headerrow{
  text-align: left; /* keep other sections normal */
}


.br-sumitem{
  padding: 6px 10px;
  flex: 0 0 auto;
  border: 1px solid #f0f0f0;
  border-radius: 10px;
  background: #e9e6e6;
  font-size: 13px;
  white-space: nowrap;
}

.br-sumitem strong{
  font-weight: 700;
}

@media (max-width: 700px){
  .br-summaryband{
    gap: 8px;
    justify-content: center;
  }
  .br-sumitem{
    white-space: normal;
  }
}

/* ---------- Column widths (edit these to manually control) ---------- */
:root{
  --br-w-owner:     160px;
  --br-w-batch:     200px;
  --br-w-faculty:   200px;
  --br-w-students:  90px;
  --br-w-avgatt:    170px;
  --br-w-feedback:  120px;
  --br-w-pqmock:    120px;
  --br-w-nps:       90px;
  --br-w-duration:  150px;
  --br-w-lectures:  110px;
  --br-w-hrstaught: 120px;
  --br-w-timely:    130px;
  --br-w-status:    120px;
}

/* Apply widths to both th and td */
.br-col-owner     { width: var(--br-w-owner); }
.br-col-batch     { width: var(--br-w-batch); }
.br-col-faculty   { width: var(--br-w-faculty); }
.br-col-students  { width: var(--br-w-students); }
.br-col-avgatt    { width: var(--br-w-avgatt); }
.br-col-feedback  { width: var(--br-w-feedback); }
.br-col-pqmock    { width: var(--br-w-pqmock); }
.br-col-nps       { width: var(--br-w-nps); }
.br-col-duration  { width: var(--br-w-duration); }
.br-col-lectures  { width: var(--br-w-lectures); }
.br-col-hrstaught { width: var(--br-w-hrstaught); }
.br-col-timeliness{ width: var(--br-w-timely); }
.br-col-status    { width: var(--br-w-status); }

/* Ensure ellipsis works inside fixed table layout */
.br-td-ellipsis{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.br-table thead tr.br-kra-row th{
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px 2px;
  opacity: 0.85;
}
#br-table-area.is-loading {
  opacity: 0.6;
  pointer-events: none;
}
