/* 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 .btn_acao_icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn_acao .btn_acao_icon i {
  width: auto;
  height: auto;
  display: block;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  line-height: 1;
  box-shadow: none;
  transform: none;
  transition: none;
}

.btn_acao:hover .btn_acao_icon {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.25);
  filter: brightness(1.05);
}

.btn_acao:hover .btn_acao_icon i {
  transform: none;
  box-shadow: none;
  filter: none;
}

.btn_acao_refresh.is-loading .btn_acao_icon 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%;
  }
}

.tenant_provisioning_card,
.tenant_history_card {
  margin-bottom: 18px;
}

.tenant_monitor_cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.tenant_monitor_card {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--cor_borda_sidebar);
  border-radius: 12px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.tenant_monitor_label {
  color: var(--cor_texto_suave);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tenant_monitor_card strong {
  color: #0f172a;
  font-size: 1.8rem;
  line-height: 1;
}

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

.tenant-status-tabulator .tabulator-col-title {
  line-height: 1.1;
}

.tenant-status-tabulator .tabulator-cell,
.tenant-status-tabulator .tabulator-col {
  padding-left: 8px;
  padding-right: 8px;
}

.tenant-status-tabulator .row-actions {
  gap: 8px;
}

.tenant_empresa_cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.tenant_empresa_cell strong,
.tenant_empresa_cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant_empresa_cell small {
  margin-top: 3px;
  color: var(--cor_texto_suave);
  font-size: 0.75rem;
}

.tenant_status {
  min-width: 90px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.tenant_status_ok {
  background: #059669;
}

.tenant_status_alerta {
  background: #d9b800;
  color: #111827;
}

.tenant_status_erro {
  background: #dc2626;
}

.tenant_history_list {
  display: grid;
  gap: 0;
  border: 1px solid var(--cor_borda_sidebar);
  border-radius: 8px;
  overflow: hidden;
}

.tenant_history_item {
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--cor_borda_sidebar);
  background: #ffffff;
}

.tenant_history_item:last-child {
  border-bottom: 0;
}

.tenant_history_item > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.tenant_history_item strong,
.tenant_history_item span,
.tenant_history_item time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant_history_item > div span,
.tenant_history_item time {
  color: var(--cor_texto_suave);
  font-size: 0.78rem;
}

.tenant_history_icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #ffffff;
  background: #64748b;
}

.tenant_history_concluido {
  background: #059669;
}

.tenant_history_erro {
  background: #dc2626;
}

.tenant_history_executando {
  background: #2563eb;
}

.tenant_history_empty {
  padding: 22px;
  color: var(--cor_texto_suave);
  text-align: center;
}

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

.tenant_modal_overlay.modal_overlay.active {
  display: flex;
}

.tenant_modal {
  width: min(900px, calc(100vw - 32px));
}

.tenant_modal_grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.master_modal_full,
.master_modal_divider {
  grid-column: 1 / -1;
}

.master_modal_divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  color: #2f3a45;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.master_modal_divider::before,
.master_modal_divider::after {
  height: 1px;
  content: "";
  flex: 1;
  background: var(--cor_borda_sidebar);
}

.campo_ajuda {
  display: block;
  margin-top: 5px;
  color: var(--cor_texto_suave);
  font-size: 0.72rem;
}

#tenant_modal_cancel,
#tenant_modal_submit {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 7px 18px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

#tenant_modal_cancel {
  border: 1px solid #64748b;
  background: #ffffff;
  color: #475569;
}

#tenant_modal_submit {
  border: 0;
  background: #e85d1a;
  color: #ffffff;
}

#tenant_modal_submit:hover {
  background: #c94f17;
}

#tenant_modal_submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.tenant_details_modal {
  width: min(760px, calc(100vw - 32px));
}

.tenant_detail_group {
  display: grid;
  gap: 8px;
  padding: 13px 0;
  border-bottom: 1px solid var(--cor_borda_sidebar);
}

.tenant_detail_group:last-child {
  border-bottom: 0;
}

.tenant_detail_group h3 {
  margin: 0;
  color: #2f3a45;
  font-size: 0.9rem;
}

.tenant_detail_group ul {
  margin: 0;
  padding-left: 20px;
  color: #475569;
  font-size: 0.82rem;
}

.tenant_detail_ok {
  color: #059669;
  font-size: 0.82rem;
}

.tenant_detail_error {
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px;
  background: #fef2f2;
  color: #b91c1c;
}

.tenant_detail_actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--cor_borda_sidebar);
  padding-top: 16px;
}

.tenant_detail_actions span {
  color: #64748b;
  font-size: 0.75rem;
}

@media (max-width: 760px) {
  .tenant_modal_grid {
    grid-template-columns: 1fr;
  }

  .master_modal_full,
  .master_modal_divider {
    grid-column: 1;
  }

  .tenant_history_item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .tenant_history_item time {
    grid-column: 2;
  }
}

.migration_manager {
  min-height: calc(100vh - 120px);
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 16px;
}

.migration_files_card,
.migration_editor_card {
  min-width: 0;
  margin: 0;
}

.migration_files_card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.migration_files_header {
  padding-bottom: 12px;
}

.migration_search_wrap {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 16px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: #64748b;
}

.migration_search_wrap:focus-within {
  border-color: #e85d1a;
  box-shadow: 0 0 0 2px rgba(232, 93, 26, 0.12);
}

.migration_search_wrap input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
  font: inherit;
}

.migration_file_list {
  min-height: 300px;
  max-height: calc(100vh - 270px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 10px 12px;
  overflow-y: auto;
}

.migration_file_item {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 9px;
  background: transparent;
  color: #2f3a45;
  text-align: left;
  cursor: pointer;
}

.migration_file_item:hover {
  background: #f5f7fa;
}

.migration_file_item.active {
  border-color: #f3b08f;
  background: #fff3ed;
}

.migration_file_icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #e2e8f0;
  color: #2f3a45;
}

.migration_file_item.active .migration_file_icon {
  background: #e85d1a;
  color: #ffffff;
}

.migration_file_content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.migration_file_content strong {
  overflow: hidden;
  color: #111827;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.migration_file_content small {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
  font-size: 0.7rem;
}

.migration_file_done .migration_file_content small {
  color: #059669;
}

.migration_file_pending .migration_file_content small,
.migration_file_partial .migration_file_content small {
  color: #b45309;
}

.migration_file_empty .migration_file_content small {
  color: #dc2626;
}

.migration_file_list_empty {
  padding: 24px 12px;
  color: #64748b;
  font-size: 0.82rem;
  text-align: center;
}

.migration_editor_card {
  display: grid;
  grid-template-rows: auto auto minmax(360px, 1fr) auto;
  overflow: hidden;
}

.migration_editor_header {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #e2e8f0;
  padding: 16px;
}

.migration_name_group {
  min-width: 0;
  display: grid;
  flex: 1;
  gap: 5px;
}

.migration_name_group label {
  color: #374151;
  font-size: 0.76rem;
  font-weight: 700;
}

.migration_name_group input {
  width: 100%;
  height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 11px;
  background: #ffffff;
  color: #111827;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.82rem;
  outline: none;
}

.migration_name_group input:not([readonly]):focus {
  border-color: #e85d1a;
  box-shadow: 0 0 0 2px rgba(232, 93, 26, 0.12);
}

.migration_name_group input[readonly] {
  background: #f8fafc;
  color: #475569;
}

.migration_lock_message {
  min-height: 16px;
  color: #059669;
  font-size: 0.7rem;
}

.migration_lock_message.locked {
  color: #b45309;
}

.migration_editor_actions {
  display: flex;
  align-items: center;
}

.migration_btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 8px 15px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.migration_btn_secondary {
  border: 1px solid #d9e1ea;
  background: #ffffff;
  color: #2f3a45;
}

.migration_btn_secondary:hover:not(:disabled) {
  background: #f5f7fa;
}

.migration_btn_apply {
  border: 1px solid #e85d1a;
  background: #e85d1a;
  color: #ffffff;
}

.migration_btn_apply:hover:not(:disabled) {
  border-color: #c94f17;
  background: #c94f17;
}

.migration_btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.migration_editor_status {
  min-height: 46px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px;
  background: #f8fafc;
}

.migration_pending_badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #f3d08f;
  border-radius: 999px;
  padding: 5px 10px;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.72rem;
  font-weight: 700;
}

.migration_code_wrap {
  min-height: 0;
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr);
  margin: 0 16px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #111827;
}

.migration_code_label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #374151;
  padding: 0 12px;
  background: #2f3a45;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
}

.migration_code_label span:last-child {
  color: #cbd5e1;
  font-weight: 500;
}

#migration_code {
  width: 100%;
  min-height: 360px;
  resize: none;
  border: 0;
  padding: 15px;
  background: #111827;
  color: #e5e7eb;
  caret-color: #ffffff;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.55;
  outline: none;
  tab-size: 2;
}

#migration_code[readonly] {
  color: #cbd5e1;
}

.migration_apply_bar {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
  border-top: 1px solid #e2e8f0;
  padding: 14px 16px;
  background: #ffffff;
}

.migration_target_field {
  display: grid;
  gap: 5px;
}

.migration_target_field label {
  color: #374151;
  font-size: 0.76rem;
  font-weight: 700;
}

.migration_target_field select {
  width: 100%;
  height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: #111827;
  font: inherit;
}

/* Select2 global */

.select2-container {
  width: 100% !important;
  max-width: 100%;
  font: inherit;
}

.select2-container--default .select2-selection--single {
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  outline: none;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding: 0 38px 0 11px;
  color: var(--cor_texto_principal);
  font-size: 0.875rem;
  line-height: 40px;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #94a3b8;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 0;
  right: 8px;
  width: 24px;
  height: 40px;
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: #f63914;
  box-shadow: 0 0 0 1px rgba(246, 57, 20, 0.18);
}

.select2-container--default.select2-container--disabled .select2-selection--single {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.select2-dropdown {
  z-index: 1600;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.select2-container--open .select2-dropdown--below {
  border-top: 1px solid #cbd5e1;
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
}

.select2-container--open .select2-dropdown--above {
  border-bottom: 1px solid #cbd5e1;
  border-bottom-right-radius: 10px;
  border-bottom-left-radius: 10px;
}

.select2-search--dropdown {
  padding: 8px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--cor_texto_principal);
  font: inherit;
  outline: none;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
  border-color: #f63914;
  box-shadow: 0 0 0 1px rgba(246, 57, 20, 0.18);
}

.select2-results__option {
  padding: 9px 11px;
  font-size: 0.875rem;
}

.select2-container--default .select2-results__option--selected {
  background: #fff1ec;
  color: #c93416;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background: #2f3a45;
  color: #ffffff;
}

.modal_overlay .select2-container {
  position: relative;
  z-index: 1;
}

.migration_apply_note {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 0.76rem;
}

.migration_apply_note i {
  color: #059669;
}

@media (max-width: 980px) {
  .migration_manager {
    grid-template-columns: 1fr;
  }

  .migration_file_list {
    max-height: 260px;
  }

  .migration_apply_bar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .migration_btn_apply {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .migration_editor_header {
    align-items: stretch;
    flex-direction: column;
  }

  .migration_editor_actions,
  .migration_editor_actions .migration_btn {
    width: 100%;
  }
}
