:root {
  /* Light Mode Colors - Simplificadas */
  --bg-primary: #ffffff;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f8f9fa;
  --bg-card: #ffffff;
  --card-bg: rgb(240 242 249);
  --text-primary: #000000;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border-color: #e0e0e0;
  --border-light: #f0f0f0;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-hover: rgba(0, 0, 0, 0.15);
  --shadow-strong: rgba(0, 0, 0, 0.2);
  --company-color: <?=$obj->color;
  --company-color-rgb: <?=hexdec(substr($obj->color, 1, 2)) ?>,
    <?=hexdec(substr($obj->color, 3, 2)) ?>,
    <?=hexdec(substr($obj->color, 5, 2)) ?>;

  /* Sidebar Colors - Branco no light mode */
  --sidebar-bg: #ffffff;
  --sidebar-bg-secondary: #ffffff;
  --sidebar-text: #000000;
  --sidebar-text-muted: #666666;
  --sidebar-border: #e0e0e0;
  --sidebar-input-bg: #ffffff;
  --sidebar-input-border: #e0e0e0;
  --sidebar-hover: rgba(var(--company-color-rgb), 0.1);

  /* Header Heights */
  --main-header-height: 80px;
}

[data-theme="dark"] {
  /* Dark Mode Colors - Preto */
  --bg-primary: #000000;
  --bg-secondary: #000000;
  --bg-tertiary: #1a1a1a;
  --bg-card: #000000;
  --card-bg: rgba(0, 0, 0, 0.125);
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #999999;
  --border-color: #333333;
  --border-light: #2a2a2a;
  --shadow: rgba(255, 255, 255, 0.1);
  --shadow-hover: rgba(255, 255, 255, 0.15);
  --shadow-strong: rgba(255, 255, 255, 0.2);

  /* Sidebar Colors - Preto no dark mode */
  --sidebar-bg: #000000;
  --sidebar-bg-secondary: #000000;
  --sidebar-text: #ffffff;
  --sidebar-text-muted: #cccccc;
  --sidebar-border: #333333;
  --sidebar-input-bg: #1a1a1a;
  --sidebar-input-border: #333333;
  --sidebar-hover: rgba(var(--company-color-rgb), 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  line-height: 1.6;
}

/* Wrapper para alinhar sidebar e main content */
.content-wrapper {
  display: flex;
  min-height: 100vh;
}

.btn-guest-other {
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  transition: border-color 0.3s ease, color 0.3s ease;
}

/* Sidebar - Modernizada */
.sidebar {
  width: 280px;
  background-color: var(--sidebar-bg);
  padding: 30px 24px;
  border-right: 1px solid var(--sidebar-border);
  box-shadow: 4px 0 20px var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: fixed;
  top: var(--main-header-height);
  left: 0;
  height: calc(100vh - var(--main-header-height));
  z-index: 90;
  overflow-y: hidden;
}

@media (max-width: 995px) {
  .sidebar {
    display: none !important;
  }
}

.sidebar-title {
  font-size: 16px;
  margin-bottom: 20px;
  font-weight: 700;
  color: var(--sidebar-text);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--company-color);
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.sidebar-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--company-color), transparent);
}

.filter-group {
  margin-bottom: 16px;
}

.filter-label {
  display: block;
  color: var(--sidebar-text-muted);
  font-size: 12px;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-select {
  width: 100%;
  padding: 10px 12px;
  background-color: var(--sidebar-input-bg);
  border: 1px solid var(--sidebar-input-border);
  border-radius: 12px;
  color: var(--sidebar-text);
  font-size: 14px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  font-weight: 500;
}

@media (max-width: 767.98px) {
  .filter-select {
    font-size: 11px;
    padding: 6px 8px;
  }

  input,
  textarea,
  select {
    background-color: rgba(0, 0, 0, 0.125) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
    transition: all 0.3s ease;
  }
}

.filter-select:focus {
  border-color: var(--company-color);
  background-color: var(--sidebar-input-bg);
  box-shadow: 0 0 0 3px rgba(var(--company-color-rgb), 0.1);
  transform: translateY(-1px);
}

.filter-select:hover {
  border-color: var(--company-color);
  transform: translateY(-1px);
}

.filter-select option {
  background-color: var(--sidebar-input-bg);
  color: var(--sidebar-text);
  padding: 12px;
}

/* Estilos para selects desabilitados */
.filter-select.disabled-select {
  background-color: var(--sidebar-input-bg);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
  border-color: var(--border-light);
}

.filter-select.disabled-select:hover {
  border-color: var(--border-light);
  transform: none;
}

.filter-select.disabled-select:focus {
  border-color: var(--border-light);
  box-shadow: none;
  transform: none;
}

/* Indicador visual para campos desabilitados */
.filter-group:has(.disabled-select) .filter-label::after {
  content: " (Selecione a opção anterior)";
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
}

.favorites-filter {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--sidebar-text-muted);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--sidebar-input-border);
  background: linear-gradient(
    135deg,
    rgba(var(--company-color-rgb), 0.1),
    rgba(var(--company-color-rgb), 0.05)
  );
  font-weight: 500;
}

.favorites-filter:hover {
  color: var(--company-color);
  border-color: var(--company-color);
  background: var(--sidebar-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--company-color-rgb), 0.2);
}

.favorites-filter input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--company-color);
  cursor: pointer;
}

/* Main Content */
.main-content {
  flex: 1;
  min-height: 250vh;
  background-color: var(--bg-secondary);
  transition: all 0.3s ease;
  position: relative;
  margin-left: 280px;
  padding-top: 0px;
}

@media (max-width: 1130px) {
  .main-content {
    min-height: 280vh;
  }
}

@media (max-width: 680px) {
  .main-content {
    min-height: 350vh;
  }
}

@media (max-width: 580px) {
  .main-content {
    min-height: 450vh;
  }
}

/* CORREÇÃO: Header Secundário Sticky - Sempre fixo */
/* .secondary-sticky-header {
  position: fixed !important;

  top: var(--main-header-height);
  left: 280px;
  right: 0;
  z-index: 95;
  background: var(--bg-primary);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(10px);

  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 30px var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 0;

  transform: none !important;
} */

.secondary-sticky-header.scrolled {
  background: var(--bg-secondary);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(10px);
  /* Suporte para Safari */
  box-shadow: 0 8px 40px var(--shadow-hover);
  /* CORREÇÃO: Mantém a posição fixa mesmo quando scrolled */
  /* top: var(--main-header-height) !important; */
  position: fixed !important;
}

[data-theme="dark"] .secondary-sticky-header {
  background: var(--bg-primary);
  /*   box-shadow: 0 4px 30px var(--shadow); */
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .secondary-sticky-header.scrolled {
  background: var(--bg-secondary);
  box-shadow: 0 8px 40px var(--shadow-hover);
}

.secondary-nav {
  padding: 0px 24px;
  /*   border-bottom: 1px solid var(--border-color); */
  box-shadow: 0 4px 30px var(--shadow);
}

.secondary-nav .container {
  max-width: 100%;
  padding: 0;
}

.secondary-nav .row {
  margin: 0;
  align-items: center;
}

@media (max-width: 767.98px) {
  .secondary-nav .row {
    margin-bottom: 14px;
  }

  .row > * {
    padding-right: 0.1rem;
    padding-left: 0.1rem;
    margin-top: 0rem;
  }
}

.secondary-nav .col-3 {
  padding: 0 6px;
}

.secondary-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  gap: 10px;
  color: var(--text-primary);
  padding: 5px 5px;
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* Suporte para Safari */
}

.secondary-nav-item:hover {
  background: var(--company-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--shadow-hover);
  color: white;
  text-decoration: none;
  border-color: var(--company-color);
}

.secondary-nav-item:active {
  transform: translateY(-1px);
}

.secondary-nav-item i {
  font-size: 16px;
  color: inherit;
}

.secondary-nav-item span {
  font-size: 14px;
  font-weight: 600;
  color: inherit;
  text-align: center;
  line-height: 1.3;
}

.secondary-nav-item .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 12px;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}



/* Ajuste do conteúdo principal */
.main-content-inner {
  padding-top: 0;
}

.main-content-inner .pt-4 {
  padding-top: 24px !important;
}

/* Mobile Menu Toggle - Modernizado */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  background: linear-gradient(
    135deg,
    var(--company-color),
    rgba(var(--company-color-rgb), 0.8)
  );
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  padding: 14px;
  border-radius: 16px;
  z-index: 1000;
  box-shadow: 0 8px 25px rgba(var(--company-color-rgb), 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* Suporte para Safari */
}

.mobile-menu-toggle:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 35px rgba(var(--company-color-rgb), 0.4);
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 998;
}

@media (min-width: 995px) {
  .hide-menu-desktop {
    display: none !important;
  }
}

/* CORREÇÃO: Responsive Design - Mobile */
@media (max-width: 995px) {
  /* Esconde completamente a sidebar no mobile */
  .sidebar {
    display: none !important;
  }

  /* CORREÇÃO: Header secundário no mobile - posição fixa corrigida */
  .secondary-sticky-header {
    width: 100% !important;
    /*     left: 0 !important;
    top: 0 !important; */
    /* Fixa no topo da tela no mobile */
    /* position: fixed !important; */

    /* Z-index mais alto para ficar acima de tudo */
    z-index: 95;
    background: var(--bg-primary);
  }

  .collapse {
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    margin-top: var(--bs-gutter-y);
  }
  /* CORREÇÃO: Collapse menu - z-index corrigido 
  .secondary-sticky-header .collapse {
    background: var(--bg-primary);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 8px 30px var(--shadow);
    z-index: 1001 !important;
    Z-index mais alto que os cards
    position: relative;
    margin-top: 10px;
    padding-bottom: 10px;
  }
  */

  /* CORREÇÃO: Botão de toggle do collapse */
  .secondary-sticky-header .btn {
    z-index: 1002 !important;
    position: relative;
  }

  /* Esconde completamente o header secundário desktop no mobile */
  .hide-menu {
    display: none !important;
  }

  .content-wrapper {
    flex-direction: column;
  }

  .main-content {
    margin-left: 0;
    padding-top: 0;
    /* Remove padding-top pois o header é fixo */
    width: 100%;
  }

  /* CORREÇÃO: Conteúdo principal deve começar abaixo do header fixo */
  .main-content-inner {
    /* margin-top: 200px; */
    /* Espaço para o header fixo + collapse menu */
    padding-top: 20px;
  }

  /* CORREÇÃO: Quando o collapse está fechado, reduz o margin-top */
  .main-content-inner.collapse-closed {
    /* margin-top: 120px; */
    /* Espaço menor quando collapse está fechado */
  }

  .mobile-menu-toggle {
    display: none;
  }

  .theme-toggle {
    top: 20px;
    right: 20px;
    z-index: 1003;
    /* Acima de tudo */
  }

  /*     .nav-tabs {
        margin-left: 12px;
        margin-right: 12px;
        margin-top: 12px;
    } */

  .tab-content {
    margin-left: 12px;
    margin-right: 12px;
  }

  .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 576px) {
  .sidebar {
    display: none !important;
  }

  .hide-menu {
    display: none !important;
  }

  /* CORREÇÃO: Ajuste adicional para telas muito pequenas */
  .main-content-inner {
    /* margin-top: 180px; */
  }

  .main-content-inner.collapse-closed {
    /* margin-top: 100px; */
  }
}

/* Custom Scrollbar - Modernizada */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: var(--sidebar-input-bg);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    var(--company-color),
    rgba(var(--company-color-rgb), 0.7)
  );
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--company-color);
}

/* Ajustes para o conteúdo original */
.main-content .mx-0 {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.main-content .mx-md-5 {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Ajustes para as abas - Modernizadas */
.nav-tabs {
  /*     margin-left: 24px;
    margin-right: 24px; */
  margin-top: 24px;
  /* border-bottom: 2px solid var(--border-color); */
  background-color: var(--bg-primary);
  border-radius: 16px 16px 0 0;
  padding: 12px 12px 0 12px;
}

.nav-tabs .nav-link {
  color: var(--text-secondary) !important;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: 12px 12px 0 0;
  margin-right: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: transparent;
  border: none;
  font-size: 14px;
}

.nav-tabs .nav-link:hover {
  background-color: var(--bg-tertiary);
  color: var(--company-color) !important;
  transform: translateY(-2px);
}

.nav-tabs .nav-link.active {
  color: var(--company-color) !important;
  background-color: var(--bg-secondary);
  border-bottom: 3px solid var(--company-color);
  font-weight: 700;
  transform: translateY(-2px);
}

/* Ajustes para o conteúdo das abas */
.tab-content {
  margin-left: 24px;
  margin-right: 24px;
  transition: all 0.3s ease;
}

/* Ajustes para o filtro de favoritos */
.filter-container {
  padding: 24px;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  margin: 0;
}

.filter-favorites {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  background-color: var(--bg-primary);
  border-radius: 25px;
  box-shadow: 0 4px 12px var(--shadow);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
}

.filter-favorites:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--shadow-hover);
  color: var(--company-color);
  border-color: var(--company-color);
}

.filter-favorites.active {
  background: linear-gradient(
    135deg,
    rgba(var(--company-color-rgb), 0.1),
    rgba(var(--company-color-rgb), 0.05)
  );
  border-color: var(--company-color);
  color: var(--company-color);
  box-shadow: 0 4px 20px rgba(var(--company-color-rgb), 0.2);
}

.filter-favorites i {
  margin-right: 10px;
  color: inherit;
  font-size: 16px;
}

/* Ajustes para os cards - Modernizados */
.card-not-ticket {
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 8px 30px var(--shadow);
  padding: 24px 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  margin-bottom: 24px;
  border: none;
  background-color: var(--company-color);
  overflow: hidden;
}

.card-not-ticket::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  pointer-events: none;
}

.card-not-ticket:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 50px var(--shadow-hover);
}

.card-not-ticket h1 {
  font-weight: 700;
  margin: 12px 0 8px 0;
}

.card-not-ticket i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.9;
}

/* Ajustes para botões de voltar */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--company-color);
  cursor: pointer;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 24px;
  background: linear-gradient(
    135deg,
    rgba(var(--company-color-rgb), 0.1),
    rgba(var(--company-color-rgb), 0.05)
  );
  border: 1px solid rgba(var(--company-color-rgb), 0.2);
}

.back-button:hover {
  background: linear-gradient(
    135deg,
    rgba(var(--company-color-rgb), 0.2),
    rgba(var(--company-color-rgb), 0.1)
  );
  transform: translateX(-6px);
  box-shadow: 0 4px 12px rgba(var(--company-color-rgb), 0.2);
}

/* Melhorias gerais de espaçamento */
.container-fluid {
  padding-left: 12px;
  padding-right: 12px;
}

/* Ajustes para breadcrumbs */
.breadcrumb {
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: start;
  overflow-x: auto;
  /* permite scroll horizontal se necessário */
  white-space: nowrap;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  padding: 10px 24px;
  margin-bottom: 24px;
  border-radius: 0;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
  scrollbar-width: none;
  /* Firefox */
}

.breadcrumb::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari */
}

.breadcrumb-item {
  color: var(--text-secondary);
  font-size: 14px;
  flex-shrink: 0;
  /* evita quebra do texto */
}

.breadcrumb-item.active {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--text-muted);
  font-size: 14px;
}

/* Links dentro do breadcrumb */
.breadcrumb-item a {
  color: var(--company-color) !important;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* Responsivo */
@media (max-width: 768px) {
  .breadcrumb {
    padding: 8px 16px;
    font-size: 13px;
  }

  .breadcrumb-item {
    font-size: 13px;
  }

  .breadcrumb-item.active {
    font-size: 14px;
  }

  .breadcrumb-item + .breadcrumb-item::before {
    font-size: 13px;
  }
}

.breadcrumb-nav {
  padding: 0.75rem 1rem;
  margin-bottom: 0;
}

.breadcrumb-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: #bdc3c7;
  margin: 0 0.5rem;
}

.update-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.update-badge .reload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  width: 30px;
  border-radius: 50%;
  border: none;
  background-color: #6c757d;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}
.reload-btn i {
  display: block;            /* força o ícone a centralizar */
  font-size: 16px;           /* tamanho do ícone */
  color: #fff;             /* cor do ícone */
}

.update-badge .reload-btn:hover {
  background-color: #3cbda1;
  transform: rotate(180deg);
}

.update-badge .reload-btn:active {
  transform: rotate(180deg) scale(0.95);
}

.update-badge .reload-btn.loading {
  animation: spin 1s linear infinite;
  pointer-events: none;
  opacity: 0.7;
}

.update-badge .badge {
  background-color: #3cbda1 !important;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.update-badge .fa-clock-o {
  margin-right: 0.25rem;
}

/* Animação de loading */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Breakpoint personalizado para 650px */
@media (max-width: 650px) {
  .breadcrumb-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .update-badge {
    align-self: flex-end;
  }

  .breadcrumb-nav {
    padding: 0.75rem 1rem 1rem 1rem;
  }
}

/* Para telas muito pequenas */
@media (max-width: 480px) {
  .breadcrumb-item {
    font-size: 0.85rem;
  }

  .update-badge .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
  }

  .update-badge .reload-btn {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .update-badge {
    gap: 0.4rem;
  }
}

/* Variação com botão mais discreto */
.update-badge.subtle .reload-btn {
  background-color: transparent;
  color: #6c757d;
  border: 1px solid #dee2e6;
}

.update-badge.subtle .reload-btn:hover {
  background-color: #f8f9fa;
  color: #3cbda1;
  border-color: #3cbda1;
}

/* Variação com botão integrado ao badge */
.update-badge.integrated {
  gap: 0;
}

.update-badge.integrated .reload-btn {
  border-radius: 15px 0 0 15px;
  background-color: rgba(60, 189, 161, 0.8);
  width: auto;
  padding: 0.5rem 0.6rem;
  height: auto;
}

.update-badge.integrated .badge {
  border-radius: 0 15px 15px 0;
  margin-left: -1px;
}

.update-badge.integrated .reload-btn:hover {
  background-color: rgba(60, 189, 161, 1);
}

/* Cards de serviços - Modernizados */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 16px;
  overflow: hidden;
}

.card-ticket {
  height: 230px;
}

.card:hover {
  box-shadow: 0 8px 30px var(--shadow-hover);
  transform: translateY(-4px);
  border-color: var(--company-color);
}

.card-header {
  background: linear-gradient(
    135deg,
    var(--company-color),
    rgba(var(--company-color-rgb), 0.8)
  ) !important;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
}

.card-body {
  background-color: var(--bg-card);
  color: var(--text-primary);
  padding: 20px;
}

.card-footer {
  background-color: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
}

/* Alerts - Modernizados */
.alert {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 16px 20px;
}

.alert-info {
  background: linear-gradient(
    135deg,
    rgba(var(--company-color-rgb), 0.1),
    rgba(var(--company-color-rgb), 0.05)
  );
  border-color: var(--company-color);
  color: var(--text-primary);
}

/* Footer navbar ajustes */
#show-navbar-footer {
  display: none;
  transition: all 0.3s ease;
  background-color: var(--bg-primary) !important;
  border-top: 1px solid var(--border-color) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* Suporte para Safari */
}

@media (max-width: 995px) {
  #show-navbar-footer {
    display: block !important;
  }
}

/* Loading e maintenance */
.maintenance {
  display: none;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  background-color: var(--bg-card);
}

/* Estilos para favoritos */
.favorite-icon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
  z-index: 10;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 4px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.favorite-icon:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.3);
  transform: scale(1.1);
}

.favorite-icon.active {
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.2);
}

/* Theme transition - Melhorada */
* {
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode specific adjustments - Melhoradas */
[data-theme="dark"] .nav-tabs {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .card-not-ticket {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .card-not-ticket:hover {
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .theme-toggle {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .mobile-menu-toggle {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .filter-favorites {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .filter-favorites:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .tab-content {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Melhorias adicionais para dark mode */
[data-theme="dark"] .sidebar {
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .back-button {
  background: linear-gradient(
    135deg,
    rgba(var(--company-color-rgb), 0.15),
    rgba(var(--company-color-rgb), 0.08)
  );
}

[data-theme="dark"] .back-button:hover {
  background: linear-gradient(
    135deg,
    rgba(var(--company-color-rgb), 0.25),
    rgba(var(--company-color-rgb), 0.15)
  );
  box-shadow: 0 4px 12px rgba(var(--company-color-rgb), 0.3);
}

/* Estilos para o filtro de favoritos no header secundário */
.filter-favorites-header {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-favorites-header.active {
  background: var(--company-color) !important;
  color: white !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--shadow-hover);
}

.filter-favorites-header.active i,
.filter-favorites-header.active span {
  color: white !important;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 900px;
  margin: 2rem auto;
  background: var(--bg-card);
  border-radius: 0;
  box-shadow: none;
  border: none;
  transition: all 0.3s ease;
}

/* Ícone Principal - Exatamente como na imagem */
.icon-container {
  display: inline-block;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .icon-container {
    margin-bottom: 0rem;
  }
}

.icon-large {
  font-size: 28px;
  color: white;
  background: #3cbda1;
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(60, 189, 161, 0.15);
  transition: all 0.3s ease;
}

.icon-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(60, 189, 161, 0.25);
}

/* Título com Texto Rotativo */
.empty-state h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.2;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .empty-state h2 {
    margin-bottom: 0rem;
    gap: 0rem;
  }
}

.greeting-emoji {
  display: inline-block;
  animation: bounce-emoji 2s ease-in-out infinite;
}

@keyframes bounce-emoji {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  40% {
    transform: translateY(-5px) rotate(10deg);
  }

  60% {
    transform: translateY(-3px) rotate(-5deg);
  }
}

/* Animação de fade para troca de texto */
.text-fade-out {
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.5s ease;
}

.text-fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.5s ease;
}

/* Subtítulo */
.empty-state .subtitle {
  font-size: clamp(0.8rem, 1.5vw, 1.2rem); /* 16px min, ~18px max */
  color: #718096;
  margin-bottom: clamp(1rem, 3vw, 3rem); /* 32px min, 48px max */
  line-height: 1.6; /* mantém proporção */
  max-width: clamp(90%, 600px, 600px);
  margin-left: 0rem;
  margin-right: 0rem;
}


/* Step Indicator - Design Limpo */
.step-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: 3rem;
  position: relative;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 768px) {
  .step-indicator {
    margin-bottom: 0.8rem;
  }
}

.progress-line {
  position: absolute;
  top: 30px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: #e2e8f0;
  border-radius: 1px;
  z-index: 0;
}

.progress-fill {
  height: 100%;
  background: #3cbda1;
  border-radius: 1px;
  width: 0%;
  transition: width 0.8s ease;
  position: relative;
}

/* Steps Individuais */
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  max-width: 120px;
  position: relative;
  z-index: 2;
  cursor: pointer;
  transition: all 0.3s ease;
}

.step-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #f7fafc;
  border: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.step-circle i {
  font-size: 20px;
  color: #a0aec0;
  transition: all 0.3s ease;
}

.step span {
  font-size: 0.9rem;
  font-weight: 500;
  color: #718096;
  transition: all 0.3s ease;
}

/* Step Ativo */
.step.active .step-circle {
  background: #3cbda1;
  border-color: #3cbda1;
  box-shadow: 0 4px 15px rgba(60, 189, 161, 0.2);
}

.step.active .step-circle i {
  color: white;
}

.step.active span {
  color: #3cbda1;
  font-weight: 600;
}

/* Hover nos steps */
.step:hover .step-circle {
  border-color: #3cbda1;
  transform: scale(1.05);
}

.step:hover span {
  color: #3cbda1;
}

/* Botão de Ação */
.action-button {
  background: #3cbda1;
  color: var(--text-primary);
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 3rem;
  box-shadow: 0 4px 15px rgba(60, 189, 161, 0.2);
  position: relative;
  overflow: hidden;
  min-width: 200px;
}

.btn-text {
  transition: all 0.3s ease;
}

.btn-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.action-button:hover {
  background: #2a9d84;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(60, 189, 161, 0.3);
}

.action-button.loading .btn-text {
  opacity: 0;
}

.action-button.loading .btn-loading {
  opacity: 1;
}


card-icon {
  font-size: 1.25rem;
}

.info
/* Scroll Hint */
.scroll-hint {
  text-align: center;
  color: #3cbda1;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.scroll-hint:hover {
  color: #2a9d84;
}

.scroll-hint i {
  font-size: 16px;
  transition: transform 0.3s ease;
  animation: float-arrow 2s ease-in-out infinite;
}

@keyframes float-arrow {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(3px);
  }
}

.scroll-hint:hover i {
  transform: translateY(5px);
}

/* Responsividade */
@media (max-width: 768px) {
  .empty-state {
    padding: 0rem 0rem;
    margin: 0rem 0;
  }

  .empty-state h2 {
    font-size: 1.55rem;
  }

  .step {
    max-width: 80px;
  }

  .step-circle {
    width: 50px;
    height: 50px;
  }

  .step-circle i {
    font-size: 14px;
  }

  .step span {
    font-size: 0.6rem;
  }


  .progress-line {
    display: none;
  }
}

/* Cards de Informação */
.info-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.info-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  border-color: rgba(60, 189, 161, 0.2);
}

.info-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.info-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.info-card-content {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.info-card-icon {
  font-size: 1.25rem;
}

/* Responsivo para Mobile */
@media (max-width: 768px) {
  .info-cards {
    margin-top: 1rem;
    grid-template-columns: 1fr 1fr; /* Mantém lado a lado */
    gap: 0.75rem; /* Reduz o gap */
    max-width: 100%;
    padding: 0 0.5rem;
  }
  
  .info-card {
    padding: 1rem; /* Reduz padding interno */
    border-radius: 8px;
  }
  
  .info-card-header {
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .info-card-title {
    font-size: 0.875rem; /* Texto menor */
    font-weight: 600;
  }
  
  .info-card-content {
    font-size: 0.8rem; /* Texto menor */
    line-height: 1.4;
  }
  
  .info-card-icon {
    font-size: 1.1rem; /* Ícone menor */
  }
}

/* Para telas muito pequenas (menos de 480px) */
@media (max-width: 480px) {
  .info-cards {
    gap: 0.5rem;
    padding: 0 0.25rem;
  }
  
  .info-card {
    padding: 0.75rem;
  }
  
  .info-card-title {
    font-size: 0.8rem;
  }
  
  .info-card-content {
    font-size: 0.75rem;
    line-height: 1.3;
  }
  
  .info-card-icon {
    font-size: 1rem;
  }
}

/* Versão alternativa mais compacta para mobile */
@media (max-width: 768px) {
  .info-cards.compact {
    gap: 0.5rem;
  }
  
  .info-cards.compact .info-card {
    padding: 0.75rem;
  }
  
  .info-cards.compact .info-card-header {
    flex-direction: column;
    text-align: center;
    gap: 0.25rem;
  }
  
  .info-cards.compact .info-card-title {
    font-size: 0.8rem;
  }
  
  .info-cards.compact .info-card-content {
    font-size: 0.75rem;
    text-align: center;
  }
}



@media (max-width: 480px) {
  .empty-state {
    padding: 0rem 0rem;
  }

  .empty-state h2 {
    font-size: 1rem;
  }

  .step {
    max-width: 70px;
  }

  .step-circle {
    width: 45px;
    height: 45px;
  }

  .step-circle i {
    font-size: 20px;
  }

  .step span {
    font-size: 0.8rem;
  }
}

.scroll-hint {
    text-align: center;
    color: rgb(60, 189, 161);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    padding: 1rem;
    gap: 0.5rem;
}
@media (max-width: 768px) {
  .scroll-hint {
    font-size: 0.9rem;
    padding: 0rem;
  }
}

/* Estados de foco para acessibilidade */
.step:focus,
.action-button:focus,
.scroll-hint:focus,
.info-card:focus {
  outline: 2px solid #3cbda1;
  outline-offset: 2px;
}

.historic-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--text-secondary);
  margin-left: 12px;
  margin-right: 12px;
}

.historic-icon {
  width: 50px;
  height: 50px;
  background: #3cbda1;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.historic-text h5 {
  margin: 0 0 5px 0;
  color: var(--text-primary, #333);
  font-weight: 600;
}

.historic-text p {
  margin: 0;
  color: var(--text-secondary, #6c757d);
  font-size: 14px;
}

.historic-container {
  max-height: 400px;
  overflow-y: auto;
}

.historic-item {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.historic-item:hover {
  border-color: var(--accent-color, #007bff);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
  transform: translateY(-2px);
}

.historic-item:hover .action-btn {
  background-color: var(--accent-color, #007bff);
  color: white;
}

.historic-item-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
}

.historic-item-info {
  flex: 1;
}

.agency-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary, #333);
  font-size: 15px;
}

.agency-name i {
  color: var(--accent-color, #007bff);
  width: 16px;
}

.company-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary, #6c757d);
  font-size: 13px;
}

.company-name i {
  color: #28a745;
  width: 16px;
}

.historic-item-action {
  margin-left: 15px;
}

.action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f8f9fa;
  border: 2px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary, #6c757d);
  transition: all 0.3s ease;
  font-size: 16px;
}

/* Estado vazio */
.empty-historic {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary, #6c757d);
}

.empty-icon {
  width: 60px;
  height: 60px;
  background-color: var(--bg-tertiary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  font-size: 24px;
  color: #adb5bd;
}

.empty-historic p {
  margin: 0 0 5px 0;
  font-weight: 500;
}

.empty-historic small {
  color: #adb5bd;
}

/* Scrollbar personalizada */
.historic-container::-webkit-scrollbar {
  width: 6px;
}

.historic-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.historic-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.historic-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Responsivo */
@media (max-width: 576px) {
  .historic-header {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .historic-item-content {
    padding: 12px;
  }

  .agency-name,
  .company-name {
    font-size: 14px;
  }

  .action-btn {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
}

/* swall */

/* ======================= */
/* BASE (Desktop)          */
/* ======================= */
div:where(.swal2-container) div:where(.swal2-popup) {
  width: 400px; /* largura do container */
  max-width: 90%;
  padding: 1.5rem; /* espaçamento interno */
  border-radius: 16px;
  font-family: "Inter", sans-serif;
  font-size: 10px; /* texto base */
  background: var(--bg-card);
  border: 1px solid #3cbda1;
}

div:where(.swal2-container) h2 {
  font-size: 1.5rem; /* título */
  font-weight: 400;
  margin-bottom: 0.75rem;
  color: #718096;
}

div:where(.swal2-container) div:where(.swal2-html-container) {
  font-size: 1.125rem; /* subtítulo/corpo */
  line-height: 1.6;
  padding: 0.75rem;
  color: #718096;
}

div:where(.swal2-container) .swal2-icon {
  font-size: 1rem; /* tamanho dos ícones */
  margin-bottom: 1rem;
  columns: #3cbda1;
}

div:where(.swal2-container) .swal2-actions button {
  font-size: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
}

div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm) {
    background: initial;
    background-color:#3cbda1;
}

/* ======================= */
/* TABLET (até 768px)      */
/* ======================= */
@media (max-width: 768px) {
  div:where(.swal2-container) div:where(.swal2-popup) {
    width: 300px;
    padding: 1.25rem;
    font-size: 0.95rem;
  }

  div:where(.swal2-container) h2 {
    font-size: 1rem;
  }

  div:where(.swal2-container) div:where(.swal2-html-container) {
    font-size: 0.8rem;
  }

  div:where(.swal2-container) .swal2-icon {
    font-size: 0.8rem;
  }

  div:where(.swal2-container) .swal2-actions button {
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
  }
}

/* ======================= */
/* MOBILE (até 480px)      */
/* ======================= */
@media (max-width: 480px) {
  div:where(.swal2-container) div:where(.swal2-popup) {
    width: 80%; /* ocupa quase toda largura */
    padding: 0.8rem;
    font-size: 0.7rem;
  }

  div:where(.swal2-container) h2 {
    font-size: 0.9rem;
  }

  div:where(.swal2-container) div:where(.swal2-html-container) {
    font-size: 0.55rem;
    line-height: 1;
  }

  div:where(.swal2-container) .swal2-icon {
    font-size: 0.5rem;
  }

  div:where(.swal2-container) .swal2-actions {
    flex-direction: column;
    gap: 0.2rem;
    width: 90%;
  }

  div:where(.swal2-container) .swal2-actions button {
    width: 90%; /* botões ocupam toda largura */
    font-size: 0.7rem;
    padding: 0.4rem;
  }
}
