/* CRM Industrial: fisionomia do atendimento no claro do WhatsApp Web.
   Folha sem @layer, por isso vence as utilidades do Chatwoot.
   Nota interna (ambar) continua amarela, para nao se misturar com mensagem enviada. */

:root {
  color-scheme: light;

  --slate-1: 255 255 255;
  --slate-2: 245 246 246;
  --slate-3: 240 242 245;
  --slate-4: 233 237 239;
  --slate-5: 224 229 232;
  --slate-6: 209 215 219;
  --slate-7: 174 186 193;
  --slate-8: 134 150 160;
  --slate-9: 102 119 129;
  --slate-10: 102 119 129;
  --slate-11: 84 101 111;
  --slate-12: 17 27 33;

  --blue-1: 240 252 249;
  --blue-2: 230 249 243;
  --blue-3: 204 243 232;
  --blue-4: 168 232 214;
  --blue-5: 120 214 190;
  --blue-6: 64 192 164;
  --blue-7: 16 176 144;
  --blue-8: 0 168 132;
  --blue-9: 0 168 132;
  --blue-10: 0 128 105;
  --blue-11: 0 128 105;
  --blue-12: 7 64 54;

  --teal-9: 0 168 132;
  --teal-10: 0 128 105;
  --teal-11: 0 128 105;

  --background-color: 240 242 245;
  --surface-1: 255 255 255;
  --surface-2: 255 255 255;
  --surface-active: 240 242 245;
  --background-input-box: 255, 255, 255, 1;
  --text-blue: 17 27 33;
  --border-container: 233 237 239;
  --border-strong: 233 237 239;
  --border-weak: 233 237 239;
  --solid-1: 255 255 255;
  --solid-2: 255 255 255;
  --solid-3: 240 242 245;
  --solid-active: 240 242 245;
  --solid-amber: 255 243 196;
  --solid-blue: 217 253 211;
  --solid-blue-2: 255 255 255;
  --solid-iris: 217 253 211;
  --card-color: 255 255 255;
  --button-color: 255 255 255;
  --label-background: 240 242 245;
  --alpha-1: 11, 20, 26, 0.06;
  --alpha-2: 11, 20, 26, 0.08;
  --alpha-3: 255, 255, 255, 0.96;
  --black-alpha-1: 11, 20, 26, 0.08;
  --black-alpha-2: 11, 20, 26, 0.04;
  --overlay: 11, 20, 26, 0.35;
  --border-blue: 0, 168, 132, 0.45;
}

html,
body {
  background: #f0f2f5;
  color: #111b21;
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Escuro no padrão do WhatsApp Web. A classe fica no body. */
body.dark {
  color-scheme: dark;
  background: #0b141a;
  color: #e9edef;

  --slate-1: 17 27 33;
  --slate-2: 32 44 51;
  --slate-3: 42 57 66;
  --slate-4: 32 44 51;
  --slate-5: 59 74 84;
  --slate-6: 80 96 107;
  --slate-7: 134 150 160;
  --slate-8: 134 150 160;
  --slate-9: 134 150 160;
  --slate-10: 166 183 193;
  --slate-11: 134 150 160;
  --slate-12: 233 237 239;

  --blue-9: 0 168 132;
  --blue-10: 0 168 132;
  --blue-11: 6 207 160;
  --blue-12: 233 237 239;

  --background-color: 11 20 26;
  --surface-1: 17 27 33;
  --surface-2: 32 44 51;
  --surface-active: 42 57 66;
  --background-input-box: 32, 44, 51, 1;
  --text-blue: 233 237 239;
  --border-container: 42 57 66;
  --border-strong: 42 57 66;
  --border-weak: 42 57 66;
  --solid-1: 17 27 33;
  --solid-2: 32 44 51;
  --solid-3: 42 57 66;
  --solid-active: 42 57 66;
  --solid-amber: 255 243 196;
  --solid-blue: 0 92 75;
  --solid-blue-2: 32 44 51;
  --solid-iris: 0 92 75;
  --card-color: 17 27 33;
  --button-color: 32 44 51;
  --label-background: 42 57 66;
  --alpha-1: 233, 237, 239, 0.06;
  --alpha-2: 233, 237, 239, 0.1;
  --alpha-3: 17, 27, 33, 0.96;
  --black-alpha-1: 0, 0, 0, 0.28;
  --black-alpha-2: 0, 0, 0, 0.16;
  --overlay: 11, 20, 26, 0.6;
  --border-blue: 0, 168, 132, 0.55;
}

/* Barra esquerda: cinza do WhatsApp, item ativo em verde */
aside {
  background: #f0f2f5 !important;
  border-color: #e9edef !important;
  color: #3b4a54;
}

aside a[aria-current="page"],
aside a.router-link-active,
aside button[aria-current="page"] {
  background: #d9fdd3 !important;
  color: #008069 !important;
}

/* Lista de conversas. Sem conversa aberta, ou no layout expandido, ela ocupa o branco da direita. */
.conversations-list-wrap {
  width: 420px;
  max-width: 34vw;
  background: #fff !important;
  border-right: 1px solid #e9edef !important;
}

.conversations-list-wrap.basis-full,
.flex:has(> .conversations-list-wrap):not(:has(.conversation-panel)) > .conversations-list-wrap {
  width: auto !important;
  max-width: none !important;
  flex: 1 1 auto !important;
  border-right: 0 !important;
}

.conversation-details-wrap:not(:has(.conversation-panel)) {
  display: none !important;
}

.conversations-list-wrap > .flex.items-center,
.conversations-list-wrap header {
  background: #f0f2f5;
  height: 59px;
  border-bottom: 1px solid #e9edef;
}

.conversations-list {
  background: #fff;
}

.conversations-list .conversation {
  min-height: 72px;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #f0f2f5 !important;
  border-radius: 0;
}

.conversations-list .conversation:hover {
  background: #f5f6f6 !important;
}

.conversations-list .conversation.active {
  background: #f0f2f5 !important;
}

.conversations-list .conversation .conversation--user {
  font-size: 16px;
  font-weight: 400;
  color: #111b21;
  text-transform: none;
}

.conversations-list .conversation .font-semibold {
  font-weight: 600;
}

/* Conversa aberta */
.conversation-details-wrap {
  background: #efeae2 !important;
  border-left: 0 !important;
}

.conversation-details-wrap > .flex.flex-col:not(.work-activity-pin) {
  background: #f0f2f5 !important;
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 59px;
  max-height: none;
  padding-top: 0;
  padding-bottom: 0;
  gap: 0;
  border-bottom: 1px solid #e9edef !important;
}

.conversation-details-wrap > .flex.flex-col .text-sm {
  font-size: 16px;
  font-weight: 400;
  color: #111b21;
}

.conversation-panel {
  background-color: #efeae2 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' fill='none'%3E%3Cg stroke='%23d5cdc2' stroke-width='1.2' opacity='.9'%3E%3Ccircle cx='28' cy='36' r='7'/%3E%3Cpath d='M78 48c10-8 18 8 28 0'/%3E%3Crect x='150' y='22' width='16' height='12' rx='3'/%3E%3Cpath d='M210 40h18M219 31v18'/%3E%3Ccircle cx='280' cy='48' r='5'/%3E%3Cpath d='M40 120c12 0 12 14 24 14s12-14 24-14'/%3E%3Ccircle cx='160' cy='130' r='8'/%3E%3Cpath d='M230 118l8 14h-16z'/%3E%3Cpath d='M24 210h20M34 200v20'/%3E%3Ccircle cx='110' cy='220' r='6'/%3E%3Cpath d='M180 214c8 0 8 12 16 12'/%3E%3Crect x='250' y='200' width='18' height='14' rx='4'/%3E%3Cpath d='M60 290c10-6 16 8 26 0'/%3E%3Ccircle cx='200' cy='292' r='7'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 320px 320px;
}

/* Balões */
.right-bubble:not([data-bubble-name="activity"]) {
  background: #d9fdd3 !important;
  color: #111b21 !important;
  border-radius: 7.5px 0 7.5px 7.5px !important;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}

.left-bubble:not([data-bubble-name="activity"]) {
  background: #fff !important;
  color: #111b21 !important;
  border-radius: 0 7.5px 7.5px 7.5px !important;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}

.left-bubble.bg-n-solid-amber,
.right-bubble.bg-n-solid-amber {
  background: #fff3c4 !important;
  color: #111b21 !important;
}

.left-bubble > .mt-2,
.right-bubble > .mt-2 {
  margin-top: 2px;
  font-size: 11px;
  line-height: 15px;
  color: #667781;
  justify-content: flex-end;
}

[data-bubble-name="activity"] {
  background: #fff !important;
  color: #54656f !important;
  border-radius: 7.5px !important;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
  font-size: 12.5px;
}

/* Barra de escrever, no mesmo cinza do cabeçalho */
.conversation-details-wrap .flex.relative.flex-col:not(.conversation-panel) {
  background: #f0f2f5 !important;
}

.reply-box {
  background: #fff !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  margin: 6px 12px 10px !important;
}

.reply-box.is-private {
  background: #fff3c4 !important;
}

/* Login no mesmo claro, botão verde */
[data-testid="submit_button"] {
  background: #00a884 !important;
  color: #fff !important;
  border-radius: 8px !important;
}

a.text-link,
a.text-n-brand {
  color: #008069 !important;
}

/* Busca do topo, no formato do campo do WhatsApp */
aside a[href*="/search"] {
  background: #fff !important;
  border-radius: 8px !important;
  outline: none !important;
}

/* Escuro: mesmas peças, cores do WhatsApp Web escuro */
body.dark aside {
  background: #111b21 !important;
  border-color: #222d34 !important;
  color: #aebac1;
}

body.dark aside a[aria-current="page"],
body.dark aside a.router-link-active,
body.dark aside button[aria-current="page"] {
  background: #0a332c !important;
  color: #00a884 !important;
}

body.dark aside a[href*="/search"] {
  background: #202c33 !important;
  color: #8696a0 !important;
}

body.dark .conversations-list-wrap,
body.dark .conversations-list,
body.dark .conversations-list .conversation {
  background: #111b21 !important;
  border-color: #222d34 !important;
  color: #e9edef;
}

body.dark .conversations-list-wrap {
  border-right-color: #222d34 !important;
}

body.dark .conversations-list-wrap > .flex.items-center,
body.dark .conversations-list-wrap header,
body.dark .conversation-details-wrap > .flex.flex-col:not(.work-activity-pin),
body.dark .conversation-details-wrap .flex.relative.flex-col:not(.conversation-panel) {
  background: #202c33 !important;
  border-color: #222d34 !important;
  color: #e9edef;
}

body.dark .conversations-list .conversation:hover {
  background: #202c33 !important;
}

body.dark .conversations-list .conversation.active {
  background: #2a3942 !important;
}

body.dark .conversations-list .conversation .conversation--user,
body.dark .conversation-details-wrap > .flex.flex-col .text-sm,
body.dark .conversations-list-wrap [class*="111b21"],
body.dark .conversation-details-wrap [class*="111b21"] {
  color: #e9edef !important;
}

body.dark .conversations-list-wrap [class*="667781"],
body.dark .conversation-details-wrap [class*="667781"],
body.dark .left-bubble > .mt-2,
body.dark .right-bubble > .mt-2 {
  color: #8696a0 !important;
}

body.dark .conversation-details-wrap {
  background: #0b141a !important;
}

body.dark .conversation-panel {
  background-color: #0b141a !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' fill='none'%3E%3Cg stroke='%231f2c34' stroke-width='1.2' opacity='.95'%3E%3Ccircle cx='28' cy='36' r='7'/%3E%3Cpath d='M78 48c10-8 18 8 28 0'/%3E%3Crect x='150' y='22' width='16' height='12' rx='3'/%3E%3Cpath d='M210 40h18M219 31v18'/%3E%3Ccircle cx='280' cy='48' r='5'/%3E%3Cpath d='M40 120c12 0 12 14 24 14s12-14 24-14'/%3E%3Ccircle cx='160' cy='130' r='8'/%3E%3Cpath d='M230 118l8 14h-16z'/%3E%3Cpath d='M24 210h20M34 200v20'/%3E%3Ccircle cx='110' cy='220' r='6'/%3E%3Cpath d='M180 214c8 0 8 12 16 12'/%3E%3Crect x='250' y='200' width='18' height='14' rx='4'/%3E%3Cpath d='M60 290c10-6 16 8 26 0'/%3E%3Ccircle cx='200' cy='292' r='7'/%3E%3C/g%3E%3C/svg%3E");
}

body.dark .right-bubble:not([data-bubble-name="activity"]) {
  background: #005c4b !important;
  color: #e9edef !important;
}

body.dark .left-bubble:not([data-bubble-name="activity"]) {
  background: #202c33 !important;
  color: #e9edef !important;
}

body.dark [data-bubble-name="activity"] {
  background: #182229 !important;
  color: #8696a0 !important;
}

body.dark .reply-box {
  background: #2a3942 !important;
  color: #e9edef;
}

body.dark .reply-box.is-private,
body.dark .left-bubble.bg-n-solid-amber,
body.dark .right-bubble.bg-n-solid-amber {
  background: #fff3c4 !important;
  color: #111b21 !important;
}

body.dark .conversations-list-wrap input,
body.dark .conversation-details-wrap select {
  background: #2a3942 !important;
  color: #e9edef !important;
  border-color: #3b4a54 !important;
}

body.dark a.text-link,
body.dark a.text-n-brand {
  color: #00a884 !important;
}

/* Atividade aberta: faixa curta, cor pela prioridade, sem herdar o cabeçalho. */
.conversation-details-wrap > .work-activity-pin {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: 132px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: auto !important;
  margin: 8px 12px 0;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  color: inherit;
}

.work-activity-pin--compact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  margin: 4px 8px 6px;
}

/* A lista cresce com cada atividade. A cor fica na faixa do contato. */
.conversations-list .conversation:has(.work-activity-pin) {
  height: auto !important;
  max-height: none !important;
  align-items: flex-start !important;
  overflow: visible !important;
}

.conversations-list .conversation:has(.work-activity-pin__row[data-priority="low"]),
.conversations-list .conversation:has(.work-activity-pin__row[data-priority="low"]):hover,
.conversations-list .conversation:has(.work-activity-pin__row[data-priority="low"]).active {
  background: #e7f6ef !important;
  box-shadow: inset 3px 0 0 #008069;
}

.conversations-list .conversation:has(.work-activity-pin__row[data-priority="medium"]),
.conversations-list .conversation:has(.work-activity-pin__row[data-priority="medium"]):hover,
.conversations-list .conversation:has(.work-activity-pin__row[data-priority="medium"]).active {
  background: #fff4d6 !important;
  box-shadow: inset 3px 0 0 #c58a00;
}

.conversations-list .conversation:has(.work-activity-pin__row[data-priority="high"]),
.conversations-list .conversation:has(.work-activity-pin__row[data-priority="high"]):hover,
.conversations-list .conversation:has(.work-activity-pin__row[data-priority="high"]).active {
  background: #fdecea !important;
  box-shadow: inset 3px 0 0 #d93025;
}

.work-activity-pin__row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 28px;
  padding: 0 8px 0 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  border-left-width: 3px;
}

.work-activity-pin--compact .work-activity-pin__row {
  height: auto !important;
  min-height: 18px;
  padding: 0 2px !important;
  background: transparent !important;
  border-color: transparent !important;
  color: #111b21 !important;
}

.work-activity-pin__title,
.work-activity-pin__done {
  background: transparent !important;
  color: inherit !important;
  border: 0;
  padding: 0;
  font: inherit;
}

.work-activity-pin__title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
  text-align: start;
  cursor: pointer;
}

.work-activity-pin__label {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: inherit !important;
}

.work-activity-pin__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  color: inherit !important;
}

.work-activity-pin__done {
  flex: 0 0 auto;
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  border: 1px solid currentColor !important;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  cursor: pointer;
}

.work-activity-pin:not(.work-activity-pin--compact) .work-activity-pin__row[data-priority="low"] {
  background: #e7f6ef !important;
  color: #0b5340 !important;
  border-color: #b7e4d2 !important;
  border-left-color: #008069 !important;
}

.work-activity-pin:not(.work-activity-pin--compact) .work-activity-pin__row[data-priority="medium"] {
  background: #fff4d6 !important;
  color: #6b4e00 !important;
  border-color: #f0dd9a !important;
  border-left-color: #c58a00 !important;
}

.work-activity-pin:not(.work-activity-pin--compact) .work-activity-pin__row[data-priority="high"] {
  background: #fdecea !important;
  color: #8c1d18 !important;
  border-color: #f5c6c2 !important;
  border-left-color: #d93025 !important;
}

body.dark .conversations-list .conversation:has(.work-activity-pin__row[data-priority="low"]),
body.dark .conversations-list .conversation:has(.work-activity-pin__row[data-priority="low"]):hover,
body.dark .conversations-list .conversation:has(.work-activity-pin__row[data-priority="low"]).active {
  background: #12352c !important;
  box-shadow: inset 3px 0 0 #2bd4a8;
}

body.dark .conversations-list .conversation:has(.work-activity-pin__row[data-priority="medium"]),
body.dark .conversations-list .conversation:has(.work-activity-pin__row[data-priority="medium"]):hover,
body.dark .conversations-list .conversation:has(.work-activity-pin__row[data-priority="medium"]).active {
  background: #3a3014 !important;
  box-shadow: inset 3px 0 0 #f0c14a;
}

body.dark .conversations-list .conversation:has(.work-activity-pin__row[data-priority="high"]),
body.dark .conversations-list .conversation:has(.work-activity-pin__row[data-priority="high"]):hover,
body.dark .conversations-list .conversation:has(.work-activity-pin__row[data-priority="high"]).active {
  background: #3f1d1d !important;
  box-shadow: inset 3px 0 0 #f28b82;
}

body.dark .conversations-list .work-activity-pin--compact .work-activity-pin__row,
body.dark .conversations-list .work-activity-pin--compact .work-activity-pin__text,
body.dark .conversations-list .work-activity-pin--compact .work-activity-pin__done {
  background: transparent !important;
  color: #e9edef !important;
}

body.dark .conversation-details-wrap .work-activity-pin:not(.work-activity-pin--compact) .work-activity-pin__row[data-priority="low"] {
  background: #12352c !important;
  color: #b6f3df !important;
  border-color: #1f5c4b !important;
  border-left-color: #2bd4a8 !important;
}

body.dark .conversation-details-wrap .work-activity-pin:not(.work-activity-pin--compact) .work-activity-pin__row[data-priority="medium"] {
  background: #3a3014 !important;
  color: #ffe7a8 !important;
  border-color: #6a5520 !important;
  border-left-color: #f0c14a !important;
}

body.dark .conversation-details-wrap .work-activity-pin:not(.work-activity-pin--compact) .work-activity-pin__row[data-priority="high"] {
  background: #3f1d1d !important;
  color: #ffd0cb !important;
  border-color: #6e3030 !important;
  border-left-color: #f28b82 !important;
}

.conversations-list .work-activity-pin--compact .work-activity-pin__row,
.conversations-list .work-activity-pin--compact .work-activity-pin__text,
.conversations-list .work-activity-pin--compact .work-activity-pin__label,
.conversations-list .work-activity-pin--compact .work-activity-pin__done {
  background: transparent !important;
  color: #111b21 !important;
}
