/* =========================================================
   AVOCAT — stylesheet principal (REFATORADO / CONSOLIDADO)
   Bootstrap 4.6 base
   ========================================================= */

/* =========================================================
   TOKENS / VARIÁVEIS
   ========================================================= */
:root{
  /* Paleta (inspirada na foto: céu/mar/vegetação/areia) */
  --cloud-100: #e3e5df;
  --sand-200:  #d8d2b8;
  --sand-400:  #b1ae8f;
  --stone-400: #747b6f;

  --sky-200:   #a5c6e7;
  --sky-300:   #7cbdf2;
  --sky-500:   #66b5fc;

  --sea-500:   #799eb0;
  --sea-700:   #2e5b68;
  --sea-900:   #0b2330;

  --palm-500:  #989446;
  --palm-600:  #606436;
  --palm-700:  #31371c;

  /* Tokens semânticos */
  --primary-color:   var(--sea-900);
  --primary-color-2: var(--sea-700);
  --accent-1:        var(--sky-500);

  --bg:         var(--cloud-100);
  --surface:    #ffffff;          /* FIX: antes estava recursivo */
  --surface-2:  #f7f8f6;
  --border:     rgba(116,123,111,.35);

  --text-dark:  var(--sea-900);
  --text-soft:  rgba(11,35,48,.78);
  --muted:      #94a3b8;

  --ok:         #16a34a;
  --warn:       #f97316;
  --danger:     #ef4444;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 2px 6px rgba(15,23,42,.12);
  --shadow-md: 0 12px 30px rgba(15,23,42,.18);

  /* Painel lateral (SINGLE SOURCE OF TRUTH) */
  --painel-top: 68px;        /* altura da navbar desktop (ajuste se mudar) */
  --painel-tabs-w: 46px;     /* largura das abas verticais */
  --painel-w: 360px;         /* largura do painel */
}

/* =========================================================
   RESET / BASE
   ========================================================= */
*,
*::before,
*::after{ box-sizing: border-box; }

html, body{
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img{ max-width: 100%; height: auto; display: block; }

/* =========================================================
   LAYOUT PRINCIPAL
   ========================================================= */
#page{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#layout{
  display: flex;
  flex: 1 1 auto;
  min-height: 0; /* crítico para flex + overflow em filhos */
}

/* Conteúdo principal */
.main-content{
  flex: 1 1 auto;
  min-height: 0;
  padding: 1rem;
  background: var(--bg);
  overflow-x: auto;
}

/* =========================================================
   NAVBAR / TOPO
   ========================================================= */
.navbar.avocat-navbar{
  background: var(--primary-color-2) !important;
  height: 60px;
  padding: 0 .75rem;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* “inner” (se existir no HTML) */
.avocat-navbar-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-left,
.nav-center,
.nav-right{
  display: flex;
  align-items: center;
}

.nav-center{ flex: 1; justify-content: center; }

/* Marca */
.navbar-brand{
  width: auto;
  height: 56px;
  padding: 0 1rem 0 .4rem;
  margin: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

.navbar-brand .brand-logo{
  height: 40px;
  width: auto;
  max-width: 210px;
  display: block;
  object-fit: contain;
  object-position: left center;
  transform: none !important;
  margin: 0 !important;
}

.navbar.avocat-navbar .nav-link{
  color: #e4f2ff !important;
  font-size: .92rem;
}
.navbar.avocat-navbar .nav-link:hover{ color: var(--surface) !important; }

.navbar .fa-user-circle{ margin-right: 4px; }

/* Dropdown acima de overlays */
.dropdown-menu{ z-index: 7000 !important; }

/* Alerta “liberado” (comportamento padrão: inline) */
.alert-liberado{
  border-radius: 0;
  padding: 10px 16px;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Faixa escura abaixo do topo (se usada) */
.bg-dark.d-flex.align-items-center{
  background: rgba(49,55,28,.92) !important;
  height: 60px;
}

/* Desktop */
@media (min-width: 992px){
  .navbar.avocat-navbar{ height: 68px; }
  .navbar-brand{ height: 68px; }
  .navbar-brand .brand-logo{
    height: 60px;
    max-width: 260px;
  }

  /* Alerta no topo (padrão atual: “pill” discreta) */
  .alert-liberado{
    position: static;
    margin: 0;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
    white-space: nowrap;
    background: #e3f7eb;
  }
}

/* Mobile / tablet */
@media (max-width: 991.98px){
  .navbar.avocat-navbar{ height: 56px; }

  .navbar-brand .brand-logo{
    height: 32px;
    max-width: 180px;
  }

  /* esconde centro no mobile se você já usa esse padrão */
  .nav-center{ display: none !important; }

  .bg-dark.d-flex.align-items-center{
    position: relative !important;
    height: 44px !important;
    margin: 4px 0 0;
  }

  .bg-dark.d-flex.align-items-center .sidebar-toggle{
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  .alert-liberado{
    position: static;
    width: 100%;
    margin: 0 0 6px;
    border-radius: 0;
    font-size: .9rem;
    box-shadow: none;
    background: #e3f7eb;
  }
}

/* =========================================================
   BOTÃO HAMBÚRGUER / INDICADOR
   ========================================================= */
.sidebar-toggle{
  background: transparent !important;
  border: 0 !important;
  color: #fff !important;
  font-size: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#menuIndicator.menu-indicator{
  position: fixed;
  top: 10px; left: 12px;
  display: none;
  align-items: center; gap: 6px;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: 0;
  padding: 8px 10px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  z-index: 1060;
}
#menuIndicator i{ font-size: 14px; }
#menuIndicator.attention{
  box-shadow: 0 0 0 3px rgba(255,255,255,.15), var(--shadow-sm);
}

/* =========================================================
   SIDEBAR (ESQUERDA)
   ========================================================= */
.sidebar{
  width: 220px;
  background: var(--primary-color);
  color: var(--surface);
  flex-shrink: 0;
  transition: width .25s ease, left .25s ease, transform .25s ease;
  padding-top: .75rem;
  position: static;
}

.sidebar.collapsed{ width: 60px; }

.sidebar .nav-link{
  color: #d6edf5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  margin: 2px 10px;
  transition: background-color .15s ease, color .15s ease;
  white-space: nowrap;

  /* refinamento tipográfico “premium” (mantém aparência, ajusta ritmo) */
  font-size: 0.88rem;
  line-height: 1.2;
  letter-spacing: 0.1px;
}
.sidebar .nav-link i{
  width: 22px;
  text-align: center;
  font-size: .95rem;
}
.sidebar .nav-link span{ font-weight: 500; }

.sidebar .nav-link:hover,
.sidebar .nav-link:focus{
  background: rgba(255,255,255,.08);
  color: #fff;
}
.sidebar.collapsed .nav-link span{ display: none; }

/* Desktop: sticky abaixo da navbar */
@media (min-width: 992px){
  .sidebar{
    position: sticky;
    top: 68px;
    align-self: flex-start;
    /* mantém comportamento estável sem “guerra” de height/max-height */
    max-height: calc(100vh - 68px);
    overflow: auto;
  }
}

/* Mobile: off-canvas com scroll */
@media (max-width: 991.98px){
  #layout{ flex-direction: column; }

  .sidebar{
    position: fixed !important;
    top: 0;
    left: 0;
    width: 236px;
    max-width: 85vw;
    height: 100vh !important;
    transform: translateX(-100%);
    z-index: 1150 !important;
    box-shadow: 6px 0 16px rgba(0,0,0,.22);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 80px;
  }

  .sidebar.show{ transform: translateX(0); }

  body.noscroll{ overflow: hidden; }

  .main-content{
    padding: .85rem;
    padding-top: 80px;
  }
}

/* =========================================================
   COMPONENTES GERAIS / UTILITÁRIOS
   ========================================================= */
.badge{ border-radius: 999px; }

.badge-soft{
  border-radius: 999px;
  padding: .12rem .55rem;
  font-size: .75rem;
}

.section-title{
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: .75rem;
}

/* Cards */
.card{
  border-radius: var(--radius);
  border: 1px solid rgba(116,123,111,.28);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
}
.card-header{
  background: var(--surface-2);
  border-bottom: 1px solid rgba(148,163,184,.35);
}

/* Alertas */
.alert{
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

/* Botões (tema do sistema – consistente, sem “martelo” excessivo) */
.btn-primary{
  background-color: var(--sea-700);
  border-color: var(--sea-700);
}
.btn-primary:hover{
  background-color: var(--sea-900);
  border-color: var(--sea-700);
}
.btn-outline-secondary{ border-radius: 999px; }

/* Radios/checkbox */
.custom-control-label::before,
.custom-control-label::after{ top: .2rem; }

/* Progress */
.progress{
  height: 6px;
  border-radius: 999px;
}

/* Tabelas */
.table thead th{
  background: var(--primary-color);
  color: rgba(227,229,223,.95);
  border-bottom: 0;
}

/* Rodapé */
.avocat-footer{
  font-size: 0.9em;
  color: #666;
  padding: 20px;
  text-align: center;
  background-color: #f8f8f8;
  border-top: 1px solid #ddd;
}
.avocat-footer a{ color: #336699; }

.footer-muted{
  font-size: .85rem;
  color: rgba(11,35,48,.62);
}

/* =========================================================
   DASHBOARD / CARDS ESPECÍFICOS
   ========================================================= */
.card-dashboard{
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(116,123,111,.22);
}

.primeiros-passos-card{
  border-radius: var(--radius);
  border: 1px solid rgba(116,123,111,.28);
  box-shadow: 0 10px 25px rgba(15,23,42,.15);
}

.btn-primeiros-passos{
  background: linear-gradient(90deg, #2e5b68, #606436);
  border: none;
  color: var(--cloud-100);
}
.btn-primeiros-passos:hover{
  background: linear-gradient(90deg, #0b2330, #2e5b68);
  color: var(--cloud-100);
}

.verificacao-tribunais-card{
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(148,163,184,.25);
}

.acoes-rapidas .btn{
  border-radius: 7px;
  padding: .4rem .8rem;
  font-size: .9rem;
}

.badge-tribunal{
  border-radius: 999px;
  padding: .15rem .6rem;
  font-size: .78rem;
}

.card-pendencias{
  border-radius: var(--radius);
  border: 1px solid #fecaca;
  box-shadow: 0 10px 25px rgba(127,29,29,.18);
}

.page-title-main{
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--primary-color);
}

.ultima-consulta-djen{ border-radius: var(--radius-sm); }

.status-ok{ color: var(--ok); }
.status-atencao{ color: var(--warn); }
.status-erro{ color: var(--danger); }

.btn-repetir-consulta{ border-radius: 999px; }

/* =========================================================
   FULLCALENDAR (AUDIÊNCIAS)
   ========================================================= */
.fc .fc-toolbar-title{ font-size: 1.1rem; }

.fc .fc-button{
  border-radius: 6px;
  border: 1px solid rgba(148,163,184,.45);
  background: #f9fafb;
  color: var(--primary-color);
}
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:hover{
  background: var(--primary-color);
  color: rgba(227,229,223,.95);
  border-color: var(--primary-color);
}

.card-audiencia{ border-left: 4px solid var(--accent-1); }

/* =========================================================
   TABELA DE AUDIÊNCIAS (CONSOLIDADA)
   ========================================================= */
.table-audiencias{
  table-layout: fixed;
  width: 100%;
}

.table-audiencias thead th{
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}

.table-audiencias tbody td{
  text-align: left;
  font-size: 0.9rem;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Centralizar apenas ações e status (mantém sua intenção) */
.table-audiencias th:nth-child(6),
.table-audiencias th:nth-child(7),
.table-audiencias td:nth-child(6),
.table-audiencias td:nth-child(7){
  text-align: center;
}

/* Larguras principais */
.table-audiencias th:nth-child(1),
.table-audiencias td:nth-child(1){ width: 14%; }

.table-audiencias th:nth-child(2),
.table-audiencias td:nth-child(2){ width: 12%; }

.table-audiencias th:nth-child(3),
.table-audiencias td:nth-child(3){ width: 10%; }

.table-audiencias th:nth-child(4),
.table-audiencias td:nth-child(4){ width: 10%; }

.table-audiencias td.col-obs{
  max-width: 50%;
  color: rgba(11,35,48,.78);
  white-space: normal;
  overflow-wrap: break-word;
  text-align: left !important;
}

.table-audiencias tbody tr:hover{
  background-color: rgba(102,181,252,.14);
}

.audiencia-hoje{
  border-left: 4px solid var(--accent-1);
  background-color: #f0f9ff;
}

.table-audiencias td:nth-child(6) .btn{
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
  font-size: 0.8rem;
}

.badge-status{
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
}
.badge-status-pendente{ background-color: #fef3c7; color: #92400e; }
.badge-status-realizada{ background-color: #dcfce7; color: #166534; }
.badge-status-cancelada{ background-color: #fee2e2; color: #991b1b; }

/* =========================================================
   TAREFAS
   ========================================================= */
.tarefa-item{
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148,163,184,.3);
  padding: .65rem .8rem;
  background: var(--surface);
  margin-bottom: .4rem;
}
.tarefa-item.vencida{
  border-color: #fecaca;
  background: #fef2f2;
}
.tarefa-item .titulo{ font-weight: 600; }
.tarefa-item .meta{
  font-size: .8rem;
  color: rgba(11,35,48,.62);
}

/* =========================================================
   IMPORTAÇÃO / MINUTAS
   ========================================================= */
.import-card{
  border-radius: var(--radius);
  border: 1px dashed rgba(148,163,184,.7);
  background: rgba(15,23,42,.02);
}

.minuta-item{
  border-radius: var(--radius-sm);
  border: 1px solid rgba(116,123,111,.28);
  padding: .55rem .7rem;
  margin-bottom: .35rem;
  background: #fff;
}

/* =========================================================
   CONSULTA DJEN
   ========================================================= */
body.consulta-djen{ background: var(--bg); }

.consulta-djen-wrapper{
  max-width: 860px;
  margin: 32px auto;
  padding: 20px 20px 60px;
}

body.consulta-djen .main-content{
  max-width: 1100px;
  margin: 0 auto;
}

.consulta-djen-card{
  background: var(--surface);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 4px 14px rgba(15,23,42,.12);
  border: 1px solid rgba(148,163,184,.35);
}

.consulta-djen-title{
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}
.consulta-djen-title i{ color: var(--accent-1); }

.consulta-djen-advogado{
  font-size: 14px;
  color: rgba(11,35,48,.78);
}

.consulta-djen-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px 24px;
  margin-top: 18px;
}

.consulta-djen-card label{
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
  font-size: 14px;
}

.consulta-djen-card input,
.consulta-djen-card select{
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
  background: var(--surface-2);
  transition: all .2s;
}

.consulta-djen-card input:focus,
.consulta-djen-card select:focus{
  outline: none;
  border-color: var(--accent-1);
  background: var(--surface);
  box-shadow: 0 0 0 2px rgba(14,165,233,0.25);
}

.consulta-djen-radios{
  margin-top: 8px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.consulta-djen-radios label{
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.consulta-djen-radios input{ accent-color: var(--accent-1); }

.btn-consulta-djen{
  margin-top: 20px;
  min-width: 160px;
  background: var(--accent-1);
  color: var(--surface);
  border: none;
  padding: 10px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: .25s;
}
.btn-consulta-djen:hover{
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(14,165,233,0.4);
}

.consulta-djen-dica{
  margin-top: 18px;
  font-size: 13px;
  background: #eef8ff;
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 4px solid var(--accent-1);
  color: #1e293b;
}
.consulta-djen-dica i{ color: var(--accent-1); }

.djen-feedback{
  margin-top: 20px;
  padding: 12px 18px;
  border-left: 4px solid var(--accent-1);
  background: #f0f9ff;
  border-radius: 8px;
  color: var(--primary-color);
  font-size: 14px;
}

/* placeholder “fake” em date */
input[type="date"]{ position: relative; }
input[type="date"]:not(.has-value)::before{
  content: attr(placeholder);
  color: #94a3b8;
  position: absolute;
  margin-left: 10px;
  pointer-events: none;
}
input[type="date"].has-value::before{ display: none; }

@media (max-width: 768px){
  .consulta-djen-card{ padding: 20px; }
  .btn-consulta-djen{
    width: 100%;
    justify-content: center;
  }
}

/* =========================================================
   CALENDÁRIO (PÁGINA)
   ========================================================= */
.calendario-page{ max-width: 1200px; }

.calendario-card{
  background: #fff;
  border-radius: 16px;
  padding: 18px 18px 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,.07);
  border: 1px solid rgba(0,0,0,.04);
}

.calendario-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf1f7;
  margin-bottom: 16px;
}

.calendario-title{
  display: flex;
  align-items: center;
  gap: 12px;
}
.calendario-title i{
  font-size: 22px;
  color: var(--accent-1);
}
.calendario-title h2{
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
}
.calendario-title small{
  color: rgba(11,35,48,.62);
  font-size: 13px;
}

.calendario-header-actions{
  display: flex;
  align-items: center;
  gap: 10px;
}
.filtro-wrap{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.calendario-grid{
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
}

.card-soft{
  background: #f9fbff;
  border: 1px solid #e9eef6;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,.04);
}

@media (max-width: 992px){
  .calendario-grid{ grid-template-columns: 1fr; }
  .calendario-header{ flex-direction: column; align-items: flex-start; }
  .calendario-header-actions{ width: 100%; justify-content: space-between; }
}

/* =========================================================
   TRIBUNAIS
   ========================================================= */
.tribunais-page{ max-width: 1200px; }
.tribunais-wrapper{ margin-top: 20px; }

.tribunais-card{
  background: #fff;
  border-radius: 10px;
  padding: 18px;
  height: 100%;
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

.tribunais-disponiveis{ border: 1px solid rgba(227,229,223,.95); }
.tribunais-selecionados{
  background: #f4f8ff;
  border: 2px solid #2563eb;
}
.tribunais-selecionados h5{
  color: #2563eb;
  font-weight: 600;
}

.tribunais-list{
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 420px;
  overflow-y: auto;
}

.tribunal-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px;
  border-bottom: 1px solid #f1f1f1;
  transition: background .15s ease, transform .15s ease, opacity .15s ease;
}
.tribunal-item:last-child{ border-bottom: none; }
.tribunal-item:hover{ background: rgba(0,0,0,0.02); }
.tribunal-item.moving{
  opacity: .6;
  transform: translateX(4px);
}

.btn-add, .btn-remove{
  border: none;
  background: transparent;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.btn-add{ color: #2563eb; }
.btn-add:hover{ background: rgba(37,99,235,0.08); }
.btn-remove{ color: #dc2626; }
.btn-remove:hover{ background: rgba(220,38,38,0.08); }
.btn-add i, .btn-remove i{ font-size: 14px; }

.logo-index{
  max-height: 160px;
  width: auto;
}

/* =========================================================
   MOBILE: DROPDOWN DO USUÁRIO (SOLID / ACIMA)
   ========================================================= */
@media (max-width: 991.98px){
  .avocat-navbar,
  .navbar{
    position: sticky;
    top: 0;
    z-index: 6000 !important;
  }

  .navbar-collapse{
    background-color: var(--primary-color-2) !important;
  }

  #usuarioDropdown.nav-link{
    display: block;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 78vw;
    background: rgba(0,0,0,0.18) !important;
    border-radius: 10px;
  }

  .navbar .dropdown-menu{
    position: fixed !important;
    top: 64px !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;

    max-height: calc(100vh - 96px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;

    background-color: rgba(49,55,28,.92) !important;
    opacity: 1 !important;
    backdrop-filter: none !important;

    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 18px 40px rgba(0,0,0,0.55);
    z-index: 7000 !important;
    margin-top: 6px;
  }

  .navbar .dropdown-menu .dropdown-item,
  .navbar .dropdown-menu .dropdown-item-text,
  .navbar .dropdown-menu .dropdown-header{
    color: var(--surface) !important;
  }

  .navbar .dropdown-menu .dropdown-item:hover{
    background-color: rgba(255,255,255,0.08) !important;
  }
}

/* =========================================================
   PAGE HEADER (PADRÃO GLOBAL)
   ========================================================= */
.av-page-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 6px 0 16px 0;
}
.av-page-title{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.2px;
  line-height: 1.15;
  font-size: clamp(1.35rem, 1.1rem + 0.6vw, 1.85rem);
}
.av-page-icon{ font-size: 1.05em; opacity: .9; }
.av-page-subtitle{
  margin-top: 4px;
  font-size: .95rem;
  opacity: .8;
}
.av-page-head__actions{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 768px){
  .av-page-head{ flex-direction: column; align-items: stretch; }
  .av-page-head__actions{ justify-content: flex-start; }
}

/* =========================================================
   PAINEL LATERAL (NOTAS / ATENÇÃO / NOTIFICAÇÕES)
   SINGLE SOURCE OF TRUTH
   ========================================================= */

/* Backdrop: cobre a página, MAS NÃO cobre painel + abas */
#painel-backdrop{
  position: fixed;
  top: var(--painel-top);
  left: 0;
  bottom: 0;

  /* corta à direita: painel + abas */
  right: calc(var(--painel-w) + var(--painel-tabs-w));

  background: rgba(0,0,0,.25);
  z-index: 6500;

  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

body.painel-open #painel-backdrop{
  opacity: 1;
  pointer-events: auto;
}

/* Container “ancorador”: sem fundo, não intercepta clique fora */
#painel-lateral{
  position: fixed;
  top: var(--painel-top);
  right: 0;
  height: calc(100vh - var(--painel-top));
  width: calc(var(--painel-tabs-w) + var(--painel-w));

  background: transparent;
  border: 0;
  box-shadow: none;

  z-index: 6600;
  pointer-events: none; /* filhos recebem clique */
  display: block; /* não depender de grid/flex aqui */
  font-family: inherit;
}

/* Abas verticais (sempre no canto direito, clicáveis) */
#painel-lateral .painel-tabs-verticais{
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--painel-tabs-w);

  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 6px;

  z-index: 6602;
  pointer-events: auto;
}

/* Estilo das abas (mantido) */
#painel-lateral .tab-vertical{
  writing-mode: vertical-rl;
  text-orientation: mixed;
  border: none;
  cursor: pointer;
  padding: 10px 6px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  border-radius: 8px 0 0 8px;
  box-shadow: -2px 0 6px rgba(0,0,0,0.15);
  opacity: 0.7;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
#painel-lateral .tab-vertical.ativo{
  opacity: 1;
  transform: translateX(-2px);
}
.tab-vertical-notas{ background: #2e5b68; }
.tab-vertical-atencao{ background: #d97706; }
.tab-vertical-notificacoes{ background: #2563eb; }

/* Conteúdo do painel (à esquerda das abas) */
#painel-sidebar{
  position: absolute;
  top: 0;
  right: var(--painel-tabs-w);
  bottom: 0;
  width: var(--painel-w);

  background: var(--surface);
  border-left: 1px solid rgba(0,0,0,.08);
  box-shadow: -10px 0 24px rgba(0,0,0,.12);

  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;

  z-index: 6601;
  pointer-events: auto;

  /* Estrutura flex para scroll interno confiável */
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;

  transform: translateX(0);
  opacity: 1;
  transition: transform .22s ease, opacity .22s ease;
}

/* Estado colapsado: some só o conteúdo; abas ficam visíveis */
#painel-lateral.painel-lateral-collapsed #painel-sidebar{
  transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
}

/* Header do painel */
#painel-sidebar .notas-header{
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 10px 10px 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1f2933;

  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 3;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.btn-fechar-notas{
  border: none;
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
}
.btn-fechar-notas:hover{ color: #111827; }

/* Visibilidade das tabs internas (garantia de 1 por vez) */
#painel-sidebar .painel-tab{ display: none; }
#painel-sidebar .painel-tab.painel-tab-ativo{ display: block; }

/* Cada tab deve ocupar o restante e permitir flex interno */
#painel-sidebar .painel-tab.painel-tab-ativo{
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* =========================
   NOTAS — scroll na lista (igual Notificações)
   ========================= */
#painel-tab-notas.painel-tab-ativo{
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#notas-form{
  border-bottom: 1px solid #f1f1f1;
  padding: 10px 10px 8px;
  margin: 0;
  flex: 0 0 auto;
}

.notas-input-titulo{
  width: 100%;
  margin-bottom: 4px;
  padding: 4px 6px;
  font-size: 0.85rem;
  border-radius: 4px;
  border: 1px solid rgba(227,229,223,.95);
}

.notas-textarea{
  width: 100%;
  min-height: 56px;
  max-height: 90px;
  padding: 4px 6px;
  font-size: 0.85rem;
  resize: vertical;
  border-radius: 4px;
  border: 1px solid rgba(227,229,223,.95);
}

.notas-opcoes{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}
.notas-cores{
  display: flex;
  align-items: center;
  gap: 4px;
}
.notas-cor-label{
  font-size: 0.8rem;
  margin-right: 4px;
}
.notas-cor{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.opcao-cor-amarelo{ background: #fff9c4; }
.opcao-cor-verde{ background: #c8f3c2; }
.opcao-cor-vermelho{ background: #ffcdd2; }
.opcao-cor-azul{ background: #c5dafc; }
.notas-cor.ativo{ border-color: #343a40; }

.notas-btn-salvar{
  margin-top: 4px;
  width: 100%;
  font-size: 0.8rem;
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
}
.notas-btn-salvar:hover{
  background: #1d4ed8;
  border-color: #1d4ed8;
}

/* Lista rolável */
.notas-lista{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 10px 12px;
  padding-right: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}
.notas-lista::-webkit-scrollbar{ width: 10px; }
.notas-lista::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.18);
  border-radius: 999px;
  border: 3px solid rgba(255,255,255,.85);
}
.notas-lista::-webkit-scrollbar-track{ background: transparent; }

/* Post-it */
.nota-postit{
  position: relative;
  width: 100%;
  padding: 8px 10px 6px 10px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(15,23,42,.18);
  word-wrap: break-word;
  border: 1px solid rgba(148,163,184,.45);
}
.nota-amarelo{ background: #fff9c4; }
.nota-verde{ background: #c8f3c2; }
.nota-vermelho{ background: #ffcdd2; }
.nota-azul{ background: #c5dafc; }

.nota-postit-titulo{
  font-weight: 600;
  margin-bottom: 2px;
  color: #111827;
}
.nota-postit-texto{
  white-space: pre-wrap;
  color: #1f2933;
}
.nota-postit-meta{
  margin-top: 4px;
  font-size: 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0.9;
  color: #4b5563;
}
.nota-postit-status-badge{
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15,23,42,0.08);
  font-size: 0.65rem;
}

/* Botão concluir/reabrir (mantém contraste mesmo quando “concluída”) */
.nota-postit .nota-postit-toggle-status{
  opacity: 1;
  filter: none;
  background: rgba(17,24,39,.92);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  font-weight: 600;
  border-radius: 999px;
  padding: 6px 10px;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(0,0,0,.18);
  cursor: pointer;
}
.nota-postit .nota-postit-toggle-status:hover{
  background: rgba(17,24,39,1);
}

.nota-postit-concluida{ opacity: 1; }
.nota-postit-concluida .nota-postit-texto,
.nota-postit-concluida .nota-postit-titulo{
  opacity: .62;
  text-decoration: line-through;
}
.nota-postit-concluida .nota-postit-status-badge{ opacity: .75; }

.nota-postit-excluir{
  position: absolute;
  top: 3px;
  right: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #6b7280;
}
.nota-postit-excluir:hover{ color: #ef4444; }

/* =========================
   ATENÇÃO — scroll no miolo (lista)
   ========================= */
#painel-tab-atencao.painel-tab-ativo{
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px 10px 12px;
}

.atencao-resumo{
  font-size: 0.8rem;
  margin-bottom: 6px;
  padding: 4px 6px;
  background: #eff6ff;
  border-radius: 4px;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}

.atencao-subtabs{
  display: flex;
  gap: 4px;
  margin: 6px 0 6px 0;
}

.atencao-subtab-btn{
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(227,229,223,.95);
  background: #f9fafb;
  font-size: 0.75rem;
  padding: 4px 6px;
  cursor: pointer;
  color: #4b5563;
}
.atencao-subtab-btn.ativo{
  background: #2563eb;
  color: var(--surface);
  border-color: #2563eb;
  font-weight: 600;
}

/* Seções e alertas (fixos acima do scroll, quando aplicável) */
.atencao-secao{ margin-bottom: 8px; }
.atencao-secao h6{
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: rgba(11,35,48,.78);
}

.atencao-alerta{
  border-radius: 4px;
  padding: 6px 8px;
  margin-bottom: 4px;
  font-size: 0.78rem;
}
.atencao-alerta-info{ background: #e0f2fe; border: 1px solid #38bdf8; }
.atencao-alerta-warning{ background: #fef9c3; border: 1px solid #eab308; }
.atencao-alerta-danger{ background: #fee2e2; border: 1px solid #ef4444; }
.atencao-alerta strong{ display: block; margin-bottom: 2px; }
.atencao-alerta small{ display: block; }
.atencao-alerta .data-alerta{
  display: block;
  margin-top: 2px;
  font-size: 0.7rem;
  color: #6b7280;
}

/* Lista rolável (IDs comuns no seu HTML: #atencao-lista / .atencao-lista) */
#atencao-lista,
.atencao-lista{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}
#atencao-lista::-webkit-scrollbar,
.atencao-lista::-webkit-scrollbar{ width: 10px; }
#atencao-lista::-webkit-scrollbar-thumb,
.atencao-lista::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.18);
  border-radius: 999px;
  border: 3px solid rgba(255,255,255,.85);
}
#atencao-lista::-webkit-scrollbar-track,
.atencao-lista::-webkit-scrollbar-track{ background: transparent; }

/* Cards de tarefas */
.atencao-item{
  border-radius: 4px;
  padding: 6px 8px;
  margin-bottom: 4px;
  font-size: 0.78rem;
  border: 1px solid transparent;
}
.atencao-item-vencida{ background: #fee2e2; border-color: #ef4444; }
.atencao-item-hoje{ background: #fef3c7; border-color: #f59e0b; }
.atencao-item-proximo{ background: #dbeafe; border-color: #3b82f6; }
.atencao-item-titulo{ margin-bottom: 2px; color: #111827; }
.atencao-item-meta{
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #4b5563;
}
.atencao-item-meta .link-acao{
  text-decoration: none;
  font-weight: 500;
  color: #1d4ed8;
}
.atencao-item-meta .link-acao:hover{ text-decoration: underline; }

/* Rodapé fixo */
.atencao-rodape-link{
  margin-top: 6px;
  text-align: right;
  flex: 0 0 auto;
}
.atencao-rodape-link a{
  font-size: 0.75rem;
  text-decoration: none;
  color: #1d4ed8;
}
.atencao-rodape-link a:hover{ text-decoration: underline; }

/* =========================
   NOTIFICAÇÕES — scroll na lista (padrão)
   ========================= */
#painel-tab-notificacoes.painel-tab-ativo{
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px 10px 12px;
}

.notificacoes-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 0.8rem;
}
.notificacoes-header small{ color: rgba(11,35,48,.78); }
.notificacoes-header button{
  border: none;
  background: transparent;
  font-size: 0.75rem;
  color: #2563eb;
  cursor: pointer;
}
.notificacoes-header button:hover{ text-decoration: underline; }

#notificacoes-lista-lateral,
.notificacoes-lista-lateral{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin-top: 4px;
  padding-right: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}
#notificacoes-lista-lateral::-webkit-scrollbar,
.notificacoes-lista-lateral::-webkit-scrollbar{ width: 10px; }
#notificacoes-lista-lateral::-webkit-scrollbar-thumb,
.notificacoes-lista-lateral::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.18);
  border-radius: 999px;
  border: 3px solid rgba(255,255,255,.85);
}
#notificacoes-lista-lateral::-webkit-scrollbar-track,
.notificacoes-lista-lateral::-webkit-scrollbar-track{ background: transparent; }

/* Cards de notificação (mantidos) */
.notificacao-item{
  border-radius: 4px;
  border: 1px solid #fecaca;
  background: #fee2e2;
  padding: 6px 8px;
  margin-bottom: 4px;
  font-size: 0.78rem;
}
.notificacao-item-lida{
  background: #f3f4f6;
  border-color: #d1d5db;
  opacity: 0.85;
}
.notificacao-item-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}
.notificacao-item-tags span{
  font-size: 0.65rem;
  margin-right: 4px;
}
.notificacao-item-acao button{
  border: none;
  background: none;
  font-size: 0.7rem;
  color: #1d4ed8;
  cursor: pointer;
  padding: 0;
}
.badge-lida{
  background: #10b981;
  color: var(--surface);
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 0.65rem;
}
.notificacao-item-data{
  margin-top: 2px;
  font-size: 0.7rem;
  color: #6b7280;
}

.navbar-badge{
  position: absolute;
  top: 0;
  right: -2px;
  font-size: 0.65rem;
  padding: 2px 4px;
}

/* Mobile: painel ocupa quase a tela; backdrop cobre tudo */
@media (max-width: 520px){
  :root{ --painel-w: 92vw; }
  #painel-backdrop{ right: 0; }
}

/* Mobile: ao abrir painel, trava scroll do body (evita “vazar” conteúdo) */
@media (max-width: 991.98px){
  body.painel-open{ overflow: hidden; }
}
/* =========================================================
   AUDIÊNCIAS — PREMIUM (PADRÃO "MEUS CLIENTES")
   Compatível com o template audiencias_list.html atual
   Escopo seguro: body.audiencias-page
   ========================================================= */

body.audiencias-page .main-content{
  max-width: 1200px;
  margin: 0 auto;
}

/* Cabeçalho premium (card) — casa com o padrão do "Meus Clientes" */
body.audiencias-page .av-page-head{
  background: #fff;
  border: 1px solid rgba(148,163,184,.35);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(15,23,42,.10);
  padding: 18px 20px;
  margin: 12px 0 16px;
}

body.audiencias-page .av-page-title{
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 0;
}

body.audiencias-page .av-page-subtitle{
  margin-top: 4px;
  color: rgba(11,35,48,.68);
  font-size: .95rem;
}

/* Botões do header (Nova / Sticky / Calendário / Voltar) */
body.audiencias-page .av-page-head__actions .btn{
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .2px;
  box-shadow: 0 10px 22px rgba(15,23,42,.10);
}

/* Linha de ações secundárias (Baixar / Enviar / Assinar) como “card leve” */
body.audiencias-page .main-content > .d-flex.flex-wrap.align-items-center.mb-4{
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(15,23,42,.07);
  padding: 12px 12px;
}

/* Botões outline com acabamento premium */
body.audiencias-page .main-content .btn.btn-outline-secondary,
body.audiencias-page .main-content .btn.btn-outline-primary,
body.audiencias-page .main-content .btn.btn-outline-success{
  background: #fff;
  border-color: rgba(148,163,184,.55);
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
}

body.audiencias-page .main-content .btn.btn-outline-secondary:hover,
body.audiencias-page .main-content .btn.btn-outline-primary:hover,
body.audiencias-page .main-content .btn.btn-outline-success:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(15,23,42,.12);
}

/* Filtro (seja form-select ou custom-select) */
body.audiencias-page .main-content select.form-select,
body.audiencias-page .main-content select.custom-select,
body.audiencias-page .main-content select.form-control{
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.55);
  background: #fff;
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
  padding: 6px 12px;
}

/* =========================================================
   TABELA — premium (ATENÇÃO: seu template usa .tabela-audiencias)
   ========================================================= */

body.audiencias-page .table-responsive{
  background: #fff;
  border: 1px solid rgba(148,163,184,.35);
  box-shadow: 0 14px 34px rgba(15,23,42,.10);
  border-radius: 16px;
  overflow: hidden; /* garante cantos arredondados */
}

body.audiencias-page table.tabela-audiencias{
  margin-bottom: 0;
  background: #fff;
  border: 0;
}

/* Cabeçalho escuro premium (igual “Meus Clientes”) */
body.audiencias-page table.tabela-audiencias thead th{
  background: #0b1220;
  color: #fff;
  border: 0;
  font-weight: 800;
  font-size: .86rem;
  padding: 12px 14px;
}

/* Corpo com espaçamento e separadores suaves */
body.audiencias-page table.tabela-audiencias tbody td{
  padding: 12px 14px;
  border-top: 1px solid rgba(148,163,184,.18);
  vertical-align: middle;
  font-size: .92rem;
  color: rgba(11,35,48,.86);
}

/* Hover “clean” */
body.audiencias-page table.tabela-audiencias tbody tr:hover{
  background: rgba(102,181,252,.10);
}

/* Destaque de “audiência hoje” */
body.audiencias-page table.tabela-audiencias tbody tr.audiencia-hoje{
  border-left: 4px solid var(--accent-1);
  background: rgba(102,181,252,.08);
}

/* Coluna Obs. melhora leitura */
body.audiencias-page table.tabela-audiencias td.col-obs{
  line-height: 1.25;
  color: rgba(11,35,48,.78);
}

/* Coluna Ações: como você usa d-flex no <td>, garantimos alinhamento */
body.audiencias-page table.tabela-audiencias td.d-flex{
  align-items: center;
}

/* Botões de ação (ícones) com padrão premium */
body.audiencias-page table.tabela-audiencias td .btn.btn-sm{
  border-radius: 10px;
  padding: .25rem .45rem;
  box-shadow: none;
}

/* Status badge */
body.audiencias-page table.tabela-audiencias .badge.badge-status{
  border-radius: 999px;
  font-weight: 800;
  font-size: .72rem;
  padding: .25rem .55rem;
}

/* =========================================================
   MOBILE (cards) — manter premium sem mexer no HTML
   ========================================================= */
body.audiencias-page .d-block.d-md-none .card{
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.35);
  box-shadow: 0 14px 34px rgba(15,23,42,.10);
}

body.audiencias-page .d-block.d-md-none .card .card-title{
  font-weight: 800;
  letter-spacing: -0.2px;
}

@media (max-width: 991.98px){
  body.audiencias-page .main-content{
    max-width: 100%;
  }

  body.audiencias-page .av-page-head{
    border-radius: 14px;
    padding: 14px 14px;
  }

  body.audiencias-page .table-responsive{
    border-radius: 14px;
  }
}
/* =========================================================
   MINUTAS — PREMIUM (PADRÃO "MEUS CLIENTES")
   Escopo: body.minutas-page
   ========================================================= */

body.minutas-page .main-content{
  max-width: 1200px;
  margin: 0 auto;
}

/* Header premium (você já usa av-page-head no template) */
body.minutas-page .av-page-head{
  background: #fff;
  border: 1px solid rgba(148,163,184,.35);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(15,23,42,.10);
  padding: 18px 20px;
  margin: 12px 0 16px;
}

body.minutas-page .av-page-title{
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 0;
}

body.minutas-page .av-page-subtitle{
  margin-top: 4px;
  color: rgba(11,35,48,.68);
  font-size: .95rem;
}

/* Ações do header */
body.minutas-page .av-page-head__actions .btn{
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .2px;
  box-shadow: 0 10px 22px rgba(15,23,42,.10);
}

/* Container da página */
body.minutas-page .container{
  max-width: 1200px;
}

/* =========================================================
   LISTA PREMIUM (sem trocar list-group)
   ========================================================= */
body.minutas-page .list-group{
  background: #fff;
  border: 1px solid rgba(148,163,184,.35);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(15,23,42,.10);
  overflow: hidden; /* garante cantos arredondados */
}

/* Remove “cara de bootstrap cru” e cria linhas premium */
body.minutas-page .list-group-item{
  border: 0;
  border-top: 1px solid rgba(148,163,184,.18);
  padding: 14px 16px;
  background: #fff;
}

body.minutas-page .list-group-item:first-child{
  border-top: 0;
}

body.minutas-page .list-group-item:hover{
  background: rgba(102,181,252,.10);
}

/* Título da minuta (hierarquia) */
body.minutas-page .list-group-item strong{
  font-weight: 800;
  letter-spacing: -0.2px;
  color: rgba(11,35,48,.92);
}

/* A área de botões à direita */
body.minutas-page .list-group-item > div{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Botões pequenos: padrão premium (sem afetar o sistema inteiro) */
body.minutas-page .list-group-item .btn.btn-sm{
  border-radius: 999px;
  font-weight: 700;
  padding: .35rem .65rem;
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
}

/* Ajuste fino em botões com ícone */
body.minutas-page .list-group-item .btn i{
  margin-right: 6px;
}

/* Form inline não “quebra” o alinhamento */
body.minutas-page .list-group-item form.d-inline{
  margin: 0;
}

/* Mensagem de vazio em estilo premium */
body.minutas-page .main-content p{
  color: rgba(11,35,48,.70);
}

/* Responsivo */
@media (max-width: 768px){
  body.minutas-page .list-group-item{
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px;
  }

  body.minutas-page .list-group-item > div{
    width: 100%;
  }

  body.minutas-page .list-group-item .btn.btn-sm{
    width: 100%;
    justify-content: center;
  }
}
/* =========================================================
   MOVIMENTAÇÕES — PREMIUM (PADRÃO "MEUS CLIENTES")
   Escopo: body.movimentacoes-page
   ========================================================= */

body.movimentacoes-page .main-content{
  max-width: 1200px;
  margin: 0 auto;
}

/* Header premium */
body.movimentacoes-page .av-page-head{
  background: #fff;
  border: 1px solid rgba(148,163,184,.35);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(15,23,42,.10);
  padding: 18px 20px;
  margin: 12px 0 16px;
}

body.movimentacoes-page .av-page-title{
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 0;
}

body.movimentacoes-page .av-page-subtitle{
  margin-top: 4px;
  color: rgba(11,35,48,.68);
  font-size: .95rem;
}

body.movimentacoes-page .av-page-head__actions .btn{
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .2px;
  box-shadow: 0 10px 22px rgba(15,23,42,.10);
}

/* =========================================================
   FILTROS — “card” premium (sem mudar HTML)
   Seu form tem: form.row.g-2.mb-3
   ========================================================= */
body.movimentacoes-page form.row.g-2.mb-3{
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(148,163,184,.30);
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(15,23,42,.07);
  padding: 12px 12px;
  margin-top: 10px;
}

/* Inputs premium */
body.movimentacoes-page form.row.g-2.mb-3 .form-control{
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.55);
  background: #fff;
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
  height: 40px;
}

body.movimentacoes-page form.row.g-2.mb-3 .form-control:focus{
  border-color: rgba(102,181,252,.85);
  box-shadow: 0 0 0 3px rgba(102,181,252,.20), 0 8px 18px rgba(15,23,42,.06);
}

/* Botão Filtrar (sem globalizar .btn-primary) */
body.movimentacoes-page form.row.g-2.mb-3 .btn.btn-primary{
  border-radius: 999px;
  font-weight: 800;
  height: 40px;
  box-shadow: 0 10px 22px rgba(15,23,42,.10);
}

/* =========================================================
   CHIPS DE CÓDIGO (PUBLICACAO... etc.)
   Seu HTML usa <a class="badge ...">
   ========================================================= */
body.movimentacoes-page .mb-2 .badge{
  border-radius: 999px;
  font-weight: 800;
  font-size: .72rem;
  padding: .32rem .62rem;
  letter-spacing: .2px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body.movimentacoes-page .mb-2 .badge.bg-light{
  background: #fff !important;
  border: 1px solid rgba(148,163,184,.55) !important;
  color: rgba(11,35,48,.85) !important;
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
}

body.movimentacoes-page .mb-2 .badge.bg-primary{
  box-shadow: 0 10px 22px rgba(15,23,42,.10);
}

body.movimentacoes-page .mb-2 .badge.bg-secondary{
  box-shadow: 0 10px 22px rgba(15,23,42,.08);
}

/* =========================================================
   SEPARADOR DE DIA (Hoje / Ontem / data)
   Seu HTML usa: div.mt-3.mb-2.fw-semibold.text-muted.small
   ========================================================= */
body.movimentacoes-page .mt-3.mb-2.fw-semibold.text-muted.small{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(148,163,184,.28);
}

/* =========================================================
   CARD DA MOVIMENTAÇÃO — premium e consistente
   Seu HTML usa: .card.mb-2.shadow-sm  e .card-body.d-flex...
   ========================================================= */
body.movimentacoes-page .card.mb-2.shadow-sm{
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.35);
  box-shadow: 0 14px 34px rgba(15,23,42,.10) !important;
  overflow: hidden;
}

body.movimentacoes-page .card.mb-2.shadow-sm .card-body{
  padding: 14px 16px;
}

/* “coluna” do ícone */
body.movimentacoes-page .card .card-body > div[style*="width:28px"]{
  width: 34px !important;
  min-width: 34px;
  font-size: 1.2rem !important;
  opacity: .95;
}

/* badges dentro do card */
body.movimentacoes-page .card .badge{
  border-radius: 999px;
  font-weight: 800;
  font-size: .72rem;
  padding: .28rem .55rem;
}

/* badges “cliente” (bg-light + border) */
body.movimentacoes-page .card .badge.bg-light{
  background: #fff !important;
  border: 1px solid rgba(148,163,184,.55) !important;
  color: rgba(11,35,48,.86) !important;
}

/* Link do processo com hierarquia premium */
body.movimentacoes-page .card a.text-decoration-none.fw-semibold{
  color: rgba(11,35,48,.92);
  font-weight: 900;
  letter-spacing: -0.2px;
}
body.movimentacoes-page .card a.text-decoration-none.fw-semibold:hover{
  text-decoration: underline !important;
}

/* Botão copiar */
body.movimentacoes-page .copy-btn.btn.btn-light.btn-sm{
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.45);
  background: #fff;
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
}

/* “Ver no processo” */
body.movimentacoes-page .btn.btn-outline-primary.btn-sm{
  border-radius: 999px;
  font-weight: 800;
}

/* =========================================================
   DESCRIÇÃO (ver mais) — remove inline needs via classe
   Seu HTML: .desc, .toggle, .full
   ========================================================= */
body.movimentacoes-page .desc{
  display: inline-block;
  max-height: 3.6em;      /* ~ 2-3 linhas */
  overflow: hidden;
  color: rgba(11,35,48,.86);
  line-height: 1.25;
}

body.movimentacoes-page .toggle{
  font-weight: 800;
  color: #1d4ed8;
  text-decoration: none;
}
body.movimentacoes-page .toggle:hover{
  text-decoration: underline;
}

/* =========================================================
   PAGINAÇÃO — premium
   ========================================================= */
body.movimentacoes-page .pagination .page-link{
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,.35);
  color: rgba(11,35,48,.86);
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
}

body.movimentacoes-page .pagination .page-item.active .page-link{
  border-color: rgba(29,78,216,.85);
  box-shadow: 0 10px 22px rgba(15,23,42,.10);
}

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 768px){
  body.movimentacoes-page .card.mb-2.shadow-sm .card-body{
    gap: 10px !important;
  }

  body.movimentacoes-page .ms-auto{
    width: 100%;
  }

  body.movimentacoes-page .ms-auto .btn{
    width: 100%;
    justify-content: center;
  }
}
/* =========================================================
   PUBLICAÇÕES — PREMIUM (PADRÃO "MEUS CLIENTES")
   Escopo: body.publicacoes-page
   ========================================================= */

body.publicacoes-page .main-content{
  max-width: 1200px;
  margin: 0 auto;
}

/* Header premium (av-page-head já existe no seu layout) */
body.publicacoes-page .av-page-head{
  background: #fff;
  border: 1px solid rgba(148,163,184,.35);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(15,23,42,.10);
  padding: 18px 20px;
  margin: 12px 0 16px;
}

body.publicacoes-page .av-page-title{
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 0;
}

body.publicacoes-page .av-page-subtitle{
  margin-top: 4px;
  color: rgba(11,35,48,.68);
  font-size: .95rem;
}

body.publicacoes-page .av-page-head__actions .btn{
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .2px;
  box-shadow: 0 10px 22px rgba(15,23,42,.10);
}

/* =========================================================
   FILTROS (form) — “card leve”
   O template usa .pub-filtros
   ========================================================= */
body.publicacoes-page .pub-filtros{
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(148,163,184,.30);
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(15,23,42,.07);
  padding: 12px 12px;
  margin-top: 10px;
}

body.publicacoes-page .pub-filtros .form-control{
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.55);
  background: #fff;
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
  height: 40px;
}

body.publicacoes-page .pub-filtros .form-control:focus{
  border-color: rgba(102,181,252,.85);
  box-shadow: 0 0 0 3px rgba(102,181,252,.20), 0 8px 18px rgba(15,23,42,.06);
}

body.publicacoes-page .pub-filtros .btn{
  border-radius: 999px;
  font-weight: 800;
  height: 40px;
}

/* =========================================================
   PAGINAÇÃO — premium
   ========================================================= */
body.publicacoes-page .pagination .page-link{
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,.35);
  color: rgba(11,35,48,.86);
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
}

body.publicacoes-page .pagination .page-item.active .page-link{
  border-color: rgba(29,78,216,.85);
  box-shadow: 0 10px 22px rgba(15,23,42,.10);
}

/* =========================================================
   CARD DA PUBLICAÇÃO
   O template usa .pub-card (card Bootstrap)
   ========================================================= */
body.publicacoes-page .pub-card{
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.35);
  box-shadow: 0 14px 34px rgba(15,23,42,.10) !important;
  overflow: hidden;
}

body.publicacoes-page .pub-card .card-body{
  padding: 16px 16px;
}

/* Botões no topo do card (Cumprida / Editar Tarefa / Criar Tarefa / Calcular Prazo) */
body.publicacoes-page .pub-card .btn.btn-sm{
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(15,23,42,.10);
}

body.publicacoes-page .pub-card .btn.btn-outline-primary,
body.publicacoes-page .pub-card .btn.btn-outline-success,
body.publicacoes-page .pub-card .btn.btn-outline-secondary{
  background: #fff;
  border-color: rgba(148,163,184,.55);
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
}

body.publicacoes-page .pub-card .btn.btn-outline-primary:hover,
body.publicacoes-page .pub-card .btn.btn-outline-success:hover,
body.publicacoes-page .pub-card .btn.btn-outline-secondary:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(15,23,42,.12);
}

/* Meta (data/hora) */
body.publicacoes-page .pub-card .text-muted.small{
  color: rgba(11,35,48,.68) !important;
}

/* =========================================================
   TEXTO DA PUBLICAÇÃO (colapsado + fade + pre)
   Classes usadas no HTML revisado:
   .pub-text-container, .pub-pre, .pub-fade, .pub-toggle-btn
   ========================================================= */
body.publicacoes-page .pub-text-container{
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.30);
  background: rgba(15,23,42,.02);
  padding: 10px 10px 12px;
}

body.publicacoes-page .pub-pre{
  margin: 0;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .86rem;
  line-height: 1.25;
  color: rgba(11,35,48,.88);
}

/* O “fade” que some ao expandir (o JS controla display) */
body.publicacoes-page .pub-fade{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 44px; /* deixa espaço pro botão */
  height: 40px;
  pointer-events: none;
  background: linear-gradient(to top, rgba(248,248,248,1), rgba(248,248,248,0));
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}

/* Botão Leia mais */
body.publicacoes-page .pub-toggle-btn{
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(15,23,42,.08);
}

/* =========================================================
   MODAL — premium leve (sem mexer no Bootstrap)
   ========================================================= */
body.publicacoes-page .modal-content{
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.35);
  box-shadow: 0 18px 44px rgba(15,23,42,.18);
}

body.publicacoes-page .modal-header{
  background: rgba(15,23,42,.02);
  border-bottom: 1px solid rgba(148,163,184,.25);
}

body.publicacoes-page .modal-title{
  font-weight: 800;
  letter-spacing: -0.2px;
  color: rgba(11,35,48,.92);
}

body.publicacoes-page .modal-body .form-control{
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.55);
  background: #fff;
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
}

body.publicacoes-page .modal-body .form-control:focus{
  border-color: rgba(102,181,252,.85);
  box-shadow: 0 0 0 3px rgba(102,181,252,.20), 0 8px 18px rgba(15,23,42,.06);
}

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 768px){
  body.publicacoes-page .main-content{
    max-width: 100%;
  }

  body.publicacoes-page .av-page-head{
    border-radius: 14px;
    padding: 14px 14px;
  }

  body.publicacoes-page .pub-card .btn.btn-sm{
    width: 100%;
    justify-content: center;
  }

  body.publicacoes-page .pub-filtros .btn{
    width: 100%;
  }
}
/* =========================================================
   MOBILE — HOTFIX DE CAMADAS E CLIQUE
   (Sidebar x Navbar x Painel lateral)
   Cole no FINAL do style.css
   ========================================================= */

/* 1) Normaliza altura real da navbar no mobile e reaproveita em offsets */
@media (max-width: 991.98px){
  :root{
    --nav-h: 56px; /* sua navbar mobile está em 56px */
  }

  /* Navbar sempre acima do conteúdo */
  .navbar.avocat-navbar,
  .navbar{
    position: sticky;
    top: 0;
    z-index: 6000 !important;
  }

  /* 2) Sidebar off-canvas deve começar abaixo da navbar (evita “tampa” de clique) */
  .sidebar{
    top: var(--nav-h) !important;
    height: calc(100vh - var(--nav-h)) !important;
    /* mantém scroll interno correto */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* camada: acima do conteúdo, abaixo de dropdowns */
    z-index: 6500 !important;
  }

  /* Se você usa sombra e quer manter, ok; aqui só reforço consistência */
  .sidebar.show{
    transform: translateX(0);
  }

  /* 3) Conteúdo principal não precisa “empurrar” tanto para baixo se a sidebar já está abaixo da navbar */
  .main-content{
    padding-top: 16px !important; /* antes você tinha 80px */
  }

  /* 4) Painel lateral direito: alinhar topo no mobile com navbar real */
  #painel-lateral{
    top: var(--nav-h) !important;
    height: calc(100vh - var(--nav-h)) !important;
  }

  /* Backdrop do painel lateral também acompanha o topo correto */
  #painel-backdrop{
    top: var(--nav-h) !important;
  }

  /* 5) Abas verticais do painel direito sempre clicáveis (não “somem” atrás de overlays) */
  #painel-lateral .painel-tabs-verticais{
    z-index: 6602 !important;
    pointer-events: auto !important;
  }

  /* 6) Quando painel está aberto, bloqueia scroll do body (você já faz, só reforço) */
  body.painel-open{
    overflow: hidden;
    touch-action: none;
  }

  /* 7) Quando sidebar está aberta, também bloqueia scroll do body para evitar “vazamento” */
  body.noscroll{
    overflow: hidden;
    touch-action: none;
  }
}

/* 8) Segurança: dropdowns sempre acima de tudo (você já tem z-index alto; reforço a hierarquia) */
.dropdown-menu{
  z-index: 7000 !important;
}
/* =========================================================
   MOBILE UX: reduzir sobreposição/área clicável indevida
   ========================================================= */
@media (max-width: 991.98px){
  /* Abas do painel: garantir que só o botão seja clicável */
  #painel-lateral .painel-tabs-verticais{
    pointer-events: none; /* container não intercepta toque */
  }
  #painel-lateral .painel-tabs-verticais .tab-vertical{
    pointer-events: auto; /* apenas o botão intercepta */
  }

  /* Sidebar sempre “inteira” e com scroll interno, sem vazar */
  #sidebar{
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}
/* =========================================================
   MOBILE UX: atalho flutuante para menu (sem depender de gesto)
   Usa #menuIndicator existente
   ========================================================= */
@media (max-width: 991.98px){
  #menuIndicator{
    position: fixed !important;
    left: 12px !important;
    bottom: 18px !important;
    top: auto !important;
    z-index: 6900 !important;
    border-radius: 999px !important;
    box-shadow: 0 14px 34px rgba(15,23,42,.18) !important;
    opacity: .92;
  }
  #menuIndicator.hide{ display: none !important; }
}

/* ==============================
   MOBILE FIX: camadas e cliques
   ============================== */

/* Bootstrap navbar geralmente usa z-index ~1030.
   Garanta que as abas laterais fiquem acima. */
#painel-lateral{
  z-index: 1060 !important;
}

.painel-tabs-verticais{
  z-index: 1070 !important;
  position: fixed; /* ou absolute conforme seu layout */
}

/* Backdrop: quando "fechado", NÃO pode capturar clique */
#painel-backdrop{
  position: fixed;
  inset: 0;
  z-index: 1055;
}

/* fechado: invisível e sem clique */
#painel-backdrop[aria-hidden="true"]{
  opacity: 0 !important;
  pointer-events: none !important;
}

/* aberto: clicável */
#painel-backdrop[aria-hidden="false"]{
  opacity: 1;              /* ajuste conforme seu efeito */
  pointer-events: auto !important;
}

/* Sidebar mobile: quando não está .show, não deve capturar toque */
@media (max-width: 991.98px){
  #sidebar{
    z-index: 1050 !important;
  }
  #sidebar:not(.show){
    pointer-events: none !important;
  }
  #sidebar.show{
    pointer-events: auto !important;
  }
}

/* Dropdown do usuário: evita “área fantasma” sobrepondo as tabs */
.navbar .dropdown-menu{
  z-index: 1065 !important; /* fica abaixo das abas (1070) */
}

/* Se algum container tiver transform, cria stacking context ruim.
   Evite transform no wrapper do painel/tabs, se houver. */
#page, #app-shell, #layout{
  transform: none;
}
/* =========================================================
   MOBILE: Navbar compacta (evita estouro e sobreposição)
   ========================================================= */
@media (max-width: 991.98px){

  /* 1) Oculta o aviso do período liberado no mobile */
  .alert-liberado,
  .nav-center{
    display: none !important;
  }

  /* 2) “Enxuga” o dropdown do usuário: some o texto/nome e deixa só o ícone */
  #usuarioDropdown{
    white-space: nowrap;
    max-width: 44px;              /* área compacta */
    overflow: hidden;
    text-overflow: clip;
    padding-left: .5rem;
    padding-right: .5rem;
  }

  /* Esconde o texto do nome e o pequeno subtítulo interno (se existir) */
  #usuarioDropdown{
    font-size: 0;                 /* zera texto do link */
  }
  #usuarioDropdown i{
    font-size: 1.1rem;            /* ícone mantém tamanho */
    margin-right: 0 !important;
  }
  #usuarioDropdown small,
  #usuarioDropdown .d-block{
    display: none !important;
  }

  /* 3) Ajusta o sino de notificações para não “bater” com o user */
  #notificacoesDropdown{
    padding-left: .5rem;
    padding-right: .5rem;
  }

  /* 4) Proteção contra expansão indevida da navbar */
  .avocat-navbar .navbar-nav{
    flex-direction: row !important;
    align-items: center;
  }
  .avocat-navbar .nav-item{
    margin-left: .25rem;
    margin-right: .25rem;
  }

  /* 5) Se o nome estiver vindo por outro span/texto dentro do link, garanta que suma */
  #usuarioDropdown *:not(i){
    display: none !important;
  }
  #usuarioDropdown i{
    display: inline-block !important;
  }
}
/* =========================================================
   MOBILE: Navbar compacta + sem toggler (autenticado)
   Objetivo:
   - não estourar com nome do usuário
   - ocultar aviso de período liberado
   - remover "hambúrguer" da direita no autenticado
   ========================================================= */
@media (max-width: 991.98px){

  /* 1) Oculta o aviso do período liberado no mobile */
  .alert-liberado,
  .nav-center{
    display: none !important;
  }

  /* 2) No autenticado, some o toggler do Bootstrap (três barras à direita) */
  body.is-auth .navbar-toggler{
    display: none !important;
  }

  /* 3) Compacta o dropdown do usuário: deixa só o ícone (sem “Leonardo” ocupar a tela) */
  #usuarioDropdown{
    font-size: 0 !important;      /* esconde texto */
    padding-left: .5rem;
    padding-right: .5rem;
    white-space: nowrap;
    max-width: 44px;
    overflow: hidden;
  }
  #usuarioDropdown i{
    font-size: 1.1rem !important; /* ícone visível */
    margin-right: 0 !important;
  }
  #usuarioDropdown *:not(i){
    display: none !important;
  }

  /* 4) Sino também compacto */
  #notificacoesDropdown{
    padding-left: .5rem;
    padding-right: .5rem;
  }

  /* 5) Evita áreas “fantasmas” na navbar roubando clique */
  .navbar-nav .nav-item.dropdown > a.nav-link{
    display: inline-flex !important;
    align-items: center;
    width: auto !important;
  }

  /* 6) Garante que a nav da direita não quebre linha */
  .avocat-navbar .navbar-nav{
    flex-direction: row !important;
    align-items: center;
    flex-wrap: nowrap !important;
  }
}
/* =========================================================
   AUTH MOBILE: remove navbar-toggler "fantasma" (Bootstrap)
   ========================================================= */
@media (max-width: 991.98px){
  body.is-auth .avocat-navbar .navbar-toggler{
    display: none !important;
  }
}
/* =========================================================
   PAINEL LATERAL: z-index e clique estável (especialmente mobile)
   - abas SEMPRE clicáveis
   - backdrop só captura clique quando painel está aberto
   ========================================================= */

/* Abas verticais: sempre acima do conteúdo */
.painel-tabs-verticais{
  position: fixed;      /* reforça */
  right: 0;
  top: 120px;           /* mantenha se já usa; ajuste se necessário */
  z-index: 1095 !important;
  pointer-events: auto;
}

/* Container geral do painel */
#painel-lateral{
  z-index: 1085 !important;
}

/* Conteúdo do painel */
#painel-sidebar{
  z-index: 1090 !important;
}

/* Backdrop: por padrão não existe/interage */
#painel-backdrop{
  display: none;
  pointer-events: none;
  z-index: 1080 !important;
}

/* Quando o painel está aberto, backdrop liga e captura clique */
body.painel-open #painel-backdrop{
  display: block;
  pointer-events: auto;
}

/* ============================
   MOBILE: usuário = ícone apenas
   ============================ */
@media (max-width: 768px){

  /* limita a área clicável do dropdown do usuário */
  #usuarioDropdown{
    max-width: 44px !important;
    width: 44px !important;
    padding: 6px 8px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
  }

  /* esconde textos dentro do botão (nome, plano, período etc.) */
  #usuarioDropdown span,
  #usuarioDropdown small,
  #usuarioDropdown .user-name,
  #usuarioDropdown .user-plan,
  #usuarioDropdown .user-period,
  #usuarioDropdown .periodo-liberado{
    display: none !important;
  }

  /* garante que o ícone permaneça visível */
  #usuarioDropdown i,
  #usuarioDropdown svg,
  #usuarioDropdown img{
    display: inline-block !important;
    margin: 0 !important;
  }

  /* indicador/hambúrguer "extra" não deve aparecer no mobile */
  #menuIndicator{
    display: none !important;
  }
}
/* ===========================
   NAVBAR (MOBILE) - FIX COLLAPSE
   =========================== */
@media (max-width: 991.98px){
  /* O collapse do Bootstrap precisa ser bloco/coluna no mobile */
  .navbar .navbar-collapse.nav-right .navbar-nav{
    flex-direction: column !important;
    width: 100%;
  }
  .navbar .navbar-collapse.nav-right .nav-item{
    width: 100%;
  }
  .navbar .navbar-collapse.nav-right .nav-link{
    padding: .65rem .75rem;
  }
}
/* ===========================
   NAVBAR (MOBILE) - REDUZ USER/ALERT
   =========================== */
@media (max-width: 768px){
  /* some o alerta central no mobile */
  .alert-liberado{ display:none !important; }

  /* no dropdown do usuário: some texto e deixa só ícone */
  #usuarioDropdown{
    font-size: 0 !important; /* zera texto (nome) */
    padding: .35rem .55rem !important;
  }
  #usuarioDropdown i{
    font-size: 1.25rem !important; /* mantém ícone visível */
    margin: 0 !important;
  }
  #usuarioDropdown::after{
    display:none !important; /* remove caret do dropdown */
  }

  /* se existir small dentro (usuario_interno), garante que não apareça */
  #usuarioDropdown small{ display:none !important; }
}
/* =========================================================
   NAVBAR (PUBLIC / PRE-LOGIN) - FIX COLLAPSE MOBILE (Bootstrap 4.6)
   - Mantém o comportamento do collapse: fechado = display:none, aberto = display:block
   ========================================================= */
@media (max-width: 991.98px){

  /* toggler sempre clicável e visível */
  .navbar .navbar-toggler{
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 1061 !important;
  }

  /* Bootstrap: colapso fechado */
  #topNavbarContent.collapse:not(.show){
    display: none !important;
  }

  /* Bootstrap: colapso aberto */
  #topNavbarContent.collapse.show{
    display: block !important;
    width: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* organiza itens em coluna quando aberto */
  #topNavbarContent.nav-right .navbar-nav{
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    margin: .5rem 0 0 0 !important;
  }

  #topNavbarContent.nav-right .nav-item{
    width: 100% !important;
  }

  #topNavbarContent.nav-right .nav-link{
    padding: .75rem .75rem !important;
    opacity: 1 !important;
  }

  /* evita que regras globais de nav-right "forcem" layout horizontal */
  .navbar .nav-right{
    align-items: stretch !important;
  }
}
/* ===========================
   NAVBAR (MOBILE) - FIX COLLAPSE (SAFE)
   Mantém Bootstrap: fechado = none, aberto = block
   =========================== */
@media (max-width: 991.98px){

  /* Não force display:block no collapse fechado */
  .navbar .navbar-collapse.nav-right{
    width: 100%;
  }

  /* fechado */
  #topNavbarContent.collapse:not(.show){
    display: none !important;
  }

  /* aberto */
  #topNavbarContent.collapse.show{
    display: block !important;
    width: 100% !important;
  }

  /* Itens em coluna (apenas quando o collapse está aberto) */
  #topNavbarContent.collapse.show .navbar-nav{
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    margin: .5rem 0 0 0 !important;
  }

  #topNavbarContent.collapse.show .nav-item{
    width: 100% !important;
  }

  #topNavbarContent.collapse.show .nav-link{
    padding: .75rem .75rem !important;
  }
}
@media (max-width: 991.98px){
  body.is-guest .avocat-navbar .navbar-toggler{
    opacity: 1 !important;
    pointer-events: auto !important;
    filter: none !important;
  }
}
@media (max-width: 991.98px){
  body.is-auth .avocat-navbar .navbar-toggler{
    display: none !important;
  }
}
/* =========================================================
   FIX — GUEST MOBILE: navbar-collapse (hambúrguer) abrir corretamente
   Causa: navbar custom com height fixa e sem flex-wrap (quebra o collapse do Bootstrap)
   ========================================================= */
@media (max-width: 991.98px){

  /* 1) Permite que o collapse “quebre linha” e desça abaixo da barra */
  .navbar.avocat-navbar,
  .avocat-navbar-inner{
    flex-wrap: wrap !important;
  }

  /* 2) A navbar não pode ter height fixa quando o menu abre */
  .navbar.avocat-navbar{
    height: auto !important;
    min-height: 56px; /* mantém a altura visual quando fechado */
  }

  /* 3) O bloco colapsável precisa ocupar a linha inteira */
  #topNavbarContent{
    flex-basis: 100% !important;
    width: 100% !important;
  }

  /* 4) Visual/stack do menu aberto (evita parecer “não abriu”) */
  #topNavbarContent.collapse.show{
    display: block !important;
    background: var(--primary-color-2, #2e5b68) !important;
    padding: .5rem .75rem;
    margin-top: .35rem;
    border-top: 1px solid rgba(255,255,255,.12);
    z-index: 6500;
  }
}
@media (max-width: 991.98px){
  #topNavbarContent.collapse.show{
    position: absolute;
    left: 0;
    right: 0;
    top: 56px; /* altura da navbar no mobile */
    margin-top: 0;
    box-shadow: 0 12px 28px rgba(0,0,0,.25);
  }

  .navbar.avocat-navbar{
    position: relative; /* ancora o absolute do collapse */
  }
}
