/* ==========================================================
   IBEM Notas — tema
   ========================================================== */
:root {
  --ibem: #16304f;          /* azul institucional */
  --ibem-2: #1f4a7a;
  --ouro: #c8a24a;
  --fundo: #f3f5f9;
  --texto: #1d2939;
  --suave: #667085;
  --borda: #e4e8ef;
  --ok: #12805c;   --ok-bg: #e7f6ef;
  --erro: #c4352b; --erro-bg: #fdecea;
  --pend: #9a6700; --pend-bg: #fff4d6;
  --raio: 12px;
  --g-ok: #12805c; --g-pend: #d6a21e; --g-erro: #c4352b;   /* gráficos (paleta validada p/ daltonismo) */
  --superficie: #fff; --superficie-2: #f8fafc;
  --sidebar: clamp(220px, 18vw, 264px);
  --bs-body-font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-color: var(--texto);
  --bs-primary: var(--ibem);
  --bs-primary-rgb: 22, 48, 79;
  --bs-link-color: var(--ibem-2);
  --bs-link-color-rgb: 31, 74, 122;
  --bs-border-color: var(--borda);
}
html { font-size: 100%; }
@media (max-width: 1366px) { html { font-size: 96%; } }
@media (min-width: 1800px) { html { font-size: 106%; } }
body { background: var(--fundo); font-size: .935rem; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6 { color: var(--texto); letter-spacing: -.01em; }
.min-w-0 { min-width: 0; }

/* ---------- Estrutura com menu lateral ---------- */
@media (min-width: 992px) {
  body.app .main { margin-left: var(--sidebar); }
  body.app .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); }
}
.sidebar {
  background: linear-gradient(180deg, var(--ibem) 0%, #10243c 100%);
  color: #fff; display: flex; flex-direction: column;
}
@media (min-width: 992px) { body.app .sidebar { z-index: 1030; } }
@media (max-width: 991.98px) {
  .sidebar.offcanvas-lg { width: 284px; max-width: 85vw; --bs-offcanvas-bg: transparent; --bs-offcanvas-zindex: 1050; }
  .sidebar .nav-link { padding: .75rem .85rem; font-size: .98rem; }   /* alvos de toque maiores */
  .sidebar .user-card { padding-bottom: calc(.9rem + env(safe-area-inset-bottom)); }
}
.offcanvas-backdrop { z-index: 1045; }
.sidebar .brand { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1.1rem 1rem; }
.brand-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--ouro); color: var(--ibem);
  display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.brand-title { font-weight: 700; font-size: 1.05rem; line-height: 1.1; }
.brand-sub { font-size: .7rem; color: rgba(255,255,255,.6); line-height: 1.25; }
.sidebar .nav { padding: .5rem .65rem; gap: 2px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  flex-wrap: nowrap;   /* sem isso o Bootstrap joga os últimos itens numa 2ª coluna escondida */
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.sidebar .nav::-webkit-scrollbar { width: 6px; }
.sidebar .nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 3px; }
.sidebar .nav-link, .nav-section { flex-shrink: 0; }
.sidebar .brand, .sidebar .user-card { flex-shrink: 0; }
.sidebar .nav-link { color: rgba(255,255,255,.78); border-radius: 8px; padding: .55rem .75rem;
  display: flex; align-items: center; gap: .7rem; font-size: .9rem; }
.sidebar .nav-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; opacity: .9; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar .nav-link.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 600;
  box-shadow: inset 3px 0 0 var(--ouro); }
.nav-section { text-transform: uppercase; font-size: .68rem; letter-spacing: .08em; color: rgba(255,255,255,.45);
  padding: 1rem .75rem .35rem; }
.user-card { display: flex; align-items: center; gap: .65rem; padding: .9rem 1rem; border-top: 1px solid rgba(255,255,255,.1); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.15); display: grid; place-items: center;
  font-weight: 700; flex-shrink: 0; }
.user-name { font-weight: 600; font-size: .88rem; }
.user-role { font-size: .74rem; color: rgba(255,255,255,.6); }
.topbar { background: var(--ibem); color: #fff; padding: .55rem .75rem; display: flex; align-items: center; gap: .5rem;
  position: sticky; top: 0; z-index: 1020; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.topbar .btn-menu { color: #fff; border: 0; background: rgba(255,255,255,.1); width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; font-size: 1.5rem; flex-shrink: 0; }
.topbar .btn-menu:active { background: rgba(255,255,255,.2); }
.topbar .titulo { font-weight: 600; font-size: 1rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .avatar { width: 34px; height: 34px; font-size: .9rem; }
.content { padding: clamp(1rem, 2vw, 1.75rem) clamp(.85rem, 2.2vw, 2rem) 1rem; max-width: 1600px; }
@media (max-width: 767.98px) { .content { padding: 1rem .85rem; } }
.rodape { color: var(--suave); font-size: .76rem; padding: 1rem 2rem 1.5rem; }

/* Menu compacto em telas baixas (notebook, zoom do Windows 125%/150%) */
@media (min-width: 992px) and (max-height: 760px) {
  .sidebar .brand { padding: .8rem 1rem .5rem; }
  .brand-icon { width: 34px; height: 34px; font-size: 1.1rem; }
  .sidebar .nav-link { padding: .42rem .75rem; font-size: .87rem; }
  .nav-section { padding: .6rem .75rem .2rem; }
  .user-card { padding: .6rem 1rem; }
}
@media (min-width: 992px) and (max-height: 620px) {
  .brand-sub { display: none; }
  .sidebar .nav-link { padding: .3rem .7rem; font-size: .84rem; }
  .sidebar .nav-link i { font-size: .95rem; }
  .nav-section { padding: .4rem .75rem .1rem; font-size: .62rem; }
  .avatar { width: 30px; height: 30px; font-size: .85rem; }
  .user-role { display: none; }
}
@media (min-width: 992px) and (max-height: 500px) {
  .sidebar .brand { padding: .5rem .9rem .3rem; }
  .brand-title { font-size: .95rem; }
  .sidebar .nav { gap: 0; }
  .sidebar .nav-link { padding: .22rem .7rem; }
}

/* ---------- Cabeçalho de página ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.page-head h1 { font-size: clamp(1.25rem, 1rem + 1vw, 1.55rem); font-weight: 700; margin: 0; }
.page-head h1 i { color: var(--ibem-2); }
.page-head p { color: var(--suave); margin: .25rem 0 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---------- Cartões ---------- */
.card { border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-title-sm { font-size: .95rem; font-weight: 650; margin-bottom: .9rem; display: flex; align-items: center; gap: .5rem; }
.card-title-sm i { color: var(--ibem-2); }
.kpi { padding: 1.1rem 1.2rem; display: flex; gap: .9rem; align-items: center; height: 100%; }
.kpi-icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 1.25rem; flex-shrink: 0; }
.kpi-icon.azul { background: #e8eef7; color: var(--ibem-2); }
.kpi-icon.verde { background: var(--ok-bg); color: var(--ok); }
.kpi-icon.vermelho { background: var(--erro-bg); color: var(--erro); }
.kpi-icon.amarelo { background: var(--pend-bg); color: var(--pend); }
.kpi-label { color: var(--suave); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.kpi-valor { font-size: 1.6rem; font-weight: 700; line-height: 1.15; }
.kpi-sub { color: var(--suave); font-size: .78rem; }

/* ---------- Botões ---------- */
.btn { border-radius: 8px; font-weight: 500; }
.btn-ibem, .btn-primary { background: var(--ibem); border-color: var(--ibem); color: #fff; }
.btn-ibem:hover, .btn-primary:hover, .btn-ibem:focus { background: var(--ibem-2); border-color: var(--ibem-2); color: #fff; }
.btn-outline-ibem { border-color: var(--borda); color: var(--texto); background: #fff; }
.btn-outline-ibem:hover { border-color: var(--ibem-2); color: var(--ibem-2); background: #fff; }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; }

/* ---------- Formulários ---------- */
.form-control, .form-select { border-radius: 8px; border-color: #d5dbe5; }
.form-control:focus, .form-select:focus { border-color: var(--ibem-2); box-shadow: 0 0 0 .2rem rgba(31,74,122,.12); }
.form-label { font-weight: 550; font-size: .85rem; margin-bottom: .3rem; }
.form-label .req { color: var(--erro); }
.filtros { padding: .85rem 1rem; }
.filtros .form-label { font-weight: 500; color: var(--suave); font-size: .76rem; margin-bottom: .15rem; }

/* ---------- Ajuda dos campos (!) ---------- */
.ajuda { border: 0; background: none; padding: 0 .1rem; margin-left: .15rem; color: var(--ibem-2); opacity: .75;
  font-size: .95em; line-height: 1; vertical-align: -.05em; cursor: pointer; }
.ajuda:hover, .ajuda:focus-visible, .ajuda[aria-describedby] { opacity: 1; color: var(--ouro); outline: none; }
.ajuda i { pointer-events: none; }
@media (pointer: coarse) { .ajuda { padding: .15rem .35rem; margin: -.15rem 0; font-size: 1.05em; } }  /* alvo maior no celular */
.popover-ajuda { --bs-popover-max-width: 320px; --bs-popover-border-color: var(--borda); --bs-popover-header-bg: #f3f6fb;
  --bs-popover-header-color: var(--ibem); --bs-popover-body-padding-y: .65rem; font-size: .85rem;
  box-shadow: 0 10px 30px rgba(16,24,40,.15); border-radius: 10px; }
.popover-ajuda .popover-header { font-weight: 650; font-size: .85rem; }

/* ---------- Tabelas ---------- */
.tabela { margin: 0; }
.tabela > thead th { background: #f8fafc; color: var(--suave); font-weight: 600; font-size: .74rem; text-transform: uppercase;
  letter-spacing: .04em; border-bottom: 1px solid var(--borda); white-space: nowrap; padding: .7rem .75rem; }
.tabela > tbody td { padding: .65rem .75rem; vertical-align: middle; border-color: #eef1f5; }
.tabela > tbody tr:hover > td { background: #fafbfd; }
.tabela .num { font-variant-numeric: tabular-nums; text-align: center; }
.tabela-wrap { border-radius: var(--raio); overflow: hidden; }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
.vazio { padding: 3rem 1rem; text-align: center; color: var(--suave); }
.vazio i { font-size: 2.2rem; display: block; margin-bottom: .5rem; opacity: .5; }

/* ---------- Tabelas viram cartões no celular ---------- */
@media (max-width: 767.98px) {
  .tabela-cards > thead { display: none; }
  .tabela-cards, .tabela-cards > tbody, .tabela-cards > tbody > tr, .tabela-cards > tbody > tr > td { display: block; width: 100%; }
  .tabela-cards > tbody > tr { border-bottom: 1px solid var(--borda); padding: .65rem .9rem; position: relative; }
  .tabela-cards > tbody > tr > td { border: 0; padding: .18rem 0 !important; text-align: left !important; background: none !important; }
  .tabela-cards > tbody > tr > td[data-label] { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
  .tabela-cards > tbody > tr > td[data-label]::before { content: attr(data-label); color: var(--suave); font-size: .74rem;
    text-transform: uppercase; letter-spacing: .03em; flex-shrink: 0; }
  .tabela-cards > tbody > tr > td.cel-titulo { font-size: 1rem; padding-right: 2rem !important; }
  .tabela-cards > tbody > tr > td.cel-sel { position: absolute; right: .9rem; top: .65rem; width: auto; z-index: 1; }
  .tabela-cards > tbody > tr > td.cel-sel + td { padding-right: 2.2rem !important; }   /* espaço para a caixinha */
  .tabela-cards .freq-wrap { display: flex; align-items: center; gap: .6rem; }
  .tabela-cards .freq-wrap .freq-bar { width: 90px; margin: 0; }
  .tabela-cards > tbody > tr > td.cel-acoes { padding-top: .45rem !important; }
  .tabela-cards > tbody > tr > td.cel-acoes .btn { width: 100%; }
  .tabela-cards .freq-bar { min-width: 90px; }
  .tabela-cards .num { text-align: right; }
  .page-actions { width: 100%; }
  .page-actions > .btn, .page-actions > .btn-group { flex: 1 1 auto; }
}

/* ---------- Situação ---------- */
.sit { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 600; white-space: nowrap; }
.sit-ok { background: var(--ok-bg); color: var(--ok); }
.sit-erro { background: var(--erro-bg); color: var(--erro); }
.sit-pend { background: var(--pend-bg); color: var(--pend); }
.sit-motivo { font-size: .72rem; color: var(--suave); margin-top: 2px; }
.freq-bar { height: 5px; border-radius: 3px; background: #edf0f5; overflow: hidden; margin-top: 4px; min-width: 60px; }
.freq-bar > span { display: block; height: 100%; background: var(--ok); }
.freq-bar.baixa > span { background: var(--erro); }
.falta-campo { color: var(--pend); font-size: .78rem; }

/* ---------- Aulas (presença + nota) ---------- */
.aulas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.aula { border: 1px solid var(--borda); border-radius: 10px; padding: .55rem .6rem; background: #fff; transition: .15s; }
.aula label { display: flex; align-items: center; gap: .45rem; cursor: pointer; font-weight: 600; font-size: .85rem; margin: 0; }
.aula .form-check-input { margin: 0; width: 1.15em; height: 1.15em; }
.aula .nota-aula { margin-top: .45rem; display: none; }
.aula .nome-aula { font-size: .72rem; color: var(--suave); line-height: 1.25; margin-top: .2rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.legenda-aulas { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
.aula.presente { border-color: #9fd3bc; background: #f3fbf7; }
.aula.presente .nota-aula { display: block; }
.aula .nota-aula input { text-align: center; }
.aula.faltou-nota { border-color: var(--erro); background: #fff6f5; }
.resumo-aulas { display: flex; flex-wrap: wrap; gap: 1.25rem; padding: .75rem 1rem; background: #f8fafc; border-radius: 10px; border: 1px solid var(--borda); }
.resumo-aulas b { font-size: 1.1rem; }
.aula-mini { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; font-size: .7rem; font-weight: 700; margin: 1px; }
.aula-mini.p { background: var(--ok-bg); color: var(--ok); }
.aula-mini.f { background: var(--erro-bg); color: var(--erro); }
.aula-mini.n { background: #eef1f5; color: #98a2b3; }

/* Lançar aula (turma inteira) */
.lancar-linha.presente > td { background: #f3fbf7 !important; }
.lancar-linha .nota-turma { width: 90px; text-align: center; }

/* ---------- Certificados (editor) ---------- */
.cert-palco { background: #e9edf3; border-radius: 10px; padding: clamp(.5rem, 2vw, 1.25rem); }
.cert-folha { position: relative; width: 100%; aspect-ratio: 297 / 210; background: #fff center / 100% 100% no-repeat;
  box-shadow: 0 6px 22px rgba(16,24,40,.18); overflow: hidden; margin: 0 auto; max-height: 75vh; }
.cert-sem-imagem { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #98a2b3; font-size: .95rem; }
.cert-sem-imagem i { font-size: 2.5rem; }
.cert-caixa { position: absolute; transform: translateY(-50%); white-space: nowrap; overflow: visible; line-height: 1.25;
  outline: 1px dashed rgba(196,53,43,.75); outline-offset: 2px; user-select: none; touch-action: none; }
.cert-caixa.arrastavel { cursor: move; }
.cert-caixa.arrastavel:hover, .cert-caixa:focus { outline: 2px dashed var(--erro); background: rgba(255,255,255,.25); }

/* ---------- Telas públicas (login, cadastro, instalação) ---------- */
body.publico { background: var(--ibem); }
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  background: radial-gradient(1200px 600px at 10% -10%, #2a5b93 0%, transparent 60%), linear-gradient(135deg, #16304f 0%, #0e2238 100%); }
.auth-card { width: 100%; max-width: 440px; border: 0; border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.auth-logo { width: 56px; height: 56px; border-radius: 14px; background: var(--ouro); color: var(--ibem); display: grid;
  place-items: center; font-size: 1.7rem; margin: 0 auto .75rem; }

/* ---------- Diversos ---------- */
.alert { border-radius: 10px; border: 0; }
.badge { font-weight: 600; }
.dropdown-menu { border-radius: 10px; border-color: var(--borda); box-shadow: 0 10px 30px rgba(16,24,40,.12); }
.modal-content { border: 0; border-radius: 14px; }
.modal-header { border-bottom-color: var(--borda); }
.modal-footer { border-top-color: var(--borda); }
.cab-impressao { display: none; }
.grupo-regiao { background: var(--ibem); color: #fff; padding: .45rem .8rem; border-radius: 8px; margin-top: 1.1rem; font-size: .85rem; }
.grupo-cong { border-left: 4px solid var(--ouro); padding-left: .6rem; margin: .9rem 0 .5rem; font-weight: 650; }

/* ---------- Impressão ---------- */
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body, body.app { background: #fff; font-size: 11px; }
  body.app .main { margin: 0; }
  .no-print, .sidebar, .topbar, .btn, form.filtros, .rodape, .page-head { display: none !important; }
  .content { padding: 0; max-width: none; }
  .cab-impressao { display: block; text-align: center; margin-bottom: 8px; }
  .card { box-shadow: none; border: 0; }
  .grupo-regiao { background: #ddd !important; color: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sit { padding: 0; background: none !important; }
  .quebra-cong { page-break-inside: avoid; }
  .quebra-pagina { page-break-before: always; }
  .tabela > thead th { background: #eee !important; color: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .table td, .table th { padding: .15rem .3rem !important; }
  .aula-mini { width: 18px; height: 18px; font-size: 9px; }
}

/* ===================== Assistente (chat com IA) ===================== */
.assist-fab { position: fixed; right: 18px; bottom: 18px; z-index: 1050; border: 0; border-radius: 999px; background: var(--ibem); color: #fff;
  display: flex; align-items: center; gap: .45rem; padding: .7rem 1.05rem .7rem .9rem; box-shadow: 0 6px 22px rgba(16,36,60,.32); font-weight: 600; }
.assist-fab i { font-size: 1.3rem; line-height: 1; }
.assist-fab:hover { background: var(--ibem-2); }
.assist-fab.aberto .assist-fab-txt { display: none; }
.assist-fab.aberto { padding: .7rem .85rem; }
.assist-fab.pulsar { animation: assistPulso 1.6s ease-in-out 4; }
@keyframes assistPulso { 50% { box-shadow: 0 0 0 10px rgba(201,162,39,.35), 0 6px 22px rgba(16,36,60,.32); } }
.assist-badge { position: absolute; top: -4px; right: -2px; background: #dc3545; color: #fff; border-radius: 999px; font-size: .7rem; min-width: 20px; height: 20px;
  display: grid; place-items: center; padding: 0 5px; border: 2px solid #fff; }
.assist-painel { position: fixed; right: 18px; bottom: 82px; z-index: 1050; width: 390px; max-width: calc(100vw - 24px); height: min(620px, calc(100vh - 110px));
  background: #fff; border-radius: 16px; box-shadow: 0 14px 48px rgba(16,36,60,.28); display: flex; flex-direction: column; overflow: hidden; }
.assist-painel[hidden] { display: none; }
.assist-topo { background: linear-gradient(135deg, var(--ibem) 0%, var(--ibem-2) 100%); color: #fff; padding: .75rem .8rem; display: flex; align-items: center; gap: .6rem; }
.assist-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--ouro, #c9a227); color: var(--ibem); display: grid; place-items: center; font-size: 1.15rem; flex: none; }
.assist-nome { font-weight: 700; line-height: 1.15; }
.assist-sub { font-size: .75rem; opacity: .8; }
.assist-btn-topo { margin-left: auto; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 32px; height: 32px; border-radius: 8px; flex: none; }
.assist-btn-topo + .assist-btn-topo { margin-left: .3rem; }
.assist-btn-topo:hover { background: rgba(255,255,255,.25); }
.assist-faixa { background: #fff6dd; color: #6b5200; font-size: .8rem; padding: .45rem .8rem; border-bottom: 1px solid #f1e2b0; }
.assist-msgs { flex: 1; overflow-y: auto; padding: .9rem .8rem; background: #f4f6fa; display: flex; flex-direction: column; gap: .55rem; }
.assist-msg { max-width: 86%; padding: .55rem .75rem; border-radius: 14px; font-size: .9rem; line-height: 1.4; word-wrap: break-word; overflow-wrap: anywhere; }
.assist-msg.bot, .assist-msg.erro { background: #fff; border: 1px solid #e3e8f0; border-top-left-radius: 4px; align-self: flex-start; }
.assist-msg.erro { border-color: #f5c2c7; background: #fff5f5; color: #842029; }
.assist-msg.suporte { background: #e9f7ef; border: 1px solid #bfe5cf; border-top-left-radius: 4px; align-self: flex-start; }
.assist-msg.eu { background: var(--ibem); color: #fff; border-top-right-radius: 4px; align-self: flex-end; }
.assist-msg.eu a { color: #fff; }
.assist-quem { font-size: .72rem; font-weight: 700; color: #1e7a46; margin-bottom: .15rem; }
.assist-meta { font-size: .68rem; opacity: .6; margin-top: .2rem; display: flex; gap: .5rem; align-items: center; justify-content: flex-end; }
.assist-aval button { border: 0; background: none; padding: 0 .15rem; font-size: .9rem; opacity: .75; filter: grayscale(.4); }
.assist-aval button:hover { opacity: 1; filter: none; transform: scale(1.15); }
.assist-aval.feito { font-size: .7rem; }
.assist-sis { align-self: center; font-size: .72rem; color: #6c757d; background: #e8ecf3; border-radius: 999px; padding: .15rem .7rem; }
.assist-oferta { align-self: flex-start; }
.assist-digitando { display: flex; gap: 4px; padding: .7rem .8rem; }
.assist-digitando span { width: 7px; height: 7px; border-radius: 50%; background: #9aa7b8; animation: assistPonto 1s infinite; }
.assist-digitando span:nth-child(2) { animation-delay: .15s; } .assist-digitando span:nth-child(3) { animation-delay: .3s; }
@keyframes assistPonto { 50% { transform: translateY(-4px); opacity: .5; } }
.assist-chips { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0 .8rem; background: #f4f6fa; }
.assist-chips:not(:empty) { padding-bottom: .6rem; }
.assist-chips button { border: 1px solid #c9d5e6; background: #fff; color: var(--ibem-2); border-radius: 999px; font-size: .78rem; padding: .25rem .65rem; }
.assist-chips button:hover { background: #e8eef7; }
.assist-form { display: flex; gap: .4rem; padding: .55rem .6rem; border-top: 1px solid #e3e8f0; align-items: flex-end; }
.assist-form textarea { flex: 1; resize: none; border: 1px solid #d5dce6; border-radius: 12px; padding: .5rem .7rem; font-size: .92rem; max-height: 120px; outline: none; }
.assist-form textarea:focus { border-color: var(--ibem-2); }
.assist-enviar { border: 0; background: var(--ibem); color: #fff; width: 40px; height: 40px; border-radius: 50%; flex: none; }
.assist-enviar:disabled { opacity: .5; }
.assist-rodape { text-align: center; padding: 0 0 .45rem; }
.assist-link { border: 0; background: none; color: #6c757d; font-size: .76rem; }
.assist-link:hover { color: var(--ibem-2); text-decoration: underline; }
@media (max-width: 575.98px) {
  .assist-fab { right: 12px; bottom: 12px; padding: .65rem .8rem; }
  .assist-fab .assist-fab-txt { display: none; }
  .assist-painel { inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; border-radius: 0; }
  body.assist-on .assist-fab { display: none; }
  body.assist-on { overflow: hidden; }
}
@media print { .assist-fab, .assist-painel { display: none !important; } }
.conversa-admin { max-height: 520px; overflow-y: auto; display: flex; flex-direction: column; gap: .55rem; background: #f4f6fa; border-radius: 10px; padding: .8rem; }
.conversa-admin .assist-msg { max-width: 90%; }
@media (max-width: 575.98px) { body.app .content { padding-bottom: 76px; } }
.consulta-num { font-size: 1.6rem; font-weight: 700; color: var(--ibem); line-height: 1.1; }
.aviso-sessao { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 2000; background: #fff; border: 1px solid #f1d58a; border-left: 5px solid var(--ouro, #c9a227);
  box-shadow: 0 10px 30px rgba(16,36,60,.25); border-radius: 12px; padding: .75rem 1rem; display: flex; gap: .75rem; align-items: center; max-width: calc(100vw - 24px); }
.aviso-sessao > i { font-size: 1.5rem; color: var(--ouro, #c9a227); }

/* ===================== Página inicial pública ===================== */
body.publico { background: #fff; }
.btn-ouro { background: var(--ouro); border-color: var(--ouro); color: var(--ibem); font-weight: 600; }
.btn-ouro:hover, .btn-ouro:focus { background: #d8b45c; border-color: #d8b45c; color: var(--ibem); }
.site-nav { position: sticky; top: 0; z-index: 1030; background: rgba(14,34,56,.96); backdrop-filter: blur(6px); padding: .6rem 0; }
.site-nav a:not(.btn) { color: #dfe7f2; text-decoration: none; font-size: .95rem; }
.site-nav a:not(.btn):hover { color: #fff; }
.site-marca { display: flex; align-items: center; gap: .6rem; color: #fff !important; font-weight: 700; font-size: 1.15rem; }
.site-marca .auth-logo { width: 38px; height: 38px; font-size: 1.15rem; border-radius: 10px; }
.site-hero { position: relative; color: #fff; padding: clamp(3rem, 8vw, 6rem) 0;
  background: linear-gradient(120deg, rgba(14,34,56,.94) 0%, rgba(22,48,79,.86) 55%, rgba(31,74,122,.7) 100%), var(--capa, none) center/cover no-repeat,
              radial-gradient(1200px 600px at 10% -10%, #2a5b93 0%, transparent 60%), #16304f; }
.site-titulo { color: #fff; font-size: clamp(1.9rem, 4.2vw, 3.1rem); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; }
.site-sub { font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: #d6e1ee; max-width: 38rem; margin-top: 1rem; }
.site-hero .auth-card { max-width: none; }
.site-secao { padding: 3.5rem 0; }
.site-secao h2 { font-weight: 800; color: var(--ibem); margin-bottom: 1rem; }
.site-destaque { background: #fff; border: 1px solid var(--borda); border-radius: 14px; padding: 1.4rem; box-shadow: 0 6px 20px rgba(16,36,60,.06); }
.site-destaque i { font-size: 1.6rem; color: var(--ibem); background: #fbf4e2; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; margin-bottom: .8rem; }
.site-destaque h3 { font-size: 1.08rem; font-weight: 700; color: var(--ibem); }
.site-destaque p { color: var(--suave); margin: 0; font-size: .95rem; }
.site-texto { font-size: 1.05rem; line-height: 1.7; color: var(--texto); }
.site-texto ul { padding-left: 1.2rem; }
.site-card { background: var(--fundo); border-radius: 14px; padding: 1.2rem 1.3rem; border: 1px solid var(--borda); }
.site-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--ibem); }
.site-card .site-texto { font-size: .98rem; }
.site-contato { background: var(--fundo); }
.site-contato .site-card { background: #fff; height: 100%; }
a.site-card:hover { border-color: var(--ibem-2); }
.site-rodape { background: #0e2238; color: #b8c6d8; padding: 1.4rem 0; font-size: .9rem; }
.site-rodape a { color: #dfe7f2; }
.todas-aulas { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; background: #fbf4e2; border: 1px dashed #e2c77a; border-radius: 10px; padding: .55rem .8rem; }
.credito-publico { text-align: center; font-size: .8rem; color: rgba(255,255,255,.75); padding: .8rem 0 1rem; }
body.publico .credito-publico, .site-secao + .credito-publico { color: var(--suave); }
main:has(> .auth-wrap) + .credito-publico, .auth-wrap ~ .credito-publico { position: relative; margin-top: -2.8rem; height: 2.8rem; padding: 0; line-height: 2.8rem; color: rgba(255,255,255,.72); }

/* v2.12 — abas (Transferências) */
.abas-ibem .nav-link { color: var(--ibem); border-radius: 10px; }
.abas-ibem .nav-link.active { background: var(--ibem); color: #fff; }
.abas-ibem .nav-link:not(.active):hover { background: rgba(22, 48, 79, .07); }

/* v2.13 — avatar: foto do usuário ou ícone IBEM */
img.avatar { object-fit: cover; flex: none; background: #16304f; padding: 0; display: block; }
img.avatar-foto { box-shadow: 0 0 0 2px rgba(255, 199, 44, .85); }
img.avatar.avatar-grande { width: 96px; height: 96px; }
.tabela img.avatar { width: 34px; height: 34px; }

/* v2.13.2 — logo IBEM no menu, no login e no site */
.com-logo { background: transparent !important; padding: 0; overflow: hidden; }
.com-logo .logo-ibem { width: 100%; height: 100%; display: block; }

/* v2.14 — Unção do Ano */
.uncao-sexo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; }
.uncao-sexo-M { background: #e7eef8; color: #1d4f91; }
.uncao-sexo-F { background: #fbe9f1; color: #a3306a; }
.chip-uncao { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; border: 1px solid #dde3ea;
  background: #f7f9fb; color: var(--ibem); text-decoration: none; font-size: .85rem; }
.chip-uncao b { background: var(--ibem); color: #fff; border-radius: 999px; padding: 0 .45rem; font-size: .78rem; }
.chip-uncao:hover, .chip-uncao.ativo { border-color: var(--ouro); background: #fff7e0; }
.badge-uncao { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .55rem; border-radius: 6px; font-size: .8rem; font-weight: 600;
  background: #fff4d6; color: #7a5a00; border: 1px solid #f2d68a; white-space: nowrap; }
.caixa-uncao { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border: 1px solid #dde3ea; border-radius: 10px;
  cursor: pointer; background: #fff; width: 100%; margin: 0; }
.caixa-uncao .form-check-input { width: 1.35em; height: 1.35em; margin: 0; flex: none; }
.caixa-uncao:has(input:checked) { border-color: var(--ouro); background: #fff7e0; font-weight: 600; }
.lista-uncoes.apagado { opacity: .5; }
.escolha-sexo .btn { min-width: 130px; }
.dados-aluno dt { font-size: .75rem; text-transform: uppercase; color: #6c7a89; font-weight: 600; margin-top: .55rem; }
.dados-aluno dd { margin: 0; }
.titulo-sexo { font-size: 1.05rem; font-weight: 700; margin: 1.2rem 0 .4rem; padding: .35rem .6rem; border-radius: 8px; }
.secao-M .titulo-sexo { background: #e7eef8; color: #1d4f91; }
.secao-F .titulo-sexo { background: #fbe9f1; color: #a3306a; }
.titulo-sexo span { font-weight: 400; font-size: .9rem; }
.quadro-uncao th.grupo-M { background: #e7eef8 !important; }
.quadro-uncao th.grupo-F { background: #fbe9f1 !important; }
@media print { .titulo-sexo { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.escolha-sexo .btn-check:checked + .btn-outline-ibem { background: var(--ibem); border-color: var(--ibem); color: #fff; }
.caixa-uncao .form-check-input:checked { background-color: var(--ibem); border-color: var(--ibem); }
.quadro-uncao { font-size: .85rem; }
.quadro-uncao th { text-transform: none !important; letter-spacing: 0 !important; font-size: .74rem !important; padding: .35rem .3rem !important; white-space: normal; text-align: center; }
.quadro-uncao td { padding: .35rem .4rem !important; }
.quadro-uncao th:first-child, .quadro-uncao td:first-child { text-align: left; }
@media print { .quadro-uncao { font-size: 9pt; } .quadro-uncao th { font-size: 7.5pt !important; } }

/* v2.15.2 — filtro: região fixa de professor/secretário */
.campo-fixo { display: flex; align-items: center; gap: .4rem; min-height: 31px; padding: .25rem .6rem; font-size: .875rem;
  border: 1px solid var(--borda); border-radius: .375rem; background: #f1f4f8; color: var(--texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.campo-fixo i { color: #8a97a6; font-size: .8rem; }
.campo-fixo.campo-fixo-lg { min-height: 38px; font-size: 1rem; padding: .375rem .75rem; }

/* v2.15.4 — campo de escolha com busca (Região / Igreja) */
.busca-select { position: relative; }
.busca-select-original { position: absolute !important; opacity: 0 !important; pointer-events: none; width: 1px !important; height: 1px !important; min-height: 0 !important; left: 0; bottom: 0; padding: 0 !important; border: 0 !important; background: none !important; overflow: hidden; }
.busca-select-campo { padding-right: 2rem; text-overflow: ellipsis; }
.busca-select-campo:disabled { background: #e9ecef; }
.busca-select-seta { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); font-size: .75rem; color: #5b6b7c; cursor: pointer; }
.busca-select.aberto .busca-select-seta { transform: translateY(-50%) rotate(180deg); }
.busca-select.desabilitado .busca-select-seta { opacity: .4; pointer-events: none; }
.busca-select-lista { position: absolute; z-index: 1060; left: 0; right: 0; top: calc(100% + 2px); max-height: 280px; overflow-y: auto;
  margin: 0; padding: .25rem 0; list-style: none; background: #fff; border: 1px solid var(--borda); border-radius: .5rem;
  box-shadow: 0 8px 24px rgba(16, 36, 60, .15); min-width: 220px; }
.busca-select-lista li { padding: .45rem .75rem; cursor: pointer; font-size: .9rem; }
.busca-select-lista li:hover, .busca-select-lista li.ativo { background: #fff4d6; }
.busca-select-lista li.escolhido { font-weight: 600; color: var(--ibem); }
.busca-select-lista li.busca-select-vazio { color: #6c7a89; font-style: italic; }
.busca-select-lista li.busca-select-nada { color: #6c7a89; cursor: default; background: none; }

/* v2.16 — menu compacto com grupos (submenus) */
.nav-grupo > summary { list-style: none; cursor: pointer; user-select: none; }
.nav-grupo > summary::-webkit-details-marker { display: none; }
.nav-grupo > summary::marker { content: ''; }
.nav-grupo .nav-seta { font-size: .75rem; opacity: .6; transition: transform .2s; margin-left: .35rem; }
.nav-grupo[open] > summary .nav-seta { transform: rotate(180deg); }
.nav-grupo[open] > summary .badge-grupo { display: none; }
.nav-grupo.tem-ativo > summary { color: #fff; }
.nav-sub { margin: 2px 0 6px 1.35rem; padding-left: .45rem; border-left: 1px solid rgba(255,255,255,.14); display: flex; flex-direction: column; gap: 1px; }
.sidebar .nav-sub .nav-link { padding: .42rem .65rem; font-size: .86rem; }
.sidebar .nav-sub .nav-link i { font-size: .95rem; }
.sidebar .nav-sub .nav-link.active { box-shadow: inset 2px 0 0 var(--ouro); }
@media (max-width: 991.98px) {
  .sidebar .nav-sub .nav-link { padding: .62rem .75rem; font-size: .95rem; }
}

/* barra de atalhos no celular */
.barra-celular { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035; display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff; border-top: 1px solid var(--borda); box-shadow: 0 -4px 16px rgba(16, 36, 60, .08);
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
.barra-celular a, .barra-celular button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 54px; border: 0; background: none; color: #5b6b7c; text-decoration: none; font-size: .68rem; font-weight: 500; border-radius: 10px; }
.barra-celular i { font-size: 1.3rem; line-height: 1; }
.barra-celular .ativo { color: var(--ibem); font-weight: 700; }
.barra-celular .ativo::before { content: ''; position: absolute; top: -4px; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--ouro); }
.barra-celular a:active, .barra-celular button:active { background: #f1f4f8; }
.barra-badge { position: absolute; top: 4px; right: calc(50% - 20px); background: #dc3545; color: #fff; border-radius: 999px; font-size: .62rem;
  min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; }
@media (max-width: 991.98px) {
  body.app .main { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  body.app .assist-fab { bottom: calc(74px + env(safe-area-inset-bottom)); }
  .content .btn, .content .form-control, .content .form-select { min-height: 40px; }
  .content .btn-sm, .content .form-control-sm, .content .form-select-sm { min-height: 36px; }
}
@media (min-width: 576px) and (max-width: 991.98px) {
  body.app .assist-painel { bottom: calc(134px + env(safe-area-inset-bottom)); height: min(620px, calc(100vh - 200px)); }
}
@media print { .barra-celular { display: none !important; } }
/* celular: filtros recolhidos */
.btn-filtros-celular { display: flex; align-items: center; gap: .45rem; width: 100%; border: 0; background: none; padding: .15rem 0;
  font-weight: 600; color: var(--ibem); font-size: .95rem; }
.btn-filtros-celular b { background: var(--ouro); color: var(--ibem); border-radius: 999px; padding: 0 .45rem; font-size: .75rem; }
.btn-filtros-celular .bi-chevron-down { transition: transform .2s; }
form.filtros:not(.recolhido) .btn-filtros-celular { margin-bottom: .6rem; }
form.filtros:not(.recolhido) .btn-filtros-celular .bi-chevron-down { transform: rotate(180deg); }
form.filtros.recolhido > .row, form.filtros.recolhido > :not(.btn-filtros-celular):not(input[type=hidden]) { display: none !important; }
.maiusculas { text-transform: uppercase; }

/* v2.17 — painel "O que falta fazer" */
.pend-item { display: flex; align-items: center; gap: .75rem; padding: .55rem 0; border-top: 1px solid #eef1f5; }
.pend-item:first-of-type { border-top: 0; }
.pend-icone { width: 34px; height: 34px; border-radius: 10px; background: #fff4d6; color: #8a6a1c; display: grid; place-items: center; flex: none; }
.pend-qtd { font-size: 1.05rem; color: var(--ibem); }
@media (max-width: 575.98px) { .pend-item { flex-wrap: wrap; } .pend-item .btn { margin-left: calc(34px + .75rem); } }
.banner-app:not([hidden]) { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: .5rem .85rem; }
.banner-app .btn-instalar { grid-column: 2; justify-self: start; }
.banner-app .fechar-instalar { grid-row: 1; grid-column: 3; align-self: start; }
@media (min-width: 576px) { .banner-app .btn-instalar { grid-column: 3; grid-row: 1; } .banner-app .fechar-instalar { grid-column: 4; } .banner-app:not([hidden]) { grid-template-columns: 44px 1fr auto auto; } }
.assinatura-previa { height: 46px; display: flex; align-items: center; } .assinatura-previa img { max-height: 46px; max-width: 100%; object-fit: contain; }

/* v2.19 — página "Instalar o app" */
.qr-app { width: 190px; height: 190px; padding: 6px; background: #fff; border: 1px solid var(--borda); border-radius: 12px; }
.qr-app svg { width: 100%; height: 100%; display: block; }
.app-nav { padding: .4rem .6rem; border-radius: 8px; }
.app-nav-atual { background: #fff4d6; }

/* v2.22 — busca rápida no menu */
.busca-rapida { position: relative; margin: 0 .75rem .4rem; flex-shrink: 0; }
.busca-rapida > .bi-search { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,.55); font-size: .9rem; pointer-events: none; }
.busca-rapida input { width: 100%; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); color: #fff;
  border-radius: 9px; padding: .5rem 2rem .5rem 2.1rem; font-size: .88rem; outline: none; }
.busca-rapida input::placeholder { color: rgba(255,255,255,.55); }
.busca-rapida input:focus { background: #fff; color: #1d2a3a; border-color: var(--ouro); }
.busca-rapida input:focus::placeholder { color: #8a94a3; }
.busca-rapida input:focus ~ kbd { display: none !important; }
.busca-rapida kbd { position: absolute; right: .55rem; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.14); color: rgba(255,255,255,.7);
  font-size: .7rem; padding: .05rem .35rem; border-radius: 4px; box-shadow: none; }
.busca-rapida input::-webkit-search-cancel-button { filter: grayscale(1); }
.busca-res { position: absolute; left: 0; top: calc(100% + 4px); width: min(420px, calc(100vw - 2rem)); max-height: 70vh; overflow-y: auto; z-index: 1100;
  background: #fff; border-radius: 10px; box-shadow: 0 12px 32px rgba(16,36,60,.28); padding: .3rem; }
.busca-item { display: grid; grid-template-columns: 1fr auto; gap: 0 .5rem; padding: .5rem .6rem; border-radius: 7px; color: #1d2a3a; text-decoration: none; }
.busca-item b { font-size: .88rem; font-weight: 600; }
.busca-item span { grid-column: 1; font-size: .74rem; color: #6b7685; }
.busca-item .sit { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; }
.busca-item:hover, .busca-item.ativo { background: #eef3fa; color: #1d2a3a; }
.busca-todos { display: block; text-align: center; font-size: .82rem; color: var(--ibem); border-top: 1px solid #eef0f3; border-radius: 0 0 7px 7px; margin-top: .2rem; }
.busca-vazio { padding: .8rem; font-size: .85rem; color: #6b7685; text-align: center; }
.topbar a.btn-menu { display: grid; place-items: center; text-decoration: none; }
@media print { .busca-rapida { display: none !important; } }
.print-only { display: none; }
@media print { th.print-only, td.print-only { display: table-cell !important; border-bottom: 1px solid #999; } }

/* v2.23 — cadastro em lista */
.colar-box textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.grade-lote td { padding: .3rem .4rem; vertical-align: middle; }
.grade-lote th { white-space: nowrap; }
.grade-lote .col-cong { width: 200px; }
.grade-lote tr.com-erro td { background: #fff4f4; }
.grade-lote tr.linha-erro td { background: #fff4f4; color: #b42318; font-size: .8rem; padding-top: 0; border-top: 0; }
.grade-lote .form-control-sm, .grade-lote .form-select-sm { min-height: 34px; }
@media (max-width: 767.98px) {
  .grade-lote thead { display: none; }
  .grade-lote, .grade-lote tbody { display: block; }
  .grade-lote tr:not(.linha-erro) { display: grid; grid-template-columns: 28px 1fr 1fr 28px; gap: .35rem; padding: .6rem .5rem; border-bottom: 1px solid var(--borda); }
  .grade-lote tr:not(.linha-erro) td { padding: 0; border: 0; }
  .grade-lote tr:not(.linha-erro) td:nth-child(1) { grid-column: 1; grid-row: 1 / 5; padding-top: .5rem !important; }
  .grade-lote tr:not(.linha-erro) td:nth-child(2) { grid-column: 2 / 4; grid-row: 1; width: auto; }
  .grade-lote tr:not(.linha-erro) td:nth-child(3) { grid-column: 2; grid-row: 2; }
  .grade-lote tr:not(.linha-erro) td:nth-child(4) { grid-column: 2 / 4; grid-row: 3; }
  .grade-lote tr:not(.linha-erro) td:nth-child(5) { grid-column: 3; grid-row: 2; }
  .grade-lote tr:not(.linha-erro) td:nth-child(6):not(:last-child) { grid-column: 2; grid-row: 4; }
  .grade-lote tr:not(.linha-erro) td:nth-child(7):not(:last-child) { grid-column: 3; grid-row: 4; }
  .grade-lote tr:not(.linha-erro) td:last-child { grid-column: 4; grid-row: 1; }
  .grade-lote tr.linha-erro { display: block; } .grade-lote tr.linha-erro td { display: block; padding: .3rem .6rem; }
  .grade-lote input::placeholder { color: #9aa3ae; }
  .barra-lote #salvar-lote { width: 100%; }
}

/* v2.23 — ficha do aluno: resumo + abas */
.resumo-ficha { display: flex; flex-direction: row; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between; padding: .9rem 1.2rem; }
.rf-nome { display: flex; gap: .75rem; align-items: center; min-width: 0; }
.rf-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--ibem); color: var(--ouro); display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; flex-shrink: 0; }
.rf-dados { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.rf-dados > div { display: flex; flex-direction: column; font-size: .95rem; }
.rf-dados > div > span:first-child { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7685; }
.rf-dados .sit-motivo { display: none; }
.abas-ficha { border-bottom: 2px solid var(--borda); gap: .25rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.abas-ficha .nav-link { border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; color: #5b6573; font-weight: 600; display: flex; gap: .4rem; align-items: center; white-space: nowrap; background: none; padding: .6rem .9rem; }
.abas-ficha .nav-link.active { color: var(--ibem); border-bottom-color: var(--ouro); background: none; }
.abas-ficha .nav-link:hover { color: var(--ibem); }
@media (max-width: 575.98px) {
  .abas-ficha .nav-link { padding: .55rem .6rem; font-size: .9rem; }
  .resumo-ficha { padding: .75rem .9rem; }
  .rf-dados { width: 100%; justify-content: space-between; gap: .4rem .8rem; }
}
/* botão "Ajuda" flutuante não tapa o fim da página (ex.: Excluir) */
main.content { padding-bottom: 5.5rem; }

/* v2.23 — selo colorido da região */
.selo-reg { --c: #1f6fb2; display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  color: var(--c); background: color-mix(in srgb, var(--c) 11%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  border-radius: 999px; padding: .08rem .5rem; white-space: nowrap; line-height: 1.5; vertical-align: middle; }
.selo-reg::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--c); }
[data-aba][hidden] { display: none !important; }

/* v2.23 — gráficos do painel */
.legenda-sit { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-size: .88rem; }
.legenda-sit > span { display: inline-flex; gap: .35rem; align-items: center; }
.barra-sit { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; background: #edf0f5; }
.barra-sit > span { display: block; height: 100%; min-width: 3px; transition: opacity .15s; }
.barra-sit > span:hover { opacity: .8; }
.linhas-graf { display: flex; flex-direction: column; gap: .35rem; }
.linha-graf { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 64px; gap: .6rem; align-items: center; font-size: .84rem; color: inherit; text-decoration: none; padding: .15rem .25rem; border-radius: 6px; }
a.linha-graf:hover { background: #f2f5fa; }
.linha-graf .barra-sit { height: 10px; }
.lg-nome { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.barra-prog { height: 10px; border-radius: 4px; background: #edf0f5; overflow: hidden; }
.barra-prog > span { display: block; height: 100%; background: #2f6fb3; border-radius: 0 4px 4px 0; }
.rolagem-graf { max-height: 320px; overflow-y: auto; padding-right: .25rem; }
@media (max-width: 575.98px) { .linha-graf { grid-template-columns: 1fr 52px; } .linha-graf > .barra-sit, .linha-graf > .barra-prog { grid-column: 1 / -1; grid-row: 2; } }
/* faixa colorida da situação na lista de alunos */
.linha-sit > td:first-child { box-shadow: inset 4px 0 0 var(--sit-cor, transparent); }
.linha-sit-ok { --sit-cor: var(--g-ok); } .linha-sit-erro { --sit-cor: var(--g-erro); } .linha-sit-pend { --sit-cor: var(--g-pend); }
@media (max-width: 767.98px) { .tabela-cards tr.linha-sit { border-left: 4px solid var(--sit-cor) !important; } .tabela-cards tr.linha-sit > td:first-child { box-shadow: none; } }

/* ==========================================================
   v2.23 — MODO ESCURO  (html[data-bs-theme=dark])
   ========================================================== */
[data-bs-theme=dark] {
  --fundo: #0e1622; --texto: #e5eaf1; --suave: #9aa6b6; --borda: #263447;
  --superficie: #152131; --superficie-2: #1b293b;
  --ok: #4cc59a; --ok-bg: #133628; --erro: #f2867d; --erro-bg: #3b1d1d; --pend: #e8bd55; --pend-bg: #3a2e12;
  --g-ok: #2a9d72; --g-pend: #bd8a1c; --g-erro: #cf3f45;
  --ibem-2: #8db8ea;
  --bs-body-bg: #0e1622; --bs-body-color: #e5eaf1; --bs-secondary-color: #9aa6b6; --bs-tertiary-bg: #1b293b;
  --bs-border-color: #263447; --bs-card-bg: #152131; --bs-link-color: #8db8ea; --bs-link-color-rgb: 141, 184, 234;
  --bs-link-hover-color: #b5d1f3; --bs-emphasis-color: #fff; color-scheme: dark;
}
[data-bs-theme=dark] body, [data-bs-theme=dark] body.app { background: var(--fundo) !important; color: var(--texto); }
[data-bs-theme=dark] .card, [data-bs-theme=dark] .filtros, [data-bs-theme=dark] .kpi { background: var(--superficie); border-color: var(--borda); color: var(--texto); }
[data-bs-theme=dark] .text-muted, [data-bs-theme=dark] .kpi-sub, [data-bs-theme=dark] .form-text { color: var(--suave) !important; }
[data-bs-theme=dark] .text-body { color: var(--texto) !important; }
[data-bs-theme=dark] .tabela > thead th, [data-bs-theme=dark] .resumo-aulas, [data-bs-theme=dark] .campo-fixo,
[data-bs-theme=dark] .assist-msgs, [data-bs-theme=dark] .assist-chips, [data-bs-theme=dark] .conversa-admin, [data-bs-theme=dark] .chip-uncao { background: var(--superficie-2) !important; color: var(--texto); }
[data-bs-theme=dark] .table { --bs-table-bg: transparent; --bs-table-color: var(--texto); --bs-table-border-color: var(--borda); --bs-table-hover-bg: #1d2c40; --bs-table-striped-bg: #18263a; }
[data-bs-theme=dark] .tabela > tbody tr:hover > td, [data-bs-theme=dark] a.linha-graf:hover { background: #1d2c40; }
[data-bs-theme=dark] .btn-outline-ibem { background: transparent; color: #cfe0f5; border-color: #3a5574; }
[data-bs-theme=dark] .btn-outline-ibem:hover { background: #22364f; color: #fff; }
[data-bs-theme=dark] .btn-ibem { background: #2f6fb3; border-color: #2f6fb3; }
[data-bs-theme=dark] .btn-ibem:hover { background: #3a80c8; border-color: #3a80c8; }
[data-bs-theme=dark] .text-ibem, [data-bs-theme=dark] h1, [data-bs-theme=dark] h2, [data-bs-theme=dark] h3, [data-bs-theme=dark] h4, [data-bs-theme=dark] h5, [data-bs-theme=dark] .page-title { color: var(--texto); }
[data-bs-theme=dark] .freq-bar, [data-bs-theme=dark] .barra-sit, [data-bs-theme=dark] .barra-prog, [data-bs-theme=dark] .aula-mini.n { background: #24344a; }
[data-bs-theme=dark] .barra-prog > span { background: #5b9bdc; }
[data-bs-theme=dark] .aula, [data-bs-theme=dark] .caixa-uncao, [data-bs-theme=dark] .assist-painel, [data-bs-theme=dark] .assist-msg.bot,
[data-bs-theme=dark] .assist-chips button, [data-bs-theme=dark] .aviso-sessao, [data-bs-theme=dark] .busca-select-lista, [data-bs-theme=dark] .barra-celular,
[data-bs-theme=dark] .busca-res { background: var(--superficie) !important; color: var(--texto); border-color: var(--borda); }
[data-bs-theme=dark] .aula.presente, [data-bs-theme=dark] .lancar-linha.presente > td { background: #14301f !important; }
[data-bs-theme=dark] .aula.faltou-nota, [data-bs-theme=dark] .grade-lote tr.com-erro td, [data-bs-theme=dark] .grade-lote tr.linha-erro td, [data-bs-theme=dark] .assist-msg.erro { background: #3a1d1d !important; }
[data-bs-theme=dark] .grade-lote tr.linha-erro td { color: #f2867d; }
[data-bs-theme=dark] .todas-aulas, [data-bs-theme=dark] .assist-faixa, [data-bs-theme=dark] .pend-icone, [data-bs-theme=dark] .badge-uncao,
[data-bs-theme=dark] .chip-uncao:hover, [data-bs-theme=dark] .chip-uncao.ativo, [data-bs-theme=dark] .caixa-uncao:has(input:checked),
[data-bs-theme=dark] .busca-select-lista li:hover, [data-bs-theme=dark] .busca-select-lista li.ativo, [data-bs-theme=dark] .app-nav-atual { background: #3a2e12 !important; color: var(--texto); }
[data-bs-theme=dark] .uncao-sexo-M, [data-bs-theme=dark] .secao-M .titulo-sexo, [data-bs-theme=dark] .quadro-uncao th.grupo-M, [data-bs-theme=dark] .kpi-icon.azul { background: #1c2f4a !important; color: #a9c8ee; }
[data-bs-theme=dark] .uncao-sexo-F, [data-bs-theme=dark] .secao-F .titulo-sexo, [data-bs-theme=dark] .quadro-uncao th.grupo-F { background: #3a1f30 !important; color: #f0b3cf; }
[data-bs-theme=dark] .assist-msg.suporte { background: #14301f; }
[data-bs-theme=dark] .assist-sis { background: #24344a; }
[data-bs-theme=dark] .busca-item, [data-bs-theme=dark] .busca-item:hover, [data-bs-theme=dark] .busca-item.ativo { color: var(--texto); }
[data-bs-theme=dark] .busca-item:hover, [data-bs-theme=dark] .busca-item.ativo { background: #1d2c40; }
[data-bs-theme=dark] .busca-item span { color: var(--suave); }
[data-bs-theme=dark] .busca-rapida input:focus { background: var(--superficie); color: var(--texto); }
[data-bs-theme=dark] .abas-ficha .nav-link { color: var(--suave); }
[data-bs-theme=dark] .abas-ficha .nav-link.active, [data-bs-theme=dark] .abas-ficha .nav-link:hover { color: var(--texto); }
[data-bs-theme=dark] .nav-tabs .nav-link.active { background: var(--superficie); color: var(--texto); border-color: var(--borda) var(--borda) var(--superficie); }
[data-bs-theme=dark] .rf-avatar { background: #22364f; }
[data-bs-theme=dark] .selo-reg { color: color-mix(in srgb, var(--c) 45%, #fff); background: color-mix(in srgb, var(--c) 22%, transparent); }
[data-bs-theme=dark] .topbar { background: #0b1520; }
[data-bs-theme=dark] .sidebar { background: linear-gradient(180deg, #0f2238 0%, #0a1726 100%); }
[data-bs-theme=dark] .barra-celular a, [data-bs-theme=dark] .barra-celular button { color: var(--suave); }
[data-bs-theme=dark] .barra-celular a.ativo { color: var(--texto); }
[data-bs-theme=dark] .alert-secondary { --bs-alert-bg: #1b293b; --bs-alert-color: var(--texto); --bs-alert-border-color: var(--borda); }
[data-bs-theme=dark] .vazio { color: var(--suave); }
[data-bs-theme=dark] .site-destaque, [data-bs-theme=dark] .site-contato .site-card { background: var(--superficie); }
[data-bs-theme=dark] kbd { background: #24344a; color: var(--texto); }
/* impressão e certificados sempre claros */
@media print { [data-bs-theme=dark] body, [data-bs-theme=dark] .card { background: #fff !important; color: #000 !important; } }
.tema-escolha .dropdown-item.ativo::after { content: "✓"; float: right; color: var(--ouro); }
[data-bs-theme=dark] .tabela > :not(caption) > * > *, [data-bs-theme=dark] .table > :not(caption) > * > *, [data-bs-theme=dark] .border-top, [data-bs-theme=dark] .border-bottom, [data-bs-theme=dark] .border { border-color: var(--borda) !important; }
.btn-tema-lateral { width: 34px; height: 34px; border-radius: 9px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.85); place-items: center; font-size: 1rem; flex-shrink: 0; }
.btn-tema-lateral:hover { background: rgba(255,255,255,.18); color: #fff; }

/* v2.24 — pedidos, central de pendências e mural de avisos */
.pedido-item { padding: .9rem 1.1rem; border-bottom: 1px solid var(--borda); }
.pedido-item:last-child { border-bottom: 0; }
.pedido-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #eaf1fa; color: var(--ibem); flex-shrink: 0; font-size: 1.05rem; }
.pedido-texto { margin-top: .4rem; font-size: .92rem; white-space: normal; }
.pedido-resposta { margin-top: .5rem; padding: .5rem .7rem; border-left: 3px solid var(--ouro); background: var(--superficie-2); border-radius: 0 8px 8px 0; font-size: .88rem; }
.min-w-0 { min-width: 0; }
.tipos-pedido { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .5rem; }
.tipo-pedido { position: relative; cursor: pointer; margin: 0; }
.tipo-pedido input { position: absolute; opacity: 0; }
.tipo-pedido span { display: flex; gap: .5rem; align-items: center; padding: .65rem .8rem; border: 1.5px solid var(--borda); border-radius: 10px; font-size: .9rem; font-weight: 500; height: 100%; }
.tipo-pedido span i { color: var(--ibem); font-size: 1.1rem; }
.tipo-pedido input:checked + span { border-color: var(--ibem); background: #eaf1fa; box-shadow: 0 0 0 2px rgba(47,111,179,.15); }
.tipo-pedido input:focus-visible + span { outline: 2px solid var(--ouro); }
.pend-resumo { display: flex; flex-wrap: wrap; gap: .5rem; }
.pend-chip { display: inline-flex; gap: .4rem; align-items: center; padding: .45rem .85rem; border-radius: 999px; border: 1px solid var(--borda); background: var(--superficie);
  color: var(--suave); text-decoration: none; font-size: .88rem; }
.pend-chip.tem { border-color: #e7c26a; background: #fff8e6; color: #7a5600; }
.pend-chip b { color: inherit; }
.mural-avisos .aviso-item { padding: .8rem 1rem; border: 1px solid var(--borda); border-left: 4px solid #2f6fb3; border-radius: 10px; margin-bottom: .6rem; background: var(--superficie); }
.mural-avisos .aviso-item.importante { border-left-color: #c4352b; }
.mural-avisos .aviso-item.importante .aviso-titulo { color: #b42318; }
.mural-avisos .aviso-item:not(.novo) { opacity: .8; }
.aviso-titulo { font-weight: 700; }
.aviso-texto { margin-top: .35rem; font-size: .92rem; }
.mural-avisos details summary { cursor: pointer; margin: .3rem 0 .5rem; }
[data-bs-theme=dark] .pedido-ic, [data-bs-theme=dark] .tipo-pedido input:checked + span { background: #1c2f4a; color: #a9c8ee; }
[data-bs-theme=dark] .pend-chip.tem { background: #3a2e12; border-color: #6b5320; color: #e8bd55; }
[data-bs-theme=dark] .mural-avisos .aviso-item.importante .aviso-titulo { color: #f2867d; }

/* v2.25 — relatório de quantidades */
.tabela tr.linha-total > td { background: var(--superficie-2); border-top: 2px solid var(--borda); }
.tabela tr.linha-regiao > td { background: color-mix(in srgb, var(--superficie-2) 70%, transparent); font-weight: 600; }
.tabela tr.linha-igreja > td { font-size: .9rem; }
.tabela-quadro th, .tabela-quadro td { white-space: nowrap; }
@media print { .kpi { border: 1px solid #ccc; } .tabela tr.linha-total > td { background: #eee !important; } }

/* v2.26 — busca em todos os campos de região/igreja; "minha região não está na lista" */
.busca-select-lista li.busca-select-sempre { border-top: 1px dashed var(--borda); margin-top: .2rem; font-weight: 600; color: #8a5a00; background: #fff8e6; }
.busca-select-lista li.busca-select-sempre.ativo, .busca-select-lista li.busca-select-sempre:hover { background: #ffefc2; }
.reg-nao-esta { font-weight: 500; border-style: dashed; color: #8a5a00; border-color: #e0b44a; background: #fffaf0; }
.reg-nao-esta:hover { background: #fff1cc; color: #6b4600; border-color: #d39e22; }
.reg-outra-box { padding: .75rem; border: 1px solid #e7c26a; background: #fffaf0; border-radius: 10px; }
[data-bs-theme=dark] .busca-select-lista li.busca-select-sempre, [data-bs-theme=dark] .reg-nao-esta, [data-bs-theme=dark] .reg-outra-box { background: #3a2e12; color: #e8bd55; border-color: #6b5320; }
tr[hidden] { display: none !important; }
.hist-uncao { padding: .6rem .8rem; border-radius: 10px; background: var(--superficie-2); border: 1px solid var(--borda); }

/* v2.28 — cadastros anteriores ao digitar (novo aluno) */
.sug-cad { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; z-index: 1050; background: var(--superficie); border: 1px solid var(--borda);
  border-radius: 10px; box-shadow: 0 12px 30px rgba(16,36,60,.22); padding: .3rem; max-height: 340px; overflow-y: auto; min-width: 280px; }
.sug-titulo { font-size: .74rem; font-weight: 600; color: #6b7685; padding: .25rem .5rem .35rem; text-transform: uppercase; letter-spacing: .03em; }
.sug-item { display: flex; flex-direction: column; gap: .05rem; width: 100%; text-align: left; border: 0; background: none; padding: .5rem .6rem; border-radius: 8px; color: inherit; }
.sug-item b { font-size: .9rem; } .sug-item span { font-size: .76rem; color: #6b7685; }
button.sug-item:hover, .sug-item.ativo { background: #eef3fa; }
.sug-item.ja { opacity: .85; cursor: default; }
.sug-item .sit-txt { font-style: normal; font-weight: 600; }
[data-bs-theme=dark] button.sug-item:hover, [data-bs-theme=dark] .sug-item.ativo { background: #1d2c40; }
[data-bs-theme=dark] .sug-item span, [data-bs-theme=dark] .sug-titulo { color: var(--suave); }

/* Entrar como (admin usando o sistema como professor/secretário) */
.faixa-acesso-como{background:#fff3cd;color:#3d2e00;border:2px solid #e0a800;border-radius:10px;padding:10px 14px;margin-bottom:14px;position:sticky;top:0;z-index:1020;box-shadow:0 2px 8px rgba(0,0,0,.08)}
[data-bs-theme=dark] .faixa-acesso-como{background:#4a3a00;color:#fff3cd;border-color:#c99700}
.aviso-troca-conta{position:fixed;left:50%;bottom:76px;transform:translateX(-50%);z-index:2000;background:#16304f;color:#fff;padding:10px 14px;border-radius:10px;display:flex;gap:10px;align-items:center;box-shadow:0 6px 20px rgba(0,0,0,.25);max-width:94vw;font-size:.92rem}

/* Histórico de alterações */
.historico .hist-item{padding:10px 0;border-bottom:1px solid var(--bs-border-color)}
.historico .hist-item:last-child{border-bottom:0}
.hist-tab{font-size:.85rem;max-width:760px;table-layout:fixed;width:100%}
.hist-tab td{padding:2px 8px 2px 0;border:0;background:transparent}
.hist-tab td:nth-child(1){width:170px}.hist-tab td:nth-child(2){width:250px;overflow-wrap:anywhere}.hist-tab td:nth-child(3){width:28px}.hist-tab td:nth-child(4){overflow-wrap:anywhere}
/* Juntar duplicados */
.dup-cad{display:flex;gap:10px;align-items:flex-start;border:2px solid var(--bs-border-color);border-radius:10px;padding:10px 12px;cursor:pointer;height:100%;position:relative}
.dup-cad.sel{border-color:#198754;background:rgba(25,135,84,.06)}
.dup-cad .dup-fica{display:none;position:absolute;top:8px;right:10px;font-size:.75rem;font-weight:600;color:#198754}
.dup-cad.sel .dup-fica{display:inline}

.campo-codigo{letter-spacing:.5em;font-size:1.6rem}

/* Equipe (professores e secretários) no painel */
:root { --g-prof: #2a78d6; --g-sec: #eb6834; }
[data-bs-theme=dark] { --g-prof: #3987e5; --g-sec: #d95926; }
.eq-kpi { display: flex; align-items: center; gap: .4rem; padding: .5rem .7rem; border: 1px solid var(--bs-border-color); border-radius: 8px; font-size: .88rem; color: inherit; text-decoration: none; height: 100%; }
a.eq-kpi:hover { background: rgba(0,0,0,.03); }
.eq-kpi b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.eq-ponto { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.trilha-eq { width: 100%; }
.barra-eq { background: transparent !important; height: 10px; min-width: 6px; }
.barra-eq > span { min-width: 4px; }
.linha-eq { grid-template-columns: minmax(110px, 34%) 1fr 92px; }
/* vídeo tutorial */
.video-tutorial { width: 100%; max-width: 860px; aspect-ratio: 16/9; background: #0d1b2e; border-radius: 10px; display: block; }
.video-caixa { max-width: 860px; }

.assist-ir { display: inline-flex; align-items: center; gap: .3rem; margin-top: .45rem; font-size: .82rem; font-weight: 600; padding: .25rem .6rem; border-radius: 999px; background: rgba(22,48,79,.08); color: var(--ibem, #16304f); text-decoration: none; }
.assist-ir:hover { background: rgba(22,48,79,.16); }
[data-bs-theme=dark] .assist-ir { background: rgba(255,255,255,.1); color: #e8eef7; }

.ajuda-item[hidden] { display: none !important; }
.ajuda-texto { white-space: normal; line-height: 1.55; }

.btn-uncao-on { background: rgba(124,58,237,.1); color: #6d28d9; border: 1px solid rgba(124,58,237,.35); }
.btn-uncao-on:hover { background: rgba(124,58,237,.18); color: #5b21b6; }
[data-bs-theme=dark] .btn-uncao-on { color: #c4b5fd; border-color: rgba(196,181,253,.4); }

/* Folha de chamada */
.cab-chamada { caption-side: top; color: inherit; font-size: .95rem; padding: .4rem 0 .6rem; }
.linha-chamada td { height: 34px; }
.caixinha { display: inline-block; width: 16px; height: 16px; border: 1.5px solid #555; border-radius: 3px; vertical-align: middle; }
@media print { .linha-chamada td { height: 30px; } }

/* ===================== Lançar aula (salva sozinho) ===================== */
.lanc .lancar-linha.presente { background: #f3faf5; }
.lanc .lancar-linha.erro { background: #fdf1f1; }
.lanc .lancar-linha .nota-turma { width: 88px; text-align: center; }
.lanc .lanc-status { width: 34px; }
.lanc-placar { background: var(--ibem-claro, #eef3fb); border-radius: 999px; padding: .2rem .7rem; white-space: nowrap; }
.lanc-modos .btn.active, .lanc-modos .btn.active:hover, .lanc-modos .btn.active:disabled { background: var(--ibem); color: #fff; border-color: var(--ibem); }
.lc-progresso { height: 5px; background: #e9eef5; }
.lc-barra { height: 100%; width: 0; background: var(--ibem-2, #2c6db5); transition: width .3s; }
.lc-corpo { max-width: 520px; margin: 0 auto; }
.lc-nome { font-size: 1.45rem; font-weight: 700; color: var(--ibem); line-height: 1.2; margin-top: .4rem; }
.lc-botoes { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.lc-botoes .btn { padding: 1.05rem .5rem; font-size: 1.15rem; font-weight: 600; border-radius: 14px; border: 2px solid; }
.lc-pres { border-color: #2f9e5b !important; color: #1f7a43; background: #fff; }
.lc-pres.ativo, .lc-pres:active { background: #2f9e5b; color: #fff; }
.lc-falta { border-color: #d0605e !important; color: #b23b39; background: #fff; }
.lc-falta.ativo, .lc-falta:active { background: #d0605e; color: #fff; }
.lc-nota { font-size: 1.8rem; font-weight: 700; letter-spacing: .05em; }
.lc-chips { display: grid; grid-template-columns: repeat(6, 1fr); gap: .35rem; }
.lc-chips .btn { padding: .45rem 0; }
.lanc-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 88px; z-index: 1900; background: #10243c; color: #fff; padding: .6rem 1rem;
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: .9rem; max-width: calc(100vw - 24px); }
.lanc-toast.erro { background: #8d2321; }
.lanc-toast a { color: #fff; }
@media (max-width: 767.98px) {
  .lanc .lanc-dica { order: 3; flex-basis: 100%; }
  .lanc .lancar-linha .nota-turma { width: 110px; font-size: 1.05rem; }
}
.aulas-grid .aula { position: relative; }
.aula-salvo { position: absolute; top: 6px; right: 8px; font-size: .85rem; }
.selo-salvo { font-weight: 400; color: #6c757d; text-transform: none; letter-spacing: 0; }
/* filtros rápidos (Unção) */
.filtro-rapido { display: flex; flex-direction: column; gap: .45rem; }
.fr-linha { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.fr-chip { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; border: 1px solid #d5dce6; background: #fff; color: var(--ibem);
  border-radius: 999px; padding: .35rem .8rem; font-size: .88rem; text-decoration: none; }
.fr-chip b { background: #eef2f7; border-radius: 999px; padding: 0 .45rem; font-size: .8rem; }
.fr-chip:hover { border-color: var(--ibem-2, #2c6db5); }
.fr-chip.ativo { background: var(--ibem); border-color: var(--ibem); color: #fff; }
.fr-chip.ativo b { background: rgba(255,255,255,.2); }
.fr-chip.fr-sem:not(.ativo) b { background: #fff3cd; color: #7a5b00; }
.fr-igrejas .fr-chip { font-size: .8rem; padding: .25rem .65rem; }
.fr-falta { background: #fff3cd; color: #7a5b00; border-radius: 999px; padding: 0 .4rem; font-size: .75rem; font-weight: 700; }
.fr-chip.ativo .fr-falta { background: rgba(255,255,255,.25); color: #fff; }
/* botão + (ações rápidas) */
.barra-celular .barra-mais { align-self: start; margin: -18px auto 0; width: 56px; height: 56px; min-height: 0; border-radius: 50%; background: var(--ibem); color: #fff;
  box-shadow: 0 6px 16px rgba(16,36,60,.35); border: 4px solid #fff; }
.barra-celular .barra-mais i { font-size: 1.55rem; }
.barra-celular .barra-mais:active { background: var(--ibem-2, #2c6db5); }
.fab-mais { position: fixed; right: 22px; bottom: 84px; z-index: 1049; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--ouro, #c9a227);
  color: var(--ibem); align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: 0 8px 22px rgba(16,36,60,.28); }
.fab-mais:hover { filter: brightness(1.05); transform: scale(1.04); }
.acoes-rapidas.offcanvas-bottom { --bs-offcanvas-zindex: 1060; z-index: 1060; height: auto; max-height: 85vh; border-radius: 18px 18px 0 0; }
@media (min-width: 992px) { .acoes-rapidas.offcanvas-bottom { left: auto; right: 22px; bottom: 146px; width: 380px; border-radius: 16px; border: 1px solid var(--borda); } }
.ar-grade { display: grid; gap: .5rem; padding-bottom: env(safe-area-inset-bottom); }
.ar-item { display: flex; align-items: center; gap: .8rem; text-align: left; width: 100%; border: 1px solid var(--borda); background: #fff; border-radius: 12px;
  padding: .7rem .9rem; color: var(--ibem); text-decoration: none; }
.ar-item > i { font-size: 1.35rem; width: 38px; height: 38px; border-radius: 10px; background: #eef2f7; display: grid; place-items: center; flex: none; }
.ar-item span { display: flex; flex-direction: column; line-height: 1.2; }
.ar-item small { color: #6c757d; font-size: .78rem; }
.ar-item.destaque { background: var(--ibem); border-color: var(--ibem); color: #fff; }
.ar-item.destaque > i { background: rgba(255,255,255,.15); }
.ar-item.destaque small { color: rgba(255,255,255,.75); }
@media (max-width: 991.98px) { body.app .assist-fab { display: none; } }
[data-bs-theme=dark] .ar-item:not(.destaque), [data-bs-theme=dark] .fr-chip:not(.ativo) { background: #1b2a3d; color: var(--texto, #e6edf5); }
[data-bs-theme=dark] .barra-celular .barra-mais { border-color: #14202f; }

