/* tz-custom.css  —  classes de utilidade para o tema Trezo */

/* main-content: transição apenas de padding (não transition:all, que cria
   compositing layer no Chrome e quebra position:fixed nos filhos) */
#main-content {
  transition: padding-left .25s ease, margin-left .25s ease;
  padding-bottom: 30px;
}

/* Utilitários ausentes no CSS compilado */
.gap-\[16px\] { gap: 16px; }
.gap-\[11px\] { gap: 11px; }
.mt-auto  { margin-top: auto; }
.flex-1   { flex: 1 1 0%; }
.py-\[40px\]  { padding-top: 40px; padding-bottom: 40px; }
.py-\[50px\]  { padding-top: 50px; padding-bottom: 50px; }
.py-\[60px\]  { padding-top: 60px; padding-bottom: 60px; }
.py-\[80px\]  { padding-top: 80px; padding-bottom: 80px; }

/* Classes de largura para campos de formulário */
/* Mínimos */
.tz-min-70  { min-width: 70px; }
.tz-min-80  { min-width: 80px; }
.tz-min-90  { min-width: 90px; }
.tz-min-100 { min-width: 100px; }
.tz-min-110 { min-width: 110px; }
.tz-min-120 { min-width: 120px; }
.tz-min-130 { min-width: 130px; }
.tz-min-140 { min-width: 140px; }
.tz-min-150 { min-width: 150px; }
.tz-min-160 { min-width: 160px; }
.tz-min-180 { min-width: 180px; }
.tz-min-200 { min-width: 200px; }
.tz-min-210 { min-width: 210px; }
.tz-min-220 { min-width: 220px; }
.tz-min-240 { min-width: 240px; }
.tz-min-280 { min-width: 280px; }
.tz-min-400 { min-width: 400px; }
.tz-min-480 { min-width: 480px; }
.tz-min-520 { min-width: 520px; }
.tz-min-560 { min-width: 560px; }
.tz-min-460 { min-width: 460px; }
.tz-min-500 { min-width: 500px; }
.tz-min-580 { min-width: 580px; }
.tz-min-600 { min-width: 600px; }
.tz-min-640 { min-width: 640px; }
.tz-min-700 { min-width: 700px; }
.tz-min-800 { min-width: 800px; }
/* Máximos */
.tz-max-90  { max-width: 90px; }
.tz-max-100 { max-width: 100px; }
.tz-max-110 { max-width: 110px; }
.tz-max-120 { max-width: 120px; }
.tz-max-130 { max-width: 130px; }
.tz-max-140 { max-width: 140px; }
.tz-max-160 { max-width: 160px; }
.tz-max-170 { max-width: 170px; }
.tz-max-180 { max-width: 180px; }
.tz-max-200 { max-width: 200px; }
.tz-max-220 { max-width: 220px; }
.tz-max-240 { max-width: 240px; }
.tz-max-280 { max-width: 280px; }
.tz-max-300 { max-width: 300px; }
.tz-max-320 { max-width: 320px; }
.tz-max-360 { max-width: 360px; }
.tz-max-420 { max-width: 420px; }
.tz-max-480 { max-width: 480px; }
.tz-max-150 { max-width: 150px; }
/* Min-height utilitários */
.tz-min-h-360 { min-height: 360px; }
/* Flex grow proporcional */
.tz-flex-2 { flex: 2 1 0%; }
.tz-flex-3 { flex: 3 1 0%; }
/* Botão ícone 14px (add inline em campos) */
.tz-btn-xxs { width: 14px !important; height: 14px !important; padding: 0 !important; }
/* Pointer events none (campos de exibição somente leitura) */
.tz-pointer-none { pointer-events: none; }
/* Flex coluna scrollável — usado em forms dentro de modais (flex:1 min-height:0 para overflow funcionar) */
.tz-flex-col-scroll { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* Botão ícone estreito (busca CNPJ/CEP) */
.tz-btn-icon { padding: 6px 10px !important; flex-shrink: 0; }
/* Card sem padding-bottom (usado no card com abas) */
.tz-pb-0 { padding-bottom: 0 !important; }
/* Switch menor (inline com label, ex: IE Isento) */
.tz-switch-sm { width: 32px !important; height: 18px !important; }
.tz-switch-sm::after { top: 2px; left: 2px; width: 14px; height: 14px; }
.tz-switch-sm:checked::after { transform: translateX(14px); }

/* Botões */
.tz-btn-primary {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 500;
  transition: all .2s; border-radius: 6px; font-size: .875rem;
  padding: 8px 16px; background: #605dff; color: #fff;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.tz-btn-primary:hover { background: #4e4bdb; color: #fff; }
.tz-btn-primary:disabled { opacity: .65; cursor: not-allowed; }

.tz-btn-secondary {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 500;
  transition: all .2s; border-radius: 6px; font-size: .875rem;
  padding: 8px 16px; border: 1px solid #e5e7eb; background: #fff;
  color: #111827; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.tz-btn-secondary:hover { background: #f9fafb; }
.tz-btn-secondary:disabled { opacity: .65; cursor: not-allowed; }
.dark .tz-btn-secondary { background: #0c1427; border-color: #172036; color: #fff; }
.dark .tz-btn-secondary:hover { background: #15203c; }

/* Outlined primary — padrão "Add New" do Trezo */
.tz-btn-outline {
  display: inline-flex; align-items: center; gap: 5px; font-weight: 500;
  transition: all .2s; border-radius: 6px; font-size: .875rem;
  padding: 6px 13px; background: transparent; color: #605dff;
  border: 1px solid #605dff; cursor: pointer; white-space: nowrap;
  text-decoration: none;
}
.tz-btn-outline:hover { background: #605dff; color: #fff; }

/* Botão de opções (dropdown) */
.tz-btn-options {
  display: inline-flex; align-items: center; gap: 5px; font-weight: 500;
  transition: all .2s; border-radius: 6px; font-size: .875rem;
  padding: 6px 13px; border: 1px solid #e5e7eb; background: #fff;
  color: #111827; cursor: pointer; white-space: nowrap;
}
.tz-btn-options:hover { background: #f9fafb; }
.dark .tz-btn-options { background: #0c1427; border-color: #172036; color: #fff; }
.dark .tz-btn-options:hover { background: #15203c; }
.tz-btn-options--active,
.tz-btn-options--active:hover { background: #605dff !important; border-color: #605dff !important; color: #fff !important; }
.dark .tz-btn-options--active,
.dark .tz-btn-options--active:hover { background: #605dff !important; border-color: #605dff !important; }

/* Botão de perigo */
.tz-btn-danger {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 500;
  transition: all .2s; border-radius: 6px; font-size: .875rem;
  padding: 8px 16px; border: 1px solid #fecaca; background: #fff5f5;
  color: #ef4444; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.tz-btn-danger:hover { background: #fef2f2; }
.dark .tz-btn-danger { background: #0c1427; border-color: #3f1515; color: #f87171; }

/* Botão de exclusão (sólido vermelho — confirmação de delete) */
.tz-btn-delete {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 500;
  transition: all .2s; border-radius: 6px; font-size: .875rem;
  padding: 8px 16px; border: 1px solid transparent; background: #ef4444;
  color: #fff; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.tz-btn-delete:hover { background: #dc2626; }

/* Botões sobre card primary (resumo de dashboards) */
.tz-hero-btn {
  display: flex; align-items: center; gap: 8px; font-weight: 500;
  transition: all .2s; border-radius: 6px; font-size: .875rem;
  padding: 8px 16px; white-space: nowrap; text-decoration: none; cursor: pointer;
}
.tz-hero-btn--ghost { background: rgba(255,255,255,.12); color: #fff; }
.tz-hero-btn--ghost:hover { background: rgba(255,255,255,.22); color: #fff; }
.tz-hero-btn--solid { background: #fff; color: #605dff; }
.tz-hero-btn--solid:hover { background: #eef1f5; color: #4e4bdb; }

/* Modificador pequeno */
.tz-btn-sm { padding: 0 12px; font-size: .8125rem; height: 34px; box-sizing: border-box; }
.tz-btn-outline.tz-btn-sm,
.tz-btn-options.tz-btn-sm { padding: 4px 10px; }

/* Inputs e selects — padrão Trezo h-[55px] */
textarea.tz-input, textarea.tz-textarea { height: auto; padding-top: 14px; }
.tz-input, .kt-input {
  height: 55px; border-radius: 6px; color: #111827;
  border: 1px solid #e5e7eb; background: #fff;
  padding: 0 17px; display: block; width: 100%; outline: none;
  transition: border-color .2s; cursor: text;
}
.tz-input::placeholder, .kt-input::placeholder { color: #9ca3af; }
.tz-input:focus, .kt-input:focus { border-color: #605dff; }
.tz-input:disabled, .kt-input:disabled { opacity: .65; background: #f3f4f6; cursor: not-allowed; }
.dark .tz-input, .dark .kt-input { color: #fff; border-color: #172036; background: #0c1427; }
.dark .tz-input::placeholder, .dark .kt-input::placeholder { color: #6b7280; }
.dark .tz-input:disabled, .dark .kt-input:disabled { background: #0f1a30; }

/* tz-input usado como display somente-leitura (ex: total calculado) — texto centralizado na vertical, mesma fonte do input */
.tz-input-display { display: flex; align-items: center; opacity: .65; overflow: hidden; white-space: nowrap; }

.tz-select, .kt-select {
  height: 55px; border-radius: 6px; color: #111827;
  border: 1px solid #e5e7eb; background: #fff;
  padding: 0 13px; display: block; width: 100%; outline: none;
  transition: all .2s; cursor: pointer;
}
.tz-select:focus, .kt-select:focus { border-color: #605dff; }
.dark .tz-select, .dark .kt-select { color: #fff; border-color: #172036; background: #0c1427; }

/* Input com botão de busca interno (absoluto) */
.tz-input-with-btn { position: relative; }
.tz-input-with-btn .tz-input,
.tz-input-with-btn .kt-input { padding-right: 50px !important; }
.tz-input-btn {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 48px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-left: 1px solid #e5e7eb;
  border-top-right-radius: 6px; border-bottom-right-radius: 6px;
  cursor: pointer; color: #6b7280; transition: background .2s, color .2s;
}
.tz-input-btn:hover { background: rgba(0,0,0,.04); color: #605dff; }
.tz-input-btn:disabled { opacity: .5; cursor: not-allowed; }
.dark .tz-input-btn { border-color: #172036; color: #6b7280; }
.dark .tz-input-btn:hover { background: rgba(255,255,255,.05); color: #605dff; }

/* Toggle switch */
.tz-switch {
  appearance: none; -webkit-appearance: none;
  width: 40px; height: 22px; border-radius: 11px;
  background: #e5e7eb; cursor: pointer; transition: background .2s;
  flex-shrink: 0; position: relative; display: inline-block;
}
.tz-switch:checked { background: #605dff; }
.tz-switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.tz-switch:checked::after { transform: translateX(18px); }

/* Abas (tabs) — underline destacado */
.tz-tabs {
  display: flex; flex-wrap: wrap; gap: 0;
  overflow-x: hidden; scrollbar-width: none; -ms-overflow-style: none;
}
.tz-tabs::-webkit-scrollbar { display: none; }

.tz-tab-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 13px 20px; font-size: .875rem; font-weight: 500;
  color: #6b7280; background: transparent; border: none;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
  cursor: pointer; white-space: nowrap;
  transition: color .15s, background .15s, border-color .15s;
}
.tz-tab-btn:hover { color: #111827; background: rgba(96,93,255,.04); }
.tz-tab-btn.active { color: #605dff; border-bottom-color: #605dff; font-weight: 600; }
.dark .tz-tab-btn { color: #9ca3af; }
.dark .tz-tab-btn:hover { color: #fff; background: rgba(255,255,255,.04); }
.dark .tz-tab-btn.active { color: #605dff; }

/* Avatar upload */
.tz-avatar-upload {
  width: 80px; height: 80px; border-radius: 12px;
  border: 2px dashed #e5e7eb; background: #f9fafb;
  cursor: pointer; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: border-color .2s;
}
.tz-avatar-upload:hover { border-color: #605dff; }
.dark .tz-avatar-upload { border-color: #172036; background: #15203c; }
.tz-avatar-upload img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.tz-avatar-upload .tz-cam-overlay {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; background: rgba(0,0,0,.3);
  opacity: 0; transition: opacity .2s; border-radius: 10px;
}
.tz-avatar-upload:hover .tz-cam-overlay { opacity: 1; }

/* Cards de upload de logo (componente independente do tz-avatar-upload) */
.tz-logo-card {
  border: 2px dashed #e5e7eb;
  border-radius: 10px;
  padding: 16px 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f9fafb;
  transition: border-color .2s;
  min-height: 80px;
}
.tz-logo-card:hover { border-color: #605dff; }
.dark .tz-logo-card { border-color: #172036; background: #0c1427; }
.dark .tz-logo-card:hover { border-color: #605dff; }
.tz-logo-card__img {
  max-height: 48px;
  max-width: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.tz-logo-card__icon-img {
  max-height: 44px;
  max-width: 44px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.tz-logo-card__hint {
  font-size: .7rem;
  color: #9ca3af;
  text-align: center;
  line-height: 1.3;
}
.tz-logo-card__placeholder-icon { font-size: 32px; display: block; line-height: 1; }
.tz-logo-card__overlay-icon     { font-size: 22px; display: block; line-height: 1; }
.tz-logo-card__overlay-icon--sm { font-size: 18px; display: block; line-height: 1; }
.tz-logo-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.35);
  opacity: 0;
  transition: opacity .2s;
}
.tz-logo-card:hover .tz-logo-card__overlay { opacity: 1; }

/* Variantes de upload para favicon (mantém tz-avatar-upload) */
.tz-favicon-upload     { width: 48px; height: 48px; border-radius: 8px; }
.tz-favicon-upload img { object-fit: contain; }
.tz-favicon-upload .tz-cam-overlay { border-radius: 8px; }
/* Input file oculto — ativado via click no container de upload */
.tz-file-input { display: none; }

/* Tabela (th) */
.tz-th {
  font-weight: 500; text-align: left; padding: 11px 20px;
  background: #f9fafb; white-space: nowrap;
}
.dark .tz-th { background: #15203c; color: #fff; }
.tz-th:first-child { border-radius: 6px 0 0 0; }
.tz-th:last-child  { border-radius: 0 6px 0 0; }
.tz-th.text-center { text-align: center; }
.tz-th.text-right  { text-align: right; }
.tz-th.tz-sortable { cursor: pointer; user-select: none; }
.tz-th.tz-sortable:hover { background: #f0f0fe; }
.dark .tz-th.tz-sortable:hover { background: #1a2a4a; }
.tz-sort-label { display: inline-flex; align-items: center; gap: 2px; }

/* Campo de busca */
.tz-search-wrap { position: relative; width: 265px; max-width: 100%; }

.tz-search-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  line-height: 0; pointer-events: none; display: flex; align-items: center;
}
.tz-search-icon i { font-size: 20px; line-height: 1; display: block; }

.tz-search-input { padding-left: 38px !important; padding-right: 13px; }
.tz-search-input.has-clear { padding-right: 34px; }

.tz-search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; line-height: 0; text-decoration: none;
}
.tz-search-clear i { font-size: 16px; line-height: 1; display: block; }

/* Ícones de material symbols */
.tz-icon-sm { font-size: 18px !important; display: block; line-height: 1; }
.tz-icon-md { font-size: 22px !important; display: block; line-height: 1; }

/* Breadcrumb */
.tz-bc-item { display: inline-block; position: relative; font-size: .875rem; margin: 0 11px; }
.tz-bc-item:first-child { margin-left: 0; }
.tz-bc-item:last-child  { margin-right: 0; }
.tz-bc-link { display: inline-block; position: relative; transition: color .2s; }
.tz-bc-link:hover { color: #605dff; }
.tz-bc-link-home { padding-left: 26px; }
.tz-bc-icon {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  font-size: 18px; display: block; line-height: 1;
}

/* Dropdown de opções */
.tz-dropdown-wrap { position: relative; }
.tz-dropdown-menu {
  position: absolute; right: 0; top: 100%; margin-top: 5px;
  min-width: 160px; z-index: 50; background: #fff;
  border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.12);
  border: 1px solid #f3f4f6; overflow: hidden;
}
.dark .tz-dropdown-menu { background: #0c1427; border-color: #172036; }
.tz-dropdown-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 14px; font-size: .875rem;
  background: none; border: none; cursor: pointer; text-align: left;
  text-decoration: none; transition: background .15s;
  color: #374151;
}
.tz-dropdown-item:hover { background: #f9fafb; }
.dark .tz-dropdown-item { color: #d1d5db; }
.dark .tz-dropdown-item:hover { background: #15203c; }
.tz-dropdown-item i { font-size: 18px; display: block; line-height: 1; flex-shrink: 0; }

/* Select2 (overrides sobre select2.min.css) */
.select2-container { width: 100% !important; }
.select2-container--default .select2-selection--single {
  height: 55px !important;
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  transition: border-color .2s;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: #605dff !important;
  outline: none !important;
  box-shadow: none !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  flex: 1; padding: 0 36px 0 13px !important;
  font-size: .875rem !important; color: #111827 !important;
  line-height: normal !important;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: #9ca3af !important; }
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 55px !important; right: 10px !important;
}
.select2-container--default .select2-selection--single .select2-selection__clear {
  float: none; position: absolute; right: 28px; top: 50%; transform: translateY(-50%);
  font-size: 1rem; color: #9ca3af;
}
.select2-dropdown {
  border: 1px solid #e5e7eb !important;
  border-radius: 6px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.10) !important;
  z-index: 99999 !important;
}
.select2-container--default .select2-results__option { padding: 9px 14px; font-size: .875rem; color: #374151; }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: rgba(96,93,255,.08) !important; color: #605dff !important; }
.select2-container--default .select2-results__option[aria-selected=true] { background: rgba(96,93,255,.06); font-weight: 500; color: #605dff; }
.select2-search--dropdown .select2-search__field { border: 1px solid #e5e7eb !important; border-radius: 4px; padding: 6px 10px; font-size: .875rem; outline: none; }
.select2-search--dropdown .select2-search__field:focus { border-color: #605dff !important; }
/* Dark */
.dark .select2-container--default .select2-selection--single { background: #0c1427 !important; border-color: #172036 !important; }
.dark .select2-container--default.select2-container--focus .select2-selection--single,
.dark .select2-container--default.select2-container--open .select2-selection--single { border-color: #605dff !important; }
.dark .select2-container--default .select2-selection--single .select2-selection__rendered { color: #fff !important; }
.dark .select2-dropdown { background: #0c1427 !important; border-color: #172036 !important; }
.dark .select2-container--default .select2-results__option { color: #d1d5db; }
.dark .select2-container--default .select2-results__option--highlighted[aria-selected] { background: rgba(96,93,255,.15) !important; color: #605dff !important; }
.dark .select2-search--dropdown .select2-search__field { background: #111c35 !important; border-color: #172036 !important; color: #fff !important; }

/* Sidebar escura independente do tema do sistema */
/* Replica exatamente as cores do dark mode do Trezo só no sidebar */

/* Fundo geral */
#sidebar-area.tz-sidebar-dark {
  background-color: #0c1427 !important;
}
#sidebar-area.tz-sidebar-dark .logo {
  background-color: #0c1427 !important;
  border-color: #172036 !important;
}

/* Texto do logo e seções */
#sidebar-area.tz-sidebar-dark span.font-bold,
#sidebar-area.tz-sidebar-dark .accordion-item {
  color: #fff !important;
}

/* Accordion button (título de seção) */
#sidebar-area.tz-sidebar-dark .accordion-button {
  color: #fff !important;
}
#sidebar-area.tz-sidebar-dark .accordion-button:hover {
  background-color: #15203c !important;
  color: #fff !important;
}
#sidebar-area.tz-sidebar-dark .accordion-button:hover .material-symbols-outlined {
  color: #fff !important;
}
/* Estado open/active do accordion */
#sidebar-area.tz-sidebar-dark .accordion-button.open,
#sidebar-area.tz-sidebar-dark .accordion-button.active {
  background-color: #15203c !important;
  color: #fff !important;
}
#sidebar-area.tz-sidebar-dark .accordion-button.open .material-symbols-outlined,
#sidebar-area.tz-sidebar-dark .accordion-button.active .material-symbols-outlined {
  color: #fff !important;
}
/* Seta/arrow do accordion (pseudo-elemento remixicon) */
#sidebar-area.tz-sidebar-dark .accordion-button.toggle::before {
  color: #9ca3af !important;
}
#sidebar-area.tz-sidebar-dark .accordion-button.toggle.open::before {
  color: #fff !important;
}

/* Ícones de seção */
#sidebar-area.tz-sidebar-dark .accordion-button .material-symbols-outlined {
  color: #9ca3af !important;
}

/* Links do submenu */
#sidebar-area.tz-sidebar-dark .sidemenu-link {
  color: #9ca3af !important;
}
#sidebar-area.tz-sidebar-dark .sidemenu-link:hover {
  background-color: #15203c !important;
  color: #605dff !important;
}
/* Estado active/open do submenu */
#sidebar-area.tz-sidebar-dark .sidemenu-link.active,
#sidebar-area.tz-sidebar-dark .sidemenu-link.open {
  background-color: #15203c !important;
  color: #605dff !important;
}
/* Bolinha do submenu */
#sidebar-area.tz-sidebar-dark .sidemenu-link::after {
  border-color: #9ca3af !important;
}
#sidebar-area.tz-sidebar-dark .sidemenu-link.active::after,
#sidebar-area.tz-sidebar-dark .sidemenu-link.open::after {
  border-color: #605dff !important;
}
/* Seta do submenu toggle */
#sidebar-area.tz-sidebar-dark .sidemenu-link.toggle::before {
  color: #9ca3af !important;
}
#sidebar-area.tz-sidebar-dark .sidemenu-link.toggle.open::before {
  color: #fff !important;
}

/* Utilitários de max-width */
.tz-max-400 { max-width: 400px; }

/* Ponto de status na aba */
.tz-tab-dot {
  display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; margin-left: 4px; flex-shrink: 0;
}
.tz-tab-dot--danger  { background: #ef4444; }
.tz-tab-dot--success { background: #22c55e; }

/* Botão remover upload */
.tz-upload-remove-btn {
  font-size: .75rem; color: #ef4444; background: none; border: none;
  padding: 0; cursor: pointer; text-align: left; line-height: 1.4;
}
.tz-upload-remove-btn:hover { color: #b91c1c; }

/* Seções de configuração (Aparência) */
.tz-settings-section { margin-bottom: 28px; }
.tz-settings-section--last { margin-bottom: 0; }
.tz-settings-title {
  font-size: .875rem; font-weight: 600;
  color: #111827; margin-bottom: 4px;
}
.dark .tz-settings-title { color: #fff; }
.tz-settings-desc {
  font-size: .75rem; color: #6b7280; margin-bottom: 16px;
}
.tz-settings-divider {
  height: 1px; background: #f3f4f6; margin-bottom: 24px;
}
.dark .tz-settings-divider { background: #172036; }

/* Código inline */
.tz-inline-code {
  background: #f3f4f6; padding: 1px 4px; border-radius: 3px;
  font-size: .75rem; font-family: monospace;
}
.dark .tz-inline-code { background: #15203c; }

/* Certificado A3 — card "em breve" */
.tz-cert-coming-soon {
  display: flex; flex-direction: column; gap: 12px;
  padding: 20px; border-radius: 12px;
  border: 2px dashed #e5e7eb;
}
.dark .tz-cert-coming-soon { border-color: #172036; }
.tz-cert-icon-wrap {
  width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0;
  background: #fffbeb; display: flex; align-items: center; justify-content: center;
}
.dark .tz-cert-icon-wrap { background: #1e1a0d; }

/* Alert warning */
.tz-alert-warning {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px; border-radius: 8px;
  background: #fffbeb; border: 1px solid #fde68a;
}
.dark .tz-alert-warning { background: #1e1a0d; border-color: #2e2510; }

/* Label de opção de layout */
.tz-layout-opt-label {
  font-size: .75rem; font-weight: 500;
  color: #374151;
}
.dark .tz-layout-opt-label { color: #d1d5db; }

/* Botões de seleção de layout (company settings) */
.tz-layout-opt {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px; border-radius: 12px; border: 2px solid #e5e7eb;
  cursor: pointer; transition: border-color .2s, background .2s;
  width: 120px; background: none;
}
.tz-layout-opt:hover { border-color: #605dff; }
.tz-layout-opt-active { border-color: #605dff !important; background: rgba(96,93,255,.06); }
.dark .tz-layout-opt { border-color: #172036; }
.dark .tz-layout-opt:hover { border-color: #605dff; }
.tz-layout-preview {
  width: 80px; height: 56px; border-radius: 8px;
  overflow: hidden; border: 1px solid #e5e7eb;
  background: #f9fafb; display: flex;
}
.dark .tz-layout-preview { border-color: #172036; background: #0c1427; }

.tz-layout-sidebar {
  background: #d1d5db; flex-shrink: 0;
  border-radius: 4px 0 0 4px;
}
.tz-layout-sidebar--expanded { width: 20px; }
.tz-layout-sidebar--icons    { width: 10px; }
.tz-layout-sidebar--light    { background: #e5e7eb; }
.tz-layout-sidebar--dark     { background: #1e2a3b; }
.dark .tz-layout-sidebar     { background: #172036; }

.tz-layout-body {
  flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 6px;
}
.tz-layout-line {
  border-radius: 3px; background: #e5e7eb;
}
.tz-layout-line--h8  { height: 8px; }
.tz-layout-line--h6  { height: 6px; background: #f3f4f6; }
.tz-layout-line--w75 { width: 75%; }
.tz-layout-line--w50 { width: 50%; }
.dark .tz-layout-line      { background: #172036; }
.dark .tz-layout-line--h6  { background: #0f1a2e; }

/* Logo no sidebar */
/* !important necessário: Trezo tem .logo img { } com especificidade maior */
.tz-sidebar-logo {
  max-height: 46px !important;
  max-width: 200px !important;
  height: auto !important;
  width: auto !important;
}
.tz-sidebar-logo-icon {
  height: 36px !important;
  width: 36px !important;
  object-fit: contain !important;
}
/* Área de menu da sidebar — pt-[89px] é valor arbitrário do Tailwind
   não presente no CSS pré-compilado do Trezo */
.tz-sidebar-menu-wrap {
  padding-top: 89px;
  padding-left: 25px;
  padding-right: 25px;
  padding-bottom: 20px;
  height: 100vh;
}

/* File input — padrão do tema */
.tz-file-input-field {
  display: block; width: 100%; font-size: .8125rem;
  color: #6b7280; border: 1px solid #e5e7eb;
  border-radius: 6px; cursor: pointer;
  background: #fff; overflow: hidden;
}
.tz-file-input-field::file-selector-button {
  padding: 0 16px; height: 55px;
  border: none; border-right: 1px solid #e5e7eb;
  background: #f9fafb; color: #374151;
  font-size: .8125rem; font-weight: 500;
  cursor: pointer; margin-right: 12px;
  transition: background .2s;
}
.tz-file-input-field::file-selector-button:hover { background: #f3f4f6; }
.dark .tz-file-input-field { color: #9ca3af; border-color: #172036; background: #0c1427; }
.dark .tz-file-input-field::file-selector-button {
  background: #15203c; color: #d1d5db; border-color: #172036;
}

/* Logo da empresa: alternância full ↔ ícone */
/* Dark mode: troca logo claro pelo escuro */
.dark .logo-full      { display: none; }
.dark .logo-full-dark { display: block !important; }
/* Modo ícones (desktop ≥1280px): sidebar recolhida exibe só o ícone */
@media (min-width: 1280px) {
  body.tz-layout-icons #sidebar-area:not(:hover) .logo-full      { display: none !important; }
  body.tz-layout-icons #sidebar-area:not(:hover) .logo-full-dark { display: none !important; }
  body.tz-layout-icons #sidebar-area:not(:hover) .logo-icon      { display: block !important; }
  body.tz-layout-icons #sidebar-area:hover .logo-icon            { display: none !important; }
}

/* ── Modo ícones com expand no hover — SOMENTE DESKTOP ≥1280px ──
   Mobile não é afetado: o burger toggle (active) continua intacto */
@media (min-width: 1280px) {

  /* Sidebar estreita (estado recolhido) */
  body.tz-layout-icons #sidebar-area {
    width: 70px !important;
    overflow: hidden !important;
    z-index: 20 !important;
    transition: width .25s ease !important;
  }

  /* Hover: expande sobre o conteúdo sem empurrar o layout */
  body.tz-layout-icons #sidebar-area:hover {
    width: 260px !important;
    box-shadow: 5px 0 30px rgba(0, 0, 0, .12) !important;
  }

  /* Estado RECOLHIDO (:not(:hover)) */

  /* Logo centralizado */
  body.tz-layout-icons #sidebar-area:not(:hover) .logo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  body.tz-layout-icons #sidebar-area:not(:hover) .logo a {
    justify-content: center !important;
  }
  body.tz-layout-icons #sidebar-area:not(:hover) .logo span.font-bold,
  body.tz-layout-icons #sidebar-area:not(:hover) .burger-menu {
    display: none !important;
  }

  /* Padding mínimo da área de menu */
  body.tz-layout-icons #sidebar-area:not(:hover) [data-simplebar] {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  /* Botões centralizados sem texto */
  body.tz-layout-icons #sidebar-area:not(:hover) .accordion-button {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-radius: 8px !important;
  }
  body.tz-layout-icons #sidebar-area:not(:hover) .accordion-button .material-symbols-outlined {
    margin: 0 !important;
  }

  /* Esconder: texto, seta, submenus */
  body.tz-layout-icons #sidebar-area:not(:hover) .accordion-button span.title,
  body.tz-layout-icons #sidebar-area:not(:hover) .accordion-button.toggle::before,
  body.tz-layout-icons #sidebar-area:not(:hover) .accordion-collapse {
    display: none !important;
  }

  /* Header e main-content compensam os 70px do sidebar */
  body.tz-layout-icons #header-area {
    left: 85px !important;
    transition: left .25s ease !important;
  }
  body.tz-layout-icons #main-content {
    padding-left: 95px !important;
    transition: padding-left .25s ease !important;
  }
}

/* Drawer lateral de filtros */
.tz-filter-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,.35);
  cursor: pointer;
}
.tz-filter-overlay.active { display: block; }
.tz-filter-drawer {
  position: fixed; right: 0; top: 0; bottom: 0; z-index: 9999;
  width: 300px; max-width: 90vw;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0,0,0,.12);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s ease;
}
.tz-filter-drawer.tz-open,
.tz-filter-drawer.active { transform: translateX(0); }
.dark .tz-filter-drawer { background: #0c1427; }

/* Spinner de carregamento */
.tz-spinner {
  width: 44px; height: 44px;
  border: 4px solid #e5e7eb;
  border-top-color: #5b72ee;
  border-radius: 50%;
  animation: tz-spin .7s linear infinite;
}
@keyframes tz-spin { to { transform: rotate(360deg); } }

/* Dashboard — Hero banner */
.tz-dash-hero {
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,.07) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.05) 0%, transparent 40%),
    linear-gradient(135deg, #1e40af 0%, #4f46e5 50%, #7c3aed 100%);
}

/* Colunas sticky em tabelas */
.cf-sticky       { position: sticky !important; left: 0 !important; z-index: 3 !important; box-shadow: 2px 0 6px -2px rgba(0,0,0,.08); }
.cf-sticky-corner { position: sticky !important; left: 0 !important; top: 0 !important; z-index: 6 !important; box-shadow: 2px 0 6px -2px rgba(0,0,0,.08); }
.cf-sticky-white { background: #fff !important; }
.cf-sticky-gray  { background: #f9fafb !important; }
.dark .cf-sticky-white { background: #0c1427 !important; }
.dark .cf-sticky-gray  { background: #15203c !important; }
.cf-th-sticky    { position: sticky !important; top: 0 !important; z-index: 3 !important; }

/* Fluxo de caixa */
.cf-fluxo-wrap  { overflow-x: auto; max-height: 72vh; }
.cf-fluxo-table { font-size: 0.8rem; white-space: nowrap; }

/* Dropdown de seleção de empresa no header */
.tz-company-dropdown { min-width: 420px; }


/* Banner de modo suporte (equipe do SaaS acessando tenant de cliente) */
.tz-support-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9997;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 20px;
  background: #b91c1c;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, .25);
}
.tz-support-banner__text { display: flex; align-items: center; gap: 8px; }
.tz-support-banner__text code {
  background: rgba(255, 255, 255, .18);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 400;
}
.tz-support-banner__actions { display: flex; align-items: center; gap: 8px; }
.tz-support-banner__btn {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .45);
  color: #fff;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.tz-support-banner__btn:hover { background: rgba(255, 255, 255, .3); }
.tz-support-banner__btn--exit { background: #fff; color: #b91c1c; }
