:root {
  --cor-fundo: #f3f4f6;
  --cor-painel: #1f2937;
  --cor-destaque: #2f8f50;
  --cor-destaque-escura: #267543;
  --cor-texto: #1c1c1c;
  --cor-card: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--cor-texto);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden; /* Evita qualquer scroll horizontal indesejado na página */
}

.bg-textura,
.bg-autenticacao {
  min-height: 100vh;
  background: linear-gradient(135deg, #e8edf3 0%, #f3f6fa 48%, #fafcff 100%);
}

/* Layout Responsivo para Tela de Autenticação (Login / Cadastro) */
.bg-autenticacao {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(135deg, #e8edf3 0%, #f3f6fa 48%, #fafcff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.decor-auth {
  display: none;
}

.decor-auth-1 {
  display: none;
}

.decor-auth-2 {
  display: none;
}

.conteiner-autenticacao {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1;
}

.auth-stack {
  width: 100%;
  max-width: 960px;
}

.cartao-autenticacao {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.15);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

/* De 768px em diante (MD e LG), vira 2 colunas */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .auth-layout {
    grid-template-columns: minmax(280px, 1fr) minmax(340px, 1.2fr);
  }
}

.auth-showcase {
  padding: 2.5rem 2rem;
  background: linear-gradient(165deg, #0f766e 0%, #14532d 52%, #0b3d2d 100%);
  color: #ecfeff;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
}

.auth-showcase::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  right: -120px;
  bottom: -90px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-form-area {
  background: #ffffff;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.auth-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 16ch;
}

.auth-subtitle {
  font-size: 0.95rem;
  color: rgba(236, 254, 255, 0.82);
  max-width: 44ch;
}

.auth-beneficios {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
  width: fit-content;
  max-width: 100%;
}

.auth-beneficios li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(236, 254, 255, 0.94);
  font-size: 0.9rem;
}

.auth-beneficios i {
  color: #86efac;
}

.icone-marca {
  width: 200px;
  height: 200px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.28);
  border: 3px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.94);
  padding: 0.35rem;
}

.icone-marca img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.abas-autenticacao {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 0.8rem;
  background: #e2e8f0;
  padding: 0.3rem;
}

.btn-aba {
  border: 0;
  border-radius: 0.62rem;
  padding: 0.5rem 0.9rem;
  background: transparent;
  color: #334155;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-aba.ativo {
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.25);
}

.painel-aba {
  display: none;
}

.painel-aba.ativo {
  display: block;
}

.campo-senha {
  position: relative;
}

.campo-senha .form-control {
  padding-right: 2.7rem;
}

.cartao-autenticacao .form-control,
.cartao-autenticacao .form-select {
  border-radius: 0.8rem;
  border-color: #cdd6df;
  background: #fff;
  padding-top: 0.62rem;
  padding-bottom: 0.62rem;
}

.cartao-autenticacao .form-control:focus,
.cartao-autenticacao .form-select:focus {
  border-color: rgba(15, 118, 110, 0.52);
  box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.14);
}

.btn-olho {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  font-size: 1.05rem;
  line-height: 1;
  color: #4b5563;
  opacity: 0.9;
  cursor: pointer;
}

.btn-olho:hover,
.btn-olho:focus {
  opacity: 1;
}

.btn-laranja,
.btn-verde {
  background: var(--cor-destaque);
  color: #fff;
  border: none;
}

.btn-auth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-weight: 700;
  padding: 0.65rem 0.95rem;
  border-radius: 0.82rem;
}

.auth-form-head h2 {
  font-weight: 800;
  color: #0f172a;
}

.btn-laranja:hover,
.btn-laranja:focus,
.btn-verde:hover,
.btn-verde:focus {
  background: var(--cor-destaque-escura);
  color: #fff;
}

.btn-link-recovery {
  border: 0;
  background: transparent;
  color: #0f766e;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: underline;
  padding: 0;
}

.btn-link-recovery:hover,
.btn-link-recovery:focus {
  color: #0b5d57;
}

.painel-recuperacao {
  margin-top: 0.9rem;
  padding: 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.8rem;
  background: #f8fafc;
}

.modal-recuperacao {
  position: fixed;
  inset: 0;
  z-index: 3600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-recuperacao-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.modal-recuperacao-card {
  position: relative;
  z-index: 1;
  width: min(100%, 640px);
  margin-top: 0;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.recuperacao-etapas {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.recuperacao-etapa {
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
}

.recuperacao-etapa.ativo {
  background: #0f766e;
  color: #ecfeff;
}

.bloco-suporte {
  border: 1px solid #dbe2ea;
  border-radius: 0.8rem;
  padding: 0.75rem 0.85rem;
  background: #ffffff;
}

.bloco-suporte-externo {
  align-self: flex-start;
  width: min(100%, 420px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.suporte-flutuante {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 1500;
}

.suporte-bolha {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  border: 2px solid rgba(15, 118, 110, 0.35);
  background: radial-gradient(circle at 30% 25%, #2fb07a 0%, #0f766e 70%);
  color: #ecfeff;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  font-weight: 700;
  font-size: 0.8rem;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.3);
}

.suporte-bolha i {
  font-size: 1rem;
}

.suporte-pop {
  position: absolute;
  left: 0;
  bottom: 96px;
  width: min(88vw, 320px);
  border: 1px solid #dbe2ea;
  border-radius: 0.8rem;
  padding: 0.75rem 0.85rem;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.suporte-flutuante:hover .suporte-pop,
.suporte-flutuante:focus-within .suporte-pop {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.suporte-flutuante:hover .suporte-bolha,
.suporte-flutuante:focus-within .suporte-bolha {
  transform: translateY(-2px);
}

.loader-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
  z-index: 4000;
}

.loader-spinner {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  border: 6px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  animation: giro-loader 0.9s linear infinite;
}

@keyframes giro-loader {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 576px) {
  .suporte-bolha {
    width: 62px !important;
    height: 62px !important;
    font-size: 0.68rem !important;
  }
  
  .suporte-pop {
    left: 0 !important;
    bottom: 74px !important;
    width: calc(100vw - 2rem) !important;
  }
  
  .conteiner-autenticacao {
    padding: 0.8rem;
  }

  .cartao-autenticacao {
    max-width: 100%;
    border-radius: 1rem;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-showcase {
    padding: 1.3rem 1rem;
  }

  .auth-beneficios {
    gap: 0.35rem;
  }

  .auth-form-area {
    background: rgba(255, 255, 255, 0.9);
  }

  .modal-recuperacao {
    align-items: flex-end;
    padding: 0.75rem;
  }

  .modal-recuperacao-card {
    width: 100%;
  }

  .suporte-bolha {
    width: 74px;
    height: 74px;
    font-size: 0.72rem;
  }

  .suporte-pop {
    bottom: 84px;
  }

  .auth-title {
    font-size: 1.45rem;
    max-width: none;
  }

  .icone-marca {
    width: 112px;
    height: 112px;
  }

  .auth-subtitle {
    font-size: 0.86rem;
    max-width: none;
  }

  .decor-auth-1,
  .decor-auth-2 {
    display: none;
  }
}

@media (min-width: 382px) and (max-width: 767px) {
  .bg-autenticacao {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .conteiner-autenticacao {
    align-items: flex-start;
    min-height: auto;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
  }
}

/* Tabela produtor - Cinzas Disponíveis */
.table-produtor thead th {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.85rem 1.2rem;
  background: transparent;
}

.table-produtor tbody td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.table-produtor tbody tr:last-child td {
  border-bottom: none;
}

.qtd-unidade {
  color: var(--cor-destaque);
  font-weight: 700;
}

.data-tabela {
  color: #3b82f6;
  font-size: 0.9rem;
}

.btn-solicitar {
  background: #1a5c35;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.btn-solicitar:hover,
.btn-solicitar:focus {
  background: #267543;
  color: #fff;
}

.layout-dashboard {
  min-height: 100vh;
  display: flex;
}

.menu-lateral {
  width: 260px;
  background: linear-gradient(170deg, #111827, var(--cor-painel));
  color: #e5e7eb;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: width 0.25s ease;
  overflow: hidden;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
  align-self: flex-start;
}

.menu-lateral.recolhido {
  width: 68px;
}

.logo-sidebar {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 0.4rem;
}

.menu-lateral.recolhido .texto-sidebar,
.menu-lateral.recolhido .logo-sidebar {
  display: none;
}

.menu-lateral.recolhido .btn-menu-usina,
.menu-lateral.recolhido .btn-menu-produtor {
  justify-content: center;
  padding: 0.7rem;
}

.menu-lateral.recolhido .btn-menu-usina .bi,
.menu-lateral.recolhido .btn-menu-produtor .bi {
  font-size: 1.25rem;
  opacity: 1;
}

.menu-lateral.recolhido #sair {
  padding: 0.45rem;
}

.btn-toggle-sidebar {
  background: none;
  border: none;
  color: #d3d8e3;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 0.4rem;
  line-height: 1;
  font-size: 1.15rem;
  flex-shrink: 0;
  transition: color 0.15s;
}

.btn-toggle-sidebar:hover {
  color: #35b06d;
  background: rgba(66, 185, 112, 0.15);
}

.btn-menu {
  text-align: left;
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-menu:hover,
.btn-menu.ativo {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.conteudo-dashboard {
  flex: 1;
  padding: 1.2rem;
  background: var(--cor-fundo);
  overflow-x: hidden; /* Garante que elementos internos não vazem a largura */
}

.card-indicador {
  border: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  background: var(--cor-card);
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
  gap: 1rem;
  padding: 1.4rem;
  border-radius: 1.4rem;
  color: #eff6ff;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
}

.dashboard-hero::before,
.dashboard-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.dashboard-hero::before {
  width: 280px;
  height: 280px;
  right: -80px;
  top: -120px;
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-hero::after {
  width: 220px;
  height: 220px;
  right: 18%;
  bottom: -140px;
  background: rgba(255, 255, 255, 0.06);
}

.dashboard-hero-produtor {
  background: linear-gradient(135deg, #123b2a 0%, #1d6b49 52%, #8dd7a8 100%);
}

.dashboard-hero-usina {
  background: linear-gradient(135deg, #10213d 0%, #214a78 48%, #52b7b0 100%);
}

.dashboard-hero-conteudo,
.dashboard-hero-destaques {
  position: relative;
  z-index: 1;
}

.dashboard-hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-hero-titulo {
  margin: 0 0 0.65rem;
  font-size: clamp(1.55rem, 2vw, 2.25rem);
  line-height: 1.1;
  font-weight: 800;
  max-width: 16ch;
}

.dashboard-hero-texto {
  max-width: 62ch;
  color: rgba(239, 246, 255, 0.84);
}

.dashboard-hero-destaques {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-content: stretch;
}

.dashboard-mini-card {
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: rgba(8, 15, 28, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.dashboard-mini-card-label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.74);
}

.dashboard-mini-card-valor {
  display: block;
  font-size: 1rem;
  font-weight: 700;
}

.dashboard-metricas .card-indicador-modern {
  border-radius: 1.25rem;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
}

.dashboard-metricas .card-indicador-modern .card-body {
  padding: 1.15rem;
}

.card-indicador-topo {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.card-indicador-titulo {
  margin: 0;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 700;
}

.card-indicador-subtitulo {
  margin: 0.18rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
}

.card-indicador-icone {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.card-indicador-valor {
  margin: 1rem 0 0.35rem;
  color: #020617;
  font-size: clamp(2rem, 3vw, 2.5rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.card-indicador-legenda {
  color: #475569;
  font-size: 0.84rem;
}

.card-indicador-emerald .card-indicador-icone {
  color: #047857;
  background: rgba(16, 185, 129, 0.14);
}

.card-indicador-amber .card-indicador-icone {
  color: #b45309;
  background: rgba(245, 158, 11, 0.16);
}

.card-indicador-sky .card-indicador-icone {
  color: #0369a1;
  background: rgba(14, 165, 233, 0.14);
}

.card-indicador-violet .card-indicador-icone {
  color: #6d28d9;
  background: rgba(139, 92, 246, 0.14);
}

.card-indicador-neutral .card-indicador-icone {
  color: #475569;
  background: rgba(148, 163, 184, 0.18);
}

.card-indicador-coral .card-indicador-icone {
  color: #c2410c;
  background: rgba(249, 115, 22, 0.16);
}

.card-indicador-ocean .card-indicador-icone {
  color: #0f766e;
  background: rgba(20, 184, 166, 0.15);
}

.badge-status {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.78rem;
}

.status-disponivel {
  background: #d1fae5;
  color: #065f46;
}

.status-solicitado {
  background: #fff3cd;
  color: #7c5c00;
}

.status-em-transporte {
  background: #dbeafe;
  color: #1e3a8a;
}

.status-cancelado {
  background: #fee2e2;
  color: #991b1b;
}

.status-entregue {
  background: #ede9fe;
  color: #5b21b6;
}

.termo {
  max-width: 920px;
  margin: 0 auto;
}

.painel-usina-app,
.painel-produtor-app,
.painel-adm-app {
  background: #f3f4f6;
}

.layout-usina .menu-lateral-usina,
.layout-produtor .menu-lateral-produtor {
  background: linear-gradient(180deg, #121826 0%, #1a2234 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-menu-usina,
.btn-menu-produtor {
  width: 100%;
  border: 0;
  text-align: left;
  border-radius: 0.65rem;
  padding: 0.7rem 0.85rem;
  color: #d3d8e3;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-menu-usina .bi,
.btn-menu-produtor .bi {
  font-size: 1.1rem;
  flex-shrink: 0;
  opacity: 0.75;
}

.btn-menu-usina:hover .bi,
.btn-menu-usina.ativo .bi,
.btn-menu-adm:hover .bi,
.btn-menu-adm.ativo .bi,
.btn-menu-produtor:hover .bi,
.btn-menu-produtor.ativo .bi {
  opacity: 1;
}

.btn-menu-usina:hover,
.btn-menu-usina.ativo,
.btn-menu-adm:hover,
.btn-menu-adm.ativo,
.btn-menu-produtor:hover,
.btn-menu-produtor.ativo {
  color: #35b06d;
  background: rgba(66, 185, 112, 0.15);
}

.rodape-menu-usina,
.rodape-menu-produtor {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.8rem;
}

.topo-dashboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  background: linear-gradient(170deg, #111827, var(--cor-painel));
  color: #fff;
  padding: 0.85rem 1.25rem;
  margin: -1.2rem -1.2rem 1.5rem -1.2rem;
  /* Adicione esta linha para evitar que a margem negativa estoure a largura */
  width: calc(100% + 2.4rem);
}

#titulo_secao {
  color: #fff; /* Garante que o texto do título fique branco */
  font-size: 1.25rem; /* Ajuste o tamanho da fonte conforme necessário */
  font-weight: 600;
}

/* Ajusta a cor do ícone dentro do título */
#titulo_secao .bi {
  color: #fff;
}

.conteudo-principal {
  padding: 1.5rem;
}

.secao-usina,
.secao-produtor {
  display: none;
}

.secao-usina.ativa,
.secao-produtor.ativa {
  display: block;
}

.avatar-perfil {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #d1d5db;
  color: #374151;
  font-weight: 700;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar-perfil img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
}

/* ── Responsividade: ≤ 1199px ─────────────────────────────────────── */
@media (max-width: 1199px) {
  .conteudo-dashboard {
    padding: 1rem;
  }

  .painel-acoes-solic {
    min-width: 180px;
  }
}

/* ── Responsividade: ≤ 991px (tablets e mobile: XS, SM, MD) ──────────────────── */
@media (max-width: 991px) {
  .layout-dashboard {
    flex-direction: column;
    min-height: 100vh;
  }

  /* Sidebar vira bottom nav bar fixa em linha única */
  .menu-lateral {
    order: 99;
    width: 100% !important;
    height: 60px !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    z-index: 1000;
    flex-direction: row;
    align-items: center;
    padding: 0;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-right: none;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
    background: linear-gradient(170deg, #111827, var(--cor-painel));
  }

  /* Oculta topo da sidebar antiga */
  .menu-lateral > div:first-child > .d-flex {
    display: none !important;
  }

  /* Nav container com scroll horizontal se necessário, sem quebra de linha */
  .menu-lateral > div:first-child {
    flex: 1;
    min-width: 0;
    height: 100%;
  }

  .menu-lateral > div:first-child nav {
    flex-direction: row !important;
    gap: 0 !important;
    height: 100%;
    align-items: center;
    flex-wrap: nowrap !important; /* Garante que fica em uma única linha */
    overflow-x: auto; /* Permite rolar se faltar tela em telas muito pequenas */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* Esconde barras de rolagem nativas mantendo a rolagem ativa */
  .menu-lateral > div:first-child nav::-webkit-scrollbar {
    display: none;
  }

  /* Ajuste dos botões da barra inferior */
  .btn-menu-usina,
  .btn-menu-produtor,
  .btn-menu {
    flex: 1;
    min-width: 64px; /* Garante tamanho mínimo legível por botão */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.15rem;
    padding: 0.35rem 0.2rem;
    border-radius: 0;
    border: none;
    text-align: center;
    height: 100%;
  }

  .btn-menu-usina .bi,
  .btn-menu-produtor .bi,
  .btn-menu .bi {
    font-size: 1.15rem;
    opacity: 0.85;
    margin: 0;
  }

  .btn-menu-usina .texto-sidebar,
  .btn-menu-produtor .texto-sidebar,
  .btn-menu .texto-sidebar {
    display: block !important;
    font-size: 0.6rem;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 68px;
  }

  /* Botão Sair no rodapé mobile */
  .rodape-menu-usina,
  .rodape-menu-produtor {
    border-top: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    display: flex;
    align-items: center;
    height: 100%;
    flex-shrink: 0;
  }

  .rodape-menu-usina .small,
  .rodape-menu-produtor .small {
    display: none;
  }

  #sair {
    margin: 0 !important;
    width: auto !important;
    min-width: 56px;
    height: 100%;
    border-radius: 0 !important;
    border: none !important;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #sair .texto-sidebar {
    display: block !important;
    font-size: 0.6rem;
  }

  .btn-toggle-sidebar {
    display: none;
  }

  /* Padding inferior do conteúdo para a barra não cobrir nada */
  .conteudo-dashboard {
    padding: 1rem 1rem 76px !important;
    flex: 1;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .painel-acoes-solic {
    min-width: 160px;
  }
}

/* ── Responsividade: ≤ 767px (celulares grandes) ─────────────────── */
@media (max-width: 767px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
    padding: 1.1rem;
  }

  .dashboard-hero-titulo {
    max-width: none;
  }

  .dashboard-hero-destaques {
    grid-template-columns: 1fr;
  }

  /* Cards indicadores: 2 por linha */
  .row.g-3 > [class*="col-xl-3"] {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* Topo dashboard */
  .topo-dashboard {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  /* Tabela disponíveis: esconde data */
  .table-produtor th:nth-child(4),
  .table-produtor td:nth-child(4) {
    display: none;
  }

  /* Modais: ocupam tela inteira no mobile */
  .modal-dialog {
    margin: 0.5rem;
  }

  /* Toast menor */
  ._toast {
    min-width: 200px;
    max-width: calc(100vw - 2rem);
    font-size: 0.83rem;
  }

  /* Perfil: avatar + campo em coluna */
  .d-flex.align-items-start.gap-4 {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }
}

/* ── Responsividade: ≤ 382px (celulares pequenos) ────────────────── */
@media (max-width: 382px) {
  .auth-showcase {
    display: none;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    border-radius: 1rem;
    padding: 0.95rem;
  }

  .card-indicador-valor {
    font-size: 1.85rem;
  }

  /* Cards indicadores: 1 por linha */
  .row.g-3 > [class*="col-xl-3"],
  .row.g-3 > [class*="col-sm-6"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Conteúdo com margem inferior suficiente para a bottom nav */
  .conteudo-dashboard {
    padding: 0.6rem 0.5rem 76px !important;
  }

  /* Cabeçalho de seção menor */
  .topo-dashboard h1 {
    font-size: 1.1rem;
  }

  /* Tabela disponíveis: esconde quantidade */
  .table-produtor th:nth-child(3),
  .table-produtor td:nth-child(3) {
    display: none;
  }

  /* Botão solicitar: compacto */
  .btn-solicitar {
    padding: 0.35rem 0.6rem;
    font-size: 0.78rem;
  }

  /* Modal ocupa tela toda */
  .modal-dialog {
    margin: 0.25rem;
  }

  .modal-body {
    padding: 0.75rem;
  }

  /* Login card sem bordas laterais */
  .cartao-autenticacao {
    border-radius: 0.5rem;
  }

  ._toast {
    bottom: 0.5rem;
    right: 0.5rem;
    min-width: 160px;
    font-size: 0.8rem;
  }
}

/* ── Tabela Minhas Solicitações ──────────────────────────────────────── */
.table-minhas .qtd-col {
  white-space: nowrap;
  font-weight: 600;
}

.uso-sub {
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.5;
}

.badge-min {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-pendente {
  background: #fef9c3;
  color: #854d0e;
}

.badge-transporte {
  background: #dbeafe;
  color: #1e40af;
}

.badge-entregue-min {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.badge-cancelado-min {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.btn-acao-min {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid #d1d5db;
  border-radius: 0.45rem;
  background: #fff;
  color: #374151;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.btn-acao-min:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
}

.produtor-celula {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar-mini {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #111827;
  font-size: 0.92rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.painel-acoes-solic {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 230px;
}

.chat-box {
  border: 1px solid #d1d5db;
  border-radius: 0.55rem;
  padding: 0.55rem;
  background: #f9fafb;
}

.chat-mensagens {
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.chat-modal-mensagens {
  max-height: 320px;
  min-height: 180px;
  border: 1px solid #d1d5db;
  border-radius: 0.55rem;
  padding: 0.6rem;
  background: #f9fafb;
}

.msg-chat {
  border-radius: 0.5rem;
  padding: 0.45rem 0.55rem;
  font-size: 0.82rem;
  line-height: 1.35;
}

.msg-head {
  font-weight: 700;
  font-size: 0.74rem;
  margin-bottom: 0.2rem;
}

.msg-usina {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.msg-produtor {
  background: #eef2ff;
  border: 1px solid #e0e7ff;
}

@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .termo {
    border: 0 !important;
    box-shadow: none !important;
  }
}

/* ── Toast / Notificações ──────────────────────────────────────────── */
#_toast_container {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
  max-width: calc(100vw - 2.4rem);
}

._toast {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1.1rem;
  border-radius: 0.65rem;
  font-size: 0.88rem;
  font-weight: 500;
  min-width: 260px;
  max-width: 380px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: auto;
  cursor: pointer;
  color: #fff;
  line-height: 1.35;
}

._toast-visivel {
  opacity: 1;
  transform: translateX(0);
}

._toast-erro {
  background: #dc2626;
  border-left: 4px solid #991b1b;
}

._toast-sucesso {
  background: #16a34a;
  border-left: 4px solid #14532d;
}

._toast-aviso {
  background: #d97706;
  border-left: 4px solid #92400e;
}

._toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  font-weight: 700;
}

._toast-texto {
  flex: 1;
}

/* Estilo para Abas Responsivas no Card documentos */
#docsTabs {
  scrollbar-width: none; /* Esconde scrollbar no Firefox */
}

#docsTabs::-webkit-scrollbar {
  display: none; /* Esconde scrollbar no Chrome/Safari */
}

#docsTabs .nav-link {
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

#docsTabs .nav-link.active {
  background-color: var(--cor-destaque);
  color: #ffffff !important;
}