/* Prévia do sistema mostrada na página do plano (cópia da interface do YEJ Chat com dados fictícios). */

  :root{
    --bg-sidebar:#0b0c0d;
    --bg-sidebar-hover:#1a1c1e;
    --green-1:#3fcf63;
    --green-2:#22a349;
    --green-dark:#15803d;
    --red:#e5484d;
    --chat-bg:#e9ded0;
    --panel-bg:#ffffff;
    --panel-border:#e7e5e2;
    --text-dark:#1b1d1f;
    --text-muted:#7c8085;
    --bubble-out:#d9fdd3;
    --bubble-in:#ffffff;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  }
  *{box-sizing:border-box; margin:0; padding:0;}
  html,body{height:100%;}
  body{
    font-family:var(--font);
    background:#f4f2ee;
    color:var(--text-dark);
    -webkit-font-smoothing:antialiased;
  }
  .app{
    display:flex;
    height:100vh;
    width:100%;
    overflow:hidden;
  }

  /* ===== SIDEBAR ===== */
  .sidebar{
    width:15%;
    min-width:168px;
    max-width:210px;
    flex-shrink:0;
    background:var(--bg-sidebar);
    display:flex;
    flex-direction:column;
    padding:22px 12px;
    transition:width .2s ease, min-width .2s ease, max-width .2s ease, padding .2s ease;
    overflow:hidden;
  }
  .sidebar.collapsed{
    width:68px;
    min-width:68px;
    max-width:68px;
    padding:22px 10px;
  }

  .sidebar-toggle{
    display:flex;
    align-items:center;
    justify-content:center;
    width:30px;
    height:30px;
    border-radius:8px;
    background:var(--bg-sidebar-hover);
    border:none;
    color:#fff;
    cursor:pointer;
    margin-bottom:18px;
    flex-shrink:0;
  }
  .sidebar-toggle:hover{background:#242628;}
  .sidebar-toggle svg{width:16px; height:16px;}
  .sidebar.collapsed .sidebar-toggle{margin-left:auto; margin-right:auto;}
  .brand{
    display:flex;
    align-items:center;
    gap:10px;
    padding:6px 8px 26px 8px;
  }
  .brand img{
    width:38px;
    height:38px;
    object-fit:contain;
    display:block;
  }
  .brand-text{
    display:flex;
    flex-direction:column;
    line-height:1.1;
  }
  .brand-text .b1{
    font-weight:700;
    font-size:13.5px;
    color:#fff;
    letter-spacing:-0.01em;
  }
  .brand-text .b2{
    font-size:9.5px;
    color:var(--green-1);
    font-weight:600;
    letter-spacing:.03em;
    text-transform:uppercase;
  }
  .sidebar.collapsed .brand{justify-content:center; padding:6px 0 22px 0;}
  .sidebar.collapsed .brand-text{display:none;}

  nav{
    display:flex;
    flex-direction:column;
    gap:4px;
    margin-top:6px;
  }
  .nav-item{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 11px;
    border-radius:10px;
    color:#a8adb3;
    font-size:12.5px;
    font-weight:500;
    cursor:pointer;
    border:none;
    background:transparent;
    text-align:left;
    width:100%;
    transition:background .15s ease, color .15s ease;
    position:relative;
  }
  .nav-item svg{
    width:17px;
    height:17px;
    flex-shrink:0;
    opacity:.85;
  }
  .nav-item:hover{
    background:var(--bg-sidebar-hover);
    color:#fff;
  }
  .nav-item.active{
    background:linear-gradient(135deg, var(--green-1), var(--green-dark));
    color:#04140a;
    font-weight:600;
    box-shadow:0 4px 14px -4px rgba(63,207,99,.55);
  }
  .nav-item.active svg{opacity:1;}
  .nav-badge{
    margin-left:auto;
    background:var(--red);
    color:#fff;
    font-size:9.5px;
    font-weight:700;
    padding:1px 5px;
    border-radius:20px;
    min-width:16px;
    text-align:center;
  }
  .nav-item.active .nav-badge{
    background:#04140a;
    color:var(--green-1);
  }

  .sidebar.collapsed .nav-item{
    justify-content:center;
    padding:11px 0;
    gap:0;
  }
  .sidebar.collapsed .nav-label{display:none;}
  .sidebar.collapsed .nav-badge{
    position:absolute;
    top:6px;
    right:14px;
    min-width:8px;
    width:8px;
    height:8px;
    padding:0;
    font-size:0;
    border-radius:50%;
  }

  .sidebar-footer{
    display:flex;
    align-items:center;
    gap:10px;
    padding:12px;
    border-radius:10px;
    background:var(--bg-sidebar-hover);
  }
  .avatar-sm{
    width:32px;height:32px;border-radius:50%;
    background:linear-gradient(135deg,var(--green-1),var(--green-dark));
    display:flex;align-items:center;justify-content:center;
    font-size:12px;font-weight:700;color:#04140a;
    flex-shrink:0;
  }
  .sidebar-footer .who{
    line-height:1.15;
    border:none;
    background:transparent;
    padding:0;
    margin:0;
    display:block;
    text-align:left;
    cursor:pointer;
    font-family:var(--font);
    flex:1;
    min-width:0;
  }
  .sidebar-footer .who:hover .name{color:var(--green-1);}
  .sidebar-footer .who .name{font-size:11.5px;color:#fff;font-weight:600; transition:color .15s ease;}
  .sidebar-footer .who .status{font-size:9.5px;color:var(--green-1); display:flex; align-items:center; gap:5px;}
  .dot-online{width:6px;height:6px;border-radius:50%;background:var(--green-1);display:inline-block;}

  /* ===== Sininho de notificações (acima do bloco do atendente) ===== */
  .sidebar-notif-btn{
    margin-top:auto;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding:10px 11px;
    border-radius:10px;
    color:#a8adb3;
    font-size:12.5px;
    font-weight:500;
    cursor:pointer;
    border:none;
    background:transparent;
    text-align:left;
    width:100%;
    font-family:var(--font);
    transition:background .15s ease, color .15s ease;
    position:relative;
  }
  .sidebar-notif-btn:hover{background:var(--bg-sidebar-hover); color:#fff;}
  .sidebar-notif-btn svg{width:17px; height:17px; flex-shrink:0; opacity:.85;}
  .sidebar-notif-btn .nav-badge{margin-left:0;}
  .sidebar.collapsed .sidebar-notif-btn{justify-content:center; padding:11px 0;}
  .sidebar.collapsed .sidebar-notif-btn .nav-badge{
    position:absolute; top:6px; right:14px;
    min-width:8px; width:8px; height:8px;
    padding:0; font-size:0; border-radius:50%;
  }

  .sidebar.collapsed .sidebar-footer{
    justify-content:center;
    padding:8px;
    gap:0;
  }
  .sidebar.collapsed .sidebar-footer .who{display:none;}

  /* ===== MAIN AREA ===== */
  .main{
    flex:1;
    display:flex;
    min-width:0;
  }

  /* placeholder views for other nav items */
  .placeholder-view{
    flex:1;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:10px;
    color:var(--text-muted);
    background:#fbfaf8;
  }
  .contatos-page-view{
    flex:1; min-width:0; display:flex; flex-direction:column; overflow:hidden; background:#fbfaf8;
  }
  .contatos-page-scroll{flex:1; overflow-y:auto; padding:28px 32px;}
  .placeholder-view .ph-icon{
    width:56px;height:56px;
    border-radius:16px;
    background:#eef1ee;
    display:flex;align-items:center;justify-content:center;
    color:var(--green-dark);
    margin-bottom:6px;
  }
  .placeholder-view h2{font-size:17px; color:var(--text-dark); font-weight:600;}
  .placeholder-view p{font-size:13px; max-width:280px; text-align:center;}

  /* ===== CONFIGURAÇÕES (abas laterais) ===== */
  .config-view{
    flex:1;
    display:flex;
    min-width:0;
    background:#fbfaf8;
  }
  .config-subnav{
    width:210px;
    flex-shrink:0;
    background:var(--panel-bg);
    border-right:1px solid var(--panel-border);
    padding:18px 10px;
    overflow-y:auto;
  }
  .config-subnav-item{
    display:flex; align-items:center; gap:10px;
    padding:10px 11px;
    border-radius:8px;
    font-size:13px; font-weight:600;
    color:var(--text-muted);
    cursor:pointer;
    margin-bottom:2px;
    background:none; border:none;
    width:100%; text-align:left;
    font-family:var(--font);
  }
  .config-subnav-item svg{width:16px;height:16px; flex-shrink:0;}
  .config-subnav-item:hover{background:#f0efec; color:var(--text-dark);}
  .config-subnav-item.active{background:#eef8f0; color:var(--green-dark);}
  .config-content{
    flex:1;
    min-width:0;
    overflow-y:auto;
    padding:28px 32px;
  }
  .config-placeholder{
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:6px;
    padding:70px 20px;
    text-align:center;
    color:var(--text-muted);
  }
  .config-placeholder h2{font-size:16px; color:var(--text-dark); font-weight:600; margin-top:4px;}
  .config-placeholder p{font-size:13px; max-width:320px;}

  /* ===== DASHBOARD: Visão Geral ===== */
  .dash-header{display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:22px; flex-wrap:wrap; gap:14px;}
  .dash-header h2{font-size:18px; font-weight:700; color:var(--text-dark);}
  .dash-header p{font-size:12.5px; color:var(--text-muted); margin-top:3px;}
  .dash-period-group{display:flex; gap:3px; background:#f0efec; padding:3px; border-radius:10px; flex-shrink:0;}
  .dash-period-btn{
    border:none; background:none; font-family:var(--font);
    font-size:12px; font-weight:700; color:var(--text-muted);
    padding:7px 14px; border-radius:8px; cursor:pointer;
  }
  .dash-period-btn.active{background:#fff; color:var(--text-dark); box-shadow:0 1px 3px rgba(0,0,0,.14);}
  .dash-header-controls{display:flex; align-items:center; gap:10px; flex-shrink:0; flex-wrap:wrap; justify-content:flex-end;}
  .dash-month-select{
    background:#f0efec; border:none; border-radius:10px;
    padding:9px 12px; font-size:12px; font-weight:700; font-family:var(--font);
    color:var(--text-dark); cursor:pointer; outline:none;
  }
  .dash-metas-btn{
    display:flex; align-items:center; gap:6px;
    background:#fff; border:1px solid var(--panel-border); border-radius:10px;
    padding:8px 13px; font-size:12px; font-weight:700; color:var(--text-dark);
    cursor:pointer; font-family:var(--font); flex-shrink:0;
  }
  .dash-metas-btn:hover{background:#f0efec;}
  .dash-metas-btn svg{width:14px; height:14px; color:var(--green-dark);}

  .dash-live-indicator{
    display:flex; align-items:center; gap:7px;
    background:#eafaf0; border:1px solid #cdeedb; border-radius:20px;
    padding:8px 14px; font-size:11.5px; font-weight:700; color:var(--green-dark);
    flex-shrink:0;
  }
  .dash-live-dot{
    width:7px; height:7px; border-radius:50%; background:#1f9d55; flex-shrink:0;
    animation:dashLivePulse 1.8s ease-in-out infinite;
  }
  @keyframes dashLivePulse{
    0%{ box-shadow:0 0 0 0 rgba(31,157,85,.45); }
    70%{ box-shadow:0 0 0 6px rgba(31,157,85,0); }
    100%{ box-shadow:0 0 0 0 rgba(31,157,85,0); }
  }
  .dash-refresh-btn{
    width:34px; height:34px; flex-shrink:0; border-radius:10px;
    display:flex; align-items:center; justify-content:center;
    background:#fff; border:1px solid var(--panel-border); color:var(--text-dark);
    cursor:pointer;
  }
  .dash-refresh-btn:hover{background:#f0efec;}
  .dash-refresh-btn svg{width:15px; height:15px;}
  .dash-refresh-btn.spinning svg{animation:dashRefreshSpin .6s linear;}
  @keyframes dashRefreshSpin{ from{transform:rotate(0deg);} to{transform:rotate(360deg);} }
  .metas-modal-intro{font-size:12.5px; color:var(--text-muted); line-height:1.5; margin-bottom:16px;}
  .metas-config-card{
    background:#fff; border:1px solid var(--panel-border); border-radius:14px;
    padding:24px 26px; max-width:480px;
  }
  .metas-config-card .btn-add-numero{margin-top:4px;}

  /* ===== CHATBOT: fluxos de automação ===== */
  .fluxo-card-icon{background:#ede9fe; color:#6d28d9;}
  .fluxo-card-desc{font-size:11.5px; color:var(--text-muted); margin-top:2px; display:flex; align-items:center; gap:8px; flex-wrap:wrap;}
  .fluxo-status-badge{font-size:9.5px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; padding:2px 8px; border-radius:20px;}
  .fluxo-status-badge.ativo{background:#eafaf0; color:var(--green-dark);}
  .fluxo-status-badge.inativo{background:#f0efec; color:var(--text-muted);}
  .fluxo-passos-count{font-size:10.5px; color:var(--text-muted); font-weight:600;}

  .transfer-modal.fluxo-modal{width:800px; height:86vh; max-height:86vh;}
  .fluxo-modal-scroll{flex:1; overflow-y:auto; padding:20px 26px;}
  .fluxo-config-row{display:flex; gap:14px; margin-bottom:16px;}
  .fluxo-status-row{
    display:flex; align-items:center; justify-content:space-between;
    background:#f7f6f3; border:1px solid var(--panel-border); border-radius:10px;
    padding:11px 14px; margin-bottom:20px; font-size:12.5px; font-weight:700; color:var(--text-dark);
  }

  .fluxo-passo-card{
    background:#f7f6f3; border:1px solid var(--panel-border); border-radius:12px;
    padding:14px 16px; margin-bottom:12px;
  }
  .fluxo-passo-header{display:flex; align-items:center; gap:10px; margin-bottom:12px;}
  .fluxo-passo-numero{
    width:24px; height:24px; border-radius:50%; background:var(--green-1); color:#fff;
    display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; flex-shrink:0;
  }
  .fluxo-passo-tipo-select{flex:1; min-width:0;}
  .fluxo-passo-actions{display:flex; gap:4px; flex-shrink:0;}
  .fluxo-passo-btn{
    width:26px; height:26px; border-radius:7px; display:flex; align-items:center; justify-content:center;
    background:none; border:1px solid var(--panel-border); color:var(--text-muted); cursor:pointer;
  }
  .fluxo-passo-btn:hover{background:#fff; color:var(--text-dark);}
  .fluxo-passo-btn.danger:hover{background:#fee2e2; color:#dc2626; border-color:#fecaca;}
  .fluxo-passo-btn svg{width:12px; height:12px;}
  .fluxo-passo-btn:disabled{opacity:.35; cursor:not-allowed;}
  .fluxo-passo-body textarea{
    width:100%; box-sizing:border-box; font-family:var(--font); font-size:12.5px;
    border:1px solid var(--panel-border); border-radius:8px; padding:9px 11px;
    resize:vertical; min-height:56px; outline:none;
  }
  .fluxo-passo-body .register-input{margin-bottom:0;}
  .fluxo-passo-field{margin-bottom:9px;}
  .fluxo-passo-field label{display:block; font-size:10.5px; font-weight:700; color:var(--text-muted); margin-bottom:5px;}
  .fluxo-passo-field-row{display:flex; gap:10px;}
  .fluxo-passo-field-row .fluxo-passo-field{flex:1;}

  .fluxo-menu-opcao-row{
    display:flex; align-items:center; gap:8px;
    background:#fff; border:1px solid var(--panel-border); border-radius:9px;
    padding:8px 10px; margin-bottom:7px;
  }
  .fluxo-menu-opcao-numero{
    width:20px; height:20px; border-radius:6px; background:#ede9fe; color:#6d28d9;
    display:flex; align-items:center; justify-content:center; font-size:10.5px; font-weight:700; flex-shrink:0;
  }
  .fluxo-menu-opcao-row input[type="text"]{flex:1.3; min-width:0;}
  .fluxo-menu-opcao-row select{flex:1; min-width:0;}
  .fluxo-menu-opcao-row .fluxo-menu-opcao-valor{flex:1; min-width:0;}
  .fluxo-menu-opcao-remove{
    width:24px; height:24px; border-radius:6px; flex-shrink:0;
    display:flex; align-items:center; justify-content:center;
    background:none; border:none; color:var(--text-muted); cursor:pointer;
  }
  .fluxo-menu-opcao-remove:hover{background:#fee2e2; color:#dc2626;}
  .fluxo-menu-opcao-remove svg{width:12px; height:12px;}
  .fluxo-add-opcao-btn{
    background:none; border:1px dashed var(--panel-border); border-radius:8px;
    padding:7px 12px; font-size:11px; font-weight:700; color:var(--text-muted);
    cursor:pointer; font-family:var(--font); width:100%;
  }
  .fluxo-add-opcao-btn:hover{background:#fff; color:var(--text-dark);}
  .fluxo-menu-opcao-wrap{margin-bottom:7px;}
  .fluxo-submenu-box{
    margin:6px 0 10px 20px; padding:10px 12px 4px 12px;
    border-left:2px solid #ddd6fe; background:#faf9ff; border-radius:0 8px 8px 0;
  }
  .fluxo-wpp-preview{
    background:#e5ded6; border-radius:10px; padding:12px; display:flex; flex-direction:column; align-items:flex-start; gap:6px;
  }
  .fluxo-wpp-bubble{
    background:#fff; border-radius:8px; padding:9px 11px; font-size:12.5px; color:#1f2a1f;
    max-width:85%; box-shadow:0 1px 1px rgba(0,0,0,.08); line-height:1.4;
  }
  .fluxo-wpp-list-btn{
    background:#fff; border:none; border-top:1px solid #ececec; border-radius:0 0 8px 8px;
    padding:9px 11px; font-size:12.5px; font-weight:700; color:#00a5f4; cursor:pointer; font-family:var(--font);
    width:85%; text-align:center; margin-top:-6px;
  }
  .fluxo-wpp-opcoes-list{
    background:#fff; border-radius:8px; padding:6px; width:85%; box-shadow:0 1px 1px rgba(0,0,0,.08);
  }
  .fluxo-wpp-opcao{padding:8px 9px; font-size:12px; color:var(--text-dark); border-bottom:1px solid #f2f0ec;}
  .fluxo-wpp-opcao:last-child{border-bottom:none;}
  .fluxo-wpp-bubble-cliente{
    background:#dcf8c6; border-radius:8px; padding:9px 11px; font-size:12px; color:#1f2a1f; align-self:flex-end;
  }

  /* ===== DASHBOARD: QUALIDADE ===== */
  .qual-bar-row{display:flex; align-items:center; gap:10px; padding:8px 2px;}
  .qual-bar-label{width:110px; flex-shrink:0; font-size:12px; font-weight:700; color:var(--text-dark);}
  .qual-bar-track{flex:1; height:12px; background:#f0efec; border-radius:6px; overflow:hidden;}
  .qual-bar-fill{height:100%; border-radius:6px;}
  .qual-bar-value{width:56px; flex-shrink:0; text-align:right; font-size:12px; font-weight:700; color:var(--text-dark);}

  /* ===== DASHBOARD: CHATBOT ===== */
  .cb-flow-row{display:flex; align-items:center; gap:10px; padding:11px 4px; border-bottom:1px solid #f2f0ec;}
  .cb-flow-row:last-child{border-bottom:none;}
  .cb-flow-row-header{border-bottom:1px solid var(--panel-border); padding-bottom:9px;}
  .cb-flow-row-header span{font-size:9.5px; text-transform:uppercase; letter-spacing:.04em; font-weight:700; color:var(--text-muted);}
  .cb-flow-col-nome{width:220px; flex-shrink:0;}
  .cb-flow-nome{font-size:12.5px; font-weight:700; color:var(--text-dark);}
  .cb-flow-gatilho{font-size:11px; color:var(--text-muted); margin-top:2px;}
  .cb-flow-col-num{flex:1; text-align:center; font-size:13px; font-weight:700; color:var(--text-dark);}
  .cb-flow-col-resultado{width:170px; flex-shrink:0; text-align:right;}
  .cb-resultado-tag{font-size:10px; font-weight:700; padding:3px 10px; border-radius:20px; white-space:nowrap;}
  .cb-resultado-tag.sozinho{background:#eafaf0; color:var(--green-dark);}
  .cb-resultado-tag.humano{background:#e0e7ff; color:#3730a3;}
  .cb-opcao-row{display:flex; align-items:center; gap:10px; padding:9px 2px;}
  .cb-opcao-fluxo{width:150px; flex-shrink:0; font-size:11px; color:var(--text-muted); font-weight:600;}
  .cb-opcao-label{width:170px; flex-shrink:0; font-size:12.5px; font-weight:700; color:var(--text-dark); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .cb-opcao-track{flex:1; height:12px; background:#f0efec; border-radius:6px; overflow:hidden;}
  .cb-opcao-fill{height:100%; border-radius:6px; background:linear-gradient(90deg, #6d28d9, #a78bfa);}
  .cb-opcao-value{width:50px; flex-shrink:0; text-align:right; font-size:12px; font-weight:700; color:var(--text-dark);}
  .cb-templates-hint{font-size:11.5px; color:var(--text-muted); margin:2px 0 12px; line-height:1.4;}
  .cb-tpl-row{display:flex; align-items:center; gap:10px; padding:11px 4px; border-bottom:1px solid #f2f0ec;}
  .cb-tpl-row:last-child{border-bottom:none;}
  .cb-tpl-row-header{border-bottom:1px solid var(--panel-border); padding-bottom:9px;}
  .cb-tpl-row-header span{font-size:9.5px; text-transform:uppercase; letter-spacing:.04em; font-weight:700; color:var(--text-muted);}
  .cb-tpl-col-nome{flex:1.4; min-width:0;}
  .cb-tpl-nome{font-size:12.5px; font-weight:700; color:var(--text-dark);}
  .cb-tpl-categoria{font-size:11px; color:var(--text-muted); margin-top:2px;}
  .cb-tpl-col-num{flex:1; text-align:center; font-size:13px; font-weight:700; color:var(--text-dark);}

  .fluxo-destino-row{display:flex; align-items:center; gap:6px;}
  .fluxo-destino-row select{flex:1; min-width:0;}
  .fluxo-ver-operadores-btn{
    width:32px; height:32px; flex-shrink:0; border-radius:8px;
    display:flex; align-items:center; justify-content:center;
    background:#fff; border:1px solid var(--panel-border); color:var(--text-muted); cursor:pointer;
  }
  .fluxo-ver-operadores-btn:hover{background:#f0efec; color:var(--text-dark);}
  .fluxo-ver-operadores-btn svg{width:14px; height:14px;}
  .fluxo-menu-opcao-row .fluxo-ver-operadores-btn{width:26px; height:26px;}
  .fluxo-menu-opcao-row .fluxo-ver-operadores-btn svg{width:12px; height:12px;}

  .fluxo-gerar-submenu-btn{
    display:flex; align-items:center; gap:5px;
    background:#eefbf1; border:1px solid #d3f1dc; color:var(--green-dark);
    border-radius:7px; padding:5px 9px; margin:6px 0 0 30px;
    font-size:11px; font-weight:700; font-family:var(--font); cursor:pointer;
  }
  .fluxo-gerar-submenu-btn:hover{background:#d3f1dc;}
  .fluxo-gerar-submenu-btn svg{width:13px; height:13px; flex-shrink:0;}

  .dots-menu.fluxo-operadores-popup{max-height:280px; overflow-y:auto; z-index:2100;}
  .fluxo-operadores-popup-titulo{
    padding:9px 12px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.03em;
    color:var(--text-muted); border-bottom:1px solid var(--panel-border);
  }
  .fluxo-operador-item{
    display:flex; align-items:center; gap:9px; width:100%; text-align:left;
  }
  .fluxo-operador-item-avatar{
    width:24px; height:24px; border-radius:50%; background:var(--green-1); color:#fff;
    display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:700; flex-shrink:0;
  }
  .fluxo-operador-item-info{display:flex; flex-direction:column; min-width:0;}
  .fluxo-operador-item-info span:last-child{font-size:10px; color:var(--text-muted); font-weight:400;}
  .fluxo-operadores-popup-vazio{padding:12px; font-size:12px; color:var(--text-muted);}
  .fluxo-operadores-popup-dica{padding:8px 12px; font-size:10.5px; color:var(--text-muted); border-top:1px solid var(--panel-border);}

  /* ===== CONFIGURAÇÕES > CONTATOS ===== */
  .register-textarea{
    width:100%; box-sizing:border-box; font-family:var(--font); font-size:12.5px;
    border:1px solid var(--panel-border); border-radius:8px; padding:9px 11px;
    resize:vertical; min-height:80px; outline:none;
  }
  .contato-row{display:flex; align-items:center; gap:10px; padding:10px 6px; border-bottom:1px solid #f2f0ec;}
  .contato-row:last-child{border-bottom:none;}
  .contato-row:not(.contato-row-header):hover{background:#f7f6f3; border-radius:8px;}
  .contato-row-header{border-bottom:1px solid var(--panel-border); padding-bottom:9px; margin-bottom:2px;}
  .contato-row-header span{font-size:9.5px; text-transform:uppercase; letter-spacing:.04em; font-weight:700; color:var(--text-muted);}
  .contato-col-nome{width:230px; flex-shrink:0; display:flex; align-items:center; gap:10px; min-width:0;}
  .contato-avatar{
    width:32px; height:32px; border-radius:50%; flex-shrink:0;
    background:linear-gradient(135deg,#94a3b8,#475569); color:#fff;
    display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700;
  }
  .contato-nome-info{display:flex; flex-direction:column; min-width:0;}
  .contato-nome-info span:first-child{font-size:12.5px; font-weight:700; color:var(--text-dark); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .contato-categoria-badge{
    font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.02em;
    padding:1.5px 7px; border-radius:20px; margin-top:2px; display:inline-block; width:fit-content;
  }
  .contato-categoria-badge.cliente{background:#eafaf0; color:var(--green-dark);}
  .contato-categoria-badge.lead{background:#fef3c7; color:#92400e;}
  .contato-categoria-badge.fornecedor{background:#e0e7ff; color:#3730a3;}
  .contato-categoria-badge.parceiro{background:#fce7f3; color:#9d174d;}
  .contato-col-empresa{flex:1; min-width:0; font-size:12.5px; color:var(--text-dark); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .contato-col-tipo{width:120px; flex-shrink:0; display:flex; flex-wrap:wrap; gap:4px;}

  .contato-roteamento-opcao{
    display:flex; align-items:flex-start; gap:12px;
    border:1.5px solid var(--panel-border); border-radius:12px;
    padding:14px 16px; margin-bottom:12px; cursor:pointer;
  }
  .contato-roteamento-opcao.selecionada{border-color:var(--green-1); background:#f7fbf8;}
  .contato-roteamento-opcao input[type="radio"]{margin-top:3px; flex-shrink:0; accent-color:var(--green-1); width:16px; height:16px; cursor:pointer;}
  .contato-roteamento-opcao label{display:flex; flex-direction:column; gap:3px; cursor:pointer;}
  .contato-roteamento-titulo{font-size:13px; font-weight:700; color:var(--text-dark);}
  .contato-roteamento-desc{font-size:11.5px; color:var(--text-muted); line-height:1.4;}

  .ausencia-combo{position:relative; margin-bottom:12px;}
  .ausencia-combo-dropdown{
    position:absolute; top:calc(100% + 4px); left:0; right:0;
    background:#fff; border:1px solid var(--panel-border); border-radius:10px;
    max-height:220px; overflow-y:auto; z-index:60;
    box-shadow:0 10px 28px rgba(0,0,0,.14);
  }
  .ausencia-combo-item{
    display:flex; flex-direction:column; gap:1px;
    padding:8px 12px; cursor:pointer;
  }
  .ausencia-combo-item:hover, .ausencia-combo-item.highlighted{background:#f0efec;}
  .ausencia-combo-item-name{font-size:12.5px; font-weight:600; color:var(--text-dark);}
  .ausencia-combo-item-meta{font-size:10.5px; color:var(--text-muted);}
  .ausencia-combo-empty{padding:10px 12px; font-size:12px; color:var(--text-muted);}

  /* ===== RESPOSTAS PRÉ-DEFINIDAS (templates Meta) ===== */
  .resposta-var-row{display:flex; gap:7px; flex-wrap:wrap; margin-bottom:8px;}
  .resposta-var-btn{
    background:#eef2ff; border:1px solid #c7d2fe; color:#3730a3;
    font-size:11px; font-weight:700; padding:6px 12px; border-radius:20px;
    cursor:pointer; font-family:var(--font); display:flex; align-items:center; gap:5px;
  }
  .resposta-var-btn:hover{background:#e0e7ff;}
  .resposta-var-btn svg{width:11px; height:11px;}

  .resposta-status-badge{
    font-size:9.5px; font-weight:700; text-transform:uppercase; letter-spacing:.03em;
    padding:3px 10px; border-radius:20px; flex-shrink:0;
  }
  .resposta-status-badge.aguardando{background:#fef3c7; color:#92400e;}
  .resposta-status-badge.aprovado{background:#eafaf0; color:var(--green-dark);}
  .resposta-status-badge.recusado{background:#fee2e2; color:#b91c1c;}

  .resposta-card-desc{font-size:11.5px; color:var(--text-muted); margin-top:3px; display:flex; align-items:center; gap:8px; flex-wrap:wrap;}
  .resposta-card-preview{
    font-size:12px; color:var(--text-muted); margin-top:6px; line-height:1.4;
    max-width:600px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  }
  .resposta-categoria-tag{
    font-size:9.5px; font-weight:700; color:var(--text-muted); background:#f0efec;
    padding:1.5px 8px; border-radius:5px; text-transform:uppercase; letter-spacing:.02em;
  }
  .contato-col-tel{width:160px; flex-shrink:0; font-size:12px; color:var(--text-muted);}
  .contato-col-cidade{width:140px; flex-shrink:0; font-size:12.5px; color:var(--text-dark); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .contato-col-ultimo{width:130px; flex-shrink:0; font-size:12px; color:var(--text-muted);}
  .contato-col-acoes{width:30px; flex-shrink:0;}
  .metas-field{margin-bottom:14px;}
  .metas-field label{display:block; font-size:11.5px; font-weight:700; color:var(--text-dark); margin-bottom:6px;}
  .metas-field input{width:100%; box-sizing:border-box;}

  .dash-kpi-hero-meta{font-size:10.3px; color:var(--text-muted); margin-top:6px; display:flex; align-items:center; gap:4px;}
  .dash-kpi-hero-meta svg{width:10px; height:10px; flex-shrink:0;}
  .dash-kpi-hero-meta.ok{color:var(--green-dark);}
  .dash-kpi-hero-meta.warn{color:#dc2626;}
  .dash-kpi-secondary-meta{font-size:9.5px; color:var(--text-muted); margin-top:5px;}
  .dash-kpi-secondary-meta.ok{color:var(--green-dark);}
  .dash-kpi-secondary-meta.warn{color:#dc2626;}

  .dash-parada24h-mini{
    display:flex; align-items:center; gap:12px;
    background:#fff7ed; border:1px solid #fed7aa; border-radius:14px;
    padding:14px 18px; margin-bottom:20px; font-size:12.5px; color:#9a3412;
  }
  .dash-parada24h-mini svg{width:18px; height:18px; flex-shrink:0; color:#c2410c;}
  .dash-parada24h-mini b{color:#7c2d12;}
  .dash-parada24h-mini a{margin-left:auto; font-size:11.5px; font-weight:700; color:#9a3412; cursor:pointer; white-space:nowrap; text-decoration:none; flex-shrink:0;}

  .info-tip{
    position:relative; display:inline-flex; align-items:center; justify-content:center;
    width:14px; height:14px; border-radius:50%;
    background:#e5e3de; color:#84807a;
    cursor:help; margin-left:5px; flex-shrink:0; vertical-align:middle;
  }
  .info-tip svg{width:9px; height:9px;}
  .info-tip-bubble{
    position:absolute; z-index:80;
    bottom:calc(100% + 9px); right:-8px; left:auto;
    width:230px; background:#1b1d1f; color:#f4f3f0;
    font-size:11px; font-weight:400; line-height:1.5; text-transform:none; letter-spacing:normal;
    padding:10px 12px; border-radius:10px;
    opacity:0; visibility:hidden; transition:opacity .12s ease;
    pointer-events:none; box-shadow:0 10px 26px rgba(0,0,0,.28);
  }
  .info-tip-bubble::after{
    content:''; position:absolute; top:100%; right:10px; left:auto;
    border:6px solid transparent; border-top-color:#1b1d1f;
  }
  .info-tip:hover .info-tip-bubble, .info-tip:focus .info-tip-bubble{opacity:1; visibility:visible;}
  .dash-kpi-hero-card, .dash-kpi-secondary-card{overflow:visible;}
  .dash-kpi-secondary-card.is-computed{background:#f7fbf8; border-color:#cdeedb;}

  .dash-alerts-card{
    background:#fff; border:1px solid var(--panel-border); border-radius:16px;
    padding:16px 20px; margin-bottom:22px;
  }
  .dash-alerts-header{display:flex; align-items:center; justify-content:space-between; margin-bottom:6px;}
  .dash-alerts-header h3{font-size:13px; font-weight:700; color:var(--text-dark);}
  .dash-alerts-header a{font-size:11.5px; font-weight:700; color:var(--green-dark); cursor:pointer; text-decoration:none;}

  .dash-alert-filters{display:flex; gap:6px; flex-wrap:wrap;}
  .dash-alert-filter-chip{
    border:none; background:#f0efec; font-family:var(--font);
    font-size:11px; font-weight:700; color:var(--text-muted);
    padding:6px 11px; border-radius:20px; cursor:pointer;
    display:flex; align-items:center; gap:6px;
  }
  .dash-alert-filter-chip span{background:rgba(0,0,0,.08); padding:1px 6px; border-radius:10px; font-size:10px;}
  .dash-alert-filter-chip:hover{background:#e5e3de;}
  .dash-alert-filter-chip.active{background:#1b1d1f; color:#fff;}
  .dash-alert-filter-chip.active span{background:rgba(255,255,255,.18);}

  .dash-kpi-hero-grid{display:grid; grid-template-columns:repeat(6, 1fr); gap:14px; margin-bottom:16px;}
  .dash-kpi-hero-card{background:#fff; border:1px solid var(--panel-border); border-radius:14px; padding:16px;}
  .dash-kpi-hero-label{font-size:10.5px; color:var(--text-muted); font-weight:700; text-transform:uppercase; letter-spacing:.03em; margin-bottom:9px;}
  .dash-kpi-hero-value{font-size:23px; font-weight:800; color:var(--text-dark); line-height:1;}
  .dash-kpi-hero-trend{font-size:10.8px; font-weight:700; margin-top:7px; display:flex; align-items:center; gap:3px;}
  .dash-kpi-hero-trend svg{width:11px; height:11px;}
  .dash-kpi-hero-trend.up{color:var(--green-dark);}
  .dash-kpi-hero-trend.down{color:#dc2626;}

  .dash-kpi-secondary-grid{display:grid; grid-template-columns:repeat(5, 1fr); gap:12px;}
  .dash-mobile-totais{display:none; grid-template-columns:repeat(2, 1fr); gap:10px; margin-top:16px;}
  .dash-mobile-totais-card{background:#f7f6f3; border:1px solid var(--panel-border); border-radius:12px; padding:12px 14px;}
  .dash-mobile-totais-label{font-size:11px; color:var(--text-muted); font-weight:600; margin-bottom:4px;}
  .dash-mobile-totais-value{font-size:19px; font-weight:700; color:var(--text-dark);}
  .dash-kpi-secondary-card{background:#fff; border:1px solid var(--panel-border); border-radius:12px; padding:13px 14px;}
  .dash-kpi-secondary-label{font-size:10px; color:var(--text-muted); font-weight:700; margin-bottom:7px; line-height:1.3;}
  .dash-kpi-secondary-value{font-size:17px; font-weight:800; color:var(--text-dark);}

  @media (max-width:1300px){
    .dash-kpi-hero-grid{grid-template-columns:repeat(3, 1fr);}
    .dash-kpi-secondary-grid{grid-template-columns:repeat(3, 1fr);}
  }

  .dash-kpi-hero-grid-4{grid-template-columns:repeat(4, 1fr);}
  .dash-kpi-hero-grid-3{grid-template-columns:repeat(3, 1fr);}
  .dash-drill-hint{font-size:11px; color:var(--text-muted); font-weight:600;}
  .dash-drill-hint b{color:var(--text-dark);}
  .dash-drill-filter-row{display:flex; gap:8px; flex-wrap:wrap; padding:0 2px 16px 2px;}
  .dash-drill-filter-row select{min-width:150px;}
  .dash-drill-filter-row select:disabled{opacity:.5; cursor:not-allowed;}

  .dash-escopo-filter-row{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:18px;}
  .dash-escopo-filter-label{font-size:11.5px; font-weight:700; color:var(--text-muted); flex-shrink:0;}
  .dash-escopo-filter-row select:disabled{opacity:.5; cursor:not-allowed;}

  .dash-drill-table-wrap{overflow-x:auto;}
  .dash-drill-row{display:flex; align-items:center; gap:4px; padding:9px 6px; border-bottom:1px solid #f2f0ec; border-radius:8px; cursor:pointer;}
  .dash-drill-row:last-child{border-bottom:none;}
  .dash-drill-row:hover{background:#f7f6f3;}
  .dash-drill-row.selected{background:#eef8f0;}
  .dash-drill-row-header{cursor:default; border-bottom:1px solid var(--panel-border); padding-bottom:10px;}
  .dash-drill-row-header:hover{background:none;}
  .dash-drill-row-header .dash-drill-name, .dash-drill-row-header .dash-drill-month-cell{
    font-size:9px; text-transform:uppercase; letter-spacing:.04em; font-weight:700; color:var(--text-muted);
  }
  .dash-drill-name{width:270px; flex-shrink:0; display:flex; align-items:center; gap:7px; font-size:12.5px; font-weight:700; color:var(--text-dark);}
  .dash-drill-months{flex:1; display:flex; min-width:600px;}
  .dash-drill-month-cell{flex:1; text-align:right; font-size:11.5px; color:var(--text-dark); padding-right:8px; min-width:50px;}
  .dash-drill-chevron{width:13px; height:13px; color:var(--text-muted); flex-shrink:0; transition:transform .15s ease;}
  .dash-drill-chevron.open{transform:rotate(90deg);}
  .dash-drill-leaf-dot{width:5px; height:5px; border-radius:50%; background:var(--panel-border); flex-shrink:0; margin:0 4px;}

  .dash-evolucao-legend{display:flex; gap:16px; padding:2px 2px 16px 2px; flex-wrap:wrap;}
  .dash-evolucao-legend-item{display:flex; align-items:center; gap:6px; font-size:11.5px; color:var(--text-muted); font-weight:600;}
  .dash-evolucao-legend-swatch{width:10px; height:10px; border-radius:3px; flex-shrink:0;}
  .dash-evolucao-legend-swatch.line{border-radius:50%;}
  .config-header{display:flex; align-items:center; justify-content:space-between; margin-bottom:22px;}
  .config-header h2{font-size:18px; font-weight:700; color:var(--text-dark);}
  .config-header p{font-size:12.5px; color:var(--text-muted); margin-top:3px;}

  /* ===== FINANCEIRO ===== */
  .fin-card{background:#fff; border:1px solid var(--panel-border); border-radius:14px; padding:20px 22px; margin-bottom:18px;}
  .fin-plano-topo{display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:18px;}
  .fin-plano-tag{display:inline-block; font-size:9.5px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--green-dark); background:#eef8f0; padding:3px 8px; border-radius:6px; margin-bottom:6px;}
  .fin-plano-topo h3{font-size:19px; font-weight:800; color:var(--text-dark);}
  .fin-plano-status{font-size:11px; font-weight:700; color:var(--green-dark); background:#eef8f0; border:1px solid #cdeedb; padding:5px 12px; border-radius:20px; height:fit-content;}
  .fin-plano-status.vencido{color:#dc2626; background:#fdeeee; border-color:#f8caca;}

  .fin-usage-grid{display:grid; grid-template-columns:repeat(3, 1fr); gap:14px; margin-bottom:20px;}
  .fin-usage-item{background:#f9f8f6; border:1px solid var(--panel-border); border-radius:12px; padding:13px 15px;}
  .fin-usage-item-top{display:flex; align-items:center; justify-content:space-between; margin-bottom:9px;}
  .fin-usage-item-label{font-size:11.5px; font-weight:700; color:var(--text-dark);}
  .fin-usage-item-nums{font-size:11px; color:var(--text-muted); font-weight:600;}
  .fin-usage-item-nums b{color:var(--text-dark);}
  .fin-usage-track{width:100%; height:7px; border-radius:5px; background:#e7e5e2; overflow:hidden;}
  .fin-usage-fill{height:100%; border-radius:5px; background:linear-gradient(90deg, var(--green-1), var(--green-dark)); transition:width .3s ease;}
  .fin-usage-fill.warn{background:linear-gradient(90deg, #f5a623, #dc8a10);}
  .fin-usage-fill.danger{background:linear-gradient(90deg, #ef6a6a, #dc2626);}
  .fin-usage-extra-link{
    display:inline-flex; align-items:center; gap:5px;
    margin-top:9px; font-size:11px; font-weight:700;
    color:var(--green-dark); background:none; border:none; padding:0; cursor:pointer;
  }
  .fin-usage-extra-link:hover{text-decoration:underline;}
  .fin-usage-extra-link svg{width:12px; height:12px; flex-shrink:0;}
  .fin-usage-extra-static{margin-top:9px; font-size:11px; color:var(--text-muted); font-weight:600;}

  .fin-retencao-note{
    display:flex; align-items:flex-start; gap:9px;
    background:#f6f8fc; border:1px solid #dde6f5; border-radius:10px;
    padding:11px 13px; font-size:11.5px; color:#2c4a7c; line-height:1.45; margin-bottom:20px;
  }
  .fin-retencao-note svg{width:15px; height:15px; flex-shrink:0; margin-top:1px; color:#3f6bb0;}
  .fin-retencao-note b{color:#1d3c68;}

  .fin-billing-header{margin-bottom:10px;}
  .fin-billing-header h4{font-size:12.5px; font-weight:700; color:var(--text-dark); text-transform:uppercase; letter-spacing:.03em;}
  .fin-billing-list{margin-bottom:16px;}
  .fin-billing-row{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 2px; border-bottom:1px solid #f4f2ee; font-size:12.5px;}
  .fin-billing-row:last-child{border-bottom:none;}
  .fin-billing-row-info{display:flex; flex-direction:column; gap:2px;}
  .fin-billing-row-label{font-weight:700; color:var(--text-dark);}
  .fin-billing-row-desc{font-size:11px; color:var(--text-muted);}
  .fin-billing-row-valor{font-weight:700; color:var(--text-dark); flex-shrink:0;}

  .fin-equipe-resumo{border-top:1px solid var(--panel-border); margin-top:10px; padding-top:10px;}
  .fin-equipe-resumo-row{display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:12px; color:var(--text-muted); padding:4px 0;}
  .fin-equipe-resumo-row b{color:var(--text-dark); font-weight:700;}

  @media (max-width:900px){ .fin-usage-grid{grid-template-columns:repeat(2, 1fr);} }

  .fin-plano-total-row{display:flex; align-items:center; justify-content:space-between; border-top:1px solid var(--panel-border); padding-top:16px;}
  .fin-plano-total-info{display:flex; flex-direction:column;}
  .fin-plano-total-label{font-size:12.5px; color:var(--text-muted); font-weight:600;}
  .fin-plano-total-venc{font-size:12px; color:var(--text-muted); margin-top:2px;}
  .fin-plano-total-valor{font-size:22px; font-weight:800; color:var(--text-dark);}

  .fin-hist-header{display:flex; align-items:center; justify-content:space-between; margin-bottom:14px;}
  .fin-hist-header h3{font-size:15px; font-weight:700; color:var(--text-dark);}
  .fin-hist-row{display:grid; grid-template-columns:1.6fr 1fr 1fr 1fr; align-items:center; padding:11px 6px; font-size:12.5px;}
  .fin-hist-row-header{color:var(--text-muted); font-weight:700; font-size:10.5px; text-transform:uppercase; letter-spacing:.03em; border-bottom:1px solid var(--panel-border); padding-bottom:9px;}
  .fin-hist-row:not(.fin-hist-row-header){border-bottom:1px solid #f1efec;}
  .fin-hist-row:not(.fin-hist-row-header):last-child{border-bottom:none;}
  .fin-hist-mes{font-weight:700; color:var(--text-dark);}
  .fin-hist-valor{font-weight:700; color:var(--text-dark);}
  .fin-hist-status{display:inline-flex; align-items:center; gap:5px; font-size:10.5px; font-weight:700; padding:4px 9px; border-radius:20px; width:fit-content;}
  .fin-hist-status.pago{color:var(--green-dark); background:#eef8f0;}
  .fin-hist-status.pendente{color:#b45309; background:#fef3e0;}
  .fin-hist-status.atrasado{color:#dc2626; background:#fdeeee;}

  .fin-pagamento-row{display:flex; align-items:center; justify-content:space-between; gap:14px;}
  .fin-pagamento-info{display:flex; align-items:center; gap:12px;}
  .fin-pagamento-icon{width:42px; height:30px; border-radius:6px; background:#1b1d1f; color:#fff; display:flex; align-items:center; justify-content:center; font-size:9px; font-weight:800; letter-spacing:.02em;}
  .fin-pagamento-nome{font-size:12.5px; font-weight:700; color:var(--text-dark);}
  .fin-pagamento-sub{font-size:11px; color:var(--text-muted); margin-top:2px;}
  .fin-pagamento-alterar{font-size:12px; font-weight:700; color:var(--green-dark); background:#eef8f0; border:1px solid #cdeedb; padding:8px 14px; border-radius:9px; cursor:pointer;}
  .fin-pagamento-alterar:hover{background:#e2f3e6;}

  .fin-atendente-row{display:flex; align-items:center; gap:12px; padding:11px 4px; border-bottom:1px solid #f1efec;}
  .fin-atendente-row:last-child{border-bottom:none;}
  .fin-atendente-avatar{width:34px; height:34px; border-radius:50%; background:#eef8f0; color:var(--green-dark); font-size:12px; font-weight:800; display:flex; align-items:center; justify-content:center; flex-shrink:0;}
  .fin-atendente-info{flex:1; min-width:0;}
  .fin-atendente-nome{font-size:12.5px; font-weight:700; color:var(--text-dark);}
  .fin-atendente-tag{display:inline-block; font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color:var(--green-dark); background:#eef8f0; padding:2px 6px; border-radius:5px; margin-left:6px; vertical-align:middle;}
  .fin-atendente-datas{font-size:11px; color:var(--text-muted); margin-top:2px;}
  .fin-atendente-status{font-size:10.5px; font-weight:700; padding:4px 10px; border-radius:20px; flex-shrink:0;}
  .fin-atendente-status.ativo{color:var(--green-dark); background:#eef8f0;}
  .fin-atendente-status.inativo{color:#6b7075; background:#f0efec;}

  @media (max-width:720px){
    .fin-usage-grid{grid-template-columns:1fr;}
    .fin-hist-row{grid-template-columns:1.4fr 1fr 1fr; font-size:11.5px;}
    .fin-hist-row span:nth-child(2){display:none;}
    .fin-plano-total-row{flex-direction:column; align-items:flex-start; gap:8px;}
  }
  .config-subtabs{margin-bottom:20px; padding-bottom:18px; border-bottom:1px solid var(--panel-border);}
  .config-subtabs .transfer-mode-tab{padding:7px 16px; font-size:12px;}
  .btn-add-numero{
    display:flex; align-items:center; gap:6px;
    background:linear-gradient(135deg, var(--green-1), var(--green-dark));
    color:#04140a; border:none; border-radius:9px;
    padding:9px 15px; font-size:12.5px; font-weight:700;
    cursor:pointer; font-family:var(--font);
    box-shadow:0 4px 14px -4px rgba(63,207,99,.5);
  }
  .motivo-finalizacao-add-row{
    display:flex;
    gap:10px;
    margin-bottom:14px;
  }
  .motivo-finalizacao-add-row .register-input{flex:1;}
  .motivo-finalizacao-delete-btn{
    flex-shrink:0;
    display:flex; align-items:center; justify-content:center;
    width:30px; height:30px;
    border-radius:8px;
    border:none;
    background:transparent;
    color:var(--text-muted);
    cursor:pointer;
  }
  .motivo-finalizacao-delete-btn:hover{background:#fbe9e9; color:#c2410c;}
  .empresa-group{
    margin-bottom:20px;
    border:1px solid var(--panel-border);
    border-radius:14px;
    padding:14px;
    background:#fbfaf8;
  }
  .empresa-group-title{
    display:flex; align-items:center; gap:8px;
    font-size:12.5px; font-weight:700; color:var(--text-dark);
    margin-bottom:10px;
  }
  .empresa-group-title .count{font-weight:500; color:var(--text-muted); font-size:11.5px;}
  .numero-card{
    display:flex; align-items:center; gap:14px;
    background:var(--panel-bg); border:1px solid var(--panel-border);
    border-radius:12px; padding:13px 16px; margin-bottom:0;
  }
  .numero-card-icon{
    width:38px;height:38px; border-radius:10px; flex-shrink:0;
    display:flex; align-items:center; justify-content:center;
  }
  .numero-card-info{flex:1; min-width:0;}
  .numero-card-top{display:flex; align-items:center; gap:8px;}
  .numero-card-name{font-size:13.5px; font-weight:600; color:var(--text-dark);}
  .sede-flag{
    font-size:8.5px; font-weight:700; text-transform:uppercase; letter-spacing:.03em;
    background:#dbeafe; color:#1d4ed8; padding:1.5px 6px; border-radius:4px;
  }
  .numero-card-phone{font-size:11.5px; color:var(--text-muted); font-family:'Courier New', monospace; margin-top:2px;}
  .numero-card-status{
    display:flex; align-items:center; gap:5px;
    font-size:11px; font-weight:600; flex-shrink:0;
  }
  .numero-card-status .dot{width:7px;height:7px;border-radius:50%;}
  .status-conectado{color:var(--green-dark);}
  .status-conectado .dot{background:var(--green-1);}
  .status-desconectado{color:var(--red);}
  .status-desconectado .dot{background:var(--red);}
  .empresa-group-filiais{
    display:flex; flex-direction:column;
    margin-top:2px; padding-top:12px;
  }
  .filiais-label{font-size:11px; color:var(--text-muted); font-weight:600; margin:0 0 8px 0; display:block;}
  .filiais-empty{font-size:11.5px; color:var(--text-muted); font-style:italic; margin-left:19px;}
  .empresa-group-filiais-tree{
    position:relative;
    margin-left:19px;
    padding-left:16px;
    border-left:2px solid var(--panel-border);
    display:flex; flex-direction:column; gap:7px;
  }
  .btn-add-filial{
    font-size:11px; font-weight:700; color:var(--green-dark);
    background:transparent; border:1px dashed var(--green-2);
    padding:3px 9px; border-radius:20px; cursor:pointer; font-family:var(--font);
  }
  .btn-add-filial:hover{background:#eaf7ee;}
  .filial-row{
    position:relative;
    display:flex; align-items:center; gap:10px; width:100%;
    background:#fff; border:1px solid var(--panel-border); border-radius:10px;
    padding:8px 10px 8px 12px;
  }
  .filial-row::before{
    content:'';
    position:absolute;
    left:-16px;
    top:50%;
    width:14px;
    height:2px;
    background:var(--panel-border);
  }
  .filial-row-info{flex:1; min-width:0;}
  .filial-row-name{font-size:12px; font-weight:700; color:var(--text-dark);}
  .filial-row-horario{font-size:11px; color:var(--text-muted); margin-top:1px;}
  .filial-row-edit-btn{
    display:flex; align-items:center; justify-content:center;
    width:28px; height:28px; border-radius:8px; flex-shrink:0;
    background:transparent; border:1px solid var(--panel-border); color:#54595e; cursor:pointer;
  }
  .filial-row-edit-btn:hover{background:#f0efec;}
  .filial-row-edit-btn svg{width:13px;height:13px;}
  .numero-card-edit-btn{
    display:flex; align-items:center; justify-content:center;
    width:32px; height:32px; border-radius:9px; flex-shrink:0;
    background:transparent; border:1px solid var(--panel-border); color:#54595e; cursor:pointer;
  }
  .numero-card-edit-btn:hover{background:#f0efec;}
  .numero-card-edit-btn svg{width:15px;height:15px;}
  .horario-ativo-row{
    display:flex; align-items:center; justify-content:space-between; gap:10px;
    background:#f7f6f3; border-radius:10px; padding:10px 12px; margin-top:6px;
    font-size:12.5px; font-weight:600; color:var(--text-dark);
  }
  .horario-dias-row{display:flex; flex-wrap:wrap; gap:6px;}
  .horario-dia-chip{
    font-size:11.5px; font-weight:700; color:var(--text-muted);
    background:#f0efec; border:1px solid var(--panel-border);
    padding:6px 12px; border-radius:20px; cursor:pointer; font-family:var(--font);
  }
  .horario-dia-chip.active{background:#1b1d1f; color:#fff; border-color:#1b1d1f;}
  .horario-herdado-box{
    font-size:11.5px; color:var(--text-muted); background:#f7f6f3;
    border-radius:10px; padding:10px 12px; margin-top:8px; line-height:1.5;
  }
  .horario-herdado-box strong{color:var(--text-dark);}

  /* ===== OPERADORES > USUÁRIOS ===== */
  .usuarios-actions-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:2px;
  }
  .usuarios-filtro-toggle{
    display:flex; align-items:center; gap:7px;
    background:none; border:none; cursor:pointer;
    padding:8px 2px; font-family:var(--font);
    color:var(--text-muted); font-size:12.5px; font-weight:600;
  }
  .usuarios-filtro-toggle svg:first-child{width:15px;height:15px;}
  .usuarios-filtro-toggle:hover{color:var(--text-dark);}
  .usuarios-filtro-chevron{width:12px;height:12px; transition:transform .15s ease; flex-shrink:0;}
  .usuarios-actions-row.open .usuarios-filtro-chevron{transform:rotate(180deg);}
  .usuarios-filtros-row{
    display:none;
    flex-wrap:wrap;
    gap:6px;
    background:#f7f6f3;
    border:1px solid var(--panel-border);
    border-radius:10px;
    padding:12px;
    margin:10px 0 16px 0;
  }
  .usuarios-actions-row.open + .usuarios-filtros-row{display:flex;}
  .usuarios-filtros-row .filter-select{min-width:130px;}
  .departamento-card-icon{background:#ede9fe; color:#7c3aed;}
  .cargo-card-icon{background:#fef3c7; color:#b45309;}
  .dept-dots-btn{
    display:flex; align-items:center; justify-content:center;
    width:28px; height:28px; flex-shrink:0;
    border-radius:7px; background:none; border:none; cursor:pointer;
    color:var(--text-muted);
  }
  .dept-dots-btn:hover{background:#f0efec; color:var(--text-dark);}
  .dept-dots-btn svg{width:16px;height:16px;}
  .config-setting-row{
    display:flex; align-items:center; gap:14px;
    background:var(--panel-bg); border:1px solid var(--panel-border);
    border-radius:12px; padding:14px 16px; margin-bottom:10px;
  }
  .config-setting-info{flex:1; min-width:0;}
  .config-setting-titulo{font-size:13.5px; font-weight:600; color:var(--text-dark);}
  .config-setting-desc{font-size:11.5px; color:var(--text-muted); margin-top:2px;}
  .config-setting-valor{
    font-size:12px; font-weight:600; color:var(--green-dark);
    background:#eefbf1; border:1px solid #d3f1dc;
    padding:5px 10px; border-radius:20px; white-space:nowrap; flex-shrink:0;
  }
  .departamento-operadores-panel{
    background:#f7f6f3;
    border:1px solid var(--panel-border);
    border-radius:10px;
    padding:10px 14px;
    margin:-4px 0 10px 0;
  }
  .departamento-operadores-empresa{
    font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.03em;
    color:var(--text-muted); margin-bottom:8px;
  }
  .departamento-operador-row{
    display:flex; align-items:center; gap:10px;
    padding:6px 0;
    border-top:1px solid #e9e7e2;
  }
  .departamento-operador-row:first-of-type{border-top:none;}
  .departamento-operador-avatar{
    width:26px;height:26px; border-radius:50%; flex-shrink:0;
    background:linear-gradient(135deg,#94a3b8,#475569);
    display:flex; align-items:center; justify-content:center;
    color:#fff; font-size:10.5px; font-weight:700;
  }
  .departamento-operador-info{flex:1; min-width:0; display:flex; flex-direction:column;}
  .departamento-operador-name{font-size:12.5px; font-weight:600; color:var(--text-dark);}
  .departamento-operador-cargo{font-size:11px; color:var(--text-muted);}
  .departamento-operadores-vazio{font-size:12px; color:var(--text-muted); padding:6px 0;}
  .usuario-card{
    display:flex; align-items:center; gap:14px;
    background:var(--panel-bg); border:1px solid var(--panel-border);
    border-radius:12px; padding:12px 16px; margin-bottom:8px;
  }
  .usuario-card-avatar{
    width:38px;height:38px; border-radius:50%; flex-shrink:0;
    background:linear-gradient(135deg,#94a3b8,#475569);
    display:flex; align-items:center; justify-content:center;
    color:#fff; font-size:13px; font-weight:700;
  }
  .usuario-card-info{flex:1; min-width:0;}
  .usuario-card-name{font-size:13.5px; font-weight:600; color:var(--text-dark);}
  .usuario-card-meta{font-size:11.5px; color:var(--text-muted); margin-top:2px; display:flex; align-items:center; flex-wrap:wrap; gap:4px;}
  .usuario-card-meta .sep{opacity:.5;}
  .usuario-card-empresa{
    display:inline-flex; align-items:center;
    font-size:8.5px; font-weight:700; text-transform:uppercase; letter-spacing:.03em;
    padding:1.5px 6px; border-radius:4px;
    background:#e5e7eb; color:#374151;
  }
  .usuario-status-toggle{
    display:flex; align-items:center; gap:5px;
    font-size:11px; font-weight:600;
    flex-shrink:0; cursor:pointer;
    background:none; border:none; font-family:var(--font);
    padding:5px 9px; border-radius:20px;
  }
  .usuario-status-toggle.status-conectado{background:#dcfce7;}
  .usuario-status-toggle.status-desconectado{background:#fee2e2;}

  /* ===== INTERNO (chat de conversa interna entre a equipe) ===== */
  .interno-stack{
    flex:1;
    display:flex;
    min-width:0;
    background:var(--panel-bg);
  }
  .interno-contacts-panel{
    width:320px;
    flex-shrink:0;
    background:var(--panel-bg);
    border-right:1px solid var(--panel-border);
    display:flex;
    flex-direction:column;
    min-height:0;
  }
  .interno-panel-header{
    padding:18px 18px 12px 18px;
    border-bottom:1px solid var(--panel-border);
    flex-shrink:0;
  }
  .interno-panel-header h2{font-size:16px; font-weight:700; color:var(--text-dark); margin-bottom:10px;}
  .interno-filtros-row{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-top:10px;
  }
  .interno-filtros-row .filter-select{flex:1; min-width:90px;}
  .interno-contact-list{overflow-y:auto; flex:1;}
  .interno-contact-item{
    display:flex;
    gap:11px;
    align-items:center;
    padding:11px 16px;
    cursor:pointer;
    border-bottom:1px solid #f2f0ec;
    transition:background .12s ease;
  }
  .interno-contact-item:hover{background:#f7f6f3;}
  .interno-contact-item.active{background:#eef8f0;}
  .interno-avatar{
    width:38px;height:38px;
    border-radius:50%;
    background:linear-gradient(135deg,#94a3b8,#475569);
    display:flex;align-items:center;justify-content:center;
    color:#fff; font-size:13px; font-weight:700;
    flex-shrink:0;
    position:relative;
  }
  .interno-avatar-group{ background:linear-gradient(135deg,#4dd576,#1f8a45); }
  .interno-avatar-group svg{ width:19px; height:19px; }
  .interno-online-dot{
    position:absolute;
    bottom:-1px; right:-1px;
    width:9px; height:9px;
    border-radius:50%;
    background:#c7c4bd;
    border:2px solid var(--panel-bg);
  }
  .interno-online-dot.on{background:var(--green-1);}
  .interno-contact-info{flex:1; min-width:0;}
  .interno-contact-top{display:flex; align-items:baseline; justify-content:space-between; gap:6px;}
  .interno-contact-name{font-size:13.5px; font-weight:600; color:var(--text-dark); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .interno-contact-time{font-size:10.5px; color:var(--text-muted); flex-shrink:0;}
  .interno-contact-sub{font-size:11px; color:var(--text-muted); margin-top:1px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:flex; align-items:center; gap:5px;}
  .interno-contact-company{
    display:inline-flex;
    align-items:center;
    font-size:8.5px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.03em;
    padding:1.5px 6px;
    border-radius:4px;
    background:#e5e7eb;
    color:#374151;
    flex-shrink:0;
  }
  .interno-contact-bottom{display:flex; align-items:center; justify-content:space-between; gap:6px; margin-top:3px;}
  .interno-contact-last{font-size:12px; color:var(--text-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; min-width:0;}
  .interno-contact-item.has-unread .interno-contact-last{color:var(--text-dark); font-weight:600;}

  .interno-panel-header-top{display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px;}
  .interno-header-btns{display:flex; gap:6px; flex-shrink:0;}
  .interno-new-btn{
    display:flex; align-items:center; justify-content:center;
    width:30px; height:30px;
    border-radius:8px;
    background:linear-gradient(135deg,var(--green-1),var(--green-dark));
    border:none;
    cursor:pointer;
    color:#04140a;
    flex-shrink:0;
  }
  .interno-new-btn.secondary{background:#f0efec; color:#3f4347;}
  .interno-new-btn.secondary:hover{background:#e5e3de;}
  .interno-new-btn:hover{filter:brightness(1.05);}
  .interno-new-btn svg{width:16px;height:16px;}

  .interno-chat-panel{
    flex:1;
    display:flex;
    flex-direction:column;
    min-width:0;
    background:var(--chat-bg);
  }
  .interno-chat-header{
    display:flex;
    align-items:center;
    gap:12px;
    padding:14px 20px;
    background:var(--panel-bg);
    border-bottom:1px solid var(--panel-border);
    flex-shrink:0;
  }
  .interno-chat-header-info{flex:1; min-width:0;}
  .interno-chat-header-info .name{font-size:14.5px; font-weight:600; color:var(--text-dark);}
  .interno-chat-header-info .sub{font-size:12px; color:var(--text-muted); margin-top:1px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .interno-messages{
    flex:1;
    overflow-y:auto;
    padding:18px 24px;
    display:flex;
    flex-direction:column;
    gap:8px;
  }
  .interno-empty{margin:auto; color:var(--text-muted); font-size:13px;}
  .interno-bubble{
    max-width:60%;
    padding:8px 12px;
    border-radius:10px;
    font-size:13.5px;
    line-height:1.4;
    box-shadow:0 1px 1px rgba(0,0,0,.05);
    position:relative;
  }
  .interno-bubble.in{background:var(--bubble-in); align-self:flex-start; border-top-left-radius:2px;}
  .interno-bubble.out{background:var(--bubble-out); align-self:flex-end; border-top-right-radius:2px;}
  .interno-bubble-time{font-size:10px; color:var(--text-muted); margin-top:3px; text-align:right;}
  .interno-composer{
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px 18px;
    background:var(--panel-bg);
    border-top:1px solid var(--panel-border);
    flex-shrink:0;
  }
  .interno-composer svg{width:21px; height:21px; color:#5f6368; cursor:pointer; flex-shrink:0;}
  .interno-composer svg:hover{color:var(--text-dark);}
  .interno-composer input{
    flex:1;
    border:none;
    outline:none;
    background:#f0efec;
    border-radius:20px;
    padding:10px 16px;
    font-size:13.5px;
    font-family:var(--font);
    color:var(--text-dark);
  }

  /* ===== MENSAGENS STACK (4 full-width sectors) ===== */
  .mensagens-stack{
    flex:1;
    display:flex;
    flex-direction:column;
    min-width:0;
    background:var(--panel-bg);
    overflow:hidden;
  }
  .sector{
    flex-shrink:0;
    padding:8px 20px;
    border-bottom:1px solid var(--panel-border);
    background:var(--panel-bg);
    display:flex;
    align-items:center;
    gap:14px;
  }
  .sector-label{
    font-size:9.5px;
    font-weight:700;
    color:var(--text-muted);
    text-transform:uppercase;
    letter-spacing:.06em;
    flex-shrink:0;
    width:78px;
  }

  /* --- sector 1: status --- */
  .status-tabs{
    display:flex;
    gap:8px;
    overflow-x:auto;
    scrollbar-width:none;
    flex:1;
    min-width:0;
  }
  .status-tabs::-webkit-scrollbar{display:none;}
  .status-tab{
    flex-shrink:0;
    display:flex;
    align-items:center;
    gap:5px;
    padding:5px 11px;
    border-radius:20px;
    background:#f0efec;
    color:var(--text-muted);
    font-size:11px;
    font-weight:600;
    cursor:pointer;
    border:none;
    white-space:nowrap;
    transition:background .15s ease, color .15s ease;
    font-family:var(--font);
  }
  .status-tab:hover{background:#e7e5e0;}
  .status-tab.active{
    background:linear-gradient(135deg, var(--green-1), var(--green-dark));
    color:#04140a;
  }
  .status-tab .count{
    background:rgba(0,0,0,.12);
    border-radius:20px;
    font-size:9px;
    padding:1px 5px;
    font-weight:700;
  }
  .status-tab.active .count{
    background:rgba(4,20,10,.18);
    color:#04140a;
  }
  .status-tab:not(.active) .count{
    background:#e2e0db;
    color:var(--text-muted);
  }

  /* --- sector 2: atendimentos (horizontal cards) --- */
  .sector-atendimentos{
    gap:8px;
  }
  .atendimentos-row{
    display:flex;
    gap:8px;
    overflow-x:auto;
    scrollbar-width:none;
    flex:1;
    min-width:0;
  }
  .atendimentos-row::-webkit-scrollbar{display:none;}
  .atendimento-tab{
    flex-shrink:0;
    display:flex;
    align-items:center;
    gap:5px;
    padding:5px 11px;
    border-radius:20px;
    background:#f0efec;
    color:var(--text-muted);
    font-size:11px;
    font-weight:600;
    cursor:pointer;
    border:none;
    white-space:nowrap;
    transition:background .15s ease, color .15s ease;
    font-family:var(--font);
  }
  .atendimento-tab:hover{background:#e7e5e0;}
  .atendimento-tab.active{
    background:#1b1d1f;
    color:#fff;
  }
  .atendimento-tab .count{
    background:rgba(0,0,0,.12);
    border-radius:20px;
    font-size:9px;
    padding:1px 5px;
    font-weight:700;
  }
  .atendimento-tab.active .count{
    background:rgba(255,255,255,.18);
    color:#fff;
  }
  .atendimento-tab:not(.active) .count{
    background:#e2e0db;
    color:var(--text-muted);
  }

  /* Botão de recolher/expandir a linha de Atendimentos (só some com os chips,
     não muda o formato do setor — é só pra sobrar mais espaço pra área de mensagens).
     Mesmo tamanho/estilo do chevron do "Filtro", pra ficar consistente. */
  .atendimentos-toggle-btn{
    flex-shrink:0;
    display:flex; align-items:center; justify-content:center;
    border:none;
    background:transparent;
    color:var(--text-muted);
    cursor:pointer;
    padding:2px;
    border-radius:6px;
    outline:none;
  }
  .atendimentos-toggle-btn:hover{background:#f0efec; color:var(--text-dark);}
  .atendimentos-chevron{width:12px;height:12px; transition:transform .15s ease; flex-shrink:0;}
  .sector-atendimentos.collapsed{
    padding-top:3px;
    padding-bottom:3px;
  }
  .sector-atendimentos.collapsed .atendimentos-row{display:none;}
  .sector-atendimentos.collapsed .atendimentos-chevron{transform:rotate(180deg);}

  /* --- sector 3: filtros (linha fina que expande ao clicar) --- */
  .sector-filtros{
    flex-direction:column;
    align-items:stretch;
    gap:0;
    padding-top:3px;
    padding-bottom:3px;
  }
  .sector-filtros.open{
    padding-top:6px;
    padding-bottom:6px;
  }
  .sector-filtros-top{ display:flex; align-items:center; gap:8px; }
  .sector-filtros-top .filtro-toggle-row{ flex:1; width:auto; }
  .filtro-toggle-row{
    display:flex;
    align-items:center;
    gap:6px;
    background:none;
    border:none;
    cursor:pointer;
    padding:2px 0;
    width:100%;
    text-align:left;
    font-family:var(--font);
  }
  .filtro-toggle-row:hover .filtro-label{color:var(--text-dark);}
  .filtro-label{width:auto;}
  .filtro-chevron{
    width:12px;height:12px;
    color:var(--text-muted);
    transition:transform .15s ease;
    flex-shrink:0;
  }
  .sector-filtros.open .filtro-chevron{transform:rotate(180deg);}
  .filtros-row{
    display:none;
    gap:8px;
    flex-wrap:wrap;
    align-items:center;
    margin-top:8px;
  }
  .sector-filtros.open .filtros-row{display:flex;}
  .search-box{
    background:#f0efec;
    border-radius:8px;
    display:flex;
    align-items:center;
    gap:7px;
    padding:6px 11px;
    flex:1;
    min-width:160px;
    max-width:280px;
  }
  .search-box svg{width:14px;height:14px;color:var(--text-muted);flex-shrink:0;}
  .search-box input{
    border:none;background:transparent;outline:none;
    font-size:12px;width:100%;font-family:var(--font);
    color:var(--text-dark);
  }
  .filter-select{
    background:#f0efec;
    border:none;
    border-radius:8px;
    padding:6px 10px;
    font-size:11.5px;
    font-family:var(--font);
    color:var(--text-dark);
    cursor:pointer;
    outline:none;
  }

  /* Botão de filtro tipo toggle (liga/desliga), usado no filtro de "Não lidas" */
  .filtro-toggle-btn{
    display:flex; align-items:center; gap:6px;
    background:#f0efec; border:none; border-radius:8px; padding:6px 12px;
    font-size:11.5px; font-weight:600; font-family:var(--font); color:var(--text-dark);
    cursor:pointer; outline:none; white-space:nowrap; transition:background .15s ease, color .15s ease;
  }
  .filtro-toggle-btn:hover{background:#e7e5e0;}
  .filtro-toggle-btn .dot{width:7px; height:7px; border-radius:50%; background:#b9b6ad; flex-shrink:0; transition:background .15s ease;}
  .filtro-toggle-btn.active{
    background:linear-gradient(135deg, var(--green-1), var(--green-dark));
    color:#04140a;
  }
  .filtro-toggle-btn.active .dot{background:#04140a;}
  .meus-atendimentos-btn{flex-shrink:0;}
  .meus-atendimentos-btn svg{width:13px; height:13px; flex-shrink:0;}
  .meus-atendimentos-count{
    background:rgba(0,0,0,.12);
    border-radius:20px;
    font-size:9px;
    font-weight:700;
    padding:1px 5px;
  }
  .meus-atendimentos-btn.active .meus-atendimentos-count{
    background:rgba(4,20,10,.18);
    color:#04140a;
  }
  .meus-atendimentos-btn:disabled{
    opacity:.45;
    cursor:not-allowed;
    pointer-events:none;
  }

  /* --- sector 4: mensagens (contatos + chat, lado a lado como o WhatsApp) --- */
  .sector-mensagens{
    flex:1;
    display:flex;
    flex-direction:row;
    align-items:stretch;
    gap:0;
    min-height:0;
    padding:0;
    border-bottom:none;
    position:relative;
    overflow:hidden;
  }
  .contacts-panel{
    width:320px;
    flex-shrink:0;
    background:var(--panel-bg);
    border-right:1px solid var(--panel-border);
    display:flex;
    flex-direction:column;
    min-height:0;
  }
  .contact-list{
    overflow-y:auto;
    flex:1;
  }
  .contact-item{
    display:flex;
    gap:11px;
    align-items:center;
    padding:11px 16px;
    cursor:pointer;
    border-bottom:1px solid #f2f0ec;
    transition:background .12s ease;
  }
  .contact-item:hover{background:#f7f6f3;}
  .contact-item.active{background:#eef8f0;}
  .contact-info{flex:1; min-width:0;}
  .contact-top{display:flex; justify-content:space-between; align-items:baseline; gap:6px;}
  .contact-name-row{display:flex; align-items:center; gap:6px; min-width:0; overflow:hidden;}
  .contact-tag{
    display:inline-flex;
    align-items:center;
    font-size:8.5px;
    font-weight:700;
    padding:1.5px 6px;
    border-radius:4px;
    text-transform:uppercase;
    letter-spacing:.03em;
    flex-shrink:0;
  }
  .tag-cliente{background:#dbeafe; color:#1d4ed8;}
  .tag-fornecedor{background:#fee2e2; color:#b91c1c;}
  .tag-parceiro{background:#ede9fe; color:#6d28d9;}
  .tag-lead{background:#fef3c7; color:#b45309;}
  .tag-interno{background:#e5e7eb; color:#374151;}
  .cadastrar-btn{
    width:16px;height:16px;
    border-radius:4px;
    background:#f0efec;
    color:var(--text-muted);
    border:1px dashed #b9b6b0;
    font-size:11px;
    line-height:1;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    flex-shrink:0;
    padding:0;
    font-family:var(--font);
  }
  .cadastrar-btn:hover{background:#e2e0db; color:var(--text-dark); border-color:#9a978f;}
  .contact-name{font-size:14px; font-weight:600; color:var(--text-dark); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0;}
  .contact-time{font-size:11px; color:var(--text-muted); flex-shrink:0;}

  /* --- indicador de status de atendimento (menor que os marcadores) --- */
  .atendimento-badge{
    display:inline-flex;
    align-items:center;
    gap:3px;
    font-size:7.5px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.03em;
    color:var(--text-muted);
    flex-shrink:0;
  }
  .atendimento-badge .dot{width:5px;height:5px;border-radius:50%;flex-shrink:0;}

  /* --- badge do número de WhatsApp de origem (multi-número) --- */
  .numero-badge{
    display:inline-flex;
    align-items:center;
    gap:4px;
    font-size:8.5px;
    font-weight:700;
    padding:1.5px 6px;
    border-radius:4px;
    letter-spacing:.02em;
    flex-shrink:0;
    max-width:150px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .numero-badge .dot{width:5px;height:5px;border-radius:50%;flex-shrink:0;}
  .chat-numero-badge{
    display:inline-flex;
    align-items:center;
    gap:5px;
    font-size:10.5px;
    font-weight:600;
    padding:3px 9px;
    border-radius:20px;
    margin-left:8px;
  }
  .chat-numero-badge .dot{width:6px;height:6px;border-radius:50%;flex-shrink:0;}
  .chat-numero-badge .num-phone{opacity:.65; font-weight:500; font-family:'Courier New', monospace; font-size:9.5px;}

  .priority-flag{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:13px;height:13px;
    border-radius:50%;
    background:#e5484d;
    color:#fff;
    font-size:9px;
    font-weight:800;
    flex-shrink:0;
  }

  /* --- marcadores (post-it style, multiple por contato, criados pelo usuário) --- */
  .contact-info-row{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:5px;
    margin-top:5px;
  }
  .contact-info-row:empty{margin-top:0;}
  .contact-markers{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:4px;
    margin-top:4px;
  }
  .marker-chip{
    display:inline-flex;
    align-items:center;
    font-size:8.5px;
    font-weight:700;
    color:#fff;
    padding:1.5px 6px;
    border-radius:4px;
    letter-spacing:.02em;
    box-shadow:0 1px 1px rgba(0,0,0,.12);
    max-width:120px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .marker-add-btn{
    width:16px;height:16px;
    border-radius:4px;
    background:#f0efec;
    color:var(--text-muted);
    border:none;
    font-size:11px;
    line-height:1;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    flex-shrink:0;
    padding:0;
  }
  .marker-add-btn:hover{background:#e2e0db; color:var(--text-dark);}

  .marker-popover{
    position:fixed;
    z-index:1000;
    width:230px;
    background:#fff;
    border:1px solid var(--panel-border);
    border-radius:12px;
    box-shadow:0 12px 32px rgba(0,0,0,.18);
    padding:12px;
  }
  .marker-popover-title{
    font-size:10px;
    font-weight:700;
    color:var(--text-muted);
    text-transform:uppercase;
    letter-spacing:.05em;
    margin-bottom:8px;
  }
  .marker-option{
    display:flex;
    align-items:center;
    gap:8px;
    padding:6px 6px;
    border-radius:7px;
    cursor:pointer;
    font-size:12.5px;
    color:var(--text-dark);
  }
  .marker-option:hover{background:#f7f6f3;}
  .marker-option .swatch{width:10px;height:10px;border-radius:3px;flex-shrink:0;}
  .marker-option .m-label{flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .marker-option .check{width:14px;height:14px;color:var(--green-dark); flex-shrink:0;}
  .marker-new-row{margin-top:6px; padding-top:8px; border-top:1px solid var(--panel-border);}
  .marker-new-toggle{
    font-size:12px;
    color:var(--green-dark);
    font-weight:700;
    cursor:pointer;
    background:none;
    border:none;
    padding:5px 6px;
    font-family:var(--font);
  }
  .marker-new-form{display:none; flex-direction:column; gap:8px; margin-top:4px; padding:0 6px;}
  .marker-new-form.open{display:flex;}
  .marker-new-form input{
    border:1px solid var(--panel-border);
    border-radius:7px;
    padding:6px 9px;
    font-size:12px;
    font-family:var(--font);
    outline:none;
    color:var(--text-dark);
  }
  .marker-color-options{display:flex; gap:6px; flex-wrap:wrap;}
  .marker-color-swatch{
    width:20px;height:20px;
    border-radius:6px;
    cursor:pointer;
    border:2px solid transparent;
  }
  .marker-color-swatch.selected{border-color:#1b1d1f;}
  .marker-create-btn{
    background:linear-gradient(135deg,var(--green-1),var(--green-dark));
    color:#04140a;
    border:none;
    border-radius:7px;
    padding:7px 10px;
    font-size:12px;
    font-weight:700;
    cursor:pointer;
    font-family:var(--font);
  }

  .contact-bottom{display:flex; justify-content:space-between; align-items:center; margin-top:2px; gap:6px;}
  .contact-agent-row{
    display:flex;
    align-items:center;
    gap:4px;
    font-size:9.5px;
    color:var(--text-muted);
    margin-top:3px;
  }
  .contact-agent-row svg{width:10px; height:10px; flex-shrink:0;}
  .contact-agent-row b{color:var(--text-dark); font-weight:600;}
  .contact-last{
    font-size:12.5px; color:var(--text-muted);
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  }
  .no-contacts{padding:30px 20px; text-align:center; color:var(--text-muted); font-size:12.5px;}
  .contact-avatar{
    width:46px;height:46px;border-radius:50%;
    background:linear-gradient(135deg,#4dd576,#1f8a45);
    display:flex;align-items:center;justify-content:center;
    color:#fff;font-weight:700;font-size:15px;
    flex-shrink:0;
  }
  .contact-avatar-wrap{ position:relative; flex-shrink:0; }
  .queue-position-badge{
    position:absolute;
    top:-3px; left:-3px;
    min-width:17px; height:17px;
    border-radius:50%;
    background:linear-gradient(135deg, var(--green-1), var(--green-dark));
    color:#04140a;
    font-size:9.5px;
    font-weight:800;
    display:flex; align-items:center; justify-content:center;
    padding:0 3px;
    border:2px solid var(--panel-bg);
    box-shadow:0 1px 3px rgba(0,0,0,.25);
    z-index:1;
  }
  .unread-badge{
    background:var(--green-1);
    color:#04140a;
    font-size:10.5px;font-weight:700;
    min-width:19px; height:19px; border-radius:20px;
    display:flex; align-items:center; justify-content:center;
    padding:0 5px;
    flex-shrink:0;
  }

  /* ===== CHAT AREA ===== */
  .chat-panel{
    flex:1;
    display:flex;
    flex-direction:column;
    min-width:0;
    min-height:0;
    background-color:var(--chat-bg);
    background-image:
      radial-gradient(circle at 20% 30%, rgba(255,255,255,.25) 0, transparent 45%),
      radial-gradient(circle at 80% 70%, rgba(255,255,255,.2) 0, transparent 45%);
  }
  .chat-header{
    background:var(--panel-bg);
    border-bottom:1px solid var(--panel-border);
    padding:12px 20px;
    display:flex;
    align-items:center;
    gap:12px;
  }
  .chat-header .contact-avatar{width:40px;height:40px;font-size:13px;}
  .chat-header-clickable{
    display:flex;
    align-items:center;
    gap:12px;
    flex:1;
    min-width:0;
    background:none;
    border:none;
    cursor:pointer;
    padding:4px;
    margin:-4px;
    border-radius:8px;
    text-align:left;
    font-family:var(--font);
  }
  .chat-header-clickable:hover{background:#f7f6f3;}
  .mobile-back-btn{
    display:none;
    align-items:center;
    justify-content:center;
    width:32px;height:32px;
    border-radius:50%;
    background:none;
    border:none;
    color:var(--text-dark);
    cursor:pointer;
    flex-shrink:0;
    padding:0;
  }
  .mobile-back-btn:hover{background:#f0efec;}
  .mobile-back-btn svg{width:20px;height:20px;}
  .chat-header-info{flex:1; line-height:1.2; min-width:0;}
  .chat-header-info .name-row{display:flex; align-items:center; gap:8px;}
  .chat-header-info .name{font-size:14.5px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .status-row{display:flex; align-items:center; gap:6px; margin-top:1px;}
  .chat-header-info .status{font-size:12px; color:var(--text-muted); flex-shrink:0;}
  .chat-markers{display:flex; align-items:center; gap:4px; flex-wrap:wrap; overflow:hidden;}

  .notes-btn{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    width:20px; height:20px;
    border-radius:5px;
    background:#f0efec;
    border:none;
    color:#6b6f73;
    cursor:pointer;
    flex-shrink:0;
    padding:0;
  }
  .notes-btn:hover{background:#e5e3de; color:var(--text-dark);}
  .notes-btn svg{width:12px; height:12px;}
  .notes-dot{
    position:absolute;
    top:-2px; right:-2px;
    width:7px; height:7px;
    border-radius:50%;
    background:var(--green-1);
    border:1.5px solid #fff;
    display:none;
  }
  .notes-dot.show{display:block;}
  .alert-btn.has-alert{color:#c2410c; background:#ffedd5;}
  .alert-dot{background:#f97316;}

  .notes-popover{
    position:fixed;
    z-index:1000;
    width:290px;
    max-height:380px;
    background:#fff;
    border:1px solid var(--panel-border);
    border-radius:12px;
    box-shadow:0 12px 32px rgba(0,0,0,.18);
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  .notes-popover-title{
    font-size:11px;
    font-weight:700;
    color:var(--text-muted);
    text-transform:uppercase;
    letter-spacing:.05em;
    padding:12px 14px 8px 14px;
    flex-shrink:0;
  }
  .notes-list{
    overflow-y:auto;
    padding:0 14px;
    flex:1;
    max-height:180px;
  }
  .note-item{
    padding:8px 0;
    border-bottom:1px solid #f0efec;
  }
  .note-item:last-child{border-bottom:none;}
  .note-date{font-size:10px; color:var(--text-muted); margin-bottom:2px; font-weight:600;}
  .note-text{font-size:12.5px; color:var(--text-dark); line-height:1.4; white-space:pre-wrap;}
  .notes-empty{font-size:12px; color:var(--text-muted); padding:6px 0 12px 0;}
  .notes-add-row{
    padding:10px 14px 14px 14px;
    border-top:1px solid var(--panel-border);
    flex-shrink:0;
  }
  .notes-add-row textarea{
    width:100%;
    border:1px solid var(--panel-border);
    border-radius:8px;
    padding:8px 10px;
    font-size:12.5px;
    font-family:var(--font);
    color:var(--text-dark);
    resize:none;
    outline:none;
    min-height:52px;
  }
  .notes-add-btn{
    margin-top:8px;
    width:100%;
    background:linear-gradient(135deg,var(--green-1),var(--green-dark));
    color:#04140a;
    border:none;
    border-radius:7px;
    padding:8px 10px;
    font-size:12.5px;
    font-weight:700;
    cursor:pointer;
    font-family:var(--font);
  }

  /* ===== POPUP DE TRANSFERÊNCIA ===== */
  .transfer-modal-backdrop{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.4);
    z-index:2000;
    display:none;
    align-items:center;
    justify-content:center;
  }
  .transfer-modal-backdrop.open{display:flex;}
  .transfer-modal{
    width:500px;
    max-width:92vw;
    max-height:85vh;
    background:#fff;
    border-radius:14px;
    box-shadow:0 20px 60px rgba(0,0,0,.3);
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  .transfer-modal-header{
    padding:16px 18px;
    border-bottom:1px solid var(--panel-border);
    display:flex;
    align-items:center;
    justify-content:space-between;
    font-size:15px;
    font-weight:700;
    color:var(--text-dark);
    flex-shrink:0;
  }
  .transfer-modal-close{
    width:28px;height:28px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    background:none;
    border:none;
    cursor:pointer;
    color:#54595e;
    flex-shrink:0;
  }
  .transfer-modal-close:hover{background:#f0efec;}
  .transfer-modal-close svg{width:16px;height:16px;}
  .transfer-modal-top{
    padding:16px 18px 10px 18px;
    flex:1;
    overflow-y:auto;
    min-height:0;
  }
  .transfer-section-title{
    font-size:10.5px;
    font-weight:700;
    color:var(--text-muted);
    text-transform:uppercase;
    letter-spacing:.05em;
    margin-bottom:8px;
  }
  .transfer-mode-tabs{
    display:flex;
    gap:6px;
    margin-bottom:10px;
  }
  .transfer-mode-tab{
    padding:6px 13px;
    border-radius:20px;
    background:#f0efec;
    border:none;
    font-size:11.5px;
    font-weight:700;
    color:var(--text-muted);
    cursor:pointer;
    font-family:var(--font);
  }
  .transfer-mode-tab:hover{background:#e5e3de;}
  .transfer-mode-tab.active{
    background:#1b1d1f;
    color:#fff;
  }
  .sector-item-icon{
    width:34px;height:34px;
    border-radius:50%;
    background:linear-gradient(135deg,#94a3b8,#475569);
    display:flex;align-items:center;justify-content:center;
    color:#fff;
    flex-shrink:0;
  }
  .sector-item-icon svg{width:16px;height:16px;}
  .transfer-search-box{
    background:#f0efec;
    border-radius:9px;
    display:flex;
    align-items:center;
    gap:8px;
    padding:8px 12px;
  }
  .transfer-search-box svg{width:15px;height:15px;color:var(--text-muted);flex-shrink:0;}
  .transfer-search-box input{
    border:none;background:transparent;outline:none;
    font-size:13px;width:100%;font-family:var(--font);
    color:var(--text-dark);
  }
  .transfer-user-list-wrap{
    overflow-y:auto;
    max-height:220px;
    padding:8px 18px 4px 18px;
    border-bottom:1px solid var(--panel-border);
    flex-shrink:1;
  }
  .transfer-user-list{
    display:flex;
    flex-direction:column;
    gap:4px;
  }
  .transfer-user-item{
    display:flex;
    align-items:center;
    gap:10px;
    padding:8px 9px;
    border-radius:9px;
    cursor:pointer;
    border:1.5px solid transparent;
  }
  .transfer-user-item:hover{background:#f7f6f3;}
  .transfer-user-item.selected{background:#eef8f0; border-color:var(--green-1);}
  .transfer-user-avatar{
    width:34px;height:34px;border-radius:50%;
    background:linear-gradient(135deg,#4dd576,#1f8a45);
    display:flex;align-items:center;justify-content:center;
    color:#fff;font-weight:700;font-size:12px;
    flex-shrink:0;
    position:relative;
  }
  .transfer-user-status-dot{
    position:absolute;
    bottom:-1px; right:-1px;
    width:10px; height:10px;
    border-radius:50%;
    border:2px solid #fff;
  }
  .transfer-user-status-dot.online{background:var(--green-1);}
  .transfer-user-status-dot.offline{background:#b3b0aa;}
  .transfer-user-info{flex:1; min-width:0;}
  .transfer-user-name{font-size:13px; font-weight:600; color:var(--text-dark);}
  .transfer-user-status-text{font-size:11px; color:var(--text-muted);}
  .transfer-user-status-text.online{color:var(--green-dark);}
  .transfer-user-check{width:16px;height:16px; color:var(--green-dark); flex-shrink:0;}
  .op-checkbox{
    width:19px;height:19px;
    border-radius:6px;
    border:1.5px solid #c9c6bf;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
    background:#fff;
  }
  .op-checkbox.checked{
    background:linear-gradient(135deg,var(--green-1),var(--green-dark));
    border-color:var(--green-1);
  }
  .op-checkbox svg{width:12px;height:12px; color:#04140a; display:none;}
  .op-checkbox.checked svg{display:block;}
  .transfer-no-results{font-size:12.5px; color:var(--text-muted); padding:10px 4px;}
  .transfer-message-fixed{
    padding:14px 18px;
    flex-shrink:0;
  }
  .transfer-message-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:8px;
  }
  .transfer-message-header .transfer-section-title{margin-bottom:0;}
  .priority-toggle-btn{
    display:flex;
    align-items:center;
    gap:5px;
    padding:5px 11px;
    border-radius:20px;
    background:#f0efec;
    border:none;
    font-size:10.5px;
    font-weight:800;
    letter-spacing:.04em;
    text-transform:uppercase;
    color:var(--text-muted);
    cursor:pointer;
    font-family:var(--font);
    flex-shrink:0;
  }
  .priority-toggle-btn svg{width:13px;height:13px;}
  .priority-toggle-btn:hover{background:#e5e3de;}
  .priority-toggle-btn.active{
    background:#fee2e2;
    color:#b91c1c;
  }
  .transfer-message-box textarea{
    width:100%;
    border:1px solid var(--panel-border);
    border-radius:9px;
    padding:9px 11px;
    font-size:13px;
    font-family:var(--font);
    resize:none;
    min-height:64px;
    outline:none;
    color:var(--text-dark);
  }
  .transfer-modal-footer{
    padding:14px 18px;
    border-top:1px solid var(--panel-border);
    display:flex;
    justify-content:flex-end;
    gap:10px;
    flex-shrink:0;
  }
  .transfer-btn-cancel{
    padding:9px 16px;
    border-radius:8px;
    background:#f0efec;
    border:none;
    font-size:13px;
    font-weight:600;
    color:var(--text-dark);
    cursor:pointer;
    font-family:var(--font);
  }
  .transfer-btn-cancel:hover{background:#e5e3de;}
  .transfer-btn-confirm{
    padding:9px 16px;
    border-radius:8px;
    background:linear-gradient(135deg,var(--green-1),var(--green-dark));
    border:none;
    font-size:13px;
    font-weight:700;
    color:#04140a;
    cursor:pointer;
    font-family:var(--font);
  }
  .transfer-btn-confirm:disabled{opacity:.45; cursor:not-allowed;}
  .transfer-btn-edit{
    padding:9px 16px;
    border-radius:8px;
    background:#fff;
    border:1.5px solid var(--green-2);
    font-size:13px;
    font-weight:700;
    color:var(--green-dark);
    cursor:pointer;
    font-family:var(--font);
    display:flex;
    align-items:center;
    gap:6px;
  }
  .transfer-btn-edit:hover{background:#f2fbf4;}
  .transfer-btn-edit svg{width:14px;height:14px;}

  /* ===== MODO VISUALIZAÇÃO / EDIÇÃO (modais de cadastro que abrem um registro existente) =====
     Por padrão o modal abre em modo leitura (vem-view): campos bloqueados, só os botões
     "Editar" e "Sair" aparecem. Ao clicar em Editar, o modal entra em vem-edit: campos
     liberados, e os botões viram "Cancelar"/"Salvar" (e "Excluir", quando existir). */
  .only-vem-view{display:none !important;}
  .only-vem-edit{display:none !important;}
  .vem-view .only-vem-view{display:flex !important;}
  .vem-edit .only-vem-edit{display:flex !important;}
  /* Bloqueia apenas os campos/controles internos (não o próprio contêiner com rolagem),
     para que a barra de rolagem e o scroll do mouse continuem funcionando normalmente
     em modo leitura. O pointer-events:none é herdado pelos descendentes, então basta
     aplicá-lo nos filhos diretos do contêiner — exceto nas áreas que têm rolagem própria
     aninhada (ex.: painéis do modal de Cargo, lista de subsetores), que são reabilitadas
     e então têm seus próprios filhos bloqueados novamente. */
  .vem-view .vem-lockable > *{ pointer-events:none; }

  .vem-view .vem-lockable .perfil-modal-left,
  .vem-view .vem-lockable .perfil-modal-right,
  .vem-view .vem-lockable .perfil-permissoes-scroll,
  .vem-view .vem-lockable .perfil-cargos-list-wrap{
    pointer-events:auto;
  }
  .vem-view .vem-lockable .perfil-modal-left > *,
  .vem-view .vem-lockable .perfil-modal-right > *,
  .vem-view .vem-lockable .perfil-permissoes-scroll > *,
  .vem-view .vem-lockable .perfil-cargos-list-wrap > *{
    pointer-events:none;
  }

  .vem-view .vem-lockable input,
  .vem-view .vem-lockable select,
  .vem-view .vem-lockable textarea{
    background:#f5f4f1;
    color:#55585c;
    cursor:default;
  }
  .vem-view .vem-lockable button{ cursor:default; }

  /* ===== POPUP DE CONFIRMAÇÃO PARA FINALIZAR ===== */
  .finalize-modal{width:370px;}
  .finalize-modal-body{
    padding:18px;
  }
  .finalize-question{
    font-size:13.5px;
    color:var(--text-dark);
    line-height:1.5;
    margin-bottom:14px;
  }
  .finalize-question b{font-weight:700;}
  .finalize-operators-title{
    font-size:10.5px;
    font-weight:700;
    color:var(--text-muted);
    text-transform:uppercase;
    letter-spacing:.05em;
    margin-bottom:8px;
  }
  .finalize-operators-list{
    display:flex;
    flex-direction:column;
    gap:6px;
    margin-bottom:4px;
  }
  .finalize-operator-row{
    display:flex;
    align-items:center;
    gap:10px;
    padding:6px 8px;
    border-radius:8px;
    background:#f7f6f3;
  }
  .finalize-operator-row .transfer-user-avatar{width:28px;height:28px;font-size:10.5px;}
  .finalize-operator-name{font-size:12.5px; font-weight:600; color:var(--text-dark);}
  .finalize-modal-footer-stack{
    padding:14px 18px;
    border-top:1px solid var(--panel-border);
    display:flex;
    flex-direction:column;
    gap:8px;
  }
  .finalize-btn-row{display:flex; gap:10px;}
  .finalize-btn-cancel{
    padding:9px 16px;
    border-radius:8px;
    background:none;
    border:none;
    font-size:12.5px;
    font-weight:600;
    color:var(--text-muted);
    cursor:pointer;
    font-family:var(--font);
    text-align:center;
  }
  .finalize-btn-cancel:hover{color:var(--text-dark);}
  .finalize-btn-onlyme{
    flex:1;
    padding:10px 14px;
    border-radius:8px;
    background:#f0efec;
    border:none;
    font-size:13px;
    font-weight:700;
    color:var(--text-dark);
    cursor:pointer;
    font-family:var(--font);
  }
  .finalize-btn-onlyme:hover{background:#e5e3de;}
  .finalize-btn-everyone{
    flex:1;
    padding:10px 14px;
    border-radius:8px;
    background:#fee2e2;
    border:none;
    font-size:13px;
    font-weight:700;
    color:#b91c1c;
    cursor:pointer;
    font-family:var(--font);
  }
  .finalize-btn-everyone:hover{background:#fecaca;}
  .finalize-btn-single{
    flex:1;
    padding:10px 14px;
    border-radius:8px;
    background:linear-gradient(135deg,#f87171,#dc2626);
    border:none;
    font-size:13px;
    font-weight:700;
    color:#fff;
    cursor:pointer;
    font-family:var(--font);
  }

  /* ===== POPUP DE CADASTRAR CONTATO ===== */
  .register-modal{width:440px;}
  .register-modal-body{
    padding:18px;
    max-height:60vh;
    overflow-y:auto;
  }
  .register-input{
    width:100%;
    border:1px solid var(--panel-border);
    border-radius:9px;
    padding:9px 12px;
    font-size:13px;
    font-family:var(--font);
    color:var(--text-dark);
    outline:none;
    margin-top:2px;
  }
  .register-input:disabled{background:#f7f6f3; color:var(--text-muted);}
  .company-filter-select{cursor:pointer; font-size:11px; padding:7px 8px;}
  .transfer-top-row{display:flex; gap:12px; align-items:flex-start;}
  .transfer-top-col{flex:1; min-width:0;}
  .transfer-top-col.narrow{flex:0 0 36%;}
  .company-name-small{font-size:9px; color:var(--text-muted);}
  .register-type-options{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:2px;
  }
  .register-type-chip{
    padding:7px 14px;
    border-radius:20px;
    border:1.5px solid transparent;
    font-size:12px;
    font-weight:700;
    cursor:pointer;
    font-family:var(--font);
    opacity:.55;
  }
  .register-type-chip.selected{
    opacity:1;
    border-color:currentColor;
  }
  .register-new-type-row{margin-top:8px;}
  .register-new-type-toggle{
    font-size:11.5px;
    color:var(--green-dark);
    font-weight:700;
    cursor:pointer;
    background:none;
    border:none;
    padding:3px 0;
    font-family:var(--font);
  }
  .register-new-type-form{
    display:none;
    flex-direction:column;
    gap:8px;
    margin-top:8px;
    padding:10px;
    background:#f7f6f3;
    border-radius:9px;
  }
  .register-new-type-form.open{display:flex;}
  .register-new-type-form input{
    border:1px solid var(--panel-border);
    border-radius:7px;
    padding:7px 10px;
    font-size:12.5px;
    font-family:var(--font);
    outline:none;
    color:var(--text-dark);
  }
  .register-new-type-colors{display:flex; gap:6px; flex-wrap:wrap;}
  .register-new-type-swatch{
    width:22px;height:22px;
    border-radius:6px;
    cursor:pointer;
    border:2px solid transparent;
  }
  .register-new-type-swatch.selected{border-color:#1b1d1f;}
  .register-new-type-create{
    background:linear-gradient(135deg,var(--green-1),var(--green-dark));
    color:#04140a;
    border:none;
    border-radius:7px;
    padding:8px 10px;
    font-size:12.5px;
    font-weight:700;
    cursor:pointer;
    font-family:var(--font);
  }
  .register-divider{
    height:1px;
    background:var(--panel-border);
    margin:18px 0 14px 0;
  }
  .register-row-2{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
  }
  .register-doc-row{
    display:flex;
    gap:8px;
    margin-top:2px;
  }
  .register-doc-toggle{
    display:flex;
    border:1px solid var(--panel-border);
    border-radius:9px;
    overflow:hidden;
    flex-shrink:0;
  }
  .register-doc-btn{
    padding:9px 12px;
    background:#f0efec;
    border:none;
    font-size:12px;
    font-weight:700;
    color:var(--text-muted);
    cursor:pointer;
    font-family:var(--font);
  }
  .register-doc-btn.active{
    background:linear-gradient(135deg,var(--green-1),var(--green-dark));
    color:#04140a;
  }
  .register-doc-row .register-input{margin-top:0;}
  .char-counter{font-size:11px; color:var(--text-muted); text-align:right; margin-bottom:4px;}

  /* ===== QR CODE (conectar número) ===== */
  .qr-box{
    width:200px; height:200px; margin:0 auto;
    background:#fff; border:1px solid var(--panel-border); border-radius:12px;
    padding:12px; box-sizing:border-box;
    display:grid; grid-template-columns:repeat(9,1fr); grid-template-rows:repeat(9,1fr); gap:3px;
  }
  .qr-box span{background:var(--text-dark); border-radius:1px;}
  .qr-box span.off{background:transparent;}
  .qr-verifying{
    display:flex; align-items:center; justify-content:center; gap:8px;
    font-size:12.5px; font-weight:600; color:var(--green-dark);
  }
  .qr-spin{
    width:14px; height:14px; border-radius:50%;
    border:2px solid #cdeed6; border-top-color:var(--green-dark);
    animation:qrspin .7s linear infinite;
  }
  @keyframes qrspin{ to{ transform:rotate(360deg); } }

  /* ===== POPUP DE MODELOS APROVADOS (fora da janela de 24h) ===== */
  .template-modal{width:420px;}
  .template-notice{
    display:flex;
    align-items:flex-start;
    gap:8px;
    background:#fff7ed;
    border:1px solid #fde4c4;
    border-radius:9px;
    padding:9px 11px;
    font-size:11.5px;
    color:#9a3412;
    line-height:1.4;
    margin-bottom:12px;
  }
  .template-notice svg{width:15px;height:15px; flex-shrink:0; margin-top:1px;}
  .template-list-wrap{max-height:320px;}
  .template-list{display:flex; flex-direction:column; gap:8px;}
  .template-card{
    border:1.5px solid var(--panel-border);
    border-radius:10px;
    padding:11px 12px;
    cursor:pointer;
  }
  .template-card:hover{background:#f7f6f3;}
  .template-card.selected{border-color:var(--green-1); background:#eef8f0;}
  .template-card-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    margin-bottom:5px;
  }
  .template-card-title{font-size:13px; font-weight:700; color:var(--text-dark);}
  .template-card-cat{
    font-size:9px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.03em;
    padding:2px 7px;
    border-radius:20px;
    flex-shrink:0;
  }
  .template-card-cat.utility{background:#dbeafe; color:#1d4ed8;}
  .template-card-cat.marketing{background:#fef3c7; color:#b45309;}
  .template-card-cat.authentication{background:#ede9fe; color:#6d28d9;}
  .template-card-body{font-size:12px; color:var(--text-muted); line-height:1.4;}
  .template-card-body b{color:var(--text-dark); font-weight:700;}
  .template-vars{
    margin-top:10px;
    padding-top:10px;
    border-top:1px dashed var(--panel-border);
    display:none;
    flex-direction:column;
    gap:8px;
  }
  .template-card.selected .template-vars{display:flex;}
  .template-var-field label{
    display:block;
    font-size:10px;
    font-weight:700;
    color:var(--text-muted);
    text-transform:uppercase;
    letter-spacing:.03em;
    margin-bottom:3px;
  }
  .template-var-field input{
    width:100%;
    border:1px solid var(--panel-border);
    border-radius:7px;
    padding:6px 9px;
    font-size:12.5px;
    font-family:var(--font);
    outline:none;
    color:var(--text-dark);
  }

  /* ===== POPOVER DE ALERTA (mensagem de transferência) ===== */
  .alert-popover{
    position:fixed;
    z-index:1000;
    width:270px;
    background:#fff;
    border:1px solid var(--panel-border);
    border-radius:12px;
    box-shadow:0 12px 32px rgba(0,0,0,.18);
    padding:14px;
  }
  .alert-popover-title{
    display:flex;
    align-items:center;
    gap:6px;
    font-size:12.5px;
    font-weight:700;
    color:#c2410c;
    margin-bottom:8px;
  }
  .alert-popover-title svg{width:15px;height:15px;}
  .alert-popover-meta{font-size:11px; color:var(--text-muted); margin-bottom:8px;}
  .alert-popover-text{font-size:12.5px; color:var(--text-dark); line-height:1.45; white-space:pre-wrap;}
  .alert-popover-empty{font-size:12px; color:var(--text-muted);}

  /* ===== Popover do sininho de notificações ===== */
  .notif-popover{
    position:fixed;
    z-index:1000;
    width:640px;
    max-width:92vw;
    max-height:70vh;
    overflow-y:auto;
    background:#fff;
    border:1px solid var(--panel-border);
    border-radius:12px;
    box-shadow:0 12px 32px rgba(0,0,0,.18);
    padding:8px;
  }
  .notif-popover-header{
    font-size:13px; font-weight:700; color:var(--text-dark);
    padding:6px 8px 8px;
  }
  /* Desktop: as 3 listas lado a lado (Mensagens | Internas | Atividades).
     No celular vira uma coluna só, empilhada, com rolagem — como já era antes. */
  .notif-columns{
    display:flex;
    align-items:flex-start;
    gap:4px;
  }
  .notif-column{
    flex:1;
    min-width:0;
  }
  .notif-column + .notif-column{
    border-left:1px solid var(--panel-border);
    padding-left:10px;
    margin-left:6px;
  }
  .notif-section-title{
    font-size:10px; font-weight:700; color:var(--text-muted);
    text-transform:uppercase; letter-spacing:.05em;
    padding:8px 8px 4px;
  }
  .notif-item{
    display:flex; align-items:center; gap:10px;
    padding:7px 8px; border-radius:8px; cursor:pointer;
    border:none; background:none; width:100%; text-align:left; font-family:var(--font);
  }
  .notif-item:hover{background:#f7f6f3;}
  .notif-item-avatar{
    width:30px;height:30px;border-radius:50%;
    background:linear-gradient(135deg,#4dd576,#1f8a45);
    display:flex;align-items:center;justify-content:center;
    color:#fff;font-weight:700;font-size:11px; flex-shrink:0;
  }
  .notif-item-avatar.ativ{background:linear-gradient(135deg,#60a5fa,#2563eb);}
  .notif-item-body{flex:1; min-width:0;}
  .notif-item-name{font-size:12.5px; font-weight:600; color:var(--text-dark); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .notif-item-preview{font-size:11px; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .notif-item-badge{
    background:var(--red); color:#fff; font-size:9.5px; font-weight:700;
    min-width:17px; height:17px; border-radius:20px;
    display:flex; align-items:center; justify-content:center; padding:0 4px; flex-shrink:0;
  }
  .notif-item-badge.vencida{background:var(--red);}
  .notif-item-badge.hoje{background:#f5b301;}
  .notif-empty{padding:22px 10px; text-align:center; color:var(--text-muted); font-size:12.5px;}
  .notif-column .notif-empty{padding:14px 4px; font-size:11.5px;}

  @media (max-width:768px){
    .notif-popover{ width:92vw; max-width:340px; }
    .notif-columns{ display:block; }
    .notif-column + .notif-column{
      border-left:none;
      padding-left:0;
      margin-left:0;
      border-top:1px solid var(--panel-border);
      padding-top:6px;
      margin-top:6px;
    }
  }

  /* ===== Popover de preferências de som (clique no nome do atendente) ===== */
  .sound-popover{
    position:fixed;
    z-index:1000;
    width:260px;
    background:#fff;
    border:1px solid var(--panel-border);
    border-radius:12px;
    box-shadow:0 12px 32px rgba(0,0,0,.18);
    padding:14px;
  }
  .sound-popover-title{font-size:12.5px; font-weight:700; color:var(--text-dark); margin-bottom:2px;}
  .sound-popover-hint{font-size:11px; color:var(--text-muted); margin-bottom:10px; line-height:1.4;}
  .sound-row{
    display:flex; align-items:center; justify-content:space-between; gap:10px;
    padding:8px 0;
  }
  .sound-row + .sound-row{border-top:1px solid var(--panel-border);}
  .sound-row-label{font-size:12px; color:var(--text-dark);}

  .chat-type-tag{
    display:inline-flex;
    align-items:center;
    font-size:8.5px;
    font-weight:700;
    padding:1.5px 6px;
    border-radius:4px;
    text-transform:uppercase;
    letter-spacing:.03em;
    flex-shrink:0;
  }
  .chat-type-tags-wrap{display:inline-flex; align-items:center; gap:4px; cursor:pointer;}
  .cadastrar-btn-header{
    display:inline-flex;
    align-items:center;
    gap:4px;
    font-size:10.5px;
    font-weight:700;
    padding:3px 10px;
    border-radius:20px;
    border:1px dashed #b9b6b0;
    background:none;
    color:var(--text-muted);
    cursor:pointer;
    font-family:var(--font);
    text-transform:uppercase;
    letter-spacing:.02em;
    white-space:nowrap;
    flex-shrink:0;
  }
  .cadastrar-btn-header.icon-only{
    padding:0;
    width:22px; height:22px;
    justify-content:center;
    border-radius:6px;
  }
  .cadastrar-btn-header.icon-only svg{width:13px; height:13px; flex-shrink:0;}
  .cadastrar-btn-header:hover{background:#f0efec; color:var(--text-dark); border-color:#9a978f;}
  .chat-header-actions{display:flex; gap:8px; align-items:center;}
  .header-action-btn{
    display:flex;
    align-items:center;
    justify-content:center;
    width:34px;
    height:34px;
    padding:0;
    border-radius:8px;
    background:#f0efec;
    border:none;
    color:#3f4347;
    font-size:12px;
    font-weight:600;
    font-family:var(--font);
    cursor:pointer;
    white-space:nowrap;
    transition:background .15s ease, color .15s ease;
    flex-shrink:0;
  }
  .header-action-btn span{display:none;}
  .header-action-btn svg{width:16px; height:16px; flex-shrink:0;}
  .header-action-btn:hover{background:#e5e3de;}
  .header-action-btn:disabled{opacity:.35; cursor:not-allowed; pointer-events:none;}
  .header-action-btn.danger{
    background:#fee2e2;
    color:#b91c1c;
  }
  .header-action-btn.danger:hover{background:#fecaca;}
  .header-action-btn.done{
    background:#dcfce7;
    color:#15803d;
  }

  .dots-menu{
    position:fixed;
    z-index:1000;
    width:210px;
    background:#fff;
    border:1px solid var(--panel-border);
    border-radius:12px;
    box-shadow:0 12px 32px rgba(0,0,0,.18);
    padding:6px;
  }
  .dots-menu-item{
    display:flex;
    align-items:center;
    gap:10px;
    padding:9px 10px;
    border-radius:8px;
    font-size:13px;
    color:var(--text-dark);
    cursor:pointer;
    background:none;
    border:none;
    width:100%;
    text-align:left;
    font-family:var(--font);
  }
  .dots-menu-item svg{width:16px; height:16px; color:#54595e; flex-shrink:0;}
  .dots-menu-item:hover{background:#f7f6f3;}
  .dots-menu-item.danger{color:#b91c1c;}
  .dots-menu-item.danger svg{color:#b91c1c;}
  .dots-menu-divider{height:1px; background:var(--panel-border); margin:5px 4px;}

  /* Divisor de seção em formulários longos (ex: cadastro de atendente), pra separar
     visualmente blocos de campo diferentes sem parecer só mais um campo. */
  .form-section-divider{
    display:flex; align-items:center; gap:10px;
    margin:22px 0 14px 0;
  }
  .form-section-divider::before, .form-section-divider::after{
    content:''; flex:1; height:2px; background:var(--green-1); opacity:.35; border-radius:2px;
  }
  .form-section-divider span{
    font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.05em;
    color:var(--green-dark); white-space:nowrap;
  }
  .form-section-divider:first-child{margin-top:0;}

  /* ===== OPERADORES > ACESSOS (perfis de permissão + liberações individuais) ===== */
  .acessos-subtabs{display:flex; gap:6px; margin-bottom:16px;}
  .perfil-card-icon{background:#dbeafe; color:#1d4ed8;}
  .perfil-card-icon.is-master{background:#fef3c7; color:#b45309;}
  .perfil-master-flag{
    font-size:8.5px; font-weight:700; text-transform:uppercase; letter-spacing:.03em;
    background:#fef3c7; color:#b45309; padding:1.5px 6px; border-radius:4px;
  }
  .perfil-card-desc{font-size:11.5px; color:var(--text-muted); margin-top:2px;}
  .perfil-master-note{
    display:flex; gap:9px; align-items:flex-start;
    background:#fffbeb; border:1px solid #fde68a; border-radius:10px;
    padding:11px 13px; font-size:12px; line-height:1.45; color:#92400e; margin:0 18px 14px 18px;
  }
  .perfil-master-note svg{width:16px;height:16px; flex-shrink:0; margin-top:1px;}

  .perfil-cargos-selected{display:flex; flex-wrap:wrap; gap:6px; margin-top:2px; min-height:0;}
  .perfil-cargos-selected:empty::before{
    content:'Nenhum cargo vinculado ainda.';
    font-size:11.5px; color:var(--text-muted);
  }
  .perfil-cargo-chip-selected{
    display:flex; align-items:center; gap:6px;
    padding:5px 6px 5px 12px; border-radius:20px;
    background:#eef8f0; border:1.5px solid var(--green-1);
    color:var(--green-dark); font-size:11.5px; font-weight:700;
  }
  .perfil-cargo-chip-selected button{
    width:16px; height:16px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    background:none; border:none; color:var(--green-dark); cursor:pointer; flex-shrink:0;
  }
  .perfil-cargo-chip-selected button:hover{background:rgba(21,128,61,.15);}
  .perfil-cargo-chip-selected button svg{width:11px;height:11px;}
  .perfil-cargos-search-box{margin-top:9px; max-width:none;}
  .perfil-cargos-count-hint{font-size:11px; color:var(--text-muted); margin:6px 0 4px 2px;}
  .perfil-cargos-list-wrap{
    max-height:calc(88vh - 340px); overflow-y:auto;
    border:1px solid var(--panel-border); border-radius:10px;
    padding:5px;
  }
  /* Campo de escolha múltipla em formato dropdown: a lista só aparece flutuando por
     cima ao focar o campo de busca, em vez de ficar sempre aberta ocupando espaço —
     melhor quando há muitos itens pra escolher (ex: departamentos). */
  .perfil-dropdown-wrap{position:relative;}
  .perfil-dropdown-list{
    display:none;
    position:absolute; top:calc(100% + 4px); left:0; right:0;
    max-height:200px; overflow-y:auto;
    background:#fff; z-index:60;
    box-shadow:0 6px 20px rgba(0,0,0,.12);
  }
  .perfil-dropdown-wrap.open .perfil-dropdown-list{display:block;}
  .perfil-cargo-option{
    display:flex; align-items:center; gap:9px;
    padding:7px 8px; border-radius:8px; cursor:pointer;
    font-size:12.5px; color:var(--text-dark);
  }
  .perfil-cargo-option:hover{background:#f7f6f3;}
  .perfil-cargo-option.selected{color:var(--green-dark); font-weight:700;}

  .perm-search-row{padding:0 18px 12px 18px;}
  .perm-category{border-bottom:1px solid var(--panel-border);}
  .perm-category:last-child{border-bottom:none;}
  .perm-category.perm-no-match{display:none;}
  .perm-category-header{
    display:flex; align-items:center; justify-content:space-between;
    padding:12px 18px; cursor:pointer;
  }
  .perm-category-title{font-size:11.5px; font-weight:700; color:var(--text-dark); text-transform:uppercase; letter-spacing:.04em;}
  .perm-category-count{font-size:10.5px; color:var(--text-muted); font-weight:600; margin-left:6px; text-transform:none; letter-spacing:0;}
  .perm-category-chevron{width:14px;height:14px; color:var(--text-muted); transition:transform .15s ease; flex-shrink:0;}
  .perm-category.open .perm-category-chevron{transform:rotate(180deg);}
  .perm-category-body{display:none; padding:0 18px 12px 18px;}
  .perm-category.open .perm-category-body{display:block;}

  .perm-category-bulk{
    display:flex; align-items:center; gap:7px;
    background:#f7f6f3; border:1px solid var(--panel-border); border-radius:9px;
    padding:8px 9px; margin-bottom:10px; flex-wrap:wrap;
  }
  .perm-category-bulk span{font-size:10.5px; color:var(--text-muted); font-weight:700; flex-shrink:0;}
  .perm-category-bulk select{flex-shrink:0;}
  .perm-bulk-apply-btn{
    background:#1b1d1f; color:#fff; border:none; border-radius:7px;
    padding:6px 12px; font-size:10.8px; font-weight:700;
    cursor:pointer; font-family:var(--font); flex-shrink:0; margin-left:auto;
  }
  .perm-bulk-apply-btn:hover{background:#000;}

  .perm-column-legend{
    display:flex; align-items:center; gap:10px;
    padding:2px 0 7px 0; margin-bottom:2px;
  }
  .perm-column-legend span{font-size:9px; text-transform:uppercase; letter-spacing:.05em; font-weight:700; color:#b3b0aa;}
  .perm-column-legend span:first-child{flex:1;}
  .perm-legend-acao{width:228px; text-align:center; flex-shrink:0;}
  .perm-legend-abrangencia{width:150px; text-align:center; flex-shrink:0;}

  .perm-row{
    display:flex; align-items:center; gap:10px;
    padding:7px 0; border-bottom:1px solid #f2f0ec;
  }
  .perm-row:last-child{border-bottom:none;}
  .perm-row.is-off .perm-row-label{color:var(--text-muted);}
  .perm-row-label{flex:1; min-width:0; font-size:12.5px; color:var(--text-dark);}

  .perm-acao-group{
    display:flex; background:#f0efec; border-radius:8px; padding:2px; gap:1px;
    width:228px; flex-shrink:0;
  }
  .perm-acao-btn{
    flex:1; border:none; background:transparent; font-family:var(--font);
    font-size:10px; font-weight:700; padding:6px 4px; border-radius:6px;
    cursor:pointer; color:var(--text-muted); white-space:nowrap;
  }
  .perm-acao-btn:hover{color:var(--text-dark);}
  .perm-acao-btn.active{background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.15);}
  .perm-acao-btn.perm-acao-sem.active{color:#8a8f95;}
  .perm-acao-btn.perm-acao-visualizar.active{color:#1d4ed8;}
  .perm-acao-btn.perm-acao-editar.active{color:#b45309;}
  .perm-acao-btn.perm-acao-gerenciar.active{color:var(--green-dark);}
  .perm-acao-btn:disabled{cursor:not-allowed; opacity:.7;}

  .perm-help-btn{
    width:18px; height:18px; border-radius:50%; flex-shrink:0;
    background:#f0efec; border:none; color:var(--text-muted);
    font-size:11px; font-weight:800; cursor:pointer;
    display:inline-flex; align-items:center; justify-content:center;
    font-family:var(--font); line-height:1;
  }
  .perm-help-btn:hover{background:#e5e3de; color:var(--text-dark);}
  .perm-help-box{
    background:#f7f6f3; border:1px solid var(--panel-border); border-radius:10px;
    padding:11px 13px; font-size:11.5px; color:var(--text-muted); line-height:1.5;
    margin-bottom:14px;
  }
  .perm-help-box p{margin:0;}
  .perm-help-box b{color:var(--text-dark);}
  .cargo-abrangencia-opcao{margin-bottom:8px;}

  .perm-select{
    background:#f0efec; border:none; border-radius:7px;
    padding:6px 8px; font-size:10.8px; font-family:var(--font);
    color:var(--text-dark); cursor:pointer; outline:none; flex-shrink:0;
  }
  .perm-select-acao{width:112px;}
  .perm-select-abrangencia{width:150px; flex-shrink:0;}
  .perm-select-abrangencia:disabled{opacity:.4; cursor:not-allowed;}

  .perm-exception-row{
    display:flex; align-items:center; gap:8px;
    background:#f7f6f3; border:1px solid var(--panel-border);
    border-radius:10px; padding:9px 11px; margin-bottom:7px;
  }
  .perm-exception-row .perm-row-label{font-weight:600;}
  .perm-exception-remove{
    width:26px; height:26px; border-radius:7px; flex-shrink:0;
    display:flex; align-items:center; justify-content:center;
    background:none; border:none; color:var(--red); cursor:pointer;
  }
  .perm-exception-remove:hover{background:#fee2e2;}
  .perm-exception-remove svg{width:14px;height:14px;}
  .perm-add-exception-row{display:flex; gap:8px; align-items:center; margin-top:4px;}
  .perm-add-exception-row select{flex:1; min-width:0;}
  .perm-empty-exceptions{font-size:12px; color:var(--text-muted); padding:6px 2px 12px 2px;}

  .usuario-perfil-chip{
    display:inline-flex; align-items:center; gap:4px;
    font-size:10.5px; font-weight:700;
    padding:2.5px 8px; border-radius:20px;
    background:#eef2ff; color:#4338ca;
  }
  .usuario-exceptions-badge{
    font-size:10px; font-weight:700; color:#b45309;
    background:#fef3c7; padding:2px 7px; border-radius:20px;
  }
  .usuario-perm-manage-btn{
    display:flex; align-items:center; gap:5px;
    background:#f0efec; border:none; border-radius:8px;
    padding:7px 11px; font-size:11.5px; font-weight:700;
    color:var(--text-dark); cursor:pointer; font-family:var(--font); flex-shrink:0;
  }
  .usuario-perm-manage-btn:hover{background:#e5e3de;}
  .usuario-perm-manage-btn svg{width:14px;height:14px;}

  .transfer-modal.wide{width:740px;}
  .transfer-modal.perfil-modal-large{
    width:90vw; max-width:1600px;
    height:88vh; max-height:88vh;
  }
  .perfil-modal-split{
    display:flex; flex:1; min-height:0; overflow:hidden;
  }
  .perfil-modal-left{
    width:360px; flex-shrink:0;
    border-right:1px solid var(--panel-border);
    padding:18px; overflow-y:auto;
  }
  .perfil-modal-right{
    flex:1; min-width:0;
    display:flex; flex-direction:column; overflow:hidden;
  }
  .perfil-modal-right .perm-search-row{padding:18px 22px 12px 22px; flex-shrink:0;}
  .perfil-permissoes-scroll{
    flex:1; overflow-y:auto; padding:0 22px 16px 22px;
  }
  @media (max-width:900px){
    .perfil-modal-split{flex-direction:column;}
    .perfil-modal-left{width:auto; border-right:none; border-bottom:1px solid var(--panel-border);}
  }
  .perfil-applied-box{
    display:flex; align-items:center; justify-content:space-between;
    background:#f7f6f3; border:1px solid var(--panel-border); border-radius:10px;
    padding:10px 13px; margin:0 18px 14px 18px;
  }
  .perfil-applied-box-text{font-size:12px; color:var(--text-muted);}
  .perfil-applied-box-text b{color:var(--text-dark);}

  /* ===== PAINEL DE DADOS DO CONTATO (estilo WhatsApp) ===== */
  .contact-info-backdrop{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.25);
    opacity:0;
    pointer-events:none;
    transition:opacity .2s ease;
    z-index:40;
  }
  .contact-info-backdrop.open{opacity:1; pointer-events:auto;}

  .contact-info-panel{
    position:absolute;
    top:0; right:0; bottom:0;
    width:340px;
    max-width:88%;
    background:#fff;
    border-left:1px solid var(--panel-border);
    box-shadow:-8px 0 24px rgba(0,0,0,.12);
    transform:translateX(100%);
    transition:transform .25s ease;
    z-index:41;
    display:flex;
    flex-direction:column;
  }
  .contact-info-panel.open{transform:translateX(0);}

  .cip-header{
    display:flex;
    align-items:center;
    gap:14px;
    padding:14px 18px;
    border-bottom:1px solid var(--panel-border);
    font-size:14px;
    font-weight:700;
    color:var(--text-dark);
    flex-shrink:0;
  }
  .cip-close{
    width:28px;height:28px;
    border-radius:50%;
    background:none;
    border:none;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#54595e;
    cursor:pointer;
    flex-shrink:0;
  }
  .cip-close:hover{background:#f0efec;}
  .cip-close svg{width:16px;height:16px;}

  .cip-body{
    flex:1;
    overflow-y:auto;
    padding-bottom:20px;
  }
  .cip-hero{
    display:flex;
    flex-direction:column;
    align-items:center;
    padding:28px 20px 20px 20px;
    border-bottom:8px solid #f4f2ee;
  }
  .cip-tags-row{display:flex; align-items:center; justify-content:center; gap:6px; flex-wrap:wrap; margin-top:6px;}
  .cip-avatar{
    width:96px;height:96px;border-radius:50%;
    background:linear-gradient(135deg,#4dd576,#1f8a45);
    display:flex;align-items:center;justify-content:center;
    color:#fff;font-weight:700;font-size:32px;
    margin-bottom:14px;
    flex-shrink:0;
  }
  .cip-name{font-size:17px; font-weight:700; color:var(--text-dark); text-align:center;}
  .cip-status{font-size:12.5px; color:var(--text-muted); margin-top:3px;}
  .cip-tag{margin-top:10px;}

  .cip-section{padding:16px 20px; border-bottom:8px solid #f4f2ee;}
  .cip-section:last-child{border-bottom:none;}
  .cip-section-title{
    font-size:10.5px;
    font-weight:700;
    color:var(--text-muted);
    text-transform:uppercase;
    letter-spacing:.05em;
    margin-bottom:10px;
  }
  .cip-row{
    display:flex;
    align-items:flex-start;
    gap:12px;
    padding:6px 0;
  }
  .cip-row svg{width:17px;height:17px; color:#54595e; flex-shrink:0; margin-top:1px;}
  .cip-row-text{flex:1; min-width:0;}
  .cip-row-main{font-size:13.5px; color:var(--text-dark);}
  .cip-row-sub{font-size:11.5px; color:var(--text-muted); margin-top:1px;}

  .cip-markers{display:flex; flex-wrap:wrap; gap:6px;}
  .cip-empty{font-size:12px; color:var(--text-muted);}

  .cip-toggle-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:8px 0;
    font-size:13.5px;
    color:var(--text-dark);
  }
  .cip-switch{
    width:36px; height:20px;
    border-radius:20px;
    background:#d9d7d2;
    position:relative;
    cursor:pointer;
    border:none;
    flex-shrink:0;
  }
  .cip-switch::after{
    content:'';
    position:absolute;
    top:2px; left:2px;
    width:16px; height:16px;
    border-radius:50%;
    background:#fff;
    transition:left .15s ease;
    box-shadow:0 1px 2px rgba(0,0,0,.25);
  }
  .cip-switch.on{background:var(--green-1);}
  .cip-switch.on::after{left:18px;}

  /* ===== MODAL: mensagem automática de retorno ===== */
  .autofollow-toggle-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding-bottom:14px;
    border-bottom:1px solid var(--panel-border);
  }
  .autofollow-hint{font-size:11.5px; color:var(--text-muted); margin-top:2px; line-height:1.4;}
  .autofollow-hours-row{
    display:flex;
    align-items:center;
    gap:8px;
  }
  .autofollow-hours-input{width:80px; text-align:center; font-weight:700;}
  .autofollow-hours-row span{font-size:12.5px; color:var(--text-muted);}
  .autofollow-template-preview{
    margin-top:10px;
    padding:10px 12px;
    background:#f7f6f3;
    border-radius:9px;
    font-size:12.5px;
    color:var(--text-dark);
    line-height:1.5;
    border:1px solid var(--panel-border);
  }
  .autofollow-template-preview.empty{color:var(--text-muted); font-style:italic;}
  .header-action-btn.autofollow-active{background:#dbeafe; color:#1d4ed8;}
  .header-action-btn.autofollow-active:hover{background:#c7dcfb;}

  .cip-danger-btn{
    display:flex;
    align-items:center;
    gap:12px;
    width:100%;
    background:none;
    border:none;
    padding:8px 0;
    font-size:13.5px;
    color:#b91c1c;
    cursor:pointer;
    font-family:var(--font);
    text-align:left;
  }
  .cip-danger-btn svg{width:17px;height:17px; flex-shrink:0;}

  .messages{
    flex:1;
    overflow-y:auto;
    padding:20px 8%;
    display:flex;
    flex-direction:column;
    gap:3px;
  }
  .date-chip{
    align-self:center;
    background:#f5f0e5;
    color:#7c7360;
    font-size:11.5px;
    font-weight:600;
    padding:5px 12px;
    border-radius:8px;
    margin:12px 0 14px 0;
    box-shadow:0 1px 1px rgba(0,0,0,.06);
  }
  .date-chip.system-chip{
    background:#eef1ee;
    color:#57606a;
    font-weight:500;
    text-align:center;
    max-width:80%;
  }
  .bubble-row{display:flex; margin-bottom:3px;}
  .bubble-row.out{justify-content:flex-end;}
  .bubble{
    max-width:62%;
    padding:7px 11px 8px 11px;
    border-radius:9px;
    font-size:13.8px;
    line-height:1.4;
    position:relative;
    box-shadow:0 1px 1px rgba(0,0,0,.08);
  }
  .bubble.in{background:var(--bubble-in); border-top-left-radius:2px;}
  .bubble.out{background:var(--bubble-out); border-top-right-radius:2px;}
  .bubble-template-badge{
    font-size:9px;
    font-weight:800;
    letter-spacing:.04em;
    color:var(--green-dark);
    margin-bottom:3px;
  }
  .bubble .meta{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:4px;
    margin-top:3px;
    font-size:10.5px;
    color:var(--text-muted);
  }
  .bubble .meta svg{width:14px;height:14px;color:#53bdeb;}

  .composer{
    background:var(--panel-bg);
    border-top:1px solid var(--panel-border);
    padding:12px 18px;
    display:flex;
    align-items:center;
    gap:12px;
  }
  .composer svg{width:22px; height:22px; color:#54595e; cursor:pointer; flex-shrink:0;}
  .composer input{
    flex:1;
    border:none;
    background:#f0efec;
    border-radius:20px;
    padding:10px 16px;
    font-size:13.8px;
    outline:none;
    font-family:var(--font);
  }
  .send-btn{
    width:38px;height:38px;
    border-radius:50%;
    background:linear-gradient(135deg,var(--green-1),var(--green-dark));
    display:flex;align-items:center;justify-content:center;
    cursor:pointer;
    border:none;
    flex-shrink:0;
  }
  .send-btn svg{width:17px;height:17px; color:#04140a; margin-left:-1px;}

  .composer-locked{
    background:#fff7ed;
    border-top:1px solid #fde4c4;
    padding:12px 18px;
    display:flex;
    align-items:center;
    gap:12px;
  }
  .composer-locked-icon{
    width:34px;height:34px;
    border-radius:50%;
    background:#fed7aa;
    color:#c2410c;
    display:flex;align-items:center;justify-content:center;
    flex-shrink:0;
  }
  .composer-locked-icon svg{width:17px;height:17px;}
  .composer-locked-text{flex:1; min-width:0;}
  .composer-locked-title{font-size:13px; font-weight:700; color:#9a3412;}
  .composer-locked-sub{font-size:11.5px; color:#b45309; margin-top:1px;}
  .composer-locked-btn{
    flex-shrink:0;
    background:linear-gradient(135deg,var(--green-1),var(--green-dark));
    color:#04140a;
    border:none;
    border-radius:8px;
    padding:9px 16px;
    font-size:12.5px;
    font-weight:700;
    cursor:pointer;
    font-family:var(--font);
  }

  ::-webkit-scrollbar{width:7px; height:7px;}
  ::-webkit-scrollbar-thumb{background:#d7d3cb; border-radius:10px;}

  .app-toast{
    position:fixed;
    bottom:24px;
    left:50%;
    transform:translateX(-50%) translateY(10px);
    background:#1b1d1f;
    color:#fff;
    font-size:13px;
    font-weight:500;
    padding:11px 18px;
    border-radius:10px;
    box-shadow:0 8px 24px rgba(0,0,0,.25);
    z-index:2000;
    opacity:0;
    transition:opacity .25s ease, transform .25s ease;
    pointer-events:none;
  }
  .app-toast.show{opacity:1; transform:translateX(-50%) translateY(0);}
  /* ===== IMPRESSÃO / EXPORTAR PDF ===== */
  @media print{
    @page{ size:A4 landscape; margin:12mm; }
    body{ background:#fff !important; }
    .sidebar, .config-subnav,
    .dash-header-controls,
    .dash-alert-filters, .dash-drill-filter-row,
    .dash-alerts-header a,
    .udash-filters-row, #udash-tabs, .udash-print-btn,
    .info-tip{ display:none !important; }

    .app{ height:auto !important; overflow:visible !important; display:block !important; }
    .config-view{ display:block !important; }
    .config-content{ overflow:visible !important; height:auto !important; padding:0 !important; }
    .config-panel{ display:block !important; }

    .dash-header{ margin-bottom:14px; }
    .dash-alerts-card, .dash-kpi-hero-card, .dash-kpi-secondary-card{
      box-shadow:none !important; border:1px solid #ddd !important; break-inside:avoid;
    }
    .dash-kpi-hero-grid, .dash-kpi-secondary-grid{ break-inside:avoid; }
    .dash-drill-table-wrap{ overflow:visible !important; }
    .udash-table-wrap{ overflow:visible !important; border:1px solid #ddd !important; }
    .udash-contact-block{ break-inside:avoid; }
  }

  /* ===== DASHBOARD > USUÁRIOS (resumo, conversas e consulta por data) ===== */
  .udash-filters-row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:16px 0 18px; }
  .udash-filters-row .filter-select{ background:#fff; border:1px solid var(--panel-border); }
  input.udash-input{
    background:#fff; border:1px solid var(--panel-border); border-radius:8px; padding:6px 10px;
    font-size:11.5px; font-family:var(--font); color:var(--text-dark); cursor:pointer; outline:none;
  }
  .udash-print-btn{
    display:flex; align-items:center; gap:6px; margin-left:auto;
    background:#fff; border:1px solid var(--panel-border); border-radius:9px; padding:8px 14px;
    font-size:12px; font-weight:700; color:var(--text-dark); cursor:pointer; font-family:var(--font);
  }
  .udash-print-btn:hover{ background:#f0efec; }
  .udash-print-btn svg{ width:14px; height:14px; }

  .udash-table-wrap{
    background:#fff; border:1px solid var(--panel-border); border-radius:14px; overflow-x:auto;
  }
  table.udash-table{ width:100%; border-collapse:collapse; font-size:12.5px; }
  table.udash-table thead th{
    text-align:left; padding:12px 14px; font-size:10.5px; font-weight:800; text-transform:uppercase;
    letter-spacing:.02em; color:var(--text-muted); border-bottom:1px solid var(--panel-border); white-space:nowrap;
  }
  table.udash-table tbody td{ padding:11px 14px; border-bottom:1px solid var(--panel-border); color:var(--text-dark); white-space:nowrap; }
  table.udash-table tbody tr:last-child td{ border-bottom:none; }
  table.udash-table tbody tr.udash-row{ cursor:pointer; }
  table.udash-table tbody tr.udash-row:hover{ background:#faf9f7; }
  table.udash-table tbody tr.udash-row.selected{ background:#eafaf0; }
  .udash-empty-row{ text-align:center; color:var(--text-muted); padding:30px 10px !important; white-space:normal !important; }
  .udash-empty-state{ padding:50px 20px; text-align:center; color:var(--text-muted); font-size:12.5px; background:#fff; border:1px solid var(--panel-border); border-radius:14px; }

  .udash-conversas-header{ display:flex; align-items:center; gap:16px; margin-bottom:16px; flex-wrap:wrap; }
  .udash-conversas-user-name{ font-size:16px; font-weight:800; color:var(--text-dark); }
  .udash-conversas-user-sub{ font-size:12px; color:var(--text-muted); margin-top:2px; }

  .udash-deleted-tag{ font-size:10.5px; font-weight:700; color:var(--red); background:#fdeceb; padding:3px 9px; border-radius:20px; }
  .udash-ok-tag{ font-size:10.5px; font-weight:700; color:var(--green-dark); background:#e7f8ed; padding:3px 9px; border-radius:20px; }

  /* --- Transcript de mensagens (balões), reaproveitando o visual do chat --- */
  .udash-contact-block{ background:#fff; border:1px solid var(--panel-border); border-radius:14px; margin-bottom:16px; overflow:hidden; break-inside:avoid; }
  .udash-contact-block-header{
    display:flex; align-items:center; justify-content:space-between; gap:10px;
    padding:13px 18px; border-bottom:1px solid var(--panel-border); background:#faf9f7;
  }
  .udash-contact-block-header .name{ font-size:13.5px; font-weight:800; color:var(--text-dark); }
  .udash-contact-block-header .sub{ font-size:11px; color:var(--text-muted); margin-top:2px; }
  .udash-conv-deleted-badge{ font-size:10.5px; font-weight:800; color:#fff; background:var(--red); padding:5px 11px; border-radius:20px; flex-shrink:0; }
  .udash-contact-block-body{ padding:16px 18px; display:flex; flex-direction:column; gap:2px; background:#fdfcfb; }
  .udash-day-sep{ text-align:center; font-size:10.5px; color:var(--text-muted); font-weight:700; margin:12px 0 8px; }
  .udash-day-sep:first-child{ margin-top:0; }
  .udash-bubble-row{ display:flex; margin-bottom:4px; }
  .udash-bubble-row.out{ justify-content:flex-end; }
  .udash-bubble{
    max-width:62%; padding:7px 11px 8px; border-radius:9px; font-size:13px; line-height:1.4;
    box-shadow:0 1px 1px rgba(0,0,0,.08);
  }
  .udash-bubble.in{ background:#fff; border:1px solid var(--panel-border); border-top-left-radius:2px; }
  .udash-bubble.out{ background:var(--bubble-out); border-top-right-radius:2px; }
  .udash-bubble.deleted{ background:#fdeceb !important; border:1px solid #f3b6b2 !important; color:var(--red) !important; }
  .udash-bubble-tag{ display:block; font-size:9.5px; font-weight:800; text-transform:uppercase; letter-spacing:.03em; color:var(--red); margin-bottom:2px; }
  .udash-bubble-time{ font-size:10px; color:var(--text-muted); margin-top:3px; text-align:right; }
  .udash-bubble.deleted .udash-bubble-time{ color:var(--red); opacity:.85; }

  /* ===== ATIVIDADES (agenda/calendário de tarefas) ===== */
  .atividades-view{ flex:1; min-width:0; overflow-y:auto; padding:26px 30px; flex-direction:column; }
  .ativ-summary-row{ display:flex; gap:14px; margin-bottom:20px; flex-wrap:wrap; }
  .ativ-summary-card{
    flex:1; min-width:220px; display:flex; align-items:center; gap:14px;
    background:#fff; border:1px solid var(--panel-border); border-radius:14px;
    padding:16px 18px; cursor:pointer; transition:box-shadow .15s ease, border-color .15s ease;
  }
  .ativ-summary-card:hover{ box-shadow:0 4px 14px -6px rgba(0,0,0,.14); }
  .ativ-summary-card.active{ border-color:currentColor; }
  .ativ-summary-icon{
    width:42px; height:42px; border-radius:11px; flex-shrink:0;
    display:flex; align-items:center; justify-content:center;
  }
  .ativ-summary-icon svg{ width:20px; height:20px; }
  .ativ-summary-card.vencidas .ativ-summary-icon{ background:#fdeceb; color:var(--red); }
  .ativ-summary-card.proximas .ativ-summary-icon{ background:#eafaf0; color:var(--green-dark); }
  .ativ-summary-num{ font-size:22px; font-weight:800; color:var(--text-dark); line-height:1.1; }
  .ativ-summary-label{ font-size:11.5px; color:var(--text-muted); font-weight:600; margin-top:2px; }
  .ativ-summary-clear{
    margin-left:auto; align-self:center; font-size:11.5px; font-weight:700; color:var(--text-muted);
    background:#f0efec; border:none; border-radius:8px; padding:8px 12px; cursor:pointer; font-family:var(--font);
    flex-shrink:0;
  }
  .ativ-summary-clear:hover{ background:#e5e3df; }

  .ativ-toolbar{ display:flex; align-items:center; gap:12px; margin-bottom:18px; flex-wrap:wrap; }
  .ativ-view-toggle{ display:flex; gap:3px; background:#f0efec; padding:3px; border-radius:10px; flex-shrink:0; }
  .ativ-view-btn{
    border:none; background:none; font-family:var(--font); font-size:12px; font-weight:700;
    color:var(--text-muted); padding:7px 14px; border-radius:8px; cursor:pointer;
  }
  .ativ-view-btn.active{ background:#fff; color:var(--text-dark); box-shadow:0 1px 3px rgba(0,0,0,.14); }
  .ativ-nav-group{ display:flex; align-items:center; gap:6px; }
  .ativ-nav-btn{
    width:32px; height:32px; border-radius:9px; border:1px solid var(--panel-border); background:#fff;
    display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--text-dark); flex-shrink:0;
  }
  .ativ-nav-btn:hover{ background:#f0efec; }
  .ativ-nav-btn svg{ width:15px; height:15px; }
  .ativ-today-btn{
    border:1px solid var(--panel-border); background:#fff; border-radius:9px; padding:7px 12px;
    font-size:12px; font-weight:700; color:var(--text-dark); cursor:pointer; font-family:var(--font);
  }
  .ativ-today-btn:hover{ background:#f0efec; }
  .ativ-period-label{ font-size:14.5px; font-weight:700; color:var(--text-dark); text-transform:capitalize; margin:0 4px; }
  .ativ-new-btn{
    margin-left:auto; display:flex; align-items:center; gap:6px;
    background:linear-gradient(135deg, var(--green-1), var(--green-dark)); color:#04140a;
    border:none; border-radius:10px; padding:9px 16px; font-size:12.5px; font-weight:700; cursor:pointer; font-family:var(--font);
    flex-shrink:0;
  }
  .ativ-new-btn svg{ width:14px; height:14px; }

  .ativ-body{ background:#fff; border:1px solid var(--panel-border); border-radius:14px; overflow:hidden; }

  /* --- Mensal --- */
  .ativ-month-weekdays{ display:grid; grid-template-columns:repeat(7,1fr); border-bottom:1px solid var(--panel-border); }
  .ativ-month-weekdays span{ padding:10px 8px; font-size:11px; font-weight:700; color:var(--text-muted); text-align:center; }
  .ativ-month-grid{ display:grid; grid-template-columns:repeat(7,1fr); grid-auto-rows:110px; }
  .ativ-month-cell{
    border-right:1px solid var(--panel-border); border-bottom:1px solid var(--panel-border);
    padding:6px 6px; display:flex; flex-direction:column; gap:3px; cursor:pointer; overflow:hidden;
  }
  .ativ-month-cell:nth-child(7n){ border-right:none; }
  .ativ-month-cell:hover{ background:#faf9f7; }
  .ativ-month-cell.outside{ background:#fbfaf8; color:var(--text-muted); }
  .ativ-month-cell.today .ativ-day-num{
    background:linear-gradient(135deg, var(--green-1), var(--green-dark)); color:#04140a;
    width:22px; height:22px; border-radius:7px; display:flex; align-items:center; justify-content:center;
  }
  .ativ-day-num{ font-size:12px; font-weight:700; color:var(--text-dark); }
  .ativ-month-cell.outside .ativ-day-num{ color:#c7c4be; }
  .ativ-day-chip{
    font-size:10.5px; font-weight:600; padding:2px 6px; border-radius:6px; white-space:nowrap;
    overflow:hidden; text-overflow:ellipsis; display:flex; align-items:center; gap:4px;
  }
  .ativ-day-chip .dot{ width:6px; height:6px; border-radius:50%; flex-shrink:0; }
  .ativ-day-more{ font-size:10px; color:var(--text-muted); font-weight:700; padding:0 4px; }

  /* status colors reutilizados em chip/badge/lista */
  .ativ-status-pendente{ background:#e8f1fd; color:#1d4ed8; }
  .ativ-status-vencida{ background:#fdeceb; color:var(--red); }
  .ativ-status-resolvida{ background:#e7f8ed; color:var(--green-dark); }
  .ativ-status-cancelada{ background:#f0efec; color:var(--text-muted); text-decoration:line-through; }
  .ativ-status-pendente .dot{ background:#1d4ed8; }
  .ativ-status-vencida .dot{ background:var(--red); }
  .ativ-status-resolvida .dot{ background:var(--green-dark); }
  .ativ-status-cancelada .dot{ background:#9a9a9a; }

  /* --- Semanal --- */
  .ativ-week-grid{ display:grid; grid-template-columns:repeat(7,1fr); min-height:420px; }
  .ativ-week-col{ border-right:1px solid var(--panel-border); display:flex; flex-direction:column; }
  .ativ-week-col:last-child{ border-right:none; }
  .ativ-week-col-header{ padding:12px 8px; text-align:center; border-bottom:1px solid var(--panel-border); }
  .ativ-week-col-header .wname{ font-size:10.5px; font-weight:700; color:var(--text-muted); text-transform:uppercase; }
  .ativ-week-col-header .wnum{ font-size:15px; font-weight:800; color:var(--text-dark); margin-top:2px; }
  .ativ-week-col-header.today .wnum{
    background:linear-gradient(135deg, var(--green-1), var(--green-dark)); color:#04140a;
    width:26px; height:26px; border-radius:8px; display:flex; align-items:center; justify-content:center; margin:2px auto 0;
  }
  .ativ-week-col-body{ padding:8px; display:flex; flex-direction:column; gap:6px; cursor:pointer; flex:1; }
  .ativ-week-item{
    border-radius:8px; padding:6px 8px; font-size:11px; font-weight:600; cursor:pointer;
  }
  .ativ-week-item .time{ font-size:10px; font-weight:700; opacity:.8; display:block; margin-bottom:1px; }
  .ativ-week-empty-hint{ font-size:10.5px; color:#c7c4be; text-align:center; margin-top:10px; }

  /* --- Diária --- */
  .ativ-day-list{ padding:10px 16px; }
  .ativ-day-item{
    display:flex; align-items:center; gap:14px; padding:13px 6px; border-bottom:1px solid var(--panel-border);
  }
  .ativ-day-item:last-child{ border-bottom:none; }
  .ativ-day-item-time{ font-size:12.5px; font-weight:800; color:var(--text-dark); width:88px; flex-shrink:0; line-height:1.3; }
  .ativ-day-item-main{ flex:1; min-width:0; cursor:pointer; }
  .ativ-day-item-title{ font-size:13px; font-weight:700; color:var(--text-dark); }
  .ativ-day-item-title.done{ text-decoration:line-through; color:var(--text-muted); }
  .ativ-priority-dot{ font-size:11px; }
  .ativ-day-item-sub{ font-size:11.5px; color:var(--text-muted); margin-top:2px; }
  .ativ-day-item-badge{ font-size:10.5px; font-weight:700; padding:3px 9px; border-radius:20px; flex-shrink:0; }
  .ativ-day-item-actions{ display:flex; gap:6px; flex-shrink:0; }
  .ativ-icon-btn{
    width:28px; height:28px; border-radius:8px; border:1px solid var(--panel-border); background:#fff;
    display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--text-muted);
  }
  .ativ-icon-btn:hover{ background:#f0efec; color:var(--text-dark); }
  .ativ-icon-btn svg{ width:13px; height:13px; }
  .ativ-empty{ padding:50px 20px; text-align:center; color:var(--text-muted); font-size:12.5px; }
  .ativ-empty svg{ width:34px; height:34px; margin-bottom:10px; opacity:.4; }

  /* --- Modal de atividade --- */
  .ativ-detail-status-row{ display:flex; align-items:center; gap:10px; margin-bottom:14px; }
  .ativ-detail-status-row .ativ-day-item-badge{ padding:4px 11px; }
  .ativ-modal-actions-row{ display:flex; gap:8px; flex-wrap:wrap; margin-top:16px; }
  .ativ-action-btn{
    flex:1; min-width:120px; border-radius:9px; padding:9px 10px; font-size:12px; font-weight:700;
    cursor:pointer; font-family:var(--font); border:1px solid var(--panel-border); background:#fff; color:var(--text-dark);
  }
  .ativ-action-btn:hover{ background:#f0efec; }
  .ativ-action-btn.resolve{ background:#e7f8ed; color:var(--green-dark); border-color:#c8ecd4; }
  .ativ-action-btn.resolve:hover{ background:#d9f2e2; }
  .ativ-action-btn.cancel{ background:#fdeceb; color:var(--red); border-color:#f6d4d2; }
  .ativ-action-btn.cancel:hover{ background:#fbdeda; }
  .ativ-action-btn.delete{ color:var(--red); }
  .ativ-textarea{
    width:100%; border:1px solid var(--panel-border); border-radius:9px; padding:9px 12px;
    font-size:13px; font-family:var(--font); color:var(--text-dark); outline:none; margin-top:2px;
    resize:vertical; min-height:56px;
  }
  select.register-input{ cursor:pointer; -webkit-appearance:none; appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c8085' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 10px center; background-size:14px; padding-right:30px; }

  /* --- Buscador de contato (somente cadastrados), filtro por nome/empresa/telefone/cidade --- */
  .ativ-contact-picker{ position:relative; margin-top:2px; }
  .ativ-add-contact-btn{
    display:flex; align-items:center; gap:6px; background:none; border:none; padding:2px 0;
    font-family:var(--font); font-size:12.5px; font-weight:700; color:var(--green-dark); cursor:pointer;
  }
  .ativ-add-contact-btn:hover{ color:var(--green-2); }
  .ativ-add-contact-btn svg{ width:16px; height:16px; flex-shrink:0; }
  .ativ-add-contact-row{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
  .ativ-contact-badge-interno{
    display:inline-block; font-size:9.5px; font-weight:800; letter-spacing:.02em; text-transform:uppercase;
    color:#7c4dd1; background:#f1eafb; border-radius:5px; padding:1px 6px; margin-left:6px; vertical-align:middle;
  }
  .ativ-contact-search-box{
    display:flex; align-items:center; gap:8px; background:#f0efec; border-radius:9px; padding:9px 12px;
  }
  .ativ-contact-search-box svg{ width:14px; height:14px; color:var(--text-muted); flex-shrink:0; }
  .ativ-contact-search-box input{
    border:none; background:transparent; outline:none; font-size:13px; width:100%; font-family:var(--font); color:var(--text-dark);
  }
  .ativ-contact-hint{ font-size:10.5px; color:var(--text-muted); margin-top:5px; }
  .ativ-contact-results{
    margin-top:6px; max-height:190px; overflow-y:auto; border:1px solid var(--panel-border); border-radius:9px; display:none;
  }
  .ativ-contact-results.open{ display:block; }
  .ativ-contact-result-item{ padding:9px 12px; cursor:pointer; border-bottom:1px solid var(--panel-border); }
  .ativ-contact-result-item:last-child{ border-bottom:none; }
  .ativ-contact-result-item:hover{ background:#f7f6f3; }
  .ativ-contact-result-name{ font-size:12.5px; font-weight:700; color:var(--text-dark); }
  .ativ-contact-result-sub{ font-size:10.5px; color:var(--text-muted); margin-top:1px; }
  .ativ-contact-results-empty{ padding:14px 12px; font-size:12px; color:var(--text-muted); text-align:center; }
  .ativ-contact-selected-list{ display:flex; flex-direction:column; gap:6px; }
  .ativ-contact-selected-list:not(:empty){ margin-top:10px; }
  #ativ-contact-search-wrap{ margin-top:8px; }
  .ativ-contact-selected{
    display:flex; align-items:center; justify-content:space-between; gap:10px;
    background:#eafaf0; border:1px solid #cdeedb; border-radius:9px; padding:9px 12px;
  }
  .ativ-contact-selected-name{ font-size:12.5px; font-weight:700; color:var(--text-dark); display:block; }
  .ativ-contact-selected-sub{ font-size:10.5px; color:var(--text-muted); display:block; margin-top:1px; }
  .ativ-contact-remove{
    width:24px; height:24px; border-radius:7px; border:none; background:#fff; color:var(--text-muted);
    display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0;
  }
  .ativ-contact-remove:hover{ color:var(--red); }
  .ativ-contact-remove svg{ width:12px; height:12px; }
  /* ======================================================================
     RESPONSIVIDADE MOBILE
     Abaixo de 768px: navegação vira barra inferior (estilo apps),
     Mensagens/Interno passam a mostrar uma tela por vez (lista <-> chat),
     Configurações fica indisponível e o Dashboard mostra só totais simples.
  ====================================================================== */
  @media (max-width: 768px){

    /* ---- estrutura geral: sidebar vira barra inferior ---- */
    .app{ flex-direction:column; }

    .sidebar{
      order:2;
      position:fixed;
      left:0; right:0; bottom:0;
      width:100%; min-width:0; max-width:none;
      height:58px;
      padding-bottom:env(safe-area-inset-bottom, 0);
      height:calc(58px + env(safe-area-inset-bottom, 0));
      flex-direction:row;
      align-items:center;
      padding-left:4px; padding-right:4px;
      transition:none;
      border-top:1px solid #202224;
      z-index:100;
    }
    .sidebar.collapsed{ width:100%; min-width:0; max-width:none; padding-left:4px; padding-right:4px; }
    .sidebar-toggle, .brand, .sidebar-footer{ display:none; }

    .main{
      order:1; flex:1; min-height:0; min-width:0;
      padding-bottom:calc(58px + env(safe-area-inset-bottom, 0));
    }

    nav#nav{
      flex-direction:row;
      justify-content:space-around;
      align-items:center;
      width:100%;
      margin-top:0;
      gap:0;
    }
    .nav-item{
      flex-direction:column;
      justify-content:center;
      gap:2px;
      padding:6px 2px;
      width:auto;
      flex:1;
      border-radius:8px;
    }
    .nav-item .nav-label{ font-size:8.5px; }
    .nav-item svg{ width:19px; height:19px; }
    .nav-badge{
      position:absolute; top:2px; right:18%;
      min-width:8px; width:8px; height:8px;
      padding:0; font-size:0; border-radius:50%;
    }
    /* Configurações e Dashboard não ficam disponíveis no mobile */
    .nav-item[data-view="config"]{ display:none; }
    .nav-item[data-view="dashboard"]{ display:none; }

    /* ---- Mensagens: uma tela por vez, como o WhatsApp ---- */
    .sector-mensagens{ position:relative; overflow:hidden; }
    .contacts-panel{ width:100%; border-right:none; }
    .chat-panel{
      display:none;
      position:absolute;
      inset:0;
      width:100%;
      background:var(--panel-bg);
      z-index:5;
    }
    body.mobile-chat-open .contacts-panel{ display:none; }
    body.mobile-chat-open .chat-panel{ display:flex; }
    .mobile-back-btn{ display:flex; }

    /* Ao abrir uma conversa, some com status/atendimentos/filtros:
       a área de mensagens ocupa a tela toda, sobrando espaço pros botões */
    body.mobile-chat-open .sector-status,
    body.mobile-chat-open .sector-atendimentos,
    body.mobile-chat-open .sector-filtros{
      display:none !important;
    }

    /* Setores (status/atendimentos/filtros) mais compactos quando visíveis */
    .sector{ padding:8px 12px; }
    .sector-label{ width:auto; }
    .filtros-row{ flex-wrap:wrap; }
    .filter-select, .search-box{ flex:1 1 45%; min-width:0; max-width:none; }

    /* Status e Atendimentos: o rótulo rola junto com os chips ao arrastar */
    .sector-status, .sector-atendimentos{
      overflow-x:auto;
      -webkit-overflow-scrolling:touch;
      scrollbar-width:none;
    }
    .sector-status::-webkit-scrollbar, .sector-atendimentos::-webkit-scrollbar{ display:none; }
    .sector-status .sector-label, .sector-atendimentos .sector-label{
      flex-shrink:0;
      white-space:nowrap;
    }
    .status-tabs, .atendimentos-row{
      overflow-x:visible;
      flex:none;
    }

    /* Cabeçalho do chat: quebra em duas linhas, dando espaço pros botões */
    .chat-header{ flex-wrap:wrap; row-gap:8px; padding:10px 14px; }
    .chat-header-actions{
      order:3;
      width:100%;
      justify-content:space-around;
      gap:6px;
    }
    .header-action-btn{
      width:44px; height:44px;
      border-radius:11px;
    }
    .header-action-btn svg{ width:19px; height:19px; }

    /* ---- Interno: mesmo padrão de tela única ---- */
    .interno-stack{ position:relative; overflow:hidden; }
    .interno-contacts-panel{ width:100%; }
    .interno-chat-panel{
      display:none;
      position:absolute;
      inset:0;
      width:100%;
      background:var(--panel-bg);
      z-index:5;
    }
    body.mobile-chat-open .interno-contacts-panel{ display:none; }
    body.mobile-chat-open .interno-chat-panel{ display:flex; }

    /* ---- Painel de dados do contato: tela cheia ---- */
    .contact-info-panel{ width:100%; max-width:100%; }

    /* ---- Modais: quase tela cheia, mais fáceis de usar no toque ---- */
    .transfer-modal{ width:94%; max-width:94vw; max-height:88vh; }

    /* ---- Dashboard: somente totais simples ---- */
    #dashboard-subnav{ display:none; }
    #view-dashboard [id^="dashboard-panel-"]{ display:none !important; }
    #dashboard-panel-visao-geral{ display:block !important; }
    #dashboard-panel-visao-geral .dash-escopo-filter-row,
    #dashboard-panel-visao-geral .dash-alerts-card,
    #dashboard-panel-visao-geral .dash-parada24h-mini,
    #dashboard-panel-visao-geral .dash-header-controls,
    #dashboard-panel-visao-geral .dash-kpi-hero-grid,
    #dashboard-panel-visao-geral .dash-kpi-secondary-grid{
      display:none !important;
    }
    #dash-mobile-totais{ display:grid !important; }

    /* ---- Atividades: colunas em pilha ---- */
    .ativ-body, .ativ-selects-row{ flex-wrap:wrap; }
  }

  /* ===================================================== */
  /* ===== TELA DE LOGIN ===== */
  /* ===================================================== */
  .login-screen{
    position:fixed; inset:0; z-index:9999;
    display:flex; align-items:center; justify-content:center;
    background:
      radial-gradient(1100px 550px at 12% -10%, rgba(63,207,99,.16), transparent 60%),
      radial-gradient(900px 500px at 100% 110%, rgba(34,163,73,.14), transparent 55%),
      var(--bg-sidebar);
    padding:24px;
  }
  .login-card{
    width:100%; max-width:380px;
    background:var(--panel-bg);
    border-radius:20px;
    padding:34px 30px 28px;
    box-shadow:0 24px 60px -20px rgba(0,0,0,.55);
    border:1px solid rgba(255,255,255,.06);
  }
  .login-brand{ display:flex; align-items:center; justify-content:center; gap:12px; margin-bottom:24px; }
  .login-brand img{ width:56px; height:56px; object-fit:contain; flex-shrink:0; }
  .login-brand-text{ display:flex; flex-direction:column; line-height:1.15; }
  .login-brand-text .lb1{ font-weight:700; font-size:17px; color:var(--text-dark); letter-spacing:-0.01em; }
  .login-brand-text .lb2{ font-size:10.5px; color:var(--green-dark); font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
  .login-title{ font-size:20px; font-weight:700; color:var(--text-dark); margin-bottom:4px; text-align:left; }
  .login-subtitle{ font-size:12.5px; color:var(--text-muted); margin-bottom:22px; text-align:left; }
  .login-form{ display:flex; flex-direction:column; gap:14px; }
  .login-field{ display:flex; flex-direction:column; gap:6px; }
  .login-field-label{ font-size:11.5px; font-weight:700; color:var(--text-dark); }
  .login-field input{
    width:100%; box-sizing:border-box;
    font-family:var(--font); font-size:13.5px;
    border:1px solid var(--panel-border); border-radius:10px;
    padding:11px 13px; outline:none;
    background:#fbfaf8; color:var(--text-dark);
    transition:border-color .15s ease, background .15s ease;
  }
  .login-field input:focus{ border-color:var(--green-2); background:#fff; }
  .login-password-wrap{ position:relative; display:flex; align-items:center; }
  .login-password-wrap input{ padding-right:40px; }
  .login-eye-btn{
    position:absolute; right:6px; top:50%; transform:translateY(-50%);
    width:28px; height:28px; border-radius:7px;
    display:flex; align-items:center; justify-content:center;
    background:none; border:none; color:var(--text-muted); cursor:pointer;
  }
  .login-eye-btn:hover{ background:#f0efec; color:var(--text-dark); }
  .login-eye-btn svg{ width:16px; height:16px; }
  .login-eye-btn .eye-off{ display:none; }
  .login-eye-btn.active .eye-on{ display:none; }
  .login-eye-btn.active .eye-off{ display:block; }
  .login-row{ display:flex; align-items:center; justify-content:space-between; margin-top:-2px; }
  .login-remember{ display:flex; align-items:center; gap:7px; font-size:12px; color:var(--text-muted); cursor:pointer; user-select:none; }
  .login-remember input{ width:14px; height:14px; accent-color:var(--green-2); cursor:pointer; }
  .login-forgot{ font-size:12px; color:var(--green-dark); font-weight:600; text-decoration:none; }
  .login-forgot:hover{ text-decoration:underline; }
  .login-error{
    background:#fef2f2; border:1px solid #fecaca; color:#dc2626;
    font-size:12px; font-weight:600; border-radius:9px; padding:9px 12px;
  }
  .login-submit-btn{
    margin-top:2px; border:none; border-radius:11px;
    background:linear-gradient(135deg, var(--green-1), var(--green-dark));
    color:#04140a; font-family:var(--font); font-weight:700; font-size:13.5px;
    padding:12px; cursor:pointer;
    box-shadow:0 8px 20px -8px rgba(63,207,99,.6);
    transition:filter .15s ease, transform .1s ease;
  }
  .login-submit-btn:hover{ filter:brightness(1.05); }
  .login-submit-btn:active{ transform:translateY(1px); }
  .login-hint{
    margin-top:18px; font-size:11px; color:var(--text-muted); text-align:center; line-height:1.5;
  }
  .login-hint strong{ color:var(--text-dark); }

  /* ===== BOTÃO DE SAIR (SIDEBAR) ===== */
  .sidebar-footer{ position:relative; }
  .sidebar-logout-btn{
    margin-left:auto; flex-shrink:0;
    width:28px; height:28px; border-radius:8px;
    display:flex; align-items:center; justify-content:center;
    background:none; border:none; color:#a8adb3; cursor:pointer;
  }
  .sidebar-logout-btn:hover{ background:rgba(255,255,255,.08); color:#fff; }
  .sidebar-logout-btn svg{ width:15px; height:15px; }
  .sidebar.collapsed .sidebar-logout-btn{ display:none; }

/* ===== CAMPANHAS (disparo em massa) ===== */
.camp-kpi-row{display:grid; grid-template-columns:repeat(4, 1fr); gap:12px;}
.camp-kpi-card{background:#fff; border:1px solid var(--panel-border); border-radius:14px; padding:14px 16px;}
.camp-kpi-card .n{font-size:20px; font-weight:800; color:var(--text-dark);}
.camp-kpi-card .l{font-size:11px; color:var(--text-muted); font-weight:600; margin-top:2px;}
@media (max-width:720px){ .camp-kpi-row{grid-template-columns:repeat(2, 1fr);} }

.camp-row{
  display:grid; grid-template-columns:1.8fr 1.3fr 1.1fr .8fr 1fr 40px;
  align-items:center; gap:8px; padding:12px 6px; font-size:12.5px;
}
.camp-row-header{color:var(--text-muted); font-weight:700; font-size:10.5px; text-transform:uppercase; letter-spacing:.03em; border-bottom:1px solid var(--panel-border); padding-bottom:9px;}
.camp-row:not(.camp-row-header){border-bottom:1px solid #f1efec;}
.camp-row:not(.camp-row-header):last-child{border-bottom:none;}
.camp-row-nome{font-weight:700; color:var(--text-dark);}
.camp-row-sub{font-size:11px; color:var(--text-muted); margin-top:2px;}
.camp-status-tag{display:inline-flex; align-items:center; gap:5px; font-size:10.5px; font-weight:700; padding:4px 9px; border-radius:20px; width:fit-content;}
.camp-status-tag.enviada{color:var(--green-dark); background:#eef8f0;}
.camp-status-tag.agendada{color:#1d4ed8; background:#dbeafe;}
.camp-status-tag.ativa{color:#6d28d9; background:#ede9fe;}
.camp-status-tag.pausada, .camp-status-tag.cancelada{color:#6b7075; background:#f0efec;}
.camp-row{cursor:pointer;}
.camp-row-header{cursor:default;}
.camp-row-perf{font-size:11px; color:var(--text-muted); line-height:1.5;}
.camp-sort-btn{
  display:inline-flex; align-items:center; gap:4px;
  background:none; border:none; padding:0; margin:0;
  font-family:var(--font); font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.03em;
  color:var(--text-muted); cursor:pointer;
}
.camp-sort-btn:hover{color:var(--text-dark);}
.camp-sort-arrow{font-size:9px; width:9px; display:inline-block;}
.camp-row:not(.camp-row-header){align-items:flex-start; padding-top:14px; padding-bottom:14px;}
.camp-perf-times{font-size:11px; font-weight:700; color:var(--text-dark); margin-bottom:6px;}
.camp-perf-list{display:flex; flex-direction:column; gap:3px;}
.camp-perf-item{display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:11px; color:var(--text-muted);}
.camp-perf-item b{color:var(--text-dark); font-weight:700;}
.camp-perf-item.erro b{color:#dc2626;}
.camp-row-perf b{color:var(--text-dark); font-weight:700;}
.camp-row-actions{display:flex; gap:4px; justify-content:flex-end;}
.camp-row-action-btn{
  background:none; border:1px solid var(--panel-border); color:var(--text-muted); cursor:pointer;
  display:flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:7px; flex-shrink:0;
}
.camp-row-action-btn:hover{background:#f0efec; color:var(--text-dark);}
.camp-row-action-btn.cancelar:hover{background:#fdeeee; color:#dc2626; border-color:#f7c9c9;}
.camp-row-action-btn.editar:hover{background:#eef8f0; color:var(--green-dark); border-color:#cdeedb;}
.camp-empty-state{padding:40px 10px; text-align:center; color:var(--text-muted); font-size:12.5px;}

.camp-view-section{margin-bottom:18px;}
.camp-view-section:last-child{margin-bottom:0;}
.camp-view-label{font-size:10.5px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.03em; margin-bottom:6px;}
.camp-view-title{font-size:16px; font-weight:700; color:var(--text-dark); margin-bottom:4px;}
.camp-view-sub{font-size:12px; color:var(--text-muted);}
.camp-view-body-box{background:#fbfaf8; border:1px solid var(--panel-border); border-radius:10px; padding:11px 13px; font-size:12.5px; color:var(--text-dark); line-height:1.5;}
.camp-view-stats-grid{display:grid; grid-template-columns:repeat(4, 1fr); gap:10px;}
.camp-view-stat-card{background:#fff; border:1px solid var(--panel-border); border-radius:12px; padding:12px; text-align:center;}
.camp-view-stat-card .n{font-size:18px; font-weight:800; color:var(--text-dark);}
.camp-view-stat-card .l{font-size:10.5px; color:var(--text-muted); font-weight:600; margin-top:2px;}
.camp-view-stat-card.erro .n{color:#dc2626;}
@media (max-width:600px){ .camp-view-stats-grid{grid-template-columns:repeat(2, 1fr);} }

.camp-modal{width:560px; max-width:92vw;}
.camp-modal-body{max-height:60vh; overflow-y:auto; padding:0 2px;}

.camp-steps{display:flex; gap:6px; padding:0 22px 14px; margin-top:-4px;}
.camp-step{
  flex:1; text-align:center; font-size:11px; font-weight:700; color:var(--text-muted);
  padding-bottom:9px; border-bottom:3px solid #ece9e4; display:flex; align-items:center; justify-content:center; gap:6px;
}
.camp-step-num{
  width:18px; height:18px; border-radius:50%; background:#ece9e4; color:#8a8e93;
  font-size:10px; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0;
}
.camp-step.active{color:var(--text-dark); border-color:var(--green-1);}
.camp-step.active .camp-step-num{background:var(--green-1); color:#04140a;}
.camp-step.done{color:var(--green-dark);}
.camp-step.done .camp-step-num{background:var(--green-dark); color:#fff;}

.camp-filtros-row{display:flex; gap:10px; margin-bottom:12px;}
.camp-filtros-row select{max-width:220px;}
.camp-chip{
  border:none; background:#f0efec; font-family:var(--font);
  font-size:11px; font-weight:700; color:var(--text-muted);
  padding:6px 12px; border-radius:20px; cursor:pointer;
}
.camp-chip:hover{background:#e5e3de;}
.camp-chip.active{background:#1b1d1f; color:#fff;}

.camp-select-all-row{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:9px 2px; border-top:1px solid var(--panel-border); border-bottom:1px solid var(--panel-border);
  margin-bottom:8px; font-size:12px;
}
.camp-checkbox-label{display:flex; align-items:center; gap:8px; font-weight:600; color:var(--text-dark); cursor:pointer;}
.camp-checkbox-label input{width:16px; height:16px; accent-color:var(--green-1); cursor:pointer;}
.camp-count-selecionados{font-weight:700; color:var(--green-dark); flex-shrink:0;}

.camp-contact-list{max-height:280px; overflow-y:auto; display:flex; flex-direction:column;}
.camp-contact-row{display:flex; align-items:center; gap:10px; padding:8px 4px; border-bottom:1px solid #f4f2ee; cursor:pointer;}
.camp-contact-row:hover{background:#f7f6f3;}
.camp-contact-row input{width:16px; height:16px; accent-color:var(--green-1); cursor:pointer; flex-shrink:0;}
.camp-contact-avatar{width:32px; height:32px; border-radius:50%; background:#eef8f0; color:var(--green-dark); font-size:11px; font-weight:800; display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.camp-contact-info{flex:1; min-width:0;}
.camp-contact-nome{font-size:12.5px; font-weight:700; color:var(--text-dark); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.camp-contact-sub{font-size:11px; color:var(--text-muted); display:flex; gap:6px; align-items:center;}
.camp-contact-empty{padding:24px 10px; text-align:center; color:var(--text-muted); font-size:12px;}

.camp-tipo-disparo-grid{display:grid; grid-template-columns:repeat(3, 1fr); gap:10px; margin-bottom:16px;}
.camp-tipo-card{
  border:1.5px solid var(--panel-border); border-radius:12px; padding:13px 12px; cursor:pointer;
}
.camp-tipo-card:hover{background:#f7f6f3;}
.camp-tipo-card.selected{border-color:var(--green-1); background:#eef8f0;}
.camp-tipo-card svg{width:18px; height:18px; color:var(--green-dark); margin-bottom:6px;}
.camp-tipo-card-title{font-size:12.5px; font-weight:700; color:var(--text-dark);}
.camp-tipo-card-desc{font-size:11px; color:var(--text-muted); margin-top:3px; line-height:1.35;}
@media (max-width:600px){ .camp-tipo-disparo-grid{grid-template-columns:1fr;} }

.camp-agenda-row{display:flex; gap:10px; margin-bottom:16px;}
.camp-agenda-row .register-input{flex:1;}
.camp-auto-field{margin-bottom:12px;}
.camp-auto-field label{display:block; font-size:10.5px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.03em; margin-bottom:5px;}

.camp-resumo-card{
  background:#fbfaf8; border:1px dashed var(--panel-border); border-radius:12px; padding:13px 15px; font-size:12.5px; color:var(--text-dark); line-height:1.65;
}
.camp-resumo-card b{font-weight:700;}
.camp-resumo-card .muted{color:var(--text-muted);}

/* Estilos que estavam escritos direto no HTML da prévia (atributo style), agora como classes. */
.ds-1:not(#ds--):not(#ds--){margin-top:12px}
.ds-2:not(#ds--):not(#ds--){margin-bottom:2px}
.ds-3:not(#ds--):not(#ds--){margin-top:14px}
.ds-4:not(#ds--):not(#ds--){text-transform:none;font-weight:400;color:var(--text-muted)}
.ds-5:not(#ds--):not(#ds--){margin-top:8px}
.ds-6:not(#ds--):not(#ds--){margin-bottom:0}
.ds-7:not(#ds--):not(#ds--){margin-bottom:12px}
.ds-8:not(#ds--):not(#ds--){margin-bottom:8px}
.ds-9:not(#ds--):not(#ds--){font-size:12px;color:var(--text-muted);margin-right:auto}
.ds-10:not(#ds--):not(#ds--){margin-bottom:14px}
.ds-11:not(#ds--):not(#ds--){flex:1;margin-bottom:14px}
.ds-12:not(#ds--):not(#ds--){margin:0 0 8px 0}
.ds-13:not(#ds--):not(#ds--){max-height:130px}
.ds-14:not(#ds--):not(#ds--){padding-top:0}
.ds-15:not(#ds--):not(#ds--){margin-top:16px}
.ds-16:not(#ds--):not(#ds--){margin-top:10px}
.ds-17:not(#ds--):not(#ds--){width:380px}
.ds-18:not(#ds--):not(#ds--){text-align:center}
.ds-19:not(#ds--):not(#ds--){font-weight:700;font-size:14px;margin-bottom:2px}
.ds-20:not(#ds--):not(#ds--){font-size:12.5px;color:var(--text-muted);margin-bottom:14px}
.ds-21:not(#ds--):not(#ds--){font-size:12.5px;color:var(--text-muted);margin-top:14px;line-height:1.5}
.ds-22:not(#ds--):not(#ds--){padding:10px 0;border-top:1px solid var(--panel-border);border-bottom:1px solid var(--panel-border)}
.ds-23:not(#ds--):not(#ds--){align-items:center;gap:6px}
.ds-24:not(#ds--):not(#ds--){margin-top:6px;margin-bottom:10px}
.ds-25:not(#ds--):not(#ds--){gap:8px}
.ds-26:not(#ds--):not(#ds--){flex:1}
.ds-27:not(#ds--):not(#ds--){flex-shrink:0}
.ds-28:not(#ds--):not(#ds--){overflow-y:auto;max-height:60vh}
.ds-29:not(#ds--):not(#ds--){gap:12px;margin-bottom:12px}
.ds-30:not(#ds--):not(#ds--){margin:-4px 0 12px 0}
.ds-31:not(#ds--):not(#ds--){margin-top:4px;padding-top:0}
.ds-32:not(#ds--):not(#ds--){overflow-y:auto;max-height:64vh}
.ds-33:not(#ds--):not(#ds--){margin-top:6px;font-size:11px}
.ds-34:not(#ds--):not(#ds--){margin-bottom:16px}
.ds-35:not(#ds--):not(#ds--){padding:10px 0;border-top:1px solid var(--panel-border);border-bottom:1px solid var(--panel-border);margin-bottom:16px}
.ds-36:not(#ds--):not(#ds--){font-weight:400;color:var(--text-muted)}
.ds-37:not(#ds--):not(#ds--){margin-bottom:10px}
.ds-38:not(#ds--):not(#ds--){font-size:12px;color:var(--text-muted)}
.ds-39:not(#ds--):not(#ds--){margin-top:6px}
.ds-40:not(#ds--):not(#ds--){padding:8px 12px}
.ds-41:not(#ds--):not(#ds--){flex:1;margin-bottom:0}
.ds-42:not(#ds--):not(#ds--){margin-top:4px}
.ds-43:not(#ds--):not(#ds--){margin:0 0 14px 0}
.ds-44:not(#ds--):not(#ds--){margin-top:6px;margin-bottom:0}
.ds-45:not(#ds--):not(#ds--){flex:1.4;margin-bottom:14px}
.ds-46:not(#ds--):not(#ds--){margin-bottom:6px}
.ds-47:not(#ds--):not(#ds--){min-height:130px}
.ds-48:not(#ds--):not(#ds--){margin:8px 0 0 0}
.ds-49:not(#ds--):not(#ds--){width:100%;max-width:1080px;margin:0 auto}
.ds-50:not(#ds--):not(#ds--){margin-top:22px}
.ds-51:not(#ds--):not(#ds--){max-height:360px;overflow-y:auto}
.ds-52:not(#ds--):not(#ds--){align-items:center;justify-content:space-between}
.ds-53:not(#ds--):not(#ds--){text-transform:none;letter-spacing:normal}
.ds-54:not(#ds--):not(#ds--){margin-right:auto}
.ds-55:not(#ds--):not(#ds--){color:var(--red);margin-right:auto}
.ds-56:not(#ds--):not(#ds--){font-size:15px;font-weight:700;color:var(--text-dark)}
.ds-57:not(#ds--):not(#ds--){font-size:12.5px;color:var(--text-muted);margin-top:6px}
.ds-58:not(#ds--):not(#ds--){font-size:12px;color:var(--text-muted);margin-top:10px}
.ds-59:not(#ds--):not(#ds--){margin-top:18px}
.ds-60:not(#ds--):not(#ds--){margin-top:20px}
.ds-61:not(#ds--):not(#ds--){max-width:320px}
.ds-62:not(#ds--):not(#ds--){margin-left:auto}
.ds-63:not(#ds--):not(#ds--){width:100%;max-width:980px;margin:0 auto}
.ds-64:not(#ds--):not(#ds--){margin:0 0 16px 0}
.ds-65:not(#ds--):not(#ds--){font-size:11.5px;color:var(--text-muted)}
.ds-66:not(#ds--):not(#ds--){margin-top:28px;margin-bottom:14px;padding-top:20px;border-top:1px solid var(--panel-border)}
.ds-67:not(#ds--):not(#ds--){font-size:13px;font-weight:700;color:var(--text-dark);margin-bottom:2px}
.ds-68:not(#ds--):not(#ds--){max-width:600px}
.ds-69:not(#ds--):not(#ds--){min-height:70px}
