/*
 * @owner: sistema::theme_style
 * @versao_codigo: 28
 * @data: 2026-02-25
 * @versao_consolidada: 1.3.0
 * @change:
*/
@import url('/assets/theme/theme.css');
@import url('/assets/engine/meta_width.css');

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Trebuchet MS", "Verdana", sans-serif;
  color: var(--text);
  background: var(--bg);
}

body.embedded-mode .sidebar,
body.embedded-mode .toolbar-canto-superior {
  display: none !important;
}

body.embedded-mode .content {
  margin-left: 0;
  padding: 8px 10px 14px;
}

body.embedded-mode .page-head {
  display: none;
}

body.embedded-mode .toolbar,
body.embedded-mode [id^="panelBusca"],
body.embedded-mode [id^="panelLista"] {
  display: none !important;
}

body.embedded-mode #panelForm {
  display: block !important;
  margin-bottom: 0;
}

body.embedded-mode #panelForm .form-actions {
  padding-bottom: 4px;
}

.bg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: linear-gradient(180deg, var(--side), var(--side-2));
  color: #e5e7eb;
  border-right: 1px solid #1f2a3a;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-fixed {
  padding: 14px 12px 10px 12px;
  flex: 0 0 auto;
}

.side-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #1f9a8a;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.user {
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}

.user-sub {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.86);
}

.user-links {
  margin-top: 4px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.user-links a {
  color: #f8fafc;
  text-decoration: none;
}

.user-links a:hover {
  text-decoration: underline;
}

.user-links span {
  opacity: 0.75;
}

.search input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #2b3645;
  background: #121a24;
  color: #e5e7eb;
  font-size: 13px;
}

.search {
  margin-bottom: 8px;
}

.search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.sidebar-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 8px 12px 8px;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 8px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 8px;
}

.sidebar-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.12);
}

.menu-tree {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.menu-item {
  display: block;
  width: 100%;
}

.menu-toggle,
.menu-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: #ecf2f8;
  text-decoration: none;
  text-align: left;
  padding: 6px 9px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.menu-link:hover,
.menu-toggle:hover {
  background: rgba(0, 0, 0, 0.14);
}

.menu-icon {
  width: 12px;
  display: inline-flex;
  justify-content: center;
  opacity: 1;
  font-size: 12px;
  color: #d6dee8;
}

.menu-caret {
  margin-left: auto;
  font-size: 11px;
  opacity: 0.78;
  transition: transform 120ms ease;
}

.menu-toggle[aria-expanded="true"] .menu-caret {
  transform: rotate(180deg);
}

.menu-label {
  line-height: 1.2;
}

.menu-item.level-0 > .menu-toggle {
  font-weight: 700;
  font-size: 13px;
  color: #f8fafc;
  padding-top: 7px;
  padding-bottom: 4px;
}

.menu-item.level-0 > .menu-toggle .menu-icon {
  display: none;
}

.menu-item.level-1.menu-link,
.menu-item.level-1.menu-item-parent > .menu-toggle {
  padding-left: 6px;
}

.menu-item.level-2.menu-link,
.menu-item.level-2.menu-item-parent > .menu-toggle {
  padding-left: 14px;
  font-size: 12.5px;
  color: #dce6ef;
}

.menu-item.level-3.menu-link,
.menu-item.level-3.menu-item-parent > .menu-toggle {
  padding-left: 21px;
  font-size: 12px;
}

.menu-item-parent > .menu-children {
  display: none;
  margin-left: 4px;
  border-left: none;
  padding-left: 2px;
}

.menu-item-parent > .menu-children.open {
  display: block;
}

.menu-item-hidden {
  display: none !important;
}

.content {
  margin-left: 260px;
  padding: 24px 24px 40px 24px;
}

.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.page-head.center {
  justify-content: center;
  position: relative;
}

.title-small {
  font-size: 18px;
  font-weight: 600;
  color: #4b5563;
}

.muted { color: var(--muted); }

.card {
  background: var(--card);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

h1, h2 {
  margin: 0 0 12px 0;
}

label { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
input, select {
  width: 100%;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-top: 4px;
}

.btn {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.btn.outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn.danger {
  background: #b91c1c !important;
  border: 1px solid #b91c1c !important;
  color: #ffffff !important;
}

.btn.danger:hover,
.btn.danger:focus,
.btn.danger:active {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
}

.btn-perfil-alterar-senha {
  margin-top: 4px;
  width: auto;
  min-width: 0;
  padding: 8px 12px;
}

.alert {
  background: #fee2e2;
  color: #991b1b;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.panel {
  background: var(--card);
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
  margin-bottom: 16px;
}

.search-panel {
  border: 1px solid var(--line);
  box-shadow: none;
}

.spacer-panel {
  margin-top: 8px;
}

.subform-panel {
  margin-top: 0;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  box-shadow: none;
}

#panelForm + .subform-panel {
  margin-top: -10px;
}

.subform-actions-panel {
  margin-top: -6px;
  margin-bottom: 10px;
  border: none;
  box-shadow: none;
  background: transparent;
}

.panel-head {
  padding: 12px 16px;
  font-weight: 700;
  border-bottom: 1px solid var(--panel-head-border, var(--line));
  background: var(--panel-head-bg, #f5f7fa);
  color: var(--panel-head-text, var(--text));
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Barra de busca mantém visual neutro */
.search-panel .panel-head {
  background: transparent;
  color: inherit;
}

.form {
  padding: 16px;
}

.form-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.form-grid > div {
  width: auto;
  max-width: 100%;
}

.form-grid > div > label {
  line-height: 1.15;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  max-width: 100%;
}

.inline-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-actions > select,
.inline-actions > input {
  flex: 1;
}

.lookup-control {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lookup-control > input,
.lookup-control > select {
  flex: 1;
}

.lookup-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.lookup-btn:hover {
  background: rgba(11, 95, 90, 0.08);
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.spacer { flex: 1; }

.filter {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #e9eef2;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  padding: 6px;
}

.filter select,
.filter input {
  border: none;
  background: #fff;
  border-radius: 6px;
  padding: 8px 10px;
}

.filter select { min-width: 180px; }
.filter input { min-width: 330px; }

.filter.left { margin-left: 0; }

.pager {
  margin-left: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-mini {
  padding: 6px 8px;
  min-width: 32px;
  line-height: 1;
}

.pager-counter {
  font-size: 13px;
  color: #4b5563;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px 10px;
}

.search-vw-info-btn {
  font-weight: 700;
  min-width: 30px;
}

.search-vw-feedback {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}

.cpf-mask { font-variant-numeric: tabular-nums; }

.divider {
  height: 1px;
  background: var(--line);
}

.table .row {
  display: grid;
  grid-template-columns: 2fr 1fr 0.5fr 0.5fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
  width: 100%;
  align-items: center;
}

.table-equip .row {
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr 0.6fr 0.2fr;
}

.table .head { font-weight: 700; color: #374151; }

.table .row > div {
  padding: 0 8px;
}

.table .row > div.cell-left { text-align: left; }
.table .row > div.cell-center { text-align: center; }
.table .row > div.cell-right { text-align: right; }

.row-click { cursor: pointer; }
.row-click:hover { background: #f5f7fa; }
.row-click.selected { background: #e8f0f8; }

.table-grid {
  width: 100%;
  border-collapse: collapse;
}

.table-grid th,
.table-grid td {
  text-align: left;
  padding: 8px 8px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: top;
}

.table-grid thead th {
  font-weight: 700;
  color: #374151;
  background: #edf2f7;
  border-bottom: 1px solid #d9e2ec;
  box-shadow: inset 0 -1px 0 #d9e2ec;
}

/* Estilo do cabecalho das listas migradas para o list_panel.php */
.list-engine-panel .table-grid thead th {
  background: rgba(11, 95, 90, 0.10);
  border-top: 2px solid rgba(11, 95, 90, 0.45);
  border-bottom: 2px solid rgba(11, 95, 90, 0.45);
  box-shadow: inset 0 -1px 0 rgba(11, 95, 90, 0.16);
}

.list-engine-panel .table-grid thead th:not(:last-child) {
  border-right: 1px solid #f3f4f6;
}

.list-engine-panel .th-sort .sort-ind {
  color: rgba(11, 95, 90, 0.88);
}

.list-engine-panel .table-grid tbody td:not(:last-child) {
  border-right: 1px solid #f3f4f6;
}

.th-sort {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.th-sort .sort-ind {
  color: #475569;
  font-size: 11px;
}

.field-feedback {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
}

.field-feedback.ok { color: #15803d; }
.field-feedback.err { color: #b91c1c; }
.field-feedback.erro { color: #b91c1c; }

.label-inline {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
}

.info-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #0284c7;
  color: #0284c7;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  position: relative;
}

.info-icon:hover::after {
  content: attr(data-info);
  position: absolute;
  left: 0;
  top: 22px;
  z-index: 20;
  width: 260px;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  color: #334155;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  white-space: normal;
}

.input-ok { border-color: #15803d; }
.input-err { border-color: #b91c1c; }
.input-readonly { background: #f3f4f6; color: #6b7280; }
input[readonly],
textarea[readonly],
select:disabled {
  background: #f3f4f6;
  color: #6b7280;
}

.hidden { display: none; }
.clipboard-helper {
  position: fixed;
  left: -9999px;
  top: 0;
}

.form-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

@media (max-width: 1100px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .filter { flex-wrap: wrap; }
  .pager { width: 100%; margin-left: 0; justify-content: flex-start; }
}

@media (max-width: 900px) {
  .content { margin-left: 0; padding: 16px; }
  .sidebar { position: static; width: 100%; height: auto; }
  .sidebar-scroll { max-height: 44vh; }
  .table .row { grid-template-columns: 1fr 1fr; }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  width: min(640px, 92vw);
  background: var(--card);
  border-radius: 6px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
}

.modal-head {
  background: var(--modal-head-bg);
  color: var(--modal-head-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--modal-head-text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-body {
  margin: 14px;
  padding: 12px;
  border-radius: 4px;
  line-height: 1.4;
  white-space: pre-line;
}

.modal-body.ok {
  background: var(--modal-body-ok-bg);
  color: var(--modal-body-ok-text);
}

.modal-body.erro {
  background: var(--modal-body-erro-bg);
  color: var(--modal-body-erro-text);
}

.modal-body.loading {
  background: #eef2f7;
  color: #1f2a3a;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.modal-body.loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #c8d1dc;
  border-top-color: #0f766e;
  animation: modal-loading-spin 0.8s linear infinite;
}

@keyframes modal-loading-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.modal-actions {
  padding: 0 14px 14px 14px;
  display: flex;
  justify-content: flex-end;
}

.modal-actions.spaced {
  gap: 12px;
}

.modal-inline-msg {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 4px;
  background: var(--modal-body-ok-bg);
  color: var(--modal-body-ok-text);
  font-weight: 600;
}

.modal-inline-msg.erro {
  background: var(--modal-body-erro-bg);
  color: var(--modal-body-erro-text);
}

.lookup-modal-box {
  width: min(1020px, 96vw);
}

.lookup-modal-body {
  white-space: normal;
}

.lookup-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.lookup-filter select {
  width: 240px;
}

.lookup-filter input {
  flex: 1;
}

.contrato-servicos-filter {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 16px;
}

.contrato-servicos-filter .campo {
  flex: 1;
  max-width: 520px;
}

.contrato-servicos-filter .btn {
  white-space: nowrap;
}

.contrato-servicos-grid-wrap {
  max-height: 320px;
}

.contrato-servicos-grid thead th {
  background: #dfe5ec;
  border-top: 0;
  border-bottom: 1px solid #d9e2ec;
  box-shadow: none;
}

.contrato-servicos-grid th,
.contrato-servicos-grid td {
  border-right: 0 !important;
}

.lookup-table-wrap {
  border: 1px solid var(--line);
  border-radius: 6px;
  max-height: 50vh;
  overflow: auto;
}

.lookup-table {
  width: 100%;
}

.lookup-erro {
  background: #fee2e2;
  color: #991b1b;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 10px;
}

.lookup-erro.ok {
  background: #dcfce7;
  color: #166534;
}

.lookup-pager {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
}

.toolbar-canto-superior {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
}

.toolbar-canto-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 15px;
}

.toolbar-canto-btn-notif {
  position: relative;
}

.toolbar-canto-btn-notif .notif-bell {
  line-height: 1;
  font-size: 16px;
}

.toolbar-canto-btn-notif .notif-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  border: 1px solid #ffffff;
}

.auditoria-modal-box {
  width: min(1180px, 96vw);
}

.auditoria-modal-box .modal-actions {
  gap: 10px;
}

.auditoria-body {
  white-space: normal;
}

.auditoria-filtros {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.auditoria-context {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: #334155;
  line-height: 1.45;
  text-align: center;
}

.auditoria-context-subtle {
  margin-top: -8px;
  margin-bottom: 12px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

/* Usuários online modal */
.uo-nowrap {
  white-space: nowrap !important;
}

.auditoria-table thead th.uo-nowrap {
  white-space: nowrap !important;
}

#uoTbody td.uo-nowrap-cell {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.auditoria-table thead th:nth-child(5) {
  min-width: 190px;
}

#uoTbody td:nth-child(5) {
  min-width: 190px;
}

.uo-list-gap {
  height: 18px;
}

.uo-tools-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.auditoria-range {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auditoria-range label {
  margin: 0;
  font-size: 12px;
  color: #475569;
  white-space: nowrap;
}

.auditoria-filtros input[type="date"] {
  width: 150px;
}

.auditoria-filtros select {
  width: 170px;
}

.auditoria-filtros input[type="text"] {
  flex: 1;
}

.auditoria-table th,
.auditoria-table td {
  font-size: 13px;
}

.auditoria-table th:nth-child(1),
.auditoria-table td:nth-child(1) {
  min-width: 70px;
  white-space: nowrap;
}

.auditoria-table th:nth-child(2),
.auditoria-table td:nth-child(2) {
  min-width: 150px;
  white-space: nowrap;
}

.auditoria-table th:nth-child(3),
.auditoria-table td:nth-child(3),
.auditoria-table th:nth-child(4),
.auditoria-table td:nth-child(4) {
  white-space: nowrap;
}

.auditoria-table th:nth-child(5),
.auditoria-table td:nth-child(5),
.auditoria-table td:nth-child(6) {
  white-space: nowrap;
}

.auditoria-row {
  cursor: pointer;
}

.auditoria-row.selected {
  background: rgba(11, 95, 90, 0.10);
}

.sync-step {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.sync-step:last-child {
  margin-bottom: 0;
}

.sync-step-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  border: 1px solid var(--line);
}

.cfg-dropzone {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 10px;
  background: #f8fafc;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.cfg-dropzone.cfg-over {
  border-color: var(--accent);
  background: #ecfeff;
}

.cfg-zone-label {
  font-size: 12px;
  color: #475569;
  margin-bottom: 8px;
  font-weight: 700;
}

.cfg-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
}

.cfg-draggable {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  background: #fff;
  cursor: grab;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cfg-draggable.form {
  color: #0f172a;
}

.cfg-draggable.pasta {
  color: var(--accent);
  margin-bottom: 8px;
}

.cfg-dragging {
  opacity: 0.55;
}

.cfg-pastas-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-left: 18px;
  padding-left: 12px;
  border-left: none;
}

.cfg-pasta-card {
  box-shadow: none;
  border: 1px solid #e2e8f0;
  background: #f8fbff;
}

.cfg-mini-btn {
  height: 24px;
  min-width: 24px;
  padding: 0 6px;
  border: 1px solid #93a3b8;
  border-radius: 5px;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  cursor: pointer;
  margin-left: 4px;
}

.cfg-mini-btn:hover:not(:disabled) {
  background: #eef2f7;
}

.cfg-mini-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cfg-mini-btn.danger {
  border-color: #d6a5a5;
  color: #991b1b;
}

.cfg-mini-btn.ok {
  border-color: #15803d;
  background: #ecfdf3;
  color: #166534;
}

.cfg-mini-btn.ok:hover:not(:disabled) {
  background: #dcfce7;
  border-color: #166534;
}

.cfg-chip-actions {
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
}

.cfg-parent-move {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.cfg-head-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.panel-head .cfg-mini-btn {
  height: 22px;
  min-width: 22px;
  padding: 0 5px;
}

.cfg-draggable.form {
  justify-content: space-between;
}

.cfg-chip-label {
  font-weight: 600;
}

.cfg-parent-card {
  cursor: grab;
}

.cfg-parent-drop-line {
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  color: #64748b;
  text-align: center;
  background: #f8fafc;
}

.cfg-danger-btn {
  border-color: #d6a5a5 !important;
  color: #991b1b !important;
}

.cfg-danger-btn:hover {
  background: #fee2e2 !important;
}

.sync-step-icon.pendente {
  color: #0b5f5a;
  background: #d9f2ef;
  border-color: #8fd0c8;
}

.sync-step-icon.ok {
  color: #166534;
  background: #dcfce7;
  border-color: #86efac;
}

.sync-step-icon.erro {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fecaca;
}

.sync-step-text {
  color: var(--text);
}

.sync-step.status-pendente .sync-step-text {
  color: #0b5f5a;
}

.sync-step-details {
  flex: 0 0 100%;
  margin-left: 26px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sync-step-detail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
}

.sync-step-detail-icon {
  width: 12px;
  text-align: center;
}

.sync-step-detail.ok {
  color: #166534;
}

.sync-step-detail.erro {
  color: #991b1b;
}

.idle-clock-wrap {
  margin-top: 10px;
}

.idle-clock {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #7f1d1d;
}

.idle-progress {
  margin-top: 8px;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #fecaca;
  overflow: hidden;
}

.idle-progress > span {
  display: block;
  height: 100%;
  width: 100%;
  background: #b91c1c;
  transition: width .8s linear;
}
.idle-progress-fill { display: block; height: 100%; background: #b91c1c; transition: width .6s linear; }
.idle-pct-0 { width: 0%; }
.idle-pct-10 { width: 10%; }
.idle-pct-20 { width: 20%; }
.idle-pct-30 { width: 30%; }
.idle-pct-40 { width: 40%; }
.idle-pct-50 { width: 50%; }
.idle-pct-60 { width: 60%; }
.idle-pct-70 { width: 70%; }
.idle-pct-80 { width: 80%; }
.idle-pct-90 { width: 90%; }
.idle-pct-100 { width: 100%; }

.mb-10 { margin-bottom: 10px; }
.text-center { text-align: center; }
.label-hidden { visibility: hidden; }
.btn-link-inline {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.inline-actions-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.cfg-menu-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cfg-msg-ok { color: #475569; }
.cfg-msg-err { color: #b91c1c; }
.cfg-card-tight { margin-bottom: 0; }
.cfg-form-tight { padding: 10px; }
.cfg-item-inativo { opacity: 0.65; }
.refresh-hint {
  margin-top: 6px;
  text-align: right;
  font-size: 12px;
  opacity: .7;
}
.modal-inline-msg-copy {
  margin: 0 16px 10px 16px;
}
.modal-pre-wrap {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
}
.w-120 { width: 120px; }
.w-150 { width: 150px; }
.w-180 { width: 180px; }
.w-260 { width: 260px; }
.w-320 { width: 320px; }
.w-auto-min-360 {
  width: auto;
  min-width: 360px;
}
.asn-prefix-form-panel {
  margin: 8px 0;
}
.asn-prefix-top-actions {
  justify-content: flex-start;
  margin: 8px 0 10px 0;
}
.asn-adddown-dropdown-wrap {
  position: relative;
}
.asn-adddown-toggle {
  min-width: 172px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.asn-adddown-caret {
  font-size: 11px;
  line-height: 1;
}
.asn-adddown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 180px;
  z-index: 40;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.15);
  padding: 4px 0;
}
.asn-adddown-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: #0f172a;
  text-align: left;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
}
.asn-adddown-item:hover {
  background: #f1f5f9;
}
.btn.outline.asn-prefix-btn-danger {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
}
.btn.outline.asn-prefix-btn-danger:hover,
.btn.outline.asn-prefix-btn-danger:focus,
.btn.outline.asn-prefix-btn-danger:active {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
}
.asn-prefix-stream {
  margin-bottom: 10px;
}

.asn-prefix-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 12px;
}

.btn-small {
  padding: 6px 12px;
  font-size: 13px;
}

.lookup-table-wrap.downstream-scroll {
  max-height: 320px;
  overflow-y: auto;
}
.asn-prefix-existing {
  background: rgba(10, 114, 78, 0.09);
}
.asn-prefix-existing td {
  color: #35574a;
}
.asn-prefix-new {
  background: rgba(12, 74, 110, 0.05);
}
.asn-prefix-existing input[type="checkbox"] {
  cursor: not-allowed;
}
.asn-prefix-found-title {
  margin: 6px 0 8px 0;
  font-size: 12px;
  color: #4b5563;
}
.asn-prefix-manual-panel {
  margin: 6px 0 10px 0;
}
.asn-prefix-manual-panel .form-grid {
  align-items: flex-start;
}
.asn-prefix-manual-panel .asn-manual-col > label {
  margin-top: 0;
  margin-bottom: 4px;
  min-height: 16px;
}
.asn-prefix-manual-panel .asn-manual-col > input,
.asn-prefix-manual-panel .asn-manual-col > select,
.asn-prefix-manual-actions .btn {
  height: 40px;
  box-sizing: border-box;
}

#listaAsnPage .form-grid {
  gap: 14px;
}

#listaAsnPage .listaasn-titular {
  min-width: 340px;
}

#listaAsnPage .listaasn-whois-action {
  width: auto;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

#listaAsnPage .listaasn-whois-action > label {
  visibility: hidden;
}

#listaAsnPage .listaasn-whois-action > .btn {
  width: max-content;
  margin-top: 4px;
}

#listaAsnPage .listaasn-stream {
  margin-top: 8px;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #dbe5ee;
  border-radius: 8px;
}

#listaAsnPage .listaasn-prefix-result {
  margin-top: 8px;
}

.wdsql-hero {
  overflow: hidden;
  position: relative;
}

.wdsql-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(11,95,90,0.08), rgba(59,130,246,0.06));
  pointer-events: none;
}

.wdsql-hero-body {
  position: relative;
  z-index: 1;
  text-align: center;
}

.wdsql-hero-head-center {
  text-align: center;
}

.wdsql-badge {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  background: #ecfdf5;
  color: #065f46;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.wdsql-sub {
  color: #475569;
  font-size: 14px;
}

.wdsql-grid {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 12px;
}

.reveal-up {
  animation: wdsqlRevealUp 250ms ease-out;
}

.reveal-up-delayed {
  animation: wdsqlRevealUp 320ms ease-out;
}

@keyframes wdsqlRevealUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.wdsql-filter {
  margin-bottom: 10px;
}

.wdsql-form-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 65vh;
  overflow: auto;
}

.wdsql-form-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #dbe5ee;
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px 10px;
  color: #1f2937;
  cursor: pointer;
}

.wdsql-form-item.active {
  border-color: #0b5f5a;
  background: #ecfeff;
}

.wdsql-form-total {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 999px;
  min-width: 24px;
  text-align: center;
  padding: 0 7px;
  font-size: 12px;
  color: #475569;
}

.wdsql-empty {
  color: #64748b;
  font-size: 13px;
}

.wdsql-selected {
  margin-bottom: 8px;
  font-size: 13px;
  color: #334155;
}

.wdsql-table-wrap {
  max-height: 270px;
  margin-bottom: 10px;
}

.wdsql-row {
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.wdsql-row.selected {
  background: rgba(11,95,90,0.08);
}

.wdsql-row.dragging {
  opacity: 0.6;
}

.wdsql-row.drag-over {
  background: rgba(11,95,90,0.12);
}

.wdsql-drag-handle {
  width: 34px;
  text-align: center;
  color: #64748b;
  cursor: grab;
}

.wdsql-order-actions {
  margin-bottom: 10px;
}

.wdsql-form-meta {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 8px 12px;
  align-items: end;
  margin-bottom: 10px;
}

.wdsql-form-meta-action {
  display: flex;
  align-items: end;
}

.wdsql-editor-grid {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 8px 14px;
}

.wdsql-editor-grid .full {
  grid-column: 1 / -1;
}

.wdsql-row-top {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px 14px;
  align-items: start;
}

.wdsql-row-top .wdsql-col-visivel { grid-column: span 1; }
.wdsql-row-top .wdsql-col-desc { grid-column: span 3; }
.wdsql-row-top .wdsql-col-tamanho { grid-column: span 1; }
.wdsql-row-top .wdsql-col-mascara { grid-column: span 1; }
.wdsql-row-top .wdsql-col-pesquisa { grid-column: span 2; }
.wdsql-row-top .wdsql-col-subform { grid-column: span 4; }

.wdsql-row-top > div,
.wdsql-editor-grid > div {
  min-width: 0;
}

.wdsql-editor-grid > div > label {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 20px;
}

/* Primeira linha usa o mesmo espaçamento vertical das demais linhas */
.wdsql-row-top > div > label {
  min-height: 22px;
  margin-bottom: 0;
  display: block;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.wdsql-col-visivel { min-width: 78px; }
.wdsql-col-desc { min-width: 210px; }
.wdsql-col-tamanho { min-width: 118px; }
.wdsql-col-mascara { min-width: 112px; }
.wdsql-col-pesquisa { min-width: 126px; }
.wdsql-col-subform { min-width: 200px; }
.wdsql-editor-grid .label-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
.wdsql-editor-grid .label-inline > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wdsql-col-obrigatorio { grid-column: span 2; min-width: 126px; }
.wdsql-col-msg-obrig { grid-column: span 4; }
.wdsql-col-regex { grid-column: span 3; min-width: 170px; }
.wdsql-col-msg-regex { grid-column: span 5; }

.wdsql-col-funcao { grid-column: span 8; min-width: 260px; }
.wdsql-col-msg-validacao { grid-column: span 4; }
.wdsql-col-info-enable { grid-column: span 2; min-width: 150px; }

.wdsql-col-info-text textarea {
  min-height: 82px;
}

.wdsql-editor-grid textarea {
  width: 100%;
  resize: vertical;
}

.wdsql-actions {
  margin-top: 4px;
}

.wdsql-saving {
  position: relative;
}

.wdsql-saving::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  border-top-color: #ffffff;
  display: inline-block;
  margin-left: 8px;
  animation: spin 700ms linear infinite;
  vertical-align: -1px;
}

.wflp-hero {
  overflow: hidden;
  position: relative;
}

.wflp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(11,95,90,0.08), rgba(59,130,246,0.06));
  pointer-events: none;
}

.wflp-hero-body {
  position: relative;
  z-index: 1;
  text-align: center;
}

.wflp-badge {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  background: #ecfdf5;
  color: #065f46;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.wflp-sub {
  color: #475569;
  font-size: 14px;
}

.wflp-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 12px;
}

.wflp-filter {
  margin-bottom: 10px;
}

.wflp-filter-campos {
  margin-top: 4px;
}

.wflp-form-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 65vh;
  overflow: auto;
}

.wflp-form-item {
  width: 100%;
  border: 1px solid #dbe5ee;
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px 10px;
  color: #1f2937;
  cursor: pointer;
  text-align: left;
}

.wflp-form-item.active {
  border-color: #0b5f5a;
  background: #ecfeff;
}

.wflp-form-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.wflp-form-script {
  font-weight: 600;
}

.wflp-form-vw {
  font-size: 12px;
  color: #64748b;
}

.wflp-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wflp-form-title {
  color: #334155;
  font-size: 12px;
}

.wflp-form-total {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 999px;
  min-width: 24px;
  text-align: center;
  padding: 0 7px;
  font-size: 12px;
  color: #475569;
}

.wflp-empty {
  color: #64748b;
  font-size: 13px;
}

.wflp-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.wflp-table-wrap {
  max-height: 320px;
  margin-bottom: 10px;
}

.wflp-row {
  cursor: pointer;
  transition: background-color 160ms ease;
}

.wflp-row.selected {
  background: rgba(11,95,90,0.08);
}

.wflp-editor-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 8px 12px;
  align-items: end;
}

.wflp-actions {
  display: flex;
  align-items: end;
}

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

  .wdsql-form-meta {
    grid-template-columns: 1fr;
  }

  .wdsql-editor-grid {
    grid-template-columns: 1fr;
  }

  .wdsql-row-top {
    grid-template-columns: 1fr;
    row-gap: 8px;
  }

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

  .wflp-meta {
    grid-template-columns: 1fr;
  }

  .wflp-editor-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.asn-prefix-manual-panel .asn-manual-col {
  width: 260px;
}
.asn-prefix-manual-panel .asn-manual-col-family {
  width: 150px !important;
}
.asn-prefix-manual-panel .asn-manual-col-prefix {
  width: 140px !important;
}
.asn-prefix-manual-panel .asn-manual-col-title {
  width: auto !important;
  min-width: 0;
  flex: 1 1 240px;
}
.asn-prefix-manual-panel .asn-manual-col-source {
  width: 150px !important;
  flex: 0 0 150px;
}
.asn-prefix-manual-actions {
  width: 170px;
  min-width: 170px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  padding-top: 23px;
  align-self: flex-start;
}
.asn-prefix-manual-actions::before {
  content: none;
}
.asn-manual-actions-label {
  display: none;
}
.asn-prefix-manual-actions .btn {
  min-width: 170px;
  width: 170px;
  max-width: 100%;
  text-align: center;
  white-space: nowrap;
  margin-top: 0 !important;
  padding-top: 0;
  padding-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
.asn-prefix-manual-actions .btn:first-of-type {
  margin-top: 0 !important;
}
.asn-hijack-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}
.asn-manual-info-inline {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex: 1 1 280px;
  min-width: 0;
}
.asn-manual-info-inline.hidden {
  display: none;
}
.asn-prefix-search-panel {
  margin-top: 12px;
}
.asn-prefix-search-panel .search-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.asn-prefix-only-new {
  margin-left: clamp(40px, 10vw, 180px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}
.asn-prefix-only-new.hidden {
  display: none;
}
.asn-prefix-only-new input[type="checkbox"] {
  margin: 0;
}
.asn-down-manual-options {
  width: 190px !important;
}
.asn-down-manual-ignore-wrap {
  margin-left: 18px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  padding: 0;
  align-self: center;
}
.asn-down-manual-ignore-wrap span {
  white-space: nowrap;
}
#asnPrefixSearchPanelDownManual .search-inline {
  gap: 12px;
}
#asnPrefixSearchPanelDownManual .asn-down-manual-ignore-wrap {
  margin-left: 28px;
}
@media (max-width: 1280px) {
  .asn-prefix-manual-panel .asn-manual-col-prefix {
    width: 180px !important;
  }
  .asn-prefix-manual-actions {
    min-width: 156px;
  }
  .asn-prefix-manual-actions .btn {
    min-width: 156px;
    width: 156px;
  }
  #asnPrefixSearchPanelDownManual .asn-down-manual-ignore-wrap {
    margin-left: 10px;
  }
}
.asn-prefix-manual-panel .form-grid + .form-grid {
  margin-top: 8px;
}
.asn-hijack-modal-box {
  max-width: 520px;
}
.asn-summ-list {
  margin: 10px 0 0 0;
  padding-left: 0;
  list-style: none;
}
.asn-summ-list li {
  margin: 2px 0;
}
#asnSummAsk {
  margin-top: 10px;
}
.asn-prefix-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.asn-prefix-status-badge.existing {
  color: #14532d;
  background: rgba(34, 197, 94, 0.18);
}
.asn-prefix-status-badge.new {
  color: #0c4a6e;
  background: rgba(56, 189, 248, 0.18);
}
.asn-prefix-status-badge.partial {
  color: #713f12;
  background: rgba(251, 191, 36, 0.24);
}
.asn-prefix-status-badge.origem-only_lg {
  color: #155e75;
  background: rgba(34, 211, 238, 0.18);
}
.asn-prefix-status-badge.origem-lg_irr {
  color: #166534;
  background: rgba(74, 222, 128, 0.2);
}
.asn-prefix-status-badge.origem-only_irr {
  color: #92400e;
  background: rgba(251, 191, 36, 0.22);
}
#asnInconsWarn {
  margin-top: 8px;
  margin-bottom: 8px;
}
.asn-prefix-status-badge.incons-anunciada_sem_irr {
  color: #991b1b;
  background: rgba(254, 202, 202, 0.8);
}
.asn-prefix-status-badge.incons-irr_sem_anuncio {
  color: #9a3412;
  background: rgba(254, 215, 170, 0.85);
}
#asnPrefixTableWrapDownLgIrr th:nth-child(2),
#asnPrefixTableWrapDownLgIrr td:nth-child(2) {
  width: 88px;
}
#asnPrefixTableWrapDownLgIrr th:nth-child(5),
#asnPrefixTableWrapDownLgIrr td:nth-child(5) {
  width: 130px;
  white-space: nowrap;
}
#asnPrefixTableWrapDownLgIrr th:nth-child(6),
#asnPrefixTableWrapDownLgIrr td:nth-child(6) {
  min-width: 280px;
  white-space: nowrap;
}
#asnPrefixTableWrapDownLgIrr th:nth-child(7),
#asnPrefixTableWrapDownLgIrr td:nth-child(7) {
  min-width: 420px;
  white-space: nowrap;
}

.bgp-community-flag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  color: #14532d;
  background: rgba(34, 197, 94, 0.18);
}
.bgp-community-flag.bits32 {
  color: #7f1d1d;
  background: rgba(248, 113, 113, 0.2);
}
.bgp-community-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid #d6dde8;
  border-radius: 10px;
  display: inline-block;
  width: auto;
  max-width: 100%;
}
.bgp-community-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.bgp-community-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bgp-community-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
  padding: 14px;
}
.bgp-community-controls {
  padding: 12px 12px 0 12px;
}
.bgp-community-row {
  display: grid;
  grid-template-columns: 300px 120px;
  gap: 8px;
  max-width: 428px;
}
.bgp-community-search {
  display: grid;
  grid-template-columns: 180px minmax(260px, 1fr) 190px;
  gap: 8px;
  margin-top: 8px;
}
.bgp-community-table-wrap {
  max-height: 300px;
  width: auto;
  max-width: calc(100% - 24px);
  margin: 8px 12px 12px 12px;
  display: inline-block;
  overflow-x: auto;
  box-sizing: border-box;
}
.bgp-community-grid {
  width: auto;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}
.bgp-community-grid thead th {
  background: #dfe7ef;
  color: #334155;
  font-weight: 600;
  border-top: 1px solid #d1dae5;
  border-bottom: 1px solid #d1dae5;
  padding: 8px 10px;
}
.bgp-community-grid thead th:first-child {
  border-left: 1px solid #d1dae5;
  border-top-left-radius: 6px;
}
.bgp-community-grid thead th:last-child {
  border-right: 1px solid #d1dae5;
  border-top-right-radius: 6px;
}
.bgp-community-grid tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5eaf1;
  border-right: 1px solid #eef2f7;
  background: #ffffff;
  vertical-align: middle;
  height: 44px;
  box-sizing: border-box;
}
.bgp-community-grid thead th:nth-child(1),
.bgp-community-grid tbody td:nth-child(1) {
  width: 70px;
}
.bgp-community-grid thead th:nth-child(2),
.bgp-community-grid tbody td:nth-child(2) {
  width: 170px;
}
.bgp-community-grid thead th:nth-child(3),
.bgp-community-grid tbody td:nth-child(3) {
  width: 90px;
}
.bgp-community-grid thead th:nth-child(4),
.bgp-community-grid tbody td:nth-child(4) {
  width: 90px;
  white-space: nowrap;
  text-align: center;
}
.bgp-community-grid tbody td:first-child {
  border-left: 1px solid #eef2f7;
  text-align: center;
}
.bgp-community-grid tbody tr:last-child td:first-child {
  border-bottom-left-radius: 6px;
}
.bgp-community-grid tbody tr:last-child td:last-child {
  border-bottom-right-radius: 6px;
}
.bgp-community-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 28px;
  width: auto;
}
.bgp-community-value {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 12px;
}
.bgp-community-std {
  color: #0c4a6e;
  background: linear-gradient(90deg, rgba(56,189,248,.18), rgba(125,211,252,.22), rgba(56,189,248,.18));
  background-size: 200% 100%;
  animation: bgp-shimmer 2.8s linear infinite;
}
.bgp-community-32 {
  color: #14532d;
  background: linear-gradient(90deg, rgba(74,222,128,.22), rgba(134,239,172,.30), rgba(74,222,128,.22));
  background-size: 200% 100%;
  animation: bgp-shimmer 2.8s linear infinite;
}
.bgp-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}
.bgp-chip-std {
  color: #0c4a6e;
  background: linear-gradient(90deg, rgba(56,189,248,.18), rgba(125,211,252,.24), rgba(56,189,248,.18));
  background-size: 200% 100%;
  animation: bgp-shimmer 2.8s linear infinite;
}
.bgp-chip-32 {
  color: #14532d;
  background: linear-gradient(90deg, rgba(74,222,128,.22), rgba(134,239,172,.30), rgba(74,222,128,.22));
  background-size: 200% 100%;
  animation: bgp-shimmer 2.8s linear infinite;
}
@keyframes bgp-shimmer {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}
.icon-btn {
  border: 1px solid #0f766e;
  background: #ffffff;
  color: #0f766e;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
}
.icon-btn:hover {
  background: #ecfeff;
}
.icon-btn.danger {
  border-color: #b91c1c;
  color: #b91c1c;
}
.icon-btn.danger:hover {
  background: #fef2f2;
}
.input-inline-community {
  width: 100%;
  min-width: 0;
  height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 8px;
  box-sizing: border-box;
}
.bgp-community-grid tbody tr.is-editing td {
  height: 44px;
}
.bgp-community-panel.is-locked::after {
  content: "Salve o registro principal para liberar esta seção";
  position: absolute;
  left: 0;
  right: 0;
  top: 52px;
  height: calc(100% - 52px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.65);
  color: #334155;
  font-weight: 600;
  pointer-events: none;
}
@media (max-width: 980px) {
  .bgp-community-row {
    max-width: 100%;
  }
  .bgp-community-search {
    grid-template-columns: 1fr;
  }
}

.gpperm-hero {
  text-align: center;
  padding: 10px 0;
}

.gpperm-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #80d1ba;
  border-radius: 999px;
  padding: 4px 12px;
  color: #0b6e4f;
  background: #d1fae5;
  font-weight: 600;
  margin-bottom: 8px;
}

.gpperm-sub {
  color: #334155;
}

.gpperm-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 12px;
}

.gpperm-group-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 580px;
  overflow: auto;
  padding-right: 2px;
}

.gpperm-group-item {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.gpperm-group-item.active {
  border-color: #0d9488;
  background: #ecfeff;
}

.gpperm-group-name {
  font-weight: 600;
  color: #0f172a;
}

.gpperm-group-meta {
  color: #475569;
  font-size: 12px;
}

.gpperm-empty {
  padding: 8px;
  color: #475569;
}

.gpperm-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.gpperm-toolbar-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gpperm-meta-line {
  display: flex;
  gap: 12px;
  color: #334155;
}

.gpperm-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
  justify-content: flex-end;
}

.gpperm-filter-row {
  margin-bottom: 10px;
}

.gpperm-tabs {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 10px;
}

.gpperm-tab {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
}

.gpperm-tab.active {
  background: #ecfeff;
  color: #0f766e;
  border-color: #0f766e;
}

.gpperm-section-title {
  font-weight: 700;
  color: #1e293b;
  margin: 10px 0 6px 0;
}

.gpperm-muted {
  color: #64748b;
  font-size: 12px;
}

.gpperm-right .table-grid th:not(:first-child),
.gpperm-right .table-grid td:not(:first-child) {
  text-align: center;
}

@media (max-width: 1100px) {
  .gpperm-layout {
    grid-template-columns: 1fr;
  }
}



.engine-tabs-wrap {
  margin: 8px 0 12px;
  border: 1px solid #c6d1da;
  border-radius: 8px;
  background: #fff;
}

.engine-tabs-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 8px 10px 0;
  background: #f5f7fa;
}

.engine-tab-btn {
  border: 1px solid #c6d1da;
  border-bottom-color: #c6d1da;
  background: #e8edf2;
  color: #2f3a4a;
  border-radius: 6px 6px 0 0;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-right: 4px;
  margin-bottom: -1px;
}

.engine-tab-btn.active {
  background: #fff;
  border-color: #c6d1da;
  border-bottom-color: #fff;
  color: #1f2f45;
}

.engine-tab-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.engine-tabs-body {
  padding: 12px;
  background: #fff;
  border-top: 1px solid #c6d1da;
}

.engine-tabs-main-pane,
.engine-tabs-child-pane {
  width: 100%;
}

.engine-tabs-main-pane.hidden,
.engine-tabs-child-pane.hidden {
  display: none;
}

.engine-tabs-msg {
  color: #2f3a4a;
  padding: 8px 0;
}

.engine-tabs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.engine-tabs-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.engine-tabs-search {
  display: block;
  margin-bottom: 8px;
}

.engine-tabs-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #edf3f7;
  border: 1px solid #cfd8df;
  border-radius: 8px;
  padding: 6px;
}

.engine-tabs-search-bar select {
  width: 190px;
  flex: 0 0 190px;
}

.engine-tabs-search-bar input {
  min-width: 220px;
  max-width: 420px;
  flex: 1 1 auto;
}

.engine-tabs-counter {
  font-size: 12px;
  color: #516176;
}

.engine-tabs-grid-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  max-height: 280px;
}

.engine-tabs-grid td,
.engine-tabs-grid th {
  white-space: nowrap;
}

.engine-tabs-grid tbody tr.selected td {
  background: #deefff;
}

.engine-tabs-iframe-modal {
  width: min(1440px, 96vw);
  max-width: 96vw;
}

.engine-tabs-iframe {
  width: 100%;
  min-height: 240px;
  max-height: 86vh;
  border: 1px solid #d6dee6;
  border-radius: 8px;
  background: #fff;
  overflow: auto;
}

#panelForm.panel-has-tabs .form {
  padding: 0;
}

#panelForm.panel-has-tabs .engine-tabs-wrap {
  margin: 0;
}

#panelForm.panel-has-tabs {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  margin-bottom: 16px;
}

#panelForm.panel-has-tabs .panel-head {
  display: none;
}

#panelForm.panel-has-tabs .form-actions {
  padding: 12px 0 0;
}


