/* Migração entre ambientes: mesma identidade do protótipo e do plano de trabalho. */
:root {
  --bg: #f3f6f5;
  --surface: #ffffff;
  --surface-2: #e9efed;
  --ink: #14211d;
  --muted: #4a5853;
  --line: #d3ddd9;
  --line-2: #b9cbc4;
  --accent: #1d6a58;
  --accent-ink: #14493d;
  --accent-soft: #dcefe8;
  --ok: #1c6440;
  --ok-soft: #dff1e6;
  --info: #1f4568;
  --info-soft: #e1ecf7;
  --warn: #6b3e04;
  --warn-soft: #fbedd3;
  --crit: #ab2a20;
  --crit-soft: #fae2df;
  --dom: #3f2d6e;
  --dom-soft: #ece7f7;
  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; }
p { margin: 0; }

.pagina { max-width: 1320px; margin: 0 auto; padding: 20px 16px 48px; display: flex; flex-direction: column; gap: 16px; }
.carregando { color: var(--muted); padding: 40px 0; }
.mono { font-family: var(--f-mono); }
.rotulo { font-family: var(--f-display); font-weight: 600; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.nota { color: var(--muted); font-size: 14px; }

/* barra superior */
.barra { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.barra h1 { font-weight: 800; font-size: 28px; line-height: 1.1; }
.barra .marca { display: flex; flex-direction: column; gap: 2px; }
.barra .marca .rotulo { color: var(--accent); }
.barra .lado { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.usuario { font-size: 14px; color: var(--muted); }

/* faixas */
.faixa { margin: 0; padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.faixa.aviso { background: var(--warn-soft); color: var(--warn); }
.faixa.info { background: var(--info-soft); color: var(--info); }
.faixa.erro { background: var(--crit-soft); color: var(--crit); }
.faixa.ok { background: var(--ok-soft); color: var(--ok); font-weight: 700; }

/* cartões */
.cartao { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; font-family: var(--f-display); font-weight: 600; font-size: 12.5px; padding: 6px 10px; border-radius: 999px; background: var(--surface-2); color: #33413c; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; font-family: var(--f-display); font-weight: 600; font-size: 12.5px; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.st-pendente { background: var(--accent-soft); color: var(--accent-ink); }
.st-bloqueado { background: var(--surface-2); color: #33413c; }
.st-ok { background: var(--ok-soft); color: var(--ok); }
.st-atencao { background: var(--warn-soft); color: var(--warn); }
.st-aguardando { background: var(--dom-soft); color: var(--dom); }
.st-parcial { background: var(--info-soft); color: var(--info); }
.st-gravada { background: var(--ok-soft); color: var(--ok); }
.st-revertida { background: var(--info-soft); color: var(--info); }
.st-nao_gravada { background: var(--surface-2); color: #33413c; }
.md-hml { background: var(--ok-soft); color: var(--ok); }
.md-leitura, .md-diag, .md-teste { background: var(--info-soft); color: var(--info); }
.md-aprov { background: var(--dom-soft); color: var(--dom); }
.md-grava { background: var(--warn-soft); color: var(--warn); }
.md-registro { background: var(--surface-2); color: #33413c; }

/* botões */
.btn, .btn2, .perigo, .perigo-cheio, .opc { min-height: 44px; padding: 10px 16px; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; }
.btn { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.btn:hover { background: var(--accent-ink); }
.btn2 { border: 1px solid var(--line-2); background: #fff; color: var(--ink); }
.btn2:hover { border-color: var(--accent); }
.perigo { border: 1px solid var(--crit); background: #fff; color: var(--crit); }
.perigo-cheio { border: 1px solid var(--crit); background: var(--crit); color: #fff; }
.opc { border: 1px solid var(--line-2); background: #fff; color: var(--ink); }
.opc[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
button:disabled { background: #c9d6d1 !important; border-color: #c9d6d1 !important; color: #33413c !important; cursor: not-allowed; }

/* lista de migrações */
.form-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.campo { display: flex; flex-direction: column; gap: 4px; }
.campo label { font-size: 13.5px; font-weight: 700; }
.campo input, .campo select { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; font: inherit; background: #fff; color: inherit; }
.campo small { color: var(--muted); font-size: 12.5px; }
.lista { width: 100%; border-collapse: collapse; font-size: 14px; }
.lista th { text-align: left; font-family: var(--f-display); font-weight: 600; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); padding: 9px 12px; }
.lista td { padding: 10px 12px; border-bottom: 1px solid #e3eae7; vertical-align: top; }
.rolagem { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }

/* progresso */
.cabeca-subida { display: flex; flex-direction: row; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.progresso { flex: 1 1 260px; max-width: 420px; display: flex; flex-direction: column; gap: 6px; }
.trilho { height: 10px; background: var(--accent-soft); border-radius: 999px; overflow: hidden; }
.trilho > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

/* pontos de retorno */
.area { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.area.revertida { background: #f4f8fc; }
.area .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 320px; }
.confirmar { background: var(--crit-soft); border: 1px solid var(--crit); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }

/* corpo */
.corpo { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.checklist { flex: 1 1 320px; display: flex; flex-direction: column; gap: 12px; }
.fase { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.fase .cab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 4px 6px 8px; }
.fase h3 { font-size: 15px; font-weight: 700; }
.itens { display: flex; flex-direction: column; gap: 4px; }
.item { display: flex; gap: 12px; align-items: center; width: 100%; min-height: 52px; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font: inherit; color: var(--ink); text-align: left; background: #fff; }
.item:hover { border-color: #a9c4bb; }
.item[aria-current="step"] { background: var(--accent-soft); border-color: var(--accent); }
.item .marca { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-mono); font-weight: 500; font-size: 13px; }
.item .marca.pendente { background: var(--accent); color: #fff; }
.item .marca.bloqueado { background: var(--surface-2); color: var(--muted); }
.item .marca.ok { background: var(--ok-soft); color: var(--ok); }
.item .marca.atencao { background: var(--warn-soft); color: var(--warn); }
.item .marca.aguardando { background: var(--dom-soft); color: var(--dom); }
.item .marca.parcial { background: var(--info-soft); color: var(--info); }
.item .txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.item .tit { font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.item .meta { font-size: 12.5px; color: var(--muted); }
.item .meta.sc-existe { color: var(--ok); }
.item .meta.sc-node { color: #2b5b88; }
.item .meta.sc-parte { color: #7a4604; }

.detalhe { flex: 999 1 560px; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.detalhe h2 { font-weight: 800; font-size: 26px; line-height: 1.15; }
.detalhe .topo { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-start; justify-content: space-between; }
.abas { display: flex; flex-wrap: wrap; gap: 0 22px; border-bottom: 1px solid var(--line); }
.aba { min-height: 44px; padding: 10px 4px; border: 0; border-bottom: 3px solid transparent; background: none; font-family: var(--f-display); font-weight: 600; font-size: 15px; cursor: pointer; color: var(--muted); }
.aba[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--ink); }
.fatos { display: flex; flex-wrap: wrap; gap: 12px; }
.fato { flex: 1 1 190px; background: var(--bg); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 14px; }
.caixa { border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.caixa.neutra { background: var(--surface-2); color: #33413c; }
.caixa.info { background: var(--info-soft); color: var(--info); }
.caixa.ok { background: var(--ok-soft); color: var(--ok); }
.caixa.aviso { background: var(--warn-soft); }
.caixa.aprov { background: var(--dom-soft); color: var(--dom); }
.linha-acoes { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.homonimo { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; background: #fff; border-radius: 8px; padding: 10px 12px; color: var(--ink); }

/* tabelas de snapshot e dados */
.tabela { min-width: 0; }
.tabela .linha { display: flex; border-bottom: 1px solid #e3eae7; }
.tabela .linha:last-child { border-bottom: 0; }
.tabela .linha.cab { background: var(--surface-2); }
.tabela .linha.dif { background: #fffaf0; }
.tabela .cel { flex: 1 0 120px; padding: 9px 12px; font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
.tabela .cab .cel { font-family: var(--f-display); font-weight: 600; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.tabela .c1 { flex: 1.6 0 180px; font-weight: 700; }
.t-ok { color: var(--ok); font-weight: 700; }
.t-warn { color: #7a4604; font-weight: 700; }
.t-info { color: #2b5b88; font-weight: 700; }
.ver-dados { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.vazio { margin: 0; padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: 10px; color: var(--muted); }

/* script */
.codigo { margin: 0; padding: 12px 14px; background: var(--ink); color: #e2ebe7; border-radius: 10px; font-family: var(--f-mono); font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }

/* registro */
.log { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.log .hora { font-family: var(--f-mono); color: var(--accent); flex: none; }
.log .txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tabchips { display: flex; flex-wrap: wrap; gap: 4px; }
.tabchip { display: inline-flex; gap: 4px; align-items: baseline; font-size: 12.5px; line-height: 1.35; padding: 3px 8px; border-radius: 6px; border: 1px solid transparent; }
.tc-ok { background: var(--ok-soft); color: #164f33; border-color: #c3e3cf; }
.tc-info { background: var(--info-soft); color: var(--info); border-color: #c6d9ec; }
.tc-warn { background: var(--warn-soft); color: var(--warn); border-color: #f0d6a6; }
.tc-neutro { background: var(--bg); color: #33413c; border-color: #e3eae7; }

@media (prefers-reduced-motion: no-preference) {
  .ocupado { cursor: progress; }
}
