/* =========================================================================
   societario-comum.css — estilos compartilhados das telas da Estrutura
   Societária (organograma / sócios / unidades / patrimônio + hub).
   Carregar SEMPRE depois de mobile-fix.css / tema-escuro.css / tema-claro.css
   e antes do <style> específico da página.
   Cobre: base, seletor de projeto, toolbar, botões, cards, listas/itens,
   pills, sócios, tabelas de dados complementares, modais e picker de pessoa,
   com os overrides do tema escuro. NÃO cobre shell/breadcrumb/título (que
   seguem inline por página, padrão do portal) nem o organograma (específico).
   ========================================================================= */

/* reset universal (as páginas societárias assumem border-box + margens zeradas,
   como no radar_crise; sem isto o <body> mantém a margem de 8px do UA e o
   breadcrumb desce ~8px em relação ao padrão). */
* { margin:0; padding:0; box-sizing:border-box; }

body { font-family:'Albert Sans', system-ui, -apple-system, sans-serif;
       background:#ffffff; padding:20px; color:#1a1816; font-size:14px; }
/* width:100% + min-width:0 = o container preenche o #appContent (flex) e PODE
   encolher abaixo do conteúdo (senão uma tabela larga estoura a viewport). */
.container { max-width:1180px; width:100%; min-width:0; margin:0 auto; }

/* ---- sub-navegação entre as telas societárias (abas) ---- */
.soc-subnav { display:flex; gap:8px; flex-wrap:wrap; margin:0 0 18px; }
.soc-subnav a { display:inline-flex; align-items:center; gap:7px; padding:8px 14px;
        border:1px solid #e2ded7; background:#faf9f7; color:#6b6660; border-radius:9px;
        font-size:.82rem; font-weight:600; text-decoration:none; transition:.15s; }
.soc-subnav a:hover { border-color:#957c46; color:#1a1816; }
.soc-subnav a.active { background:#957c46; color:#fff; border-color:#957c46; }
.soc-subnav a i { font-size:.95rem; }
/* variante inline: dentro do hero de navegação, ao lado do filtro de projeto */
.soc-subnav-inline { margin:0; }
html[data-pb-tema="escuro"] .soc-subnav a { background:rgba(255,255,255,.05); color:#e7e2d9; border-color:rgba(255,255,255,.14); }
html[data-pb-tema="escuro"] .soc-subnav a:hover { border-color:var(--gold); color:#fff; }
html[data-pb-tema="escuro"] .soc-subnav a.active { background:var(--gold); color:#1a1816; border-color:var(--gold); }

/* seletor de projeto no hero de navegação */
.proj-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:14px; }
.proj-row label { font-size:.82rem; font-weight:600; color:inherit; opacity:.85; }
.proj-row select,
.proj-row input[type="text"] { padding:9px 12px; border:1px solid #d8d5d0; border-radius:8px;
       font-size:16px; font-family:'Albert Sans',sans-serif; background:#fff;
       min-width:280px; max-width:100%; color:#1a1816; }
.proj-row select:focus,
.proj-row input[type="text"]:focus { outline:none; border-color:#957c46; }
.proj-row .proj-picker { flex:1; min-width:280px; max-width:440px; }
.proj-row .proj-picker input[type="text"] { width:100%; min-width:0; }
.proj-row input.campo-erro,
.proj-row select.campo-erro { border-color:#c0392b; box-shadow:0 0 0 2px rgba(192,57,43,.22); }

/* toolbar dentro do hero de navegação */
.toolbar { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.toolbar .info { font-size:.78rem; color:#888; margin-left:auto; }

.btn { padding:9px 16px; border-radius:8px; font-size:.85rem; font-weight:600;
       font-family:'Albert Sans',sans-serif; cursor:pointer; border:1px solid #d8d5d0;
       background:#fff; color:#1a1816; display:inline-flex; align-items:center; gap:7px;
       transition:.15s; text-decoration:none; }
.btn:hover { border-color:#957c46; }
.btn-primary { background:#957c46; border-color:#957c46; color:#1a1816; }
.btn-primary:hover { background:#7d6739; }
.btn-ghost { background:transparent; }
.btn-sm { padding:6px 11px; font-size:.76rem; border-radius:7px; }
.btn-danger { color:#c0392b; border-color:#e8c9c4; }
.btn-danger:hover { background:#fbeae7; border-color:#c0392b; }

.empty-state { text-align:center; color:#9a948c; padding:48px 20px; font-size:.92rem; }

/* barra de upload de documentos */
.doc-upload { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.doc-upload select, .doc-upload input[type="text"] { padding:9px 11px; border:1px solid #d8d5d0;
        border-radius:8px; font-size:16px; font-family:'Albert Sans',sans-serif; background:#fff; color:#1a1816; }
.doc-upload input[type="text"] { flex:1; min-width:200px; }
.doc-upload input[type="file"] { font-size:.82rem; max-width:100%; }
.doc-upload select:focus, .doc-upload input:focus { outline:none; border-color:#957c46; }
html[data-pb-tema="escuro"] .doc-upload select,
html[data-pb-tema="escuro"] .doc-upload input[type="text"] { background:#1c1814; color:#f4f0ea; border-color:rgba(255,255,255,.16); }
html[data-pb-tema="escuro"] .doc-upload input[type="file"] { color:var(--pb-text); }

/* hero secundário recolhível (mecânica local — padrão consulta_de_partes) */
.hero-toggle { display:flex; align-items:center; justify-content:space-between; gap:12px;
        width:100%; background:none; border:0; padding:0; cursor:pointer; color:inherit;
        text-align:left; font-family:inherit; }
.hero-toggle .ht-left { display:inline-flex; align-items:center; }
.hero-toggle .ht-caret { font-size:1.1rem; flex-shrink:0; transition:transform .2s ease;
        color:var(--pb-hero-title,#1a1816); }
.hero-collapse.collapsed .hero-toggle .ht-caret { transform:rotate(-90deg); }
.hero-collapse .hero-body { margin-top:14px; }
.hero-collapse.collapsed .hero-body { display:none; }

/* cartões de seção */
.card { background:#fff; border:1px solid #ece9e4; border-radius:12px; padding:18px 18px 20px;
        margin-top:18px; }
.card-head { display:flex; align-items:center; gap:10px; margin-bottom:14px; flex-wrap:wrap; }
.card-head h2 { font-size:1rem; font-weight:700; letter-spacing:.5px; text-transform:uppercase;
        color:#1a1816; }
.card-head .leg { font-size:.72rem; color:#9a948c; margin-left:auto; display:flex; gap:12px; flex-wrap:wrap; }
.leg b { font-weight:600; }
.leg .sw { display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:4px; vertical-align:middle; }

/* listas */
.lista { display:flex; flex-direction:column; gap:10px; }
.item { border:1px solid #ece9e4; border-radius:10px; padding:12px 14px; }
.item.emp { border-left:3px solid #957c46; }
.item-top { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.item-top .nome { font-weight:700; font-size:.95rem; }
.item-top .doc  { font-size:.74rem; color:#9a948c; }
.item-top .acoes { margin-left:auto; display:flex; gap:6px; flex-wrap:wrap; }
.pill { font-size:.68rem; font-weight:700; text-transform:uppercase; letter-spacing:.4px;
        padding:3px 8px; border-radius:999px; background:#f1ede6; color:#7a7468; }
.pill.gold { background:#f7eccd; color:#8a6d13; }
.pill.navy { background:#dde6f3; color:#264a7a; }
.pill.brown{ background:#ece0d4; color:#6b4f33; }
.pill.warn { background:#fbe6c8; color:#9a5b14; }
.pill.danger{ background:#f8d7d2; color:#a52a1a; }
.socios { margin-top:10px; border-top:1px solid #f0ece6; padding-top:10px; display:none; }
.socios.open { display:block; }
.socio-row { display:flex; align-items:center; gap:10px; padding:7px 0; flex-wrap:wrap;
        border-bottom:1px dashed #f0ece6; }
.socio-row:last-child { border-bottom:none; }
.socio-row .nome { font-weight:600; font-size:.86rem; }
.socio-row .meta { font-size:.74rem; color:#9a948c; }
.socio-row .pct { font-weight:700; color:#8a6d13; font-size:.86rem; }
.socio-row .acoes { margin-left:auto; display:flex; gap:6px; }
.vazio-mini { font-size:.8rem; color:#9a948c; padding:6px 0; }

/* ---- Dados complementares (ficha / unidades / atos) ---- */
.dc-tabs { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px; }
.dc-tab { display:inline-flex; align-items:center; gap:6px; padding:7px 12px; border:1px solid #e2ded7;
        background:#faf9f7; color:#6b6660; border-radius:8px; font-size:.8rem; font-weight:600;
        cursor:pointer; font-family:inherit; }
.dc-tab:hover { border-color:#957c46; }
.dc-tab.active { background:#957c46; color:#fff; border-color:#957c46; }
.dc-tab .cnt { font-size:.66rem; font-weight:700; background:rgba(0,0,0,.12); padding:1px 6px; border-radius:999px; }
.dc-tab.active .cnt { background:rgba(255,255,255,.28); }
.dc-tablewrap { overflow-x:auto; -webkit-overflow-scrolling:touch; max-width:100%; }
table.dc-table { width:100%; border-collapse:collapse; font-size:.8rem; }
.dc-table th, .dc-table td { text-align:left; padding:8px 10px; border-bottom:1px solid #efece6;
        white-space:normal; overflow-wrap:anywhere; vertical-align:top; }
.dc-table th { font-size:.66rem; text-transform:uppercase; letter-spacing:.5px; color:#9a948c;
        font-weight:700; white-space:nowrap; }
.dc-table td.num { text-align:right; white-space:nowrap; overflow-wrap:normal; font-variant-numeric:tabular-nums; }
.dc-table td.wrap { min-width:180px; }
.dc-table .dc-emp { display:inline-block; min-width:120px; font-weight:600; }
.dc-table tbody tr:hover { background:rgba(149,124,70,.06); }

/* modal */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.45); display:none;
        align-items:center; justify-content:center; z-index:2000; padding:16px; }
.modal-overlay.show { display:flex; }
.modal { background:#fff; border-radius:14px; width:100%; max-width:460px; max-height:92vh;
        overflow:auto; box-shadow:0 20px 60px rgba(0,0,0,.3); }
.modal-head { padding:18px 20px 0; }
.modal-head h3 { font-size:1.05rem; font-weight:700; }
.modal-head p { font-size:.8rem; color:#9a948c; margin-top:3px; }
.modal-body { padding:14px 20px; display:flex; flex-direction:column; gap:13px; }
.modal-foot { padding:0 20px 20px; display:flex; gap:10px; justify-content:flex-end; }
.fld { display:flex; flex-direction:column; gap:5px; }
.fld label { font-size:.78rem; font-weight:600; color:#5a554d; }
.fld input, .fld select, .fld textarea { padding:9px 11px; border:1px solid #d8d5d0;
        border-radius:8px; font-size:16px; font-family:'Albert Sans',sans-serif; background:#fff;
        color:#1a1816; width:100%; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline:none; border-color:#957c46; }
.fld textarea { resize:vertical; min-height:54px; }
.row2 { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.erro-modal { font-size:.8rem; color:#c0392b; display:none; }
.erro-modal.show { display:block; }

/* picker de pessoa */
.picker { position:relative; }
.picker-results { position:absolute; top:calc(100% + 4px); left:0; right:0; background:#fff;
        border:1px solid #d8d5d0; border-radius:9px; box-shadow:0 12px 30px rgba(0,0,0,.16);
        max-height:240px; overflow:auto; z-index:10; display:none; }
.picker-results.show { display:block; }
.picker-opt { padding:9px 12px; cursor:pointer; border-bottom:1px solid #f3f0ea; }
.picker-opt:last-child { border-bottom:none; }
.picker-opt:hover { background:#f7f3ea; }
.picker-opt .pn { font-weight:600; font-size:.85rem; }
.picker-opt .pd { font-size:.72rem; color:#9a948c; }
.picker-opt.vazio { color:#9a948c; cursor:default; font-size:.8rem; }
.picker-opt.criar { color:#8a6d13; font-weight:600; display:flex; align-items:center; gap:6px; border-top:1px solid #f0ece6; }
html[data-pb-tema="escuro"] .picker-opt.criar { color:var(--gold,#957c46); border-top-color:rgba(255,255,255,.08); }
.picked-tag { display:none; align-items:center; gap:8px; padding:7px 10px; background:#f4eeda;
        border:1px solid #e7d9ab; border-radius:8px; font-size:.84rem; font-weight:600; margin-top:6px; }
.picked-tag.show { display:inline-flex; }
.picked-tag .x { cursor:pointer; color:#9a5b14; font-weight:700; }

/* ---- cadastro rápido de pessoa (dados do sócio) direto no modal ---- */
.np-link { align-self:flex-start; margin-top:8px; padding:0; background:none; border:none;
        color:#8a6d13; font-family:inherit; font-size:.8rem; font-weight:600; cursor:pointer;
        display:inline-flex; align-items:center; gap:6px; }
.np-link:hover { text-decoration:underline; }
.np-link i { font-size:.95rem; }
.nova-pessoa-box { border:1px dashed #d8c68a; background:#faf6ea; border-radius:10px;
        padding:12px 12px 13px; display:flex; flex-direction:column; gap:11px; }
.np-tit { font-size:.82rem; font-weight:700; color:#6b5a2a; display:flex; align-items:center; gap:6px; }
.np-tit i { font-size:1rem; }
.np-opt { font-weight:500; color:#9a948c; font-size:.72rem; }
.np-hint { font-size:.72rem; color:#9a948c; margin-top:2px; min-height:.9em; }
.np-hint.erro { color:#c0392b; }
.np-actions { justify-content:flex-end; }
.np-actions .btn { align-self:flex-end; width:100%; justify-content:center; }
html[data-pb-tema="escuro"] .np-link { color:var(--gold,#957c46); }
html[data-pb-tema="escuro"] .nova-pessoa-box { border-color:rgba(212,184,120,.4); background:rgba(212,184,120,.07); }
html[data-pb-tema="escuro"] .np-tit { color:var(--pb-text-strong,#d2b878); }

.denied { display:none; max-width:520px; margin:60px auto; text-align:center;
        background:#fff; border:1px solid #ece9e4; border-radius:14px; padding:40px 24px; }
.denied.show { display:block; }
.denied i { font-size:2.4rem; color:#957c46; }
.denied h2 { margin:12px 0 6px; }
.denied p { color:#9a948c; margin-bottom:18px; }

.toast { position:fixed; bottom:84px; left:50%; transform:translateX(-50%); background:#1a1816;
        color:#fff; padding:11px 18px; border-radius:10px; font-size:.84rem; z-index:3000;
        opacity:0; pointer-events:none; transition:.25s; }
.toast.show { opacity:1; }

@media (max-width:768px){
  .row2 { grid-template-columns:1fr; }
  .proj-row select,
  .proj-row .proj-picker { min-width:0; width:100%; max-width:100%; }
}

/* ---- TEMA ESCURO (tokens do portal) ---- */
html[data-pb-tema="escuro"] body { background:transparent; color:var(--pb-text); }
html[data-pb-tema="escuro"] .card { background:var(--pb-hero-bg); backdrop-filter:var(--pb-hero-blur);
        border:none; box-shadow:var(--pb-hero-shadow); }
html[data-pb-tema="escuro"] .card-head h2 { color:var(--pb-hero-title); }
html[data-pb-tema="escuro"] .item { background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.08); }
html[data-pb-tema="escuro"] .item-top .nome { color:#f4f0ea; }
html[data-pb-tema="escuro"] .btn { background:rgba(255,255,255,.06); color:#f4f0ea; border-color:rgba(255,255,255,.14); }
html[data-pb-tema="escuro"] .btn:hover { border-color:var(--gold); }
html[data-pb-tema="escuro"] .btn-primary { background:var(--gold); color:#1a1816; border-color:var(--gold); }
html[data-pb-tema="escuro"] .proj-row select,
html[data-pb-tema="escuro"] .proj-row input[type="text"],
html[data-pb-tema="escuro"] .fld input,
html[data-pb-tema="escuro"] .fld select,
html[data-pb-tema="escuro"] .fld textarea { background:#1c1814; color:#f4f0ea; border-color:rgba(255,255,255,.16); }
html[data-pb-tema="escuro"] .modal { background:#16120e; color:var(--pb-text); }
html[data-pb-tema="escuro"] .picker-results { background:#16120e; border-color:rgba(255,255,255,.16); }
html[data-pb-tema="escuro"] .picker-opt { border-color:rgba(255,255,255,.07); }
html[data-pb-tema="escuro"] .picker-opt:hover { background:rgba(255,255,255,.06); }
html[data-pb-tema="escuro"] .denied { background:var(--pb-hero-bg); border:none; }
html[data-pb-tema="escuro"] .dc-tab { background:rgba(255,255,255,.05); color:#e7e2d9; border-color:rgba(255,255,255,.14); }
html[data-pb-tema="escuro"] .dc-tab:hover { border-color:var(--gold); }
html[data-pb-tema="escuro"] .dc-tab.active { background:var(--gold); color:#1a1816; border-color:var(--gold); }
html[data-pb-tema="escuro"] .dc-table th { color:rgba(255,255,255,.6); }
html[data-pb-tema="escuro"] .dc-table th,
html[data-pb-tema="escuro"] .dc-table td { border-color:rgba(255,255,255,.08); }
html[data-pb-tema="escuro"] .dc-table .dc-emp { color:#f4f0ea; }
html[data-pb-tema="escuro"] .dc-table tbody tr:hover { background:rgba(255,255,255,.05); }

/* =========================================================================
   SHELL PORTAL BIOLCHI — sidebar/topbar/breadcrumb/título (padrão radar_crise)
   Consolidado aqui para as telas societárias (evita repetir o bloco inline).
   ========================================================================= */
.pb-sidebar{
  position:fixed;top:0;left:0;width:240px;min-width:240px;height:100vh;
  background:#eeecea;z-index:1000;overflow-y:auto;overflow-x:hidden;
  scrollbar-width:none;display:flex;flex-direction:column;
  transition:transform .25s ease,width .2s ease;
  font-family:'Albert Sans',system-ui,sans-serif;
}
.pb-sidebar::-webkit-scrollbar{display:none;}
.pb-sidebar-logo{padding:18px 16px 16px;display:flex;flex-direction:row;align-items:center;gap:12px;}
.logo-text{display:flex;flex-direction:column;gap:2px;min-width:0;}
.pb-collapse-btn{
  width:34px;height:34px;flex-shrink:0;border:none;cursor:pointer;
  background:#e2dfd9;color:#6b6660;border-radius:6px;
  display:flex;align-items:center;justify-content:center;font-size:.95rem;transition:background .15s;
}
.pb-collapse-btn:hover{background:#d8d4cd;color:#1a1816;}
.pb-sidebar-logo .logo{font-size:1.7rem;font-weight:700;color:#1a1816;letter-spacing:-.01em;line-height:1;}
.pb-sidebar-logo .logo .dot{color:#957c46;}
.pb-sidebar-logo .since{font-size:.55rem;color:rgba(0,0,0,.4);letter-spacing:1.8px;text-transform:uppercase;margin-top:4px;font-weight:600;}
.pb-sidebar-user{
  padding:10px 20px;border-top:1px solid rgba(0,0,0,.06);border-bottom:1px solid rgba(0,0,0,.06);
  font-size:.78rem;color:#555;display:flex;align-items:center;gap:10px;
}
.pb-sidebar-user .pb-avatar{
  width:28px;height:28px;background:#957c46;color:#1a1816;border-radius:50%;
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:.72rem;flex-shrink:0;
}
.pb-nav{flex:1;display:flex;flex-direction:column;padding-top:8px;}
.pb-nav-item{
  display:flex;align-items:center;gap:10px;padding:10px 20px;
  font-size:.82rem;color:#555;text-decoration:none;cursor:pointer;
  border:none;background:transparent;font-family:inherit;text-align:left;width:100%;
  transition:background .15s;
}
.pb-nav-item:hover{background:rgba(0,0,0,.04);color:#1a1816;}
.pb-nav-item > i:first-child{width:16px;color:#b0b0b0;font-size:.92rem;}
.pb-nav-item .caret{margin-left:auto;color:#c4c4c4;font-size:.72rem;}
.pb-nav-item.pb-active-leaf{background:#7d6739;color:#fff;font-weight:600;}
.pb-nav-item.pb-active-leaf > i:first-child{color:rgba(255,255,255,.85);}
.pb-nav-item.pb-active-leaf .caret{color:rgba(255,255,255,.7);}
.pb-nav-parent.pb-open{background:#7d6739;color:#fff;font-weight:700;}
.pb-nav-parent.pb-open > i:first-child{color:#fff;}
.pb-nav-parent.pb-open .caret{color:rgba(255,255,255,.7);}
.pb-nav-sub-wrap{background:#2a2a2c;max-height:0;overflow:hidden;transition:max-height .25s ease;}
.pb-nav-parent.pb-open + .pb-nav-sub-wrap{max-height:500px;}
.pb-nav-sub{
  display:flex;align-items:center;gap:10px;padding:9px 20px 9px 38px;
  font-size:.76rem;color:rgba(255,255,255,.65);text-decoration:none;transition:background .15s;
  font-family:'Albert Sans',sans-serif;
}
.pb-nav-sub:hover{background:#333336;color:#fff;}
.pb-nav-sub.pb-active{background:#1c1c1e;color:#fff;font-weight:600;}
.pb-nav-sub i{width:14px;font-size:.78rem;opacity:.7;}
.pb-nav-footer{margin-top:auto;padding-top:8px;padding-bottom:8px;border-top:1px solid rgba(0,0,0,.06);}
.pb-nav-grupo-admin{display:none;}
.pb-nav-grupo-admin.pb-admin-on{display:block;}
.pb-hamburger{
  position:fixed;top:14px;left:14px;z-index:1100;width:38px;height:38px;
  background:#1a1816;color:#fff;border:none;border-radius:6px;cursor:pointer;
  display:none;align-items:center;justify-content:center;font-size:1rem;
  box-shadow:0 2px 8px rgba(0,0,0,.2);
}
.pb-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:999;pointer-events:none;}
.pb-overlay.pb-show{display:block;pointer-events:auto;}
body.pb-has-sidebar{padding-left:272px;transition:padding-left .2s ease;}

body.pb-collapsed .pb-sidebar{width:56px;min-width:56px;}
body.pb-collapsed.pb-has-sidebar{padding-left:88px;}
body.pb-collapsed .pb-sidebar-logo{justify-content:center;padding:18px 0 14px;}
body.pb-collapsed .logo-text{display:none;}
body.pb-collapsed .pb-sidebar-user{justify-content:center;padding:10px 0;}
body.pb-collapsed .pb-user-nome{display:none;}
body.pb-collapsed .pb-nav-item{justify-content:center;padding:12px 0;font-size:0;position:relative;}
body.pb-collapsed .pb-nav-item > i:first-child{font-size:.98rem;width:auto;}
body.pb-collapsed .pb-nav-item .caret{display:none;}
body.pb-collapsed .pb-nav-sub-wrap{max-height:0 !important;}
body.pb-collapsed .pb-nav-item:hover::after{
  content:attr(data-label);position:absolute;left:60px;top:50%;transform:translateY(-50%);
  background:#2c2c2e;color:#fff;font-size:.72rem;font-weight:400;white-space:nowrap;
  padding:5px 9px;border-radius:4px;box-shadow:0 3px 10px rgba(0,0,0,.3);z-index:1200;
}
body.pb-has-sidebar > .topbar,
body.pb-has-sidebar .container > .header{display:none !important;}

@media (max-width:768px){
  .pb-sidebar{transform:translateX(-100%);box-shadow:2px 0 20px rgba(0,0,0,.15);}
  .pb-sidebar.pb-open{transform:translateX(0);}
  .pb-hamburger{display:flex;}
  .pb-collapse-btn{display:none;}
  body.pb-has-sidebar{padding-left:0 !important;padding-top:60px !important;}
  body.pb-collapsed .pb-sidebar{width:240px !important;min-width:240px !important;}
  body.pb-collapsed.pb-has-sidebar{padding-left:0 !important;}
  body.pb-collapsed .logo-text,
  body.pb-collapsed .pb-user-nome{display:flex;}
  body.pb-collapsed .pb-nav-item{justify-content:flex-start;padding:10px 20px;font-size:.82rem;}
  body.pb-collapsed .pb-nav-item .caret{display:block;}
  body.pb-collapsed .pb-nav-parent.pb-open + .pb-nav-sub-wrap{max-height:500px !important;}
}

/* ---- breadcrumb + título de página (padrão Gestão) ---- */
.pb-breadcrumb{
  background:#fff;padding:8px 20px;margin-bottom:24px;
  font-size:.78rem;color:#888;display:flex;align-items:center;gap:6px;flex-wrap:wrap;
}
.pb-breadcrumb a{color:#888;text-decoration:none;}
.pb-breadcrumb a:hover{color:#555;}
.pb-breadcrumb .bc-sep{font-size:.6rem;color:#bbb;}
.pb-breadcrumb .current{color:#555;}
.pb-breadcrumb i.bc-ic{font-size:.72rem;}
.pg-title{color:#333;margin:0 0 28px;}
.pg-title:has(+ .subtitle){margin-bottom:6px;}
.pg-header{padding:0 20px;max-width:none;}

/* Preenche a altura da viewport (evita faixa escura acima do rodapé). */
body.pb-has-sidebar{ display:flex; flex-direction:column; min-height:100vh; }
#appContent{ flex:1 0 auto; flex-direction:column; }
#appContent > .container{ display:flex; flex-direction:column; flex:1 0 auto; }
#appContent .table-wrap{ flex:1 0 auto; }

@media (min-width:769px){
  body.pb-has-sidebar{padding-left:272px;padding-right:32px;padding-top:0;}
  body.pb-collapsed.pb-has-sidebar{padding-left:88px;}
  body.pb-has-sidebar .container{max-width:none;margin:0;padding-left:0;padding-right:0;}
  body.pb-has-sidebar .pg-header{max-width:none;padding-left:0;padding-right:0;}
  body.pb-has-sidebar .pb-breadcrumb,
  body.pb-has-sidebar .breadcrumb{background:transparent;border:0;margin:0 -32px 18px -32px;padding:10px 32px 10px 37px;font-size:14.8px;}
  body.pb-has-sidebar h1,
  body.pb-has-sidebar .pg-title,
  body.pb-has-sidebar .pg-title2{margin-top:0;}
}
@media (max-width:768px){
  body.pb-has-sidebar .pb-breadcrumb,
  body.pb-has-sidebar .breadcrumb{background:transparent;border:0;margin:0 0 14px;padding:6px 0 7px;font-size:14.8px;}
}
