/* VƯỜN NGOẠI NGỮ v6.15.327 — REPORT + LANGUAGE UI
   Fixes the squeezed Teacher report header and makes English/Chinese management
   visually distinct across Học viên / Tiến độ / Báo cáo / BXH.
   Presentation only: no progress, ranking, reward, access or lesson logic changes. */

:root{
  --v327-en:#416fbd;
  --v327-en-soft:#f3f7ff;
  --v327-en-line:#cbd9f0;
  --v327-zh:#c95e52;
  --v327-zh-soft:#fff5f3;
  --v327-zh-line:#f0cbc6;
  --v327-ink:#173e34;
  --v327-muted:#6b7d76;
  --v327-line:#dce8e3;
  --v327-soft:#f8fbfa;
}

/* =========================================================
   1. REPORT: FIX THE EXACT SQUEEZED-HEADER ISSUE
   ========================================================= */
body.v327-ui #teacher-report .report-head{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  padding:0 0 16px!important;
  margin:0 0 14px!important;
}
body.v327-ui #teacher-report .report-head>div:first-child{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
}
body.v327-ui #teacher-report .report-head .eyebrow{
  display:block!important;
  width:auto!important;
  max-width:none!important;
  margin:0 0 6px!important;
  color:#2f7463!important;
  font-size:12px!important;
  line-height:1.3!important;
  white-space:normal!important;
}
body.v327-ui #teacher-report .report-head h2{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  color:var(--v327-ink)!important;
  font-size:32px!important;
  line-height:1.16!important;
  letter-spacing:-.025em!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
}
body.v327-ui #teacher-report .report-head p{
  display:block!important;
  width:100%!important;
  max-width:880px!important;
  margin:8px 0 0!important;
  color:var(--v327-muted)!important;
  font-size:15px!important;
  line-height:1.55!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
}

/* Filters become their own full-width row instead of stealing title width. */
body.v327-ui #teacher-report .report-filters{
  display:grid!important;
  grid-template-columns:minmax(220px,.75fr) minmax(360px,1.45fr)!important;
  gap:12px!important;
  width:100%!important;
  min-width:0!important;
  margin:18px 0 0!important;
  padding:14px!important;
  border:1px solid var(--v327-line)!important;
  border-radius:14px!important;
  background:var(--v327-soft)!important;
}
body.v327-ui #teacher-report .report-filters .field{
  display:grid!important;
  gap:7px!important;
  min-width:0!important;
  margin:0!important;
}
body.v327-ui #teacher-report .report-filters label{
  color:#557068!important;
  font-size:12.5px!important;
  line-height:1.3!important;
  font-weight:900!important;
}
body.v327-ui #teacher-report .report-filters select{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:50px!important;
  padding:0 14px!important;
  border:1px solid #d4e2dd!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#173f35!important;
  font-size:15.5px!important;
  line-height:1.3!important;
  text-overflow:ellipsis!important;
}

/* Backbar stays compact and separate from the report title. */
body.v327-ui #teacher-report .report-backbar{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin:0 0 15px!important;
  padding:9px 11px!important;
  border:1px solid #e1ebe7!important;
  border-radius:11px!important;
  background:#fafcfb!important;
  color:#637970!important;
}
body.v327-ui #teacher-report .report-backbar button{
  flex:0 0 auto!important;
  min-height:38px!important;
  padding:7px 10px!important;
  border-radius:9px!important;
  font-size:13px!important;
}
body.v327-ui #teacher-report .report-backbar span{
  min-width:0!important;
  color:#6b7e77!important;
  font-size:12.5px!important;
  line-height:1.4!important;
  text-align:right!important;
}

/* =========================================================
   2. LANGUAGE SWITCH: ENGLISH / CHINESE ARE PRIMARY CONTROLS
   ========================================================= */
body.v327-ui #view-teacher .v324-language-hub{
  overflow:hidden!important;
  gap:13px!important;
  padding:15px!important;
  border:1px solid var(--v327-line)!important;
  border-radius:17px!important;
  background:#fff!important;
  box-shadow:0 7px 20px rgba(18,66,56,.05)!important;
}
body.v327-ui #view-teacher .v324-language-hub-copy{
  gap:4px!important;
}
body.v327-ui #view-teacher .v324-language-hub-copy>span{
  color:#6f817a!important;
  font-size:11.5px!important;
  letter-spacing:.08em!important;
}
body.v327-ui #view-teacher .v324-language-hub-copy>strong{
  color:var(--v327-ink)!important;
  font-size:19px!important;
  line-height:1.3!important;
}
body.v327-ui #view-teacher .v324-language-hub-copy>small{
  color:var(--v327-muted)!important;
  font-size:13px!important;
  line-height:1.5!important;
}

body.v327-ui #view-teacher .v324-language-buttons{
  display:grid!important;
  grid-template-columns:minmax(130px,.8fr) minmax(190px,1.2fr) minmax(190px,1.2fr) minmax(145px,.9fr)!important;
  gap:9px!important;
  width:100%!important;
}
body.v327-ui #view-teacher .v327-language-btn{
  display:grid!important;
  grid-template-columns:38px minmax(0,1fr)!important;
  gap:9px!important;
  align-items:center!important;
  min-width:0!important;
  min-height:58px!important;
  padding:9px 11px!important;
  border:1px solid #dce8e3!important;
  border-radius:13px!important;
  background:#fff!important;
  color:#526b63!important;
  text-align:left!important;
  box-shadow:none!important;
}
body.v327-ui #view-teacher .v327-language-btn-icon{
  display:grid!important;
  place-items:center!important;
  width:38px!important;
  height:38px!important;
  border-radius:11px!important;
  background:#f1f6f4!important;
  font-size:20px!important;
}
body.v327-ui #view-teacher .v327-language-btn-copy{
  display:block!important;
  min-width:0!important;
}
body.v327-ui #view-teacher .v327-language-btn-copy strong,
body.v327-ui #view-teacher .v327-language-btn-copy small{
  display:block!important;
}
body.v327-ui #view-teacher .v327-language-btn-copy strong{
  color:inherit!important;
  font-size:13.5px!important;
  line-height:1.25!important;
  white-space:normal!important;
}
body.v327-ui #view-teacher .v327-language-btn-copy small{
  margin-top:3px!important;
  color:#7a8d85!important;
  font-size:11.5px!important;
  line-height:1.3!important;
}
body.v327-ui #view-teacher .v327-language-btn.primary.english{
  border-color:var(--v327-en-line)!important;
  background:var(--v327-en-soft)!important;
  color:#315b9a!important;
}
body.v327-ui #view-teacher .v327-language-btn.primary.english .v327-language-btn-icon{
  background:#e9f0ff!important;
}
body.v327-ui #view-teacher .v327-language-btn.primary.chinese{
  border-color:var(--v327-zh-line)!important;
  background:var(--v327-zh-soft)!important;
  color:#99443c!important;
}
body.v327-ui #view-teacher .v327-language-btn.primary.chinese .v327-language-btn-icon{
  background:#ffe9e6!important;
}
body.v327-ui #view-teacher .v327-language-btn.utility{
  background:#fafcfb!important;
  color:#63776f!important;
}
body.v327-ui #view-teacher .v327-language-btn.active{
  transform:none!important;
  box-shadow:0 0 0 2px rgba(20,117,100,.08),0 6px 16px rgba(18,66,56,.06)!important;
}
body.v327-ui #view-teacher .v327-language-btn.primary.english.active{
  border-color:#6f94cf!important;
  background:#edf4ff!important;
  color:#244e8a!important;
}
body.v327-ui #view-teacher .v327-language-btn.primary.chinese.active{
  border-color:#d88980!important;
  background:#fff0ee!important;
  color:#8b392f!important;
}
body.v327-ui #view-teacher .v327-language-btn.utility.active{
  border-color:#91b9ae!important;
  background:#eef8f5!important;
  color:#245f50!important;
}

/* Selected language lightly accents the whole hub. */
body.v327-ui #teacher-progress[data-v327-language="english"] .v324-language-hub,
body.v327-ui #teacher-report[data-v327-language="english"] .v324-language-hub,
body.v327-ui #teacher-league[data-v327-language="english"] .v324-language-hub{
  border-left:5px solid var(--v327-en)!important;
}
body.v327-ui #teacher-progress[data-v327-language="chinese"] .v324-language-hub,
body.v327-ui #teacher-report[data-v327-language="chinese"] .v324-language-hub,
body.v327-ui #teacher-league[data-v327-language="chinese"] .v324-language-hub{
  border-left:5px solid var(--v327-zh)!important;
}

/* =========================================================
   3. HỌC VIÊN: ENGLISH / CHINESE ARE VISUALLY DISTINCT SECTIONS
   ========================================================= */
body.v327-ui #teacher-students .v326-lang-english{
  border:1px solid var(--v327-en-line)!important;
  border-top:5px solid var(--v327-en)!important;
  background:#fff!important;
}
body.v327-ui #teacher-students .v326-lang-chinese{
  border:1px solid var(--v327-zh-line)!important;
  border-top:5px solid var(--v327-zh)!important;
  background:#fff!important;
}
body.v327-ui #teacher-students .v326-lang-english .v324-language-section-head{
  background:linear-gradient(180deg,#f8fbff,#fff)!important;
}
body.v327-ui #teacher-students .v326-lang-chinese .v324-language-section-head{
  background:linear-gradient(180deg,#fff8f7,#fff)!important;
}
body.v327-ui #teacher-students .v326-lang-english .v324-language-title>span{
  background:#eaf1ff!important;
}
body.v327-ui #teacher-students .v326-lang-chinese .v324-language-title>span{
  background:#ffece9!important;
}
body.v327-ui #teacher-students .v326-lang-english .v324-language-title strong{
  color:#2d568f!important;
}
body.v327-ui #teacher-students .v326-lang-chinese .v324-language-title strong{
  color:#914139!important;
}
body.v327-ui #teacher-students .v326-lang-english .v324-language-head-actions>b{
  background:#edf4ff!important;
  color:#315b96!important;
}
body.v327-ui #teacher-students .v326-lang-chinese .v324-language-head-actions>b{
  background:#fff0ee!important;
  color:#96443b!important;
}
body.v327-ui #teacher-students .v324-language-head-actions button{
  color:#526c64!important;
  background:#fff!important;
  border:1px solid #d8e5e0!important;
}

/* =========================================================
   4. REPORT CONTENT: DENSE DATA, CLEAN HIERARCHY
   ========================================================= */
body.v327-ui #teacher-report .report-summary-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
  margin-top:14px!important;
}
body.v327-ui #teacher-report .report-assessment-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
  margin:12px 0!important;
}
body.v327-ui #teacher-report .report-detail-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
}
body.v327-ui #teacher-report .report-section-card{
  min-width:0!important;
  padding:15px!important;
  border:1px solid var(--v327-line)!important;
  border-radius:15px!important;
  background:#fff!important;
  box-shadow:0 5px 15px rgba(18,66,56,.04)!important;
}
body.v327-ui #teacher-report .report-section-title{
  display:flex!important;
  align-items:flex-start!important;
  gap:10px!important;
  margin-bottom:12px!important;
}
body.v327-ui #teacher-report .report-section-title>span{
  flex:0 0 auto!important;
  font-size:20px!important;
}
body.v327-ui #teacher-report .report-section-title strong{
  color:#173f35!important;
  font-size:15.5px!important;
  line-height:1.3!important;
}
body.v327-ui #teacher-report .report-section-title small{
  display:block!important;
  margin-top:3px!important;
  color:#73857e!important;
  font-size:12px!important;
  line-height:1.4!important;
}

/* =========================================================
   5. RESPONSIVE
   ========================================================= */
@media(max-width:1180px){
  body.v327-ui #view-teacher .v324-language-buttons{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body.v327-ui #teacher-report .report-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body.v327-ui #teacher-report .report-assessment-grid{
    grid-template-columns:1fr!important;
  }
}
@media(max-width:900px){
  body.v327-ui #teacher-report .report-head h2{
    font-size:27px!important;
  }
  body.v327-ui #teacher-report .report-filters{
    grid-template-columns:1fr!important;
  }
  body.v327-ui #teacher-report .report-detail-grid{
    grid-template-columns:1fr!important;
  }
  body.v327-ui #teacher-report .report-backbar{
    align-items:flex-start!important;
    flex-direction:column!important;
  }
  body.v327-ui #teacher-report .report-backbar span{
    text-align:left!important;
  }
}
@media(max-width:620px){
  body.v327-ui #teacher-report .report-head h2{
    font-size:24px!important;
  }
  body.v327-ui #teacher-report .report-head p{
    font-size:14px!important;
  }
  body.v327-ui #teacher-report .report-filters{
    padding:11px!important;
  }
  body.v327-ui #view-teacher .v324-language-buttons{
    grid-template-columns:1fr!important;
  }
  body.v327-ui #view-teacher .v327-language-btn{
    min-height:54px!important;
  }
  body.v327-ui #teacher-report .report-summary-grid{
    grid-template-columns:1fr!important;
  }
  body.v327-ui #teacher-students .v324-language-section-head{
    gap:10px!important;
  }
}
