/* Base legada do app (antigo styles.css), parte 09 (#533) · Configurações do CRM: tabelas operacionais. Ordem de carga: scripts/helpers/styles-source.js. */

/* Configurações do CRM — tabelas operacionais */
.crm-settings-table-section {
  overflow: hidden;
  border: 1px solid rgb(var(--mix-fx-line, 220 230 239));
  border-radius: 12px;
  background: rgb(var(--mix-fx-paper, 255 255 255));
  box-shadow: 0 5px 18px rgb(31 61 88 / 4%);
}

.crm-settings-table-section > header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgb(var(--mix-fx-line, 227 235 242));
}

.crm-settings-table-section > header h3 {
  margin: 0;
  color: rgb(var(--mix-fx-ink, 23 55 84));
  font-size: 14px;
}

.crm-settings-table-section > header p {
  margin: 3px 0 0;
  color: rgb(var(--mix-fx-muted, 117 136 155));
  font-size: 10px;
}

.crm-settings-table-section > .crm-settings-create-block {
  margin: 10px 14px;
}

.crm-settings-entity-tabs {
  display: flex;
  gap: 5px;
  padding: 8px 14px;
  border-bottom: 1px solid rgb(var(--mix-fx-line, 227 235 242));
  background: rgb(var(--mix-fx-paper, 249 251 253));
}

.crm-settings-entity-tabs button {
  min-height: 29px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: rgb(var(--mix-fx-ink-blue, 95 116 136));
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.crm-settings-entity-tabs button:hover {
  color: rgb(var(--mix-fx-ink-blue, 22 125 192));
  background: rgb(var(--mix-fx-paper, 238 247 252));
}

.crm-settings-entity-tabs button.active {
  border-color: rgb(var(--mix-fx-line, 185 220 237));
  color: rgb(var(--mix-fx-ink-blue, 18 111 169));
  background: rgb(var(--mix-fx-paper, 255 255 255));
  box-shadow: 0 2px 7px rgb(27 87 125 / 8%);
}

.crm-settings-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.crm-settings-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  color: rgb(var(--mix-fx-ink, 40 69 95));
  background: rgb(var(--mix-fx-paper, 255 255 255));
  font-size: 11px;
}

.crm-settings-table th {
  padding: 9px 11px;
  border-bottom: 1px solid rgb(var(--mix-fx-line, 223 232 239));
  color: rgb(var(--mix-fx-muted, 117 137 156));
  text-align: left;
  background: rgb(var(--mix-fx-paper, 246 249 251));
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
}

.crm-settings-table td {
  padding: 9px 11px;
  border-bottom: 1px solid rgb(var(--mix-fx-line, 232 238 243));
  vertical-align: middle;
}

.crm-settings-table tbody:last-child tr:last-child > td {
  border-bottom: 0;
}

.crm-settings-table .crm-settings-section-heading td {
  padding: 7px 11px;
  border-bottom-color: rgb(var(--mix-fx-line, 219 231 239));
  color: rgb(var(--mix-fx-ink, 23 55 84));
  background: rgb(var(--mix-fx-paper, 237 244 248));
}

.crm-settings-table .crm-settings-section-heading td strong,
.crm-settings-table .crm-settings-section-heading td span {
  display: inline;
}

.crm-settings-table .crm-settings-section-heading td strong {
  font-size: 10px;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.crm-settings-table .crm-settings-section-heading td span {
  margin-left: 7px;
  color: rgb(var(--mix-fx-muted, 128 146 162));
  font-size: 9px;
}

.crm-settings-table td strong,
.crm-settings-table td small {
  display: block;
}

.crm-settings-table td strong {
  color: rgb(var(--mix-fx-ink, 23 55 84));
  font-size: 11px;
}

.crm-settings-table td small {
  max-width: 260px;
  overflow: hidden;
  margin-top: 2px;
  color: rgb(var(--mix-fx-muted, 131 148 165));
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-settings-table th.actions,
.crm-settings-table td.actions {
  text-align: right;
}

.crm-settings-table td.actions {
  min-width: 142px;
  white-space: nowrap;
}

.crm-settings-table td.actions .mix-button {
  min-height: 29px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 9px;
}

.crm-settings-table td.actions .mix-button + .mix-button {
  margin-left: 4px;
}

.crm-settings-table tr:hover:not(.crm-settings-editor-row) > td {
  background: rgb(var(--mix-fx-paper, 251 253 254));
}

.crm-settings-table tr.is-editable {
  cursor: pointer;
}

.crm-settings-table tr.is-editable:hover > td {
  background: rgb(var(--mix-fx-paper, 242 248 252));
}

.crm-settings-pencil {
  display: inline-grid;
  width: 29px;
  height: 29px;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(var(--mix-fx-line, 214 226 235));
  border-radius: 7px;
  color: rgb(var(--mix-fx-ink-blue, 22 125 192));
  background: rgb(var(--mix-fx-paper, 255 255 255));
  cursor: pointer;
}

.crm-settings-pencil:hover {
  border-color: rgb(var(--mix-fx-line, 154 203 232));
  background: rgb(var(--mix-fx-paper, 237 248 254));
}

.crm-settings-pencil svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.crm-settings-editor-row > td {
  padding: 0;
  background: rgb(var(--mix-fx-paper, 247 250 252));
}

.crm-settings-editor-row .crm-settings-editor-body {
  border-top: 1px solid rgb(var(--mix-fx-line, 223 232 239));
}

.crm-settings-editor-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgb(var(--mix-fx-line, 225 233 239));
}

.crm-settings-editor-heading span,
.crm-settings-editor-heading strong {
  display: block;
}

.crm-settings-editor-heading span {
  color: rgb(var(--mix-fx-ink-blue, 22 129 197));
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.crm-settings-editor-heading strong {
  margin-top: 2px;
  color: rgb(var(--mix-fx-ink, 23 55 84));
  font-size: 14px;
}

.crm-settings-editor-heading small,
.crm-settings-help {
  color: rgb(var(--mix-fx-muted, 120 139 158));
  font-size: 9px;
}

.crm-selection-editor-block {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgb(var(--mix-fx-line, 220 231 239));
  border-radius: 10px;
  background: rgb(var(--mix-fx-paper, 255 255 255));
}

.crm-selection-editor-block > header strong,
.crm-selection-editor-block > header small {
  display: block;
}

.crm-selection-editor-block > header strong {
  color: rgb(var(--mix-fx-ink, 23 55 84));
  font-size: 11px;
}

.crm-selection-editor-block > header small {
  margin-top: 2px;
  color: rgb(var(--mix-fx-muted, 123 141 160));
  font-size: 9px;
}

.crm-selection-options {
  display: grid;
  gap: 6px;
}

.crm-selection-option {
  display: grid;
  grid-template-columns: 24px minmax(160px, 1fr) minmax(90px, auto);
  align-items: center;
  gap: 7px;
  min-height: 40px;
  overflow: hidden;
  border: 1px solid rgb(var(--mix-fx-line, 220 230 237));
  border-left: 5px solid var(--option-accent, #49bfe8);
  border-radius: 7px;
  background: color-mix(in srgb, var(--option-accent, #49bfe8) 12%, rgb(var(--mix-fx-paper, 255 255 255)));
}

.crm-selection-option-handle {
  color: rgb(var(--mix-fx-muted, 125 143 160));
  text-align: center;
  font-weight: 900;
}

.crm-selection-option input {
  min-height: 31px;
  border-color: transparent;
  background: rgb(var(--mix-fx-paper, 255 255 255) / 72%);
}

.crm-selection-option code {
  max-width: 160px;
  overflow: hidden;
  padding-right: 10px;
  color: rgb(var(--mix-fx-ink-blue, 104 126 145));
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-selection-workspace {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 540px;
  overflow: hidden;
  border: 1px solid rgb(var(--mix-fx-line, 220 230 239));
  border-radius: 12px;
  background: rgb(var(--mix-fx-paper, 255 255 255));
  box-shadow: 0 5px 18px rgb(31 61 88 / 4%);
}

.crm-selection-list-nav {
  border-right: 1px solid rgb(var(--mix-fx-line, 225 233 239));
  background: rgb(var(--mix-fx-paper, 247 250 252));
}

.crm-selection-list-nav > header {
  display: grid;
  gap: 2px;
  padding: 15px;
  border-bottom: 1px solid rgb(var(--mix-fx-line, 225 233 239));
}

.crm-selection-list-nav > header strong {
  color: rgb(var(--mix-fx-ink, 23 55 84));
  font-size: 12px;
}

.crm-selection-list-nav > header small {
  color: rgb(var(--mix-fx-muted, 122 141 160));
  font-size: 9px;
}

.crm-selection-list-nav nav {
  display: grid;
  max-height: 620px;
  overflow-y: auto;
  padding: 8px;
  gap: 4px;
}

.crm-selection-list-nav button {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  color: rgb(var(--mix-fx-ink, 41 70 94));
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.crm-selection-list-nav button:hover,
.crm-selection-list-nav button.active {
  color: rgb(var(--mix-fx-ink-blue, 10 111 171));
  background: rgb(var(--mix-fx-paper, 227 244 252));
}

.crm-selection-list-nav button span {
  font-size: 11px;
  font-weight: 800;
}

.crm-selection-list-nav button small {
  color: rgb(var(--mix-fx-muted, 124 143 161));
  font-size: 8px;
}

.crm-selection-panels {
  min-width: 0;
}

.crm-selection-panel {
  min-height: 100%;
}

.crm-selection-panel > header {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid rgb(var(--mix-fx-line, 225 233 239));
}

.crm-selection-panel > header span,
.crm-selection-panel > header h3,
.crm-selection-panel > header p {
  margin: 0;
}

.crm-selection-panel > header > div > span {
  color: rgb(var(--mix-fx-ink-blue, 22 129 197));
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.crm-selection-panel > header h3 {
  margin-top: 3px;
  color: rgb(var(--mix-fx-ink, 23 55 84));
  font-size: 16px;
}

.crm-selection-panel > header p {
  margin-top: 2px;
  color: rgb(var(--mix-fx-muted, 122 141 160));
  font-size: 9px;
}

.crm-selection-panel-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.crm-settings-empty {
  padding: 24px;
  color: rgb(var(--mix-fx-muted, 123 141 160));
  text-align: center;
  font-size: 11px;
}

.crm-settings-pane > div > .cr-page > .crm-settings-create-block {
  justify-self: end;
  margin-bottom: 0;
  position: relative;
  z-index: 2;
}

@media (max-width: 720px) {
  .crm-settings-pane > div > .cr-page > .crm-settings-create-block {
    justify-self: start;
    margin-bottom: 0;
  }

  .crm-selection-workspace {
    grid-template-columns: 1fr;
  }

  .crm-selection-list-nav {
    border-right: 0;
    border-bottom: 1px solid rgb(var(--mix-fx-line, 225 233 239));
  }

  .crm-selection-list-nav nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 220px;
  }
}
