/**
 * Ajustes do layout Hora da Sorte (base Enzo).
 * Footer visível: cola no fim da viewport quando o conteúdo é curto.
 */
.page-body-wrapper {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 136px);
}
.page-body-wrapper .page-body {
  flex: 1 0 auto;
}

/* Header: pesquisa no mobile – um único campo (overlay), sem duplicar input */
.page-header .header-wrapper .search-full {
  z-index: 1050;
}
.page-header .header-wrapper .search-full.open {
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.page-header .header-wrapper .search-full.open .search-full-inner {
  width: 100%;
  max-width: 420px;
  padding: 0 1rem;
}
.page-header .header-wrapper .search-full.open .search-full-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}
.page-header .header-wrapper .search-full.open .header-busca-input {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  width: auto !important;
  max-width: none;
  line-height: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 0.25rem;
}
.page-header .header-wrapper .search-full .btn-search-round {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.page-header .header-wrapper .search-full .btn-search-round i {
  width: 1.1rem;
  height: 1.1rem;
}
.page-header .header-wrapper .search-full .btn-close-overlay-search {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.page-header .header-wrapper .search-full .btn-close-overlay-search i {
  width: 1.1rem;
  height: 1.1rem;
}
@media (max-width: 991px) {
  .page-header .left-header .header-busca-inline .input-group {
    flex-wrap: nowrap;
  }
  .page-header .left-header .header-busca-inline .input-group-text.mobile-search {
    cursor: pointer;
  }
}

/* Sidebar: item ativo do menu (função menu() em app/plugins/plugins.php) */
.sidebar-wrapper .sidebar-list a.sidebar-link.link-nav.active {
  background-color: rgba(62, 95, 206, 0.2) !important;
  color: #3d5bce !important;
  font-weight: 500;
}
.sidebar-wrapper .sidebar-list a.sidebar-link.link-nav.active svg {
  stroke: #3d5bce !important;
  color: #3d5bce !important;
}
.sidebar-wrapper .sidebar-list a.sidebar-link.link-nav.active span {
  color: inherit !important;
}
/* Modo escuro: item ativo do menu */
body.dark-only .sidebar-wrapper .sidebar-list a.sidebar-link.link-nav.active {
  background-color: rgba(62, 95, 206, 0.3) !important;
  color: #8ba3ff !important;
}
body.dark-only .sidebar-wrapper .sidebar-list a.sidebar-link.link-nav.active svg {
  stroke: #8ba3ff !important;
  color: #8ba3ff !important;
}
body.dark-only .sidebar-wrapper .sidebar-list a.sidebar-link.link-nav.active span {
  color: inherit !important;
}

/* Gestão de tickets: botão expandir (+) / recolher (−) – cor primária, redondo, ícone maior e centralizado */
#tabela-emissoes .btn-expand {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
/* Botões cinza para datas diferentes de hoje (template usa .btn-secondary amarelo – forçar cinza) */
#tabela-emissoes .btn-expand.btn-secondary {
  border-color: #6c757d !important;
  color: #6c757d !important;
  background-color: transparent !important;
}
#tabela-emissoes .btn-expand.btn-secondary:hover {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  color: #fff !important;
}
#tabela-emissoes a.btn-secondary,
#tabela-emissoes a.btn-secondary:hover,
#tabela-emissoes a.btn-secondary:focus {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  color: #fff !important;
}
#tabela-emissoes a.btn-secondary:hover {
  background-color: #5a6268 !important;
  border-color: #545b62 !important;
}
#tabela-emissoes a.btn-outline-secondary {
  border-color: #6c757d !important;
  color: #6c757d !important;
  background-color: transparent !important;
}
#tabela-emissoes a.btn-outline-secondary:hover {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  color: #fff !important;
}
/* Botões desabilitados (datas diferentes de hoje): apenas visual, sem clique */
#tabela-emissoes .btn.disabled,
#tabela-emissoes span.btn.disabled {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.75;
}
#tabela-emissoes .btn-secondary.disabled {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  color: #fff !important;
}
#tabela-emissoes .btn-outline-secondary.disabled {
  border-color: #6c757d !important;
  color: #6c757d !important;
  background-color: transparent !important;
}
/* Modo escuro: botões cinza na tabela de emissões */
body.dark-only #tabela-emissoes .btn-expand.btn-secondary {
  border-color: #868e96 !important;
  color: #868e96 !important;
}
body.dark-only #tabela-emissoes .btn-expand.btn-secondary:hover {
  background-color: #868e96 !important;
  border-color: #868e96 !important;
  color: #fff !important;
}
body.dark-only #tabela-emissoes a.btn-secondary,
body.dark-only #tabela-emissoes a.btn-secondary:hover {
  background-color: #5a6268 !important;
  border-color: #545b62 !important;
  color: #fff !important;
}
body.dark-only #tabela-emissoes a.btn-outline-secondary {
  border-color: #868e96 !important;
  color: #868e96 !important;
}
body.dark-only #tabela-emissoes a.btn-outline-secondary:hover {
  background-color: #868e96 !important;
  border-color: #868e96 !important;
  color: #fff !important;
}
body.dark-only #tabela-emissoes .btn-secondary.disabled {
  background-color: #5a6268 !important;
  border-color: #545b62 !important;
  color: #fff !important;
}
body.dark-only #tabela-emissoes .btn-outline-secondary.disabled {
  border-color: #868e96 !important;
  color: #868e96 !important;
  background-color: transparent !important;
}
#tabela-emissoes .btn-expand .icon-expand,
#tabela-emissoes .btn-expand svg {
  width: 1.25rem;
  height: 1.25rem;
}
/* Anula .table-hover tbody tr td svg do style.css só nesta tabela (sem alterar o CSS original) */
#tabela-emissoes tbody tr td svg {
  width: 1.25rem !important;
  height: 1.25rem !important;
  padding: 0 !important;
  margin-right: 0 !important;
  border-radius: 14px;
}
#tabela-emissoes tbody tr.emissao-row > td:first-child {
  text-align: center;
  vertical-align: middle;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* Linhas de detalhe (páginas): modo escuro compatível */
body.dark-only #tabela-emissoes tr.emissao-detalhe td {
  background-color: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}
body.dark-only #tabela-emissoes tr.emissao-detalhe .text-muted {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* Modal ticket (busca): centralizado, não muito grande */
.modal-ticket-detalhe .modal-dialog {
  max-width: 420px;
}

/* Modal ticket no modo escuro: contraste legível (labels e valores) */
body.dark-only .modal-ticket-detalhe .modal-content {
  background-color: #242424;
  border-color: #3d4254;
}
body.dark-only .modal-ticket-detalhe .modal-header {
  border-bottom-color: #3d4254;
  color: rgba(255, 255, 255, 0.9);
}
body.dark-only .modal-ticket-detalhe .modal-body {
  color: rgba(255, 255, 255, 0.9);
}
body.dark-only .modal-ticket-detalhe .modal-body .table th,
body.dark-only .modal-ticket-detalhe .modal-body th.text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
  border-color: rgba(255, 255, 255, 0.12);
}
body.dark-only .modal-ticket-detalhe .modal-body .table td {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
}
body.dark-only .modal-ticket-detalhe .modal-footer {
  border-top-color: #3d4254;
}
