@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800;900&display=swap');
[hidden]{display:none!important}
:root{
  --cor-rosa:#E6759B;
  --cor-laranja:#F3A527;
  --cor-laranja-escuro:#E36A35;
  --cor-creme:#FFEBD3;
  --cor-azul:#284D6C;
  --cor-verde:#3A8491;
  --cor-verde-militar:#A4AB75;
  --cor-roxo:#86659A;
  --bg:#fff9f2;
  --panel:#ffffff;
  --text:#1f1f1f;
  --muted:#5d5d5d;
  --line:#7A8794;
  --primary:#284D6C;
  --primary-dark:#1c3b54;
  --soft:#fff3df;
  --danger:#8f2020;
  --danger-soft:#fdecec;
  --success:#2f6f4e;
  --success-soft:#eaf6ef;
  --warning:#6d4800;
  --warning-soft:#fff5d9;
  --radius:14px;
  --font-title:'Montserrat','Arial Narrow Bold',Arial,sans-serif;
  --font-body:'Segoe UI',Arial,sans-serif;
}
*{box-sizing:border-box}
body{margin:0;font-family:var(--font-body);background:var(--bg);color:var(--text);line-height:1.5}
a{color:inherit}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
.container{width:min(1180px,calc(100% - 32px));margin:0 auto}
.topbar{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}
.topbar-inner{min-height:68px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.brand{font-size:20px;font-weight:700}.brand small{display:block;font-size:12px;font-weight:400;color:var(--muted);margin-top:3px}
.nav-actions{display:flex;gap:8px;flex-wrap:wrap}
main{padding:28px 0 48px}
.hero{padding:56px 0}.hero-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:24px;align-items:stretch}
.hero h1{font-size:clamp(32px,5vw,58px);line-height:1.02;margin:0 0 18px}.hero p{font-size:18px;line-height:1.6;color:var(--muted);max-width:700px}
.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:20px}
.entry-card{display:flex;flex-direction:column;justify-content:center;gap:12px}
.entry-card h2{margin:0}.entry-actions{display:grid;gap:10px}
.btn{border:1px solid var(--line);background:#fff;border-radius:10px;padding:11px 16px;min-height:44px;color:var(--text);text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.btn:hover{background:#f8fafc}.btn.primary{background:var(--primary);border-color:var(--primary);color:#fff}.btn.primary:hover{background:var(--primary-dark)}
.btn.danger{border-color:#efcaca;color:var(--danger);background:#fff}.btn.small{padding:9px 12px;min-height:44px;font-size:13px}.btn.ghost{background:transparent}
.toolbar{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-bottom:18px;flex-wrap:wrap}
.toolbar h1,.toolbar h2{margin:0}.subtle{color:var(--muted);font-size:14px}.status-dot{width:8px;height:8px;border-radius:50%;background:#36a269;display:inline-block}
.grid{display:grid;gap:16px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.course-card h3{margin:0 0 8px}.meta{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.pill{font-size:12px;background:#f2f4f7;border-radius:999px;padding:5px 8px;color:#4b5563}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.empty{padding:34px;text-align:center;color:var(--muted);border:1px dashed #cfd5dc;border-radius:var(--radius);background:#fff}
.layout{display:grid;grid-template-columns:340px minmax(0,1fr);gap:18px}.sidebar{align-self:start;position:sticky;top:88px}
.student-list{display:grid;gap:8px}.student-row{border:1px solid var(--line);border-radius:12px;padding:12px;background:#fff}.student-row.active{border-color:var(--primary);box-shadow:0 0 0 2px rgba(31,95,153,.09)}.student-row.hand{background:var(--warning-soft);border-color:#e6c55f}.student-title{display:flex;justify-content:space-between;gap:8px;align-items:center}.hand-icon{font-size:20px}.key{font-family:Consolas,monospace;font-size:13px;background:#f4f4f5;padding:5px 7px;border-radius:7px;display:inline-block}
.section-title{font-size:15px;font-weight:700;margin:22px 0 10px}.section-title:first-child{margin-top:0}
label{display:block;font-size:13px;font-weight:700;margin-bottom:6px}.field{margin-bottom:14px}input,textarea,select{width:100%;border:1px solid #cfd5dc;border-radius:10px;padding:10px 11px;background:#fff;color:var(--text)}textarea{min-height:100px;resize:vertical}input:focus,textarea:focus,select:focus{outline:2px solid rgba(31,95,153,.18);border-color:var(--primary)}
.chips{display:flex;gap:10px;flex-wrap:wrap}.chip{border:1px solid var(--line);background:#fff;border-radius:999px;padding:10px 13px;min-height:44px;font-size:13px}.chip.selected{background:var(--soft);border-color:#88b3d8;color:#154d7d}.chip.negative.selected{background:#fff1f1;border-color:#e7a4a4;color:#7f2424}
.levels{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.level{border:1px solid var(--line);border-radius:12px;padding:10px;text-align:center;background:#fff;min-height:126px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}.level.selected{border-color:var(--primary);box-shadow:0 0 0 2px rgba(31,95,153,.12);background:var(--soft)}.level img{width:62px;height:62px;object-fit:contain}.level-fallback{width:62px;height:62px;border-radius:50%;display:grid;place-items:center;background:#eef1f4;font-size:22px;font-weight:700}.level-title{font-size:12px;line-height:1.3}
.feedback-head{display:flex;justify-content:space-between;gap:12px;align-items:start}.feedback-head h2{margin:0}.history{display:grid;gap:10px}.history-item{border:1px solid var(--line);border-radius:12px;padding:14px;background:#fff}.history-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.history h4{margin:0 0 5px}.history p{margin:8px 0;line-height:1.5}.tag-list{display:flex;gap:6px;flex-wrap:wrap}.tag{font-size:12px;padding:5px 7px;border-radius:7px;background:#f1f5f9}.tag.good{background:var(--success-soft);color:var(--success)}.tag.bad{background:var(--danger-soft);color:var(--danger)}
.modal{position:fixed;inset:0;background:rgba(15,23,42,.45);display:none;align-items:center;justify-content:center;padding:20px;z-index:50}.modal.open{display:flex}.modal-panel{width:min(620px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:16px;border:1px solid var(--line);padding:20px}.modal-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:16px}.modal-head h2{margin:0}.icon-btn{border:0;background:#f3f4f6;border-radius:9px;width:44px;height:44px;min-width:44px}
.tabs{display:flex;gap:8px;margin-bottom:18px;flex-wrap:wrap}.tab{border:1px solid var(--line);background:#fff;border-radius:9px;padding:10px 14px;min-height:44px}.tab.active{background:var(--primary);border-color:var(--primary);color:#fff}.tab-panel{display:none}.tab-panel.active{display:block}
.config-row{display:grid;grid-template-columns:80px 1fr 1fr auto;gap:10px;align-items:end;margin-bottom:10px}.phrase-row{display:grid;grid-template-columns:130px 1fr auto auto;gap:8px;align-items:center;margin-bottom:8px}
.student-login{width:min(520px,calc(100% - 32px));margin:8vh auto 0}.login-home-action{display:flex;justify-content:flex-start;margin-bottom:22px}.student-view{width:min(820px,calc(100% - 32px));margin:28px auto 48px}.student-profile h1{margin:0 0 6px}.feedback-display{display:grid;gap:18px}.level-display{text-align:center}.level-display img{max-width:220px;max-height:220px;object-fit:contain}.level-display .level-fallback{margin:0 auto;width:110px;height:110px;font-size:38px}.level-display h2{margin:10px 0 0}.block h3{margin:0 0 10px}.block ul{margin:0;padding-left:20px}.block li{margin:6px 0;line-height:1.45}.raise{border:1px solid #e3c56b;background:var(--warning-soft);padding:18px;border-radius:14px}.raise h3{margin-top:0}.notice{padding:12px 14px;border-radius:10px;background:#eef6ff;color:#1a4f7e;margin:12px 0}.error{background:#fff0f0;color:#8c2323}.success{background:#edf8f1;color:#276442}
hr{border:0;border-top:1px solid var(--line);margin:22px 0}
@media(max-width:900px){.hero-grid,.layout,.grid.two,.grid.three{grid-template-columns:1fr}.sidebar{position:static}.levels{grid-template-columns:repeat(2,minmax(0,1fr))}.config-row,.phrase-row{grid-template-columns:1fr}.topbar-inner{padding:10px 0}.student-row .actions{gap:5px}}
.professor-name{display:inline-flex;align-items:center;padding:7px 10px;font-size:13px;color:var(--muted);background:#f4f6f8;border-radius:10px}
.registration-note{margin-top:10px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#f8fafc;font-size:13px;line-height:1.45;white-space:pre-wrap}.registration-note.compact{margin-top:9px;padding:8px 9px}.report-btn{border-color:#b9d1e6;background:#f2f8fd;color:#174a78}.app-toast{position:fixed;right:22px;bottom:22px;z-index:100;max-width:min(420px,calc(100% - 44px));padding:13px 16px;border-radius:12px;background:#1f2937;color:#fff;box-shadow:0 10px 30px rgba(15,23,42,.22);opacity:0;transform:translateY(10px);transition:opacity .18s ease,transform .18s ease}.app-toast.show{opacity:1;transform:translateY(0)}.app-toast.error{background:#8c2323}


/* V3 — apresentação do feedback do aluno */
.student-feedback-layout{margin-top:28px;gap:32px}
.student-current-feedback{display:grid;gap:16px}
.student-section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;flex-wrap:wrap}
.student-section-heading h2{margin:5px 0 0;font-size:clamp(22px,4vw,30px)}
.eyebrow{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--primary-dark)}
.student-feedback-card{display:grid;gap:28px;padding:26px}
.student-feedback-card.latest{border-color:#c9d9e8}
.feedback-card-date{font-size:13px;color:var(--muted);padding-bottom:2px}
.student-level-display{display:flex;text-align:left;align-items:center;justify-content:flex-start;gap:20px;padding-bottom:4px}
.student-level-display img{width:96px;height:96px;max-width:96px;max-height:96px;flex:0 0 auto}
.student-level-display .level-fallback{margin:0;width:96px;height:96px;font-size:32px;flex:0 0 auto}
.student-level-display .level-copy{min-width:0}
.student-level-display .level-copy h3{font-size:clamp(22px,4vw,30px);margin:5px 0 0}
.level-number-label{font-size:13px;font-weight:700;color:var(--muted)}
.student-feedback-block{display:grid;gap:12px;padding-top:22px;border-top:1px solid var(--line)}
.student-feedback-block h4{margin:0;font-size:17px}
.student-feedback-block p{margin:0;white-space:pre-wrap;line-height:1.7}
.student-tag-list{gap:10px}
.student-tag-list .tag{font-size:14px;line-height:1.45;padding:9px 11px;border-radius:9px}
/* Contrastes medidos: good 5.40:1 e bad 6.11:1 (WCAG AA para texto normal). */
.tag.good{background:#eaf6ef;color:#2f6f4e;border:1px solid #b9ddc7}
.tag.bad{background:#fdecec;color:#a92727;border:1px solid #efc4c4}
.feedback-history-accordion{border:1px solid var(--line);border-radius:var(--radius);background:#fff;overflow:hidden}
.feedback-history-accordion summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;min-height:58px;font-weight:700;cursor:pointer}
.feedback-history-accordion summary::-webkit-details-marker{display:none}
.feedback-history-accordion summary::after{content:'▾';font-size:20px;line-height:1;transition:transform .16s ease}
.feedback-history-accordion[open] summary::after{transform:rotate(180deg)}
.feedback-history-accordion summary:focus-visible{outline:3px solid rgba(31,95,153,.28);outline-offset:-3px}
.history-summary-meta{margin-left:auto;font-size:13px;font-weight:400;color:var(--muted)}
.student-history-cards{display:grid;gap:18px;padding:0 18px 18px;border-top:1px solid var(--line)}
.student-history-cards>.student-feedback-card:first-child,.student-history-cards>.empty:first-child{margin-top:18px}
.student-history-cards .student-feedback-card{padding:22px}
.student-raise{margin-top:32px;padding:22px}

@media(max-width:600px){
  .container,.student-view{width:min(100% - 24px,1180px)}
  main{padding-top:20px}
  .card{padding:18px}
  .btn,.btn.small,.chip,.tab{min-height:48px;padding-top:11px;padding-bottom:11px}
  .actions .btn{flex:1 1 auto}
  .student-feedback-layout{margin-top:24px;gap:26px}
  .student-feedback-card{padding:20px;gap:24px}
  .student-level-display{align-items:flex-start;gap:15px}
  .student-level-display img,.student-level-display .level-fallback{width:78px;height:78px;max-width:78px;max-height:78px}
  .student-section-heading{align-items:flex-start;flex-direction:column;gap:7px}
  .feedback-history-accordion summary{padding:16px;min-height:60px}
  .history-summary-meta{display:none}
  .student-history-cards{padding:0 12px 12px;gap:14px}
  .student-history-cards>.student-feedback-card:first-child,.student-history-cards>.empty:first-child{margin-top:12px}
  .student-history-cards .student-feedback-card{padding:17px}
  .student-raise{margin-top:26px;padding:18px}
}

/* V3.1 — cadastro geral de alunos e associação com vários cursos */
.dashboard-section{margin-bottom:42px}
.dashboard-section+.dashboard-section{padding-top:28px;border-top:1px solid var(--line)}
.search-field{width:min(520px,100%);margin:0 0 18px}
.search-field label{margin-bottom:7px}
.search-field input[type="search"]{min-height:46px}
.compact-search{width:100%;margin-bottom:14px}
.student-registry-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.registry-empty{grid-column:1/-1}
.registry-student-card{display:flex;flex-direction:column;gap:10px}
.registry-student-card.hand{background:var(--warning-soft);border-color:#e6c55f}
.registry-student-card h3{margin:0 0 5px;font-size:18px}
.registry-email{overflow-wrap:anywhere}
.course-membership{line-height:1.4}
.hand-pill{background:#fff5d9!important;color:#6d4800}
.feedback-hand{font-size:14px}
.student-registration-line{margin-top:6px;line-height:1.55}
.course-toolbar{align-items:flex-start}
.association-list{display:grid;gap:8px;margin:4px 0 18px;max-height:52vh;overflow:auto;padding-right:3px}
.association-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;border:1px solid var(--line);border-radius:12px;padding:12px;background:#fff;cursor:pointer;margin:0}
.association-row:hover{background:#f8fafc}
.association-row:has(input:checked){border-color:#8bb3d6;background:#f2f8fd}
.association-row input[type="checkbox"]{width:22px;height:22px;margin:0;accent-color:var(--primary)}
.association-person{display:grid;gap:4px;min-width:0}
.association-person strong{font-size:15px}
.association-person span{font-size:13px;color:var(--muted)}
.sticky-modal-actions{position:sticky;bottom:-20px;background:#fff;padding:14px 0 0;border-top:1px solid var(--line)}
.history-actions{margin-top:0}
.feedback-course-label{justify-self:start;background:#eef3f7;color:#43576a;border:1px solid #d7e0e8;border-radius:999px;padding:6px 10px;font-size:13px;line-height:1.3}

@media(max-width:900px){
  .student-registry-grid{grid-template-columns:1fr}
}
@media(max-width:600px){
  .dashboard-section{margin-bottom:34px}
  .dashboard-section+.dashboard-section{padding-top:22px}
  .association-row{padding:13px 10px}
  .association-row input[type="checkbox"]{width:24px;height:24px}
  .sticky-modal-actions{bottom:-20px}
}

/* V3.2 */
.registry-key-line{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.conversation-request-note{padding:10px 12px;border:1px solid #d3b44d;background:#fff8d8;color:#5c4700;border-radius:10px;line-height:1.5}.conversation-course-field{margin:16px 0 12px}.conversation-status{margin-top:10px;line-height:1.5;min-height:1.5em}


/* V3.5 — identidade visual baseada na pasta CSS de referência + acessibilidade WCAG 2.2 */
h1,h2,h3,h4,.brand,.btn,.tab,.level-title,label{font-family:var(--font-title)}
h1,h2,h3,h4{color:var(--cor-azul)}
.topbar{background:var(--cor-azul);border-bottom:3px solid var(--cor-laranja)}
.topbar .brand{color:var(--cor-creme)}
.topbar .brand small{color:var(--cor-creme);opacity:.92}
.topbar .professor-name{background:var(--cor-creme);color:var(--cor-azul)}
.topbar .status-dot{background:var(--cor-laranja)}
.btn{border-color:var(--primary);color:var(--primary);font-weight:650;background:#fff}
.btn:hover{background:#f6f2ec}
.btn.primary{background:var(--cor-laranja);border-color:var(--cor-laranja);color:#1f1f1f}
.btn.primary:hover{background:var(--cor-laranja-escuro);border-color:var(--cor-laranja-escuro);color:#1f1f1f}
.btn.danger{border-color:#a92727;color:#8f2020;background:#fff}
.card{box-shadow:0 3px 14px rgba(40,77,108,.08)}
.hero h1,.student-section-heading h2{color:var(--cor-azul)}
.eyebrow{color:#6f4b85}
input,textarea,select{border-color:#7A8794;min-height:44px}
textarea{min-height:108px}
input:focus,textarea:focus,select:focus{outline:3px solid var(--cor-azul);outline-offset:2px;border-color:var(--cor-azul)}
button:focus-visible,a:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--cor-azul);outline-offset:3px}
.topbar button:focus-visible,.topbar a:focus-visible{outline-color:var(--cor-laranja)}
.chip{border-color:#7A8794}
.chip.selected{background:#edf4f8;border-color:var(--cor-azul);color:#173f5c}
.chip.negative.selected{background:#fdecec;border-color:#a92727;color:#7a1d1d}
.level{border-color:#8A96A3}
.level.selected{border-color:var(--cor-azul);background:#edf4f8;box-shadow:0 0 0 3px rgba(40,77,108,.14)}
.pill{background:var(--cor-creme);color:var(--cor-azul);border:1px solid #b78a54}
.feedback-course-label{background:var(--cor-creme);color:var(--cor-azul);border-color:#b78a54}
.notice{background:#edf4f8;color:#173f5c}
.raise{border-color:#a97a16;background:#fff5d9;color:#4f3900}
.feedback-history-accordion summary{color:var(--cor-azul)}

/* Foto de perfil no cadastro do professor */
.profile-photo-editor{display:grid;grid-template-columns:96px minmax(0,1fr);gap:18px;align-items:center}
.profile-photo-preview{width:96px;height:96px;border-radius:50%;overflow:hidden;border:2px solid var(--cor-azul);background:var(--cor-creme);display:grid;place-items:center;color:var(--cor-azul);font-family:var(--font-title);font-size:2rem;font-weight:800;flex:0 0 auto}
.profile-photo-preview img{width:100%;height:100%;object-fit:cover;display:block}
.profile-photo-controls{display:grid;gap:10px;min-width:0}
.profile-photo-controls input[type="file"]{padding:8px;background:#fff}
.profile-photo-controls .btn{justify-self:start}

/* Cabeçalho de perfil do aluno */
.student-profile{padding:24px 26px}
.student-profile-heading{display:flex;align-items:center;gap:18px;min-width:0}
.student-profile-photo{width:72px;height:72px;flex:0 0 72px;border-radius:50%;overflow:hidden;border:3px solid var(--cor-laranja);background:var(--cor-creme);display:grid;place-items:center;color:var(--cor-azul);font-family:var(--font-title);font-size:1.75rem;font-weight:800}
.student-profile-photo img{width:100%;height:100%;display:block;object-fit:cover}
.student-profile-copy{min-width:0}
.student-profile-copy h1{margin:0 0 6px;font-size:clamp(1.75rem,4vw,2.45rem);line-height:1.08;overflow-wrap:anywhere}
.student-profile-copy .subtle{line-height:1.6}

/* Evolução: visualmente apenas as imagens dos níveis */
.student-evolution{margin-top:22px;padding:24px 26px}
.evolution-heading{margin-bottom:18px}
.level-evolution-list{list-style:none;margin:0;padding:4px 2px 10px;display:flex;gap:14px;align-items:center;overflow-x:auto;scrollbar-width:thin;scrollbar-color:var(--cor-azul) transparent}
.level-evolution-item{flex:0 0 auto;margin:0;padding:0}
.level-evolution-item img{display:block;width:74px;height:74px;object-fit:contain;border-radius:14px;background:#fff;border:1px solid #8A96A3;padding:5px}

/* Touch targets e espaçamento */
.btn,.btn.small,.chip,.tab,.icon-btn{min-height:48px}
.icon-btn{min-width:48px;width:48px;height:48px}
.actions{gap:10px}
.student-top-actions{margin-bottom:20px}
.toolbar-actions{margin-top:0}

@media(max-width:600px){
  .profile-photo-editor{grid-template-columns:76px minmax(0,1fr);gap:14px}
  .profile-photo-preview{width:76px;height:76px}
  .student-profile{padding:20px}
  .student-profile-heading{gap:14px;align-items:center}
  .student-profile-photo{width:58px;height:58px;flex-basis:58px;border-width:2px;font-size:1.35rem}
  .student-profile-copy h1{font-size:clamp(1.45rem,7vw,1.95rem)}
  .student-evolution{padding:20px;margin-top:18px}
  .level-evolution-list{gap:11px}
  .level-evolution-item img{width:62px;height:62px}
  .student-top-actions{align-items:flex-start}
  .toolbar-actions{width:100%}
  .toolbar-actions .btn{flex:1 1 0}
}

/* =========================================================
   V4 — Cell Shading / interface completa
   Paleta derivada dos CSS de referência do projeto.
   ========================================================= */
:root{
  --cell-ink:#17344E;
  --cell-blue:#284D6C;
  --cell-blue-dark:#18364F;
  --cell-paper:#FFFFFF;
  --cell-bg:#E8F3F8;
  --cell-orange:#F3A527;
  --cell-orange-dark:#E36A35;
  --cell-teal:#367B86;
  --cell-teal-dark:#075C63;
  --cell-pink:#E6759B;
  --cell-purple:#86659A;
  --cell-good-bg:#DDF4F1;
  --cell-good-text:#075C63;
  --cell-bad-bg:#FFE5DF;
  --cell-bad-text:#8D2518;
  --cell-shadow:#17344E;
  --cell-soft-shadow:#B7CBD5;
  --cell-radius:18px;
}

html{background:var(--cell-bg)}
body.cell-ui{
  min-height:100vh;
  background-color:var(--cell-bg);
  background-image:
    linear-gradient(135deg,rgba(255,255,255,.54) 0 18%,transparent 18% 78%,rgba(40,77,108,.045) 78% 100%);
  background-attachment:fixed;
  color:var(--cell-ink);
}
body.cell-ui::before{
  content:"";
  position:fixed;
  z-index:-1;
  inset:auto auto 0 0;
  width:min(38vw,430px);
  height:min(36vh,320px);
  background:var(--cor-creme);
  clip-path:polygon(0 35%,55% 0,100% 28%,76% 100%,0 100%);
  opacity:.55;
  pointer-events:none;
}
body.cell-ui::after{
  content:"";
  position:fixed;
  z-index:-1;
  top:90px;
  right:0;
  width:min(26vw,300px);
  height:min(28vh,240px);
  background:var(--cor-roxo);
  clip-path:polygon(50% 0,100% 20%,100% 100%,10% 66%);
  opacity:.10;
  pointer-events:none;
}

.sr-only{
  position:absolute!important;
  width:1px!important;height:1px!important;
  padding:0!important;margin:-1px!important;
  overflow:hidden!important;clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;border:0!important;
}

body.cell-ui .topbar{
  background:var(--cell-blue);
  border-bottom:4px solid var(--cell-ink);
  box-shadow:0 5px 0 var(--cell-orange);
}
body.cell-ui .topbar-inner{min-height:82px}
body.cell-ui .brand{font-family:var(--font-title);font-weight:900;letter-spacing:-.02em;color:var(--cell-paper)}
body.cell-ui .brand small{color:var(--cell-paper);opacity:.92;font-family:var(--font-body)}
body.cell-ui main{min-height:calc(100vh - 86px)}

body.cell-ui h1,body.cell-ui h2,body.cell-ui h3,body.cell-ui h4{color:var(--cell-ink)}
body.cell-ui .subtle{color:#425563}

/* Painéis com contorno e sombra dura, sem perder legibilidade. */
body.cell-ui .card,
body.cell-ui .cell-panel,
body.cell-ui .modal-panel,
body.cell-ui .history-feedback-card,
body.cell-ui .association-row,
body.cell-ui .student-row{
  background:var(--cell-paper);
  border:2px solid var(--cell-ink);
  border-radius:var(--cell-radius);
  box-shadow:6px 6px 0 var(--cell-soft-shadow);
}
body.cell-ui .modal-panel{box-shadow:9px 9px 0 var(--cell-ink)}
body.cell-ui .empty{background:#F7FAFC;border:2px dashed var(--cell-blue);color:#425563}

/* Botões cell shading */
body.cell-ui .btn,
body.cell-ui .tab,
body.cell-ui .icon-btn{
  min-height:48px;
  border:2px solid var(--cell-ink);
  border-radius:13px;
  background:#fff;
  color:var(--cell-ink);
  font-weight:800;
  box-shadow:3px 3px 0 var(--cell-ink);
  transition:transform .12s ease,box-shadow .12s ease,background-color .12s ease;
}
body.cell-ui .btn:hover,
body.cell-ui .tab:hover,
body.cell-ui .icon-btn:hover{background:var(--cor-creme);transform:translate(-1px,-1px);box-shadow:4px 4px 0 var(--cell-ink)}
body.cell-ui .btn:active,
body.cell-ui .tab:active,
body.cell-ui .icon-btn:active{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--cell-ink)}
body.cell-ui .btn.primary,
body.cell-ui .tab.active{
  background:var(--cell-orange);
  border-color:var(--cell-ink);
  color:#1E1E1E;
}
body.cell-ui .btn.primary:hover{background:#FFC24E;color:#1E1E1E}
body.cell-ui .btn.danger{background:#fff0ec;color:#7A1D1D;border-color:#7A1D1D;box-shadow:3px 3px 0 #7A1D1D}
body.cell-ui .btn:disabled{opacity:.58;cursor:not-allowed;transform:none!important;box-shadow:2px 2px 0 #70808D!important}
body.cell-ui .btn.small{min-height:46px;padding:10px 14px;font-size:13px}
body.cell-ui .wide-action{width:100%;margin-top:4px}

body.cell-ui input,
body.cell-ui textarea,
body.cell-ui select{
  min-height:48px;
  background:#fff;
  border:2px solid var(--cell-ink);
  border-radius:12px;
  color:var(--cell-ink);
  box-shadow:2px 2px 0 #B7CBD5;
}
body.cell-ui textarea{min-height:112px}
body.cell-ui input:focus,
body.cell-ui textarea:focus,
body.cell-ui select:focus{
  outline:3px solid var(--cell-orange);
  outline-offset:3px;
  border-color:var(--cell-ink);
}
body.cell-ui button:focus-visible,
body.cell-ui a:focus-visible,
body.cell-ui summary:focus-visible,
body.cell-ui [tabindex]:focus-visible{
  outline:4px solid var(--cell-orange);
  outline-offset:4px;
}
body.cell-ui .topbar button:focus-visible,
body.cell-ui .topbar a:focus-visible{outline-color:var(--cell-orange)}

body.cell-ui .pill,
body.cell-ui .key{
  border:2px solid var(--cell-ink);
  background:#fff3df;
  color:var(--cell-ink);
  box-shadow:2px 2px 0 #B7CBD5;
}
body.cell-ui .key{border-radius:8px;padding:5px 8px}
body.cell-ui .registration-note{border:2px solid #6D7F8E;background:#fff;color:#344B5D;border-radius:12px}
body.cell-ui hr{border-top:2px solid #8AA1B0}

/* Centralização sempre que a natureza da tela permitir. */
body.cell-ui .hero{min-height:calc(100vh - 86px);display:grid;align-items:center;padding:42px 0}
body.cell-ui .hero-grid{align-items:center}
body.cell-ui .hero-grid>section:first-child{max-width:760px;margin-inline:auto}
body.cell-ui main:has(> #professorLoginView:not([hidden])),
body.student-page main:has(> #loginView:not([hidden])){
  display:grid;
  place-items:center;
  padding:34px 0 54px;
}
body.cell-ui #professorLoginView,
body.cell-ui .student-login{margin:0 auto;width:min(540px,calc(100% - 32px))}
body.cell-ui .student-login{text-align:center;padding:30px}
body.cell-ui .student-login .field{text-align:left}
body.cell-ui .student-login .comic-kicker{display:block;margin-bottom:5px}
body.cell-ui .student-login h1{margin:4px 0 8px}

/* Destaques gráficos */
.comic-kicker{
  display:inline-block;
  font-family:var(--font-title);
  font-size:12px;
  font-weight:900;
  letter-spacing:.11em;
  text-transform:uppercase;
  color:#8D3818;
}
.comic-badge{
  width:46px;height:46px;
  flex:0 0 46px;
  display:grid;place-items:center;
  border:2px solid var(--cell-ink);
  border-radius:50%;
  background:var(--cell-orange);
  color:var(--cell-ink);
  box-shadow:3px 3px 0 var(--cell-ink);
  font-family:var(--font-title);
  font-weight:900;
}

/* =========================================================
   FOTO DO ALUNO — usada em toda ocorrência de identidade.
   ========================================================= */
.student-identity-row{display:flex;align-items:center;gap:14px;min-width:0}
.student-identity-copy{min-width:0;flex:1}
.student-avatar,
.student-header-photo{
  flex:0 0 auto;
  display:grid;place-items:center;
  overflow:hidden;
  border-radius:50%;
  border:3px solid var(--cell-ink);
  background:var(--cell-orange);
  color:var(--cell-ink);
  font-family:var(--font-title);
  font-weight:900;
  box-shadow:3px 3px 0 var(--cell-ink);
}
.student-avatar img,
.student-header-photo img{width:100%;height:100%;object-fit:cover;display:block}
.student-avatar.avatar-sm{width:46px;height:46px;font-size:17px}
.student-avatar.avatar-md{width:54px;height:54px;font-size:20px}
.student-avatar.avatar-lg{width:66px;height:66px;font-size:24px}
.student-avatar.avatar-xl{width:78px;height:78px;font-size:29px}
.registry-identity{align-items:flex-start}
.course-student-identity{align-items:flex-start}
.feedback-student-identity h2{margin:0 0 5px}
.association-person-with-photo{display:flex;align-items:center;gap:12px;min-width:0}

body.cell-ui .registry-student-card,
body.cell-ui .course-card{position:relative;overflow:hidden}
body.cell-ui .registry-student-card::before,
body.cell-ui .course-card::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:8px;background:var(--cell-teal);border-right:2px solid var(--cell-ink)
}
body.cell-ui .registry-student-card.hand::before{background:var(--cell-orange)}
body.cell-ui .student-row.active{background:#EEF7FB;border-color:var(--cell-ink);box-shadow:6px 6px 0 var(--cell-blue)}
body.cell-ui .student-row.hand{background:#FFF2BF;border-color:var(--cell-ink)}
body.cell-ui .association-row:has(input:checked){border-color:var(--cell-ink);background:#E7F4F6;box-shadow:5px 5px 0 var(--cell-teal)}
body.cell-ui .association-row input[type="checkbox"]{accent-color:var(--cell-blue)}
body.cell-ui .hand-pill{background:#FFF2BF!important;color:#5A4000;border-color:#5A4000}
body.cell-ui .conversation-request-note{border:2px solid #6D5200;background:#FFF2BF;color:#4B3800;box-shadow:2px 2px 0 #C9A43C}

/* Chips / níveis do professor */
body.cell-ui .chip{min-height:48px;border:2px solid var(--cell-ink);box-shadow:2px 2px 0 #B7CBD5;background:#fff;color:var(--cell-ink);font-weight:700}
body.cell-ui .chip.selected{background:var(--cell-good-bg);color:var(--cell-good-text);border-color:var(--cell-good-text);box-shadow:3px 3px 0 var(--cell-good-text)}
body.cell-ui .chip.negative.selected{background:var(--cell-bad-bg);color:var(--cell-bad-text);border-color:var(--cell-bad-text);box-shadow:3px 3px 0 var(--cell-bad-text)}
body.cell-ui .level{border:2px solid var(--cell-ink);box-shadow:3px 3px 0 #B7CBD5;background:#fff}
body.cell-ui .level.selected{border-color:var(--cell-ink);background:#FFF0BE;box-shadow:5px 5px 0 var(--cell-orange-dark)}
body.cell-ui .level img{width:70px;height:70px}

/* =========================================================
   ÁREA DO ALUNO — hierarquia aprovada na V4
   ========================================================= */
.student-topbar{position:sticky;top:0}
.student-topbar-inner{gap:18px}
.student-header-actions{display:flex;align-items:center;gap:10px;flex:0 0 auto}
body.cell-ui .comic-nav-btn{
  background:#1E628F;
  color:#fff;
  border-color:var(--cell-paper);
  box-shadow:4px 4px 0 #102D43;
}
body.cell-ui .comic-nav-btn:hover{background:#347CA8;color:#fff}
.secondary-header-action{font-size:13px}
.student-guest-brand{margin-left:auto}
.student-header-identity{margin-left:auto;display:flex;align-items:center;gap:14px;color:var(--cell-paper);min-width:0}
.student-header-photo{width:68px;height:68px;background:var(--cell-paper);color:var(--cell-ink);border-color:#fff;box-shadow:4px 4px 0 #102D43;font-size:25px}
.student-header-copy{display:grid;gap:2px;min-width:0}
.student-header-copy strong{font-family:var(--font-title);font-size:clamp(18px,2.8vw,26px);line-height:1.05;color:#fff;overflow-wrap:anywhere}
.student-header-copy span{font-size:14px;color:#fff}
.student-view{width:min(980px,calc(100% - 32px));margin:34px auto 64px}
.student-utility-line{display:flex;justify-content:flex-end;margin:0 0 18px}
.student-utility-line .subtle{background:#F7FAFC;border:2px solid var(--cell-ink);border-radius:999px;padding:7px 12px}
.student-feedback-layout{margin-top:0;gap:30px}

.student-feedback-card.latest{padding:0;overflow:hidden}
.latest-feedback-heading{display:flex;align-items:center;gap:15px;padding:24px 26px 20px;border-bottom:2px solid var(--cell-ink);background:#FFF1D9}
.latest-feedback-heading h1{margin:3px 0 0;font-size:clamp(25px,4vw,36px);line-height:1.08;color:#A43B17}
.latest-feedback-body{padding:24px 26px 26px;display:grid;gap:22px}
.feedback-context-row{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;border:2px solid #D58F4A;background:#fff;padding:13px 15px;border-radius:13px}
.feedback-course-info{display:flex;align-items:center;gap:9px;min-width:0}
.context-icon{width:32px;height:32px;display:grid;place-items:center;border:2px solid var(--cell-ink);border-radius:9px;background:var(--cor-creme);font-weight:900}
.feedback-date{font-weight:800;color:var(--cell-ink)}
.hero-level-display{text-align:center;display:grid;justify-items:center;gap:9px;padding:6px 0}
.feedback-level-image.hero-level-image{width:150px;height:150px;object-fit:contain;filter:drop-shadow(5px 5px 0 rgba(23,52,78,.25))}
.hero-level-display .level-number-label{display:inline-block;font-family:var(--font-title);font-size:12px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#5A6570}
.hero-level-display h2{margin:3px 0 0;font-size:clamp(26px,4vw,38px)}

.feedback-points-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;align-items:start}
.student-feedback-block{min-width:0}
.student-feedback-block h3{display:flex;align-items:center;gap:9px;margin:0 0 12px;font-size:18px}
.block-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;border:2px solid currentColor;font-family:var(--font-title);font-weight:900;background:#fff}
.positive-block{border-right:1px solid #98A7B0;padding-right:22px}
.positive-block h3{color:var(--cell-good-text)}
.improve-block h3{color:var(--cell-bad-text)}
.student-tag-list{display:grid;gap:8px}
.feedback-tag{display:flex;align-items:flex-start;gap:8px;width:fit-content;max-width:100%;padding:8px 12px;border:1.5px solid currentColor;border-radius:999px;font-weight:650;line-height:1.35}
.feedback-tag-icon{width:22px;height:22px;flex:0 0 22px;display:grid;place-items:center;border-radius:50%;background:currentColor;color:#fff;font-size:12px;font-weight:900}
.positive-block .feedback-tag{background:var(--cell-good-bg);color:var(--cell-good-text)}
.improve-block .feedback-tag{background:var(--cell-bad-bg);color:var(--cell-bad-text)}
.empty-feedback-block p{margin:0}
.observation-block{border:2px solid #6D7F8E;background:#fff;padding:16px;border-radius:13px}
.observation-block h3{margin-bottom:7px}.observation-block p{margin:0;white-space:pre-wrap}

.latest-conversation-action{display:grid;gap:8px;margin-top:2px}
body.cell-ui .conversation-feedback-btn{
  width:100%;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:12px;
  min-height:64px;
  padding:12px 17px;
  background:#FFF0BE;
  color:#8D3818;
  border-color:#8D3818;
  box-shadow:4px 4px 0 #8D3818;
  font-size:clamp(15px,2.6vw,18px);
}
body.cell-ui .conversation-feedback-btn:hover{background:#FFE38C}
body.cell-ui .conversation-feedback-btn.active{background:#DDF4F1;color:var(--cell-good-text);border-color:var(--cell-good-text);box-shadow:4px 4px 0 var(--cell-good-text)}
.conversation-hand{font-size:27px}.conversation-inline-status{margin:0;text-align:center}

/* Accordion principal: todo o histórico, inclusive evolução, fica escondido. */
.feedback-history-accordion{padding:0;overflow:hidden}
.feedback-history-accordion>summary{
  list-style:none;
  cursor:pointer;
  min-height:76px;
  padding:18px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  background:var(--cell-paper);
  color:var(--cell-ink);
  font-family:var(--font-title);
  font-size:clamp(19px,3vw,25px);
  font-weight:900;
}
.feedback-history-accordion>summary::-webkit-details-marker{display:none}
.feedback-history-accordion>summary::after{content:"⌄";font-size:28px;line-height:1;transform-origin:center;transition:transform .15s ease}
.feedback-history-accordion[open]>summary{border-bottom:2px solid var(--cell-ink);background:#F1E9FF}
.feedback-history-accordion[open]>summary::after{transform:rotate(180deg)}
.history-summary-title{display:flex;align-items:center;gap:13px;min-width:0}
.history-badge{background:var(--cell-purple);color:#fff}
.history-summary-meta{font-family:var(--font-body);font-size:13px;font-weight:700;color:#425563;text-align:right}
.history-accordion-content{padding:22px;display:grid;gap:22px}

.history-evolution{border:2px solid var(--cell-ink);border-radius:15px;background:#fff;padding:18px 19px;box-shadow:4px 4px 0 #B7CBD5}
.history-subheading{margin-bottom:16px}.history-subheading h2{margin:3px 0 0;font-size:21px}
.level-evolution-list{list-style:none;margin:0;padding:3px 2px 7px;display:flex;gap:16px;align-items:center;justify-content:center;overflow-x:auto;scrollbar-width:thin;scrollbar-color:var(--cell-blue) transparent}
.level-evolution-item{position:relative;flex:0 0 auto}
.level-evolution-item:not(:last-child)::after{content:"···";position:absolute;left:100%;top:50%;transform:translate(2px,-55%);width:16px;color:#6A7B87;font-weight:900;letter-spacing:2px}
.evolution-level-image{display:block;width:82px;height:82px;object-fit:contain;filter:drop-shadow(3px 3px 0 rgba(23,52,78,.20))}

.student-history-list{display:grid;gap:14px}
.history-feedback-card{overflow:hidden;box-shadow:4px 4px 0 #B7CBD5!important}
.history-feedback-card>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:14px 16px;min-height:78px;background:#fff}
.history-feedback-card>summary::-webkit-details-marker{display:none}
.history-feedback-card>summary::after{content:"⌄";font-size:22px;font-weight:900;color:var(--cell-purple)}
.history-feedback-card[open]>summary{border-bottom:2px solid var(--cell-ink);background:#F8F4FF}
.history-feedback-card[open]>summary::after{transform:rotate(180deg)}
.history-feedback-summary-main{display:flex;align-items:center;gap:12px;min-width:0;flex:1}
.history-feedback-summary-main>span:last-child{display:grid;min-width:0}
.history-feedback-summary-main strong{font-family:var(--font-title);font-size:16px;overflow-wrap:anywhere}
.history-feedback-summary-main small{color:#536775;font-size:13px;margin-top:2px}
.history-level-image{width:52px;height:52px;object-fit:contain;flex:0 0 52px}
.history-feedback-counts{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.mini-good,.mini-bad{display:inline-flex;align-items:center;gap:3px;padding:6px 8px;border-radius:999px;font-size:12px;font-weight:800;border:1.5px solid currentColor}
.mini-good{background:var(--cell-good-bg);color:var(--cell-good-text)}
.mini-bad{background:var(--cell-bad-bg);color:var(--cell-bad-text)}
.history-feedback-content{padding:18px;background:#fff}
.compact-points-grid .student-feedback-block h3{font-size:16px}
.compact-points-grid .feedback-tag{font-size:13px;padding:7px 10px}

.student-empty-state{max-width:680px;margin:70px auto;text-align:center}

/* Professor: dashboards mais centrais, sem prejudicar listas densas. */
body.cell-ui #professorApp{width:min(1220px,calc(100% - 32px));margin-inline:auto}
body.cell-ui .dashboard-section>.toolbar{text-align:left}
body.cell-ui .grid.three{grid-template-columns:repeat(3,minmax(250px,1fr))}
body.cell-ui .course-card,body.cell-ui .registry-student-card{padding:22px 22px 20px 28px}
body.cell-ui .course-card h3,body.cell-ui .registry-student-card h3{font-size:19px}
body.cell-ui .sidebar{border-width:2px}
body.cell-ui #feedbackArea{border-width:2px}
body.cell-ui .history-item{border:2px solid var(--cell-ink);box-shadow:3px 3px 0 #B7CBD5;background:#fff}
body.cell-ui .tag.good{background:var(--cell-good-bg);color:var(--cell-good-text);border:1px solid var(--cell-good-text)}
body.cell-ui .tag.bad{background:var(--cell-bad-bg);color:var(--cell-bad-text);border:1px solid var(--cell-bad-text)}
body.cell-ui .app-toast{border:2px solid #fff;box-shadow:5px 5px 0 var(--cell-ink)}

/* Home */
body.cell-ui .entry-card{padding:26px;box-shadow:8px 8px 0 var(--cell-ink)}
body.cell-ui .hero h1{font-family:var(--font-title);font-weight:900;color:var(--cell-ink);text-shadow:3px 3px 0 #fff}
body.cell-ui .hero p{color:#344E60}

@media(max-width:1000px){
  body.cell-ui .grid.three{grid-template-columns:repeat(2,minmax(250px,1fr))}
}
@media(max-width:760px){
  body.cell-ui .topbar-inner{min-height:74px}
  .student-topbar-inner{align-items:center}
  .student-header-photo{width:56px;height:56px;font-size:21px}
  .student-header-copy strong{font-size:18px}
  .student-header-copy span{font-size:12px}
  .feedback-points-grid{grid-template-columns:1fr;gap:17px}
  .positive-block{border-right:0;border-bottom:1px solid #98A7B0;padding-right:0;padding-bottom:17px}
  .level-evolution-list{justify-content:flex-start}
  .history-feedback-card>summary{align-items:flex-start;flex-wrap:wrap}
  .history-feedback-counts{padding-left:64px;justify-content:flex-start}
  body.cell-ui .grid.three{grid-template-columns:1fr}
}
@media(max-width:560px){
  body.cell-ui .container{width:min(100% - 22px,1180px)}
  .student-topbar-inner{gap:10px}
  body.cell-ui .comic-nav-btn{min-width:48px;padding:10px 12px}
  body.cell-ui .comic-nav-btn span:last-child{display:none}
  .student-header-identity{gap:9px}
  .student-header-photo{width:50px;height:50px;flex-basis:50px;border-width:2px;box-shadow:3px 3px 0 #102D43}
  .student-header-copy strong{font-size:16px;max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .student-header-copy span{font-size:11px;max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .student-guest-brand{font-size:16px}
  .student-view{width:min(100% - 22px,980px);margin:25px auto 50px}
  .student-utility-line{justify-content:center}
  .latest-feedback-heading{padding:20px 18px 17px}
  .latest-feedback-body{padding:19px 16px 20px;gap:19px}
  .comic-badge{width:40px;height:40px;flex-basis:40px}
  .feedback-context-row{padding:11px 12px}
  .feedback-course-info{font-size:14px}
  .feedback-level-image.hero-level-image{width:126px;height:126px}
  .hero-level-display h2{font-size:26px}
  body.cell-ui .conversation-feedback-btn{grid-template-columns:auto 1fr auto;min-height:66px;padding:11px 12px;font-size:14px}
  .conversation-hand{font-size:24px}
  .feedback-history-accordion>summary{padding:16px 15px;min-height:70px}
  .history-summary-meta{display:none}
  .history-accordion-content{padding:15px;gap:17px}
  .history-evolution{padding:15px 14px}
  .evolution-level-image{width:66px;height:66px}
  .level-evolution-list{gap:14px}
  .history-feedback-card>summary{padding:12px}
  .history-level-image{width:46px;height:46px;flex-basis:46px}
  .history-feedback-counts{padding-left:58px}
  .history-feedback-content{padding:14px}
  .student-avatar.avatar-xl{width:64px;height:64px;font-size:24px}
  body.cell-ui .btn,body.cell-ui .btn.small,body.cell-ui .tab,body.cell-ui .icon-btn{min-height:50px}
  body.cell-ui .student-login{padding:24px 18px}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}
/* Ajustes de compatibilidade com regras das versões anteriores */
body.student-page .student-feedback-card.latest{gap:0}
body.student-page .student-feedback-block{padding-top:0;border-top:0}
body.student-page .feedback-level-image.hero-level-image{max-width:none;max-height:none}
body.student-page .evolution-level-image,body.student-page .history-level-image{max-width:none;max-height:none}


/* =========================================================
   V4.1 — ajustes de centralização, contraste e legibilidade
   ========================================================= */
body.cell-ui{font-size:16px}
body.cell-ui label{font-size:14px}
body.cell-ui .brand small,
body.cell-ui .subtle,
body.cell-ui .pill,
body.cell-ui .key,
body.cell-ui .professor-name,
body.cell-ui .registration-note,
body.cell-ui .feedback-card-date,
body.cell-ui .history-summary-meta,
body.cell-ui .history-feedback-summary-main small,
body.cell-ui .mini-good,
body.cell-ui .mini-bad{font-size:14px}
body.cell-ui .btn.small{font-size:14px}
body.cell-ui .comic-kicker{font-size:13px}
body.cell-ui .hero-level-display .level-number-label{font-size:14px}

/* O emoji/nível principal ocupa toda a largura e fica centralizado. */
body.student-page .hero-level-display{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  margin-inline:auto;
}
body.student-page .hero-level-display .level-copy{
  width:100%;
  display:grid;
  justify-items:center;
  text-align:center;
}
body.student-page .hero-level-display .feedback-level-image{
  margin-inline:auto;
}

/* Opções de pontos: sem a bolinha branca/ícone circular ao lado de cada frase. */
body.student-page .feedback-tag-icon{display:none}
body.student-page .feedback-tag{gap:0;padding-inline:14px}

/* Cabeçalhos de pontos com marca gráfica mais discreta que a bolinha branca. */
body.student-page .block-icon{
  width:32px;
  height:32px;
  border-radius:9px;
  border-width:1.5px;
  box-shadow:none;
}
body.student-page .positive-block .block-icon{background:#EAF7F5;color:var(--cell-good-text)}
body.student-page .improve-block .block-icon{background:#FFF0EC;color:var(--cell-bad-text)}

/* Superfícies neutras: nenhum painel usa #FFF8ED como plano de fundo. */
body.cell-ui .card,
body.cell-ui .cell-panel,
body.cell-ui .modal-panel,
body.cell-ui .history-feedback-card,
body.cell-ui .association-row,
body.cell-ui .student-row,
body.cell-ui .feedback-history-accordion>summary{background:#FFFFFF}

/* Contraste: o teal base foi levemente escurecido para suportar texto branco quando necessário. */
body.cell-ui .history-badge{color:#FFFFFF}

@media(max-width:560px){
  body.cell-ui .student-header-copy span{font-size:13px}
  body.cell-ui .student-header-copy strong{font-size:17px}
  body.cell-ui .feedback-course-info{font-size:15px}
  body.cell-ui .conversation-feedback-btn{font-size:15px}
  body.cell-ui .history-summary-meta{font-size:14px}
}

/* =========================================================
   V4.2 — menu mobile e leitura confortável em telas pequenas
   ========================================================= */
.professor-header-nav{align-items:center}
.account-menu{position:relative;display:flex;align-items:center;min-width:0}
.account-menu-panel{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.menu-toggle{display:none!important}
.hamburger-icon{width:22px;height:18px;display:grid;align-content:space-between;flex:0 0 22px}
.hamburger-icon i{display:block;height:3px;border-radius:999px;background:currentColor}

/* O estado aberto/fechado dos accordions usa setas diferentes em vez de depender só de rotação. */
.feedback-history-accordion>summary::after{
  content:"▼";
  font-size:20px;
  line-height:1;
  transform:none;
  transition:none;
}
.feedback-history-accordion[open]>summary::after{content:"▲";transform:none}
.history-feedback-card>summary::after{
  content:"▼";
  font-size:18px;
  line-height:1;
  transform:none;
  transition:none;
}
.history-feedback-card[open]>summary::after{content:"▲";transform:none}

@media(max-width:760px){
  /* Voltar permanece visível. As demais opções passam para o menu hambúrguer. */
  .menu-toggle{display:inline-flex!important;min-width:50px;min-height:50px;padding:10px 13px}
  .menu-toggle-label{display:none}
  .account-menu-panel{
    display:none;
    position:absolute;
    top:calc(100% + 10px);
    right:0;
    width:min(280px,calc(100vw - 24px));
    padding:12px;
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    background:#fff;
    border:2px solid var(--cell-ink);
    border-radius:13px;
    box-shadow:5px 5px 0 #102D43;
    z-index:80;
  }
  .account-menu.open .account-menu-panel{display:flex}
  .account-menu-panel .btn,.account-menu-panel .professor-name{width:100%;min-height:50px;justify-content:flex-start;text-align:left}
  .account-menu-panel .professor-name{display:flex;align-items:center;padding:11px 13px;border:2px solid var(--cell-ink);border-radius:10px;background:#F5F8FA;color:var(--cell-ink)}
  .student-account-menu .account-menu-panel{left:0;right:auto}
  .professor-header-nav{margin-left:auto;flex-wrap:nowrap;align-items:center}
  .professor-header-nav>.header-back-action{flex:0 0 auto}

  /* Blocos densos passam a ocupar a largura disponível, evitando colunas estreitas. */
  .feedback-head,.history-top{align-items:stretch;flex-direction:column}
  .history-top>.actions,.feedback-head>.pill{align-self:stretch}
  .history-top>.actions .btn{flex:1 1 150px}
  .tag-list{display:grid;grid-template-columns:1fr;gap:8px;width:100%}
  .tag-list .tag{width:100%;font-size:14px;line-height:1.45;padding:8px 10px;overflow-wrap:anywhere}
  .student-row .actions,.registry-student-card .actions{width:100%}
  .student-row .actions .btn,.registry-student-card .actions .btn{flex:1 1 145px;white-space:normal}
}

@media(max-width:600px){
  /* Cabeçalho do aluno continua com voltar + menu à esquerda e identidade à direita. */
  .student-topbar-inner{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center}
  .student-header-actions{gap:7px}
  .student-header-identity{width:100%;justify-content:flex-end;min-width:0}
  .student-header-copy{min-width:0;max-width:100%}
  .student-header-copy strong,.student-header-copy span{max-width:100%}

  /* Contexto do feedback empilha em vez de comprimir curso e data na mesma linha. */
  .feedback-context-row{display:grid;grid-template-columns:1fr;align-items:start;width:100%}
  .feedback-course-info{width:100%;align-items:flex-start;font-size:15px;line-height:1.45}
  .feedback-course-info strong{min-width:0;overflow-wrap:anywhere}
  .feedback-date{justify-self:start;font-size:14px}

  /* Accordion principal: título nunca disputa espaço com metadados e seta. */
  .feedback-history-accordion>summary{
    position:relative;
    display:block;
    min-height:0;
    padding:17px 48px 17px 15px;
    line-height:1.35;
  }
  .feedback-history-accordion>summary::after{position:absolute;right:16px;top:22px}
  .history-summary-title{width:100%;align-items:flex-start;min-width:0}
  .history-summary-title>span:last-child{min-width:0;overflow-wrap:anywhere}
  .history-summary-meta{display:none!important}

  .history-accordion-content,.history-evolution,.student-history-list,.history-feedback-card,.history-feedback-content{width:100%;min-width:0}
  .history-accordion-content{padding:14px;gap:18px}
  .history-evolution{padding:15px 12px}
  .history-subheading h2{font-size:20px;line-height:1.3}

  /* Cada feedback antigo vira um bloco de leitura de largura total no mobile. */
  .history-feedback-card>summary{
    position:relative;
    display:block;
    min-height:0;
    padding:14px 46px 14px 13px;
  }
  .history-feedback-card>summary::after{position:absolute;right:15px;top:20px}
  .history-feedback-summary-main{width:100%;align-items:flex-start;gap:10px}
  .history-feedback-summary-main>span:last-child{width:100%;min-width:0}
  .history-feedback-summary-main strong,.history-feedback-summary-main small{
    display:block;
    width:100%;
    white-space:normal;
    overflow-wrap:anywhere;
    line-height:1.45;
  }
  .history-feedback-summary-main strong{font-size:16px}
  .history-feedback-summary-main small{font-size:14px;margin-top:4px}
  .history-feedback-counts{width:100%;padding-left:0;margin-top:12px;justify-content:flex-start;gap:8px}
  .mini-good,.mini-bad{font-size:14px;line-height:1.35;padding:7px 9px;white-space:normal}
  .history-feedback-content{padding:14px 12px}

  /* Frases de feedback usam a largura do card e quebram naturalmente. */
  .feedback-points-grid,.student-feedback-block,.student-tag-list{width:100%;min-width:0}
  .student-feedback-block h3{font-size:17px;line-height:1.35}
  .feedback-tag{
    width:100%;
    max-width:none;
    border-radius:12px;
    font-size:15px;
    line-height:1.45;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .positive-block{padding-right:0}
  .observation-block{width:100%;min-width:0}
  .observation-block p{overflow-wrap:anywhere}

  /* Outros históricos e ações do professor também evitam texto espremido. */
  .history-item{padding:14px 12px}
  .history-item .history-top{gap:10px}
  .history-item .history-top>div:first-child{width:100%;min-width:0}
  .history-item h4,.history-item p,.registration-note,.student-registration-line{overflow-wrap:anywhere}
  .history-actions{display:grid;grid-template-columns:1fr;width:100%}
  .history-actions .btn{width:100%;white-space:normal}
  .key{max-width:100%;overflow-wrap:anywhere;white-space:normal}

  .account-menu-panel{width:min(260px,calc(100vw - 22px))}
}

/* ===== V4.5 ===== */
.professor-history-level-heading{display:flex;align-items:center;gap:12px;min-width:0}
.professor-history-level-heading>div{min-width:0}
.professor-history-level-image{width:58px;height:58px;object-fit:contain;flex:0 0 58px;display:block}
.professor-history-level-fallback{width:52px;height:52px;flex:0 0 52px;display:grid;place-items:center;border:2px solid var(--cell-ink);border-radius:12px;background:#EAF1F5;color:var(--cell-ink);font-weight:900}

.photo-crop-workspace{margin-top:18px;padding:18px;border:2px solid var(--cell-ink);border-radius:16px;background:#F2F6F8;box-shadow:4px 4px 0 #B7CBD5}
.photo-crop-heading{display:grid;gap:3px;margin-bottom:14px}
.photo-crop-heading strong{font-family:var(--font-title);font-size:18px;color:var(--cell-ink)}
.photo-crop-stage{position:relative;width:min(360px,100%);aspect-ratio:1;margin-inline:auto;overflow:hidden;border:3px solid var(--cell-ink);border-radius:16px;background:#DDE8EE;box-shadow:4px 4px 0 var(--cell-ink)}
.photo-crop-stage canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab;user-select:none}
.photo-crop-stage canvas:active{cursor:grabbing}
.photo-crop-guide{position:absolute;inset:7%;border:3px solid rgba(255,255,255,.95);border-radius:50%;box-shadow:0 0 0 999px rgba(11,47,71,.28),0 0 0 2px rgba(11,47,71,.85);pointer-events:none}
.crop-zoom-field{max-width:460px;margin:18px auto 0}
.crop-zoom-field input[type="range"]{min-height:44px;padding:0;cursor:pointer}
.crop-actions{justify-content:center;margin-top:12px}

/* Mantém informações de curso legíveis com a identificação da UC. */
.course-card h3,.course-membership,#courseTitle,#associationCourseName,.feedback-course-info,.history-feedback-summary-main strong{overflow-wrap:anywhere}

@media(max-width:760px){
  .professor-history-level-heading{align-items:flex-start}
  .professor-history-level-image{width:50px;height:50px;flex-basis:50px}
  .history-top{display:grid;grid-template-columns:1fr;gap:14px}
  .history-top .history-actions{width:100%}
  .photo-crop-workspace{padding:14px 12px}
  .photo-crop-stage{width:min(320px,100%)}
  .crop-actions{display:grid;grid-template-columns:1fr}
  .crop-actions .btn{width:100%}
}
.crop-position-controls{display:grid;justify-items:center;gap:7px;margin:12px auto 0}
.crop-direction-grid{display:grid;grid-template-columns:repeat(3,52px);grid-template-rows:repeat(3,48px);gap:5px;grid-template-areas:". up ." "left center right" ". down ."}
.crop-direction{min-width:48px!important;min-height:48px!important;padding:0!important;font-size:20px!important;display:grid!important;place-items:center}
.crop-direction.up{grid-area:up}.crop-direction.left{grid-area:left}.crop-direction.center{grid-area:center}.crop-direction.right{grid-area:right}.crop-direction.down{grid-area:down}

/* =========================================================
   V4.6 — ações compactas nos alunos da turma
   ========================================================= */
.student-row-actions{
  display:flex;
  align-items:center;
  gap:9px;
  flex-wrap:wrap;
  margin-top:14px;
}
.student-feedback-primary{min-width:108px}
.student-icon-action{
  width:48px;
  height:48px;
  min-width:48px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  color:var(--cell-ink);
  background:#fff;
  border:2px solid var(--cell-ink);
  border-radius:12px;
  box-shadow:3px 3px 0 var(--cell-ink);
  cursor:pointer;
  transition:transform .12s ease,box-shadow .12s ease,background .12s ease;
}
.student-icon-action svg{width:23px;height:23px;fill:currentColor;display:block}
.student-icon-action:hover{background:#EAF5FA;transform:translate(-1px,-1px);box-shadow:4px 4px 0 var(--cell-ink)}
.student-icon-action:active{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--cell-ink)}
.student-icon-action:focus-visible{outline:3px solid #F3A527;outline-offset:3px}
.copy-key-action{color:#174C6B}
.student-settings-menu{position:relative;margin:0}
.student-settings-menu>summary{list-style:none}
.student-settings-menu>summary::-webkit-details-marker{display:none}
.student-settings-menu[open]>.settings-action{background:#FFE5B7}
.student-settings-panel{
  position:absolute;
  z-index:35;
  right:0;
  top:calc(100% + 9px);
  width:max-content;
  min-width:190px;
  display:grid;
  gap:7px;
  padding:9px;
  background:#fff;
  border:2px solid var(--cell-ink);
  border-radius:12px;
  box-shadow:5px 5px 0 var(--cell-ink);
}
.student-menu-option{
  min-height:46px;
  width:100%;
  padding:10px 12px;
  border:2px solid var(--cell-ink);
  border-radius:9px;
  background:#F5F8FA;
  color:var(--cell-ink);
  font:800 14px/1.25 var(--font-title);
  text-align:left;
  cursor:pointer;
}
.student-menu-option:hover{background:#EAF5FA}
.student-menu-option:focus-visible{outline:3px solid #F3A527;outline-offset:2px}
.student-menu-option.danger-option{color:#7E1717;background:#FFF1EE;border-color:#7E1717}
.student-menu-option.danger-option:hover{background:#FFE3DD}

@media(max-width:760px){
  .student-row .student-row-actions{width:100%;flex-wrap:nowrap}
  .student-row .student-feedback-primary{flex:1 1 auto;min-width:0}
  .student-row .student-icon-action{flex:0 0 50px;width:50px;height:50px}
  .student-settings-panel{right:0;min-width:min(220px,calc(100vw - 48px))}
}

/* =========================================================
   V4.7 — chave e copiar sempre juntos
   ========================================================= */
.student-key-inline,
.feedback-key-actions,
.registry-key-line{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.student-registration-line{
  display:flex;
  align-items:center;
  gap:8px 12px;
  flex-wrap:wrap;
}
.student-key-inline{color:inherit}
.key-inline-action{
  width:44px;
  height:44px;
  min-width:44px;
  border-radius:11px;
}
.key-inline-action svg{width:21px;height:21px}
.key-settings-menu{display:inline-block;vertical-align:middle}
.feedback-key-actions{margin-top:14px}
.feedback-key-actions .clear-hand-action{margin-left:4px}
.registry-student-card .registry-key-line{margin-top:10px}

@media(max-width:760px){
  .key-inline-action{width:48px;height:48px;min-width:48px}
  .student-registration-line{align-items:flex-start}
  .student-key-inline{width:100%;align-items:center}
  .feedback-key-actions{align-items:center}
  .feedback-key-actions .clear-hand-action{width:100%;margin-left:0}
}

/* =========================================================
   V4.8 — menu de configurações sem corte + cabeçalho de feedback
   ========================================================= */

/* O menu de opções do card de aluno precisa poder sair dos limites do card. */
body.cell-ui .registry-student-card{
  overflow:visible;
  z-index:1;
}
body.cell-ui .registry-student-card:has(.student-settings-menu[open]){
  z-index:80;
}
body.cell-ui .student-registry-grid{
  overflow:visible;
  align-items:start;
}
body.cell-ui .registry-student-card .student-settings-panel{
  z-index:90;
}

/* Cabeçalho da área de lançamento de feedback, seguindo o desenho de referência. */
.feedback-student-overview{
  display:grid;
  gap:16px;
  margin-bottom:18px;
  padding:18px;
  border:2px solid var(--cell-ink);
  border-radius:18px;
  background:#FFFFFF;
  box-shadow:5px 5px 0 #B7CBD5;
}
.feedback-student-overview-main{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:20px;
}
.feedback-student-photo{
  display:flex;
  align-items:center;
  justify-content:center;
}
.feedback-student-photo .student-avatar.avatar-xl{
  width:112px;
  height:112px;
  font-size:38px;
  box-shadow:4px 4px 0 var(--cell-ink);
}
.feedback-student-overview-copy{
  min-width:0;
  display:grid;
  gap:6px;
}
.feedback-student-eyebrow{
  font:800 14px/1.25 var(--font-title);
  color:#40576A;
}
.feedback-student-overview-copy h2{
  margin:0;
  font-size:clamp(22px,3vw,30px);
  line-height:1.15;
  overflow-wrap:anywhere;
}
.feedback-student-meta{
  font-size:15px;
  line-height:1.5;
  overflow-wrap:anywhere;
}
.feedback-key-actions-inline{
  margin-top:10px;
  width:fit-content;
  max-width:100%;
}
.feedback-registration-note{
  margin:0 0 14px;
}
.feedback-conversation-action{
  display:flex;
  justify-content:flex-start;
  margin:0 0 14px;
}
.feedback-section-banner{
  width:100%;
  min-height:58px;
  display:grid;
  place-items:center;
  margin:8px 0 10px;
  padding:12px 20px;
  border:3px solid var(--cell-ink);
  border-radius:16px;
  background:var(--cell-orange);
  color:var(--cell-ink);
  box-shadow:5px 5px 0 var(--cell-ink);
  font:900 clamp(20px,3vw,27px)/1.1 var(--font-title);
  text-align:center;
}
.feedback-form-note{
  margin:0 0 18px;
  text-align:center;
}

@media(max-width:760px){
  body.cell-ui .registry-student-card:has(.student-settings-menu[open]){
    z-index:120;
  }
  .feedback-student-overview{
    padding:16px 14px;
  }
  .feedback-student-overview-main{
    grid-template-columns:94px minmax(0,1fr);
    gap:14px;
    align-items:start;
  }
  .feedback-student-photo .student-avatar.avatar-xl{
    width:88px;
    height:88px;
    font-size:30px;
  }
  .feedback-student-overview-copy h2{
    font-size:21px;
  }
  .feedback-student-meta{
    font-size:14px;
  }
  .feedback-key-actions-inline{
    width:100%;
  }
  .feedback-section-banner{
    min-height:56px;
  }
}

@media(max-width:520px){
  .feedback-student-overview-main{
    grid-template-columns:84px minmax(0,1fr);
    gap:12px;
  }
  .feedback-student-photo .student-avatar.avatar-xl{
    width:78px;
    height:78px;
    font-size:27px;
  }
  .feedback-key-actions-inline .subtle{
    flex-basis:100%;
  }
}

/* =========================================================
   V4.9 — card compacto da turma + contexto do formulário
   ========================================================= */

/* Card da coluna esquerda conforme o desenho: foto, dados, chave/ações e Feedback em largura total. */
body.cell-ui .course-student-card{
  padding:14px 12px;
  overflow:visible;
  position:relative;
  z-index:1;
}
body.cell-ui .course-student-card:has(.student-settings-menu[open]){z-index:130}
.course-student-card-main{
  display:grid;
  grid-template-columns:54px minmax(0,1fr);
  align-items:start;
  gap:12px;
  min-width:0;
}
.course-student-avatar{display:flex;align-items:flex-start;justify-content:center}
.course-student-info{display:grid;gap:6px;min-width:0}
.course-student-info .student-title{align-items:flex-start}
.course-student-info .student-title strong{
  display:block;
  min-width:0;
  font-size:15px;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.course-student-registration{
  font-size:13px;
  line-height:1.45;
  overflow-wrap:anywhere;
}
.course-student-key-row{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  margin-top:2px;
  min-width:0;
}
.course-student-key-row>.subtle{font-size:13px}
.course-student-key-row .key{white-space:nowrap}
.course-student-settings{flex:0 0 auto}
.course-student-settings .student-settings-panel{right:0;left:auto}
.course-student-feedback-button{
  width:100%;
  min-width:0;
  margin-top:13px;
  min-height:48px;
  justify-content:center;
  text-align:center;
  font-size:15px!important;
}

/* A coluna direita identifica o aluno e depois deixa claro o contexto de criação/edição. */
.feedback-student-overview{margin-bottom:16px}
.feedback-form-heading{
  display:grid;
  gap:3px;
  margin:4px 0 22px;
  padding:13px 0 13px 15px;
  border-left:7px solid var(--cell-orange);
  border-bottom:2px solid #B7CBD5;
}
.feedback-form-heading-kicker{
  color:#6B4A00;
  font:900 12px/1.2 var(--font-title);
  letter-spacing:.09em;
  text-transform:uppercase;
}
.feedback-form-heading h3{
  margin:0;
  font-size:clamp(21px,2.4vw,26px);
  line-height:1.2;
}
.feedback-form-heading p{
  margin:2px 0 0;
  color:#425563;
  font-size:14px;
  line-height:1.45;
}

/* O antigo banner gigante não participa mais desta tela. */
.feedback-section-banner{display:none!important}

@media(max-width:900px){
  body.cell-ui .course-student-card{z-index:auto}
  body.cell-ui .course-student-card:has(.student-settings-menu[open]){z-index:130}
}

@media(max-width:520px){
  .course-student-card-main{grid-template-columns:50px minmax(0,1fr);gap:10px}
  .course-student-card-main .student-avatar.avatar-md{width:50px;height:50px;font-size:18px}
  .course-student-info .student-title strong{font-size:14px}
  .course-student-key-row{gap:6px}
  .course-student-key-row>.subtle{flex-basis:100%}
  .feedback-form-heading{padding-left:12px}
}

/* =========================================================
   V4.10 — card da turma em 3 linhas
   1) foto + nome/matrícula; 2) chave + ações; 3) Feedback
   ========================================================= */
body.cell-ui .course-student-card{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}
.course-student-card-main{
  width:100%;
  grid-template-columns:54px minmax(0,1fr);
  align-items:center;
  gap:12px;
}
.course-student-avatar{
  align-items:center;
}
.course-student-info{
  align-self:center;
  gap:4px;
}
.course-student-info .student-title{
  align-items:center;
}
.course-student-registration{
  margin:0;
}
.course-student-key-row{
  width:100%;
  margin:0;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  flex-wrap:nowrap;
}
.course-student-key-row>.subtle{
  flex:0 0 auto;
  font-size:13px;
}
.course-student-key-row .key{
  flex:0 0 auto;
}
.course-student-key-row .student-icon-action,
.course-student-key-row .course-student-settings{
  flex:0 0 auto;
}
.course-student-feedback-button{
  margin-top:0;
  width:100%;
}
@media(max-width:520px){
  .course-student-card-main{
    grid-template-columns:50px minmax(0,1fr);
    align-items:center;
  }
  .course-student-key-row{
    gap:6px;
    flex-wrap:wrap;
  }
  .course-student-key-row>.subtle{
    flex-basis:auto;
  }
}

/* =========================================================
   V5 — associação por chave + filtro de curso do aluno
   ========================================================= */
.association-key-panel{
  display:grid;
  gap:12px;
  margin:16px 0 18px;
  padding:16px;
  border:2px solid var(--cell-blue, var(--primary));
  border-radius:14px;
  background:#F4F9FC;
  box-shadow:4px 4px 0 #B7CBD5;
}
.association-key-panel>div:first-child{display:grid;gap:3px}
.association-key-panel strong{font-family:var(--font-title);font-size:15px;color:#173B58}
.association-key-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
}
.association-key-row input{min-height:48px;text-transform:uppercase}
.association-key-row .btn{min-height:48px;white-space:nowrap}
#associationKeyMessage{min-height:20px;color:#334E5F}
.association-divider{
  display:flex;
  align-items:center;
  gap:12px;
  margin:18px 0;
  color:#425563;
  font-size:13px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.association-divider::before,.association-divider::after{content:"";height:2px;background:#B7CBD5;flex:1}
.association-divider span{white-space:nowrap}

.student-course-filter{
  width:100%;
  margin:0 auto 24px;
  padding:18px 20px;
  display:grid;
  grid-template-columns:minmax(180px,.7fr) minmax(260px,1.3fr);
  gap:12px 18px;
  align-items:center;
  border:2px solid #173B58;
  border-radius:16px;
  background:#fff;
  box-shadow:5px 5px 0 #B7CBD5;
}
.student-course-filter-copy{display:grid;gap:2px;min-width:0}
.student-course-filter-copy label{
  margin:0;
  font-family:var(--font-title);
  font-size:clamp(17px,2.6vw,20px);
  line-height:1.25;
  color:#102F49;
}
.student-course-filter select{
  min-height:50px;
  border:2px solid #173B58;
  background:#fff;
  color:#102F49;
  font-size:16px;
  font-weight:700;
  padding:11px 42px 11px 13px;
}
.student-course-filter #studentCourseFilterHint{
  grid-column:2;
  font-size:14px;
  line-height:1.45;
  color:#425563;
}

@media(max-width:680px){
  .association-key-row{grid-template-columns:1fr}
  .association-key-row .btn{width:100%}
  .association-divider span{white-space:normal;text-align:center}
  .student-course-filter{
    grid-template-columns:1fr;
    padding:16px;
    gap:10px;
  }
  .student-course-filter #studentCourseFilterHint{grid-column:1}
  .student-course-filter select{width:100%;min-width:0}
}

/* V5.1 — níveis: imagem fixa por número, título personalizável por docente */
.level-config-row { align-items: center; }
.config-level-preview { width: 58px; height: 58px; object-fit: contain; flex: 0 0 58px; }
@media (max-width: 640px) {
  .level-config-row { grid-template-columns: auto 1fr; }
  .level-config-row .btn { grid-column: 1 / -1; width: 100%; }
}

/* V5.5 — edição concentrada de frases e níveis */
#configModal .phrase-row{
  grid-template-columns:minmax(150px,180px) minmax(260px,1fr) auto;
  gap:10px;
  align-items:center;
}
#configModal .level-config-row{
  grid-template-columns:72px 64px minmax(240px,1fr);
  gap:14px;
  align-items:center;
}
#configModal .level-config-row>div{min-width:0}
#configModal .config-save-notice{margin-bottom:16px}
#configModal .config-save-actions{
  z-index:3;
  align-items:center;
  justify-content:flex-start;
  gap:14px;
  padding-bottom:2px;
}
#configModal .config-save-actions .btn{min-width:190px}
#configModal #configSaveStatus{font-weight:700}

@media(max-width:680px){
  #configModal .phrase-row{
    grid-template-columns:1fr;
    padding:12px 0;
    border-bottom:1px solid var(--line);
  }
  #configModal .phrase-row .btn{width:100%}
  #configModal .level-config-row{
    grid-template-columns:58px minmax(0,1fr);
    padding:12px 0;
    border-bottom:1px solid var(--line);
  }
  #configModal .level-config-row>strong{grid-column:1 / -1}
  #configModal .config-level-preview{width:52px;height:52px}
  #configModal .config-save-actions{
    display:grid;
    grid-template-columns:1fr;
  }
  #configModal .config-save-actions .btn{width:100%;min-width:0}
}
