/* Chat interno + sino — dock no canto inferior esquerdo (estilo Hangouts) */
:root { --swc-left: 264px; --swc-accent: #b8112a; --swc-ink: #1c2330; --swc-line: #e6e8ee; }

/* ── Launcher no rodapé da sidebar ── */
.chat-launcher { display: flex; gap: 8px; margin: 0 0 8px; }
.swc-lbtn {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.06); color: inherit; border: 1px solid rgba(255,255,255,.10);
  border-radius: 9px; padding: 7px 9px; cursor: pointer; font-size: 12.5px; font-weight: 600;
  transition: background .15s, border-color .15s;
}
.swc-lbtn:hover { background: rgba(255,255,255,.12); }
.swc-lbtn-chat { flex: 1; justify-content: flex-start; }
.swc-badge {
  position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--swc-accent); color: #fff; border-radius: 9px; font-size: 10.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1; box-shadow: 0 0 0 2px rgba(0,0,0,.25);
}
.swc-row .swc-badge, .swc-pop .swc-badge { position: static; box-shadow: none; margin-left: auto; }

/* ── Dock (flex row de janelas) ── */
.swc-dock { position: fixed; left: var(--swc-left); bottom: 0; z-index: 1200; display: flex; align-items: flex-end; gap: 12px; pointer-events: none; }
.swc-dock > * { pointer-events: auto; }

/* ── Popovers (conversas / sino) — item do dock: fica À ESQUERDA das janelas, sem cobrir o chat ── */
.swc-pop {
  order: -1; align-self: flex-end; margin-bottom: 14px; width: 326px; max-height: 72vh;
  background: #fff; border: 1px solid var(--swc-line); border-radius: 14px; box-shadow: 0 18px 50px rgba(20,26,40,.22);
  display: flex; flex-direction: column; overflow: hidden; color: var(--swc-ink);
}
.swc-pop-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--swc-line); }
.swc-pop-h b { font-size: 14.5px; }
.swc-pop-act { display: flex; gap: 6px; }
.swc-pop-act button { background: #f1f2f6; border: none; border-radius: 8px; padding: 5px 9px; font-size: 12px; cursor: pointer; color: var(--swc-ink); font-weight: 600; }
.swc-pop-act button:hover { background: #e7e9f0; }
.swc-x { width: 26px; height: 26px; padding: 0 !important; }
.swc-search { padding: 8px 12px; border-bottom: 1px solid var(--swc-line); }
.swc-search input { width: 100%; border: 1px solid var(--swc-line); border-radius: 8px; padding: 7px 10px; font-size: 13px; outline: none; }
.swc-search input:focus { border-color: var(--swc-accent); }
.swc-list { overflow-y: auto; padding: 4px; }
.swc-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #8b91a1; padding: 10px 10px 4px; font-weight: 700; }
.swc-contsub { display: flex; align-items: center; justify-content: space-between; }
.swc-cmodo { display: inline-flex; gap: 2px; background: #eceef3; border-radius: 7px; padding: 2px; }
.swc-cmodo button { border: none; background: transparent; color: #8b91a1; font: inherit; font-size: 10.5px; font-weight: 700; text-transform: none; letter-spacing: 0; padding: 2px 8px; border-radius: 5px; cursor: pointer; }
.swc-cmodo button.on { background: #fff; color: var(--swc-accent); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.swc-row { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; cursor: pointer; position: relative; }
.swc-row:hover { background: #f4f5f9; }
.swc-row-b { min-width: 0; flex: 1; }
.swc-row-t { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swc-row-p { font-size: 12px; color: #8b91a1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swc-gtag { font-size: 10px; background: #eceefb; color: #5560c0; padding: 1px 5px; border-radius: 6px; font-weight: 700; vertical-align: middle; }
.swc-empty { padding: 14px; text-align: center; color: #9aa0b0; font-size: 12.5px; }
/* Categoria (cargo) na lista de contatos */
.swc-cat { display: flex; align-items: center; gap: 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: #6b7180; font-weight: 800; padding: 10px 10px 3px; border-top: 1px solid #eceef3; margin-top: 2px; }
.swc-cat:first-child { border-top: none; margin-top: 0; }
.swc-cat-n { font-size: 10px; background: #eceefb; color: #5560c0; padding: 0 6px; border-radius: 999px; font-weight: 700; }

/* avatar + presença */
.swc-av { width: 34px; height: 34px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 700; overflow: hidden; }
.swc-av img { width: 100%; height: 100%; object-fit: cover; }
.swc-av.grp { background: #5560c0 !important; }
.swc-dot { width: 9px; height: 9px; border-radius: 50%; background: #c4c9d4; border: 2px solid #fff; position: absolute; left: 33px; bottom: 8px; }
.swc-dot.on { background: #2bbd6e; }
.swc-dot.away { background: #f4b740; }   /* ausente: aba em 2º plano ou ocioso */

/* ── Notificações ── */
.swc-noti { padding: 9px 11px; border-radius: 9px; }
.swc-noti:hover { background: #f4f5f9; }
.swc-noti-t { font-size: 13px; line-height: 1.35; }
.swc-noti-m { font-size: 11px; color: #9aa0b0; margin-top: 3px; }

/* ── Janela flutuante ── */
.swc-win {
  width: 304px; height: 392px; background: #fff; border: 1px solid var(--swc-line);
  border-radius: 14px 14px 0 0; box-shadow: 0 18px 50px rgba(20,26,40,.22); display: flex; flex-direction: column; overflow: hidden;
}
.swc-win.min { height: 48px; }
.swc-win-h { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--swc-ink); color: #fff; cursor: pointer; position: relative; }
.swc-win-h .swc-av { width: 28px; height: 28px; }
.swc-win-ht { min-width: 0; flex: 1; }
.swc-win-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swc-win-st { font-size: 10.5px; opacity: .75; }
.swc-win-min, .swc-win-x { background: rgba(255,255,255,.12); border: none; color: #fff; width: 24px; height: 24px; border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 1; }
.swc-win-min:hover, .swc-win-x:hover { background: rgba(255,255,255,.25); }
.swc-win-body { flex: 1; overflow-y: auto; padding: 10px; background: #f7f8fb; display: flex; flex-direction: column; gap: 4px; }
.swc-win.min .swc-win-body, .swc-win.min .swc-win-foot { display: none; }
.swc-msg { max-width: 84%; align-self: flex-start; }
.swc-msg.mine { align-self: flex-end; }
/* mensagem de grupo de OUTRO: foto (bolinha) + nome + balão */
.swc-msg.grp { display: flex; gap: 6px; align-items: flex-end; max-width: 92%; }
.swc-msg.grp .swc-av { width: 24px; height: 24px; font-size: 9.5px; flex: none; align-self: flex-end; }
.swc-msg-c { min-width: 0; }
.swc-msg-a { font-size: 10.5px; color: #7b8294; margin: 0 0 1px 4px; font-weight: 700; }
.swc-bub { position: relative; background: #fff; border: 1px solid var(--swc-line); padding: 7px 10px 16px; border-radius: 12px; font-size: 13px; line-height: 1.4; word-wrap: break-word; white-space: pre-wrap; }
.swc-msg.mine .swc-bub { background: #e7efff; border-color: #d3e2ff; }
.swc-bub a { color: var(--swc-accent); }
.swc-time { position: absolute; right: 8px; bottom: 3px; font-size: 9.5px; color: #aab0bf; display: inline-flex; align-items: center; gap: 2px; }
/* tiques de envio/leitura (WhatsApp): ✓ enviado (cinza) · ✓✓ visualizado (azul) */
.swc-tick { font-size: 10px; line-height: 1; letter-spacing: -1px; }
.swc-tick .swc-rd { color: #34b7f1; font-weight: 700; }
.swc-win-foot { position: relative; display: flex; align-items: flex-end; gap: 6px; padding: 7px; border-top: 1px solid var(--swc-line); background: #fff; }
.swc-win-foot textarea { flex: 1; resize: none; border: 1px solid var(--swc-line); border-radius: 9px; padding: 8px 10px; font-size: 13px; font-family: inherit; outline: none; max-height: 90px; }
.swc-win-foot textarea:focus { border-color: var(--swc-accent); }
.swc-send { background: var(--swc-accent); color: #fff; border: none; width: 36px; height: 36px; border-radius: 9px; cursor: pointer; font-size: 15px; flex: none; }
.swc-send:hover { filter: brightness(1.07); }
.swc-emoji-btn { background: none; border: none; font-size: 19px; cursor: pointer; padding: 0 2px 6px; line-height: 1; flex: none; opacity: .85; }
.swc-emoji-btn:hover { opacity: 1; }

/* separador de dia (Hoje/Ontem) + agrupamento de mensagens do mesmo autor */
.swc-day { align-self: center; background: #e9ebf2; color: #6b7180; font-size: 10.5px; font-weight: 700; padding: 3px 11px; border-radius: 10px; margin: 9px 0 5px; }
.swc-msg.grouped { margin-top: -2px; }
.swc-msg.grp.grouped { margin-left: 30px; }   /* alinha com as bolhas que têm avatar (24px + 6px) */
/* emoji grande quando a mensagem é só emoji (sem balão) */
.swc-msg.onlyemoji .swc-bub { background: transparent !important; border: none !important; padding: 0 6px 14px !important; box-shadow: none !important; }
.swc-bigemoji { font-size: 30px; line-height: 1.25; }

/* ── Seletor de emoji ── */
.swc-emoji-pop { position: absolute; left: 6px; right: 6px; bottom: calc(100% + 4px); height: 256px; background: #fff; border: 1px solid var(--swc-line); border-radius: 12px; box-shadow: 0 -10px 32px rgba(20,26,40,.20); display: flex; flex-direction: column; overflow: hidden; z-index: 6; }
.swc-emoji-search { padding: 7px 8px; border-bottom: 1px solid var(--swc-line); }
.swc-emoji-q { box-sizing: border-box; width: 100%; border: 1px solid var(--swc-line); border-radius: 8px; padding: 6px 9px; font-size: 12.5px; outline: none; }
.swc-emoji-q:focus { border-color: var(--swc-accent); }
.swc-emoji-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(8, 1fr); gap: 1px; padding: 6px; align-content: start; }
.swc-emoji-i { background: none; border: none; font-size: 20px; cursor: pointer; border-radius: 7px; padding: 4px 0; line-height: 1.2; }
.swc-emoji-i:hover { background: #f0f1f6; }
.swc-emoji-empty { grid-column: 1/-1; padding: 22px; text-align: center; color: #9aa0b0; font-size: 12px; }
.swc-emoji-tabs { display: flex; border-top: 1px solid var(--swc-line); }
.swc-emoji-tab { flex: 1; background: none; border: none; font-size: 16px; padding: 7px 0; cursor: pointer; border-top: 2px solid transparent; }
.swc-emoji-tab:hover { background: #f7f8fb; }
.swc-emoji-tab.on { background: #f4f5f9; border-top-color: var(--swc-accent); }

/* ── Tela cheia (estilo WhatsApp Web): lista à esquerda · conversa à direita ── */
.swc-full { position: fixed; inset: 0; z-index: 1450; display: flex; background: #eef0f4; color: var(--swc-ink); }
.swc-full-side { width: 360px; max-width: 38%; min-width: 280px; background: #fff; border-right: 1px solid var(--swc-line); display: flex; flex-direction: column; }
.swc-full-side-h { display: flex; align-items: center; gap: 8px; padding: 13px 14px; background: var(--swc-ink); color: #fff; }
.swc-full-title { flex: 1; font-size: 16px; font-weight: 700; }
.swc-full-newg { background: rgba(255,255,255,.14); border: none; color: #fff; border-radius: 8px; padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.swc-full-newg:hover { background: rgba(255,255,255,.24); }
.swc-full-side-h .swc-x { background: rgba(255,255,255,.14); color: #fff; }
.swc-full-side-h .swc-x:hover { background: rgba(255,255,255,.28); }
.swc-full-list { flex: 1; overflow-y: auto; padding: 4px; }
.swc-full-row { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; cursor: pointer; position: relative; }
.swc-full-row:hover { background: #f4f5f9; }
.swc-full-row.on { background: #e7eff1; }
.swc-full-row .swc-av { width: 44px; height: 44px; font-size: 15px; }
.swc-full-row .swc-dot { left: 41px; bottom: 9px; }
.swc-full-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #ece5dd; }
.swc-full-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #7f8696; font-size: 15px; }
.swc-full-empty-ic { font-size: 56px; opacity: .45; }
.swc-full-conv-h { display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: #f0f2f5; border-bottom: 1px solid var(--swc-line); }
.swc-full-conv-h .swc-av { width: 40px; height: 40px; }
.swc-full-conv-name { font-size: 15.5px; font-weight: 700; }
.swc-full-conv-st { font-size: 12px; color: #6b7180; }
.swc-full-body { flex: 1; overflow-y: auto; padding: 16px 7%; display: flex; flex-direction: column; gap: 3px; }
.swc-full-body .swc-msg { max-width: 62%; }
.swc-full-foot { position: relative; display: flex; align-items: flex-end; gap: 8px; padding: 10px 16px; background: #f0f2f5; }
.swc-full-foot textarea { flex: 1; resize: none; border: none; border-radius: 10px; padding: 11px 14px; font-size: 14px; font-family: inherit; outline: none; max-height: 120px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.swc-full-foot .swc-send { width: 42px; height: 42px; }
.swc-full-foot .swc-emoji-btn { font-size: 22px; padding-bottom: 9px; }
.swc-full-foot .swc-emoji-pop { left: 50px; right: auto; width: 360px; bottom: calc(100% + 6px); }
@media (max-width: 820px) { .swc-full-side { width: 300px; min-width: 240px; } .swc-full-body { padding: 14px 4%; } .swc-full-body .swc-msg { max-width: 80%; } }

/* ── Modais (novo grupo / aviso) ── */
.swc-modal-bg { position: fixed; inset: 0; background: rgba(20,26,40,.45); z-index: 1400; display: flex; align-items: center; justify-content: center; }
.swc-modal { width: 380px; max-width: 92vw; max-height: 86vh; background: #fff; border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; color: var(--swc-ink); }
.swc-modal-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--swc-line); }
.swc-modal-b { padding: 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.swc-modal-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #8b91a1; font-weight: 700; }
.swc-inp { box-sizing: border-box; width: 100%; border: 1px solid var(--swc-line); border-radius: 9px; padding: 9px 11px; font-size: 13.5px; font-family: inherit; outline: none; }
.swc-inp:focus { border-color: var(--swc-accent); }
.swc-chklist { display: flex; flex-direction: column; gap: 2px; max-height: 230px; overflow-y: auto; }
.swc-chk { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.swc-chk:hover { background: #f4f5f9; }
.swc-chk input { width: 16px; height: 16px; }
.swc-modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--swc-line); }
.swc-btn { background: #f1f2f6; border: none; border-radius: 9px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--swc-ink); }
.swc-btn-p { background: var(--swc-accent); color: #fff; }
.swc-btn:hover { filter: brightness(.97); }

/* ── Toast ── */
.swc-toast { position: fixed; left: 16px; bottom: 16px; z-index: 1500; max-width: 320px; background: var(--swc-ink); color: #fff; padding: 11px 14px; border-radius: 11px; font-size: 13px; box-shadow: 0 12px 30px rgba(0,0,0,.3); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s; cursor: pointer; }
.swc-toast.on { opacity: 1; transform: translateY(0); pointer-events: auto; }

@media (max-width: 760px) {
  :root { --swc-left: 8px; }
  .swc-pop { width: calc(100vw - 16px); }
  .swc-win { width: calc(100vw - 16px); }
  .swc-dock { right: 8px; }
}

/* ── RBAC: gating de escrita ── */
/* Controle de Estoque em modo somente-leitura: esconde os controles de escrita */
.rup-ro #rupGerarConf,
.rup-ro #rupSelAll,
.rup-ro .rup-sel,
.rup-ro .rup-ia-btn,
.rup-ro .rup-tag-add,
.rup-ro #rupEtqGer { display: none !important; }
/* Selo "✓ Verificado" no Controle de Estoque (vem da conferência; cai no restock) */
.rup-tag.rup-seal { background: #e7f7ee !important; color: #1e8b4d !important; border: 1px solid #b6e6cb !important; cursor: pointer; font-weight: 700; }
.rup-tag.rup-seal:hover { background: #d6f0e0 !important; }
/* Conferência: itens ocultos (ocultar conferidos) */
.conf-vocultos { cursor: pointer; color: #6b7280; font-size: 12px; margin-left: 6px; text-decoration: underline; }
.conf-vocultos:hover { color: #111827; }
.conf-ocultos-box { margin-top: 14px; border: 1px dashed #d7dbe3; border-radius: 12px; background: #fafbfc; padding: 6px 8px 8px; }
.conf-ocultos-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 6px; font-size: 12.5px; color: #6b7280; }
.conf-ocultos-h .cmp-btn-ghost { margin-left: auto; }
.conf-itbl-ocultos { opacity: .72; }
.rup-pop-selo .rup-pop-vazio { padding: 10px 12px; color: #9aa0b0; font-size: 12.5px; }
.rup-robanner {
  display: flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 9px 13px;
  background: #fff7e6; border: 1px solid #ffe0a3; color: #8a5a00; border-radius: 10px; font-size: 12.5px;
}

/* Meu perfil */
.pf-foto { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 6px; }
.pf-av { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; background: #5560c0; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; }
.pf-av img { width: 100%; height: 100%; object-fit: cover; }
.pf-troca { cursor: pointer; }
.pf-hint { font-size: 11px; color: #9aa0b0; }
/* Crop da foto de perfil (quadrado + máscara circular) */
.pf-crop-wrap { position: relative; width: 300px; height: 300px; max-width: 100%; border-radius: 12px; overflow: hidden; background: #11151c; touch-action: none; }
.pf-crop-canvas { display: block; cursor: grab; }
.pf-crop-canvas:active { cursor: grabbing; }
.pf-crop-ring { position: absolute; inset: 0; pointer-events: none; border-radius: 12px; }
.pf-crop-ring::after { content: ''; position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; transform: translate(-50%,-50%); border-radius: 50%; box-shadow: 0 0 0 600px rgba(17,21,28,.55); }
.pf-crop-zoom { display: flex; align-items: center; gap: 9px; width: 100%; font-size: 12px; color: #8b91a1; margin-top: 12px; }
.pf-crop-zoom input { flex: 1; }

/* Correção de Ponto: aviso "atualizando" (cache servido na hora + refresh por trás) */
.cps-upd { font-size: 11.5px; color: #b5781a; display: inline-flex; align-items: center; gap: 4px; margin-left: auto; animation: cps-pulse 1.2s ease-in-out infinite; white-space: nowrap; }
@keyframes cps-pulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

/* ── Balcão de Ideias / Dev-IA (só staging) — canto inferior DIREITO ── */
.dia-launcher { position: fixed; right: 16px; bottom: 16px; z-index: 1190; }
.dia-fab { background: #6d4ed6; color: #fff; border: none; border-radius: 999px; padding: 10px 16px; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 24px rgba(109,78,214,.35); }
.dia-fab:hover { filter: brightness(1.07); }
/* painel = sidebar COMPLETA na direita (altura total) */
.dia-dock { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1195; }
.dia-panel { width: 460px; max-width: 96vw; height: 100vh; background: #fff; border-left: 1px solid #e6e8ee; box-shadow: -14px 0 44px rgba(20,26,40,.20); display: flex; flex-direction: column; overflow: hidden; color: #1c2330; }
.dia-h { display: flex; align-items: center; gap: 8px; padding: 14px 16px; background: #2a2150; color: #fff; }
.dia-h b { font-size: 15.5px; }
.dia-h > div { flex: 1; min-width: 0; }
.dia-sub { font-size: 10.5px; opacity: .8; }
.dia-x, .dia-back { background: rgba(255,255,255,.14); border: none; color: #fff; width: 26px; height: 26px; border-radius: 7px; cursor: pointer; font-size: 14px; flex: none; }
.dia-x:hover, .dia-back:hover { background: rgba(255,255,255,.28); }
.dia-body { flex: 1; overflow-y: auto; padding: 14px; background: #f7f8fb; }
.dia-foot { padding: 12px 14px; border-top: 1px solid #e6e8ee; }
.dia-btn-p { width: 100%; background: #6d4ed6; color: #fff; border: none; border-radius: 9px; padding: 9px; font-weight: 700; font-size: 13px; cursor: pointer; }
.dia-row { padding: 10px 11px; border-radius: 9px; cursor: pointer; background: #fff; border: 1px solid #eceef3; margin-bottom: 7px; }
.dia-row:hover { border-color: #6d4ed6; }
.dia-row-t { font-size: 13.5px; font-weight: 600; }
.dia-row-s { font-size: 11.5px; color: #8b91a1; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dia-badge { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px; vertical-align: middle; background: #eceefb; color: #5560c0; }
.dia-badge.dia-aplicada { background: #e7f7ee; color: #1e8b4d; }
.dia-badge.dia-recusada { background: #fbe9e9; color: #c0392b; }
.dia-badge.dia-em_analise { background: #fff3e0; color: #b5781a; }
.dia-empty, .dia-load { padding: 16px; text-align: center; color: #9aa0b0; font-size: 12.5px; line-height: 1.5; }
.dia-msg { margin-bottom: 9px; }
.dia-msg.gestor { text-align: right; }
.dia-msg-q { font-size: 10px; color: #8b91a1; margin: 0 4px 2px; font-weight: 700; }
.dia-bub { display: inline-block; text-align: left; max-width: 90%; padding: 10px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; background: #fff; border: 1px solid #e6e8ee; }
.dia-msg.gestor .dia-bub { background: #efeaff; border-color: #ddd3ff; }
.dia-msg.claude .dia-bub { background: #e7f7ee; border-color: #b6e6cb; }
.dia-composer { display: flex; gap: 6px; padding: 8px; border-top: 1px solid #e6e8ee; background: #fff; }
.dia-composer textarea { flex: 1; resize: none; border: 1px solid #e6e8ee; border-radius: 9px; padding: 8px 10px; font: inherit; font-size: 13px; outline: none; max-height: 90px; }
.dia-composer textarea:focus { border-color: #6d4ed6; }
.dia-send { background: #6d4ed6; color: #fff; border: none; width: 38px; border-radius: 9px; cursor: pointer; font-size: 15px; }
@media (max-width: 760px) { .dia-panel { width: 100vw; max-width: 100vw; } }

/* Admin: grade de permissão por setor (ver × gravar) */
.adm-rwgrid { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.adm-rwrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 8px; border-radius: 8px; }
.adm-rwrow:hover { background: #f4f5f9; }
.adm-rwtog { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #5a6172; cursor: pointer; white-space: nowrap; }
.adm-rwtog input:disabled + span { opacity: .4; }
.adm-rwtog input { width: 15px; height: 15px; }
.adm-rwtog-off { opacity: .45; cursor: not-allowed; }   /* gestor não grava aqui → não pode liberar gravar */
