/* Avaliador TIC — Escola Secundária Dr. Serafim Leite
   Interface do aluno: cores sólidas, formas grandes e arredondadas, pouco texto.
   Interface do professor: sóbria, densa em informação, mesma identidade. */

:root {
  --escola: #5f8f2e;          /* verde do logótipo */
  --escola-2: #8cc63f;
  --escola-esc: #3f6a1a;
  --tinta: #1d2333;
  --suave: #5c6478;
  --linha: #e3e6ee;
  --fundo: #f4f6f2;
  --branco: #ffffff;
  --ok: #1fae5b;
  --aviso: #f5a300;
  --erro: #e5484d;
  --ano: #ff7a00;             /* muda por ano */
  --ano-esc: #d96500;
  --ano-claro: #fff0e2;
  --raio: 18px;
  --sombra: 0 2px 0 rgba(29, 35, 51, .08);
  --fonte: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.ano-6 { --ano: #ff7a00; --ano-esc: #d96500; --ano-claro: #fff0e2; }
.ano-7 { --ano: #00a39b; --ano-esc: #00807a; --ano-claro: #dff6f4; }
.ano-8 { --ano: #3d5afe; --ano-esc: #2b42cc; --ano-claro: #e5e9ff; }
.ano-9 { --ano: #e6337a; --ano-esc: #c01f60; --ano-claro: #fde6ef; }
.ano-5 { --ano: #43a047; --ano-esc: #2e7d32; --ano-claro: #e5f4e6; }
.ano-10 { --ano: #0288d1; --ano-esc: #01579b; --ano-claro: #e1f2fb; }
.ano-11 { --ano: #8e24aa; --ano-esc: #6a1b9a; --ano-claro: #f3e5f7; }
.ano-12 { --ano: #c62828; --ano-esc: #8e0000; --ano-claro: #fbe4e4; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--fonte); color: var(--tinta); background: var(--fundo); font-size: 17px; line-height: 1.45; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 900; }
h2 { font-size: 1.35rem; font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 800; }
p { margin: 0 0 .8em; }
.muted { color: var(--suave); }
.small { font-size: .85rem; }
.center { text-align: center; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--tinta); outline-offset: 2px; }

/* ---------------------------------------------------------------- barra de topo */
.topo { background: var(--branco); border-bottom: 1px solid var(--linha); position: sticky; top: 0; z-index: 10; }
.topo-in { max-width: none; margin: 0; padding: 10px 32px; display: flex; align-items: center; gap: 14px; }
.topo .logo { height: 46px; width: auto; display: block; }
.topo .app { font-weight: 900; color: var(--escola-esc); font-size: 1.05rem; padding-left: 14px; border-left: 2px solid var(--linha); }
.topo .esp { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 6px 14px; font-weight: 800; font-size: .9rem; background: var(--ano-claro); color: var(--ano-esc); text-decoration: none; }
.pill.cinza { background: #eef0f4; color: var(--tinta); }
.nav-aluno { display: flex; gap: 6px; }
.nav-aluno a { text-decoration: none; font-weight: 800; padding: 6px 14px; border-radius: 999px; color: var(--ano); background: #fff; border: 2px solid var(--ano); }
.nav-aluno a.ativo, .nav-aluno a:hover { background: var(--ano); color: #fff; }   /* todos com ar de botão; o da página atual fica cheio */

.pagina { max-width: none; margin: 0; padding: 24px 32px 60px; }

/* ---------------------------------------------------------------- botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 900; text-decoration: none; border-radius: 14px; padding: 13px 22px; background: var(--ano); color: #fff; box-shadow: 0 4px 0 var(--ano-esc); transition: transform .06s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ano-esc); }
.btn.grande { font-size: 1.15rem; padding: 16px 28px; border-radius: 16px; }
.btn.bloco { width: 100%; }
.btn.secundario { background: #fff; color: var(--tinta); box-shadow: 0 4px 0 #cfd4de; border: 2px solid #cfd4de; }
.btn.verde { background: var(--escola); box-shadow: 0 4px 0 var(--escola-esc); }
.btn.vermelho { background: var(--erro); box-shadow: 0 4px 0 #b4292e; }
.btn.pequeno { padding: 7px 12px; font-size: .85rem; border-radius: 10px; box-shadow: 0 2px 0 var(--ano-esc); }
.btn.secundario.pequeno { box-shadow: 0 2px 0 #cfd4de; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------------------------------------------------------------- mensagens */
.flash { border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; font-weight: 700; }
.flash.ok { background: #dcf6e6; color: #0f6b37; }
.flash.erro { background: #fde2e3; color: #9b1c21; }

/* ================================================================ ENTRAR / REGISTO */
body.acesso { background: var(--escola); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 18px; }
/* marcas de água com o símbolo da escola (sem letras): 168 marcas com tamanho, posição e transparência
   aleatórios (podem sobrepor-se). As 5 transparências estão em marca_agua_1..5.png (4% a 19%). */
body.acesso::before { content: ""; position: fixed; inset: 0; pointer-events: none; background:
  url('../img/marca_agua_3.png') 40.7% -1.9% / 170px no-repeat,
  url('../img/marca_agua_3.png') 30.3% 15.3% / 40px no-repeat,
  url('../img/marca_agua_2.png') 84.5% 12.3% / 55px no-repeat,
  url('../img/marca_agua_2.png') 68.9% 8.2% / 70px no-repeat,
  url('../img/marca_agua_2.png') 10.6% 32.1% / 18px no-repeat,
  url('../img/marca_agua_1.png') 21.1% 70.7% / 20px no-repeat,
  url('../img/marca_agua_3.png') 20.7% 44.0% / 94px no-repeat,
  url('../img/marca_agua_4.png') 32.0% 30.1% / 199px no-repeat,
  url('../img/marca_agua_5.png') 32.0% 34.1% / 20px no-repeat,
  url('../img/marca_agua_5.png') 30.3% 28.8% / 40px no-repeat,
  url('../img/marca_agua_2.png') 61.1% 48.3% / 20px no-repeat,
  url('../img/marca_agua_2.png') 84.0% 74.6% / 47px no-repeat,
  url('../img/marca_agua_5.png') 13.4% 62.2% / 52px no-repeat,
  url('../img/marca_agua_5.png') 47.9% 96.1% / 198px no-repeat,
  url('../img/marca_agua_1.png') 75.0% 86.0% / 181px no-repeat,
  url('../img/marca_agua_3.png') 46.3% 20.2% / 93px no-repeat,
  url('../img/marca_agua_1.png') 63.3% 40.6% / 24px no-repeat,
  url('../img/marca_agua_4.png') 19.4% 22.3% / 172px no-repeat,
  url('../img/marca_agua_2.png') 53.2% 4.3% / 108px no-repeat,
  url('../img/marca_agua_2.png') 81.6% 53.8% / 31px no-repeat,
  url('../img/marca_agua_5.png') -4.1% -2.4% / 16px no-repeat,
  url('../img/marca_agua_4.png') 60.7% 58.5% / 66px no-repeat,
  url('../img/marca_agua_2.png') 22.8% 84.8% / 138px no-repeat,
  url('../img/marca_agua_3.png') 18.9% 41.5% / 54px no-repeat,
  url('../img/marca_agua_3.png') 83.3% 86.4% / 25px no-repeat,
  url('../img/marca_agua_1.png') 103.4% 50.5% / 142px no-repeat,
  url('../img/marca_agua_1.png') 7.3% 48.3% / 38px no-repeat,
  url('../img/marca_agua_5.png') 19.5% 36.1% / 227px no-repeat,
  url('../img/marca_agua_3.png') 53.5% 71.3% / 30px no-repeat,
  url('../img/marca_agua_5.png') -2.2% 95.2% / 170px no-repeat,
  url('../img/marca_agua_4.png') 0.4% 46.2% / 167px no-repeat,
  url('../img/marca_agua_2.png') 30.5% 84.0% / 23px no-repeat,
  url('../img/marca_agua_2.png') 17.4% 45.3% / 32px no-repeat,
  url('../img/marca_agua_2.png') 62.8% 94.3% / 187px no-repeat,
  url('../img/marca_agua_1.png') 22.1% 101.4% / 252px no-repeat,
  url('../img/marca_agua_1.png') 68.5% 69.1% / 16px no-repeat,
  url('../img/marca_agua_2.png') 10.2% 2.9% / 71px no-repeat,
  url('../img/marca_agua_5.png') 36.1% 6.2% / 15px no-repeat,
  url('../img/marca_agua_4.png') 89.8% 25.1% / 120px no-repeat,
  url('../img/marca_agua_5.png') 56.1% 13.8% / 22px no-repeat,
  url('../img/marca_agua_5.png') 54.3% 103.0% / 156px no-repeat,
  url('../img/marca_agua_1.png') 89.0% 6.1% / 41px no-repeat,
  url('../img/marca_agua_1.png') 21.5% 91.8% / 17px no-repeat,
  url('../img/marca_agua_2.png') 72.4% 1.6% / 56px no-repeat,
  url('../img/marca_agua_3.png') 37.8% 98.7% / 31px no-repeat,
  url('../img/marca_agua_1.png') 90.2% 78.5% / 44px no-repeat,
  url('../img/marca_agua_1.png') 9.3% 81.7% / 26px no-repeat,
  url('../img/marca_agua_5.png') -0.4% 97.7% / 88px no-repeat,
  url('../img/marca_agua_4.png') 13.1% 9.5% / 67px no-repeat,
  url('../img/marca_agua_1.png') 94.8% 103.5% / 19px no-repeat,
  url('../img/marca_agua_5.png') 19.3% 49.3% / 24px no-repeat,
  url('../img/marca_agua_1.png') 102.6% 69.3% / 29px no-repeat,
  url('../img/marca_agua_3.png') 21.2% 93.0% / 157px no-repeat,
  url('../img/marca_agua_4.png') 70.3% 1.2% / 116px no-repeat,
  url('../img/marca_agua_5.png') 86.5% 45.5% / 21px no-repeat,
  url('../img/marca_agua_1.png') 73.7% 3.1% / 109px no-repeat,
  url('../img/marca_agua_3.png') 9.0% 6.9% / 16px no-repeat,
  url('../img/marca_agua_5.png') 62.9% -4.4% / 24px no-repeat,
  url('../img/marca_agua_1.png') 78.2% 49.5% / 225px no-repeat,
  url('../img/marca_agua_4.png') 11.0% 85.4% / 42px no-repeat,
  url('../img/marca_agua_5.png') 92.9% 24.0% / 86px no-repeat,
  url('../img/marca_agua_5.png') 43.9% 51.0% / 14px no-repeat,
  url('../img/marca_agua_5.png') -0.5% 11.3% / 181px no-repeat,
  url('../img/marca_agua_2.png') 100.4% 24.5% / 22px no-repeat,
  url('../img/marca_agua_2.png') 42.8% 50.3% / 97px no-repeat,
  url('../img/marca_agua_5.png') 42.9% 8.3% / 25px no-repeat,
  url('../img/marca_agua_4.png') 77.5% 44.1% / 51px no-repeat,
  url('../img/marca_agua_4.png') 67.2% 24.7% / 34px no-repeat,
  url('../img/marca_agua_2.png') 44.3% 29.7% / 37px no-repeat,
  url('../img/marca_agua_4.png') 32.5% 10.2% / 38px no-repeat,
  url('../img/marca_agua_1.png') 4.8% 64.6% / 187px no-repeat,
  url('../img/marca_agua_1.png') 85.5% 44.4% / 27px no-repeat,
  url('../img/marca_agua_1.png') -2.5% 59.9% / 163px no-repeat,
  url('../img/marca_agua_4.png') 102.7% 8.0% / 147px no-repeat,
  url('../img/marca_agua_1.png') 52.7% 57.6% / 28px no-repeat,
  url('../img/marca_agua_3.png') 90.2% 14.3% / 20px no-repeat,
  url('../img/marca_agua_4.png') 65.4% 71.2% / 61px no-repeat,
  url('../img/marca_agua_1.png') 94.6% 102.8% / 15px no-repeat,
  url('../img/marca_agua_3.png') 91.4% 54.0% / 17px no-repeat,
  url('../img/marca_agua_5.png') 46.5% 90.5% / 25px no-repeat,
  url('../img/marca_agua_5.png') 87.7% 38.5% / 49px no-repeat,
  url('../img/marca_agua_4.png') 52.8% 54.5% / 87px no-repeat,
  url('../img/marca_agua_1.png') 103.5% 45.4% / 17px no-repeat,
  url('../img/marca_agua_4.png') 11.8% 34.4% / 197px no-repeat,
  url('../img/marca_agua_1.png') 101.2% 59.5% / 37px no-repeat,
  url('../img/marca_agua_2.png') 43.6% 76.1% / 21px no-repeat,
  url('../img/marca_agua_3.png') 58.9% 29.6% / 33px no-repeat,
  url('../img/marca_agua_5.png') 54.8% 44.4% / 172px no-repeat,
  url('../img/marca_agua_1.png') 101.2% -3.9% / 48px no-repeat,
  url('../img/marca_agua_1.png') 33.6% 93.2% / 35px no-repeat,
  url('../img/marca_agua_4.png') 19.3% 87.2% / 13px no-repeat,
  url('../img/marca_agua_3.png') 91.6% 103.6% / 150px no-repeat,
  url('../img/marca_agua_4.png') 20.8% 85.5% / 44px no-repeat,
  url('../img/marca_agua_5.png') 92.8% 85.0% / 17px no-repeat,
  url('../img/marca_agua_1.png') 48.1% 90.2% / 30px no-repeat,
  url('../img/marca_agua_1.png') 85.1% 101.6% / 32px no-repeat,
  url('../img/marca_agua_4.png') 77.5% 70.6% / 49px no-repeat,
  url('../img/marca_agua_2.png') 104.4% 88.1% / 173px no-repeat,
  url('../img/marca_agua_1.png') 69.5% 70.0% / 206px no-repeat,
  url('../img/marca_agua_1.png') 96.0% 50.8% / 42px no-repeat,
  url('../img/marca_agua_2.png') 102.0% 83.9% / 243px no-repeat,
  url('../img/marca_agua_1.png') 7.0% 10.0% / 36px no-repeat,
  url('../img/marca_agua_4.png') 84.5% 79.8% / 133px no-repeat,
  url('../img/marca_agua_1.png') 94.4% 49.4% / 46px no-repeat,
  url('../img/marca_agua_4.png') 5.8% 71.5% / 75px no-repeat,
  url('../img/marca_agua_4.png') 54.0% 102.2% / 13px no-repeat,
  url('../img/marca_agua_1.png') 24.9% 65.8% / 232px no-repeat,
  url('../img/marca_agua_2.png') 52.0% 85.3% / 37px no-repeat,
  url('../img/marca_agua_2.png') 43.7% 69.9% / 120px no-repeat,
  url('../img/marca_agua_3.png') 86.0% 0.7% / 214px no-repeat,
  url('../img/marca_agua_2.png') -4.6% 73.7% / 94px no-repeat,
  url('../img/marca_agua_1.png') 72.4% 91.8% / 14px no-repeat,
  url('../img/marca_agua_2.png') 82.8% 41.6% / 24px no-repeat,
  url('../img/marca_agua_2.png') 22.4% -1.1% / 253px no-repeat,
  url('../img/marca_agua_2.png') 23.8% 53.0% / 35px no-repeat,
  url('../img/marca_agua_1.png') 3.6% 47.9% / 101px no-repeat,
  url('../img/marca_agua_1.png') 1.3% 72.1% / 56px no-repeat,
  url('../img/marca_agua_2.png') 32.9% 95.2% / 19px no-repeat,
  url('../img/marca_agua_5.png') 89.1% -1.0% / 27px no-repeat,
  url('../img/marca_agua_4.png') 33.9% 40.5% / 21px no-repeat,
  url('../img/marca_agua_5.png') -2.5% 97.2% / 34px no-repeat,
  url('../img/marca_agua_5.png') 21.2% 83.1% / 43px no-repeat,
  url('../img/marca_agua_4.png') 45.3% 4.1% / 98px no-repeat,
  url('../img/marca_agua_4.png') 1.5% 12.0% / 104px no-repeat,
  url('../img/marca_agua_5.png') 3.1% 66.0% / 80px no-repeat,
  url('../img/marca_agua_3.png') 80.2% -0.3% / 20px no-repeat,
  url('../img/marca_agua_5.png') 0.8% 86.4% / 70px no-repeat,
  url('../img/marca_agua_1.png') 39.3% 8.4% / 182px no-repeat,
  url('../img/marca_agua_4.png') 84.2% 101.3% / 88px no-repeat,
  url('../img/marca_agua_5.png') 73.5% 24.3% / 163px no-repeat,
  url('../img/marca_agua_4.png') 12.2% 40.2% / 26px no-repeat,
  url('../img/marca_agua_3.png') 75.4% 78.0% / 182px no-repeat,
  url('../img/marca_agua_5.png') 34.8% 50.4% / 88px no-repeat,
  url('../img/marca_agua_3.png') 59.3% 6.5% / 96px no-repeat,
  url('../img/marca_agua_3.png') 24.8% 22.6% / 12px no-repeat,
  url('../img/marca_agua_4.png') 7.8% 45.5% / 161px no-repeat,
  url('../img/marca_agua_2.png') 75.4% 6.4% / 25px no-repeat,
  url('../img/marca_agua_1.png') 70.8% 90.1% / 206px no-repeat,
  url('../img/marca_agua_5.png') -4.5% 72.1% / 34px no-repeat,
  url('../img/marca_agua_4.png') 90.6% 19.7% / 38px no-repeat,
  url('../img/marca_agua_1.png') 89.7% 67.7% / 82px no-repeat,
  url('../img/marca_agua_1.png') 52.4% 53.8% / 146px no-repeat,
  url('../img/marca_agua_1.png') 27.5% 63.0% / 18px no-repeat,
  url('../img/marca_agua_2.png') -3.3% 24.2% / 16px no-repeat,
  url('../img/marca_agua_1.png') 43.9% 27.1% / 20px no-repeat,
  url('../img/marca_agua_1.png') 98.9% 103.6% / 14px no-repeat,
  url('../img/marca_agua_1.png') 82.0% 75.8% / 149px no-repeat,
  url('../img/marca_agua_5.png') 82.9% 22.9% / 31px no-repeat,
  url('../img/marca_agua_2.png') 79.9% 32.7% / 17px no-repeat,
  url('../img/marca_agua_1.png') 46.0% -3.0% / 74px no-repeat,
  url('../img/marca_agua_4.png') 86.2% 27.8% / 206px no-repeat,
  url('../img/marca_agua_2.png') 47.4% 35.6% / 59px no-repeat,
  url('../img/marca_agua_1.png') 86.2% 1.1% / 128px no-repeat,
  url('../img/marca_agua_4.png') 84.7% 96.2% / 13px no-repeat,
  url('../img/marca_agua_3.png') 2.5% 57.7% / 128px no-repeat,
  url('../img/marca_agua_4.png') 0.4% 2.6% / 14px no-repeat,
  url('../img/marca_agua_4.png') 5.1% 32.0% / 52px no-repeat,
  url('../img/marca_agua_5.png') 67.7% 17.8% / 208px no-repeat,
  url('../img/marca_agua_4.png') 81.1% 81.4% / 36px no-repeat,
  url('../img/marca_agua_2.png') 93.4% 7.0% / 114px no-repeat,
  url('../img/marca_agua_4.png') -1.6% 29.5% / 29px no-repeat,
  url('../img/marca_agua_3.png') 13.9% 74.7% / 91px no-repeat,
  url('../img/marca_agua_3.png') 24.1% 102.8% / 138px no-repeat,
  url('../img/marca_agua_1.png') 49.8% 70.9% / 206px no-repeat,
  url('../img/marca_agua_5.png') 71.1% 19.8% / 32px no-repeat,
  url('../img/marca_agua_3.png') 63.6% 26.4% / 23px no-repeat,
  url('../img/marca_agua_3.png') 45.1% 2.5% / 144px no-repeat,
  url('../img/marca_agua_2.png') 45.6% 87.5% / 75px no-repeat; }
@media (max-width: 600px) { body.acesso::before { background-size: 71px, 17px, 23px, 29px, 8px, 8px, 39px, 84px, 8px, 17px, 8px, 20px, 22px, 83px, 76px, 39px, 10px, 72px, 45px, 13px, 8px, 28px, 58px, 23px, 10px, 60px, 16px, 95px, 13px, 71px, 70px, 10px, 13px, 79px, 106px, 8px, 30px, 8px, 50px, 9px, 66px, 17px, 8px, 24px, 13px, 18px, 11px, 37px, 28px, 8px, 10px, 12px, 66px, 49px, 9px, 46px, 8px, 10px, 94px, 18px, 36px, 8px, 76px, 9px, 41px, 10px, 21px, 14px, 16px, 16px, 79px, 11px, 68px, 62px, 12px, 8px, 26px, 8px, 8px, 10px, 21px, 37px, 8px, 83px, 16px, 9px, 14px, 72px, 20px, 15px, 8px, 63px, 18px, 8px, 13px, 13px, 21px, 73px, 87px, 18px, 102px, 15px, 56px, 19px, 32px, 8px, 97px, 16px, 50px, 90px, 39px, 8px, 10px, 106px, 15px, 42px, 24px, 8px, 11px, 9px, 14px, 18px, 41px, 44px, 34px, 8px, 29px, 76px, 37px, 68px, 11px, 76px, 37px, 40px, 8px, 68px, 10px, 87px, 14px, 16px, 34px, 61px, 8px, 8px, 8px, 8px, 63px, 13px, 8px, 31px, 87px, 25px, 54px, 8px, 54px, 8px, 22px, 87px, 15px, 48px, 12px, 38px, 58px, 87px, 13px, 10px, 60px, 32px; } }
.cartao-acesso { position: relative; background: #fff; width: 100%; max-width: 520px; border-radius: 28px; padding: 26px 24px 22px; box-shadow: 0 10px 0 rgba(0,0,0,.12); }
.cartao-acesso .logo-acesso { display: block; height: 78px; margin: 0 auto 6px; }
.cartao-acesso .titulo-app { text-align: center; font-weight: 900; color: var(--escola-esc); margin-bottom: 14px; letter-spacing: .3px; }
.passo-topo { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; }
.passo-topo h2 { margin: 0; font-size: 1.3rem; flex: 1; }
.voltar { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--linha); background: #fff; font-size: 1.3rem; cursor: pointer; font-weight: 900; }
.pontos-passo { display: flex; gap: 6px; justify-content: center; margin-bottom: 6px; }
.pontos-passo span { width: 10px; height: 10px; border-radius: 50%; background: var(--linha); }
.pontos-passo span.on { background: var(--escola); }

.grelha-anos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.grelha-anos .bt-ano { font-size: 1.75rem; padding: 20px 4px; }
.bt-ano { border: 0; border-radius: 22px; padding: 22px 6px; color: #fff; font: inherit; font-weight: 900; font-size: 2rem; cursor: pointer; box-shadow: 0 6px 0 rgba(0,0,0,.18); }
.bt-ano small { display: block; font-size: .85rem; font-weight: 800; opacity: .9; }
.bt-ano:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.18); }
.bt-ano.a6 { background: #ff7a00; } .bt-ano.a7 { background: #00a39b; } .bt-ano.a8 { background: #3d5afe; } .bt-ano.a9 { background: #e6337a; }
.bt-ano.a5 { background: #43a047; } .bt-ano.a10 { background: #0288d1; } .bt-ano.a11 { background: #8e24aa; } .bt-ano.a12 { background: #c62828; }
.grelha-turmas { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 12px; }
.bt-turma { border: 0; border-radius: 20px; padding: 20px 6px; font: inherit; font-weight: 900; font-size: 1.8rem; color: #fff; background: var(--ano); box-shadow: 0 6px 0 var(--ano-esc); cursor: pointer; }
.grelha-num { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.bt-num { border: 2px solid var(--linha); background: #fff; border-radius: 14px; padding: 12px 0; font: inherit; font-weight: 900; font-size: 1.15rem; cursor: pointer; }
.bt-num:hover, .bt-num.sel { background: var(--ano); border-color: var(--ano); color: #fff; }
.bt-num[disabled] { opacity: .25; cursor: not-allowed; background: #f2f3f6; }

.pin-pontos { display: flex; justify-content: center; gap: 14px; margin: 6px 0 16px; }
.pin-pontos span { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--ano); }
.pin-pontos span.on { background: var(--ano); }
.teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 320px; margin: 0 auto; }
.tecla { border: 0; background: #f0f2f6; border-radius: 16px; padding: 16px 0; font: inherit; font-size: 1.5rem; font-weight: 900; cursor: pointer; box-shadow: 0 4px 0 #d7dbe4; }
.tecla:active { transform: translateY(3px); box-shadow: 0 1px 0 #d7dbe4; }
.tecla.fn { background: #fff; border: 2px solid var(--linha); font-size: 1.1rem; }
.msg-erro { background: #fde2e3; color: #9b1c21; border-radius: 12px; padding: 10px 14px; font-weight: 800; margin-bottom: 12px; text-align: center; }
.abana { animation: abana .35s; }
@keyframes abana { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }
.rodape-acesso { margin-top: 18px; text-align: center; font-weight: 800; }
.rodape-acesso a { color: var(--escola-esc); }
.rodape-acesso .prof-link { display: block; margin-top: 10px; font-size: .8rem; color: var(--suave); font-weight: 700; }
.campo { margin-bottom: 14px; }
.campo label { display: block; font-weight: 900; margin-bottom: 6px; }
.campo input, .campo select, .campo textarea { width: 100%; font: inherit; padding: 14px 16px; border: 3px solid var(--linha); border-radius: 14px; background: #fff; }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--ano); outline: none; }
.campo .ajuda { font-size: .85rem; color: var(--suave); margin-top: 4px; }
.resumo-registo { background: var(--ano-claro); border-radius: 18px; padding: 16px 18px; margin-bottom: 14px; font-size: 1.1rem; }
.resumo-registo b { font-weight: 900; }

/* ================================================================ ALUNO */
/* Faixa do aluno: verde claro do logótipo, logo à esquerda, saudação ao centro */
.faixa { background: var(--escola-2); color: #1d3a0b; }
.faixa-in { max-width: none; margin: 0; padding: 22px 32px 34px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; }
.logo-faixa { justify-self: start; display: block; background: #fff; border-radius: 22px; padding: 12px 20px; box-shadow: 0 5px 0 rgba(0,0,0,.12); }
.logo-faixa img { display: block; height: 104px; width: auto; }
.faixa .ola { text-align: center; }
.faixa h1 { margin: 0; font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
.faixa .sub { font-weight: 900; font-size: 1.15rem; margin-top: 4px; }
.faixa .chips { justify-self: end; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { background: rgba(255,255,255,.6); color: #1d3a0b; border-radius: 16px; padding: 10px 16px; font-weight: 900; text-align: center; min-width: 110px; }
.chip b { display: block; font-size: 1.5rem; }

.destaque { background: #fff; border-radius: 26px; padding: 22px; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; margin: -18px 0 24px; box-shadow: 0 8px 0 rgba(29,35,51,.06); border: 3px solid var(--ano); position: relative; }
.destaque .num { width: 76px; height: 76px; border-radius: 22px; background: var(--ano); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 2rem; }
.destaque .etiqueta { font-weight: 900; color: var(--ano-esc); text-transform: uppercase; font-size: .8rem; letter-spacing: .8px; }
.destaque h2 { margin: 2px 0 6px; }

.c0 { background: #ff7a00; } .c1 { background: #00a39b; } .c2 { background: #3d5afe; }
.c3 { background: #e5367f; } .c4 { background: #8a3ffc; } .c5 { background: #f0a500; }

.lista-ex { display: grid; gap: 14px; }
.cartao-ex { display: flex; align-items: center; gap: 16px; background: #fff; border-radius: 20px; padding: 16px 18px; text-decoration: none; border: 3px solid transparent; box-shadow: var(--sombra); }
.cartao-ex:hover { border-color: var(--ano); }
.icone-tipo { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; color: #fff; flex-shrink: 0; }
.t-quiz { background: #8a3ffc; } .t-folha { background: #1fae5b; } .t-entrega { background: #e5367f; }
.cartao-ex .info { flex: 1; }
.cartao-ex .info h3 { margin: 0 0 2px; }
.badge { display: inline-block; border-radius: 999px; padding: 6px 12px; font-weight: 900; font-size: .85rem; white-space: nowrap; }
.b-novo { background: #eef0f4; color: var(--tinta); }
.b-feito { background: #dcf6e6; color: #0f6b37; }
.b-pendente { background: #fff1cc; color: #8a5a00; }
.b-tentar { background: #fde2e3; color: #9b1c21; }

.cabecalho-ex { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.migalhas { font-weight: 800; color: var(--suave); margin-bottom: 8px; display: inline-block; text-decoration: none; }
.migalhas:hover { color: var(--ano-esc); }
.enunciado { background: #fff; border-radius: 20px; padding: 18px 20px; margin-bottom: 18px; box-shadow: var(--sombra); font-size: 1.05rem; }
.enunciado a { color: var(--ano-esc); font-weight: 800; }

.pergunta { background: #fff; border-radius: 22px; padding: 20px; margin-bottom: 16px; box-shadow: var(--sombra); }
.pergunta .np { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ano); color: #fff; font-weight: 900; margin-right: 8px; }
.pergunta .txt { font-weight: 800; font-size: 1.12rem; margin-bottom: 14px; display: flex; align-items: flex-start; }
.opcoes { display: grid; gap: 10px; }
.opcoes.vf { grid-template-columns: 1fr 1fr; }
.opcao { position: relative; }
.opcao input { position: absolute; opacity: 0; pointer-events: none; }
.opcao span { display: block; border: 3px solid var(--linha); border-radius: 16px; padding: 14px 16px; font-weight: 800; cursor: pointer; background: #fff; transition: background .1s; }
.opcao span:hover { border-color: var(--ano); }
.opcao input:checked + span { background: var(--ano); border-color: var(--ano); color: #fff; }
.opcao input:focus-visible + span { outline: 3px solid var(--tinta); }
.opcoes.vf .opcao span { text-align: center; font-size: 1.15rem; }
.pergunta input.resp { width: 100%; font: inherit; font-weight: 800; padding: 14px 16px; border: 3px solid var(--linha); border-radius: 16px; }
.pergunta input.resp:focus { border-color: var(--ano); outline: none; }

.zona-ficheiro { display: block; border: 3px dashed var(--ano); background: var(--ano-claro); border-radius: 22px; padding: 30px 20px; text-align: center; cursor: pointer; font-weight: 900; color: var(--ano-esc); }
.zona-ficheiro input { display: none; }
.zona-ficheiro .grande-ico { font-size: 2.6rem; display: block; }
.ou { text-align: center; font-weight: 900; color: var(--suave); margin: 14px 0; }


.barra-acao { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.barra-acao .esp { flex: 1; }

/* resultado */
.resultado-topo { background: #fff; border-radius: 26px; padding: 26px; display: flex; gap: 24px; align-items: center; margin-bottom: 20px; box-shadow: var(--sombra); flex-wrap: wrap; }
.anel { --p: 0; --cor: var(--ok); width: 140px; height: 140px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--cor) calc(var(--p) * 1%), #eceef3 0); flex-shrink: 0; }
.anel b { width: 108px; height: 108px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 2rem; font-weight: 900; }
.resultado-topo h1 { margin-bottom: 4px; }
.linha-res { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--sombra); border-left: 8px solid var(--ok); }
.linha-res.mal { border-left-color: var(--erro); }
.linha-res .ico { font-size: 1.3rem; font-weight: 900; }
.linha-res .ex { color: var(--suave); font-size: .95rem; margin-top: 4px; }
pre.mini { background: #f4f5f9; padding: 8px 10px; border-radius: 10px; overflow-x: auto; margin: 6px 0 0; font-size: .85rem; }

/* tabela simples */
.tabela { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--sombra); }
.tabela th, .tabela td { padding: 10px 12px; border-bottom: 1px solid var(--linha); text-align: left; vertical-align: top; }
.tabela th { background: #f7f8fa; font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; color: var(--suave); }
.tabela tr:last-child td { border-bottom: 0; }

.vazio { text-align: center; background: #fff; border-radius: 24px; padding: 40px 20px; box-shadow: var(--sombra); }
.vazio .grande-ico { font-size: 3rem; }
.rodape-app { text-align: center; color: var(--suave); font-size: .8rem; padding: 20px; }

/* ================================================================ PROFESSOR */
body.prof { font-size: 15px; --ano: var(--escola); --ano-esc: var(--escola-esc); --ano-claro: #eaf3df; }
body.prof .pagina { max-width: none; }
.nav-prof { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-prof a { text-decoration: none; font-weight: 800; padding: 8px 12px; border-radius: 10px; color: var(--suave); }
.nav-prof a.ativo, .nav-prof a:hover { background: #eaf3df; color: var(--escola-esc); }
.nav-prof .contador { background: var(--erro); color: #fff; border-radius: 999px; padding: 1px 7px; font-size: .75rem; margin-left: 4px; }
.cards-turmas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card-turma { background: #fff; border-radius: 18px; padding: 16px; text-decoration: none; box-shadow: var(--sombra); border-top: 8px solid var(--ano); display: block; }
.card-turma h2 { margin: 0 0 4px; }
.card-turma .linha { display: flex; justify-content: space-between; font-size: .9rem; padding: 3px 0; }
.card-turma .linha b { font-weight: 900; }
.tabs { display: flex; gap: 6px; margin: 10px 0 16px; border-bottom: 2px solid var(--linha); }
.tabs a { padding: 10px 14px; text-decoration: none; font-weight: 800; color: var(--suave); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a.ativo { color: var(--escola-esc); border-color: var(--escola); }
.caixa { background: #fff; border-radius: 16px; padding: 16px; box-shadow: var(--sombra); margin-bottom: 16px; }
.est { display: inline-block; padding: 3px 9px; border-radius: 999px; font-weight: 800; font-size: .8rem; }
.est.visivel { background: #dcf6e6; color: #0f6b37; } .est.oculta { background: #eef0f4; color: var(--suave); }
.tabela.compacta td, .tabela.compacta th { padding: 7px 9px; font-size: .9rem; }
.tabela tr.hoje td { background: #fffbe6; }
.tabela tr.flex td { color: var(--suave); font-style: italic; }
.form-linha { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.form-linha input, .form-linha select { font: inherit; padding: 6px 8px; border: 2px solid var(--linha); border-radius: 8px; }
.form-linha input.curto { width: 70px; }
.notas-grelha td.n { text-align: center; font-weight: 800; }
.notas-grelha td.n.alto { background: #e3f7ea; } .notas-grelha td.n.baixo { background: #fde8e8; } .notas-grelha td.n.pend { background: #fff4d6; }
.notas-grelha { font-size: .82rem; }
.notas-grelha th.rot { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; max-height: 180px; font-size: .75rem; text-transform: none; letter-spacing: 0; }
.scroll-x { overflow-x: auto; }
.editor-q { border: 2px solid var(--linha); border-radius: 14px; padding: 12px; margin-bottom: 10px; background: #fbfcfd; }
.editor-q .form-linha { margin-bottom: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
body.prof .campo input, body.prof .campo select, body.prof .campo textarea { padding: 9px 11px; border-width: 2px; border-radius: 10px; }
body.prof .campo label { font-size: .9rem; }
.aviso { background: #fff4d6; color: #7a5200; border-radius: 12px; padding: 12px 14px; font-weight: 700; margin-bottom: 14px; }

@media (max-width: 720px) {
  .topo .app { display: none; }
  .topo-in { gap: 8px; padding: 8px 12px; }
  .pagina { padding: 20px 16px 60px; }
  .topo .logo { height: 40px; }
  body.aluno .topo .pill:not(.cinza) { display: none; }
  .faixa-in { padding: 16px 16px 30px; grid-template-columns: 1fr; justify-items: center; gap: 12px; }
  .logo-faixa, .faixa .chips { justify-self: center; }
  .logo-faixa img { height: 64px; }
  .destaque { grid-template-columns: auto 1fr; }
  .destaque .btn { grid-column: 1 / -1; }
  .grelha-num { grid-template-columns: repeat(5, 1fr); }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .nav-aluno a { padding: 8px 10px; }
  body { font-size: 16px; }
}
.tabela td form.form-linha { flex-wrap: nowrap; }
.bt-turma.longo { font-size: 1.25rem; background: var(--tinta); box-shadow: 0 6px 0 #000; }

/* ---------------------------------------------------------------- domínios e cartões com imagem */
.dominio { border: 2px solid #9aa0ab; border-radius: 22px; padding: 0 22px 24px; margin: 26px 0 34px; background: #fff0; }
.dominio-cab { background: #e9ecef; border-bottom: 2px solid #9aa0ab; margin: 0 -22px 22px; border-radius: 20px 20px 0 0;
               padding: 10px 22px; text-align: center; }
.dominio-cab h2 { margin: 0; font-size: 1.3rem; }
.dominio-cab p { margin: 2px 0 0; color: var(--suave); font-weight: 700; }
.grelha-aulas { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.cartao-aula { display: flex; flex-direction: column; background: #fff; border-radius: 14px; overflow: hidden; text-decoration: none;
               color: var(--tinta); box-shadow: 0 3px 8px rgba(29,35,51,.18); transition: transform .1s, box-shadow .1s; }
.cartao-aula:hover { transform: translateY(-4px); box-shadow: 0 10px 18px rgba(29,35,51,.2); }
.cartao-aula .capa { position: relative; aspect-ratio: 20 / 9; background-size: cover; background-position: center; }
.cartao-aula .etq-aula { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.95); border-radius: 999px;
                         padding: 4px 12px; font-weight: 900; font-size: .9rem; }
.cartao-aula .etq-estado { position: absolute; right: 12px; top: 12px; border-radius: 999px; padding: 4px 12px; font-weight: 900; font-size: .9rem; }
.cartao-aula .etq-estado.feito { background: #dcf6e6; color: #0f6b37; }
.cartao-aula .corpo { padding: 14px 16px 16px; text-align: center; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cartao-aula h3 { margin: 0; font-size: 1.1rem; line-height: 1.25; }
.cartao-aula .meta { color: var(--suave); font-weight: 700; }
.cartao-aula .barra { height: 8px; background: #eceef3; border-radius: 99px; overflow: hidden; margin-top: auto; }
.cartao-aula .barra i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }

/* Ecrãs largos: no máximo 4 cartões por linha, grandes e legíveis */
@media (min-width: 1200px) {
  .grelha-aulas { grid-template-columns: repeat(4, 1fr); gap: 28px; }
  .cartao-aula h3 { font-size: 1.35rem; }
  .cartao-aula .meta { font-size: 1.05rem; }
  .cartao-aula .etq-aula, .cartao-aula .etq-estado { font-size: 1rem; padding: 5px 14px; }
  .dominio-cab h2 { font-size: 1.5rem; }
}

/* capas das aulas na planificação do professor */
.capa-prof { width: 190px; vertical-align: top; }
.capa-prof img { width: 176px; aspect-ratio: 20 / 9; object-fit: cover; border-radius: 10px; display: block; }
.capa-acoes { display: flex; gap: 6px; margin-top: 6px; }
.capa-acoes label.btn { cursor: pointer; }

/* ---------- conteúdo da aula (início do exercício) */
.materiais { background: #fff; border-radius: 20px; box-shadow: var(--sombra); margin-bottom: 18px; border: 2px solid var(--ano-claro); }
.materiais > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; background: var(--ano-claro); border-radius: 18px; font-weight: 900; font-size: 1.15rem; }
.materiais[open] > summary { border-radius: 18px 18px 0 0; }
.materiais > summary::-webkit-details-marker { display: none; }
.materiais > summary::after { content: "▾"; margin-left: auto; color: var(--ano-esc); transition: transform .2s; }
.materiais:not([open]) > summary::after { transform: rotate(-90deg); }
.mat-n { background: var(--ano); color: #fff; border-radius: 99px; padding: 1px 10px; font-size: .9rem; }
.mat-lista { display: grid; gap: 18px; padding: 18px 20px 20px; }
.mat h3 { margin: 0 0 8px; font-size: 1.1rem; }
.mat-video { position: relative; aspect-ratio: 16 / 9; width: 100%; max-width: 960px; background: #000; border-radius: 14px; overflow: hidden; }
.mat-video iframe, .mat-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mat-acoes { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.mat-img { max-width: 100%; max-height: 460px; border-radius: 12px; display: block; cursor: zoom-in; }
.mat-cartao { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 2px solid var(--linha);
  border-radius: 14px; text-decoration: none; color: var(--tinta); max-width: 640px; }
.mat-cartao:hover { border-color: var(--ano); background: var(--ano-claro); }
.mat-cartao b, .mat-cartao small { display: block; }
.mat-cartao small { color: var(--suave); font-weight: 600; }
.mat-ico { font-size: 1.8rem; }
.mat-seta { margin-left: auto; font-size: 1.4rem; color: var(--ano-esc); font-weight: 900; }
.mat-texto { font-size: 1.05rem; }
.mat-texto a { color: var(--ano-esc); font-weight: 800; }

/* ---------- editor do professor: conteúdo da aula */
.mat-prof { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linha); }
.mat-prof:last-child { border-bottom: 0; }
.mat-prof .ico { font-size: 1.5rem; width: 34px; text-align: center; }
.mat-prof .info { flex: 1; min-width: 0; }
.mat-prof .info small { display: block; color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mat-prof .info input { width: 100%; font-weight: 800; }
.mat-prof form { display: inline; }
.mat-modos { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.mat-modos label { border: 2px solid var(--linha); border-radius: 99px; padding: 6px 14px; cursor: pointer; font-weight: 800; }
.mat-modos input { display: none; }
.mat-modos label:has(input:checked) { border-color: var(--escola); background: #eef7e3; color: var(--escola-esc); }
.mat-campo { display: none; }
.mat-campo.ativo { display: block; }
.mat-prof .info input { border: 1px solid transparent; background: transparent; padding: 3px 6px; border-radius: 8px; font: inherit; font-weight: 800; }
.mat-prof .info input:hover, .mat-prof .info input:focus { border-color: var(--linha); background: #fff; }

/* ---------- professor: aulas da turma agrupadas por domínio */
.dominio-prof { padding: 0; margin: 0 0 22px; background: #fff; overflow: hidden; }
.dominio-prof .dominio-cab { display: flex; align-items: center; gap: 16px; text-align: left; padding: 12px 16px; margin: 0; }
.dominio-prof .dominio-cab h2 { margin: 0; font-size: 1.25rem; }
.dominio-prof .dominio-cab p { margin: 2px 0 0; }
.dom-capa { width: 120px; aspect-ratio: 20 / 9; object-fit: cover; border-radius: 10px; flex: none; }
.dom-txt { flex: 1; min-width: 0; }
.dom-meta { font-size: .88rem; color: var(--suave); margin-top: 4px; }
.dom-acoes { flex: none; }
.dominio-prof > .tabela { border-radius: 0; box-shadow: none; }
.tabela td.mini-capa { width: 92px; padding-right: 0; }
.mini-capa img { width: 84px; aspect-ratio: 20 / 9; object-fit: cover; border-radius: 6px; display: block; }
@media (max-width: 760px) { .dominio-prof .dominio-cab { flex-wrap: wrap; } .dom-capa { display: none; } }
.tabela-aulas { table-layout: fixed; }
@media (max-width: 1000px) { .tabela-aulas { table-layout: auto; } .tabela-aulas col { width: auto !important; } }

/* ---------- painel do professor: estatísticas */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border-radius: 16px; padding: 14px 18px; box-shadow: var(--sombra); text-decoration: none; color: var(--tinta);
  display: flex; flex-direction: column; gap: 2px; border-left: 6px solid var(--escola-2); }
.kpi span { color: var(--suave); font-weight: 700; font-size: .9rem; }
.kpi b { font-size: 1.9rem; font-weight: 900; line-height: 1.1; }
.kpi.alerta { border-left-color: var(--erro); } .kpi.alerta b { color: var(--erro); }
.ct-topo { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.ct-media { text-align: center; background: var(--ano-claro); border-radius: 12px; padding: 4px 10px; min-width: 74px; }
.ct-media b { display: block; font-size: 1.7rem; font-weight: 900; color: var(--ano-esc); line-height: 1.1; }
.ct-media b small { font-size: .9rem; }
.ct-media span { font-size: .75rem; color: var(--suave); font-weight: 800; text-transform: uppercase; }
.ct-rotulo { display: flex; justify-content: space-between; font-size: .85rem; margin-top: 8px; color: var(--suave); }
.ct-rotulo b { color: var(--tinta); }
.barra-fina { height: 8px; background: #eef0f4; border-radius: 99px; overflow: hidden; margin-top: 4px; }
.barra-fina i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.distrib { display: flex; height: 20px; border-radius: 8px; overflow: hidden; margin-top: 4px; background: #eef0f4; }
.distrib i { display: flex; align-items: center; justify-content: center; font-style: normal; font-size: .75rem; font-weight: 900; color: #fff; min-width: 18px; }
.distrib-leg { display: flex; gap: 10px; font-size: .72rem; color: var(--suave); margin: 4px 0 8px; }
.distrib-leg span { display: inline-flex; align-items: center; gap: 3px; }
.distrib-leg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.n1 { background: #e5484d; } .n2 { background: #ff8a3d; } .n3 { background: #e0b400; } .n4 { background: #7cb82f; } .n5 { background: #1fae5b; }
.nivel { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: .8rem; vertical-align: middle; }
.nota-cel { white-space: nowrap; }
.motivo { display: inline-block; background: #fdecec; color: #a3262a; border-radius: 99px; padding: 2px 9px; margin: 2px 4px 2px 0;
  font-size: .8rem; font-weight: 800; }
.atencao-turma h3 { margin: 0 0 10px; display: flex; gap: 10px; align-items: baseline; }
.atencao-turma h3 a { color: var(--tinta); }
.dificeis { margin-top: 12px; font-size: .92rem; line-height: 1.8; }
.dificeis a { font-weight: 800; color: var(--escola-esc); }

/* ---------- treino de teclado */
.t-teclado { background: #ff7a00; }
.tec { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.tec-main { background: #fff; border-radius: 24px; padding: 22px; box-shadow: var(--sombra); min-height: 430px; }
.tec-barra { display: flex; gap: 22px; flex-wrap: wrap; font-size: 1.1rem; color: var(--suave); font-weight: 700; }
.tec-barra b { color: var(--tinta); font-size: 1.3rem; }
.tec-tempo b { font-variant-numeric: tabular-nums; color: var(--ano-esc) !important; }
.tec-tempo-barra { height: 8px; background: #eef0f4; border-radius: 99px; margin: 10px 0 18px; overflow: hidden; }
.tec-tempo-barra i { display: block; height: 100%; width: 0; background: var(--ano); transition: width .25s linear; }
.tec-inicio, .tec-fim { text-align: center; padding: 20px 10px; }
.tec-inicio h2, .tec-fim h2 { margin: 6px 0 10px; }
.tec-dicas { list-style: none; padding: 0; margin: 14px auto 22px; max-width: 560px; text-align: left; display: grid; gap: 8px; }
.tec-dicas li { background: var(--ano-claro); border-radius: 12px; padding: 8px 14px; }
kbd { background: #f1f3f7; border: 1px solid #cfd4de; border-bottom-width: 3px; border-radius: 6px; padding: 1px 7px; font-family: inherit; font-weight: 800; }
.tec-jogo { text-align: center; padding-top: 10px; }
.tec-contagem { font-size: 5rem; font-weight: 900; color: var(--ano); }
.tec-palavra { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 900; letter-spacing: .5px; color: var(--tinta);
  background: var(--ano-claro); border-radius: 20px; padding: 18px 10px; margin: 0 auto; max-width: 620px; min-height: 1.6em; }
.tec-seguintes { color: #9aa2b2; font-size: 1.3rem; font-weight: 700; margin: 12px 0 18px; min-height: 1.6em; }
.tec-input { width: 100%; max-width: 620px; font-size: 2rem; text-align: center; padding: 14px; border-radius: 16px;
  border: 3px solid var(--ano); font-weight: 800; }
.tec-input:focus { outline: none; box-shadow: 0 0 0 5px var(--ano-claro); }
.tec-fb { min-height: 1.8em; margin: 12px 0 16px; font-size: 1.2rem; font-weight: 800; }
.tec-fb.ok { color: var(--ok); } .tec-fb.treinar { color: #c46a00; }
.tec-lado { background: #fff; border-radius: 24px; padding: 18px; box-shadow: var(--sombra); position: sticky; top: 76px; }
.tec-lado h3 { margin: 0 0 4px; text-align: center; }
.medidor { width: 100%; display: block; }
.medidor-valor { text-align: center; margin-top: -8px; }
.medidor-valor b { display: block; font-size: 2.6rem; font-weight: 900; line-height: 1; }
.medidor-valor span { font-size: .85rem; color: var(--suave); font-weight: 700; }
.escada { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 6px; }
.escada li { display: flex; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 12px; background: #f4f5f8;
  filter: grayscale(1); opacity: .55; transition: all .3s; }
.escada li .ico { font-size: 1.7rem; width: 36px; text-align: center; }
.escada li b, .escada li small { display: block; line-height: 1.2; }
.escada li small { color: var(--suave); font-weight: 700; }
.escada li.ganho { filter: none; opacity: 1; background: #fff6d6; box-shadow: 0 0 0 2px #f2c200 inset; transform: scale(1.02); }
.nivel-tec { display: flex; gap: 10px; align-items: center; background: var(--ano-claro); border-radius: 14px; padding: 10px 12px; }
.nivel-tec .ico { font-size: 2rem; }
.nivel-tec small { display: block; color: var(--suave); font-weight: 700; }
.colecao { margin-top: 12px; }
.colecao > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 1.5rem; }
.colecao small { font-size: .8rem; font-weight: 900; color: var(--suave); margin-left: 1px; }
@media (max-width: 900px) { .tec { grid-template-columns: 1fr; } .tec-lado { position: static; } }

/* resultado do treino */
.medalha-grande { width: 140px; height: 140px; border-radius: 50%; display: grid; place-items: center; font-size: 4.6rem;
  background: radial-gradient(circle at 35% 30%, #fff, var(--ano-claro)); box-shadow: 0 0 0 6px #f2c200 inset; flex-shrink: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: var(--sombra); }
.tile b { display: block; font-size: 2rem; font-weight: 900; }
.tile span { color: var(--suave); font-weight: 700; font-size: .9rem; }
.tile small { display: block; color: var(--ok); font-weight: 800; }
.premios { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 18px; }
.premio { background: #fff6d6; border: 2px solid #f2c200; border-radius: 18px; padding: 12px 14px; display: flex; gap: 12px; align-items: center;
  animation: aparecer .5s both; }
.premio .ico { font-size: 2.4rem; }
.premio small { display: block; color: var(--suave); font-weight: 700; }
@keyframes aparecer { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.niveis-trilho { display: flex; gap: 6px; margin: 8px 0 18px; }
.niveis-trilho div { flex: 1; text-align: center; padding: 8px 4px; border-radius: 12px; background: #f1f3f7; filter: grayscale(1); opacity: .5; font-size: .8rem; font-weight: 800; }
.niveis-trilho div span { display: block; font-size: 1.8rem; }
.niveis-trilho div.feito { filter: none; opacity: 1; background: var(--ano-claro); }
.niveis-trilho div.atual { box-shadow: 0 0 0 3px var(--ano) inset; }
.treinar-lista { display: flex; flex-wrap: wrap; gap: 8px; }
.treinar-lista span { background: #fff; border-radius: 12px; padding: 6px 12px; box-shadow: var(--sombra); }
.treinar-lista s { color: #c46a00; text-decoration-thickness: 2px; margin-right: 6px; }
.treinar-lista em { font-style: normal; font-size: .75rem; background: #fff0d6; color: #a35a00; border-radius: 99px; padding: 1px 6px; margin-left: 6px; font-weight: 800; }
.badge.b-obrig { background: #fff0d6; color: #a35a00; }
.premios-aluno { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.tec-inicio .grande-ico, .tec-fim .grande-ico { font-size: 3.6rem; line-height: 1; }

/* ---------- backoffice de gestão */
body.gestao { --ano: #2b2f3a; --ano-esc: #2b2f3a; --ano-claro: #eceef3; }
body.gestao .nav-prof a.ativo, body.gestao .nav-prof a:hover { background: #eceef3; color: #1d2333; }
.selo-gestao { background: #2b2f3a; color: #fff; font-weight: 900; border-radius: 8px; padding: 4px 10px; font-size: .85rem; letter-spacing: .5px; text-transform: uppercase; }
.btn.escuro { background: #2b2f3a; box-shadow: 0 4px 0 #151820; }
.lista-gestao { padding-left: 18px; line-height: 1.9; }
.lista-gestao a { color: var(--tinta); }
tr.inativo td { opacity: .55; }
.perigo { border: 2px solid #f4c7c8; background: #fffafa; }
.passo { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.passo h2 { margin: 0 0 6px; }
.num-passo { flex: none; width: 44px; height: 44px; border-radius: 50%; background: #2b2f3a; color: #fff; font-weight: 900;
  font-size: 1.3rem; display: grid; place-items: center; }
.passo.perigo .num-passo { background: var(--erro); }
.opcao-linha { display: block; font-weight: 600 !important; margin: 6px 0; }
.resumo-limpeza { background: #fdecec; border-radius: 12px; padding: 10px 14px; margin: 6px 0 12px; color: #7a1d20; }
.campo .opcao-linha input { width: auto; display: inline-block; margin: 0 6px 0 0; padding: 0; vertical-align: middle; }
body.gestao .tabela input:not([type=checkbox]), body.gestao .tabela select,
body.gestao form.form-linha input, body.gestao form.form-linha select { padding: 6px 9px; border: 2px solid var(--linha); border-radius: 8px; font: inherit; background: #fff; }

/* ---------- sumário escrito pelo aluno */
.t-sumario { background: #0b9bd6; }
.sumario-caixa { background: #fff; border-radius: 22px; padding: 20px; box-shadow: var(--sombra); }
.sumario-titulo { display: block; font-size: 1.3rem; font-weight: 900; margin-bottom: 8px; }
.sumario-dicas { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 12px; }
.sumario-dicas li { background: var(--ano-claro); border-radius: 99px; padding: 5px 12px; font-weight: 700; }
.sumario-caixa textarea { width: 100%; font: inherit; font-size: 1.15rem; line-height: 1.5; padding: 14px; border-radius: 14px;
  border: 3px solid var(--ano); resize: vertical; }
.sumario-caixa textarea:focus { outline: none; box-shadow: 0 0 0 5px var(--ano-claro); }
.sumario-contador { display: flex; gap: 10px; align-items: center; margin-top: 8px; font-weight: 800; }
.sumario-contador .barra-fina { margin-top: 0; }
.sumario-texto { white-space: pre-wrap; font-size: 1.05rem; }

/* =====================================================================
   Backoffice do professor · separador Turmas — aspeto «limpo»
   (linhas finas, cinzentos suaves, letra do sistema e mais leve)
   ===================================================================== */
body.ui-limpo {
  --s50: #f8fafc; --s100: #f1f5f9; --s200: #e2e8f0; --s300: #cbd5e1; --s400: #94a3b8; --s500: #64748b;
  --s600: #475569; --s700: #334155; --s800: #1e293b; --s900: #0f172a;
  --verde: #059669; --verde-esc: #047857; --verde-claro: #ecfdf5;
  --rosa: #e11d48; --rosa-esc: #be123c; --rosa-claro: #fff1f2; --rosa-borda: #fecdd3;
  --ambar: #92400e; --ambar-claro: #fef3c7;
  --linha: var(--s200); --suave: var(--s500); --tinta: var(--s800);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; background: var(--s50); color: var(--s800); -webkit-font-smoothing: antialiased;
}
body.ui-limpo h1 { font-size: 1.55rem; font-weight: 700; letter-spacing: -.01em; color: var(--s900); }
body.ui-limpo h2 { font-size: 1.1rem; font-weight: 700; color: var(--s800); }
body.ui-limpo h3 { font-size: 1rem; font-weight: 600; color: var(--s800); }
body.ui-limpo b, body.ui-limpo strong { font-weight: 600; }
body.ui-limpo .muted { color: var(--s500); }
body.ui-limpo .subtitulo { color: var(--s500); font-size: .85rem; margin-top: 2px; }

/* cabeçalho e navegação */
body.ui-limpo .topo { border-bottom: 1px solid var(--s200); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
body.ui-limpo .topo .app { font-weight: 700; color: var(--verde); border-left: 1px solid var(--s200); }
body.ui-limpo .nav-prof a { font-weight: 500; color: var(--s600); padding: 6px 13px; border-radius: 8px; }
body.ui-limpo .nav-prof a:hover { background: var(--s100); color: var(--s900); }
body.ui-limpo .nav-prof a.ativo { background: var(--verde-claro); color: var(--verde-esc); font-weight: 600; }
body.ui-limpo .pill { font-weight: 500; font-size: .85rem; background: var(--s100); color: var(--s700); }
body.ui-limpo .aviso { background: #fffbeb; border: 1px solid #fde68a; color: #78350f; font-weight: 500; font-size: .9rem; border-radius: 10px; }

/* botões */
body.ui-limpo .btn { font-weight: 600; box-shadow: none; border-radius: 8px; background: var(--verde); }
body.ui-limpo .btn:hover { background: var(--verde-esc); }
body.ui-limpo .btn:active { transform: none; box-shadow: none; }
body.ui-limpo .btn.pequeno { padding: 5px 11px; font-size: .8rem; border-radius: 7px; box-shadow: none; }
body.ui-limpo .btn.secundario { background: #fff; color: var(--s700); border: 1px solid var(--s200); box-shadow: none; }
body.ui-limpo .btn.secundario:hover { background: var(--s50); border-color: var(--s300); }
body.ui-limpo .btn.vermelho { background: #fff; color: var(--rosa-esc); border: 1px solid var(--rosa-borda); }
body.ui-limpo .btn.vermelho:hover { background: var(--rosa-claro); }
body.ui-limpo .link-acao { font-size: .8rem; font-weight: 600; color: var(--s600); text-decoration: none; padding: 4px 6px; border-radius: 6px; white-space: nowrap; }
body.ui-limpo .link-acao:hover { color: var(--verde); background: var(--s100); }
body.ui-limpo select, body.ui-limpo input:not([type=checkbox]):not([type=radio]) {
  border: 1px solid var(--s300); border-radius: 7px; padding: 5px 8px; font: inherit; font-size: .88rem; background: #fff; color: var(--s800); }

/* separadores */
body.ui-limpo .tabs { border-bottom: 1px solid var(--s200); gap: 2px; }
body.ui-limpo .tabs a { font-weight: 500; color: var(--s500); padding: 9px 14px; border-bottom-width: 2px; margin-bottom: -1px; }
body.ui-limpo .tabs a:hover { color: var(--s800); }
body.ui-limpo .tabs a.ativo { color: var(--verde-esc); border-color: var(--verde); font-weight: 600; }

/* caixas e tabelas */
body.ui-limpo .caixa { border: 1px solid var(--s200); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); border-radius: 12px; }
body.ui-limpo .tabela { border: 1px solid var(--s200); border-radius: 12px; box-shadow: none; }
body.ui-limpo .tabela th { background: var(--s50); color: var(--s500); font-size: .7rem; font-weight: 600; letter-spacing: .06em;
  border-bottom: 1px solid var(--s200); padding: 10px 12px; }
body.ui-limpo .tabela td { border-bottom: 1px solid var(--s100); color: var(--s700); padding: 10px 12px; vertical-align: middle; }
body.ui-limpo .tabela tr:hover td { background: #fbfcfd; }
body.ui-limpo .tabela tr.hoje td { background: #fffdf2; }
body.ui-limpo .est { font-weight: 600; font-size: .72rem; padding: 2px 8px; border-radius: 6px; }
body.ui-limpo .est.visivel { background: var(--verde-claro); color: var(--verde-esc); }
body.ui-limpo .est.oculta { background: var(--s100); color: var(--s500); }

/* indicadores (KPI) */
body.ui-limpo .kpis { gap: 12px; }
body.ui-limpo .kpi { border: 1px solid var(--s200); border-left: 1px solid var(--s200); border-radius: 12px; padding: 12px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
body.ui-limpo .kpi span { font-size: .68rem; font-weight: 500; color: var(--s400); text-transform: uppercase; letter-spacing: .07em; }
body.ui-limpo .kpi b { font-size: 1.55rem; font-weight: 700; color: var(--s800); }
body.ui-limpo .kpi.alerta { border-color: var(--rosa-borda); background: #fffafb; }
body.ui-limpo .kpi.alerta span { color: #f43f5e; font-weight: 600; }
body.ui-limpo .kpi.alerta b { color: var(--rosa); }

/* cartões das turmas */
body.ui-limpo .cards-turmas { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
body.ui-limpo .card-turma { border: 1px solid var(--s200); border-top: 1px solid var(--s200); border-radius: 12px; padding: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04); color: var(--s700); display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; }
body.ui-limpo .card-turma:hover { border-color: var(--s300); box-shadow: 0 4px 12px rgba(15, 23, 42, .08); }
body.ui-limpo .card-turma h2 { font-size: 1rem; font-weight: 700; color: var(--s900); margin: 0; }
body.ui-limpo .card-turma .muted.small { font-size: .75rem; }
body.ui-limpo .card-turma.vazio-turma { background: var(--s50); border-style: dashed; box-shadow: none; }
body.ui-limpo .ct-media { background: none; padding: 0; min-width: 0; text-align: right; }
body.ui-limpo .ct-media b { display: inline-block; font-size: .8rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; line-height: 1.4; }
body.ui-limpo .ct-media b small { font-size: .75rem; }
body.ui-limpo .ct-media span { display: block; font-size: .62rem; color: var(--s400); font-weight: 500; letter-spacing: .06em; margin-top: 2px; }
.tom-mau { background: var(--rosa-claro, #fff1f2); color: var(--rosa-esc, #be123c); }
.tom-medio { background: var(--ambar-claro, #fef3c7); color: var(--ambar, #92400e); }
.tom-bom { background: var(--verde-claro, #ecfdf5); color: var(--verde-esc, #047857); }
.tom-vazio { color: var(--s300, #cbd5e1); }
body.ui-limpo .ct-rotulo { font-size: .66rem; text-transform: uppercase; letter-spacing: .07em; color: var(--s400); font-weight: 600; margin-top: 12px; }
body.ui-limpo .ct-rotulo b { color: var(--s600); font-weight: 600; text-transform: none; letter-spacing: 0; font-size: .75rem; }
body.ui-limpo .ct-rotulo .muted { color: var(--s400); }
body.ui-limpo .barra-fina { height: 6px; background: var(--s100); }
body.ui-limpo .barra-fina i { background: var(--s600); }
body.ui-limpo .card-turma .barra-fina i { background: var(--verde); }
body.ui-limpo .distrib { height: 8px; gap: 2px; border-radius: 99px; background: var(--s100); }
body.ui-limpo .distrib i { font-size: 0; min-width: 4px; }
body.ui-limpo .distrib-leg { gap: 8px; font-size: .68rem; color: var(--s500); }
body.ui-limpo .distrib-leg small { color: var(--s400); margin-left: 1px; }
body.ui-limpo .distrib-leg i { width: 8px; height: 8px; border-radius: 2px; }
body.ui-limpo .n1 { background: #f43f5e; } body.ui-limpo .n2 { background: #fb923c; } body.ui-limpo .n3 { background: #fbbf24; }
body.ui-limpo .n4 { background: #10b981; } body.ui-limpo .n5 { background: #14b8a6; }
body.ui-limpo .ct-linhas { margin-top: 10px; }
body.ui-limpo .card-turma .linha { font-size: .78rem; color: var(--s600); padding: 2px 0; }
body.ui-limpo .card-turma .linha b { font-weight: 600; color: var(--s700); }
body.ui-limpo .card-turma .linha.alerta, body.ui-limpo .card-turma .linha.alerta b { color: var(--rosa); font-weight: 600; }
body.ui-limpo .ct-rodape { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--s100); display: flex; justify-content: space-between;
  gap: 8px; font-size: .72rem; color: var(--s400); }
body.ui-limpo .ct-linhas + .ct-rodape { margin-top: 12px; }
body.ui-limpo .ct-rodape .ver { color: var(--verde); font-weight: 600; white-space: nowrap; }
body.ui-limpo .card-turma { min-height: 100%; }

/* alunos a precisar de atenção */
body.ui-limpo .titulo-seccao { margin-top: 32px; font-size: 1.15rem; }
body.ui-limpo .atencao-turma { padding: 0; overflow: hidden; }
body.ui-limpo .painel-cab { display: flex; align-items: baseline; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--s200); }
body.ui-limpo .painel-cab h3 { margin: 0; }
body.ui-limpo .painel-cab h3 a { color: var(--s800); text-decoration: none; }
body.ui-limpo .atencao-turma .tabela { border: 0; border-radius: 0; }
body.ui-limpo .atencao-turma .tabela td:first-child { color: var(--s400); font-variant-numeric: tabular-nums; font-size: .8rem; }
body.ui-limpo .atencao-turma .tabela td b { font-weight: 500; color: var(--s900); }
body.ui-limpo .nota-badge { display: inline-block; font-weight: 700; font-size: .75rem; padding: 1px 7px; border-radius: 5px; border: 1px solid transparent; }
body.ui-limpo .nota-badge.tom-mau { border-color: var(--rosa-borda); }
body.ui-limpo .nota-badge.tom-bom { border-color: #a7f3d0; }
body.ui-limpo .nivel { width: 18px; height: 18px; font-size: .68rem; font-weight: 700; }
body.ui-limpo .progresso { display: flex; align-items: center; gap: 8px; }
body.ui-limpo .progresso .barra-fina { width: 80px; flex: none; margin: 0; }
body.ui-limpo .progresso .num { font-size: .75rem; color: var(--s500); font-variant-numeric: tabular-nums; }
body.ui-limpo .motivo { background: var(--ambar-claro); color: var(--ambar); font-weight: 500; font-size: .72rem; border-radius: 5px; padding: 2px 7px; }
body.ui-limpo .motivo.forte { background: #ffe4e6; color: var(--rosa-esc); }
body.ui-limpo .dificeis { margin: 0; padding: 11px 20px; background: var(--s50); border-top: 1px solid var(--s200); font-size: .8rem; line-height: 1.7; color: var(--s700); }
body.ui-limpo .dificeis b::before { content: "💡 "; }
body.ui-limpo .dificeis a { color: var(--verde); font-weight: 600; }

/* página da turma: domínios */
body.ui-limpo .dominio-prof { border: 1px solid var(--s200); border-radius: 12px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
body.ui-limpo .dominio-prof .dominio-cab { background: #fff; border-bottom: 1px solid var(--s200); border-radius: 12px 12px 0 0; padding: 12px 16px; }
body.ui-limpo .dominio-prof .dominio-cab h2 { font-size: 1rem; font-weight: 600; }
body.ui-limpo .dominio-prof .dominio-cab p { font-weight: 400; font-size: .82rem; color: var(--s500); }
body.ui-limpo .dom-meta { font-size: .75rem; color: var(--s400); }
body.ui-limpo .dom-meta b { color: var(--s600); }
body.ui-limpo .dom-capa { width: 96px; border-radius: 8px; }
body.ui-limpo .mini-capa img { width: 72px; border-radius: 5px; }
body.ui-limpo .tabela td.mini-capa { width: 80px; }
body.ui-limpo .dominio-prof > .tabela { border: 0; border-radius: 0 0 12px 12px; }
body.ui-limpo .tabela td a { color: var(--verde-esc); }
body.ui-limpo .tabela tr.flex td { font-style: normal; color: var(--s400); }
body.ui-limpo .notas-grelha td.n { font-weight: 500; font-size: .8rem; color: var(--s600); text-align: center; }
body.ui-limpo .notas-grelha td.n.alto { background: #f0fdf4; color: var(--verde-esc); }
body.ui-limpo .notas-grelha td.n.baixo { background: #fff5f6; color: var(--rosa-esc); }
body.ui-limpo .notas-grelha .rot { font-weight: 500; color: var(--s500); }
body.ui-limpo .notas-grelha td a { font-weight: 500; text-decoration: none; }
body.ui-limpo .tabela td form .btn.pequeno:not(.secundario):not(.vermelho) { background: #fff; color: var(--verde-esc); border: 1px solid #a7f3d0; }
body.ui-limpo .tabela td form .btn.pequeno:not(.secundario):not(.vermelho):hover { background: var(--verde-claro); }

/* ui-limpo: formulários, estados vazios e restantes elementos do backoffice */
body.ui-limpo .campo label { font-weight: 600; font-size: .82rem; color: var(--s700); margin-bottom: 4px; }
body.ui-limpo .campo input, body.ui-limpo .campo select, body.ui-limpo .campo textarea {
  border: 1px solid var(--s300); border-radius: 8px; padding: 8px 10px; font-size: .9rem; }
body.ui-limpo .campo input:focus, body.ui-limpo .campo select:focus, body.ui-limpo .campo textarea:focus,
body.ui-limpo input:focus, body.ui-limpo select:focus, body.ui-limpo textarea:focus {
  border-color: var(--verde); box-shadow: 0 0 0 3px rgba(5, 150, 105, .12); outline: none; }
body.ui-limpo .ajuda, body.ui-limpo .small { color: var(--s500); }
body.ui-limpo .vazio { border: 1px dashed var(--s300); box-shadow: none; border-radius: 12px; background: #fff; padding: 32px 20px; }
body.ui-limpo .vazio .grande-ico { font-size: 2.2rem; opacity: .85; }
body.ui-limpo .vazio h2 { font-size: 1.05rem; font-weight: 600; }
body.ui-limpo .flash { border-radius: 10px; font-weight: 500; font-size: .9rem; box-shadow: none; }
body.ui-limpo .flash.ok { background: var(--verde-claro); color: var(--verde-esc); border: 1px solid #a7f3d0; }
body.ui-limpo .flash.erro { background: var(--rosa-claro); color: var(--rosa-esc); border: 1px solid var(--rosa-borda); }
body.ui-limpo .migalhas { font-weight: 500; color: var(--s500); font-size: .85rem; }
body.ui-limpo .icone-tipo { border-radius: 10px; }
body.ui-limpo .editor-q { border: 1px solid var(--s200); border-radius: 10px; background: var(--s50); box-shadow: none; }
body.ui-limpo details.caixa summary { font-weight: 600; }
body.ui-limpo .selo-gestao { font-weight: 700; font-size: .72rem; border-radius: 6px; }
body.gestao.ui-limpo .nav-prof a.ativo { background: var(--s100); color: var(--s900); }
body.ui-limpo .num-passo { width: 36px; height: 36px; font-size: 1rem; font-weight: 700; }
body.ui-limpo .passo h2 { font-size: 1.05rem; font-weight: 600; }
body.ui-limpo .resumo-limpeza { background: var(--rosa-claro); border: 1px solid var(--rosa-borda); color: var(--rosa-esc); border-radius: 8px; }
body.ui-limpo .perigo { border-color: var(--rosa-borda); background: #fffbfb; }
body.ui-limpo .btn.vermelho:not(.pequeno) { background: var(--rosa); color: #fff; border: 0; }
body.ui-limpo .btn.vermelho:not(.pequeno):hover { background: var(--rosa-esc); }
body.ui-limpo .btn.escuro { background: var(--s800); box-shadow: none; }
body.ui-limpo .icone-tipo { width: 40px; height: 40px; font-size: 1.15rem; }

/* =====================================================================
   Área dos alunos e páginas de entrada — versão «leve» adaptada à idade:
   mantém cores fortes, imagens e botões grandes, mas com letra menos
   carregada, linhas finas e sombras suaves.
   ===================================================================== */
body.aluno, body.acesso { --linha: #e2e8f0; --sombra: 0 1px 3px rgba(15, 23, 42, .08); font-weight: 500; color: #1e293b; }
body.aluno { background: #f8fafc; }
body.aluno h1, body.acesso h1 { font-weight: 800; letter-spacing: -.01em; }
body.aluno h2, body.acesso h2 { font-weight: 700; }
body.aluno h3, body.acesso h3 { font-weight: 700; }
body.aluno b, body.acesso b { font-weight: 700; }
body.aluno .topo { border-bottom: 1px solid #e2e8f0; }
body.aluno .faixa .sub { font-weight: 700; }
body.aluno .chip { font-weight: 700; background: rgba(255, 255, 255, .7); }
body.aluno .chip b { font-weight: 800; }
body.aluno .pill { font-weight: 700; }
body.aluno .btn, body.acesso .btn { font-weight: 800; box-shadow: 0 3px 0 var(--ano-esc); }
body.aluno .btn.secundario, body.acesso .btn.secundario { border: 1px solid #cbd5e1; box-shadow: 0 2px 0 #cbd5e1; }
body.aluno .migalhas { font-weight: 700; }
/* domínios e cartões */
body.aluno .dominio { border: 1px solid #d5dbe4; border-radius: 18px; background: #fff; }
body.aluno .dominio-cab { background: #f1f5f9; border-bottom: 1px solid #d5dbe4; border-radius: 17px 17px 0 0; }
body.aluno .dominio-cab h2 { font-weight: 700; font-size: 1.2rem; }
body.aluno .dominio-cab p { font-weight: 500; color: #64748b; }
body.aluno .cartao-aula { border: 1px solid #e2e8f0; box-shadow: 0 1px 3px rgba(15, 23, 42, .08); }
body.aluno .cartao-aula:hover { box-shadow: 0 8px 18px rgba(15, 23, 42, .12); }
body.aluno .cartao-aula h3 { font-weight: 700; }
body.aluno .cartao-aula .meta { font-weight: 600; color: #64748b; }
body.aluno .cartao-aula .etq-aula, body.aluno .cartao-aula .etq-estado { font-weight: 700; }
body.aluno .destaque { border: 1px solid #e2e8f0; box-shadow: 0 1px 3px rgba(15, 23, 42, .06); }
body.aluno .destaque .num { font-weight: 800; }
body.aluno .destaque .etiqueta { font-weight: 700; }
body.aluno .badge { font-weight: 700; }
/* exercícios */
body.aluno .enunciado, body.aluno .pergunta, body.aluno .resultado-topo, body.aluno .linha-res, body.aluno .tile,
body.aluno .caixa, body.aluno .materiais, body.aluno .tec-main, body.aluno .tec-lado, body.aluno .sumario-caixa {
  border: 1px solid #e2e8f0; box-shadow: 0 1px 3px rgba(15, 23, 42, .06); }
body.aluno .pergunta .txt { font-weight: 700; }
body.aluno .pergunta .np { font-weight: 800; }
body.aluno .opcao span { border-width: 2px; font-weight: 600; }
body.aluno .pergunta input.resp, body.aluno .tec-input, body.aluno .sumario-caixa textarea { border-width: 2px; font-weight: 600; }
body.aluno .zona-ficheiro { border-width: 2px; font-weight: 600; }
body.aluno .tile b { font-weight: 800; }
body.aluno .tile span, body.aluno .tile small { font-weight: 600; }
body.aluno .linha-res .ico { font-weight: 800; }
body.aluno .tabela { border: 1px solid #e2e8f0; box-shadow: none; }
body.aluno .tabela th { font-weight: 700; font-size: .75rem; letter-spacing: .05em; }
body.aluno .flash { font-weight: 600; }
body.aluno .tec-palavra { font-weight: 800; }
body.aluno .tec-barra, body.aluno .tec-fb { font-weight: 600; }
body.aluno .escada li b, body.aluno .premio b { font-weight: 700; }
body.aluno .premio { border-width: 1px; }
/* páginas de entrada e registo */
body.acesso .cartao-acesso { box-shadow: 0 10px 30px rgba(15, 23, 42, .12); }
body.acesso .cartao-acesso .titulo-app { font-weight: 800; }
body.acesso .campo label { font-weight: 700; }
body.acesso .campo input, body.acesso .campo select { border-width: 2px; }

/* ficheiros para descarregar (sem pré-visualização) */
.mat-descarga { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 18px;
  border: 2px dashed var(--md-cor, #91a7ff); background: var(--md-fundo, #f3f5ff); color: inherit; text-decoration: none;
  transition: transform .15s, box-shadow .15s; }
.mat-descarga:hover, .mat-descarga:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(15, 23, 42, .1); border-style: solid; }
.mat-descarga:hover .md-ico { animation: md-salto .5s ease; }
.md-ico { width: 72px; height: 78px; flex: none; }
.md-txt { min-width: 0; }
.md-txt b { display: block; font-size: 1.05rem; overflow-wrap: anywhere; }
.md-txt small { display: block; color: #64748b; font-weight: 600; margin-top: 2px; }
.md-botao { margin-left: auto; flex: none; padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: .9rem;
  background: var(--md-esc, #364fc7); color: #fff; white-space: nowrap; }
@keyframes md-salto { 0%, 100% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-8px) rotate(-6deg); } 70% { transform: translateY(0) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .mat-descarga:hover .md-ico { animation: none; } }
@media (max-width: 520px) { .mat-descarga { flex-wrap: wrap; } .md-botao { margin-left: 0; width: 100%; text-align: center; } }
.fam-pdf { --md-cor: #ff8787; --md-fundo: #fff5f5; --md-esc: #c92a2a; }
.fam-texto { --md-cor: #74c0fc; --md-fundo: #f0f8ff; --md-esc: #1864ab; }
.fam-folha { --md-cor: #69db7c; --md-fundo: #f1fcf3; --md-esc: #2b8a3e; }
.fam-apresentacao { --md-cor: #ffc078; --md-fundo: #fff8f0; --md-esc: #d9480f; }
.fam-zip { --md-cor: #b197fc; --md-fundo: #f6f3ff; --md-esc: #5f3dc4; }
.fam-codigo { --md-cor: #63e6be; --md-fundo: #effcf8; --md-esc: #087f5b; }
.fam-imagem { --md-cor: #faa2c1; --md-fundo: #fff0f6; --md-esc: #a61e4d; }

/* ---------------------------------------------------------------- menu flutuante (professor, ecrãs pequenos) */
.menu-flut { display: none; }
@media (max-width: 720px) {
  body.prof:not(.gestao) .topo { position: static; }
  body.prof:not(.gestao) .topo .nav-prof,
  body.prof:not(.gestao) .topo .pill { display: none; }
  body.prof:not(.gestao) .topo-in { padding-right: 120px; }

  .menu-flut { display: block; position: fixed; top: 10px; right: 12px; z-index: 50; }
  .menu-flut > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer;
    height: 46px; padding: 0 16px 0 14px; border-radius: 999px; background: #1f6f3f; color: #fff;
    font-weight: 700; font-size: .95rem; box-shadow: 0 4px 14px rgba(15, 23, 42, .22); user-select: none;
    -webkit-tap-highlight-color: transparent; }
  .menu-flut > summary::-webkit-details-marker { display: none; }
  .mf-ico { display: inline-flex; flex-direction: column; gap: 4px; width: 18px; }
  .mf-ico i { display: block; height: 2px; border-radius: 2px; background: #fff; transition: transform .2s, opacity .2s; }
  .menu-flut[open] .mf-ico i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-flut[open] .mf-ico i:nth-child(2) { opacity: 0; }
  .menu-flut[open] .mf-ico i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .menu-flut[open] > summary { background: #17552f; }

  .mf-painel { position: absolute; top: 54px; right: 0; width: min(270px, calc(100vw - 24px));
    background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 8px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .18); display: flex; flex-direction: column; gap: 2px;
    max-height: calc(100vh - 80px); overflow-y: auto; animation: mf-abre .15s ease-out; }
  @keyframes mf-abre { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
  .mf-painel a, .mf-mais > summary { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px;
    border-radius: 10px; text-decoration: none; color: #1e293b; font-weight: 600; font-size: 1rem; cursor: pointer; }
  .mf-painel a > span, .mf-mais > summary > span { width: 24px; text-align: center; font-size: 1.1rem; }
  .mf-painel a:active, .mf-mais > summary:active { background: #f1f5f9; }
  .mf-painel a.ativo, .mf-mais > summary.ativo { background: #eaf3df; color: #17552f; }
  .mf-mais { border-top: 1px solid #f1f5f9; margin-top: 4px; padding-top: 4px; }
  .mf-mais > summary { list-style: none; }
  .mf-mais > summary::-webkit-details-marker { display: none; }
  .mf-mais > summary::after { content: '▾'; margin-left: auto; color: #94a3b8; transition: transform .2s; }
  .mf-mais[open] > summary::after { transform: rotate(180deg); }
  .mf-mais > a { padding-left: 50px; font-weight: 500; font-size: .95rem; min-height: 44px; }
  .mf-mais > a small { color: #94a3b8; margin-left: 4px; font-weight: 500; }
  .mf-mais > a.mf-sair { color: #b42318; }

  /* nenhuma página mais larga do que o ecrã: as tabelas deslizam dentro do seu espaço */
  body.prof .pagina { overflow-x: clip; }
  body.prof .tabela { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 720px) and (prefers-reduced-motion: reduce) { .mf-painel { animation: none; } .mf-ico i { transition: none; } }

/* aluno de demonstração */
.selo-demo { display: inline-block; margin-top: 6px; padding: 3px 12px; border-radius: 999px; background: #fff4d6;
  color: #7a5200; font-weight: 800; font-size: .85rem; border: 1px dashed #e0b44a; }

/* botão «Voltar» do ambiente dos alunos (substitui o link pequeno) */
.btn-voltar { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 20px 10px 12px;
  min-height: 48px; border-radius: 999px; background: #fff; border: 2px solid var(--ano, #5e9c2f);
  color: var(--ano-esc, #3d6b1c); font-weight: 800; font-size: 1.02rem; text-decoration: none;
  box-shadow: 0 2px 0 var(--ano, #5e9c2f); transition: transform .1s, background .15s; }
.btn-voltar .bv-seta { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--ano, #5e9c2f); color: #fff; font-size: 1rem; line-height: 1; }
.btn-voltar:hover { background: var(--ano-claro, #eef6e6); }
.btn-voltar:active { transform: translateY(2px); box-shadow: none; }
.btn-voltar:focus-visible { outline: 3px solid var(--ano-esc, #3d6b1c); outline-offset: 3px; }
@media (max-width: 520px) { .btn-voltar { width: 100%; justify-content: center; } }

/* página de entrada: créditos (esquerda) + login (direita); no telemóvel o login fica primeiro */
.acesso-duplo { position: relative; display: flex; gap: 22px; align-items: stretch; justify-content: center; width: 100%; max-width: 1080px; }
.acesso-duplo > .cartao-acesso { flex: 1 1 420px; max-width: 520px; }
.cartao-creditos { font-size: .92rem; line-height: 1.55; color: #334155; }
.cartao-creditos .tit-creditos { text-align: center; font-size: 1.15rem; font-weight: 800; color: var(--escola-esc); margin: 4px 0 12px; }
.cartao-creditos p { margin: 0 0 12px; }
.cartao-creditos ul { margin: 0 0 12px 20px; padding: 0; }
.cartao-creditos .lema-creditos { margin: 0; text-align: center; font-weight: 800; color: var(--escola-esc); }
@media (max-width: 900px) {
  .acesso-duplo { flex-direction: column; align-items: center; }
  .acesso-duplo > .cartao-acesso { flex: none; width: 100%; }
  .acesso-duplo > #cartao { order: 1; }
  .acesso-duplo > .cartao-creditos { order: 2; }
}

/* página inicial dos alunos: acordeão vertical (uma aula por elemento, com os exercícios lá dentro) */
.acordeao { display: flex; flex-direction: column; gap: 10px; }
.acord-aula { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.acord-aula[open] { border-color: var(--ano, #5e9c2f); box-shadow: 0 4px 14px rgba(15, 23, 42, .08); }
.acord-aula > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 12px 16px; cursor: pointer; }
.acord-aula > summary::-webkit-details-marker { display: none; }
.acord-aula > summary:hover { background: var(--ano-claro, #f1f5f9); }
.acord-aula > summary:focus-visible { outline: 3px solid var(--ano-esc, #3d6b1c); outline-offset: -3px; }
.acord-capa { flex: none; width: 64px; height: 64px; border-radius: 12px; background-size: cover; background-position: center; }
.acord-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.acord-etq { font-size: .8rem; font-weight: 800; color: var(--ano-esc, #3d6b1c); text-transform: uppercase; letter-spacing: .03em; }
.acord-ok { color: #15803d; }
.acord-tit { font-weight: 700; color: #1e293b; line-height: 1.3; }
.acord-prog { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: #64748b; font-weight: 700; }
.acord-prog .barra { flex: 0 1 160px; width: 160px; height: 8px; background: #eceef3; border-radius: 99px; overflow: hidden; margin: 0; }
.acord-prog .barra i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.acord-seta { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #f1f5f9;
  color: #475569; font-size: 1.1rem; transition: transform .2s, background .2s; }
.acord-aula[open] .acord-seta { transform: rotate(180deg); background: var(--ano, #5e9c2f); color: #fff; }
.acord-lista { list-style: none; margin: 0; padding: 4px 12px 12px; border-top: 1px solid #f1f5f9; display: flex; flex-direction: column; gap: 6px; }
.acord-ex { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: inherit;
  background: #f8fafc; border: 1px solid transparent; min-height: 52px; }
.acord-ex:hover, .acord-ex:focus-visible { background: var(--ano-claro, #eef6e6); border-color: var(--ano, #5e9c2f); }
.acord-ex .icone-tipo { flex: none; width: 44px; height: 44px; border-radius: 12px; font-size: 1.3rem; }
.acord-ex-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.acord-ex-txt b { font-weight: 700; color: #1e293b; }
.acord-ex-txt small { color: #64748b; font-weight: 600; }
.acord-ir { flex: none; color: var(--ano-esc, #3d6b1c); font-weight: 900; }
.acord-aula.completa > summary .acord-capa { filter: saturate(.85); }
@media (max-width: 560px) {
  .acord-aula > summary { padding: 10px 12px; gap: 10px; }
  .acord-capa { width: 46px; height: 46px; border-radius: 10px; }
  .acord-prog .barra { flex: 1 1 auto; width: auto; }
  .acord-lista { padding: 4px 8px 10px; }
  .acord-ex { display: grid; grid-template-columns: 40px 1fr; column-gap: 10px; row-gap: 6px; padding: 10px; }
  .acord-ex .icone-tipo { width: 40px; height: 40px; grid-row: span 2; align-self: start; }
  .acord-ex .badge { grid-column: 2; justify-self: start; }
  .acord-ir { display: none; }
}
@media (prefers-reduced-motion: reduce) { .acord-seta { transition: none; } }

/* página inicial dos alunos: acordeão de domínios (cada um contém o acordeão das suas aulas) */
.acord-dominios { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.acord-dom { background: #fff; border: 1px solid #d5dbe4; border-radius: 20px; overflow: hidden; }
.acord-dom[open] { border: 2px solid var(--ano, #5e9c2f); }
.acord-dom > summary { list-style: none; display: flex; align-items: center; gap: 16px; padding: 16px 18px; cursor: pointer; }
.acord-dom > summary::-webkit-details-marker { display: none; }
.acord-dom > summary:hover { background: var(--ano-claro, #f1f5f9); }
.acord-dom > summary:focus-visible { outline: 3px solid var(--ano-esc, #3d6b1c); outline-offset: -3px; }
.dom-ilus { flex: none; width: 84px; height: 84px; border-radius: 16px; background: #f1f5f9 center / cover no-repeat; }
.dom-nome { font-size: 1.2rem; font-weight: 800; color: #1e293b; }
.dom-desc { color: #64748b; font-size: .92rem; line-height: 1.35; }
.acord-dom[open] > summary .acord-seta { transform: rotate(180deg); background: var(--ano, #5e9c2f); color: #fff; }
.acord-dom > .acordeao { padding: 4px 14px 16px; border-top: 1px solid #eef1f5; padding-top: 14px; background: #fafbfc; }
@media (max-width: 560px) {
  .acord-dom > summary { padding: 12px; gap: 12px; }
  .dom-ilus { width: 56px; height: 56px; border-radius: 12px; }
  .dom-nome { font-size: 1.05rem; }
  .dom-desc { display: none; }
  .acord-dom > .acordeao { padding: 10px 8px 12px; }
}

/* ===== Turma do ensino especial ⭐ (estrela no ecrã de entrada, alunos escolhem o nome) ===== */
.ano-especial { --ano: #8e5bf5; --ano-esc: #6b3fd1; --ano-claro: #f0e9ff; }
.grelha-anos.com-estrela { grid-template-columns: repeat(5, 1fr); gap: 8px; }
.grelha-anos.com-estrela .bt-ano { font-size: 1.5rem; padding: 18px 2px; border-radius: 18px; }
.grelha-anos.com-estrela .bt-ano small { font-size: .78rem; }
.bt-ano.aE { background: linear-gradient(145deg, #a77bff, #7c4dff); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.bt-ano.aE img { width: 2.6rem; height: 2.6rem; display: block; animation: estrela-pula 2.6s ease-in-out infinite; }
@keyframes estrela-pula { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(8deg); } }
@media (prefers-reduced-motion: reduce) { .bt-ano.aE img { animation: none; } }
.grelha-num.grelha-nomes { grid-template-columns: 1fr; gap: 10px; }
.bt-nome { border: 0; border-radius: 18px; padding: 16px 14px; font: inherit; font-weight: 900; font-size: 1.45rem; color: #fff;
  background: var(--ano); box-shadow: 0 5px 0 var(--ano-esc); cursor: pointer; }
.bt-nome:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ano-esc); }
.bt-nome::before { content: "⭐ "; }
.resumo-estrela { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.resumo-estrela img { width: 28px; height: 28px; }
.nomes-especial { display: flex; flex-direction: column; gap: 4px; width: 100%; font-size: .9rem; font-weight: 700; }
.nomes-especial.hidden { display: none; }
.nomes-especial textarea { width: 100%; max-width: 360px; font: inherit; font-weight: 400; }
@media (max-width: 480px) {
  .grelha-anos { grid-template-columns: repeat(2, 1fr); }
  .grelha-anos.com-estrela { grid-template-columns: repeat(3, 1fr); }
  .grelha-anos.com-estrela .bt-ano { font-size: 1.7rem; padding: 20px 4px; }
}

/* Alunos a precisar de atenção: um acordeão por turma */
.acord-atencao { padding: 0 !important; overflow: hidden; margin-bottom: 10px; }
.acord-atencao > summary { list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px;
  padding: 14px 20px; cursor: pointer; user-select: none; }
.acord-atencao > summary::-webkit-details-marker { display: none; }
.acord-atencao > summary::after { content: "▾"; margin-left: auto; color: #64748b; font-size: 1.1rem; transition: transform .2s; }
.acord-atencao:not([open]) > summary::after { transform: rotate(-90deg); }
.acord-atencao > summary:hover { background: #f8fafc; }
.acord-atencao > summary:focus-visible { outline: 3px solid #3d6b1c; outline-offset: -3px; }
.acord-atencao[open] > summary { border-bottom: 1px solid var(--s200, #e2e8f0); }
.acord-atencao .at-turma { font-weight: 800; font-size: 1.1rem; min-width: 52px; }
.acord-atencao .at-conta { background: #fee2e2; color: #b91c1c; border-radius: 999px; padding: 2px 10px; font-size: .85rem; }
.acord-atencao .at-conta.zero { background: #e2f3e5; color: #166534; }
.acord-atencao .at-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.acord-atencao .at-link { margin: 10px 20px 6px; }
.acord-atencao .dificeis { padding: 12px 20px; }
.at-ajuda { margin: 0 0 10px; }
.at-ajuda a { color: inherit; text-decoration: underline; }

/* Correções: acordeões Ano > Turma */
.acord-cor { padding: 0 !important; overflow: hidden; }
.acord-cor > summary { list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px;
  padding: 14px 20px; cursor: pointer; user-select: none; }
.acord-cor > summary::-webkit-details-marker { display: none; }
.acord-cor > summary::after { content: "▾"; margin-left: auto; color: #64748b; font-size: 1.1rem; transition: transform .2s; }
.acord-cor:not([open]) > summary::after { transform: rotate(-90deg); }
.acord-cor > summary:hover { background: #f8fafc; }
.acord-cor > summary:focus-visible { outline: 3px solid #3d6b1c; outline-offset: -3px; }
.acord-ano { margin-bottom: 10px; }
.acord-ano[open] > summary { border-bottom: 1px solid var(--s200, #e2e8f0); }
.acord-ano > summary .cor-titulo { font-weight: 800; font-size: 1.15rem; min-width: 80px; }
.acord-ano .cor-corpo { padding: 12px 14px 4px; background: #f8fafc; }
.acord-turma { background: #fff; border: 1px solid var(--s200, #e2e8f0); border-radius: 12px; margin-bottom: 10px; }
.acord-turma > summary { padding: 11px 16px; }
.acord-turma > summary .cor-titulo { font-weight: 700; min-width: 54px; }
.acord-turma[open] > summary { border-bottom: 1px solid var(--s200, #e2e8f0); }
.acord-turma .tabela { border: 0; border-radius: 0; margin: 0; }
.cor-conta { border-radius: 999px; padding: 2px 10px; font-size: .85rem; }
.cor-conta.pend { background: #fee2e2; color: #b91c1c; }
.cor-conta.ok { background: #e2f3e5; color: #166534; }
.cor-ajuda { margin: 0 0 10px; }
.cor-ajuda a { color: inherit; text-decoration: underline; }
.acord-cor .tabela a.btn { color: #fff; }
.acord-cor .tabela a.btn.secundario { color: var(--s800, #1e293b); }

/* Exercícios: editar número, semestre e título da aula */
.aula-cab [data-editar-aula] { white-space: nowrap; }
.aula-editar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin: 0 0 10px; padding: 12px 14px;
  background: #f8fafc; border: 1px solid var(--s200, #e2e8f0); border-radius: 12px; }
.aula-editar[hidden] { display: none; }
.aula-editar label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 600; color: #475569; }
.aula-editar select, .aula-editar input { font: inherit; font-weight: 400; padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.aula-editar .aula-titulo { flex: 1 1 380px; }
.aula-editar .aula-titulo input { width: 100%; }
.aula-editar .aula-aviso { flex-basis: 100%; margin: 0; color: #92400e; }
.caixa[id^="aula"] { scroll-margin-top: 90px; }

/* Exercícios: em que turmas aparece cada exercício */
.ex-turmas { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 0 14px 0 8px; }
.chip-t { position: relative; cursor: pointer; user-select: none; }
.chip-t input { position: absolute; opacity: 0; pointer-events: none; }
.chip-t span { display: inline-block; min-width: 44px; text-align: center; padding: 4px 9px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; border: 1.5px solid #cbd5e1; color: #94a3b8; background: #fff;
  text-decoration: line-through; transition: background .15s, color .15s, border-color .15s; }
.chip-t input:checked + span { background: #dcfce7; border-color: #16a34a; color: #166534; text-decoration: none; }
.chip-t.especial input:checked + span { background: #fef3c7; border-color: #d97706; color: #92400e; }
.chip-t.todas span { text-decoration: none; color: #475569; border-style: dashed; margin-right: 4px; }
.chip-t.todas input:checked + span { background: #166534; border: 1.5px solid #166534; color: #fff; }
.chip-t.todas input:indeterminate + span { background: #f1f5f9; border-style: solid; color: #334155; }
.chip-t input:focus-visible + span { outline: 3px solid #3d6b1c; outline-offset: 1px; }
.chip-t:hover span { border-color: #16a34a; }
.ex-turmas-ok { font-size: .75rem; min-width: 70px; color: #64748b; }
.ex-turmas-ok.certo { color: #16a34a; } .ex-turmas-ok.erro { color: #b91c1c; }
.ex-nenhuma > div:nth-child(2) b { text-decoration: line-through; color: #94a3b8; }

.chip-t .ano-t { font-style: normal; }
.acoes-ex { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
@media (max-width: 700px) {
  .ex-linha { display: grid !important; grid-template-columns: 40px 1fr; gap: 6px 10px; align-items: center; }
  .ex-linha > :first-child { grid-row: span 1; }
  .ex-linha .ex-turmas { grid-column: 1 / -1; }
  .ex-turmas { margin: 0; gap: 5px; }
  .ex-turmas .ano-t { display: none; }
  .chip-t span { min-width: 36px; padding: 5px 9px; font-size: .8rem; }
  .ex-turmas-ok { min-width: 0; flex-basis: 100%; }
  .ex-turmas-ok:empty { display: none; }
  .ex-linha .acoes-ex { grid-column: 1 / -1; display: flex; flex-wrap: nowrap; gap: 5px; }
  .ex-linha .acoes-ex .btn.pequeno { flex: 1 1 auto; padding: 7px 4px; font-size: .78rem; text-align: center; justify-content: center; min-width: 0; }
  .ex-linha .acoes-ex form.form-linha { display: contents; }
}

.notas-grelha td.na { background: repeating-linear-gradient(135deg, #f8fafc 0 6px, #eef2f7 6px 12px); }

/* Professor › Exercícios: aulas agrupadas por domínio (acordeões, como o aluno vê) */
.prof-dominios { margin-top: 14px; }
.prof-dominios .dom-ilus { width: 64px; height: 64px; }
.acord-dom > .dom-aulas { padding: 14px; border-top: 1px solid #eef1f5; background: #fafbfc; display: flex; flex-direction: column; gap: 12px; }
.acord-dom > .dom-aulas > .caixa { margin: 0; scroll-margin-top: 80px; }
@media (max-width: 700px) { .acord-dom > .dom-aulas { padding: 8px; } }

/* Gestão › Alunos: um acordeão por turma */
.turma-selo { flex: none; display: grid; place-items: center; min-width: 64px; height: 52px; padding: 0 10px; border-radius: 14px;
  background: #e8f5ee; color: #13663e; font-weight: 800; font-size: 1.05rem; }
.turma-selo.especial { background: #fff4d6; color: #8a5a00; }
.acord-dom > .turma-alunos { border-top: 1px solid #eef1f5; padding: 6px 10px 10px; overflow-x: auto; }
.acord-dom > .turma-alunos .tabela { margin: 0; }
.acord-turmas { margin-top: 0; }
.acord-turmas > .acord-dom { scroll-margin-top: 80px; }

/* Aluno › Vista geral: critérios de avaliação (siglas por domínio/aula + acordeão final) */
.crit-linha { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.crit { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: .72rem; font-weight: 800;
  letter-spacing: .02em; border: 1px solid transparent; line-height: 1.5; white-space: nowrap; }
.crit b { font-weight: 700; opacity: .85; }
.crit-linha.grande .crit { font-size: .8rem; padding: 3px 10px; }
.crit-EC  { background: #e3efff; color: #1f5fa8; border-color: #c5dcfa; }
.crit-PC  { background: #f3e6ff; color: #7a3db8; border-color: #e2c9fb; }
.crit-DPS { background: #fff3d1; color: #8a5f00; border-color: #f6dd96; }
.crit-CP  { background: #ddf5e3; color: #1f7a3e; border-color: #b9e6c6; }
.crit-AAC { background: #ffe6dc; color: #b5471e; border-color: #fbc8b4; }
.criterios-corpo { padding: 16px 18px 20px; border-top: 1px solid #eef1f5; background: #fafbfc; }
.crit-ajuda { margin: 0 0 14px; color: #475467; font-size: .92rem; }
.crit-grelha { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.crit-cartao { background: #fff; border-radius: 16px; border: 1px solid #e2e8f0; border-top: 5px solid currentColor; padding: 12px 14px; color: inherit; }
.crit-cartao header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.crit-cartao.crit-EC { color: #1f5fa8; } .crit-cartao.crit-PC { color: #7a3db8; } .crit-cartao.crit-DPS { color: #8a5f00; }
.crit-cartao.crit-CP { color: #1f7a3e; } .crit-cartao.crit-AAC { color: #b5471e; }
.crit-cartao { background: #fff; }
.crit-sigla { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; font-weight: 900; font-size: 1rem;
  background: currentColor; }
.crit-sigla { color: #fff; }
.crit-cartao.crit-EC .crit-sigla { background: #1f5fa8; } .crit-cartao.crit-PC .crit-sigla { background: #7a3db8; }
.crit-cartao.crit-DPS .crit-sigla { background: #c48a00; } .crit-cartao.crit-CP .crit-sigla { background: #1f7a3e; }
.crit-cartao.crit-AAC .crit-sigla { background: #b5471e; }
.crit-tit { flex: 1; display: flex; flex-direction: column; color: #1e293b; line-height: 1.25; }
.crit-tit small { color: #64748b; font-size: .78rem; margin-top: 2px; }
.crit-peso { flex: none; text-align: center; line-height: 1.1; }
.crit-peso b { display: block; font-size: 1.35rem; font-weight: 900; }
.crit-peso small { color: #64748b; font-size: .7rem; }
.crit-cartao ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.crit-cartao li { display: flex; gap: 8px; align-items: flex-start; color: #334155; font-size: .88rem; line-height: 1.35; }
.crit-n { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: .75rem; font-weight: 800;
  border: 2px solid currentColor; }
.crit-cartao.crit-EC .crit-n { color: #1f5fa8; } .crit-cartao.crit-PC .crit-n { color: #7a3db8; } .crit-cartao.crit-DPS .crit-n { color: #8a5f00; }
.crit-cartao.crit-CP .crit-n { color: #1f7a3e; } .crit-cartao.crit-AAC .crit-n { color: #b5471e; }
@media (max-width: 640px) { .crit-grelha { grid-template-columns: 1fr; } .criterios-corpo { padding: 12px 10px; } }

/* Turmas sem ano (só nome, ex.: PEBI) */
.selo-semano { display: inline-block; padding: 2px 9px; border-radius: 99px; background: #eef2ff; color: #3730a3; font-size: .75rem; font-weight: 700; white-space: nowrap; }
input.nome-turma { width: 120px !important; font-weight: 700; text-transform: uppercase; }
.bt-ano.aS { background: linear-gradient(145deg, #4f7cff, #3b4fd8); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.bt-ano.aS .nm { font-size: 1.05rem; font-weight: 900; letter-spacing: .02em; line-height: 1.1; word-break: break-word; }
.ano-semano { --ano: #3b5bdb; --ano-esc: #2f45b5; --ano-claro: #e8edff; }
.grelha-anos.com-outras { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); }
input.conteudos-nome { width: 280px; }

/* notas por critérios */
.vista-notas { display: inline-flex; border: 1px solid #d5dce6; border-radius: 999px; overflow: hidden; }
.vista-notas a { padding: 6px 14px; font-size: .85rem; font-weight: 600; text-decoration: none; color: #4a5568; }
.vista-notas a.ativo { background: #1d2433; color: #fff; }
.notas-crit th.c-cab { text-align: center; }
.notas-crit th.c-cab small { display: block; font-weight: 500; text-transform: none; letter-spacing: 0; color: #6b7686; margin-top: 3px; }
.notas-crit td.n { min-width: 54px; }
.notas-crit td.final { background: #eef3fb; font-size: .95rem; }
.nivel { display: inline-block; min-width: 26px; padding: 2px 8px; border-radius: 999px; font-weight: 800; color: #fff; background: #9aa5b4; }
.nivel-1 { background: #c0392b; } .nivel-2 { background: #e67e22; } .nivel-3 { background: #d4a017; } .nivel-4 { background: #27ae60; } .nivel-5 { background: #1f7a3e; }
.pend-chip { font-size: .72rem; background: #fff4d6; border-radius: 999px; padding: 1px 6px; color: #8a6400; }
.crit-legenda { margin-top: 12px; font-size: .85rem; } .crit-legenda summary { cursor: pointer; font-weight: 600; }
.crit-legenda ul { list-style: none; padding: 0; } .crit-legenda li { margin: 6px 0; }

.tab-corrigir td a.btn, .tab-corrigir td a.btn:hover { color: #fff !important; }

/* ===== Tic-Lab: novo cabeçalho e faixa ===== */
.topo .app { border-left: 2px solid var(--linha); padding-left: 14px; display: block; }
.topo .app img { height: 40px; width: auto; display: block; }
body.aluno .topo { position: static; border-bottom: 0; }
body.aluno .topo-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; padding: 14px 32px 12px; }
.logo-ticlab { justify-self: start; display: block; }
.logo-ticlab img { height: 96px; width: auto; display: block; }
body.aluno .topo .ola { text-align: center; padding-top: 14px; }
body.aluno .topo .ola h1 { margin: 0; font-size: clamp(1.7rem, 3.2vw, 2.6rem); color: #1d3a0b; }
body.aluno .topo .ola .sub { font-weight: 900; font-size: 1.1rem; margin-top: 2px; color: #1d3a0b; }
body.aluno .topo .esp { display: none; }
.topo-dir { justify-self: end; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.faixa.faixa-ticlab { background: transparent; border-top: 10px solid var(--escola-2); }
.faixa-ticlab .faixa-in { display: flex; justify-content: flex-end; padding: 0 32px; min-height: 0; }
.faixa-ticlab .chips { background: var(--escola-2); padding: 16px 32px 20px; border-radius: 0 0 26px 26px; gap: 10px; flex-wrap: nowrap; }
.faixa-ticlab .chip { background: rgba(255,255,255,.72); min-width: 110px; }
body.aluno .pagina { padding-top: 28px; }
body.aluno .destaque { margin: 0 0 24px; background: #fde7e9; border: 3px solid #e3151b; box-shadow: none; }
.destaque .num { line-height: 1; flex-direction: column; display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 1.9rem; }
.destaque .num small { font-size: 1.2rem; font-weight: 900; }
.destaque .btn { background: var(--ano); }
.cartao-acesso .logo-ticlab-acesso { display: block; width: min(280px, 80%); height: auto; margin: 4px auto 10px; }
@media (max-width: 900px) {
  body.aluno .topo-in { grid-template-columns: 1fr; justify-items: center; gap: 8px; padding: 12px 16px; }
  .logo-ticlab { justify-self: center; } .logo-ticlab img { height: 64px; }
  body.aluno .topo .ola { padding-top: 0; }
  .topo-dir { justify-self: center; justify-content: center; }
  .faixa-ticlab .faixa-in { justify-content: center; padding: 0 16px; }
  .faixa-ticlab .chips { padding: 12px 18px 16px; }
}

/* ---------- modo «Atenção» ---------- */
.botoes-prof { flex-basis: 100%; display: flex; justify-content: flex-end; gap: 6px; }
.botoes-prof .f-vista { display: contents; }
@media (max-width: 900px) { .botoes-prof { justify-content: center; flex-wrap: wrap; } }   /* ecrã estreito: centrados como os do aluno */
.b-prof { font: inherit; font-weight: 800; font-size: .9rem; padding: 6px 14px; border-radius: 999px; border: 0; cursor: pointer; }
.b-atencao { background: #e3262f; color: #fff; }
.b-atencao:hover { background: #c41d25; }
.b-vista { background: #ffd9dc; color: #c41d25; }
.b-painel { background: #dff3e6; color: #0b6b3a; text-decoration: none; display: inline-flex; align-items: center; }
.b-painel:hover { background: #cdebd8; }
.b-jogos { background: #e8e2f8; color: #5b33a3; }
.b-jogos:hover { background: #dcd2f5; }
.b-jogos.erro { box-shadow: 0 0 0 3px #e3262f; }
.b-jogos.bloq { background: #5b33a3; color: #fff; box-shadow: 0 0 0 3px #c9b6f0; font-variant-numeric: tabular-nums; }
.b-vista:hover { background: #ffc4c9; }
.b-vista.ativa { background: #fff; box-shadow: inset 0 0 0 2px #e3262f; }
.b-prof:focus-visible { outline: 3px solid var(--tinta); outline-offset: 2px; }
.b-atencao.ligado { background: #111; box-shadow: 0 0 0 3px #e3262f; animation: atencao-pulsa 1.6s ease-in-out infinite; }
@keyframes atencao-pulsa { 50% { box-shadow: 0 0 0 6px rgba(227,38,47,.35); } }
#ecra-atencao { position: fixed; inset: 0; z-index: 2147483647; background: #000; display: grid; place-items: center; cursor: none; }
#ecra-atencao[hidden] { display: none; }
#ecra-atencao div { text-align: center; color: #5b5b5b; font-weight: 800; }
#ecra-atencao span { font-size: 64px; display: block; filter: grayscale(1) brightness(.6); }
#ecra-atencao p { margin: 10px 0 0; font-size: 22px; letter-spacing: .5px; }
@media (prefers-reduced-motion: reduce) { .b-atencao.ligado { animation: none; } }
