/* ============================================= */
/* VARIÁVEIS GLOBAIS */
/* ============================================= */
:root {
  /* Cores */
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --border-color: #e9ecef;
  --text-color: #495057;
  
  /* Dimensões */
  --sidebar-width: 250px;
  --sidebar-collapsed-width: 70px;
  --navbar-height: 60px;
  
  /* Chat */
  --chat-bg-color: #f5f7fb;
  --chat-received-bubble: #ffffff;
  --chat-sent-bubble: #d1e7ff;
}

/* ============================================= */
/* ESTILOS BASE E RESET */
/* ============================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding-top: var(--navbar-height);
  background-color: var(--light-color);
  color: var(--text-color);
  overflow-x: hidden;
  transition: margin-left 0.3s ease;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ============================================= */
/* LAYOUT E GRID */
/* ============================================= */
.container-fluid {
  max-width: 100%;
  padding: 0 15px;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col-md-6 {
  flex: 0 0 50%;
  max-width: 50%;
  padding: 0 15px;
}

/* ============================================= */
/* COMPONENTES COMUNS */
/* ============================================= */

.btn.btn-secondary-one
{
    margin: 20px 0;
    background-color: #5c636a !important;
    color: white;
}

.btn.btn-secondary-two
{
    background-color: #0d6efd !important;
    color: white;
    margin: 20px 0;
    
}

.title-ticket h2 {
    margin: 0; /* Remove margens padrão do h2 */
    padding: 0; /* Remove paddings se houver */
    display: flex; /* Se quiser alinhar o ícone e o texto */
    align-items: center; /* Centraliza ícone verticalmente */
    gap: 0.5rem; /* Espaço entre ícone e texto */
}

.button-ticket {
    margin-left: auto;
    margin: 20px 0;
}

/* Cards */
.card {
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-bottom: 20px;
  transition: transform 0.2s, width 0.3s ease;
  background-color: white;
  animation: fadeIn 0.3s ease-out forwards;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.card-header {
  background-color: white;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-weight: 600;
  padding: 15px 20px;
  border-radius: 8px 8px 0 0;
}

.card-body {
  padding: 20px;
}

/* Status cards */
.status-card {
  padding: 20px 15px;
  border-radius: 8px;
  text-align: center;
  height: 100%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  background-color: white;
  animation: fadeIn 0.3s ease-out forwards;
}

.status-card i {
  font-size: 28px;
  margin-bottom: 15px;
  display: inline-block;
  color: inherit;
}

.status-card h5 {
  font-size: 14px;
  margin-bottom: 5px;
  color: white;
}

.status-card span {
  font-size: 26px;
  font-weight: bold;
  display: block;
  margin: 5px 0;
  color: var(--dark-color);
}

.status-card small {
  font-size: 12px;
  opacity: 0.8;
  display: block;
  color: white;
}

/* Alertas */
.alert-position {
  z-index: 1050;
  background-color: #d1e7dd;
  color: #0f5132;
  border-color: #badbcc;
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 800px;
}

/* Breadcrumb */
.breadcrumb {
  padding: 0.75rem 1rem;
  background-color: var(--light-color);
  border-radius: 0.375rem;
  margin-bottom: 1.5rem;
}

/* Listas */
.activity-list, .agenda-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.activity-list li {
  display: flex;
  margin-bottom: 15px;
  align-items: center;
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  color: white;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.agenda-list li {
  display: flex;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  align-items: center;
}

.agenda-time {
  width: 50px;
  font-weight: 500;
  color: var(--primary-color);
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ============================================= */
/* NAVBAR */
/* ============================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--navbar-height);
  z-index: 1030;
  background-color: #021736 !important;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 0.5rem 1rem;
}

.navbar .container-fluid {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  padding: 0.5rem 1rem;
}

.navbar-brand {
  order: 2;
  margin-left: 0.5rem;
}

.navbar-brand img {
  height: 40px;
}

.navbar-nav {
  order: 3;
  margin-left: auto;
  display: flex;
  align-items: center;
}

/* Botão toggle sidebar */
.btn-sidebar-toggle {
  color: white;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 0.5rem;
  order: 1;
}

/* Perfil do usuário */
.user-profile {
  display: flex;
  align-items: center;
  color: white;
  white-space: nowrap;
  padding: 0.25rem 0.5rem;
}

.user-avatar {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.8);
}

.user-name {
  margin: 0 8px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid white;
  margin-right: 8px;
}

.status-indicator.online { background-color: var(--success-color); }
.status-indicator.away { background-color: var(--warning-color); }
.status-indicator.busy { background-color: var(--danger-color); }
.status-indicator.offline { background-color: var(--secondary-color); }

/* Dropdown */
.d-flex.order-lg-2.ms-auto {
  margin-left: auto !important;
  display: flex !important;
  align-items: center;
}

.dropdown-menu {
  z-index: 1080 !important;
}

/* ============================================= */
/* SIDEBAR */
/* ============================================= */
.sidebar {
  width: var(--sidebar-width);
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  height: calc(100vh - var(--navbar-height));
  background: var(--light-color);
  z-index: 1040;
  padding-top: 1rem;
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
  transition: width 0.3s, transform 0.3s;
  overflow-x: hidden;
}

.sidebar .nav-link {
  font-weight: 500;
  color: var(--text-color);
  padding: 10px 10px;
  margin: 2px 10px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  color: var(--primary-color);
  background-color: rgba(13, 110, 253, 0.1);
}

.sidebar .nav-link.active {
  font-weight: 600;
}

.sidebar .nav-link i {
  margin-right: 10px;
  font-size: 1.1rem;
  min-width: 24px;
  text-align: center;
}

.sidebar .nav-item .text-primary {
  padding-left: 10px;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  transition: opacity 0.3s;
}

/* ============================================= */
/* CONTEÚDO PRINCIPAL */
/* ============================================= */
main {
  padding-top: 10px !important;
  overflow: hidden !important;
  
}

.main-content {
  flex: 1;
  min-height: calc(100vh - var(--navbar-height));
  padding: 20px;
  transition: all 0.3s ease;
}

/* ============================================= */
/* CHAT */
/* ============================================= */
.chat-container {
  display: flex;
  height: calc(100vh - 150px);
  max-height: 80vh;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  overflow: hidden;
}

.chat-sidebar {
  width: 300px;
  min-width: 250px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  background-color: var(--light-color);
  overflow-y: auto;
}

.chat-header {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.chat-search {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  background-color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.chat-conversations {
  flex: 1;
  overflow-y: auto;
  background-color: white;
}

.chat-conversation {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.chat-conversation:hover {
  background-color: var(--light-color);
}

.chat-conversation.unread {
  background-color: #e9f5ff;
  border-left: 3px solid var(--primary-color);
}

.chat-conversation-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
}

.chat-conversation-info {
  flex: 1;
  min-width: 0;
}

.chat-conversation-name {
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conversation-lastmsg {
  color: var(--secondary-color);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conversation-time {
  font-size: 0.75rem;
  color: #adb5bd;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--chat-bg-color);
  min-width: 0;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background-color: var(--chat-bg-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message {
  display: flex;
  margin-bottom: 0;
  max-width: 80%;
  animation: messageIn 0.2s ease-out;
}

.chat-message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
  align-self: flex-start;
  flex-shrink: 0;
}

.chat-message-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.chat-message-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  margin-bottom: 4px;
  position: relative;
  word-break: break-word;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.chat-message-received .chat-message-bubble {
  background-color: var(--chat-received-bubble);
  border-top-left-radius: 5px;
}

.chat-message-sent {
  justify-content: flex-end;
  margin-left: auto;
}

.chat-message-sent .chat-message-bubble {
  background-color: var(--chat-sent-bubble);
  border-top-right-radius: 5px;
  color: #0a58ca;
}

.chat-message-name {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--dark-color);
}

.chat-message-time {
  font-size: 0.75rem;
  color: var(--secondary-color);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-message-time i {
  font-size: 0.9em;
}

.chat-input {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background-color: white;
  position: sticky;
  bottom: 0;
}

.chat-input .form-control {
  border-radius: 20px;
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  resize: none;
  min-height: 40px;
  max-height: 120px;
  transition: all 0.2s;
}

.chat-input .form-control:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.1);
  border-color: rgba(13, 110, 253, 0.3);
}

.chat-attachment-btn, 
.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background-color: transparent;
  color: var(--secondary-color);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chat-attachment-btn:hover, 
.chat-send-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--primary-color);
}

.chat-send-btn {
  background-color: var(--primary-color);
  color: white;
}

.chat-send-btn:hover {
  background-color: #0b5ed7;
  color: white;
}

/* Dropdown de detalhes da conversa */
.dropdown-menu.chat-info {
  width: 400px;
  padding: 0;
  border: none;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
  border-radius: 10px;
  overflow: hidden;
  transform: translateX(20px);
}

.chat-info-header {
  padding: 18px 20px;
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
}

.chat-info-body {
  padding: 20px;
  max-height: 500px;
  overflow-y: auto;
}

.chat-info-section {
  margin-bottom: 25px;
}

.chat-info-section:last-child {
  margin-bottom: 0;
}

.chat-info-section-title {
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
  color: var(--dark-color);
  font-size: 1rem;
}

/* Estilo para a conversa ativa */
.list-group-item.active {
  background-color: #e0f0ff !important;
  border-left: 3px solid #0b5ed7 !important;
  color: #333 !important;
}

.list-group-item.active:hover {
  background-color: #e0f0ff !important;
}

/* Estilo para mensagens não lidas */
.list-group-item.unread {
  background-color: #f8f9fa !important;
  border-left: 3px solid #dc3545 !important;
}

/* ============================================= */
/* SIDEBAR MOBILE */
/* ============================================= */
.sidebar-mobile {
  position: fixed;
  top: var(--navbar-height);
  bottom: 0;
  left: -280px;
  z-index: 1050;
  width: 280px;
  background-color: white;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  overflow-y: auto;
  transition: left 0.3s;
}

.sidebar-mobile.show {
  left: 0;
}

.sidebar-mobile .sidebar {
  display: block !important;
  position: static;
  transform: none !important;
  width: 100% !important;
}

/* ============================================= */
/* SEÇÕES DO DASHBOARD */
/* ============================================= */
.dashboard-top-section {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.carousel-container {
  flex: 2;
  min-width: 400px;
}

.notices-container {
  flex: 1;
  min-width: 300px;
}

/* ============================================= */
/* MODAIS */
/* ============================================= */
.modal {
  z-index: 1070 !important;
}

.modal-backdrop {
  z-index: 1060 !important;
}

.modal-dialog {
  margin-top: 80px;
}

.modal-dialog-centered {
  min-height: calc(100% - (80px * 2));
}

/* ============================================= */
/* ANIMAÇÕES */
/* ============================================= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes messageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================= */
/* UTILITÁRIOS */
/* ============================================= */
#arquivosSelecionados {
  display: block;
  padding-left: 56px;
  margin-top: 4px;
  font-size: 0.8rem;
}

/* ============================================= */
/* RESPONSIVIDADE */
/* ============================================= */
@media (min-width: 992px) {
  #sidebarToggleDesktop {
    display: flex;
  }
  
  #sidebarToggleMobile {
    display: none !important;
  }
  
  .sidebar-mobile {
    display: none !important;
  }
  
  body.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed-width);
  }
  
  body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
  }
  
  body.sidebar-collapsed main {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
  }
  
  body.sidebar-collapsed .sidebar .nav-link span,
  body.sidebar-collapsed .sidebar .nav-item .text-primary,
  body.sidebar-collapsed .sidebar .badge {
    display: none;
  }
  
  body.sidebar-collapsed .sidebar .nav-link {
    justify-content: center;
    padding: 10px 5px;
  }
  
  body.sidebar-collapsed .sidebar .nav-link i {
    margin-right: 0;
    font-size: 1.3rem;
  }
  
  body.sidebar-collapsed .btn-sidebar-toggle i {
    transform: rotate(180deg);
  }
}

@media (max-width: 991.98px) {
  #sidebarToggleDesktop {
    display: none !important;
  }
  
  #sidebarToggleMobile {
    display: flex;
  }
  
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width);
    transition: transform 0.3s;
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  main {
    margin-left: 0;
    width: 100%;
  }
  
  .navbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0;
  }
  
  .user-name, 
  .status-indicator {
    display: none !important;
  }
  
  .user-avatar {
    width: 30px;
    height: 30px;
  }
  
  .dashboard-top-section {
    flex-direction: column;
  }
  
  .notices-container {
    flex: 1 1 100%;
    margin-right: 0;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
  }
  
  .carousel-container {
  flex: 2;
  min-width: 300px;
  }
  
  .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Ajustes para dropdown no mobile */
  .navbar-nav {
    position: static;
  }

  .navbar-nav .dropdown-menu {
    position: absolute;
    right: 0;
    left: auto;
    margin-top: 0.5rem;
  }
  
  .nav-link.dropdown-toggle {
    padding: 0.25rem;
    position: relative;
    z-index: 1;
  }

  .dropdown-menu {
    position: absolute;
    right: 15px;
    left: auto;
  }

  .nav-link.dropdown-toggle {
    padding: 0.5rem;
  }

  .user-avatar {
    margin-right: 0 !important;
    position: relative;
    transition: none;
  }

  .dropdown-toggle::after {
    display: none;
  }

  .dropdown-menu {
  z-index: 1080 !important;
}

  /* Ajustes específicos para lista de comunicados */
  .list-group-item h5 {
    flex-wrap: wrap;
  }
  
  .list-group-item h5 > span:first-child {
    width: 100%;
    margin-bottom: 5px;
  }

  /* Ajustes gerais para telas menores */
  .breadcrumb {
    padding: 0.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  
  .d-flex.justify-content-between.align-items-center.mb-4 {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }
  
  .btn-group .btn {
    flex: 1 1 auto;
    min-width: 120px;
    font-size: 0.85rem;
    padding: 0.375rem 0.5rem;
  }
  
  .list-group-item.list-group-item-action {
    padding: 12px;
  }
  
  .list-group-item p.mb-1 {
    font-size: 0.9rem;
  }
  
  .list-group-item h5 .badge {
    font-size: 0.75rem;
    margin-bottom: 3px;
    display: inline-block;
  }
  
  .card-header > .d-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .list-group-item.list-group-item-action small.text-muted {
    display: block;
    margin-top: 5px;
  }
}


@media (max-width: 767.98px) {
  /* Chat mobile layout improvements */
  .container-fluid > .row {
    flex-direction: column;
    gap: 0;
  }
  .navbar .container-fluid {
     display: flex;
     flex-wrap: nowrap;
     align-items: center;
     padding: 0.03rem 1rem;
     
  }
  .col-md-4.border-end {
    border-right: none !important;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    padding: 0;
    display: block;
    background: #fff;
    z-index: 2;
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    height: calc(100vh - var(--navbar-height));
    overflow-y: auto;
    transition: transform 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  }
  .col-md-4.border-end .d-flex.justify-content-between.align-items-center.mb-3 {
    padding: 16px 16px 8px 16px;
  }
  .col-md-4.border-end .d-flex.justify-content-between.align-items-center.mb-3 h4 {
    margin-bottom: 0;
    font-size: 1.15rem;
  }
  .col-md-4.border-end .btn.btn-primary[data-bs-toggle="modal"] {
    margin-left: 8px;
    padding-left: 18px;
    padding-right: 18px;
    border-radius: 20px;
    font-size: 1rem;
    box-shadow: 0 1px 4px rgba(13,110,253,0.07);
  }
  .col-md-4.border-end .mb-3 {
    padding-left: 16px;
    padding-right: 16px;
  }
  .col-md-4.border-end #listaConversas {
    padding-left: 8px;
    padding-right: 8px;
  }
  .col-md-8 {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin-top: 0;
    margin-left: 0;
    background: var(--chat-bg-color);
    min-height: 100vh;
    z-index: 1;
    position: relative;
    /* Espaçamento entre lista e conversa */
    padding-bottom: 60px;
  }
  .chat-container {
    height: calc(100vh - var(--navbar-height));
    min-height: 0;
    flex-direction: column;
    background: var(--chat-bg-color);
    padding-bottom: 60px;
  }
  .chat-main {
    width: 100%;
    min-height: 100vh;
    background: var(--chat-bg-color);
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
    position: relative;
  }
  .chat-messages {
    flex: 1 1 auto;
    padding: 20px;
    overflow-y: auto;
    background-color: var(--chat-bg-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    max-height: none;
  }
  .chat-input {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    border-top: 1px solid var(--border-color);
    background: #fff;
    padding: 12px 16px;
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
  }
  #colConversa.show-conversa .chat-input {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
  }
  /* Esconde lista de conversas quando uma conversa está aberta */
  .col-md-4.border-end.hide-lista {
    transform: translateX(-100%);
    pointer-events: none;
    opacity: 0;
  }
  /* Mostra conversa ocupando toda a tela */
  .col-md-8.show-conversa {
    display: block;
    z-index: 3;
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    height: calc(100vh - var(--navbar-height));
    background: var(--chat-bg-color);
    overflow-y: auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  }
  /* Botão voltar */
  .btn-voltar-chat {
    display: flex !important;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 500;
    margin-right: 10px;
    margin-bottom: 0;
    padding: 8px 10px 8px 0;
    cursor: pointer;
  }
  .chat-header {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    min-height: 60px;
  }
  /* Espaçamento entre lista e conversa */
  .col-md-4.border-end {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  }
  
/* Container principal - mantém título e botões separados */
.card-header > .d-flex {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
}

/* Container dos botões - agora com grid */
.card-header > .d-flex > div {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
}

/* Estilo dos botões */
.card-header .btn {
    width: 100%;
    white-space: nowrap;
    margin: 0 !important;
    text-align: center;
    padding: 0.375rem 0.5rem;
}



/* Responsividade */
@media (max-width: 500px) {
    .card-header > .d-flex > div {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


.btn.btn-secondary-one
{
    width: 100%;
    background-color: #5c636a !important;
    color: white;
    margin: 10px 0;
    
}

.btn.btn-secondary-two
{
    width: 100%;
    background-color: #0d6efd !important;
    color: white;
    margin: 10px 0;
    
}

.d-flex.justify-content-between.align-items-center.mb-4 {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 30px;
  }
  
.title-ticket h2 {
    margin: 0; /* Remove margens padrão do h2 */
    padding: 0; /* Remove paddings se houver */
    display: flex; /* Se quiser alinhar o ícone e o texto */
    align-items: center; /* Centraliza ícone verticalmente */
    gap: 0.5rem; /* Espaço entre ícone e texto */
}

.button-ticket {
    margin-left: auto;
    margin: 15px 0;
}

}

@media (max-width: 575.98px) {
  .table-responsive {
    border: none;
  }
  
  .table td, .table th {
    padding: 0.5rem;
  }
  
  .btn-group-sm > .btn {
    padding: 0.25rem 0.4rem;
    font-size: 0.75rem;
  }
  
  .modal-dialog {
    margin: 1rem;
  }
  
  .card-body {
    padding: 15px;
  }
  
  .d-flex.flex-wrap.gap-3 {
    gap: 10px;
  }
  
  .d-flex.align-items-center {
    flex: 1 1 100%;
  }
}

@media (max-width: 400px) {
  .table td, .table th {
    padding: 0.3rem;
    font-size: 0.8rem;
  }
  
  .btn-group-sm > .btn {
    padding: 0.2rem 0.3rem;
  }
}

/* ============================================= */
/* SOLUÇÃO DEFINITIVA - GRID RESPONSIVO */
/* ============================================= */

/* Desktop: 6 colunas */
@media (min-width: 992px) {
  .row.mb-4 > div {
    flex: 0 0 16.6666666667%;
    max-width: 16.6666666667%;
  }
}

/* Tablet: 3 colunas */
@media (max-width: 991.98px) and (min-width: 768px) {
  .row.mb-4 > div {
    flex: 0 0 33.3333333333%;
    max-width: 33.3333333333%;
  }
}

/* Celular: 2 colunas - SOLUÇÃO DEFINITIVA */
@media (max-width: 767.98px) {
  .row.mb-4 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    margin: 0 !important;
  }
  
  .row.mb-4 > div {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
}


