/* MathVenture v2.27 — connected Performance: Live Teaching + Behaviour + Weekly Tests. */
.mv-perf-source-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem;width:100%;
}
.mv-perf-source-card{
  border:1px solid #e2e8f0;background:#fff;border-radius:20px;padding:1rem;
  box-shadow:0 10px 28px rgba(15,23,42,.04);
}
.mv-perf-source-card .mv-perf-icon{
  width:38px;height:38px;border-radius:13px;display:grid;place-items:center;
  background:#f1f5f9;color:#334155;margin-bottom:.65rem;
}
.mv-perf-source-card label{
  display:block;font-size:.62rem;font-weight:900;letter-spacing:.055em;text-transform:uppercase;color:#94a3b8;
}
.mv-perf-source-card strong{
  display:block;margin-top:.25rem;font-family:'Fredoka',sans-serif;font-size:1.7rem;color:#0f172a;
}
.mv-perf-source-card small{display:block;margin-top:.2rem;font-size:.66rem;font-weight:700;color:#64748b;line-height:1.35}
.mv-perf-bar{height:7px;border-radius:999px;background:#e2e8f0;overflow:hidden;margin-top:.65rem}
.mv-perf-bar > span{display:block;height:100%;border-radius:999px;background:currentColor}
.mv-perf-source-card.live{color:#0284c7}.mv-perf-source-card.behaviour{color:#7c3aed}.mv-perf-source-card.weekly{color:#d97706}
.mv-perf-formula{
  margin-top:.85rem;padding:.85rem 1rem;border-radius:16px;border:1px solid #dbeafe;background:#eff6ff;
  color:#1e40af;font-size:.72rem;font-weight:800;line-height:1.5
}
.mv-perf-detail-list{display:grid;gap:.7rem}
.mv-perf-detail-row{
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.75rem;align-items:center;
  border:1px solid #e2e8f0;border-radius:16px;padding:.85rem;background:#fff;
}
.mv-perf-detail-row strong{display:block;color:#334155;font-size:.78rem}
.mv-perf-detail-row small{display:block;color:#94a3b8;font-size:.62rem;font-weight:700;margin-top:.12rem;line-height:1.35}
.mv-perf-detail-row .score{font-family:'Fredoka',sans-serif;font-size:1.08rem;font-weight:800;color:#0f172a}
.mv-performance-teacher-card{border-color:#bbf7d0!important;background:linear-gradient(135deg,#fff,#f0fdf4 55%,#eff6ff)!important}
.mv-performance-teacher-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.9rem}
.mv-performance-student-card{
  border:1px solid #dbeafe;border-radius:22px;background:#fff;padding:1rem;box-shadow:0 10px 28px rgba(15,23,42,.04)
}
.mv-performance-student-head{display:flex;justify-content:space-between;align-items:flex-start;gap:.75rem}
.mv-performance-student-identity{display:flex;gap:.65rem;align-items:center;min-width:0}
.mv-performance-student-avatar{
  width:42px;height:42px;border-radius:14px;background:#f8fafc;border:1px solid #e2e8f0;display:grid;place-items:center;font-size:1.25rem;flex:0 0 auto
}
.mv-performance-student-identity strong{display:block;color:#1e293b;font-size:.9rem}
.mv-performance-student-identity small{display:block;color:#94a3b8;font-size:.62rem;font-weight:800}
.mv-performance-pill{padding:.38rem .58rem;border-radius:999px;font-size:.62rem;font-weight:900;white-space:nowrap}
.mv-performance-pill.good{background:#dcfce7;color:#166534}
.mv-performance-pill.mid{background:#fef3c7;color:#92400e}
.mv-performance-pill.low{background:#ffe4e6;color:#9f1239}
.mv-performance-pill.empty{background:#f1f5f9;color:#64748b}
.mv-performance-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.5rem;margin-top:.8rem}
.mv-performance-metric{padding:.65rem .5rem;border-radius:14px;background:#f8fafc;text-align:center}
.mv-performance-metric label{display:block;font-size:.52rem;text-transform:uppercase;letter-spacing:.05em;color:#94a3b8;font-weight:900}
.mv-performance-metric strong{display:block;margin-top:.2rem;color:#334155;font-size:.82rem;font-weight:900}
.mv-performance-note{margin-top:.65rem;font-size:.64rem;color:#64748b;line-height:1.4}
.mv-behaviour-dialog{
  width:min(680px,100%);max-height:calc(100dvh - var(--mv-modal-safe-top,104px) - 24px);
  border-radius:28px;background:#fff;border:1px solid #e2e8f0;box-shadow:0 28px 80px rgba(15,23,42,.28);
  display:flex;flex-direction:column;overflow:hidden
}
.mv-behaviour-dialog-head{padding:1.2rem 1.3rem;border-bottom:1px solid #e2e8f0;background:linear-gradient(135deg,#f5f3ff,#eff6ff)}
.mv-behaviour-dialog-body{padding:1.2rem 1.3rem;overflow-y:auto;min-height:0;scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent}
.mv-behaviour-scale{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}
.mv-behaviour-field label{display:block;font-size:.66rem;font-weight:900;text-transform:uppercase;letter-spacing:.04em;color:#64748b;margin-bottom:.3rem}
.mv-behaviour-field select,.mv-behaviour-field input,.mv-behaviour-field textarea{
  width:100%;padding:.75rem .8rem;border:2px solid #e2e8f0;border-radius:14px;background:#fff;color:#334155;font-weight:700
}
.mv-behaviour-help{font-size:.64rem;color:#64748b;line-height:1.45;margin-top:.45rem}
#modal-behaviour-record{
  top:var(--mv-modal-safe-top,104px)!important;right:0!important;bottom:0!important;left:0!important;height:auto!important;
  padding:12px 16px 16px!important;box-sizing:border-box
}
@media (max-width:900px){
  .mv-performance-teacher-grid{grid-template-columns:1fr}
  .mv-performance-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:700px){
  .mv-perf-source-grid{grid-template-columns:1fr}
  .mv-behaviour-scale{grid-template-columns:1fr}
  #modal-behaviour-record{padding:10px!important}
  .mv-behaviour-dialog{border-radius:22px;max-height:calc(100dvh - var(--mv-modal-safe-top,88px) - 18px)}
}
