@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800;900&display=swap');

:root{
  --bg:#0b1220;
  --card:#111b2d;
  --muted:#8aa0c2;
  --text:#e7eefc;
  --accent:#4b2cff;
  --danger:#ff5c7a;
  --ok:#4fe39d;
  --border:rgba(255,255,255,.08);
  --shadow: none;
  --radius:14px;
  --font:'Manrope';
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background: #0d2d3c;
  color:var(--text);
  font-family:var(--font);
}

a{color:inherit;text-decoration:none}
a:hover{text-decoration:underline}

.container{ width: 100%; margin:0 auto;padding:20px}

.topbar{
  position:sticky;top:0;z-index:10;
  background:rgba(11,18,32,.9);
  border-bottom:1px solid var(--border);
  backdrop-filter:blur(10px);
}
.topbar__inner{
  width:100%;margin:0 auto;
  padding:12px 18px;
  display:flex;align-items:center;gap:16px;justify-content:space-between;
}
.brand a{font-weight:700;letter-spacing:.2px}
.brand img { width: auto; max-height: 30px; position:relative; display:inline-block; }

.nav{display:flex;gap:14px}
.nav a{color:var(--muted);padding:8px 10px;border-radius:10px; font-size:12px; }
.nav a:hover{background:rgba(255,255,255,.05);color:var(--text);text-decoration:none}

.user{display:flex;align-items:center;gap:10px}
.user__name{color:var(--muted);font-size:12px}

.card{
  background:rgba(17,27,45,.85);
  border:1px solid var(--border);
  border-radius:var(--radius);
}
.card__body{padding:16px}

.h1{font-size:20px;margin:0 0 12px}
.h2{font-size:16px;margin:0 0 12px;color:var(--muted)}

.row{display:flex;gap:12px;flex-wrap:wrap, justify-content:space-between;align-items:center;}
.botoes_row { display:flex;gap:10px;align-items:center; }

.msgLink{
  color: var(--accent);
  text-decoration: underline;
  word-break: break-word;
}
.msgLink:hover{ opacity: .9; }

.unreadMarker{
  margin: 10px 0;
  text-align:center;
  font-size:12px;
  color: var(--muted);
  opacity:.9;
}
.msgLink{ color: var(--accent); text-decoration: underline; word-break: break-word; }

.ticks{
  margin-left:8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;height:18px;
  opacity:.95;
}
.ticks svg{ width:18px;height:18px; }

.ticks--queued{ color: rgba(255,255,255,.55); }
.ticks--sent{ color: rgba(255,255,255,.65); }
.ticks--delivered{ color: rgba(255,255,255,.75); }
.ticks--read{ color: #4fb3ff; } /* azul */
.ticks--failed{ color:#ff6b6b; font-weight:800; }

/*MENU HOVER*/
.bubble{ position:relative; }

.msgMore{
  position:absolute;
  top:8px;
  right:10px;
  opacity:0;
  transition: opacity .15s ease;
}

.bubble:hover .msgMore{ opacity:1; }

.msgMore__btn{
  list-style:none;
  cursor:pointer;
  user-select:none;
  padding:2px 8px;
  border-radius:999px;
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.85);
  font-size: 13px;
}
.msgMore__btn::-webkit-details-marker{ display:none; }

.msgMore__menu{
  margin-top:6px;
  min-width: 180px;
  padding:8px;
  border-radius:12px;
  background: rgba(10,15,25,.95);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: none;
}
.msgMore__menu a{
  display:block;
  padding:7px 8px;
  border-radius:10px;
  text-decoration:none;
  color: rgba(255,255,255,.92);
  font-size: 13px;
}
.msgMore__menu a:hover{
  background: rgba(255,255,255,.08);
}


.field{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}
.field label{font-size:12px;color:var(--muted)}
.input,.textarea,select{
  width:100%;
  background:rgba(0,0,0,.2);
  color:var(--text);
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  outline:none;
  font-family: var(--font);
}
.textarea{min-height:90px;resize:vertical}
.input:focus,.textarea:focus,select:focus{border-color:rgba(78,161,255,.55);box-shadow: none;align-items:center;justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(78,161,255,.15);
  color:var(--text);
  cursor:pointer;
  font-size: 12px;
}
.btn:hover{background:rgba(78,161,255,.22)}
.btn--ghost{background:transparent}
.btn--danger{background:rgba(255,92,122,.18)}
.btn--danger:hover{background:rgba(255,92,122,.26)}

.alert{
  padding:10px 12px;border-radius:12px;
  border:1px solid var(--border);
  margin:12px 0;
  color:var(--text);
  background:rgba(255,255,255,.03);
}
.alert--ok{border-color:rgba(79,227,157,.35);background:rgba(79,227,157,.08)}
.alert--err{border-color:rgba(255,92,122,.35);background:rgba(255,92,122,.08)}

.table{width:100%;border-collapse:separate;border-spacing:0}
.table th,.table td{padding:10px 10px;border-bottom:1px solid var(--border);font-size:13px;vertical-align:top}
.table th{color:var(--muted);text-align:left;font-weight:600}

/* Kanban */
.kanban{
  display:flex;
  gap:14px;
  overflow-x:auto;
  padding-bottom:10px;
  margin-top: 20px;
}
.column{
  min-width:290px;
  max-width:290px;
  flex:0 0 290px;
  position: relative; /* Necessário para ancorar o cadeado para fora */
}
.column__head{
  display:flex;align-items:center;justify-content:space-between;
  padding:12px 12px;
  border-bottom:1px solid var(--border);
}
.column__title{font-weight:700;font-size:13px}
.column__count{color:var(--muted);font-size:12px}
.column__body{padding:10px;min-height:220px}

.cardLead{
  --lead-bg: rgba(0,0,0,.18);
  background: var(--lead-bg);
  border: 0;
  border-radius:14px;
  padding:12px;
  margin-bottom:10px;
  cursor:grab;
  position:relative;
}

.cardLead--unread{
  --lead-bg: rgba(78,161,255,.10);
  background: var(--lead-bg);
  box-shadow: none;
}

.cardLead--unread::after{
  content:"";
  position:absolute;
  top:0px;
  right:0px;
  width:8px;
  height:8px;
  border-radius:999px;
  background: rgba(78,161,255,.95);
  box-shadow: none;
}
.cardLead:active{cursor:grabbing}
.cardLead small { margin-top:12px;display:flex;justify-content:space-between;gap:10px; }
.cardLead small a { color:var(--accent); font-weight:700; }
.cardLead small .nao_lidas { color:var(--text);background:rgba(255,255,255,.08);padding:2px 8px;border-radius:999px; }
.cardLead small .ja_lidas { color:var(--muted); }
.cardLead__top{display:flex;justify-content:space-between;gap:10px}
.cardLead__who{display:flex;align-items:center;gap:10px;min-width:0}
.avatar{width:28px;height:28px;border-radius:999px;flex:0 0 28px;object-fit:cover;border:1px solid var(--border);background:rgba(255,255,255,.06)}
.avatar--ph{display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;letter-spacing:.4px;text-transform:uppercase}
.cardLead__name{font-weight:700;font-size:13px}
.cardLead__time{color:var(--muted);font-size:11px;white-space:nowrap}
.cardLead__msg{
  color:var(--muted);
  font-size:12px;
  margin-top:8px;
  line-height:1.35;

  /* clamp 3 linhas */
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;

  /* fallback */
  max-height: calc(1.35em * 3);

  overflow:hidden;
  position:relative;
}
.dropzone--over{outline:2px dashed rgba(78,161,255,.5);outline-offset:4px;border-radius:14px}

/* Chat */
.chatWrap{display:grid;grid-template-columns:1fr;gap:14px}
@media(max-width:980px){.chatWrap{grid-template-columns:1fr}}

.chat{
  border-radius:var(--radius);
  border:1px solid var(--border);
  background:rgba(0,0,0,.15);
}
.chat__head{padding:12px 14px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between}
.chatHead__who{display:flex;align-items:center;gap:12px;min-width:0}
.avatar--lg{width:38px;height:38px;flex:0 0 38px}
.chat__title{font-weight:700}
.chat__body{padding:14px;display:flex;flex-direction:column;gap:10px;overflow:auto}

.bubble{max-width:65%;padding:10px 12px;border-radius:14px;border:1px solid var(--border);line-height:1.35;font-size:13px}
.bubble--in{background:rgba(255,255,255,.05);align-self:flex-start}
.bubble--out{background:rgba(78,161,255,.15);align-self:flex-end}
.bubble__meta{margin-top:6px;color:var(--muted);font-size:11px;display:flex;justify-content:flex-end;gap:8px}

/* Linha da bolha (para suportar avatar em mensagens recebidas) */
.bubbleRow{display:flex;gap:8px;align-items:flex-end}
.bubbleRow--in{justify-content:flex-start}
.bubbleRow--out{justify-content:flex-end}
.bubbleRow .bubble{align-self:auto}
.bubbleRow__avatar{flex:0 0 auto}
.avatar--msg{width:26px;height:26px;flex:0 0 26px}

.chat__composer{padding:12px 14px;border-top:1px solid var(--border);display:flex;gap:10px}
.chat__composer .input{flex:1}

.sidebar{display:flex;flex-direction:column;gap:14px}

.small{color:var(--muted);font-size:12px}

.bubble__sender{ font-size:12px; opacity:.85; margin-bottom:6px; font-weight:600; }
.bubble__content{ line-height:1.35; }

.ticks{ margin-left:8px; font-size:12px; opacity:.9; }
.ticks--read{ color:#4fb3ff; }      /* ✓✓ azul */
.ticks--delivered{ color:#cbd5e1; } /* ✓✓ cinza */
.ticks--sent{ color:#cbd5e1; }      /* ✓ */
.ticks--clock{ opacity:.8; }
.ticks--failed{ color:#ff6b6b; font-weight:700; }

.msgSticker{ max-width:160px; max-height:160px; display:block; }
.msgMediaVideo{ width:320px; max-width:100%; border-radius:12px; }
.msgMediaAudio{ width:320px; max-width:100%; }
.msgDoc{ display:inline-block; padding:8px 10px; border-radius:10px; text-decoration:none; }
.msgCaption{ margin-top:8px; opacity:.95; }
.msgMediaFallback{ opacity:.8; font-style:italic; }

/* ==== Audio player ==== */
/* O layout do player de áudio vive em assets/chat.css (fonte única). Este bloco
   antigo foi REMOVIDO porque seu `.audioP__meta{flex-direction:column}` vencia o
   do chat.css e empilhava 0:00 / 1x / duração em 3 linhas. Mantém-se só os
   ajustes de tema (claro) mais abaixo neste arquivo. */

/* ==== Lightbox ==== */
.lb{ position:fixed; inset:0; z-index:9999; }
.lb--hidden{ display:none; }
.lb__backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.65); }
.lb__panel{
  position:relative;
  z-index:1;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.lb__img{
  max-width:min(980px, 92vw);
  max-height:92vh;
  border-radius:16px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
}
.lb__close{
  position:absolute;
  top:18px;
  right:18px;
  width:40px;height:40px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.35);
  color:var(--text);
  cursor:pointer;
  z-index:2;
}
.lb__close:hover{ background:rgba(255,255,255,.10); }
.lbLock{ overflow:hidden; }

    /* ===== Premium Instance Switcher (não desloca header) ===== */
    .topbar__right{display:flex;align-items:center;gap:14px;}
    .instSwitch{position:relative;display:inline-block;flex:0 0 auto;}
    .instSwitch>summary{list-style:none;cursor:pointer;user-select:none;}
    .instSwitch>summary::-webkit-details-marker{display:none;}

    .instPill{
      display:flex;align-items:center;gap:10px;
      padding:8px 10px;
      border-radius:12px;
      border:1px solid rgba(255,255,255,.12);
      background: rgba(255,255,255,.04);
      backdrop-filter: blur(10px);
      transition: .15s ease;
      white-space:nowrap;
      box-shadow: none;
    }
    .instPill:hover{background: rgba(255,255,255,.06);}
    .instPill:active{transform: translateY(1px);}

    .instDot{
      width:10px;height:10px;border-radius:50%;
      box-shadow: none;
      flex:0 0 auto;
    }
    .instDot--on{background:#22c55e;}
    .instDot--off{background:#ef4444;}
    .instDotPulse{
      position:relative;
    }
    .instDotPulse::after{
      content:"";
      position:absolute; inset:-6px;
      border-radius:999px;
      border:1px solid rgba(34,197,94,.35);
      opacity:.0;
      transform: scale(.7);
      animation: pulse 1.6s ease-out infinite;
    }
    @keyframes pulse{
      0%{opacity:.0; transform:scale(.7);}
      30%{opacity:.35;}
      100%{opacity:0; transform:scale(1.2);}
    }

    .instMeta{display:flex;flex-direction:column;line-height:1.05;}
    .instMeta b{font-weight:800;font-size:12.5px;letter-spacing:.2px;opacity:.95;}
    .instMeta span{font-size:12px;opacity:.70;}
    .instCaret{opacity:.7;margin-left:2px;font-size:12px;}

    /* Menu flutuante (fora do fluxo) */
    .instMenu{
      display:none;
      position:absolute;
      right:0; top:calc(100% + 10px);
      width: 320px;
      border-radius: 16px;
      border:1px solid rgba(255,255,255,.10);
      background: rgba(10, 18, 28, .98);
      box-shadow: none;
      overflow:hidden;
      z-index: 9999;
    }
    .instSwitch[open] .instMenu{display:block;}

    .instMenu__top{
      padding:12px 14px;
      border-bottom:1px solid rgba(255,255,255,.08);
      display:flex; gap:12px; align-items:center;
      background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0));
    }
    .instMenu__badge{
      width:38px;height:38px;border-radius:12px;
      background: rgba(255,255,255,.06);
      border:1px solid rgba(255,255,255,.10);
      display:flex;align-items:center;justify-content:center;
      font-weight:800;
    }
    .instMenu__topTitle{font-weight:900;font-size:13px;margin:0;line-height:1.15;}
    .instMenu__topSub{margin:2px 0 0; font-size:12px; opacity:.75; line-height:1.2;}
    .instMenu__hint{padding:8px 14px 0; font-size:12px; opacity:.70;}

    .instMenu__list{max-height: 320px; overflow:auto; padding:10px 8px 10px;}
    .instItem{
      display:flex;align-items:center;justify-content:space-between;
      padding:10px 10px;
      border-radius: 12px;
      text-decoration:none;
      color:inherit;
      transition:.12s ease;
      border:1px solid transparent;
      margin:4px 0;
    }
    .instItem:hover{
      background: rgba(255,255,255,.05);
      border-color: rgba(255,255,255,.08);
    }
    .instItem--active{
      background: rgba(34,197,94,.12);
      border-color: rgba(34,197,94,.25);
    }

    .instLeft{display:flex;flex-direction:column;gap:2px;}
    .instName{font-weight:900;font-size:13px;}
    .instPhone{font-size:12px;opacity:.75;}
    .instRight{display:flex;align-items:center;gap:10px;}
    .instChip{
      font-size:11px;
      padding:3px 9px;
      border-radius:999px;
      border:1px solid rgba(255,255,255,.10);
      background: rgba(255,255,255,.04);
      opacity:.92;
    }
    .instCheck{
      width:18px;height:18px;border-radius:6px;
      background: rgba(34,197,94,.18);
      border:1px solid rgba(34,197,94,.35);
      display:flex;align-items:center;justify-content:center;
      font-size:12px;
    }

    .instMenu__footer{
      padding:10px 14px;
      border-top:1px solid rgba(255,255,255,.08);
      display:flex;justify-content:space-between;align-items:center;
      font-size:12px; opacity:.70;
    }

    /* Pequena proteção: se algum CSS global mexer em details */
    details.instSwitch{margin:0; padding:0;}

    /* ===== Premium dropdown (instâncias + config) ===== */
.topbar__right{display:flex;align-items:center;gap:12px}

/* wrapper */
.dd{position:relative;display:inline-block;flex:0 0 auto}
.dd > summary{list-style:none;cursor:pointer;user-select:none}
.dd > summary::-webkit-details-marker{display:none}

/* button (instância) */
.dd__btn{
  display:flex;align-items:center;gap:10px;
  padding:8px 10px;border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  transition:.15s ease;
  white-space:nowrap;
}
.dd__btn:hover{background:rgba(255,255,255,.06)}
.dd__btn:active{transform:translateY(1px)}

/* icon button (gear) */
.dd__iconBtn{
  width:38px;height:38px;border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  display:flex;align-items:center;justify-content:center;
  font-size:16px;
  transition:.15s ease;
}
.dd__iconBtn:hover{background:rgba(255,255,255,.06)}
.dd__iconBtn:active{transform:translateY(1px)}

.dd__dot{
  width:10px;height:10px;border-radius:50%;
  box-shadow: none;
}
.dd__dot--on{background:#22c55e}
.dd__dot--off{background:#ef4444}
.dd__dotPulse{position:relative}
.dd__dotPulse::after{
  content:"";
  position:absolute; inset:-6px;
  border-radius:999px;
  border:1px solid rgba(34,197,94,.35);
  opacity:0;
  transform:scale(.7);
  animation:pulse 1.6s ease-out infinite;
}
@keyframes pulse{0%{opacity:0;transform:scale(.7)}30%{opacity:.35}100%{opacity:0;transform:scale(1.2)}}

.dd__meta{display:flex;flex-direction:column;line-height:1.05}
.dd__meta b{font-weight:800;font-size:12.5px}
.dd__meta small{font-size:12px;opacity:.70}
.dd__caret{opacity:.7;font-size:12px}

/* menu flutuante */
.dd__menu{
  display:none;
  position:absolute; right:0; top:calc(100% + 10px);
  width:320px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(10,18,28,.98);
  box-shadow: none;
  overflow:hidden;
  z-index:9999;
}
.dd[open] .dd__menu{display:block}

.dd__menuTop{
  padding:12px 14px;
  border-bottom:1px solid rgba(255,255,255,.08);
  display:flex;gap:12px;align-items:center;
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0));
}
.dd__badge{
  width:38px;height:38px;border-radius:12px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  display:flex;align-items:center;justify-content:center;
  font-weight:800;
}
.dd__title{font-weight:900;font-size:13px;line-height:1.15}
.dd__sub{margin-top:2px;font-size:12px;opacity:.75}
.dd__hint{padding:8px 14px 0;font-size:12px;opacity:.70}

.dd__list{max-height:320px;overflow:auto;padding:10px 8px 10px}

.dd__item{
  display:flex;align-items:center;justify-content:space-between;
  padding:10px 10px;margin:4px 0;
  border-radius:12px;
  text-decoration:none;
  border:1px solid transparent;
  transition:.12s ease;
}
.dd__item:hover{background:rgba(255,255,255,.05);border-color:rgba(255,255,255,.08);text-decoration:none}
.dd__item--active{background:rgba(34,197,94,.12);border-color:rgba(34,197,94,.25)}

.dd__itemLeft{display:flex;flex-direction:column;gap:2px}
.dd__name{font-weight:900;font-size:13px}
.dd__phone{font-size:12px;opacity:.75}

.dd__itemRight{display:flex;align-items:center;gap:10px}
.dd__chip{
  font-size:11px;
  padding:3px 9px;border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
}
.dd__check{
  width:18px;height:18px;border-radius:6px;
  background:rgba(34,197,94,.18);
  border:1px solid rgba(34,197,94,.35);
  display:flex;align-items:center;justify-content:center;
  font-size:12px;
}

.dd__dotSmall{width:8px;height:8px;border-radius:50%}
.dd__dotSmall--on{background:#22c55e}
.dd__dotSmall--off{background:#ef4444}

/* ===== Instâncias: tela premium ===== */
.pageHead{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin:8px 0 16px}
.pageHead__title{margin:0;font-size:22px;font-weight:900}
.pageHead__sub{opacity:.75;margin-top:6px}
.pageHead__actions{display:flex;gap:10px;flex-wrap:wrap}

.grid2{display:grid;grid-template-columns:1fr 1.15fr;gap:14px}
@media (max-width: 980px){.grid2{grid-template-columns:1fr}}

.sectionHead{display:flex;flex-direction:column;gap:4px;margin-bottom:12px}
.sectionHead__title{font-weight:900}
.sectionHead__sub{opacity:.72;font-size:12px}

.instTable{display:flex;flex-direction:column;gap:8px}
.instTable__head{display:grid;grid-template-columns:1.2fr .7fr .6fr .5fr;gap:10px;padding:10px 8px;opacity:.7;font-size:12px}
.instRow{display:grid;grid-template-columns:1.2fr .7fr .6fr .5fr;gap:10px;align-items:center;padding:12px 10px;border-radius:14px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.03)}
.instRow--active{border-color:rgba(34,197,94,.25);background:rgba(34,197,94,.08)}
.instRow__title{font-weight:900}
.instRow__meta{opacity:.65;font-size:12px;margin-top:2px}
.instRow__phone{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;opacity:.85}
.instRow__act{text-align:right}

.empty{padding:14px;opacity:.75}

.formBlock{margin-top:14px;padding-top:14px;border-top:1px solid rgba(255,255,255,.08)}
.formBlock__title{font-weight:900;margin-bottom:10px}
.formBlock__title.mais_margem { margin-top: 40px; }
.formGrid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width: 980px){.formGrid{grid-template-columns:1fr}}

.formWebhook{display:grid;grid-template-columns: 1fr;gap:12px}
@media (max-width: 980px){.formWebhook{grid-template-columns:1fr}}

.lbl{display:block;font-size:12px;opacity:.8;margin:0 0 6px}
.help{font-size:12px;opacity:.7;margin-top:6px}
.chk{display:flex;gap:10px;align-items:center;margin-top:10px}
.chk input{transform:translateY(1px)}

.monoBox{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  font-size:12px;opacity:.85;line-height:1.45;
  padding:10px;border:1px solid rgba(255,255,255,.08);border-radius:12px;background:rgba(0,0,0,.18)
}

.pill{display:inline-flex;align-items:center;gap:8px;padding:4px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.04);font-size:12px}
.pill--ok{border-color:rgba(34,197,94,.25);background:rgba(34,197,94,.10)}
.pill--off{border-color:rgba(239,68,68,.25);background:rgba(239,68,68,.10)}
.dot{width:8px;height:8px;border-radius:50%}
.dot--ok{background:#22c55e}
.dot--off{background:#ef4444}

.formActions{display:flex;gap:10px;margin-top:16px;flex-wrap:wrap}

/* botão menor (se seu app.css não tiver) */
.btn--sm{padding:6px 10px;font-size:12px;border-radius:10px}

/* ===== Webhook fields (estilo Z-API) ===== */
.whGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:10px;
}
@media (max-width: 980px){
  .whGrid{grid-template-columns:1fr;}
}
.whItem{
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
}
.whItem__label{
  font-weight:800;
  font-size:12px;
  opacity:.85;
  margin-bottom:8px;
}
.whItem__field{
  display:flex;
  gap:8px;
  align-items:center;
}
.whInput{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:12px;
  opacity:.95;
}
.whCopy{
  white-space:nowrap;
}
.whCopied{
  border-color: rgba(34,197,94,.25) !important;
  background: rgba(34,197,94,.10) !important;
}
/* Kanban: badge de não lidas (elástico) */
.unreadBadge{
  margin-left:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:2px 8px;
  min-width:18px;
  height:18px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}

/* Ajuste: footer do card fica em linha */
.cardLead__footer{
  display:flex;
  align-items:center;
  gap:10px;
}

/* Kanban: pill da instância (apenas quando inst=all) */
.kInstPill{
  display:inline-flex;
  align-items:center;
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  opacity:.92;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
.searchBox{
  display:flex;
  gap:10px;
  align-items:center;
  padding:6px 2px;
}
.searchBox .input{flex:1;}
.kInstMini{opacity:.7;}
/* ===== Kanban — card clicável + drag handle ===== */

/* O card inteiro vira "alvo de click" → navegação pra conversa.
   O cursor de "grab" só aparece em cima do .cardLead__grip. */
.cardLead { cursor: pointer; }
.cardLead:active { cursor: pointer; }

/* Avatar wrapper pra acomodar a estrelinha de favorito sobreposta */
.cardLead__avatar-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 28px;
}
.cardLead__star {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 11px;
  color: #f5b800;
  text-shadow: 0 0 0 #fff, 0 1px 2px rgba(0,0,0,.18);
  -webkit-text-stroke: 1.5px #fff;
  paint-order: stroke fill;
  pointer-events: none;
  line-height: 1;
}

/* Favoritos não ganham border — destaque vem da estrelinha + posição no topo */

/* Meta (badge + timestamp) no topo direito */
.cardLead__meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Grip de drag — discreto, aparece em hover */
.cardLead__grip {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 22px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: rgba(0,0,0,.32);
  opacity: 0;
  transition: opacity .15s ease, color .15s ease;
  border-radius: 6px;
  z-index: 2;
}
.cardLead__grip:hover { color: rgba(0,0,0,.6); background: rgba(0,0,0,.05); }
.cardLead__grip:active { cursor: grabbing; }
.cardLead:hover .cardLead__grip { opacity: 1; }
/* Em mobile sempre visível, opacidade média */
@media (hover: none) { .cardLead__grip { opacity: .55; } }

/* Card levantado */
.cardLead.dragging{
  opacity: .65;
  transform: rotate(-0.4deg) scale(1.01);
  box-shadow: none;
}

/* Coluna destacada ao arrastar sobre */
.column.is-dropover{
  border-color: rgba(34,197,94,.28) !important;
  box-shadow: none;
}

/* Área de dropzone destacada */
.column__body.is-dropover{
  background: rgba(34,197,94,.06);
  border-radius: 14px;
}

/* Placeholder de posição */
.kanban-placeholder{
  height: 66px;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,.18);
  background: rgba(255,255,255,.04);
  margin: 10px 0;
}

/* Suaviza transição (sem travar) */
.cardLead{
  transition: transform .12s ease, opacity .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.cardLead__msg{
  opacity: .85;
}
/* ===== Estilo para Coluna Privada do Kanban ===== */
.column--privada {
  border: 1px dashed rgba(255, 170, 0, 0.4) !important;
  background: linear-gradient(180deg, rgba(255, 170, 0, 0.03) 0%, transparent 100%);
}

.col-private-badge {
  position: absolute;
  top: 7px;
  right: 35px;
  background: rgba(11, 18, 32, 0.95);
  color: #ffaa00;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  z-index: 10;
  box-shadow: none;
  cursor: help;
}

/* =======================================================
   🪄 MODAIS PADRÃO DO SISTEMA (SaaS)
======================================================= */
.etq-hidden { 
    display: none !important; 
}

/* Padrão global: TODO <dialog> nativo recebe blur no backdrop por padrão.
   Regras locais (.clz-modal::backdrop, .inst-modal::backdrop, etc) podem
   sobrescrever a cor, mas o blur fica consistente em todo o CRM. */
dialog::backdrop {
    background: rgba(8,14,12,.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.crm-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9998; /* Z-index altíssimo para cobrir a sidebar do chat */
    backdrop-filter: blur(3px); /* Deixa o chat desfocado no fundo */
}

.crm-modal { 
    display: none; 
    position: fixed; 
    inset: 0; 
    z-index: 9999; 
    align-items: center; 
    justify-content: center; 
    background: transparent; 
    padding: 20px; /* Evita colar nas bordas do celular */
}

.crm-modal.is-open { display: flex !important; }
.crm-modal-backdrop.is-open { display: block !important; }

.crm-modal__card { 
    background: var(--bg); /* Usa a cor de fundo do seu painel */
    padding: 24px; 
    border-radius: var(--radius); 
    width: 100%; 
    max-width: 600px; 
    box-shadow: none; 
    border: 1px solid var(--border);
    animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.crm-modal__head { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
}

.crm-modal__close { 
    background: transparent; 
    border: none; 
    color: var(--muted); 
    font-size: 24px; 
    cursor: pointer; 
    transition: color 0.2s;
}

.crm-modal__close:hover {
    color: var(--danger);
}

.etq-scroll-lock { 
    overflow: hidden; 
}

/* Animação suave ao abrir */
@keyframes modalPop {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* =========================================================
   NOTIFICAÇÕES GLOBAIS (TOAST)
========================================================= */
.global-toast-container {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* mantém toasts alinhados à direita mesmo com larguras diferentes */
    gap: 10px;
    pointer-events: none;
    max-width: calc(100vw - 48px);
}
.global-toast {
    /* Background colorido (variante) + texto branco — destaque alto contra o fundo da página */
    background: #10b981; /* default: verde sucesso */
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .22);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    max-width: 420px;
    border: 1px solid rgba(255,255,255,.18); /* borda sutil para realçar a forma */
    text-shadow: 0 1px 1px rgba(0,0,0,.12);  /* legibilidade extra em qualquer variante */
}
.global-toast.show {
    transform: translateX(0);
    opacity: 1;
}
.global-toast.toast-success { background: #10b981; }  /* verde */
.global-toast.toast-warning { background: #f59e0b; }  /* âmbar */
.global-toast.toast-error   { background: #ef4444; }  /* vermelho */
.global-toast .icon { font-size: 18px; }

/* =======================================================
   TEMA CLEAN / MADENORTE — Manrope + Paleta solicitada
   Paleta base:
   --cor-primaria: #4b2cff;
   --cor-secundaria: #00c7a8;
   --cor-texto-default: #232323;
   --fonte-padrao: 'Manrope';
======================================================= */
:root{
  --cor-primaria:#4b2cff;
  --cor-secundaria:#00c7a8;
  --cor-texto-default:#232323;
  --fonte-padrao:'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --bg:#e9e9e7;
  --card:#ffffff;
  --surface:#ffffff;
  --surface-soft:#f5f6f5;
  --surface-field:#f2f3f3;
  --muted:#6f7772;
  --text:var(--cor-texto-default);
  --accent:var(--cor-primaria);
  --danger:#c2414a;
  --ok:#0f8a58;
  --border:rgba(35,35,35,.10);
  --border-strong:rgba(75,44,255,.22);
  --shadow: none;
  --radius:14px;
  --font:var(--fonte-padrao);
}

*{box-sizing:border-box;}
html,body{min-height:100%;}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font);
  font-size:14px;
  letter-spacing:-.015em;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

a{color:inherit;text-decoration:none;}
a:hover{text-decoration:none;color:var(--cor-primaria);}

/* =======================================================
   Layout principal com sidebar clara, inspirado na referência
======================================================= */
body.app-body{
  padding-left:94px;
  background:var(--bg);
}

body.app-body .topbar{
  position:fixed;
  inset:0 auto 0 0;
  width:94px;
  height:100vh;
  z-index:1000;
  background:#ededec;
  border:0;
  border-right:1px solid rgba(35,35,35,.06);
  box-shadow: none;
  backdrop-filter:none;
}

body.app-body .topbar__inner{
  width:100%;
  height:100%;
  padding:16px 10px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:18px;
}

body.app-body .brand{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}

body.app-body .brand a{
  width:58px;
  height:58px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:#ffffff;
  border:1px solid rgba(75,44,255,.12);
  box-shadow: none;
  overflow:hidden;
}

body.app-body .brand img{
  width:100% !important;
  height:100% !important;
  max-width:100% !important;
  max-height:100% !important;
  object-fit:contain !important;
  border-radius:10px !important;
  display:block;
}

body.app-body .nav{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:6px;
}

body.app-body .nav a{
  min-height:58px;
  padding:8px 4px;
  border-radius:0;
  color:#979d99;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  font-size:8px;
  line-height:1.1;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  border-left:3px solid transparent;
  transition:background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
  text-align:center;
}

body.app-body .nav a::before{
  content:attr(data-icon);
  width:24px;
  height:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:17px;
  line-height:1;
  color:currentColor;
  opacity:.82;
}

body.app-body .nav a:hover,
body.app-body .nav a.is-active{
  background:#ffffff;
  color:var(--cor-primaria);
  border-left-color:var(--cor-primaria);
  box-shadow: none;
}

body.app-body .topbar__right{
  width:100%;
  margin-top:auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}

body.app-body .user{
  width:100%;
  flex-direction:column;
  gap:7px;
}

body.app-body .user__name{
  display:none;
}

body.app-body .user .btn{
  width:64px;
  min-height:38px;
  padding:8px 6px;
  font-size:9px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}

body.app-body .container{
  width:auto;
  min-height:calc(100vh - 32px);
  margin: 0;
  padding: 24px 28px;
  background:var(--surface);
  box-shadow: none;
}

/* Header horizontal apenas para telas sem usuário logado */
body.auth-body{
  min-height:100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(0,199,168,.16), transparent 28%),
    radial-gradient(circle at 80% 5%, rgba(75,44,255,.10), transparent 30%),
    var(--bg);
}

body.auth-body .topbar{
  position:relative;
  background:rgba(255,255,255,.84);
  border-bottom:1px solid var(--border);
  box-shadow: none;
  backdrop-filter:blur(16px);
}

body.auth-body .topbar__inner{
  width:min(1120px, calc(100vw - 32px));
  margin:0 auto;
  padding:16px 0;
}

body.auth-body .brand img{
  max-height:42px !important;
  filter:none;
}

body.auth-body .container{
  width:min(1120px, calc(100vw - 32px));
  min-height:auto;
  margin:0 auto;
  padding:42px 0;
}

/* =======================================================
   Tipografia, cabeçalhos e componentes gerais
======================================================= */
.h1,.pageHead__title{
  color:var(--text);
  font-size:24px;
  line-height:1.15;
  font-weight:900;
  letter-spacing:-.045em;
  margin:0 0 14px;
}
/*.h1::after,.pageHead__title::after{
  content:'.';
  color:var(--cor-primaria);
}*/
/* Ícone padronizado nos títulos de página — discreto, não rouba a cena */
.h1 > i, .pageHead__title > i {
  font-size: 14px;
  vertical-align: middle;
  margin-right: 9px;
  opacity: .92;
  position: relative;
  top: -2px;
}
.h2,.sectionHead__title{
  color:var(--text);
  font-weight:850;
  letter-spacing:-.03em;
}
.small,.pageHead__sub,.sectionHead__sub,.help{
  color:var(--muted);
}

.row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:center;
}

.card,
.chat,
.column,
.whItem,
.instRow,
.monoBox{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  color:var(--text);
  box-shadow: none;
}
.card__body{padding:18px;}

.field{gap:7px;margin-bottom:14px;}
.field label,.lbl{
  color:var(--text);
  font-size:12px;
  font-weight:750;
}

.input,.textarea,select,.whInput{
  width:100%;
  min-height:43px;
  background:var(--surface-field);
  color:var(--text);
  border:1px solid rgba(35,35,35,.08);
  border-radius:4px;
  padding:11px 13px;
  outline:none;
  font-family:var(--font);
  font-size:14px;
  transition:border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.textarea{min-height:96px;resize:vertical;}
.input:focus,.textarea:focus,select:focus,.whInput:focus{
  background:#ffffff;
  border-color:rgba(75,44,255,.36);
  box-shadow: none;
}
.input::placeholder,.textarea::placeholder{color:#8a918d;}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:11px 18px;
  min-height:42px;
  border-radius:10px;
  border:1px solid var(--cor-primaria);
  background:var(--cor-primaria);
  color:#ffffff;
  cursor:pointer;
  font-size:13px;
  font-weight:850;
  font-family:var(--font);
  box-shadow: none;
  transition:background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.btn:hover{
  background:#07482d;
  color:#ffffff;
  text-decoration:none;
  transform:translateY(-1px);
  box-shadow: none;
}
.btn--ghost{
  background:#ffffff;
  color:var(--cor-primaria);
  border-color:rgba(75,44,255,.18);
  box-shadow: none;
}
.btn--ghost:hover{
  background:rgba(0,199,168,.10);
  color:var(--cor-primaria);
  border-color:rgba(75,44,255,.26);
  box-shadow: none;
}
.btn--danger{
  background:rgba(194,65,74,.10);
  color:var(--danger);
  border-color:rgba(194,65,74,.22);
  box-shadow: none;
}
.btn--danger:hover{background:rgba(194,65,74,.16);color:var(--danger);}
.btn--sm{min-height:34px;padding:7px 11px;border-radius:8px;font-size:12px;}

.alert{
  color:var(--text);
  background:#ffffff;
  border:1px solid var(--border);
  box-shadow: none;
}
.alert--ok{border-color:rgba(75,44,255,.26);background:rgba(0,199,168,.10);}
.alert--err{border-color:rgba(194,65,74,.26);background:rgba(194,65,74,.08);}

.table{background:#ffffff;border-radius:var(--radius);overflow:hidden;}
.table th,.table td{
  border-bottom:1px solid rgba(35,35,35,.08);
  color:var(--text);
}
.table th{
  color:var(--muted);
  background:#f7f8f7;
  font-weight:850;
}

/* =======================================================
   Dropdowns, topbar actions e menus
======================================================= */
.dd{position:relative;display:inline-block;}
.dd > summary{list-style:none;cursor:pointer;user-select:none;}
.dd > summary::-webkit-details-marker{display:none;}

.dd__btn,
.dd__iconBtn,
.instPill{
  border:1px solid rgba(75,44,255,.14);
  background:#ffffff;
  color:var(--text);
  box-shadow: none;
}
.dd__btn:hover,.dd__iconBtn:hover,.instPill:hover{background:rgba(0,199,168,.10);}
.dd__iconBtn{font-size:15px;}

body.app-body .dd__iconBtn{
  width:46px;
  height:42px;
  border-radius:10px;
  box-shadow: none;
}
body.app-body .dd__btn{
  width:64px;
  min-height:50px;
  flex-direction:column;
  justify-content:center;
  padding:7px 4px;
  gap:4px;
  border-radius:10px;
  box-shadow: none;
}
body.app-body .dd__meta b{
  max-width:54px;
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:9px;
  text-align:center;
}
body.app-body .dd__meta small,
body.app-body .dd__caret{display:none;}

.dd__dot{box-shadow: none;}
.dd__dot--on,.dd__dotSmall--on,.dot--ok,.instDot--on{background:var(--cor-secundaria);}
.dd__dot--off,.dd__dotSmall--off,.dot--off,.instDot--off{background:#c94c52;}
.dd__dotPulse::after,.instDotPulse::after{border-color:rgba(0,199,168,.45);}

.dd__menu,.instMenu,.msgMore__menu{
  background:#ffffff;
  color:var(--text);
  border:1px solid rgba(35,35,35,.10);
  box-shadow: none;
}
body.app-body .dd__menu{
  left:78px;
  right:auto;
  bottom:0;
  top:auto;
  width:320px;
}
body.app-body .dd--search .dd__menu,
body.app-body .dd--cfg .dd__menu{
  bottom:0;
}
.dd__menuTop,.instMenu__top{
  border-bottom:1px solid rgba(35,35,35,.08);
  background:linear-gradient(180deg, rgba(0,199,168,.12), rgba(255,255,255,0));
}
.dd__badge,.instMenu__badge{
  background:rgba(0,199,168,.12);
  border-color:rgba(75,44,255,.12);
  color:var(--cor-primaria);
}
.dd__title,.dd__name,.instName{color:var(--text);}
.dd__sub,.dd__hint,.dd__phone,.instPhone{color:var(--muted);opacity:1;}
.dd__item,.instItem{color:var(--text);}
.dd__item:hover,.instItem:hover{
  background:#f5f7f4;
  border-color:rgba(75,44,255,.12);
}
.dd__item--active,.instItem--active{
  background:rgba(0,199,168,.14);
  border-color:rgba(75,44,255,.20);
}
.dd__chip,.instChip,.pill,.kInstPill,.unreadBadge{
  background:#f2f5f0;
  border-color:rgba(75,44,255,.14);
  color:var(--cor-primaria);
}
.dd__check,.instCheck{
  background:rgba(0,199,168,.18);
  border-color:rgba(75,44,255,.24);
  color:var(--cor-primaria);
}

/* =======================================================
   Kanban e cards
======================================================= */
.kanban{
  gap:16px;
  padding:4px 28px 16px 2px;
  margin-top: 0px;
  margin-right: -28px; /* estoura o padding direito do .container pra última coluna ir até a borda */
  position: relative;
}
/* Glassmorphism fade na borda direita — sinaliza que há mais conteúdo scrollável.
   O mask-image faz o backdrop-filter "respirar" gradualmente em vez de bater numa
   linha dura na borda esquerda do elemento. */
.kanban::after{
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  width: 110px;
  height: 100vh;
  background: linear-gradient(
    to right,
    rgba(248,249,248,0)   0%,
    rgba(248,249,248,.08) 30%,
    rgba(248,249,248,.40) 65%,
    rgba(248,249,248,.78) 100%
  );
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(
    to right,
    rgba(0,0,0,0)   0%,
    rgba(0,0,0,.15) 25%,
    rgba(0,0,0,.55) 60%,
    rgba(0,0,0,1)   100%
  );
  mask-image: linear-gradient(
    to right,
    rgba(0,0,0,0)   0%,
    rgba(0,0,0,.15) 25%,
    rgba(0,0,0,.55) 60%,
    rgba(0,0,0,1)   100%
  );
  pointer-events: none;
  z-index: 5;
}
.column{
  background:#f8f9f8;
  border-color:rgba(35,35,35,.08);
  box-shadow: none;
}
.column__head{
  border-bottom:1px solid rgba(35,35,35,.08);
  padding:13px 14px;
}
.column__title{font-size:13px;font-weight:900;color:var(--text);display:inline-flex;align-items:center;gap:6px;}
.column__wa{color:#25D366;font-size:13px;flex:0 0 auto;}
.column__count{color:var(--muted);font-weight:700;}
.column__body{padding:12px;}
.cardLead{
  --lead-bg:#ffffff;
  background:var(--lead-bg);
  border:0;
  border-radius:12px;
  padding:13px;
  box-shadow: none;
}
.cardLead:hover{box-shadow: none;}
.cardLead--unread{
  --lead-bg:rgba(0,199,168,.10);
  box-shadow: none;
}
.cardLead--unread::after{background:var(--cor-secundaria);box-shadow: none;}
.cardLead__name{color:var(--text);font-weight:900;}
.cardLead__time,.cardLead__msg,.cardLead small .ja_lidas{color:var(--muted);}
.cardLead small a,.msgLink{color:var(--cor-primaria);font-weight:800;}
.avatar{
  border-color:rgba(75,44,255,.14);
  background:rgba(0,199,168,.12);
  color:var(--cor-primaria);
}
.dropzone--over,
.column.is-dropover{
  outline-color:rgba(0,199,168,.55);
  box-shadow: none;
}
.column__body.is-dropover{background:rgba(0,199,168,.08);}
.kanban-placeholder{
  border-color:rgba(75,44,255,.22);
  background:rgba(0,199,168,.10);
}
.column--privada{
  border-color:rgba(0,199,168,.35) !important;
  background:linear-gradient(180deg, rgba(0,199,168,.09), #f8f9f8 45%);
}
.col-private-badge{
  background:#ffffff;
  color:var(--cor-primaria);
  box-shadow: none;
}

/* =======================================================
   Chat e mensagens
======================================================= */
.chat{
  background:#ffffff;
  border-color:rgba(35,35,35,.08);
  box-shadow: none;
}
.chat__head,.chat__composer{border-color:rgba(35,35,35,.08);}
.chat__body{background:#fbfcfb;}
.bubble{
  color:var(--text);
  border:0;
  box-shadow: none;
}
/* Recebida do contato — branco com borda discreta cinza */
.bubble--in{
  background:#ffffff;
  border:1px solid rgba(35,35,35,.08);
  align-self:flex-start;
}
/* Enviada por nós — verde da marca, sem border */
.bubble--out{
  background:rgba(0,199,168,.22);
  align-self:flex-end;
}
.bubble__meta,.bubble__sender{color:var(--muted);}
.msgMore__btn{
  background:rgba(75,44,255,.08);
  color:var(--cor-primaria);
}
.msgMore__menu a{color:var(--text);}
.msgMore__menu a:hover{background:#f5f7f4;}
.audioP{
  border-color:rgba(35,35,35,.10);
  background:#f5f6f5;
}
.audioP__btn{
  border-color:rgba(75,44,255,.14);
  background:#ffffff;
  color:var(--cor-primaria);
}
.audioP__seek{accent-color:var(--cor-primaria);}
.audioP__meta{color:var(--muted);}
.audioP__dl{color:var(--cor-primaria);}

/* =======================================================
   Modais, lightbox e notificações
======================================================= */
.crm-modal-backdrop{background:rgba(35,35,35,.38);backdrop-filter:blur(4px);}
.crm-modal__card{
  background:#ffffff;
  color:var(--text);
  border:1px solid rgba(35,35,35,.10);
  box-shadow: none;
}
.crm-modal__close{color:var(--muted);}
.crm-modal__close:hover{color:var(--danger);}
.lb__backdrop{background:rgba(35,35,35,.70);}
.lb__img{border-color:rgba(255,255,255,.20);background:#ffffff;}
.lb__close{
  background:#ffffff;
  color:var(--text);
  border-color:rgba(35,35,35,.12);
}
/* Toast no tema claro: mantém background colorido (de .toast-success/warning/error)
   com texto branco e sem border-left. */
.global-toast{
  color:#ffffff;
  border:1px solid rgba(255,255,255,.18);
  box-shadow: none;
}

/* =======================================================
   Login clean
======================================================= */
.loginShell{
  min-height:calc(100vh - 150px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px 0 44px;
}
.loginCard{
  width:min(100%, 520px);
  margin:0 auto !important;
  border:1px solid rgba(75,44,255,.10);
  box-shadow: none;
}
.loginCard .card__body{padding:30px;}
.loginEyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--cor-primaria);
  background:rgba(0,199,168,.12);
  border:1px solid rgba(75,44,255,.12);
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:850;
  margin-bottom:14px;
}
.loginCard .h1{font-size:28px;margin-bottom:8px;}
.loginCard .small{font-size:14px;line-height:1.5;margin:0 0 22px;}
.loginCard .btn{width:100%;min-height:48px;font-size:14px;}
.loginRemember{
  display:flex !important;
  flex-direction:row !important;
  gap:10px !important;
  align-items:center !important;
  color:var(--muted);
}
.loginRemember input{accent-color:var(--cor-primaria);}
.loginRemember label{font-size:13px;color:var(--muted);font-weight:700;}

/* =======================================================
   Responsivo
======================================================= */
@media (max-width: 980px){
  body.app-body{padding-left:0;padding-top:76px;}
  body.app-body .topbar{
    width:100%;
    height:76px;
    inset:0 0 auto 0;
    background:rgba(255,255,255,.94);
    border-right:0;
    border-bottom:1px solid var(--border);
    box-shadow: none;
  }
  body.app-body .topbar__inner{
    flex-direction:row;
    padding:10px 12px;
    gap:10px;
    justify-content:space-between;
  }
  body.app-body .brand{width:auto;}
  body.app-body .brand a{width:48px;height:48px;}
  body.app-body .nav{
    width:auto;
    flex-direction:row;
    overflow:auto;
    flex:1;
    gap:4px;
  }
  body.app-body .nav a{
    min-width:68px;
    min-height:48px;
    border-left:0;
    border-bottom:3px solid transparent;
    font-size:8px;
  }
  body.app-body .nav a:hover,
  body.app-body .nav a.is-active{border-left-color:transparent;border-bottom-color:var(--cor-primaria);}
  body.app-body .topbar__right{
    width:auto;
    margin-top:0;
    flex-direction:row;
    gap:6px;
  }
  body.app-body .dd__btn{width:48px;min-height:48px;}
  body.app-body .dd__meta{display:none;}
  body.app-body .dd__iconBtn{width:44px;height:44px;}
  body.app-body .user{width:auto;}
  body.app-body .user .btn{width:44px;min-height:44px;font-size:0;}
  body.app-body .user .btn::before{content:'Sair';font-size:9px;}
  body.app-body .container{
    margin:12px;
    border-radius:14px;
    min-height:calc(100vh - 100px);
    padding:22px 16px 34px;
  }
  body.app-body .dd__menu{left:auto;right:0;top:calc(100% + 10px);bottom:auto;width:min(320px, calc(100vw - 24px));}
}

@media (max-width: 640px){
  body.app-body .nav a{min-width:58px;}
  body.app-body .nav a::before{font-size:15px;}
  .h1,.pageHead__title{font-size:22px;}
  .loginCard .card__body{padding:22px;}
}
