/* Flux CRM 5.3.8 · cadastros em modal, listagens em abas e botões com + */

body.flux-crud-modal-open{overflow:hidden!important}

.flux-crud-page-tabs,
body[data-theme="crm-premium"] .content .flux-crud-page-tabs{
  position:relative;
  display:flex!important;
  align-items:center;
  gap:7px;
  width:100%;
  margin:0 0 18px!important;
  padding:7px!important;
  overflow-x:auto;
  overflow-y:hidden;
  border:1px solid #dce5ef!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:0 7px 24px rgba(18,43,70,.055)!important;
  scrollbar-width:thin;
}
.flux-crud-page-tab{
  flex:0 0 auto;
  min-height:42px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 14px;
  border:1px solid transparent!important;
  border-radius:11px;
  background:transparent!important;
  color:#52657b!important;
  font:inherit;
  cursor:pointer;
  white-space:nowrap;
  box-shadow:none!important;
}
.flux-crud-page-tab span{display:grid;place-items:center;width:23px;height:23px;border-radius:7px;background:#edf4fc;color:#1769c7;font-weight:850}
.flux-crud-page-tab b{font-size:13px;font-weight:750;color:inherit!important}
.flux-crud-page-tab:hover{border-color:#d4e3f4!important;background:#f5f8fc!important;color:#1769c7!important}
.flux-crud-page-tab.is-active{border-color:#c7dcf8!important;background:#edf5ff!important;color:#0f60bf!important;box-shadow:inset 0 0 0 1px rgba(23,105,199,.04)!important}
.flux-crud-page-tab.is-active span{background:#1677ff;color:#fff}
.flux-crud-page-tabs>.flux-crud-open{flex:0 0 auto;margin-left:auto!important;min-height:42px!important;border-radius:11px!important;white-space:nowrap}
.flux-crud-page-tabs>.flux-crud-open span{font-size:18px;line-height:1}

.flux-crud-grid-managed{grid-template-columns:minmax(0,1fr)!important}
.flux-crud-grid-managed>[hidden],
[data-crud-page-panel][hidden],
[data-crud-modal-panel][hidden]{display:none!important}

.flux-crud-modal{
  position:fixed;
  inset:0;
  z-index:5000;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(6,20,39,.52);
  backdrop-filter:blur(7px);
  -webkit-backdrop-filter:blur(7px);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .18s ease,visibility .18s ease;
}
.flux-crud-modal.is-open{opacity:1;visibility:visible;pointer-events:auto}
.flux-crud-modal-dialog{
  width:min(1120px,calc(100vw - 48px));
  max-height:min(92dvh,920px);
  display:grid;
  grid-template-rows:auto auto minmax(0,1fr) auto;
  overflow:hidden;
  border:1px solid rgba(215,226,238,.95);
  border-radius:22px;
  background:#fff;
  box-shadow:0 30px 90px rgba(4,20,39,.24),0 7px 25px rgba(4,20,39,.12);
  transform:translateY(14px) scale(.985);
  transition:transform .2s ease;
}
.flux-crud-modal.is-open .flux-crud-modal-dialog{transform:none}
.flux-crud-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:22px;
  padding:21px 24px 18px;
  border-bottom:1px solid #e4ebf3;
  background:#fff;
}
.flux-crud-modal-heading{min-width:0}
.flux-crud-modal-kicker{display:block;margin-bottom:3px;color:#1677ff;font-size:11px;font-weight:850;letter-spacing:.09em;text-transform:uppercase}
.flux-crud-modal-heading h2{margin:0!important;color:#0b1f3a!important;font-size:clamp(21px,2.2vw,28px)!important;line-height:1.18!important;letter-spacing:-.025em!important}
.flux-crud-modal-heading p{margin:5px 0 0;color:#65758a;font-size:13px}
.flux-crud-modal-close{
  flex:0 0 auto;
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid #dce5ef;
  border-radius:12px;
  background:#f7f9fc;
  color:#405269;
  font-size:25px;
  line-height:1;
  cursor:pointer;
}
.flux-crud-modal-close:hover{border-color:#bcd2ee;background:#eef5ff;color:#1267c9}
.flux-crud-modal-tabs{
  display:flex;
  gap:7px;
  min-height:55px;
  padding:7px 20px;
  overflow-x:auto;
  border-bottom:1px solid #e4ebf3;
  background:#fbfcfe;
  scrollbar-width:thin;
}
.flux-crud-modal-tabs[hidden]{display:none!important}
.flux-crud-modal-tab{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 13px;
  border:1px solid transparent;
  border-radius:11px;
  background:transparent;
  color:#5b6b7f;
  font:inherit;
  cursor:pointer;
  white-space:nowrap;
}
.flux-crud-modal-tab span{display:grid;place-items:center;width:23px;height:23px;border-radius:7px;background:#eaf2fd;color:#1769c7;font-weight:900}
.flux-crud-modal-tab b{color:inherit!important;font-size:13px;font-weight:760}
.flux-crud-modal-tab:hover{border-color:#d5e3f3;background:#f3f7fc;color:#1769c7}
.flux-crud-modal-tab.is-active{border-color:#c7dcf8;background:#eaf3ff;color:#0e5fbd}
.flux-crud-modal-tab.is-active span{background:#1677ff;color:#fff}
.flux-crud-modal-body{
  min-height:0;
  padding:20px;
  overflow:auto;
  overscroll-behavior:contain;
  background:#f4f7fb;
}
body[data-theme="crm-premium"] .flux-crud-modal-body .flux-crud-modal-panel,
.flux-crud-modal-body .flux-crud-modal-panel{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:22px!important;
  border:1px solid #dce5ef!important;
  border-radius:17px!important;
  background:#fff!important;
  background-image:none!important;
  color:#172033!important;
  box-shadow:0 5px 18px rgba(20,42,70,.05)!important;
}
.flux-crud-modal-panel>.panel-head:first-child,
.flux-crud-modal-panel>h2:first-child,
.flux-crud-modal-panel>h3:first-child{margin-top:0!important}
.flux-crud-modal-panel>h2:first-child{font-size:19px!important;color:#10233e!important}
.flux-crud-modal-panel .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px!important}
.flux-crud-modal-panel .form-grid>h3,
.flux-crud-modal-panel .form-grid>.alert,
.flux-crud-modal-panel .form-grid>.actions,
.flux-crud-modal-panel .form-grid>button,
.flux-crud-modal-panel .form-grid>section,
.flux-crud-modal-panel .form-grid>.channel-config-group,
.flux-crud-modal-panel .form-grid>.check-grid,
.flux-crud-modal-panel .form-grid>.signature-settings,
.flux-crud-modal-panel .form-grid>.welcome-sequence-box,
.flux-crud-modal-panel .form-grid>.legal-registration-checks,
.flux-crud-modal-panel .form-grid>.cols{grid-column:1/-1}
.flux-crud-modal-panel .form-grid>.cols{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
.flux-crud-modal-panel .form-grid label{min-width:0;color:#27364b!important;font-weight:650}
.flux-crud-modal-panel form{align-content:start}
.flux-crud-modal-panel .form-grid>div:not([class]){grid-column:1/-1;min-width:0}
.flux-crud-modal-panel .form-grid>div:not([class])>b:first-child{
  display:block;
  margin:0 0 11px;
  color:#203852!important;
  font-size:14px;
  font-weight:850;
  line-height:1.35;
}
.flux-crud-modal-panel .channel-provider-intro{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:52px minmax(0,1fr);
  align-items:center;
  gap:14px;
  padding:16px 18px;
  border:1px solid #cfe0f2;
  border-radius:16px;
  background:linear-gradient(135deg,#f3f8ff,#fff);
  box-shadow:0 7px 20px rgba(26,66,108,.055);
}
.flux-crud-modal-panel .channel-provider-intro>span{
  display:grid;
  place-items:center;
  width:50px;
  height:50px;
  border-radius:15px;
  background:#e3f0ff;
  color:#176fc1;
  font-size:13px;
  font-weight:950;
}
.flux-crud-modal-panel .channel-provider-intro>div{display:grid;gap:3px;min-width:0}
.flux-crud-modal-panel .channel-provider-intro small{color:#2876bd!important;font-size:9px!important;font-weight:900!important;letter-spacing:.1em}
.flux-crud-modal-panel .channel-provider-intro b{color:#17324d!important;font-size:16px!important}
.flux-crud-modal-panel .channel-provider-intro p{margin:0!important;color:#64798f!important;font-size:12px!important;line-height:1.5!important}
.flux-crud-modal-panel .creation-mode-choice{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:stretch!important;
  gap:12px!important;
  margin:0 0 5px!important;
}
.flux-crud-modal-panel .creation-mode-choice label{
  position:relative!important;
  display:grid!important;
  grid-template-columns:28px minmax(0,1fr)!important;
  grid-template-rows:auto 1fr!important;
  align-content:start!important;
  column-gap:12px!important;
  row-gap:5px!important;
  min-width:0!important;
  min-height:116px!important;
  margin:0!important;
  padding:17px 18px!important;
  border:1px solid #d8e3ef!important;
  border-radius:16px!important;
  background:#fff!important;
  color:#203852!important;
  cursor:pointer!important;
  box-shadow:0 5px 16px rgba(25,52,84,.04)!important;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease,background .18s ease!important;
}
.flux-crud-modal-panel .creation-mode-choice label:hover{
  transform:translateY(-1px);
  border-color:#a9c9eb!important;
  box-shadow:0 9px 22px rgba(25,74,124,.08)!important;
}
.flux-crud-modal-panel .creation-mode-choice label:is(.is-selected,:has(input:checked)){
  border-color:#3b8df0!important;
  background:linear-gradient(145deg,#f4f9ff,#fff)!important;
  box-shadow:0 0 0 3px rgba(34,126,235,.11),0 9px 24px rgba(25,74,124,.08)!important;
}
.flux-crud-modal-panel .creation-mode-choice input[type="radio"]{
  position:static!important;
  grid-column:1!important;
  grid-row:1/3!important;
  align-self:start!important;
  width:24px!important;
  height:24px!important;
  margin:0!important;
  appearance:none!important;
  -webkit-appearance:none!important;
  border:2px solid #9eb4cb!important;
  border-radius:50%!important;
  background:#fff!important;
  cursor:pointer!important;
  box-shadow:none!important;
}
.flux-crud-modal-panel .creation-mode-choice input[type="radio"]:checked{
  border:7px solid #237ee8!important;
  background:#fff!important;
}
.flux-crud-modal-panel .creation-mode-choice b{
  grid-column:2!important;
  grid-row:1!important;
  display:block!important;
  min-width:0!important;
  margin:0!important;
  color:#17324d!important;
  font-size:14px!important;
  font-weight:850!important;
  line-height:1.35!important;
}
.flux-crud-modal-panel .creation-mode-choice small{
  grid-column:2!important;
  grid-row:2!important;
  display:block!important;
  min-width:0!important;
  margin:0!important;
  color:#667b91!important;
  font-size:12px!important;
  font-weight:500!important;
  line-height:1.55!important;
}
.flux-crud-modal-panel .creation-mode-choice .field-label-row,
.flux-crud-modal-panel .creation-mode-choice .field-info-button{display:none!important}
.flux-crud-modal-panel :is(fieldset,.channel-config-group,.meta-smart-config){
  min-width:0;
  padding:18px!important;
  border:1px solid #dce6f0!important;
  border-radius:16px!important;
  background:#f9fbfe!important;
}
.flux-crud-modal-panel :is(fieldset,.channel-config-group,.meta-smart-config)>h3:first-child,
.flux-crud-modal-panel fieldset>legend{margin:0 0 12px!important;color:#203852!important;font-size:15px!important;font-weight:850!important}
.flux-crud-modal-panel .alert{border-radius:13px!important;line-height:1.55!important}
.flux-crud-modal-panel :is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),select,textarea){
  width:100%!important;
  min-height:44px;
  border:1px solid #d5e0ec!important;
  border-radius:11px!important;
  background:#fff!important;
  color:#172033!important;
  box-shadow:none!important;
}
.flux-crud-modal-panel textarea{min-height:112px}
.flux-crud-modal-panel :is(input,select,textarea):focus{border-color:#7ab2f1!important;box-shadow:0 0 0 3px rgba(22,119,255,.10)!important;outline:none!important}
.flux-crud-modal-panel form>.btn.primary:last-child,
.flux-crud-modal-panel form>.actions:last-child,
.flux-crud-modal-panel form>.form-actions:last-child{margin-top:4px}
.flux-crud-modal-panel form>button[type="submit"]:last-child{display:none!important}
.flux-crud-modal-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 20px;
  border-top:1px solid #e4ebf3;
  background:#fff;
}
.flux-crud-modal-status{min-width:0;color:#6a788b;font-size:12px}
.flux-crud-modal-actions{display:flex;align-items:center;gap:9px;flex:0 0 auto}
.flux-crud-modal-actions .btn{min-width:118px;min-height:42px;border-radius:11px}
.flux-crud-empty-state{
  display:flex;
  align-items:center;
  gap:16px;
  padding:22px;
  border:1px dashed #bcd2ea;
  border-radius:17px;
  background:#f8fbff;
  color:#24364d;
}
.flux-crud-empty-state>span{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:#e9f3ff;color:#1677ff;font-size:27px;font-weight:800}
.flux-crud-empty-state h2{margin:0 0 4px!important;font-size:19px!important}
.flux-crud-empty-state p{margin:0;color:#65758a}
.flux-crud-empty-state .btn{margin-left:auto}

/* /contact-collector abre sozinho, ocupando toda a largura útil, sem menu lateral. */
body.contact-collector-focus-layout{margin:0!important;width:100%!important;max-width:none!important;background:#f4f7fb!important}
body.contact-collector-focus-layout .main{position:relative!important;left:0!important;width:100%!important;max-width:none!important;margin:0!important;transform:none!important;background:#f4f7fb!important}
body.contact-collector-focus-layout .topbar{left:0!important;width:100%!important;max-width:none!important}
body.contact-collector-focus-layout .content{width:100%!important;max-width:none!important;margin:0!important;padding:22px clamp(14px,2.4vw,34px) 80px!important}
body.contact-collector-focus-layout .contact-collector-grid{width:100%!important;max-width:none!important}
body.contact-collector-focus-layout .system-footer{display:none!important}

@media(max-width:760px){
  .flux-crud-page-tabs{border-radius:13px!important;padding:6px!important}
  .flux-crud-page-tabs>.flux-crud-open{margin-left:0!important}
  .flux-crud-modal{padding:0}
  .flux-crud-modal-dialog{width:100vw;max-height:100dvh;height:100dvh;border:0;border-radius:0;grid-template-rows:auto auto minmax(0,1fr) auto}
  .flux-crud-modal-head{padding:16px}
  .flux-crud-modal-heading p{display:none}
  .flux-crud-modal-tabs{padding:7px 12px}
  .flux-crud-modal-body{padding:10px}
  body[data-theme="crm-premium"] .flux-crud-modal-body .flux-crud-modal-panel,.flux-crud-modal-body .flux-crud-modal-panel{padding:15px!important;border-radius:14px!important}
  .flux-crud-modal-panel .form-grid,.flux-crud-modal-panel .form-grid>.cols{grid-template-columns:1fr!important}
  .flux-crud-modal-panel .creation-mode-choice{grid-template-columns:1fr!important}
  .flux-crud-modal-panel .creation-mode-choice label{min-height:104px!important;padding:15px!important}
  .flux-crud-modal-foot{padding:10px;display:block}
  .flux-crud-modal-status{display:none}
  .flux-crud-modal-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  .flux-crud-modal-actions .btn{width:100%;min-width:0}
  .flux-crud-empty-state{display:grid;text-align:center;justify-items:center}
  .flux-crud-empty-state .btn{margin-left:0;width:100%}
  body.contact-collector-focus-layout .content{padding:12px 10px 70px!important}
}
.flux-crud-modal-panel .flux-crud-native-submit{display:none!important}
body[data-theme="crm-premium"] .content .module-tabs>.flux-crud-open{
  margin-left:auto!important;
  min-height:42px!important;
  border:0!important;
  border-radius:11px!important;
  background:linear-gradient(135deg,#1677ff,#7357f5)!important;
  color:#fff!important;
  box-shadow:0 7px 18px rgba(22,119,255,.18)!important;
  white-space:nowrap;
}
body[data-theme="crm-premium"] .content .module-tabs>.flux-crud-open *{color:#fff!important}

/* Flux CRM 5.3.8 · botão + obrigatório e ações de conexão visíveis */
.flux-crud-global-actionbar{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:10px!important;
  width:100%!important;
  margin:0 0 16px!important;
}
.flux-crud-global-actionbar .flux-crud-open,
.settings-new-connection-button,
[data-open-crud-modal].btn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  min-height:42px!important;
  border-radius:12px!important;
  white-space:nowrap!important;
}
.flux-crud-global-actionbar .flux-crud-open>span,
.settings-new-connection-button>span,
[data-open-crud-modal].btn>span:first-child,
[data-crud-plus-icon]{
  display:inline-grid!important;
  place-items:center!important;
  flex:0 0 auto!important;
  font-size:18px!important;
  line-height:1!important;
  font-weight:900!important;
}
.settings-page-primary-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:20px!important;
  margin:0 0 18px!important;
  padding:0!important;
}
.settings-page-primary-actions>div{min-width:0!important}
.settings-page-primary-actions h1{
  margin:2px 0 4px!important;
  color:#0b1f3a!important;
  font-size:clamp(25px,3vw,38px)!important;
  line-height:1.1!important;
  letter-spacing:-.035em!important;
}
.settings-page-primary-actions p{margin:0!important;color:#65758a!important}
.settings-page-kicker{
  display:block!important;
  color:#1677ff!important;
  font-size:11px!important;
  font-weight:850!important;
  letter-spacing:.09em!important;
  text-transform:uppercase!important;
}
.channel-card .channel-qr-action{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  min-height:38px!important;
  padding:8px 12px!important;
  border:0!important;
  border-radius:10px!important;
  background:linear-gradient(135deg,#1677ff,#6557ef)!important;
  color:#fff!important;
  box-shadow:0 7px 18px rgba(22,119,255,.18)!important;
  opacity:1!important;
  visibility:visible!important;
}
.channel-card .channel-qr-action *{color:#fff!important}
.channel-card>.actions,
.channel-card .actions{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:8px!important;
  overflow:visible!important;
}
.channel-card .inline-form{display:inline-flex!important;margin:0!important}

@media(max-width:760px){
  .flux-crud-global-actionbar{justify-content:stretch!important}
  .flux-crud-global-actionbar .flux-crud-open{width:100%!important}
  .settings-page-primary-actions{display:grid!important;grid-template-columns:1fr!important}
  .settings-new-connection-button{width:100%!important}
  .channel-card .actions{display:grid!important;grid-template-columns:1fr!important}
  .channel-card .inline-form,.channel-card .inline-form .btn{width:100%!important}
}
