/* Configurações — acabamento visual isolado (V3.304)
   Mantém Tags e Avisos no mesmo padrão visual das demais telas. */

body.system-pro-v3 #page-configuracoes {
  background: var(--bg) !important;
}

/* O menu interno antigo já é redundante com a navegação lateral principal. */
body.system-pro-v3 #page-configuracoes .cfg-left {
  display: none !important;
}

body.system-pro-v3 #page-configuracoes .cfg-layout {
  display: block !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
}

/* Respiro lateral real e largura confortável. */
body.system-pro-v3 #page-configuracoes .cfg-content-wrap {
  width: calc(100% - 64px) !important;
  max-width: 1480px !important;
  min-width: 0 !important;
  margin: 28px auto 40px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Card principal — mesmo azul/cinza escuro do sistema, sem tom marrom. */
body.system-pro-v3 #page-configuracoes #cfgSectionTags,
body.system-pro-v3 #page-configuracoes #cfgSectionAvisos {
  width: 100% !important;
  min-height: 0 !important;
  padding: 24px !important;
  border: 1px solid var(--bd) !important;
  border-radius: 12px !important;
  background: var(--sf) !important;
  box-shadow: none !important;
}

body.system-pro-v3 #page-configuracoes .cfg-tags-head {
  margin-bottom: 20px !important;
  padding-bottom: 16px !important;
  border-bottom: 1px solid var(--bd) !important;
}

body.system-pro-v3 #page-configuracoes .cfg-content-title {
  font-size: 1.12rem !important;
  color: var(--tx) !important;
}

body.system-pro-v3 #page-configuracoes .cfg-content-sub {
  margin-top: 5px !important;
  color: var(--t2) !important;
  font-size: .70rem !important;
  line-height: 1.45 !important;
}

/* Busca + unidade. */
body.system-pro-v3 #page-configuracoes .cfg-tags-toolbar {
  grid-template-columns: minmax(320px, 1fr) 220px auto !important;
  gap: 14px !important;
  margin-bottom: 16px !important;
}

body.system-pro-v3 #page-configuracoes .cfg-tags-toolbar .fs,
body.system-pro-v3 #page-configuracoes .cfg-search-wrap input,
body.system-pro-v3 #page-configuracoes .cfg-notice-card input,
body.system-pro-v3 #page-configuracoes .cfg-notice-card select,
body.system-pro-v3 #page-configuracoes .cfg-notice-card textarea {
  background: var(--s2) !important;
  border-color: var(--bd) !important;
  color: var(--tx) !important;
  box-shadow: none !important;
}

body.system-pro-v3 #page-configuracoes .cfg-tags-toolbar .fs,
body.system-pro-v3 #page-configuracoes .cfg-search-wrap input {
  height: 40px !important;
}

body.system-pro-v3 #page-configuracoes .cfg-tags-toolbar .fs:focus,
body.system-pro-v3 #page-configuracoes .cfg-search-wrap input:focus,
body.system-pro-v3 #page-configuracoes .cfg-notice-card input:focus,
body.system-pro-v3 #page-configuracoes .cfg-notice-card select:focus,
body.system-pro-v3 #page-configuracoes .cfg-notice-card textarea:focus {
  border-color: rgba(249,115,22,.48) !important;
  box-shadow: 0 0 0 2px rgba(249,115,22,.07) !important;
}

/* Tabela — usa os tokens oficiais do sistema. */
body.system-pro-v3 #page-configuracoes .cfg-tags-table-card {
  width: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border: 1px solid var(--bd) !important;
  border-radius: 10px !important;
  background: var(--s2) !important;
  box-shadow: none !important;
}

body.system-pro-v3 #page-configuracoes .cfg-tags-table-head {
  min-height: 40px !important;
  padding: 0 15px !important;
  background: var(--s3) !important;
  border-bottom: 1px solid var(--bd) !important;
  color: var(--t2) !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

body.system-pro-v3 #page-configuracoes .cfg-tags-table-head > div {
  font-size: 13px !important;
  line-height: 1.2 !important;
}

body.system-pro-v3 #page-configuracoes .cfg-tag-row {
  min-height: 54px !important;
  padding: 7px 15px !important;
  background: var(--sf) !important;
  border-bottom: 1px solid var(--bd) !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
}

/* Todo o conteúdo textual das linhas fica em 13px; os SVGs de ação não são alterados. */
body.system-pro-v3 #page-configuracoes .cfg-tag-row > div,
body.system-pro-v3 #page-configuracoes .cfg-tag-row .cfg-tag-main,
body.system-pro-v3 #page-configuracoes .cfg-tag-row .cfg-tag-main strong,
body.system-pro-v3 #page-configuracoes .cfg-tag-row .cfg-tag-main span {
  font-size: 13px !important;
  line-height: 1.35 !important;
}

body.system-pro-v3 #page-configuracoes .cfg-tag-row:last-child {
  border-bottom: 0 !important;
}

/* Estado vazio não precisa criar um card gigante. */
body.system-pro-v3 #page-configuracoes .cfg-tags-state:not([hidden]) {
  min-height: 118px !important;
  padding: 28px 18px !important;
  background: var(--sf) !important;
  color: var(--t3) !important;
}

body.system-pro-v3 #page-configuracoes .cfg-tags-state[hidden] {
  display: none !important;
}

/* Avisos — mesmo acabamento visual da tabela de Tags. */
body.system-pro-v3 #page-configuracoes .cfg-notice-card {
  width: 100% !important;
  min-height: 0 !important;
  border: 1px solid var(--bd) !important;
  border-radius: 10px !important;
  background: var(--s2) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

body.system-pro-v3 #page-configuracoes .cfg-notice-toggle-row {
  padding: 18px 20px !important;
  background: var(--s2) !important;
  border-bottom: 1px solid var(--bd) !important;
}

body.system-pro-v3 #page-configuracoes .cfg-notice-form {
  padding: 20px !important;
  gap: 14px !important;
  background: var(--sf) !important;
}

body.system-pro-v3 #page-configuracoes .cfg-notice-textarea {
  min-height: 128px !important;
  height: 128px !important;
}

/* Mantém o botão principal no padrão laranja já usado pelo produto. */
body.system-pro-v3 #page-configuracoes .cfg-primary-btn {
  height: 36px !important;
  padding: 0 14px !important;
  border-radius: 8px !important;
}

@media (max-width: 1180px) {
  body.system-pro-v3 #page-configuracoes .cfg-content-wrap {
    width: calc(100% - 48px) !important;
    margin: 24px auto 34px !important;
  }
}

@media (max-width: 900px) {
  body.system-pro-v3 #page-configuracoes .cfg-content-wrap {
    width: calc(100% - 28px) !important;
    margin: 14px auto 24px !important;
  }

  body.system-pro-v3 #page-configuracoes #cfgSectionTags,
  body.system-pro-v3 #page-configuracoes #cfgSectionAvisos {
    padding: 18px !important;
  }

  body.system-pro-v3 #page-configuracoes .cfg-tags-toolbar {
    grid-template-columns: 1fr !important;
  }
}
