/* =========================================================
   PORTAL CSS - HEI V2
   =========================================================
   Arquivo consolidado e higienizado.

   Objetivos desta versão:
   - remover duplicações
   - manter a base visual já construída
   - consolidar o menu modular novo
   - evitar conflitos de cascata
   - preservar organização por blocos
   - corrigir o botão dropdown do header
   ========================================================= */


/* =========================================================
   BASE NEUTRA / GLOBAL
   ========================================================= */

:root{
  --hei-text:#1f2937;
  --hei-muted:#6b7280;
  --hei-line:#e5e7eb;
  --hei-soft:#f3f4f6;
  --hei-soft-2:#f9fafb;

  /* Ações neutras */
  --hei-btn-bg:#ffffff;
  --hei-btn-bd:#d1d5db;
  --hei-btn-tx:#374151;

  /* Botão principal */
  --hei-primary-bg:#4b5563;
  --hei-primary-bd:#4b5563;
  --hei-primary-tx:#ffffff;

  /* Estados */
  --hei-ok-bg:#eef6f0;
  --hei-ok-bd:#cfe7d5;

  --hei-err-bg:#fdecee;
  --hei-err-bd:#f1b7be;
  --hei-err-tx:#b42318;

  --hei-danger:#b42318;
  --hei-warn:#b54708;
  --hei-success:#067647;
}

*,
*::before,
*::after{
  box-sizing:border-box;
}

html,
body{
  overflow-x:hidden;
}

html{
  overflow-y:scroll;
}

/* Wrap principal do portal */
.hei-wrap{
  max-width:1180px;
  margin:0 auto;
  padding:20px 20px 60px;
  font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color:var(--hei-text);
  overflow-x:clip;
  min-width:0;
}

.hei-card{
  border:0;
  box-shadow:none;
  border-radius:0;
  padding:0;
  background:transparent;
  min-width:0;
}

.hei-head{
  margin-bottom:10px;
}

.hei-head h2{
  margin:0 0 4px 0;
  font-size:22px;
  font-weight:600;
  letter-spacing:-0.2px;
}

.hei-sub{
  margin:0;
  color:var(--hei-muted);
  font-size:13px;
  font-weight:400;
}

.hei-hr{
  border:0;
  height:1px;
  background:var(--hei-line);
  margin:16px 0;
}

.hei-muted{
  color:var(--hei-muted);
  font-size:13px;
  font-weight:400;
}

.hei-section-title{
  margin:22px 0 12px;
  font-size:16px;
  font-weight:600;
  color:#667085;
  border-bottom:1px solid var(--hei-line);
  padding-bottom:10px;
}

.hei-card h3{
  margin:18px 0 10px;
  font-size:18px;
  font-weight:600;
  letter-spacing:-0.2px;
  color:#111827;
}


/* =========================================================
   AUTH PÚBLICO / LOGIN / RESET
   ========================================================= */

.hei-public-auth{
  min-height:calc(100vh - 120px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:40px 20px 60px;
}

.hei-public-auth__shell{
  width:100%;
  max-width:500px;
  background:#fff;
  border:1.5px solid #5a00e0;
  border-radius:22px;
  overflow:hidden;
  box-shadow:0 8px 26px rgba(17,24,39,.05);
}

.hei-public-auth__shell--empresa{
  max-width:820px;
}

.hei-public-auth__top{
  background:#4b00d8;
  min-height:78px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px 20px;
}

.hei-public-auth__top--empresa{
  min-height:96px;
  background:#ffffff;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px 24px 18px;
}

.hei-public-auth__empresa-line{
  height:5px;
  width:100%;
}

.hei-public-auth__logo img{
  display:block;
  max-width:170px;
  width:auto;
  height:auto;
}

.hei-public-auth__logo--empresa{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:52px;
}

.hei-public-auth__logo--empresa img{
  display:block;
  max-width:220px;
  max-height:58px;
  width:auto;
  height:auto;
  object-fit:contain;
}

.hei-public-auth__logo-fallback{
  display:inline-block;
  font-size:28px;
  line-height:1.1;
  font-weight:700;
  letter-spacing:-0.02em;
  text-align:center;
}

.hei-public-auth__logo-fallback--dark{
  color:#111827;
}

.hei-public-auth__body{
  padding:50px 56px 20px;
}

.hei-auth-box{
  width:100%;
  max-width:none;
  margin:0;
}

.hei-auth-box--wide{
  max-width:none;
  text-align:center;
}

.hei-auth-box h3{
  margin:0 0 10px;
  font-size:20px;
  font-weight:700;
  color:#111827;
}

.hei-auth-box p{
  margin:0 0 18px;
  color:#94a3b8;
  line-height:1.5;
}

.hei-auth-box label{
  display:block;
  margin:0 0 6px;
  font-size:14px;
  font-weight:600;
  color:#374151;
}

.hei-auth-box input[type="text"],
.hei-auth-box input[type="email"],
.hei-auth-box input[type="password"],
.hei-auth-box select{
  width:100%;
  min-height:44px;
  padding:10px 12px;
  border:1px solid #d1d5db;
  border-radius:8px;
  background:#fff;
  font-size:14px;
  color:#111827;
}

.hei-auth-box input[type="text"]:focus,
.hei-auth-box input[type="email"]:focus,
.hei-auth-box input[type="password"]:focus,
.hei-auth-box select:focus{
  outline:none;
  border-color:#9ca3af;
  box-shadow:0 0 0 3px rgba(156,163,175,.18);
}

.hei-auth-box .button,
.hei-auth-box input[type="submit"],
.hei-auth-box button[type="submit"],
.hei-auth-box .hei-btn{
  min-height:44px;
  border-radius:8px;
}

/* Botão principal do auth */
.hei-auth-box input[type="submit"],
.hei-auth-box button[type="submit"],
.hei-auth-box .button.button-primary,
.hei-auth-box .button-primary{
  width:100%;
  padding:10px 16px;
  border:1px solid #4b00d8 !important;
  background:#4b00d8 !important;
  color:#fff !important;
  font-size:14px;
  font-weight:700;
  line-height:1.2;
  text-align:center;
  box-shadow:none;
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
  transition:background .15s ease, border-color .15s ease, transform .08s ease, box-shadow .15s ease;
}

.hei-auth-box input[type="submit"]:hover,
.hei-auth-box button[type="submit"]:hover,
.hei-auth-box .button.button-primary:hover,
.hei-auth-box .button-primary:hover{
  background:#3f00b6 !important;
  border-color:#3f00b6 !important;
  color:#fff !important;
  transform:translateY(-1px);
  box-shadow:0 6px 18px rgba(75,0,216,.25);
}

.hei-auth-box input[type="submit"]:active,
.hei-auth-box button[type="submit"]:active,
.hei-auth-box .button.button-primary:active,
.hei-auth-box .button-primary:active{
  transform:translateY(1px);
}

.hei-auth-box input[type="submit"]:focus,
.hei-auth-box button[type="submit"]:focus,
.hei-auth-box .button.button-primary:focus,
.hei-auth-box .button-primary:focus{
  outline:none;
  box-shadow:0 0 0 3px rgba(75,0,216,.18) !important;
}

.hei-auth-actions{
  margin-top:14px;
  text-align:center;
}

.hei-auth-actions .hei-btn-outline{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:160px;
  padding:10px 16px;
  border:1px solid #d1d5db;
  border-radius:10px;
  background:#fff;
  color:#374151;
  text-decoration:none;
  font-weight:600;
}

.hei-auth-actions .hei-btn-outline:hover{
  background:#f8fafc;
}

.hei-auth-choice{
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap;
  margin-top:10px;
}

.hei-auth-choice .hei-btn{
  min-width:180px;
}

.hei-auth-help{
  margin:6px 0 0;
  font-size:13px;
  color:#6b7280 !important;
}

.hei-auth-check{
  margin:12px 0 0;
  font-size:14px;
  color:#374151;
}

.hei-auth-check label{
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  margin:0;
  font-weight:500;
}

.hei-auth-check input[type="checkbox"]{
  width:16px;
  height:16px;
}

.hei-msg-sucesso,
.hei-msg-erro{
  margin-bottom:14px;
}


/* =========================================================
   GRID / LAYOUT
   ========================================================= */

.hei-grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px 24px;
  margin-top:12px;
}

.hei-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  flex-wrap:wrap;
  min-width:0;
}

.hei-inline{
  display:inline;
}


/* =========================================================
   BOTÕES / LINKS
   ========================================================= */

.hei-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:20px;
  margin-bottom:50px;
  max-width:100%;
  min-width:0;
}

.hei-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:8px;
  border:1px solid var(--hei-btn-bd);
  text-decoration:none;
  background:var(--hei-btn-bg);
  color:var(--hei-btn-tx);
  cursor:pointer;
  font-weight:600;
  font-size:13px;
  line-height:1.1;
  transition:background .12s ease, border-color .12s ease, transform .06s ease;
}

.hei-btn:hover{
  background:var(--hei-soft);
  border-color:#cbd5e1;
}

.hei-btn:active{
  transform:translateY(1px);
}

.hei-btn-primary{
  border-color:var(--hei-primary-bd);
  background:var(--hei-primary-bg);
  color:var(--hei-primary-tx);
}

.hei-btn-primary:hover{
  background:#374151;
  border-color:#374151;
  color:#ffffff;  
}

.hei-link{
  text-decoration:none;
  color:#4b5563;
}

.hei-link:hover{
  text-decoration:underline;
}

/* Botão pequeno base */
.hei-btn-sm{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:8px;
  border:1px solid var(--hei-btn-bd);
  background:#fff;
  color:var(--hei-btn-tx);
  cursor:pointer;
  font-weight:600;
  font-size:12px;
  line-height:1;
  text-decoration:none;
  transition:background .12s ease, border-color .12s ease, opacity .12s ease;
}

.hei-btn-sm:hover{
  background:var(--hei-soft);
  border-color:#cbd5e1;
}

/* Variações para ações */
.hei-btn-edit{
  background:#f3f4f6;
  color:#111827;
  border-color:#d1d5db;
}

.hei-btn-success{
  background:#16a34a;
  color:#ffffff;
  border-color:#16a34a;
}

.hei-btn-danger{
  background:#dc2626;
  color:#ffffff;
  border-color:#dc2626;
}


/* =========================================================
   ALERTAS
   ========================================================= */

.hei-alert,
.hei-msg-sucesso,
.hei-msg-erro,
.hei-ok,
.hei-err{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--hei-line);
  font-size:13px;
  font-weight:600;

}

.hei-alert{
  margin:12px 0;
  background:#ffd368;
}

.hei-msg-sucesso,
.hei-ok{
  background:var(--hei-ok-bg);
  border-color:var(--hei-ok-bd);
  color:#111827;
}

.hei-msg-erro,
.hei-err{
  background:var(--hei-err-bg);
  border-color:var(--hei-err-bd);
  color:var(--hei-err-tx);
}


/* =========================================================
   FORM
   ========================================================= */

.hei-form-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:10px 40px;
  width:100%;
  min-width:0;
}

.hei-form-grid--public{
  grid-template-columns:1fr 1fr;
  gap:14px 24px;
  margin-top:10px;
}

.hei-field{
  display:grid;
  grid-template-columns:190px minmax(0,1fr);
  gap:10px 14px;
  align-items:center;
  min-width:0;
}

.hei-field--public{
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:stretch;
}

.hei-field label{
  margin:0;
  font-size:13px;
  font-weight:600;
  color:#4a4a4a;
  min-width:0;
}

.hei-field--public label{
  margin:0;
  font-size:14px;
  font-weight:600;
  color:#374151;
}

.hei-input{
  width:100%;
  max-width:100%;
  min-width:0;
  padding:10px 12px;
  border:1px solid #d1d5db;
  border-radius:8px;
  outline:none;
  background:#fff;
  color:var(--hei-text);
  font-size:13px;
  box-sizing:border-box;
}

.hei-field input,
.hei-field select,
.hei-field textarea{
  width:100%;
  max-width:100%;
  min-width:0;
}

.hei-field--public .hei-input{
  min-height:44px;
}

select.hei-input{
  background-color:#fff;
  color:var(--hei-text);
}

.hei-input:focus{
  border-color:#9ca3af;
  box-shadow:0 0 0 3px rgba(156,163,175,.25);
}

.hei-field.is-invalid .hei-input,
.hei-field--public.is-invalid .hei-input{
  border-color:#ef4444;
  box-shadow:0 0 0 3px rgba(239,68,68,.12);
}

.hei-error{
  grid-column:2 / 3;
  margin-top:-6px;
  color:#b42318;
  font-size:12px;
  font-weight:600;
}

.hei-error--public{
  margin-top:2px;
  font-size:12px;
  font-weight:600;
  color:#b42318;
}

.hei-card,
.hei-form-grid,
.hei-company-grid,
.hei-row{
  min-width:0;
}

.hei-alert,
.hei-tabs{
  max-width:100%;
  min-width:0;
}


/* =========================================================
   TABELA
   ========================================================= */

.hei-table-wrap{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  border:1px solid var(--hei-line);
  border-radius:10px;
  background:#fff;
}

.hei-table{
  width:100%;
  border-collapse:collapse;
  min-width:760px;
}

.hei-table th,
.hei-table td{
  padding:10px;
  border-bottom:1px solid #eef2f7;
  text-align:left;
  font-size:13px;
  vertical-align:middle;
}

.hei-table th{
  background:var(--hei-soft-2);
  font-size:12px;
  font-weight:600;
  color:#374151;
}

.hei-status{
  display:inline-flex;
  align-items:center;
  padding:3px 10px;
  border-radius:999px;
  border:1px solid #e5e7eb;
  background:#fff;
  font-size:12px;
  font-weight:600;
  line-height:1;
}

.hei-status--ativo{
  border-color:rgba(6,118,71,.20);
  background:rgba(6,118,71,.06);
  color:var(--hei-success);
}

.hei-status--pendente{
  border-color:rgba(181,71,8,.20);
  background:rgba(181,71,8,.06);
  color:var(--hei-warn);
}

.hei-status--recusado{
  border-color:rgba(180,35,24,.22);
  background:rgba(180,35,24,.06);
  color:var(--hei-danger);
}

.hei-table button,
.hei-table .hei-btn-sm{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:8px;
  font-weight:600;
  font-size:12px;
  line-height:1;
  cursor:pointer;
}

.hei-actions-col{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}


/* =========================================================
   ABAS
   ========================================================= */

.hei-tabs{
  display:flex;
  gap:10px;
  align-items:flex-end;
  border-bottom:1px solid var(--hei-line);
  margin:12px 0 18px;
  padding:0 2px;
  overflow-x:auto;
  scrollbar-width:none;
}

.hei-tabs::-webkit-scrollbar{
  display:none;
}

.hei-tab{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border:1px solid var(--hei-line);
  border-bottom:0;
  border-top-left-radius:12px;
  border-top-right-radius:12px;
  background:#f6f7f9;
  color:#374151;
  text-decoration:none;
  font-weight:600;
  font-size:13px;
  line-height:1;
  position:relative;
  top:1px;
  white-space:nowrap;
  transition:background .12s ease, color .12s ease, border-color .12s ease;
}

.hei-tab:hover{
  background:#eef0f3;
  border-color:#d7dde6;
}

.hei-tab.is-active{
  background:#fff;
  color:#111827;
  border-color:#d7dde6;
  z-index:2;
}

.hei-tab.is-active::after{
  content:"";
  position:absolute;
  left:-1px;
  right:-1px;
  bottom:-1px;
  height:2px;
  background:#fff;
}

.hei-tab.is-active::before{
  content:"";
  position:absolute;
  left:10px;
  right:10px;
  top:0;
  height:2px;
  border-radius:999px;
  background:#9ca3af;
  opacity:.55;
}

/* Aba "aguardando" com destaque */
.hei-tab.has-alert{
  background:#fff7ed;
  border-color:#fdba74;
  color:#c2410c;
  font-weight:600;
}

.hei-tab-badge{
  display:inline-block;
  margin-left:6px;
  min-width:18px;
  padding:0 6px;
  border-radius:999px;
  background:#ea580c;
  color:#fff;
  font-size:12px;
  line-height:18px;
  text-align:center;
  vertical-align:middle;
}


/* =========================================================
   PAGINAÇÃO
   ========================================================= */

.hei-pagination{
  margin:12px 0;
  padding:0;
}

.hei-pagination .page-numbers{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.hei-pagination .page-numbers li{
  margin:0;
  padding:0;
}

.hei-pagination .page-numbers a,
.hei-pagination .page-numbers span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 10px;
  border-radius:8px;
  border:1px solid var(--hei-btn-bd);
  background:#fff;
  color:var(--hei-btn-tx);
  text-decoration:none;
  font-weight:600;
  font-size:12px;
  line-height:1;
  transition:background .12s ease, border-color .12s ease, transform .06s ease;
}

.hei-pagination .page-numbers a:hover{
  background:var(--hei-soft);
  border-color:#cbd5e1;
}

.hei-pagination .page-numbers a:active{
  transform:translateY(1px);
}

.hei-pagination .page-numbers .current{
  border-color:var(--hei-primary-bd);
  background:var(--hei-primary-bg);
  color:var(--hei-primary-tx);
}

.hei-pagination .page-numbers .dots{
  border-color:transparent;
  background:transparent;
  padding:7px 4px;
  color:var(--hei-muted);
}

.hei-pagination .page-numbers .prev,
.hei-pagination .page-numbers .next{
  padding:7px 12px;
}

.hei-table-wrap + .hei-pagination{
  margin-top:14px;
}

.hei-pagination + .hei-table-wrap{
  margin-top:10px;
}


/* =========================================================
   SWITCH EMPRESA
   ========================================================= */

.hei-company-switch{
  border:1px solid var(--hei-line);
  border-radius:10px;
  background:#fff;
  padding:14px;
  margin:12px 0 14px;
}

.hei-company-switch__title{
  font-size:14px;
  font-weight:600;
  color:#111827;
  margin-bottom:10px;
}

.hei-company-switch__form{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.hei-company-switch__form .hei-input{
  max-width:720px;
}


/* =========================================================
   DADOS DA EMPRESA
   ========================================================= */

.hei-company-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.hei-company-box{
  border:1px solid var(--hei-line);
  border-radius:12px;
  background:#fff;
  padding:16px 18px;
}

.hei-read-grid{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.hei-read-row{
  display:grid;
  grid-template-columns:180px 1fr;
  gap:14px;
  align-items:flex-start;
  padding-bottom:10px;
  border-bottom:1px solid #f1f5f9;
}

.hei-read-row:last-child{
  border-bottom:0;
  padding-bottom:0;
}

.hei-read-label{
  font-size:13px;
  font-weight:600;
  color:#667085;
}

.hei-read-value{
  font-size:14px;
  color:#111827;
  word-break:break-word;
}

.hei-pill-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.hei-pill{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid #dbe3ea;
  background:#f8fafc;
  color:#334155;
  font-size:12px;
  font-weight:600;
  line-height:1;
}

.hei-pill--dark{
  background:#4b5563;
  border-color:#4b5563;
  color:#fff;
}

.hei-color-dot{
  width:18px;
  height:18px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.08);
  display:inline-block;
  flex:0 0 18px;
}


/* =========================================================
   DASHBOARD / HOME - GERAL
   ========================================================= */

.hei-dashboard{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:16px;
  margin-top:20px;
}

.hei-card-modulo{
  background:#fff;
  border:1px solid #e5e7eb;
  padding:20px;
  border-radius:12px;
  text-decoration:none;
  color:#111;
  font-weight:600;
  transition:.15s;
}

.hei-card-modulo:hover{
  transform:translateY(-2px);
  box-shadow:0 4px 10px rgba(0,0,0,.08);
}

.hei-home-card{
  padding:28px 30px 30px;
}

.hei-home-head{
  margin-bottom:18px;
}

.hei-home-colab{
  margin-top:8px;
}

.hei-home-colab-apresentacao{
  margin-bottom:20px;
}

.hei-home-colab-box{
  max-width:980px;
}

.hei-home-colab-box h3{
  margin:0 0 10px;
}

.hei-home-colab-box p{
  margin:0;
  line-height:1.75;
}

.hei-home-empty{
  margin-top:8px;
}

.hei-home-empty .hei-muted{
  font-size:14px;
}

.hei-home-news{
  margin-top:34px;
  padding-top:8px;
  border-top:1px solid var(--hei-line);
}

.hei-home-news .hei-home-head{
  margin-bottom:16px;
}

.hei-home-news-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:16px;
}

.hei-home-news-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:18px;
  transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.hei-home-news-card:hover{
  transform:translateY(-2px);
  box-shadow:0 4px 10px rgba(0,0,0,.08);
  border-color:#d8dee6;
}

.hei-home-news-meta{
  font-size:12px;
  font-weight:600;
  color:#6b7280;
  margin-bottom:10px;
}

.hei-home-news-title{
  margin:0 0 10px;
  font-size:18px;
  line-height:1.3;
  font-weight:700;
  color:#111827;
}

.hei-home-news-title a{
  color:inherit;
  text-decoration:none;
}

.hei-home-news-title a:hover{
  text-decoration:underline;
}

.hei-home-news-excerpt{
  font-size:14px;
  line-height:1.55;
  color:#4b5563;
  margin-bottom:14px;
}

.hei-home-news-link a{
  font-size:13px;
  font-weight:700;
  color:#374151;
  text-decoration:none;
}

.hei-home-news-link a:hover{
  text-decoration:underline;
}

.hei-home-news-empty{
  padding-top:4px;
}


/* =========================================================
   HOME DASHBOARD - GESTOR / ADMIN
   ========================================================= */

.hei-home-dash{
  margin:60px 0 28px;
}

.hei-home-dash-head{
  margin-bottom:18px;
}

.hei-home-dash-head h3{
  margin:0 0 6px;
  font-size:28px;
  line-height:1.2;
  color:#0f172a;
}

.hei-home-dash-head p{
  margin:0;
  font-size:14px;
  color:#64748b;
}

.hei-home-dash-cards{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:16px;
  margin-top:6px;
  margin-bottom:16px;
}

.hei-home-kpi-card{
  background:#ffffff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:18px 20px;
}

.hei-home-kpi-card.is-warning{
  border-color:#fdba74;
  background:#fff7ed;
}

.hei-home-kpi-value{
  font-size:30px;
  font-weight:700;
  line-height:1;
  color:#0f172a;
  margin-bottom:8px;
}

.hei-home-kpi-card.is-warning .hei-home-kpi-value{
  color:#c2410c;
}

.hei-home-kpi-label{
  font-size:13px;
  color:#64748b;
}

.hei-home-dash-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin-top:4px;
  margin-bottom:18px;
}

.hei-home-dash-card{
  background:#ffffff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:20px;
}

.hei-home-dash-title{
  margin-bottom:14px;
  font-size:16px;
  font-weight:700;
  color:#0f172a;
}

.hei-home-quick-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.hei-home-quick-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:0 14px;
  border:1px solid #dbe2ea;
  border-radius:10px;
  background:#f8fafc;
  color:#334155;
  text-decoration:none;
  font-weight:600;
  text-align:center;
}

.hei-home-quick-btn:hover{
  background:#f1f5f9;
}

.hei-home-alert-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:16px;
}

.hei-home-alert-item{
  display:flex;
  align-items:center;
  gap:10px;
}

.hei-home-alert-number{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:28px;
  padding:0 8px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:13px;
  font-weight:700;
}

.hei-home-alert-text{
  font-size:14px;
  color:#334155;
}

.hei-home-dash-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.hei-home-dash-barcard{
  margin-bottom:6px;
}

.hei-home-status-bars{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.hei-home-status-row{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.hei-home-status-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:14px;
  color:#334155;
}

.hei-home-status-track{
  width:100%;
  height:10px;
  border-radius:999px;
  background:#eef2f7;
  overflow:hidden;
}

.hei-home-status-fill{
  height:100%;
  border-radius:999px;
}

.hei-home-status-fill.is-active{
  background:#2563eb;
}

.hei-home-status-fill.is-pending{
  background:#ea580c;
}

.hei-home-status-fill.is-inactive{
  background:#94a3b8;
}


/* =========================================================
   SINGLE COMUNICADO
   ========================================================= */

body.single-post.category-comunicados{
  background:#fff;
}

.hei-comunicado-page{
  margin-top:22px;
}

.hei-comunicado-body{
  max-width:760px;
  margin:0 auto;
}

.hei-comunicado-single{
  background:transparent;
  border:0;
  border-radius:0;
  padding:0;
  box-shadow:none;
}

.hei-comunicado-header{
  margin-bottom:24px;
}

.hei-comunicado-meta{
  font-size:13px;
  font-weight:600;
  color:#6b7280;
  margin-bottom:10px;
}

.hei-comunicado-title{
  margin:0;
  font-size:42px;
  line-height:1.08;
  font-weight:800;
  letter-spacing:-0.03em;
  color:#111827;
}

.hei-comunicado-content{
  font-size:18px;
  line-height:1.85;
  color:#374151;
}

.hei-comunicado-content p{
  margin:0 0 18px;
}

.hei-comunicado-content h2,
.hei-comunicado-content h3,
.hei-comunicado-content h4{
  color:#111827;
  margin:28px 0 12px;
}

.hei-comunicado-content ul,
.hei-comunicado-content ol{
  margin:0 0 18px 22px;
}

.hei-comunicado-content a{
  color:#374151;
  font-weight:600;
}

.hei-comunicado-nav{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  margin-top:34px;
  padding-top:22px;
  border-top:1px solid var(--hei-line);
}

.hei-comunicado-nav__left,
.hei-comunicado-nav__right{
  display:flex;
}

.hei-comunicado-nav__item{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  text-decoration:none;
  transition:opacity .15s ease;
}

.hei-comunicado-nav__item:hover{
  opacity:.78;
}

.hei-comunicado-nav__item--right{
  text-align:right;
  align-items:flex-end;
}

.hei-comunicado-nav__label{
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#6b7280;
}

.hei-comunicado-nav__title{
  font-size:18px;
  font-weight:700;
  color:#111827;
  line-height:1.35;
}

/* =========================================================
   HEADER / MENU PORTAL V2
   ========================================================= */

.hei-portal-header-outer{
  width:100%;
  margin:0;
}

.hei-portal-header-wrap{
  max-width:1380px;
  margin:0 auto;
  padding:0;
}

.hei-portal-header-top{
  display:grid;
  grid-template-columns:1fr 1fr auto;
  align-items:end;
  gap:20px;
  min-height:72px;
  padding:40px 0 0;
}

.hei-portal-header-left{
  display:flex;
  align-items:flex-end;
  min-width:0;
}

.hei-portal-brand{
  display:flex;
  align-items:flex-end;
  text-decoration:none;
  color:inherit;
  min-width:0;
}

.hei-portal-logo-box{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  min-height:70px;
  max-width:340px;
  padding-bottom:8px; /* respiro do risco */
  padding-left: 15px;
}

.hei-portal-logo-box--image img{
  max-width:210px;     /* ~25% menor */
  max-height:52px;     /* controla logos quadrados */
  width:auto;
  height:auto;
  object-fit:contain;
  display:block;
}

.hei-portal-logo-fallback-text{
  display:block;
  font-size:30px;
  line-height:1.05;
  font-weight:700;
  color:#111827;
  letter-spacing:-0.03em;
  word-break:break-word;
}

.hei-portal-header-center{
  min-height:1px;
}

/* ---------------------------------------------
   Caixa de ações do header
   - mesma cor do risco do header
   - colada na linha
   --------------------------------------------- */
.hei-portal-header-right{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:0;
  position:relative;
  padding:10px 12px;
  padding-bottom:10px;
  margin-bottom:0;
  background:var(--hei-brand-color, #163a63);
  border-top-left-radius:18px;
  border-top-right-radius:18px;
  box-shadow:0 10px 24px rgba(15,23,42,.10);
  color:var(--hei-brand-contrast, #ffffff);
}

/* ---------------------------------------------
   Botões e links do header
   - mesma base para <a> e <button>
   - corrige o item do meio com submenu
   --------------------------------------------- */
.hei-portal-imagebtn,
.hei-portal-dropdown > .hei-portal-imagebtn,
.hei-portal-dropdown > button.hei-portal-imagebtn{
  width:44px;
  height:44px;
  min-width:44px;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  margin:0;
  border:0;
  outline:none;
  box-shadow:none;
  background:transparent;
  background-image:none;
  text-decoration:none;
  cursor:pointer;
  line-height:0;
  color:inherit;
  border-radius:10px;
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  flex:0 0 44px;
}

.hei-portal-imagebtn:hover,
.hei-portal-imagebtn:focus,
.hei-portal-imagebtn:active,
.hei-portal-dropdown > button.hei-portal-imagebtn:hover,
.hei-portal-dropdown > button.hei-portal-imagebtn:focus,
.hei-portal-dropdown > button.hei-portal-imagebtn:active,
.hei-portal-dropdown > button.hei-portal-imagebtn:focus-visible{
  background:rgba(255,255,255,.14) !important;
  box-shadow:none !important;
  outline:none !important;
  color:inherit !important;
}

.hei-portal-imagebtn svg{
  width:22px;
  height:22px;
  display:block;
  stroke:currentColor;
  fill:none;
  flex:0 0 22px;
}

.hei-portal-imagebtn:focus-visible{
  box-shadow:0 0 0 3px rgba(255,255,255,.16) !important;
}

.hei-portal-dropdown{
  position:relative;
  display:inline-flex;
  align-items:center;
  color:inherit;
}

.hei-portal-dropdown::after{
  content:"";
  position:absolute;
  left:-8px;
  right:-8px;
  top:100%;
  height:22px;
}

.hei-portal-dropdown-menu{
  display:none;
  position:absolute;
  top:calc(100% + 6px);
  right:0;
  min-width:190px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  box-shadow:0 14px 30px rgba(0,0,0,.08);
  padding:8px;
  z-index:1000;
}

.hei-portal-dropdown:hover .hei-portal-dropdown-menu,
.hei-portal-dropdown:focus-within .hei-portal-dropdown-menu{
  display:block;
}

.hei-portal-dropdown-menu a{
  display:block;
  padding:11px 12px;
  border-radius:8px;
  color:#374151;
  text-decoration:none;
  font-size:13px;
  font-weight:600;
}

.hei-portal-dropdown-menu a:hover,
.hei-portal-dropdown-menu a:focus-visible{
  background:#f3f4f6;
  color:#111827;
  outline:none;
}

.hei-portal-dropdown > .hei-portal-imagebtn{
  position:relative;
  z-index:1001;
}

.hei-portal-header-line{
  height:5px;
  width:100%;
  border-radius:0;
  margin-top:0;
  margin-bottom:0;
}


/* =========================================================
   MENU MODULAR HORIZONTAL - VISUAL DASHBOARD PREMIUM
   ========================================================= */

.hei-menu-modular-wrap{
  --hei-brand-color:#163a63;
  width:100%;
  margin:0 0 60px;
  padding:0;
  background:transparent;
  position:relative;
  z-index:30;
}

/* Barra principal */
.hei-categorias{
  display:flex;
  width:100%;
  margin:0;
  padding:0;
  gap:0;
  align-items:stretch;
  position:relative;
  overflow:hidden;
  border-radius:0;
  background:var(--hei-brand-color);
  box-shadow:
    0 10px 24px rgba(15,23,42,.08),
    0 2px 6px rgba(15,23,42,.05);
}

/* Categoria */
.hei-categoria-card{
  appearance:none;
  -webkit-appearance:none;
  flex:1 1 0;
  min-width:0;
  height:118px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  cursor:pointer;
  border:0;
  margin:0;
  padding:14px 12px;
  background:transparent;
  border-right:1px solid rgba(255,255,255,.10);
  color:#fff;
  position:relative;
  transition:
    background .18s ease,
    transform .12s ease,
    box-shadow .18s ease,
    opacity .18s ease;
}

.hei-categoria-card:last-child{
  border-right:none;
}

.hei-categoria-card::before{
  content:"";
  position:absolute;
  inset:0;
  background:transparent;
  pointer-events:none;
}

.hei-categoria-card:hover{
  background:rgba(255,255,255,.08);
}

.hei-categoria-card:focus{
  outline:none;
  box-shadow:none;
}
.hei-categoria-card:active{
  background:transparent;
  box-shadow:none;
}
.hei-categoria-card:focus-visible{
  z-index:3;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.28);
}

.hei-categoria-card.is-active{
  background:rgba(0,0,0,.16);
  box-shadow:inset 0 -3px 0 rgba(255,255,255,.12);
}

.hei-categoria-card.is-active:hover{
  background:rgba(255,255,255,.08);
}

.hei-categoria-card.is-active::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-9px;
  width:18px;
  height:18px;
  background:#ffffff;
  transform:translateX(-50%) rotate(45deg);
  border-radius:3px;
  z-index:5;
  box-shadow:4px 4px 14px rgba(15,23,42,.08);
}

/* Ícone */
.hei-categoria-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  line-height:0;
  flex:0 0 36px;
  position:relative;
  z-index:2;
}

.hei-categoria-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  line-height:0;
  flex:0 0 36px;
  position:relative;
  z-index:2;
  color:#ffffff;
}

.hei-categoria-icon img,
.hei-categoria-icon svg{
  width:30px;
  height:30px;
  display:block;
}

.hei-categoria-icon img{
  object-fit:contain;
  filter:brightness(0) invert(1);
}

.hei-categoria-icon svg{
  color:#ffffff;
}

/* Texto */
.hei-categoria-label{
  display:block;
  max-width:100%;
  color:#fff;
  font-size:20px;
  font-weight:700;
  line-height:1.15;
  text-align:center;
  white-space:normal;
  word-break:break-word;
  letter-spacing:-0.01em;
  position:relative;
  z-index:2;
}

/* Área dos painéis em layer */
.hei-modulos-paineis{
  position:absolute;
  top:100%;
  left:0;
  width:100%;
  margin:0;
  padding:18px 0 0;
  background:transparent;
  pointer-events:none;
  z-index:40;
}

/* Painel individual */
.hei-modulos{
  display:none;
  position:absolute;
  top:0;
  left:0;
  flex-wrap:wrap;
  gap:10px;
  margin:0;
  padding:10px 16px;
  width:max-content;
  max-width:min(820px, 100%);

  background:#eef2f7;
  border:1px solid rgba(15,23,42,.06);
  border-radius:0;
  box-shadow:none;

  pointer-events:auto;
  animation:heiFadeModules .18s ease;
  backdrop-filter:none;
}

.hei-modulos.is-active{
  display:flex;
}

/* =========================================
   SUBMENU DE MÓDULOS
========================================= */



.hei-submenu{
  display:flex;
  align-items:center;
  gap:0;
  padding:0;
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
}

.hei-submenu a{
  position:relative;
  font-size:13px;
  font-weight:600;
  color:#64748b;
  text-decoration:none;
  padding:4px 14px;
  border-bottom:2px solid transparent;
  background:transparent;
  border-radius:0;
  box-shadow:none;
  transition:color .15s ease, border-color .15s ease;
}

.hei-submenu a:hover{
  color:#0f172a;
}

.hei-submenu a.active{
  color:#0f172a;
  border-bottom:2px solid var(--hei-brand-color);
}

/* linha divisória */
.hei-submenu a + a::before{
  content:"";
  position:absolute;
  left:0;
  top:50%;
  transform:translateY(-50%);
  width:1px;
  height:16px;
  background:#dc2626; /* vermelho */
}


/* =========================================================
   ESCONDER HEADER DO TEMA
   ========================================================= */

body.page .site-header,
body.page header.site-header,
body.page .main-navigation,
body.page .ast-builder-menu,
body.page .ast-primary-header-bar,
body.page .ast-header-break-point,
body.page .entry-header,
body.single-post.category-comunicados .site-header,
body.single-post.category-comunicados header.site-header,
body.single-post.category-comunicados .main-navigation,
body.single-post.category-comunicados .ast-builder-menu,
body.single-post.category-comunicados .ast-primary-header-bar,
body.single-post.category-comunicados .ast-header-break-point,
body.single-post.category-comunicados .entry-header{
  display:none !important;
}

body.page .site-content,
body.page .ast-container,
body.page .entry-content,
body.page .ast-article-post,
body.page .site-content > .ast-container,
body.single-post.category-comunicados .site-content,
body.single-post.category-comunicados .ast-container,
body.single-post.category-comunicados .entry-content,
body.single-post.category-comunicados .ast-article-post,
body.single-post.category-comunicados .site-content > .ast-container{
  max-width:100% !important;
}

body.page .site-content > .ast-container,
body.single-post.category-comunicados .site-content > .ast-container{
  padding-left:0 !important;
  padding-right:0 !important;
}

body.page .entry-content > .hei-portal-header-outer,
body.page .entry-content > .hei-wrap{
  width:100%;
}

body.page .entry-content,
body.single-post.category-comunicados .entry-content{
  margin-top:0 !important;
}

body.page .site-main,
body.single-post.category-comunicados .site-main{
  margin-top:0 !important;
  padding-top:0 !important;
}

body.page .ast-separate-container #primary,
body.page .ast-separate-container.ast-right-sidebar #primary,
body.page .ast-separate-container.ast-left-sidebar #primary,
body.single-post.category-comunicados .ast-separate-container #primary,
body.single-post.category-comunicados .ast-separate-container.ast-right-sidebar #primary,
body.single-post.category-comunicados .ast-separate-container.ast-left-sidebar #primary{
  margin:0 !important;
}

body.page .ast-plain-container.ast-no-sidebar #primary,
body.page .ast-page-builder-template .site-content > .ast-container,
body.single-post.category-comunicados .ast-plain-container.ast-no-sidebar #primary,
body.single-post.category-comunicados .ast-page-builder-template .site-content > .ast-container{
  max-width:100% !important;
  padding:0 !important;
}

body.page .entry-content > .hei-wrap.hei-mapeamento{
  margin-top:0 !important;
  padding-top:0 !important;
}

body.page .entry-content > .hei-wrap.hei-mapeamento .hei-bib-module-head{
  margin-top:0 !important;
  padding-top:0 !important;
}

body.page .entry-content > .hei-wrap.hei-mapeamento h2{
  margin-top:0 !important;
}
/* =========================================================
   FIX TOPO - PAGINAS DO PORTAL
   ========================================================= */

body.page #content.site-content,
body.page .site-content,
body.page .site-content > .ast-container,
body.page #primary,
body.page .site-main,
body.page article.page,
body.page .ast-article-single,
body.page .entry-content{
  margin-top:0 !important;
  padding-top:0 !important;
}

/* Remove qualquer respiro extra antes do topo do portal */
body.page .entry-content > .hei-portal-header-outer:first-child,
body.page .entry-content > .hei-wrap:first-child{
  margin-top:0 !important;
  padding-top:0 !important;
}

/* Garante que o primeiro bloco do portal encoste corretamente no topo útil */
body.page .hei-portal-header-outer{
  margin-top:0 !important;
}

/* =========================================================
   MODAL COMUNICADOS
   ========================================================= */

.hei-modal{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.36);
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  z-index:9999;
  width:100%;
  height:100%;
  margin:0;
}

.hei-modal.active{
  display:flex;
}

.hei-modal-content{
  position:relative;
  width:100%;
  max-width:760px;
  max-height:82vh;
  background:#fff;
  border-radius:18px;
  box-shadow:0 24px 60px rgba(15,23,42,.22);
  overflow:hidden;
}

.hei-modal-close{
  position:absolute;
  top:16px;
  right:18px;
  width:36px;
  height:36px;
  border:0;
  border-radius:999px;
  background:#f3f4f6;
  color:#111827;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:2;
}

.hei-modal-close:hover{
  background:#e5e7eb;
}

.hei-modal-shell{
  display:flex;
  flex-direction:column;
  max-height:82vh;
}

.hei-modal-header{
  padding:28px 72px 18px 32px;
  border-bottom:1px solid #eef2f7;
  background:#fff;
  flex:0 0 auto;
}

.hei-modal-date{
  font-size:12px;
  font-weight:700;
  color:#6b7280;
  letter-spacing:.02em;
  margin-bottom:10px;
}

.hei-modal-title{
  margin:0;
  font-size:24px;
  line-height:1.15;
  font-weight:800;
  letter-spacing:-0.02em;
  color:#111827;
}

.hei-modal-body{
  padding:24px 32px 30px;
  overflow:auto;
  flex:1 1 auto;
}

.hei-comunicado-modal-content{
  font-size:17px;
  line-height:1.8;
  color:#374151;
}

.hei-comunicado-modal-content p{
  margin:0 0 16px;
}

.hei-comunicado-modal-content h2,
.hei-comunicado-modal-content h3,
.hei-comunicado-modal-content h4{
  margin:24px 0 10px;
  color:#111827;
}

.hei-comunicado-modal-content ul,
.hei-comunicado-modal-content ol{
  margin:0 0 16px 20px;
}

.hei-comunicado-modal-content a{
  color:#374151;
  font-weight:600;
}


/* =========================================================
   RESPONSIVO
   ========================================================= */

@media (max-width:1100px){
  .hei-categoria-card{
    height:104px;
  }

  .hei-categoria-label{
    font-size:17px;
  }
}

@media (max-width:980px){
  .hei-portal-header-top{
    grid-template-columns:1fr auto;
    gap:14px;
    align-items:center;
  }

  .hei-portal-header-center{
    display:none;
  }

  .hei-home-dash-cards{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .hei-home-dash-grid{
    grid-template-columns:1fr;
  }

  .hei-home-quick-actions{
    grid-template-columns:1fr;
  }
}

@media (max-width:900px){
  .hei-grid-2{
    grid-template-columns:1fr;
  }

  .hei-form-grid{
    grid-template-columns:1fr;
  }

  .hei-form-grid--public{
    grid-template-columns:1fr;
  }

  .hei-field{
    grid-template-columns:1fr;
  }

  .hei-error{
    grid-column:1 / 2;
    margin-top:6px;
  }

  .hei-company-grid{
    grid-template-columns:1fr;
  }

  .hei-read-row{
    grid-template-columns:1fr;
    gap:4px;
  }

  .hei-comunicado-page{
    margin-top:18px;
  }

  .hei-comunicado-body{
    max-width:100%;
  }

  .hei-comunicado-title{
    font-size:30px;
  }

  .hei-comunicado-content{
    font-size:16px;
  }

  .hei-comunicado-nav{
    grid-template-columns:1fr;
  }

  .hei-comunicado-nav__item--right{
    text-align:left;
    align-items:flex-start;
  }

  .hei-public-auth__shell--empresa{
    max-width:95%;
  }
}

@media (max-width:820px){
  .hei-categorias{
    flex-wrap:wrap;
  }

  .hei-categoria-card{
    flex:1 1 50%;
    height:92px;
    border-right:1px solid rgba(255,255,255,.10);
    border-bottom:1px solid rgba(255,255,255,.10);
  }

  .hei-categoria-card:nth-child(2n){
    border-right:none;
  }

  .hei-categoria-card.is-active::after{
    display:none;
  }

  .hei-modulos{
    max-width:min(92vw, 820px);
  }
}

@media (max-width:700px){
  .hei-wrap{
    margin-top:24px;
    padding:0 14px 60px;
  }

  .hei-portal-header-outer{
    margin:0;
  }

  .hei-portal-header-wrap{
    padding:0 14px;
  }

  .hei-portal-header-top{
    grid-template-columns:1fr;
    align-items:start;
    gap:14px;
    min-height:auto;
    padding-bottom:10px;
  }

  .hei-portal-header-left{
    justify-content:flex-start;
  }

  .hei-portal-header-right{
    justify-content:flex-end;
    width:max-content;
    margin-left:auto;
  }

  .hei-portal-logo-box--image img{
    max-width:220px;
    max-height:60px;
  }

  .hei-portal-logo-fallback-text{
    font-size:24px;
  }

  .hei-pagination .page-numbers{
    gap:6px;
  }

  .hei-pagination .page-numbers a,
  .hei-pagination .page-numbers span{
    padding:8px 10px;
    border-radius:10px;
  }

  .hei-modal{
    padding:14px;
  }

  .hei-modal-content{
    max-height:88vh;
    border-radius:14px;
  }

  .hei-modal-header{
    padding:22px 58px 16px 20px;
  }

  .hei-modal-title{
    font-size:21px;
  }

  .hei-modal-body{
    padding:18px 20px 22px;
  }

  .hei-comunicado-modal-content{
    font-size:16px;
  }
}

@media (max-width:640px){
  .hei-public-auth{
    padding:24px 14px 40px;
    align-items:flex-start;
  }

  .hei-public-auth__shell{
    max-width:95%;
    border-radius:18px;
  }

  .hei-public-auth__body{
    padding:26px 20px 24px;
  }

  .hei-home-dash-head h3{
    font-size:24px;
  }

  .hei-home-dash-cards{
    grid-template-columns:1fr;
  }
}

@media (max-width:600px){
  .hei-public-auth__shell{
    max-width:95%;
  }

  .hei-public-auth__body{
    padding:26px 20px 24px;
  }
}

@media (max-width:560px){
  .hei-categoria-card{
    height:82px;
    gap:8px;
    padding:10px 8px;
  }

  .hei-categoria-icon{
    width:30px;
    height:30px;
    flex-basis:30px;
  }

.hei-categoria-icon img,
.hei-categoria-icon svg{
  width:24px;
  height:24px;
}

  .hei-categoria-label{
    font-size:14px;
  }

  .hei-modulos{
    gap:8px;
    padding:12px;
  }

  .hei-modulo{
    min-height:34px;
    padding:0 13px;
    font-size:12px;
  }

  .hei-portal-header-right{
    padding:8px 10px;
  }
}

.hei-bib-badge--metric{
  background:#eef2f7;
  color:#334155;
  font-weight:600;
}




/* =========================================================
   BIBLIOTECA - VALIDAÇÃO DE APRENDIZADO
   ========================================================= */

/* o item do quiz precisa ocupar a linha inteira no grid pai */
.hei-form-grid > .hei-bib-field-quiz{
  grid-column:1 / -1 !important;
  width:100%;
  min-width:0;
}

/* container externo do quiz */
.hei-bib-field-quiz,
.hei-bib-video-quiz-wrap{
  width:100%;
  min-width:0;
}

/* box visual */
.hei-bib-quiz-box{
  width:100%;
  min-width:0;
  box-sizing:border-box;
}

/* dentro do quiz, NÃO usar o grid padrão label + input do sistema */
.hei-bib-quiz-box .hei-field{
  display:block !important;
  grid-template-columns:none !important;
  gap:0 !important;
  width:100%;
  min-width:0;
  margin:0 0 14px;
}

/* labels normais */
.hei-bib-quiz-box .hei-field label{
  display:block;
  margin:0 0 6px;
  font-size:13px;
  font-weight:600;
  color:#4a4a4a;
  line-height:1.4;
}

/* labels dos checkboxes mantêm flex */
.hei-bib-quiz-box .hei-field > label[style*="display:flex"]{
  display:flex !important;
  align-items:flex-start;
  gap:8px;
  margin:0;
}

.hei-bib-quiz-box .hei-field > label[style*="display:flex"] span{
  line-height:1.4;
}

/* inputs do quiz */
.hei-bib-quiz-box input[type="text"],
.hei-bib-quiz-box input[type="url"],
.hei-bib-quiz-box select,
.hei-bib-quiz-box textarea{
  width:100%;
  max-width:100%;
  min-width:0;
  min-height:42px;
  box-sizing:border-box;
}

/* checkboxes não podem herdar width 100% */
.hei-bib-quiz-box input[type="checkbox"]{
  width:auto !important;
  min-width:auto !important;
  height:auto;
  min-height:auto;
  margin-top:2px;
}

/* grid interno do quiz */
.hei-bib-quiz-box .hei-form-grid{
  display:grid !important;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px 16px;
  width:100%;
  min-width:0;
}

/* campos de largura total dentro do quiz */
.hei-bib-quiz-box .hei-field--full{
  grid-column:1 / -1 !important;
}

/* títulos internos */
.hei-bib-quiz-box h4,
.hei-bib-quiz-box h5{
  color:#111827;
}

.hei-bib-quiz-box h5{
  margin:0 0 10px;
  font-size:14px;
  font-weight:700;
}

/* melhora visual dos separadores */
.hei-bib-quiz-box > div[style*="border-top"]{
  width:100%;
  min-width:0;
}

/* responsivo */
@media (max-width: 768px){
  .hei-bib-quiz-box .hei-form-grid{
    grid-template-columns:1fr;
  }

  .hei-bib-quiz-box .hei-field--full{
    grid-column:auto !important;
  }
}


/* =========================================================
   QUIZ - CORREÇÃO DO CONTAINER EXTERNO
   ========================================================= */

.hei-field.hei-bib-field-quiz{
  grid-template-columns:none !important;
  width:100% !important;
  min-width:0;
}

.hei-field.hei-bib-field-quiz > .hei-bib-quiz-box{
  width:100% !important;
  min-width:0;
  display:block;
  box-sizing:border-box;
}


.hei-bib-quiz-modal-inner{
  max-width:720px;
  background:#fff;
  border-radius:16px;
  padding:24px;
}

.hei-bib-quiz-shell{
  width:100%;
}

.hei-bib-quiz-question h4{
  margin:0 0 12px;
  font-size:16px;
  color:#111827;
}

.hei-bib-quiz-question label{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px 0;
  cursor:pointer;
}

.hei-bib-quiz-question input[type="radio"]{
  margin-top:3px;
}


.hei-bib-status{
  margin-top:8px;
}

.hei-bib-status-ok{
  display:inline-block;
  background:#dcfce7;
  color:#166534;
  font-size:12px;
  font-weight:600;
  padding:4px 10px;
  border-radius:999px;
}

.hei-bib-status-pending{
  display:inline-block;
  background:#f1f5f9;
  color:#475569;
  font-size:12px;
  font-weight:600;
  padding:4px 10px;
  border-radius:999px;
}


.hei-bib-quiz-resultado{
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid #e5e7eb;
}

.hei-bib-quiz-resultado-titulo{
  margin:0 0 10px;
  font-size:18px;
  color:#111827;
}

.hei-bib-quiz-resultado-resumo{
  margin:0 0 14px;
  color:#374151;
  font-weight:600;
}

.hei-bib-quiz-feedback-item{
  padding:10px 12px;
  border-radius:10px;
  margin-bottom:10px;
  font-size:14px;
  font-weight:600;
}

.hei-bib-quiz-feedback-item.is-correct{
  background:#dcfce7;
  color:#166534;
}

.hei-bib-quiz-feedback-item.is-wrong{
  background:#fee2e2;
  color:#991b1b;
}



.hei-bib-card.is-concluido .hei-bib-status-pending{
  display:none !important;
}

.hei-bib-card.is-concluido .hei-bib-status-ok{
  display:inline-block !important;
}



/* =========================================================
   BIBLIOTECA - DASHBOARD KPI
   ========================================================= */

.hei-bib-dashboard{
  margin-top:10px;
}

.hei-bib-kpi-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:18px;
}

.hei-bib-kpi-card{
  background:#ffffff;
  border:1px solid #e5e7eb;
  border-radius:16px;
  padding:22px 20px;
  box-shadow:0 4px 12px rgba(15,23,42,.04);
}

.hei-bib-kpi-value{
  font-size:34px;
  font-weight:800;
  line-height:1;
  color:#111827;
  margin-bottom:10px;
}

.hei-bib-kpi-label{
  font-size:15px;
  font-weight:700;
  color:#1f2937;
  margin-bottom:6px;
}

.hei-bib-kpi-sub{
  font-size:13px;
  color:#6b7280;
  line-height:1.4;
}

@media (max-width: 980px){
  .hei-bib-kpi-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px){
  .hei-bib-kpi-grid{
    grid-template-columns:1fr;
  }
}


.hei-mapeamento-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
  margin-top:12px;
}

.hei-mapeamento-lista{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:16px;
}

.hei-mapeamento-lista-titulo{
  font-weight:700;
  margin-bottom:12px;
}

.hei-mapeamento-item{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
}

.hei-mapeamento-nome{
  width:120px;
  font-size:13px;
  color:#374151;
}

.hei-mapeamento-barra{
  flex:1;
  height:8px;
  background:#f1f5f9;
  border-radius:999px;
  overflow:hidden;
}

.hei-mapeamento-barra-fill{
  height:100%;
  background:var(--hei-brand-color);
}

.hei-mapeamento-perc{
  width:50px;
  font-size:12px;
  text-align:right;
  color:#111827;
}


/* =========================================================
   HOME - DESTAQUES
   ========================================================= */

.hei-home-destaques-wrap{
  margin:30px 0 26px;
}

.hei-home-destaques-grid{
  display:grid;
  gap:20px;
  justify-content:center;
  align-items:stretch;
}

/* 1 banner */
.hei-home-destaques-grid--qtd-1{
  grid-template-columns:360px;
}

/* 2 banners */
.hei-home-destaques-grid--qtd-2{
  grid-template-columns:repeat(2, 360px);
}

/* 3 banners */
.hei-home-destaques-grid--qtd-3{
  grid-template-columns:repeat(3, 360px);
}

.hei-home-destaque-card{
  display:block;
  width:100%;
  max-width:360px;
  border-radius:20px;
  overflow:hidden;
  border:1px solid #e5e7eb;
  background:#fff;
  text-decoration:none;
  transition:transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  box-shadow:0 4px 14px rgba(15,23,42,.04);
}

.hei-home-destaque-card:hover{
  transform:translateY(-2px);
  border-color:#d7dee8;
  box-shadow:0 10px 28px rgba(15,23,42,.08);
}

.hei-home-destaque-card__img{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:2 / 1;
  object-fit:cover;
}

@media (max-width: 1180px){
  .hei-home-destaques-grid--qtd-3{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }

  .hei-home-destaques-grid--qtd-2{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .hei-home-destaques-grid--qtd-1{
    grid-template-columns:minmax(0, 520px);
  }

  .hei-home-destaque-card{
    max-width:none;
  }
}

@media (max-width: 900px){
  .hei-home-destaques-grid--qtd-1,
  .hei-home-destaques-grid--qtd-2,
  .hei-home-destaques-grid--qtd-3{
    grid-template-columns:1fr;
  }
}


.hei-field-full{
  grid-column:1 / -1;
}

.hei-password-box{
  margin-top:28px;
  padding:22px;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#fafafa;
}

.hei-password-box__head{
  margin-bottom:18px;
}

.hei-section-label{
  display:block;
  font-weight:700;
  font-size:18px;
  color:#111827;
  margin:0 0 6px;
}

.hei-password-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:18px;
}

.hei-password-item{
  min-width:0;
}

.hei-password-item label{
  display:block;
  margin-bottom:8px;
  font-weight:600;
}

.hei-password-item .hei-input{
  width:100%;
}

@media (max-width: 900px){
  .hei-password-grid{
    grid-template-columns:1fr;
  }
}