:root {
  --bg: #f6f7f8;
  --ink: #21352e;
  --muted: #758179;
  --line: #dfe5e1;
  --green: #11745c;
  --light: #edf5f0;
  --warn: #936721;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px/1.5 system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a,
summary {
  cursor: pointer;
}
a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
.button {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
button:hover,
.button:hover {
  background: var(--light);
  text-decoration: none;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.primary:hover {
  background: #0a5f4a;
}
.header {
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 17px max(24px, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  font-size: 20px;
  white-space: nowrap;
  color: var(--ink);
}
.brand strong {
  margin-left: 5px;
}
.header nav {
  display: flex;
  gap: 9px;
}
.header nav button {
  border-color: transparent;
}
.header #connection-status {
  font-size: 9px;
  color: var(--green);
}
main {
  max-width: 1288px;
  padding: 28px 24px;
  margin: auto;
}
h1 {
  font-size: 23px;
  letter-spacing: -0.6px;
  margin: 0 0 4px;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.3px;
  margin: 0;
}
h3 {
  font-size: 14px;
  margin: 0 0 13px;
}
p {
  margin: 7px 0 16px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 11px;
}
.search-box {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}
.search-box > .muted {
  font-size: 13px;
  margin: 0 0 23px;
}
.search-fields {
  display: grid;
  grid-template-columns: 1.1fr 1fr auto;
  gap: 16px;
  align-items: end;
}
.search-fields .primary {
  height: 42px;
  padding: 8px 24px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #5c6d63;
  font-size: 11px;
}
input,
select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #d6ded8;
  border-radius: 5px;
  background: white;
  color: var(--ink);
  min-height: 40px;
  font-size: 13px;
}
input:focus,
select:focus {
  outline: 2px solid #b0d7c5;
  outline-offset: 1px;
  border-color: #4a9b7b;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid #4a9b7b;
  outline-offset: 3px;
}
#cnpj {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.7px;
}
.advanced {
  margin-top: 18px;
  font-size: 12px;
}
.advanced summary {
  color: var(--green);
  width: fit-content;
}
.advanced-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  padding: 19px 0 5px;
}
.advanced-grid label span {
  display: inline;
  font-size: 10px;
}
.advanced > p {
  margin-bottom: 0;
  max-width: 850px;
}
.grid {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  margin-top: 15px;
}
.alert {
  background: #fff5df;
  border: 1px solid #eddbb5;
  border-radius: 6px;
  padding: 12px;
  margin: 18px 0;
  color: var(--warn);
  font-size: 12px;
}
.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 27px 0 13px;
}
.result-header p {
  margin: 4px 0 0;
}
.actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--light);
  border: 1px solid #d9e8de;
  border-radius: 6px;
  font-size: 11px;
}
.progress strong {
  display: inline-block;
  margin-right: 9px;
}
.progress #job-message {
  color: #668270;
}
.table-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 19px 0 12px;
}
.table-tools input {
  flex: 1;
  min-width: 150px;
}
.table-tools select {
  width: 200px;
}
.table-tools button {
  height: 40px;
  white-space: nowrap;
}
.filter-options {
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 0 0 12px;
}
.filter-options label {
  width: 180px;
}
.filter-options select {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 11px;
}
.filter-options p {
  margin: 0 0 7px auto;
  font-size: 10px;
}
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  background: white;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  background: #f9fbf9;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 16px 15px;
  border-bottom: 1px solid #eaf0eb;
  font-size: 12px;
  vertical-align: top;
}
tr:last-child td {
  border: 0;
}
tbody tr:hover {
  background: #fcfdfb;
}
.company-name {
  display: block;
  font-weight: 600;
  max-width: 270px;
}
.company-meta {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
  max-width: 280px;
}
.status {
  font-size: 9px;
  border-radius: 3px;
  background: var(--light);
  color: #498264;
  padding: 2px 5px;
  display: inline-block;
  margin-left: 5px;
}
.status.other {
  background: #fff4de;
  color: var(--warn);
}
.contact-line {
  font-size: 11px;
  display: block;
  max-width: 240px;
  overflow-wrap: anywhere;
  margin-bottom: 4px;
}
.network-links {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  max-width: 210px;
}
.network-links a {
  font-size: 10px;
  padding: 3px 6px;
  border: 1px solid #dbe7de;
  border-radius: 4px;
  background: #f4f8f4;
}
.state-label {
  font-size: 10px;
  color: var(--muted);
  display: block;
}
.state-label.partial {
  color: var(--warn);
}
.empty {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  font-size: 11px;
  color: var(--muted);
}
.page-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.page-controls > label {
  flex-direction: row;
  align-items: center;
  margin-right: 10px;
  white-space: nowrap;
}
.page-controls select {
  width: 64px;
  min-height: 30px;
  font-size: 11px;
  padding: 5px;
}
.page-controls button {
  min-width: 32px;
  height: 32px;
  padding: 5px;
}
.page-controls .selected {
  color: white;
  background: var(--green);
  border-color: var(--green);
}
#page-numbers {
  display: flex;
  gap: 5px;
}
.coverage {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0 25px;
}
.coverage table {
  margin: 10px 0;
  background: white;
}
.coverage li {
  margin: 5px 0;
}
.coverage td {
  font-size: 10px;
}
.welcome {
  text-align: center;
  padding: 55px 20px;
  color: #6d8074;
}
.welcome p:last-child {
  max-width: 590px;
  margin: 0 auto;
}
.welcome p:first-child {
  font-size: 17px;
  color: #657a6b;
}
footer {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  margin-top: 20px;
  color: #8b988e;
  font-size: 10px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
dialog {
  border: 1px solid #ccd9d0;
  border-radius: 10px;
  background: #fbfcfa;
  padding: 23px;
  width: min(580px, 94vw);
  max-height: 90vh;
  color: var(--ink);
  box-shadow: 0 25px 80px #123e2a33;
}
dialog::backdrop {
  background: #1a332c70;
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 18px;
}
.dialog-header button {
  border: 0;
  background: transparent;
  font-size: 25px;
  padding: 0 5px;
  line-height: 1;
}
.dialog-header p {
  margin: 4px 0 0;
}
.company-dialog {
  width: min(940px, 95vw);
}
#settings-form > label {
  margin: 15px 0;
}
#settings-form .advanced > label {
  margin: 15px 0;
}
.check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.check input {
  width: 14px;
  min-height: 14px;
  accent-color: var(--green);
}
#history button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 13px;
  margin: 8px 0;
  text-align: left;
}
#history button span {
  font-size: 10px;
  color: var(--muted);
}
.detail-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}
.detail-actions > div {
  display: flex;
  gap: 7px;
}
.detail-tabs {
  display: flex;
  gap: 5px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.detail-tabs button {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 10px 15px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.detail-tabs button[aria-selected='true'] {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 600;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.detail-section {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 17px;
  margin: 0 0 17px;
}
.detail-section p {
  font-size: 12px;
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.detail-section .muted {
  font-size: 11px;
}
.contact-item {
  padding: 9px 0;
  border-bottom: 1px solid #edf1ed;
  overflow-wrap: anywhere;
}
.contact-item:last-child {
  border: 0;
}
.contact-item > a {
  display: inline-block;
  font-size: 14px;
  margin-right: 7px;
}
.contact-item .kind {
  display: block;
  color: #829084;
  font-size: 10px;
  margin-bottom: 2px;
}
.contact-item details {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.contact-item summary {
  width: fit-content;
}
.contact-item details p {
  font-size: 10px;
}
.profile-item > a {
  font-size: 12px;
}
.key-value {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 9px;
  font-size: 11px;
  margin: 10px 0;
}
.key-value > span:first-child {
  color: var(--muted);
}
.key-value > span:last-child {
  overflow-wrap: anywhere;
}
.person-card {
  margin-bottom: 14px;
}
.person-card h3 {
  margin-bottom: 3px;
}
.gaps {
  font-size: 11px;
  color: var(--warn);
  padding: 10px 12px;
  background: #fcf5e7;
  border-radius: 5px;
  margin: 0 0 15px;
}
.gaps p {
  margin: 3px 0;
}
.finding {
  font-size: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.finding p {
  margin: 5px 0;
}
.finding small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.evidence {
  border-left: 2px solid #d8e4da;
  padding-left: 9px;
  color: #7c897f;
  font-size: 10px !important;
}
.source-link {
  font-size: 10px;
  overflow-wrap: anywhere;
}
.manual-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.manual-links a {
  font-size: 10px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid #d1e3d6;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
[hidden] {
  display: none !important;
}
@media (max-width: 800px) {
  main {
    padding: 20px 16px;
  }
  .header {
    padding: 15px 16px;
  }
  .header nav {
    gap: 3px;
  }
  .header nav button {
    font-size: 10px;
    padding: 6px;
  }
  .brand {
    font-size: 17px;
  }
  .search-box {
    padding: 19px;
  }
  .search-fields {
    grid-template-columns: 1fr 1fr;
    gap: 13px;
  }
  .search-fields > .primary {
    grid-column: 1/-1;
  }
  .advanced-grid {
    grid-template-columns: 1fr 1fr;
  }
  .result-header {
    align-items: flex-start;
  }
  .result-header .actions {
    justify-content: flex-end;
  }
  .result-header h2 {
    font-size: 16px;
  }
  .table-tools {
    flex-wrap: wrap;
  }
  .table-tools input {
    flex: 1 0 100%;
  }
  .table-tools select {
    flex: 1;
  }
  .filter-options {
    flex-wrap: wrap;
  }
  .filter-options label {
    flex: 1;
  }
  .filter-options p {
    flex: 1 0 100%;
    margin: 0;
  }
  .table-wrap > table {
    min-width: 740px;
  }
  .pagination {
    flex-direction: column;
    align-items: flex-start;
  }
  .page-controls {
    width: 100%;
    justify-content: flex-end;
  }
  .page-controls > label {
    margin-right: auto;
  }
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .progress {
    align-items: flex-start;
  }
  .progress #job-message {
    display: block;
    margin-top: 4px;
  }
  .progress .actions {
    justify-content: flex-end;
  }
  .detail-actions {
    align-items: flex-start;
  }
  .detail-actions > div {
    flex-wrap: wrap;
  }
  .detail-tabs button {
    padding: 9px 11px;
    font-size: 11px;
  }
  dialog {
    padding: 19px;
  }
  footer {
    font-size: 9px;
  }
  footer span {
    text-align: right;
  }
}
@media (max-width: 440px) {
  .advanced-grid {
    grid-template-columns: 1fr;
  }
  .result-header {
    flex-direction: column;
  }
  .result-header .actions {
    justify-content: flex-start;
  }
  .search-fields {
    grid-template-columns: 1fr;
  }
  .search-fields > .primary {
    grid-column: auto;
  }
  .table-tools button {
    padding: 8px;
    font-size: 10px;
  }
  .page-controls > label {
    font-size: 10px;
  }
  .page-controls select {
    width: 54px;
  }
  #page-numbers {
    gap: 3px;
  }
  .page-controls button {
    min-width: 27px;
  }
  .key-value {
    grid-template-columns: 105px 1fr;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
  }
}
