:root {
  color-scheme: light;
  --ink: #17231c;
  --muted: #617066;
  --paper: #f5f3ec;
  --surface: #fffdf8;
  --line: #d9ddd5;
  --border: #d9ddd5;
  --forest: #2f8f46;
  --forest-dark: #1f6c34;
  --mint: #e8f5e9;
  --amber: #df9d37;
  --shadow: 0 24px 70px rgba(31, 55, 42, 0.11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Design system compartilhado — Fase 1 */
:root {
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --focus-ring: 0 0 0 3px rgba(47, 143, 70, .2);
}

button, .primary-button, .secondary-button, .danger-button, input, select, textarea {
  border-radius: var(--radius-md);
  font: inherit;
}

button, .primary-button, .secondary-button, .danger-button {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  gap: 7px;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  box-shadow: var(--focus-ring);
  outline: 0;
}

input, select, textarea {
  background: #fff;
  border: 1px solid #cbd4cd;
  box-sizing: border-box;
  min-height: 40px;
  padding: 9px 11px;
  width: 100%;
}

textarea { min-height: 96px; resize: vertical; }

table { border-collapse: collapse; width: 100%; }
th { color: var(--muted); font-size: .72rem; letter-spacing: .05em; text-align: left; text-transform: uppercase; }
th, td { padding: 11px 13px; vertical-align: middle; }
td { border-top: 1px solid var(--line); }

.status-message { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; }
.status-message.error { background: #fff0ec; border-color: #efb4a6; color: #8f3021; }
.status-message.success { background: #eaf7ed; border-color: #a9d8b2; color: #216f34; }
.status-message.loading { background: #f5f8f5; color: var(--muted); }

dialog { border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); max-width: min(720px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(23, 35, 28, .38); }

@font-face {
  font-family: "Pigura";
  src: url("/static/assets/pigura.ttf") format("truetype");
  font-display: swap;
}

.admin-nav-link {
  color: inherit;
  margin-left: auto;
  text-decoration: none;
}

.admin-nav-link-secondary {
  margin-left: 14px;
}

.engine-version {
  background: #e8eee9;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 12px;
}

.risk-review-list {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}

.risk-review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}

.risk-review-card > header {
  align-items: start;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.risk-review-card h2,
.risk-review-card h3 {
  margin: 4px 0 8px;
}

.risk-score {
  align-items: center;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  min-width: 92px;
  padding: 12px;
}

.risk-score strong {
  font-size: 1.65rem;
}

.risk-score.baixo {
  background: #dcefe4;
  color: #175c37;
}

.risk-score.moderado {
  background: #f5e9c9;
  color: #654d12;
}

.risk-score.alto {
  background: #f7dfd8;
  color: #7a2f1e;
}

.risk-score.critico {
  background: #6f2018;
  color: #fff;
}

.risk-card-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  margin-top: 22px;
}

.risk-conflict {
  border-top: 1px solid var(--border);
  padding: 11px 0;
}

.risk-conflict summary {
  cursor: pointer;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.risk-conflict li {
  margin: 7px 0;
}

.risk-conflict small {
  color: var(--muted);
  display: block;
  margin-left: 26px;
}

.human-risk-form,
.ai-review-form {
  display: grid;
  gap: 12px;
}

.human-risk-form label,
.ai-review-form label {
  display: grid;
  gap: 5px;
}

.human-risk-form input,
.human-risk-form select,
.human-risk-form textarea,
.ai-review-form input,
.ai-review-form select,
.ai-review-form textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  padding: 9px;
  width: 100%;
}

.human-risk-form textarea,
.ai-review-form textarea {
  min-height: 88px;
}

.comparison-state {
  color: #175c37;
  font-size: 0.82rem;
  margin: 0;
}

.comparison-state.divergent {
  color: #9b3424;
}

@media (max-width: 820px) {
  .risk-card-grid {
    grid-template-columns: 1fr;
  }
}

.report-classification {
  border: 1px solid var(--border);
  border-radius: 18px;
  margin: 28px 0 42px;
  padding: 24px;
}

.report-classification h2 {
  margin: 4px 0 8px;
}

.report-classification.prognostico {
  border-left-width: 6px;
}
.report-classification.prognostico h2 {
  font-weight: 700;
}
.report-classification.prognostico[data-veredito="favoravel"] {
  border-color: #1a7f4b;
  background: #eef7f1;
}
.report-classification.prognostico[data-veredito="favoravel"] h2 {
  color: #146c3f;
}
.report-classification.prognostico[data-veredito="atencao"] {
  border-color: #b8860b;
  background: #fbf6e8;
}
.report-classification.prognostico[data-veredito="atencao"] h2 {
  color: #8a6400;
}
.report-classification.prognostico[data-veredito="desfavoravel"] {
  border-color: #b3261e;
  background: #fdeeec;
}
.report-classification.prognostico[data-veredito="desfavoravel"] h2 {
  color: #9c1f18;
}
.prognostico-tag {
  display: inline-block;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 3px 12px;
  margin: 2px 0 6px;
}
.prognostico-tag[data-veredito="favoravel"] {
  background: #e3f4ea;
  color: #1a7f4b;
}
.prognostico-tag[data-veredito="atencao"] {
  background: #fbf1d8;
  color: #8a6400;
}
.prognostico-tag[data-veredito="desfavoravel"] {
  background: #fbe4e2;
  color: #b3261e;
}
.prognostico-motivos {
  margin: 6px 0 10px;
  padding-left: 20px;
}
.prognostico-motivos li {
  margin-bottom: 4px;
}

.activity-classes {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 20px;
}

.activity-class {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  gap: 5px;
  padding: 14px;
}

.activity-class small,
.matrix-status,
.admin-source-note,
.phase2-table small {
  color: var(--muted);
}

.matrix-status {
  margin: 18px 0 0;
}

.high-renown-badge,
.affinity-badge,
.review-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 9px;
}

.high-renown-badge {
  background: #f5dfac;
  color: #634309;
}

.affinity-badge {
  background: #edf0ec;
  color: var(--ink);
}

.affinity-badge.alta,
.review-status.alta {
  background: #f7dfd8;
  color: #7a2f1e;
}

.affinity-badge.moderada,
.review-status.moderada {
  background: #f5e9c9;
  color: #654d12;
}

.normalized-status {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: capitalize;
}

.phase2-table td {
  min-width: 120px;
  vertical-align: top;
}

.phase2-table small {
  display: block;
  margin-top: 5px;
}

.review-form {
  display: grid;
  gap: 8px;
  min-width: 260px;
}

.review-form input,
.review-form textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  padding: 8px;
  width: 100%;
}

.review-form textarea {
  min-height: 74px;
}

.review-form div {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 2%, rgba(223, 157, 55, 0.15), transparent 24rem),
    var(--paper);
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.topbar {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(23, 35, 28, 0.14);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 750;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: var(--forest);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}

.api-link {
  color: var(--muted);
  font-size: 0.88rem;
  text-underline-offset: 4px;
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  padding: clamp(70px, 10vw, 132px) 0 76px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  align-items: end;
  gap: clamp(48px, 8vw, 112px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--forest);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 24px;
  max-width: 680px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.hero-description {
  max-width: 580px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.search-panel {
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid rgba(23, 35, 28, 0.1);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.search-panel > label,
.type-filter legend {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 750;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.input-shell {
  position: relative;
}

.search-symbol {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 15px;
  height: 15px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  transform: translateY(-58%);
  pointer-events: none;
}

.search-symbol::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  right: -5px;
  bottom: -3px;
  background: var(--muted);
  transform: rotate(45deg);
}

input[type="search"] {
  width: 100%;
  min-height: 58px;
  padding: 0 18px 0 48px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: white;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input[type="search"]:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 4px rgba(29, 92, 67, 0.12);
}

input::placeholder {
  color: #89948c;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 750;
  transition: background 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.primary-button {
  min-height: 58px;
  padding: 0 24px;
  color: white;
  background: var(--forest);
}

.primary-button:hover {
  background: var(--forest-dark);
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.type-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}

.type-filter legend {
  width: 100%;
  margin-bottom: 4px;
}

.type-filter label {
  position: relative;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
}

.type-filter label:has(input:checked) {
  border-color: var(--forest);
  color: var(--forest-dark);
  background: var(--mint);
}

.type-filter input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.results-section {
  padding: 70px 0 90px;
  border-top: 1px solid rgba(23, 35, 28, 0.14);
}

.results-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.results-heading h2,
.initial-note h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.results-count {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.9rem;
}

.results-list {
  display: grid;
  gap: 14px;
}

.report-public-summary {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.report-public-summary strong {
  color: var(--forest);
  font-size: 1.05rem;
}

.report-public-summary p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.result-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  padding: 25px 28px;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: inherit;
  background: var(--surface);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.result-card:hover {
  border-color: rgba(29, 92, 67, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(31, 55, 42, 0.08);
}

.result-topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.type-badge {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--forest-dark);
  background: var(--mint);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.type-badge.patente {
  color: #704715;
  background: #f6e5c7;
}

.process-number {
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.result-title {
  margin-bottom: 10px;
  font-size: clamp(1.18rem, 2vw, 1.45rem);
  line-height: 1.35;
}

.result-owner {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.result-meta {
  min-width: 170px;
  text-align: right;
}

.result-status {
  margin-bottom: 10px;
  color: var(--forest-dark);
  font-size: 0.82rem;
  font-weight: 750;
}

.result-date {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.status-message {
  color: var(--muted);
  line-height: 1.6;
}

.status-message.loading {
  padding: 36px 0;
}

.status-message.error {
  padding: 18px 20px;
  border: 1px solid #e2b5ac;
  border-radius: 13px;
  color: #812f24;
  background: #fff1ed;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 34px;
  color: var(--muted);
  font-size: 0.84rem;
}

.secondary-button {
  padding: 11px 16px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}

.initial-note {
  display: grid;
  grid-template-columns: 100px minmax(0, 650px);
  gap: 30px;
  padding: 56px 0 80px;
  border-top: 1px solid rgba(23, 35, 28, 0.14);
}

.note-number {
  color: var(--amber);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.6rem;
  line-height: 1;
}

.initial-note p {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 40px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(23, 35, 28, 0.14);
  color: var(--muted);
  font-size: 0.75rem;
}

footer p {
  margin-bottom: 0;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  h1 {
    max-width: 700px;
  }
}

@media (max-width: 620px) {
  .topbar,
  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .topbar {
    min-height: 72px;
  }

  .api-link {
    display: none;
  }

  .hero {
    padding: 64px 0 54px;
    gap: 38px;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.5rem);
  }

  .search-panel {
    margin-inline: -4px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .result-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px;
  }

  .result-meta {
    text-align: left;
  }

  .results-heading,
  footer {
    align-items: start;
    flex-direction: column;
  }

  .initial-note {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .note-number {
    font-size: 2.8rem;
  }
}

/* CRM de leads e pesquisas */
.admin-body .lead-metrics { grid-template-columns: repeat(6, minmax(130px, 1fr)); overflow-x: auto; }
.admin-body .admin-filters { grid-template-columns: minmax(240px, 2fr) repeat(4, minmax(145px, 1fr)); }
.admin-body .admin-filters .filter-check { min-height: 48px; display: flex; align-items: center; gap: 9px; }
.admin-body .admin-filters .filter-check input { width: 18px; min-height: 18px; }
.admin-body .secondary-button,
.admin-body .danger-button {
  min-height: 40px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
}
.admin-body .danger-button { border-color: #b94936; color: white; background: #a83e2c; }
.admin-body .danger-link { border: 0; padding: 6px; color: #9f3828; background: none; font: inherit; cursor: pointer; }
.admin-body .lead-row-actions, .lead-quick-actions, .lead-research-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-body .lead-quick-actions { margin-top: 8px; }
.admin-body .lead-quick-actions a { display: inline-flex; color: var(--forest); font-weight: 750; }
.admin-body .leads-table { min-width: 1080px; }
.admin-body .leads-table th:nth-child(1),
.admin-body .leads-table td:nth-child(1) { min-width: 190px; width: 20%; }
.admin-body .leads-table th:nth-child(5),
.admin-body .leads-table td:nth-child(5) { min-width: 150px; width: 13%; }
.admin-body .leads-table td:nth-child(1) strong,
.admin-body .leads-table td:nth-child(1) span,
.admin-body .leads-table td:nth-child(5) select { max-width: 100%; overflow-wrap: anywhere; }
.admin-body .leads-table td:nth-child(5) select { width: 100%; box-sizing: border-box; }
.admin-body .leads-table tr.archived { opacity: .65; background: #f3f3ef; }
.admin-body .leads-table td > span { display: block; color: var(--muted); font-size: .75rem; }
.risk-pill { display: inline-flex !important; width: fit-content; margin-top: 7px; padding: 4px 8px; border-radius: 999px; background: #eef2ed; color: #335444 !important; font-size: .68rem !important; font-weight: 800; }
.risk-muito_alto, .risk-alto { background: #fde9e4; color: #8c2d1d !important; }
.risk-moderado { background: #fff2cf; color: #775512 !important; }
.risk-baixo { background: #e2f3e8; color: #17633f !important; }
.lead-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 18px; color: var(--muted); font-size: .78rem; }
.lead-pagination label { display: flex; align-items: center; gap: 7px; }
.lead-pagination select { min-height: 40px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.lead-pagination button:disabled { opacity: .45; cursor: not-allowed; }

.lead-dialog { width: min(1200px, calc(100vw - 36px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 20px; color: var(--ink); background: var(--surface); box-shadow: 0 28px 80px rgba(20, 42, 29, .24); }
.lead-dialog::backdrop, .confirm-dialog::backdrop { background: rgba(10, 28, 19, .58); backdrop-filter: blur(3px); }
.lead-dialog-frame > header { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: start; padding: 24px 28px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.lead-dialog-frame h2 { margin: 3px 0 0; font: 500 clamp(1.8rem, 4vw, 2.7rem)/1 Georgia, serif; }
.dialog-close { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: white; font-size: 1.5rem; cursor: pointer; }
.lead-dialog-content { padding: 26px 28px 36px; }
.lead-dialog-grid { display: block; }
.lead-dialog-main, .lead-dialog-aside { min-width: 0; }
.lead-dialog-aside .lead-history { margin-top: 24px; }
.lead-contact-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.lead-contact-summary > div { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f8f8f4; }
.lead-contact-summary span, .lead-contact-summary a, .lead-contact-summary strong { display: block; overflow-wrap: anywhere; }
.lead-contact-summary span { margin-bottom: 6px; color: var(--muted); font-size: .7rem; text-transform: uppercase; }
.lead-crm-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; }
.lead-crm-form label { display: grid; gap: 7px; font-size: .76rem; font-weight: 750; }
.lead-crm-form input, .lead-crm-form select, .lead-crm-form textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); font: inherit; box-sizing: border-box; }
.lead-crm-form .lead-notes, .lead-crm-form > div { grid-column: 1 / -1; }
.lead-crm-form .lead-motivo-perda { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 12px 14px; border: 1px solid #e6c9c9; border-radius: 11px; background: #fbf3f3; }
.lead-crm-form .lead-motivo-perda[hidden] { display: none; }
@media (max-width: 560px) { .lead-crm-form .lead-motivo-perda { grid-template-columns: 1fr; } }
.lead-crm-form .filter-check { display: flex; flex-direction: row; align-items: center; }
.lead-crm-form .filter-check input { width: 18px; }
.lead-crm-form > div { display: flex; gap: 12px; align-items: center; }
.lead-history { margin-top: 32px; }
/* Funil de atendimento — stepper de fase do lead */
.lead-funil { margin-bottom: 24px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #f8f8f4; }
.lead-funil > header .eyebrow { margin: 0; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lead-funil > header h3 { margin: 2px 0 12px; font: 500 1.4rem Georgia, serif; }
.lead-funil-steps { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(72px, 1fr)); margin: 0; padding: 0; overflow-x: auto; }
.lfs { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; padding-top: 22px; }
.lfs::before { content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 3px; background: #cbd4cd; }
.lfs:first-child::before { display: none; }
.lfs.done::before, .lfs.current::before { background: #1c8a57; }
.lfs-dot { position: absolute; top: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 3px solid #cbd4cd; font-size: .62rem; font-weight: 900; color: #fff; }
.lfs.done .lfs-dot { background: #1c8a57; border-color: #1c8a57; }
.lfs.current .lfs-dot { border-color: #9a6500; box-shadow: 0 0 0 4px #fff2cf; }
.lfs.current .lfs-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9a6500; }
.lfs-label { font-size: .68rem; font-weight: 700; line-height: 1.2; margin-top: 2px; }
.lfs.pending .lfs-label { color: var(--muted); font-weight: 600; }
.lfs-date { font-size: .62rem; color: var(--muted); margin-top: 2px; }
.lfs.current .lfs-date { color: #9a6500; font-weight: 700; }
.lead-funil-move { display: flex; align-items: end; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.lead-funil-move label { display: grid; gap: 5px; font-size: .75rem; font-weight: 700; }
.lead-funil-move select { min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font: inherit; }
.lead-funil-loading { color: var(--muted); font-size: .82rem; margin: 0; }
/* Mini-stepper de fase do lead (na lista de Pesquisas/Leads) */
.fase-mini { display: inline-flex; flex-direction: column; gap: 3px; margin-top: 7px; }
.fase-mini-dots { display: flex; align-items: center; }
.fm-dot { width: 9px; height: 9px; border-radius: 50%; background: #c4cdc5; flex: 0 0 auto; }
.fm-dot + .fm-dot { margin-left: 14px; position: relative; }
.fm-dot + .fm-dot::before { content: ""; position: absolute; right: 9px; top: 50%; transform: translateY(-50%); width: 14px; height: 2px; background: #c4cdc5; }
.fm-dot.done { background: #1c8a57; }
.fm-dot.done + .fm-dot::before { background: #1c8a57; }
.fm-dot.current { background: #fff; box-shadow: 0 0 0 2px #9a6500; width: 11px; height: 11px; }
.fase-mini-label { font-size: .66rem; font-weight: 800; color: #775512; }
/* Documentos do lead (metadados) */
.lead-documentos { margin-bottom: 24px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #f8f8f4; }
.lead-documentos > header .eyebrow { margin: 0; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lead-documentos > header h3 { margin: 2px 0 12px; font: 500 1.4rem Georgia, serif; }
.doc-table-scroll { overflow-x: auto; }
table.lead-docs { width: 100%; border-collapse: collapse; font-size: .82rem; }
table.lead-docs th { text-align: left; font-size: .66rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 800; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.lead-docs td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.lead-docs tr:last-child td { border-bottom: 0; }
table.lead-docs .doc-type { font-weight: 700; white-space: nowrap; }
table.lead-docs input, table.lead-docs select { width: 100%; min-width: 80px; padding: 7px 9px; border: 1px solid #cbd4cd; border-radius: 8px; background: #fff; font: inherit; font-size: .8rem; box-sizing: border-box; }
.lead-docs-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.lead-docs-actions span { font-size: .78rem; color: var(--muted); }
.lead-checklist { margin-bottom: 24px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #f8f8f4; }
.lead-checklist > header { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lead-checklist > header .eyebrow { margin: 0; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lead-checklist > header h3 { margin: 2px 0 12px; font: 500 1.4rem Georgia, serif; }
.lead-checklist .chk-count { margin-left: auto; font-size: .8rem; font-weight: 800; color: var(--muted); }
.chk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.chk-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; }
.chk-item:hover { background: #eef1ec; }
.chk-item label { display: flex; align-items: center; gap: 10px; flex: 1; cursor: pointer; margin: 0; font-size: .88rem; }
.chk-item input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent, #2f6f4e); cursor: pointer; }
.chk-item.done label span { text-decoration: line-through; color: var(--muted); }
.chk-del { border: 0; background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 6px; border-radius: 6px; }
.chk-del:hover { color: #b33; background: #f2e3e3; }
.chk-empty { margin: 6px 2px; font-size: .82rem; color: var(--muted); }
.chk-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.chk-add { display: flex; gap: 8px; flex: 1; min-width: 220px; }
.chk-add input { flex: 1; padding: 7px 10px; border: 1px solid #cbd4cd; border-radius: 8px; background: #fff; font: inherit; font-size: .82rem; }
.chk-msg { font-size: .78rem; color: var(--muted); }
.lead-guias { margin-bottom: 24px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #f8f8f4; }
.lead-propostas { margin-bottom: 24px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #f8f8f4; }
.lead-propostas > header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lead-propostas > header .eyebrow { margin: 0; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lead-propostas > header h3 { margin: 2px 0 12px; font: 500 1.4rem Georgia, serif; }
.lead-guias > header { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lead-guias > header .eyebrow { margin: 0; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lead-guias > header h3 { margin: 2px 0 12px; font: 500 1.4rem Georgia, serif; }
.lead-guias > header .guia-nova { margin-left: auto; }
.guia-sug { margin: 2px 0 12px; padding: 10px 12px; border: 1px dashed #b9c7bd; border-radius: 10px; background: #eef3ee; }
.guia-sug-title { margin: 0 0 8px; font-size: .74rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.guia-sug-btn { display: inline-flex; align-items: center; gap: 6px; margin: 0 8px 8px 0; padding: 7px 12px; border: 1px solid #2f6f4e; border-radius: 20px; background: #fff; color: #235c3f; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.guia-sug-btn:hover { background: #eaf3ec; }
.guia-sug-btn small { color: var(--muted); font-weight: 500; }
.guia-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.guia-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.guia-main { flex: 1; min-width: 0; font-size: .9rem; }
.guia-main small { color: var(--muted); font-size: .78rem; }
.guia-tag { font-size: .66rem; font-weight: 800; text-transform: uppercase; color: #7a5b09; background: #fbf0d3; padding: 1px 6px; border-radius: 6px; }
.guia-empty { padding: 8px 2px; font-size: .84rem; color: var(--muted); }
.guia-badge { white-space: nowrap; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.guia-badge.ok { background: #e3f2e8; color: #1f6b43; }
.guia-badge.pend { background: #eef1ec; color: var(--muted); }
.guia-badge.soon { background: #fbf0d3; color: #7a5b09; }
.guia-badge.late { background: #f6e0e0; color: #a5342b; }
.guia-badge.muted { background: #eef1ec; color: var(--muted); }
.guia-acts { display: flex; align-items: center; gap: 6px; }
.guia-acts button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 9px; font-size: .78rem; cursor: pointer; }
.guia-acts .guia-del { border-color: transparent; color: var(--muted); font-size: 1.05rem; line-height: 1; padding: 2px 7px; }
.guia-acts .guia-del:hover { color: #b33; background: #f2e3e3; }
.guia-form { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.guia-form .guia-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.guia-form label { display: grid; gap: 5px; font-size: .74rem; font-weight: 700; }
.guia-form input, .guia-form select { padding: 8px 10px; border: 1px solid #cbd4cd; border-radius: 8px; background: #fff; font: inherit; font-size: .82rem; box-sizing: border-box; }
.guia-form-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.guia-msg { font-size: .78rem; color: var(--muted); }
@media (max-width: 560px) { .guia-form .guia-two { grid-template-columns: 1fr; } }
.lead-empresa { margin-bottom: 24px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #f8f8f4; }
.lead-empresa > header .eyebrow { margin: 0; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lead-empresa > header h3 { margin: 2px 0 12px; font: 500 1.4rem Georgia, serif; }
.emp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.emp-grid label { display: grid; gap: 5px; font-size: .74rem; font-weight: 700; }
.emp-grid input { padding: 8px 10px; border: 1px solid #cbd4cd; border-radius: 8px; background: #fff; font: inherit; font-size: .82rem; box-sizing: border-box; }
.emp-form-acts { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.emp-msg { font-size: .78rem; color: var(--muted); }
.emp-contatos { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.emp-contatos-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.emp-contatos-head .eyebrow { margin: 0; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.emp-contato-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.emp-contato { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: .9rem; }
.emp-contato > div { flex: 1; min-width: 0; }
.emp-contato small { color: var(--muted); font-size: .78rem; }
.emp-tag { font-size: .64rem; font-weight: 800; text-transform: uppercase; color: #235c3f; background: #e3f2e8; padding: 1px 6px; border-radius: 6px; }
.emp-tag.vinc { color: #7a5b09; background: #fbf0d3; }
.emp-empty { color: var(--muted); font-size: .84rem; }
.emp-contato-acts { display: flex; gap: 6px; }
.emp-contato-acts button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 9px; font-size: .78rem; cursor: pointer; }
.emp-contato-form { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.emp-check { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-size: .82rem; }
@media (max-width: 640px) { .emp-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .emp-grid { grid-template-columns: 1fr; } }
.crm-cadencias { display: flex; flex-direction: column; gap: 10px; }
.crm-cadencia { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.crm-cadencia small { color: var(--muted); font-size: .78rem; }
.crm-cad-inativa { font-size: .64rem; font-weight: 800; text-transform: uppercase; color: var(--muted); background: #eef1ec; padding: 1px 6px; border-radius: 6px; }
.crm-cad-acts { display: flex; gap: 6px; }
.crm-cad-empty { color: var(--muted); font-size: .85rem; margin: 4px 2px; }
.crm-cad-ativo { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: .85rem; }
.crm-cad-passos-head { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 8px; }
.crm-cad-passos { display: flex; flex-direction: column; gap: 8px; }
.crm-cad-passo { display: grid; grid-template-columns: 90px 130px 1fr 34px; gap: 8px; align-items: end; }
.crm-cad-passo label { display: grid; gap: 4px; font-size: .72rem; font-weight: 700; }
.crm-cad-passo input, .crm-cad-passo select { padding: 7px 8px; border: 1px solid #cbd4cd; border-radius: 8px; font: inherit; font-size: .82rem; }
.crm-cad-passo .passo-del { border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; height: 34px; }
.lead-cadencia { margin-bottom: 24px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #f8f8f4; }
.lead-cadencia > header .eyebrow { margin: 0; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lead-cadencia > header h3 { margin: 2px 0 12px; font: 500 1.4rem Georgia, serif; }
.lead-cad-apply { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lead-cad-apply select { padding: 8px 10px; border: 1px solid #cbd4cd; border-radius: 8px; background: #fff; font: inherit; font-size: .85rem; }
.lead-cad-msg { font-size: .8rem; color: var(--muted); }
@media (max-width: 560px) { .crm-cad-passo { grid-template-columns: 1fr 1fr; } .crm-cad-passo .passo-titulo-field { grid-column: 1 / -1; } }
.crm-automacoes { display: flex; flex-direction: column; gap: 10px; }
.crm-automacao { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; flex-wrap: wrap; }
.crm-auto-toggle { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 220px; cursor: pointer; }
.crm-auto-toggle input { width: 18px; height: 18px; accent-color: var(--accent, #2f6f4e); }
.crm-auto-toggle span { display: grid; }
.crm-auto-toggle small { color: var(--muted); font-size: .78rem; }
.crm-auto-dias { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.crm-auto-dias input { width: 64px; padding: 6px 8px; border: 1px solid #cbd4cd; border-radius: 8px; font: inherit; }
.rpi-history-pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; }
.rpi-history-pager[hidden] { display: none; }
.rpi-history-pager span { font-size: .82rem; color: var(--muted); font-weight: 700; }
.rpi-history-pager button:disabled { opacity: .45; cursor: not-allowed; }
.lead-timeline { margin-bottom: 24px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #f8f8f4; }
.lead-timeline > header .eyebrow { margin: 0; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lead-timeline > header h3 { margin: 2px 0 14px; font: 500 1.4rem Georgia, serif; }
.tl-list { list-style: none; margin: 0; padding: 0; }
.tl-item { position: relative; display: flex; gap: 12px; padding: 0 0 16px 4px; }
.tl-item:not(:last-child)::before { content: ""; position: absolute; left: 16px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.tl-icone { flex: 0 0 auto; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #eef3ee; border: 1px solid var(--line); font-size: .74rem; color: #235c3f; z-index: 1; }
.tl-item.tl-perdido .tl-icone { background: #f6e0e0; color: #a5342b; }
.tl-item.tl-ganho .tl-icone { background: #e3f2e8; color: #1f6b43; }
.tl-corpo { flex: 1; min-width: 0; }
.tl-topo { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.tl-topo strong { font-size: .9rem; }
.tl-topo time { flex: 0 0 auto; color: var(--muted); font-size: .74rem; }
.tl-detalhe { display: block; margin-top: 2px; color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.tl-empty { color: var(--muted); font-size: .84rem; margin: 0; }
.lead-history h3 { margin: 4px 0 16px; font: 500 1.8rem Georgia, serif; }
.lead-research-card { margin-bottom: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; }
.lead-research-card > div:first-child { display: flex; justify-content: space-between; gap: 12px; }
.lead-research-card small { color: var(--muted); }
.lead-research-card p { margin: 10px 0; color: var(--muted); }
.lead-research-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; font-size: .75rem; }
.lead-research-actions .secondary-button { display: inline-flex; align-items: center; }
/* Pesquisas realizadas (histórico rápido do lead) — componente publicado sem CSS próprio */
.admin-body .quick-research-history ol { list-style: none; display: grid; gap: 10px; margin: 12px 0 0; padding: 0; }
.admin-body .quick-research-history li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #f8f8f4; }
.admin-body .quick-research-history li > div { flex: 1 1 100%; }
.admin-body .quick-research-history .quick-research-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-body .quick-research-history li .secondary-button,
.admin-body .quick-research-history li .danger-button { display: inline-flex; align-items: center; width: fit-content; }
.confirm-dialog { width: min(430px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: 18px; }
.confirm-dialog h2 { margin-top: 0; font: 500 2rem Georgia, serif; }
.confirm-dialog p { color: var(--muted); line-height: 1.6; }
.confirm-dialog form > div { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.confirm-dialog form > label { display: grid; gap: 7px; margin-top: 14px; font-weight: 700; }
.confirm-dialog form > label input,
.confirm-dialog form > label textarea { width: 100%; box-sizing: border-box; }
.confirm-dialog form > label textarea { min-height: 96px; resize: vertical; }
.confirm-dialog form > .status-message { display: block; margin-top: 14px; }

@media (max-width: 1180px) {
  .admin-body .lead-metrics { grid-template-columns: repeat(3, 1fr); overflow: visible; }
  .admin-body .admin-filters { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .admin-body .lead-metrics, .admin-body .admin-filters { grid-template-columns: repeat(2, 1fr); }
  .leads-table-shell { overflow: visible; border: 0; background: none; }
  .admin-body .leads-table { min-width: 0; }
  .leads-table thead { display: none; }
  .leads-table, .leads-table tbody, .leads-table tr, .leads-table td { display: block; width: 100%; box-sizing: border-box; }
  .leads-table tr { margin-bottom: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
  .admin-body .leads-table td { display: grid; grid-template-columns: 105px 1fr; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .admin-body .leads-table td::before { content: attr(data-label); color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; }
  .admin-body .leads-table td:last-child { border: 0; }
  .lead-contact-summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .admin-body .lead-metrics, .admin-body .admin-filters, .lead-contact-summary, .lead-crm-form, .lead-attendance-summary { grid-template-columns: 1fr; }
  .lead-pagination { justify-content: center; flex-wrap: wrap; }
  .lead-dialog-content, .lead-dialog-frame > header { padding-left: 18px; padding-right: 18px; }
}

/* Autenticação social e vínculos de identidade */
.password-login-fields { display: grid; gap: 18px; }
.social-login { margin-top: 24px; }
.social-buttons { display: grid; gap: 10px; }
.social-button {
  display: flex; align-items: center; justify-content: center; min-height: 48px;
  border: 1px solid #aeb9b1; border-radius: 10px; padding: 10px 16px;
  font-weight: 700; text-decoration: none;
}
.social-google { background: #fff; color: #202124; }
.social-apple { background: #000; color: #fff; border-color: #000; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin-top: 20px; color: #65756d; font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; background: #d8ddd6; flex: 1; }
.social-identities { display: grid; gap: 10px; margin-top: 18px; }
.social-identity-card {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 16px; border: 1px solid #d8ddd6; border-radius: 12px;
}
.social-identity-card > div { display: grid; gap: 4px; }
.social-identity-card span { color: #65756d; }
.social-identity-card [aria-disabled="true"] { opacity: .55; pointer-events: none; }
@media (max-width: 600px) {
  .social-identity-card { align-items: flex-start; flex-direction: column; }
}

.learning-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.learning-thresholds, .learning-review-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.production-grid.learning-control-grid {
  grid-template-columns: minmax(320px, .75fr) minmax(620px, 1.25fr);
  align-items: start;
}
.learning-control-grid .production-control-card {
  min-width: 0;
  align-content: start;
}
.learning-control-grid .production-control-card > .production-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.learning-control-grid .learning-rollout-control {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
}
.learning-control-grid .learning-rollout-control > span {
  grid-column: 1 / -1;
}
.learning-control-grid .learning-rollout-control input {
  width: 100%;
  min-width: 0;
  accent-color: var(--forest);
}
.learning-control-grid .learning-rollout-control output {
  min-width: 48px;
  padding: 6px 9px;
  border-radius: 8px;
  color: var(--forest-dark);
  background: var(--mint);
  font-weight: 800;
  text-align: center;
}
.learning-control-grid .learning-thresholds {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.learning-control-grid .learning-thresholds label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
}
.learning-control-grid .learning-thresholds input,
.learning-control-grid #dataset-limit {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.learning-control-grid #release-blockers {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.55;
}
.learning-control-grid .learning-actions {
  margin-top: 2px;
}
.learning-control-grid .learning-actions button {
  min-height: 48px;
}
.learning-model-list,
.learning-review-list {
  display: grid;
  gap: 18px;
}

.learning-model-list {
  grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
}

.learning-model-card,
.learning-review-card {
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(31, 55, 42, .045);
}

.learning-model-card {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 24px;
}

.learning-review-card {
  display: grid;
  gap: 0;
  overflow: hidden;
}

.learning-model-card header,
.learning-review-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.learning-review-card header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #fbfcf8, #f5f8f3);
}

.learning-model-card h3,
.learning-review-card h3 {
  margin: 5px 0 7px;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.25;
}

.learning-model-card header small,
.learning-review-card header small {
  color: var(--muted);
  font-size: .72rem;
}

.learning-model-card.ativo {
  border-color: rgba(29, 92, 67, .55);
  box-shadow: inset 0 3px 0 var(--forest), 0 10px 28px rgba(31, 55, 42, .06);
}

.learning-model-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.learning-model-metrics span {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(31, 55, 42, .06);
  border-radius: 12px;
  background: var(--cream);
  color: var(--muted);
  font-size: .7rem;
}

.learning-model-metrics b {
  display: block;
  margin-bottom: 3px;
  color: var(--forest-dark);
  font-size: 1.08rem;
}

.learning-review-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 20px 24px;
}

.learning-review-fields label {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.learning-review-fields label > span {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
}

.learning-review-fields input,
.learning-review-fields select,
.learning-review-fields textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid #b8c3ba;
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.learning-review-fields select {
  cursor: pointer;
}

.learning-review-fields textarea {
  min-height: 88px;
  line-height: 1.5;
  resize: vertical;
}

.learning-review-fields input:focus,
.learning-review-fields select:focus,
.learning-review-fields textarea:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 4px rgba(29, 92, 67, .1);
}

.learning-review-fields .wide {
  grid-column: 1 / -1;
}

.label-review .learning-actions {
  justify-content: flex-end;
  margin: 0;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--line);
  background: #fcfdfb;
}

.auth-card .auth-secondary-link {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
}

.label-review > .status-message,
.label-review > p {
  margin: 14px 24px 0;
}

.label-review > .official-evidence {
  display: grid;
  gap: 7px;
  border-left: 4px solid var(--forest);
  line-height: 1.5;
}

.official-evidence a {
  width: max-content;
  color: var(--forest);
  font-weight: 800;
}

.official-evidence small {
  overflow-wrap: anywhere;
  color: var(--muted);
}

.prediction-review > p {
  margin: 0;
  padding: 16px 24px 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.6;
}

.prediction-review > .status-message {
  margin: 14px 24px 0;
  padding: 12px 14px;
}

.prediction-review > .primary-button {
  justify-self: end;
  margin: 0 24px 22px;
}

.learning-probability {
  display: grid;
  justify-items: end;
  color: var(--forest);
  font-size: 1.55rem;
}

.learning-probability small {
  max-width: 180px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  text-align: right;
}

.learning-review-list > .status-message,
.learning-model-list > .status-message {
  margin: 0;
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .55);
}

@media (max-width: 900px) {
  .learning-review-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .learning-review-card header,
  .learning-model-card header {
    flex-direction: column;
  }
  .learning-review-fields,
  .learning-model-metrics {
    grid-template-columns: 1fr;
  }
  .learning-review-fields .wide {
    grid-column: auto;
  }
  .learning-probability {
    justify-items: start;
  }
  .learning-probability small {
    text-align: left;
  }
  .label-review .learning-actions,
  .prediction-review > .primary-button {
    justify-self: stretch;
  }
  .label-review .learning-actions button,
  .prediction-review > .primary-button {
    width: 100%;
  }
}

@media (max-width: 1280px) {
  .production-grid.learning-control-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .learning-control-grid .learning-thresholds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .learning-control-grid .learning-thresholds {
    grid-template-columns: 1fr;
  }
  .learning-control-grid .learning-actions {
    display: grid;
  }
}

/* Painel administrativo unificado */
.admin-body {
  background:
    radial-gradient(circle at 96% 0%, rgba(29, 92, 67, 0.07), transparent 28rem),
    #f3f5f1;
}

.admin-body > .topbar {
  display: none;
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 252px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 22px;
  color: #ecf5ef;
  background:
    radial-gradient(circle at 20% 0%, rgba(223, 157, 55, 0.13), transparent 16rem),
    #123f2e;
  box-shadow: 12px 0 36px rgba(18, 67, 47, 0.09);
}

.admin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 9px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.admin-sidebar-brand .brand-mark {
  flex: 0 0 auto;
  color: #123f2e;
  background: #f4c369;
}

.admin-sidebar-brand strong,
.admin-sidebar-brand small {
  display: block;
}

.admin-sidebar-brand strong {
  font-size: 0.92rem;
  letter-spacing: -0.02em;
}

.admin-sidebar-brand small {
  margin-top: 3px;
  color: rgba(236, 245, 239, 0.63);
  font-size: 0.68rem;
}

.admin-sidebar-nav {
  flex: 1;
  min-height: 0;
  padding-top: 25px;
  padding-right: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
  scrollbar-width: thin;
}

.admin-sidebar-nav::-webkit-scrollbar { width: 5px; }
.admin-sidebar-nav::-webkit-scrollbar-thumb { border-radius: 10px; background: rgba(255, 255, 255, 0.25); }

.admin-sidebar-nav > p {
  margin: 0 12px 10px;
  color: rgba(236, 245, 239, 0.5);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  margin: 4px 0;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: rgba(236, 245, 239, 0.76);
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.admin-sidebar-nav a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.07);
  transform: translateX(2px);
}

.admin-sidebar-nav a.active {
  color: white;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.12);
}

.admin-nav-symbol {
  width: 27px;
  height: 27px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: #dcebe2;
  background: rgba(255, 255, 255, 0.09);
  font-size: 0.56rem;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.admin-sidebar-nav a.active .admin-nav-symbol {
  color: #173f30;
  background: #f4c369;
}

.admin-sidebar-footer {
  display: grid;
  gap: 12px;
  padding: 18px 10px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.68rem;
}

.admin-sidebar-footer span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(236, 245, 239, 0.65);
}

.admin-sidebar-footer i,
.system-live i {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: #64cf8b;
  box-shadow: 0 0 0 4px rgba(100, 207, 139, 0.12);
}

.admin-sidebar-footer a {
  color: #f4c369;
  text-underline-offset: 3px;
}

.admin-mobile-header,
.admin-sidebar-overlay {
  display: none;
}

.admin-body .admin-main {
  width: calc(100% - 252px);
  max-width: none;
  min-height: 100vh;
  box-sizing: border-box;
  margin: 0 0 0 252px;
  padding: 48px clamp(28px, 4.5vw, 72px) 100px;
}

.admin-body .admin-heading {
  align-items: center;
  margin-bottom: 32px;
}

.admin-body .admin-heading h1 {
  max-width: none;
  margin-bottom: 9px;
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  line-height: 0.98;
}

.admin-body .admin-heading > div > p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  line-height: 1.6;
}

.admin-body .lead-metrics > div,
.admin-body .risk-review-card,
.admin-body .admin-filters,
.admin-body .leads-table-shell {
  box-shadow: 0 12px 32px rgba(31, 55, 42, 0.045);
}

.admin-body .lead-metrics > div {
  border-radius: 16px;
}

.admin-body a:focus-visible,
.admin-body button:focus-visible,
.admin-body input:focus-visible,
.admin-body select:focus-visible,
.admin-body textarea:focus-visible {
  outline: 3px solid rgba(223, 157, 55, 0.5);
  outline-offset: 2px;
}

.admin-dashboard {
  display: grid;
  gap: 48px;
}

.admin-overview-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.admin-overview-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(3rem, 5vw, 4.7rem);
  line-height: 0.94;
}

.admin-overview-hero p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.admin-system-state {
  display: grid;
  gap: 8px;
  min-width: 220px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.75);
}

.admin-system-state span {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.78rem;
  font-weight: 750;
}

.admin-system-state small {
  color: var(--muted);
  font-size: 0.68rem;
}

.admin-dashboard > .status-message:empty {
  display: none;
}

.overview-primary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.overview-primary-metrics article {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(31, 55, 42, 0.05);
}

.overview-primary-metrics span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.overview-primary-metrics strong {
  margin: 14px 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.overview-primary-metrics small {
  color: var(--muted);
  font-size: 0.67rem;
}

.overview-section {
  display: grid;
  gap: 20px;
}

.overview-section > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.overview-section > header h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 500;
}

.overview-section > header > span {
  color: var(--muted);
  font-size: 0.68rem;
}

.overview-priority-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.priority-card {
  position: relative;
  min-height: 132px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: start;
  gap: 16px;
  box-sizing: border-box;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.priority-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(31, 55, 42, 0.09);
}

.priority-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--forest-dark);
  background: var(--mint);
  font-size: 0.65rem;
  font-weight: 850;
}

.priority-card strong {
  display: block;
  margin-bottom: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  font-weight: 500;
}

.priority-card h3 {
  margin: 0 0 5px;
  font-size: 0.82rem;
}

.priority-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.priority-card > b {
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 500;
}

.priority-risk .priority-icon {
  color: #7a2f1e;
  background: #f7dfd8;
}

.priority-ai .priority-icon {
  color: #4c376f;
  background: #e9e1f3;
}

.priority-validation .priority-icon {
  color: #654d12;
  background: #f5e9c9;
}

.overview-module-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.overview-module-grid a {
  min-height: 180px;
  box-sizing: border-box;
  padding: 24px;
  border-right: 1px solid var(--line);
  text-decoration: none;
  transition: background 160ms ease;
}

.overview-module-grid a:last-child {
  border-right: 0;
}

.overview-module-grid a:hover {
  background: #f8faf6;
}

.overview-module-grid span {
  color: var(--amber);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.overview-module-grid h3 {
  margin: 28px 0 8px;
  font-size: 0.86rem;
}

.overview-module-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.55;
}

.rpi-monitor-actions,
.rpi-health,
.rpi-current-heading,
.rpi-history-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rpi-status-badge,
.rpi-run-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.rpi-status-badge.verde,
.rpi-run-status.concluida,
.rpi-run-status.sem_atualizacoes {
  color: #165c43;
  background: #dff3e9;
}

.rpi-status-badge.amarelo,
.rpi-run-status.solicitada,
.rpi-run-status.verificando,
.rpi-run-status.importando {
  color: #7a5100;
  background: #fff0c9;
}

.rpi-status-badge.vermelho,
.rpi-run-status.falhou {
  color: #8c2d22;
  background: #fde3de;
}

.rpi-status-badge.cinza {
  color: #59625c;
  background: #e8ece9;
}

.rpi-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.rpi-metric-grid article {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

.rpi-metric-grid span,
.rpi-metric-grid small {
  display: block;
  color: var(--muted);
}

.rpi-metric-grid strong {
  display: block;
  margin: 7px 0 3px;
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 1.45rem;
}

.rpi-health {
  flex-wrap: wrap;
  padding: 13px 16px;
  border-radius: 14px;
  background: #eef1ed;
}

.rpi-health span {
  position: relative;
  padding-left: 16px;
  font-size: 0.82rem;
  font-weight: 800;
}

.rpi-health span::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #a7ada9;
  content: "";
  transform: translateY(-50%);
}

.rpi-health span.healthy::before { background: #2b9a6e; }
.rpi-health span.unhealthy::before { background: #c84b3e; }
.rpi-health small { margin-left: auto; color: var(--muted); }

.rpi-current {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid #d8c18c;
  border-radius: 16px;
  background: #fffaf0;
}

.rpi-current-heading { justify-content: space-between; }
.rpi-current-heading span { display: block; color: var(--muted); font-size: 0.78rem; }
.rpi-current-heading strong { display: block; margin-top: 4px; color: var(--ink); }
.rpi-current-heading > b { color: var(--green); font-size: 1.2rem; }

.rpi-progress {
  height: 9px;
  margin: 16px 0 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #e7e4dc;
}

.rpi-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #df9c27);
  transition: width 300ms ease;
}

.rpi-current > p { margin: 0; color: var(--muted); }

.rpi-count-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}

.rpi-count-grid span {
  padding: 10px;
  border-radius: 10px;
  color: var(--muted);
  background: rgb(255 255 255 / 72%);
  font-size: 0.78rem;
}

.rpi-count-grid b { display: block; color: var(--ink); font-size: 1rem; }

.rpi-error {
  margin-top: 14px;
  padding: 13px 15px;
  border-left: 4px solid #c84b3e;
  border-radius: 8px;
  color: #7f2d25;
  background: #fde8e4;
  white-space: pre-wrap;
}

.rpi-history-heading {
  justify-content: space-between;
  margin-top: 28px;
}

.rpi-history-heading h3 { margin: 2px 0 0; font-size: 1.2rem; }
.rpi-history-heading small { color: var(--muted); }
.rpi-history-table-wrap { margin-top: 12px; overflow-x: auto; }

.rpi-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.rpi-history-table th,
.rpi-history-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.rpi-history-table th { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; }
.rpi-history-table td small { display: block; max-width: 220px; margin-top: 4px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.rpi-history-table td:last-child { text-align: right; }
.rpi-retry { border: 0; color: var(--green); background: transparent; font-weight: 800; cursor: pointer; }
.rpi-retry:disabled { opacity: 0.5; cursor: wait; }

@media (max-width: 920px) {
  .rpi-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rpi-count-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .rpi-monitor-actions,
  .rpi-history-heading { align-items: flex-start; flex-direction: column; }
  .rpi-metric-grid { grid-template-columns: 1fr; }
  .rpi-health small { width: 100%; margin-left: 0; }
}

@media (max-width: 1120px) {
  .overview-primary-metrics,
  .overview-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-module-grid a:nth-child(2) {
    border-right: 0;
  }

  .overview-module-grid a:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 980px) {
  .admin-sidebar {
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .admin-menu-open .admin-sidebar {
    transform: translateX(0);
  }

  .admin-mobile-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 30;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 0 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(243, 245, 241, 0.94);
    backdrop-filter: blur(12px);
  }

  .admin-menu-toggle {
    width: 42px;
    height: 42px;
    display: grid;
    place-content: center;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    cursor: pointer;
  }

  .admin-menu-toggle span {
    width: 17px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
  }

  .admin-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 35;
    border: 0;
    background: rgba(10, 25, 18, 0.42);
  }

  .admin-menu-open .admin-sidebar-overlay {
    display: block;
  }

  .admin-body .admin-main {
    width: 100%;
    margin-left: 0;
    padding-top: 112px;
  }
}

@media (max-width: 700px) {
  .admin-body .admin-main {
    padding-right: 18px;
    padding-left: 18px;
  }

  .admin-overview-hero,
  .overview-section > header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-system-state {
    min-width: 0;
  }

  .overview-primary-metrics,
  .overview-priority-grid,
  .overview-module-grid {
    grid-template-columns: 1fr;
  }

  .overview-module-grid a,
  .overview-module-grid a:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .overview-module-grid a:last-child {
    border-bottom: 0;
  }

  .priority-card {
    grid-template-columns: 38px 1fr auto;
  }

  .priority-icon {
    width: 38px;
    height: 38px;
  }

  .admin-body .risk-review-card > header {
    flex-direction: column;
  }
}

.production-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 16px;
  margin: 28px 0 48px;
}

.production-control-card,
.production-version-card {
  box-sizing: border-box;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(31, 55, 42, 0.05);
}

.production-control-card {
  display: grid;
  gap: 18px;
}

.production-control-card h2,
.production-version-card h2 {
  margin: -5px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  font-weight: 500;
}

.production-control-card > p,
.production-version-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.65;
}

.production-control-card > label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.production-control-card textarea {
  min-height: 90px;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  font: inherit;
  resize: vertical;
}

.production-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faf6;
}

.production-switch-row > small,
#control-history {
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.5;
}

.production-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.production-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.production-toggle > span {
  position: relative;
  width: 40px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #b9c1bb;
  transition: background 160ms ease;
}

.production-toggle > span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 160ms ease;
}

.production-toggle input:checked + span {
  background: var(--forest);
}

.production-toggle input:checked + span::after {
  transform: translateX(18px);
}

.production-toggle input:focus-visible + span {
  outline: 3px solid rgba(223, 157, 55, 0.5);
  outline-offset: 2px;
}

.production-toggle b {
  font-size: 0.75rem;
}

.rollout-input {
  display: grid;
  grid-template-columns: 1fr 58px;
  align-items: center;
  gap: 14px;
}

.rollout-input input {
  width: 100%;
  accent-color: var(--forest);
}

.rollout-input output {
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--forest-dark);
  background: var(--mint);
  font-weight: 800;
  text-align: center;
}

.production-version-card {
  display: grid;
  align-content: start;
  gap: 18px;
}

.production-version-card > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.production-version-card strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
}

.production-version-card span {
  color: var(--muted);
  font-size: 0.68rem;
}

.production-audit-section {
  margin-top: 12px;
}

.production-audit-table {
  min-width: 760px;
}

.report-version-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.report-version-meta > span {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--forest-dark);
  background: var(--mint);
  font-size: 0.66rem;
  font-weight: 800;
}

.production-audit-table code {
  color: var(--forest-dark);
  font-size: 0.7rem;
}

.audit-result {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
}

.audit-result.success {
  color: #175c37;
  background: #dcefe4;
}

.audit-result.failure {
  color: #7a2f1e;
  background: #f7dfd8;
}

@media (max-width: 900px) {
  .production-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .production-switch-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Pesquisa corporativa e relatório */
.report-gate {
  align-items: start;
}

.trust-points {
  margin-top: 34px;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.trust-points p {
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form-field > span,
.research-form legend {
  font-size: 0.76rem;
  font-weight: 750;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: white;
  outline: none;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 4px rgba(29, 92, 67, 0.12);
}

.form-field textarea {
  min-height: 86px;
  padding-block: 13px;
  resize: vertical;
  font: inherit;
  line-height: 1.5;
}

.match-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.match-reason {
  padding: 5px 9px;
  border-radius: 999px;
  color: #526157;
  background: #edf1eb;
  font-size: 0.68rem;
  font-weight: 700;
}

.form-field small {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.report-button {
  width: 100%;
  margin-top: 24px;
}

.report-main {
  padding: 42px 0 90px;
}

.report-heading {
  display: flex;
  justify-content: space-between;
  gap: 50px;
  align-items: end;
  padding-bottom: 48px;
}

.report-heading h1 {
  margin-bottom: 16px;
  font-size: clamp(3rem, 7vw, 5.7rem);
  overflow-wrap: anywhere;
}

.report-date {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 70px;
  border-block: 1px solid var(--line);
}

.report-metrics > div {
  padding: 25px 22px;
  border-right: 1px solid var(--line);
}

.report-metrics > div:first-child { padding-left: 0; }
.report-metrics > div:last-child { border-right: 0; }
.report-metrics span { display: block; margin-bottom: 9px; color: var(--muted); font-size: 0.72rem; }
.report-metrics strong { text-transform: capitalize; }

.class-badge {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
}

.report-disclaimer {
  margin-top: 55px;
  padding: 28px;
  border-left: 4px solid var(--amber);
  background: var(--surface);
}

.report-disclaimer p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 700px) {
  .form-grid,
  .report-metrics { grid-template-columns: 1fr; }
  .form-field-wide { grid-column: auto; }
  .report-heading { align-items: start; flex-direction: column; }
  .report-metrics > div,
  .report-metrics > div:first-child { padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
}

@media print {
  body { background: white; }
  .topbar, .back-link, footer { display: none; }
  main { width: 100%; }
  .report-main { padding: 0; }
  .result-card { break-inside: avoid; box-shadow: none; }
  .report-disclaimer { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.detail-main {
  padding: 42px 0 90px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 46px;
  color: var(--forest);
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.detail-loading {
  min-height: 360px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.detail-error {
  padding: 70px 0 120px;
}

.detail-error h1 {
  font-size: clamp(3rem, 7vw, 5.6rem);
}

.detail-error p:last-child {
  color: var(--muted);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.38fr);
  gap: clamp(50px, 8vw, 110px);
  align-items: end;
  padding: 26px 0 68px;
}

.detail-heading h1 {
  max-width: 830px;
  margin: 0;
  font-size: clamp(3rem, 7vw, 6rem);
  overflow-wrap: anywhere;
}

.detail-heading .result-topline {
  margin-bottom: 34px;
}

.status-card {
  padding: 28px;
  border-top: 3px solid var(--forest);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.status-card span,
.status-card small,
.fact-item span,
.holder-card small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.status-card strong {
  display: block;
  margin: 13px 0 20px;
  color: var(--forest-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  line-height: 1.35;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid rgba(23, 35, 28, 0.14);
}

.fact-item {
  min-width: 0;
  padding: 27px 24px;
  border-right: 1px solid rgba(23, 35, 28, 0.14);
}

.fact-item:first-child {
  padding-left: 0;
}

.fact-item:last-child {
  border-right: 0;
}

.fact-item strong {
  display: block;
  margin-top: 10px;
  overflow-wrap: anywhere;
  font-size: 0.95rem;
}

.detail-columns {
  display: grid;
  grid-template-columns: minmax(260px, 0.36fr) minmax(0, 0.64fr);
  gap: clamp(50px, 8vw, 110px);
  padding: 76px 0 90px;
}

.trademark-details {
  padding: 72px 0 4px;
  border-bottom: 1px solid rgba(23, 35, 28, 0.14);
}

.trademark-details-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 50px;
  align-items: start;
}

.trademark-details h2 {
  margin-bottom: 34px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.15rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.brand-image-card {
  min-height: 150px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.brand-image-card img {
  width: 100%;
  max-height: 190px;
  object-fit: contain;
}

.brand-image-placeholder {
  padding: 22px;
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--muted);
  text-align: center;
}

.brand-image-placeholder > span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--forest-dark);
  background: var(--mint);
  font-size: 0.72rem;
  font-weight: 850;
}

.brand-image-placeholder small {
  line-height: 1.45;
}

.technical-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 0 0 48px;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: var(--line);
}

.technical-facts > div {
  padding: 22px 24px;
  background: var(--surface);
}

.technical-facts dt {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.75rem;
}

.technical-facts dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
}

.classifications {
  display: grid;
  gap: 36px;
  padding-bottom: 62px;
}

.classifications h3 {
  margin: 0 0 16px;
  font-size: 0.9rem;
}

.classification-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.classification-chips span,
.nice-card-heading span {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--forest-dark);
  background: var(--mint);
  font-size: 0.75rem;
  font-weight: 750;
}

.nice-list {
  display: grid;
  gap: 12px;
}

.nice-card {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.nice-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 13px;
}

.nice-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.detail-section h2 {
  margin-bottom: 28px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.15rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.holders-list {
  display: grid;
  gap: 12px;
}

.holder-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.holder-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.holder-initial {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--forest-dark);
  background: var(--mint);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 18px;
  padding-bottom: 30px;
}

.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 14px;
  bottom: -2px;
  width: 1px;
  background: var(--line);
}

.timeline-marker {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  margin-top: 5px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: #aab3ad;
  box-shadow: 0 0 0 1px #aab3ad;
}

.timeline-item.current .timeline-marker {
  background: var(--forest);
  box-shadow: 0 0 0 1px var(--forest);
}

.timeline-content {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.timeline-content > strong {
  display: block;
  font-size: 1rem;
  line-height: 1.55;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.75rem;
}

.timeline-meta span:not(:last-child)::after,
.timeline-meta time::after {
  content: "·";
  margin-left: 14px;
}

.empty-detail {
  color: var(--muted);
  line-height: 1.6;
}

.detail-note {
  display: grid;
  grid-template-columns: 80px minmax(0, 620px);
  gap: 24px;
  padding: 46px 0;
  border-top: 1px solid rgba(23, 35, 28, 0.14);
}

.detail-note .note-number {
  font-size: 2.8rem;
}

.detail-note strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
}

.detail-note p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 860px) {
  .detail-hero,
  .detail-columns {
    grid-template-columns: 1fr;
  }

  .detail-facts {
    grid-template-columns: repeat(2, 1fr);
  }

  .fact-item:nth-child(2) {
    border-right: 0;
  }

  .fact-item:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(23, 35, 28, 0.14);
  }

  .fact-item:first-child,
  .fact-item:nth-child(3) {
    padding-left: 0;
  }
}

@media (max-width: 620px) {
  .detail-main {
    padding-top: 28px;
  }

  .back-link {
    margin-bottom: 30px;
  }

  .detail-hero {
    padding-bottom: 48px;
    gap: 38px;
  }

  .detail-heading h1 {
    font-size: clamp(2.7rem, 14vw, 4rem);
  }

  .detail-facts {
    grid-template-columns: 1fr;
  }

  .fact-item,
  .fact-item:first-child,
  .fact-item:nth-child(3) {
    padding: 21px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(23, 35, 28, 0.14);
  }

  .fact-item:last-child {
    border-bottom: 0;
  }

  .detail-columns {
    padding: 56px 0 70px;
  }

  .trademark-details-heading,
  .technical-facts {
    grid-template-columns: 1fr;
  }

  .brand-image-card {
    width: 100%;
    max-width: 240px;
    margin-bottom: 34px;
  }

  .section-heading-row {
    align-items: start;
    flex-direction: column;
    margin-bottom: 28px;
  }

  .section-heading-row h2 {
    margin-bottom: 0;
  }

  .detail-note {
    grid-template-columns: 1fr;
  }
}

.lead-section {
  margin-top: 28px;
}

.lead-section .primary-button {
  margin-top: 20px;
}

.lead-form-intro {
  margin-bottom: 26px;
}

.contact-cta {
  margin: 0 0 70px;
  padding: clamp(26px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  border: 1px solid rgba(29, 92, 67, 0.24);
  border-radius: 20px;
  background: var(--mint);
}

.contact-cta h2 {
  margin-bottom: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.contact-cta p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.contact-cta .primary-button {
  flex: 0 0 auto;
}

.lead-section {
  margin-bottom: 70px;
}

.lead-context-field input[readonly] {
  color: var(--forest-dark);
  background: var(--mint);
  font-weight: 750;
}

.detail-contact {
  margin-bottom: 70px;
}

.detail-contact .contact-cta {
  margin-bottom: 0;
}

.detail-lead-form {
  max-width: 760px;
  margin: 0 auto;
}

.lead-form-intro h2 {
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.lead-form-intro > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.contact-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

.contact-fields label:first-child {
  grid-column: 1 / -1;
}

.contact-fields label,
.admin-filters label {
  display: grid;
  gap: 8px;
}

.contact-fields label > span,
.admin-filters label > span {
  font-size: 0.76rem;
  font-weight: 750;
}

.contact-fields input,
.admin-filters input,
.admin-filters select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: white;
}

.contact-fields input:focus,
.admin-filters input:focus,
.admin-filters select:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 4px rgba(29, 92, 67, 0.12);
}

.privacy-consent {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.privacy-consent input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--forest);
}

.privacy-consent a {
  color: var(--forest);
  font-weight: 750;
  text-underline-offset: 3px;
}

.honeypot-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.admin-body {
  background: #f3f5f1;
}

.admin-label {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--forest-dark);
  background: var(--mint);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.admin-main {
  padding: 66px 0 100px;
}

.admin-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 42px;
}

.admin-heading h1 {
  margin-bottom: 12px;
  font-size: clamp(3rem, 6vw, 5rem);
}

.admin-heading > div > p:last-child {
  color: var(--muted);
}

.admin-export {
  display: inline-grid;
  place-items: center;
  min-height: 50px;
  text-decoration: none;
}

.lead-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.lead-metrics > div {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.lead-metrics span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.74rem;
}

.lead-metrics strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
}

.admin-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 220px auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.admin-filters .primary-button {
  min-height: 48px;
}

.leads-table-shell {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

.leads-table th,
.leads-table td {
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.leads-table th {
  color: var(--muted);
  background: #f8f8f4;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.leads-table td {
  font-size: 0.82rem;
}

.leads-table tbody tr:last-child td {
  border-bottom: 0;
}

.leads-table td strong,
.leads-table td small,
.leads-table td a {
  display: block;
}

.leads-table td strong {
  margin-bottom: 5px;
}

.leads-table td small,
.leads-table td a,
.leads-table time {
  color: var(--muted);
  font-size: 0.75rem;
}

.lead-status {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: white;
  font: inherit;
}

.status-novo { border-color: #d6b46e; background: #fff8e7; }
.status-em_contato { border-color: #8fb3c5; background: #edf7fb; }
.status-convertido { border-color: #8bb79b; background: #edf8f1; }
.status-descartado { opacity: 0.68; }

.delete-lead {
  border: 0;
  color: #8a3a31;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.privacy-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 80px 0 120px;
}

.privacy-page h1 {
  font-size: clamp(3.2rem, 8vw, 5.8rem);
}

.privacy-page h2 {
  margin: 40px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 500;
}

.privacy-page p {
  color: var(--muted);
  line-height: 1.75;
}

.privacy-page .back-link {
  margin-top: 42px;
}

/* Identidade pública Zé Registra */
.public-topbar {
  gap: 28px;
}

.brand-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  object-fit: cover;
  object-position: center 27%;
  border: 2px solid rgba(47, 143, 70, 0.18);
  border-radius: 50%;
  background: var(--mint);
}

.brand-wordmark {
  color: var(--forest-dark);
  font-family: "Pigura", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.brand-wordmark sup {
  margin-left: 2px;
  font-family: Inter, sans-serif;
  font-size: 0.42em;
  font-weight: 700;
  vertical-align: top;
}

.public-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.public-nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.public-nav a:hover,
.public-nav a[aria-current="page"] {
  color: var(--forest-dark);
}

.public-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -10px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--forest);
}

.nav-cta,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.nav-cta {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 11px;
  color: white;
  background: var(--forest);
  font-size: 0.76rem;
  font-weight: 800;
}

.hero-copy {
  position: relative;
}

.hero-brand-visual {
  position: relative;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  margin-bottom: 34px;
}

.hero-brand-visual img,
.institutional-character img,
.contact-hero > img {
  position: relative;
  z-index: 1;
  height: 145px;
  width: auto;
  filter: drop-shadow(0 18px 24px rgba(31, 108, 52, 0.15));
}

.hero-orbit,
.institutional-character span {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: linear-gradient(145deg, white, #d9f0dc);
  box-shadow: inset 0 0 0 1px rgba(47, 143, 70, 0.14), 0 24px 70px rgba(47, 143, 70, 0.12);
}

.lead-form-intro h2 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.lead-form-intro > p:last-child {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.commercial-section,
.value-section,
.principles-section {
  padding: 84px 0;
  border-top: 1px solid rgba(23, 35, 28, 0.14);
}

.section-intro {
  max-width: 720px;
  margin-bottom: 38px;
}

.section-intro h2,
.institutional-grid h2,
.institutional-cta h2,
.report-next-step h2 {
  margin-bottom: 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.section-intro > p:last-child,
.institutional-grid p,
.institutional-cta p,
.report-next-step p {
  color: var(--muted);
  line-height: 1.7;
}

.commercial-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.commercial-steps article {
  min-height: 260px;
  padding: 28px;
  border-right: 1px solid var(--line);
}

.commercial-steps article:last-child {
  border-right: 0;
}

.commercial-steps span {
  color: var(--forest);
  font-family: Georgia, serif;
  font-size: 1.25rem;
}

.commercial-steps h3 {
  margin: 62px 0 12px;
  font-size: 1rem;
}

.commercial-steps p,
.value-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

.value-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(500px, 1.1fr);
  gap: 70px;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.value-grid article {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.value-grid strong {
  display: block;
  margin-bottom: 32px;
  color: var(--forest-dark);
}

.site-footer {
  display: grid;
  grid-template-columns: 1.15fr 0.7fr 1.15fr;
  align-items: center;
  padding: 38px 0 46px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  object-position: center 27%;
  border-radius: 50%;
  background: var(--mint);
}

.footer-brand p,
.footer-source p {
  margin: 5px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 18px;
}

.footer-links a {
  color: var(--forest-dark);
  font-weight: 700;
  text-decoration: none;
}

.footer-source {
  text-align: right;
}

/* Páginas institucionais */
.institutional-main {
  padding: 70px 0 100px;
}

.institutional-hero,
.contact-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  align-items: center;
  gap: 80px;
  min-height: 540px;
  padding-bottom: 70px;
}

.institutional-hero h1,
.contact-hero h1 {
  font-size: clamp(3.5rem, 7vw, 6.4rem);
}

.institutional-character {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
}

.institutional-character span {
  inset: 30px;
}

.institutional-character img {
  height: 310px;
}

.institutional-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  padding: 84px 0;
  border-block: 1px solid var(--line);
}

.institutional-grid article {
  max-width: 500px;
}

.principles-section .value-grid {
  margin-top: 36px;
}

.institutional-cta,
.report-next-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-top: 30px;
  padding: 44px;
  border-radius: 22px;
  color: white;
  background: linear-gradient(135deg, var(--forest-dark), var(--forest));
}

.institutional-cta .eyebrow,
.report-next-step .eyebrow,
.institutional-cta p,
.report-next-step p {
  color: rgba(255, 255, 255, 0.78);
}

.institutional-cta h2,
.report-next-step h2 {
  margin-bottom: 8px;
}

.institutional-cta .primary-button,
.report-next-step .primary-button {
  flex: 0 0 auto;
  color: var(--forest-dark);
  background: white;
}

.contact-hero {
  grid-template-columns: 1fr 320px;
}

.contact-hero > img {
  justify-self: center;
  height: 310px;
}

.contact-hero .button-link {
  margin-top: 15px;
}

.contact-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 54px 0;
  border-block: 1px solid var(--line);
}

.contact-options > * {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  text-decoration: none;
}

.contact-options span {
  margin-bottom: auto;
  color: var(--forest);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-options strong {
  margin: 24px 0 8px;
  font-size: 1rem;
}

.contact-options small {
  color: var(--muted);
  line-height: 1.5;
}

.faq-simple {
  max-width: 820px;
  margin: 0 auto;
  padding: 84px 0;
}

.faq-simple details {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.faq-simple summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
}

.faq-simple details p {
  max-width: 700px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

/* Relatório visual e impressão */
.report-print-brand,
.report-print-footer {
  display: none;
}

.report-cover {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 210px;
  align-items: end;
  gap: 36px;
  margin: 0 0 42px;
  padding: 46px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(145deg, #f9fff9, #dff1e2);
}

.report-cover .report-heading {
  display: block;
  padding: 0;
}

.report-cover .report-heading h1 {
  margin-bottom: 14px;
}

.report-cover .report-version-meta {
  justify-items: start;
  margin-top: 26px;
}

.report-cover-seal {
  display: grid;
  justify-items: center;
  gap: 15px;
  color: var(--forest-dark);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.45;
  text-align: center;
}

.report-cover-seal img {
  height: 205px;
  width: auto;
  filter: drop-shadow(0 18px 24px rgba(31, 108, 52, 0.15));
}

.report-download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  margin: -16px 0 34px;
  padding: 26px 28px;
  border: 1px solid rgba(47, 143, 70, 0.24);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(31, 108, 52, 0.07);
}

.report-download-card h2 {
  margin: 0 0 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.report-download-card p:last-child {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.report-download-card .button-link {
  min-width: 230px;
  min-height: 52px;
  flex: 0 0 auto;
}

.report-next-step {
  margin-top: 52px;
}

.report-print-footer {
  margin-top: 34px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.68rem;
}

.admin-sidebar-brand .brand-avatar {
  width: 42px;
  height: 42px;
  border-color: rgba(255, 255, 255, 0.18);
}

.admin-sidebar-brand .brand-wordmark {
  color: white;
  font-size: 1.16rem;
}

@media (max-width: 980px) {
  .public-nav { display: none; }
  .public-topbar .nav-cta { margin-left: auto; }
  .commercial-steps { grid-template-columns: repeat(2, 1fr); }
  .commercial-steps article:nth-child(2) { border-right: 0; }
  .commercial-steps article:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .value-section { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 700px) {
  .nav-cta { display: none; }
  .brand-avatar { width: 40px; height: 40px; }
  .hero-brand-visual { width: 120px; height: 120px; }
  .hero-brand-visual img { height: 118px; }
  .commercial-steps,
  .value-grid,
  .institutional-grid,
  .contact-options,
  .report-cover { grid-template-columns: 1fr; }
  .commercial-steps article { min-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
  .commercial-steps article:last-child { border-bottom: 0; }
  .commercial-steps h3 { margin-top: 36px; }
  .institutional-hero,
  .contact-hero { grid-template-columns: 1fr; gap: 30px; min-height: 0; }
  .institutional-character,
  .contact-hero > img { display: none; }
  .institutional-grid { gap: 42px; }
  .institutional-cta,
  .report-next-step,
  .report-download-card { align-items: stretch; flex-direction: column; padding: 30px; }
  .report-download-card .button-link { width: 100%; min-width: 0; }
  .site-footer { grid-template-columns: 1fr; gap: 26px; }
  .footer-links { justify-content: flex-start; }
  .footer-source { text-align: left; }
  .report-cover { padding: 28px; }
  .report-cover-seal { display: none; }
}

@media print {
  @page { margin: 14mm; }
  .report-page .report-print-brand,
  .report-page .report-print-footer { display: flex; }
  .report-print-brand { align-items: center; justify-content: space-between; margin-bottom: 14mm; padding-bottom: 5mm; border-bottom: 1px solid var(--line); font-size: 8pt; }
  .report-print-brand .footer-brand img { width: 34px; height: 34px; }
  .report-print-brand .brand-wordmark { font-size: 14pt; }
  .report-cover { grid-template-columns: 1fr; min-height: 0; margin-bottom: 8mm; padding: 9mm; border: 1px solid var(--line); }
  .report-cover-seal,
  .report-next-step,
  .report-download-card { display: none; }
  .report-metrics { margin-bottom: 10mm; }
  .report-classification { break-inside: avoid; }
  .report-print-footer { display: block; }
}

@media (max-width: 860px) {
  .lead-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-filters {
    grid-template-columns: 1fr 1fr;
  }

  .admin-filters .primary-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .contact-fields,
  .lead-metrics,
  .admin-filters {
    grid-template-columns: 1fr;
  }

  .contact-fields label:first-child,
  .admin-filters .primary-button {
    grid-column: auto;
  }

  .admin-main {
    padding-top: 46px;
  }

  .admin-heading {
    align-items: start;
    flex-direction: column;
  }

  .privacy-page {
    padding-top: 58px;
  }

  .contact-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .contact-cta .primary-button {
    width: 100%;
  }
}
/* Autenticação e gestão de acessos */
.auth-body{min-height:100vh;display:grid;place-items:center;background:#f5f3eb;padding:24px;color:#10251d}.auth-card{width:min(460px,100%);background:#fff;padding:42px;border:1px solid #d8ddd6;border-radius:24px;box-shadow:0 24px 60px #193b2920}.auth-brand{display:flex;align-items:center;gap:12px;color:inherit;text-decoration:none}.auth-brand img{width:48px;height:48px;object-fit:contain}.auth-card h1{font-size:48px;margin:12px 0}.auth-card form,.auth-card label{display:grid;gap:8px}.auth-card form{gap:18px;margin-top:26px}.auth-card input{padding:14px;border:1px solid #aeb9b1;border-radius:10px;font:inherit}.auth-card button,.primary-button{background:#086044;color:#fff;border:0;border-radius:10px;padding:13px 20px;font-weight:700;cursor:pointer}.admin-sidebar-footer button{background:none;border:0;padding:0;color:inherit;text-align:left;text-decoration:underline;cursor:pointer}.admin-sidebar-footer small{display:block}.users-list{display:grid;gap:12px}.user-row{display:grid;grid-template-columns:2fr 1fr 2fr;gap:20px;align-items:center;padding:18px;border:1px solid #d8ddd6;border-radius:14px}.user-row>div{display:grid;gap:5px}.user-row>div:last-child{grid-template-columns:repeat(2,max-content);justify-content:end;align-items:center}.role-badge{background:#e6f1ec;border-radius:20px;padding:5px 10px;width:max-content}.active-user{color:#086044}.blocked-user{color:#a33128}.user-dialog{width:min(900px,calc(100% - 30px));max-height:calc(100vh - 32px);border:0;border-radius:20px;padding:0;overflow:hidden}.user-dialog::backdrop{background:#10251dbb}.user-dialog form{padding:24px 28px;max-height:calc(100vh - 32px);display:flex;flex-direction:column;overflow:hidden}.user-dialog header,.user-dialog footer{display:flex;flex:0 0 auto;justify-content:space-between;gap:12px;align-items:center}.user-fields{display:grid;flex:0 0 auto;grid-template-columns:repeat(2,1fr);gap:12px}.user-fields label{display:grid;gap:6px}.user-fields .active-field{display:flex;align-items:center;gap:10px;padding-top:26px}.user-fields .active-field input{width:20px;height:20px;padding:0}.user-fields input,.user-fields select{padding:11px;border:1px solid #bbc4bd;border-radius:8px}.permission-matrix{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;min-height:180px;overflow-y:auto;overscroll-behavior:contain;padding:2px 8px 8px 2px}.permission-matrix fieldset{border:1px solid #d8ddd6;border-radius:12px}.permission-matrix label{display:flex;gap:8px;margin:10px 0}.permission-matrix span{display:grid}.permission-matrix small{color:#65756d}.user-dialog footer{justify-content:flex-end;margin-top:10px;padding-top:14px;border-top:1px solid #d8ddd6}.user-dialog .status-message{flex:0 0 auto;white-space:pre-line;margin:8px 0 0}@media(max-width:760px){.user-row,.user-fields,.permission-matrix{grid-template-columns:1fr}.user-row>div:last-child{justify-content:start}.user-dialog form{padding:20px}.permission-matrix{min-height:150px}.user-fields .active-field{padding-top:0}}

.admin-body { overflow-x: hidden; }

/* Confiabilidade e LGPD */
.reliability-context {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.section-hint {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 60ch;
}
.help-details {
  position: relative;
  flex: none;
}
.help-toggle {
  list-style: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface, #fff);
  color: var(--forest);
  font-weight: 700;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.help-toggle::-webkit-details-marker {
  display: none;
}
.help-toggle:hover,
.help-toggle:focus-visible,
.help-details[open] .help-toggle {
  background: var(--forest);
  color: #fff;
}
.help-panel {
  position: absolute;
  right: 0;
  top: 52px;
  z-index: 30;
  width: min(380px, 82vw);
  background: var(--surface, #fff);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px 20px;
  box-shadow: 0 18px 44px rgba(23, 35, 28, 0.16);
  text-align: left;
}
.help-panel h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--ink);
}
.help-panel ol {
  margin: 0 0 12px;
  padding-left: 20px;
}
.help-panel li {
  margin-bottom: 6px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.9rem;
}
.help-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}
@media (max-width: 720px) {
  .help-panel {
    position: static;
    width: 100%;
    margin-top: 14px;
    box-shadow: none;
  }
}
/* Visão geral: sino de notificações + resumo executivo do CEO */
.overview-hero-aside {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.notif-wrap {
  position: relative;
}
.notif-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface, #fff);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.notif-button:hover,
.notif-button[aria-expanded="true"] {
  background: var(--forest);
  color: #fff;
}
.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #c0392b;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.notif-panel {
  position: absolute;
  right: 0;
  top: 52px;
  z-index: 40;
  width: min(380px, 86vw);
  background: var(--surface, #fff);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(23, 35, 28, 0.18);
  overflow: hidden;
}
.notif-panel > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.notif-panel > header h3 {
  margin: 0;
  font-size: 1rem;
}
.notif-panel > header span {
  color: var(--muted);
  font-size: 0.82rem;
}
.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 60vh;
  overflow-y: auto;
}
.notif-list > li {
  border-bottom: 1px solid var(--line);
}
.notif-list > li:last-child {
  border-bottom: 0;
}
.notif-list a {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  color: inherit;
  text-decoration: none;
}
.notif-list a:hover {
  background: var(--paper, #f5f3ec);
}
.notif-list strong {
  display: block;
  font-size: 0.9rem;
}
.notif-list p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}
.notif-list small {
  color: var(--muted);
  font-size: 0.74rem;
}
.notif-dot {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--forest);
}
.notif-dot.sev-warn {
  background: var(--amber);
}
.notif-dot.sev-danger {
  background: #c0392b;
}
.notif-empty {
  padding: 22px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}
.exec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.exec-card {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface, #fff);
  color: inherit;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.exec-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(23, 35, 28, 0.1);
}
.exec-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.exec-card-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--paper, #eef2ed);
  color: var(--forest-dark, #1f6c34);
  font-size: 0.72rem;
  font-weight: 800;
}
.exec-card-head h3 {
  margin: 0;
  font-size: 1rem;
}
.exec-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}
.exec-card-metrics > div {
  display: grid;
  gap: 2px;
}
.exec-card-metrics strong {
  font-size: 0.98rem;
  line-height: 1.15;
  white-space: nowrap;
}
.exec-card-metrics span {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}
.exec-card-metrics .tone-warn strong {
  color: #8a6414;
}
.exec-card-metrics .tone-danger strong {
  color: #8c2d1d;
}
@media (max-width: 640px) {
  .overview-hero-aside {
    flex-direction: row-reverse;
    justify-content: flex-end;
  }
}
.reliability-form {
  display: grid;
  gap: 22px;
}
.reliability-form fieldset {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px 20px;
  margin: 0;
}
.reliability-form legend {
  color: var(--forest, #086044);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 6px;
}
.reliability-form .field-full { grid-column: 1 / -1; }
.reliability-form .field-color input[type="color"] {
  width: 100%;
  height: 44px;
  padding: 4px;
  cursor: pointer;
}
.form-submit { justify-self: start; }
.reliability-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.mfa-panel,
.mfa-recovery {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  background: var(--surface);
}
.mfa-steps { margin: 0; padding-left: 20px; display: grid; gap: 16px; }
.mfa-steps p { margin: 0 0 8px; }
.mfa-secret,
.mfa-confirm {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mfa-secret code {
  font-family: "Courier New", monospace;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  background: var(--mint, #e6f1ec);
  border-radius: 8px;
  padding: 8px 14px;
  word-break: break-all;
}
.mfa-confirm input {
  font-family: "Courier New", monospace;
  font-size: 1.1rem;
  letter-spacing: 0.3em;
  text-align: center;
  width: 8ch;
  padding: 10px;
  border: 1px solid #bbc4bd;
  border-radius: 8px;
}
.recovery-codes {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.recovery-codes li {
  font-family: "Courier New", monospace;
  letter-spacing: 0.08em;
  background: var(--mint, #e6f1ec);
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
}
@media (max-width: 760px) {
  .reliability-context { text-align: left; white-space: normal; }
}

/* Consulta: duplicata + histórico de contatos */
.dup-badge {
  background: #fbe4e2;
  color: #9c1f18;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.9rem;
}
.contatos-lista {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.contatos-lista li {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  gap: 2px;
}
.contatos-lista li small { color: var(--muted); font-size: 0.78rem; }
.contatos-lista li p { margin: 4px 0 0; }
.admin-body .lead-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.admin-body .admin-filters { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.admin-body .admin-filters label:first-child { grid-column: span 2; }
@media (max-width: 1180px) {
  .admin-body .lead-metrics, .admin-body .admin-filters { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .admin-body .lead-metrics, .admin-body .admin-filters { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .admin-body .lead-metrics, .admin-body .admin-filters { grid-template-columns: 1fr; }
  .admin-body .admin-filters label:first-child { grid-column: auto; }
}

.admin-sidebar-nav a.admin-nav-subitem {
  min-height: 38px;
  margin-left: 20px;
  padding-left: 9px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0 9px 9px 0;
  font-size: 0.74rem;
}

.admin-sidebar-nav a.admin-nav-subitem .admin-nav-symbol {
  width: 23px;
  height: 23px;
  border-radius: 7px;
  font-size: 0.5rem;
}

.admin-nav-parent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 3px;
}

.admin-nav-parent-row > a {
  min-width: 0;
}

.admin-submenu-toggle {
  display: grid;
  width: 31px;
  height: 31px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(236, 245, 239, 0.78);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.admin-submenu-toggle:hover,
.admin-submenu-toggle:focus-visible {
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.admin-submenu-toggle span {
  font-size: 1rem;
  line-height: 1;
  transition: transform 160ms ease;
}

.admin-submenu-toggle[aria-expanded="false"] span {
  transform: rotate(-90deg);
}

.admin-sidebar-nav a[hidden] {
  display: none;
}

.auth-password-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 14px;
  margin: -7px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f2f5f1;
  list-style: none;
}
.auth-password-rules li {
  position: relative;
  padding-left: 19px;
  color: #6a756e;
  font-size: .78rem;
}
.auth-password-rules li::before { position: absolute; left: 0; content: "○"; }
.auth-password-rules li.met { color: #087052; font-weight: 700; }
.auth-password-rules li.met::before { content: "✓"; }
@media (max-width: 520px) {
  .auth-password-rules { grid-template-columns: 1fr; }
}

.observability-toolbar { display: flex; align-items: center; gap: 12px; color: #66736b; font-size: .82rem; }
.observability-service { display: grid; grid-template-columns: auto 1fr; gap: 2px 9px; align-items: center; padding: 16px; border: 1px solid #e0e8e2; border-radius: 14px; background: #fff; }
.observability-service strong { font-size: .9rem; text-transform: capitalize; }
.observability-service small { grid-column: 2; color: #77847c; }
.observability-dot { width: 11px; height: 11px; border-radius: 50%; background: #bd3b32; box-shadow: 0 0 0 4px #fde9e5; }
.observability-dot.positive { background: #087052; box-shadow: 0 0 0 4px #dff3e9; }
.observability-detail-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.observability-detail-grid article { display: grid; gap: 5px; padding: 14px; border-radius: 12px; background: #f2f5f1; }
.observability-detail-grid strong { font-size: 1.15rem; }
.observability-detail-grid span, .observability-detail-grid small { color: #66736b; font-size: .78rem; }
@media (max-width: 900px) { .observability-detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .observability-toolbar { align-items: flex-start; flex-direction: column; } .observability-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Design system compartilhado — Fase 2: consistência e responsividade */
*, *::before, *::after { box-sizing: border-box; }

button, a.primary-button, a.secondary-button, a.danger-button {
  line-height: 1.25;
  max-width: 100%;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

button:not(:disabled):hover,
a.primary-button:hover,
a.secondary-button:hover,
a.danger-button:hover {
  transform: translateY(-1px);
}

button:disabled,
a[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .58;
}

.admin-body .primary-button,
.admin-body .secondary-button,
.admin-body .danger-button {
  min-height: 40px;
  padding: 9px 14px;
}

.admin-body .primary-button,
.admin-body .secondary-button,
.admin-body .danger-button,
.admin-body .dialog-close,
.admin-body dialog > form > footer button {
  flex: 0 0 auto;
}

.admin-body .admin-heading,
.admin-body .admin-overview-hero,
.admin-body .crm-hero,
.admin-body .portfolio-hero,
.admin-body .finance-hero,
.admin-body .rpi-query-hero,
.admin-body .section-header,
.admin-body .section-header > header,
.admin-body .crm-card > header,
.admin-body .finance-card > header,
.admin-body .rpi-results-card > header,
.admin-body .portfolio-list-header {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-body .admin-heading > *,
.admin-body .admin-overview-hero > *,
.admin-body .crm-hero > *,
.admin-body .portfolio-hero > *,
.admin-body .finance-hero > *,
.admin-body .rpi-query-hero > *,
.admin-body .section-header > *,
.admin-body .crm-card > header > *,
.admin-body .finance-card > header > *,
.admin-body .rpi-results-card > header > *,
.admin-body .portfolio-list-header > * {
  min-width: 0;
}

.admin-body .hero-actions,
.admin-body .crm-hero-actions,
.admin-body .portfolio-hero-actions,
.admin-body .analysis-heading-actions,
.admin-body .lead-research-actions,
.admin-body .reliability-actions,
.admin-body .view-switch,
.admin-body .finance-tabs,
.admin-body .rpi-pagination,
.admin-body .rpi-revista-pagination,
.admin-body dialog > form > footer,
.admin-body dialog > footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-body .hero-actions,
.admin-body .crm-hero-actions,
.admin-body .portfolio-hero-actions,
.admin-body .analysis-heading-actions,
.admin-body .lead-research-actions {
  justify-content: flex-end;
  margin-left: auto;
}

.admin-body .leads-table-shell,
.admin-body .portfolio-table-wrap,
.admin-body .table-wrap,
.admin-body .finance-table-wrap,
.admin-body .data-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-body table {
  min-width: 620px;
}

.admin-body th,
.admin-body td {
  overflow-wrap: anywhere;
}

.admin-body .status-message {
  line-height: 1.45;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.admin-body dialog {
  margin: auto;
  max-height: calc(100dvh - 32px);
  max-width: min(920px, calc(100vw - 32px));
  overflow: hidden;
  padding: 0;
  width: min(920px, calc(100vw - 32px));
}

.admin-body dialog > form {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 24px;
}

.admin-body dialog > form > header,
.admin-body dialog > header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.admin-body dialog > form > footer,
.admin-body dialog > footer {
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.admin-body .dialog-close,
.admin-body dialog > header > button[aria-label="Fechar"],
.admin-body dialog > form > header > button[aria-label="Fechar"] {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 40px;
  height: 40px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 40px;
}

/* Consulta RPI: o campo ocupa o espaço restante e nunca empurra as ações para fora. */
#rpi-query-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

#rpi-query-form label { min-width: 0; }
#rpi-query-form input[name="busca"] { min-width: 0; }
#rpi-open-records { min-width: 184px; }

@media (max-width: 760px) {
  .admin-body .hero-actions,
  .admin-body .crm-hero-actions,
  .admin-body .portfolio-hero-actions,
  .admin-body .analysis-heading-actions,
  .admin-body .lead-research-actions {
    justify-content: flex-start;
    margin-left: 0;
    width: 100%;
  }

  .admin-body .hero-actions > *,
  .admin-body .crm-hero-actions > *,
  .admin-body .portfolio-hero-actions > *,
  .admin-body .analysis-heading-actions > *,
  .admin-body .lead-research-actions > * {
    flex: 1 1 160px;
  }

  #rpi-query-form { grid-template-columns: 1fr; }
  #rpi-query-form button { width: 100%; }
}

@media (max-width: 520px) {
  .admin-body .admin-main { padding-left: 16px; padding-right: 16px; }
  .admin-body .admin-heading,
  .admin-body .admin-overview-hero,
  .admin-body .crm-hero,
  .admin-body .portfolio-hero,
  .admin-body .finance-hero,
  .admin-body .rpi-query-hero,
  .admin-body .overview-section,
  .admin-body .crm-card,
  .admin-body .finance-card,
  .admin-body .rpi-query-card,
  .admin-body .rpi-results-card { padding: 16px; }

  .admin-body dialog > form { padding: 18px; }
  .admin-body dialog > form > footer,
  .admin-body dialog > footer { align-items: stretch; flex-direction: column-reverse; }
  .admin-body dialog > form > footer > *,
  .admin-body dialog > footer > * { width: 100%; }
  .admin-body table { min-width: 520px; }
}
/* Portal do cliente */
.portal-table { display:grid; gap:8px; margin:10px 0 18px; }
.portal-row { display:flex; flex-wrap:wrap; gap:16px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface, #fff); }
.portal-row span { min-width:130px; color:var(--muted); }

/* Zé Registra — tokens globais de marca (compatíveis com os componentes atuais) */
:root {
  --brand-green:#008037; --brand-green-deep:#005927; --brand-green-forest:#003d1a;
  --brand-yellow:#00d15c; --brand-yellow-hover:#00a347; --brand-mint:#e6f5ed;
  --brand-sage:#b3c6bc; --brand-smoke:#f0f4f2; --brand-smoke-2:#d1ded8; --brand-whatsapp:#25d366;
  --background:#f0f4f2; --card:#fff; --surface-elevated:#fff; --foreground:#1a1a1a; --ink-soft:#2d4036;
  --primary:#008037; --primary-deep:#005927; --accent-yellow:#00d15c; --accent-yellow-foreground:#1a1a1a;
  --input:#d1ded8; --ring:#008037; --destructive:#b00020;
  --font-display:"Sora",ui-sans-serif,system-ui,sans-serif; --font-body:"Manrope",ui-sans-serif,system-ui,sans-serif;
  --fw-regular:400; --fw-medium:500; --fw-semibold:600; --fw-bold:700;
  --fs-display-xl:clamp(2.75rem,7vw,5.75rem); --fs-display-lg:clamp(2.25rem,5vw,4rem); --fs-display-md:clamp(1.75rem,3.5vw,2.75rem);
  --fs-heading-lg:clamp(1.5rem,2.4vw,1.875rem); --fs-heading-md:clamp(1.25rem,1.8vw,1.5rem); --ls-display:-.03em; --ls-eyebrow:.14em;
  --radius:1rem; --radius-md:calc(var(--radius) - 2px); --radius-xl:calc(var(--radius) + 4px); --radius-full:9999px;
  --shadow-soft:0 1px 2px 0 rgb(0 61 26 / .06),0 2px 6px -1px rgb(0 61 26 / .08);
  --shadow-elevated:0 8px 24px -6px rgb(0 61 26 / .16),0 4px 10px -2px rgb(0 61 26 / .08);
  --shadow-glow:0 16px 48px -10px rgb(0 128 55 / .4); --shadow-yellow:0 16px 48px -10px rgb(0 209 92 / .5);
  --gradient-ink:radial-gradient(60% 50% at 20% 0%,#005927,transparent 70%),radial-gradient(50% 40% at 90% 100%,rgb(0 128 55 / .6),transparent 70%),linear-gradient(180deg,#003d1a,#002611);
  --gradient-green:radial-gradient(70% 60% at 80% 20%,#00a347,transparent 65%),linear-gradient(160deg,#008037,#005927);
  --dotted-grid-image:radial-gradient(rgb(255 255 255 / .14) 1px,transparent 1px); --dotted-grid-size:22px 22px;
  --forest:var(--brand-green); --forest-dark:var(--brand-green-deep); --mint:var(--brand-mint); --paper:var(--brand-smoke); --line:var(--brand-smoke-2);
}
body { font-family:var(--font-body); -webkit-font-smoothing:antialiased; }
h1,h2,h3,h4,h5 { font-family:var(--font-display); font-weight:var(--fw-semibold); letter-spacing:var(--ls-display); }
:where(a,button,input,select,textarea):focus-visible { outline:0; box-shadow:0 0 0 2px var(--background),0 0 0 4px var(--ring); }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:.5rem; height:2.25rem; padding-inline:1rem; border-radius:var(--radius-md); font:var(--fw-medium) .875rem var(--font-body); transition:background .2s ease,transform .15s ease; }
.btn:active { transform:scale(.98); }
.btn-primary { background:var(--primary); color:#fff; }
.btn-primary:hover { background:var(--primary-deep); }
.btn-cta { background:var(--accent-yellow); color:var(--accent-yellow-foreground); border-radius:var(--radius-full); padding-inline:1.5rem; height:2.5rem; box-shadow:var(--shadow-yellow); }
.btn-cta:hover { background:var(--brand-yellow-hover); }
.btn-outline { background:transparent; color:var(--foreground); border:1px solid var(--border); }
.card { background:var(--card); border:1px solid var(--border); border-radius:var(--radius-xl); box-shadow:var(--shadow-soft); padding:1.5rem; }
.section { padding-block:5rem; }
.section-dark { color:#fff; background-image:var(--dotted-grid-image),var(--gradient-ink); background-size:var(--dotted-grid-size),auto; }
@media (min-width:768px) { .section { padding-block:7rem; } }
@media (pointer:coarse) { .btn { min-height:2.75rem; } }
.dark { --background:#003d1a; --foreground:#f0f4f2; --ink-soft:#b3c6bc; --card:#2d4036; --muted:#b3c6bc; --accent:#005927; --cream:#2d4036; --primary:#00d15c; --primary-deep:#008037; --border:rgb(255 255 255 / .12); --input:rgb(255 255 255 / .14); --ring:#00d15c; --destructive:#ff5470; --paper:#003d1a; --surface:#2d4036; }
