/* Painel Zero21 — paleta da marca: apenas preto e branco (cinzas neutros de apoio),
   agora em versão escura (fundo escuro, texto claro). Cores semânticas de status
   (ok/erro/aviso/info) são a única exceção, mantidas discretas — servem pra sinalizar
   risco/erro de verdade, não são "cor de marca". --accent-ink é a cor de texto/ícone
   usada EM CIMA de --accent (aqui preto, já que --accent é branco no escuro — se
   trocar de tema nunca hardcodar "white"/"black" direto nos componentes, usar esse
   token). Tipografia única (Inter). Não alterna com o tema do sistema. */
:root {
  --bg: #1a1a1e;
  --surface: #212126;
  --surface-2: #28282e;
  --surface-3: #313138;
  --text: #f2f2f4;
  --muted: #a1a1a9;
  --border: #35353c;
  --border-soft: #2b2b31;
  --accent: #ffffff;
  --accent-2: #ffffff;
  --accent-ink: #1a1a1e;
  --accent-soft: rgba(255,255,255,0.08);
  --gold: #ffffff;
  --gold-soft: rgba(255,255,255,0.08);
  --ok: #22c55e;
  --ok-soft: rgba(34,197,94,0.16);
  --off: #71717a;
  --off-soft: rgba(255,255,255,0.06);
  --erro: #f87171;
  --erro-soft: rgba(248,113,113,0.16);
  --info: #60a5fa;
  --info-soft: rgba(96,165,250,0.16);
  --warn: #fbbf24;
  --warn-soft: rgba(251,191,36,0.16);
  --masthead-bg: #1a1a1e;
  --masthead-text: #a1a1a9;
  --masthead-text-active: #ffffff;
  --masthead-hover-bg: rgba(255,255,255,0.07);
  --masthead-border: #35353c;
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 10px 30px -15px rgba(0,0,0,0.6);
  --radius: 14px;
  --font-serif: 'Inter', -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;

  /* escala de espaçamento — usar nos componentes novos; retrofit do legado é
     trabalho à parte (valores atuais não caem certinho nesses múltiplos). */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;

  /* escala tipográfica — nomeia o que já era usado na prática, sem mudar tamanho */
  --fs-title: 26px;      /* título de página (h1) */
  --fs-section: 15px;    /* título de seção (h2) */
  --fs-value: 30px;      /* valor numérico grande de card */
  --fs-body: 14px;       /* texto padrão */
  --fs-label: 14.5px;    /* label de card / item de lista */
  --fs-hint: 13px;       /* texto de apoio secundário */
}

/* Tema claro (fundo cinza claro, não branco puro) — mesma paleta preto/branco,
   só inverte qual dos dois é o fundo. Cores semânticas recalibradas mais escuras/
   saturadas aqui (o contrário do que foi feito pro escuro) pra continuar legíveis
   como texto em cima de fundo claro. Preferência por usuário, ver app/db.py
   (usuarios.tema) e templates/base.html ([data-theme] na tag <html>). */
:root[data-theme="claro"] {
  --bg: #f0f0f2;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --surface-3: #ebebef;
  --text: #17171a;
  --muted: #6b6b74;
  --border: #dcdce1;
  --border-soft: #e8e8ec;
  --accent: #0b0b0c;
  --accent-2: #0b0b0c;
  --accent-ink: #ffffff;
  --accent-soft: rgba(11,11,12,0.06);
  --gold: #0b0b0c;
  --gold-soft: rgba(11,11,12,0.06);
  --ok: #16a34a;
  --ok-soft: rgba(22,163,74,0.14);
  --off: #8a8a93;
  --off-soft: rgba(11,11,12,0.05);
  --erro: #dc2626;
  --erro-soft: rgba(220,38,38,0.12);
  --info: #2563eb;
  --info-soft: rgba(37,99,235,0.12);
  --warn: #b45309;
  --warn-soft: rgba(180,83,9,0.12);
  --masthead-bg: #f0f0f2;
  --masthead-text: #6b6b74;
  --masthead-text-active: #0b0b0c;
  --masthead-hover-bg: rgba(11,11,12,0.05);
  --masthead-border: #dcdce1;
  --shadow: 0 1px 2px rgba(11,11,12,0.05), 0 10px 30px -15px rgba(11,11,12,0.18);
  color-scheme: light;
}
/* logo é um wordmark preto no arquivo — só precisa do filtro de inversão quando
   a superfície embaixo dele é escura. */
:root[data-theme="claro"] .brand-logo { filter: none; }

* { box-sizing: border-box; }
::selection { background: var(--accent); color: var(--accent-ink); }
a:focus-visible, button:focus-visible, .card:focus-visible, .btn:focus-visible,
.masthead nav a:focus-visible, .tabs a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- controles nativos com a cara do tema (não do SO) ---------- */
select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  font-family: inherit; color: var(--text); background-color: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 30px 8px 10px; font-size: 13.5px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%239a9aa2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 15px;
}
select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select::-ms-expand { display: none; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

/* ---------- layout ---------- */
.shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}
.masthead {
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--masthead-bg);
  color: var(--masthead-text);
  padding: 16px 44px;
  border-bottom: 3px solid var(--masthead-border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo {
  height: 26px; width: auto; display: block;
  filter: invert(1) brightness(1.6); /* wordmark é preto no arquivo; masthead é escuro, inverte pra claro */
}

/* atributo hidden sempre esconde — sem isso, qualquer regra com display (flex, -webkit-box…) o anula */
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.masthead nav { display: flex; align-items: center; gap: 22px; flex: 1; flex-wrap: wrap; }
.masthead nav a {
  color: var(--masthead-text);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.masthead nav a:hover { color: var(--masthead-text-active); }
.masthead nav a.active { color: var(--masthead-text-active); border-bottom-color: var(--gold); }

.nav-dropdown { position: relative; }
.nav-dropdown summary {
  color: var(--masthead-text);
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  list-style: none;
  transition: color 0.15s, border-color 0.15s;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::marker { display: none; content: ""; }
.nav-dropdown summary:hover { color: var(--masthead-text-active); }
.nav-dropdown summary.active { color: var(--masthead-text-active); border-bottom-color: var(--gold); }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; gap: 2px;
  min-width: 160px; z-index: 5;
}
.nav-dropdown-menu a {
  padding: 8px 10px; border-radius: 6px; font-size: 13px; color: var(--text);
  text-decoration: none; text-transform: none; letter-spacing: normal; font-weight: 500;
  border-bottom: none;
}
.nav-dropdown-menu a:hover { background: var(--surface-2); color: var(--accent); }
.nav-dropdown-menu a.active { color: var(--accent); font-weight: 600; }

.masthead-user { position: relative; flex-shrink: 0; }
.masthead-user summary {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; cursor: pointer; border-radius: 20px; list-style: none;
}
.masthead-user summary::-webkit-details-marker { display: none; }
.masthead-user summary::marker { display: none; content: ""; }
.masthead-user summary:hover { background: var(--masthead-hover-bg); }
.masthead-user[open] summary { background: var(--masthead-hover-bg); }
.masthead-user .who-nome { font-size: 13px; font-weight: 600; color: var(--masthead-text-active); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold); color: var(--masthead-bg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.user-menu {
  position: absolute; top: calc(100% + 6px); right: 0; left: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; gap: 2px;
  min-width: 170px;
}
.user-menu a {
  padding: 8px 10px; border-radius: 6px; font-size: 13px; color: var(--text);
  text-decoration: none;
}
.user-menu a:hover { background: var(--surface-2); color: var(--accent); }
.user-menu form { margin: 0; }
.user-menu button {
  width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; font-size: 13px;
  color: var(--text); background: none; border: none; cursor: pointer; font-family: inherit;
}
.user-menu button:hover { background: var(--surface-2); color: var(--accent); }

main { flex: 1; padding: 40px 48px; max-width: 1080px; width: 100%; margin: 0 auto; }

.page-header { margin-bottom: 28px; }
.page-header h1 { margin: 0 0 6px; font-family: var(--font-serif); font-size: var(--fs-title); font-weight: 600; letter-spacing: -0.01em; color: var(--accent); }
.page-sub { margin: 0; color: var(--muted); font-size: 14.5px; }
.back-link { display: inline-block; color: var(--muted); text-decoration: none; font-size: 13.5px; margin-bottom: 14px; }
.back-link:hover { color: var(--accent); }

/* ---------- cards ---------- */
.cards { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.cards:last-child { margin-bottom: 0; }
.card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px; min-width: 220px; flex: 1;
  text-decoration: none; color: var(--text);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
a.card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 16px 32px -16px rgba(10,10,10,0.18); }
/* muted = calmo, sem dado ainda (não é problema). erro = precisa de atenção, não esmaece */
.card.muted { opacity: 0.7; }
.card.erro { border-left: 3px solid var(--erro); padding-left: 19px; }
.card-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 6px;
}
.card.erro .card-icon { background: var(--erro); }
.card-icon svg { width: 19px; height: 19px; }
.card-value { font-family: var(--font-serif); font-size: var(--fs-value); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.card-label { font-weight: 600; font-size: var(--fs-label); }
.card-hint { color: var(--muted); font-size: var(--fs-hint); }

/* estado de problema: número e hint saltam aos olhos, não é só mais um texto cinza */
.card-value.erro { color: var(--erro); }
.card-hint.erro { color: var(--erro); font-weight: 700; }
.card-hint.warn { color: var(--warn); font-weight: 700; }

/* ---------- table ---------- */
.tabela-wrap {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.tabela { width: 100%; border-collapse: collapse; }
.tabela th a.th-sort { color: var(--muted); text-decoration: none; }
.tabela th a.th-sort:hover { color: var(--text); }
.tabela th a.th-sort.active { color: var(--accent); }
.tabela th {
  text-align: left; padding: 13px 18px; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted);
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.tabela td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--border); font-size: 14px; }
.tabela tr:last-child td { border-bottom: none; }
.tabela tr:hover td { background: var(--surface-2); }

/* ---------- barra de magnitude (ex.: gasto por cliente em Métricas) ---------- */
.valor-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.bar-cell { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.bar-track { flex: 1; height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: var(--accent); min-width: 3px; }
.bar-pct { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; width: 42px; text-align: right; flex-shrink: 0; }
.bar-fill--ok { background: var(--ok); }

/* ---------- aba Acessos (checklist de login/senha por plataforma) ---------- */
.acessos-aviso { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; }
.info-tip { cursor: help; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; line-height: 1; }
.acessos-progresso { display: flex; align-items: center; gap: 14px; max-width: 420px; }
.acessos-progresso-texto { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.acesso-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.acesso-card-summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 14px 18px; font-weight: 600; font-size: 14px;
}
.acesso-card-summary::-webkit-details-marker { display: none; }
.acesso-card-summary > span:first-child { display: flex; align-items: center; gap: 8px; }
.acesso-card-summary > span:first-child::before { content: '▸'; color: var(--muted); }
.acesso-card[open] .acesso-card-summary > span:first-child::before { content: '▾'; }
.acesso-card-body { padding: 4px 18px 20px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.off { background: var(--off-soft); color: var(--muted); }
.badge.erro { background: var(--erro-soft); color: var(--erro); margin-left: 6px; }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }

.muted { color: var(--muted); }
.erro { color: var(--erro); }
.aviso {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px; color: var(--muted); line-height: 1.6; font-size: 14.5px;
}
.aviso-erro { border-color: var(--erro); color: var(--erro); }
.aviso-ok { border-color: var(--ok); color: var(--text); }
.aviso-ok strong { color: var(--ok); }

/* ---------- lists ---------- */
.lista-clientes, .lista-arquivos { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.lista-clientes li, .lista-arquivos li {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.lista-clientes a, .lista-arquivos a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.lista-clientes a:hover, .lista-arquivos a:hover { color: var(--accent); }

/* ---------- login ---------- */
body.guest { background: var(--bg); }
.guest-main { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.login-box {
  width: 100%; max-width: 380px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 24px 56px -28px rgba(10,10,10,0.18); padding: 44px 36px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.login-logo { width: 100%; max-width: 230px; height: auto; margin-bottom: 22px; filter: invert(1) brightness(1.6); }
.login-box .subtitle { color: var(--muted); font-size: 13.5px; margin: 0 0 26px; line-height: 1.55; }
.login-box form { display: flex; flex-direction: column; gap: 15px; width: 100%; }
.login-box label { font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; gap: 7px; text-align: left; letter-spacing: 0.01em; }
.login-box input {
  padding: 12px 13px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 14px; font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-box button {
  padding: 12px; border-radius: 10px; border: none;
  background: var(--accent);
  color: var(--accent-ink); font-weight: 600; cursor: pointer; font-size: 14px; font-family: inherit;
  margin-top: 6px; transition: filter 0.15s, transform 0.15s;
}
.login-box button:hover { opacity: 0.82; transform: translateY(-1px); }
.login-box button:active { transform: translateY(0); }
.login-box .erro { color: var(--erro); font-size: 13px; margin: 0 0 4px; }

/* ---------- cadastro público (formulário com mais campos que o login) ---------- */
.login-box--wide { max-width: 560px; text-align: left; }
.login-box--wide .subtitle { text-align: center; }
.login-box--wide .form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.login-box--wide .form-row .field { flex: 1; min-width: 200px; }
.login-box--wide .field { margin-bottom: 15px; }
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

.acessos-details { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--surface-2); }
.acessos-details summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.acessos-details[open] summary { margin-bottom: 10px; }
.acesso-linha-cadastro { padding: 12px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.acesso-linha-cadastro:first-of-type { border-top: none; padding-top: 4px; }
.acesso-titulo { font-size: 12.5px; font-weight: 700; color: var(--text); margin: 0; }

/* ---------- checklist de acessos (senhas) ---------- */
.senha-wrap { display: flex; gap: 8px; align-items: center; }
.senha-wrap input { flex: 1; }
.senha-revelada { font-family: monospace; word-break: break-all; }

/* ---------- responsive ---------- */
/* ---------- toolbar / filtros ---------- */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px;
}
.toolbar select, .toolbar input[type="text"] {
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 13.5px; font-family: inherit;
}
.toolbar .spacer { flex: 1; }
.toolbar-select {
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); font-size: 13px; font-family: inherit;
}

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 9px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 600; font-family: inherit; cursor: pointer;
  text-decoration: none; line-height: 1.2;
  transition: filter 0.15s, border-color 0.15s, color 0.15s, background 0.15s, transform 0.1s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { opacity: 0.82; }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-ghost.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn-perigo { background: transparent; border-color: var(--erro); color: var(--erro); }
.btn-perigo:hover { background: var(--erro-soft); }

/* ---------- formulários ---------- */
.form-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 28px; max-width: 560px; margin-bottom: 28px;
}
.form-card:last-child { margin-bottom: 0; }
.form-card.wide { max-width: none; }
.form-card.center { text-align: center; margin: 60px auto; }
.form-card--perigo { border-color: var(--erro); }

/* ---------- utilitários ---------- */
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: 10px; }
.mt-lg { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: 10px; }
.mb-md { margin-bottom: 16px; }
.text-sm { font-size: 12.5px; }
.text-md { font-size: 16px; }
.text-heading-sm { font-size: 14px; margin: 0 0 12px; font-weight: 600; }
.divider { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.row-link { cursor: pointer; }
.field--grow { flex: 2; }
.page-header--row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form select { padding: 5px 26px 5px 9px; font-size: 12.5px; border-radius: 7px; }

/* ---------- checklist de status (Tráfego Orgânico / Contas & Ferramentas) ---------- */
.status-select {
  font-weight: 600; font-size: 12.5px; padding: 6px 24px 6px 10px; border-radius: 7px;
}
.status-select--pendente { background-color: var(--warn-soft); color: var(--warn); border-color: transparent; }
.status-select--feito { background-color: var(--ok-soft); color: var(--ok); border-color: transparent; }
.status-select--na { background-color: var(--off-soft); color: var(--muted); border-color: transparent; }
.form-grid { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row .field { flex: 1; min-width: 180px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  padding: 10px 12px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 14px; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.campo-vazio { border-style: dashed !important; border-color: var(--warn) !important; }
.campo-vazio::placeholder { color: var(--warn); font-style: italic; opacity: 0.9; }
.field-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.field-checks label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; color: var(--text); }
.form-actions { display: flex; gap: 10px; margin-top: 4px; }
.senha-gerada {
  background: var(--ok-soft); color: var(--ok); border-radius: 10px; padding: 14px 16px;
  font-size: 13.5px; margin-bottom: 20px; line-height: 1.6;
}
.senha-gerada code { background: rgba(255,255,255,0.12); padding: 2px 7px; border-radius: 6px; font-weight: 700; }

/* ---------- kanban ---------- */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); min-width: 250px; flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.kanban-col h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 2px 4px 2px; display: flex; justify-content: space-between; }
.kanban-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px;
  box-shadow: var(--shadow); padding: 12px 13px; display: flex; flex-direction: column; gap: 7px;
}
a.kanban-card { text-decoration: none; color: inherit; transition: border-color 0.15s; }
a.kanban-card:hover { border-color: var(--accent); }
a.kanban-card.atrasada { border-left: 3px solid var(--erro); padding-left: 12px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.vencimento { font-size: 12px; font-weight: 600; color: var(--muted); }
.vencimento.erro { color: var(--erro); }
.kanban-card .titulo { font-weight: 600; font-size: 13.5px; }
.kanban-card .meta { display: flex; flex-wrap: wrap; gap: 5px; font-size: 12px; color: var(--muted); }
.kanban-card .mover { margin-top: 2px; }
.kanban-card .mover select {
  width: 100%; padding: 6px 26px 6px 10px; border-radius: 7px; border: 1px solid var(--border);
  background-color: var(--surface-2); color: var(--muted); font-size: 12px; font-family: inherit;
  background-position: right 8px center; background-size: 12px;
}
.kanban-card .mover select:hover { border-color: var(--accent); color: var(--text); }

/* ---------- seções âncora (detalhe de cliente / config tabs) ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 22px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.tabs a {
  padding: 9px 14px; font-size: 13.5px; font-weight: 600; color: var(--muted);
  text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.section { margin-bottom: 30px; }
.section h2 { font-family: var(--font-serif); font-size: var(--fs-section); font-weight: 700; margin: 0 0 12px; color: var(--accent); }

/* ---------- atenção / minhas tarefas (dashboard) ---------- */
.attn-list, .mini-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.attn-secao { margin-bottom: 26px; }
.attn-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px; font-size: 13.5px;
}
/* nível erro/warn não depende só do pontinho — a borda esquerda + fundo leve
   fazem o item saltar aos olhos numa varredura rápida, sem precisar ler o texto */
.attn-item.erro { border-color: var(--erro); background: var(--erro-soft); border-left: 3px solid var(--erro); padding-left: 16px; }
.attn-item.warn { border-color: var(--warn); background: var(--warn-soft); border-left: 3px solid var(--warn); padding-left: 16px; }
.attn-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.attn-dot.erro { background: var(--erro); }
.attn-dot.warn { background: var(--warn); }
.attn-dot.info { background: var(--info); }
.attn-dot.ok { background: var(--ok); }
.attn-cliente { font-weight: 700; }
/* <details> não pode herdar o display:flex de .attn-item — senão o <summary>
   (cabeçalho) e o <ul class="attn-detalhes"> (lista de tarefas) viram colunas
   lado a lado em vez de empilhados, e o cabeçalho fica espremido numa coluna
   estreita, quebrando o texto no meio da frase. */
.attn-item--details { display: block; padding: 0; }
.attn-item--details.erro, .attn-item--details.warn { padding-left: 0; }
.attn-item--details .attn-summary {
  list-style: none; cursor: pointer; display: flex; align-items: flex-start; gap: 10px;
  padding: 16px 18px;
}
.attn-item--details.erro .attn-summary,
.attn-item--details.warn .attn-summary { padding-left: 16px; }
.attn-item--details .attn-summary::-webkit-details-marker { display: none; }
.attn-summary-texto { flex: 1; }
.attn-detalhes {
  list-style: none; margin: 0; padding: 2px 18px 16px 34px;
  display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.5;
}
.attn-detalhes a { color: var(--text); }
/* Lista densa (Tarefas atrasadas na Início) — sem card cheio por item, só um
   separador fino entre eles, pra caber mais cliente na tela sem rolar. */
.attn-list--compacta { gap: 0; }
.attn-list--compacta .attn-item--details {
  border: none; border-radius: 0; background: transparent;
  border-bottom: 1px solid var(--border);
}
.attn-list--compacta .attn-item--details:last-child { border-bottom: none; }
.attn-list--compacta .attn-item--details.erro { border-left: 3px solid var(--erro); }
.attn-list--compacta .attn-item--details.warn { border-left: 3px solid var(--warn); }
.attn-list--compacta .attn-summary,
.attn-list--compacta .attn-item--details.erro .attn-summary,
.attn-list--compacta .attn-item--details.warn .attn-summary { padding: 9px 14px 9px 12px; }
.attn-subtitulo { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 6px 0 12px; }
.attn-subtitulo:first-child { margin-top: 0; }
.mini-list li {
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 11px;
  font-size: 13.5px; display: flex; justify-content: space-between; gap: 10px; align-items: center;
}
.mini-list li > span { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mini-list a { color: var(--text); text-decoration: none; font-weight: 500; }
.mini-list a:hover { color: var(--accent); text-decoration: underline; }
.panel { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
@media (max-width: 900px) { .panel { grid-template-columns: 1fr; } }

/* ---------- Assistente (chat) ---------- */
.chat-container {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); max-width: 760px; height: 65vh; min-height: 420px;
}
.chat-mensagens { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg {
  max-width: 80%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
}
.chat-msg--usuario { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.chat-msg--assistente { align-self: flex-start; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.chat-msg--pendente { color: var(--muted); font-style: italic; }
.chat-msg--erro { border-color: var(--erro); color: var(--erro); background: var(--erro-soft); }
.chat-form { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--border); }
.chat-form textarea {
  flex: 1; resize: none; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 14px; font-family: inherit;
}
.chat-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- demo / avisos fortes ---------- */
.demo-banner {
  display: flex; align-items: center; gap: 8px; background: var(--warn-soft); color: var(--warn);
  border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 700; margin-bottom: 18px;
  letter-spacing: .02em; text-transform: uppercase;
}

/* ---------- matriz de permissões ---------- */
.matriz-wrap { overflow-x: auto; }
.matriz { border-collapse: collapse; width: 100%; font-size: 13px; }
.matriz th, .matriz td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.matriz th { background: var(--surface-2); font-weight: 600; color: var(--muted); font-size: 12px; }
.matriz td.sim { color: var(--ok); font-weight: 700; text-align: center; }
.matriz td.nao { color: var(--off); text-align: center; }

@media (max-width: 900px) {
  /* celular/tablet: logo + usuário na 1ª linha; menu numa linha só que rola na horizontal
     (antes o nav herdava flex-wrap e virava uma coluna de meia tela) */
  .masthead { flex-wrap: wrap; row-gap: 8px; }
  .masthead-user { margin-left: auto; }
  .masthead nav { order: 3; flex-basis: 100%; flex-wrap: nowrap; gap: 18px; overflow-x: auto; padding-top: 4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .masthead nav::-webkit-scrollbar { display: none; }
  .masthead nav a, .nav-dropdown summary { white-space: nowrap; }
  /* dropdown dentro de área com rolagem seria cortado: fixed escapa do corte e fica logo abaixo (top:auto) */
  .nav-dropdown-menu { position: fixed; top: auto; left: 16px; right: 16px; margin-top: 6px; z-index: 20; }
}
@media (max-width: 760px) {
  .masthead { padding: 12px 18px; gap: 14px; }
  .masthead-user .who-nome { display: none; }
  main { padding: 24px 18px; }
  .cards { flex-direction: column; }
}

/* ---------- Dashboard TV (/dashboard-tv) — tela cheia pra monitor do escritório,
   sem nav/masthead (não estende base.html). Mesma paleta preto/branco, só que
   tudo maior: pensado pra ser lido de longe, ninguém interagindo. Sempre escuro,
   independe do tema pessoal de quem gerou o link. ---------- */
.tv-dashboard { background: #1a1a1e; color: #f2f2f4; }
.tv-shell {
  /* altura travada em 100vh + overflow hidden — garantia de nunca rolar,
     em vez de confiar só em cálculo de tamanho (ver .tv-charts-row abaixo,
     que estica com flex:1 e comprime primeiro se faltar espaço). */
  height: 100vh; overflow: hidden; display: flex; flex-direction: column;
  padding: clamp(20px, 3vw, 48px); gap: clamp(16px, 2.2vh, 32px);
}
.tv-header { display: flex; align-items: center; gap: 28px; flex-shrink: 0; }
.tv-logo { height: clamp(48px, 6.5vh, 84px); filter: invert(1) brightness(1.6); }
.tv-header h1 {
  font-family: var(--font-serif); font-weight: 700; letter-spacing: -0.01em;
  font-size: clamp(22px, 2.6vw, 36px); margin: 0; flex: 1;
}
.tv-clock {
  font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: 0.02em;
  font-size: clamp(20px, 2.4vw, 32px); color: var(--muted);
}
.tv-grid { width: 100%; flex-shrink: 0; }
/* grid único de 6 colunas x 2 linhas: 11 cards (8 originais + 2 de Search Console + 1 de visitas ao site do
   Analytics). Na 2ª linha são 5 cards, então o último (Automações) ocupa 2 colunas e as duas linhas
   ficam cheias, sem vão vazio. Antes: 4x2 com 8 cards. */
/* Agora em GRUPOS com rótulo fino de seção: linha 1 = "Pago · Google Ads" (5 cards, largura total);
   linha 2 = "Orgânico" (3) + "Operação" (3), metade da largura cada. Com filtro por cliente, Operação
   não existe e Orgânico ocupa a linha inteira (.tv-linha2 vira 1 coluna). */
.tv-grid--unificada, .tv-grid--filtrada { display: flex; flex-direction: column; gap: clamp(6px, 0.9vh, 12px); }
.tv-linha2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.2vw, 18px); }
.tv-grid--filtrada .tv-linha2 { grid-template-columns: 1fr; }
.tv-grupo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tv-grupo-titulo {
  margin: 0; font-family: inherit; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  font-size: clamp(9px, 0.7vw, 11.5px); line-height: 1.1; color: #71717a;
}
.tv-grupo-cards { display: grid; gap: clamp(10px, 1.2vw, 18px); min-width: 0; }
.tv-grupo-cards > .tv-card { min-width: 0; }
.tv-grupo-cards--5 { grid-template-columns: repeat(5, 1fr); }
.tv-grupo-cards--3 { grid-template-columns: repeat(3, 1fr); }
/* telas menores: colunas demais apertariam os valores em R$ */
@media (max-width: 1400px) {
  .tv-grupo-cards--5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .tv-grupo-cards--5 { grid-template-columns: repeat(2, 1fr); }
  .tv-linha2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .tv-grupo-cards--5, .tv-grupo-cards--3 { grid-template-columns: 1fr; }
}
.tv-card {
  background: #212126; border: 1px solid #35353c; border-radius: 14px;
  padding: clamp(10px, 1vw, 16px); display: flex; flex-direction: column; gap: 5px;
}
.tv-card.erro { border-left: 5px solid var(--erro); }
.tv-card-label {
  font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase;
  font-size: clamp(10px, 0.78vw, 12.5px); color: #a1a1a9; line-height: 1.25;
  /* reserva sempre 2 linhas de altura, quebrando ou não — assim o valor
     começa na mesma posição vertical em todos os cards da mesma fileira,
     mesmo quando um rótulo é mais longo que o outro (ex: "Custo por
     resultado (30 dias)" vs "Clientes ativos"). */
  min-height: 2.1em; display: flex; align-items: flex-end;
}
.tv-card-value {
  font-family: var(--font-serif); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(22px, 2.5vw, 36px); line-height: 1.05; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* valores em R$ são bem mais compridos ("R$ 115.550,22") que uma contagem
   simples ("15") — fonte menor pra nunca quebrar o "R$" do número numa
   fileira de 4 colunas. */
.tv-card-value--moeda { font-size: clamp(15px, 1.7vw, 23px); }
.tv-card-value.erro { color: var(--erro); font-size: clamp(13px, 1.4vw, 18px); white-space: normal; }
.tv-card-hint { font-size: clamp(10px, 0.78vw, 12.5px); color: #a1a1a9; }
.tv-card-hint.erro { color: var(--erro); font-weight: 700; }
.tv-card-hint.warn { color: var(--warn); font-weight: 700; }

/* ---------- gráficos (linha de investimento diário + ranking de clientes) ----------
   mesmo cartão visual dos KPIs, só que ocupando o espaço vertical que sobra
   (flex:1 dentro do .tv-shell, que agora tem altura travada em 100vh) — se as
   contas de tamanho não baterem 100%, é o gráfico queComprime, nunca a
   página que cresce e ganha rolagem. */
.tv-charts-row { display: flex; gap: clamp(10px, 1.2vw, 18px); width: 100%; flex: 1; min-height: 0; }
.tv-chart-panel {
  background: #212126; border: 1px solid #35353c; border-radius: 14px;
  padding: clamp(12px, 1.2vw, 20px); display: flex; flex-direction: column; gap: 8px;
  min-width: 0; min-height: 0;
}
.tv-chart-panel.erro { border-left: 5px solid var(--erro); }
.tv-chart-panel--linha { flex: 2.3; }
.tv-chart-panel--ranking { flex: 1; }
.tv-chart-titulo {
  font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase;
  font-size: clamp(11px, 0.85vw, 14px); color: #a1a1a9; flex-shrink: 0;
}
.tv-chart-canvas-wrap { flex: 1; position: relative; min-height: 0; }
.tv-chart-canvas-wrap canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.tv-chart-vazio {
  flex: 1; display: none; align-items: center; justify-content: center;
  color: #a1a1a9; font-size: clamp(13px, 1.1vw, 16px); text-align: center; padding: 0 12px;
}
.tv-footer { text-align: center; font-size: clamp(12px, 1vw, 15px); color: #71717a; flex-shrink: 0; }
.tv-status--erro { color: var(--warn); }
.tv-status--fatal { color: var(--erro); font-weight: 700; }
.tv-controle-flutuante {
  position: fixed; z-index: 10; opacity: 0.55; transition: opacity 0.15s;
}
.tv-controle-flutuante:hover, .tv-controle-flutuante:focus-within { opacity: 1; }
:fullscreen .tv-controle-flutuante { opacity: 0; pointer-events: none; }
:fullscreen .tv-controle-flutuante.tv-controle-flutuante--visivel { opacity: 1; pointer-events: auto; }

.tv-fullscreen-btn {
  bottom: 20px; right: 20px;
  background: #212126; border: 1px solid #35353c; color: #f2f2f4;
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 16px; border-radius: 10px; cursor: pointer;
}

.tv-periodo-seletor { bottom: 20px; left: 20px; display: flex; gap: 8px; }
.tv-periodo-btn {
  background: #212126; border: 1px solid #35353c; color: #f2f2f4;
  font-family: inherit; font-size: 13px; font-weight: 600; text-decoration: none;
  padding: 8px 14px; border-radius: 10px; cursor: pointer;
}
.tv-periodo-btn.ativo { background: #35353c; border-color: #55555f; color: #fff; }
.tv-cliente-select {
  appearance: none; -webkit-appearance: none; max-width: 200px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23a1a1a9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 26px;
}
.tv-cliente-select option { background: #212126; color: #f2f2f4; }

/* ---------- Clientes (cards colapsáveis — nomes de classe "mc-" ficaram da
   aba "Meus Clientes" original, absorvida aqui em 2026-09-17) ---------- */
.mc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
/* <details> não pode herdar display:flex do .form-card — senão o <summary>
   e o corpo expandido viram colunas lado a lado em vez de empilhados (mesma
   pegadinha já documentada em .attn-item--details). */
.mc-card { margin-bottom: 0; display: block; padding: 0; overflow: hidden; }
.mc-card-summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 22px 24px;
}
.mc-card-summary::-webkit-details-marker { display: none; }
.mc-card-summary::after {
  content: '›'; color: var(--muted); font-size: 20px; line-height: 1;
  transform: rotate(90deg); transition: transform 0.15s;
}
.mc-card[open] .mc-card-summary::after { transform: rotate(-90deg); }
.mc-card-summary-nome { font-weight: 700; }
.mc-card-summary-status { margin-left: auto; }
.mc-card-body { display: flex; flex-direction: column; gap: 10px; padding: 0 24px 24px; }
.mc-linha { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.mc-linha--bloco { flex-direction: column; align-items: stretch; gap: 6px; }

/* Contador de não lidas ao lado de "Notificações" no menu */
.nav-badge { display: inline-block; margin-left: 6px; min-width: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--erro); color: #1a1a1e; font-size: 10px; font-weight: 700; line-height: 18px; text-align: center;
  letter-spacing: 0; vertical-align: 1px; }
.nav-badge[hidden] { display: none; }
:root[data-theme="claro"] .nav-badge { color: #fff; }

.notif-lista { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.notif-item form { margin: 0; }
.notif-item button { all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer;
  padding: 14px 16px; border: 1px solid var(--border, rgba(128,128,128,.25)); border-radius: 10px; }
.notif-item button:hover { background: var(--masthead-hover-bg, rgba(128,128,128,.1)); }
.notif-item button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.notif-item.nao-lida button { border-left: 3px solid var(--gold); font-weight: 600; }
.notif-titulo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.notif-msg { margin: 6px 0 0; font-weight: 400; }
.notif-quando { margin: 4px 0 0; font-weight: 400; font-size: 12px; }

/* Bate-papo da equipe */
.chat { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.chat-lista { display: flex; flex-direction: column; gap: 8px; height: 55vh; min-height: 280px; overflow-y: auto;
  padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.chat-msg { max-width: 82%; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); align-self: flex-start; }
.chat-msg.minha { align-self: flex-end; background: var(--surface-3); }
.chat-autor { display: flex; gap: 8px; align-items: baseline; font-size: 12px; font-weight: 700; }
.chat-hora { font-weight: 400; color: var(--muted); }
.chat-texto { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-vazio { margin: auto; color: var(--muted); text-align: center; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { flex: 1; resize: none; min-height: 44px; max-height: 140px; }
.chat-erro { margin: 0; color: var(--erro); font-size: 13px; min-height: 1em; }

/* SEO/GEO: um cartão por cliente, itens em grid que quebra linha (sem rolagem lateral) */
.organico-lista { display: flex; flex-direction: column; gap: 12px; }
.organico-card { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 14px 16px; }
.organico-card-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.organico-cliente { font-weight: 700; color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
.organico-cliente:hover { text-decoration: underline; }
.organico-itens { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px 12px; }
.organico-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.organico-item-nome { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.organico-item .status-select { width: 100%; }

/* Ícone flutuante + popup de Notificações/Bate-papo (todas as telas logadas) */
.fab { position: fixed; right: 20px; bottom: 20px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.fab-botao { position: relative; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--border); cursor: pointer;
  background: var(--surface); color: var(--accent); display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.35); transition: transform .12s, background .15s; }
.fab-botao:hover { background: var(--surface-2); transform: translateY(-1px); }
.fab-botao:focus-visible, .fab-abas button:focus-visible, .fab-vertudo:focus-visible, .fab-notif:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.fab-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--erro); color: #1a1a1e; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
.fab-badge[hidden], .fab-mini[hidden] { display: none; }
:root[data-theme="claro"] .fab-badge, :root[data-theme="claro"] .fab-mini { color: #fff; }
.fab-popup { width: min(380px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 110px)); display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 10px 34px rgba(0,0,0,.45); overflow: hidden; }
.fab-popup[hidden] { display: none; }
.fab-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 0; border-bottom: 1px solid var(--border); }
.fab-abas { display: flex; gap: 4px; }
.fab-abas button { all: unset; box-sizing: border-box; cursor: pointer; padding: 8px 10px; font-size: 12.5px; font-weight: 700;
  color: var(--muted); border-bottom: 2px solid transparent; }
.fab-abas button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--gold); }
.fab-mini { display: inline-block; min-width: 16px; padding: 0 4px; margin-left: 4px; border-radius: 999px; background: var(--erro);
  color: #1a1a1e; font-size: 10px; line-height: 16px; text-align: center; }
.fab-vertudo { font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 6px 4px; }
.fab-vertudo:hover { color: var(--accent); text-decoration: underline; }
.fab-painel { display: flex; flex-direction: column; gap: 8px; padding: 10px; min-height: 0; overflow-y: auto; }
.fab-painel[hidden] { display: none; }
.fab-acoes { display: flex; justify-content: flex-end; }
.fab-acoes[hidden], #fab-todas[hidden] { display: none; }
.fab-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fab-vazio { color: var(--muted); text-align: center; padding: 18px 0; }
.fab-notif { all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer; padding: 9px 11px;
  border: 1px solid var(--border); border-radius: 9px; }
.fab-notif:hover { background: var(--surface-2); }
.fab-notif.nao-lida { border-left: 3px solid var(--gold); font-weight: 600; }
.fab-notif-topo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.fab-notif-msg { display: block; margin-top: 4px; font-weight: 400; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.fab-notif-quando { display: block; margin-top: 3px; font-weight: 400; font-size: 11px; color: var(--muted); }
.fab-chat-lista { height: 260px; min-height: 160px; }
.fab-painel .chat-form textarea { min-height: 38px; }
@media (max-width: 520px) { .fab { right: 12px; bottom: 12px; } }
@media (prefers-reduced-motion: reduce) { .fab-botao { transition: none; } }

.fab-direita { display: flex; align-items: center; gap: 6px; }
.fab-som { all: unset; box-sizing: border-box; cursor: pointer; width: 28px; height: 28px; display: inline-flex; align-items: center;
  justify-content: center; border-radius: 50%; color: var(--muted); }
.fab-som:hover { background: var(--surface-2); color: var(--accent); }
.fab-som:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.fab-som[aria-pressed="false"] .fab-som-ondas { display: none; }
.fab-som[aria-pressed="false"] { color: var(--muted); opacity: .6; }

/* Início: cards do topo em grade — até 4 cards numa linha; com 5 ou 6 viram 2 linhas de 3 (colunas vêm de --cols) */
.cards--grid { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); }
.cards--grid .card { min-width: 0; }
@media (max-width: 1000px) { .cards--grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .cards--grid { grid-template-columns: 1fr; } }

/* Início > Minhas tarefas: título em largura total, cliente/"Atribuída por"/data/status numa linha abaixo.
   Classe própria porque .mini-list é compartilhada com outras telas (lá o layout lado a lado continua). */
.mini-list.tarefas-lista li { display: block; }
.tarefas-lista .tarefa-titulo { display: block; overflow-wrap: break-word; line-height: 1.35; }
.tarefas-lista .tarefa-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 4px; flex-shrink: 1; }


/* ---------- Relatórios > Mensal por cliente (a partir do Diário) ---------- */
.relatorio-mensal td { vertical-align: top; }
.relatorio-mensal tbody + tbody { border-top: 2px solid var(--border); }
.relatorio-mensal .rm-semana { white-space: nowrap; width: 1%; }
.relatorio-mensal .rm-data, .relatorio-mensal .rm-autor { white-space: nowrap; width: 1%; }
.relatorio-mensal .rm-vazia td { opacity: .6; }

/* ---------- Área do Colaborador (/colaborador) ----------
   Faixa branca no topo = única superfície clara do painel, de propósito (rotina interna da Zero21).
   Paleta preto e branco; cor só em status (badge ok/info/warn/off). Blocos seguem o .card do painel.
   .diario-texto também é usado pela tabela do Relatório mensal. */
.diario-texto { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; font-size: 14px; }

/* cabeçalho compacto numa linha: [logo | ÁREA DO COLABORADOR]  [avatar nome/data]  [botão] */
.rd-hero { display: flex; align-items: center; gap: 18px 24px; flex-wrap: wrap; background: #ffffff; color: #111114;
  border-radius: var(--radius); padding: 16px 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.rd-hero-marca { display: flex; align-items: center; gap: 12px; padding-right: 22px; border-right: 1px solid #e6e6ea; }
.rd-hero-marca img { height: 20px; width: auto; display: block; }
.rd-hero-area { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #5f5f67; white-space: nowrap; }
.ac-quem { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.ac-quem-texto { min-width: 0; }
.ac-quem-nome { margin: 0; font-size: 18px; font-weight: 700; color: #111114; line-height: 1.25; overflow-wrap: anywhere; }
.ac-quem-cargo { font-size: 14px; font-weight: 500; color: #5f5f67; }
.ac-quem-sub { margin: 2px 0 0; font-size: 13px; color: #5f5f67; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ac-selo { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #111114; color: #fff; font-size: 10.5px;
  font-weight: 700; letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; }
.ac-avatar { width: 40px; height: 40px; border-radius: 50%; background: #111114; color: #fff; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.rd-hero--outro { box-shadow: var(--shadow), inset 0 0 0 2px #111114; }
.rd-btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px;
  border-radius: 10px; background: #111114; color: #ffffff; font-size: 14px; font-weight: 600; white-space: nowrap; }
.rd-btn:hover { opacity: .85; }
.rd-btn:focus-visible { outline: 2px solid #111114; outline-offset: 2px; }
.rd-btn--claro { background: #f1f1f3; color: #111114; border: 1px solid #dcdce1; }
@media (max-width: 760px) {
  .rd-hero { padding: 14px 16px; gap: 12px; }
  .rd-hero-marca { flex-basis: 100%; padding: 0 0 10px; border-right: none; border-bottom: 1px solid #e6e6ea; }
  .rd-btn { width: 100%; justify-content: center; }
}
.ac-nav { margin-bottom: 22px; }

/* blocos, grade e listas */
.ac-bloco { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.ac-bloco-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.ac-bloco-topo h2, .ac-lado-titulo { margin: 0; font-size: var(--fs-section); font-weight: 700; color: var(--accent); }
.ac-sub { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.ac-nota { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.ac-anteriores { margin-top: 12px; border-top: 1px solid var(--border-soft); padding-top: 10px; }
.ac-anteriores summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.ac-anterior { padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.ac-anterior:last-child { border-bottom: none; }
.ac-anterior-dia { margin: 0 0 3px; font-size: 12px; font-weight: 700; color: var(--muted); }
.ac-lista--compacta .ac-item-lado { display: none; }
.ac-item-seta { color: var(--muted); flex-shrink: 0; opacity: .6; }
.ac-item:hover .ac-item-seta { opacity: 1; color: var(--text); }
.ac-cliente-escolhido { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.ac-cliente-escolhido strong { color: var(--text); }
.ac-form ::placeholder, .ac-filtros ::placeholder { color: var(--muted); opacity: .9; }

/* painéis recolhíveis (filtros, calendário) — no celular começam fechados */
.ac-recolhe > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; }
.ac-recolhe > summary::-webkit-details-marker { display: none; }
.ac-recolhe > summary::after { content: "▾"; margin-left: auto; color: var(--muted); font-size: 12px; transition: transform .15s; }
.ac-recolhe:not([open]) > summary::after { transform: rotate(-90deg); }
.ac-filtros-box { margin-bottom: 16px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.ac-filtros-box[open] > summary { margin-bottom: 12px; }
.ac-filtros-box .ac-filtros { margin: 0; padding: 0; border: none; background: none; }
.ac-cal .ac-recolhe > summary { margin-bottom: 10px; }
@media (min-width: 901px) { .ac-cal .ac-recolhe > summary { display: none; } }

/* equipe (master) */
.ac-numeros--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .ac-numeros--3 { grid-template-columns: 1fr; } }
.ac-equipe-resumo { margin-bottom: 16px; }
.ac-equipe-filtro { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.ac-equipe-filtro input[type=search] { flex: 1; min-width: 200px; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.ac-segmentos { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.ac-segmentos a { padding: 6px 12px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; }
.ac-segmentos a.active { background: var(--accent); color: var(--accent-ink); }
.ac-pessoas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ac-pessoa { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.ac-pessoa.inativo { opacity: .65; }
.ac-pessoa-topo { display: flex; align-items: center; gap: 12px; }
.ac-pessoa-quem { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ac-pessoa-quem strong { overflow-wrap: anywhere; }
.ac-avatar--escuro { background: var(--surface-3); color: var(--text); }
.ac-pessoa-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.ac-pessoa-nums div { padding: 8px 10px; border-radius: 8px; background: var(--surface-2); }
.ac-pessoa-nums dt { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ac-pessoa-nums dd { margin: 2px 0 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ac-pessoa-nums dd.warn { color: var(--warn); }
.ac-pessoa-ultimo { margin: 0; font-size: 12.5px; color: var(--muted); }
.ac-lado-titulo { margin-bottom: 12px; }
.ac-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ac-grade { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 960px) { .ac-grade { grid-template-columns: 1fr; } }
.ac-vazio { padding: 24px; border: 1px dashed var(--border); border-radius: 10px; text-align: center; }
.ac-vazio p { margin: 0 0 6px; }
.ac-vazio .btn { margin-top: 8px; }
.ac-vazio-linha { margin: 12px 0 0; color: var(--muted); font-size: var(--fs-hint); }
.ac-textarea { width: 100%; box-sizing: border-box; min-height: 110px; resize: vertical; padding: 10px 12px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; line-height: 1.5; }
.ac-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ac-rodape { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.ac-largo { width: 100%; justify-content: center; }

/* card de destaque "O que você fez hoje?" */
.ac-destaque { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 24px;
  border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.ac-destaque h2 { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--accent); }
.ac-destaque p { margin: 0; color: var(--muted); font-size: 14px; max-width: 520px; }

/* indicadores */
.ac-periodo select { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; }
.ac-numeros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .ac-numeros { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ac-numero { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 10px; border: 1px solid var(--border-soft);
  background: var(--surface-2); text-decoration: none; color: var(--text); transition: border-color .15s; }
.ac-numero:hover { border-color: var(--accent); }
.ac-numero-valor { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ac-numero-rotulo { font-size: 13px; font-weight: 600; }
.ac-numero-dica { font-size: 11.5px; color: var(--muted); }
.ac-numero.warn .ac-numero-valor { color: var(--warn); }

/* linha de atividade (visão geral, equipe, histórico) */
.ac-lista { display: flex; flex-direction: column; }
.ac-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 8px; margin: 0 -8px;
  border-radius: 8px; border-top: 1px solid var(--border-soft); text-decoration: none; color: var(--text); }
.ac-lista .ac-item:first-child { border-top-color: transparent; }
.ac-item:hover { background: var(--surface-2); }
.ac-item:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.ac-item-principal { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ac-item-titulo { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.ac-item-meta { display: flex; flex-wrap: wrap; gap: 2px 0; font-size: 12.5px; color: var(--muted); }
.ac-item-meta span + span::before { content: "·"; margin: 0 6px; }
.ac-item-cliente { color: var(--text); font-weight: 500; }
.ac-item-lado { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.ac-item-quando { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .ac-item { flex-direction: column; align-items: flex-start; } .ac-item-lado { flex-direction: row; align-items: center; } .ac-item-seta { display: none; } }

/* formulário */
.ac-form-grade { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .ac-form-grade { grid-template-columns: 1fr; } }
.ac-form .field textarea { resize: vertical; line-height: 1.5; }
.ac-form .form-row .field { min-width: 150px; }
.ac-campo-largo { flex: 2 !important; }
.ac-obrig { color: var(--text); }
.ac-busca-cliente { margin-bottom: 6px; }
.ac-erro { margin: 4px 0 0; font-size: 12.5px; color: var(--erro); font-weight: 600; }
.ac-form [aria-invalid="true"] { border-color: var(--erro) !important; }
.ac-dica { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
/* barra de ações fixa no rodapé da tela no desktop (formulário é longo); no celular vira coluna no fim */
.ac-acoes { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
  margin-top: 16px; padding: 12px 84px 12px 0; background: var(--bg); border-top: 1px solid var(--border); }
@media (max-width: 600px) {
  .ac-acoes { position: static; flex-direction: column-reverse; padding: 0; border: none; }
  .ac-acoes .btn { width: 100%; justify-content: center; }
}

/* histórico */
.ac-filtros { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; margin-bottom: 16px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.ac-filtros .field { flex: 1 1 140px; max-width: 210px; }
.ac-filtros .field input, .ac-filtros .field select { padding: 8px 10px; font-size: 13.5px; }
.ac-f-busca { flex: 2 1 220px !important; max-width: none !important; }
@media (max-width: 600px) { .ac-filtros .field { max-width: none; } }
.ac-filtros-acoes { display: flex; gap: 6px; }
.ac-hist { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 16px; align-items: start; }
.ac-cal { padding: 16px; position: sticky; top: 90px; }
@media (max-width: 900px) { .ac-hist { grid-template-columns: 1fr; } .ac-cal { position: static; } }
.ac-contagem { margin: 2px 0 12px; font-size: 13.5px; font-weight: 600; }
.ac-dia { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 22px 10px; margin-bottom: 12px; }
.ac-dia-titulo { margin: 0 0 4px; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ac-paginacao { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }

/* calendário */
.rd-cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rd-cal-mes { font-size: var(--fs-section); }
.rd-desligado { visibility: hidden; }
.rd-cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.rd-cal th { font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0 6px; text-align: center; }
.rd-cal td { padding: 2px; text-align: center; }
.rd-dia { position: relative; display: flex; align-items: center; justify-content: center; height: 34px; border-radius: 9px;
  font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--muted); text-decoration: none; }
a.rd-dia:hover { background: var(--surface-2); color: var(--text); }
.rd-dia.tem { color: var(--text); font-weight: 700; }
.rd-dia.tem::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.rd-dia.hoje { box-shadow: inset 0 0 0 1px var(--border); color: var(--text); }
.rd-dia.sel, a.rd-dia.sel:hover { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.rd-dia.futuro { opacity: .35; }
.rd-legenda { display: flex; align-items: center; gap: 6px; margin: 12px 0 4px; font-size: 12.5px; color: var(--muted); }
.rd-ponto { width: 5px; height: 5px; border-radius: 50%; background: var(--text); }

/* detalhe */
.ac-detalhe { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .ac-detalhe { grid-template-columns: 1fr; } }
.ac-det-topo { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border-soft); }
.ac-det-cliente { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ac-det-titulo { margin: 0 0 6px; font-size: 20px; font-weight: 700; color: var(--accent); overflow-wrap: anywhere; }
.ac-det-meta { margin: 0; font-size: 13px; color: var(--muted); }
.ac-det-acoes { display: flex; align-items: flex-start; gap: 8px; }
.ac-det-bloco { margin-bottom: 16px; }
.ac-det-bloco h3 { margin: 0 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ac-det-campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 0; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.ac-det-campos dt, .ac-det-lista dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.ac-det-campos dd, .ac-det-lista dd { margin: 2px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.ac-det-lista { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ac-alteracoes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ac-alteracoes ul { margin: 4px 0 0; padding-left: 16px; font-size: 13px; }
.ac-msg { max-width: 560px; }
.ac-msg h2 { margin: 0 0 8px; font-size: 17px; color: var(--accent); }

.icone-btn { all: unset; box-sizing: border-box; cursor: pointer; width: 28px; height: 28px; display: inline-flex;
  align-items: center; justify-content: center; border-radius: 7px; color: var(--muted); vertical-align: middle; }
.icone-btn:hover { background: var(--surface-2); color: var(--accent); }
.icone-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

/* diálogo (PDF) */
.dlg { width: min(460px, calc(100vw - 32px)); padding: 22px 24px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); }
.dlg::backdrop { background: rgba(0,0,0,.55); }
.dlg-topo { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dlg-topo h2 { margin: 0; font-size: 17px; color: var(--accent); }
.dlg .form-row .field { min-width: 0; }
.dlg-acoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.relatorio-mensal .rm-titulo { font-weight: 600; color: var(--text); text-decoration: none; }
.relatorio-mensal .rm-titulo:hover { text-decoration: underline; }
