/* Qore ABM — design system v4 (padrão visual da plataforma Escale)
   - fundo branco, superfícies cinza bem claro, bordas de 1 px, cantos de 8 a 12 px, sombras mínimas;
   - trilho de ícones (módulos) + barra lateral da seção + barra superior branca com seletor do workspace;
   - botão primário preto; cor só em pontos, ícones de status e pílulas;
   - Inter (local) ou a fonte do sistema, 13–14 px como base; texto secundário cinza;
   - teclado: ⌘K, "/", G + letra, "?"; foco sempre visível.
   Os componentes estão documentados em docs/design-system.md. */

:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* escala tipográfica */
  --fs-xs: 11px; --fs-sm: 12px; --fs-base: 13px; --fs-md: 14px; --fs-lg: 16px; --fs-xl: 20px; --fs-2xl: 26px; --fs-3xl: 32px;
  /* espaçamento (grade de 4 px) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  /* raios */
  --r-sm: 6px; --r-md: 8px; --r-lg: 10px; --r-xl: 12px; --r-pill: 999px;
  --radius: var(--r-xl); --radius-sm: var(--r-md);
  /* layout */
  --rail-w: 60px; --sidebar-w: 260px; --topbar-h: 56px; --content-max: 1480px; --statusbar-h: 34px;
  /* controles e densidade */
  --control-h: 32px; --control-h-lg: 36px; --cell-py: 10px; --cell-px: 12px; --card-pad: 16px;
  /* movimento */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1); --dur: 140ms;

  /* superfícies e texto */
  --bg: #ffffff; --surface: #ffffff; --surface-2: #f7f7f8; --surface-3: #f0f0f2; --surface-hover: #f4f4f6;
  --surface-raised: #ffffff; --surface-overlay: #ffffff; --surface-sunken: var(--surface-2);
  --border: #e6e7ea; --border-subtle: #eeeff2; --border-strong: #d4d6db;
  --text: #15171b; --text-2: #3b3f47; --muted: #6b7079; --muted-2: #9a9fa8;

  /* ação primária (preto) e links */
  --primary: #141518; --primary-hover: #2b2d33; --primary-fg: #ffffff;
  --brand: var(--primary); --brand-hover: var(--primary-hover); --brand-fg: var(--primary-fg); --brand-soft: var(--surface-3); --brand-text: var(--text);
  --link: #2563eb; --ring: rgba(20, 21, 24, 0.14);

  /* paleta de status (ponto, ícone, pílula) */
  --c-gray: #a1a6ae; --c-gray-soft: #f0f0f2; --c-gray-text: #4b5058;
  --c-blue: #2f6fe4; --c-blue-soft: #e8f0fe; --c-blue-text: #1d4ed8;
  --c-violet: #7c5ce6; --c-violet-soft: #efeafd; --c-violet-text: #5b3fc4;
  --c-amber: #e9a23b; --c-amber-soft: #fff3dc; --c-amber-text: #9a5b00;
  --c-orange: #f0742e; --c-orange-soft: #fdeee4; --c-orange-text: #b4480f;
  --c-green: #22a06b; --c-green-soft: #e6f6ee; --c-green-text: #157a4c;
  --c-red: #e5484d; --c-red-soft: #fdecec; --c-red-text: #c62f35;
  --c-teal: #0f9d93; --c-teal-soft: #e3f6f4; --c-teal-text: #0b6f69;
  --c-pink: #e0569a; --c-pink-soft: #fde8f2; --c-pink-text: #b0306f;

  /* semânticas (compatibilidade com os nomes antigos) */
  --success: var(--c-green); --success-soft: var(--c-green-soft); --success-text: var(--c-green-text);
  --warning: var(--c-amber); --warning-soft: var(--c-amber-soft); --warning-text: var(--c-amber-text);
  --danger: var(--c-red); --danger-soft: var(--c-red-soft); --danger-text: var(--c-red-text);
  --info: var(--c-blue); --info-soft: var(--c-blue-soft); --info-text: var(--c-blue-text);
  --accent: var(--c-teal-text); --accent-soft: var(--c-teal-soft);
  --teal: var(--c-teal); --teal-soft: var(--c-teal-soft); --teal-text: var(--c-teal-text);
  --orange-soft: var(--c-orange-soft); --orange-text: var(--c-orange-text);
  --violet-soft: var(--c-violet-soft); --violet-text: var(--c-violet-text);
  --pink-soft: var(--c-pink-soft); --pink-text: var(--c-pink-text);

  /* sombras: só para o que flutua */
  --shadow-xs: 0 1px 2px rgba(20, 21, 24, 0.05);
  --shadow-sm: 0 1px 2px rgba(20, 21, 24, 0.06), 0 2px 8px rgba(20, 21, 24, 0.04);
  --shadow-overlay: 0 12px 32px rgba(20, 21, 24, 0.14), 0 2px 6px rgba(20, 21, 24, 0.06);
  --shadow: var(--shadow-sm); --shadow-raised: var(--shadow-sm); --shadow-lg: var(--shadow-overlay);

  /* monogramas (cor derivada do nome) */
  --mono-l: 93%; --mono-s: 60%; --mono-text-l: 36%; --mono-border-l: 86%;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101114; --surface: #16171b; --surface-2: #1c1d22; --surface-3: #232429; --surface-hover: #202126;
    --surface-raised: #1c1d22; --surface-overlay: #202126;
    --border: #2a2b31; --border-subtle: #222328; --border-strong: #3a3b42;
    --text: #ececef; --text-2: #c9cbd1; --muted: #9a9ea7; --muted-2: #6d717a;
    --primary: #f2f2f4; --primary-hover: #dedfe3; --primary-fg: #101114; --ring: rgba(242, 242, 244, 0.22);
    --link: #8ab4ff;
    --c-gray-soft: #2a2b31; --c-gray-text: #c9cbd1;
    --c-blue-soft: rgba(47, 111, 228, 0.18); --c-blue-text: #9ec0ff;
    --c-violet-soft: rgba(124, 92, 230, 0.2); --c-violet-text: #c3b4fb;
    --c-amber-soft: rgba(233, 162, 59, 0.18); --c-amber-text: #f5c56e;
    --c-orange-soft: rgba(240, 116, 46, 0.18); --c-orange-text: #f6a26f;
    --c-green-soft: rgba(34, 160, 107, 0.18); --c-green-text: #7ad7ab;
    --c-red-soft: rgba(229, 72, 77, 0.18); --c-red-text: #f29a9d;
    --c-teal-soft: rgba(15, 157, 147, 0.18); --c-teal-text: #72d6cf;
    --c-pink-soft: rgba(224, 86, 154, 0.18); --c-pink-text: #f3a6cc;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-overlay: 0 16px 40px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
    --mono-l: 24%; --mono-s: 34%; --mono-text-l: 82%; --mono-border-l: 32%;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101114; --surface: #16171b; --surface-2: #1c1d22; --surface-3: #232429; --surface-hover: #202126;
  --surface-raised: #1c1d22; --surface-overlay: #202126;
  --border: #2a2b31; --border-subtle: #222328; --border-strong: #3a3b42;
  --text: #ececef; --text-2: #c9cbd1; --muted: #9a9ea7; --muted-2: #6d717a;
  --primary: #f2f2f4; --primary-hover: #dedfe3; --primary-fg: #101114; --ring: rgba(242, 242, 244, 0.22);
  --link: #8ab4ff;
  --c-gray-soft: #2a2b31; --c-gray-text: #c9cbd1;
  --c-blue-soft: rgba(47, 111, 228, 0.18); --c-blue-text: #9ec0ff;
  --c-violet-soft: rgba(124, 92, 230, 0.2); --c-violet-text: #c3b4fb;
  --c-amber-soft: rgba(233, 162, 59, 0.18); --c-amber-text: #f5c56e;
  --c-orange-soft: rgba(240, 116, 46, 0.18); --c-orange-text: #f6a26f;
  --c-green-soft: rgba(34, 160, 107, 0.18); --c-green-text: #7ad7ab;
  --c-red-soft: rgba(229, 72, 77, 0.18); --c-red-text: #f29a9d;
  --c-teal-soft: rgba(15, 157, 147, 0.18); --c-teal-text: #72d6cf;
  --c-pink-soft: rgba(224, 86, 154, 0.18); --c-pink-text: #f3a6cc;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-overlay: 0 16px 40px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
  --mono-l: 24%; --mono-s: 34%; --mono-text-l: 82%; --mono-border-l: 32%;
  color-scheme: dark;
}
:root[data-density="compact"] { --cell-py: 6px; --card-pad: 12px; --control-h: 30px; --control-h-lg: 32px; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-md); background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; color: var(--text); line-height: 1.25; }
h1 { font-size: 20px; letter-spacing: -0.02em; }
h2 { font-size: 15px; }
h3 { font-size: 14px; }
p { margin: 0 0 10px; }
small, .text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.text-base { font-size: var(--fs-base); }
.text-muted { color: var(--muted); }
.text-danger { color: var(--c-red-text); } .text-success { color: var(--c-green-text); } .text-warning { color: var(--c-amber-text); }
.text-right { text-align: right; } .text-center { text-align: center; }
.nowrap { white-space: nowrap; } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono, .num, .tabular { font-variant-numeric: tabular-nums; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .wrap { flex-wrap: wrap; } .grow { flex: 1; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: -3px; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 20px; height: 20px; }
kbd { font-family: var(--font); font-size: 10.5px; line-height: 1.4; min-width: 18px; text-align: center; display: inline-block; padding: 1px 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; color: var(--muted); background: var(--surface); }
code, .code { font-family: var(--mono); font-size: 0.86em; background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }
::selection { background: var(--c-blue-soft); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.sidebar-nav, .kanban, .table-wrap, .palette-list, .subnav { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.kanban::-webkit-scrollbar, .table-wrap::-webkit-scrollbar, .subnav::-webkit-scrollbar { height: 8px; }
.sidebar-nav::-webkit-scrollbar, .palette-list::-webkit-scrollbar { width: 8px; }
.sidebar-nav::-webkit-scrollbar-thumb, .kanban::-webkit-scrollbar-thumb, .table-wrap::-webkit-scrollbar-thumb, .palette-list::-webkit-scrollbar-thumb, .subnav::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--surface); color: var(--text); padding: 8px 12px; border-radius: 8px; box-shadow: var(--shadow-overlay); font-size: var(--fs-base); }
.skip-link:focus { left: 12px; }

/* ---------- pontos e ícones de status (cor por estado) ---------- */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c-gray); flex-shrink: 0; }
.sico { display: inline-flex; width: 16px; height: 16px; flex-shrink: 0; color: var(--c-gray); align-items: center; justify-content: center; }
.sico .icon { width: 16px; height: 16px; stroke-width: 2; }
.tone-gray { color: var(--c-gray); } .tone-blue { color: var(--c-blue); } .tone-violet { color: var(--c-violet); } .tone-amber { color: var(--c-amber); }
.tone-orange { color: var(--c-orange); } .tone-green { color: var(--c-green); } .tone-red { color: var(--c-red); } .tone-teal { color: var(--c-teal); } .tone-pink { color: var(--c-pink); }
.dot.tone-gray { background: var(--c-gray); } .dot.tone-blue { background: var(--c-blue); } .dot.tone-violet { background: var(--c-violet); } .dot.tone-amber { background: var(--c-amber); }
.dot.tone-orange { background: var(--c-orange); } .dot.tone-green { background: var(--c-green); } .dot.tone-red { background: var(--c-red); } .dot.tone-teal { background: var(--c-teal); } .dot.tone-pink { background: var(--c-pink); }

/* ---------- barra superior ---------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--border); z-index: 50; display: flex; align-items: center; gap: 6px; padding: 0 16px 0 14px; }
.ws { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 4px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; cursor: pointer; }
.ws:hover { background: var(--surface-hover); text-decoration: none; }
.ws-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--primary); color: var(--primary-fg); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; overflow: hidden; }
.ws-mark img { width: 22px; height: 22px; display: block; }
.ws .icon { color: var(--muted); width: 15px; height: 15px; }
.ws small { font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 2px; }
.topbar .spacer { flex: 1; }
.tb-item { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px; border-radius: 9px; color: var(--text); font-weight: 500; font-size: 14px; background: none; border: 0; font-family: inherit; cursor: pointer; position: relative; white-space: nowrap; }
.tb-item:hover { background: var(--surface-hover); text-decoration: none; }
.tb-item .icon { width: 18px; height: 18px; color: var(--text-2); }
.tb-item .badge-n { position: absolute; top: 1px; left: 19px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 999px; background: var(--c-red); color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; border: 2px solid var(--surface); box-sizing: content-box; }
.tb-item .ping { position: absolute; top: 7px; left: 24px; width: 7px; height: 7px; border-radius: 50%; background: var(--c-red); border: 2px solid var(--surface); }
.menu-toggle { display: none; }
.dropdown { position: relative; }
.dropdown summary { list-style: none; cursor: pointer; }
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown .menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface-overlay); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-overlay); min-width: 240px; padding: 6px; z-index: 60; animation: pop var(--dur) var(--ease); }
.dropdown .menu.left { right: auto; left: 0; }
.dropdown .menu a, .dropdown .menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; height: 34px; padding: 0 10px; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; font-size: var(--fs-base); white-space: nowrap; }
.dropdown .menu a:hover, .dropdown .menu button:hover { background: var(--surface-hover); text-decoration: none; }
.dropdown .menu a kbd, .dropdown .menu button kbd { margin-left: auto; }
.dropdown .menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 4px; font-size: var(--fs-base); display: flex; gap: 10px; align-items: center; }
.dropdown .menu .who .grow { min-width: 0; }
.dropdown .menu .sep { height: 1px; background: var(--border-subtle); margin: 4px 0; }
.dropdown .menu .icon { color: var(--muted); }
.dropdown .menu .label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); padding: 8px 10px 3px; font-weight: 600; }
.user-menu summary { display: flex; align-items: center; cursor: pointer; padding: 2px; border-radius: 999px; }
.user-menu summary:hover { background: var(--surface-hover); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 11px; flex-shrink: 0; letter-spacing: 0.02em; }
.avatar.sm { width: 24px; height: 24px; font-size: 9.5px; }
.avatar.lg { width: 36px; height: 36px; font-size: 13px; }
.avatars { display: inline-flex; }
.avatars .avatar + .avatar { margin-left: -6px; }
@keyframes pop { from { transform: translateY(-4px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- trilho de módulos ---------- */
.rail { position: fixed; left: 0; top: var(--topbar-h); bottom: 0; width: var(--rail-w); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 8px; z-index: 40; }
.rail a { position: relative; width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.rail a:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.rail a.active { background: var(--surface-3); color: var(--rail-tone, var(--text)); }
.rail a.active::before { content: ""; position: absolute; left: -8px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.rail a .icon { width: 22px; height: 22px; stroke-width: 1.9; }
.rail a[data-tone="home"] { --rail-tone: var(--c-teal); } .rail a[data-tone="crm"] { --rail-tone: var(--c-violet); }
.rail a[data-tone="abm"] { --rail-tone: var(--c-orange); } .rail a[data-tone="acoes"] { --rail-tone: var(--c-green); }
.rail a.active .icon { color: var(--rail-tone, var(--text)); }
.rail .rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; align-items: center; }

/* ---------- barra lateral da seção ---------- */
.sidebar { position: fixed; left: var(--rail-w); top: var(--topbar-h); bottom: 0; width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 39; transition: transform var(--dur) var(--ease); }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 14px 10px 22px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.sidebar-head .collapse-btn { background: none; border: 0; color: var(--muted); width: 28px; height: 28px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.sidebar-head .collapse-btn:hover { background: var(--surface-hover); color: var(--text); }
.sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 2px 10px 12px; }
.sidebar-nav a, .sidebar-nav summary { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 6px 12px; border-radius: 9px; color: var(--text); font-size: 14px; font-weight: 450; white-space: nowrap; transition: background var(--dur) var(--ease); list-style: none; cursor: pointer; }
.sidebar-nav summary::-webkit-details-marker { display: none; }
.sidebar-nav a:hover, .sidebar-nav summary:hover { background: var(--surface-hover); text-decoration: none; }
.sidebar-nav a.active { background: var(--surface-3); font-weight: 500; }
.sidebar-nav a .n { margin-left: auto; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sidebar-nav a .n.alert { color: var(--c-red-text); font-weight: 600; }
.sidebar-nav a .hint { margin-left: auto; opacity: 0; font-size: 10px; }
.sidebar-nav a:hover .hint { opacity: 0.8; }
.sidebar-nav a .n + .hint { margin-left: 6px; }
.sidebar-section { display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; }
.sidebar-section .acts { display: inline-flex; gap: 2px; }
.sidebar-section .acts a, .sidebar-section .acts button { width: 24px; height: 24px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted-2); background: none; border: 0; cursor: pointer; }
.sidebar-section .acts a:hover, .sidebar-section .acts button:hover { background: var(--surface-hover); color: var(--text); }
.tree details { margin: 0; }
.tree summary .chev { width: 14px; height: 14px; color: var(--muted-2); transition: transform var(--dur) var(--ease); margin-left: -2px; }
.tree details[open] > summary .chev { transform: rotate(90deg); }
.tree .sq { width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0; }
.tree .sq .icon { width: 13px; height: 13px; stroke-width: 2.2; }
.tree .sq.tone-blue { background: var(--c-blue); } .tree .sq.tone-violet { background: var(--c-violet); } .tree .sq.tone-orange { background: var(--c-orange); }
.tree .sq.tone-green { background: var(--c-green); } .tree .sq.tone-teal { background: var(--c-teal); } .tree .sq.tone-amber { background: var(--c-amber); }
.tree .sq.tone-red { background: var(--c-red); } .tree .sq.tone-pink { background: var(--c-pink); } .tree .sq.tone-gray { background: var(--c-gray); }
.tree .leaves { padding-left: 22px; }
.tree .leaves a { min-height: 32px; font-size: 13.5px; color: var(--text-2); }
.tree .leaves a .icon { width: 15px; height: 15px; color: var(--muted-2); }
.sidebar-foot { border-top: 1px solid var(--border); padding: 8px 10px; }
.sidebar-foot a { display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 6px 12px; border-radius: 9px; color: var(--text); font-size: 14px; }
.sidebar-foot a:hover { background: var(--surface-hover); text-decoration: none; }
.sidebar-foot a .icon { color: var(--text-2); width: 18px; height: 18px; }
.sidebar-foot a .chev { margin-left: auto; color: var(--muted); }
.sidebar-foot a.active { background: var(--surface-3); }

/* ---------- área principal ---------- */
.app { min-height: 100vh; }
.main { margin-left: calc(var(--rail-w) + var(--sidebar-w)); padding-top: var(--topbar-h); min-width: 0; display: flex; flex-direction: column; min-height: 100vh; transition: margin-left var(--dur) var(--ease); }
.app.collapsed .sidebar { display: none; }
.app.collapsed .main { margin-left: var(--rail-w); }
.content { padding: 22px 28px 72px; width: 100%; max-width: var(--content-max); }
.content.narrow { max-width: 1120px; }

.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.page-header h1 { font-size: 19px; }
.page-header .subtitle { color: var(--muted); margin-top: 3px; font-size: var(--fs-base); max-width: 900px; }
.page-header .title-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.breadcrumbs { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 8px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs .sep { color: var(--muted-2); }

/* abas de visão (Lista, Quadro…) e sub-menu de seções */
.view-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 0 0 14px; overflow-x: auto; }
.view-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; color: var(--muted); font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.view-tabs a .icon { width: 16px; height: 16px; }
.view-tabs a:hover { color: var(--text); text-decoration: none; }
.view-tabs a.active { color: var(--text); border-bottom-color: var(--text); }
.view-tabs a.save { color: var(--muted); }
.view-tabs a .n { font-size: 11px; background: var(--surface-3); border-radius: 999px; padding: 0 6px; color: var(--muted); line-height: 17px; }
.subnav { display: flex; gap: 2px; flex-wrap: nowrap; overflow-x: auto; margin: 0 0 16px; border-bottom: 1px solid var(--border); position: sticky; top: var(--topbar-h); z-index: 20; background: var(--bg); }
.subnav a { padding: 9px 11px; font-size: 13.5px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a:hover, .subnav a.active { color: var(--text); text-decoration: none; }
.subnav a.active { border-bottom-color: var(--text); }
.subnav a .n { font-size: 11px; background: var(--surface-3); border-radius: 999px; padding: 0 6px; color: var(--muted); line-height: 17px; }

/* barra de ferramentas da lista (busca, Filtro, Eu, ações, botão primário) */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.toolbar .search { position: relative; width: 280px; max-width: 100%; }
.toolbar .search .icon { position: absolute; left: 10px; top: 9px; color: var(--muted); pointer-events: none; }
.toolbar .search input { width: 100%; height: 34px; padding: 0 10px 0 32px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); font: inherit; font-size: var(--fs-base); color: var(--text); }
.toolbar .search input:focus { outline: none; border-color: var(--border-strong); box-shadow: 0 0 0 3px var(--ring); }
.tb-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--text-2); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.tb-btn:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.tb-btn.active { background: var(--surface-3); color: var(--text); }
.tb-btn .icon { width: 16px; height: 16px; }
.tb-btn .n { font-size: 11px; background: var(--primary); color: var(--primary-fg); border-radius: 999px; min-width: 17px; height: 17px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; }
.tb-sep { width: 1px; height: 22px; background: var(--border); margin: 0 2px; }
.filters-panel { display: none; }
.filters-panel.open { display: block; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-xl); margin-bottom: 14px; }
.filters .field { min-width: 130px; margin: 0; }
.filters .field label { font-size: 11.5px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.filters .field input, .filters .field select { min-height: var(--control-h); padding: 4px 10px; font-size: var(--fs-base); border-radius: 8px; background: var(--surface); }
.filters .field select { padding-right: 26px; }
.filters .search-field { min-width: 220px; flex: 1; }
.filters .field .check { margin-top: 6px; min-height: var(--control-h); align-items: center; font-size: var(--fs-sm); }
.filters .btn-sm { height: var(--control-h); font-size: var(--fs-base); padding: 0 12px; }

/* ---------- cartões, grades, KPIs ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: clip; }
.card-body { padding: var(--card-pad); }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px var(--card-pad); border-bottom: 1px solid var(--border-subtle); flex-wrap: wrap; min-height: 48px; }
.card-header h2, .card-header h3 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card + .card { margin-top: 14px; }
.card-attention { border-color: color-mix(in srgb, var(--c-red) 45%, transparent); }
a.card { color: inherit; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); display: block; }
a.card:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.card > summary { cursor: pointer; list-style: none; }
.card > summary::-webkit-details-marker { display: none; }
.card[id], .task-group[id] { scroll-margin-top: 110px; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.kpi { padding: 16px 18px; position: relative; }
.kpi-label { font-size: var(--fs-sm); color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: 26px; font-weight: 600; margin-top: 6px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-hint { font-size: var(--fs-sm); color: var(--muted); margin-top: 5px; }
.kpi.alert .kpi-value { color: var(--c-red-text); }
.help-tip { display: inline-flex; width: 15px; height: 15px; border-radius: 50%; background: var(--surface-3); color: var(--muted); font-size: 9.5px; align-items: center; justify-content: center; cursor: help; font-weight: 700; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(340px, 1fr); gap: 14px; align-items: start; }
.feature-card { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.feature-card .fi { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); }
.feature-card .fi .icon { width: 18px; height: 18px; }
.feature-card h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.feature-card p { margin: 0; color: var(--muted); font-size: var(--fs-base); }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-base); }
.table th { position: sticky; top: 0; z-index: 1; text-align: left; font-size: var(--fs-sm); color: var(--muted); padding: 9px var(--cell-px); border-bottom: 1px solid var(--border); background: var(--surface); white-space: nowrap; font-weight: 500; }
.table th a { color: var(--muted); }
.table td { padding: var(--cell-py) var(--cell-px); border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.table tbody tr { transition: background var(--dur) var(--ease); }
.table tbody tr:hover > td { background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table .actions { text-align: right; white-space: nowrap; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table th.num { text-align: right; }
.table tfoot td { font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--border); }
.row-title { font-weight: 500; color: var(--text); line-height: 1.35; }
.row-title a { color: var(--text); }
.row-title a:hover { color: var(--text); }
.row-sub { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }
.table tr.done .row-title { text-decoration: line-through; color: var(--muted); }
.id-cell { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.id-cell > div { min-width: 0; }
.row-actions { display: inline-flex; gap: 2px; align-items: center; opacity: 0; transition: opacity var(--dur) var(--ease); }
tr:hover .row-actions, tr:focus-within .row-actions { opacity: 1; }
@media (hover: none) { .row-actions { opacity: 1; } }
.row-actions .btn-icon { color: var(--muted); }
.row-actions .btn-icon:hover { color: var(--text); background: var(--surface-3); }
tr[data-href] { cursor: pointer; }
tr.row-focus > td { box-shadow: inset 3px 0 0 var(--primary); background: var(--surface-2); }
.table th a.sort { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.table th a.sort::after { content: "↕"; font-size: 10px; opacity: 0.4; }
.table th a.sort:hover { text-decoration: none; color: var(--text); }
.table th a.sort.active { color: var(--text); }
.table th a.sort.active::after { content: "↓"; opacity: 1; }

/* monograma: inicial(is) com cor derivada do nome (empresa quadrado, pessoa redondo) */
.monogram { --hue: 230; width: 28px; height: 28px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; flex-shrink: 0; color: hsl(var(--hue) 45% var(--mono-text-l)); background: hsl(var(--hue) var(--mono-s) var(--mono-l)); border: 1px solid hsl(var(--hue) 40% var(--mono-border-l)); text-decoration: none; }
.monogram.lg { width: 44px; height: 44px; font-size: 15px; border-radius: 11px; }
.monogram.sm { width: 22px; height: 22px; font-size: 9.5px; border-radius: 6px; }
.monogram.round { border-radius: 50%; }

/* ---------- pílulas (badges) ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; background: var(--c-gray-soft); color: var(--c-gray-text); line-height: 1; border: 1px solid transparent; vertical-align: middle; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; display: none; flex-shrink: 0; }
.badge[class*="badge-status-"]::before, .badge[class*="badge-stage-"]::before, .badge[class*="badge-cstatus-"]::before, .badge-success::before, .badge-warning::before, .badge-danger::before, .badge-info::before, .badge-dot::before { display: block; }
.badge-outline { background: transparent; border-color: var(--border-strong); color: var(--muted); }
.badge-success { background: var(--c-green-soft); color: var(--c-green-text); }
.badge-warning { background: var(--c-amber-soft); color: var(--c-amber-text); }
.badge-danger { background: var(--c-red-soft); color: var(--c-red-text); }
.badge-info { background: var(--c-blue-soft); color: var(--c-blue-text); }
.badge-primary { background: var(--c-blue-soft); color: var(--c-blue-text); }
.badge-accent { background: var(--c-teal-soft); color: var(--c-teal-text); }
.badge-violet { background: var(--c-violet-soft); color: var(--c-violet-text); }
.badge-type { background: var(--c-gray-soft); color: var(--c-gray-text); }
.badge-tier-1 { background: var(--c-amber-soft); color: var(--c-amber-text); }
.badge-tier-2 { background: var(--c-blue-soft); color: var(--c-blue-text); }
.badge-tier-3 { background: var(--c-gray-soft); color: var(--muted); }
.badge-icp-alta { background: var(--c-green-soft); color: var(--c-green-text); }
.badge-icp-media { background: var(--c-amber-soft); color: var(--c-amber-text); }
.badge-icp-baixa { background: var(--c-gray-soft); color: var(--muted); }
.badge-status-conta_alvo { background: var(--c-gray-soft); color: var(--c-gray-text); }
.badge-status-em_pesquisa { background: var(--c-blue-soft); color: var(--c-blue-text); }
.badge-status-em_abordagem { background: var(--c-violet-soft); color: var(--c-violet-text); }
.badge-status-em_conversa { background: var(--c-amber-soft); color: var(--c-amber-text); }
.badge-status-reuniao_agendada { background: var(--c-green-soft); color: var(--c-green-text); }
.badge-status-sem_interesse { background: var(--c-red-soft); color: var(--c-red-text); }
.badge-stage-reuniao_agendada { background: var(--c-blue-soft); color: var(--c-blue-text); }
.badge-stage-diagnostico { background: var(--c-violet-soft); color: var(--c-violet-text); }
.badge-stage-proposta { background: var(--c-amber-soft); color: var(--c-amber-text); }
.badge-stage-negociacao { background: var(--c-orange-soft); color: var(--c-orange-text); }
.badge-stage-ganho { background: var(--c-green-soft); color: var(--c-green-text); }
.badge-stage-perdido { background: var(--c-red-soft); color: var(--c-red-text); }
.badge-cstatus-nao_abordado { background: var(--c-gray-soft); color: var(--c-gray-text); }
.badge-cstatus-convite_enviado { background: var(--c-blue-soft); color: var(--c-blue-text); }
.badge-cstatus-conectado { background: var(--c-violet-soft); color: var(--c-violet-text); }
.badge-cstatus-mensagem_enviada { background: var(--c-teal-soft); color: var(--c-teal-text); }
.badge-cstatus-respondeu { background: var(--c-green-soft); color: var(--c-green-text); }
.badge-cstatus-em_conversa { background: var(--c-amber-soft); color: var(--c-amber-text); }
.badge-cstatus-sem_resposta { background: var(--c-gray-soft); color: var(--muted); }
.badge-cstatus-nao_contatar { background: var(--c-red-soft); color: var(--c-red-text); }

/* chips com borda (prioridade, prazo, contadores) usados nos cartões e nas linhas de ação */
.chip-box { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border: 1px solid var(--border); border-radius: 7px; font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); background: var(--surface); white-space: nowrap; }
.chip-box .icon { width: 14px; height: 14px; }
.chip-box.late { color: var(--c-red-text); border-color: color-mix(in srgb, var(--c-red) 45%, transparent); }
.chip-box.late .icon { color: var(--c-red); }
.chip-box.flag-alta .icon { color: var(--c-amber); fill: var(--c-amber); }
.chip-box.flag-urgente .icon { color: var(--c-red); fill: var(--c-red); }
.chip-box.icon-only { width: 26px; padding: 0; justify-content: center; color: var(--muted); }
.chip-box.ok { color: var(--c-green-text); border-color: color-mix(in srgb, var(--c-green) 45%, transparent); }
a.chip-box:hover { text-decoration: none; background: var(--surface-hover); }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r-lg); border: 1px solid transparent; font: inherit; font-weight: 500; font-size: var(--fs-base); cursor: pointer; text-decoration: none; line-height: 1; white-space: nowrap; transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur) var(--ease), transform 80ms ease; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-hover); }
.btn-danger { background: var(--surface); color: var(--c-red-text); border-color: color-mix(in srgb, var(--c-red) 40%, transparent); }
.btn-danger:hover { background: var(--c-red-soft); }
.btn-danger-solid { background: var(--c-red); color: #fff; }
.btn-success { background: var(--c-green); color: #fff; }
.btn-success:hover { filter: brightness(0.95); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }
.btn-lg { height: 42px; padding: 0 18px; font-size: var(--fs-md); }
.btn-sm { height: 30px; padding: 0 10px; font-size: var(--fs-sm); border-radius: 8px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: var(--fs-xs); border-radius: 6px; }
.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: 8px; }
.btn-icon.btn-sm { width: 28px; height: 28px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-link { background: none; border: 0; color: var(--link); padding: 0; font: inherit; cursor: pointer; }
.btn .icon { width: 15px; height: 15px; }
.inline-form { display: inline; }

/* ---------- formulários ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); margin-bottom: 5px; }
.field label .req { color: var(--c-red-text); margin-left: 2px; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea, select, input[type="search"], input[type="text"], input[type="date"], input[type="number"] {
  width: 100%; min-height: var(--control-h-lg); padding: 6px 11px; border: 1px solid var(--border-strong); border-radius: var(--r-md); font: inherit; font-size: var(--fs-md); background: var(--surface); color: var(--text); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
select { width: auto; padding-right: 28px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7079' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 9px center; }
.field input:hover, .field select:hover, .field textarea:hover, select:hover { border-color: var(--muted-2); }
.field input:focus, .field select:focus, .field textarea:focus, select:focus, input:focus { outline: none; border-color: var(--text-2); box-shadow: 0 0 0 3px var(--ring); }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field input[type="file"] { padding: 6px; }
.field .help { font-size: var(--fs-sm); color: var(--muted); margin-top: 5px; }
.field .error { font-size: var(--fs-sm); color: var(--c-red-text); margin-top: 5px; font-weight: 500; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--c-red); }
.field .check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: var(--fs-base); }
.field .check input, .check input[type="checkbox"], .check input[type="radio"] { width: 15px; height: 15px; min-height: 0; accent-color: var(--primary); margin: 0; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; padding: 14px 0 12px; border-top: 1px solid var(--border); flex-wrap: wrap; position: sticky; bottom: 0; background: var(--bg); z-index: 5; }
.form-actions .left { margin-right: auto; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.checks label { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: var(--fs-base); padding: 4px 0; }
.form-error-summary { background: var(--c-red-soft); color: var(--c-red-text); border: 1px solid color-mix(in srgb, var(--c-red) 40%, transparent); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: var(--fs-base); }
input[type="checkbox"] { accent-color: var(--primary); }
.chips { display: flex; gap: 2px; flex-wrap: wrap; background: var(--surface-3); padding: 2px; border-radius: 9px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 7px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.chip.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.chip:hover { text-decoration: none; color: var(--text); }
td .chip { height: 22px; font-size: var(--fs-xs); background: var(--surface-3); margin: 1px 0; }

/* ---------- feedback ---------- */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border-radius: 12px; background: var(--surface-overlay); border: 1px solid var(--border); box-shadow: var(--shadow-overlay); font-size: var(--fs-base); animation: slide-up var(--dur) var(--ease); border-left: 3px solid var(--c-blue); }
.toast-success { border-left-color: var(--c-green); }
.toast-error { border-left-color: var(--c-red); }
.toast-warning { border-left-color: var(--c-amber); }
.toast .close { margin-left: auto; background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 1.1rem; line-height: 1; }
@keyframes slide-up { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.alert { padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); font-size: var(--fs-base); }
.alert-warning { background: var(--c-amber-soft); border-color: color-mix(in srgb, var(--c-amber) 40%, transparent); color: var(--c-amber-text); }
.alert-info { background: var(--c-blue-soft); border-color: color-mix(in srgb, var(--c-blue) 40%, transparent); color: var(--c-blue-text); }
.alert-danger { background: var(--c-red-soft); border-color: color-mix(in srgb, var(--c-red) 40%, transparent); color: var(--c-red-text); }
.alert-success { background: var(--c-green-soft); border-color: color-mix(in srgb, var(--c-green) 40%, transparent); color: var(--c-green-text); }
.empty-state { text-align: center; padding: 44px 20px; color: var(--muted); font-size: var(--fs-base); }
.empty-state .icon { font-size: 1.2rem; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; stroke: none; color: var(--text-2); }
.empty-state h3 { color: var(--text); margin-bottom: 4px; font-size: 14px; }
.empty-state p { max-width: 440px; margin: 0 auto 14px; }

/* ---------- páginas de registro ---------- */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 24px; }
.detail-item dt { font-size: var(--fs-sm); color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.detail-item dd { margin: 0; font-weight: 500; font-size: var(--fs-base); }
.detail-item dd.empty { color: var(--muted-2); font-weight: 400; }
.next-action { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: var(--fs-base); }
.next-action strong { color: var(--text); }
.next-action.late { background: var(--c-red-soft); color: var(--c-red-text); border-color: color-mix(in srgb, var(--c-red) 35%, transparent); }
.next-action.late strong { color: inherit; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-subtle); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--text-2); font-weight: 700; }
.timeline-icon.nota { background: var(--c-amber-soft); color: var(--c-amber-text); } .timeline-icon.email { background: var(--c-blue-soft); color: var(--c-blue-text); } .timeline-icon.ligacao { background: var(--c-green-soft); color: var(--c-green-text); }
.timeline-icon.linkedin { background: var(--c-violet-soft); color: var(--c-violet-text); } .timeline-icon.reuniao { background: var(--c-pink-soft); color: var(--c-pink-text); } .timeline-icon.whatsapp { background: var(--c-green-soft); color: var(--c-green-text); }
.timeline-icon.tarefa { background: var(--surface-3); } .timeline-icon.etapa { background: var(--c-orange-soft); color: var(--c-orange-text); } .timeline-icon.alteracao { background: var(--surface-3); }
.timeline-meta { font-size: var(--fs-sm); color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.timeline-body { margin-top: 3px; white-space: normal; font-size: var(--fs-base); }
.timeline-body .changes, .ai-output ul, .changes { margin: 6px 0 0; padding-left: 16px; color: var(--text-2); font-size: var(--fs-sm); }
.timeline-filter { display: inline-flex; margin-bottom: 8px; }
.timeline-filter .chip { height: 26px; font-size: var(--fs-xs); gap: 4px; }
.timeline-filter .chip .n { font-size: 10px; background: var(--surface); border: 1px solid var(--border); padding: 0 5px; border-radius: 999px; color: var(--muted); line-height: 14px; }
.committee-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.committee-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; min-height: 80px; }
.committee-col.missing { border-style: dashed; background: transparent; }
.committee-role { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.committee-person { font-size: var(--fs-base); margin-bottom: 8px; }
.dup-flag { color: var(--c-amber-text); font-weight: 500; font-size: var(--fs-sm); }
.def-list dt { font-weight: 600; margin-top: 10px; }
.def-list dd { margin: 2px 0 0; color: var(--text-2); font-size: var(--fs-base); }

/* ---------- Kanban (Quadro) ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(290px, 340px); gap: 16px; overflow-x: auto; padding: 2px 2px 14px; align-items: start; }
.kanban-col { display: flex; flex-direction: column; min-height: 360px; border-radius: 12px; transition: background var(--dur) var(--ease); }
.kanban-col.drag-over { background: var(--surface-2); outline: 1px dashed var(--border-strong); }
.kanban-col header { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--surface-2); border-radius: 10px; margin-bottom: 10px; }
.kanban-col header h3 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; color: var(--text); letter-spacing: 0; }
.kanban-col header .count { color: var(--muted); font-weight: 500; font-size: 13px; font-variant-numeric: tabular-nums; }
.kanban-col header .sum { margin-left: auto; font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.kanban-cards { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 60px; }
.kanban-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: var(--fs-base); cursor: grab; transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.kanban-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: 0.5; }
.kanban-card .crumb { display: flex; align-items: center; gap: 4px; font-size: var(--fs-sm); color: var(--muted); min-width: 0; }
.kanban-card .crumb b { font-weight: 500; color: var(--text-2); }
.kanban-card .crumb .sep { color: var(--muted-2); }
.kanban-card .crumb .est { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.kanban-card .crumb a { color: inherit; }
.kanban-card .crumb .truncate { max-width: 160px; }
.kanban-card .title { display: flex; align-items: flex-start; gap: 8px; margin-top: 7px; font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.35; }
.kanban-card .title .sico { margin-top: 2px; }
.kanban-card .title a { color: var(--text); }
.kanban-card .acct { color: var(--muted); font-size: var(--fs-sm); display: block; margin-top: 1px; }
.kanban-card .pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.kanban-card .meta { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--muted); }
.kanban-card .meta .avatar, .kanban-card .meta .avatars { margin-left: auto; }
.kanban-card .next { margin-top: 6px; font-size: var(--fs-sm); color: var(--text-2); }
.kanban-add { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; padding: 10px 10px; margin-top: 4px; border-radius: 10px; }
.kanban-add:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.kanban-more { font-size: var(--fs-xs); color: var(--muted); padding: 6px 4px; }
.kanban-empty { color: var(--muted-2); font-size: var(--fs-sm); padding: 14px 8px; text-align: center; border: 1px dashed var(--border); border-radius: 10px; }

/* ---------- ações (tarefas): linhas e grupos ---------- */
.task-group { margin-bottom: 20px; }
.task-group h2 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.task-group h2 .count { color: var(--muted); font-weight: 500; font-size: 13px; }
.task-group.overdue h2 .sico { color: var(--c-red); }
.task-row { display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: center; padding: var(--cell-py) var(--cell-px); border-bottom: 1px solid var(--border-subtle); font-size: var(--fs-base); }
.task-row:hover { background: var(--surface-2); }
.task-row:last-child { border-bottom: 0; }
.task-row .type-ico { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; color: var(--c-blue); }
.task-row.done .type-ico { color: var(--c-green); }
.task-row .row-title { font-size: 14px; }
.task-row.done .row-title { text-decoration: line-through; color: var(--muted); }
.task-row .links { font-size: var(--fs-sm); color: var(--muted); display: flex; gap: 4px 8px; flex-wrap: wrap; margin-top: 3px; align-items: center; }
.task-row .links a { color: var(--text-2); }
.task-row .links .sep { color: var(--muted-2); }
.task-row .pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.task-row .acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.task-row .acts .btn-ghost { color: var(--muted); }
.task-row .quick { opacity: 0; display: inline-flex; gap: 2px; transition: opacity var(--dur) var(--ease); }
.task-row:hover .quick, .task-row:focus-within .quick { opacity: 1; }
@media (hover: none) { .task-row .quick { opacity: 1; } }

/* ---------- página inicial ---------- */
.home { max-width: 1100px; margin: 0 auto; }
.home-greet { text-align: center; padding: 48px 0 18px; }
.home-greet h1 { font-size: var(--fs-3xl); font-weight: 650; letter-spacing: -0.03em; }
.home-greet p { color: var(--muted); font-size: 15px; margin: 6px 0 0; }
.home-ask { max-width: 760px; margin: 14px auto 0; }
.ask-box { display: flex; align-items: center; gap: 10px; height: 60px; border: 1px solid var(--border); border-radius: 30px; padding: 0 10px 0 10px; background: var(--surface); box-shadow: var(--shadow-sm); }
.ask-box .ask-tag { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface-3); font-weight: 600; font-size: 14px; color: var(--text); white-space: nowrap; }
.ask-box .ask-tag .icon { width: 16px; height: 16px; color: var(--text-2); }
.ask-box input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--text); outline: none; box-shadow: none; padding: 0 4px; }
.ask-box input::placeholder { color: var(--muted); }
.ask-box .ask-go { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: var(--primary-fg); display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; flex-shrink: 0; }
.ask-box .ask-go .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.ask-box .ask-kbd { display: inline-flex; gap: 3px; margin-right: 4px; }
.home-hints { display: flex; justify-content: space-between; gap: 10px; margin: 8px 12px 0; font-size: var(--fs-sm); color: var(--muted); flex-wrap: wrap; }
.home-hints span { display: inline-flex; align-items: center; gap: 6px; }
.home-chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.chip-link { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--text); background: var(--surface); }
.chip-link:hover { background: var(--surface-hover); text-decoration: none; }
.chip-link .icon { width: 16px; height: 16px; color: var(--text-2); }
.chip-link .n { font-size: 11px; background: var(--c-red); color: #fff; border-radius: 999px; min-width: 17px; height: 17px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.home-block { margin-top: 36px; }
.home-block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.home-block-head h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.home-block-head h2 .n { color: var(--muted); font-weight: 500; font-size: 13px; }
.home-block-head .when { font-size: var(--fs-sm); color: var(--muted); }
.home-summary { font-size: 15px; margin-top: 12px; line-height: 1.6; }
.home-summary strong { font-weight: 600; }
.home-summary .icon { width: 18px; height: 18px; vertical-align: -4px; color: var(--c-teal); margin-right: 6px; }
.pend { display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
.pend:last-child { border-bottom: 0; }
.pend .who { width: 36px; height: 36px; border-radius: 9px; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: var(--text-2); }
.pend .ttl { font-weight: 500; font-size: 15px; color: var(--text); line-height: 1.3; }
.pend .ttl a { color: var(--text); }
.pend .sub { color: var(--muted); font-size: 13px; display: flex; gap: 6px; align-items: center; margin-top: 3px; flex-wrap: wrap; }
.pend .sub .tag { font-size: 10.5px; background: var(--surface-3); border-radius: 5px; padding: 1px 6px; color: var(--text-2); font-weight: 600; }
.pend .acts { display: flex; gap: 8px; align-items: center; }
.pend .acts .btn-link { color: var(--text); font-weight: 500; font-size: var(--fs-md); }
.pend.late .ttl { color: var(--c-red-text); }
.home-more { padding: 10px 0 0; font-size: var(--fs-base); color: var(--muted); }
.statusbar { position: fixed; left: calc(var(--rail-w) + var(--sidebar-w)); right: 0; bottom: 0; height: var(--statusbar-h); background: var(--surface); border-top: 1px solid var(--border); display: flex; align-items: center; gap: 18px; padding: 0 20px; font-size: var(--fs-sm); color: var(--muted); z-index: 30; }
.app.collapsed .statusbar { left: var(--rail-w); }
.statusbar span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.statusbar .right { margin-left: auto; display: inline-flex; gap: 14px; }
.statusbar kbd { font-size: 10px; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 44px; align-items: center; gap: 10px; font-size: var(--fs-base); }
.bar-row .lbl { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { background: var(--surface-3); border-radius: 999px; height: 8px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 999px; min-width: 2px; transition: width 0.3s var(--ease); }
.bar-row .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.stage-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stage-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; color: inherit; }
a.stage-box:hover { text-decoration: none; border-color: var(--border-strong); }
.stage-box .lbl { font-size: 11.5px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stage-box .n { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stage-box .v { font-size: var(--fs-sm); color: var(--muted); }

/* ---------- modal, paleta, atalhos ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 11, 14, 0.45); display: none; align-items: center; justify-content: center; z-index: 90; padding: 16px; backdrop-filter: blur(2px); }
.modal-backdrop.open { display: flex; }
.modal { background: var(--surface-overlay); border-radius: 14px; box-shadow: var(--shadow-overlay); width: min(520px, 100%); padding: 22px; border: 1px solid var(--border); animation: pop var(--dur) var(--ease); }
.modal h3 { margin-bottom: 6px; font-size: 15px; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.palette-backdrop { position: fixed; inset: 0; background: rgba(10, 11, 14, 0.4); z-index: 95; display: none; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; backdrop-filter: blur(2px); }
.palette-backdrop.open { display: flex; }
.palette { width: min(640px, 100%); background: var(--surface-overlay); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-overlay); overflow: hidden; animation: pop var(--dur) var(--ease); display: flex; flex-direction: column; max-height: min(70vh, 560px); }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--border); height: 52px; color: var(--muted); flex-shrink: 0; }
.palette-input input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--text); outline: none; height: 100%; min-height: 0; padding: 0; box-shadow: none; }
.palette-input input:focus { box-shadow: none; border: 0; }
.palette-list { overflow-y: auto; padding: 6px; flex: 1; }
.palette-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); padding: 10px 10px 4px; font-weight: 600; }
.palette-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; color: var(--text); font-size: var(--fs-base); cursor: pointer; text-decoration: none; min-height: 38px; }
.palette-item .ico { width: 26px; height: 26px; border-radius: 7px; background: var(--surface-3); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.palette-item .ico .icon { width: 15px; height: 15px; }
.palette-item .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.palette-item .txt strong { font-weight: 500; }
.palette-item .sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item .right { margin-left: auto; display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: var(--fs-xs); flex-shrink: 0; }
.palette-item:hover { background: var(--surface-hover); text-decoration: none; }
.palette-item.active { background: var(--surface-3); }
.palette-item.active .ico { background: var(--surface); }
.palette-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: var(--fs-base); }
.palette-foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--muted); background: var(--surface-2); flex-shrink: 0; }
.palette-foot span { display: inline-flex; gap: 4px; align-items: center; }
.shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; font-size: var(--fs-base); }
.shortcuts h4 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 12px 0 4px; grid-column: 1 / -1; }
.shortcuts div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border-subtle); }
.shortcuts div span:last-child { display: inline-flex; gap: 3px; }
.inline-status { display: inline-block; }
.inline-status summary { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 1px; }
.inline-status summary::after { content: ""; width: 0; height: 0; border-left: 3px solid transparent; border-right: 3px solid transparent; border-top: 4px solid var(--muted-2); opacity: 0; transition: opacity var(--dur) var(--ease); }
.inline-status summary:hover::after, .inline-status[open] summary::after { opacity: 1; }
.inline-status[open] .menu { position: fixed; left: auto; right: auto; min-width: 210px; }
.inline-status .menu button[disabled] { opacity: 0.45; cursor: default; }
.inline-status .menu a small { margin-left: auto; font-size: var(--fs-xs); }

/* ---------- paginação ---------- */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 0; font-size: var(--fs-sm); color: var(--muted); flex-wrap: wrap; }
.pagination .pages { display: flex; gap: 4px; }
.pagination .pages a, .pagination .pages span { min-width: 28px; height: 28px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; border: 1px solid var(--border); color: var(--text-2); font-variant-numeric: tabular-nums; }
.pagination .pages span.current { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.pagination .pages a:hover { text-decoration: none; border-color: var(--border-strong); color: var(--text); background: var(--surface-hover); }

/* ---------- autenticação ---------- */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--surface-2); padding: 32px 16px; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; color: var(--text); font-weight: 650; font-size: 17px; letter-spacing: -0.01em; }
.auth-brand .ws-mark { width: 36px; height: 36px; border-radius: 10px; }
.auth-brand .ws-mark img { width: 24px; height: 24px; }
.auth-brand em { font-style: normal; font-weight: 500; color: var(--muted); }
.auth-card { background: var(--surface); border-radius: 16px; padding: 30px 32px; width: min(440px, 100%); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.auth-card.wide { width: min(560px, 100%); }
.auth-card h1 { font-size: 20px; margin-bottom: 4px; }
.auth-card .lead { color: var(--muted); margin-bottom: 20px; font-size: var(--fs-base); }
.auth-card .form-grid { grid-template-columns: 1fr; }
.auth-card .btn { height: 42px; font-size: var(--fs-md); border-radius: 11px; }
.auth-card .form-actions { position: static; background: transparent; padding-bottom: 0; }
.auth-foot { margin-top: 18px; font-size: var(--fs-sm); color: var(--muted); text-align: center; }

/* ---------- importação ---------- */
.steps { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-sm); color: var(--muted); }
.step .n { width: 18px; height: 18px; border-radius: 50%; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; }
.step.active { border-color: var(--primary); color: var(--text); }
.step.active .n { background: var(--primary); color: var(--primary-fg); }
.step.done { color: var(--c-green-text); }
.step.done .n { background: var(--c-green); color: #fff; }
.map-table td select, .map-table td input { width: 100%; min-height: var(--control-h); padding: 4px 9px; border: 1px solid var(--border-strong); border-radius: 8px; font: inherit; font-size: var(--fs-base); background: var(--surface); color: var(--text); }
.preview-table { font-size: var(--fs-sm); }
.preview-table td { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-error td { background: var(--c-red-soft); }
.placeholder-list { color: var(--text-2); }
.placeholder-list li { margin-bottom: 6px; }

/* ---------- lote, mensagens, cadências (módulos seguintes herdam) ---------- */
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: var(--fs-base); position: sticky; top: var(--topbar-h); z-index: 5; border-radius: var(--r-xl) var(--r-xl) 0 0; }
.bulk-bar select { min-height: var(--control-h); padding: 4px 26px 4px 9px; font-size: var(--fs-base); }
.bulk-count { color: var(--text); }
.row-check, .select-all { width: 15px; height: 15px; accent-color: var(--primary); display: block; }
.message-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-top: 8px; }
.msg-body { white-space: pre-wrap; font-family: inherit; font-size: var(--fs-base); margin: 6px 0 10px; line-height: 1.55; }
.queue-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.queue-item .card-header { border-bottom: 0; padding-bottom: 0; }
.copy-btn.copied { background: var(--c-green-soft); color: var(--c-green-text); border-color: color-mix(in srgb, var(--c-green) 40%, transparent); }
#steps-table td { vertical-align: top; }
#steps-table input[type="text"], #steps-table input[type="number"], #steps-table select { width: 100%; min-height: var(--control-h); padding: 4px 8px; font-size: var(--fs-base); }
.ai-steps { padding-left: 18px; margin: 0; }
.ai-steps li { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.ai-steps li:last-child { border-bottom: 0; }

/* ---------- responsivo ---------- */
@media (max-width: 1500px) { .hide-lg { display: none !important; } }
@media (max-width: 1180px) {
  .grid-4, .grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
  .stage-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .committee-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --topbar-h: 52px; }
  .menu-toggle { display: inline-flex; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text); align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
  .ws { font-size: 14px; }
  .ws small, .tb-item .lbl { display: none; }
  .rail { transform: translateX(-100%); transition: transform var(--dur) var(--ease); }
  .sidebar { transform: translateX(calc(-100% - var(--rail-w))); transition: transform var(--dur) var(--ease); box-shadow: none; }
  .tb-item kbd, .tb-item.tb-agenda, .ws small { display: none; }
  .ws .truncate { max-width: 120px; }
  .topbar .spacer { flex: 1; }
  .app.nav-open .rail, .app.nav-open .sidebar { transform: none; }
  .app.nav-open .sidebar { box-shadow: var(--shadow-overlay); }
  .app.collapsed .sidebar { display: flex; }
  .nav-backdrop { display: none; position: fixed; inset: var(--topbar-h) 0 0 0; background: rgba(10, 11, 14, 0.35); z-index: 38; }
  .app.nav-open .nav-backdrop { display: block; }
  .main, .app.collapsed .main { margin-left: 0; }
  .content { padding: 16px 16px 72px; }
  .topbar { padding: 0 10px; gap: 4px; }
  .page-header h1 { font-size: 18px; }
  .toolbar .search { width: 100%; }
  .grid-2, .grid-3, .grid-4, .grid-6, .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .bar-row { grid-template-columns: 110px 1fr 40px; }
  .task-row { grid-template-columns: 20px 1fr; }
  .task-row .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .kanban { grid-auto-columns: minmax(260px, 86vw); }
  .home-greet { padding-top: 24px; }
  .home-greet h1 { font-size: 26px; }
  .ask-box { height: 52px; }
  .ask-box .ask-tag { display: none; }
  .ask-box .ask-kbd { display: none; }
  .pend { grid-template-columns: 1fr; gap: 6px; }
  .pend .who { display: none; }
  .statusbar { left: 0; overflow-x: auto; }
  .statusbar .right { display: none; }
  .palette-backdrop { padding: 6vh 10px 10px; }
  .shortcuts { grid-template-columns: 1fr; }
  .toasts { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .row-actions { opacity: 1; }
  .auth-card { padding: 24px 20px; }
}
@media print { .rail, .sidebar, .topbar, .page-actions, .toasts, .subnav, .row-actions, .toolbar, .statusbar { display: none !important; } .main { margin: 0; padding: 0; } .card { overflow: visible; } }
