/* GDoc SP */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1e1830;
  --ink-soft: #5b5570;
  --paper: #f7f5fb;
  --surface: #ffffff;
  --line: #e3ddee;
  --line-strong: #cfc6e0;
  --brand: #5a2a8c;
  --brand-dark: #45206d;
  --brand-deep: #6f42c2; /* substituída por theme_color de config.php */
  --brand-tint: #efe7f8;
  --amber: #8a5200;
  --amber-tint: #fdf0d4;
  --slate: #465468;
  --slate-tint: #e8ecf2;
  --green: #1c6a45;
  --green-tint: #dff3e8;
  --red: #a3241b;
  --red-tint: #fbe7e4;
  --radius: 10px;
  --font: "Archivo", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.5;
}

h1, h2, h3 { margin: 0; font-stretch: 112%; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 1.875rem; font-weight: 680; }
h2 { font-size: 1.0625rem; font-weight: 650; }
h3 { font-size: 0.875rem; font-weight: 650; }
p { margin: 0 0 0.75rem; }

a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }

code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.85em; background: var(--brand-tint); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }

pre.code { background: var(--brand-deep); color: #f1e9fb; padding: 0.875rem 1rem; border-radius: 8px; overflow-x: auto; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.75rem; line-height: 1.5; margin: 0 0 0.75rem; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.8125rem; }
.lead { font-size: 1.0625rem; max-width: 60ch; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip { position: absolute; left: 8px; top: -60px; z-index: 20; background: var(--surface); padding: 0.5rem 0.75rem; border-radius: 6px; }
.skip:focus { top: 8px; }

/* ------------------------------------------------------------ estrutura */

.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--brand-deep) 232px, transparent 232px); }

.side {
  background: var(--brand-deep);
  color: #fff;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
}
.side a { color: inherit; text-decoration: none; }
.side :focus-visible { outline-color: #fff; }

.brand { display: flex; align-items: center; gap: 0.625rem; font-size: 1.125rem; font-weight: 700; font-stretch: 112%; padding: 0 0.5rem; }
/* Selo Massive Purple SP: o anel branco destaca o contorno roxo sobre o fundo escuro. */
.logo { display: block; flex: none; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #fff; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { padding: 0.5rem 0.75rem; border-radius: 7px; color: rgba(255, 255, 255, 0.9); font-weight: 500; }
.nav a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.nav a[aria-current="page"] { background: #fff; color: var(--brand-deep); font-weight: 650; }

.who { margin-top: auto; padding: 0.875rem 0.5rem 0; border-top: 1px solid rgba(255, 255, 255, 0.16); font-size: 0.8125rem; }
.who-name { font-weight: 650; font-size: 0.9375rem; overflow-wrap: anywhere; }
.who-entity { color: rgba(255, 255, 255, 0.82); margin-bottom: 0.625rem; }
.who-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.who-links a, .linklike { color: rgba(255, 255, 255, 0.9); text-decoration: underline; text-underline-offset: 2px; }
.who-links a:hover, .linklike:hover { color: #fff; }
.who-links a[aria-current="page"] { color: #fff; font-weight: 650; }
.linklike { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.who-links form { margin: 0; }

.main { padding: 2rem 2.25rem 4rem; max-width: 1240px; width: 100%; }
.main:focus { outline: none; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.75rem 1.5rem; margin-bottom: 1.5rem; }
.page-head p { margin: 0.25rem 0 0; }
.crumb { font-size: 0.8125rem; margin: 0 0 0.25rem !important; }

/* ------------------------------------------------------------ botões e campos */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  min-height: 2.5rem; padding: 0.4375rem 0.9375rem;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-small { min-height: 2rem; padding: 0.1875rem 0.625rem; font-size: 0.8125rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 1rem; min-width: 0; }
label, .label { font-weight: 600; font-size: 0.8125rem; }

input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="date"], select {
  width: 100%; min-height: 2.5rem; padding: 0.4375rem 0.6875rem;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); color: var(--ink); font: inherit;
}
input:focus-visible, select:focus-visible { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); border-radius: 8px; }
input::placeholder { color: #8b85a0; }

.hint { color: var(--ink-soft); font-size: 0.8125rem; margin: 0; }
.error { color: var(--red); font-size: 0.8125rem; font-weight: 600; margin: 0; }
.has-error input, .has-error select { border-color: var(--red); }
.static { margin: 0; padding: 0.5rem 0; }
.input-row { display: flex; gap: 0.5rem; }
.input-row input { flex: 1; min-width: 0; }

.check { display: flex; align-items: flex-start; gap: 0.5rem; font-weight: 500; font-size: 0.9375rem; cursor: pointer; }
.check input { width: 1.0625rem; height: 1.0625rem; margin: 0.1875rem 0 0; accent-color: var(--brand); flex: none; }
.checks { gap: 0.5rem; }

fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1rem 0; margin: 0 0 1rem; }
legend { font-weight: 650; padding: 0 0.375rem; font-size: 0.875rem; }

.form { max-width: 34rem; }
.form-wide { max-width: 52rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.form-full { grid-column: 1 / -1; }
.form-actions, .action-row { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-top: 0.5rem; }
.action-row { margin: 0.75rem 0; }

/* ------------------------------------------------------------ mensagens */

.flash { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1.25rem; border: 1px solid transparent; font-weight: 500; }
.flash-success { background: var(--green-tint); border-color: #b5e0c8; color: #124a30; }
.flash-error { background: var(--red-tint); border-color: #f1c1bb; color: #7d1a13; }
.flash-info { background: var(--brand-tint); border-color: #d9c8ee; color: var(--brand-deep); }

/* ------------------------------------------------------------ painéis */

.panel, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.panel { margin-bottom: 1.25rem; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.875rem; }
.panel-head a { font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.panel .flash { margin: 0.75rem 0; }
.panel h3 { margin: 1.25rem 0 0.5rem; }

.cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.cols-narrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 60rem; }
.stack { display: grid; gap: 0; }

.plain { margin: 0 0 0.75rem; padding-left: 1.125rem; }
.plain li { margin-bottom: 0.25rem; }

.details { margin: 0 0 0.75rem; }
.details div { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.details dt { color: var(--ink-soft); }
.details dd { margin: 0; overflow-wrap: anywhere; }

.empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 1.75rem 1.25rem; color: var(--ink-soft); }
.empty strong { color: var(--ink); }
.empty p:last-child { margin-bottom: 0; }
p.empty { margin: 0; }

/* ------------------------------------------------------------ NIF e etiquetas */

/* O NIF é a chave de tudo: aparece sempre com a mesma forma, como a aba de uma pasta. */
.nif { font-stretch: 86%; font-weight: 560; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; white-space: nowrap; }
td.nif, .col-condo .nif, .doc-meta .nif, .condo-list .nif, .facet-condo .nif, .nif-lg {
  display: inline-block; background: var(--brand-tint); color: var(--brand-deep);
  padding: 0.0625rem 0.4375rem; border-radius: 5px 5px 5px 0; font-size: 0.8125rem;
}
td.nif { display: table-cell; background: none; padding: 0; border-radius: 0; color: inherit; font-size: inherit; }
.nif-lg { font-size: 1.125rem; padding: 0.25rem 0.625rem; }

.tag { display: inline-block; padding: 0.0625rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; background: var(--slate-tint); color: var(--slate); }
.tag-assembleia { background: var(--brand-tint); color: var(--brand-dark); }
.tag-aviso { background: var(--amber-tint); color: var(--amber); }
.tag-outro { background: var(--slate-tint); color: var(--slate); }
.tag-on { background: var(--green-tint); color: var(--green); }
.tag-off { background: var(--red-tint); color: var(--red); }

.dot { display: inline-block; width: 0.5625rem; height: 0.5625rem; border-radius: 50%; margin-right: 0.4375rem; background: var(--slate); }
.dot.tag-assembleia { background: var(--brand); }
.dot.tag-aviso { background: #d08a00; }
.dot.tag-outro { background: #7b8798; }

/* ------------------------------------------------------------ painel */

.hero-search { background: var(--brand-deep); color: #fff; border-radius: var(--radius); padding: 1.375rem 1.5rem 1.5rem; margin-bottom: 1.25rem; }
.hero-search label { display: block; font-size: 1.25rem; font-weight: 650; font-stretch: 112%; margin-bottom: 0.75rem; }
.hero-search-row { display: flex; gap: 0.625rem; }
.hero-search input { flex: 1; min-width: 0; min-height: 3rem; font-size: 1.0625rem; border-color: transparent; }
.hero-search input:focus-visible { outline: 3px solid #fff; outline-offset: 1px; }
.hero-search .btn { min-height: 3rem; background: #fff; border-color: #fff; color: var(--brand-deep); padding-inline: 1.25rem; }
.hero-search .btn:hover { background: var(--brand-tint); border-color: var(--brand-tint); color: var(--brand-deep); }
.hero-search .btn:focus-visible { outline-color: #fff; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0; margin: 0 0 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stats > div { padding: 0.875rem 1.125rem; border-right: 1px solid var(--line); margin-right: -1px; border-bottom: 1px solid var(--line); margin-bottom: -1px; }
.stats dt { color: var(--ink-soft); font-size: 0.8125rem; }
.stats dd { margin: 0.125rem 0 0; font-size: 1.5rem; font-weight: 680; font-stretch: 92%; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stats dd a { color: inherit; text-decoration: none; }
.stats dd a:hover { color: var(--brand); text-decoration: underline; }

.doc-list, .condo-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { padding: 0.6875rem 0; border-top: 1px solid var(--line); }
.doc-list li:first-child, .condo-list li:first-child { border-top: 0; padding-top: 0; }
.doc-link { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.625rem; text-decoration: none; }
.doc-link:hover .doc-title { text-decoration: underline; }
.doc-title { font-weight: 600; overflow-wrap: anywhere; }
.doc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; margin-top: 0.1875rem; font-size: 0.8125rem; color: var(--ink-soft); }
.doc-meta a { color: var(--ink-soft); }
.doc-meta a:hover { color: var(--brand); }

.condo-list li { padding: 0.625rem 0; border-top: 1px solid var(--line); display: grid; gap: 0.125rem; }
.condo-list a { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.625rem; text-decoration: none; font-weight: 600; }
.condo-list a:hover .condo-name { text-decoration: underline; }

.chart { display: block; width: 100%; height: auto; max-height: 190px; }
.chart .bar { fill: var(--brand); }
.chart .bar-zero { fill: var(--line-strong); }
.chart text { font-family: var(--font); fill: var(--ink-soft); font-size: 10px; }
.chart .bar-value { fill: var(--ink); font-weight: 600; font-stretch: 86%; }
.chart .bar-year { font-weight: 600; }

/* ------------------------------------------------------------ filtros e resultados */

.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.125rem; margin-bottom: 1rem; }
.filters .field { margin: 0; flex: 0 1 11rem; }
.filters .field-grow { flex: 1 1 18rem; }
.js .filters-submit { display: none; }

.live { transition: opacity 0.12s; }
.live.is-loading { opacity: 0.55; }

.condo-card { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 1rem 1.125rem; margin-bottom: 1rem; }
.condo-card h2 { font-size: 1.25rem; }
.condo-card p { margin: 0.125rem 0 0; }

.result-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 0.875rem; }
.result-count { margin: 0; font-weight: 650; }
.chips { display: flex; flex-wrap: wrap; gap: 0.375rem; list-style: none; margin: 0; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.1875rem 0.625rem; border-radius: 999px; background: var(--brand-tint); color: var(--brand-deep); font-size: 0.8125rem; font-weight: 600; text-decoration: none; max-width: 22rem; }
.chip:hover { background: #e2d3f3; color: var(--brand-deep); }
.chip-clear { background: none; text-decoration: underline; }

.search-layout { display: grid; grid-template-columns: 16.5rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }

.facets { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.25rem 1rem; }
.facet { padding: 0.875rem 0; border-top: 1px solid var(--line); }
.facet:first-child { border-top: 0; }
.facet h3 { margin: 0 0 0.5rem; display: inline-block; }
.facet summary { cursor: pointer; margin-bottom: 0.25rem; }
.facet summary h3 { margin: 0; }
.facet ul { list-style: none; margin: 0; padding: 0; }
.facet-inline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 0.5rem; }
.facet-link { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; padding: 0.3125rem 0.5rem; margin: 0 -0.5rem; border-radius: 6px; color: var(--ink); text-decoration: none; }
.facet-inline .facet-link { margin: 0; }
.facet-link:hover { background: var(--paper); color: var(--ink); }
.facet-link.is-on { background: var(--brand); color: #fff; font-weight: 600; }
.facet-link.is-on .count { color: #e5d6f6; }
.facet-link.is-on .dot { background: #fff; }
.facet-link.is-on .nif { background: rgba(255, 255, 255, 0.2); color: #fff; }
.facet-link.is-empty { color: #9690a8; }
.facet-link .count { color: var(--ink-soft); font-size: 0.8125rem; font-variant-numeric: tabular-nums; font-stretch: 86%; flex: none; }
.facet-condo > span:first-child { display: grid; gap: 0.125rem; justify-items: start; min-width: 0; }
.facet-condo-name { font-size: 0.8125rem; line-height: 1.3; overflow-wrap: anywhere; }
.facet p { margin: 0.5rem 0 0; }

/* ------------------------------------------------------------ tabelas */

.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.panel .table-wrap { border: 0; border-radius: 0; margin: 0 -0.25rem; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 0.8125rem; font-weight: 600; color: var(--ink-soft); padding: 0.625rem 0.875rem; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table td { padding: 0.6875rem 0.875rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfaff; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.col-date { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.col-doc .doc-title { margin-right: 0.5rem; }
.col-condo a { display: block; color: var(--ink); text-decoration: none; margin-bottom: 0.125rem; }
.col-condo a:hover { color: var(--brand); text-decoration: underline; }
.col-actions { text-align: right; white-space: nowrap; }
.col-actions .btn + .btn { margin-left: 0.25rem; }

.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; margin-top: 1rem; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 2.25rem; min-height: 2.25rem; padding: 0 0.625rem; border-radius: 7px; text-decoration: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.pagination a { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .current { background: var(--brand); color: #fff; }
.pagination .gap { color: var(--ink-soft); min-width: 1.25rem; padding: 0; }

/* ------------------------------------------------------------ páginas sem sessão */

body.public { background: var(--brand-deep); }
.gate { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; gap: 1.25rem; }
.gate-brand { display: flex; align-items: center; gap: 0.625rem; color: #fff; font-size: 1.5rem; font-weight: 700; font-stretch: 112%; }
.gate .flash { width: 100%; max-width: 25rem; margin: 0; }
.gate-card { width: 100%; max-width: 25rem; padding: 1.75rem; }
.gate-wide { max-width: 36rem; }
.gate-card h1 { font-size: 1.5rem; margin-bottom: 0.375rem; }
.gate-card .btn-block { margin: 0.25rem 0 1rem; }
.gate-card > p:last-child { margin-bottom: 0; }

[hidden] { display: none !important; }

/* Entrada: formulário à direita e apresentação do serviço à esquerda; em ecrãs pequenos o formulário vem primeiro. */
.gate-split { justify-content: flex-start; padding-top: clamp(1.5rem, 6vh, 4rem); }
.gate-split .gate-brand { width: 100%; max-width: 68rem; }
.login {
  width: 100%; max-width: 68rem;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(20rem, 25rem);
  grid-template-areas: "intro form"; gap: 2.5rem 4rem; align-items: start;
}
.login-card { grid-area: form; max-width: none; }
.login-card .show-password { margin-top: 0.375rem; font-size: 0.875rem; }
.login-intro { grid-area: intro; color: rgba(255, 255, 255, 0.9); }
.login-title { color: #fff; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); font-weight: 680; max-width: 24ch; margin-bottom: 1rem; text-wrap: balance; }
.login-lead { color: #fff; font-size: 1.0625rem; }
.login-intro > p { max-width: 62ch; }
.login-features { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.login-features li { display: flex; gap: 0.75rem; padding: 1rem; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: var(--radius); background: rgba(255, 255, 255, 0.08); }
.login-features svg { color: #fff; flex: none; margin-top: 0.0625rem; }
.login-features h3 { color: #fff; font-size: 0.9375rem; margin-bottom: 0.25rem; }
.login-features p { margin: 0; font-size: 0.8125rem; line-height: 1.45; }

@media (max-width: 860px) {
  .login { grid-template-columns: minmax(0, 1fr); grid-template-areas: "form" "intro"; max-width: 32rem; }
  .gate-split .gate-brand { max-width: 32rem; }
  .login-features { grid-template-columns: minmax(0, 1fr); }
}

.standalone { max-width: 38rem; margin: 12vh auto; padding: 0 1.25rem; }
.standalone h1 { margin-bottom: 0.75rem; }

/* ------------------------------------------------------------ ecrãs médios e pequenos */

@media (max-width: 1040px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .search-layout { grid-template-columns: minmax(0, 1fr); }
  .facets { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 1.5rem; }
  .facet { border-top: 0; }
}

@media (max-width: 860px) {
  .shell { display: block; background: none; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.75rem 1rem 0; }
  .brand { padding: 0; }
  .who { order: 2; margin: 0 0 0 auto; padding: 0; border: 0; text-align: right; }
  .who-name, .who-entity { display: none; }
  .nav { order: 3; flex: 1 0 100%; flex-direction: row; gap: 0.25rem; overflow-x: auto; margin: 0 -1rem; padding: 0 1rem; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; border-radius: 7px 7px 0 0; padding: 0.5rem 0.75rem; }
  .nav a[aria-current="page"] { background: var(--paper); }
  .main { padding: 1.25rem 1rem 3rem; }
  h1 { font-size: 1.5rem; }
}

@media (max-width: 720px) {
  .form-grid, .cols-narrow { grid-template-columns: minmax(0, 1fr); }
  .hero-search { padding: 1.125rem; }
  .hero-search label { font-size: 1.0625rem; }
  .hero-search-row { flex-direction: column; }
  .filters .field { flex: 1 1 8.5rem; }
  .filters .field-grow { flex-basis: 100%; }
  .details div { grid-template-columns: minmax(0, 1fr); gap: 0; }

  /* As tabelas passam a cartões: cada linha é um bloco, cada célula traz o seu rótulo. */
  .table-wrap { background: none; border: 0; border-radius: 0; overflow: visible; }
  .panel .table-wrap { margin: 0; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 0.875rem; margin-bottom: 0.625rem; }
  .panel .table tr { padding: 0.75rem 0; border-width: 0 0 1px; border-radius: 0; margin: 0; }
  .table td { padding: 0.125rem 0; border: 0; text-align: left; }
  .table td[data-label]::before { content: attr(data-label) ": "; color: var(--ink-soft); font-size: 0.8125rem; font-weight: 400; font-stretch: 100%; }
  .table-docs td[data-label]::before { content: none; }
  .table .num { text-align: left; }
  .col-condo a { display: inline; margin-right: 0.375rem; }
  .col-actions { text-align: left; padding-top: 0.5rem !important; }
  .col-actions .btn { min-height: 2.5rem; padding-inline: 0.875rem; font-size: 0.875rem; }
}

@media (prefers-reduced-motion: reduce) {
  .live { transition: none; }
}

@media print {
  .side, .filters, .facets, .col-actions, .pagination, .hero-search { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
}
