/* ============================================================
   Open Sans servida daqui mesmo, não do Google.
   O @import de fonts.googleapis.com fazia o navegador do usuário
   contatar o Google a cada carregamento — entregando IP e referer de
   quem abre um sistema com dado de cliente. Também colidia com a CSP
   (style-src 'self'), que passou a valer no endurecimento.
   Arquivos em web/fonts (subconjunto latino, woff2).
   ============================================================ */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/open-sans.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/open-sans-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== Design tokens (mirrors JusBoard visual language) ===== */
:root {
  --sidebar: #0A0F1C;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-hover: rgba(255, 255, 255, 0.05);
  --sidebar-active: rgba(255, 255, 255, 0.10);
  --sidebar-text: #94a3b8;
  --sidebar-text-strong: #f8fafc;
  /* cores que antes eram fixas nas regras da barra (branco sobre escuro);
     viraram tokens para existir uma marca com barra CLARA */
  --sidebar-link: rgba(255, 255, 255, .78);
  --sidebar-active-bg: rgba(255, 255, 255, .1);
  --sidebar-active-text: #fff;
  --sidebar-scroll: rgba(255, 255, 255, .08);
  --org-avatar-bg: linear-gradient(135deg, #1e293b, #0f172a);

  /* acento cobre/rose-gold do JusBoard (#C6937A -> #B38067) */
  --gold: #B5815F;             /* cobre mais escuro p/ texto e ícones (legível no claro) */
  /* Dourado do SignJus — mais amarelo que o cobre do JusBoard. */
  --gold-claro: #D4A94A;
  --grad-gold: linear-gradient(135deg, #D9B455 0%, #C29433 100%);
  --rose-gold: #C6937A;
  --copper: #C6937A;
  --copper-deep: #B38067;
  --amber: #F59E0B;
  --grad: linear-gradient(135deg, #C6937A 0%, #B38067 100%);
  --copper-tint: rgba(198, 147, 122, 0.14);

  /* azul-marinho do JusBoard — títulos e destaques */
  --navy: #1E3E6A;
  --navy-2: #2A5494;
  --grad-navy: linear-gradient(135deg, #1E3E6A 0%, #2A5494 100%);
  --heading: #020817;          /* medido no JusBoard: títulos e valores são quase-pretos; o navy fica só em acentos */

  --bg: #ffffff;               /* medido no dashboard logado do JusBoard: branco sobre branco, cartões separados só pelo fio */
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #020817;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  --border: #e2e8f0;           /* medido no app.jusboard.com.br: hsl(214.3 31.8% 91.4%) = slate-200, uniforme no app todo */
  --border-strong: #cbd5e1;    /* slate-300 — no original só aparece em hover */
  --ring: rgba(198, 147, 122, 0.35);

  --green: #10b981;
  --red: #ef4444;
  --blue: #2A5494;
  --violet: #8b5cf6;

  --radius: 16px;
  --radius-sm: 12px;           /* rounded-xl — o raio de controles do JusBoard */
  --shadow: none;              /* JusBoard não usa sombra em repouso — cartões são planos, só contorno */
  --shadow-md: 0 4px 16px rgba(15, 27, 45, .08);
  --shadow-lg: 0 14px 40px rgba(15, 27, 45, .14);
  --sidebar-w: 288px;          /* w-72, medido na casca do JusBoard */
  --sidebar-w-collapsed: 76px;
}

[data-theme="dark"] {
  --bg: #090e1a;               /* medidos no dark do JusBoard: fundo e cartão na MESMA cor, só o fio separa */
  --surface: #090e1a;
  --surface-2: #10182d;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  --border: #10182d;           /* hsl(223 48% 12%) — 5 pontos de luminosidade acima do cartão */
  --border-strong: #334155;
  --heading: #f8fafc;          /* foreground do .dark medido: hsl(210 40% 98%) */
  --navy: #6f9fd8;
  --gold: #CDA07E;             /* cobre mais claro no escuro */
  --gold-claro: #E0BC6A;
  --grad-gold: linear-gradient(135deg, #E0BC6A 0%, #C79E3E 100%);
}

/* ===== Marcas selecionáveis (Configurações › Geral › Aparência) =====
   As três direções do canvas "Identidade ProcessBoard" viram temas que o
   usuário escolhe; o padrão segue o Clássico (navy + cobre). Cada marca
   troca só os ACENTOS — marca, sidebar, títulos, gradientes; as cores
   semânticas (verde/vermelho/âmbar de status, azul de evento) não mudam. */
[data-marca="verde"] {
  --gold: #2E7D5B; --rose-gold: #2E7D5B; --copper: #1E5241; --copper-deep: #16402F;
  --grad: linear-gradient(135deg, #1E5241 0%, #2E7D5B 100%);
  --copper-tint: rgba(46, 125, 91, 0.14); --ring: rgba(46, 125, 91, 0.35);
  --navy: #1E5241; --navy-2: #2E7D5B; --grad-navy: linear-gradient(135deg, #1E5241 0%, #2E7D5B 100%);
  --sidebar: #14201B; --gold-claro: #B9A779;
}
[data-marca="grafite"] {
  --gold: #D97D0D; --rose-gold: #D97D0D; --copper: #D97D0D; --copper-deep: #A85F06;
  --grad: linear-gradient(135deg, #D97D0D 0%, #F5A623 100%);
  --copper-tint: rgba(217, 125, 13, 0.14); --ring: rgba(217, 125, 13, 0.35);
  --navy: #17181C; --navy-2: #2C2E34; --grad-navy: linear-gradient(135deg, #17181C 0%, #2C2E34 100%);
  --sidebar: #17181C; --gold-claro: #F5A623;
}
[data-marca="vinho"] {
  --gold: #97374C; --rose-gold: #97374C; --copper: #6E1F33; --copper-deep: #571828;
  --grad: linear-gradient(135deg, #6E1F33 0%, #97374C 100%);
  --copper-tint: rgba(151, 55, 76, 0.14); --ring: rgba(151, 55, 76, 0.35);
  --navy: #6E1F33; --navy-2: #97374C; --grad-navy: linear-gradient(135deg, #6E1F33 0%, #97374C 100%);
  --sidebar: #2A1B1E; --gold-claro: #C99B62;
}
/* Azul & Branco: a única marca com barra lateral CLARA (cinza-claro),
   conteúdo branco e acento azul. Por isso ela redefine também os tokens
   da barra, não só os acentos. */
/* (out/2026: azul-marinho a pedido — antes #2563EB, o azul "royal") */
[data-marca="azul"] {
  --gold: #16336B; --rose-gold: #16336B; --copper: #16336B; --copper-deep: #0F2650;
  --grad: linear-gradient(135deg, #0F2650 0%, #1E4A8C 100%);
  --copper-tint: rgba(22, 51, 107, 0.12); --ring: rgba(22, 51, 107, 0.35);
  --navy: #0F2650; --navy-2: #16336B; --grad-navy: linear-gradient(135deg, #0F2650 0%, #16336B 100%);
  --gold-claro: #2A5494;
  --sidebar: #F1F5F9; --sidebar-border: #E2E8F0;
  --sidebar-hover: rgba(15, 23, 42, .05); --sidebar-active: #FFFFFF;
  --sidebar-text: #56657B; --sidebar-text-strong: #0F172A; --sidebar-link: #334155;
  --sidebar-active-bg: #FFFFFF; --sidebar-active-text: #0F2650;
  --sidebar-scroll: rgba(15, 23, 42, .14); --org-avatar-bg: #DBEAFE;
  --toast-bg: #0F172A;           /* o toast usava a cor da barra; clara, o texto branco sumiria */
}
/* no escuro a barra clara ofuscaria: volta a ser escura, com o azul de acento */
[data-theme="dark"][data-marca="azul"] {
  --gold: #60A5FA; --rose-gold: #60A5FA; --navy: #93C5FD;
  --sidebar: #0B1220; --sidebar-border: rgba(255, 255, 255, .06);
  --sidebar-hover: rgba(255, 255, 255, .05); --sidebar-active: rgba(255, 255, 255, .1);
  --sidebar-text: #94a3b8; --sidebar-text-strong: #f8fafc; --sidebar-link: rgba(255, 255, 255, .78);
  --sidebar-active-bg: rgba(59, 130, 246, .16); --sidebar-active-text: #fff;
  --sidebar-scroll: rgba(255, 255, 255, .08);
  --org-avatar-bg: linear-gradient(135deg, #1e293b, #0f172a); --toast-bg: #1e293b;
}
/* Preto & Branco: a mesma estrutura da Azul & Branco (barra clara, conteúdo
   branco), com o azul trocado por preto. O cinza da barra passa a ser
   neutro (zinco), porque o cinza-azulado da versão azul pedia o azul junto. */
[data-marca="preto"] {
  --gold: #18181B; --rose-gold: #18181B; --copper: #18181B; --copper-deep: #000000;
  --grad: linear-gradient(135deg, #000000 0%, #27272A 100%);
  --copper-tint: rgba(24, 24, 27, 0.08); --ring: rgba(24, 24, 27, 0.30);
  --navy: #18181B; --navy-2: #3F3F46; --grad-navy: linear-gradient(135deg, #18181B 0%, #3F3F46 100%);
  --gold-claro: #52525B;
  --sidebar: #F4F4F5; --sidebar-border: #E4E4E7;
  --sidebar-hover: rgba(9, 9, 11, .05); --sidebar-active: #FFFFFF;
  --sidebar-text: #5E5E66; --sidebar-text-strong: #09090B; --sidebar-link: #3F3F46;
  --sidebar-active-bg: #FFFFFF; --sidebar-active-text: #09090B;
  --sidebar-scroll: rgba(9, 9, 11, .14); --org-avatar-bg: #E4E4E7;
  --toast-bg: #18181B;
}
/* no escuro, preto sobre fundo escuro sumiria: botões em grafite (texto
   branco legível) e textos/ícones de acento em cinza-claro */
[data-theme="dark"][data-marca="preto"] {
  --gold: #E4E4E7; --rose-gold: #E4E4E7; --copper: #A1A1AA; --navy: #D4D4D8;
  --grad: linear-gradient(135deg, #3F3F46 0%, #52525B 100%);
  --grad-navy: linear-gradient(135deg, #3F3F46 0%, #52525B 100%);
  --copper-tint: rgba(228, 228, 231, 0.10); --ring: rgba(228, 228, 231, 0.30);
  --sidebar: #0C0C0E; --sidebar-border: rgba(255, 255, 255, .06);
  --sidebar-hover: rgba(255, 255, 255, .05); --sidebar-active: rgba(255, 255, 255, .1);
  --sidebar-text: #a1a1aa; --sidebar-text-strong: #fafafa; --sidebar-link: rgba(255, 255, 255, .78);
  --sidebar-active-bg: rgba(255, 255, 255, .1); --sidebar-active-text: #fff;
  --sidebar-scroll: rgba(255, 255, 255, .08);
  --org-avatar-bg: linear-gradient(135deg, #27272a, #18181b); --toast-bg: #27272a;
}
/* no escuro, os acentos sobem um degrau para manter contraste */
[data-theme="dark"][data-marca="verde"] { --gold: #6FB394; --rose-gold: #6FB394; --navy: #8FC6AC; }
[data-theme="dark"][data-marca="grafite"] { --gold: #F5A623; --rose-gold: #F5A623; --navy: #C8CAD0; }
[data-theme="dark"][data-marca="vinho"] { --gold: #C46A80; --rose-gold: #C46A80; --navy: #D49AA8; }

/* seletor de marca (Configurações › Geral) */
.marca-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
@media (max-width: 900px) { .marca-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.marca-op {
  border: 1px solid var(--border); border-radius: 12px; padding: 12px; cursor: pointer;
  background: var(--surface); text-align: left; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.marca-op:hover { border-color: var(--border-strong); }
.marca-op.ativa { border-color: var(--rose-gold); box-shadow: 0 0 0 2px var(--ring); }
.marca-op .sw { display: flex; gap: 6px; margin-bottom: 8px; }
.marca-op .sw i { width: 22px; height: 22px; border-radius: 7px; display: inline-block; }
.marca-op b { font-size: 13px; color: var(--heading); }
.marca-op small { display: block; color: var(--text-muted); font-size: 11px; margin-top: 2px; }

/* Na camada base do Tailwind: fora de camada, este reset vencia TODAS as classes
   de margem/espaçamento do Tailwind (mb-6, p-5…) e o SignBoard saía colado. */
@layer base { * { box-sizing: border-box; margin: 0; padding: 0; } }

html, body { height: 100%; }

body {
  font-family: 'Open Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}

#app { display: flex; height: 100vh; overflow: hidden; }

a { color: inherit; text-decoration: none; }

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 6px;
  transition: width .2s ease, flex-basis .2s ease;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--sidebar-scroll); border-radius: 4px; }

/* ===== Barra recolhida que abre ao passar o mouse =====
   Recolhida ela mostra só os ícones (76px) e devolve 212px ao conteúdo; ao
   receber o mouse, abre por cima do conteúdo — sobrepondo, não empurrando,
   senão a página inteira se reorganizaria a cada passada de mouse.
   O botão da barra "fixa" o menu aberto; a escolha fica no navegador.
   Abaixo de 560px vale a regra do celular (menu embaixo), por isso o @media. */
@media (min-width: 561px) {
  #app { position: relative; }
  #app.collapsed .sidebar {
    position: absolute; top: 0; bottom: 0; left: 0; z-index: 60;
    width: var(--sidebar-w-collapsed); flex-basis: var(--sidebar-w-collapsed);
    transition: width .16s ease, box-shadow .16s ease;
  }
  #app.collapsed .main { margin-left: var(--sidebar-w-collapsed); }
  #app.collapsed .sidebar:hover { width: var(--sidebar-w); box-shadow: 10px 0 34px rgba(2,8,23,.32); }

  /* os rótulos só somem enquanto o mouse está fora */
  #app.collapsed .sidebar:not(:hover) .brand-text,
  #app.collapsed .sidebar:not(:hover) .org-info,
  /* :not(.ico) — sem isso a regra esconderia também o <span class="ico">, e a
     barra recolhida viraria uma coluna vazia de 76px. */
  #app.collapsed .sidebar:not(:hover) .nav-link span:not(.ico),
  #app.collapsed .sidebar:not(:hover) .nav-link .nav-txt,
  #app.collapsed .sidebar:not(:hover) .nav-section-label,
  #app.collapsed .sidebar:not(:hover) .nav-badge,
  #app.collapsed .sidebar:not(:hover) .collapse-btn { display: none; }
  #app.collapsed .sidebar:not(:hover) .nav-link .ico { font-size: 19px; }
  #app.collapsed .sidebar:not(:hover) .org-card { justify-content: center; }
  #app.collapsed .sidebar:not(:hover) .nav-link { justify-content: center; }
  #app.collapsed .sidebar:not(:hover) .sidebar-head { justify-content: center; }
}


.sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 6px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; letter-spacing: -.02em; }
/* Marca: selo com o ícone em SVG (antes o glifo ◈ pintado por clip de texto) */
.brand-mark {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px;
  display: inline-grid; place-items: center;
  background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(198,147,122,.32);
}
.brand-mark .svg-ico { width: 20px; height: 20px; }
.brand-text { color: var(--sidebar-text-strong); font-weight: 400; }
.brand-text b { font-weight: 800; }
.collapse-btn { color: var(--sidebar-text); font-size: 18px; }

.org-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--sidebar-hover);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 8px;
  cursor: pointer; width: 100%; text-align: left;
}
.org-avatar {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px;
  background: var(--org-avatar-bg);
  border: 1px solid var(--sidebar-border);
  display: grid; place-items: center; color: var(--gold); font-weight: 800; font-size: 13px;
}
.org-info { display: flex; flex-direction: column; overflow: hidden; }
.org-info strong { color: var(--sidebar-text-strong); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-info small { color: var(--sidebar-text); font-size: 10px; letter-spacing: .08em; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  /* Medido no JusBoard: item de 44px, px-4 py-3, gap-4, texto 16px/500
     em branco a 80%, rounded-xl. */
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  color: var(--sidebar-link); font-weight: 500; font-size: 15px;
  position: relative; cursor: pointer;
}
.nav-link .ico { width: 20px; text-align: center; font-size: 16px; opacity: .9; display: inline-grid; place-items: center; flex: 0 0 20px; }
.svg-ico { width: 1.15em; height: 1.15em; display: block; flex: 0 0 auto; }
.nav-link .ico .svg-ico { width: 20px; height: 20px; }
.nav-link:hover { background: var(--sidebar-hover); color: var(--sidebar-text-strong); }
.nav-link.active {
  /* Ativo no JusBoard: bg-white/10, texto branco semibold, filete cobre. */
  background: var(--sidebar-active-bg); color: var(--sidebar-active-text); font-weight: 600;
}
.nav-link.active .ico { color: var(--rose-gold); opacity: 1; }
.nav-link.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px;
  border-radius: 2px; background: var(--copper);
}
.nav-badge {
  margin-left: auto; font-size: 9.5px; font-weight: 800; letter-spacing: .06em;
  color: var(--gold); border: 1px solid var(--gold); border-radius: 20px; padding: 2px 7px;
}
.nav-section-label {
  color: var(--sidebar-text); font-size: 10.5px; letter-spacing: .1em; font-weight: 700;
  padding: 12px 14px 4px; text-transform: uppercase;
}

/* ===== Main / Topbar ===== */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 64px; flex: 0 0 64px; background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; gap: 16px;
}
.topbar-left { font-weight: 700; color: var(--text-muted); font-size: 13px; }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: none; background: transparent;
  color: var(--text-muted); font-size: 16px; cursor: pointer; position: relative;
  display: grid; place-items: center;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.avatar-btn { background: var(--grad-navy); font-weight: 800; color: #fff; box-shadow: 0 4px 12px rgba(30,62,106,.28); }
.avatar-btn:hover { filter: brightness(1.06); color: #fff; }
.dot-badge {
  position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 20px; font-size: 9px; font-weight: 800; color: #fff;
  display: grid; place-items: center; border: 2px solid var(--surface);
}
.dot-badge.red { background: var(--red); }
.dot-badge.blue { background: var(--blue); }
.dot-badge.amber { background: var(--amber); }
.badge-btn .badge { pointer-events: none; }

.view { flex: 1; overflow-y: auto; padding: 16px 16px 48px; } /* p-4, medido no main do JusBoard */
.modo-sign .view { padding: 24px 24px 48px; }                 /* o SignJus usa p-6, medido lá */
.view-inner { max-width: 1600px; margin: 0 auto; }   /* listas e tabelas usam a tela; formulários usam .estreita */
.view-inner.estreita { max-width: 1200px; }

/* ===== Typography / headings ===== */
.page-title { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 700; letter-spacing: -.01em; color: var(--heading); }
.page-title .t-ico { font-size: 22px; }
/* variante medida no Financeiro real: text-2xl font-semibold text-slate-800, sem ícone */
.page-title.lite { font-weight: 600; color: #1e293b; letter-spacing: -.025em; }
[data-theme="dark"] .page-title.lite { color: var(--heading); }
.page-sub { color: var(--text-muted); margin-top: 5px; font-size: 14px; }
.page-title.lite + .page-sub { color: var(--text-faint); font-weight: 300; margin-top: 2px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); border-radius: 12px;
  padding: 8px 14px; font-weight: 600; font-size: 13px; cursor: pointer; font-family: inherit;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); border: none; color: #fff; box-shadow: 0 6px 16px rgba(198,147,122,.32); }
.btn-primary:hover { filter: brightness(1.04); box-shadow: 0 8px 22px rgba(198,147,122,.42); }
.btn-ghost { background: transparent; }
/* Progresso dos obrigatórios no rodapé do modal e seções opcionais recolhíveis */
.modal-foot .form-progresso { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; margin-right: 12px; }
.form-progresso .fp-barra { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.form-progresso .fp-barra i { display: block; height: 100%; width: 0; background: #b45309; transition: width .2s; }
.form-progresso.pronto .fp-barra i { background: #047857; }
.form-progresso .fp-txt { font-size: 12px; color: var(--text-muted); }
.form-progresso.pronto .fp-txt { color: #047857; }
.form-opc { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 8px; }
.form-opc > summary { cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); padding: 6px 0; }
.form-opc > summary small { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text-faint); }
.btn-40 { min-height: 40px; }
@media (max-width: 900px) { .btn-40 { min-height: 44px; } }
/* Menu "Mais": ação secundária e destrutiva fora do caminho do clique principal */
.menu-mais { position: relative; display: inline-block; }
.menu-mais > summary { list-style: none; cursor: pointer; user-select: none; }
.menu-mais > summary::-webkit-details-marker { display: none; }
.menu-mais-lista { position: absolute; right: 0; top: calc(100% + 4px); z-index: 60; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.16); padding: 6px; display: flex; flex-direction: column; }
.menu-mais-lista button { text-align: left; border: 0; background: none; font: inherit; font-size: 13px; color: var(--text); padding: 10px 12px; min-height: 40px; border-radius: 8px; cursor: pointer; }
.menu-mais-lista button:hover { background: var(--surface-2); }
.menu-mais-lista hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.menu-mais-lista .mm-perigo { color: var(--red); }
.menu-mais-lista .mm-perigo:hover { background: rgba(239,68,68,.08); }
/* Celular/tablet até 900px: a faixa de ações não corta o menu ⋯ / Análises. Dentro de .seg, a lista abre para a esquerda (right: 0). */
@media (max-width: 900px) {
  .page-head.page-head-acoes:has(.menu-mais) { overflow: visible; flex-wrap: wrap; }
  .page-head.page-head-acoes:has(.menu-mais) > div { flex-wrap: wrap !important; }
  .page-head.page-head-acoes:has(.menu-mais) .seg { flex-wrap: wrap; }
  .page-head.page-head-acoes .menu-mais-lista { right: auto; left: 0; max-width: calc(100vw - 28px); }
  .page-head.page-head-acoes .seg .menu-mais-lista { left: auto; right: 0; }
}
/* medidos no cabeçalho do Financeiro › Painel real: Receita branca com fio
   emerald-200 e texto emerald-700; Despesa navy sólida. Ambos h-8, 12px, raio 6 */
.btn-receita { height: 32px; padding: 0 12px; font-size: 12px; font-weight: 500; border-radius: 6px; color: #047857; border-color: #a7f3d0; }
.btn-receita:hover { background: #ecfdf5; border-color: #6ee7b7; }
.btn-navy { height: 32px; padding: 0 12px; font-size: 12px; font-weight: 500; border-radius: 6px; background: #1E3E6A; color: #fff; border: none; }
.btn-navy:hover { background: #2A5494; }
[data-theme="dark"] .btn-receita { background: rgba(6,78,59,.25); border-color: #065f46; color: #34d399; }

/* ===== Cards ===== */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2,1fr); } .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ===== KPI cards ===== */
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow);
}
/* variante do dashboard, medida: flex items-center gap-3 rounded-xl px-4 py-3.5 com chip 36px */
.kpi-row { flex-direction: row; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; }
.kpi-row .kpi-ico { width: 36px; height: 36px; border-radius: 12px; font-size: 16px; }
.kpi-row .kpi-val { line-height: 1; }
.kpi-row .kpi-label { margin-top: 3px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; }
.kpi { transition: box-shadow .18s, transform .18s, border-color .18s; }
.kpi:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-strong); }
.kpi-val { font-size: 18px; font-weight: 700; letter-spacing: -.01em; color: var(--heading); } /* medido: 18/700 */
.kpi-label { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .025em; font-weight: 500; }
.tint-amber { background: rgba(245,158,11,.12); color: var(--amber); }
.tint-red { background: rgba(239,68,68,.12); color: var(--red); }
.tint-blue { background: rgba(42,84,148,.12); color: var(--blue); }
.tint-green { background: rgba(16,185,129,.12); color: var(--green); }
.tint-gold { background: var(--copper-tint); color: var(--gold); }
.tint-violet { background: rgba(139,92,246,.12); color: var(--violet); }

/* ===== Section card (list panels) ===== */
/* Painel medido no dashboard real: rounded-2xl, cabeçalho px-5 py-4 com fio,
   título 14/600 a 80%, chip de ícone 28px rounded-lg em tinta a 9,4%
   (cobre nos prazos, índigo nas audiências, esmeralda no financeiro),
   "Ver todos" 12/400, corpo p-3. */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.panel-head h3 { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; letter-spacing: .025em; color: rgba(2,8,23,.8); }
[data-theme="dark"] .panel-head h3 { color: rgba(248,250,252,.8); }
.panel-head .t-ico {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  font-size: 13px; background: rgba(198,147,122,.094); color: var(--heading);
}
.panel-head .t-ico.tint-indigo { background: rgba(129,140,248,.094); }
.panel-head .t-ico.tint-green { background: rgba(52,211,153,.094); }
.link-all { color: var(--text-muted); font-weight: 400; font-size: 12px; display: inline-flex; gap: 4px; align-items: center; }
.link-all:hover { color: var(--gold); }
.panel-body { padding: 12px; }

/* ===== Deadline / list rows ===== */
.dl-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 12px; border-radius: 10px;
  border-left: 3px solid var(--red); background: var(--surface); cursor: pointer;
}
.dl-row:hover { background: var(--surface-2); }
/* linha de alerta dos prazos vencidos no topo de "Próximos Prazos" */
.dl-row.dl-alerta { width: 100%; text-align: left; font: inherit; color: inherit; border-top: 0; border-right: 0; border-bottom: 0; background: rgba(239, 68, 68, .06); }
.dl-row.dl-alerta:hover { background: rgba(239, 68, 68, .11); }
.dl-row.dl-alerta .dl-date b { color: var(--red); }
/* recorte da Lista da Agenda aberto por um atalho ("Mostrando: …") */
.cal-foco { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 8px 8px 8px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--copper-tint); font-size: 13px; }
.cal-foco .btn { height: 30px; padding: 0 10px; font-size: 12px; }
.dl-date { text-align: center; min-width: 34px; }
.dl-date b { display: block; font-size: 16px; font-weight: 800; }
.dl-date small { font-size: 9px; color: var(--text-faint); letter-spacing: .1em; }
.dl-main { flex: 1; min-width: 0; }
.dl-main .title { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-main .sub { color: var(--text-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.pill-red { background: rgba(239,68,68,.12); color: var(--red); }
.pill-amber { background: rgba(245,158,11,.14); color: #b45309; }
.pill-green { background: rgba(16,185,129,.14); color: #047857; }
.pill-gray { background: var(--surface-2); color: var(--text-muted); }

/* ===== Tags / badges ===== */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 3px 9px; border-radius: 6px; border: none;
}
.tag .tdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.t-amber { background: rgba(249,115,22,.082); color: #f97316; }
.tag.t-blue { background: rgba(42,84,148,.082); color: #2a5494; }
.tag.t-green { background: rgba(16,185,129,.082); color: #10b981; }
.tag.t-red { background: rgba(239,68,68,.082); color: #ef4444; }
.tag.t-violet { background: rgba(217,70,239,.082); color: #d946ef; }
/* etiqueta com cor escolhida em Configurações (--tc vem do cadastro) */
.tag.t-cor { background: color-mix(in srgb, var(--tc, #94a3b8) 10%, transparent); color: var(--tc, #94a3b8); }
[data-theme="dark"] .tag.t-cor { background: color-mix(in srgb, var(--tc, #94a3b8) 18%, transparent); color: color-mix(in srgb, var(--tc, #94a3b8) 60%, white); }
[data-theme="dark"] .tag.t-amber,[data-theme="dark"] .pill-amber { color: #fbbf24; }
[data-theme="dark"] .tag.t-blue { color: #93c5fd; }
[data-theme="dark"] .tag.t-green,[data-theme="dark"] .pill-green { color: #6ee7b7; }
[data-theme="dark"] .tag.t-red { color: #fca5a5; }

/* ===== Search + filters ===== */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.search {
  flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px;
}
.search input { border: none; outline: none; background: transparent; flex: 1; font-family: inherit; font-size: 14px; color: var(--text); }
.search .ico { color: var(--text-faint); }
.select {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px;
  font-family: inherit; font-size: 13.5px; color: var(--text); cursor: pointer;
}

/* ===== Tabs ===== */
/* Pílulas de filtro — mesmo padrão da aplicação real (retangulares, ativa navy) */
.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.tab {
  padding: 9px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
  font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--heading);
  display: inline-flex; align-items: center; gap: 8px;
  transition: border-color .15s, box-shadow .15s;
}
.tab:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.tab .count {
  background: var(--surface-2); color: var(--text-muted); border-radius: 6px;
  padding: 2px 7px; font-size: 11px; font-weight: 800; min-width: 22px; text-align: center;
}
.tab.active { background: #0f172a; color: #fff; border-color: #0f172a; }
.tab.active .count { background: rgba(255,255,255,.16); color: #fff; }
[data-theme="dark"] .tab.active { background: #e2e8f0; border-color: #e2e8f0; color: #0f172a; }
[data-theme="dark"] .tab.active .count { background: rgba(15,23,42,.14); color: #0f172a; }

/* medido no Financeiro real: flex border-b gap-1; botão px-4 py-2.5 text-sm
   font-medium border-b-2 -mb-px; ativa border/texto #C6937A */
.underline-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.utab { padding: 10px 16px; font-weight: 500; font-size: 14px; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; }
.utab.active { color: var(--rose-gold); border-color: var(--rose-gold); }

/* Controle segmentado (Financeiro › A Receber/Recebido) — medido:
   trilho bg-slate-100 rounded-lg p-1 gap-1; ativa bg-white shadow-sm slate-800 */
.seg { display: inline-flex; gap: 4px; background: var(--surface-2); border-radius: 8px; padding: 4px; margin-bottom: 20px; }
.seg-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 6px;
  border: none; background: transparent; font-family: inherit; font-size: 14px; font-weight: 500;
  color: var(--text-muted); cursor: pointer; transition: color .2s, background .2s;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--surface); color: var(--heading); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.seg-btn .count { font-size: 10px; font-weight: 600; background: var(--surface-2); color: var(--text-muted); border-radius: 9999px; padding: 2px 6px; }
.seg-btn.active .count { background: var(--surface-2); }
[data-theme="dark"] .seg-btn.active { background: #1e293b; }

/* ===== Process list cards (fiel ao JusBoard) ===== */
.proc-card { display: flex; align-items: flex-start; gap: 14px; padding: 16px; cursor: pointer; border-radius: 12px; border-color: rgba(226,232,240,.6); }
.proc-card:hover { border-color: var(--border-strong); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: 0 0 9px; background: var(--green); }
.status-dot.gray { background: var(--text-faint); }
.proc-main { flex: 1; min-width: 0; }
.proc-name { font-weight: 600; font-size: 15px; color: var(--heading); }
.proc-num { color: var(--text-muted); font-size: 13px; margin: 2px 0; font-variant-numeric: tabular-nums; }
.proc-court { color: var(--text-faint); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.proc-dates { display: flex; gap: 26px; text-align: right; }
.proc-dates div small { display: block; color: var(--text-faint); font-size: 10px; }
.proc-dates div b { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
@media (max-width: 720px){ .proc-dates{ display:none; } }

/* ===== Client cards =====
   Medido na tela Clientes real: cartão branco rounded-xl com filete de cor
   de 4px no topo (a cor do cliente), avatar redondo de 44px, nome 14/600,
   telefone 12px, pílulas redondas 10px, e ações que só aparecem no hover. */
.cli-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1240px) { .cli-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 980px) { .cli-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cli-grid { grid-template-columns: 1fr; } }
.cli-toolbar { margin-bottom: 14px; }
.cli-toolbar .search { max-width: 384px; border-radius: 8px; padding: 8px 12px; }
.client-card { position: relative; padding: 0; border-radius: 12px; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.client-card:hover { border-color: rgba(30,62,106,.3); box-shadow: var(--shadow-md); }
.client-strip { display: block; height: 4px; width: 100%; }
.client-top { display: flex; gap: 12px; align-items: flex-start; padding: 16px; }
.client-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; flex: 0 0 44px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.client-name { font-weight: 600; font-size: 14px; color: var(--heading); line-height: 1.375; }
.client-phone { color: var(--text-faint); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-meta { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.client-meta .chip { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 9999px; }
/* ações sobre o cartão, no canto (antes ocupavam uma faixa invisível e metade do cartão ficava vazia) */
.client-actions { position: absolute; top: 10px; right: 8px; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; background: var(--surface); border-radius: 8px; }
.client-card:hover .client-actions { opacity: 1; }
.client-actions button { padding: 6px; border-radius: 8px; border: none; background: none; color: var(--text-faint); cursor: pointer; font-size: 13px; line-height: 1; }
.client-actions .act-ver:hover { color: var(--navy); background: rgba(30,62,106,.08); }
.client-actions .act-editar:hover { color: #C9A055; background: rgba(245,158,11,.1); }
.client-actions .act-excluir:hover { color: var(--red); background: rgba(239,68,68,.08); }
.chip { font-size: 11px; font-weight: 700; color: var(--text-muted); background: var(--surface-2); border-radius: 8px; padding: 4px 9px; display: inline-flex; gap: 5px; align-items: center; }

/* título com chip (Calendário azul, Clientes navy) e botão dividido navy — medidos */
.page-title.navy { font-size: 30px; color: var(--navy); letter-spacing: -.025em; }
.title-chip-navy { width: 40px; height: 40px; border-radius: 8px; background: rgba(30,62,106,.1); color: var(--navy); display: grid; place-items: center; font-size: 18px; flex: 0 0 40px; }
[data-theme="dark"] .title-chip-navy { background: rgba(111,159,216,.15); }
.title-chip-gold { width: 40px; height: 40px; border-radius: 8px; background: rgba(201,160,85,.1); color: #C9A055; display: grid; place-items: center; font-size: 18px; flex: 0 0 40px; }
/* "+ Nova Tarefa" medido: dourado #C9A055 sólido, h-10, rounded-lg, 14/600 */
.btn-gold { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: none; border-radius: 8px; background: #C9A055; color: #fff; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: background .15s; }
.btn-gold:hover { background: #A8843E; }
.btn-split { display: flex; position: relative; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.btn-split .bs-main, .btn-split .bs-caret { border: none; background: #1E3E6A; color: #fff; cursor: pointer; font-family: inherit; transition: background .15s; }
.btn-split .bs-main { display: flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 14px; font-weight: 600; border-radius: 8px 0 0 8px; }
.btn-split .bs-caret { padding: 10px 8px; border-left: 1px solid rgba(255,255,255,.2); border-radius: 0 8px 8px 0; font-size: 11px; }
.btn-split .bs-main:hover, .btn-split .bs-caret:hover { background: #15305A; }
.btn-split .bs-menu { position: absolute; right: 0; top: calc(100% + 4px); width: 208px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 4px; z-index: 60; }
.btn-split .bs-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; font-size: 13px; background: none; border: none; cursor: pointer; color: var(--text); font-family: inherit; }
.btn-split .bs-menu button:hover { background: var(--surface-2); }

/* ===== Cliente (detalhe) =====
   Medido: faixa navy-escura #0A0F1C com avatar 56px rounded-xl, kicker
   azul-claro 12px maiúsculo, nome 20/700 branco, documento em mono
   azul-200/70; régua de estatísticas com divisórias slate-100; cartões
   de seção com cabeçalho slate-50/80 e título 12px maiúsculo. */
.det-cli-wrap { max-width: 1024px; margin: 0 auto; }
.det-cli-back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-faint); margin-bottom: 20px; }
.det-cli-back:hover { color: var(--navy); }
.det-cli-card { padding: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.05); margin-bottom: 24px; }
.det-cli-banner { background: #0A0F1C; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.det-cli-banner .client-avatar { width: 56px; height: 56px; flex-basis: 56px; border-radius: 12px; font-size: 18px; box-shadow: 0 4px 6px rgba(0,0,0,.3); }
.det-cli-kicker { display: flex; gap: 8px; align-items: center; color: #dbeafe; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 4px; }
.det-cli-banner h1 { color: #fff; font-size: 20px; font-weight: 700; line-height: 1.25; }
.det-cli-doc { color: rgba(191,219,254,.7); font-size: 12px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; margin-top: 4px; }
.btn-banner { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; font-size: 14px; font-weight: 600; color: #dbeafe; background: transparent; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; cursor: pointer; font-family: inherit; transition: background .15s, color .15s; }
.btn-banner:hover { color: #fff; background: rgba(255,255,255,.1); }
.btn-banner.perigo:hover { color: #fca5a5; }
.det-cli-stats { display: flex; align-items: center; flex-wrap: wrap; }
.det-cli-stats > div { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-left: 1px solid var(--surface-2); font-size: 13px; color: var(--text-muted); }
.det-cli-stats > div:first-child { border-left: none; }
.det-cli-stats b { font-size: 14px; font-weight: 600; color: var(--navy); }
.subcard { padding: 0; border-radius: 12px; overflow: hidden; }
.subcard-head { padding: 12px 16px; background: rgba(248,250,252,.8); border-bottom: 1px solid var(--surface-2); display: flex; align-items: center; justify-content: space-between; }
[data-theme="dark"] .subcard-head { background: rgba(255,255,255,.03); }
.subcard-head h2 { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; display: flex; gap: 8px; align-items: center; }
.count-pill { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 9999px; background: rgba(30,62,106,.08); color: var(--navy); }
.count-pill:empty { display: none; }
.ct-row { display: flex; gap: 12px; align-items: flex-start; }
.ct-ico { width: 28px; height: 28px; border-radius: 6px; background: rgba(30,62,106,.08); color: var(--navy); display: grid; place-items: center; font-size: 13px; flex: 0 0 28px; margin-top: 2px; }
.ct-row .lbl { font-size: 11px; color: var(--text-faint); line-height: 1; margin-bottom: 3px; }
.ct-row .val { font-size: 14px; color: #334155; overflow-wrap: anywhere; }
[data-theme="dark"] .ct-row .val { color: var(--text); }
.subempty { padding: 56px 16px; text-align: center; }
.subempty .ico { width: 48px; height: 48px; border-radius: 9999px; background: var(--surface-2); display: grid; place-items: center; margin: 0 auto 12px; font-size: 20px; color: var(--text-faint); }
.subempty p { font-size: 14px; font-weight: 500; color: var(--text-faint); }
.subempty small { font-size: 12px; color: #cbd5e1; display: block; margin-top: 4px; }
[data-theme="dark"] .subempty small { color: var(--text-faint); }
.det-cli-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .det-cli-grid { grid-template-columns: 1fr; } }

/* ===== Financeiro — Projeção =====
   Linha medida no app real: cartão rounded-xl com duas colunas — esquerda p-5
   (CNJ 14/600, Autor/Réu em grade text-xs, tags 10px com ponto), direita
   min-w 300 com fio à esquerda, rótulos 10px maiúsculos e linhas tracejadas. */
.fin-kpis { margin-bottom: 16px; }
.fin-kpi { padding: 0; overflow: hidden; }
.fin-kpi .k-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; }
.fin-kpi .k-label { font-size: 12px; font-weight: 500; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; }
.fin-kpi .k-ico { color: #cbd5e1; font-size: 14px; }
.fin-kpi .k-body { padding: 0 20px 16px; }
.fin-kpi .k-val { font-size: 20px; font-weight: 600; color: #334155; letter-spacing: -.025em; }
.fin-kpi .k-sub { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
[data-theme="dark"] .fin-kpi .k-val { color: var(--text); }
/* cartão azul: bg-gradient-to-br from-[#1E3E6A] to-blue-700, fio blue-800/50 */
.fin-kpi.dark { background: linear-gradient(to bottom right, #1E3E6A, #1d4ed8); border-color: rgba(30,64,175,.5); color: #fff; }
.fin-kpi.dark .k-label { color: #fff; opacity: .75; }
.fin-kpi.dark .k-val { font-size: 24px; font-weight: 700; color: #fff; }
.fin-kpi.dark .k-sub { color: #fff; opacity: .6; }

/* barra de filtros: cartão branco p-3.5, busca à esquerda, contagem à direita.
   Busca medida: 36px de altura, bg slate-50, raio 6 */
.fin-filter { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.fin-filter .search-wrap { flex: 1; max-width: 384px; }
.fin-filter .search { background: #f8fafc; border-radius: 6px; padding: 7px 12px; min-width: 200px; }
[data-theme="dark"] .fin-filter .search { background: var(--surface-2); }
.fin-count { font-size: 12px; color: var(--text-faint); margin-left: auto; white-space: nowrap; }

.fin-list { display: flex; flex-direction: column; gap: 10px; }
.fin-row { display: flex; padding: 0; transition: box-shadow .3s, border-color .3s; }
.fin-row:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.fin-main { flex: 1; padding: 14px 18px; min-width: 0; }
.fin-num { font-size: 14px; font-weight: 600; color: var(--heading); display: flex; align-items: center; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.fin-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; font-size: 12px; max-width: 576px; }
.fin-parties .lbl { color: var(--text-faint); font-weight: 500; }
.fin-parties b { display: block; font-weight: 400; color: var(--text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-side { flex: 0 0 280px; border-left: 1px solid var(--surface-2); display: flex; flex-direction: column; }
.fin-side-body { flex: 1; padding: 12px 16px 8px; }
@media (max-width: 720px) {
  .fin-row { flex-direction: column; }
  .fin-side { flex-basis: auto; border-left: 0; border-top: 1px solid var(--surface-2); }
  .fin-parties { grid-template-columns: minmax(0, 1fr); }
  .fin-filter .search-wrap { max-width: none; flex-basis: 100%; }
}
.fin-line { display: flex; justify-content: space-between; align-items: center; font-size: 11px; padding: 3px 0; }
.fin-line.total { padding-bottom: 8px; border-bottom: 1px solid var(--surface-2); margin-bottom: 4px; }
.fin-line.total span { font-size: 10px; text-transform: uppercase; font-weight: 600; color: var(--text-faint); letter-spacing: .05em; }
.fin-line.total b { font-size: 16px; font-weight: 700; color: var(--heading); }
.fin-line .l { color: var(--text-faint); }
.fin-line .v { color: var(--text-muted); font-weight: 500; }
.fin-line.dashed { border-top: 1px dashed var(--surface-2); margin-top: 6px; padding-top: 7px; }
.fin-line.adv .l { color: var(--text-muted); font-weight: 600; }
.fin-line.adv .v { color: #059669; font-weight: 700; }
.fin-note { font-size: 10px; color: var(--text-faint); padding-left: 4px; }
.fin-line.destaque .v { color: #334155; font-weight: 600; }
[data-theme="dark"] .fin-line.destaque .v { color: var(--text); }
.fin-side-foot { padding: 0 16px 12px; }
.btn-conf {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 12px; border-radius: 8px; font-family: inherit; font-size: 12px; font-weight: 500;
  background: rgba(236,253,245,.5); color: #047857; border: 1px solid #a7f3d0; cursor: pointer;
  transition: background .2s;
}
.btn-conf:hover { background: #ecfdf5; }
.btn-conf.ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
[data-theme="dark"] .btn-conf { background: rgba(6,78,59,.25); border-color: #065f46; color: #34d399; }
.money-green { color: var(--green); font-weight: 800; }
@media (max-width: 900px){ .fin-row { flex-direction: column; } .fin-side { flex-basis: auto; border-left: none; border-top: 1px solid var(--surface-2); } }

/* ===== Financeiro — Painel =====
   Medido: setas h-8 w-8 redondas; mês 18/600; selo "MÊS ATUAL" 10px cobre;
   KPIs p-5 com chip de ícone 28px; Resultado no mesmo degradê do cartão azul. */
.fin-month-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 24px; }
.fin-month-nav .nav-btn { width: 32px; height: 32px; border-radius: 9999px; border: none; background: transparent; color: var(--text-faint); font-size: 16px; cursor: pointer; display: grid; place-items: center; }
.fin-month-nav .nav-btn:hover { color: var(--text-muted); background: var(--surface-2); }
.fin-month-nav b { font-size: 18px; font-weight: 600; color: var(--heading); letter-spacing: -.025em; }
.fin-mes-atual { font-size: 10px; font-weight: 500; color: var(--rose-gold); text-transform: uppercase; letter-spacing: .05em; }
.pk { padding: 20px; }
.pk .k-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pk .k-label { font-size: 12px; font-weight: 600; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; }
.pk .k-chip { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; }
.pk .k-val { font-size: 24px; font-weight: 700; letter-spacing: -.025em; color: #334155; }
[data-theme="dark"] .pk .k-val { color: var(--text); }
.pk .k-sub { font-size: 11px; color: var(--text-faint); margin-top: 6px; }
.pk.resultado { background: linear-gradient(to bottom right, #1E3E6A, #1d4ed8); border-color: rgba(30,64,175,.3); color: #fff; }
.pk.resultado .k-label { color: #fff; opacity: .6; }
.pk.resultado .k-val { color: #fff; }
.pk.resultado .k-chip { background: rgba(255,255,255,.1); color: #fff; }
.margin-line { display: flex; justify-content: space-between; font-size: 10px; opacity: .6; margin: 8px 0 4px; }
.margin-bar { height: 4px; border-radius: 9999px; background: rgba(255,255,255,.2); overflow: hidden; }
.margin-bar span { display: block; height: 100%; background: #fff; border-radius: 9999px; }
.evo-title { font-size: 12px; font-weight: 600; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; }
.evo-months { display: flex; justify-content: space-between; margin-top: 8px; padding: 0 2px; }
.evo-months span { font-size: 10px; color: var(--text-faint); font-weight: 500; }
.evo-legend { display: flex; align-items: center; gap: 16px; margin-top: 12px; justify-content: flex-end; }
.evo-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: var(--text-faint); }
.evo-legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; opacity: .8; }
/* lançamentos: cabeçalho px-5 py-4 com fio slate-100; linhas com chip 28px */
.lanc-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--surface-2); }
.lanc-head h3 { font-size: 14px; font-weight: 600; color: #334155; }
[data-theme="dark"] .lanc-head h3 { color: var(--text); }
.lanc-head .sub { font-size: 11px; color: var(--text-faint); margin-top: 2px; font-weight: 400; }
.lanc-head .tot { font-size: 14px; font-weight: 700; }
.lanc-add { width: 28px; height: 28px; border-radius: 8px; border: none; cursor: pointer; display: grid; place-items: center; font-size: 15px; background: #ecfdf5; color: #059669; }
.lanc-add:hover { background: #d1fae5; }
.lanc-add.desp { background: #fef2f2; color: var(--red); }
.lanc-add.desp:hover { background: #fee2e2; }
[data-theme="dark"] .lanc-add { background: rgba(6,78,59,.3); }
[data-theme="dark"] .lanc-add.desp { background: rgba(127,29,29,.3); }
.lanc-body { padding: 8px; }
.lanc-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; transition: background .15s; }
.lanc-row:hover { background: var(--surface-2); }
.lanc-ico { width: 28px; height: 28px; border-radius: 8px; background: rgba(30,62,106,.1); color: var(--navy); display: grid; place-items: center; font-size: 13px; flex: 0 0 28px; }
.lanc-desc { font-size: 14px; color: #334155; font-weight: 500; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-theme="dark"] .lanc-desc { color: var(--text); }
.lanc-sub { font-size: 10px; color: var(--text-faint); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lanc-badge { flex: 0 0 auto; font-size: 9px; font-weight: 600; color: #059669; background: #ecfdf5; border: 1px solid #d1fae5; padding: 2px 6px; border-radius: 4px; }
.lanc-badge.desp { color: var(--red); background: #fef2f2; border-color: #fee2e2; }
[data-theme="dark"] .lanc-badge { background: rgba(6,78,59,.3); border-color: #065f46; color: #34d399; }
[data-theme="dark"] .lanc-badge.desp { background: rgba(127,29,29,.3); border-color: #991b1b; color: #f87171; }
.lanc-val { flex: 0 0 auto; font-size: 14px; font-weight: 600; }
.lanc-row .icon-btn { opacity: 0; transition: opacity .15s; }
.lanc-row:hover .icon-btn { opacity: 1; }

/* ===== Process detail ===== */
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.detail-kicker { color: var(--gold); font-size: 11px; letter-spacing: .12em; font-weight: 800; text-transform: uppercase; display:flex; gap:6px; align-items:center; }
.detail-actions { display: flex; gap: 4px; }
.field { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); }
.field:first-of-type { border-top: none; }
.field .ico { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--gold); flex: 0 0 34px; }
.field .lbl { color: var(--text-faint); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.field .val { font-size: 14px; margin-top: 2px; }
.party { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
.party .role { font-size: 10px; letter-spacing: .08em; font-weight: 800; text-transform: uppercase; display:flex; gap:6px; align-items:center; }
.party .pname { font-weight: 800; font-size: 15px; margin: 6px 0; }
.party .lawyer { color: var(--gold); font-size: 12px; display: block; }

/* timeline */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content:""; position:absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 0 0 20px 4px; }
.tl-item::before { content:""; position:absolute; left:-22px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--gold); }
.tl-date { color: var(--text-faint); font-size: 11px; font-weight: 700; }
.tl-text { font-size: 13.5px; margin-top: 2px; }

/* ===== Empty state ===== */
.empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty .e-ico { font-size: 40px; opacity: .4; margin-bottom: 12px; }
.empty .e-tit { font-size: 15.5px; font-weight: 800; color: var(--heading); }
.empty .e-sub { margin: 7px auto 0; font-size: 13px; max-width: 420px; line-height: 1.5; }
.empty .e-acao { margin-top: 16px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

/* ===== Calendar =====
   Medido no Calendário real (react-big-calendar): grade contígua com fios
   finos, dias fora do mês em cinza cheio, hoje em azul-claro (#eaf6ff),
   número do dia 16px à direita, eventos como barras sólidas com ponto e
   texto 11/600 branco. */
.cal-wrap { overflow-x: auto; }
.cal { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.cal-h { text-align: center; font-size: 13px; font-weight: 700; color: var(--heading); padding: 4px 3px; overflow: hidden; border-bottom: 1px solid var(--border); }
.cal-h + .cal-h { border-left: 1px solid var(--border); }
.cal-h .dow-short { display: none; }
.cal-cell { min-height: 110px; border-top: 1px solid var(--border); padding: 4px 5px; background: var(--surface); }
.cal-cell + .cal-cell:not(:nth-child(7n+1)) { border-left: 1px solid var(--border); }
.cal-cell.dim { background: var(--surface-2); }
[data-theme="dark"] .cal-cell.dim { background: rgba(255,255,255,.03); }
.cal-cell.today { background: #eaf6ff; }
[data-theme="dark"] .cal-cell.today { background: rgba(37,99,235,.12); }
.cal-num { font-size: 16px; font-weight: 400; color: var(--heading); text-align: right; padding-right: 2px; }
.cal-cell.dim .cal-num { color: var(--text-faint); }
.cal-ev {
  display: flex; align-items: center; gap: 6px; color: #fff;
  font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 4px; margin-top: 3px;
  overflow: hidden; white-space: nowrap;
}
.cal-ev::before { content: ""; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 9999px; background: rgba(255,255,255,.8); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
/* telas estreitas: nomes curtos e rolagem horizontal, mantendo as células legíveis */
@media (max-width: 1080px) {
  .cal-h .dow-long { display: none; }
  .cal-h .dow-short { display: inline; }
}
@media (max-width: 860px) {
  .cal { min-width: 660px; }
  .cal-wrap { padding-bottom: 6px; }
}

/* ===== Modal ===== */
/* Modal medido no diálogo real (shadcn): overlay preto/80 com blur(4px),
   caixa branca raio 8 com fio slate-200 e shadow-lg, padding 24 sem
   separadores, título 18/600, descrição 14 slate-500, inputs h-40 raio 6,
   rodapé à direita com espaçamento de 8px. */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.8); backdrop-filter: blur(4px);
  display: grid; place-items: center; z-index: 100; padding: 20px;
}
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  width: 100%; max-width: 480px; overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  /* Teto de altura com rolagem só no miolo. Sem isto, um formulário longo
     (o de cliente tem endereço completo) estica o modal além da tela e
     empurra o cabeçalho para fora — o ✕ de fechar fica inalcançável, e em
     telas baixas os botões de salvar também. Descoberto pelo teste de
     interface, que não conseguia clicar em fechar. */
  display: flex; flex-direction: column; max-height: calc(100vh - 40px);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 24px 24px 0; flex: 0 0 auto; }
.modal-head h3 { font-size: 18px; font-weight: 600; color: var(--heading); }
.modal-body { padding: 16px 24px 20px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; flex: 1 1 auto; }
.modal.modal-wide { max-width: 560px; }
.modal-foot { padding: 0 24px 24px; display: flex; justify-content: flex-end; gap: 8px; flex: 0 0 auto; }
.modal-foot .btn { border-radius: 6px; height: 40px; padding: 0 16px; font-size: 14px; font-weight: 500; }
.modal-foot .btn-primary { background: #2563eb; box-shadow: none; }
.modal-foot .btn-primary:hover { background: #1d4ed8; filter: none; box-shadow: none; }
.modal-sub { color: var(--text-muted); font-size: 14px; line-height: 1.45; margin: -6px 0 2px; }
.form-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--heading); margin-bottom: 6px; }
.form-field .req { color: var(--rose-gold); font-weight: 800; margin-left: 1px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px;
  font-family: inherit; font-size: 14px; background: var(--surface); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-field textarea { min-height: 78px; resize: vertical; line-height: 1.45; }
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--text-faint); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--rose-gold); box-shadow: 0 0 0 3px var(--ring); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.modal-check { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 13px; color: var(--text); cursor: pointer; user-select: none; }
.modal-check input { width: 16px; height: 16px; accent-color: var(--rose-gold); margin: 0; }

.result-count { color: var(--text-muted); font-size: 12.5px; font-weight: 600; }
.result-count b { color: var(--heading); font-weight: 800; }
.proc-count-line { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.proc-count-line .batch { color: var(--text-muted); font-size: 12px; border-radius: 9999px; padding: 4px 10px; cursor: pointer; }
.proc-count-line .batch:hover { background: var(--surface-2); }

/* ===== Login e cadastro =====
   No padrão do resto do sistema (tokens do tema e da marca escolhida):
   página em --surface-2, cartão --surface com fio --border, campos iguais
   aos dos formulários, botão principal na cor da marca. Antes a tela era
   o "vidro escuro" medido no JusBoard — sempre escura, com cobre fixo, e
   ignorava a paleta e o tema claro/escuro. */
.login-screen {
  /* Rola quando a janela é mais baixa que o cartão; "safe center" alinha
     ao topo quando não cabe (o centro puro cortaria o começo do cartão). */
  position: fixed; inset: 0; z-index: 500; display: grid; justify-items: center; align-items: safe center; padding: 16px;
  background: var(--surface-2); overflow-x: hidden; overflow-y: auto;
}
.login-orb { display: none; }

/* Tela de login dividida (data-fundo="dividido"): painel da marca à esquerda a
   partir de 960px; abaixo disso, só o cartão. Só tokens da marca e do tema —
   segue a paleta escolhida e o claro/escuro. Sem imagem externa (a CSP só aceita
   'self' e data:): o losango ◈ da marca-d'água é um SVG em data: usado como
   máscara, pintado de branco translúcido. */
.login-aside { display: none; }
@media (min-width: 960px) {
  .login-screen[data-fundo="dividido"] { grid-template-columns: minmax(0, 1.05fr) minmax(460px, 1fr); padding: 0; align-items: stretch; justify-items: stretch; }
  .login-screen[data-fundo="dividido"] .login-aside {
    position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
    padding: 48px 56px; background: var(--grad-navy); color: #fff; text-align: left;
  }
  .login-screen[data-fundo="dividido"] .login-aside::before {
    content: ""; position: absolute; inset: 0; background: #fff; opacity: .07; pointer-events: none;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M28 17 39 28 28 39 17 28Z' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E") 0 0 / 56px 56px repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M28 17 39 28 28 39 17 28Z' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E") 0 0 / 56px 56px repeat;
  }
  .login-screen[data-fundo="dividido"] .login-aside > * { position: relative; }
  .login-screen[data-fundo="dividido"] .login-aside .login-brand { color: #fff; margin: 0; }
  .login-screen[data-fundo="dividido"] .login-aside .brand-mark { background: none; color: rgba(255, 255, 255, .9); }
  .login-aside-txt { max-width: 480px; }
  .login-aside-txt h1 { font-size: 32px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; margin: 0 0 24px; color: #fff; }
  .login-aside-txt ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
  .login-aside-txt li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .86); }
  .login-aside-txt li::before { content: "◈"; position: absolute; left: 0; top: 0; color: rgba(255, 255, 255, .6); }
  .login-aside-pe { font-size: 13px; color: rgba(255, 255, 255, .6); letter-spacing: .04em; }
  .login-screen[data-fundo="dividido"] .login-col { align-self: safe center; justify-self: center; padding: 32px 24px; }
}
.login-col { position: relative; width: 100%; max-width: 420px; text-align: center; }
.login-card {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 24px 32px; text-align: center;
}
.login-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 24px; letter-spacing: -.02em; margin-bottom: 16px; color: var(--heading); }
.login-brand .brand-mark { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; }
.login-brand .brand-mark .svg-ico { width: 22px; height: 22px; }
.login-brand span:not(.brand-mark) { font-weight: 400; }
.login-brand b { font-weight: 800; }
.login-card h2 { font-size: 20px; font-weight: 700; color: var(--heading); letter-spacing: -.01em; }
.login-card .login-sub { color: var(--text-muted); font-size: 14px; line-height: 1.5; margin: 6px 0 20px; }
.login-field { text-align: left; margin-bottom: 14px; }
.login-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--heading); margin-bottom: 6px; }
.login-pass-wrap { position: relative; }
.login-pass-wrap input { padding-right: 44px; }
.login-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--text-faint); font-size: 15px; line-height: 1; padding: 6px; }
.login-eye:hover { color: var(--text-muted); }
.login-arrow { display: inline-block; transition: transform .16s ease; }
.login-btn:hover .login-arrow { transform: translateX(4px); }
.login-field .row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.login-field .row label { margin-bottom: 0; }
.login-field .row a { font-size: 12.5px; color: var(--gold); font-weight: 500; }
.login-field input {
  width: 100%; height: 42px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px;
  font-family: inherit; font-size: 14px; background: var(--surface); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.login-field input::placeholder { color: var(--text-faint); }
.login-field input:focus { outline: none; border-color: var(--rose-gold); box-shadow: 0 0 0 3px var(--ring); }
.login-btn {
  width: 100%; height: 42px; margin-top: 4px; padding: 0; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; box-shadow: none; text-decoration: none;
}
.login-btn.btn-primary:hover { box-shadow: none; }
.login-alt { margin-top: 18px; color: var(--text-muted); font-size: 14px; text-align: center; }
.login-alt a { color: var(--gold); font-weight: 600; }
.login-demo { margin-top: 20px; font-size: 11.5px; line-height: 1.5; color: var(--text-faint); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; text-align: left; }
.login-demo a { color: var(--gold); font-weight: 600; }
.login-foot { margin-top: 14px; color: var(--text-faint); font-size: 12px; }
/* comunicações por e-mail */
.adt-coms-tit { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); margin: 14px 0 6px; }
.int-extra { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.int-sub-tit { font-weight: 700; font-size: 13.5px; color: var(--heading); margin-bottom: 2px; }

/* assistente de intimações */
.int-texto { margin: 8px 0 2px; font-size: 13px; color: var(--text-muted); }
.int-texto summary { cursor: pointer; line-height: 1.5; }
.int-texto > div { margin-top: 8px; white-space: pre-wrap; line-height: 1.55; color: var(--text); }
.ag-simulado { background: rgba(245, 158, 11, .12); border: 1px dashed var(--amber); color: var(--text); border-radius: 8px;
  padding: 8px 10px; font-size: 12.5px; font-weight: 700; margin-bottom: 12px; }
.ag-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.ag-titulo { font-size: 15px; color: var(--heading); line-height: 1.35; }
.ag-trecho { margin: 10px 0; padding: 8px 12px; border-left: 3px solid var(--border-strong); background: var(--surface-2);
  border-radius: 0 8px 8px 0; font-size: 13px; color: var(--text-muted); font-style: italic; }
.ag-calc { margin: 12px 0 4px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; }
.ag-calc-passos { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; }
.ag-calc-passos b { font-size: 14px; color: var(--heading); text-transform: none; letter-spacing: 0; }
.ag-calc-passos i { font-style: normal; color: var(--text-faint); }
.ag-venc b { color: var(--red); }
.ag-alertas { margin: 10px 0 0; padding: 10px 12px 10px 28px; background: rgba(245, 158, 11, .08); border: 1px solid rgba(245, 158, 11, .4);
  border-radius: 8px; font-size: 13px; line-height: 1.5; }

/* quadro fixo no cartão de login (pedido de acesso, conta confirmada) */
.login-aviso { display: flex; flex-direction: column; gap: 3px; text-align: left; margin: -6px 0 18px; padding: 10px 12px;
  border: 1px solid var(--amber); border-radius: 10px; background: rgba(245, 158, 11, .08); font-size: 13px; line-height: 1.45; color: var(--text); }
.login-aviso b { color: var(--heading); font-size: 13.5px; }
.login-aviso.login-aviso-ok { border-color: var(--green); background: rgba(16, 185, 129, .08); }
.login-card > .login-ms { margin-bottom: 0; }
/* cadastro: tipo de conta, OAB (número + UF) e senha lado a lado */
.login-seg { display: flex; width: 100%; margin: 0 0 18px; }
.login-seg .seg-btn { flex: 1; }
.login-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.login-row.login-row-uf { grid-template-columns: 1fr 96px; }
.login-field select {
  width: 100%; height: 42px; border: 1px solid var(--border); border-radius: 8px; padding: 0 10px;
  font-family: inherit; font-size: 14px; background: var(--surface); color: var(--text);
}
.login-field select:focus { outline: none; border-color: var(--rose-gold); box-shadow: 0 0 0 3px var(--ring); }
.login-grupo { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint); margin: 6px 0 10px; padding-top: 12px; border-top: 1px solid var(--border); }
@media (max-width: 420px) { .login-row:not(.login-row-uf) { grid-template-columns: 1fr; } }
/* Configurações › Escritório */
.esc-dados { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.esc-dados > div { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.esc-dados span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.esc-dados b { display: block; margin-top: 3px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--heading); }
@media (max-width: 700px) { .esc-dados { grid-template-columns: 1fr; } }
.esc-lista { display: flex; flex-direction: column; }
.esc-lin { display: grid; grid-template-columns: 110px 150px 1fr auto; gap: 12px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--border); }
.esc-lin:first-child { border-top: 0; }
.esc-lin .pill { justify-self: start; }
.esc-oab { font-variant-numeric: tabular-nums; color: var(--heading); }
.esc-tit { color: var(--text-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) { .esc-lin { grid-template-columns: 1fr auto; } .esc-lin .esc-tit { grid-column: 1 / -1; } }

/* página pública de assinatura / verificação */
.pub-card {
  width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow-lg); padding: 30px 28px;
  max-height: 92vh; overflow: auto;
}
/* o cartão público é claro — a marca não herda o branco do login-vidro */
.pub-card .login-brand { color: var(--heading); }
.pub-card .login-foot { color: var(--text-faint); }
.pub-note { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; color: var(--text-muted); }
.pub-note.pub-ok { border-color: var(--green); color: var(--green); background: rgba(16,185,129,.08); font-weight: 700; }
.pub-note.pub-bad { border-color: var(--red); color: var(--red); background: rgba(239,68,68,.08); font-weight: 700; }
.pub-consent { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--text-muted); line-height: 1.4; cursor: pointer; }
.pub-consent input { margin-top: 2px; accent-color: var(--gold); width: 16px; height: 16px; flex: 0 0 auto; }

/* ===== Lista densa de processos =====
   Com 1.099 processos reais, o cartão de 130px gerava uma página de 185.000px
   (~50 telas) e mil nós no DOM. A linha de ~48px mostra ~20 por tela, e a
   lista passa a ser paginada. O cartão (.proc-card) continua no detalhe do
   cliente, onde são poucos registros. */
.proc-tabela { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.proc-linha {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-top: 1px solid var(--border); cursor: pointer; color: inherit;
  transition: background .12s;
}
.proc-linha:first-child { border-top: none; }
.proc-linha:hover { background: var(--surface-2); }
.proc-linha.selecionado { background: var(--copper-tint); }
.proc-linha .pl-main { flex: 1; min-width: 0; }
.proc-linha .pl-partes {
  font-size: 13px; font-weight: 600; color: var(--heading);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.proc-linha .pl-sub {
  font-size: 11.5px; color: var(--text-muted); margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Colunas fixas: etapa e assuntos não espremem mais (antes a etiqueta de UF
   quebrava em três linhas e a da etapa esticava a linha inteira). */
.proc-linha {
  display: grid; align-items: center; column-gap: 10px;
  grid-template-columns: 16px 8px minmax(0, 1fr) 150px minmax(0, 300px) 100px;
  grid-template-areas: "chk dot main etapa tags datas";
}
.proc-linha .proc-check { grid-area: chk; position: static; margin: 0; opacity: .35; }   /* no cartão ela é absoluta; na linha ia parar no canto da tela */
.proc-linha:hover .proc-check, .proc-linha .proc-check:checked { opacity: 1; }
.proc-linha .status-dot { grid-area: dot; }
.proc-linha .pl-main { grid-area: main; }
.proc-linha .pl-etapa { grid-area: etapa; }
.proc-linha .pl-tags { grid-area: tags; display: flex; gap: 4px; min-width: 0; overflow: hidden; flex-wrap: nowrap;
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.proc-linha .pl-tags .tag { flex: 0 0 auto; white-space: nowrap; font-size: 11.5px; }
.proc-linha .pl-etapa .pill { display: inline-block; }
.proc-linha .pl-datas { grid-area: datas; text-align: right; font-size: 11px; color: var(--text-muted); }
.proc-linha .pl-datas b { display: block; font-size: 11.5px; font-weight: 600; color: var(--text); }
.proc-linha.proc-cab { cursor: default; background: var(--surface-2); padding-top: 7px; padding-bottom: 7px;
  font-size: 10.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.proc-linha.proc-cab:hover { background: var(--surface-2); }
.proc-linha.proc-cab .pl-tags { -webkit-mask-image: none; mask-image: none; }
@media (max-width: 1100px) {
  .proc-linha { grid-template-columns: 16px 8px minmax(0, 1fr) 150px 100px; grid-template-areas: "chk dot main etapa datas"; }
  .proc-linha .pl-tags { display: none; }
}
@media (max-width: 720px) {
  /* celular: etapa e prazo empilhados à direita do nome */
  .proc-linha { grid-template-columns: 16px 8px minmax(0, 1fr) auto; grid-template-areas: "chk dot main etapa" "chk dot main datas"; row-gap: 3px; }
  .proc-linha .pl-etapa .pill { font-size: 10px; padding: 3px 8px; }
  .proc-linha.proc-cab { display: none; }
}

/* barra de filtros que acompanha a rolagem — com lista longa, voltar ao topo
   só para buscar era um pedágio */
.toolbar.fixa {
  position: sticky; top: 0; z-index: 5; background: var(--bg);
  padding: 10px 0; margin-bottom: 0;
}

/* paginação */
.paginacao { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 0 4px; }
.paginacao button {
  min-width: 36px; height: 36px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 13px; cursor: pointer;
}
.paginacao button:hover:not(:disabled) { border-color: var(--border-strong); background: var(--surface-2); }
.paginacao button:disabled { opacity: .45; cursor: default; }
.paginacao .atual { font-size: 13px; color: var(--text-muted); padding: 0 6px; }

/* ===== Sino unificado — notificações da topbar (canvas Explorações) ===== */
.sino-overlay { position: fixed; inset: 0; z-index: 110; }
.sino-panel {
  position: absolute; top: 58px; right: 16px; width: 400px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  overflow: hidden; display: flex; flex-direction: column; max-height: min(640px, 84vh);
}
.sino-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--surface-2); }
.sino-head b { font-size: 14px; font-weight: 600; color: rgba(2,8,23,.8); }
[data-theme="dark"] .sino-head b { color: rgba(248,250,252,.8); }
.sino-head button { border: none; background: none; font-family: inherit; font-size: 12px; color: var(--text-muted); cursor: pointer; }
.sino-head button:hover { color: var(--gold); }
.sino-corpo { padding: 8px 8px 4px; overflow-y: auto; }
.sino-sec { font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--text-faint); padding: 6px 10px 2px; text-transform: uppercase; }
.sino-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 8px; }
.sino-item.clicavel { cursor: pointer; }
.sino-item.clicavel:hover { background: var(--surface-2); }
.sino-item .dot { width: 8px; height: 8px; border-radius: 999px; flex: 0 0 8px; margin-top: 5px; }
.sino-item .tt { font-size: 13px; font-weight: 600; color: var(--heading); }
.sino-item .ss { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.sino-item .quando { font-size: 10px; color: var(--text-faint); white-space: nowrap; }
.sino-acoes { display: flex; gap: 6px; margin-top: 6px; }
.sino-acoes .btn-conf { width: auto; padding: 4px 9px; font-size: 11px; }
.sino-vazio { padding: 24px; text-align: center; color: var(--text-faint); font-size: 12.5px; }
.sino-foot { padding: 10px 16px; border-top: 1px solid var(--surface-2); text-align: center; }
.sino-foot a { font-size: 12.5px; font-weight: 600; color: var(--gold); }

/* ===== Busca global (Ctrl+K) — paleta de comando do canvas ===== */
.bsc-overlay {
  position: fixed; inset: 0; background: rgba(2,8,23,.55); backdrop-filter: blur(3px);
  z-index: 120; display: flex; justify-content: center; align-items: flex-start; padding: 72px 16px 16px;
}
.bsc {
  width: 100%; max-width: 640px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 25px 50px -12px rgba(0,0,0,.35); overflow: hidden;
  display: flex; flex-direction: column; max-height: min(560px, 80vh);
}
.bsc-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.bsc-head .ico { color: var(--text-faint); font-size: 16px; }
.bsc-head input { flex: 1; border: none; outline: none; background: transparent; font-family: inherit; font-size: 15px; color: var(--text); }
.bsc-kbd { font-size: 10px; font-weight: 700; color: var(--text-muted); border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px; background: var(--surface-2); }
.bsc-corpo { padding: 8px; overflow-y: auto; }
.bsc-sec { font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--text-faint); padding: 8px 10px 4px; text-transform: uppercase; }
.bsc-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 8px; cursor: pointer; min-height: 44px; }
.bsc-item.sel, .bsc-item:hover { background: var(--surface-2); }
.bsc-item .dot { width: 8px; height: 8px; border-radius: 999px; flex: 0 0 8px; }
.bsc-item .miolo { flex: 1; min-width: 0; }
.bsc-item .tt { font-size: 13.5px; font-weight: 600; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bsc-item .tt b { background: var(--copper-tint); font-weight: 600; border-radius: 3px; }
.bsc-item .ss { font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bsc-item .ava { width: 26px; height: 26px; border-radius: 999px; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; flex: 0 0 26px; }
.bsc-vazio { padding: 26px; text-align: center; color: var(--text-faint); font-size: 13px; }
.bsc-foot { display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-faint); }
.bsc-foot b { color: var(--text-muted); }

/* toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--toast-bg, var(--sidebar)); color: #fff;
  padding: 14px 20px; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 200;
  font-weight: 600; font-size: 13.5px; display: flex; gap: 10px; align-items: center;
  animation: slideup .25s ease;
}
.toast-erro { background: #7f1d1d; box-shadow: 0 10px 30px rgba(127, 29, 29, .35); }
@keyframes slideup { from { transform: translateY(12px); opacity: 0; } }

.skeleton { background: linear-gradient(90deg,var(--surface-2),var(--border),var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ===== Calendário (extra) ===== */
/* Barra do calendário medida no app real: Hoje/setas à esquerda, mês 20/600
   navy capitalizado ao centro, alternador de visão à direita (trilho branco
   com fio, ativa slate-200/80 12/500). */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.cal-toolbar h2 { font-size: 20px; font-weight: 600; color: var(--navy); }
/* .seg (controle segmentado) é definido uma única vez em "Tabs" — medido no Financeiro real */
.cal-toolbar .seg { margin-bottom: 0; background: var(--surface); border: 1px solid var(--border); }
.cal-toolbar .seg-btn { font-size: 12px; padding: 5px 12px; }
.cal-toolbar .seg-btn.active { background: rgba(226,232,240,.8); color: #0f172a; box-shadow: none; }
[data-theme="dark"] .cal-toolbar .seg-btn.active { background: #334155; color: var(--text); }
.btn-hoje { height: 36px; padding: 0 12px; border-radius: 6px; font-size: 14px; font-weight: 500; }
.btn-cal-novo {
  height: 40px; padding: 0 16px; border: none; border-radius: 6px; background: #2563eb; color: #fff;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 4px 6px -1px rgba(59,130,246,.2), 0 2px 4px -2px rgba(59,130,246,.2);
}
.btn-cal-novo:hover { background: #1d4ed8; }
.cal-title-chip { width: 40px; height: 40px; border-radius: 8px; background: #dbeafe; color: #2563eb; display: grid; place-items: center; font-size: 18px; flex: 0 0 40px; }
[data-theme="dark"] .cal-title-chip { background: rgba(37,99,235,.2); color: #7ab3f7; }
/* barras sólidas medidas no app real: vermelho #ef4444 e slate #64748b;
   as demais cores seguem a mesma linguagem (sólida + texto branco) */
.cal-ev.ev-red { background: #ef4444; }
.cal-ev.ev-blue { background: #3b82f6; }
.cal-ev.ev-green { background: #10b981; }
.cal-ev.ev-gray { background: #64748b; }
.cal-ev.clicavel { cursor: pointer; }
.cal-ev.clicavel:hover { filter: brightness(1.08); }
.cal-ev.ev-amber { background: #f59e0b; }
.cal-ev.ev-violet { background: #8b5cf6; }
.cal-ev.ev-gold { background: var(--rose-gold); }
[data-theme="dark"] .cal-ev.ev-gold { color: #e6c789; }
[data-theme="dark"] .cal-ev.ev-amber { color: #fbbf24; }
[data-theme="dark"] .cal-ev.ev-red { color: #fca5a5; }
[data-theme="dark"] .cal-ev.ev-blue { color: #93c5fd; }
[data-theme="dark"] .cal-ev.ev-green { color: #6ee7b7; }
/* medido: "+ Ver Mais" 13/600 azul #1a73e8 */
.cal-more { font-size: 13px; font-weight: 600; color: #1a73e8; margin-top: 3px; cursor: pointer; }
[data-theme="dark"] .cal-more { color: #7ab3f7; }

/* ===== Calendário unificado (protótipo do canvas, ago/2026) =====
   Legenda de tipos, chip de entrega (⚑, contorno violeta) e trilho "Hoje"
   com as ações de Prazos/Audiências/Tarefas + resumo + triagem. */
.cal-legend { display: flex; align-items: center; gap: 16px; font-size: 11px; color: var(--text-muted); margin: -4px 0 12px; flex-wrap: wrap; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 8px; height: 8px; border-radius: 9999px; display: inline-block; }
.cal-ev.ev-entrega { background: rgba(139,92,246,.12); color: #6d28d9; border: 1px solid rgba(139,92,246,.3); }
.cal-ev.ev-entrega::before { display: none; }
[data-theme="dark"] .cal-ev.ev-entrega { color: #c4b5fd; }
.cal-main { display: flex; gap: 14px; align-items: flex-start; }
.cal-main > .card { min-width: 0; max-width: 100%; }   /* no celular o cartão crescia até o conteúdo e a Agenda rolava de lado */
.cal-rail { flex: 0 0 340px; width: 340px; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.rail-list { flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.rail-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.rail-item.ri-prazo { border-left: 3px solid var(--red); }
.rail-item.ri-aud { border-left: 3px solid #3b82f6; }
.rail-item.ri-tarefa { border-left: 3px solid #8b5cf6; }
.ri-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ri-t { font-size: 13.5px; font-weight: 600; color: var(--heading); }
.ri-selo { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 9999px; white-space: nowrap; }
.ri-selo.late { background: rgba(239,68,68,.1); color: #b91c1c; }
.ri-selo.aud { background: rgba(59,130,246,.1); color: #1d4ed8; }
.ri-selo.and { background: rgba(245,158,11,.12); color: #b45309; }
.ri-selo.afazer { background: var(--surface-2); color: var(--text-muted); }
[data-theme="dark"] .ri-selo.late { color: #fca5a5; }
[data-theme="dark"] .ri-selo.aud { color: #93c5fd; }
[data-theme="dark"] .ri-selo.and { color: #fbbf24; }
.ri-meta { font-size: 11.5px; color: var(--text-muted); }
.ri-acoes { display: flex; gap: 6px; }
.ri-acoes .btn-conf { width: auto; padding: 5px 10px; }
.rail-triagem { border: 1px dashed rgba(245,158,11,.5); background: rgba(245,158,11,.05); border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rail-triagem .tt { font-size: 12.5px; font-weight: 600; color: #b45309; }
.rail-triagem .ts { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.rail-triagem button { border: 1px solid rgba(245,158,11,.4); background: none; color: #b45309; font-size: 12px; font-weight: 500; padding: 5px 10px; border-radius: 8px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.rail-triagem button:hover { background: rgba(245,158,11,.1); }
[data-theme="dark"] .rail-triagem .tt, [data-theme="dark"] .rail-triagem button { color: #fbbf24; }
.rail-resumo { border-top: 1px solid var(--border); padding: 12px 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rail-resumo b { font-size: 18px; font-weight: 700; color: var(--heading); line-height: 1; display: block; }
.rail-resumo span { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); }
@media (max-width: 1100px) { .cal-main { flex-direction: column; align-items: stretch; } .cal-rail { width: 100%; flex-basis: auto; } }

/* ===== Agenda no celular (canvas Explorações): o trilho "Hoje" é a tela =====
   No telefone o caso de uso é corredor de fórum: as ações do dia vêm
   PRIMEIRO (trilho antes da grade), botões com alvo de 44px, alternador de
   visão em largura total e um botão flutuante de novo item sobre a barra
   inferior. Nada de barra de status falsa — o aparelho desenha a dele. */
.fab-novo { display: none; }
@media (max-width: 720px) {
  .cal-rail { order: -1; }
  .ri-acoes { gap: 8px; }
  .ri-acoes .btn-conf { flex: 1; justify-content: center; min-height: 44px; font-size: 13px; }
  .rail-triagem button { min-height: 44px; }
  .cal-toolbar .seg { width: 100%; display: flex; }
  .cal-toolbar .seg .seg-btn { flex: 1; justify-content: center; }
}
@media (max-width: 560px) {
  .fab-novo {
    display: grid; place-items: center; position: fixed; right: 16px; bottom: 76px; z-index: 90;
    width: 56px; height: 56px; border-radius: 999px; border: none; cursor: pointer;
    background: #2563eb; color: #fff; font-size: 26px;
    box-shadow: 0 8px 18px rgba(37,99,235,.4);
  }
}

/* ===== Intimações — badges por tribunal ===== */
.uf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; flex: 1; }
.uf-badge {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 10px; font-weight: 700; font-size: 12px; color: var(--text-muted); cursor: pointer; font-family: inherit;
}
.uf-badge:hover { border-color: var(--gold); color: var(--text); }
.uf-badge.active { background: var(--grad); color: #fff; border-color: transparent; }
.uf-n { background: rgba(0,0,0,.08); border-radius: 20px; padding: 1px 7px; font-size: 11px; }
.uf-badge.active .uf-n { background: rgba(255,255,255,.25); }

/* ===== Banner de aviso ===== */
.banner-warn {
  display: flex; gap: 12px; align-items: flex-start; background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.3); border-radius: var(--radius); padding: 16px 18px; font-size: 13px; line-height: 1.5;
}
.bw-ico { color: var(--amber); font-size: 18px; }

/* ===== Credenciais ===== */
.cred-card { overflow: hidden; }
.cred-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 16px 18px; background: transparent; border: none; cursor: pointer; font-family: inherit; text-align: left; }
.cred-key { color: var(--gold); font-size: 15px; }
.cred-name { font-weight: 700; font-size: 13.5px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.cred-verified { color: var(--green); font-size: 12px; }
.cred-sys { font-size: 10px; font-weight: 800; letter-spacing: .05em; color: var(--text-muted); background: var(--surface-2); border-radius: 6px; padding: 3px 8px; }
.cred-chev { color: var(--text-faint); font-size: 14px; }
.cred-body { display: none; padding: 4px 18px 16px; border-top: 1px solid var(--border); }
.cred-line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; }
.cred-line .lbl { color: var(--text-faint); text-transform: uppercase; font-size: 10px; letter-spacing: .06em; font-weight: 700; }
.cred-line .mask { letter-spacing: .12em; color: var(--text-muted); }

/* ===== Membros / linhas de config ===== */
.member-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--border); }
.member-row:first-child { border-top: none; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; border-top: 1px solid var(--border); font-weight: 600; cursor: pointer; }
.switch { width: 40px; height: 22px; border-radius: 20px; background: var(--border-strong); position: relative; transition: background .15s; flex: 0 0 40px; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch.on { background: var(--green); }
.switch.on::after { left: 20px; }
.switch[data-toggle] { cursor: pointer; }

/* ===== Configurações (refino) ===== */
/* ===== Configurações — medido no app real =====
   Título de cartão 20/600 quase-preto; abas em trilho shadcn (h-10,
   slate-100/50 com fio, ativa branca com texto blue-700 e shadow-sm);
   botões de ação azul-600; membro com avatar navy 36px raio 8;
   Admin em pílula âmbar 10/600, status em pílula de contorno 12/400. */
.cfg-h { font-size: 20px; font-weight: 600; color: var(--heading); }
.cfg-track { display: flex; width: fit-content; max-width: 100%; height: 40px; align-items: center; background: rgba(241,245,249,.5); border: 1px solid var(--border); border-radius: 6px; padding: 4px; margin-bottom: 16px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.cfg-track::-webkit-scrollbar { display: none; }
.cfg-tab { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: 0 0 auto; padding: 6px 12px; border-radius: 4px; font-size: 14px; font-weight: 500; color: var(--text-muted); cursor: pointer; }
.cfg-tab.active { background: var(--surface); color: #1d4ed8; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
[data-theme="dark"] .cfg-track { background: rgba(255,255,255,.04); }
[data-theme="dark"] .cfg-tab.active { background: #1e293b; color: #93c5fd; }
.btn-blue { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: none; border-radius: 6px; background: #2563eb; color: #fff; font-size: 14px; font-weight: 500; font-family: inherit; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: background .15s; }
.btn-blue:hover { background: #1d4ed8; }
.member-ava { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 8px; background: #1E3E6A; color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.pill-admin { display: inline-flex; align-items: center; gap: 4px; background: #fef3c7; color: #b45309; border: 1px solid #fde68a; border-radius: 9999px; padding: 2px 10px; font-size: 10px; font-weight: 600; }
[data-theme="dark"] .pill-admin { background: rgba(180,83,9,.15); border-color: rgba(253,230,138,.3); color: #fbbf24; }
.pill-status { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border); background: rgba(248,250,252,.5); color: var(--text-muted); border-radius: 9999px; padding: 2px 10px; font-size: 12px; font-weight: 400; }
.pill-status .ok { color: #10b981; }
[data-theme="dark"] .pill-status { background: rgba(255,255,255,.03); }

.team-card { display: block; width: 100%; text-align: left; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; font-family: inherit; color: var(--text); }
.team-card:hover { border-color: var(--gold); }
.perm-row { padding: 12px 0; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--text-muted); line-height: 1.5; }
.perm-row:first-of-type { border-top: none; }
.perm-row b { color: var(--text); }

.etq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.etq-card { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: var(--radius-sm); padding: 14px 14px; font-weight: 700; font-size: 13px; box-shadow: var(--shadow); }
.etq-ico { font-size: 15px; }
.etq-del { border: none; background: transparent; color: var(--text-faint); cursor: pointer; font-size: 13px; padding: 2px 6px; border-radius: 6px; opacity: 0; transition: opacity .12s; }
.etq-card:hover .etq-del { opacity: 1; }
.etq-del:hover { background: rgba(239,68,68,.12); color: var(--red); }

/* color swatches (modal Nova Etiqueta) */
.swatch-row { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 30px; height: 30px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch.sel { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }

.sys-item { border-top: 1px solid var(--border); }
.sys-item:first-child { border-top: none; }
.sys-item.open { background: var(--surface-2); border-radius: var(--radius-sm); margin: 4px 0; border-top-color: transparent; }
.sys-row { display: flex; align-items: center; gap: 12px; padding: 13px 8px; width: 100%; background: transparent; border: none; cursor: pointer; font-family: inherit; font-size: 14px; color: var(--text); }
.sys-row:hover { background: var(--surface-2); border-radius: var(--radius-sm); }
.sys-key { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-faint); font-size: 13px; flex: 0 0 26px; }
.sys-key.on { background: rgba(16,185,129,.14); color: var(--green); }
.sys-chev { color: var(--text-faint); font-size: 13px; width: 16px; text-align: center; }
.sys-form { padding: 4px 16px 18px; }
.sys-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 720px) { .sys-form-grid { grid-template-columns: 1fr; gap: 16px; } }
.toggle-inline { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13px; cursor: pointer; }

.cert-card { display: flex; align-items: center; gap: 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
.cert-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--copper-tint); color: var(--gold); display: grid; place-items: center; font-size: 22px; flex: 0 0 46px; }

.mcp-url { display: flex; align-items: center; gap: 10px; margin-top: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.mcp-url code { font-family: ui-monospace, "Cascadia Code", monospace; font-size: 12.5px; color: var(--gold); word-break: break-all; }

.tt-head { display: flex; align-items: center; gap: 14px; padding: 8px 4px; font-size: 10px; letter-spacing: .06em; font-weight: 800; color: var(--text-faint); border-bottom: 1px solid var(--border); }
.tt-head span:not(:first-child) { width: 76px; text-align: center; }
.tt-row { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-top: 1px solid var(--border); }
.tt-row:first-of-type { border-top: none; }
.tt-pts { width: 76px; text-align: center; font-weight: 800; color: var(--gold); }
.tt-active { width: 76px; display: flex; justify-content: center; }

/* ===== Calendário — semana / dia / lista ===== */
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-day { display: flex; flex-direction: column; }
.cal-hour { display: flex; gap: 14px; border-top: 1px solid var(--border); min-height: 44px; padding: 6px 0; }
.cal-hour:first-child { border-top: none; }
.cal-hlabel { flex: 0 0 54px; color: var(--text-faint); font-size: 12px; font-weight: 700; padding-top: 2px; }
.cal-hslot { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
@media (max-width: 720px) { .cal-week { grid-template-columns: 1fr; } }
.cal-week .cal-cell { min-height: 280px; }

/* Agenda enquadrada: no computador (painel lateral ao lado, janela com altura
   útil) a Agenda ocupa exatamente a área visível, sem rolar a página. No mês
   as semanas dividem a altura e cada dia mostra quantos eventos cabem — o resto
   vira "+N mais" (ajustarMes, em app.js). Semana, Dia e Lista rolam dentro do
   cartão; o painel lateral rola sozinho. Celular e janelas baixas: como antes. */
@media (min-width: 1101px) and (min-height: 600px) {
  .view:has(> .agenda-quadro) { overflow: hidden; padding-bottom: 16px; }
  .agenda-quadro { height: 100%; display: flex; flex-direction: column; }
  .agenda-quadro > .card { flex: 0 0 auto; }
  .agenda-quadro .cal-main { flex: 1; min-height: 0; align-items: stretch; }
  .agenda-quadro .cal-main > .card:first-child { display: flex; flex-direction: column; min-height: 0; }
  .agenda-quadro .cal-corpo { flex: 1; min-height: 0; overflow: auto; }
  .agenda-quadro .cal-wrap { height: 100%; }
  .agenda-quadro .cal { height: 100%; grid-template-rows: auto; grid-auto-rows: minmax(64px, 1fr); }
  .agenda-quadro .cal-cell { min-height: 0; overflow: hidden; }
  .agenda-quadro .cal-week { height: 100%; }
  .agenda-quadro .cal-week .cal-cell { min-height: 0; overflow-y: auto; }
  .agenda-quadro .cal-rail { max-height: 100%; }
  .agenda-quadro .rail-list { min-height: 0; overflow-y: auto; }
}

/* ===== Novas Movimentações ===== */
.mov-detail { display: none; }
.mov-detail.open, .mov-detail[style*="block"] { display: block; }

/* ===== Solicitações ===== */
.sol-ico { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ============================================================
   Refinamentos de fidelidade JusBoard — cobre/navy, elevação e detalhes
   ============================================================ */
/* elevação suave em cards/painéis ao passar o mouse */
.panel, .card { transition: box-shadow .18s ease, border-color .18s ease; }
.panel:hover, .card:hover { box-shadow: var(--shadow-md); }

/* scrollbar da área principal (discreta, adapta ao tema) */
.view::-webkit-scrollbar { width: 12px; }
.view::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 3px solid var(--bg); background-clip: padding-box; }
.view::-webkit-scrollbar-thumb:hover { background: var(--text-faint); background-clip: padding-box; }

/* títulos/valores em azul-marinho (identidade JusBoard) */
.dl-date b, .client-card b, .client-card strong, .detail-name, .fin-big,
.stat-num, .cred-title, .team-card b { color: var(--heading); }

/* acento cobre à esquerda para cards de destaque */
.card-accent { border-left: 4px solid var(--rose-gold); }

/* chip de contagem (ex.: "6 Arquivados") no padrão cobre */
.count-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--copper-tint);
  color: var(--gold); font-weight: 800; font-size: 12px; padding: 4px 11px; border-radius: 20px; }

/* foco de acessibilidade consistente */
.btn:focus-visible, .icon-btn:focus-visible, .nav-link:focus-visible { outline: 2px solid var(--rose-gold); outline-offset: 2px; }

/* ============================================================
   Audiências — réplica fiel do JusBoard
   ============================================================ */
/* cabeçalho medido: chip p-2 navy/10 + título 30/700 navy + subtítulo leve */
.aud-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.aud-head-ico {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(30,62,106,.1); color: var(--navy); font-size: 18px;
}
.aud-head h1 { font-size: 30px; font-weight: 700; letter-spacing: -.025em; color: var(--navy); }
.aud-head .page-sub { font-weight: 300; }

/* pílulas de filtro */
.aud-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 12px; align-items: center; }
/* medido: px-3 py-1.5 rounded-lg text-xs font-semibold; ativa bg-slate-900 */
.aud-pill {
  display: inline-flex; align-items: center; gap: 6px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px;
  font-size: 12px; font-weight: 600; cursor: pointer; color: var(--heading);
  transition: border-color .15s, box-shadow .15s;
}
.aud-pill:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.aud-pill .n {
  font-size: 11px; font-weight: 800; background: var(--surface-2); color: var(--text-muted);
  border-radius: 6px; padding: 2px 7px; min-width: 22px; text-align: center;
}
.aud-pill.is-atrasadas { color: var(--red); }
.aud-pill.is-realizadas { color: #059669; }
.aud-pill.active { background: #0f172a; border-color: #0f172a; color: #fff; }
.aud-pill.active .n { background: rgba(255,255,255,.16); color: #fff; }
[data-theme="dark"] .aud-pill.active { background: #e2e8f0; border-color: #e2e8f0; color: #0f172a; }
[data-theme="dark"] .aud-pill.active .n { background: rgba(15,23,42,.14); color: #0f172a; }
.aud-note { display: inline-flex; align-items: center; gap: 6px; color: #ef4444; font-size: 11px; font-weight: 500; }
.aud-note::before { content: "●"; font-size: 9px; }

/* barra de busca / período / responsável */
.aud-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.aud-search { position: relative; flex: 1 1 320px; max-width: 420px; }
.aud-search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 14px; }
.aud-search input {
  width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px 10px 34px;
  font-family: inherit; font-size: 13.5px; background: var(--surface); color: var(--text);
}
.aud-search input:focus { outline: none; border-color: var(--rose-gold); box-shadow: 0 0 0 3px var(--ring); }
.aud-select { position: relative; flex: 0 0 240px; }
.aud-select select {
  width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px 10px 34px;
  font-family: inherit; font-size: 13.5px; font-weight: 600; background: var(--surface); color: var(--text); cursor: pointer;
}
.aud-select .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 14px; pointer-events: none; }

/* cabeçalho de grupo */
.aud-group {
  display: flex; align-items: center; gap: 9px; margin: 22px 0 12px;
  font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
}
.aud-group .c { letter-spacing: normal; font-weight: 700; opacity: .8; }
.aud-group::after { content: ""; flex: 1; height: 1px; background: var(--border); margin-left: 4px; }
.aud-group.g-atrasadas { color: var(--red); }
.aud-group.g-pendentes { color: var(--heading); }
.aud-group.g-realizadas { color: #059669; }

/* card de audiência */
.aud-list { display: flex; flex-direction: column; gap: 12px; }
.aud-card {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border-strong);
  border-radius: 12px; padding: 14px 16px; display: block; color: inherit;
  transition: box-shadow .18s, border-color .18s;
}
.aud-card:hover { box-shadow: var(--shadow-md); }
.aud-card.a-atrasada { border-left-color: var(--red); }
.aud-card.a-pendente { border-left-color: var(--blue); }
.aud-card.a-realizada { border-left-color: #059669; }
/* linha 1: horário + título + selo + data (à direita) — como no original */
.aud-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 7px; }
.aud-time {
  display: inline-flex; align-items: center; gap: 5px; background: var(--surface-2);
  border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 700; color: var(--heading); flex: 0 0 auto;
}
.aud-card.a-atrasada .aud-time { background: rgba(239,68,68,.10); color: var(--red); }
.aud-date { margin-left: auto; color: var(--text-faint); font-size: 11px; font-weight: 400; flex: 0 0 auto; }
.aud-title {
  font-size: 14px; font-weight: 600; color: var(--text); font-family: inherit;
  background: none; border: none; padding: 0; cursor: pointer; text-align: left; transition: color .15s;
}
.aud-title:hover { color: var(--rose-gold); }

/* ===== Detalhe da audiência (modal de dois painéis) ===== */
.adt-modal { max-width: 900px; display: flex; align-items: stretch; padding: 0; overflow: hidden; }
.adt-main { flex: 1.55; min-width: 0; padding: 22px; display: flex; flex-direction: column; gap: 13px; max-height: 86vh; overflow: auto; }
.adt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.adt-head h3 { font-size: 14px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--heading); }
.adt-status { font-size: 10px; font-weight: 800; text-transform: uppercase; border-radius: 6px; padding: 4px 9px; }
.adt-status.late { background: #fee2e2; color: #b91c1c; }
.adt-status.ok { background: #ecfdf5; color: #059669; }
.adt-status.soon { background: rgba(42,84,148,.10); color: var(--blue); }
.adt-box { background: var(--surface-2); border-radius: 10px; padding: 14px; }
.adt-partes { font-size: 11.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .02em; }
.adt-partes .x { color: var(--text-faint); margin: 0 4px; }
.adt-proc { font-size: 13px; color: var(--text-muted); margin-top: 7px; }
.adt-proc b { color: var(--heading); font-family: ui-monospace, monospace; font-size: 12.5px; }
.adt-proc a { color: var(--rose-gold); font-weight: 800; margin-left: 4px; }
.adt-desc { font-size: 11.5px; color: var(--text-faint); font-style: italic; margin-top: 6px; }
.adt-foot { display: flex; gap: 10px; align-items: center; margin-top: auto; padding-top: 6px; }
.adt-del {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; cursor: pointer; font-size: 15px;
  background: var(--surface); border: 1px solid var(--border); color: var(--red);
}
.adt-del:hover { background: rgba(239,68,68,.08); border-color: var(--red); }
.adt-save { flex: 1; justify-content: center; text-transform: uppercase; letter-spacing: .04em; }
.adt-side { flex: 1; min-width: 0; border-left: 1px solid var(--border); background: var(--bg); display: flex; flex-direction: column; max-height: 86vh; }
.adt-side-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px; }
.adt-side-head b { font-size: 13px; color: var(--heading); }
.adt-side-body { flex: 1; overflow: auto; padding: 4px 14px 10px; }
.adt-vazio { text-align: center; color: var(--text-faint); font-size: 12.5px; padding: 40px 10px; }
.adt-vazio .ico { font-size: 26px; opacity: .45; margin-bottom: 8px; }
.adt-cmt { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: 12.5px; }
.adt-cmt-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.adt-cmt-top b { color: var(--heading); font-size: 12px; }
.adt-cmt-top span { color: var(--text-faint); font-size: 10.5px; }
.adt-side-foot { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); }
.adt-side-foot input {
  flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px;
  font-family: inherit; font-size: 12.5px; background: var(--surface); color: var(--text);
}
.adt-side-foot input:focus { outline: none; border-color: var(--rose-gold); box-shadow: 0 0 0 3px var(--ring); }
@media (max-width: 780px) {
  .adt-modal { flex-direction: column; max-height: 90vh; overflow: auto; }
  .adt-side { border-left: none; border-top: 1px solid var(--border); }
}
.aud-badge {
  display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  border-radius: 6px; padding: 2px 6px; flex: 0 0 auto;
  background: #fee2e2; color: #b91c1c;
}
.aud-badge.b-futuro { background: rgba(42,84,148,.10); color: var(--blue); }
.aud-badge.b-ok { background: #ecfdf5; color: #059669; }
.aud-num { display: inline-block; font-family: ui-monospace, "Cascadia Code", monospace; font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }
.aud-num:hover { color: var(--rose-gold); }
.aud-num b { color: var(--text-faint); font-weight: 700; font-family: inherit; }
.aud-parties { color: var(--text-faint); font-size: 12px; margin-bottom: 10px; }
[data-theme="dark"] .aud-badge { background: rgba(239,68,68,.18); color: #fca5a5; }
.aud-foot { display: flex; align-items: center; gap: 8px; padding-top: 11px; border-top: 1px solid var(--border); min-width: 0; }
.aud-foot .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aud-foot .meta:last-of-type { flex: 1 1 auto; min-width: 0; }
.aud-ava {
  width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; display: grid; place-items: center;
  background: #eadbd7; color: #64352b; font-size: 9px; font-weight: 800;
}
.aud-foot .meta { color: var(--text-faint); font-size: 11px; }
.aud-foot .sep { color: var(--border-strong); flex: 0 0 auto; }
.aud-done {
  margin-left: auto; flex: 0 0 auto; border: none; border-radius: 8px; padding: 5px 11px; cursor: pointer;
  font-family: inherit; font-size: 10px; font-weight: 700; background: #ecfdf5; color: #059669;
}
.aud-done:hover { filter: brightness(.97); }
.aud-done.undo { background: var(--surface-2); color: var(--text-muted); }
[data-theme="dark"] .aud-badge.b-ok, [data-theme="dark"] .aud-done { background: rgba(5,150,105,.16); }

/* ===== Prazos — mesmo sistema visual da tela real ===== */
.aud-card.p-atrasados { border-left-color: var(--red); }
.aud-card.p-pendentes { border-left-color: var(--amber); }
.aud-card.p-concluidos { border-left-color: #059669; }
.prz-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.prz-title { font-size: 14px; font-weight: 600; color: var(--text); }
.prz-title:hover { color: var(--rose-gold); }
.prz-title.done { text-decoration: line-through; color: var(--text-faint); }
.prz-selo { font-size: 10px; font-weight: 700; }
.prz-selo.late { color: #b91c1c; }
.prz-selo.soon { color: #b45309; }
.prz-selo.ok { color: #059669; }
[data-theme="dark"] .prz-selo.late { color: #fca5a5; }
[data-theme="dark"] .prz-selo.soon { color: #fbbf24; }
.prz-btn {
  margin-left: auto; flex: 0 0 auto; cursor: pointer; font-family: inherit;
  font-size: 10px; font-weight: 700; border-radius: 8px; padding: 5px 11px;
  background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0;
}
.prz-btn:hover { filter: brightness(.97); }
.prz-btn.undo { background: var(--surface-2); color: var(--text-muted); border-color: var(--border); }
[data-theme="dark"] .prz-btn { background: rgba(5,150,105,.16); border-color: rgba(5,150,105,.35); }

/* ===== Área de Trabalho (dashboard) — 3 colunas como no original ===== */
.dash-cols { align-items: start; }
@media (max-width: 1180px) { .dash-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) { .dash-cols { grid-template-columns: 1fr; } }
.fin-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 6px 10px; }
.fin-mini-grid .kpi { padding: 12px; gap: 4px; }
.fin-mini-grid .kpi-label { font-size: 10px; letter-spacing: .05em; }
.fin-mini-grid .kpi-val { font-size: 17px; }
.fin-mini-grid .kpi-ico { display: none; }
.fin-proc-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 8px 8px; color: var(--text-muted); font-size: 12px; border-top: 1px solid var(--border); }
.fin-proc-line b { color: var(--heading); font-size: 14px; }
.fin-bar { height: 6px; border-radius: 6px; background: var(--surface-2); margin: 2px 8px 6px; overflow: hidden; }
.fin-bar span { display: block; height: 100%; border-radius: 6px; background: var(--green); }
.fin-bar-legend { display: flex; justify-content: space-between; padding: 0 8px 4px; color: var(--text-muted); font-size: 11px; }

/* KPI em destaque (navy escuro), como o "Total a Receber" do original */
.kpi-dark { background: var(--grad-navy); border: none; color: #fff; }
.kpi-dark .kpi-label { color: rgba(255,255,255,.8); }
.kpi-dark .kpi-val { color: #fff; }
.kpi-dark small { color: rgba(255,255,255,.75); }
.kpi-dark:hover { box-shadow: 0 10px 26px rgba(30,62,106,.32); }

/* ============================================================
   Responsivo da navegação — precisa vir por último para vencer
   as definições base de .sidebar-head / .org-card.
   ============================================================ */
/* Telas médias: a sidebar recolhe sozinha (senão engole o conteúdo). */
/* Telas médias (561–900px): a barra é sempre estreita, INDEPENDENTE de estar
   "fixa" — não cabe uma lateral de 288px aqui. Mas ela abre ao passar o mouse,
   como no modo recolhido. As regras que escondem os rótulos trazem
   `:not(:hover)`: sem isso a barra abria para 288px e ficava só com ícones,
   porque este bloco (mais específico que nada, mas incondicional) vencia
   enquanto o mouse estava em cima. */
@media (min-width: 561px) and (max-width: 900px) {
  #app .sidebar {
    position: absolute; top: 0; bottom: 0; left: 0; z-index: 60;
    width: var(--sidebar-w-collapsed); flex-basis: var(--sidebar-w-collapsed);
    transition: width .16s ease, box-shadow .16s ease;
  }
  #app .main { margin-left: var(--sidebar-w-collapsed); }
  #app .sidebar:hover { width: var(--sidebar-w); box-shadow: 10px 0 34px rgba(2,8,23,.32); }
  .sidebar:not(:hover) .brand-text,
  .sidebar:not(:hover) .org-info,
  .sidebar:not(:hover) .nav-link span:not(.ico),
  .sidebar:not(:hover) .nav-link .nav-txt,
  .sidebar:not(:hover) .nav-section-label,
  .sidebar:not(:hover) .nav-badge,
  .sidebar:not(:hover) .collapse-btn { display: none; }
  .sidebar:not(:hover) .org-card,
  .sidebar:not(:hover) .nav-link { justify-content: center; }
  .sidebar:not(:hover) .sidebar-head { justify-content: center; padding: 4px 0 12px; }
}
@media (max-width: 900px) {
  .view { padding: 18px 14px 48px; }
  .topbar { padding: 0 12px; }
}
/* Celular: a navegação vira uma barra inferior com ícones. */
@media (max-width: 560px) {
  #app { flex-direction: column; }
  .sidebar {
    width: 100%; flex: 0 0 auto; flex-direction: row; order: 2; align-items: center;
    padding: 4px 6px; gap: 2px; overflow-x: auto; overflow-y: hidden;
    border-right: none; border-top: 1px solid var(--sidebar-border);
  }
  .sidebar-head, .org-card { display: none !important; }
  .nav { flex-direction: row; gap: 2px; flex: 0 0 auto; }
  .nav-link { padding: 10px 12px; border-radius: 10px; }
  .nav-link .ico { font-size: 18px; }
  .nav-link.active::before { top: auto; bottom: 2px; left: 10px; right: 10px; width: auto; height: 3px; }
  .main { order: 1; flex: 1; min-height: 0; }
  .page-title { font-size: 22px; }
  .aud-head h1 { font-size: 24px; }
}

/* ============================================================
   Tema escuro — correções de contraste (vem por último de propósito)
   ============================================================ */
/* selo azul (Em N dias) mantém a semântica azul — antes herdava o vermelho */
[data-theme="dark"] .aud-badge.b-futuro { background: rgba(111,159,216,.18); color: #a8c8ec; }
[data-theme="dark"] .aud-badge.b-ok { background: rgba(5,150,105,.18); color: #6ee7b7; }
/* botões de ação verdes: o fundo era escurecido, mas o texto continuava escuro */
[data-theme="dark"] .aud-done,
[data-theme="dark"] .prz-btn { color: #6ee7b7; border-color: rgba(5,150,105,.35); }
[data-theme="dark"] .aud-done.undo,
[data-theme="dark"] .prz-btn.undo { color: var(--text-muted); border-color: var(--border); background: var(--surface-2); }
/* status do detalhe da audiência */
[data-theme="dark"] .adt-status.late { background: rgba(239,68,68,.18); color: #fca5a5; }
[data-theme="dark"] .adt-status.ok { background: rgba(5,150,105,.18); color: #6ee7b7; }
[data-theme="dark"] .adt-status.soon { background: rgba(111,159,216,.18); color: #a8c8ec; }
/* pílulas de status */
[data-theme="dark"] .pill-amber { background: rgba(245,158,11,.18); color: #fbbf24; }
[data-theme="dark"] .pill-green { background: rgba(16,185,129,.18); color: #6ee7b7; }
[data-theme="dark"] .prz-selo.ok { color: #6ee7b7; }
/* separador e tags ficavam quase invisíveis */
[data-theme="dark"] .aud-foot .sep { color: var(--text-faint); }
[data-theme="dark"] .tag.t-blue { background: rgba(111,159,216,.16); color: #a8c8ec; }
[data-theme="dark"] .tag.t-violet { background: rgba(217,70,239,.16); color: #e9a6f5; }
[data-theme="dark"] .tag.t-green { background: rgba(16,185,129,.16); color: #6ee7b7; }
[data-theme="dark"] .tag.t-amber { background: rgba(249,115,22,.16); color: #fdba74; }
[data-theme="dark"] .tag.t-red { background: rgba(239,68,68,.16); color: #fca5a5; }
/* superfícies internas */
[data-theme="dark"] .adt-box { background: rgba(255,255,255,.04); }
[data-theme="dark"] .aud-time { background: rgba(255,255,255,.06); }

/* ===== Intimações — card no padrão da tela real ===== */
.int-card {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--amber);
  border-radius: 12px; padding: 14px 16px; transition: box-shadow .18s, border-color .18s;
}
.int-card:hover { box-shadow: var(--shadow-md); }
.int-card.lida { border-left-color: var(--border-strong); }
.int-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.int-nova {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  background: var(--copper-tint); color: var(--gold); border-radius: 6px; padding: 2px 7px;
}
.int-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  background: var(--surface-2); color: var(--text-muted); border-radius: 6px; padding: 2px 7px;
}
.int-proc { font-family: ui-monospace, "Cascadia Code", monospace; font-size: 12px; color: var(--text-muted); }
.int-proc:hover { color: var(--rose-gold); }
.int-proc b { font-family: inherit; color: var(--text-faint); font-weight: 700; }
.int-data { margin-left: auto; font-size: 11px; color: var(--text-faint); }
.int-titulo { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.int-card.lida .int-titulo { color: var(--text-muted); }
.int-cols { display: grid; grid-template-columns: 1fr 1.6fr; gap: 14px; padding-bottom: 11px; border-bottom: 1px solid var(--border); }
@media (max-width: 640px) { .int-cols { grid-template-columns: 1fr; gap: 8px; } }
.int-lbl { font-size: 12px; font-weight: 600; color: var(--text-faint); letter-spacing: .6px; margin-bottom: 2px; }
.int-val { font-size: 12.5px; color: var(--text-muted); }
.int-acoes { display: flex; gap: 8px; justify-content: flex-end; padding-top: 10px; flex-wrap: wrap; }
.int-acoes .btn { padding: 6px 12px; font-size: 12px; }

/* ===== Agenda — filtros por tipo (equivalentes às seções) ===== */
.cal-filtros { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

/* Barra da Agenda numa linha só: filtros à esquerda; atrasados, pessoa e
   "+ Novo Evento" à direita. O título "Agenda" já está na barra superior —
   aqui fica só para leitores de tela. Quando não cabe, quebra em duas linhas. */
.so-leitor { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.view-inner.agenda-quadro { max-width: none; }   /* o calendário aproveita toda a largura */
.agenda-barra { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding: 10px 12px; margin-bottom: 14px; }
.agenda-barra .cal-filtros { margin: 0; padding: 0; border: 0; }
.agenda-barra-acoes { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-left: auto; }
.agenda-barra .select { padding-top: 7px; padding-bottom: 7px; max-width: 220px; }
.agenda-barra .btn-cal-novo { height: 34px; padding: 0 14px; font-size: 13px; box-shadow: none; }
.agenda-atraso { background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.agenda-atraso:hover { text-decoration: underline; }
@media (max-width: 720px) {
  /* Celular: filtros numa faixa que rola para o lado; pessoa e botão embaixo. */
  .agenda-barra { gap: 8px; }
  .agenda-barra .cal-filtros { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; scrollbar-width: none; }
  .agenda-barra .cal-filtros::-webkit-scrollbar { display: none; }
  .agenda-barra .cal-filtro { flex: 0 0 auto; }
  .agenda-barra-acoes { width: 100%; margin-left: 0; flex-wrap: nowrap; }
  .agenda-barra-acoes .select { flex: 1; min-width: 0; max-width: none; }
}
/* Pílula de filtro medida em Tarefas: px-3 py-1.5 rounded-lg 12/600 com fio;
   contador rounded-md 10px bold. A cor da ativa segue o acento da seção
   (dourado em Tarefas — modificador .gold; navy-escuro é o padrão). */
.cal-filtro {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-family: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--text-muted);
  transition: border-color .15s, box-shadow .15s, color .15s;
}
.cal-filtro:hover { border-color: var(--border-strong); box-shadow: var(--shadow); color: var(--text); }
.cal-filtro .n {
  font-size: 10px; font-weight: 800; background: var(--surface-2); color: var(--text-muted);
  border-radius: 6px; padding: 1px 6px; min-width: 20px; text-align: center;
}
.cal-filtro.active { background: #0f172a; border-color: #0f172a; color: #fff; }
.cal-filtro.active .n { background: rgba(255,255,255,.16); color: #fff; }
.cal-filtro.gold.active { background: #C9A055; border-color: #C9A055; color: #fff; }
.cal-filtro.gold.active .n { background: rgba(255,255,255,.2); color: #fff; }
[data-theme="dark"] .cal-filtro.active { background: #e2e8f0; border-color: #e2e8f0; color: #0f172a; }
[data-theme="dark"] .cal-filtro.active .n { background: rgba(15,23,42,.14); color: #0f172a; }
[data-theme="dark"] .cal-filtro.gold.active { background: #C9A055; border-color: #C9A055; color: #fff; }
[data-theme="dark"] .cal-filtro.gold.active .n { background: rgba(255,255,255,.2); color: #fff; }
/* dica de cor por tipo, alinhada às cores dos eventos */
.cal-filtro.f-prazo:not(.active) { color: #b45309; }
.cal-filtro.f-audiencia:not(.active) { color: var(--blue); }
.cal-filtro.f-tarefa:not(.active) { color: #7c3aed; }
.cal-filtro.f-mov:not(.active) { color: #047857; }
.cal-filtro.f-evento:not(.active) { color: var(--gold); }
[data-theme="dark"] .cal-filtro.f-prazo:not(.active) { color: #fbbf24; }
[data-theme="dark"] .cal-filtro.f-audiencia:not(.active) { color: #a8c8ec; }
[data-theme="dark"] .cal-filtro.f-tarefa:not(.active) { color: #c4b5fd; }
[data-theme="dark"] .cal-filtro.f-mov:not(.active) { color: #6ee7b7; }
/* ===== SignBoard: navegação interna e seções ===== */
.sign-nav {
  display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 18px;
  border-bottom: 1px solid var(--border); padding-bottom: 0;
}
.sign-nav-item {
  padding: 10px 14px; font-size: 13.5px; font-weight: 600; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.sign-nav-item:hover { color: var(--gold); }
.sign-nav-item.active { color: var(--gold); border-bottom-color: var(--gold); }

.sign-sec {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); margin: 0 0 12px;
}
.sign-acao { display: block; transition: transform .12s, border-color .12s; }
.sign-acao:hover { transform: translateY(-2px); border-color: var(--copper); }
.sign-opcao {
  position: relative; text-align: left; width: 100%; cursor: pointer;
  font: inherit; color: var(--text); transition: transform .12s, border-color .12s;
}
.sign-opcao:hover:not(.indisponivel) { transform: translateY(-2px); border-color: var(--copper); }
.sign-opcao.indisponivel { opacity: .55; cursor: default; }
.sign-tag {
  position: absolute; top: 12px; right: 12px; font-size: 10px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint);
  border: 1px solid var(--border); border-radius: 20px; padding: 2px 8px;
}
.kb-previa {
  white-space: pre-wrap; word-break: break-word; font-size: 12.5px; line-height: 1.5;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px; max-height: 260px; overflow: auto; margin: 0; font-family: inherit;
}
.pub-previa { margin-bottom: 14px; }
.pub-previa summary { cursor: pointer; font-size: 13px; color: var(--gold); font-weight: 600; }

/* ===== Seleção de processos para ação em lote ===== */
.proc-card { position: relative; }
.proc-check {
  position: absolute; top: 14px; right: 14px; width: 16px; height: 16px;
  accent-color: var(--copper); cursor: pointer; opacity: .35; transition: opacity .15s;
}
.proc-card:hover .proc-check, .proc-check:checked { opacity: 1; }
.proc-card.selecionado { border-color: var(--copper); background: var(--copper-tint); }
.batch { background: none; border: 0; font: inherit; cursor: pointer; color: var(--text-muted); }
.batch:hover { color: var(--gold); }

/* ===== Financeiro: desdobramento do honorário e o que sobra ao cliente ===== */
.fin-line.sub { border-top: 0; padding: 0 0 6px; font-size: 11.5px; color: var(--text-faint); }
.fin-line.destaque { border-top: 1px solid var(--border); font-weight: 700; }
.fin-line.destaque b { color: var(--gold); }
.pill-blue { background: rgba(42, 84, 148, .12); color: var(--blue); }
[data-theme="dark"] .pill-blue { color: #a8c8ec; }

/* ===== Tipo do prazo + pontuação ===== */
.prz-tipo {
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--gold); background: var(--copper-tint);
  padding: 3px 8px; border-radius: 6px; white-space: nowrap;
}

/* ===== "AUTOR × RÉU": o × fica discreto, como no original ===== */
.proc-x { color: var(--text-faint); font-weight: 400; margin: 0 2px; }

/* ===== Seções dentro de formulários longos (cadastro de cliente) ===== */
.form-sec {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); margin: 18px 0 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.form-sec:first-child { margin-top: 0; }

/* ===== Leitura do QR Code do 2FA ===== */
.qr-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.qr-btn { cursor: pointer; padding: 7px 12px; font-size: 12.5px; margin: 0; }
.qr-dica { margin: 6px 0 0; font-size: 12px; }

/* ===== Base de conhecimento (Suporte) ===== */
.kb-list { display: flex; flex-direction: column; gap: 8px; }
.kb-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 13px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); cursor: pointer; font: inherit; color: var(--text);
  transition: border-color .15s, transform .1s;
}
.kb-item:hover { border-color: var(--copper); transform: translateX(2px); }
.kb-ico {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px;
  background: var(--copper-tint); color: var(--gold);
  display: grid; place-items: center; font-size: 16px;
}
.kb-t { flex: 1; font-weight: 600; font-size: 14px; }
.kb-seta { color: var(--text-faint); font-size: 18px; }
.kb-passos { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.kb-passos li { font-size: 14px; line-height: 1.55; color: var(--text-muted); }
.kb-passos b { color: var(--text); }

/* ===== Detalhes do certificado / linhas rótulo-valor ===== */
.det-linha {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.det-linha:last-child { border-bottom: 0; }
.det-linha span { color: var(--text-muted); flex: 0 0 auto; }
.det-linha b { text-align: right; word-break: break-word; }
.cert-envio {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
  padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
}

/* ===== Personalizar painel (grupos de caixas de seleção) ===== */
.cfg-group { margin-bottom: 16px; }
.cfg-group-tit {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 8px;
}
.cfg-check {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 10px; margin-bottom: 6px;
  cursor: pointer; font-size: 14px; background: var(--surface);
  transition: border-color .15s, background .15s;
}
.cfg-check:hover { border-color: var(--copper); background: var(--surface-2); }
.cfg-check input { width: 16px; height: 16px; accent-color: var(--copper); cursor: pointer; }

/* ===== Seletor "Novo na agenda" ===== */
.escolha { display: flex; flex-direction: column; gap: 8px; }
.escolha-op {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 14px; font-family: inherit; color: var(--text);
  transition: border-color .15s, box-shadow .15s, transform .06s;
}
.escolha-op:hover { border-color: var(--rose-gold); box-shadow: var(--shadow-md); }
.escolha-op:active { transform: translateY(1px); }
.escolha-ico { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; display: grid; place-items: center; font-size: 17px; }
.escolha-ico.e-tarefa { background: rgba(139,92,246,.14); color: #6d28d9; }
.escolha-ico.e-audiencia { background: rgba(42,84,148,.12); color: var(--blue); }
.escolha-ico.e-evento { background: var(--copper-tint); color: var(--gold); }
.escolha-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.escolha-txt b { font-size: 14px; color: var(--heading); }
.escolha-txt small { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.escolha-seta { color: var(--text-faint); font-size: 18px; flex: 0 0 auto; }
[data-theme="dark"] .escolha-ico.e-tarefa { color: #c4b5fd; }
[data-theme="dark"] .escolha-ico.e-audiencia { color: #a8c8ec; }

/* ===== Resultados do DJEN ===== */
.djen-lista { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; padding-right: 4px; }
.djen-item {
  display: flex; gap: 11px; align-items: flex-start; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px;
  transition: border-color .15s;
}
.djen-item:hover { border-color: var(--border-strong); }
.djen-item input { margin-top: 3px; width: 15px; height: 15px; accent-color: var(--rose-gold); flex: 0 0 auto; }
.djen-info { min-width: 0; flex: 1; }
.djen-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.djen-org { font-size: 11.5px; color: var(--text-muted); margin-bottom: 4px; }
.djen-txt { font-size: 11.5px; color: var(--text-faint); line-height: 1.45; }

/* ===== Fontes e integrações de tribunal ===== */
.sis-sec { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); margin-bottom: 8px; }
.sis-card { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: 12px; padding: 13px 14px; margin-bottom: 8px; }
.sis-card.ok { border-left-color: var(--green); }
.sis-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.sis-top b { font-size: 14px; color: var(--heading); }
.sis-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }
.sis-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sis-lim { font-size: 11.5px; color: var(--text-faint); margin-top: 7px; }
.sis-alt { font-size: 11.5px; color: #059669; margin-top: 7px; font-weight: 600; }
[data-theme="dark"] .sis-alt { color: #6ee7b7; }

/* ===== Credenciais como cofre (padrão da tela original) ===== */
.cred-val { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.cred-olho {
  background: none; border: none; cursor: pointer; color: var(--text-faint);
  font-size: 14px; padding: 2px 4px; line-height: 1; border-radius: 6px;
}
.cred-olho:hover { color: var(--rose-gold); background: var(--surface-2); }
.cred-revelada { font-family: ui-monospace, "Cascadia Code", monospace; font-size: 13px; color: var(--heading); font-weight: 700; letter-spacing: .04em; }
.cred-conta { font-size: 10.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
/* código 2FA ao vivo: número grande + anel de contagem */
.totp-cod {
  font-family: ui-monospace, "Cascadia Code", monospace; font-size: 20px; font-weight: 800;
  letter-spacing: .2em; color: var(--heading);
}
.totp-anel {
  position: relative; width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%;
  background: conic-gradient(var(--cor) calc(var(--pct) * 360deg), var(--surface-2) 0);
  display: inline-grid; place-items: center;
}
.totp-anel::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--surface); }
.totp-num {
  position: relative; z-index: 1; font-size: 10px; font-weight: 800; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ===== SignBoard: tela de upload em lote ===== */
.up-item {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px;
  background: var(--surface-2);
}
.up-ico {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px;
  background: var(--copper-tint); color: var(--gold);
  display: grid; place-items: center; font-size: 16px;
}
.up-drop {
  display: block; text-align: center; cursor: pointer; padding: 24px;
  border: 2px dashed var(--border-strong); border-radius: 14px;
  font-weight: 700; color: var(--text-muted); transition: border-color .15s, color .15s;
}
.up-drop:hover { border-color: var(--copper); color: var(--gold); }
.up-bloco { border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.up-bloco-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.up-num {
  width: 24px; height: 24px; border-radius: 50%; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}

/* ===== SignBoard: gráfico comparativo (SVG, sem biblioteca) ===== */
.sign-graf { width: 100%; height: 104px; display: block; }
.sign-graf .g-eixo { stroke: var(--border); stroke-width: 1; }
.sign-graf .g-atu { fill: var(--copper); }
.sign-graf .g-ant { fill: var(--border-strong); }
.sign-graf-leg {
  display: flex; gap: 14px; align-items: center; margin-top: 8px;
  font-size: 11.5px; color: var(--text-muted);
}
.g-sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.g-sw.g-atu { background: var(--copper); }
.g-sw.g-ant { background: var(--border-strong); }

/* ============================================================
   Modo SignBoard — aplicativo à parte
   No SignJus a marca, a barra lateral e o topo são próprios, com um
   caminho de volta ao outro app. Não é uma seção do JusBoard, e tratar
   como seção foi o que deixou a minha versão distante da original.
   ============================================================ */
#app.modo-sign .brand-mark { background: var(--grad-gold); color: #1a1408; box-shadow: 0 4px 12px rgba(201,160,85,.32); }
#app.modo-sign .nav-badge { display: none; }

/* Itens de navegação com subtítulo (padrão do SignJus) */
.nav-link.com-sub { align-items: flex-start; padding-top: 9px; padding-bottom: 9px; }
.nav-link.com-sub .ico { margin-top: 2px; }
.nav-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.nav-txt small { font-size: 10.5px; color: var(--sidebar-text); opacity: .62; font-weight: 400; }
.nav-link.active .nav-txt small { opacity: .8; }

.voltar-app {
  display: block; margin: auto 14px 16px; padding: 11px 14px;
  border: 1px solid var(--sidebar-border); border-radius: 12px;
  color: var(--sidebar-text-strong); font-size: 13px; font-weight: 600;
  background: var(--sidebar-hover); text-align: left;
}
.voltar-app:hover { border-color: var(--gold-claro); color: var(--sidebar-active-text); }
/* barra recolhida: só a seta (o texto saía cortado, "← Proce") */
#app.collapsed .sidebar:not(:hover) .voltar-app .va-txt { display: none; }
#app.collapsed .sidebar:not(:hover) .voltar-app { text-align: center; padding-left: 0; padding-right: 0; }
.voltar-app .va-seta { margin-right: 6px; }
#app.collapsed .sidebar:not(:hover) .voltar-app .va-seta { margin-right: 0; }

/* Barra superior do SignBoard */
.topbar.topbar-sign .topbar-right > *:not(#theme-btn):not(.avatar-btn) { display: none; }
.sign-topbar {
  font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted);
}
.sign-topbar .sep { color: var(--gold-claro); margin: 0 4px; }
.sign-beta {
  margin-left: 10px; font-size: 9.5px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold);
  border: 1px solid var(--gold-claro); border-radius: 20px; padding: 2px 9px;
}

/* Cabeçalho de página: traço + kicker dourado + título em peso misto */
.sj-kicker {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold);
}
.sj-kicker::before { content: ""; width: 18px; height: 2px; background: var(--gold-claro); border-radius: 2px; }
.sj-titulo { font-size: 26px; font-weight: 400; color: var(--heading); letter-spacing: -.01em; margin: 0; }
.sj-titulo b { font-weight: 800; }

/* KPI do SignJus: ícone à esquerda, número grande à direita */
.sj-kpi { display: flex; align-items: flex-start; gap: 14px; }
.sj-kpi .ico {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px;
  display: grid; place-items: center; font-size: 17px;
}
.sj-kpi .num { margin-left: auto; font-size: 34px; font-weight: 300; line-height: 1; color: var(--heading); }
.sj-kpi-pe { margin-top: 14px; }
.sj-kpi-pe b { display: block; font-size: 13px; font-weight: 600; }
.sj-kpi-pe small { font-size: 11px; color: var(--text-faint); }
.sj-novo {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--green); background: rgba(16,185,129,.12); border-radius: 20px; padding: 2px 7px;
}

/* Estado vazio no padrão do SignJus: ícone grande em quadrado claro */
.sj-vazio { text-align: center; padding: 54px 20px; }
.sj-vazio .ico {
  width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 16px;
  background: var(--surface-2); color: var(--text-faint);
  display: grid; place-items: center; font-size: 26px;
}
.sj-vazio h4 { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--text); }
.sj-vazio p { margin: 0 auto 18px; font-size: 13px; color: var(--text-muted); max-width: 320px; }

/* Pills de status, menores e em caixa alta */
.sj-pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.sj-pill {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 7px 13px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted); cursor: pointer;
}
.sj-pill:hover { border-color: var(--gold-claro); color: var(--gold); }
.sj-pill.active { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }

/* Busca estreita, como no original (não ocupa a linha toda) */
.sj-busca { max-width: 260px; }

/* Botão dourado primário do SignJus */
/* medido no SignJus logado: degradê 135° #C9A055→#E8C97A, texto quase-preto
   azulado #071020, raio 8, 12/600, padding 8×16 */
.btn-ouro {
  background: linear-gradient(135deg, #C9A055, #E8C97A); color: #071020; border: none;
  border-radius: 8px; font-size: 12px; font-weight: 600; padding: 8px 16px;
}
.btn-ouro:hover { filter: brightness(1.04); opacity: .92; }

/* ===== SignBoard — seções internas medidas no SignJus logado ===== */
/* kicker 10/600 dourado tracking .2em com traço fino de 24px; título de seção
   20px light com trecho semibold (o painel mantém 30px via .grande) */
.sj-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.sj-kicker i { display: block; width: 24px; height: 1px; background: var(--gold-claro); }
.sj-kicker span { font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: #C9A055; }
.sj-title { font-size: 20px; font-weight: 300; color: #1e293b; letter-spacing: -.025em; margin: 0; }
.sj-title b { font-weight: 600; }
[data-theme="dark"] .sj-title { color: rgba(255,255,255,.9); }
.sj-title.grande { font-size: 30px; }
.sj-sub { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
/* pílula de status: redonda, 10/600 maiúscula ls .5px, py-1.5 px-3;
   ativa dourada (fundo 12,5%, fio 25%); inativa cinza a 25% */
.sj-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 9999px;
  border: 1px solid rgba(155,163,178,.25); background: transparent; color: #9BA3B2;
  font-size: 10px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  cursor: pointer; font-family: inherit; transition: color .15s, border-color .15s, background .15s;
}
.sj-pill:hover { color: var(--gold); border-color: rgba(201,160,85,.4); }
.sj-pill.active { background: rgba(201,160,85,.125); border-color: rgba(201,160,85,.25); color: #C9A055; }
/* busca da lista: 384px, h-36, raio 6, 13px */
.sj-busca { max-width: 384px; border-radius: 6px; padding: 8px 12px; }
.sj-busca input { font-size: 13px; }
/* vazio: caixa de fio tracejado dourado a 9,4%, chip 56px dourado a 5% */
.sj-vazio { border: 1px dashed rgba(201,160,85,.094); border-radius: 12px; }
[data-theme="dark"] .sj-vazio { border-color: rgba(201,160,85,.25); }
.sj-vazio .sj-vazio-ico { width: 56px; height: 56px; border-radius: 12px; background: rgba(201,160,85,.05); color: var(--heading); display: grid; place-items: center; font-size: 22px; margin: 0 auto 16px; }
.sj-vazio-t { font-size: 14px; font-weight: 500; color: #334155; margin: 0 0 4px; }
[data-theme="dark"] .sj-vazio-t { color: var(--text); }
.sj-vazio-s { font-size: 12px; color: var(--text-faint); max-width: 320px; margin: 0 auto 20px; }
/* título das opções de criação: 14/600, medido */
.sj-opt-t { font-size: 14px; font-weight: 600; }

/* Gráfico de LINHA (o SignJus usa linha, não barra) */
.sign-graf .g-linha { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.sign-graf .g-atu-l { stroke: var(--gold-claro); }
.sign-graf .g-ant-l { stroke: var(--border-strong); stroke-dasharray: 4 4; }
.sign-graf-eixo {
  display: flex; justify-content: space-between; margin-top: 6px;
  font-size: 10.5px; color: var(--text-faint);
}

/* ============================================================
   Escritório (v94): Atendimentos, Painel da equipe e histórico
   ============================================================ */
.at-funil { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.at-etapa {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-family: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--text-muted);
}
.at-etapa b { font-size: 11px; background: var(--surface-2); color: var(--heading); border-radius: 9999px; padding: 1px 7px; }
.at-etapa:hover { border-color: var(--border-strong); color: var(--text); }
.at-etapa.active { border-color: var(--gold); color: var(--heading); box-shadow: 0 0 0 3px var(--ring); }
.at-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); white-space: nowrap; cursor: pointer; }
.at-row { cursor: pointer; }
.at-dias { font-size: 11px; font-weight: 700; color: #b45309; white-space: nowrap; }
.at-hist { display: flex; flex-direction: column; gap: 6px; max-height: 190px; overflow: auto; margin-top: 6px; }
.at-hist-item { border-left: 2px solid var(--border-strong); padding: 2px 0 2px 10px; font-size: 12.5px; color: var(--text); }
.at-hist-top { display: flex; justify-content: space-between; gap: 10px; }
.at-hist-top span { color: var(--text-muted); font-size: 11.5px; }
.det-bloco { margin-top: 10px; font-size: 12.5px; }
.det-bloco > span { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.det-bloco > div { color: var(--heading); white-space: pre-wrap; }
.proc-apelido { color: var(--gold); font-weight: 600; }

.eq-minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.eq-mini {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; cursor: pointer; font-family: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px;
}
.eq-mini b { font-size: 22px; line-height: 1.1; color: var(--heading); font-variant-numeric: tabular-nums; }
.eq-mini span { font-size: 11.5px; color: var(--text-muted); }
.eq-mini:hover { border-color: var(--border-strong); }
.eq-mini.eq-red { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.35); }
.eq-mini.eq-red b { color: var(--red); }
.eq-mini.eq-amber { background: rgba(245,158,11,.09); border-color: rgba(245,158,11,.35); }
.eq-mini.eq-amber b { color: #b45309; }
[data-theme="dark"] .eq-mini.eq-amber b { color: #fbbf24; }
.eq-tabela { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow-x: auto; }
.eq-lin { display: grid; grid-template-columns: minmax(140px, 2fr) repeat(5, minmax(70px, 1fr)); gap: 8px; padding: 8px 12px; font-size: 12.5px; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; min-width: 560px; }
.eq-lin > span:not(.eq-nome) { text-align: center; }
.eq-cab { border-top: 0; background: var(--surface-2); font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.eq-nome { font-weight: 600; color: var(--heading); }
.eq-lin .eq-red { color: var(--red); font-weight: 800; }
.eq-lin .eq-amber { color: #b45309; font-weight: 700; }
[data-theme="dark"] .eq-lin .eq-amber { color: #fbbf24; }
.eq-zero { color: var(--text-faint); }

.hist-lista { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow: auto; }
.hist-item { border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; font-size: 12.5px; }
.hist-top { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.hist-top b { color: var(--heading); }
.hist-top span { color: var(--text-muted); }
.hist-top time { margin-left: auto; color: var(--text-muted); font-size: 11.5px; }
.hist-campos { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.hist-campos span { display: inline-block; min-width: 140px; color: var(--text-muted); }
.hist-campos s { color: var(--text-muted); }

/* ============================================================
   Segurança (v95): login em duas etapas, Microsoft 365, pendências
   ============================================================ */
.login-ou { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--text-faint); font-size: 12px; }
.login-ou::before, .login-ou::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.login-ms { display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; background: var(--surface); color: var(--heading); border: 1px solid var(--border-strong); }
.login-ms:hover { background: var(--surface-2); }
.ms-logo { display: grid; grid-template-columns: 8px 8px; gap: 2px; }
.ms-logo i { width: 8px; height: 8px; display: block; }
.ms-logo i:nth-child(1) { background: #f25022; } .ms-logo i:nth-child(2) { background: #7fba00; }
.ms-logo i:nth-child(3) { background: #00a4ef; } .ms-logo i:nth-child(4) { background: #ffb900; }
.login-codigo { font-size: 22px !important; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.seg-passos { display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--text); }
.seg-passos p { margin: 0; }
.seg-chave { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 17px; letter-spacing: .08em; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 10px; padding: 10px 14px; color: var(--heading); word-break: break-all; user-select: all; }
.seg-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text); }
.seg-acessos { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.seg-acesso { display: grid; grid-template-columns: auto minmax(160px, 1fr) minmax(160px, 2fr) auto; gap: 10px; align-items: center; padding: 8px 12px; font-size: 12.5px; border-top: 1px solid var(--border); }
.seg-acesso:first-child { border-top: 0; }
.seg-acesso span { color: var(--text-muted); }
.seg-acesso time { color: var(--text-muted); font-size: 11.5px; white-space: nowrap; }
@media (max-width: 720px) { .seg-acesso { grid-template-columns: auto 1fr; } .seg-acesso span, .seg-acesso time { grid-column: 1 / -1; } }
.rev-row .title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rev-reg { font-weight: 700; color: var(--gold); }
.rev-ok { opacity: .65; }

/* Azul & Branco e Preto & Branco (claro): o item ativo é um "cartão" branco sobre o cinza,
   e a sombra da barra aberta por cima do conteúdo fica mais leve. Aqui no
   fim para vencer as regras de hover dentro das media queries acima. */
:root:is([data-marca="azul"], [data-marca="preto"]):not([data-theme="dark"]) .nav-link.active { box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
:root:is([data-marca="azul"], [data-marca="preto"]):not([data-theme="dark"]) #app .sidebar:hover { box-shadow: 10px 0 30px rgba(15, 23, 42, .12); }

/* ===== Funil do escritório (migração 032) =====
   01–04 no atendimento, 05–08 no processo. Cor de cada etapa em --c (FUNIL,
   app.js); marcadores ⏳ ✎ para esperas, que não mudam a etapa. */
.pill-funil { background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
[data-theme="dark"] .pill-funil { background: color-mix(in srgb, var(--c) 24%, transparent); color: color-mix(in srgb, var(--c) 55%, #fff); }
.marcadores { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.marcador { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; color: #b45309; background: rgba(245,158,11,.12); border-radius: 6px; padding: 2px 6px; margin: 4px 4px 0 0; line-height: 1.3; }
.marcador.alerta { color: var(--red); background: rgba(239,68,68,.1); }
.marcador.ok { color: #047857; background: rgba(16,185,129,.12); }
[data-theme="dark"] .marcador { color: #fbbf24; }
[data-theme="dark"] .marcador.alerta { color: #fca5a5; }
[data-theme="dark"] .marcador.ok { color: #6ee7b7; }
.pend-opcoes { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 2px 0 8px; }
.proc-visao { margin-bottom: 0; background: var(--surface); border: 1px solid var(--border); }
.proc-visao .seg-btn { font-size: 12px; padding: 5px 12px; }

.view-inner.funil-largo { max-width: none; }   /* as 8 colunas usam toda a largura */
.funil-quadro { padding: 14px; }
.funil-barra { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.funil-barra .select { padding-top: 7px; padding-bottom: 7px; }
/* 8 colunas cabem em 1440px (antes 168px mínimos cortavam a 08); o grupo
   "Atendimento/Processo" fica num cabeçalho só, em vez de repetido em cada coluna. */
.funil { display: grid; grid-template-columns: repeat(8, minmax(138px, 1fr)); grid-template-rows: auto; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.fn-grupo { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint);
  border-bottom: 1px solid var(--border); padding: 0 2px 4px; margin-bottom: -2px; }
.fn-card .num { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; }
.fn-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; display: flex; flex-direction: column; min-height: 320px; transition: box-shadow .15s, border-color .15s; }
.fn-col.alvo { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.fn-cab { padding: 10px 10px 8px; border-bottom: 1px solid var(--border); border-top: 3px solid var(--c); border-radius: 10px 10px 0 0; background: var(--surface); }
.fn-cab .n { font-size: 10px; font-weight: 800; color: var(--c); letter-spacing: .06em; }
.fn-cab .t { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; font-size: 13px; font-weight: 700; color: var(--heading); margin-top: 1px; line-height: 1.25; }
.fn-cab .t em { font-style: normal; font-size: 11px; background: var(--surface-2); border-radius: 9999px; padding: 1px 8px; color: var(--text-muted); flex: 0 0 auto; }
.fn-cab .onde { font-size: 10.5px; color: var(--text-faint); margin-top: 2px; }
.fn-corpo { padding: 8px; display: flex; flex-direction: column; gap: 8px; max-height: 64vh; overflow-y: auto; }
.fn-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 9px 10px; font-size: 12px; box-shadow: var(--shadow); cursor: grab; color: var(--text); text-decoration: none; }
.fn-card:hover { border-color: var(--border-strong); }
.fn-card.arrastando { opacity: .45; }
.fn-card b { display: block; font-size: 12.5px; color: var(--heading); line-height: 1.3; }
.fn-card .sub { color: var(--text-muted); margin-top: 2px; }
.fn-card .num { font-family: ui-monospace, monospace; font-size: 10.5px; color: var(--text-faint); margin-top: 3px; word-break: break-all; }
.fn-card .rod { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 7px; }
.fn-card .ava { width: 22px; height: 22px; border-radius: 6px; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.fn-card .dias { font-size: 10.5px; font-weight: 700; color: var(--text-faint); }
.fn-card .dias.parado { color: #b45309; }
[data-theme="dark"] .fn-card .dias.parado, [data-theme="dark"] .at-dias { color: #fbbf24; }
.fn-vazio { text-align: center; color: var(--text-faint); font-size: 12px; padding: 10px 0; }
.fn-mais { border: 1px dashed var(--border-strong); background: none; border-radius: 8px; padding: 7px; font: inherit; font-size: 12px; color: var(--text-muted); cursor: pointer; }
.fn-mais:hover { color: var(--heading); border-color: var(--c); }
.funil-fora { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--text-muted); }
.funil-fora span { background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 8px; padding: 6px 10px; }
.funil-fora { align-items: center; }
.funil-dica { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--text-faint); max-width: 560px; text-align: right; }

/* Funil enquadrado (como a Agenda): no computador o quadro ocupa a área
   visível; cada coluna rola sozinha e a página não rola. */
@media (min-width: 721px) and (min-height: 520px) {
  .view:has(> .funil-largo) { overflow: hidden; padding-bottom: 16px; }
  .funil-largo { height: 100%; display: flex; flex-direction: column; }
  .funil-largo > .page-head, .funil-largo > .etapas, .funil-largo > .toolbar { flex: 0 0 auto; }
  /* na tela única de Processos o quadro mora dentro de #proc-list */
  .funil-largo > #proc-list { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .funil-largo > #proc-list > .funil-quadro { flex: 1; }
  .funil-largo .funil-quadro { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .funil-largo .funil-barra, .funil-largo .funil-fora { flex: 0 0 auto; }
  .funil-largo .funil { flex: 1; min-height: 0; grid-template-rows: auto minmax(0, 1fr); }
  .funil-largo .fn-col { min-height: 0; }
  .funil-largo .fn-corpo { flex: 1; min-height: 0; max-height: none; }
}

.etapa-topo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.etapa-linha { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.etapa-linha b { color: var(--heading); }
.etapa-hist { margin-top: 10px; font-size: 12.5px; color: var(--text-muted); }
.etapa-hist summary { cursor: pointer; font-weight: 600; }
.etapa-hist ul { margin: 8px 0 0; padding-left: 18px; }
.etapa-hist li { margin-bottom: 4px; }
.etapa-hist li b { color: var(--heading); }
/* Barra de evolução do processo — estilo C: setas em duas fases (Atendimento 01–04 | Processo 05–08) */
.evo-fases { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 4px; }
.evo-fase > small { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px; }
.evo-fase > small .ok { color: #10b981; }
.evo-linha { display: flex; }
.evo-et { flex: 1; min-width: 0; position: relative; height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  border: 0; font: inherit; margin: 0 0 0 -5px; padding: 0 14px 0 18px; background: var(--surface-2); color: var(--text-muted); font-size: 11.5px; font-weight: 600; line-height: 1.15;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%); transition: background .25s, color .25s, transform .15s; }
.evo-linha .evo-et:first-child { margin-left: 0; padding-left: 10px; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); }
.evo-et i { font-style: normal; font-size: 10px; opacity: .85; }
.evo-et .ck { font-size: 11px; }
.evo-et .nome { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
button.evo-et { cursor: pointer; }
button.evo-et:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--gold) 16%, var(--surface-2)); color: var(--heading); }
button.evo-et:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.evo-et.feita { background: color-mix(in srgb, #10b981 17%, transparent); color: #0b8a5f; }
[data-theme="dark"] .evo-et.feita { color: #34d399; }
.evo-et.atual { background: #2563eb; color: #fff; font-weight: 700; }
.evo-et.atual.parada { background: #b45309; }
.evo-et.atual.parada.forte { background: #b91c1c; }
.evo-info { margin-top: 10px; font-size: 12.5px; color: var(--text-muted); }
.evo-info b { color: var(--heading); }
.evo-alerta { margin-top: 10px; padding: 9px 13px; border-radius: 12px; font-size: 12.5px; font-weight: 600; color: #b45309; background: color-mix(in srgb, #f59e0b 12%, transparent); border: 1px solid color-mix(in srgb, #f59e0b 35%, transparent); }
.evo-alerta.forte { color: #b91c1c; background: color-mix(in srgb, #ef4444 12%, transparent); border-color: color-mix(in srgb, #ef4444 35%, transparent); }
[data-theme="dark"] .evo-alerta { color: #fbbf24; } [data-theme="dark"] .evo-alerta.forte { color: #f87171; }
@media (max-width: 720px) {
  .evo-fases { grid-template-columns: 1fr; }
  .evo-et { padding: 0 6px 0 12px; }
  .evo-linha .evo-et:first-child { padding-left: 6px; }
  .evo-et .nome { display: none; } .evo-et.atual .nome { display: inline; }   /* no celular só a etapa atual mostra o nome */
  button.evo-et { min-height: 46px; }
}
@media (prefers-reduced-motion: reduce) { .evo-et { transition: none; } }


/* ============================================================
   Barra superior com o título da tela (montarTopo, em app.js)
   O .page-head de cada tela sobe para cá: título à esquerda, botões da tela
   ao centro-direita, e só busca/notificações/tema/perfil fixos.
   ============================================================ */
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.topo-caminho { color: var(--text-faint); font-size: 13px; font-weight: 600; white-space: nowrap; }
.topo-caminho a { color: var(--text-muted); text-decoration: none; }
.topo-caminho a:hover { color: var(--heading); }
.topo-titulo {
  margin: 0; display: flex; align-items: center; gap: 8px; min-width: 0;
  font-size: 18px; font-weight: 700; letter-spacing: -.01em; color: var(--heading);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topo-titulo .t-ico { font-size: 16px; opacity: .75; display: inline-grid; place-items: center; }
.topo-titulo .t-ico .svg-ico { width: 20px; height: 20px; }
.topo-cont {
  margin: 0; flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--text-muted);
  background: var(--surface-2); border-radius: 9999px; padding: 2px 10px; white-space: nowrap;
}
.topo-cont:empty { display: none; }
.topbar-acoes { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; min-width: 0; } /* os botões não encolhem: quem cede espaço é o título (reticências) */
.topbar-left { flex: 1 1 0; }
.topbar-acoes:empty { display: none; }
.topbar-acoes > div { display: flex !important; align-items: center; gap: 8px !important; flex-wrap: nowrap !important; }
.topbar-acoes .btn, .topbar-acoes .btn-gold, .topbar-acoes .bs-main { padding: 7px 12px; font-size: 13px; white-space: nowrap; }
.topbar-acoes .btn-split { flex: 0 0 auto; }
.topbar-acoes .seg { margin: 0; padding: 3px; }
.topbar-acoes .seg-btn { padding: 5px 10px; font-size: 12.5px; }
.topbar-right { padding-left: 10px; border-left: 1px solid var(--border); }
.topbar-acoes:empty + .topbar-right { border-left: none; }
.sino-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sino-sync { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.sino-sync:hover { color: var(--heading); }
/* Celular: os botões da tela ficam numa faixa logo abaixo da barra */
.page-head.page-head-acoes { margin-bottom: 12px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
.page-head.page-head-acoes::-webkit-scrollbar { display: none; }
.page-head.page-head-acoes > div { display: flex !important; flex-wrap: nowrap !important; gap: 8px; }
.page-head.page-head-acoes .btn, .page-head.page-head-acoes .btn-gold { white-space: nowrap; flex: 0 0 auto; }
/* Notebooks estreitos: compacta a barra para os botões da tela (Processos tem 5) não cobrirem a busca/sino */
@media (max-width: 1180px) {
  .topbar { padding: 0 16px; gap: 10px; }
  .topbar-acoes, .topbar-acoes > div { gap: 6px !important; }
  .topbar-acoes .btn, .topbar-acoes .btn-gold, .topbar-acoes .bs-main { padding: 7px 9px; font-size: 12.5px; }
  .topbar-acoes .seg-btn { padding: 5px 8px; font-size: 12px; }
}
@media (max-width: 720px) {
  .topbar { gap: 8px; }
  .topbar-right { padding-left: 4px; gap: 2px; border-left: none; }
  .topbar-right .icon-btn { width: 34px; height: 34px; }
  .topo-titulo { font-size: 16px; }
  .topo-caminho { display: none; }
  .topo-cont { padding: 1px 8px; font-size: 11px; }
}
@media (max-width: 560px) { .topo-cont { display: none; } }   /* no celular o título precisa do espaço */


/* ===== Detalhe do processo compacto =====
   Dados em grade de 4 colunas e a etapa do funil no mesmo cartão; abaixo,
   andamento à esquerda e prazo/financeiro/partes à direita. */
.det-cab { padding: 16px 20px; margin-bottom: 16px; }
.det-grade { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 24px; }
.det-grade label { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 2px; }
.det-grade > div > span { font-size: 13.5px; color: var(--heading); overflow-wrap: anywhere; }
.det-grade a { color: var(--gold); }
.det-grade .mono { font-variant-numeric: tabular-nums; }
.det-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.det-tags .tag { font-size: 11.5px; }
.det-mini { margin-left: 6px; border: 1px solid var(--border); background: var(--surface); border-radius: 9999px; padding: 0 8px; font: inherit; font-size: 11px; color: var(--text-muted); cursor: pointer; }
.det-mini:hover { color: var(--heading); border-color: var(--border-strong); }
.etapa-embutida { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.etapa-embutida .etapa-topo .btn { padding: 5px 12px; font-size: 12.5px; }
.det-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.det-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.det-col .grid.grid-2 { grid-template-columns: 1fr; }
@media (max-width: 1100px) { .det-grade { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .det-cols { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .det-cab { padding: 14px; } .det-grade { gap: 10px 14px; } }


/* ===== Intimações e Novas Movimentações em linhas =====
   Antes: um cartão de ~180-215px por item, com os botões numa faixa à parte.
   Agora: uma linha por item, botões à direita; o texto abre por baixo. */
.int-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.int-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.int-lista, .mov-lista { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.int-linha, .mov-linha {
  display: grid; align-items: center; column-gap: 12px; padding: 10px 16px;
  border-top: 1px solid var(--border); font-size: 13px;
}
.int-linha { grid-template-columns: 8px minmax(0, 1fr) 64px auto; }
.int-linha:first-child, .mov-linha:first-child { border-top: none; }
.int-linha:hover, .mov-linha:hover { background: var(--surface-2); }
.int-ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); align-self: start; margin-top: 6px; }
.int-linha.lida .int-ponto { background: transparent; border: 1px solid var(--border-strong); }
.int-miolo, .mov-miolo { min-width: 0; }
.int-linha .int-titulo { font-size: 13.5px; font-weight: 700; color: var(--heading); margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.int-linha.lida .int-titulo { font-weight: 600; color: var(--text-muted); }
.int-sub, .mov-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.int-sub .int-proc, .mov-sub .mono { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--text-muted); }
.int-linha .int-texto { margin: 4px 0 0; font-size: 12px; }
.int-data { text-align: right; white-space: nowrap; }
.int-data b { display: block; font-size: 13px; font-weight: 600; color: var(--heading); }
.int-data small { font-size: 11px; color: var(--text-faint); font-weight: 600; }
.int-acoes, .mov-acoes { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.int-linha .btn, .mov-linha .btn { padding: 5px 10px; font-size: 12px; white-space: nowrap; }
.mov-linha { grid-template-columns: 48px minmax(0, 1fr) auto; }
.mov-n { text-align: center; font-weight: 800; font-size: 12px; color: #d97706; background: #fffbeb; border-radius: 9999px; padding: 3px 0; }
[data-theme="dark"] .mov-n { background: rgba(245,158,11,.16); color: #fbbf24; }
.mov-linha .nome { font-weight: 700; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mov-ultimo { color: var(--text); font-weight: 600; }
.mov-detalhe { grid-column: 2 / -1; margin-top: 8px; }
@media (max-width: 720px) {
  .int-linha { grid-template-columns: 8px minmax(0, 1fr) auto; row-gap: 8px; }
  .int-linha .int-acoes { grid-column: 2 / -1; justify-content: flex-start; flex-wrap: wrap; }
  .mov-linha { grid-template-columns: 40px minmax(0, 1fr); row-gap: 8px; }
  .mov-linha .mov-acoes { grid-column: 2 / -1; justify-content: flex-start; flex-wrap: wrap; }
  .int-sub, .mov-sub { white-space: normal; }
}


/* Celular: busca numa linha, filtros numa faixa que rola para o lado (antes
   cada seletor ocupava uma linha inteira antes da lista), e o seletor
   Lista/Funil em uma linha só. */
@media (max-width: 720px) {
  .toolbar.fixa { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; padding: 8px 0; }
  .toolbar.fixa::-webkit-scrollbar { display: none; }
  .toolbar.fixa .search { flex: 0 0 72%; min-width: 0; }
  .toolbar.fixa .select, .toolbar.fixa .btn { flex: 0 0 auto; }
  .page-head-acoes .seg { flex-wrap: nowrap; }
  .page-head-acoes .seg-btn { flex-direction: row; white-space: nowrap; gap: 4px; }
}


/* ===== Área de Trabalho enquadrada (como a Agenda e o Funil) =====
   No computador ocupa exatamente a área visível: o Painel da equipe fica no
   topo (a tabela por responsável rola dentro dele, até metade da tela) e os
   três painéis de baixo dividem o resto, cada um rolando sozinho.
   Vale a partir de 900px de largura (a Agenda precisa de 1101px por causa do
   painel lateral; aqui não): numa janela de ~1000px também cabe. */
.kpi-link { cursor: pointer; font: inherit; text-align: left; color: inherit; width: 100%; }
.kpi-link:hover { border-color: var(--border-strong); }
@media (min-width: 900px) and (min-height: 600px) {
  .dash-quadro > .dash-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* janelas de ~1000px: os seis números numa linha e valores sem quebrar */
  .dash-quadro .eq-minis { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 8px; margin-bottom: 10px; }
  .dash-quadro .fin-mini-grid .kpi-val { font-size: clamp(14px, 1.35vw, 22px) !important; white-space: nowrap; }
  .view:has(> .dash-quadro) { overflow: hidden; padding-bottom: 16px; }
  .dash-quadro { height: 100%; display: flex; flex-direction: column; }
  .dash-quadro > .grid.grid-4 { flex: 0 0 auto; margin-bottom: 12px !important; }
  .dash-quadro > .panel { flex: 0 1 auto; min-height: 0; max-height: 52%; display: flex; flex-direction: column; margin-bottom: 12px !important; }
  .dash-quadro > .panel > .panel-body { min-height: 0; overflow-y: auto; }
  .dash-quadro > .dash-cols { flex: 1 1 0; min-height: 0; align-items: stretch; grid-auto-rows: minmax(0, 1fr); }
  .dash-quadro > .dash-cols > .panel { display: flex; flex-direction: column; min-height: 0; }
  .dash-quadro > .dash-cols > .panel > .panel-body { flex: 1; min-height: 0; overflow-y: auto; }
}


/* ===== SignBoard · editor online =====
   Uma folha branca (como o PDF: Times, texto justificado, margens largas)
   sobre a "mesa", com a barra de formatação presa no alto do cartão. A folha
   fica branca também no tema escuro: é o papel que vai ser assinado. */
.ed-quadro { overflow: hidden; padding: 0; }
.ed-barra { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  padding: 8px 10px; background: var(--surface); border-bottom: 1px solid var(--border); }
.ed-estilo { padding: 5px 8px; font-size: 13px; min-width: 120px; }
.ed-bt { min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 8px; background: none;
  color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.ed-bt:hover { background: var(--surface-2); border-color: var(--border); }
.ed-sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.ed-mesa { background: var(--surface-2); padding: 24px 16px; max-height: 70vh; overflow-y: auto; }
.ed-pagina {
  max-width: 794px; min-height: 560px; margin: 0 auto; padding: 72px 76px; background: #fff; color: #111;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .12), 0 8px 24px rgba(15, 23, 42, .06); border-radius: 4px;
  font-family: "Times New Roman", Times, "Liberation Serif", serif; font-size: 16px; line-height: 1.42; outline: none;
  word-wrap: break-word;
}
.ed-pagina p, .ed-pagina li { text-align: justify; }
.ed-pagina p { margin: 0 0 10px; }
.ed-pagina h1 { font-size: 21px; font-weight: 700; margin: 14px 0 12px; }
.ed-pagina h2 { font-size: 18px; font-weight: 700; margin: 12px 0 8px; }
.ed-pagina ul, .ed-pagina ol { margin: 0 0 10px; padding-left: 30px; }
.ed-pagina ul { list-style: disc; }
.ed-pagina ol { list-style: decimal; }
.ed-pagina li { margin: 0 0 4px; }
.ed-pagina > :first-child { margin-top: 0; }
.ed-pagina.vazio::before { content: attr(data-vazio); color: #9aa3ae; font-style: italic; pointer-events: none; }
.ed-pagina[contenteditable="false"] { opacity: .85; }
.ed-rodape { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; font-size: 12px; color: var(--text-muted);
  border-top: 1px solid var(--border); background: var(--surface); }
@media (max-width: 720px) {
  .ed-mesa { padding: 12px 8px; max-height: none; }
  .ed-pagina { padding: 28px 20px; min-height: 360px; }
}

/* ---------- WhatsApp: Caixa de entrada ----------
   Enquadrada como a Agenda: a lista e a conversa rolam dentro do quadro, o
   campo de resposta fica sempre à vista. No celular, uma coisa de cada vez
   (lista ou conversa, com "‹" para voltar). */
:root { --wa-saida: #e3f4e8; --wa-bot: #e7edf9; --wa-lido: #2a8fd6; }
[data-theme="dark"] { --wa-saida: #12301f; --wa-bot: #142342; --wa-lido: #5bb6f0; }
.view:has(> .wa-tela) { overflow: hidden; padding-bottom: 16px; }
.wa-tela { height: 100%; display: flex; flex-direction: column; gap: 12px; }
.wa-faixa { font-size: 13px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--copper-tint); color: var(--text); }
.wa-quadro { flex: 1; min-height: 380px; display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.wa-lista { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--border); }
.wa-filtros { display: flex; gap: 4px; flex-wrap: wrap; padding: 10px 10px 4px; }
.wa-filtros button { border: 1px solid var(--border); background: transparent; border-radius: 999px; padding: 4px 10px;
  font: inherit; font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.wa-filtros button.ativo { background: var(--navy); border-color: var(--navy); color: #fff; }
.wa-busca { flex: 0 0 auto; min-width: 0; margin: 6px 10px 8px; }
.wa-itens { flex: 1; min-height: 0; overflow: auto; }
.wa-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-top: 1px solid var(--border); color: inherit; text-decoration: none; }
.wa-item:hover { background: var(--surface-2); }
.wa-item.ativo { background: var(--copper-tint); }
.wa-av { flex: 0 0 36px; height: 36px; border-radius: 50%; background: var(--surface-2); color: var(--navy);
  font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.wa-item-corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wa-item-topo { display: flex; justify-content: space-between; gap: 8px; }
.wa-item-topo b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-item-topo small { flex: 0 0 auto; font-size: 11.5px; color: var(--text-faint); }
.wa-item-prev { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-item-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.wa-item-tags .pill, .wa-conv-id .pill { font-size: 10.5px; padding: 1px 7px; }
.wa-tag { font-size: 10.5px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); }
.wa-nl { align-self: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #1fa855; color: #fff;
  font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.wa-conversa { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.wa-conv-cab { display: flex; gap: 10px; align-items: center; padding: 12px 16px 8px; }
.wa-conv-id { display: flex; flex-direction: column; min-width: 0; }
.wa-conv-id b { font-size: 15px; }
.wa-conv-id small { font-size: 12px; color: var(--text-muted); }
.wa-voltar { display: none; font-size: 26px; line-height: 1; color: var(--text-muted); text-decoration: none; padding: 0 4px; }
#wa-topo { flex: 0 0 auto; padding-bottom: 10px; border-bottom: 1px solid var(--border); box-shadow: 0 4px 10px -8px rgba(15, 27, 45, .25); position: relative; z-index: 1; }
.wa-conv-acoes { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px; }
.wa-conv-acoes .btn { padding: 5px 11px; font-size: 12.5px; min-height: 0; }
.wa-triagem { margin: 10px 16px 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13px; }
.wa-triagem summary { cursor: pointer; font-weight: 700; }
.wa-triagem dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 8px 0 0; }
.wa-triagem dt { color: var(--text-muted); }
.wa-triagem dd { margin: 0; }
.wa-triagem p { margin: 8px 0 0; }
.wa-motivo { color: #b45309; }
[data-theme="dark"] .wa-motivo { color: #f0b46a; }
.wa-msgs { flex: 1; min-height: 0; overflow: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.wa-dia { align-self: center; margin: 6px 0; font-size: 11px; color: var(--text-muted); }
.wa-dia span { background: var(--surface-2); border-radius: 999px; padding: 2px 10px; }
.wa-msg { max-width: min(78%, 560px); padding: 7px 10px 5px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; }
.wa-msg.entrada { align-self: flex-start; background: var(--surface-2); border-top-left-radius: 4px; }
.wa-msg.saida { align-self: flex-end; background: var(--wa-saida); border-top-right-radius: 4px; }
.wa-msg.saida.bot { background: var(--wa-bot); }
.wa-autor { font-size: 11px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.wa-texto { white-space: pre-wrap; overflow-wrap: anywhere; }
.wa-meta { text-align: right; font-size: 10.5px; color: var(--text-faint); margin-top: 2px; }
.wa-sit-lido { color: var(--wa-lido); }
.wa-sit-falhou, .wa-erro { color: var(--red); }
.wa-erro { font-size: 11.5px; }
.wa-anexo { display: block; margin-bottom: 4px; padding: 6px 10px; border: 1px dashed var(--border-strong); border-radius: 8px;
  background: transparent; color: inherit; font: inherit; font-size: 12.5px; cursor: pointer; }
.wa-img { display: block; max-width: 260px; max-height: 260px; margin-bottom: 4px; border-radius: 8px; cursor: zoom-in; }
#wa-rodape { padding: 10px 16px; border-top: 1px solid var(--border); }
.wa-compor { display: flex; gap: 8px; align-items: flex-end; }
.wa-compor textarea { flex: 1; resize: vertical; min-height: 44px; max-height: 160px; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.wa-compor textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--ring); }
.wa-dica { margin-top: 6px; font-size: 11.5px; color: var(--text-muted); }
.wa-aviso { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13px; color: var(--text-muted); }
.wa-vazio { padding: 24px 16px; text-align: center; font-size: 13px; color: var(--text-muted); }
.wa-escolha { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.wa-escolha .svg-ico { width: 42px; height: 42px; color: var(--text-faint); }
/* Conexões do WhatsApp e da secretária (modal) */
.wa-cx h4 { margin: 4px 0 10px; font-size: 14px; }
.wa-cx h4 + * { margin-top: 0; }
.wa-cx-opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.wa-cx-op { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.wa-cx-op:has(input:checked) { border-color: var(--gold); background: var(--copper-tint); }
.wa-cx-op span { display: flex; flex-direction: column; gap: 2px; }
.wa-cx-op small { color: var(--text-muted); font-size: 12px; line-height: 1.4; }
.wa-cx-linha { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 8px; }
.wa-cx-url { font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; }
.wa-cx-url code { font-size: 11.5px; }
.wa-cx-apagar { font-size: 12px; color: var(--text-muted); }
.wa-cx-res { font-size: 13px; margin: 0 0 14px; min-height: 0; }
.wa-cx-res:empty { display: none; }
.wa-cx-res.ok { color: var(--green); }
.wa-cx-res.falha { color: var(--red); }
.wa-cx-qr { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin: 0 0 14px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.wa-cx-qr img { width: 220px; height: 220px; background: #fff; padding: 8px; border-radius: 8px; image-rendering: pixelated; }
.wa-cx-qr ol { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; flex: 1; min-width: 200px; }
.wa-cx-codigo { flex-basis: 100%; font-size: 12.5px; color: var(--text-muted); }
.wa-cx-qr-ok { color: var(--green); font-size: 13.5px; }
@media (max-width: 720px) {
  .wa-cx-opcoes { grid-template-columns: 1fr; }
  .wa-quadro { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .wa-quadro.com-conversa .wa-lista { display: none; }
  .wa-quadro:not(.com-conversa) .wa-conversa { display: none; }
  .wa-lista { border-right: none; }
  .wa-voltar { display: block; }
  .wa-msg { max-width: 88%; }
}
.wa-audio { display: block; width: 280px; max-width: 100%; height: 40px; margin-bottom: 4px; }
.wa-video { display: block; max-width: 100%; max-height: 320px; border-radius: 8px; margin-bottom: 4px; background: #000; }
a.wa-anexo { text-decoration: none; display: inline-block; }
/* Credenciais: endereços conhecidos do MNI (1º/2º grau) */
.cred-ends { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 6px; }
.cred-end { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 10px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.cred-end b { font-size: 12.5px; }
.cred-end small { font-size: 11px; color: var(--text-muted); }
.cred-end:hover { border-color: var(--border-strong); }
.cred-end.ativo { border-color: var(--gold); background: var(--copper-tint); }

/* ---- Financeiro › Cobranças ---- */
.cob-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px 130px auto; align-items: center; gap: 16px; padding: 14px 18px; margin-bottom: 8px; border-left: 3px solid transparent; }
.cob-row.cob-atrasada { border-left-color: var(--red); }
.cob-row.cob-paga { border-left-color: var(--green); }
.cob-row.cob-cancelada { opacity: .6; }
.cob-desc { font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cob-sub { margin-top: 3px; font-size: 13px; color: var(--text-muted); }
.cob-sub a { color: var(--blue); text-decoration: none; }
.cob-venc { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; font-size: 13px; }
.cob-venc .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); }
.cob-valor { font-weight: 700; font-size: 16px; text-align: right; white-space: nowrap; }
.cob-valor.late, .cob-late { color: var(--red); }
.cob-acoes { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
/* Contrato: "recebido … · falta …" é mais largo que a coluna de 130px das cobranças e passava por baixo dos botões. */
@media (min-width: 901px) { .cob-row.ct-row { grid-template-columns: minmax(0, 1fr) 190px 250px auto; } }
.cob-kpis { margin-bottom: 16px; }
.cob-nova-mobile { display: none; }
@media (max-width: 900px) {
  .cob-nova-mobile { display: inline-flex; }
  .cob-row { grid-template-columns: 1fr auto; }
  .cob-venc { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  .cob-acoes { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---- Documentos do processo e do cliente ---- */
.doc-lista { display: flex; flex-direction: column; }
.doc-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--border); }
.doc-lista > .doc-row:first-child { border-top: 0; }
.doc-versoes { background: var(--surface-2); }
.doc-versao { padding-left: 38px; border-top: 1px dashed var(--border); }
.doc-ico { font-size: 22px; line-height: 1.2; flex: none; }
.doc-main { flex: 1; min-width: 0; }
.doc-tit { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.doc-vers { border: 0; cursor: pointer; font: inherit; font-size: 11px; font-weight: 600; }
.doc-meta { margin-top: 3px; font-size: 12.5px; color: var(--text-muted); overflow-wrap: anywhere; }
.doc-meta a { color: var(--blue); text-decoration: none; }
.doc-desc { margin-top: 4px; font-size: 13px; color: var(--text-muted); }
.doc-acoes { display: flex; gap: 2px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.doc-dica { padding: 8px 14px 12px; font-size: 12px; color: var(--text-faint); }
#docs-panel.docs-alvo { outline: 2px dashed var(--blue); outline-offset: -2px; background: rgba(42, 84, 148, .05); }
@media (max-width: 640px) {
  .doc-row { flex-wrap: wrap; }
  .doc-acoes { width: 100%; justify-content: flex-start; padding-left: 34px; }
}

/* ---- Partes do processo e conflito de interesses ---- */
.parte-lista { padding: 0 14px 6px; }
.parte-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.parte-polo { flex: none; width: 58px; font-size: 10px; letter-spacing: .08em; font-weight: 800; text-transform: uppercase; }
.parte-main { flex: 1; min-width: 0; }
.parte-nome { font-weight: 700; overflow-wrap: anywhere; }
.parte-meta { font-size: 12.5px; color: var(--text-muted); overflow-wrap: anywhere; }
.conf-row { padding: 10px 0; border-top: 1px solid var(--border); }
.conf-ok, .conf-info, .conf-alerta { margin: 4px 0 10px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13.5px; }
.conf-ok { background: rgba(16,185,129,.10); color: #047857; }
.conf-info { background: rgba(42,84,148,.08); color: var(--navy); }
.conf-alerta { background: rgba(220,38,38,.09); color: #b91c1c; font-weight: 600; }

/* ---- Relatórios ---- */
.rel-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.rel-filtros { gap: 10px; }
.rel-datas { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); }
.rel-datas input[type="date"] { font: inherit; font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 8px; }
.rel-card { padding: 0; overflow: hidden; }
.rel-scroll { overflow-x: auto; }
.rel-tabela { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rel-tabela th { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); line-height: 1.25; vertical-align: bottom; }
.rel-tabela td { padding: 9px 12px; border-top: 1px solid var(--border); }
.rel-tabela td:first-child { white-space: nowrap; font-weight: 600; }
.rel-tabela tbody tr:first-child td { border-top: 0; }
.rel-tabela .rel-num { text-align: right; font-variant-numeric: tabular-nums; }
.rel-tabela tfoot td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--border); }
.rel-alerta { color: var(--red); font-weight: 600; }
.rel-nota { padding: 10px 14px; font-size: 12px; color: var(--text-faint); border-top: 1px solid var(--border); }
.rel-faixas { padding: 14px 18px; margin-bottom: 16px; }
.rel-faixas-tit { font-size: 12px; font-weight: 600; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.rel-faixa { display: grid; grid-template-columns: 130px 1fr 230px; align-items: center; gap: 12px; padding: 5px 0; font-size: 13px; }
.rel-faixa-barra { height: 8px; border-radius: 9999px; background: var(--surface-2); overflow: hidden; }
.rel-faixa-barra i { display: block; height: 100%; border-radius: 9999px; background: var(--red); }
.rel-faixa-val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.rel-faixa-val small { font-weight: 400; color: var(--text-faint); }
.rel-neutra .rel-faixa-barra i { background: var(--navy); }
.rel-grupo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rel-grupo-rot { min-width: 78px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); }
.fin-rel-barra { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
@media (max-width: 640px) {
  .rel-faixa { grid-template-columns: 1fr; gap: 4px; }
  .rel-faixa-val { text-align: left; }
  .rel-filtros .seg:last-of-type { margin-left: 0 !important; }
}

/* ---- Permissões por pessoa (Editar/Adicionar membro) ---- */
.perm-box { margin: 2px 0 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px 4px; }
.perm-tit { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 13px; }
.perm-volta { font-size: 12px; font-weight: 600; cursor: pointer; color: var(--blue); }
.perm-aviso { margin: 2px 0 4px; }
.perm-item { padding: 10px 0; gap: 14px; }
.perm-item:first-of-type { border-top: 0; }
.perm-rot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.perm-dica { margin: 2px 0 0; font-weight: 400; }
.perm-item:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.perm-travada { opacity: .55; cursor: not-allowed; }
/* Alcance e tipos do financeiro (aparece com o financeiro ligado) */
.perm-fin { border-top: 1px solid var(--border); padding: 12px 0 10px; }
.perm-fin-tit { font-weight: 700; font-size: 13px; margin: 0 0 6px; }
.perm-fin .select { width: 100%; margin-bottom: 4px; }
.perm-fin .perm-dica { margin: 2px 0 12px; }
.perm-fin-lista { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.perm-chk { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.perm-chk input { margin: 0; }
@media (max-width: 520px) { .perm-fin-lista { grid-template-columns: 1fr; } }
.fin-carteira-aviso { margin: 0 0 14px; font-size: 13px; }
.member-fin { color: var(--amber, #b45309); }

/* ============================================================
   Processos e Atendimentos numa tela só (02/11/2026)
   Faixa de etapas agrupada, linha de atendimento, menu "+ Novo".
   ============================================================ */
.etapas { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 0 0 14px; }
.etapas .grupo { display: flex; flex-direction: column; gap: 5px; }
.etapas .grupo > small { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.etapas .grupo > div { display: flex; flex-wrap: wrap; gap: 6px; }
.etapas .et { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-family: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 5px 9px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.etapas .et i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--border-strong)); flex: 0 0 8px; }
.etapas .et b { font-size: 11px; background: var(--surface-2); color: var(--heading); border-radius: 9999px; padding: 1px 7px; }
.etapas .et:hover { border-color: var(--border-strong); color: var(--text); }
.etapas .et.active { border-color: var(--gold); color: var(--heading); box-shadow: 0 0 0 3px var(--ring); }
.etapas .sep { align-self: stretch; width: 1px; background: var(--border); margin: 14px 0 0; }
.etapas .grupo.fora .et { background: transparent; border-style: dashed; }
.proc-linha.at { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); box-shadow: inset 3px 0 0 var(--c, var(--border-strong)); }
.proc-linha.at:hover { background: var(--surface-2); }
.proc-linha .anel { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--c, var(--text-faint)); box-sizing: border-box; }
.proc-linha .pl-sub .vazio { font-style: italic; color: var(--text-faint); }
.proc-linha .marcadores { margin-top: 4px; }
.proc-linha .pl-datas small { display: block; }
.proc-linha .acao { display: none; margin-left: 8px; font: inherit; font-size: 11px; font-weight: 700; color: var(--heading); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px; padding: 2px 9px; cursor: pointer; }
.proc-linha:hover .acao, .proc-linha .acao:focus-visible { display: inline-block; }
.proc-linha .acao:hover { border-color: var(--gold); box-shadow: 0 0 0 3px var(--ring); }
@media (hover: none) { .proc-linha .acao { display: inline-block; } }
.proc-linha .kind { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; margin-right: 6px; vertical-align: 1px; }
.oculto-aviso { font-size: 12.5px; color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 8px; padding: 8px 13px; margin: 0 0 10px; }
.oculto-aviso b { color: var(--heading); }
.oculto-aviso .btn { padding: 3px 10px; margin-left: 8px; }
.novo { position: relative; display: inline-flex; }
.novo-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 250px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; }
.novo.aberto .novo-menu { display: block; }
.novo-menu button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; border: 0; background: none; font: inherit; text-align: left; padding: 8px 10px; border-radius: 7px; cursor: pointer; color: var(--heading); font-size: 13px; font-weight: 600; white-space: normal; }
.novo-menu button span { font-size: 11.5px; font-weight: 400; color: var(--text-muted); }
.novo-menu button:hover { background: var(--surface-2); }
.pet-herda { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.55; }
.pet-herda b { color: var(--heading); }
.funil-fora .clicavel { cursor: pointer; }
.funil-fora .clicavel:hover { border-color: var(--text-muted); color: var(--heading); }
.proc-linha .anel { grid-area: dot; }
.proc-linha.at > span:first-child { grid-area: chk; }

/* Celular: a barra de ações de Processos quebra linha em vez de rolar — senão o menu + Novo (absoluto) é cortado pelo overflow. */
@media (max-width: 720px) {
  .page-head.page-head-acoes:has(.novo) { overflow: visible; flex-wrap: wrap; }
  .page-head.page-head-acoes:has(.novo) > div { flex-wrap: wrap !important; }
  .page-head.page-head-acoes:has(.novo) .novo-menu { right: auto; left: 0; max-width: calc(100vw - 28px); }
}

/* Faixa de etapas recolhida: o recorte (Mostrar) e o botão que abre as etapas, numa linha só. */
.etapas .et-tog { align-self: flex-end; border-style: dashed; background: transparent; }
.etapas .et-tog.active { border-style: solid; }

/* Clientes: a busca acompanha a rolagem (toolbar.fixa); no celular ocupa a largura toda, já que é o único controle. */
.cli-toolbar.fixa { padding-bottom: 14px; }
@media (max-width: 720px) { .cli-toolbar.fixa .search { flex: 1 1 auto; max-width: none; } }
