/* Tokens visuais e tipografia global do validador. */
:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: #19221f;
  background: #f4f5f1;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #19221f;
  --muted: #737c76;
  --line: #e3e7e1;
  --green: #176b4a;
  --pale: #e9f2eb;
  --amber: #aa6418;
  --red: #a53d37;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 90% 0%, #edf3eb 0, transparent 38%), #f5f6f2;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
/* Estrutura principal: cabeçalho, entrada do TXT e painel de resultados. */
.shell {
  max-width: 1120px;
  margin: auto;
  padding: 34px 24px 64px;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 50px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.brand {
  color: inherit;
  text-decoration: none;
}
.brand-suffix {
  color: #919a93;
  font-weight: 450;
}
.mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #183f31;
  color: #d7f2dd;
  display: grid;
  place-items: center;
  font-size: 15px;
}
.version {
  font-size: 11px;
  color: #68746d;
  padding: 7px 10px;
  border: 1px solid #e2e6df;
  border-radius: 999px;
  background: #ffffff9c;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 15px;
}
.hero {
  max-width: 760px;
  margin: 0 0 34px;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 57px);
  line-height: 1.04;
  letter-spacing: -0.055em;
  margin: 0 0 17px;
  font-weight: 620;
  color: #202824;
}
.hero p {
  font-size: 15px;
  line-height: 1.65;
  color: #657069;
  margin: 0;
  max-width: 660px;
}
.surface {
  border: 1px solid #e3e7e1;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 40px #1e38200a;
}
.upload {
  padding: 23px 25px;
  display: flex;
  align-items: center;
  gap: 17px;
  margin-bottom: 22px;
}
.upload-icon {
  width: 43px;
  height: 43px;
  border-radius: 13px;
  background: #edf5ef;
  color: var(--green);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.upload-copy {
  flex: 1;
}
.upload-copy strong {
  font-size: 14px;
  font-weight: 650;
}
.upload-copy p {
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0 0;
}
.btn {
  border: 0;
  border-radius: 9px;
  padding: 11px 15px;
  background: #174f39;
  color: white;
  font-weight: 600;
  font-size: 12px;
  transition: 0.16s;
}
.btn:hover {
  background: #103f2c;
  transform: translateY(-1px);
}
.btn.secondary {
  color: #33433a;
  background: white;
  border: 1px solid var(--line);
}
.btn.secondary:hover {
  background: #f6f8f5;
  transform: none;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.panel {
  overflow: hidden;
}
.panel-head {
  padding: 17px 19px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-title {
  font-size: 13px;
  font-weight: 650;
}
.subtle {
  font-size: 11px;
  color: var(--muted);
}
#filename select {
  max-width: 330px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font-size: 11px;
}
.input-area {
  width: 100%;
  height: 220px;
  border: 0;
  resize: vertical;
  outline: none;
  padding: 19px;
  font:
    12px/1.75 "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
  color: #34433b;
  background: #fff;
  white-space: pre;
  overflow: auto;
}
.input-area::placeholder {
  color: #a0aaa2;
}
.option {
  display: block;
  padding: 0 19px;
  font-size: 11px;
  color: #68756d;
}
.option-remove-commas {
  padding-bottom: 8px;
}
.option-fill-ddi {
  padding-bottom: 14px;
}
/* Resumo e lista de ocorrências da análise. */
.results {
  min-height: 350px;
  max-height: 540px;
  overflow: auto;
}
.empty {
  height: 350px;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 32px;
  color: #859087;
}
.empty svg {
  margin: 0 auto 13px;
  color: #a9b2aa;
}
.empty strong {
  font-size: 13px;
  color: #58645b;
  font-weight: 600;
}
.empty p {
  font-size: 12px;
  line-height: 1.6;
  max-width: 270px;
  margin: 7px auto;
}
.summary {
  display: none;
  padding: 17px 19px;
  background: #fafbf9;
  border-bottom: 1px solid var(--line);
}
.summary.show {
  display: flex;
  align-items: center;
  gap: 9px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #36a36c;
}
.status-dot.warn {
  background: #d29439;
}
.status-dot.error {
  background: #a53d37;
}
.summary strong {
  font-size: 12px;
  font-weight: 650;
}
.summary span {
  font-size: 11px;
  color: var(--muted);
}
.finding {
  padding: 13px 19px;
  border-bottom: 1px solid #eef0ed;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
}
.finding:last-child {
  border-bottom: 0;
}
.finding-icon {
  font-size: 14px;
  color: var(--red);
  margin-top: 1px;
}
.finding.warn .finding-icon {
  color: var(--amber);
}
.finding-title {
  font-size: 12px;
  font-weight: 650;
  color: #303b34;
}
.finding-detail {
  font-size: 11px;
  line-height: 1.55;
  color: #778078;
  margin-top: 3px;
}
.finding code {
  font:
    10px "SFMono-Regular",
    Consolas,
    monospace;
  background: #f2f4f1;
  padding: 2px 4px;
  border-radius: 4px;
  color: #40554a;
}
/* Navegação entre pendências, campos, ajustes e comparações. */
.tabbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.tab-button {
  border: 0;
  border-radius: 8px;
  background: #e9eff7;
  color: #36516d;
  padding: 10px 13px;
  font-weight: 600;
  font-size: 12px;
}
.tab-button.active {
  background: #153453;
  color: #fff;
}
.tab-content {
  padding: 18px;
  max-height: 680px;
  overflow: auto;
}
/* Tabelas de revisão e destaque visual para campos com apontamentos. */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.table-scroll {
  overflow: auto;
}
.data-table tr.field-warning {
  background: #fff9e8;
}
.data-table tr.field-warning td {
  color: #7c5c20;
}
.data-table tr.field-error {
  background: #fff3f1;
}
.data-table tr.field-error td {
  color: #9f3b34;
}
.data-table tr.field-error input {
  border-color: #d99a94;
  background: #fffafa;
}
.data-table th {
  text-align: left;
  color: #405a74;
  background: #eef3f8;
  padding: 11px;
  border-bottom: 1px solid #dce5ee;
}
.data-table td {
  padding: 10px;
  border-bottom: 1px solid #e3eaf1;
  vertical-align: middle;
}
.data-table input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #c7d6e7;
  border-radius: 6px;
  font-size: 12px;
}
.record-picker {
  width: min(100%, 900px);
  padding: 9px;
  margin: 10px 0 18px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  background: #fff;
}
.tab-hint {
  font-size: 12px;
  color: #68756d;
  line-height: 1.6;
  margin: 0 0 14px;
}
.tab-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 14px 0;
}
.tab-actions .btn {
  font-size: 11px;
}
.finding-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 9px;
}
.edit-row {
  font-size: 10px;
  padding: 7px 10px;
  border-radius: 7px;
}
/* Editor dos campos do registro selecionado. */
.editor {
  display: none;
  padding: 13px 16px 15px;
  background: #f8faf7;
  border-top: 1px solid #e9eee8;
}
.editor.open {
  display: block;
}
.editor-hint {
  font-size: 10px;
  line-height: 1.5;
  color: #748078;
  margin-bottom: 9px;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.field-control label {
  display: block;
  font-size: 10px;
  color: #647168;
  margin-bottom: 4px;
}
.field-control label strong {
  display: block;
  font-size: 11px;
  color: #35443a;
  font-weight: 650;
  margin-bottom: 3px;
}
.field-location {
  display: block;
  font-size: 9px;
  color: #8a938c;
  font-weight: 450;
  line-height: 1.4;
}
.field-control input {
  width: 100%;
  padding: 8px 9px;
  border: 1px solid #dfe5dd;
  border-radius: 7px;
  background: white;
  font-size: 11px;
  color: #27352c;
  outline-color: #176b4a;
}
.reference-result {
  margin-top: 14px;
}
.reference-empty {
  margin-top: 16px;
}
.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 11px;
}
.editor-actions .btn {
  font-size: 10px;
  padding: 8px 11px;
}
.foot-separator {
  margin: 0 7px;
}
.foot a {
  color: var(--green);
  font-weight: 650;
}
/* Ajustes para telas menores, como tablets e celulares. */
@media (max-width: 760px) {
  .shell {
    padding: 23px 16px 45px;
  }
  .top {
    margin-bottom: 37px;
  }
  .upload {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .upload-copy {
    min-width: 70%;
  }
  .upload .btn {
    margin-left: 60px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .input-area,
  .empty {
    height: 260px;
  }
  .results {
    min-height: 260px;
  }
  .bottom {
    flex-direction: column;
  }
  .actions {
    width: 100%;
  }
  .actions .btn {
    flex: 1;
  }
}
