/* ElevvaSoft V2 - barra superior com mega-menu, gaveta no celular, barra inferior e busca rápida.
   Independente do Bootstrap: também é usada nas telas antigas que foram trazidas para a V2. */
:root {
  --ofc-azul: #1f5fae;
  --ofc-azul-esc: #163f78;
  --ofc-azul-cl: #eaf2fc;
  --ofc-verde: #14a37f;
  --ofc-texto: #0f172a;
  --ofc-texto2: #475569;
  --ofc-mudo: #64748b;
  --ofc-borda: #e3e8ef;
  --ofc-fundo: #f4f6fa;
  --ofc-top-h: 60px;
  --ofc-fonte: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
.ofc-top, .ofc-top *, .ofc-gaveta, .ofc-gaveta *, .ofc-tabbar, .ofc-tabbar *, .ofc-paleta, .ofc-paleta * { box-sizing: border-box; }
.ofc-top {
  position: sticky; top: 0; z-index: 1030;
  background: #fff; border-bottom: 1px solid var(--ofc-borda);
  font-family: var(--ofc-fonte); color: var(--ofc-texto);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.ofc-top-in { height: var(--ofc-top-h); display: flex; align-items: center; gap: 8px; padding: 0 16px; max-width: 1600px; margin: 0 auto; }
.ofc-logo { display: flex; align-items: center; margin-right: 10px; flex: none; }
.ofc-logo img { height: 34px; width: auto; display: block; }
.ofc-ico { width: 1em; height: 1em; display: inline-block; vertical-align: -.125em; }

/* grupos do menu */
.ofc-mega { display: flex; align-items: stretch; height: 100%; gap: 2px; flex: 1; min-width: 0; }
.ofc-mg { position: static; display: flex; }
.ofc-mg-btn, .ofc-mg-link {
  display: flex; align-items: center; gap: 6px; height: 100%;
  padding: 0 12px; border: 0; background: none; cursor: pointer;
  font: 600 14px/1 var(--ofc-fonte); color: var(--ofc-texto2); text-decoration: none; white-space: nowrap;
  border-bottom: 3px solid transparent; border-top: 3px solid transparent;
}
.ofc-mg-btn:hover, .ofc-mg-link:hover, .ofc-mg.aberto .ofc-mg-btn { color: var(--ofc-azul); }
.ofc-mg.ativo .ofc-mg-btn, .ofc-mg-link.ativo { color: var(--ofc-azul); border-bottom-color: var(--ofc-azul); }
.ofc-mg-btn .bi-chevron-down { font-size: 11px; transition: transform .15s; }
.ofc-mg.aberto .ofc-mg-btn .bi-chevron-down { transform: rotate(180deg); }
.ofc-mg-pan {
  display: none; position: absolute; left: 0; right: 0; top: calc(var(--ofc-top-h) - 1px);
  background: #fff; border-top: 1px solid var(--ofc-borda); border-bottom: 1px solid var(--ofc-borda);
  box-shadow: 0 18px 40px -12px rgba(15, 23, 42, .22);
}
.ofc-mg.aberto .ofc-mg-pan { display: block; animation: ofcDesce .14s ease-out; }
@keyframes ofcDesce { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.ofc-mg-in { max-width: 1280px; margin: 0 auto; padding: 22px 24px 24px; display: grid; grid-template-columns: 1fr 260px; gap: 28px; }
.ofc-mg-tit { font: 700 11px/1 var(--ofc-fonte); letter-spacing: .08em; text-transform: uppercase; color: var(--ofc-mudo); margin: 0 0 12px 10px; }
.ofc-mg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 4px; }
.ofc-mg-it {
  display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 10px;
  color: var(--ofc-texto); text-decoration: none;
}
.ofc-mg-it:hover, .ofc-mg-it:focus-visible { background: var(--ofc-azul-cl); outline: none; }
.ofc-mg-it.ativo { background: var(--ofc-azul-cl); }
.ofc-mg-ic {
  flex: none; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
  background: #f1f5f9; color: var(--ofc-azul); font-size: 18px;
}
.ofc-mg-it:hover .ofc-mg-ic { background: #fff; }
.ofc-mg-it b { display: block; font: 600 14px/1.25 var(--ofc-fonte); margin-top: 1px; }
.ofc-mg-it small { display: block; font: 400 12.5px/1.35 var(--ofc-fonte); color: var(--ofc-mudo); margin-top: 2px; }
.ofc-mg-lado { background: var(--ofc-fundo); border-radius: 12px; padding: 16px; align-self: start; }
.ofc-mg-lado h6 { font: 700 13px/1.2 var(--ofc-fonte); margin: 0 0 8px; color: var(--ofc-texto); }
.ofc-mg-lado p { font: 400 13px/1.45 var(--ofc-fonte); color: var(--ofc-texto2); margin: 0 0 12px; }
.ofc-mg-lado a.ofc-bt-p { display: inline-flex; }

/* lado direito */
.ofc-top-dir { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.ofc-busca-btn {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 12px; min-width: 210px;
  border: 1px solid var(--ofc-borda); border-radius: 10px; background: var(--ofc-fundo); color: var(--ofc-mudo);
  font: 400 14px var(--ofc-fonte); cursor: pointer;
}
.ofc-busca-btn:hover { border-color: #cbd5e1; background: #fff; }
.ofc-busca-btn kbd { margin-left: auto; font: 600 11px var(--ofc-fonte); background: #fff; border: 1px solid var(--ofc-borda); border-radius: 5px; padding: 2px 5px; color: var(--ofc-mudo); }
.ofc-bt-ic {
  position: relative; width: 38px; height: 38px; border-radius: 10px; border: 0; background: none; color: var(--ofc-texto2);
  display: grid; place-items: center; font-size: 19px; cursor: pointer; text-decoration: none;
}
.ofc-bt-ic:hover { background: var(--ofc-fundo); color: var(--ofc-azul); }
.ofc-badge { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #dc2626; color: #fff; font: 700 10px/17px var(--ofc-fonte); text-align: center; }
.ofc-badge:empty { display: none; }
.ofc-bt-p {
  display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 10px; border: 0;
  background: var(--ofc-azul); color: #fff; font: 600 14px var(--ofc-fonte); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.ofc-bt-p:hover { background: var(--ofc-azul-esc); color: #fff; }
.ofc-dd { position: relative; }
.ofc-dd-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; z-index: 1040;
  background: #fff; border: 1px solid var(--ofc-borda); border-radius: 12px; padding: 6px;
  box-shadow: 0 16px 36px -10px rgba(15, 23, 42, .25); font-family: var(--ofc-fonte);
}
.ofc-dd.aberto .ofc-dd-menu { display: block; animation: ofcDesce .12s ease-out; }
.ofc-dd-menu a, .ofc-dd-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; border: 0; background: none;
  color: var(--ofc-texto); font: 500 14px var(--ofc-fonte); text-decoration: none; cursor: pointer; text-align: left;
}
.ofc-dd-menu a:hover, .ofc-dd-menu button:hover { background: var(--ofc-fundo); }
.ofc-dd-menu i { color: var(--ofc-mudo); font-size: 16px; width: 18px; text-align: center; }
.ofc-dd-sep { height: 1px; background: var(--ofc-borda); margin: 6px 4px; }
.ofc-dd-cab { padding: 8px 10px 10px; }
.ofc-dd-cab b { display: block; font: 600 14px var(--ofc-fonte); }
.ofc-dd-cab small { display: block; font: 400 12px var(--ofc-fonte); color: var(--ofc-mudo); margin-top: 2px; word-break: break-all; }
.ofc-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--ofc-azul), #22a6c4); color: #fff;
  display: grid; place-items: center; font: 700 13px var(--ofc-fonte); border: 0; cursor: pointer;
}
.ofc-selo { display: inline-block; font: 700 11px var(--ofc-fonte); padding: 4px 8px; border-radius: 999px; white-space: nowrap; text-decoration: none; }
.ofc-selo.info { background: #e0f2fe; color: #075985; }
.ofc-selo.aviso { background: #fef3c7; color: #92400e; }
.ofc-selo.perigo { background: #fee2e2; color: #991b1b; }

/* celular: gaveta e barra inferior */
.ofc-burger { display: none; }
.ofc-gaveta-fundo { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 1050; opacity: 0; pointer-events: none; transition: opacity .2s; }
.ofc-gaveta {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(330px, 88vw); z-index: 1060; background: #fff;
  transform: translateX(-102%); transition: transform .22s ease; display: flex; flex-direction: column; font-family: var(--ofc-fonte);
}
body.ofc-gaveta-on .ofc-gaveta { transform: none; }
body.ofc-gaveta-on .ofc-gaveta-fundo { opacity: 1; pointer-events: auto; }
.ofc-gaveta-cab { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--ofc-borda); }
.ofc-gaveta-cab img { height: 30px; }
.ofc-gaveta-corpo { overflow-y: auto; padding: 8px; flex: 1; }
.ofc-gv-g { border-bottom: 1px solid #f1f5f9; }
.ofc-gv-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 10px; border: 0; background: none; font: 600 15px var(--ofc-fonte); color: var(--ofc-texto); cursor: pointer; text-decoration: none; }
.ofc-gv-btn i:first-child { color: var(--ofc-azul); font-size: 18px; width: 22px; }
.ofc-gv-btn .bi-chevron-down { margin-left: auto; font-size: 12px; color: var(--ofc-mudo); transition: transform .15s; }
.ofc-gv-g.aberto .ofc-gv-btn .bi-chevron-down { transform: rotate(180deg); }
.ofc-gv-itens { display: none; padding: 0 0 8px 32px; }
.ofc-gv-g.aberto .ofc-gv-itens { display: block; }
.ofc-gv-itens a { display: block; padding: 9px 10px; border-radius: 8px; color: var(--ofc-texto2); font: 500 14px var(--ofc-fonte); text-decoration: none; }
.ofc-gv-itens a:hover, .ofc-gv-itens a.ativo { background: var(--ofc-azul-cl); color: var(--ofc-azul); }
.ofc-tabbar { display: none; }

@media (max-width: 1499.98px) {
  .ofc-sel-sit { display: none; }
  .ofc-busca-btn { min-width: 0; }
  .ofc-busca-btn span, .ofc-busca-btn kbd { display: none; }
  .ofc-mg-btn, .ofc-mg-link { padding: 0 9px; }
}
@media (max-width: 1199.98px) {
  .ofc-mg-btn, .ofc-mg-link { padding: 0 8px; font-size: 13.5px; }
  .ofc-busca-btn { min-width: 0; }
  .ofc-busca-btn span, .ofc-busca-btn kbd { display: none; }
  .ofc-mg-in { grid-template-columns: 1fr; }
  .ofc-mg-lado { display: none; }
}
@media (max-width: 991.98px) {
  .ofc-mega { display: none; }
  .ofc-burger { display: grid; }
  .ofc-novo-txt { display: none; }
  .ofc-bt-p.ofc-novo { padding: 0 10px; }
  .ofc-top-in { padding: 0 10px; gap: 4px; }
  .ofc-logo img { height: 30px; }
  .ofc-tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030; background: #fff;
    border-top: 1px solid var(--ofc-borda); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); font-family: var(--ofc-fonte);
    box-shadow: 0 -2px 10px rgba(15, 23, 42, .05);
  }
  .ofc-tabbar a, .ofc-tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px; border: 0; background: none;
    color: var(--ofc-mudo); font: 600 11px var(--ofc-fonte); text-decoration: none; cursor: pointer;
  }
  .ofc-tabbar i { font-size: 20px; }
  .ofc-tabbar .ativo { color: var(--ofc-azul); }
  body.ofc-com-tab { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}
@media (max-width: 575.98px) {
  .ofc-sel-sit { display: none; }
}

/* busca rápida (Ctrl+K) */
.ofc-paleta { position: fixed; inset: 0; z-index: 1080; display: none; align-items: flex-start; justify-content: center; padding: 10vh 12px 12px; background: rgba(15, 23, 42, .45); font-family: var(--ofc-fonte); }
.ofc-paleta.on { display: flex; }
.ofc-paleta-cx { width: min(640px, 100%); background: #fff; border-radius: 14px; box-shadow: 0 30px 60px -12px rgba(15, 23, 42, .45); overflow: hidden; }
.ofc-paleta-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--ofc-borda); }
.ofc-paleta-in i { color: var(--ofc-mudo); font-size: 18px; }
.ofc-paleta-in input { flex: 1; border: 0; outline: none; font: 400 16px var(--ofc-fonte); color: var(--ofc-texto); background: none; }
.ofc-paleta-lista { max-height: 60vh; overflow-y: auto; padding: 6px; }
.ofc-paleta-sec { font: 700 11px var(--ofc-fonte); letter-spacing: .08em; text-transform: uppercase; color: var(--ofc-mudo); padding: 10px 10px 4px; }
.ofc-paleta-it { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px; color: var(--ofc-texto); text-decoration: none; }
.ofc-paleta-it i { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #f1f5f9; color: var(--ofc-azul); font-size: 15px; flex: none; }
.ofc-paleta-it b { font: 600 14px var(--ofc-fonte); display: block; }
.ofc-paleta-it small { font: 400 12px var(--ofc-fonte); color: var(--ofc-mudo); display: block; }
.ofc-paleta-it.sel, .ofc-paleta-it:hover { background: var(--ofc-azul-cl); }
.ofc-paleta-vazio { padding: 26px; text-align: center; color: var(--ofc-mudo); font: 400 14px var(--ofc-fonte); }
.ofc-paleta-pe { display: flex; gap: 14px; padding: 9px 14px; border-top: 1px solid var(--ofc-borda); font: 400 12px var(--ofc-fonte); color: var(--ofc-mudo); background: #fafbfc; }
@media print { .ofc-top, .ofc-tabbar, .ofc-gaveta, .ofc-gaveta-fundo { display: none !important; } }

/* telas antigas trazidas para a V2 (menu colocado pelo sistema) */
body.ofc-env { margin: 0; }
body.ofc-env .ofc-top { margin: 0 0 6px; }
@media (max-width: 991.98px) { body.ofc-env { padding-bottom: 72px; } }

/* listas agrupadas por categoria */
tr.ofc-grp td, tr.grp td { background: #f3f6fa; padding: 0 !important; border-top: 1px solid #e1e7ef; }
.ofc-grpb, .grpb { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 10px 12px; font-weight: 600; font-size: 14.5px; color: #1f2937; text-align: left; cursor: pointer; font-family: inherit; }
.ofc-grpb small, .grpb small { font-weight: 400; color: #5b6573; margin-left: 4px; }
.ofc-grpb .bi-chevron-right, .grpb .bi-chevron-right { transition: transform .15s; color: #5b6573; }
.ofc-grpb[aria-expanded="true"] .bi-chevron-right, .grpb[aria-expanded="true"] .bi-chevron-right { transform: rotate(90deg); }
.ofc-grpb:focus-visible, .grpb:focus-visible { outline: 3px solid #93b4e8; outline-offset: -3px; }
.ofc-grp-todos { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.ofc-grp-todos button { border: 1px solid #d6dde7; background: #fff; border-radius: 8px; padding: 5px 10px; font-size: 13px; color: #374151; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; font-family: inherit; }
@media (max-width: 768px) { .ofc-resp tr.ofc-grp, .ofc-resp tr.grp { display: block; border-radius: 10px; margin: 10px 0 4px; } .ofc-resp tr.ofc-grp td, .ofc-resp tr.grp td { display: block; } .ofc-resp tr.ofc-grp td::before, .ofc-resp tr.grp td::before { content: none !important; } }
tr[data-g][hidden] { display: none !important; }
/* UX: na lista agrupada, a coluna da categoria repete o nome do grupo; no celular ela some do cartão. Botões de abrir/fechar maiores para o dedo */
@media (max-width: 768px) { .ofc-resp td.ofc-col-grp { display: none !important; } .ofc-grp-todos button { min-height: 44px; padding: 8px 12px; flex: 1 1 auto; justify-content: center; } .ofc-grpb, .grpb { min-height: 48px; } }
.ofc-grp-todos button:focus-visible { outline: 3px solid #1f5fae; outline-offset: 2px; }
/* UX: no celular os botões da barra de cima (menu, buscar, novo, avisos, perfil) com 44 px para o dedo */
@media (max-width: 991.98px) { .ofc-bt-ic, .ofc-bt-p { width: auto; min-width: 44px; height: 44px; } .ofc-avatar { width: 40px; height: 40px; } }
.ofc-bt-ic:focus-visible, .ofc-bt-p:focus-visible, .ofc-busca-btn:focus-visible { outline: 3px solid #1f5fae; outline-offset: 2px; }
