/* =========================================================
   NOF SCHOOL PERFORMANCE REPORT (LeapScore)
   Completely isolated CSS
   No global selectors
========================================================= */

.nof-school-report {
  --sr-primary: #f0b120;
  --sr-primary-dark: #111111;
  --sr-primary-light: #faf6ea;

  --sr-green: #0b8f50;
  --sr-green-light: #e9f8f0;

  --sr-orange: #f0b120;
  --sr-orange-light: #fff4e0;

  --sr-blue: #3978d6;
  --sr-blue-light: #edf4ff;

  --sr-purple: #7756d8;
  --sr-purple-light: #f2eeff;

  --sr-teal: #10a8a0;
  --sr-teal-light: #e4faf8;

  --sr-pink: #e0537a;
  --sr-pink-light: #fdeaf0;

  --sr-red: #d9534f;
  --sr-red-light: #fdeceb;

  --sr-text: #111111;
  --sr-text-light: #64748b;
  --sr-border: #e5e7eb;
  --sr-bg: #f7f6f2;
  --sr-white: #ffffff;

  width: 100%;
  max-width: 1440px;
  /* margin: 0 auto; */
  padding: 24px;

  color: var(--sr-text);
  background: var(--sr-bg);

  font-family: "Inter", "Segoe UI", Arial, sans-serif;

  line-height: 1.45;

  box-sizing: border-box;
}

.nof-school-report *,
.nof-school-report *::before,
.nof-school-report *::after {
  box-sizing: border-box;
}

/* =========================================================
   BACK BUTTON
========================================================= */

.nof-school-report__back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  margin-bottom: 16px;
  padding: 9px 16px;

  font-size: 13px;
  font-weight: 700;
  color: var(--sr-primary);

  background: var(--sr-white);

  border: 1px solid var(--sr-border);
  border-radius: 10px;

  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nof-school-report__back-btn:hover {
  background: var(--sr-primary-light);
  border-color: var(--sr-primary);
}

/* =========================================================
   HEADER
========================================================= */

.nof-school-report__header {
  min-height: 76px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 16px 22px;

  background: var(--sr-white);

  border: 1px solid var(--sr-border);
  border-radius: 16px;

  box-shadow: 0 4px 20px rgba(18, 27, 54, 0.05);
}

.nof-school-report__header-left {
  display: flex;
  align-items: center;
  gap: 13px;
}

.nof-school-report__brand-mark {
  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;
  background: var(--sr-primary);

  border-radius: 12px;
}

.nof-school-report__brand {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--sr-primary-dark);
}

.nof-school-report__brand-tagline {
  margin-top: 2px;

  font-size: 10.5px;
  font-weight: 600;

  color: var(--sr-text-light);
}

.nof-school-report__header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nof-school-report__powered-by {
  display: flex;
  align-items: center;
  gap: 8px;

  padding-left: 14px;

  border-left: 1px solid var(--sr-border);
}

.nof-school-report__powered-by span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;

  color: var(--sr-text-light);
}

.nof-school-report__nof-badge {
  width: 30px;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;
  background: var(--sr-orange);

  border-radius: 50%;

  font-size: 9px;
  font-weight: 900;
}

.nof-school-report__nof-name {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;

  color: var(--sr-primary-dark);
}

/* =========================================================
   SCHOOL BANNER
========================================================= */

.nof-school-report__banner {
  position: relative;
  overflow: hidden;

  margin-top: 18px;
  padding: 24px;
  min-height: 168px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  background: linear-gradient(120deg, #eef4ff 0%, #f5f8ff 46%, #eaf1ff 100%);

  border: 1px solid var(--sr-border);
  border-radius: 18px;

  box-shadow: 0 12px 35px rgba(23, 28, 114, 0.06);
}

.nof-school-report__banner-main {
  position: relative;
  z-index: 2;

  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.nof-school-report__banner-icon {
  width: 64px;
  height: 64px;

  flex: 0 0 64px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--sr-primary);

  background: rgba(255, 255, 255, 0.85);

  border: 1px solid rgba(23, 28, 114, 0.1);
  border-radius: 50%;
}

.nof-school-report__banner-info {
  min-width: 0;
}

.nof-school-report__eyebrow {
  display: block;

  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;

  color: var(--sr-text-light);
}

.nof-school-report__banner-info h1 {
  margin: 4px 0 10px;

  font-size: 25px;
  font-weight: 800;

  color: var(--sr-primary-dark);
}

.nof-school-report__banner-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.nof-school-report__banner-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  font-size: 12px;
  font-weight: 600;

  color: rgba(17, 17, 17, 0.72);
}

.nof-school-report__banner-visual {
  position: relative;
  z-index: 1;

  flex: 0 0 42%;
  max-width: 460px;

  /* stretch to the full banner height and bleed past the padding
     so the illustration touches the top / right / bottom edges */
  align-self: stretch;
  margin: -24px -24px -24px 0;

  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}

.nof-school-report__banner-visual svg,
.nof-school-report__banner-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right bottom;
}

/* =========================================================
   STATS ROW
========================================================= */

.nof-school-report__stats-row {
  margin-top: 15px;

  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));

  gap: 13px;
}

.nof-school-report__stat-tile {
  padding: 18px 16px;

  background: #ffffff;

  border: 1px solid var(--sr-border);
  border-radius: 12px;

  box-shadow: 0 5px 22px rgba(18, 27, 54, 0.04);
}

.nof-school-report__stat-tile-label {
  display: flex;
  align-items: center;
  gap: 7px;

  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;

  color: var(--sr-text-light);
}

.nof-school-report__stat-tile-icon {
  width: 26px;
  height: 26px;

  flex: 0 0 26px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;
}

.nof-school-report__stat-tile-icon.blue { color: var(--sr-blue); background: var(--sr-blue-light); }
.nof-school-report__stat-tile-icon.green { color: var(--sr-green); background: var(--sr-green-light); }
.nof-school-report__stat-tile-icon.purple { color: var(--sr-purple); background: var(--sr-purple-light); }
.nof-school-report__stat-tile-icon.orange { color: var(--sr-orange); background: var(--sr-orange-light); }
.nof-school-report__stat-tile-icon.teal { color: var(--sr-teal); background: var(--sr-teal-light); }
.nof-school-report__stat-tile-icon.red { color: var(--sr-red); background: var(--sr-red-light); }

.nof-school-report__stat-tile-value {
  margin-top: 12px;

  font-size: 26px;
  font-weight: 850;
  line-height: 1;

  color: var(--sr-text);
}

.nof-school-report__stat-tile-sub {
  margin-top: 8px;

  font-size: 11px;
  font-weight: 700;

  color: var(--sr-text-light);
}

.nof-school-report__stat-tile-sub--up {
  color: var(--sr-green);
}

.nof-school-report__stat-tile-sub--down {
  color: var(--sr-red);
}

/* =========================================================
   TWO COLUMN PANELS (distribution / trend)
========================================================= */

.nof-school-report__panels {
  margin-top: 18px;

  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 16px;
  align-items: stretch;
}

.nof-school-report__panel {
  padding: 20px 22px;

  background: #ffffff;

  border: 1px solid var(--sr-border);
  border-radius: 16px;

  box-shadow: 0 5px 22px rgba(18, 27, 54, 0.04);
}

.nof-school-report__panel-title {
  margin: 0 0 18px;

  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;

  color: var(--sr-text);
}

/* --- donut --- */

.nof-school-report__distribution {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nof-school-report__donut-wrap {
  position: relative;

  width: 168px;
  height: 168px;

  flex: 0 0 168px;
}

.nof-school-report__donut-wrap svg {
  width: 100%;
  height: 100%;

  transform: rotate(-90deg);
}

.nof-school-report__donut-center {
  position: absolute;
  inset: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.nof-school-report__donut-center strong {
  font-size: 24px;
  font-weight: 850;
  color: var(--sr-primary-dark);
}

.nof-school-report__donut-center span {
  margin-top: 2px;

  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;

  color: var(--sr-text-light);
}

.nof-school-report__legend {
  display: flex;
  flex-direction: column;
  gap: 11px;

  flex: 1;
  min-width: 0;
}

.nof-school-report__legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  font-size: 11.5px;
}

.nof-school-report__legend-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  color: var(--sr-text);
  font-weight: 600;
}

.nof-school-report__legend-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;

  border-radius: 50%;
}

.nof-school-report__legend-value {
  font-weight: 800;
  color: var(--sr-text);
  white-space: nowrap;
}

/* --- trend line --- */

.nof-school-report__trend {
  display: flex;
  flex-direction: column;
}

.nof-school-report__trend-svg-wrap {
  position: relative;

  width: 100%;
  height: 180px;
}

.nof-school-report__trend-svg-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.nof-school-report__trend-line {
  fill: none;
  stroke: var(--sr-green);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nof-school-report__trend-area {
  fill: var(--sr-green);
  opacity: 0.08;
}

.nof-school-report__trend-dot {
  fill: #ffffff;
  stroke: var(--sr-green);
  stroke-width: 2.5;
}

.nof-school-report__trend-grid {
  stroke: #eef0f4;
  stroke-width: 1;
}

.nof-school-report__trend-axis-label {
  font-size: 9px;
  font-weight: 700;
  fill: var(--sr-text-light);
}

.nof-school-report__trend-value-label {
  font-size: 10.5px;
  font-weight: 800;
  fill: var(--sr-primary-dark);
}

.nof-school-report__trend-x-labels {
  margin-top: 8px;

  display: flex;
  justify-content: space-between;
}

.nof-school-report__trend-x-labels span {
  flex: 1;
  text-align: center;

  font-size: 10px;
  font-weight: 700;

  color: var(--sr-text-light);
}

/* =========================================================
   SUBJECT WISE SCORES
========================================================= */

.nof-school-report__section {
  margin-top: 24px;
}

.nof-school-report__section-title {
  margin: 0 0 14px;

  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;

  color: var(--sr-text);
}

.nof-school-report__subject-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));

  gap: 12px;
}

.nof-school-report__subject-card {
  padding: 16px;

  background: #ffffff;

  border: 1px solid var(--sr-border);
  border-radius: 13px;

  box-shadow: 0 5px 22px rgba(18, 27, 54, 0.04);
}

.nof-school-report__subject-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nof-school-report__subject-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 9px;
}

.nof-school-report__subject-icon.green { color: var(--sr-green); background: var(--sr-green-light); }
.nof-school-report__subject-icon.purple { color: var(--sr-purple); background: var(--sr-purple-light); }
.nof-school-report__subject-icon.orange { color: var(--sr-orange); background: var(--sr-orange-light); }
.nof-school-report__subject-icon.teal { color: var(--sr-teal); background: var(--sr-teal-light); }
.nof-school-report__subject-icon.pink { color: var(--sr-pink); background: var(--sr-pink-light); }
.nof-school-report__subject-icon.blue { color: var(--sr-blue); background: var(--sr-blue-light); }

.nof-school-report__subject-name {
  font-size: 12px;
  font-weight: 800;

  color: var(--sr-text);

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nof-school-report__subject-score {
  margin-top: 12px;

  font-size: 24px;
  font-weight: 850;

  color: var(--sr-primary-dark);
}

.nof-school-report__subject-progress {
  width: 100%;
  height: 6px;

  margin-top: 10px;

  overflow: hidden;

  background: #edf0f5;
  border-radius: 20px;
}

.nof-school-report__subject-progress-fill {
  height: 100%;
  border-radius: inherit;
}

.nof-school-report__subject-progress-fill.green { background: var(--sr-green); }
.nof-school-report__subject-progress-fill.purple { background: var(--sr-purple); }
.nof-school-report__subject-progress-fill.orange { background: var(--sr-orange); }
.nof-school-report__subject-progress-fill.teal { background: var(--sr-teal); }
.nof-school-report__subject-progress-fill.pink { background: var(--sr-pink); }
.nof-school-report__subject-progress-fill.blue { background: var(--sr-blue); }

.nof-school-report__subject-sub {
  margin-top: 9px;

  font-size: 10.5px;
  font-weight: 700;

  color: var(--sr-text-light);
}

.nof-school-report__subject-sub b {
  color: var(--sr-green);
}

/* =========================================================
   THREE COLUMN: STRENGTHS / IMPROVEMENTS / TOP CLASS
========================================================= */

.nof-school-report__triple {
  margin-top: 18px;

  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr;

  gap: 16px;
  align-items: stretch;
}

.nof-school-report__card {
  padding: 18px 20px;

  background: #ffffff;

  border: 1px solid var(--sr-border);
  border-radius: 16px;

  box-shadow: 0 5px 22px rgba(18, 27, 54, 0.04);
}

.nof-school-report__card-title {
  display: flex;
  align-items: center;
  gap: 8px;

  margin: 0 0 14px;

  font-size: 12.5px;
  font-weight: 800;

  color: var(--sr-text);
}

.nof-school-report__card-title-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;
}

.nof-school-report__card--strengths .nof-school-report__card-title-icon {
  color: var(--sr-green);
  background: var(--sr-green-light);
}

.nof-school-report__card--improvement .nof-school-report__card-title-icon {
  color: var(--sr-orange);
  background: var(--sr-orange-light);
}

.nof-school-report__list {
  margin: 0;
  padding: 0;

  list-style: none;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nof-school-report__list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;

  font-size: 12px;
  line-height: 1.5;

  color: var(--sr-text);
}

.nof-school-report__list-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 1px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
}

.nof-school-report__card--strengths .nof-school-report__list-icon {
  color: var(--sr-green);
  background: var(--sr-green-light);
}

.nof-school-report__card--improvement .nof-school-report__list-icon {
  color: var(--sr-orange);
  background: var(--sr-orange-light);
}

.nof-school-report__card--top-class {
  display: flex;
  flex-direction: column;
}

.nof-school-report__top-class-body {
  margin-top: auto;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.nof-school-report__top-class-tile {
  padding: 14px;

  text-align: center;

  background: var(--sr-primary-light);

  border-radius: 12px;
}

.nof-school-report__top-class-tile span {
  display: block;

  font-size: 9.5px;
  font-weight: 700;

  color: var(--sr-text-light);
}

.nof-school-report__top-class-tile strong {
  display: block;

  margin-top: 6px;

  font-size: 15px;

  color: var(--sr-primary-dark);
}

.nof-school-report__top-class-tile strong.big {
  font-size: 24px;
  color: var(--sr-green);
}

.nof-school-report__top-class-name {
  margin-top: 4px;

  font-size: 20px;
  font-weight: 850;

  color: var(--sr-primary-dark);
}

.nof-school-report__top-class-growth {
  margin-top: 4px;

  display: inline-flex;
  align-items: center;
  gap: 4px;

  font-size: 11px;
  font-weight: 800;

  color: var(--sr-green);
}

/* =========================================================
   CLASS-WISE TABLE + RECOMMENDATIONS
========================================================= */

.nof-school-report__table-recs {
  margin-top: 18px;

  display: grid;
  grid-template-columns: 1.65fr 1fr;

  gap: 16px;
  align-items: stretch;
}

.nof-school-report__table-wrapper {
  padding: 20px 20px 6px;

  background: #ffffff;

  border: 1px solid var(--sr-border);
  border-radius: 16px;

  box-shadow: 0 5px 22px rgba(18, 27, 54, 0.04);

  overflow-x: auto;
}

.nof-school-report__table {
  width: 100%;
  min-width: 620px;

  border-collapse: collapse;
}

.nof-school-report__table th {
  padding: 10px 12px;

  text-align: left;

  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;

  color: var(--sr-text-light);

  border-bottom: 1px solid var(--sr-border);
}

.nof-school-report__table td {
  padding: 12px;

  font-size: 12px;
  font-weight: 600;

  border-bottom: 1px solid #eef0f4;
}

.nof-school-report__table tbody tr:last-child td {
  border-bottom: none;

  font-weight: 800;

  background: #f8f9fc;
}

.nof-school-report__table td:first-child,
.nof-school-report__table th:first-child {
  font-weight: 800;
  color: var(--sr-primary-dark);
}

.nof-school-report__recs {
  padding: 20px 22px;

  background: #fff9ec;

  border: 1px solid #f3e0ab;
  border-radius: 16px;
}

.nof-school-report__recs-title {
  display: flex;
  align-items: center;
  gap: 8px;

  margin: 0 0 14px;

  font-size: 12.5px;
  font-weight: 800;

  color: var(--sr-primary-dark);
}

.nof-school-report__recs-title-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--sr-orange);
  background: #ffffff;

  border-radius: 8px;
}

.nof-school-report__recs ul {
  margin: 0;
  padding: 0;

  list-style: none;

  display: flex;
  flex-direction: column;
  gap: 9px;
}

.nof-school-report__recs li {
  position: relative;

  padding-left: 15px;

  font-size: 11.5px;
  line-height: 1.5;

  color: var(--sr-text);
}

.nof-school-report__recs li::before {
  content: "";

  position: absolute;
  left: 0;
  top: 7px;

  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: var(--sr-orange);
}

/* =========================================================
   ENGAGEMENT INSIGHTS
========================================================= */

.nof-school-report__engagement {
  margin-top: 18px;
  padding: 20px 22px;

  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));

  gap: 14px;

  background: #ffffff;

  border: 1px solid var(--sr-border);
  border-radius: 16px;

  box-shadow: 0 5px 22px rgba(18, 27, 54, 0.04);
}

.nof-school-report__engagement-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  gap: 8px;
}

.nof-school-report__engagement-icon {
  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;
}

.nof-school-report__engagement-icon.orange { color: var(--sr-orange); background: var(--sr-orange-light); }
.nof-school-report__engagement-icon.blue { color: var(--sr-blue); background: var(--sr-blue-light); }
.nof-school-report__engagement-icon.green { color: var(--sr-green); background: var(--sr-green-light); }
.nof-school-report__engagement-icon.red { color: var(--sr-red); background: var(--sr-red-light); }
.nof-school-report__engagement-icon.purple { color: var(--sr-purple); background: var(--sr-purple-light); }

.nof-school-report__engagement-value {
  font-size: 20px;
  font-weight: 850;

  color: var(--sr-text);
}

.nof-school-report__engagement-label {
  font-size: 10px;
  font-weight: 700;

  color: var(--sr-text-light);
}

/* =========================================================
   QUOTE BANNER
========================================================= */

.nof-school-report__quote-banner {
  position: relative;
  overflow: hidden;

  margin-top: 20px;
  min-height: 96px;
  padding: 20px 26px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;

  gap: 4px;

  color: #ffffff;

  background: linear-gradient(100deg, #2a3597 0%, #6b3fb0 55%, #b5507d 100%);

  border-radius: 16px;
}

.nof-school-report__quote-banner p {
  margin: 0;

  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.nof-school-report__quote-banner span {
  font-size: 12px;
  font-weight: 500;

  color: rgba(255, 255, 255, 0.82);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1199px) {

  .nof-school-report {
    padding: 18px;
  }

  .nof-school-report__stats-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nof-school-report__panels {
    grid-template-columns: 1fr;
  }

  .nof-school-report__subject-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nof-school-report__triple {
    grid-template-columns: 1fr;
  }

  .nof-school-report__table-recs {
    grid-template-columns: 1fr;
  }

  .nof-school-report__engagement {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

@media (max-width: 767px) {

  .nof-school-report {
    padding: 10px;
  }

  .nof-school-report__header {
    padding: 13px;

    align-items: flex-start;
    flex-direction: column;

    gap: 12px;
  }

  .nof-school-report__banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nof-school-report__banner-visual {
    flex: 0 0 auto;
    max-width: none;
    width: calc(100% + 48px);
    height: 120px;
    align-self: stretch;
    margin: 12px -24px -24px;
  }

  .nof-school-report__banner-visual img {
    object-position: bottom center;
  }

  .nof-school-report__stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nof-school-report__subject-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nof-school-report__engagement {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nof-school-report__distribution {
    flex-direction: column;
  }

}
