/* IMGA GD Compliance&Audit (itcompliance) — mesma cromática do itdashboard (logótipo imga.pt):
   verde #008B39, cinza-azulado #5A666D, fundo #EDEFF2, texto #282929. */
:root {
  --brand: #008B39; --brand-dark: #00702e; --brand-soft: #e8f4ec; --brand-text: #007a33;
  --ink: #282929; --ink-soft: #5A666D; --grey: #6b7378;
  --line: #DDDEDE; --line-soft: #EDEFF2; --bg: #EDEFF2; --surface: #FFFFFF; --surface-2: #F7F8FA;
  --ok: #008B39; --down: #c0392b; --warn: #8a6100; --info: #2b6cb0;
  --down-soft: #fbe9e7; --warn-soft: #fff3d1; --info-soft: #e6effa; --ok-soft: #e8f4ec; --grey-soft: #eef0f2;
  --critica: #8e1b1b; --alta: #c0392b; --media: #8a6100; --baixa: #5A666D;
  --radius: 10px; --radius-sm: 8px; --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(40,41,41,.05), 0 4px 12px rgba(40,41,41,.06);
  --shadow-lg: 0 8px 28px rgba(40,41,41,.12);
  --fs-xs: 11px; --fs-sm: 12.5px; --fs-base: 14px; --fs-md: 15.5px; --fs-lg: 18px; --fs-xl: 21px; --fs-kpi: 26px;
  accent-color: var(--brand);
  color-scheme: light;
}
html[data-theme="dark"] {
  --ink: #e7eaec; --ink-soft: #a6b1b8; --grey: #8b949e;
  --line: #2b3136; --line-soft: #22272b; --bg: #16191c; --surface: #1e2225; --surface-2: #24292d;
  --brand-soft: #123621; --brand-text: #4cc97d; --ok: #4cc97d; --down: #e8705f; --warn: #d9a52b; --info: #6ea8e8;
  --down-soft: #3a2320; --warn-soft: #3a3120; --info-soft: #1e2b3a; --ok-soft: #123621; --grey-soft: #2a2f33;
  --critica: #ff8a80; --alta: #e8705f; --media: #d9a52b; --baixa: #a6b1b8;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.35); --shadow-lg: 0 8px 28px rgba(0,0,0,.5);
  color-scheme: dark;
}
html[data-theme="dark"] .logo { filter: invert(1) brightness(1.7); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.55 "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  height: 100vh; display: flex; flex-direction: column;
}
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.01em; margin: 0; }
a { color: var(--brand-text); }
.muted { color: var(--ink-soft); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.error { color: var(--down); font-size: 13px; margin: 10px 0 0; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* --------------------------------------------------------------- login */
.logo { display: block; }
.logo-login { height: 34px; width: auto; margin-bottom: 18px; }
.centered { flex: 1; display: grid; place-items: center; padding: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 20px 22px; }
.auth-card { width: min(380px, 100%); padding: 32px; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 22px; margin: 0 0 2px; }
.auth-card .small { margin: 0 0 14px; }
.btn-block { width: 100%; margin-top: 22px; justify-content: center; }

/* -------------------------------------------------------- formulários */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-top: 12px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
textarea { min-height: 80px; resize: vertical; }
input[type="checkbox"] { display: inline-block; width: auto; margin: 0 6px 0 0; vertical-align: middle; }
.check { display: flex; align-items: center; gap: 6px; font-weight: 500; color: var(--ink); margin-top: 6px; cursor: pointer; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.hint { font-size: 12px; color: var(--grey); margin-top: 4px; font-weight: 400; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600;
  font-size: 13px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); border-color: var(--grey); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-danger { color: var(--down); border-color: var(--down); }
.btn-danger:hover { background: var(--down-soft); }
.btn-sm { padding: 4px 9px; font-size: 12px; }
.btn svg { width: 15px; height: 15px; }
.ib { border: 0; background: none; color: var(--ink-soft); cursor: pointer; padding: 6px; border-radius: 8px; display: inline-grid; place-items: center; font: inherit; }
.ib:hover { background: var(--bg); color: var(--ink); }

/* ------------------------------------------------------------ barra lateral */
#app-view { flex: 1; display: flex; min-height: 0; }
.rail {
  width: 236px; flex: none; display: flex; flex-direction: column; gap: 2px; padding: 14px 10px 10px;
  background: var(--surface); border-right: 1px solid var(--line);
}
.rail-top { padding: 0 6px 14px; }
.marca { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; text-decoration: none; color: var(--ink); padding: 2px 6px 0; }
.logo-bar { height: 22px; width: auto; }
.appname { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; }
.rail-sec { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--grey); padding: 14px 12px 4px; }
.rail-fill { flex: 1; }
.tabs { display: flex; flex-direction: column; gap: 2px; }
.tab {
  display: flex; align-items: center; gap: 11px; width: 100%; min-height: 40px; padding: 8px 11px; border-radius: 10px;
  border: 0; background: none; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink);
  text-align: left; text-decoration: none; white-space: nowrap; transition: background .12s;
}
.tab:hover { background: var(--bg); }
.tab[aria-current="page"] { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.tab-ico { width: 20px; height: 20px; flex: none; stroke-width: 1.8; }
.tab-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.tab-badge { background: var(--down); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; min-width: 20px; text-align: center; }
.rail-bottom { border-top: 1px solid var(--line); padding-top: 8px; }
.rail-user { display: flex; align-items: center; gap: 8px; padding: 8px 4px 2px; }
.rail-user-txt { flex: 1; min-width: 0; }
.rail-user-nome { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }

/* ----------------------------------------------------------------- shell */
.shell { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 28px 12px; }
.topbar > div:first-child { flex: 1 1 auto; min-width: 0; }
.topbar h1 { font-size: 22px; line-height: 1.25; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; flex: 0 0 auto; padding-top: 2px; }
.page { flex: 1; overflow: auto; padding: 6px 28px 28px; }
.sec { margin-top: 18px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.sec-head h2 { font-size: 15px; }
.sec-head h3 { font-size: 14px; }
.card > h2, .card h2.ct, h2.ct { font-size: 15px; margin-bottom: 8px; }
.card h3, .sub-head { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--grey); font-weight: 700; margin: 12px 0 6px; }
.card h3:first-child, .sub-head:first-child { margin-top: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; cursor: pointer; }
.kpi:hover { border-color: var(--grey); }
.kpi .v { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.kpi .l { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.kpi .d { font-size: 12px; color: var(--grey); }
.cols2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
.cols2-eq { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .cols2, .cols2-eq { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- tabelas */
.tabela { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tabela th, .tabela td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tabela th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--grey); font-weight: 700; background: var(--surface-2); }
.tabela tr:last-child td { border-bottom: 0; }
.tabela tbody tr.link { cursor: pointer; }
.tabela tbody tr.link:hover { background: var(--surface-2); }
.tabela td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tabela td.cod, .tabela td.nowrap { white-space: nowrap; }
.vazio { padding: 28px; text-align: center; color: var(--grey); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* --------------------------------------------------------------- etiquetas */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--grey-soft); color: var(--ink-soft); white-space: nowrap; }
.chip-norm { background: var(--info-soft); color: var(--info); }
.chip-ok { background: var(--ok-soft); color: var(--brand-text); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-down { background: var(--down-soft); color: var(--down); }
.sev { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; }
.sev-critica { background: var(--critica); } .sev-alta { background: var(--alta); } .sev-media { background: var(--media); } .sev-baixa { background: var(--baixa); }
html[data-theme="dark"] .sev { color: #16191c; }
.estado-aprovado { color: var(--brand-text); } .estado-rascunho { color: var(--grey); } .estado-em_revisao { color: var(--warn); } .estado-obsoleto { color: var(--down); }
.pill-estado { font-weight: 600; font-size: 12.5px; }

/* --------------------------------------------------------------- cobertura */
.barra { height: 8px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.barra > i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.barra > i.parcial { background: var(--warn); }
.cob-card { display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
.cob-card:hover { border-color: var(--grey); }
.cob-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cob-top b { font-size: 15px; }
.cob-pct { font-size: 20px; font-weight: 700; }
.req-lista { display: flex; flex-direction: column; gap: 8px; }
.req { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; align-items: start; padding: 10px 14px; }
.req .cod { font-weight: 700; color: var(--ink-soft); font-size: 13px; }
.req .docs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.req-tema { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--grey); font-weight: 700; margin: 18px 0 6px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot-ok { background: var(--ok); } .dot-warn { background: var(--warn); } .dot-off { background: var(--line); border: 1px solid var(--grey); }

/* ----------------------------------------------------------------- achados */
.achado { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; padding: 12px 16px; cursor: pointer; }
.achado:hover { border-color: var(--grey); }
.achado .t { font-weight: 600; }
.achado .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.achado .data { color: var(--grey); font-size: 12px; white-space: nowrap; }
.excerto { border-left: 3px solid var(--brand); background: var(--surface-2); padding: 10px 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 8px 0; font-size: 13.5px; }
.excerto .de { font-size: 12px; color: var(--ink-soft); font-weight: 600; margin-bottom: 4px; }
.excertos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.desc { white-space: pre-wrap; }
.filtros { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 6px 0 14px; }
.filtros label { margin: 0; min-width: 140px; }
.filtros input, .filtros select { margin-top: 3px; padding: 6px 9px; }
.filtros .pesquisa { min-width: 240px; }
.lista { display: flex; flex-direction: column; gap: 8px; }

/* -------------------------------------------------------------- documento */
.doc-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 18px; }
.meta-grid .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--grey); font-weight: 700; }
.meta-grid .v { font-weight: 500; }
pre.texto { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; max-height: 480px; overflow: auto; white-space: pre-wrap; font-size: 12.5px; line-height: 1.5; }
.linha-acoes { display: flex; gap: 6px; flex-wrap: wrap; }
.progresso { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--info-soft); color: var(--info); border-radius: var(--radius-sm); font-weight: 600; }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.aviso { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn); font-weight: 500; }
.aviso-info { background: var(--info-soft); color: var(--info); }
.aviso-ok { background: var(--ok-soft); color: var(--brand-text); }
.aviso-down { background: var(--down-soft); color: var(--down); }
.sel-docs { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 10px; margin-top: 4px; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
dl.kv dt { color: var(--ink-soft); font-size: 12.5px; } dl.kv dd { margin: 0; }
details summary { cursor: pointer; font-weight: 600; color: var(--ink-soft); }

/* ------------------------------------------------------------------ modal */
.modal { position: fixed; inset: 0; background: rgba(20,22,24,.45); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: min(680px, 100%); max-height: 92vh; display: flex; flex-direction: column; }
.modal-card.larga { width: min(960px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px 10px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 16px; }
.modal-body { padding: 14px 22px 22px; overflow: auto; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 60; font-weight: 500; max-width: 90vw; }
.toast.erro { background: var(--down); color: #fff; }
.codigo-inline { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.pw-box { font-family: ui-monospace, Menlo, monospace; font-size: 18px; letter-spacing: .04em; background: var(--surface-2); border: 1px dashed var(--grey); border-radius: var(--radius-sm); padding: 12px 16px; text-align: center; margin: 10px 0; user-select: all; }

@media (max-width: 900px) {
  #app-view { flex-direction: column; }
  .rail { width: 100%; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .tabs { flex-direction: row; flex-wrap: wrap; } .tab-label { display: none; } .rail-sec, .rail-fill { display: none; }
  .rail-bottom { border: 0; padding: 0; margin-left: auto; display: flex; } .rail-user-txt { display: none; }
  .topbar, .page { padding-left: 16px; padding-right: 16px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------- melhorias */
mark { background: var(--warn-soft); color: inherit; padding: 0 2px; border-radius: 3px; }
.resultado { display: block; padding: 10px 14px; text-decoration: none; color: inherit; }
.resultado:hover { border-color: var(--grey); }
.resultado .exc { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }
.diff { width: 100%; border-collapse: collapse; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.diff td { vertical-align: top; padding: 2px 8px; border-bottom: 1px solid var(--line-soft); white-space: pre-wrap; width: 50%; }
.diff tr.removida td.a, .diff tr.alterada td.a { background: var(--down-soft); }
.diff tr.adicionada td.b, .diff tr.alterada td.b { background: var(--ok-soft); }
.diff tr.dobra td { text-align: center; color: var(--grey); background: var(--surface-2); font-family: inherit; }
.diff-res { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.qr { background: #fff; padding: 10px; border-radius: 10px; display: inline-block; border: 1px solid var(--line); }
.qr svg { width: 180px; height: 180px; display: block; }
.resposta { white-space: pre-wrap; line-height: 1.6; }
.cit { display: inline-block; background: var(--brand-soft); color: var(--brand-text); font-weight: 700; font-size: 11px; border-radius: 4px; padding: 0 5px; margin-left: 2px; }
.cit-lista .excerto { margin: 6px 0; }
.req .acoes { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.req.na { opacity: .72; }
.evid { font-size: 13px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--surface-2); }
.evid-lista { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.def-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 22px; }
.estado-ok { color: var(--brand-text); font-weight: 600; } .estado-off { color: var(--grey); }
.token-box { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; background: var(--surface-2); border: 1px dashed var(--grey); border-radius: var(--radius-sm); padding: 8px 12px; word-break: break-all; user-select: all; }
/* Mais um botão junto do utilizador: menos espaço por botão para o nome não ficar cortado. */
.rail-user { gap: 6px; padding-left: 0; padding-right: 0; }
.rail-user .ib { padding: 4px; }
.rail-user-nome { font-size: 12.5px; }
.avatar { width: 28px; height: 28px; font-size: 12px; }

/* revisões propostas */
.alt { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; background: var(--surface); }
.alt.nao-aplicada { opacity: .85; border-style: dashed; }
.alt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
@media (max-width: 900px) { .alt-grid { grid-template-columns: 1fr; } }
.alt pre { white-space: pre-wrap; word-break: break-word; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; margin: 4px 0 0; padding: 8px 10px; border-radius: 6px; background: var(--surface-2); max-height: 280px; overflow: auto; }
.alt pre.orig { border-left: 3px solid var(--down); }
.alt pre.novo { border-left: 3px solid var(--brand); }
.definir { background: #fff3bf; color: #5c4a00; padding: 0 3px; border-radius: 3px; font-weight: 600; }
:root[data-theme="dark"] .definir { background: #4a3d00; color: #ffe08a; }
.btn[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand); }

/* utilitários de espaçamento (substituem estilos em linha) */
.lista-simples { margin: 0; padding-left: 18px; }
.lista-simples li { margin-bottom: 4px; }
.mb-4 { margin-bottom: 4px; }
.m0 { margin: 0; } .mt-0 { margin-top: 0; } .mt-4 { margin-top: 4px; } .mt-6 { margin-top: 6px; } .mt-8 { margin-top: 8px; } .mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; } .mt-14 { margin-top: 14px; } .mt-18 { margin-top: 18px; } .mt-22 { margin-top: 22px; } .mt-28 { margin-top: 28px; }
.mb-6 { margin-bottom: 6px; } .mb-8 { margin-bottom: 8px; } .mb-10 { margin-bottom: 10px; } .mb-12 { margin-bottom: 12px; }

/* natureza dos normativos */
.natureza { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; vertical-align: middle; }
.natureza-obrigatorio { background: var(--brand-soft); color: var(--brand-text); border: 1px solid var(--brand); }
.natureza-condicional { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn); }
.natureza-voluntario { background: var(--grey-soft); color: var(--ink-soft); border: 1px solid var(--line); }
.natureza-interno { background: var(--info-soft); color: var(--info); }
.cob-card.natureza-card-obrigatorio { border-left: 4px solid var(--brand); }
.cob-card.natureza-card-condicional { border-left: 4px solid var(--warn); }
.cob-card.natureza-card-voluntario { border-left: 4px solid var(--grey); }
.cob-card.natureza-card-interno { border-left: 4px solid var(--info); }
.legenda-natureza { margin: 0 0 4px; }
.legenda-natureza .natureza { margin-right: 4px; }
#page-title .natureza { font-size: 11px; position: relative; top: -3px; margin-left: 6px; }

/* relatórios */
details.card > summary { list-style: none; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
details.card > summary::before { content: "▸"; color: var(--grey); font-size: 12px; }
details.card[open] > summary::before { content: "▾"; }

/* =================================================================== polimento gráfico (2026-11-11)
   Mantém a linguagem (verde IMGA, barra lateral, cartões) e corrige hierarquia, espaçamento e consistência. */

/* tokens adicionais */
:root { --line-strong: #cfd2d4; --surface-3: #f1f3f5; --focus: rgba(0,139,57,.28); }
html[data-theme="dark"] {
  --line-strong: #3a4147; --surface-3: #2a3035;
  /* tintas translúcidas em vez de castanhos opacos: ficam limpas sobre qualquer superfície */
  --brand-soft: rgba(76,201,125,.14); --ok-soft: rgba(76,201,125,.14); --down-soft: rgba(232,112,95,.16);
  --warn-soft: rgba(217,165,43,.16); --info-soft: rgba(110,168,232,.16); --grey-soft: rgba(166,177,184,.14);
}
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { text-wrap: balance; }
a { text-decoration-thickness: 1px; text-underline-offset: 2px; }
::selection { background: var(--brand-soft); }

/* barra lateral: marca com respiro e separação, item ativo com acento */
.rail { padding: 18px 12px 12px; }
.rail-top { padding: 0 6px 16px; margin-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
.tab { position: relative; padding: 8px 12px; }
.tab[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.tab-ico { color: var(--ink-soft); }
.tab:hover .tab-ico, .tab[aria-current="page"] .tab-ico { color: inherit; }
.rail-sec { padding-top: 18px; }

/* cabeçalho da página: separado do conteúdo, botões alinhados */
.topbar { padding: 20px 28px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar h1 { font-size: 21px; }
#page-sub { margin: 3px 0 0; }
.page { padding: 20px 28px 32px; }
.actions .btn { box-shadow: 0 1px 1px rgba(40,41,41,.04); }

/* botões: estados mais claros e tamanho uniforme */
.btn { padding: 7px 14px; line-height: 1.3; transition: background .12s, border-color .12s, color .12s, box-shadow .12s; }
.btn:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--focus); }
.btn-brand:hover { box-shadow: 0 2px 8px rgba(0,139,57,.28); }
.btn-sm { padding: 4px 10px; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--focus); }
select { padding-right: 28px; }
label { margin-top: 12px; }
.hint a { font-weight: 500; }

/* cartões e secções */
.card { padding: 18px 20px; }
.sec { margin-top: 24px; }
.sec-head { margin-bottom: 10px; }
.sec-head h2 { font-size: 16px; }
.card > h2, .card h2.ct, h2.ct { font-size: 15.5px; margin-bottom: 10px; }

/* KPIs: grelha fixa (sem órfãos), acento colorido em vez de fundo cheio */
.kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
@media (max-width: 700px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { padding: 14px 16px 14px; gap: 3px; border-top: 3px solid transparent; min-width: 0; }
.kpi .v { font-size: 26px; color: var(--brand-text); }
.kpi .l { line-height: 1.3; }
.kpi .d { line-height: 1.35; }
.kpi.kpi-alerta { border-top-color: var(--down); } .kpi.kpi-alerta .v { color: var(--down); }
.kpi.kpi-aviso { border-top-color: var(--warn); } .kpi.kpi-aviso .v { color: var(--warn); }
.kpi:hover { border-color: var(--grey); border-top-color: var(--brand); box-shadow: var(--shadow-lg); }
.kpi.kpi-alerta:hover { border-top-color: var(--down); } .kpi.kpi-aviso:hover { border-top-color: var(--warn); }

/* cartões de cobertura: alturas iguais, descrição limitada a 4 linhas */
.cards { gap: 12px; align-items: stretch; }
.cob-card { gap: 7px; transition: border-color .12s, box-shadow .12s, transform .12s; }
.cob-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.cob-top b { font-size: 14.5px; line-height: 1.3; }
.cob-pct { font-size: 18px; font-variant-numeric: tabular-nums; }
.cob-card .desc { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-soft); line-height: 1.45; margin-top: 2px; }
.cob-card .ref { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; margin-top: auto; }
.legenda-natureza { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 2px 0 6px; }
.legenda-natureza span.legenda-item { display: inline-flex; align-items: center; gap: 8px; }

/* filtros: larguras consistentes, contagem alinhada */
.filtros { gap: 10px 12px; margin: 2px 0 16px; }
.filtros label { min-width: 150px; max-width: 300px; flex: 0 1 auto; }
.filtros .pesquisa { min-width: 220px; }
.filtros select { min-width: 160px; }
.filtros > .muted { align-self: center; padding-bottom: 2px; }

/* tabelas: mesma presença que os cartões, cabeçalho mais discreto, linhas mais legíveis */
.tabela { box-shadow: var(--shadow); }
.tabela th, .tabela td { padding: 10px 12px; }
.tabela th { font-size: 11px; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
.tabela td { line-height: 1.45; }
.tabela tbody tr.link:hover { background: var(--surface-2); }
.tabela tbody tr.link:hover td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.tabela td .btn-sm { white-space: nowrap; }
.tabela-rel .codigo-inline { font-size: 11px; padding: 0 5px; }
.tabela-rel td:nth-child(4) { max-width: 240px; }

/* etiquetas */
.chip { padding: 2px 9px; line-height: 1.5; }
.chip-norm { font-weight: 700; letter-spacing: .02em; }
.sev { padding: 2px 8px; }
.pill-estado { display: inline-flex; align-items: center; gap: 6px; }
.pill-estado::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }

/* avisos: acento lateral, texto na cor base para melhor contraste */
.aviso { border-left: 3px solid var(--warn); color: var(--ink); padding: 10px 14px 10px 13px; }
.aviso-info { border-left-color: var(--info); } .aviso-ok { border-left-color: var(--ok); } .aviso-down { border-left-color: var(--down); }
.aviso b { color: inherit; }
.progresso { border-left: 3px solid var(--info); }

/* listas de achados e requisitos */
.achado { padding: 12px 16px; transition: border-color .12s, box-shadow .12s; }
.achado:hover { box-shadow: var(--shadow-lg); }
.achado .t { line-height: 1.4; }
.req { padding: 12px 16px; }
.req .cod { font-variant-numeric: tabular-nums; }
.req-tema { margin: 22px 0 8px; }

/* documento: grelha de metadados com separadores suaves */
.meta-grid { gap: 12px 24px; }
.meta-grid .k { margin-bottom: 2px; }
.doc-head { margin-top: 2px; }
.desc { color: var(--ink-soft); }

/* login: acento da marca e fundo com profundidade */
#login-view { background: radial-gradient(900px 500px at 50% 0%, var(--brand-soft), transparent 70%), var(--bg); }
.auth-card { border-top: 4px solid var(--brand); padding: 30px 32px 32px; }
.auth-card h1 { margin-top: 6px; }

/* modais e notificações */
.modal { backdrop-filter: blur(2px); }
.modal-head { padding: 16px 22px 12px; }
.modal-body { padding: 16px 22px 22px; }
.toast { font-size: 13.5px; }

/* separadores de secção em listas longas (relatórios, normativos) */
details.card > summary { padding: 2px 0; }
details.card[open] > summary { margin-bottom: 8px; }

/* estado vazio */
.vazio { padding: 32px 24px; color: var(--ink-soft); }

/* barra de progresso de cobertura mais fina e com fundo visível em ambos os temas */
.barra { height: 7px; background: var(--grey-soft); }

/* mobile: cabeçalho e página com margens de 16px já definidas; evitar transbordo das grelhas */
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

/* ajustes após revisão das capturas */
.kpi { position: relative; overflow: hidden; border-top: 1px solid var(--line); }
.kpi::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: transparent; }
.kpi.kpi-alerta::before { background: var(--down); } .kpi.kpi-aviso::before { background: var(--warn); }
.kpi:hover, .kpi.kpi-alerta:hover, .kpi.kpi-aviso:hover { border-top-color: var(--grey); }
.kpi:hover::before { background: var(--brand); } .kpi.kpi-alerta:hover::before { background: var(--down); } .kpi.kpi-aviso:hover::before { background: var(--warn); }
.auth-card { border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.auth-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--brand); }
.req { grid-template-columns: 118px 1fr auto; }
.req .cod { overflow-wrap: anywhere; line-height: 1.35; }
.tabela-rel { table-layout: fixed; }
.tabela-rel td { overflow-wrap: anywhere; }
.tabela-rel td:nth-child(4) { max-width: none; }
.tabela-rel td .btn-sm { padding-left: 8px; padding-right: 8px; }
.tabela-rel th:nth-child(1) { width: 28%; } .tabela-rel th:nth-child(2) { width: 13%; } .tabela-rel th:nth-child(3) { width: 9%; }
.tabela-rel th:nth-child(4) { width: 18%; } .tabela-rel th:nth-child(5) { width: 10%; } .tabela-rel th:nth-child(6) { width: 10%; } .tabela-rel th:nth-child(7) { width: 12%; }
.tabela-rel td:last-child { text-align: right; padding-left: 4px; }
.card .tabela { box-shadow: none; }

/* novos normativos: escolha da origem, propostas e editor de requisitos */
.origens { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 700px) { .origens { grid-template-columns: 1fr 1fr; } }
.origem { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; color: var(--ink); transition: border-color .12s, background .12s; }
.origem input { width: auto; margin: 0 0 6px; }
.origem:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.origem.desativada { opacity: .5; cursor: not-allowed; }
.proposta { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 12px 14px; cursor: pointer; font-weight: 400; color: var(--ink); }
.proposta input { width: auto; margin: 4px 0 0; }
.proposta:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--focus); }
.req-editor { box-shadow: none; }
.req-editor td { vertical-align: top; padding: 8px 8px; }
.req-editor td:first-child { width: 112px; } .req-editor td:nth-child(3) { width: 170px; } .req-editor td:last-child { width: 36px; padding-top: 10px; }
.req-editor input, .req-editor textarea { margin-top: 0; padding: 5px 8px; font-size: 13px; }
.req-editor textarea { margin-top: 4px; min-height: 0; line-height: 1.4; }

/* matrizes */
.mat-grupo { margin-top: 22px; }
.mat-grupo:first-child { margin-top: 0; }
.mat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mat-card { display: flex; flex-direction: column; gap: 8px; cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; }
.mat-card:hover { border-color: var(--grey); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.mat-card .t { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.mat-card .fim { color: var(--ink-soft); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mat-card .norms { display: flex; flex-wrap: wrap; gap: 4px; }
.mat-card .resumo { font-size: 12.5px; font-weight: 600; margin-top: auto; }
.mat-tipo { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--grey); }
.mat-tabela-wrap { overflow: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.mat-tabela-wrap .tabela { border: 0; box-shadow: none; min-width: 100%; }
.mat-tabela-wrap .tabela th { position: sticky; top: 0; z-index: 1; }
.mat-tabela-wrap .tabela td { max-width: 420px; }
.mat-tabela-wrap .tabela td.longo { white-space: pre-wrap; }
.mat-exigida { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.estado-conforme { color: var(--brand-text); font-weight: 600; } .estado-parcial { color: var(--warn); font-weight: 600; }
.estado-nao_conforme { color: var(--down); font-weight: 600; } .estado-nao_aplicavel { color: var(--grey); }
.mat-kpis { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; }
.mat-kpis b { font-size: 16px; }
.nivel { display: inline-block; min-width: 28px; text-align: center; border-radius: 6px; padding: 1px 6px; font-weight: 700; }
.nivel-baixo { background: var(--ok-soft); color: var(--brand-text); } .nivel-medio { background: var(--warn-soft); color: var(--warn); } .nivel-alto { background: var(--down-soft); color: var(--down); }

/* assinaturas (Chave Móvel Digital) */
.passos { display: flex; gap: 10px; margin: 0 0 14px; }
.passo { flex: 1; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--grey); font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); }
.passo.ativo { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand); }
.passo.feito { color: var(--brand-text); }
.codigo-otp { font-size: 22px; letter-spacing: .3em; text-align: center; font-family: ui-monospace, Menlo, monospace; }
input.codigo-otp { height: auto !important; padding-top: 10px; padding-bottom: 10px; }
.selo { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--ok-soft); color: var(--brand-text); }
.selo svg { width: 13px; height: 13px; }

/* visualização de documentos (visor) */
.visor-wrap { height: calc(100vh - 210px); min-height: 480px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); padding: 8px; }
.visor { width: 100%; height: 100%; border: 0; display: block; background: #fff; border-radius: 6px; }
#page-actions select { padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: inherit; font: inherit; }

/* registos (fornecedores, processos, sistemas, riscos, controlos, ações, incidentes, testes) */
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.subtab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.subtab:hover { border-color: var(--brand); text-decoration: none; }
.subtab.ativo { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand); }
.subtab .n { color: var(--grey); font-weight: 500; }
.kpis-mini { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 12px; font-size: 13px; align-items: baseline; }
.kpis-mini b { font-size: 19px; color: var(--brand-text); margin-right: 5px; }
.kpis-mini .km-alerta b { color: var(--down); } .kpis-mini .km-aviso b { color: var(--warn); }
.grid-reg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.grid-reg .campo-largo { grid-column: 1 / -1; }
.opcoes-multi { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 6px 0 2px; }
.opcoes-multi .check { margin: 0; font-weight: 500; }
.linha-atraso td:first-child { box-shadow: inset 3px 0 0 var(--down); }
.mapas-calor { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 14px; }
.mapa-calor { padding: 12px 14px; }
.mc-titulo { font-weight: 700; font-size: 12.5px; margin-bottom: 8px; color: var(--ink-soft); }
.mc-grelha { display: grid; grid-template-columns: 20px repeat(5, 1fr); gap: 4px; }
.mc-eixo { font-size: 11px; color: var(--grey); display: flex; align-items: center; justify-content: center; }
.mc-celula { height: 34px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.mc-baixo { background: var(--ok-soft); color: var(--brand-text); } .mc-medio { background: var(--warn-soft); color: var(--warn); } .mc-alto { background: var(--down-soft); color: var(--down); }
.mc-celula.vazia { opacity: .4; }
.prazos-lista { display: grid; gap: 6px; margin: 8px 0 14px; }
.prazo { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; background: var(--surface); }
.prazo.em_atraso { border-color: var(--down); } .prazo.urgente { border-color: var(--warn); } .prazo.enviada, .prazo.enviada_tarde, .prazo.nao_exigida { opacity: .72; }
.lista-avisos { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.lista-avisos li { margin: 3px 0; }
@media (max-width: 900px) { .grid-reg { grid-template-columns: 1fr 1fr; } .mapas-calor { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- requisitos de auditores */
.aud-barra { display: flex; }
.aud-barra > i { border-radius: 0; }
.aud-barra > i.sem { background: var(--down); }
.aud-item.aud-revisto { border-left: 3px solid var(--brand); }
.aud-pergunta { font-weight: 600; white-space: pre-wrap; }
.aud-resposta { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 8px; padding: 10px 12px; font-size: 13.5px; }

/* ------------------------------------------------ coerência gráfica (revisão de 2026-11-13) */
/* formulários: o valor de um campo não herda o negrito do rótulo; alturas iguais em todos os tipos */
label > input, label > select, label > textarea, .filtros input, .filtros select { font-weight: 400; color: var(--ink); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]), select:not([multiple]):not([size]) { height: 36px; line-height: 1.3; }
select[multiple] { height: auto; min-height: 96px; }
input[type=file] { padding: 6px 8px; }
/* KPIs: números neutros; a cor só aparece quando há alerta, aviso ou um «ok» explícito */
.kpi .v { color: var(--ink); }
.kpi.kpi-ok { border-top-color: var(--brand); } .kpi.kpi-ok .v { color: var(--brand-text); }
/* etiquetas de estado com um só raio */
.sev, .natureza, .pill-estado, .nivel, .cit { border-radius: 999px; }
/* filtros: a contagem fica à direita, alinhada com os campos */
.filtros-n, .ml-auto { margin-left: auto; }
.filtros .filtros-n { align-self: end; padding-bottom: 9px; }
/* tabelas: cabeçalhos numa linha e scroll horizontal em ecrãs estreitos (o app.js envolve-as em .tabela-wrap) */
.tabela th { white-space: nowrap; }
.tabela-wrap { overflow-x: auto; border-radius: var(--radius); }
/* modais longos: os botões ficam sempre visíveis */
.modal-body > form:last-child > .form-actions:last-child { position: sticky; bottom: -22px; background: var(--surface); margin: 14px -22px -22px; padding: 12px 22px; border-top: 1px solid var(--line-soft); z-index: 1; }
.toast { z-index: 70; bottom: 28px; }
/* apagar nas linhas: discreto até ao hover (o vermelho cheio fica para o cabeçalho e para as confirmações) */
.tabela .btn-sm.btn-danger, .lista .btn-sm.btn-danger, td .btn-sm.btn-danger { background: transparent; color: var(--down); border-color: var(--line); }
.tabela .btn-sm.btn-danger:hover, .lista .btn-sm.btn-danger:hover, td .btn-sm.btn-danger:hover { background: var(--down); color: #fff; border-color: var(--down); }
/* títulos pequenos em maiúsculas: um só tamanho */
.card h3, .sub-head, .tabela th, .meta-grid .k, .req-tema, .mat-tipo, .eyebrow { font-size: var(--fs-xs); letter-spacing: .05em; }
.eyebrow { text-transform: uppercase; color: var(--grey); font-weight: 700; }
/* utilitários que substituem estilos em linha */
.span-2 { grid-column: span 2; }
.select-sm { width: auto; display: inline-block; height: 30px; padding: 3px 26px 3px 8px; margin: 0; font-size: var(--fs-sm); }
.textarea-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.flex-1 { flex: 1; }
.pre-wrap { white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; }
.w-auto { width: auto; }
/* realce de um elemento acabado de criar */
.destaque { outline: 2px solid var(--brand); outline-offset: 2px; transition: outline-color 2s; }
@media (max-width: 700px) { .span-2 { grid-column: auto; } }
.cel-compacta { text-align: left; padding: 4px 8px; }
.mr-auto { margin-right: auto; } .self-end { align-self: end; } .sem-max-altura { max-height: none; } .borda-marca { border-color: var(--brand); } .w-22 { width: 22%; }
.mb-6 { margin-bottom: 6px; }
.codigo-dispositivo { font-size: 28px; letter-spacing: 4px; text-align: center; margin: 14px 0; }
.textarea-alta { min-height: 420px; width: 100%; }
.rotulo-inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-soft); }
.entre-wrap { justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.linha-flex { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* ------------------------------------------------------------------ templates */
.tpl-ico { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; font-size: 11px; font-weight: 800; color: #fff; vertical-align: -5px; }
.tpl-docx { background: #2b579a; } .tpl-xlsx { background: #217346; } .tpl-pptx { background: #b7472a; }
.tpl-campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 16px; }
.tpl-campos textarea { min-height: 38px; }
tr.inativo td { opacity: .6; }

/* nome da app (IMGA GD Compliance&Audit) numa linha na barra lateral */
.appname { font-size: 13.5px; letter-spacing: -.015em; white-space: nowrap; }

/* relatórios: ações de cada linha empilhadas (Gerar / Registar entrega / Adotar) */
.acoes-col { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.acoes-col .btn { justify-content: center; white-space: nowrap; }
