/* Painel docente inspirado na referência enviada. A área do estudante conserva o visual calmo. */
body.teacher-mode{
  --blue:#582bc3;
  --blue-bright:#6837d8;
  --blue-soft:#ebe5ff;
  --surface-soft:#f2effd;
  --line:#d7d0e8;
  background:#f7f6fc;
}
body.teacher-mode .topbar{background:#6738d9;color:#fff;border-bottom-color:#562bbd;box-shadow:0 3px 14px #3b207626}
body.teacher-mode .brand{color:#fff}
body.teacher-mode .top-actions .header-exit{background:#fff;color:#4e26ae;border-color:#fff}
body.teacher-mode main{width:min(1510px,100%);padding-top:28px}
body.teacher-mode .teacher-page-heading{margin-bottom:22px}
body.teacher-mode .teacher-page-heading h1{font-size:clamp(30px,3vw,42px);margin-bottom:5px;color:#20163c}
body.teacher-mode .teacher-page-heading p:last-child{color:#655c77;margin-bottom:0}
body.teacher-mode .teacher-layout{grid-template-columns:235px minmax(0,1fr);gap:22px}
body.teacher-mode .teacher-layout>.sidebar{position:sticky;top:18px;display:flex;flex-direction:column;gap:8px;min-width:0;padding:16px;border:1px solid #e0daef;border-radius:18px;background:#fff;box-shadow:0 8px 22px #37245c0a}
body.teacher-mode .teacher-side-nav{display:grid;gap:7px;margin:0 0 12px;padding-bottom:16px;border-bottom:1px solid #e7e1f2}
body.teacher-mode .teacher-side-nav .btn{width:100%;min-height:44px;justify-content:flex-start;text-align:left;border-radius:10px}
body.teacher-mode .teacher-side-nav .btn[aria-current="page"]{background:#6738d9;border-color:#6738d9;color:#fff}
body.teacher-mode .teacher-side-nav .btn.secondary{background:#fff;color:#3e315b;border-color:transparent}
body.teacher-mode .teacher-side-nav .btn.secondary:hover{background:#f1ecff;border-color:#d4c7f6}
body.teacher-mode .teacher-sidebar-label{margin:0 0 5px;padding:0 7px;color:#746987;font-size:12px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
body.teacher-mode .sidebar>button{width:100%;border:1px solid #e3def0;background:#fff;border-radius:11px;padding:11px 12px;color:#32274d}
body.teacher-mode .sidebar>button.active{background:#eee9ff;border-color:#8e72df;color:#42239e}
body.teacher-mode .sidebar>button:hover{border-color:#8e72df;background:#f7f4ff}
body.teacher-mode .teacher-layout>.stack{gap:18px}
body.teacher-mode .teacher-layout .panel{border-color:#dfd9ed;box-shadow:0 6px 22px #37245c0a}
body.teacher-mode .teacher-layout .panel h2{color:#261747}
body.teacher-mode .teacher-layout .panel h3{color:#302252}
body.teacher-mode .teacher-layout .table-wrap{border-color:#dfd9ed}
body.teacher-mode .teacher-layout th{background:#f2eeff;color:#35225c}
body.teacher-mode .teacher-layout td,body.teacher-mode .teacher-layout th{border-bottom-color:#e9e3f2}
body.teacher-mode .teacher-layout .grade-reference{background:#f4f0ff;border-color:#dcd0fa}
body.teacher-mode .teacher-layout .grade-bar{background:#dfd5fa}
body.teacher-mode .teacher-layout .grade-bar i{background:#6738d9}
body.teacher-mode .teacher-summary-grid>div{background:#f5f1ff}
body.teacher-mode .teacher-summary-grid strong{color:#582bc3}
body.teacher-mode .create-profile-toggle{margin:0 0 22px;padding:0;overflow:hidden;border-color:#ddd5ed;box-shadow:0 5px 18px #37245c0a}
body.teacher-mode .create-profile-toggle summary{cursor:pointer;list-style:none;padding:15px 20px;font-weight:800;color:#5329b6;background:#fff}
body.teacher-mode .create-profile-toggle summary::-webkit-details-marker{display:none}
body.teacher-mode .create-profile-toggle[open] summary{border-bottom:1px solid #e4def0;background:#f6f2ff}
body.teacher-mode .create-profile-body{display:grid;grid-template-columns:minmax(220px,.7fr) minmax(0,1.3fr);gap:20px;padding:20px}
body.teacher-mode .create-profile-body h2{margin-bottom:7px}
body.teacher-mode .teacher-dashboard-intro{display:grid;gap:14px}
body.teacher-mode .teacher-welcome{position:relative;display:flex;justify-content:space-between;gap:18px;min-height:205px;overflow:hidden;padding:27px 32px;border-radius:19px;background:linear-gradient(115deg,#5f31ce 0%,#7044e2 58%,#855cf0 100%);color:#fff}
body.teacher-mode .teacher-welcome::before,body.teacher-mode .teacher-welcome::after{content:"";position:absolute;border:1px solid #ffffff35;border-radius:50%;pointer-events:none}
body.teacher-mode .teacher-welcome::before{width:340px;height:340px;right:-110px;top:-190px}
body.teacher-mode .teacher-welcome::after{width:230px;height:230px;right:10px;bottom:-170px}
body.teacher-mode .teacher-welcome>div:first-child{position:relative;z-index:1;max-width:680px}
body.teacher-mode .teacher-welcome-kicker{display:block;margin-bottom:9px;font-size:12px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#e6dbff}
body.teacher-mode .teacher-welcome h2{margin:0 0 8px;font-size:clamp(26px,3vw,38px);color:#fff!important}
body.teacher-mode .teacher-welcome p{max-width:650px;margin:0 0 15px;font-size:15px;line-height:1.5;color:#f6f1ff}
body.teacher-mode .teacher-welcome-code{display:inline-block;padding:6px 11px;border:1px solid #ffffff72;border-radius:99px;font-size:13px;font-weight:700;background:#ffffff1e}
body.teacher-mode .teacher-welcome-decoration{position:relative;z-index:1;display:flex;align-items:center;gap:11px;align-self:center}
body.teacher-mode .teacher-welcome-decoration span{display:grid;place-items:center;width:58px;height:58px;border-radius:17px;background:#ffffffd9;color:#5b2ac4;font-size:34px;font-weight:800;transform:rotate(-7deg)}
body.teacher-mode .teacher-welcome-decoration span:nth-child(2){background:#e6deff;transform:rotate(8deg)}
body.teacher-mode .teacher-welcome-decoration span:nth-child(3){background:#ffdff4;transform:rotate(-4deg)}
body.teacher-mode .teacher-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
body.teacher-mode .teacher-kpi{display:flex;align-items:flex-start;justify-content:space-between;gap:7px;min-height:126px;padding:16px 16px 13px;border-radius:15px;color:#fff;box-shadow:0 7px 17px #3c1b7520}
body.teacher-mode .teacher-kpi.violet{background:linear-gradient(135deg,#702fc8,#9954d8)}
body.teacher-mode .teacher-kpi.pink{background:linear-gradient(135deg,#a92c98,#d153b2)}
body.teacher-mode .teacher-kpi.blue{background:linear-gradient(135deg,#3868d5,#6288e9)}
body.teacher-mode .teacher-kpi.teal{background:linear-gradient(135deg,#087e90,#19a1aa)}
body.teacher-mode .teacher-kpi span,body.teacher-mode .teacher-kpi small{display:block;font-size:12px;line-height:1.3;color:#fff}
body.teacher-mode .teacher-kpi strong{display:block;margin:6px 0 3px;font-size:30px;line-height:1.1;color:#fff}
body.teacher-mode .teacher-kpi b{display:grid;place-items:center;flex:none;width:39px;height:39px;border:2px solid #ffffffa8;border-radius:50%;font-size:22px;line-height:1;color:#fff}
body.teacher-mode .teacher-detail-report{border-color:#dad2ed}
body.teacher-mode .teacher-detail-report .report-metric{background:#f4f0ff;border-color:#e0d6fa}
body.teacher-mode .teacher-detail-report .report-metric strong{color:#592ec5}
body.teacher-mode .teacher-detail-report .report-status.ok{background:#d9f7ed;color:#075d48}
body.teacher-mode .report-chart{display:flex;align-items:flex-end;justify-content:space-around;gap:12px;min-height:268px;padding:22px 15px 10px;border:1px solid #e1daf1;border-radius:14px;background:repeating-linear-gradient(to top,#ebe5f7 0,#ebe5f7 1px,transparent 1px,transparent 52px),#fcfbff}
body.teacher-mode .report-chart-day{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;flex:1;min-width:0;max-width:95px;gap:4px;text-align:center;font-size:12px;color:#504367}
body.teacher-mode .report-chart-column{position:relative;width:min(100%,48px);height:192px}
body.teacher-mode .report-chart-column i{position:absolute;bottom:0;left:0;right:0;display:block;min-height:8px;border-radius:9px 9px 0 0;background:#bdacf1}
body.teacher-mode .report-chart-column b{position:absolute;bottom:0;left:0;right:0;display:block;border-radius:9px 9px 0 0;background:#713bdd}
body.teacher-mode .report-chart-day strong{color:#392464}
body.teacher-mode .report-chart-day span{white-space:nowrap}
body.teacher-mode .report-section{border-top-color:#e6e0f0}
body.teacher-mode .report-skill-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
body.teacher-mode .report-skill-card{min-width:0;border:1px solid #e2daf2;border-top:5px solid #7440db;border-radius:14px;padding:17px;background:#fff;box-shadow:0 4px 14px #3c1b7509}
body.teacher-mode .report-skill-card:nth-child(4n+2){border-top-color:#bf3fa7}
body.teacher-mode .report-skill-card:nth-child(4n+3){border-top-color:#4676dc}
body.teacher-mode .report-skill-card:nth-child(4n+4){border-top-color:#0e8994}
body.teacher-mode .report-skill-head{display:flex;justify-content:space-between;align-items:start;gap:10px;margin-bottom:13px}
body.teacher-mode .report-skill-head h4{margin:0;color:#2a1a50;font-size:18px;line-height:1.35}
body.teacher-mode .report-skill-head>span{flex:none;padding:4px 9px;border-radius:99px;background:#ece5ff;color:#5326b5;font-size:12px;font-weight:800}
body.teacher-mode .report-skill-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px 15px}
body.teacher-mode .report-skill-facts span{display:block;color:#625977;font-size:12px;line-height:1.3}
body.teacher-mode .report-skill-facts strong{display:block;margin-top:3px;color:#2c2046;font-size:13px;line-height:1.35}
body.teacher-mode .report-skill-next{margin-top:14px;padding:11px 13px;border-radius:10px;background:#f5f1ff}
body.teacher-mode .report-skill-next strong{display:block;margin-bottom:3px;color:#5126b4;font-size:12px}
body.teacher-mode .report-skill-next p{margin:0;color:#35294f;font-size:13px;line-height:1.45}
body.teacher-mode .report-alert{background:#fff5e8;border-color:#dc9c43}
body.teacher-mode .report-events{border-top-color:#e6e0f0}
body.teacher-mode .narrative-report{border-color:#d9d0ed}
body.teacher-mode .narrative-screen-header{display:flex;justify-content:space-between;align-items:start;gap:16px;flex-wrap:wrap}
body.teacher-mode .narrative-screen-header h2{margin-bottom:7px}
body.teacher-mode .narrative-screen-header p:last-child{color:#635a77}
body.teacher-mode .narrative-paper{max-width:900px;margin:8px auto 24px;padding:28px 34px;border:1px solid #ded7ec;border-radius:12px;background:#fff;color:#252034}
body.teacher-mode .narrative-paper>header{padding-bottom:15px;border-bottom:2px solid #6b39d7}
body.teacher-mode .narrative-paper>header>span{display:block;margin-bottom:5px;color:#5a2ac1;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
body.teacher-mode .narrative-paper h3{margin:0 0 8px;color:#241641;font-size:25px}
body.teacher-mode .narrative-paper>header p{margin:0;font-size:13px;color:#514760}
body.teacher-mode .narrative-paper h4{margin:18px 0 6px;color:#422593;font-size:17px}
body.teacher-mode .narrative-paper p{margin:0 0 11px;font-size:15px;line-height:1.7;color:#28243a}
body.teacher-mode .narrative-skill{padding:4px 0 7px;border-bottom:1px solid #e9e3f2}
body.teacher-mode .narrative-skill h4{margin:8px 0 4px}
body.teacher-mode .narrative-paper .narrative-skill-conclusion{margin:6px 0 10px;padding:9px 12px;border-left:4px solid #6b39d7;background:#f6f1ff}
body.teacher-mode .narrative-conclusion,body.teacher-mode .narrative-teacher-note{padding-top:5px}
body.teacher-mode .narrative-teacher-note p{white-space:pre-line}
body.teacher-mode .narrative-paper-footer{margin-top:20px;padding-top:15px;border-top:1px solid #d9d1e9;color:#625b6c}
body.teacher-mode .narrative-paper-footer p{font-size:12px;color:#625b6c}
body.teacher-mode .narrative-paper-footer>div{margin-top:26px;font-size:13px}
body.teacher-mode .narrative-note-editor{display:grid;gap:11px;padding:16px;border-radius:12px;background:#f6f2ff}
body.teacher-mode .narrative-note-editor textarea{width:100%;min-height:105px;padding:11px;border:2px solid #cfc2eb;border-radius:9px;background:#fff;color:#241641;resize:vertical}
body.teacher-mode .narrative-note-editor .btn{justify-self:start}
body.teacher-mode .narrative-note-editor .form-note{margin:0}
body.teacher-mode .narrative-ai-note{padding-top:5px}
body.teacher-mode .narrative-ai-note p{white-space:pre-line}
body.teacher-mode .narrative-ai-note small{display:block;margin-bottom:12px;color:#625b6c}
body.teacher-mode .ai-teacher-panel,body.teacher-mode .ai-generator{border-color:#d4c9f0;background:#fbfaff}
body.teacher-mode .ai-teacher-panel>.row{margin:14px 0}
body.teacher-mode #ai-analysis-draft{display:grid;gap:12px;margin-top:15px}
body.teacher-mode #ai-analysis-draft[hidden]{display:none}
body.teacher-mode #ai-analysis-text{width:100%;min-height:170px;padding:12px;border:2px solid #cfc2eb;border-radius:10px;background:#fff;color:#241641;resize:vertical}
body.teacher-mode .ai-generator{margin:20px 0}
body.teacher-mode .ai-generator-form{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));align-items:end;gap:12px;margin:18px 0}
body.teacher-mode .ai-generator-form>.btn{grid-column:1/-1;justify-self:start}
body.teacher-mode .ai-question-draft{margin:14px 0;padding:18px;border:1px solid #d9cfef;border-radius:13px;background:#fff}
body.teacher-mode .ai-auto-queue{margin:20px 0;padding:18px;border:1px solid #d9cfef;border-radius:14px;background:#f8f5ff}
body.teacher-mode .ai-question-draft h3{margin:0 0 8px}
body.teacher-mode .ai-question-draft p{margin:8px 0}
body.teacher-mode .ai-draft-figure{max-width:430px;margin:12px 0}
body.teacher-mode .ai-draft-figure svg{max-width:100%;height:auto}
body.teacher-mode .ai-generated-scene{max-width:500px;margin:12px 0;padding:10px;border:1px solid #d7dff0;border-radius:12px;background:#fff}
body.teacher-mode .ai-generated-scene img{display:block;width:100%;height:auto}
body.teacher-mode .ai-generated-scene small{display:block;margin-top:6px;color:#514760;font-size:12px}
body.teacher-mode .ai-question-draft .row{margin-top:14px}
body.teacher-mode footer{background:#f0edf8;border-color:#e4def0}
@media(max-width:1150px){
  body.teacher-mode .teacher-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.teacher-mode .teacher-welcome-decoration span{width:44px;height:44px;font-size:27px}
}
@media(max-width:760px){
  body.teacher-mode .teacher-layout{grid-template-columns:1fr}
  body.teacher-mode .teacher-layout>.sidebar{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}
  body.teacher-mode .teacher-side-nav,body.teacher-mode .teacher-sidebar-label{grid-column:1/-1}
  body.teacher-mode .teacher-side-nav{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.teacher-mode .teacher-welcome{padding:22px;min-height:0}
  body.teacher-mode .teacher-welcome-decoration{display:none}
  body.teacher-mode .create-profile-body{grid-template-columns:1fr}
  body.teacher-mode .report-skill-grid{grid-template-columns:1fr}
}
@media(max-width:520px){
  body.teacher-mode .ai-generator-form{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.teacher-mode .teacher-kpi-grid{gap:9px}
  body.teacher-mode .teacher-kpi{min-height:115px;padding:13px}
  body.teacher-mode .teacher-kpi strong{font-size:25px}
  body.teacher-mode .teacher-kpi b{display:none}
  body.teacher-mode .report-chart{gap:6px;padding-left:7px;padding-right:7px}
  body.teacher-mode .report-chart-column{width:min(100%,31px)}
}
@media print{
  @page{size:A4;margin:16mm}
  body.teacher-mode{background:#fff}
  body.teacher-mode .teacher-dashboard-intro,body.teacher-mode .create-profile-toggle{display:none!important}
  body.teacher-mode .teacher-layout>.stack>.panel:not(.teacher-detail-report){display:none!important}
  body.teacher-mode .teacher-detail-report{box-shadow:none;border:0}
  body.teacher-mode .report-chart-column i,body.teacher-mode .report-chart-column b{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  body.teacher-mode .report-skill-card{break-inside:avoid}
  body.teacher-mode.print-narrative .teacher-page-heading,
  body.teacher-mode.print-narrative .teacher-layout>.stack>.panel,
  body.teacher-mode.print-narrative .teacher-dashboard-intro{display:none!important}
  body.teacher-mode.print-narrative .teacher-layout>.stack>.narrative-report{display:block!important;padding:0;border:0;box-shadow:none}
  body.teacher-mode.print-narrative .narrative-screen-header,
  body.teacher-mode.print-narrative .narrative-note-editor{display:none!important}
  html:has(body.teacher-mode.print-narrative),body.teacher-mode.print-narrative,
  body.teacher-mode.print-narrative .shell,body.teacher-mode.print-narrative main,
  body.teacher-mode.print-narrative #app{background:#fff!important}
  body.teacher-mode.print-narrative .narrative-paper{max-width:none;margin:0;padding:0;border:0;border-radius:0}
  body.teacher-mode.print-narrative .narrative-paper h4{color:#222}
  body.teacher-mode.print-narrative .narrative-paper p{font-size:11.5pt;line-height:1.55}
  body.teacher-mode.print-narrative .narrative-skill{break-inside:avoid}
  body.teacher-mode.print-narrative .narrative-paper .narrative-skill-conclusion{background:#f5f5f5;border-left-color:#555}
  body.teacher-mode.print-narrative .narrative-paper-footer{break-inside:avoid}
}
