/* Outbound Scrapper — folha de estilo única, sem framework e sem etapa de build.
 *
 * TEMA CLARO FIXO. Havia um bloco `prefers-color-scheme: dark` que trocava a
 * paleta inteira conforme a configuração do sistema operacional. O resultado
 * era um app que ninguém tinha visto de verdade: quem estava com o Windows em
 * modo escuro recebia uma variante nunca revisada, com botão desabilitado
 * ilegível. Uma aparência só, conferida, vale mais que duas pela metade.
 *
 * Acessibilidade tratada explicitamente:
 *  - contraste de cada par texto/fundo medido, mínimo 4.5:1 (AA);
 *  - :focus-visible com anel de 3px em TODO elemento interativo;
 *  - nada depende só de cor: status também tem rótulo em texto;
 *  - alvos de clique com no mínimo 36px de altura;
 *  - respeita prefers-reduced-motion.
 */

:root {
  --nav-bg: #e6f1ef;
  --nav-ink: #254c50;
  --nav-muted: #4f6b70;
  --workspace-bg: #f0f5f5;
  --accent-blue-soft: #edf5fa;
  --accent-gold-soft: #fff7e6;
  --accent-pink-soft: #fcf0f5;
  /* Claro, e só claro. */
  color-scheme: light;

  /* Neutros — cinza levemente azulado, para conversar com a marca. */
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --surface-3: #e9edf3;
  --border: #e3e7ee;
  --border-strong: #848fa6;
  --text: #10192b;
  --text-soft: #4d5a72;
  --text-faint: #5a667e;

  /* Marca. */
  --brand: #006568;
  --brand-strong: #003d40;
  --brand-soft: #e6f6f7;
  --brand-line: #a5d9dd;
  --border-hover: #6b7690;
  --ok-hover: #0f5430;
  --airbnb-bg: #fdeef0;
  --airbnb-line: #f2c2c8;
  --airbnb-text: #a4243b;
  --booking-bg: #eaf1fd;
  --booking-line: #b9cdf3;
  --booking-text: #14487f;
  --ink-button: #172630;
  --ink-button-hover: #0f1c24;
  --stays-green: #39a86b;
  --stays-blue: #2089a4;
  --stays-yellow: #edb52e;
  --stays-pink: #cf2f68;
  --login-bg-a: #f7fbfb;
  --login-bg-b: #f5f2fb;
  /* Marca Google. São as quatro cores oficiais do "G", usadas só no
     selo do botão de login. Ficam aqui, e não soltas na regra, porque
     cor fora do :root escapa da medição de contraste do test_visual. */
  --google-blue: #4285f4;
  --google-green: #34a853;
  --google-yellow: #fbbc05;
  --google-red: #ea4335;

  /* Estados. Cada cor vem em par: traço/texto forte + fundo suave. */
  --ok: #15683c;
  --ok-soft: #e8f6ee;
  --ok-line: #a9dcc0;
  --warn: #7a4e00;
  --warn-soft: #fdf3e0;
  --warn-line: #eccb92;
  --danger: #a01d1a;
  --danger-soft: #fdecec;
  --danger-line: #f0b7b5;
  --info: #1d4ed8;
  --info-soft: #eef3ff;
  --info-line: #c3d4fb;

  /* Acento secundário — usado onde a cor da marca já está ocupada e a tela
   * precisa distinguir um bloco do outro sem parecer alarme. */
  --accent: #6d28d9;
  --accent-soft: #f4efff;
  --accent-line: #d9c8fb;
  --teal: #0f6f76;
  --teal-soft: #e6f6f7;
  --teal-line: #a5d9dd;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;

  /* Sombra discreta: a hierarquia vem da borda e do espaçamento, não de
   * profundidade exagerada. */
  --shadow-sm: 0 1px 2px rgba(16, 25, 43, .05);
  --shadow: 0 1px 2px rgba(16, 25, 43, .05), 0 2px 8px rgba(16, 25, 43, .04);
  --shadow-lg: 0 2px 4px rgba(16, 25, 43, .06), 0 12px 28px rgba(16, 25, 43, .10);

  --focus: 0 0 0 3px rgba(29, 78, 216, .35);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* O atributo `hidden` precisa vencer o `display` dos componentes.
 * Sem isto, `.app-shell { display: flex }` e `.login-wrap { display: grid }`
 * sobrescrevem o display:none do navegador e as duas telas aparecem juntas.
 * Encontrado na validação por navegador. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--radius-xs);
}

a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-strong); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; font-weight: 640; letter-spacing: -.011em; }
h1 { font-size: 1.55rem; letter-spacing: -.018em; }
h2 { font-size: 1.1rem; }
h3 { font-size: .95rem; }
p { margin: 0 0 .8em; }

code, .mono { font-family: var(--mono); font-size: .88em; }
code {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 4px; padding: .08em .35em;
}

.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;
}

.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 100;
  background: var(--surface); color: var(--text); padding: 10px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); transition: top .15s;
}
.skip-link:focus { top: 8px; }

/* ---------------------------------------------------------------- layout
 *
 * Barra lateral fixa + área de trabalho.
 *
 * Antes eram abas numa faixa horizontal. Com doze telas, a faixa passava a
 * rolar para o lado e metade dos destinos ficava fora da vista — o app
 * parecia ter cinco telas. Na lateral cabem todas de uma vez, agrupadas pelo
 * que a pessoa está tentando fazer (operar, olhar a base, integrar, manter),
 * que é como alguém procura uma tela.
 */

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 236px; flex: none; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 30;
}
.sidebar__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px 14px; border-bottom: 1px solid var(--border);
}
.sidebar__brand img { width: 32px; height: 32px; flex: none; }
.sidebar__name {
  font-size: .98rem; font-weight: 500; color: var(--text-soft);
  letter-spacing: -.01em; line-height: 1.2;
}
.sidebar__name strong { display: block; font-weight: 700; color: var(--text); }

.nav { flex: 1; padding: 14px 10px; }
.nav__group { margin-bottom: 18px; }
.nav__group:last-child { margin-bottom: 0; }
.nav__title {
  margin: 0 0 4px; padding: 0 10px;
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; color: var(--text-faint);
}
.nav a {
  display: block; padding: 7px 11px; margin-bottom: 1px;
  border-radius: var(--radius-xs); border-left: 3px solid transparent;
  color: var(--text-soft); text-decoration: none; font-weight: 560;
  font-size: .89rem; transition: background .12s, color .12s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] {
  color: var(--brand-strong); background: var(--brand-soft);
  border-left-color: var(--brand); font-weight: 660;
}

.sidebar__foot {
  padding: 12px 18px; border-top: 1px solid var(--border);
  font-size: .74rem; color: var(--text-faint);
}

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 22px; min-height: 54px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.topbar__spacer { flex: 1; }
.topbar__user { font-size: .82rem; color: var(--text-soft); text-align: right; line-height: 1.3; }
.topbar__user strong { display: block; color: var(--text); font-weight: 620; }

/* Botão de ícone — só o menu do celular, por enquanto. */
.icon-btn {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: none; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs); color: var(--text);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn__bars, .icon-btn__bars::before, .icon-btn__bars::after {
  display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px;
}
.icon-btn__bars { position: relative; }
.icon-btn__bars::before, .icon-btn__bars::after { content: ""; position: absolute; left: 0; }
.icon-btn__bars::before { top: -5px; }
.icon-btn__bars::after { top: 5px; }

.sidebar-backdrop {
  position: fixed; inset: 0; z-index: 25;
  background: rgba(16, 25, 43, .42);
}

main { flex: 1; padding: 24px 22px 44px; max-width: 1400px; width: 100%; }

.page-head {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start;
  margin-bottom: 20px;
}
.page-head__text { flex: 1 1 320px; }
.page-head > div:first-child { flex: 1 1 320px; }
.page-head h1 {
  margin-bottom: .18em; padding-left: 12px;
  border-left: 4px solid var(--brand); border-radius: 2px;
}
.page-head p { color: var(--text-soft); margin: 0; font-size: .92rem; max-width: 76ch; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

/* Cabeçalho de seção com faixa colorida.
 *
 * Antes era só um texto em negrito sobre branco, e uma tela com cinco
 * seções virava uma parede uniforme — difícil achar onde uma acaba e a
 * outra começa. A faixa dá um ponto de referência para o olho percorrer a
 * página, e o fundo levemente tingido separa o título do conteúdo sem
 * precisar de mais espaço em branco. */
.card > h2 {
  display: flex; align-items: center; gap: 10px;
  margin: -20px -22px 18px; padding: 13px 22px 13px 19px;
  background: var(--brand-soft);
  border-bottom: 1px solid var(--brand-line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--brand-strong);
  font-size: 1.02rem;
}

/* Variantes por natureza da seção, para a cor significar alguma coisa em
 * vez de enfeitar. O JS aplica a classe no cartão. */
.card--acao > h2 { background: var(--brand-soft); border-left-color: var(--brand);
  border-bottom-color: var(--brand-line); color: var(--brand-strong); }
.card--dado > h2 { background: var(--teal-soft); border-left-color: var(--teal);
  border-bottom-color: var(--teal-line); color: var(--teal); }
.card--evidencia > h2 { background: var(--accent-soft); border-left-color: var(--accent);
  border-bottom-color: var(--accent-line); color: var(--accent); }
.card--decisao > h2 { background: var(--warn-soft); border-left-color: var(--warn);
  border-bottom-color: var(--warn-line); color: var(--warn); }
.card--perigo > h2 { background: var(--danger-soft); border-left-color: var(--danger);
  border-bottom-color: var(--danger-line); color: var(--danger); }

/* Seções numeradas ("1. Recorte geográfico") ganham um selo redondo com o
 * número, em vez de o número ficar solto no meio do texto. */
.card__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; flex: none; border-radius: 50%;
  background: var(--brand); color: #fff;
  font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.card--dado > h2 .card__num { background: var(--teal); }
.card--evidencia > h2 .card__num { background: var(--accent); }
.card--decisao > h2 .card__num { background: var(--warn); }
.card__hint { color: var(--text-soft); font-size: .875rem; }

.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stack { display: grid; gap: 2px; }

/* ---------------------------------------------------------------- forms */

.field { margin-bottom: 15px; }
.field > label, .fieldset > legend {
  display: block; font-weight: 600; font-size: .86rem; margin-bottom: 6px;
  color: var(--text);
}
.field__help { color: var(--text-soft); font-size: .82rem; margin: 5px 0 0; }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=search], input[type=date], select, textarea {
  width: 100%; padding: 9px 12px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs); min-height: 38px;
  transition: border-color .12s, box-shadow .12s;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) {
  border-color: var(--border-hover);
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: var(--brand); box-shadow: var(--focus);
}
input:disabled, select:disabled, textarea:disabled {
  background: var(--surface-2); color: var(--text-faint); cursor: not-allowed;
}
input[aria-invalid="true"] { border-color: var(--danger); }
textarea { min-height: 84px; resize: vertical; }

/* Caixas de seleção na cor da marca, em tamanho clicável. */
input[type=checkbox], input[type=radio] {
  accent-color: var(--brand); width: 17px; height: 17px; min-height: 0;
  cursor: pointer;
}

.fieldset {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin: 0 0 15px;
}
.fieldset legend { padding: 0 6px; }

.checkline { display: flex; align-items: flex-start; gap: 9px; margin: 8px 0; }
.checkline input { width: 17px; margin-top: 2px; flex: none; }
.checkline label { font-weight: 500; font-size: .92rem; cursor: pointer; }

.picker {
  border: 1px solid var(--border-strong); border-radius: var(--radius-xs);
  max-height: 264px; overflow-y: auto; background: var(--surface);
}
.picker__row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 12px; border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.picker__row:last-child { border-bottom: none; }
.picker__row:hover { background: var(--brand-soft); }
.picker__row input { width: 17px; margin-top: 2px; flex: none; }
.picker__row label { font-size: .9rem; font-weight: 560; cursor: pointer; }
.picker__row .evidence {
  display: block; color: var(--text-faint); font-size: .78rem;
  font-weight: 400; margin-top: 1px;
}
.picker__toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 10px; }

/* ---------------------------------------------------------------- botões */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 16px; min-height: 38px; font: inherit; font-size: .9rem;
  font-weight: 600; cursor: pointer; white-space: nowrap;
  border-radius: var(--radius-xs); border: 1px solid transparent;
  background: var(--brand); color: #fff;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover:not(:disabled) { background: var(--brand-strong); }
.btn:active:not(:disabled) { transform: translateY(.5px); }

/* Desabilitado LEGÍVEL.
 *
 * Era `opacity: .55`, que sobre fundo claro apagava o texto a ponto de o
 * botão virar um retângulo vazio — foi exatamente o que apareceu em
 * "Limpar regiões" e "Limpar cidades". Opacidade não é estilo de estado: é
 * um filtro que desbota tudo junto, inclusive o que precisa continuar
 * legível. Aqui o estado desabilitado tem cor própria, com contraste
 * medido, e o cursor comunica o resto. */
.btn:disabled {
  background: var(--surface-2); color: var(--text-faint);
  border-color: var(--border-strong); cursor: not-allowed; opacity: 1;
}

/* O botão secundário puxa para a cor da marca em vez de ser cinza: ele
 * continua claramente secundário (fundo branco), mas deixa de se confundir
 * com um campo desabilitado. */
.btn--ghost {
  background: var(--surface); color: var(--brand-strong);
  border-color: var(--brand-line);
}
.btn--ghost:hover:not(:disabled) { background: var(--brand-soft); border-color: var(--brand); }

/* Ação destrutiva em vermelho, sempre. Cor aqui não é enfeite: é o aviso
 * que separa "Aprovar" de "Suprimir" antes da leitura do rótulo. */
.btn--danger { background: var(--surface); color: var(--danger); border-color: var(--danger-line); }
.btn--danger:hover:not(:disabled) { background: var(--danger-soft); border-color: var(--danger); }

/* Confirmação positiva — aprovar, concluir. */
.btn--ok { background: var(--ok); color: #fff; border-color: transparent; }
.btn--ok:hover:not(:disabled) { background: var(--ok-hover); }

/* Neutro de verdade, para ações sem carga: voltar, cancelar, limpar. */
.btn--neutro { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--neutro:hover:not(:disabled) { background: var(--surface-2); border-color: var(--border-hover); }

.btn--sm { padding: 4px 11px; min-height: 30px; font-size: .82rem; }
.btn--lg { padding: 11px 20px; min-height: 44px; font-size: .95rem; }

/* ---------------------------------------------------------------- tables */

.table-wrap {
  overflow-x: auto; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; font-size: .885rem; background: var(--surface); }
caption { text-align: left; padding: 11px 14px; color: var(--text-soft); font-size: .85rem; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th {
  position: sticky; top: 0; background: var(--surface-2); font-size: .74rem;
  text-transform: uppercase; letter-spacing: .05em; color: var(--text-soft);
  font-weight: 680; border-bottom: 1px solid var(--border-strong); z-index: 1;
  white-space: nowrap;
}
tbody tr:hover { background: var(--brand-soft); }
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* A primeira coluna carrega o rótulo que identifica a linha. Sem largura
 * mínima ela colapsa em tela estreita e o texto vira uma letra por linha —
 * ilegível justamente na coluna que diz do que a linha trata. */
tbody td:first-child, thead th:first-child { min-width: 190px; }

.pager {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; font-size: .88rem; color: var(--text-soft);
}

/* ---------------------------------------------------------------- pills */

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 660;
  border: 1px solid; white-space: nowrap; line-height: 1.6;
}
.pill--ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.pill--warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.pill--danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.pill--info { background: var(--info-soft); color: var(--info); border-color: var(--info-line); }
.pill--muted { background: var(--surface-2); color: var(--text-soft); border-color: var(--border-strong); }

/* ------------------------------------------------------------ counters */

.counters { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
.counter {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 13px 15px;
}
.counter dt {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-soft); font-weight: 680;
}
.counter dd {
  margin: 5px 0 0; font-size: 1.6rem; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1;
}
/* O contador que conta para a meta ganha destaque visual — é o único número
 * que significa "gravado no banco". */
.counter--primary {
  background: var(--brand-soft); border-color: var(--brand-line);
}
.counter--primary dt { color: var(--brand-strong); }
.counter--primary dd { color: var(--brand-strong); }
.counter__help { font-size: .75rem; color: var(--text-faint); margin-top: 6px; line-height: 1.4; }

/* Cor por natureza do número: o que virou registro, o que ficou esperando,
 * o que foi descartado e o que deu errado. Assim o painel se lê de relance,
 * e não linha por linha. */
.counter--ok { background: var(--ok-soft); border-color: var(--ok-line); }
.counter--ok dt, .counter--ok dd { color: var(--ok); }
.counter--espera { background: var(--warn-soft); border-color: var(--warn-line); }
.counter--espera dt, .counter--espera dd { color: var(--warn); }
.counter--fora { background: var(--surface-2); border-color: var(--border-strong); }
.counter--fora dt, .counter--fora dd { color: var(--text-soft); }
.counter--erro { background: var(--danger-soft); border-color: var(--danger-line); }
.counter--erro dt, .counter--erro dd { color: var(--danger); }

/* ------------------------------------------------------- notes & states */

.note {
  border: 1px solid var(--info-line); border-left: 4px solid var(--info);
  background: var(--info-soft); color: var(--text);
  padding: 13px 16px; border-radius: var(--radius-xs); font-size: .875rem;
  margin-bottom: 16px;
}
.note--warn { border-color: var(--warn-line); border-left-color: var(--warn); background: var(--warn-soft); }
.note--danger { border-color: var(--danger-line); border-left-color: var(--danger); background: var(--danger-soft); }
.note--ok { border-color: var(--ok-line); border-left-color: var(--ok); background: var(--ok-soft); }
.note p:last-child { margin-bottom: 0; }

.empty {
  text-align: center; padding: 52px 24px; color: var(--text-soft);
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface);
}
.empty h3 { color: var(--text); font-size: 1.05rem; }
.empty p { max-width: 54ch; margin: 0 auto .8em; }

.loading { display: flex; align-items: center; gap: 11px; padding: 30px; color: var(--text-soft); }
.spinner {
  width: 18px; height: 18px; border: 2.5px solid var(--border-strong);
  border-top-color: var(--brand); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 3s; }
  * { transition: none !important; }
}

/* --------------------------------------------------------------- toasts */

.toasts {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: flex; flex-direction: column; gap: 9px; max-width: min(420px, calc(100vw - 36px));
}
.toast {
  background: var(--surface); border: 1px solid var(--border-strong);
  border-left: 4px solid var(--info); border-radius: var(--radius-xs);
  padding: 12px 14px; box-shadow: var(--shadow-lg); font-size: .89rem;
}
.toast--ok { border-left-color: var(--ok); }
.toast--danger { border-left-color: var(--danger); }
.toast--warn { border-left-color: var(--warn); }

/* --------------------------------------------------------------- login */

.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 32px 20px;
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(0, 101, 104, .16), transparent 32%),
    radial-gradient(circle at 90% 82%, rgba(109, 40, 217, .13), transparent 30%),
    linear-gradient(135deg, var(--login-bg-a) 0%, var(--bg) 52%, var(--login-bg-b) 100%);
}
.login-wrap::before, .login-wrap::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(2px); opacity: .7;
}
.login-wrap::before {
  width: 360px; height: 360px; top: -180px; right: 8%;
  border: 1px solid rgba(0, 101, 104, .12);
}
.login-wrap::after {
  width: 280px; height: 280px; bottom: -140px; left: 10%;
  border: 1px solid rgba(109, 40, 217, .12);
}
.login-card {
  width: min(586px, 100%); position: relative; z-index: 1;
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, .9); border-radius: 34px;
  padding: clamp(34px, 6vw, 52px) clamp(28px, 7vw, 54px) 42px;
  box-shadow: 0 24px 70px rgba(16, 25, 43, .14);
  overflow: hidden;
}
.login-card__brand { display: flex; flex-direction: column; align-items: center; gap: 24px; margin-bottom: 42px; text-align: center; }
.login-card__brand img.stays-brand {
  width: 254px; height: auto; max-width: 88%; padding: 0; border-radius: 0;
  box-shadow: none; object-fit: contain;
}
.login-card__title { display: grid; gap: 5px; justify-items: center; }
.login-card__brand h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2rem); font-weight: 850; letter-spacing: -.05em; color: var(--brand-strong); }
.login-card__brand p { margin: 0; font-size: .96rem; color: var(--text-soft); }
.login-google-only { display: grid; gap: 14px; }
.google-login {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: min(490px, 100%); margin-inline: auto; min-height: 68px; border-radius: 999px; font-size: 1.03rem; font-weight: 720;
  letter-spacing: -.01em; background: var(--ink-button); color: #fff; border: 1px solid var(--ink-button);
  text-decoration: none;
  box-shadow: 0 12px 22px rgba(23, 38, 48, .18);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.google-login:hover { color: #fff; background: var(--ink-button-hover); transform: translateY(-1px); box-shadow: 0 15px 28px rgba(23, 38, 48, .25); }
.google-login__mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none;
  border-radius: 50%;
  background: conic-gradient(from 210deg,
    var(--google-blue) 0 25%, var(--google-green) 25% 46%,
    var(--google-yellow) 46% 67%, var(--google-red) 67% 82%,
    var(--google-blue) 82% 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font: 850 1.35rem/1 Arial, sans-serif;
}
.google-login__arrow {
  display: inline-grid; place-items: center; width: 36px; height: 36px; margin-left: auto;
  border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff;
  font-size: 1.15rem; line-height: 1;
}
.login-google-only .card__hint { text-align: center; line-height: 1.5; }

.login-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px;
  border-radius: 34px 34px 0 0;
  background: linear-gradient(90deg, var(--stays-green) 0 30%, var(--stays-blue) 30% 62%, var(--stays-yellow) 62% 82%, var(--stays-pink) 82% 100%);
}
.login-kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 3px 0 24px;
  padding: 7px 13px; border: 1px solid var(--brand-line); border-radius: 999px;
  background: rgba(230, 246, 247, .68); color: var(--teal);
  font: 800 .68rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
}
.login-kicker span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 111, 118, .12);
}
.login-intro { margin-bottom: 24px; text-align: center; }
.login-intro h2 { margin: 0 0 9px; font-size: 2rem; font-weight: 760; letter-spacing: -.045em; color: var(--text); }
.login-intro p { margin: 0; color: var(--text-soft); font-size: 1rem; }
.login-intro p strong { color: var(--brand-strong); font-weight: 720; }

/* CTA e controles da aplicação seguem a mesma hierarquia do login. */
.btn:not(.btn--ghost):not(.btn--neutro) { background: var(--ink-button); border-color: var(--ink-button); color: #fff; }
.btn:not(.btn--ghost):not(.btn--neutro):hover:not(:disabled) { background: var(--ink-button-hover); border-color: var(--ink-button-hover); }
.btn--ghost { background: rgba(255, 255, 255, .7); border-color: var(--border-strong); }
.btn--ghost:hover:not(:disabled) { background: var(--surface); border-color: var(--brand); color: var(--brand-strong); }
.page-head h1 { letter-spacing: -.035em; }

/* ----------------------------------------------------------- refinamento V1 */

/* Linguagem visual compartilhada: superfícies leves, cantos mais orgânicos e
 * hierarquia por espaço. Os dados continuam densos; o acabamento deixa de
 * parecer uma coleção de caixas independentes. */
.app-shell { background: linear-gradient(135deg, var(--bg) 0%, var(--login-bg-a) 52%, var(--login-bg-b) 100%); }
.sidebar {
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(16px);
  border-right-color: rgba(132, 143, 166, .28);
}
.sidebar__brand { padding: 22px 20px 20px; border-bottom-color: rgba(132, 143, 166, .22); }
.sidebar__foot { border-top-color: rgba(132, 143, 166, .22); }
.topbar {
  background: rgba(255, 255, 255, .78); backdrop-filter: blur(16px);
  border-bottom-color: rgba(132, 143, 166, .24);
}
.card {
  border-radius: 18px; border-color: rgba(132, 143, 166, .25);
  box-shadow: 0 8px 24px rgba(16, 25, 43, .045);
}
.card:hover { box-shadow: 0 12px 30px rgba(16, 25, 43, .07); }
.card > h2 { border-radius: 17px 17px 0 0; }
.btn { border-radius: 11px; min-height: 40px; }
.btn--lg { min-height: 50px; border-radius: 13px; }
input, select, textarea { border-radius: 11px; border-color: rgba(132, 143, 166, .55); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
.filter-bar, .toolbar {
  border-radius: 15px; border-color: rgba(0, 101, 104, .2);
  box-shadow: 0 5px 16px rgba(16, 25, 43, .035);
}
.table-wrap {
  border-radius: 16px; border-color: rgba(132, 143, 166, .28);
  box-shadow: 0 6px 20px rgba(16, 25, 43, .035);
}
table thead th { background: rgba(230, 246, 247, .7); }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: rgba(230, 246, 247, .28); }
.kpi {
  border-radius: 18px; border-color: rgba(132, 143, 166, .25);
  box-shadow: 0 8px 24px rgba(16, 25, 43, .045);
}
.pill, .chip, .link-tag { border-radius: 999px; }
.empty, .note { border-radius: 16px; }

@media (max-width: 520px) {
  .login-wrap { padding: 18px 14px; }
  .login-card { border-radius: 22px; padding: 32px 22px 34px; }
  .login-card__brand { gap: 18px; margin-bottom: 34px; }
  .login-card__brand img.stays-brand { width: 190px; height: auto; }
  .login-card__brand h1 { font-size: 1.55rem; }
  .login-intro h2 { font-size: 1.7rem; }
  .login-intro p { font-size: .92rem; }
  .google-login { min-height: 58px; font-size: .92rem; }
}

/* --------------------------------------------------------------- detail */

.detail-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
@media (max-width: 980px) { .detail-grid { grid-template-columns: 1fr; } }

.kv { display: grid; grid-template-columns: minmax(150px, auto) 1fr; gap: 8px 16px; font-size: .9rem; }
.kv dt { color: var(--text-soft); font-weight: 600; }
.kv dd { margin: 0; overflow-wrap: anywhere; }

.evidence-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 10px; background: var(--surface);
}
.evidence-item__head {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  font-size: .78rem; color: var(--text-soft); margin-bottom: 6px;
}
.evidence-item blockquote {
  margin: 7px 0 0; padding: 9px 12px; background: var(--surface-2);
  border-left: 3px solid var(--border-strong); border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  font-size: .85rem; overflow-wrap: anywhere; white-space: pre-wrap;
}

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  padding: 10px 0 10px 16px; border-left: 2px solid var(--border);
  font-size: .88rem;
}
.timeline li strong { display: block; margin-bottom: 1px; }
.timeline time { color: var(--text-faint); font-size: .79rem; }
.timeline blockquote {
  margin: 6px 0 0; padding: 8px 11px; background: var(--surface-2);
  border-radius: var(--radius-xs); font-size: .85rem; overflow-wrap: anywhere;
}

/* --------------------------------------------------------------- misc */

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 180px; }
.row > .row__fixed { flex: none; }
/* Numa linha só de botões, cada um fica do tamanho do seu texto — esticar
 * botão até preencher a linha faz "Aprovar" e "Suprimir" parecerem a mesma
 * coisa, e some com a hierarquia entre eles. */
.row > .btn { flex: 0 0 auto; }

.inline-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }

.filter-bar {
  display: grid; gap: 11px; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  align-items: end; padding: 16px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.filter-bar .field { margin-bottom: 0; }

/* Utilitários de espaçamento.
 * Existem porque a CSP é estrita (style-src 'self', sem unsafe-inline): o
 * navegador bloqueia atributo style="..." inline. Em vez de afrouxar a CSP,
 * o espaçamento vem daqui. */
.m-0 { margin: 0 !important; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 16px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 16px; }
.ml-1 { margin-left: 4px; }
.w-full { width: 100%; }

/* --------------------------------------------------------------- chips */

/* Selo compacto para estado que fica sempre na tela (coletor conectado,
 * modo do Salesforce). Diferente de .pill: o chip é o estado do SISTEMA,
 * a pílula é o estado de um REGISTRO. */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 11px; border-radius: 999px; border: 1px solid;
  font-size: .78rem; font-weight: 600; white-space: nowrap;
}
.chip::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex: none;
}
.chip--ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.chip--warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.chip--danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.chip--muted { background: var(--surface-2); color: var(--text-soft); border-color: var(--border-strong); }

/* ----------------------------------------------------------------- kpis */

/* Cartão de indicador da visão geral. Número grande primeiro, rótulo
 * depois: quem abre a tela quer o número, não a explicação. */
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 18px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius); padding: 15px 18px; box-shadow: var(--shadow-sm);
}
.kpi__valor {
  font-size: 2rem; font-weight: 700; line-height: 1.05;
  font-variant-numeric: tabular-nums; letter-spacing: -.025em; color: var(--text);
}
.kpi__rotulo {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .05em;
  font-weight: 700; color: var(--text-soft); margin-top: 5px;
}
.kpi__nota { font-size: .78rem; color: var(--text-faint); margin-top: 5px; line-height: 1.4; }
.kpi--ok { border-left-color: var(--ok); } .kpi--ok .kpi__valor { color: var(--ok); }
.kpi--warn { border-left-color: var(--warn); } .kpi--warn .kpi__valor { color: var(--warn); }
.kpi--danger { border-left-color: var(--danger); } .kpi--danger .kpi__valor { color: var(--danger); }
.kpi--accent { border-left-color: var(--accent); } .kpi--accent .kpi__valor { color: var(--accent); }
.kpi--teal { border-left-color: var(--teal); } .kpi--teal .kpi__valor { color: var(--teal); }

/* -------------------------------------------------------------- tooltip */

/* O "i" que expande no hover, pedido na reunião: o nome da lista fica curto
 * na tabela e o detalhe completo (regiões, porte, quem pediu, quando) sai
 * aqui, sem ocupar coluna. Abre no foco também — quem navega por teclado
 * precisa chegar nele. */
.info {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; flex: none; margin-left: 5px; vertical-align: middle;
  border-radius: 50%; border: 1px solid var(--brand-line); background: var(--brand-soft);
  color: var(--brand-strong); font-size: .68rem; font-weight: 800; cursor: help;
}
.info__balao {
  position: absolute; left: 0; top: calc(100% + 7px); z-index: 50;
  display: none; width: max-content; max-width: 330px;
  padding: 11px 13px; text-align: left;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); font-size: .8rem; font-weight: 400; line-height: 1.45;
  white-space: normal; cursor: auto;
}
.info:hover .info__balao, .info:focus-visible .info__balao { display: block; }
.info__balao dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; }
.info__balao dt { color: var(--text-soft); font-weight: 600; }
.info__balao dd { margin: 0; overflow-wrap: anywhere; }

/* ------------------------------------------------------------- toolbar */

/* Barra de ação em massa, que só aparece quando há linha marcada. */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px 16px; margin-bottom: 14px;
  background: var(--brand-soft); border: 1px solid var(--brand-line);
  border-radius: var(--radius-sm);
}
.toolbar__contagem { font-weight: 660; color: var(--brand-strong); font-size: .88rem; }
.toolbar__spacer { flex: 1; }

/* Coluna de marcação: estreita, e sem o mínimo de 190px da primeira coluna. */
td.check, th.check { width: 38px; min-width: 38px !important; padding-right: 0; }

/* Lista de links de plataforma dentro da célula da tabela. */
.links { display: flex; flex-wrap: wrap; gap: 5px; }
.link-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 640;
  text-decoration: none; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text-soft);
}
.link-tag:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-strong); }
.link-tag--airbnb { background: var(--airbnb-bg); border-color: var(--airbnb-line); color: var(--airbnb-text); }
.link-tag--booking { background: var(--booking-bg); border-color: var(--booking-line); color: var(--booking-text); }
.link-tag--site { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-strong); }

/* ----------------------------------------------------------------- tabs */

.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.tabs button {
  padding: 9px 15px; font: inherit; font-size: .89rem; font-weight: 600;
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-soft); cursor: pointer; margin-bottom: -1px;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--brand-strong); border-bottom-color: var(--brand); }

/* -------------------------------------------------------------- severity */

/* Linha de log colorida pela gravidade, na borda esquerda: dá para varrer a
 * coluna e achar o erro sem ler texto nenhum. */
tr.sev--erro td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
tr.sev--aviso td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
tr.sev--info td:first-child { box-shadow: inset 3px 0 0 var(--border-strong); }

/* ------------------------------------------------------------ responsivo */

@media (max-width: 960px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100%;
    transform: translateX(-100%); transition: transform .18s ease;
    box-shadow: var(--shadow-lg);
  }
  .app-shell.is-menu-aberto .sidebar { transform: translateX(0); }
  .icon-btn { display: inline-flex; }
}
@media (min-width: 961px) {
  .sidebar-backdrop { display: none !important; }
}
@media (max-width: 640px) {
  main { padding: 16px 14px 32px; }
  .card { padding: 16px; }
  .card > h2 { margin: -16px -16px 14px; padding: 11px 16px 11px 13px; }
  thead th { position: static; }
  .row > .btn { flex: 1 1 auto; }
  .topbar { padding: 8px 14px; }
  .topbar__user { display: none; }
}
.sidebar__brand { flex-direction: column; align-items: flex-start; gap: 14px; }
/* Integra o branco do PNG ao fundo claro, preservando o arquivo da marca. */
.sidebar__brand img.stays-brand { width: 150px; height: 40px; object-fit: contain; background: transparent; border-radius: 0; mix-blend-mode: multiply; }
/* Login remains vertically stacked and centered at every breakpoint. */
.login-card__brand { flex-direction: column; align-items: center; text-align: center; }
.login-card__brand img.stays-brand { width: 254px; height: auto; object-fit: contain; background: transparent; border-radius: 0; }
@media (max-width: 640px) {
  .login-card__brand img.stays-brand { width: 220px; }
}

/* Acabamento compartilhado: navegação com identidade e conteúdo claro. */
.app-shell { background: var(--workspace-bg); }
.sidebar {
  width: 244px;
  background: linear-gradient(165deg, var(--nav-bg), var(--brand-soft) 60%, var(--accent-blue-soft));
  border-right: 1px solid var(--brand-line);
  scrollbar-width: thin; scrollbar-color: var(--brand-line) transparent;
}
.sidebar__brand {
  margin: 16px 14px 8px; padding: 20px 16px;
  flex: none;
  border: 0; border-radius: 0;
  background: transparent; position: relative; overflow: hidden;
  box-shadow: none;
}
.sidebar__brand::after {
  content: ''; position: absolute; bottom: 0; left: 18px; right: 18px; height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--stays-green) 0 35%, var(--stays-blue) 35% 65%, var(--stays-yellow) 65% 84%, var(--stays-pink) 84%);
}
.sidebar__name { color: var(--nav-ink); font-size: .95rem; line-height: 1.4; }
.sidebar__name strong { display: inline; color: var(--brand-strong); }
.sidebar .nav { padding: 12px; flex: 1 0 auto; }
.sidebar .nav__group { margin-bottom: 20px; }
.sidebar .nav__title { color: var(--nav-muted); padding: 0 14px; margin-bottom: 8px; font-size: .64rem; letter-spacing: .14em; }
.sidebar .nav a {
  display: flex; align-items: center; gap: 12px; min-height: 42px;
  padding: 9px 12px; margin-bottom: 4px; border: 1px solid transparent;
  border-radius: 999px; color: var(--nav-ink); font-weight: 550; font-size: .85rem;
}
.nav__icon { width: 19px; height: 19px; flex: none; opacity: .85; }
.sidebar .nav a:hover { background: var(--surface); color: var(--brand-strong); border-color: var(--brand-line); }
.sidebar .nav a[aria-current="page"] {
  background: var(--brand); color: var(--surface); border-color: var(--brand);
  box-shadow: 0 3px 8px rgba(0, 101, 104, .12); font-weight: 650;
}
.sidebar .nav a[aria-current="page"] .nav__icon { opacity: 1; }
.sidebar__foot { color: var(--nav-muted); border-color: var(--brand-line); }
.topbar { border-bottom-color: var(--border); padding: 12px 26px; }
.topbar__user { border-left: 1px solid var(--border); padding-left: 16px; }
.topbar__user strong { font-weight: 700; }
.app-main main { padding: 28px; }
.page-head { align-items: center; margin-bottom: 24px; }
.page-head h1 { border: 0; padding-left: 0; color: var(--brand-strong); font-weight: 750; }
.page-head p { max-width: 64ch; line-height: 1.6; }
.app-shell .card {
  border-radius: 24px; border-color: var(--border);
  box-shadow: 0 5px 20px rgba(0, 61, 64, .04);
}
.app-shell .card > h2 {
  margin: 0 0 20px; padding: 0 0 14px;
  background: transparent; border: 0; border-bottom: 1px solid var(--border);
  border-radius: 0; font-size: 1rem; font-weight: 650;
}
.app-shell .filter-bar {
  background: linear-gradient(110deg, var(--brand-soft), var(--accent-blue-soft));
  border-color: var(--brand-line); border-radius: 18px; box-shadow: none; padding: 18px;
}
.app-shell .toolbar { background: var(--surface-2); border-radius: 16px; box-shadow: none; }
.app-shell input:not([type="checkbox"]):not([type="radio"]),
.app-shell select, .app-shell textarea {
  border-radius: 13px; border-color: var(--border-strong); background: var(--surface);
}
a.btn { text-decoration: none; }
.app-shell .btn { border-radius: 999px; padding: 9px 18px; min-height: 40px; font-weight: 600; line-height: 1.35; }
.app-shell .btn:not(.btn--ghost):not(.btn--neutro):not(.btn--danger) {
  background: var(--brand); border-color: var(--brand); box-shadow: 0 3px 8px rgba(0, 101, 104, .12);
}
.app-shell .btn:not(.btn--ghost):not(.btn--neutro):not(.btn--danger):hover:not(:disabled) {
  background: var(--brand-strong); border-color: var(--brand-strong);
}
.app-shell .table-wrap { border-radius: 22px; border-color: var(--border); box-shadow: 0 5px 20px rgba(0, 61, 64, .04); }
.app-shell thead th { background: var(--nav-bg); color: var(--nav-ink); border-bottom-color: var(--brand-line); }
.app-shell tbody tr:nth-child(even) { background: var(--login-bg-a); }
.app-shell tbody tr:hover { background: var(--brand-soft); }
.app-shell td { border-bottom-color: var(--border); }
.kpi, .counter { border-radius: 22px; border: 1px solid var(--border); background: var(--brand-soft); }
.kpi:nth-child(4n + 2), .counter:nth-child(4n + 2) { background: var(--accent-blue-soft); }
.kpi:nth-child(4n + 3), .counter:nth-child(4n + 3) { background: var(--accent-gold-soft); }
.kpi:nth-child(4n + 4), .counter:nth-child(4n + 4) { background: var(--accent-pink-soft); }
.kpi__valor { color: var(--brand-strong); }
.login-google-only .google-login { border-radius: 999px; min-height: 64px; }
.app-shell .grid { gap: 24px; }
.app-shell .grid > .card { margin-bottom: 0; }
.app-shell .kpis { gap: 20px; margin-bottom: 24px; }
.app-shell .kpi { padding: 22px; box-shadow: 0 3px 12px rgba(0, 61, 64, .025); }
.app-shell .kpi__rotulo { margin-top: 10px; text-transform: none; letter-spacing: 0; font-size: .84rem; font-weight: 650; }
.app-shell .kpi__nota { margin-top: 7px; line-height: 1.55; }
.app-shell .card { padding: 24px; margin-bottom: 24px; }
.app-shell .card:hover { box-shadow: 0 5px 20px rgba(0, 61, 64, .04); }
.app-shell .btn--ghost, .app-shell .btn--neutro { border-color: var(--border); }
.app-shell .btn--sm { min-height: 36px; padding: 7px 14px; }
/* O foco acompanha o formato do controle e permanece visível no teclado. */
.sidebar .nav a:focus-visible, .app-shell .btn:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 3px;
  border-radius: 999px; box-shadow: none;
}
.app-shell .grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.crm-check-panel {
  margin: 0 0 22px; padding: 18px 20px; border: 1px solid var(--brand-line);
  border-radius: 18px; background: var(--brand-soft); color: var(--brand-strong);
}
.crm-check-panel__head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.crm-check-panel__head span { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.crm-check-panel p { margin: 7px 0 12px; color: var(--text-soft); font-size: .88rem; }
.crm-check-panel--done { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok-hover); }
.crm-check-panel--failed { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger); }
.crm-progress { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.75); }
.crm-progress__bar { display: block; width: 42%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--stays-green), var(--stays-blue)); }
.crm-check-panel--running .crm-progress__bar { animation: crm-progress 1.25s ease-in-out infinite; }
.crm-progress--done .crm-progress__bar { width: 100%; background: var(--ok); }
@keyframes crm-progress { 0% { transform: translateX(-120%); } 100% { transform: translateX(250%); } }
@media (max-width: 960px) {
  .sidebar { width: 244px; backdrop-filter: none; }
  .app-main main { padding: 22px 18px; }
}
@media (max-width: 520px) {
  .app-main main { padding: 18px 12px; }
  .app-shell .card { padding: 18px; margin-bottom: 18px; }
  .app-shell .grid, .app-shell .kpis { gap: 16px; }
  .topbar { padding: 10px 14px; }
  .page-head__actions { width: 100%; }
  .page-head__actions .btn { white-space: normal; text-align: center; }
}
