/* 19.3.5 — acabamento sem trocar cores, cartões e navegação de style.css. */
button:focus-visible,a:focus-visible,summary:focus-visible,label[tabindex]:focus-visible { outline:3px solid var(--navy); outline-offset:3px; }
.sinopanel { top:calc(var(--topbar-h,54px) + 8px); max-height:calc(100dvh - var(--topbar-h,54px) - 24px - env(safe-area-inset-bottom)); overflow-y:auto; overscroll-behavior:contain; }
.sinobody { border:0; background:none; color:var(--text); font:inherit; text-align:left; padding:14px; }
.sinoactions button { min-width:44px; min-height:44px; border-bottom:0!important; }
.sinohead { padding:6px 10px 6px 14px; }
.sinohead .iconbtn { width:40px; min-height:40px; font-size:23px; }
.sinofoot { display:flex; flex-wrap:wrap; justify-content:center; gap:4px 12px; padding:8px 12px; }
.sinofoot .linkbtn { min-height:44px; font-size:13px; }
.sinoperm { flex-wrap:wrap; }
.sinoperm .btn { min-height:40px; flex:none; }
.modal { overscroll-behavior:contain; }
.lista-import { scroll-padding-top:56px; }
.lista-import-head { position:sticky; top:-18px; z-index:2; background:var(--card); border-bottom:1px solid var(--line); padding:8px 0; margin:-8px 0 10px; }
.lista-import-head .iconbtn { flex:none; width:40px; min-height:44px; }
.lista-import label.small { min-height:44px; line-height:1.5; cursor:pointer; }
.lista-import input[type=checkbox] { flex:none; width:18px!important; height:18px; accent-color:var(--navy); }
.lista-import[aria-busy=true],.arqbtn[aria-disabled=true] { cursor:wait; }
.arqbtn[aria-disabled=true] { pointer-events:none; opacity:.6; }
:root[data-theme=dark] :is(button,a,summary,label[tabindex]):focus-visible { outline-color:#93c5fd; }
#view:focus { outline:none; }
.skiplink { position:fixed; z-index:100; top:8px; left:12px; transform:translateY(-160%); background:var(--card); color:var(--text); border:1px solid var(--line); border-radius:10px; padding:12px 16px; font-weight:700; }
.skiplink:focus { transform:none; }
#nav button { touch-action:manipulation; }
@media (hover:hover) { #nav button:not(.active):hover .ico,.sinobody:hover { background:var(--card2); } }
.bol-alunos { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-top:16px; padding-top:12px; border-top:1px solid var(--line); }
.bol-alunos .btn { flex:none; }
.bolcab>.row { align-items:center; }
.bolcab .ordsel,.bolcab .ordsel select { max-width:100%; }
.bolsaida .chk { flex:none; margin-top:2px; }
.bolsaida .muted { display:block; margin-top:8px; }
.bol-bimhead,.bol-bimfoot,.bol-retorno { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.bol-bimhead p { margin:5px 0 0; }
.bol-bimgrid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; margin-top:16px; }
.bol-bimcard { padding:14px; border:1px solid var(--line); border-radius:var(--r-md,12px); background:var(--card2); min-width:0; }
.bol-bimcard>.row { justify-content:space-between; gap:8px; }
.bol-bimcard .btnrow { display:flex; flex-direction:column; margin:12px 0 0; gap:8px; }
.bol-bimcard .btn { min-height:42px; margin:0; }
.bol-bimfoot { margin-top:14px; border-top:1px solid var(--line); padding-top:14px; }
.bol-retorno .btn { flex:none; }
.bol-valor { width:66px; min-height:40px; padding:6px; text-align:center; font-weight:700; background:var(--card); color:var(--text); }
.page-heading { margin:0 0 20px; }
.page-eyebrow { color:var(--navy); font-size:12px; font-weight:700; }
.page-heading h2 { margin:4px 0 6px; }
.page-heading p { margin:0; color:var(--muted); font-size:14px; }
.import-upload { border:1px dashed var(--fieldb); padding:22px; }
.import-upload .small { margin:4px 0 0; }
.import-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:12px; color:var(--navy); background:color-mix(in srgb,var(--navy) 10%,var(--card)); flex:none; }
.import-icon svg { width:21px; height:21px; }
.import-formats,.import-alternatives { margin-top:14px; }
.import-formats summary,.import-alternatives summary { color:var(--muted); font-size:12px; cursor:pointer; }
.import-filter { display:flex; flex-wrap:wrap; align-items:flex-end; gap:16px; margin:22px 0 16px; }
.import-filter label.f { flex:1; min-width:180px; max-width:360px; margin:0; }
.import-filter select { margin-top:5px; }
.field-label { display:block; color:var(--muted); font-size:12px; font-weight:600; margin-bottom:5px; }
.import-grid { display:grid; gap:14px; }
.import-card { margin:0; display:flex; flex-direction:column; }
.import-card h3 { display:block; margin:0 0 3px; font-size:15px; color:var(--text); text-transform:none; letter-spacing:0; }
.import-card h3::after { display:none; }
.import-card p { font-size:13px; color:var(--muted); margin:16px 0 0; }
.import-card>.btnrow { margin-top:auto; padding-top:16px; }
.import-card .btnrow .btn { flex:0 1 auto; min-width:0; }
.import-backup { margin-top:20px; }
.import-backup>summary { display:flex; align-items:center; gap:10px; cursor:pointer; font-size:14px; font-weight:600; flex-wrap:wrap; }
.import-backup>summary .ic { color:var(--muted); }
.import-backup>summary .small { margin-left:auto; font-weight:400; }
/* Login é uma página inteira: não herda o espaço da barra lateral nem uma transformação de navegação. */
body[data-auth=login] #topbar,body[data-auth=login] #nav { display:none!important; }
body[data-auth=login] #view { margin:0!important; padding:0!important; width:100%!important; max-width:none; backface-visibility:visible; transform:none!important; animation:none!important; transition:none!important; }
body[data-auth=login] #view>.loginwrap { position:relative; inset:auto; min-height:100dvh; width:100%; max-width:none!important; margin:0!important; padding:24px max(16px,env(safe-area-inset-right)); padding-top:calc(24px + env(safe-area-inset-top)); padding-bottom:calc(24px + env(safe-area-inset-bottom)); }
.login { flex:none; margin:auto; }
.login-versao { text-align:center; font-size:11px; color:var(--muted); margin-top:18px; }
.login-previa { padding:10px 12px; margin-top:16px; border:1px solid var(--line); border-radius:10px; font-size:12px; color:var(--muted); }
.login .errbox a { display:inline-block; padding:8px 0 0; font-weight:700; }
@media (min-width:700px) { .import-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (min-width:1024px) { #view[data-view=importar]>* { max-width:1040px; } }
@media (max-width:560px) {
  .import-upload { padding:18px; }
  .import-filter { gap:12px; }
  .import-backup>summary .small { margin-left:0; width:100%; padding-left:30px; }
  .bol-bimgrid { grid-template-columns:minmax(0,1fr); }
  .bol-retorno .btn { width:100%; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; scroll-behavior:auto!important; } }
@media print { .import-upload,.import-filter,.import-alternatives,.import-backup,.bol-alunos,.bol-bimestres,.bol-retorno { display:none!important; } }

/* 19.4.0 — resposta ao toque consistente, sem trocar a identidade do diário. */
button.mi { width:100%; font:inherit; text-align:left; color:var(--text); background:var(--card); border:0; }
.mlist button.mi { border-bottom:1px solid var(--line); }
.mlist button.mi:last-child { border-bottom:0; }
.mlist button.mi:focus-visible { outline-offset:-3px; }
@media (max-width:1023px) {
  #topbar { gap:6px; }
  #topbar .tb-ic,#btnBack { min-width:40px; min-height:44px; }
  #nav button { min-height:52px; -webkit-tap-highlight-color:transparent; }
  #view .btn,#view .ibtn,#view .ntoolbtn { min-height:44px; }
  #view .btnrow { gap:8px; }
  .pgprev { overscroll-behavior:contain; }
}
@media (prefers-reduced-motion:no-preference) {
  button.mi,.btn,.ibtn,.ntoolbtn { transition:background-color .16s ease,color .16s ease,box-shadow .16s ease; }
  html[data-vt="tabD"]::view-transition-old(root),html[data-vt="tabD"]::view-transition-new(root),
  html[data-vt="tabE"]::view-transition-old(root),html[data-vt="tabE"]::view-transition-new(root) {
    animation-duration:.24s; animation-timing-function:cubic-bezier(.22,.8,.24,1);
  }
  #view.anim-tabD,#view.anim-tabE { animation-duration:.24s; animation-timing-function:cubic-bezier(.22,.8,.24,1); }
}

/* 19.5 — estado da nuvem acessível por toque e teclado. */
#syncdot { position:relative; flex:none; width:28px; height:44px; padding:0; border:0; background:transparent!important; box-shadow:none!important; cursor:pointer; border-radius:10px; }
#syncdot::before { content:""; display:block; width:10px; height:10px; margin:auto; border-radius:50%; background:#9ca3af; box-shadow:0 0 0 3px rgba(255,255,255,.2); }
#syncdot.on::before { background:#34d399; }
#syncdot.off::before,#syncdot.sending::before { background:#fbbf24; }
#syncdot.error::before { background:#fb7185; }
#syncdot.local::before { background:#c4b5fd; }
#syncdot.error::after { content:"!"; position:absolute; top:1px; right:0; color:#fff; font-size:12px; font-weight:800; }
.sync-panel h3 { margin:0; }
.sync-panel .iconbtn { min-width:44px; min-height:44px; }
.sync-message { padding:16px; border:1px solid var(--line); border-radius:14px; background:var(--card2); font-weight:650; line-height:1.6; }
@media (prefers-reduced-motion:no-preference) { #syncdot.sending::before { animation:syncPulse 1.1s ease-in-out infinite; } }
@keyframes syncPulse { 50% { opacity:.4; transform:scale(.8); } }

/* 19.6 — registro posterior com controles de toque acessíveis. */
/* Defesa de apresentação: a Visão geral ocupa a tela inteira, sem trilho lateral. */
body[data-modo="geral"] #nav { display:none!important; }
.aula-acoes label { display:block; min-width:0; font-size:13px; font-weight:650; }
.aula-acoes input[type=date] { display:block; margin-top:6px; min-height:44px; }
.aula-acoes .row { flex-wrap:wrap; align-items:flex-end; }
.aula-linha { margin:10px 0 0; padding-top:8px; border-top:1px solid var(--line); }
.part-aula-row .nm { min-width:0; overflow-wrap:anywhere; }
.part-aula-row .parts { flex:none; gap:4px; }
.part-aula-row .mabtn { min-width:44px; min-height:44px; }
.part-aula-valor { width:54px; min-height:44px; padding:6px; text-align:center; margin:0; }
.home-tools { display:flex; gap:10px; margin:0 0 14px; }
.home-tools button { display:flex; align-items:center; justify-content:center; gap:8px; flex:1; min-height:46px; border:1px solid var(--line); border-radius:14px; background:var(--card); color:var(--navy); font:inherit; font-size:13px; font-weight:650; }
.home-tools button svg { width:20px; height:20px; }
.call-class { display:block; width:100%; padding:4px 0; border:0; background:transparent; color:inherit; text-align:left; font:inherit; cursor:pointer; }
.call-class > .row { width:100%; }
.call-class:focus-visible { outline:2px solid var(--navy); outline-offset:6px; border-radius:8px; }
/* O conteúdo permanece interativo durante a animação. */
::view-transition { pointer-events:none; }
@media (max-width:1023px) {
  #topbar { gap:8px; padding-left:12px; padding-right:12px; }
  #topbar #title { flex:1; min-width:0; font-size:18px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  #topbar #logo { display:none; }
  #topbar .escchip { flex-shrink:1; max-width:104px; padding:6px 9px; font-size:11px; }
  #topbar .escchip small { display:none; }
  #topbar #btnBack,#topbar #btnMais,#topbar #btnSino { flex:none; width:44px; height:44px; min-width:44px; border-radius:13px; }
  #topbar #syncdot { width:20px; min-width:20px; }
  #nav { bottom:0; left:0; right:0; width:100%; max-width:none; margin:0; transform:none; border-radius:20px 20px 0 0; padding:5px 8px calc(5px + var(--safe-b,0px)); box-shadow:0 -4px 22px rgba(15,23,42,.07); }
  #nav button,#nav button.navaula { flex:1 1 0; width:auto; min-height:58px; font-size:11px; letter-spacing:0; gap:2px; }
  #nav button.navaula .ico { margin-top:0; width:36px; height:32px; border-radius:12px!important; box-shadow:none!important; }
  #nav button.navaula .ico svg { width:23px; height:23px; }
  #nav button.navaula .rot { margin:0; font-size:11px; }
  #nav button.navaula.viva .ico::after { display:none; }
  #nav button:not(.navaula) .ico { padding:4px 12px; }
  #nav button:not(.navaula) .ico svg { width:22px; height:22px; }
  #view.anim-fwd,#view.anim-back,#view.anim-fade,#view.anim-tabD,#view.anim-tabE { animation-duration:.18s; animation-timing-function:cubic-bezier(.2,.7,.2,1); }
}
@media(max-width:400px) { .part-aula-row { gap:6px; } .part-aula-row .nr { width:20px; flex:none; } .part-aula-row .mabtn { min-width:40px; } .part-aula-valor { width:46px; } }
