/* ============================================================
   CORREÇÃO SIDEBAR - SOLUÇÃO ÚNICA E DEFINITIVA
   ============================================================ */

html {
  overflow-x: hidden;
}

/* Header não pode cortar o handle do toggle */
aside.sidenav .sidenav-header {
  overflow: visible;
  position: relative;
}

/* Tamanho padrão do logo no sidebar (Envio Ecom) */
aside.sidenav .sidebar-logo-full {
  max-height: 2.25rem;
}

/* Tamanho específico para o whitelabel "Frete Fácil" — logo maior */
aside.sidenav .sidebar-logo-fretefacil {
  max-height: 3.4rem!important;
}
/* Header acomoda o logo maior do Frete Fácil sem cortes */
aside.sidenav .navbar-brand:has(.sidebar-logo-fretefacil) {
  min-height: 80px !important;
  padding: 0.5rem 0.5rem !important;
}

/* Foguete mini exibido apenas quando o sidebar está colapsado */
aside.sidenav .sidebar-logo-mini {
  display: none !important;
  font-size: 2rem;
  line-height: 1;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
  transition: transform 0.2s ease;
}

aside.sidenav .navbar-brand:hover .sidebar-logo-mini {
  transform: translateY(-2px) rotate(-8deg);
}

/* DESKTOP - Layout com sidebar visível */
@media (min-width: 1200px) {
  /* Sidebar fixo à esquerda (quando NÃO colapsado) */
  body.g-sidenav-show:not(.sidebar-collapsed) aside.sidenav {
    position: fixed;
    left: 0;
    top: 0;
    width: 17.125rem;
    height: 100vh;
    z-index: 990;
    margin: 0;
    border-radius: 0;
    overflow: visible;
  }

  /* Main content com margem do sidebar (quando NÃO colapsado) */
  body.g-sidenav-show:not(.sidebar-collapsed) .main-content {
    margin-left: 17.125rem;
    width: calc(100% - 17.125rem);
    max-width: calc(100% - 17.125rem);
  }

  /* Sidebar colapsado (apenas ícones) */
  body.sidebar-collapsed aside.sidenav {
    position: fixed;
    left: 0;
    top: 0;
    width: 80px;
    height: 100vh;
    z-index: 990;
    margin: 0;
    border-radius: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: visible;
  }

  /* Main content ajustado quando sidebar colapsado */
  body.sidebar-collapsed .main-content {
    margin-left: 80px;
    width: calc(100% - 80px);
    max-width: calc(100% - 80px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }
}

/* MOBILE - Sidebar oculto por padrão */
@media (max-width: 1199.98px) {
  body.g-sidenav-show aside.sidenav {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px !important;
    max-width: 85vw;
    height: 100vh;
    z-index: 990;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Sidebar visível no mobile (quando menu aberto) */
  body.g-sidenav-show.g-sidenav-pinned aside.sidenav {
    transform: translateX(0);
  }

  /* Main content ocupa tela inteira no mobile */
  body.g-sidenav-show .main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }

  /* Remover classe sidebar-collapsed no mobile */
  body.sidebar-collapsed aside.sidenav {
    width: 17.125rem;
    transform: translateX(-17.125rem);
  }

  body.sidebar-collapsed .main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }
}

/* Alerta de convite (ajuste para top offset) */
body.has-convite-alert aside.sidenav {
  margin-top: 64px;
  height: calc(100vh - 64px);
}

body.has-convite-alert .main-content {
  margin-top: 64px;
}

/* Páginas SEM sidebar (login, tracker, etc) */
body.g-sidenav-show .main-content:only-child,
body:not(.g-sidenav-show) .main-content {
  margin-left: 0;
  width: 100%;
  max-width: 100%;
}

/* ============================================================
   FIM CORREÇÃO SIDEBAR
   ============================================================ */

/* Scrollbar do menu lateral - mesma cor do fundo escuro */
aside.sidenav #sidenav-collapse-main::-webkit-scrollbar {
  width: 8px;
}
aside.sidenav #sidenav-collapse-main::-webkit-scrollbar-track {
  background: #1a2035;
}
aside.sidenav #sidenav-collapse-main::-webkit-scrollbar-thumb {
  background: #344767;
  border-radius: 4px;
}
aside.sidenav #sidenav-collapse-main::-webkit-scrollbar-thumb:hover {
  background: #4a5a7a;
}
/* Firefox */
aside.sidenav #sidenav-collapse-main {
  scrollbar-color: #39393f #37373d;
  scrollbar-width: thin;
}

/* Estilos gerais */
ul {
    list-style: none;
}

#pagarme-checkout-header .icon-pg-checkout-close {
    color: red;
    font-size: 25px;
}

.form-gray-border {
    display: block;
    width: 100%;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5rem;
    color: #495057;
    background-color: transparent;
    border: 1px solid #d2d6da;
    appearance: none;
    transition: 0.2s ease;
    padding: 4px;
    border-radius: 5px;
}

.bg-gradient-success-iframe {
    background-image: linear-gradient(195deg, #d35917 0%, #d35917 100%);
    display: flex;
    height: 3.25rem;
    padding: 0.625rem;
    justify-content: center;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
    align-self: stretch;
    border-radius: 0.375rem;
    font-family: Inter !important;
}

.password-toggle-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

.input-error {
    border-color: #ff0000 !important;
}

.label-prioriy {
    z-index: 1 !important;
}

.disabled-icon {
    pointer-events: none;
    opacity: 0.5;
}

@keyframes blinkBackground {
    0%, 100% { background-color: transparent; }
    50% { background-color: #3845e4; }
}

.blink-container {
    animation: blinkBackground 60s linear infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.blink-icon {
    animation: blink 2s linear infinite;
}

@keyframes blinkBuycredit {
    0%, 100% { background-color: #31d831; color: #fff; }
    50% { background-color: #1A5D1A; color: #fff; }
}

.blink-buycredit {
    animation: blinkBuycredit 4s linear infinite;
}

.input-edit-class {
    padding: 0.25rem;
    border-radius: 0.25rem;
    border: 1px solid #B2A59B;
    outline: none;
    width: 100%;
}

.input-edit-class:hover,
.input-edit-class:focus {
    border: 1px solid #354af4;
}

.button-edit-class {
    padding: 0.5rem;
    min-width: 8rem;
    max-width: 12rem;
    border-radius: 0.4rem;
    font-size: 0.8rem;
    border: none;
    background-image: linear-gradient(195deg, #354af4 0%, #452683 100%);
    color: #fff;
    cursor: pointer;
    margin-top: 1rem;
}

.button-edit-class:hover,
.button-filter-class:hover,
.button-clear-filter-class:hover {
    transition: 0.2s;
    opacity: 0.7;
}

.button-filter-class {
    padding: 0.4rem;
    min-width: 6rem;
    max-width: 12rem;
    border-radius: 0.4rem;
    font-size: 0.8rem;
    text-transform: capitalize;
    border: none;
    background-image: linear-gradient(195deg, #354af4 0%, #452683 100%);
    color: #fff;
    cursor: pointer;
}

.form-container {
    margin-top: 0.5rem;
    background-color: #f8f9fa;
    padding: 1rem;
}

.filter-form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.filter-form div {
    margin-top: 0.5rem;
    width: 100%;
}

.filter-form input {
    min-width: 100%;
    font-size: 0.9rem;
}

.button-clear-filter-class {
    background-color: transparent;
    color: #354af4;
    border: 1px solid #354af4;
    padding: 0.4rem;
    min-width: 6rem;
    max-width: 12rem;
    text-transform: capitalize;
    border-radius: 0.4rem;
    font-size: 0.8rem;
    cursor: pointer;
}

.buttons-container {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.flex-container-class {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    flex-direction: column;
}

.flex-container-class input {
    width: 20rem;
}

/* ============================================================
   RESPONSIVE - MOBILE
   ============================================================ */

@media (min-width: 320px) and (max-width: 409px) {
    .mobile-top-2 { margin-top: 0.5rem !important; }
    .mobile-filter-shipments { display: block !important; min-width: 50rem !important; }
    .mobile-filter-date-shipments { display: flex; gap: 2rem; }
    .desktop-date-shipments { display: none !important; }
    .mobile-filter-status-shipments,
    .mobile-filter-type-shipments { max-width: 19.5rem !important; }
    .mobile-filter-type-shipments select { min-width: 18rem !important; }
    .mobile-filter-destiny-shipments,
    .mobile-filter-barcode-shipments { min-width: 19.5rem !important; }
    .mobile-find-user { display: block !important; }
    .mobile-info-user { min-width: 21rem; }
    .mobile-flex { display: flex; align-items: center; }
    .mobile-h4-balance { width: 8rem !important; }

    .filter-form { display: block; }
    .filter-form div { margin-top: 0.5rem; width: 100%; }
    .filter-form input { min-width: 100%; font-size: 0.9rem; }

    .button-clear-filter-class { padding: 0.25rem; min-width: 4rem; max-width: 10rem; }
    .button-filter-class { padding: 0.25rem; min-width: 4rem; max-width: 10rem; }
}

@media (min-width: 410px) and (max-width: 576px) {
    .mobile-top-2 { margin-top: 0.5rem !important; }
    .mobile-filter-shipments { display: block !important; min-width: 60rem !important; }
    .mobile-filter-date-shipments { display: flex; gap: 2rem; }
    .desktop-date-shipments { display: none !important; }
    .mobile-filter-status-shipments,
    .mobile-filter-type-shipments { max-width: 23rem !important; }
    .mobile-filter-type-shipments select { min-width: 21.5rem !important; }
    .mobile-filter-destiny-shipments,
    .mobile-filter-barcode-shipments { min-width: 23rem !important; }
    .mobile-find-user { display: block !important; }
    .mobile-info-user { min-width: 22.5rem; }

    .button-clear-filter-class { padding: 0.25rem; min-width: 4rem; max-width: 10rem; }
    .button-filter-class { padding: 0.25rem; min-width: 4rem; max-width: 10rem; }
}

#modal-shipments-frequency {
    padding-top: 20%;
    z-index: 999999;
    display: block;
    backdrop-filter: blur(5px);
}

@media (min-width: 1280px) {
    .responsive-content {
        margin-left: 1rem !important;
        width: 95% !important;
    }
}

.footer {
    display: flex;
    justify-content: center;
}

.not-found-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 30rem;
}

.not-found-container i {
    font-size: 2.25rem;
}

.not-found-container h4 {
    color: #6c757d;
}

.ponto-coleta-edit {
    padding-left: 1rem;
    width: 12rem;
}

.ponto-coleta-edit button {
    margin-top: -1rem;
}

#modalCollectPoint {
    display: none;
}

.etiquetas-usuario-class {
    min-height: 28rem;
    max-height: 40rem;
    width: 95%;
    overflow-y: auto;
}

.etiquetas-usuario-class li {
    display: flex;
    width: 100%;
    justify-content: space-around;
    padding: 0.25rem;
}

.etiquetas-usuario-class li span {
    opacity: 0.45;
}

.disabledCotacao {
    filter: grayscale(100%);
    opacity: 0.6;
    pointer-events: none;
    user-select: none;
}

h6.mb-0.text-sm a:hover {
    color: #2a83ea;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1.5px;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

/* ============================================================
   LOGO
   ============================================================ */

.logo {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-right: 10px;
    color: #000000;
    transition: color 0.3s ease;
}

.logo img {
    height: 66px !important;
    vertical-align: middle;
}

.logo--grande {
    font-size: 2rem;
}

.logo--top-white {
    font-size: 1.75rem;
    color: #ffffff!important;
}

.card-header .logo img {
    height: auto !important;
    max-height: 60px;
    max-width: 85%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .card-header .logo img {
        max-height: 48px;
        max-width: 75%;
    }
}

@media (max-width: 480px) {
    .card-header .logo img {
        max-height: 40px;
        max-width: 70%;
    }
}

.logo--back {
    color: #0d0d0d;
}

.logo-menu {
    color: #ffffff !important;
    font-size: 1.75rem;
    padding: 0rem 0rem !important;
}

.logo:hover {
    opacity: 0.9;
}

.hover-underline:hover {
    text-decoration: underline !important;
}

/* ============================================================
   LINKS DE PRODUTOS
   ============================================================ */

.product-link-clickable {
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-link-clickable:hover {
    color: #2a83ea !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
    transform: translateY(-1px);
}

.product-link-clickable:active {
    transform: translateY(0);
}

.clickable-badge {
    transition: all 0.3s ease;
    display: inline-block;
}

.clickable-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    opacity: 0.9;
}

.clickable-badge:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.product-link-unmapped {
    color: #2a83ea !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

.product-link-unmapped:hover {
    color: #1a5bb8 !important;
    text-decoration-thickness: 2px;
    transform: translateY(-1px);
}

/* ============================================================
   BOTÃO TOGGLE SIDEBAR (DESKTOP) — handle na borda direita
   ============================================================ */

.btn-sidebar-toggle {
  position: absolute;
  top: 50%;
  right: -12px;
  transform: translateY(-50%);
  width: 24px;
  height: 48px;
  background: #2a2f38;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
  z-index: 1101;
  opacity: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  padding: 0;
}

#sidenav-main:hover .btn-sidebar-toggle,
.btn-sidebar-toggle:focus-visible,
.btn-sidebar-toggle:hover {
  opacity: 1;
}

.btn-sidebar-toggle:hover {
  background: #3a4150;
  color: #ffffff;
  transform: translateY(-50%) scale(1.05);
}

.btn-sidebar-toggle:focus-visible {
  outline: 2px solid rgba(94, 114, 228, 0.5);
  outline-offset: 2px;
}

.btn-sidebar-toggle i {
  transition: transform 0.3s ease;
  font-size: 12px;
  line-height: 1;
}

/* Estilos quando sidebar está colapsado */
@media (min-width: 1200px) {
  /* Oculta textos dos links */
  body.sidebar-collapsed .sidenav .nav-link-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.2s ease;
  }

  /* Centraliza ícones */
  body.sidebar-collapsed .sidenav .nav-link {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  /* Header quando colapsado */
  body.sidebar-collapsed .sidenav .sidenav-header {
    padding-top: 1rem;
    padding-bottom: 0.5rem;
  }

  /* Mantém o brand visível mas alterna conteúdo: logo completo -> só foguete */
  body.sidebar-collapsed .sidenav .navbar-brand {
    padding: 0.5rem 0 !important;
    min-height: 56px !important;
  }
  body.sidebar-collapsed .sidenav .sidebar-logo-full {
    display: none !important;
  }
  body.sidebar-collapsed .sidenav .sidebar-logo-mini {
    display: inline-flex !important;
  }

  /* Oculta linhas horizontais */
  body.sidebar-collapsed .sidenav .horizontal {
    opacity: 0;
  }

  /* Oculta títulos de seção */
  body.sidebar-collapsed .sidenav .nav-item h6,
  body.sidebar-collapsed .sidenav .nav-item.mt-3 {
    display: none;
  }

  /* Oculta small tags */
  body.sidebar-collapsed .sidenav .nav-link small {
    display: none;
  }

  /* Ícone do botão quando colapsado */
  body.sidebar-collapsed .btn-sidebar-toggle i {
    transform: rotate(180deg);
  }

  /* Quando colapsado, mantém handle visível para usuário poder reabrir */
  body.sidebar-collapsed .btn-sidebar-toggle {
    opacity: 0.85;
  }

  body.sidebar-collapsed .btn-sidebar-toggle:hover {
    opacity: 1;
  }

  /* Tooltip nos ícones quando minimizado */
  body.sidebar-collapsed .sidenav .nav-link:hover::after {
    content: attr(data-title);
    position: absolute;
    left: 85px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 10000;
    font-size: 0.875rem;
    pointer-events: none;
  }

  /* WhatsApp compacto quando sidebar colapsado — bolha circular */
  body.sidebar-collapsed .whatsapp-popup {
    bottom: 1rem;
    left: 20px;
  }

  body.sidebar-collapsed .whatsapp-popup-inner {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }

  body.sidebar-collapsed .whatsapp-popup-inner span {
    display: none;
  }

  body.sidebar-collapsed .whatsapp-popup-inner i {
    background: transparent;
    width: auto;
    height: auto;
    font-size: 1.35rem;
  }
}

/* Proteção mobile - desabilitar toggle */
@media (max-width: 1199.98px) {
  .btn-sidebar-toggle {
    display: none;
  }

  #iconNavbarSidenav,
  #iconSidenav,
  .sidenav-toggler-inner {
    z-index: 9999;
    pointer-events: auto;
  }

  .navbar-main {
    z-index: 999;
  }

  /* Overlay escuro quando menu mobile está aberto */
  #mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 989;
    cursor: pointer;
    animation: fadeIn 0.3s ease;
    display: none;
    -webkit-tap-highlight-color: transparent;
  }

  body.g-sidenav-pinned #mobile-menu-overlay {
    display: block;
  }

  /* Prevenir scroll quando menu está aberto */
  body.g-sidenav-pinned {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
  }

  /* Garantir que o main content não tenha scroll quando menu aberto */
  body.g-sidenav-pinned .main-content {
    overflow: hidden !important;
  }

  /* Sidebar com largura adequada no mobile */
  body.g-sidenav-pinned aside.sidenav {
    width: 280px !important;
    max-width: 85vw;
  }

  /* Garantir funcionamento do menu mobile */
  body.g-sidenav-pinned aside.sidenav {
    transform: translateX(0);
    margin-left: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  }

  /* Resetar sidebar-collapsed no mobile */
  body.sidebar-collapsed:not(.g-sidenav-pinned) aside.sidenav {
    width: 280px !important;
    max-width: 85vw;
    transform: translateX(-100%);
  }

  body.sidebar-collapsed:not(.g-sidenav-pinned) .main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }

  body.sidebar-collapsed:not(.g-sidenav-pinned) .sidenav .nav-link-text {
    opacity: 1;
    width: auto;
    overflow: visible;
  }

  body.sidebar-collapsed:not(.g-sidenav-pinned) .sidenav .navbar-brand {
    display: block;
  }

  /* WhatsApp normal no mobile */
  body.sidebar-collapsed:not(.g-sidenav-pinned) .whatsapp-popup {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    width: auto;
    height: auto;
    border-radius: 50px;
  }

  body.sidebar-collapsed:not(.g-sidenav-pinned) .whatsapp-popup-inner span {
    display: inline;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============================================================
   MELHORIAS DE RESPONSIVIDADE MOBILE
   ============================================================ */

/* Navbar Mobile - Ajustes gerais */
@media (max-width: 991.98px) {
  .navbar-main {
    padding: 0.5rem 0.75rem !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  .navbar-main .container-fluid {
    padding: 0.25rem 0 !important;
    flex-wrap: wrap;
  }

  /* Breadcrumb mais compacto */
  .breadcrumb {
    font-size: 0.688rem;
    margin-bottom: 0.125rem !important;
    padding: 0 !important;
  }

  .breadcrumb-item {
    padding: 0 !important;
  }

  .breadcrumb-item + .breadcrumb-item::before {
    padding: 0 0.25rem;
    font-size: 0.625rem;
  }

  /* Título menor mas visível */
  h6.font-weight-bolder {
    font-size: 0.938rem !important;
    margin-bottom: 0 !important;
    line-height: 1.2;
  }

  /* Reorganizar navbar - menu hambúrguer primeiro */
  .navbar-collapse {
    order: 3;
    width: 100%;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e9ecef;
  }

  /* Menu hambúrguer mais visível */
  #iconNavbarSidenav {
    order: -1;
    margin-right: 0.5rem;
  }

  .sidenav-toggler-inner {
    width: 28px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .sidenav-toggler-line {
    width: 100%;
    height: 3px;
    background: #344767;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* Saldo e créditos - layout mais compacto */
  .balance-card {
    padding: 0.35rem 0.6rem !important;
    margin-right: 0.5rem !important;
    min-width: auto;
    flex-shrink: 0;
  }

  .balance-card i {
    font-size: 0.75rem !important;
    margin-right: 0.25rem !important;
  }

  .balance-label {
    font-size: 0.563rem !important;
    line-height: 1;
  }

  .balance-value {
    font-size: 0.813rem !important;
    line-height: 1.1;
  }

  .btn-add-credit {
    padding: 0.4rem 0.7rem !important;
    font-size: 0.688rem !important;
    margin-right: 0.5rem !important;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .btn-add-credit i {
    font-size: 0.75rem !important;
    margin-right: 0.25rem !important;
  }

  .btn-add-credit span.d-lg-none {
    display: inline !important;
  }

  .btn-add-credit span.d-lg-inline {
    display: none !important;
  }

  /* Menu do usuário mais compacto */
  .user-avatar-circle {
    width: 28px !important;
    height: 28px !important;
    font-size: 11px !important;
  }

  .user-menu-arrow {
    font-size: 0.625rem !important;
    display: none; /* Ocultar seta no mobile */
  }

  /* Navbar items em linha */
  .navbar-nav {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }
}

/* Mobile pequeno - Ajustes adicionais */
@media (max-width: 767.98px) {
  /* Navbar ainda mais compacta */
  .navbar-main {
    padding: 0.5rem 0.5rem !important;
  }

  .navbar-main .container-fluid {
    padding: 0 !important;
  }

  /* Esconder breadcrumb em telas muito pequenas */
  .breadcrumb {
    display: none !important;
  }

  /* Título mais visível e maior */
  h6.font-weight-bolder {
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.25rem !important;
  }

  /* Layout da navbar reorganizado */
  .navbar-main nav[aria-label="breadcrumb"] {
    width: 100%;
    margin-bottom: 0.25rem;
  }

  /* Saldo e créditos - layout horizontal compacto */
  .balance-card {
    padding: 0.3rem 0.5rem !important;
    margin-right: 0.375rem !important;
    min-width: 70px;
  }

  .balance-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    line-height: 1.1;
  }

  .balance-label {
    font-size: 0.5rem !important;
    margin: 0 !important;
    line-height: 1;
  }

  .balance-value {
    font-size: 0.75rem !important;
    line-height: 1.1;
  }

  .btn-add-credit {
    padding: 0.35rem 0.6rem !important;
    font-size: 0.625rem !important;
    margin-right: 0.375rem !important;
  }

  .btn-add-credit i {
    font-size: 0.688rem !important;
    margin-right: 0.25rem !important;
  }

  .btn-add-credit span {
    font-size: 0.625rem !important;
  }

  .navbar-divider {
    height: 24px !important;
    margin-right: 0.375rem !important;
    display: none; /* Ocultar divisor no mobile muito pequeno */
  }

  /* Menu hambúrguer mais visível e maior */
  #iconNavbarSidenav {
    padding: 0.5rem !important;
    margin-right: 0.25rem;
  }

  .sidenav-toggler-inner {
    width: 26px;
    height: 20px;
  }

  .sidenav-toggler-line {
    height: 3px;
    background: #344767;
    border-radius: 2px;
  }

  /* Notificações e menu usuário menores */
  .navbar-nav .nav-item {
    padding: 0.25rem !important;
  }
}

/* Conteúdo da página - Ajustes mobile */
@media (max-width: 991.98px) {
  .responsive-content {
    padding: 0.75rem 0.5rem !important;
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Cards sem margem negativa no mobile */
  .card {
    margin-bottom: 1rem;
    border-radius: 0.5rem;
  }

  .card-header.mt-n4 {
    margin-top: 0 !important;
  }

  .card-header.mx-3 {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Header do card mais compacto e reorganizado */
  .bg-gradient-primary {
    padding: 0.875rem 0.75rem !important;
  }

  .bg-gradient-primary .ps-4,
  .bg-gradient-primary .pe-4 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* Layout do header reorganizado no mobile */
  .bg-gradient-primary > .d-flex {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  /* Ícone e título lado a lado */
  .bg-gradient-primary > .d-flex > .d-flex.align-items-center.gap-3 {
    width: 100%;
  }

  .icon-circle {
    width: 45px !important;
    height: 45px !important;
    flex-shrink: 0;
  }

  .icon-circle .material-icons {
    font-size: 22px !important;
  }

  /* Stats container empilhado no mobile */
  .stats-container {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem;
    margin-top: 0;
    width: 100%;
    flex-wrap: wrap;
  }

  .stats-card {
    flex: 1;
    min-width: 100px;
    max-width: 150px;
  }

  .stats-number {
    font-size: 18px !important;
  }

  .stats-label {
    font-size: 9px !important;
  }

  .filter-indicator {
    width: auto;
    padding: 0.25rem 0.75rem !important;
    font-size: 0.625rem !important;
  }

  /* Filtros empilhados */
  .filters-section {
    padding: 0.75rem 0.5rem !important;
  }

  .filters-section .row {
    margin: 0 !important;
  }

  .filters-section .col-lg-2,
  .filters-section .col-lg-3,
  .filters-section .col-lg-4,
  .filters-section .col-lg-5,
  .filters-section .col-md-4,
  .filters-section .col-md-6,
  .filters-section .col-md-12,
  .filters-section .col-sm-6 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-bottom: 0.75rem !important;
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  /* Botões de ação em coluna no mobile */
  .filters-section .d-flex.gap-2.justify-content-end {
    flex-direction: column;
    gap: 0.5rem !important;
    width: 100%;
  }

  .filters-section .btn {
    width: 100%;
    justify-content: center;
    padding: 0.625rem 1rem !important;
  }
}

/* Mobile pequeno - Filtros */
@media (max-width: 767.98px) {
  .filters-section {
    padding: 0.5rem !important;
  }

  .filter-icon-circle {
    width: 32px !important;
    height: 32px !important;
  }

  .filters-section h6 {
    font-size: 0.875rem !important;
  }

  /* Inputs full width */
  .filters-section .form-control,
  .filters-section .form-label {
    font-size: 0.875rem !important;
  }

  /* Tabela responsiva - scroll horizontal melhorado */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
    border-radius: 0.5rem;
    position: relative;
    overflow-x: auto;
    overflow-y: visible;
  }

  /* Indicador visual de scroll na tabela */
  .table-responsive::after {
    content: '→';
    position: sticky;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(to left, rgba(255, 255, 255, 0.9), transparent);
    padding: 1rem 0.5rem;
    color: #344767;
    font-size: 1.5rem;
    pointer-events: none;
    opacity: 0.5;
    display: none;
  }

  /* Mostrar indicador apenas quando há scroll */
  .table-responsive.scrollable::after {
    display: block;
  }

  /* Tabela mais compacta no mobile */
  .table {
    font-size: 0.813rem;
    min-width: 800px; /* Força scroll horizontal */
  }

  .table th,
  .table td {
    padding: 0.5rem 0.375rem !important;
    white-space: nowrap;
  }

  .table th {
    font-size: 0.688rem;
    font-weight: 600;
  }

  /* Checkboxes maiores no mobile para facilitar toque */
  .table .checkboxcuston {
    transform: scale(1.3);
    margin: 0.25rem;
  }

  /* Badges e status mais compactos */
  .table .badge {
    font-size: 0.688rem;
    padding: 0.25rem 0.5rem;
  }

  /* Botões de ação na tabela */
  .table .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

  .table .btn i {
    font-size: 0.875rem;
  }

  /* Cards de estatísticas menores */
  .stats-card {
    padding: 0.75rem !important;
  }

  .stats-number {
    font-size: 1.5rem !important;
  }

  .stats-label {
    font-size: 0.75rem !important;
  }
}

/* Mobile muito pequeno */
@media (max-width: 575.98px) {
  .responsive-content {
    padding: 0.5rem 0.25rem !important;
  }

  .card {
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .card-body {
    padding: 0.75rem 0.5rem !important;
  }

  /* Header ainda mais compacto */
  .bg-gradient-primary {
    padding: 0.75rem 0.5rem !important;
  }

  .bg-gradient-primary h5 {
    font-size: 0.938rem !important;
    line-height: 1.2;
  }

  .bg-gradient-primary p {
    font-size: 0.688rem !important;
    margin-top: 0.25rem !important;
  }

  .icon-circle {
    width: 40px !important;
    height: 40px !important;
  }

  .icon-circle .material-icons {
    font-size: 20px !important;
  }

  /* Stats ainda mais compactos */
  .stats-container {
    gap: 0.375rem !important;
  }

  .stats-card {
    padding: 0.5rem 0.75rem !important;
    min-width: 80px;
    max-width: 120px;
  }

  .stats-number {
    font-size: 16px !important;
  }

  .stats-label {
    font-size: 8px !important;
  }

  .filter-indicator {
    padding: 0.2rem 0.5rem !important;
    font-size: 0.563rem !important;
  }

  /* Filtros ainda mais compactos */
  .filters-section {
    padding: 0.5rem 0.25rem !important;
  }

  .filters-section h6 {
    font-size: 0.813rem !important;
    margin-bottom: 0.5rem !important;
  }

  .filter-icon-circle {
    width: 28px !important;
    height: 28px !important;
  }

  .filters-section .col-sm-6,
  .filters-section .col-md-4,
  .filters-section .col-md-6,
  .filters-section .col-md-12,
  .filters-section .col-lg-2,
  .filters-section .col-lg-3,
  .filters-section .col-lg-4,
  .filters-section .col-lg-5 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    margin-bottom: 0.5rem !important;
  }

  .filters-section .form-control,
  .filters-section .form-label {
    font-size: 0.813rem !important;
    padding: 0.5rem 0.75rem !important;
  }

  /* Botões menores mas ainda clicáveis */
  .btn-sm {
    padding: 0.625rem 1rem !important;
    font-size: 0.813rem !important;
    min-height: 44px; /* Tamanho mínimo para toque */
  }

  /* Tabela com scroll mais suave */
  .table-responsive {
    margin: 0 -0.25rem;
    padding: 0.25rem;
  }

  .table {
    font-size: 0.75rem;
  }

  .table th,
  .table td {
    padding: 0.375rem 0.25rem !important;
  }
}
