/* Painel ABRALIPRO — navegação no formato do gestor + telas de gestão (funções do painel-adm). */

/* ═══ navegação ═══ */
.sb-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 16px; }
.sb-top .brand { padding: 4px; }
.sb-recolher { width: 34px; height: 34px; background: transparent; }
.sb-fechar { display: none; }
.nav a, .nav-sec-btn { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: var(--r-md); color: var(--text-soft); font-weight: 600; font-size: 14px; width: 100%; border: 0; background: transparent; text-align: left; }
.nav-sec-btn:hover { background: var(--muted); color: var(--text-strong); }
.nav-sec-btn .caret { margin-left: auto; width: 16px; height: 16px; transition: transform .2s; }
.nav-sec.open > .nav-sec-btn .caret { transform: rotate(180deg); }
.nav-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
.nav-sec.open > .nav-sub { grid-template-rows: 1fr; }
.nav-sub > div { overflow: hidden; display: grid; gap: 2px; padding-left: 14px; }
.nav-sub a { min-height: 38px; font-size: 13.5px; }
.nav-sub a .ico { width: 18px; height: 18px; }
.sb-bottom { position: relative; border-top: 1px solid var(--border-soft); padding-top: 10px; }
.who-btn { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 6px; border-radius: var(--r-md); text-align: left; }
.who-btn:hover { background: var(--muted); }
.who-btn .quem { flex: 1; min-width: 0; line-height: 1.25; font-size: 13px; }
.who-btn .quem b { display: block; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-btn .quem small { color: var(--muted-fg); }
.who-btn .caret { width: 16px; height: 16px; color: var(--muted-fg); }
.acct-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 6px; box-shadow: var(--shadow); z-index: 70; }
.acct-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--text-soft); font-size: 14px; font-weight: 600; text-align: left; }
.acct-item:hover { background: var(--muted); color: var(--text-strong); text-decoration: none; }
.acct-item .ico { width: 18px; height: 18px; }
.acct-sep { height: 1px; background: var(--border-soft); margin: 6px 4px; }
.shell.recolhido .sidebar { width: 76px; padding: 18px 10px; }
.shell.recolhido .rot { display: none; }
.shell.recolhido .sb-top { flex-direction: column; }
.shell.recolhido .nav a { justify-content: center; padding: 0; }
.shell.recolhido .nav-sub > div { padding-left: 0; }
.shell.recolhido .nav-sub { grid-template-rows: 1fr; }
.shell.recolhido .nav-sec-btn { display: none; }
.shell.recolhido .who-btn { justify-content: center; }
.shell.recolhido .acct-menu { right: auto; width: 230px; }
.topbar .row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted-fg); min-width: 0; }
.crumb .ico { width: 14px; height: 14px; }
.crumb b { color: var(--text-strong); font-family: var(--display); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-acoes { display: flex; align-items: center; gap: 10px; }
.busca-btn { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px 0 14px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--card); color: var(--muted-fg); min-width: 300px; }
.busca-btn:hover { border-color: var(--primary-line); color: var(--text-strong); }
.busca-btn .txt { flex: 1; text-align: left; font-size: 14px; }
kbd { font: 600 11px var(--mono); padding: 3px 7px; border-radius: 6px; background: var(--muted); color: var(--muted-fg); border: 1px solid var(--border); }
.sino-wrap { position: relative; }
.sino { position: relative; }
.sino-n { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--err); color: #fff; font-size: 10px; font-weight: 800; line-height: 18px; text-align: center; }
.sino-painel { position: absolute; right: 0; top: 50px; width: min(390px, calc(100vw - 24px)); background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); z-index: 80; overflow: hidden; }
.sino-cab { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); }
.sino-painel ul { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.sino-painel li a { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; color: var(--text); font-size: 14px; border-top: 1px solid var(--border-soft); }
.sino-painel li:first-child a { border-top: 0; }
.sino-painel li a:hover { background: var(--surface); text-decoration: none; }
.sino-painel li a.nova { background: var(--warn-bg); }
.sino-painel li a > span { flex: 1; }
.sino-painel li a .ico { width: 18px; height: 18px; color: var(--warn-fg); margin-top: 2px; }
.vazio-sino { padding: 26px 16px; text-align: center; color: var(--muted-fg); font-size: 14px; }
.link-btn { border: 0; background: transparent; color: var(--primary-text); font-weight: 700; font-size: 13px; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.tabbar { display: none; }
.scrim { display: none; }

/* barra de carregamento, esqueleto e entrada em sequência (como no painel-adm) */
.carga { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 300; background: linear-gradient(90deg, #9A66FF, #F58ED8, #EDBA6D); box-shadow: 0 0 10px rgba(154, 102, 255, .6); opacity: 0; transition: width .25s ease, opacity .3s; }
.carga.on { opacity: 1; width: 80%; transition: width 8s cubic-bezier(.1, .7, .2, 1), opacity .2s; }
.sk { background: linear-gradient(90deg, var(--muted) 25%, var(--surface) 45%, var(--muted) 65%); background-size: 300% 100%; animation: sk 1.3s ease-in-out infinite; border-radius: 12px; }
.sk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.page.entra > * { animation: entra .45s cubic-bezier(.2, .8, .2, 1) both; }
.page.entra > :nth-child(2) { animation-delay: .05s; }
.page.entra > :nth-child(3) { animation-delay: .1s; }
.page.entra > :nth-child(4) { animation-delay: .15s; }
.page.entra > :nth-child(n+5) { animation-delay: .2s; }
@keyframes entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sk, .page.entra > *, .carga, .nav-sub { animation: none !important; transition: none !important; } }

/* busca */
.busca-ov { place-items: start center; padding-top: 12vh; }
.busca-caixa { width: min(640px, 100%); background: var(--card); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow); overflow: hidden; }
.busca-topo { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); }
.busca-topo .input { border: 0; box-shadow: none; background: transparent; padding: 0; height: 40px; font-size: 16px; }
.busca-lista { max-height: 56vh; overflow-y: auto; padding: 6px; }
.busca-sec { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); padding: 10px 12px 4px; }
.busca-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--r-md); background: transparent; text-align: left; color: var(--text); }
.busca-item span { display: grid; min-width: 0; }
.busca-item b { font-weight: 600; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.busca-item small { color: var(--muted-fg); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.busca-item.on, .busca-item:hover { background: var(--primary-soft); }
.busca-vazio { padding: 26px; text-align: center; color: var(--muted-fg); }

/* ═══ telas de gestão ═══ */
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text-soft); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.form-grid { display: grid; gap: 14px; }
.form-acoes { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.cols { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.pilha { display: grid; gap: 20px; min-width: 0; }
.mini-acoes { display: inline-flex; gap: 2px; }
.mini { width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--muted-fg); display: inline-grid; place-items: center; }
.mini:hover { background: var(--muted); color: var(--text-strong); }
.mini .ico { width: 16px; height: 16px; }
.mini.perigo:hover { background: var(--err-bg); color: var(--err-fg); }
.mod-cab { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.mod-cab .titulo { flex: 1; font-weight: 700; color: var(--text-strong); cursor: pointer; display: flex; align-items: center; gap: 8px; min-width: 0; border: 0; background: transparent; text-align: left; }
.mod-cab .titulo .seta { transition: transform .2s; }
.modulo.fechado .mod-cab .titulo .seta { transform: rotate(-90deg); }
.modulo.fechado .itens { display: none; }
.item { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 8px; border-top: 1px solid var(--border-soft); font-size: 14px; }
.item > .ico { color: var(--muted-fg); }
.item a.t { color: var(--text-strong); font-weight: 600; }
.item .meta { display: block; font-size: 12px; color: var(--muted-fg); }
.item.rascunho a.t { color: var(--muted-fg); font-weight: 500; }
.add-linha { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 8px 4px; border-top: 1px dashed var(--border); }
.capa-aula { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-md); background: var(--muted); border: 1px solid var(--border-soft); display: block; }
.alt-linha { display: grid; grid-template-columns: 28px minmax(0, 1fr) 32px; gap: 8px; align-items: center; }
.pergunta { border: 1px solid var(--border-soft); border-radius: var(--r-md); padding: 14px; background: var(--card); display: grid; gap: 8px; }
.pergunta-cab { display: flex; gap: 10px; align-items: flex-start; }
.pergunta-cab b { flex: 1; color: var(--text-strong); }
.pergunta ol { margin: 0; padding-left: 20px; font-size: 14px; color: var(--text-soft); }
.pergunta li.certa { color: var(--ok-fg); font-weight: 700; }
.resumo-linha { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted-fg); margin: -12px 0 20px; }
.resumo-linha b { color: var(--text-strong); }
.artes-frame { width: 100%; height: calc(100vh - 150px); min-height: 600px; border: 0; border-radius: var(--r-lg); background: #fff; }
.toggle { position: relative; width: 44px; height: 24px; flex: none; display: inline-block; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle span { position: absolute; inset: 0; border-radius: 12px; background: var(--border); transition: background .2s; cursor: pointer; }
.toggle span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + span { background: var(--ok); }
.toggle input:checked + span::after { transform: translateX(20px); }
.toggle input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.forma { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--border-soft); }
.forma:first-child { border-top: 0; }
.forma .info { flex: 1; min-width: 0; }
.forma .info b { color: var(--text-strong); display: block; }
.forma .info small { color: var(--muted-fg); }
.lista-simples { border: 1px solid var(--border-soft); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }

@media (max-width: 1100px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .busca-btn { min-width: 0; }
  .busca-btn .txt, .busca-btn kbd { display: none; }
}
@media (max-width: 860px) {
  .sb-fechar { display: grid; }
  .sb-recolher { display: none; }
  .scrim { display: block; position: fixed; inset: 0; background: var(--overlay); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .scrim.on { opacity: 1; pointer-events: auto; }
  .shell.recolhido .sidebar { width: 252px; }
  .shell.recolhido .rot { display: initial; }
  .shell.recolhido .nav-sec-btn { display: flex; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--card); border-top: 1px solid var(--border); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar .tab { flex: 1; display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted-fg); padding: 4px 0; }
  .tabbar .tab.active { color: var(--primary-text); }
  .page { margin-bottom: 70px; }
  .sk-grid { grid-template-columns: 1fr; }
  .item { grid-template-columns: 22px minmax(0, 1fr); }
  .item > :nth-child(n+3) { grid-column: 2; }
}
