/* Master Ecletech: complementos do módulo. O layout base vem de assets/css/global/global.css. */

.app_shell {
  min-height: 100vh;
}

.logo_marca_mini {
  border-radius: 12px;
  background: #f63914;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo_marca_mini i {
  font-size: 1.25rem;
  line-height: 1;
}

img.logo_marca_full {
  width: 140px;
  height: auto;
  object-fit: contain;
}

.auth-card,
.error-card {
  width: min(460px, calc(100vw - 32px));
  margin: 8vh auto;
  padding: 28px;
  border: 1px solid var(--cor_borda_sidebar);
  border-radius: 12px;
  background: var(--cor_sidebar);
  box-shadow: 0px 0px 40px rgba(15, 23, 42, 0.065);
}

.auth-card h1,
.error-card h1 {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cor_texto_principal);
  font-size: 1.35rem;
}

.auth-card h1 i,
.error-card h1 i {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f63914;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.auth-card p,
.error-card p {
  margin: 0 0 18px;
  color: var(--cor_texto_suave);
}

.auth-card form,
.form-card {
  display: grid;
  gap: 12px;
}

.auth-card label,
.form-card label {
  display: grid;
  gap: 6px;
  color: #374151;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-card input,
.form-card input,
.form-card select,
.form-card textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 11px;
  background: #ffffff;
  color: var(--cor_texto_principal);
  font: inherit;
  outline: none;
}

.auth-card input:focus,
.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
  border-color: #f63914;
  box-shadow: 0 0 0 1px rgba(246, 57, 20, 0.18);
}

.auth-card button,
.form-card button {
  min-height: 42px;
  width: fit-content;
  border: 0;
  border-radius: 10px;
  padding: 9px 16px;
  background: #f63914;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.card {
  min-height: 96px;
  padding: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  align-items: center;
  gap: 6px 12px;
  border: 1px solid var(--cor_borda_sidebar);
  border-radius: 10px;
  background: var(--cor_sidebar);
  box-shadow: 0px 0px 40px rgba(15, 23, 42, 0.065);
  color: var(--cor_texto_principal);
  transition: border-color 0.16s ease, transform 0.08s ease;
}

.card:hover {
  border-color: rgba(246, 57, 20, 0.35);
  transform: translateY(-1px);
}

.card_icon {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f63914;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
}

.card span:not(.card_icon) {
  color: var(--cor_texto_suave);
  font-size: 0.82rem;
}

.form-card {
  max-width: 980px;
  padding: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--cor_borda_sidebar);
  border-radius: 10px;
  background: var(--cor_sidebar);
  box-shadow: 0px 0px 40px rgba(15, 23, 42, 0.065);
}

.form-card label small {
  color: var(--cor_texto_suave);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.form-card button {
  grid-column: 1 / -1;
}

.coluna-ellipsis {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-actions {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.row-actions form {
  display: inline-flex;
}

.master-tabulator .btn_acao_tabela {
  padding: 0;
}

.master-tabulator .btn_acao_tabela i {
  color: #2f3a45;
}

.master-tabulator .tabulator-tableholder {
  overflow-x: hidden !important;
}

.master-tabulator .tabulator-table {
  width: 100% !important;
}

.card_tabela_badges .badge_pill_info {
  width: auto;
  margin: 0;
  white-space: nowrap;
}

.acoes_topo {
  position: relative;
}

.dropdown-master-filtros {
  right: 0;
  top: calc(100% + 12px);
  width: min(340px, calc(100vw - 140px));
  max-height: 700px;
}

.dropdown-master-filtros .dropdown-filtros-list {
  width: 100%;
}

.dropdown-master-filtros .dropdown_status_header_inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.dropdown-master-filtros .filtro_btn {
  display: flex;
  align-items: center;
  overflow: hidden;
  background: white;
  border-radius: 16px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.dropdown-master-filtros .filtro_btn_label {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  margin: 0;
  transition:
    max-width 0.28s ease,
    opacity 0.18s ease,
    margin-left 0.28s ease;
}

.dropdown-master-filtros .filtro_btn.active .filtro_btn_label {
  max-width: 120px;
  opacity: 1;
  margin-left: 6px;
}

.dropdown-master-filtros .filtro_btn_icon_wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown-master-filtros .page_filtros {
  max-height: 0;
  display: flex;
  opacity: 0;
  overflow: hidden;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition:
    max-height 0.25s ease-in-out,
    opacity 0.2s ease-in-out;
}

.dropdown-master-filtros .page_filtros.active {
  max-height: 300px;
  opacity: 1;
}

.dropdown-master-filtros .dropdown_status_checkall {
  margin-bottom: 5px;
  margin-top: 5px;
}

.modal_pesquisa .modal_pesquisa_form {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
  align-items: stretch;
}

.modal_pesquisa .modal_pesquisa_campo {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--cor_sidebar);
  border-radius: 15px;
  border: 1px solid var(--cor_borda_sidebar);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.65);
  padding: 10px 18px;
  width: 100%;
}

.modal_pesquisa #campo_pesquisa_termo,
.modal_pesquisa .modal_pesquisa_campo .form-control {
  width: 100%;
  min-height: 42px;
  padding: 0;
  background: transparent;
  color: var(--cor_texto_principal);
  font: inherit;
  font-size: 1rem;
  border: 0;
  border-radius: 12px;
  outline: none;
  box-shadow: none;
}

.modal_pesquisa #campo_pesquisa_termo:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

.modal_pesquisa .btn_modal_pesquisa {
  border-radius: 16px;
  font-size: 1.4rem;
  padding: 8px 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.16s ease, background 0.16s ease, filter 0.16s ease;
  height: auto;
  aspect-ratio: 1 / 1;
}

.modal_pesquisa .btn_modal_pesquisa_aplicar {
  border: none;
  background: linear-gradient(135deg, #ff7412, #ea580c);
  color: #ffffff;
}

.modal_pesquisa .btn_modal_pesquisa_aplicar:hover {
  transform: translateY(-1px) scale(1.01);
  filter: brightness(1.03);
}

.btn_acao_refresh.is-loading i {
  animation: master-refresh-spin 0.8s linear infinite;
}

.btn_acao_refresh[disabled] {
  opacity: 0.72;
  cursor: wait;
}

@keyframes master-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.dropdown_status_footer_inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  align-items: stretch;
}

.dropdown_btns {
  background: var(--gradiente_marca);
  border-radius: 14px;
  padding: 5px 10px;
  border: none;
  font-weight: 600;
  color: white;
  transition: all 0.2s ease-in-out;
}

.dropdown_btns:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

.dropdown_btns:nth-child(1) {
  background: transparent;
  color: #ff7412;
  border: 1px solid #ff7412;
}

.dropdown_status_markall_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #ff7412, #f63914);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(246, 57, 20, 0.18);
}

body.modal_aberto {
  overflow: hidden;
}

#modal_master_registro.modal_overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
}

#modal_master_registro.modal_overlay.active {
  display: flex;
}

.modal_master_registro {
  position: relative;
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border-radius: 24px;
  background: radial-gradient(circle at top right, rgba(248, 148, 72, 0.08), transparent), var(--cor_sidebar, #ffffff);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.75);
  color: var(--cor_texto_principal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal_master_registro form {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.modal_master_registro .modal_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
  padding: 18px 18px 16px;
}

.modal_master_registro .modal_header_inner {
  display: flex;
  gap: 10px;
}

.modal_master_registro .modal_text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.modal_master_registro .modal_header h1 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.modal_master_registro .modal_header p {
  margin: 2px 0 0;
  font-size: 0.8rem;
  line-height: 0.9rem;
  color: var(--cor_texto_suave);
}

.modal_master_registro .modal_alterar__icon-wrap {
  width: 45px;
  height: 45px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #f0f0f0;
  color: #ffffff;
}

.modal_master_registro .modal_alterar__icon-wrap i {
  font-size: 20px;
  color: #6a6b6d;
}

.modal_master_registro .modal_master_body {
  min-height: 0;
  padding: 18px;
  overflow: auto;
}

.master_modal_grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.modal_master_registro .campo_form {
  width: 100%;
}

.modal_master_registro .campo_form label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: #374151;
  font-size: 0.78rem;
  font-weight: 700;
}

.modal_master_registro .campo_form label small {
  color: var(--cor_texto_suave);
  font-weight: 500;
}

.modal_master_registro input,
.modal_master_registro select,
.modal_master_registro textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 11px;
  background: #ffffff;
  color: var(--cor_texto_principal);
  font: inherit;
  outline: none;
}

.modal_master_registro input:focus,
.modal_master_registro select:focus,
.modal_master_registro textarea:focus {
  border-color: #f63914;
  box-shadow: 0 0 0 1px rgba(246, 57, 20, 0.18);
}

.modal_master_registro .modal_footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #f0f0f0;
  padding: 18px 18px 16px;
}

.modal_master_registro .btn_container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.modal_venda_badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.12);
  color: #059669;
}

#modal_master_btn_cancelar,
#modal_master_btn_salvar {
  border-radius: 12px;
  padding: 6px 18px;
  min-height: 38px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: background 0.16s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

#modal_master_btn_cancelar {
  border: 1px solid #6a6b6d;
  color: #6a6b6d;
  background-color: white;
}

#modal_master_btn_salvar {
  background: linear-gradient(135deg, #ff7412, #f63914);
  color: #ffffff;
}

#modal_master_btn_cancelar:hover,
#modal_master_btn_salvar:hover {
  transform: translateY(-1px);
}

@media (max-width: 920px) {
  .form-card {
    grid-template-columns: 1fr;
  }

  .master_modal_grid {
    grid-template-columns: 1fr;
  }

  .modal_master_registro .modal_footer {
    align-items: stretch;
    flex-direction: column;
  }

  .modal_master_registro .btn_container,
  #modal_master_btn_cancelar,
  #modal_master_btn_salvar {
    width: 100%;
  }
}
