/* Conversa */
.vo-shell .vo-chat :is(.wa-main, .wa-welcome) {
  background: #ffffff !important;
}

.vo-shell .vo-chat .wa-welcome {
  color: #6d7175 !important;
}

.vo-shell .vo-chat .wa-welcome h3,
.vo-shell .vo-chat .wa-convo-name {
  color: #202223 !important;
  font-weight: 700 !important;
}

.vo-shell .vo-chat .wa-convo-header {
  min-height: 68px !important;
  box-sizing: border-box !important;
  gap: 11px !important;
  padding: 10px 16px !important;
  background: #ffffff !important;
  border: 0 !important;
  border-bottom: 1px solid #e1e3e5 !important;
}

.vo-shell .vo-chat .wa-convo-avatar {
  width: 38px !important;
  height: 38px !important;
  border-radius: 9px !important;
  background: #eaf3ff !important;
  color: #1a5eac !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.vo-shell .vo-chat .wa-convo-name {
  overflow: hidden !important;
  font-size: 14px !important;
  letter-spacing: 0 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.vo-shell .vo-chat .wa-convo-sub {
  overflow: hidden !important;
  color: #6d7175 !important;
  font-size: 11.5px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.vo-shell .vo-chat :is(.wa-header-btn, .wa-sound-toggle, .wa-crmf-toggle) {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border: 1px solid #c9cccf !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: #5c5f62 !important;
  box-shadow: 0 1px 1px rgba(32, 34, 35, .05) !important;
}

.vo-shell .vo-chat :is(.wa-header-btn, .wa-sound-toggle, .wa-crmf-toggle):hover {
  border-color: #8c9196 !important;
  background: #f6f6f7 !important;
  color: #202223 !important;
}

.vo-shell .vo-chat :is(.wa-leadctl-sel, #wa-header-label-select, #chat-direct-conn-select, #chat-group-conn-select) {
  min-height: 38px !important;
  height: 38px !important;
  padding: 0 34px 0 13px !important;
  border: 1px solid #c9cccf !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  color: #202223 !important;
  box-shadow: 0 1px 1px rgba(32, 34, 35, .05) !important;
  font-size: 13px !important;
  font-weight: 560 !important;
}

/* Responsável e etiqueta ficam discretos, mas continuam selects nativos. */
.vo-shell .vo-chat :is(#wa-header-label-select, .wa-leadctl-sel.wa-leadctl-owner-icon) {
  width: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  color: transparent !important;
  font-size: 1px !important;
  line-height: 1 !important;
  text-indent: -9999px !important;
  cursor: pointer;
  background-color: #ffffff !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 18px 18px !important;
}

.vo-shell .vo-chat .wa-leadctl-sel.wa-leadctl-owner-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235c5f62' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.5'/%3E%3Cpath d='M5 21a7 7 0 0 1 14 0'/%3E%3C/svg%3E") !important;
}

.vo-shell .vo-chat #wa-header-label-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235c5f62' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.59 13.41 11 23l-8.59-8.59a2 2 0 0 1 0-2.82L11 3h8a2 2 0 0 1 2 2v8a2 2 0 0 1-.41 1.41Z'/%3E%3Ccircle cx='16' cy='8' r='1'/%3E%3C/svg%3E") !important;
}

.vo-shell .vo-chat :is(#wa-header-label-select, .wa-leadctl-sel.wa-leadctl-owner-icon):hover {
  border-color: #8c9196 !important;
  background-color: #f6f6f7 !important;
}

.vo-shell .vo-chat :is(#wa-header-label-select, .wa-leadctl-sel.wa-leadctl-owner-icon):focus-visible {
  outline: 2px solid #2c6ecb !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

.vo-shell .vo-chat :is(#wa-header-label-select, .wa-leadctl-sel.wa-leadctl-owner-icon) option {
  color: #202223 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-indent: 0 !important;
}

.vo-shell .vo-chat :is(.wa-messages, .wa-welcome) {
  background: var(--vac-chat-background, #ffffff) !important;
  background-image: none !important;
}

.vo-shell .vo-chat .wa-messages {
  padding: 14px 16px !important;
}

.vo-shell .vo-chat .wa-messages::-webkit-scrollbar-thumb {
  border: 2px solid var(--vac-chat-background, #ffffff) !important;
  border-radius: 8px !important;
  background: #c9cccf !important;
}

.vo-shell .vo-chat .chat-msg {
  max-width: 78% !important;
  margin-bottom: 5px !important;
}

.vo-shell .vo-chat .chat-bubble {
  padding: 10px 13px !important;
  border-radius: 10px !important;
  font-family: inherit !important;
  font-size: var(--vac-chat-font-size, 13.5px) !important;
  line-height: var(--vac-chat-font-line-height, 1.48) !important;
  box-shadow: none !important;
}

.vo-shell .vo-chat .chat-msg.in .chat-bubble {
  border: 0 !important;
  border-bottom-left-radius: 3px !important;
  background: #ffffff !important;
  color: #202223 !important;
  box-shadow: 0 1px 2px rgba(32, 34, 35, .12) !important;
}

.vo-shell .vo-chat .chat-msg.out:not(.ai-sent) .chat-bubble {
  border: 1px solid var(--vac-chat-outgoing, #2c6ecb) !important;
  border-bottom-right-radius: 3px !important;
  background: var(--vac-chat-outgoing, #2c6ecb) !important;
  color: #ffffff !important;
}

/* IA sempre é laranja; a cor escolhida vale apenas para mensagens humanas. */
.vo-shell .vo-chat .chat-msg.out.ai-sent .chat-bubble {
  border-color: #f17b25 !important;
  background: #f17b25 !important;
  color: #ffffff !important;
}

.vo-shell .vo-chat .chat-msg .msg-meta span[style] {
  color: #6d7175 !important;
}

.vo-shell .vo-chat .chat-msg.out .msg-meta span[style] {
  color: rgba(255, 255, 255, .78) !important;
}

.vo-shell .vo-chat .wa-date-sep span {
  border: 1px solid #e1e3e5 !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  color: #6d7175 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 4px 9px !important;
}

/* Estado e comandos da IA */
.vo-shell .vo-chat #ai-toolbar {
  min-height: 44px !important;
  box-sizing: border-box !important;
  gap: 6px !important;
  padding: 5px 14px !important;
  border-top: 1px solid #e1e3e5 !important;
  border-bottom: 1px solid #e1e3e5 !important;
  background: #ffffff !important;
}

.vo-shell .vo-chat :is(#ai-chatbot-status, #ai-toolbar .btn-sidebar-action, #ai-chatbot-assumir-btn, #ai-chatbot-toggle) {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 11px !important;
  border: 1px solid #c9cccf !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #202223 !important;
  box-shadow: 0 1px 1px rgba(32, 34, 35, .05) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.vo-shell .vo-chat #ai-chatbot-status.is-paused,
.vo-shell .vo-chat #ai-chatbot-toggle[data-state="paused"] {
  border-color: #fed7aa !important;
  background: #fff7ed !important;
  color: #b45309 !important;
}

.vo-shell .vo-chat #ai-chatbot-status.is-active,
.vo-shell .vo-chat #ai-chatbot-toggle[data-state="active"] {
  border-color: #bbf7d0 !important;
  background: #f0fdf4 !important;
  color: #167a45 !important;
}

.vo-shell .vo-chat .chat-color-control {
  position: relative !important;
  z-index: 70 !important;
  flex: 0 0 auto !important;
}

.vo-shell .vo-chat .chat-color-trigger {
  width: 30px !important;
  height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #a8adb3 !important;
  cursor: pointer !important;
}

.vo-shell .vo-chat .chat-color-trigger:hover,
.vo-shell .vo-chat .chat-color-trigger[aria-expanded="true"] {
  background: #f1f1f1 !important;
  color: #5c5f62 !important;
}

.vo-shell .vo-chat .chat-color-pencil {
  width: 16px !important;
  height: 16px !important;
}

.vo-shell .vo-chat .chat-color-menu {
  width: 236px !important;
  padding: 14px !important;
  border: 1px solid #d2d5d8 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: 0 14px 34px rgba(32, 34, 35, .18) !important;
}

.vo-shell .vo-chat .chat-color-section-divider {
  height: 1px !important;
  margin: 13px 0 12px !important;
  background: #e1e3e5 !important;
}

.vo-shell .vo-chat :is(.chat-color-menu-title, .chat-background-title) {
  color: #202223 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.vo-shell .vo-chat .chat-color-options button.selected {
  border-color: #202223 !important;
}

.vo-shell .vo-chat :is(#chat-color-custom, #chat-background-custom) {
  width: 31px !important;
  height: 25px !important;
  border: 1px solid #d2d5d8 !important;
  border-radius: 7px !important;
}

/* Personalização individual do Chat: a preferência é salva por cliente e atendente. */
.vo-shell .vo-chat .wa-sidebar-header {
  position: relative !important;
}

.vo-shell .vo-chat .chat-color-menu {
  position: absolute !important;
  top: calc(100% + 7px) !important;
  right: 0 !important;
  display: none !important;
  z-index: 90 !important;
}

.vo-shell .vo-chat .chat-color-menu.open {
  display: block !important;
}

.vo-shell .vo-chat .chat-color-menu-title {
  margin-bottom: 10px !important;
  color: #202223 !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.vo-shell .vo-chat .chat-color-options {
  display: flex !important;
  gap: 7px !important;
  margin-bottom: 12px !important;
}

.vo-shell .vo-chat .chat-color-options button {
  width: 28px !important;
  height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 50% !important;
  background: transparent !important;
  cursor: pointer !important;
}

.vo-shell .vo-chat .chat-color-options button span {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  border-radius: 50% !important;
}

.vo-shell .vo-chat .chat-color-options button:hover,
.vo-shell .vo-chat .chat-color-options button.selected {
  border-color: #202223 !important;
}

.vo-shell .vo-chat .chat-color-custom-label {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-top: 10px !important;
  border-top: 1px solid #e1e3e5 !important;
  color: #6d7175 !important;
  font-family: inherit !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
}

.vo-shell .vo-chat .chat-background-custom-label {
  padding-top: 0 !important;
  border-top: 0 !important;
}

.vo-shell .vo-chat .chat-background-options button span {
  box-shadow: inset 0 0 0 1px rgba(32, 34, 35, .18) !important;
}

.vo-shell .vo-chat .chat-font-size-options {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

.vo-shell .vo-chat .chat-font-size-options button {
  min-height: 48px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 6px 4px !important;
  border: 1px solid #d2d5d8 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #5c5f62 !important;
  cursor: pointer !important;
}

.vo-shell .vo-chat .chat-font-size-options button:hover,
.vo-shell .vo-chat .chat-font-size-options button.selected {
  border-color: #2c6ecb !important;
  background: #f0f5ff !important;
  color: #202223 !important;
  box-shadow: inset 0 0 0 1px #2c6ecb !important;
}

.vo-shell .vo-chat .chat-font-size-preview {
  font-weight: 700 !important;
  line-height: 1 !important;
}

.vo-shell .vo-chat .chat-font-size-options button:nth-child(1) .chat-font-size-preview { font-size: 12px !important; }
.vo-shell .vo-chat .chat-font-size-options button:nth-child(2) .chat-font-size-preview { font-size: 14px !important; }
.vo-shell .vo-chat .chat-font-size-options button:nth-child(3) .chat-font-size-preview { font-size: 16px !important; }

.vo-shell .vo-chat .chat-font-size-label {
  font-size: 10px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}

/* Compositor */
.vo-shell .vo-chat :is(#chat-direct-conn-bar, #chat-group-conn-bar, #chat-tpl-panel, #chat-qs-panel) {
  border-top-color: #e1e3e5 !important;
  background: #ffffff !important;
}

.vo-shell .vo-chat .wa-input-bar {
  gap: 8px !important;
  padding: 10px 14px !important;
  background: #ffffff !important;
  border-top: 1px solid #e1e3e5 !important;
}

.vo-shell .vo-chat .wa-input {
  min-height: 42px !important;
  padding: 10px 12px !important;
  border: 1px solid #c9cccf !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  font-size: 13.5px !important;
}

.vo-shell .vo-chat :is(.wa-tpl-btn, .wa-input-bar .wa-header-btn) {
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  border: 1px solid #c9cccf !important;
  border-radius: 11px !important;
  background: #ffffff !important;
  color: #5c5f62 !important;
  box-shadow: 0 1px 1px rgba(32, 34, 35, .05) !important;
}

.vo-shell .vo-chat :is(.wa-tpl-btn, .wa-input-bar .wa-header-btn):hover {
  border-color: #8c9196 !important;
  background: #f6f6f7 !important;
  color: #202223 !important;
}

.vo-shell .vo-chat .wa-send-btn {
  width: 42px !important;
  height: 42px !important;
  border-radius: 11px !important;
  background: #202223 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(32, 34, 35, .18) !important;
}

.vo-shell .vo-chat .wa-send-btn:hover:not(:disabled) {
  background: #3f4245 !important;
  box-shadow: 0 2px 5px rgba(32, 34, 35, .18) !important;
}


.vo-shell{position:fixed;inset:0;z-index:19000;background:#f5f6f8;color:#263445;display:flex;flex-direction:column;font:14px/1.5 Arial,sans-serif}.vo-shell *{box-sizing:border-box}.vo-shell header.vo-top{display:flex;align-items:center;gap:14px;padding:12px 20px;background:#fff;border-bottom:1px solid #dfe4eb}.vo-top h2{font-size:18px;margin:0;flex:1}.vo-shell button,.vo-shell a.vo-button{border:1px solid #cfd7e2;border-radius:8px;padding:9px 12px;background:#fff;color:#263445;cursor:pointer;text-decoration:none;font:inherit}.vo-shell button:hover{background:#edf3fb}.vo-shell button:disabled{opacity:.5;cursor:wait}.vo-shell .vo-primary{background:#195ca6;color:#fff;border-color:#195ca6}.vo-workspace{display:grid;grid-template-columns:minmax(280px,20fr) minmax(440px,55fr) minmax(270px,25fr);min-height:0;flex:1;overflow:hidden}.vo-chat{min-height:0;overflow:hidden;border-right:1px solid #dfe4eb;background:#fff;display:flex;flex-direction:column}.vo-chat #wa-convo{height:100%!important;min-width:0;width:100%!important;flex:1;position:static!important;display:flex!important;overflow:hidden}.vo-chat .wa-convo-header{flex-wrap:wrap;gap:6px;padding:10px!important}.vo-chat .wa-convo-actions{display:none!important}.vo-chat #chat-messages{min-height:0;flex:1;overflow-y:auto;padding:10px!important}.vo-chat #chat-input-area{flex-wrap:wrap;padding:8px!important}.vo-chat #chat-input{min-width:100px}.vo-chat #ai-toolbar{flex-wrap:wrap!important}.vo-chat .wa-msg{max-width:96%!important}.vo-chat #wa-convo-back{display:none!important}.vo-chat .wa-convo-avatar{width:30px;height:30px}.vo-form-pane,.vo-map-pane{overflow:auto;padding:20px;min-width:0}.vo-map-pane{background:#fff;border-left:1px solid #dfe4eb}.vo-box{background:#fff;border:1px solid #dfe4eb;border-radius:12px;padding:18px;margin-bottom:16px}.vo-box h3{margin:0 0 14px;font-size:16px}.vo-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.vo-shell label{display:flex;flex-direction:column;gap:5px;font-size:13px;color:#526073}.vo-shell input,.vo-shell select,.vo-shell textarea{width:100%;min-width:0;border:1px solid #cbd4e0;border-radius:7px;padding:10px;background:#fff;color:#263445;font:inherit}.vo-wide{grid-column:1/-1}.vo-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.vo-hint{font-size:12px;color:#65758a;margin:8px 0}.vo-warning{padding:10px 14px;background:#fff3d9;color:#785514;border-radius:8px}.vo-status{padding:4px 9px;background:#e5effb;color:#195ca6;border-radius:8px}.vo-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:16px}.vo-kpis div{background:#edf3fb;border-radius:9px;padding:12px}.vo-kpis strong{display:block;font-size:20px}.vo-leg{border-top:1px solid #e3e7ed;padding:14px 0}.vo-table-wrap{overflow:auto}.vo-shell table{border-collapse:collapse;width:100%;font-size:13px}.vo-shell th,.vo-shell td{text-align:left;padding:10px;border-bottom:1px solid #e6eaf0;vertical-align:top}.vo-shell th{color:#65758a;background:#f7f9fb}.vo-map{height:320px;border-radius:10px;overflow:hidden;background:#e7edf2}.vo-base{display:block;width:100%;text-align:left;margin:8px 0;font-size:12px!important}.vo-base strong{display:block}.vo-shell .vo-notice{padding:8px 20px;background:#e9f2fe;min-height:36px}.vo-shell .vo-notice.error{background:#ffeded;color:#9d2929}.vo-tabs{display:none}.vo-list{overflow:auto;padding:24px;flex:1}.vo-list>h3{margin-top:0}.vo-audit{font-size:12px;color:#65758a;padding:8px 0;border-bottom:1px solid #e3e7ed}.vo-search-result{display:block;width:100%;text-align:left;margin:6px 0}.vo-selected-base{padding:8px;background:#eff6ef;font-size:12px;border-radius:8px}.vo-shell .vo-payment-form{margin:14px 0}.vo-shell small{font-size:12px}.vo-shell #vo-base-list{max-height:450px;overflow:auto}.vo-placeholder{padding:20px;color:#65758a}.vo-shell a{color:#195ca6}
@media(max-width:1100px){.vo-workspace{grid-template-columns:280px minmax(0,1fr)}.vo-map-pane{grid-column:2;border:0}.vo-chat{grid-row:1/3}.vo-form-pane{overflow:visible}.vo-workspace{overflow:auto}.vo-chat{position:sticky;top:0;height:calc(100dvh - 100px)}}
@media(max-width:700px){.vo-top{padding:10px!important}.vo-top h2{font-size:15px}.vo-tabs{display:flex;gap:6px;padding:6px 10px;background:#fff}.vo-workspace{display:block;overflow:hidden}.vo-chat,.vo-form-pane,.vo-map-pane{display:none!important;height:100%;overflow:auto;padding:14px}.vo-shell[data-pane="chat"] .vo-chat{display:flex!important;padding:0}.vo-shell[data-pane="form"] .vo-form-pane,.vo-shell[data-pane="map"] .vo-map-pane{display:block!important}.vo-chat{position:static}.vo-fields{grid-template-columns:1fr}.vo-kpis{grid-template-columns:1fr}.vo-list{padding:14px}.vo-shell header.vo-top{flex-wrap:wrap}}

.vo-shell [hidden]{display:none!important}.vo-chat .wa-header-actions{display:none!important}.vo-chat #chat-input{flex:1;min-width:130px}.vo-chat .wa-input-bar>button{padding:6px!important}.vo-chat #ai-chatbot-status{white-space:normal!important}.vo-chat .wa-convo-header{min-height:70px}.vo-chat .wa-convo-header>div{min-width:0}.vo-chat #chat-input-area textarea{flex-basis:55%}.vo-shell button:focus-visible,.vo-shell input:focus-visible{outline:3px solid #6396e5;outline-offset:2px}

.vo-shell .vo-chat .wa-convo-header{padding:10px!important;gap:6px!important;flex-wrap:wrap!important}.vo-shell .vo-chat #chat-messages{padding:10px!important}.vo-shell .vo-chat #chat-input-area{padding:8px!important;gap:6px!important}.vo-shell .vo-chat #wa-convo-header>div:last-child{width:100%;overflow:auto;gap:4px!important}.vo-shell .vo-chat #wa-convo-header .wa-header-btn{width:28px!important;height:28px!important;min-width:28px!important;padding:4px!important}.vo-shell .vo-chat .wa-input{min-width:120px!important}.vo-shell .vo-primary:hover{background:#124c8b;color:#fff}

/* Simplificação pedida apenas para a conversa dentro do orçamento. */
.vo-shell .vo-chat #wa-convo-header>div:last-child,.vo-shell .vo-chat #ai-toolbar,.vo-shell .vo-chat #ai-result-panel,.vo-shell .vo-chat #chat-input-area>button:not(#chat-send-btn):not(.msg-mic-btn),.vo-shell .vo-chat #chat-tpl-panel,.vo-shell .vo-chat #emoji-picker-panel{display:none!important}
.vo-section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}.vo-section-heading h3{flex:1}.vo-shell .vo-sync{color:#195ca6;background:#edf4ff;border-color:#bbd0ed;font-weight:600}.vo-shell #vo-sync-result:not(:empty){padding:10px;margin-bottom:14px;border-radius:8px;background:#edf4ff;color:#365577;font-size:12px}.vo-nearest-card{border:1px solid #bed5ef;border-radius:10px;padding:14px;margin:12px 0;background:#f6faff}.vo-nearest-card>span,.vo-nearest-card>small{display:block;color:#65758a;font-size:11px}.vo-nearest-card>strong{display:block;margin:5px 0}.vo-nearest-card p{font-size:12px;margin:4px 0}.vo-nearest-card button{display:block;width:100%;text-align:left;margin:8px 0}.vo-shell .vo-chat #chat-input-area{flex-wrap:nowrap!important}.vo-shell .vo-chat #chat-input{flex:1!important;min-width:0!important}
