/* ============================================================================
   Área do Gestor — Grupo Reis | Tecnologia & Gestão
   Folha de estilo compartilhada pelas telas do painel.
   Mesma linguagem visual da landing page pública: Navy #0F172A,
   dourado #D97706 e esmeralda #10B981 sobre off-white #F8FAFC.
   ========================================================================== */

/* ─── tokens ─────────────────────────────────────────────────────────────── */
:root {
  --bg:        #F8FAFC;
  --surface:   #FFFFFF;
  --surface-2: #F1F5F9;
  --fg:        #0F172A;
  --muted:     #55607A;
  --border:    #E4E9F2;
  --accent:    #D97706;   /* dourado — destaques, badges */
  --action:    #10B981;   /* esmeralda — ações e estados positivos */
  --navy:      #0B1220;   /* moldura escura (sidebar) */
  --navy-2:    #131E33;

  --ok:     #10B981;
  --warn:   #D97706;
  --danger: #DC2626;
  --info:   #2563EB;
  --violet: #7C3AED;

  --accent-ink:  color-mix(in oklch, var(--accent) 74%, black);
  --accent-soft: color-mix(in oklch, var(--accent) 15%, transparent);
  --action-soft: color-mix(in oklch, var(--action) 16%, transparent);
  --ok-soft:     color-mix(in oklch, var(--ok) 16%, transparent);
  --warn-soft:   color-mix(in oklch, var(--warn) 16%, transparent);
  --danger-soft: color-mix(in oklch, var(--danger) 13%, transparent);
  --info-soft:   color-mix(in oklch, var(--info) 12%, transparent);
  --violet-soft: color-mix(in oklch, var(--violet) 13%, transparent);
  --fg-soft:     color-mix(in oklch, var(--fg) 6%, transparent);

  --on-navy:     color-mix(in oklch, var(--surface) 84%, transparent);
  --on-navy-dim: color-mix(in oklch, var(--surface) 56%, transparent);
  --line-navy:   color-mix(in oklch, var(--surface) 13%, transparent);

  --shadow-sm: 0 1px 2px color-mix(in oklch, var(--fg) 9%, transparent);
  --shadow-md: 0 14px 32px -16px color-mix(in oklch, var(--fg) 34%, transparent);
  --shadow-lg: 0 34px 66px -30px color-mix(in oklch, var(--fg) 48%, transparent);

  --font-display: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:    ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --sidebar-w: 296px;
}

/* ─── base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }

/* ─── tipografia ─────────────────────────────────────────────────────────── */
.t-h1 { font-family: var(--font-display); font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.t-h2 { font-family: var(--font-display); font-size: clamp(19px, 2vw, 23px); font-weight: 700; letter-spacing: -0.015em; }
.t-h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.t-lead { color: var(--muted); font-size: 15.5px; max-width: 68ch; }
.t-muted { color: var(--muted); }
.t-mono { font-family: var(--font-mono); }
.t-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.t-xs { font-size: 12.5px; }
.t-sm { font-size: 13.5px; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.kpi-val.num { font-family: var(--font-display); }
.nowrap { white-space: nowrap; }
.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }

/* ─── shell ──────────────────────────────────────────────────────────────── */
.view[hidden] { display: none; }
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
/* .scrim só tem posicionamento definido dentro do media query mobile;
   sem esta regra base, em telas largas ele vira um <div> em fluxo normal,
   entra como 3º item do grid de 2 colunas de .app e empurra .app-main
   para a linha de baixo (mesma coluna estreita da sidebar). */
.scrim { display: none; }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.app-content { padding: clamp(20px, 2.6vw, 34px); width: 100%; max-width: 1440px; margin-inline: auto; }
.app-foot { padding: 16px clamp(20px, 2.6vw, 34px) 28px; color: var(--muted); font-size: 12.5px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* sidebar */
.app-side {
  background: var(--navy);
  color: var(--on-navy);
  display: flex; flex-direction: column;
  padding: 16px 14px;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
/* Logo do menu lateral: centralizada e na largura da barra (antes 30 px de altura, no canto). */
.side-brand { display: flex; align-items: center; justify-content: center; padding: 6px 0 20px; }
.side-brand .brand-plate { width: 100%; max-width: 256px; justify-content: center; padding: 12px 16px; border-radius: 16px; }
.side-brand .brand-plate img { width: 100%; height: auto; max-height: 92px; object-fit: contain; }
/* Celular/tablet: o menu vira gaveta, então a logo aparece numa faixa no topo do conteúdo. */
.mobile-brand { display: none; }
.brand-plate { background: var(--surface); border-radius: 11px; padding: 7px 11px; display: inline-flex; box-shadow: var(--shadow-sm); }
.brand-plate img { height: 30px; width: auto; }
.side-sys { display: flex; flex-direction: column; gap: 2px; padding: 0 4px 14px; }
.side-sys b { font-family: var(--font-display); font-size: 15px; letter-spacing: -0.01em; color: var(--surface); }
.side-sys span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-navy-dim); }

.side-group { margin-top: 10px; }
.side-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-navy-dim); padding: 6px 12px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 500;
  color: var(--on-navy);
  transition: background 0.15s ease, color 0.15s ease;
}
.side-link svg { width: 18px; height: 18px; flex: 0 0 auto; }
.side-link:hover { background: color-mix(in oklch, var(--surface) 9%, transparent); color: var(--surface); }
.side-link.is-active,
.side-link.active { background: var(--action-soft); color: var(--surface); font-weight: 600; }
.side-link.is-active svg,
.side-link.active svg { color: color-mix(in oklch, var(--action) 68%, white); }
.side-tag { margin-left: auto; font-family: var(--font-mono); font-size: 10px; padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: color-mix(in oklch, var(--accent) 74%, white); }
.side-foot { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-top: 1px solid var(--line-navy); }
.side-user b { display: block; font-size: 13.5px; color: var(--surface); font-weight: 600; }
.side-user span { display: block; font-size: 11.5px; color: var(--on-navy-dim); }
.side-logout { margin-left: auto; width: 34px; height: 34px; flex: 0 0 auto; border: 0; border-radius: 9px; background: transparent; color: var(--on-navy-dim); cursor: pointer; display: grid; place-items: center; transition: background 0.15s ease, color 0.15s ease; }
.side-logout:hover { background: color-mix(in oklch, var(--surface) 12%, transparent); color: var(--surface); }
.side-logout svg { width: 17px; height: 17px; }

/* topbar */
.app-top {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.app-top-inner { display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: 11px clamp(20px, 2.6vw, 34px); }
.top-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.top-title b { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -0.015em; }
.top-title span { font-size: 12.5px; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.hide-sm { display: inline-flex; }
.icon-btn {
  width: 40px; height: 40px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 11px;
  background: var(--surface); color: var(--fg);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { background: var(--surface-2); border-color: color-mix(in oklch, var(--fg) 22%, transparent); }
.icon-btn svg { width: 18px; height: 18px; }
.side-toggle { display: none; }

/* ─── botões ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.06s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex: 0 0 auto; }
.btn-primary { background: var(--action); color: var(--fg); border-color: var(--action); }
.btn-primary:hover { background: color-mix(in oklch, var(--action) 86%, black); border-color: color-mix(in oklch, var(--action) 86%, black); }
.btn-dark { background: var(--navy); color: var(--surface); border-color: var(--navy); }
.btn-dark:hover { background: var(--navy-2); }
.btn-secondary { background: var(--surface); color: var(--fg); border-color: var(--border); }
.btn-secondary:hover { border-color: color-mix(in oklch, var(--fg) 26%, transparent); background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { color: var(--fg); background: var(--fg-soft); }
.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in oklch, var(--danger) 34%, transparent); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 14px 22px; font-size: 15.5px; border-radius: 14px; }
.btn-block { width: 100%; }

/* ─── superfícies ────────────────────────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.panel-head h3 { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; }
.panel-head p { font-size: 12.5px; color: var(--muted); }
.panel-body { padding: 18px; }
.panel-body.flush { padding: 0; }
.card-flat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }

/* ─── grids utilitários ──────────────────────────────────────────────────── */
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-2-1 { grid-template-columns: 1.6fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 1.6fr; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.spacer { flex: 1 1 auto; }

/* ─── badges / pills ─────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.badge-ok     { background: var(--ok-soft);     color: color-mix(in oklch, var(--ok) 60%, black); }
.badge-warn   { background: var(--warn-soft);   color: var(--accent-ink); }
.badge-danger { background: var(--danger-soft); color: color-mix(in oklch, var(--danger) 78%, black); }
.badge-info   { background: var(--info-soft);   color: color-mix(in oklch, var(--info) 74%, black); }
.badge-neutral{ background: var(--surface-2);   color: var(--muted); }
.badge-gold   { background: var(--accent);      color: var(--fg); }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in oklch, var(--ok) 60%, transparent); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ─── KPI ────────────────────────────────────────────────────────────────── */
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-mark { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.kpi-mark svg { width: 20px; height: 20px; }
.kpi-mark.is-action { background: var(--action-soft); color: color-mix(in oklch, var(--action) 60%, black); }
.kpi-mark.is-info { background: var(--info-soft); color: color-mix(in oklch, var(--info) 74%, black); }
.kpi-mark.is-violet { background: var(--violet-soft); color: color-mix(in oklch, var(--violet) 74%, black); }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi-val { font-family: var(--font-display); font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.kpi-val small { font-size: 0.5em; color: var(--muted); font-weight: 600; }
.kpi-delta { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.kpi-delta.up { color: color-mix(in oklch, var(--ok) 60%, black); }
.kpi-delta.down { color: color-mix(in oklch, var(--danger) 78%, black); }

/* ─── gráfico de linha (SVG) ─────────────────────────────────────────────── */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-family: var(--font-mono); font-size: 10.5px; }
.chart .series-line { fill: none; stroke: var(--action); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .series-area { fill: color-mix(in oklch, var(--action) 16%, transparent); }
.chart .series-line-2 { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-dasharray: 5 5; stroke-linecap: round; }
.chart .point { fill: var(--surface); stroke: var(--action); stroke-width: 2.6; }
.chart-foot { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--action); }
.legend-swatch.gold { background: var(--accent); }
.legend-swatch.navy { background: var(--fg); }

/* ─── barras ─────────────────────────────────────────────────────────────── */
.bars { display: flex; flex-direction: column; gap: 13px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 168px) 1fr 54px; gap: 12px; align-items: center; font-size: 13.5px; }
.bar-row .bar-label { color: var(--fg); font-weight: 500; }
.bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--action); }
.bar > i.gold { background: var(--accent); }
.bar > i.navy { background: var(--fg); }
.bar > i.info { background: var(--info); }
.bar > i.violet { background: var(--violet); }
.bar-val { text-align: right; color: var(--muted); font-family: var(--font-mono); font-size: 12.5px; }

/* ─── donut ──────────────────────────────────────────────────────────────── */
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut { width: 148px; height: 148px; flex: 0 0 auto; }
.donut circle { fill: none; stroke-width: 16; }
.donut .track { stroke: var(--surface-2); }
.donut .seg-a { stroke: var(--action); }
.donut .seg-b { stroke: var(--accent); }
.donut .seg-c { stroke: var(--fg); }
.donut .seg-d { stroke: var(--info); }
.donut-center { font-family: var(--font-display); font-weight: 800; font-size: 22px; fill: var(--fg); }
.donut-center-sub { font-family: var(--font-mono); font-size: 9.5px; fill: var(--muted); letter-spacing: 0.08em; }

/* ─── tabela ─────────────────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); font-weight: 500; white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: var(--bg); }
.table .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

/* ─── formulários ────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 7px; }
.label { font-size: 13px; font-weight: 600; color: var(--fg); }
.hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--fg); font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder, .textarea::placeholder { color: color-mix(in oklch, var(--muted) 78%, transparent); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--action);
  box-shadow: 0 0 0 3px var(--action-soft);
}
.textarea { min-height: 92px; resize: vertical; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1 1 auto; }
.input-affix { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 12px; background: var(--surface); }
.input-affix:focus-within { border-color: var(--action); box-shadow: 0 0 0 3px var(--action-soft); }
.input-affix svg { width: 17px; height: 17px; color: var(--muted); flex: 0 0 auto; }
.input-affix input { border: 0; outline: none; background: transparent; padding: 10px 0; width: 100%; font-size: 14px; color: var(--fg); }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--fg); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--action); }

/* força de senha */
.strength { display: flex; flex-direction: column; gap: 7px; }
.strength-bars { display: flex; gap: 6px; }
.strength-bars i { height: 6px; flex: 1 1 0; border-radius: 999px; background: var(--surface-2); transition: background 0.2s ease; }
.strength-bars i.on-1 { background: var(--danger); }
.strength-bars i.on-2 { background: var(--warn); }
.strength-bars i.on-3 { background: var(--info); }
.strength-bars i.on-4 { background: var(--ok); }
.strength-text { font-size: 12.5px; color: var(--muted); }
.req-list { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--muted); }
.req-list li { display: inline-flex; align-items: center; gap: 6px; }
.req-list li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.req-list li.ok { color: color-mix(in oklch, var(--ok) 58%, black); }
.req-list li.ok::before { background: var(--ok); }

/* código 2FA */
.code-row { display: flex; gap: 10px; }
.code-row input {
  width: 52px; height: 58px; text-align: center;
  font-family: var(--font-mono); font-size: 22px; font-weight: 600;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--fg);
}
.code-row input:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 3px var(--action-soft); }

/* ─── switch ─────────────────────────────────────────────────────────────── */
.switch { position: relative; display: inline-flex; flex: 0 0 auto; width: 46px; height: 26px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: color-mix(in oklch, var(--muted) 34%, var(--surface)); border: 1px solid var(--border); transition: background 0.18s ease; pointer-events: none; }
.switch .thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform 0.18s ease; pointer-events: none; }
.switch input:checked ~ .track { background: var(--action); border-color: var(--action); }
.switch input:checked ~ .thumb { transform: translateX(20px); }
.switch input:focus-visible ~ .track { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ─── abas ───────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab { padding: 10px 14px; font-size: 13.5px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; background: transparent; border-inline: 0; border-top: 0; }
.tab:hover { color: var(--fg); }
.tab.is-active { color: var(--fg); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ─── lista de atividades / log ──────────────────────────────────────────── */
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: 0; }
.feed-mark { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.feed-mark svg { width: 17px; height: 17px; }
.feed-item b { font-size: 13.5px; font-weight: 600; }
.feed-item p { font-size: 13px; color: var(--muted); }
.feed-time { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.log { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; display: flex; flex-direction: column; gap: 2px; max-height: 420px; overflow-y: auto; }
.log-line { display: grid; grid-template-columns: 66px 132px minmax(0, 1fr); gap: 10px; padding: 7px 9px; border-radius: 8px; }
.log-line:hover { background: var(--surface-2); }
.log-line .log-time { color: var(--muted); }
.log-line .log-who { font-weight: 600; }
.log-line .log-who.a { color: color-mix(in oklch, var(--action) 60%, black); }
.log-line .log-who.v { color: var(--accent-ink); }
.log-line .log-who.o { color: color-mix(in oklch, var(--info) 74%, black); }

/* ─── calendário ─────────────────────────────────────────────────────────── */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-dow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-align: center; padding-bottom: 4px; }
.cal-day { min-height: 92px; border: 1px solid var(--border); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 5px; background: var(--surface); }
.cal-day.is-muted { opacity: 0.45; }
.cal-day.is-today { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cal-num { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.cal-ev { font-size: 10.5px; padding: 3px 7px; border-radius: 7px; line-height: 1.35; }
.cal-ev.ig { background: var(--accent-soft); color: var(--accent-ink); }
.cal-ev.yt { background: var(--danger-soft); color: color-mix(in oklch, var(--danger) 78%, black); }
.cal-ev.wa { background: var(--ok-soft); color: color-mix(in oklch, var(--ok) 60%, black); }
.cal-ev.bi { background: var(--info-soft); color: color-mix(in oklch, var(--info) 74%, black); }

/* ─── lista de fila ──────────────────────────────────────────────────────── */
.queue-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.queue-item:last-child { border-bottom: 0; }
.queue-id { font-family: var(--font-mono); font-size: 12px; color: var(--muted); width: 82px; flex: 0 0 auto; }

/* ─── avatar ─────────────────────────────────────────────────────────────── */
.avatar { width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 14px; flex: 0 0 auto; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }

/* ─── status card (integrações) ──────────────────────────────────────────── */
.integration { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); display: flex; flex-direction: column; }
.integration-head { display: flex; align-items: flex-start; gap: 13px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.integration-mark { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--fg); }
.integration-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.integration-foot { padding: 13px 18px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* aviso / callout neutro */
.note { display: flex; gap: 11px; padding: 13px 15px; border-radius: var(--radius); background: var(--surface-2); color: var(--muted); font-size: 13px; border: 1px solid var(--border); }
.note svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--accent-ink); }
.note.warn { background: var(--warn-soft); border-color: color-mix(in oklch, var(--warn) 26%, transparent); color: var(--accent-ink); }

/* ─── toast ──────────────────────────────────────────────────────────────── */
/* Regra: nenhum alerta some sozinho — só sai no X (ou em "Fechar todos"). */
.toast-wrap {
  position: fixed; right: 20px; top: 76px; /* abaixo do cabeçalho fixo: não cobre os botões do topo */ z-index: 80;
  width: min(400px, calc(100vw - 40px)); max-height: calc(100vh - 92px);
  display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto; overscroll-behavior: contain; padding: 2px;
}
.toast-wrap:empty { display: none; }
.toast-bar { display: flex; justify-content: flex-end; }
.toast-bar button {
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  background: var(--navy); color: var(--surface); border: 1px solid var(--line-navy);
  border-radius: 999px; padding: 6px 13px; box-shadow: var(--shadow-md);
}
.toast-bar button:hover { background: color-mix(in oklch, var(--navy) 86%, white); }
.toast {
  display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 11px;
  background: var(--navy); color: var(--surface);
  padding: 13px 12px 13px 14px; border-radius: 14px; box-shadow: var(--shadow-lg);
  border: 1px solid color-mix(in oklch, var(--action) 45%, transparent);
  font-size: 13.5px; font-weight: 500; line-height: 1.45;
  animation: toast-in 0.2s ease;
}
.toast.is-info { border-color: color-mix(in oklch, var(--warn) 55%, transparent); }
.toast-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in oklch, var(--action) 22%, transparent); }
.toast.is-info .toast-ico { background: color-mix(in oklch, var(--warn) 24%, transparent); }
.toast-ico svg { width: 17px; height: 17px; color: var(--action); }
.toast.is-info .toast-ico svg { color: color-mix(in oklch, var(--warn) 70%, white); }
.toast-txt { min-width: 0; overflow-wrap: anywhere; padding-top: 5px; }
.toast-txt time { display: block; margin-top: 3px; font-family: var(--font-mono); font-size: 11px; color: var(--on-navy-dim); }
.toast-txt .toast-rep { margin-left: 6px; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--line-navy); }
.toast-x {
  width: 28px; height: 28px; border-radius: 8px; border: 0; cursor: pointer;
  background: transparent; color: var(--on-navy); display: grid; place-items: center;
}
.toast-x:hover, .toast-x:focus-visible { background: var(--line-navy); color: var(--surface); }
.toast-x svg { width: 15px; height: 15px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ─── roteirização (/gestor#roteiro) ─────────────────────────────────────── */
.rt-zona { text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.rt-zona:hover { border-color: color-mix(in oklch, var(--action) 45%, var(--border)); }
.rt-zona.is-on { border-color: var(--action); box-shadow: 0 0 0 3px var(--action-soft); }
.rt-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.rt-calor { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.rt-calor .bar { width: 70px; flex: 0 0 auto; }
.rt-acoes { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rt-acoes .select { height: 32px; width: auto; padding-top: 0; padding-bottom: 0; }
/* colunas com minmax(0, …): a tabela larga rola dentro do painel em vez de empurrar o roteiro para fora da tela */
.rt-grid { grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr); }
.rt-grid > * { min-width: 0; }
.rt-local { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 18px 12px; }
.rt-local .select { height: 36px; width: auto; min-width: 0; max-width: 220px; padding-top: 0; padding-bottom: 0; }
.rt-acoes .btn { white-space: nowrap; }
.rt-entrega { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }

/* ─── modal ──────────────────────────────────────────────────────────────── */
.modal-scrim { position: fixed; inset: 0; z-index: 70; background: color-mix(in oklch, var(--navy) 62%, transparent); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-scrim.is-open { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); width: min(460px, 100%); overflow: hidden; }
.modal-head { padding: 20px 22px 0; }
.modal-body { padding: 16px 22px 22px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; }
.modal-close { position: absolute; top: 14px; right: 14px; }

/* Reservado: telas de autenticacao desativadas neste prototipo (reativar quando o login voltar). */
/* ─── auth (Tela 0) ──────────────────────────────────────────────────────── */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 0.95fr; }
.auth-aside { background: var(--navy); color: var(--on-navy); padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; }
.auth-main { display: grid; place-items: center; padding: clamp(28px, 5vw, 56px); }
.auth-card { width: min(420px, 100%); }
.auth-aside .brand-plate { align-self: flex-start; }
.auth-points { display: flex; flex-direction: column; gap: 16px; margin-top: 34px; }
.auth-point { display: flex; gap: 12px; align-items: flex-start; }
.auth-point svg { width: 20px; height: 20px; color: color-mix(in oklch, var(--action) 66%, white); flex: 0 0 auto; margin-top: 2px; }
.auth-point b { display: block; color: var(--surface); font-size: 14.5px; }
.auth-point span { color: var(--on-navy-dim); font-size: 13px; }
.auth-legal { font-size: 12px; color: var(--on-navy-dim); }
.auth-error { margin: 0; font-size: 13px; font-weight: 600; color: color-mix(in oklch, var(--danger) 78%, black); }
.auth-error[hidden] { display: none; }

/* ─── responsivo ─────────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .g-3 { grid-template-columns: repeat(2, 1fr); }
  .g-2-1, .g-1-2, .rt-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .app-side {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
    z-index: 60; transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow-lg);
  }
  .app-side.is-open { transform: none; }
  .side-toggle { display: grid; }
  .scrim { position: fixed; inset: 0; z-index: 55; background: color-mix(in oklch, var(--navy) 55%, transparent); display: none; }
  .scrim.is-open { display: block; }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .mobile-brand { display: flex; justify-content: center; padding: 14px 16px; background: var(--navy); }
  .mobile-brand .brand-plate { padding: 9px 14px; border-radius: 14px; }
  .mobile-brand .brand-plate img { height: 52px; width: auto; max-width: 100%; }
}
@media (max-width: 760px) {
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .bar-row { grid-template-columns: 1fr 46px; }
  .bar-row .bar-label { grid-column: 1 / -1; }
  .bar { grid-column: 1; }
  .cal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-dow { display: none; }
  .log-line { grid-template-columns: 60px 1fr; }
  .log-line .log-msg { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .input-group { flex-direction: column; }
  .code-row { gap: 7px; }
  .code-row input { width: 100%; height: 52px; }
  .toast-wrap { left: 16px; right: 16px; top: 72px; width: auto; max-height: calc(100vh - 84px); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ── chat de atendimento ─────────────────────────────────────────────────── */
.chat { display: grid; grid-template-columns: 288px minmax(0, 1fr); min-height: 460px; }
.chat-list { border-right: 1px solid var(--border); overflow-y: auto; }
.chat-item { display: flex; align-items: flex-start; gap: 11px; padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.chat-item:hover { background: var(--bg); }
.chat-item.is-active { background: var(--action-soft); }
.chat-item b { font-size: 13.5px; }
.chat-item p { font-size: 12.5px; color: var(--muted); }
.chat-thread { display: flex; flex-direction: column; min-width: 0; }
.chat-head { display: flex; align-items: center; gap: 11px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.chat-body { flex: 1 1 auto; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); min-height: 280px; }
.chat-bubble { max-width: 80%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; }
.chat-bubble.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.chat-bubble.me { align-self: flex-end; background: var(--action); color: var(--fg); border-bottom-right-radius: 5px; }
.chat-bubble.sys { align-self: center; background: var(--surface-2); color: var(--muted); font-size: 12px; border-radius: 999px; padding: 5px 12px; }
.chat-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }

/* ── funil kanban ────────────────────────────────────────────────────────── */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(212px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.kcol { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 212px; }
.kcol-head { display: flex; align-items: center; justify-content: space-between; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-sm); }
.kcard:hover { border-color: color-mix(in oklch, var(--action) 40%, transparent); }

/* ── upload / OCR ────────────────────────────────────────────────────────── */
.drop { border: 1px dashed var(--border); border-radius: var(--radius); padding: 28px 20px; text-align: center; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.drop svg { width: 34px; height: 34px; color: var(--accent-ink); }
.drop .btn { margin-top: 8px; }

@media (max-width: 900px) {
  .chat { grid-template-columns: 1fr; }
  .chat-list { display: none; }
}

/* ── BI: mapa de calor e segmentação de interesse ───────────────────────── */
.bi-chip { border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.bi-chip:hover { border-color: color-mix(in oklch, var(--fg) 26%, transparent); color: var(--fg); }
.bi-chip.active { background: var(--fg); border-color: var(--fg); color: var(--surface); }
.legend-swatch.info { background: var(--info); }
.heat-legend { display: flex; align-items: center; gap: 10px; }
.heat-scale { display: inline-flex; gap: 3px; }
.heat-scale i { width: 26px; height: 10px; border-radius: 3px; display: block; }
.heat-scale .h1 { background: color-mix(in oklch, var(--action) 20%, var(--surface)); }
.heat-scale .h2 { background: color-mix(in oklch, var(--action) 42%, var(--surface)); }
.heat-scale .h3 { background: color-mix(in oklch, var(--accent) 30%, var(--surface)); }
.heat-scale .h4 { background: color-mix(in oklch, var(--accent) 54%, var(--surface)); }
.heat-scale .h5 { background: color-mix(in oklch, var(--accent) 78%, var(--surface)); }
.heat-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 12px; }
.heat-tile { border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--border); transition: opacity 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.heat-tile .heat-name { font-size: 13px; font-weight: 600; color: var(--fg); }
.heat-tile .heat-val { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; color: var(--fg); }
.heat-tile .heat-sub { font-size: 12px; color: var(--muted); }
.heat-tile.is-hot { background: color-mix(in oklch, var(--accent) 30%, var(--surface)); border-color: color-mix(in oklch, var(--accent) 48%, transparent); }
.heat-tile.is-warm { background: color-mix(in oklch, var(--accent) 15%, var(--surface)); }
.heat-tile.is-cool { background: var(--surface-2); }
.heat-subs { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.heat-subs span { font-size: 11.5px; color: var(--fg); opacity: 0.82; font-family: var(--font-mono); }
.heat-tile.is-dim { opacity: 0.35; }
.heat-tile.is-focus { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--fg); }
.bi-seg { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13.5px; color: var(--muted); cursor: pointer; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.bi-seg:hover { background: var(--surface-2); color: var(--fg); }
.bi-seg.active { background: var(--accent-soft); color: var(--fg); font-weight: 600; border-color: color-mix(in oklch, var(--accent) 30%, transparent); }
@media (max-width: 1000px) { .heat-grid { grid-template-columns: 1fr; } }

/* ─── dashboard e funil com dados reais ─────────────────────────────────── */
.fn-kanban { grid-template-columns: repeat(6, minmax(200px, 1fr)); }
.fn-kanban .kcard b { overflow-wrap: anywhere; }
.fn-mais { font-size: 12px; color: var(--muted); text-align: center; }
.dash-barras { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; align-items: end; height: 200px; }
.dash-barra { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 0; }
.dash-barra i { display: block; width: 100%; max-width: 34px; min-height: 2px; border-radius: 6px 6px 2px 2px; background: var(--action); }
.dash-barra b { font-size: 11px; font-family: var(--font-mono); color: var(--fg); }
.dash-barra span { font-size: 10px; font-family: var(--font-mono); color: var(--muted); white-space: nowrap; }

/* ─── orquestração de agentes: ações reais ──────────────────────────────── */
.ag-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.ag-varredura { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ag-varredura .input { min-width: 0; }
.ag-varredura button { grid-column: 1 / -1; }
.ag-res { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--bg); }
.ag-res p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ag-res.ok { border-color: color-mix(in oklch, var(--ok) 45%, var(--border)); }
.ag-res.warn { border-color: color-mix(in oklch, var(--warn) 55%, var(--border)); }

/* ─── central de comando das IAs ────────────────────────────────────────── */
.cc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1180px) { .cc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .cc-grid { grid-template-columns: 1fr; } }
.cc-card { display: flex; flex-direction: column; gap: 9px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); min-width: 0; }
.cc-card b { font-family: var(--font-display); font-size: 15px; }
.cc-card .select, .cc-card .textarea { width: 100%; }
.cc-card .textarea { min-height: 64px; resize: vertical; }
.cc-exec { font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: linear-gradient(135deg, var(--action), color-mix(in oklch, var(--action) 70%, var(--navy))); border-color: transparent; }
.cc-exec[disabled] { opacity: .7; }
.cc-item { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.cc-item summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; list-style: none; }
.cc-item summary::-webkit-details-marker { display: none; }
.cc-item .cc-meta { color: var(--muted); font-size: 12px; }
.cc-item pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-body); font-size: 13.5px; margin: 10px 0 0; line-height: 1.55; }

/* ─── ordens de serviço (roteirização) ──────────────────────────────────── */
.os-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; align-items: end; }
.os-form .field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.os-form .os-largo { grid-column: span 2; }
.os-form button.os-largo { grid-column: 1 / -1; }
@media (max-width: 1000px) { .os-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .os-form { grid-template-columns: 1fr; } .os-form .os-largo { grid-column: auto; } }

/* ─── fila de prospecção: cidades, paginação, seleção e diagnóstico ─────── */
.wa-cidades { display: flex; gap: 8px; flex-wrap: wrap; }
.wa-cid { font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid var(--border); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 6px 12px; display: inline-flex; gap: 7px; align-items: center; }
.wa-cid b { font-family: var(--font-mono); font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); }
.wa-cid[aria-pressed="true"] { background: var(--action); border-color: var(--action); color: #06281d; }
.wa-cid[aria-pressed="true"] b { background: color-mix(in oklch, #000 14%, transparent); }
.wa-filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wa-filtros .select, .wa-filtros .input { height: 38px; width: auto; min-width: 0; padding-top: 0; padding-bottom: 0; }
.wa-filtros .input { flex: 1 1 220px; max-width: 360px; }
.wa-porpag { display: inline-flex; gap: 6px; align-items: center; }
.wa-pager { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.wa-pager .wa-pag-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.wa-pager .wa-pag-info { font-size: 13px; color: var(--muted); }
.wa-selbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 9px 12px; border-radius: 10px; background: var(--info-soft); font-size: 13px; }
.wa-selbar button { font: inherit; font-weight: 700; background: none; border: 0; color: var(--info); cursor: pointer; text-decoration: underline; padding: 0; }
.wa-motivos { border: 1px solid color-mix(in oklch, var(--danger) 35%, var(--border)); border-radius: 12px; padding: 10px 12px; background: var(--danger-soft); font-size: 13px; }
.wa-motivos ul { margin: 6px 0 0; padding-left: 18px; }
.wa-falha { position: relative; display: inline-block; }
.wa-falha > summary { list-style: none; cursor: pointer; }
.wa-falha > summary::-webkit-details-marker { display: none; }
.wa-falha > summary .badge { gap: 6px; }
/* dentro da célula (a tabela rola na horizontal e cortaria um popover flutuante) */
.wa-falha-pop { margin-top: 6px; width: min(340px, 70vw); padding: 12px 13px; border-radius: 12px; background: var(--navy); color: var(--surface); box-shadow: var(--shadow-lg); font-size: 12.5px; line-height: 1.5; }
.wa-falha-pop b { display: block; font-size: 13.5px; margin-bottom: 4px; }
.wa-falha-pop code { display: block; margin-top: 6px; padding: 6px 8px; border-radius: 8px; background: rgba(255,255,255,.08); font-family: var(--font-mono); font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 140px; overflow: auto; }
.wa-falha-pop small { display: block; margin-top: 6px; color: var(--on-navy-dim); }
.wa-modal-lista { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; }

.wa-selbar[hidden], .wa-motivos[hidden] { display: none; }

/* ─── pausa anti-banimento e spintax ────────────────────────────────────── */
.wa-pausa { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; border: 1px solid var(--border); background: var(--info-soft); }
.wa-pausa.restricao { background: var(--danger-soft); border-color: color-mix(in oklch, var(--danger) 40%, var(--border)); }
.wa-pausa b { display: block; }
#wa-spintax.ok { color: color-mix(in oklch, var(--ok) 70%, black); }
#wa-spintax.falta { color: var(--danger); font-weight: 600; }

/* Jev & Skills de Vendas (Orquestração de Agentes) */
.ia-cfg-grid { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .ia-cfg-grid { grid-template-columns: minmax(0, 1fr); } }
.or-mascara { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; letter-spacing: .02em; padding: 8px 10px; border-radius: var(--radius); background: var(--surface-2, var(--surface)); border: 1px dashed var(--border); overflow-wrap: anywhere; }
.sk-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.sk-item.inativa { opacity: .6; }
.sk-item .sk-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sk-item .sk-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.sk-item textarea { min-height: 96px; resize: vertical; font-size: 13px; line-height: 1.45; }
.sk-item .sk-texto { font-size: 13px; line-height: 1.5; color: var(--fg); white-space: pre-wrap; }
#or-form[hidden], #or-aviso-admin[hidden] { display: none; }
.sk-item > summary { cursor: pointer; font-weight: 600; }
