:root, [data-theme="dark"] {
  --bg: #f0c419;
  --panel: #f5d042;
  --panel-2: #c4c4c4;
  --line: #b8972e;
  --text: #1a1a1a;
  --muted: #5c5340;
  --danger: #c62828;
  --ok: #1a1a1a;
  --sidebar-bg: #f0c419;
  --input-bg: #d8d8d8;
  --dropdown-bg: #f5d042;
  --card-bg: #b0b0b0;
  --inline-form-bg: #c4c4c4;
  --timeline-card-bg: #f5d042;
  --brand-bg: transparent;
}
[data-theme="light"] {
  --bg: #f2f2f2;
  --panel: #ffffff;
  --panel-2: #efefef;
  --line: #dedede;
  --text: #111111;
  --muted: #666666;
  --danger: #cc2200;
  --ok: #000;
  --sidebar-bg: #ffffff;
  --input-bg: #ffffff;
  --dropdown-bg: #ffffff;
  --card-bg: #f8f8f8;
  --inline-form-bg: #f4f4f4;
  --timeline-card-bg: #ffffff;
  --brand-bg: transparent;
}
.theme-icon-to-light { display: block; }
.theme-icon-to-dark { display: none; }
[data-theme="light"] .theme-icon-to-light { display: none; }
[data-theme="light"] .theme-icon-to-dark { display: block; }
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Roboto, Arial, sans-serif;
}
/* Nenhuma tela arrasta para os lados no celular: quem é largo de propósito
   (tabela de listagem, kanban) rola dentro do próprio container. O overflow-x
   do <body> é propagado para a viewport (o <html> segue `visible`), então o
   body NÃO vira "clipador" — chat flutuante, modais e FAB (position: fixed)
   continuam intactos, e os travamentos de rolagem (body.sidebar-open /
   body.chat-is-open) seguem funcionando. `clip` é o valor bom (não cria
   contexto de rolagem); `hidden` fica de reserva para navegadores antigos. */
body {
  overflow-x: hidden;
  overflow-x: clip;
}
img, video, audio, iframe, embed, object { max-width: 100%; }
a { color: inherit; text-decoration: none; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 258px;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: var(--sidebar-bg);
  overflow: hidden;
  /* Logo fixa no topo; só a navegação rola quando o menu passa da altura da tela. */
  display: flex;
  flex-direction: column;
}
.sidebar nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* O nav é um grid e agora ocupa toda a altura restante da barra. Sem isto o
     align-content padrão (stretch) esticaria os grupos/itens para preencher a
     sobra — o que deforma o menu curto (ex.: o do advogado, com poucos itens). */
  align-content: start;
  padding-right: 4px;
  margin-right: -4px; /* a barra de rolagem ocupa o respiro, sem estreitar os itens */
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--muted) 45%, var(--line)) transparent;
}
.sidebar nav::-webkit-scrollbar { width: 6px; }
.sidebar nav::-webkit-scrollbar-track { background: transparent; }
.sidebar nav::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--muted) 45%, var(--line));
  border-radius: 999px;
}
.sidebar nav::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.mobile-menu-btn,
.sidebar-backdrop {
  display: none;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  margin-bottom: 20px;
  padding: 6px 8px;
}
.brand-logo {
  display: block;
  width: auto;
  max-width: 200px;
  height: 50px;
  max-height: 50px;
  object-fit: contain;
  object-position: center;
}
.brand-logo-dark {
  display: block;
}
.brand-logo-light {
  display: none;
}
[data-theme="light"] .brand-logo-dark {
  display: none;
}
[data-theme="light"] .brand-logo-light {
  display: block;
}
nav { display: grid; gap: 10px; }
.nav-group {
  display: grid;
  gap: 4px;
}
.nav-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 32px;
  padding: 5px 8px 5px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #6f6f6f;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  cursor: pointer;
}
.nav-title > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-title .material-symbols-outlined {
  font-size: 18px;
}
.nav-title:hover {
  border-color: var(--line);
  color: var(--text);
  background: var(--panel);
}
.nav-chevron {
  transition: transform .18s ease;
}
.nav-group.is-collapsed .nav-chevron {
  transform: rotate(-90deg);
}
.submenu {
  display: grid;
  gap: 4px;
  overflow: hidden;
}
.nav-group.is-collapsed .submenu {
  display: none;
}
nav a, .icon-btn, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
}
nav a {
  justify-content: flex-start;
  min-height: 34px;
  padding: 7px 10px;
  color: var(--muted);
}
nav a:hover { background: #cc9f00; color: #fff; }
/* Página atual: marcada pelo app.js (.is-current) para o usuário se localizar
   no menu mesmo depois de a rolagem ser restaurada. */
.sidebar nav a.is-current {
  background: rgba(0, 0, 0, .08);
  color: var(--text);
  font-weight: 500;
}
[data-theme="light"] .sidebar nav a.is-current { background: rgba(185, 137, 0, .14); }
.main { margin-left: 258px; padding: 28px; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.eyebrow { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0; }
h1 { margin: 4px 0 0; font-size: 32px; }
h2 { margin: 0 0 16px; font-size: 18px; }
.userbox { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--muted);
  font-size: 13px;
}
.inline-check input {
  width: 20px;
  min-height: 20px;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 480px;
  min-width: 280px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.search input {
  flex: 1;
  min-width: 0;
  width: auto;
  border: 0;
  background: transparent;
  padding-left: 0;
  padding-right: 0;
}
.search-submit {
  flex: 0 0 auto;
  width: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.search-submit:hover { color: var(--text); }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}
textarea { min-height: 120px; resize: vertical; }
textarea.case-description { min-height: 120px; max-height: 60vh; line-height: 1.5; }
.select-hidden {
  display: none;
}
.autocomplete {
  position: relative;
}
.autocomplete-list {
  position: absolute;
  z-index: 30;
  inset: calc(100% + 6px) 0 auto;
  display: none;
  max-height: 236px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--dropdown-bg);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .38);
}
.autocomplete.is-open .autocomplete-list {
  display: block;
}
.autocomplete-list button,
.autocomplete-empty {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
}
.autocomplete-list button {
  cursor: pointer;
}
.autocomplete-list button:hover {
  background: var(--panel-2);
}
.autocomplete-list button:last-child,
.autocomplete-empty {
  border-bottom: 0;
}
.autocomplete-empty {
  color: var(--muted);
}
.btn {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #cc9f00;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: #cc9f00; color: #000; transition: background .12s ease, color .12s ease; }
.btn.ghost { background: transparent; color: var(--text); }
[data-theme="light"] .btn { color: var(--text); }
[data-theme="light"] .btn.ghost { color: var(--text); }
.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}
.danger { color: var(--danger); }
.table-wrap, .panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: auto;
}
table { width: 100%; border-collapse: collapse; }
/* Piso de largura só nas tabelas de listagem, que rolam dentro do wrapper.
   Solto no seletor `table`, esse min-width vazava para tabelas pequenas (ex.: a
   de encaminhamentos na tela do processo, que não tem wrapper com rolagem) e
   empurrava a página inteira para o lado no celular. */
.table-wrap table { min-width: 920px; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.actions { width: 110px; white-space: nowrap; }
.actions form { display: inline; }
.dropdown {
  position: relative;
  display: inline-flex;
}
.dropdown-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  right: 0;
  display: none;
  min-width: 154px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--dropdown-bg);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .38);
}
.dropdown.is-open .dropdown-menu {
  display: grid;
  gap: 4px;
}
.dropdown-menu a,
.dropdown-menu button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.dropdown-menu a:hover,
.dropdown-menu button:hover {
  background: var(--panel-2);
}
.dropdown-menu .material-symbols-outlined {
  font-size: 18px;
}
.empty { color: var(--muted); text-align: center; }
.bool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 22px;
}
.bool-yes { color: #7ddc8a; }
.bool-no { color: var(--muted); }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
  width: 100%;
}
/* min-width: 0 — sem ele um valor longo sem espaços (link do advogado, e-mail)
   estica o campo além da coluna do grid e arrasta a tela. */
.field { display: grid; gap: 8px; min-width: 0; color: var(--muted); font-size: 13px; }
.field-textarea { grid-column: 1 / -1; }
.field-checkbox { align-content: end; }
.field-checkbox input { width: 22px; min-height: 22px; }
.field-lawyers { grid-column: 1 / -1; }
.field-hint { margin: 0; font-size: 12px; color: var(--muted); }
/* Valor + unidade lado a lado (ex.: atraso do fluxo lead: "30" | "segundos"). */
.field-inline { display: flex; gap: 8px; align-items: center; }
.field-inline input { flex: 1 1 auto; min-width: 0; }
.field-inline select { flex: 0 0 auto; width: auto; }
.lawyers-count { font-weight: 400; color: var(--muted); }
.lawyers-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.lawyers-search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 220px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.lawyers-search .material-symbols-outlined { font-size: 18px; color: var(--muted); }
.lawyers-search input {
  border: 0;
  background: transparent;
  padding: 8px 0;
  width: 100%;
  color: inherit;
}
.lawyers-search input:focus { outline: none; }
.btn.btn-sm { padding: 6px 10px; font-size: 12px; }
.field-lawyers .checkbox-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px 16px;
  max-height: 260px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.field-lawyers .checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.field-lawyers .checkbox-item input { width: 18px; min-height: 18px; }
.field-action {
  width: 38px;
  min-height: 38px;
  padding: 0;
}
.field:has(.field-action) {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}
.field:has(.field-action) > span {
  grid-column: 1 / -1;
}
.field:has(.field-action) > .autocomplete {
  grid-column: 1;
}
.field:has(.field-action) > .field-action {
  grid-column: 2;
}
/* WhatsApp (.wa-btn): abre os dados do cliente; sempre verde. O interruptor de
   pessoa (.dados-toggle) logo abaixo — só o admin vê — libera/bloqueia o
   advogado: verde (liberado) x cinza (bloqueado). */
.wa-btn .wa-icon { display: block; color: #25D366; transition: color .15s ease; }
.wa-btn:hover .wa-icon { color: #1da851; }
/* Atalho do telefone nos dados do cliente: mesmo botão verde, só que é um link
   (wa.me) e não um <button> — daí zerar o sublinhado herdado de <a>. */
.wa-link { text-decoration: none; }
.dados-toggle .material-symbols-outlined { color: var(--muted); transition: color .15s ease; }
.dados-toggle.is-on .material-symbols-outlined { color: #25D366; }
.file-link { color: var(--text); font-size: 13px; text-decoration: underline; }
/* Campo monetário: prefixo "R$" fixo à esquerda para sinalizar valor em dinheiro. */
.money-input { position: relative; display: flex; align-items: center; }
.money-prefix {
  position: absolute;
  left: 12px;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  pointer-events: none;
}
.money-input input {
  padding-left: 38px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .2px;
}
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.alert { margin-bottom: 16px; padding: 12px 14px; border: 1px solid #5c2222; border-radius: 8px; background: #1c0909; color: #ffb3b3; }
.alert.success {
  border-color: rgba(125, 220, 138, .55);
  background: rgba(125, 220, 138, .1);
  color: #bdf1d8;
}
[data-theme="light"] .alert.success {
  border-color: rgba(46, 125, 107, .45);
  background: rgba(46, 125, 107, .1);
  color: #1b4d3f;
}
/* ── Fluxos WhatsApp (config + respostas) ─────────────────────────────────── */
.fw-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 20px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.fw-toolbar--compact { align-items: center; }
.fw-lead {
  flex: 1 1 280px;
  margin: 0;
  max-width: 720px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}
.fw-lead a { text-decoration: underline; text-underline-offset: 2px; }
.fw-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fw-form {
  display: grid;
  gap: 16px;
  max-width: 920px;
}
.fw-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
}
.fw-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.fw-panel-head > .material-symbols-outlined {
  font-size: 26px;
  color: var(--muted);
  margin-top: 2px;
}
.fw-panel-titles { flex: 1 1 200px; min-width: 0; }
.fw-panel-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}
.fw-panel-head .field-hint { margin-top: 4px; }
.fw-panel-body {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
}
.fw-panel--filter .field { margin: 0; padding: 0 18px 18px; }
.fw-flow:not(:has(input[type="checkbox"]:checked)) .fw-panel-body {
  opacity: .72;
}
.fw-delay-inputs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.fw-delay-inputs input[type="number"] {
  width: 96px;
  min-width: 0;
}
.fw-notes {
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--inline-form-bg);
  font-size: 13px;
}
.fw-notes ul {
  margin: 8px 0 0;
  padding-left: 1.2rem;
  line-height: 1.5;
}
.fw-callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, #3a7bd5);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 88%, #3a7bd5 12%);
  font-size: 13px;
  line-height: 1.5;
}
.fw-callout .material-symbols-outlined {
  flex: 0 0 auto;
  font-size: 22px;
  color: var(--muted);
}
.fw-callout p { margin: 0; }
.fw-actions {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 8px;
}
.fw-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  margin-left: auto;
}
.fw-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.fw-switch-track {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--input-bg);
  border: 1px solid var(--line);
  position: relative;
  transition: background .2s ease, border-color .2s ease;
}
.fw-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .2s ease;
}
.fw-switch input:checked + .fw-switch-track {
  background: #2e7d4a;
  border-color: #256b3f;
}
.fw-switch input:checked + .fw-switch-track::after {
  transform: translateX(18px);
}
.fw-switch-label b { font-size: 12px; font-weight: 700; }
.fw-switch .fw-on { display: none; color: #2e7d4a; }
.fw-switch .fw-off { display: inline; color: var(--muted); }
.fw-switch input:checked ~ .fw-switch-label .fw-on { display: inline; }
.fw-switch input:checked ~ .fw-switch-label .fw-off { display: none; }
.row-check {
  width: 22px;
  min-height: 22px;
}
.import-table table {
  min-width: 760px;
}
.import-actions {
  margin-bottom: 36px;
}
/* ── Edição de processo: layout principal + painel lateral de ações ── */
.processo-edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 330px);
  gap: 22px;
  align-items: start;
  width: 100%;
}
.processo-edit-main { min-width: 0; }
.processo-edit-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 12px;
}
.processo-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.proc-section-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .14);
  overflow: visible;
}
.proc-section-card:has(.autocomplete.is-open) {
  position: relative;
  z-index: 30;
}
[data-theme="light"] .proc-section-card {
  box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}
.proc-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(245, 196, 0, .08), transparent);
}
.proc-section-head .material-symbols-outlined {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 196, 0, .14);
  color: #f5c400;
  font-size: 19px;
  flex-shrink: 0;
}
[data-theme="light"] .proc-section-head .material-symbols-outlined {
  background: rgba(185, 137, 0, .12);
  color: #b98900;
}
.proc-section-head h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text);
}
.proc-section-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  padding: 16px 18px 18px;
}
.proc-section-body > .field-textarea,
.proc-section-body > .field-ia-action,
.proc-section-body > .ia-card,
.proc-section-body > .pa-ligar {
  grid-column: 1 / -1;
}
/* ── Inputs do formulário de processo (visual moderno) ── */
.processo-form .proc-section-body > .field {
  gap: 6px;
}
.processo-form .proc-section-body > .field > span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #f5c400;
}
[data-theme="light"] .processo-form .proc-section-body > .field > span {
  color: #b98900;
}
.processo-form .proc-section-body .field > input:not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="radio"]),
.processo-form .proc-section-body .field > textarea,
.processo-form .proc-section-body .autocomplete-input {
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, #f5c400 12%);
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.processo-form .proc-section-body .field > select:not(.select-hidden) {
  min-height: 46px;
  padding: 11px 38px 11px 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, #f5c400 12%);
  background-color: var(--panel-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23a8a8a8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  appearance: none;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
[data-theme="light"] .processo-form .proc-section-body .field > select:not(.select-hidden) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.processo-form .proc-section-body .field > input:not(:disabled):not([readonly]):hover,
.processo-form .proc-section-body .field > textarea:not(:disabled):not([readonly]):hover,
.processo-form .proc-section-body .autocomplete-input:not(:disabled):hover {
  border-color: color-mix(in srgb, #f5c400 42%, var(--line));
  background: color-mix(in srgb, var(--panel-2) 80%, var(--panel));
}
.processo-form .proc-section-body .field > select:not(.select-hidden):not(:disabled):hover {
  border-color: color-mix(in srgb, #f5c400 42%, var(--line));
  background-color: color-mix(in srgb, var(--panel-2) 80%, var(--panel));
}
.processo-form .proc-section-body .field > input:focus,
.processo-form .proc-section-body .field > textarea:focus,
.processo-form .proc-section-body .autocomplete-input:focus {
  outline: none;
  border-color: #cc9f00;
  box-shadow: 0 0 0 3px rgba(245, 196, 0, .16);
  background: var(--input-bg);
}
.processo-form .proc-section-body .field > select:not(.select-hidden):focus {
  outline: none;
  border-color: #cc9f00;
  box-shadow: 0 0 0 3px rgba(245, 196, 0, .16);
  background-color: var(--input-bg);
}
.processo-form .proc-section-body ::placeholder {
  color: var(--muted);
  opacity: .55;
}
.processo-form .proc-section-body .autocomplete {
  position: relative;
  width: 100%;
  min-width: 0;
}
.processo-form .proc-section-body .autocomplete-input {
  width: 100%;
  box-sizing: border-box;
}
.processo-form .proc-section-body .money-input {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, #f5c400 12%);
  border-radius: 12px;
  background: var(--panel-2);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.processo-form .proc-section-body .money-input:hover {
  border-color: color-mix(in srgb, #f5c400 42%, var(--line));
  background: color-mix(in srgb, var(--panel-2) 80%, var(--panel));
}
.processo-form .proc-section-body .money-input:focus-within {
  border-color: #cc9f00;
  box-shadow: 0 0 0 3px rgba(245, 196, 0, .16);
  background: var(--input-bg);
}
.processo-form .proc-section-body .money-input input {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px 11px 44px;
  border: none;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  font-variant-numeric: tabular-nums;
}
.processo-form .proc-section-body .money-input input:focus {
  box-shadow: none;
}
.processo-form .proc-section-body .money-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  font-size: 13px;
  font-weight: 700;
  color: #f5c400;
  pointer-events: none;
}
[data-theme="light"] .processo-form .proc-section-body .money-prefix {
  color: #b98900;
}
.processo-form .proc-section-body .field > input:disabled,
.processo-form .proc-section-body .field > input[readonly],
.processo-form .proc-section-body .field > select:not(.select-hidden):disabled {
  opacity: .72;
  cursor: default;
}
/* Cliente e outros selects com botões ao lado: evita sobreposição. */
.processo-form .proc-section-body .field:has(.field-action) {
  grid-template-columns: minmax(0, 1fr) 46px;
  grid-template-rows: auto auto;
  gap: 6px 8px;
  align-items: stretch;
}
.processo-form .proc-section-body .field:has(.field-action) > span {
  grid-column: 1 / -1;
}
.processo-form .proc-section-body .field:has(.field-action) > select:not(.select-hidden),
.processo-form .proc-section-body .field:has(.field-action) > .autocomplete {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  width: 100%;
}
.processo-form .proc-section-body .field:has(.field-action) > .field-action {
  grid-column: 2;
  align-self: stretch;
}
.processo-form .proc-section-body .field:has(> .field-action + .field-action) > .field-action:first-of-type {
  grid-row: 2;
}
.processo-form .proc-section-body .field:has(> .field-action + .field-action) > .field-action:nth-of-type(2) {
  grid-row: 3;
}
.processo-form .proc-section-body .field:has(.field-action):not(:has(> .field-action + .field-action)) > .field-action {
  grid-row: 2;
}
.processo-form .proc-section-body .field-action {
  min-height: 46px;
  width: 46px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, #f5c400 12%);
  border-radius: 12px;
  background: var(--panel-2);
  transition: border-color .15s ease, background .15s ease;
}
.processo-form .proc-section-body .field-action:hover {
  border-color: color-mix(in srgb, #f5c400 42%, var(--line));
  background: color-mix(in srgb, var(--panel-2) 75%, var(--panel));
}
.processo-form .autocomplete-list {
  z-index: 40;
  border-radius: 12px;
  border-color: color-mix(in srgb, #f5c400 28%, var(--line));
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .42);
}
.processo-form .autocomplete-list button {
  padding: 12px 14px;
  font-size: 14px;
}
.processo-form .autocomplete-list button:hover,
.processo-form .autocomplete-list button:focus-visible {
  background: rgba(245, 196, 0, .1);
}
.processo-form .ia-textarea,
.processo-form .cliente-link-input,
.processo-edit-aside .lawyer-link-input {
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, #f5c400 12%);
  background: var(--panel-2);
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.processo-form .ia-textarea:focus,
.processo-form .cliente-link-input:focus,
.processo-edit-aside .lawyer-link-input:focus {
  outline: none;
  border-color: #cc9f00;
  box-shadow: 0 0 0 3px rgba(245, 196, 0, .16);
  background: var(--input-bg);
}
.processo-aside-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .14);
}
.processo-aside-actions .btn {
  width: 100%;
  justify-content: center;
}
.processo-aside-save {
  background: #f5c400;
  border-color: #f5c400;
  color: #1a1a1a;
}
.processo-aside-save:hover {
  background: #e6b800;
  border-color: #e6b800;
}
[data-theme="light"] .processo-aside-actions {
  box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}
.approval-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.approval-banner > .material-symbols-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .06);
  color: var(--text);
  font-size: 22px;
  flex-shrink: 0;
}
[data-theme="light"] .approval-banner > .material-symbols-outlined {
  background: rgba(0, 0, 0, .05);
}
.approval-banner strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-size: 14px;
}
.approval-banner > div { min-width: 0; }
.approval-banner p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.approval-banner.is-pending {
  border-color: rgba(204, 159, 0, .45);
  background: linear-gradient(135deg, rgba(204, 159, 0, .14), transparent 55%), var(--panel);
}
.approval-banner.is-pending > .material-symbols-outlined {
  background: rgba(204, 159, 0, .18);
  color: #f5c400;
}
.approval-banner.is-approved {
  border-color: rgba(76, 175, 138, .45);
  background: linear-gradient(135deg, rgba(76, 175, 138, .12), transparent 55%), var(--panel);
}
.approval-banner.is-approved > .material-symbols-outlined {
  background: rgba(76, 175, 138, .18);
  color: #4caf8a;
}
.sem-esp-aviso {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(214, 69, 69, .45);
  border-left: 3px solid #d64545;
  border-radius: 14px;
  background: rgba(214, 69, 69, .1);
}
.sem-esp-aviso > .material-symbols-outlined {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(214, 69, 69, .16);
  color: #ff8a8a;
  font-size: 20px;
}
.sem-esp-aviso > div { min-width: 0; }
.sem-esp-aviso strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 13px;
}
.sem-esp-aviso p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.sem-esp-aviso p strong { display: inline; font-size: inherit; }
.sem-esp-aviso a { color: #cc9f00; text-decoration: underline; }
[data-theme="light"] .sem-esp-aviso { background: rgba(200, 40, 40, .08); }
[data-theme="light"] .sem-esp-aviso > .material-symbols-outlined { color: #b32020; }
.oferta-panel {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.oferta-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.oferta-head > .material-symbols-outlined {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(245, 196, 0, .12);
  color: #f5c400;
  font-size: 22px;
}
[data-theme="light"] .oferta-head > .material-symbols-outlined {
  background: rgba(185, 137, 0, .12);
  color: #b98900;
}
.oferta-head > div { min-width: 0; }
.oferta-head strong { display: block; margin-bottom: 2px; color: var(--text); font-size: 14px; }
.oferta-head p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.oferta-hints {
  margin: 0 0 14px;
  padding: 0 0 0 18px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}
.oferta-hints li { margin-bottom: 4px; }
.oferta-hints strong { color: var(--text); font-weight: 600; }
.oferta-feedback {
  margin-bottom: 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid #cc9f00;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12.5px;
}
.oferta-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.oferta-btn {
  width: 100%;
  justify-content: center;
}
.oferta-btn--primary {
  background: #f5c400;
  border-color: #f5c400;
  color: #1a1a1a;
}
.oferta-btn--primary:hover {
  background: #e6b800;
  border-color: #e6b800;
}
.oferta-empty { font-size: 12.5px; color: var(--muted); margin: 0; }
.oferta-status {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.oferta-status-title {
  margin: 0 0 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 700;
}
.oferta-list { display: flex; flex-direction: column; gap: 8px; }
.oferta-list-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.oferta-list-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.oferta-list-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.oferta-when { font-size: 11px; color: var(--muted); }
.oferta-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.oferta-badge--pendente { background: rgba(204, 159, 0, .18); color: #cc9f00; }
.oferta-badge--pago { background: rgba(46, 160, 67, .18); color: #3fb950; }
.oferta-badge--bloqueado { background: rgba(0, 0, 0, .08); color: var(--muted); }
[data-theme="light"] .oferta-badge--bloqueado { background: rgba(0, 0, 0, .06); }
.lawyer-link {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.lawyer-link-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.lawyer-link-head > .material-symbols-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .06);
  color: var(--text);
  font-size: 22px;
}
[data-theme="light"] .lawyer-link-head > .material-symbols-outlined {
  background: rgba(0, 0, 0, .05);
}
.lawyer-link-head > div { min-width: 0; }
.lawyer-link-head strong { display: block; margin-bottom: 2px; color: var(--text); font-size: 14px; }
.lawyer-link-head p { margin: 0; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; line-height: 1.45; }
.lawyer-link-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lawyer-link-input {
  width: 100%;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 12px;
}
.lawyer-link-row .btn { width: 100%; justify-content: center; }
@media (max-width: 960px) {
  .processo-edit-layout { grid-template-columns: 1fr; }
  .processo-edit-aside { position: static; order: -1; }
  .proc-section-body { grid-template-columns: minmax(0, 1fr); }
  .oferta-actions { flex-direction: row; flex-wrap: wrap; }
  .oferta-btn { width: auto; flex: 1 1 auto; }
  .lawyer-link-row { flex-direction: row; align-items: stretch; }
  .lawyer-link-row .btn { width: auto; }
}
.dashboard-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}
.dashboard-filters .field {
  flex: 0 1 220px;
}
.dashboard-filters .btn {
  flex: 0 0 auto;
}
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.metrics article {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.metrics article .material-symbols-outlined {
  font-size: 22px;
  color: var(--accent);
  margin-bottom: 4px;
}
.metrics strong { font-size: 26px; font-weight: 700; line-height: 1.1; }
.metrics small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 1fr) minmax(160px, 0.55fr);
  gap: 14px;
  align-items: start;
}
.dashboard-grid .panel {
  max-height: calc(100vh - 210px);
  overflow: auto;
}
.dashboard-grid table {
  min-width: 0;
}
.dashboard-grid th,
.dashboard-grid td {
  padding: 8px 10px;
}
.dashboard-grid td {
  word-break: break-word;
}
/* Dashboard: cards e painéis em branco (contraste sobre o fundo dourado) */
.main .metrics article,
.main .dashboard-grid .panel {
  background: #ffffff;
  border: 1px solid rgba(26, 26, 26, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.main .metrics article .material-symbols-outlined {
  color: #a67c00;
}
.main .dashboard-grid .panel h2 {
  color: #1a1a1a;
}
.main .dashboard-grid .status-list div {
  background: #f7f7f7;
  border: 1px solid rgba(26, 26, 26, 0.08);
}
.email-queue table {
  min-width: 1040px;
}
.queue-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.queue-status-enviado {
  border-color: rgba(125, 220, 138, .55);
  color: #7ddc8a;
}
.queue-status-falhou {
  border-color: rgba(255, 82, 82, .55);
  color: var(--danger);
}
.queue-status-pendente,
.queue-status-enviando {
  border-color: rgba(0, 0, 0, .22);
  color: var(--text);
}
.queue-error {
  max-width: 320px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.modal {
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}
.modal:not([open]) {
  display: none;
}
.modal::backdrop {
  background: rgba(0, 0, 0, .72);
}
.modal-card {
  display: grid;
  gap: 18px;
  padding: 18px;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.modal-head h2 {
  margin: 4px 0 0;
}
.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
}
.panel { padding: 14px; }
.relation-panel {
  display: grid;
  gap: 18px;
  width: 100%;
  margin-top: 28px;
  margin-bottom: 44px;
  overflow: visible;
}
.relation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 4px;
}
.relation-head h2 {
  margin: 0;
}
.relation-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sidebar-bg);
  color: var(--muted);
  font-weight: 700;
}
.orientacao-intro {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--inline-form-bg);
  color: var(--muted);
  line-height: 1.55;
}
.orientacao-intro p {
  margin: 0;
}
.orientacao-intro > p:first-child {
  color: var(--text);
  font-weight: 600;
}
.orientacao-dica {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid #e0a800;
  border-radius: 8px;
  background: rgba(224, 168, 0, 0.06);
}
.orientacao-dica strong {
  color: var(--text);
}
.orientacao-dica-exemplo {
  font-style: italic;
  opacity: 0.85;
}
.ia-msg-sugestao {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid #25d366;
  border-radius: 8px;
  background: rgba(37, 211, 102, 0.05);
}
.ia-msg-sugestao-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}
.ia-msg-sugestao-head .material-symbols-outlined {
  font-size: 18px;
  color: #25d366;
}
.ia-msg-badge {
  margin-left: auto;
  background: #25d366;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}
.ia-msg-texto {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.ia-msg-actions {
  display: flex;
  gap: 8px;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
  gap: 5px;
}
.btn-sm .material-symbols-outlined {
  font-size: 16px;
}
.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--inline-form-bg);
}
.inline-form textarea {
  min-height: 86px;
}
/* Form de observação com gravador de áudio: empilha textarea, gravador e botão */
.inline-form[data-audio-recorder] {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.inline-form[data-audio-recorder] > .btn[type="submit"] {
  align-self: flex-end;
}
.audio-recorder {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.btn-rec.is-recording {
  border-color: var(--danger);
  color: var(--danger);
  animation: rec-pulse 1.2s ease-in-out infinite;
}
@keyframes rec-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.audio-rec-time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--danger);
}
.audio-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 220px;
}
.audio-preview[hidden] { display: none; }
.audio-preview audio { flex: 1; height: 38px; }
.obs-audio {
  width: 100%;
  max-width: 420px;
  height: 40px;
  margin-top: 4px;
}
.timeline {
  display: grid;
  gap: 0;
  position: relative;
  padding: 6px 0 10px 54px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 24px;
  left: 20px;
  width: 2px;
  border-radius: 999px;
  background: var(--line);
}
.timeline-item {
  position: relative;
  padding-bottom: 18px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
  position: absolute;
  left: -54px;
  top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 5px var(--panel);
  color: #000;
}
.timeline-item:first-child .timeline-marker {
  border-color: #cc9f00;
  color: #fff;
  background: #5c5340;
}
.timeline-marker .material-symbols-outlined {
  font-size: 19px;
}
.timeline-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--timeline-card-bg);
}
.timeline-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  /* Em telas estreitas o autor e a data (que não quebra) não cabem na mesma
     linha — sem o wrap o cartão fica mais largo que a tela. */
  flex-wrap: wrap;
}
.timeline-user, .timeline-card time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.timeline-user {
  color: var(--text);
  font-weight: 700;
}
.timeline-user .material-symbols-outlined, .timeline-card time .material-symbols-outlined {
  font-size: 16px;
}
.timeline-card time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.timeline-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
  white-space: pre-wrap;
  /* Observação com link/texto longo sem espaços quebra em vez de esticar o card. */
  overflow-wrap: anywhere;
}
.status-list { display: grid; gap: 10px; }
.status-list div { display: flex; justify-content: space-between; gap: 10px; min-width: 0; padding: 12px; border-radius: 8px; background: var(--panel-2); }
.status-list div span { min-width: 0; overflow-wrap: anywhere; }
.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(292px, 1fr);
  gap: 16px;
  min-height: 62vh;
  overflow-x: auto;
  padding-bottom: 12px;
  cursor: grab;
  user-select: none;
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
}
.kanban.is-dragging-scroll {
  cursor: grabbing;
}
.kanban-column {
  --col-accent: #b8972e;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}
.kanban-column header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 58px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 12px 12px 0 0;
}
.kanban-column h2 {
  flex: 1;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.kanban-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--col-accent) 22%, #fff);
  border: 1px solid color-mix(in srgb, var(--col-accent) 45%, var(--line));
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .kanban-count {
  background: color-mix(in srgb, var(--col-accent) 35%, #1a1a1a);
}
.status-dot {
  width: 12px;
  height: 12px;
  border: 1px solid #fff;
  border-radius: 50%;
}
.kanban-dropzone {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 12px;
}
.kanban-dropzone.drag-over {
  outline: 2px solid #cc9f00;
  outline-offset: -8px;
}
.kanban-card {
  --kanban-ink: #1a1a1a;
  --kanban-ink-soft: #5c5340;
  --kanban-ink-muted: #7a6f52;
  --kanban-surface: linear-gradient(165deg, #fffef9 0%, #f7f0d4 100%);
  --kanban-border: rgba(138, 112, 32, .32);
  position: relative;
  display: grid;
  gap: 10px;
  padding: 14px 14px 12px;
  border: 1px solid var(--kanban-border);
  border-left: 4px solid var(--col-accent, var(--line));
  border-radius: 10px;
  background: var(--kanban-surface);
  color: var(--kanban-ink);
  box-shadow: 0 2px 8px rgba(74, 58, 12, .08);
  cursor: grab;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.kanban-card:hover {
  box-shadow: 0 8px 20px rgba(74, 58, 12, .12);
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--col-accent) 40%, var(--kanban-border));
}
[data-theme="light"] .kanban-card {
  --kanban-surface: #fff;
  --kanban-border: #e8e4d8;
  --kanban-ink-muted: #666;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}
.kanban-card-id {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--col-accent) 55%, var(--kanban-ink));
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color .15s ease, color .15s ease;
}
.kanban-card-id:hover {
  text-decoration-color: currentColor;
}
.kanban-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.kanban-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--kanban-ink);
  overflow-wrap: anywhere;
}
/* Selos de mensagens novas (não lidas), sobre a borda superior do card. */
.card-badges {
  position: absolute;
  top: -11px;
  right: 8px;
  z-index: 4;
  display: inline-flex;
  gap: 6px;
}
.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .4);
}
.card-badge .material-symbols-outlined { font-size: 14px; }
.card-badge-adv {
  background: #8a8a8a;
  color: #1a1a1a;
  border: 1px solid rgba(0, 0, 0, .18);
}
.card-badge-cli {
  background: #f5c518;
  color: #1a1a1a;
  border: 1px solid rgba(0, 0, 0, .25);
}
/* Selo de caso travado na distribuição automática (sem advogado da área).
   Barra vermelha no topo do card, acima dos demais dados — o card parece
   normal sem ela, já que o campo "Advogado" mostra o SDR da triagem. */
.card-alerta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 5px 9px;
  border: 1px solid rgba(214, 69, 69, .5);
  border-radius: 8px;
  background: rgba(214, 69, 69, .14);
  color: #ff8a8a;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
}
.card-alerta .material-symbols-outlined { font-size: 15px; }
.card-alerta:hover {
  border-color: rgba(214, 69, 69, .8);
  background: rgba(214, 69, 69, .22);
}
[data-theme="light"] .card-alerta {
  background: rgba(200, 40, 40, .1);
  color: #b32020;
}
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: .45; }
/* Fantasma que segue o dedo durante o arraste por toque (celular/tablet). */
.kanban-card-ghost {
  position: fixed;
  z-index: 1200;
  margin: 0;
  pointer-events: none;
  opacity: .92;
  transform: rotate(1.5deg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
}
/* Evita seleção de texto e rolagem acidental enquanto arrasta no toque. */
body.kanban-touch-dragging {
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.kanban-card.is-focused {
  border-color: rgba(125, 220, 138, .85);
  box-shadow: 0 0 0 2px rgba(125, 220, 138, .45);
  animation: card-focus-pulse 1.2s ease-in-out 2;
}
@keyframes card-focus-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(125, 220, 138, .45); }
  50% { box-shadow: 0 0 0 4px rgba(125, 220, 138, .25); }
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 16px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid rgba(125, 220, 138, .55);
  border-radius: 10px;
  background: rgba(20, 40, 30, .96);
  color: #bdf1d8;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 1000;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.kanban-card p { margin: 0; color: var(--kanban-ink); }
/* Chips só no kanban: paleta quente no tema amarelo; sem verde “neon” sobre cinza. */
.kanban-card .kanban-chip {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid rgba(138, 112, 32, .38);
  border-radius: 999px;
  background: rgba(240, 196, 25, .28);
  color: #3d3418;
  font-size: 11px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.kanban-card .kanban-chip .material-symbols-outlined {
  color: #6b5a1e;
}
.kanban-card .kanban-chip--consulta {
  border-color: rgba(46, 125, 107, .4);
  background: rgba(46, 125, 107, .14);
  color: #1b4d3f;
}
.kanban-card .kanban-chip--consulta .material-symbols-outlined { color: #2e7d6a; }
.kanban-card .kanban-chip--duvida {
  border-color: rgba(123, 62, 168, .38);
  background: rgba(155, 81, 224, .12);
  color: #4a2468;
}
.kanban-card .kanban-chip--duvida .material-symbols-outlined { color: #7b3ea8; }
[data-theme="light"] .kanban-card .kanban-chip {
  background: #f5f0e4;
  border-color: #ddd6c4;
  color: #444;
}
[data-theme="light"] .kanban-card .kanban-chip--consulta {
  background: rgba(46, 125, 107, .1);
  border-color: rgba(46, 125, 107, .28);
  color: #1b4d3f;
}
[data-theme="light"] .kanban-card .kanban-chip--duvida {
  background: rgba(123, 62, 168, .08);
  border-color: rgba(123, 62, 168, .25);
  color: #4a2468;
}
.kanban-card .kanban-chip .material-symbols-outlined {
  flex: 0 0 auto;
  font-size: 15px;
}
.kanban-card dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  margin: 0;
  padding-top: 8px;
  border-top: 1px dashed rgba(138, 112, 32, .28);
}
[data-theme="light"] .kanban-card dl {
  border-top-color: #ebe6da;
}
.kanban-card dl > div {
  display: grid;
  grid-template-columns: minmax(72px, 34%) minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}
.kanban-card dt {
  color: var(--kanban-ink-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.kanban-card dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--kanban-ink-soft);
  overflow-wrap: anywhere;
  text-align: right;
}
.kanban-card small { color: var(--kanban-ink-muted); }
.kanban-card .kanban-date .material-symbols-outlined {
  color: color-mix(in srgb, var(--kanban-ink-muted) 85%, var(--col-accent));
}
.kanban-card .bool-no { color: #b54a4a; }
.kanban-card .bool-yes { color: #2e7d4a; }
/* Chip de honorários: tom âmbar + ícone de pagamento para leitura imediata de
   "valor em dinheiro", distinto do chip verde de canal. */
.kanban-money {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid rgba(240, 199, 94, .38);
  border-radius: 8px;
  background: rgba(240, 199, 94, .12);
  overflow-wrap: anywhere;
}
.kanban-money .material-symbols-outlined {
  flex: 0 0 auto;
  align-self: center;
  font-size: 16px;
  color: #f0c75e;
}
.kanban-money small { color: #d9b968; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
.kanban-money strong {
  color: #f4d98a;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.kanban-card .kanban-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.kanban-card .kanban-date .material-symbols-outlined { font-size: 14px; }
.kanban-empty {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}
.login-page {
  display: grid;
  place-items: center;
  padding: 28px;
  background: linear-gradient(135deg, #e8b800 0%, #f0c419 48%, #f5d860 100%);
}
.login-shell {
  width: min(1080px, 100%);
  min-height: min(720px, calc(100vh - 56px));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .18);
}
.login-brand,
.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-brand {
  gap: 34px;
  padding: clamp(32px, 6vw, 68px);
  border-right: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, .08));
}
.login-logo {
  display: inline-flex;
  align-items: center;
  width: 260px;
}
.login-logo img {
  display: block;
  width: 100%;
  max-height: 110px;
  object-fit: contain;
}
.login-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  color: #7a5f00;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}
.login-brand h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: .98;
}
.login-brand p {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}
.login-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.login-highlights > span {
  display: grid;
  gap: 8px;
  min-height: 94px;
  align-content: center;
  padding: 14px;
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 8px;
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 700;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.login-highlights .material-symbols-outlined {
  color: #cc9f00;
  font-size: 24px;
}
.login-panel {
  padding: clamp(24px, 5vw, 54px);
  background: var(--bg);
}
.login-card {
  display: grid;
  gap: 16px;
  width: min(420px, 100%);
  margin: 0 auto;
}
.login-card-head {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 8px;
}
.login-card h2 {
  margin: 0;
  font-size: 28px;
}
.login-card p {
  color: var(--muted);
  margin: 4px 0 0;
}
.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #cc9f00;
  color: #000;
  font-size: 30px;
}
.login-field {
  gap: 7px;
}
.login-field span {
  color: #1a1a1a;
  font-weight: 500;
}
.login-field input {
  background: #ffffff;
  border: 1px solid rgba(26, 26, 26, 0.14);
  color: #1a1a1a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.login-field input::placeholder {
  color: #8a8578;
}
.login-field input:focus {
  background: #ffffff;
  border-color: #cc9f00;
  outline: 3px solid rgba(204, 159, 0, .25);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.login-field input:-webkit-autofill,
.login-field input:-webkit-autofill:hover,
.login-field input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  -webkit-text-fill-color: #1a1a1a;
}
.login-submit {
  width: 100%;
  margin-top: 4px;
}
.login-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.login-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
}
.login-links a:hover {
  border-color: #cc9f00;
  color: var(--text);
}
.public-page {
  min-height: 100vh;
  background: #f4f4f4;
  color: #111;
}
.public-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 52px;
}
.public-hero {
  padding: 28px 0 20px;
}
.public-hero strong {
  display: block;
  margin-bottom: 10px;
  color: #000;
  font-size: 18px;
}
.public-hero h1 {
  margin: 0 0 8px;
}
.public-hero p {
  margin: 0;
  color: #555;
}
.public-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
}
.public-panel div {
  display: grid;
  gap: 5px;
}
.public-panel span {
  color: #666;
  font-size: 12px;
  text-transform: uppercase;
}
.public-panel strong {
  color: #111;
}
.public-timeline {
  display: block;
}
.public-description {
  display: block;
}
.public-description p {
  margin: 0;
  color: #333;
  line-height: 1.55;
  white-space: pre-wrap;
}
.public-timeline h2 {
  color: #111;
}
.public-page .timeline::before {
  background: #d0d0d0;
}
.public-page .timeline-marker {
  background: #000;
  color: #fff;
  box-shadow: 0 0 0 5px #fff;
}
.public-page .timeline-card {
  border-color: #ddd;
  background: #fafafa;
}
.public-page .timeline-card p, .public-page .timeline-user, .public-page .timeline-card strong {
  color: #111;
}
@media (max-width: 900px) {
  body.sidebar-open { overflow: hidden; }
  .mobile-menu-btn {
    position: fixed;
    z-index: 70;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--sidebar-bg);
    color: var(--text);
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .34);
  }
  .mobile-menu-btn .material-symbols-outlined { font-size: 25px; }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: block;
    background: rgba(0, 0, 0, .58);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
  }
  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar {
    z-index: 60;
    width: min(286px, calc(100vw - 44px));
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 20px 0 44px rgba(0, 0, 0, .35);
    overflow-y: auto;
  }
  /* No drawer o menu inteiro rola (logo inclusa) — sem rolagem dupla no nav. */
  .sidebar nav { flex: none; min-height: auto; overflow-y: visible; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .brand { margin-left: 54px; }
  .main { margin-left: 0; padding: 76px 18px 18px; }
  /* minmax(0, 1fr) e não 1fr: com o mínimo `auto`, um texto longo sem espaços
     (link, e-mail, número de processo) estica a coluna além da largura da tela. */
  .form-grid, .modal-grid, .public-panel { grid-template-columns: minmax(0, 1fr); }
  .metrics { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid > .panel:nth-child(3) { grid-column: 1 / -1; }
  .dashboard-grid .panel { max-height: none; overflow: auto; }
  .kanban {
    margin: 0 -18px;
    padding: 0 18px 12px;
    grid-auto-columns: minmax(260px, 1fr);
  }
  .kanban-column { min-height: 360px; }
  .toolbar, .topbar { align-items: stretch; flex-direction: column; }
  .dashboard-filters { flex-wrap: nowrap; }
  .dashboard-filters .field { min-width: 0; }
  .inline-form { grid-template-columns: 1fr; }
  .search { min-width: 0; }
  .login-page { padding: 16px; place-items: stretch; }
  .login-shell {
    min-height: calc(100vh - 32px);
    grid-template-columns: 1fr;
  }
  .login-brand {
    gap: 22px;
    padding: 28px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .login-brand h1 { font-size: 34px; }
  .login-brand p { font-size: 15px; }
  .login-highlights { grid-template-columns: minmax(0, 1fr); }
  .login-highlights > span {
    min-height: 56px;
    grid-template-columns: auto 1fr;
    align-items: center;
  }
  .login-panel { padding: 28px; }
  .login-card { width: 100%; }
}
@media (max-width: 520px) {
  /* Recuo da linha do tempo enxuto: com 54px + marcador de 40px sobra pouca
     largura para o cartão em telas de ~320px. */
  .timeline { padding-left: 42px; }
  .timeline::before { left: 15px; }
  .timeline-marker { left: -42px; width: 32px; height: 32px; }
  .timeline-marker .material-symbols-outlined { font-size: 17px; }
  .dashboard-filters {
    flex-wrap: wrap;
  }
  .dashboard-filters .field,
  .dashboard-filters .btn {
    flex: 1 1 100%;
  }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid > .panel:nth-child(3) { grid-column: auto; }
}

/* ===== App Footer ===== */
.app-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.app-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 20px;
  flex-wrap: wrap;
}
.app-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 160px;
}
.app-footer-logo {
  display: block;
  max-height: 52px;
  width: auto;
  object-fit: contain;
}
.app-footer-logo-dark { display: block; }
.app-footer-logo-light { display: none; mix-blend-mode: multiply; }
[data-theme="light"] .app-footer-logo-dark { display: none; }
[data-theme="light"] .app-footer-logo-light { display: block; }
.app-footer-tagline {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  max-width: 220px;
  line-height: 1.5;
}
.app-footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.app-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}
.app-footer-link:hover { color: var(--text); }
.app-footer-link .material-symbols-outlined { font-size: 18px; }
.app-footer-link--instagram:hover { color: #e1306c; }
.app-footer-insta-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.app-footer-secure {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.app-footer-secure-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9a84c 0%, #f0d080 100%);
  flex-shrink: 0;
}
.app-footer-lock {
  font-size: 20px;
  color: #1a1200;
}
.app-footer-secure-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.app-footer-secure-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .01em;
}
.app-footer-secure-sub {
  font-size: 11px;
  color: var(--muted);
}
.app-footer-copy {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
@media (max-width: 900px) {
  .app-footer-inner { flex-direction: column; align-items: flex-start; }
  .app-footer-secure { width: 100%; box-sizing: border-box; }
}

/* ══════════════════════════════════════════════════════════════
   Chat flutuante da página do processo — mesmo padrão do /acompanhar.
   Paleta escura própria (independente do tema claro/escuro do CRM) para
   ficar idêntico ao chat público, sempre com o amarelo da marca (#f5c400).
   ══════════════════════════════════════════════════════════════ */

/* Esconde de fato os elementos com atributo `hidden` mesmo quando têm
   display: flex — escopo restrito ao widget para não afetar o resto do CRM. */
.chat-panel[hidden], .chat-fab[hidden], .chat-panel [hidden], .chat-fab [hidden] { display: none !important; }

/* ── Botão flutuante (FAB) ── */
/* bottom maior que o padrão para não cobrir os botões Voltar/Salvar no fim do formulário. */
.chat-fab {
  position: fixed;
  right: 24px;
  bottom: 100px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: none;
  background: #f5c400;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38), 0 3px 10px rgba(245, 196, 0, 0.4);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.chat-fab:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(245, 196, 0, 0.45);
}
.chat-fab:active { transform: scale(0.95); }
.chat-fab:focus-visible { outline: 3px solid rgba(245, 196, 0, 0.55); outline-offset: 3px; }
.chat-fab svg { width: 32px; height: 32px; }
.chat-fab-icon { display: inline-flex; }
.chat-fab.is-active { background: #ececec; }
.chat-fab::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #f5c400;
  z-index: -1;
  opacity: 0;
}
.chat-fab.has-unseen::before { animation: chatFabPulse 2.4s ease-out infinite; }
@keyframes chatFabPulse {
  0%   { transform: scale(1);   opacity: 0.45; }
  70%  { transform: scale(1.6); opacity: 0; }
  100% { opacity: 0; }
}
.chat-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 12px;
  background: #e0382d;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid var(--bg);
  box-shadow: 0 2px 7px rgba(224, 56, 45, 0.5);
  animation: chatBadgePop .34s cubic-bezier(.18, .89, .32, 1.28);
}
@keyframes chatBadgePop {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ── Painel do chat ── */
.chat-panel {
  /* --kb = altura do teclado virtual (o JS preenche no celular); em tela cheia
     o painel encolhe por ela para o composer não ficar embaixo do teclado. */
  --kb: 0px;
  position: fixed;
  right: 24px;
  bottom: 180px;
  width: 384px;
  max-width: calc(100vw - 32px);
  height: 620px;
  max-height: calc(100vh - 204px);
  /* dvh: desconta a barra de endereço do navegador mobile (ignorado por
     navegadores antigos, que ficam com o calc em vh acima). */
  max-height: calc(100dvh - 204px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  z-index: 1000;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity .22s ease, transform .24s cubic-bezier(.16, 1, .3, 1);
  pointer-events: none;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}
.chat-panel.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 12px 13px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.chat-panel-head-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.chat-panel-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f5c400;
  flex-shrink: 0;
}
.chat-panel-avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-2);
  color: #7a5f00;
  padding: 9px;
}
.chat-panel-avatar--fallback svg { width: 100%; height: 100%; }
.chat-panel-head-text { min-width: 0; }
.chat-panel-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.chat-panel-sub {
  font-size: 12px;
  color: var(--muted);
  margin: 1px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-panel-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.chat-panel-close:hover { background: rgba(0, 0, 0, 0.08); color: var(--text); }
.chat-panel-close svg { width: 20px; height: 20px; }

/* ── Área de mensagens ── */
.chat-scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 16px;
  background: var(--panel-2);
}
.chat-scroll::-webkit-scrollbar { width: 7px; }
.chat-scroll::-webkit-scrollbar-thumb { background: #8a8a8a; border-radius: 4px; }
.chat-scroll::-webkit-scrollbar-track { background: transparent; }

.chat-row { display: flex; }
.chat-row--cliente { justify-content: flex-end; }
.chat-row--adv     { justify-content: flex-start; }

.chat-bubble {
  /* O teto em px evita linhas larguíssimas quando o painel vira tela cheia
     (celular deitado / tablet). */
  max-width: min(92%, 620px);
  min-width: 96px;
  padding: 11px 14px 9px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.5;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
}
.chat-row--adv .chat-bubble {
  background: var(--card-bg);
  border-top-left-radius: 4px;
  color: var(--text);
}
.chat-row--cliente .chat-bubble {
  background: #0a5c47;
  border-top-right-radius: 4px;
  color: #f3f3f3;
}
.chat-bubble--deleted { opacity: .6; }
.chat-author { font-size: 13px; font-weight: 700; margin: 0 0 4px; }
.chat-row--adv .chat-author     { color: #7a5f00; }
.chat-row--cliente .chat-author { color: #7fe3c4; }
.chat-text { margin: 0; white-space: pre-wrap; word-break: break-word; }
.chat-text--deleted { font-style: italic; color: var(--muted); }
.chat-time {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
}
.chat-audio { width: 260px; max-width: 100%; height: 40px; margin-top: 6px; }
/* Enquanto a duração é sondada (evita a "piscada" do seek), o player fica
   invisível e aparece com um fade — reserva a altura para não pular o layout. */
.chat-audio, .reply-audio-player { transition: opacity .14s ease; }
audio.is-probing { opacity: 0; }
.chat-empty { text-align: center; color: #999; font-size: 13px; padding: 28px 12px; margin: auto 0; }

/* Botão de apagar mensagem (aparece ao passar o mouse na bolha) */
.chat-del { margin: 0; line-height: 0; }
.chat-del button {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transition: opacity .15s, color .15s;
}
.chat-bubble:hover .chat-del button { opacity: 1; }
.chat-del button:hover { color: #e05252; }
.chat-del button svg { width: 13px; height: 13px; display: block; }
/* Sem mouse (celular/tablet) não existe hover: o botão fica sempre visível,
   com área de toque maior. */
@media (hover: none) {
  .chat-del button { opacity: .75; padding: 4px; margin: -4px -4px -4px 0; }
  .chat-del button svg { width: 15px; height: 15px; }
}

/* Anexos do cliente dentro da bolha */
.chat-bubble .obs-arquivo-img {
  display: block;
  max-width: 220px;
  max-height: 170px;
  border-radius: 8px;
  margin-top: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  cursor: zoom-in;
}
.chat-bubble .obs-arquivo-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 6px 12px;
  transition: border-color .15s, color .15s;
}
.chat-bubble .obs-arquivo-link:hover { border-color: #f5c400; color: #f5c400; }

/* ── Rodapé com a barra de mensagem ── */
.chat-panel-footer {
  flex-shrink: 0;
  padding: 10px 12px 12px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}
/* Paywall do chat: no lugar do composer, aviso de que responder exige a compra
   do relatório (advogado ainda sem desbloqueio). */
.composer-locked {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  text-align: center;
  background: rgba(245, 196, 0, 0.10);
  border: 1px solid rgba(245, 196, 0, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
}
.composer-locked svg { color: #f5c400; flex-shrink: 0; }
.composer-locked-btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #1f1f1f;
  background: #f5c400;
  border-radius: 999px;
  padding: 7px 14px;
  text-decoration: none;
  transition: filter .15s;
}
.composer-locked-btn:hover { filter: brightness(1.06); }
.composer {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  background: #ffffff;
  border-radius: 26px;
  padding: 5px 6px 5px 14px;
}
.composer-input {
  flex: 1;
  min-width: 0;
  min-height: 0;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  color: #1f1f1f;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  max-height: 120px;
  padding: 9px 4px;
}
.composer-input::placeholder { color: #8696a0; }
.composer-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-height: 0;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #54656f;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.composer-icon-btn:hover { background: rgba(0, 0, 0, 0.06); }
.composer-icon-btn.is-recording { color: #e0382d; background: rgba(224, 56, 45, 0.12); }
.composer-audio {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 2px 2px 2px 6px;
}
.composer-audio .reply-rec-time {
  font-size: 14px;
  font-weight: 600;
  color: #e0382d;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
/* Ponto vermelho pulsante (gravando) */
.composer-audio .reply-rec-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e0382d;
  flex-shrink: 0;
  animation: recDotPulse 1.3s ease-in-out infinite;
}
@keyframes recDotPulse { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
/* Onda sonora animada (estilo WhatsApp) */
.composer-audio .reply-rec-wave {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  min-width: 0;
  overflow: hidden;
}
.composer-audio .reply-rec-wave i {
  width: 3px;
  flex-shrink: 0;
  border-radius: 3px;
  background: #8696a0;
  height: 22%;
  animation: recWave 1.1s ease-in-out infinite;
}
@keyframes recWave { 0%, 100% { height: 20%; } 50% { height: 95%; } }
.composer-audio .reply-rec-wave i:nth-child(6n+1) { animation-delay: -.90s; }
.composer-audio .reply-rec-wave i:nth-child(6n+2) { animation-delay: -.30s; }
.composer-audio .reply-rec-wave i:nth-child(6n+3) { animation-delay: -.65s; }
.composer-audio .reply-rec-wave i:nth-child(6n+4) { animation-delay: -.10s; }
.composer-audio .reply-rec-wave i:nth-child(6n+5) { animation-delay: -.80s; }
.composer-audio .reply-rec-wave i:nth-child(6n)   { animation-delay: -.45s; }
@media (prefers-reduced-motion: reduce) {
  .composer-audio .reply-rec-dot,
  .composer-audio .reply-rec-wave i { animation: none; }
}
.composer-audio .reply-audio-preview { flex: 1; min-width: 0; display: flex; }
.composer-audio .reply-audio-player { width: 100%; max-width: none; height: 36px; }
.composer-audio .reply-discard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #54656f;
  cursor: pointer;
  line-height: 1;
  padding: 6px;
  flex-shrink: 0;
}
.composer-audio .reply-discard-btn:hover { color: #e05252; }
.composer-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 0;
  border-radius: 50%;
  border: none;
  background: #cc9f00;
  color: #1a1a1a;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, transform .1s;
}
.composer-send:hover { background: #b88900; }
.composer-send:active { transform: scale(0.94); }
.composer-send:disabled { opacity: .55; cursor: default; transform: none; }
.composer-hint { font-size: 11.5px; color: var(--muted); margin: 8px 0 0; text-align: center; }

/* Chip do arquivo anexado (acima da barra de mensagem) */
.composer-extras {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.composer-file-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  gap: 7px;
  background: rgba(76, 175, 138, 0.15);
  border: 1px solid rgba(76, 175, 138, 0.4);
  color: #4caf8a;
  border-radius: 999px;
  font-size: 13px;
  padding: 5px 8px 5px 12px;
}
/* Nome do arquivo: corta com reticências em vez de esticar o chip. */
.composer-file-chip > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.composer-file-chip svg { flex-shrink: 0; }
.composer-file-chip .reply-file-clear {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: #b7b7b7;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
}
.composer-file-chip .reply-file-clear:hover { color: #e05252; }

/* ── Mobile: painel em tela cheia ──
   Vale também para telas baixas em paisagem (celular deitado), onde o card
   flutuante sobrava ~180px de altura útil e o chat ficava ilegível. */
@media (max-width: 600px), (max-height: 560px) and (orientation: landscape) and (max-width: 920px) {
  .chat-panel {
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    height: calc(100dvh - var(--kb));
    max-width: 100%;
    max-height: none;
    border: none;
    border-radius: 0;
    transform: translateY(100%);
  }
  .chat-panel.is-open { transform: translateY(0); }
  body.chat-is-open { overflow: hidden; }
  body.chat-is-open .chat-fab { opacity: 0; pointer-events: none; }

  /* Notch e barra de gestos (iPhone/Android com tela cheia) */
  .chat-panel-header { padding-top: calc(13px + env(safe-area-inset-top)); }
  .chat-panel-footer { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }

  .chat-scroll { padding: 14px 12px; gap: 10px; }
  .chat-bubble { max-width: 86%; }
  /* 16px evita o zoom automático do iOS ao focar o campo de texto. */
  .composer-input { font-size: 16px; }

  .chat-fab {
    right: 16px;
    bottom: calc(88px + env(safe-area-inset-bottom));
    width: 60px;
    height: 60px;
  }
  .chat-fab svg { width: 28px; height: 28px; }
}

/* Celular deitado: sobra pouca altura, então cabeçalho e rodapé encolhem para
   a conversa ficar com o máximo de espaço possível. */
@media (max-height: 560px) and (orientation: landscape) {
  .chat-panel-header { padding: 8px 10px 8px 12px; }
  .chat-panel-avatar { width: 34px; height: 34px; }
  .chat-panel-footer { padding: 8px 10px; }
  .chat-panel-footer .composer-hint { display: none; }
  .chat-scroll { padding: 10px 12px; gap: 8px; }
}

/* Telas bem estreitas: enxuga a barra de mensagem para sobrar largura ao texto. */
@media (max-width: 360px) {
  .chat-panel-header { padding-left: 12px; gap: 8px; }
  .chat-panel-avatar { width: 38px; height: 38px; }
  .chat-panel-title { font-size: 14.5px; }
  .composer { gap: 2px; padding-left: 8px; }
  .composer-icon-btn { width: 36px; height: 36px; }
  .composer-send { width: 40px; height: 40px; }
  .chat-bubble { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .chat-fab, .chat-panel { transition-duration: .01ms; }
  .chat-fab.has-unseen::before, .chat-fab-badge { animation: none; }
}

/* ── Relatório Raio-X Jurídico (partial raiox_report) no CRM — theme-aware ── */
.rx-field > span {
  display: block; font-size: 12px; font-weight: 600; color: var(--muted);
  margin-bottom: 8px;
}
.rx-card {
  background: var(--card-bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 18px 20px;
}
.rx-header { margin-bottom: 6px; }
.rx-kicker {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: #f5c400; margin: 0 0 4px;
}
.rx-title { font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.3; margin: 0; }
.rx-header-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.rx-tag {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
  color: #cc9f00; background: rgba(245,196,0,.14); border: 1px solid rgba(245,196,0,.35);
  border-radius: 999px; padding: 3px 11px;
  max-width: 100%; min-width: 0; overflow-wrap: anywhere;
}
.rx-emitido { font-size: 12px; color: var(--muted); }

.rx-section { padding: 16px 0; border-top: 1px solid var(--line); }
.rx-section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px;
  color: #cc9f00; margin: 0 0 10px;
}
.rx-text { font-size: 14px; color: var(--text); line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; margin: 0; }
.rx-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; }
.rx-list li { font-size: 14px; color: var(--text); line-height: 1.55; }

.rx-risk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rx-risk {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2);
}
.rx-risk-nome { font-size: 13.5px; color: var(--text); font-weight: 500; }
.rx-risk-nivel { font-size: 12px; font-weight: 700; letter-spacing: .5px; }
.rx-risk--alto  { border-color: rgba(224,56,45,.5); }
.rx-risk--alto  .rx-risk-nivel { color: #e0382d; }
.rx-risk--medio { border-color: rgba(204,159,0,.55); }
.rx-risk--medio .rx-risk-nivel { color: #cc9f00; }
.rx-risk--baixo { border-color: rgba(46,140,102,.5); }
.rx-risk--baixo .rx-risk-nivel { color: #2e8c66; }
.rx-risk--na .rx-risk-nivel { color: var(--muted); }

.rx-checklist { display: flex; flex-direction: column; gap: 16px; }
.rx-check-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: var(--muted); margin: 0 0 8px;
}
.rx-check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rx-check-list li { position: relative; padding-left: 24px; font-size: 14px; color: var(--text); line-height: 1.5; }
.rx-check-list--ok li::before { content: '✓'; position: absolute; left: 0; color: #2e8c66; font-weight: 700; }
.rx-check-list--todo li::before { content: '→'; position: absolute; left: 0; color: #cc9f00; }

.rx-score-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rx-score-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.rx-score-nome { font-size: 13.5px; color: var(--text); font-weight: 500; }
.rx-score-val { font-size: 13px; color: #cc9f00; font-weight: 700; font-variant-numeric: tabular-nums; }
.rx-score-bar { height: 7px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.rx-score-fill { display: block; height: 100%; border-radius: 4px; background: #f5c400; }

.rx-recomendacao {
  background: rgba(245,196,0,.08); border: 1px solid rgba(245,196,0,.3);
  border-radius: 10px; padding: 14px 16px;
}
@media (max-width: 560px) {
  .rx-risk-grid, .rx-score-grid { grid-template-columns: 1fr; }
}

/* ─── Logs Asaas (aba do super admin) ──────────────────────────────────── */
.asaas-log-resumo {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px;
}
.asaas-log-resumo div {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
}
.asaas-log-resumo span { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }
.asaas-log-resumo strong { display: block; font-size: 22px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.asaas-log-resumo .asaas-log-falhas { color: var(--danger); }
.asaas-logs table { font-size: 13px; }
.asaas-logs td { vertical-align: top; }
.asaas-log-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }
.asaas-log-tempo { display: block; color: var(--muted); font-size: 11px; }
.asaas-log-erro { color: var(--danger); margin-bottom: 4px; }
.asaas-log-payload pre {
  white-space: pre-wrap; word-break: break-all; margin: 2px 0 8px;
  background: var(--panel-2); border-radius: 6px; padding: 8px;
  font-size: 11px; max-height: 220px; overflow: auto;
}
.asaas-logs details summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.asaas-log-rodape { color: var(--muted); font-size: 12px; margin-top: 12px; }
@media (max-width: 860px) {
  .asaas-log-resumo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
