/* Prime Docs — identidade própria: minimalista, branco, cinza e azul.
   Tipografia: Inter (interface) e Lora (documentos e títulos). */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Lora:wght@400;500&display=swap');

:root {
  --ink: #22324a;
  --text: #3d4d63;
  --muted: #5f6f86;
  --soft: #8494aa;
  --line: #e1e7ef;
  --line-soft: #edf1f6;
  --canvas: #f7f9fc;
  --stage: #eef2f7;
  --paper: #ffffff;
  --blue: #2f64a8;
  --blue-strong: #244f86;
  --blue-soft: #e9f0f9;
  --blue-line: #cddbee;
  --green: #2f7d5b;
  --green-soft: #e8f4ee;
  --amber: #9a6512;
  --amber-soft: #fbf1df;
  --red: #b0413e;
  --red-soft: #fbeceb;
  --radius: 6px;
  --shadow: 0 2px 14px rgba(42, 70, 110, .07);
  --serif: Lora, Georgia, 'Times New Roman', serif;
  --sans: Inter, 'Segoe UI', Arial, sans-serif;
  --zoom: 1;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--text); font: 13px/1.5 var(--sans); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: var(--text); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--soft); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .2px; }

/* ---------- Controles ---------- */
input, select, textarea {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  min-width: 0;
}
textarea { resize: vertical; width: 100%; }
button {
  cursor: pointer;
  border: 1px solid var(--blue-line);
  background: var(--blue-soft);
  color: var(--blue-strong);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-weight: 500;
}
button:hover { border-color: var(--blue); }
button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
button.danger { background: var(--red-soft); border-color: #eccac8; color: var(--red); }
button.ghost { background: transparent; border-color: var(--line); color: var(--muted); padding: 4px 8px; }
.link-button, .danger-link { background: none; border: 0; padding: 0; color: var(--blue); text-decoration: underline; }
.danger-link { color: var(--red); }

/* ---------- Topo ---------- */
.topbar {
  display: flex; align-items: center; gap: 56px;
  height: 72px; padding: 0 3%;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand strong { font-size: 24px; font-weight: 600; letter-spacing: -1.2px; }
.brand strong span { font-weight: 400; color: #6f93c2; margin-left: 3px; }
.brand-mark {
  width: 24px; height: 30px; padding: 7px 5px;
  display: flex; flex-direction: column; gap: 4px;
  border: 2px solid #7fa3cf; border-radius: 4px;
}
.brand-mark i { height: 1px; background: #7fa3cf; }
.brand-mark i:last-child { width: 65%; }
.main-nav { display: flex; gap: 30px; align-self: stretch; }
.main-nav a {
  display: flex; align-items: center;
  color: var(--muted); border-bottom: 2px solid transparent; font-weight: 500;
}
.main-nav a.active { color: var(--blue); border-color: var(--blue); }
.company { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 11px; letter-spacing: 1px; color: var(--soft); }
.avatar {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue-strong); font-size: 11px; font-weight: 600; letter-spacing: 0;
}

/* ---------- Página ---------- */
.page { max-width: 1880px; margin: auto; padding: 30px 3% 0; }
.page-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.eyebrow { display: block; font-size: 10px; letter-spacing: 1.6px; color: var(--soft); margin-bottom: 8px; }
h1 { font: 400 30px/1.25 var(--serif); color: var(--ink); letter-spacing: -.4px; }
.page-title p { margin-top: 8px; color: var(--muted); }
.demo-tag { flex-shrink: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--muted); font-size: 12px; }

.notice { padding: 12px 14px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid; }
.notice-success { background: var(--green-soft); border-color: #cbe5d7; color: var(--green); }
.notice-error { background: var(--red-soft); border-color: #eccac8; color: var(--red); }

.stats {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px;
  padding: 14px 0; margin-bottom: 18px;
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
}
.stats b { font-size: 18px; font-weight: 500; color: var(--ink); margin-right: 6px; }
.stats i { width: 1px; height: 20px; background: var(--line); }
.stats .stat-alert b { color: var(--red); }
.stats small { margin-left: auto; color: var(--soft); font-size: 11px; }

/* ---------- Busca e upload ---------- */
.toolbar { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.search { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.search-box {
  display: flex; align-items: center; gap: 8px; flex: 1 1 280px;
  padding-left: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
.search-box span { color: var(--soft); font-size: 18px; }
.search-box input { border: 0; flex: 1; width: 0; padding-left: 0; }
.search select { flex: 0 1 auto; max-width: 180px; }
.search .clear { font-size: 12px; color: var(--muted); text-decoration: underline; }

.upload { position: relative; flex-shrink: 0; }
.upload summary {
  list-style: none; cursor: pointer;
  padding: 9px 14px; border-radius: var(--radius);
  background: var(--blue); color: #fff; font-weight: 500;
}
.upload summary::-webkit-details-marker { display: none; }
.upload-form {
  position: absolute; right: 0; top: 46px; z-index: 5; width: 340px;
  display: grid; gap: 12px; padding: 18px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 14px 36px rgba(42, 70, 110, .16);
}
.upload-form p { font-size: 12px; color: var(--muted); }
.dropzone {
  display: grid; gap: 6px; padding: 18px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--blue-line); border-radius: var(--radius); background: #fbfcfe;
}
.dropzone.dragging { border-color: var(--blue); background: var(--blue-soft); }
.dropzone strong { color: var(--ink); font-weight: 500; }
.dropzone span { font-size: 12px; color: var(--muted); }
.dropzone input { width: 100%; font-size: 12px; }
.file-name { font-style: normal; color: var(--blue); font-size: 12px; }

.tag-cloud { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 18px; }
.tag-cloud > span { font-size: 11px; color: var(--soft); letter-spacing: 1px; text-transform: uppercase; margin-right: 4px; }
.tag-cloud a {
  padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  font-size: 12px; color: var(--muted);
}
.tag-cloud a small { color: var(--soft); }
.tag-cloud a.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.tag-cloud a.active small { color: #dce8f7; }
.tag-cloud .tag-clear { border-style: dashed; }

/* ---------- Área de trabalho (biblioteca e assistente) ---------- */
.workspace {
  display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
.panel-heading { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { font-size: 13px; font-weight: 600; color: var(--ink); }
.panel-heading span { font-size: 12px; color: var(--soft); }
.panel-heading .export { margin-left: auto; font-size: 12px; color: var(--blue); }

.doc-list { border-right: 1px solid var(--line); min-width: 0; max-height: 1400px; overflow-y: auto; }
.doc-row { display: flex; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.doc-row:hover { background: #fafcfe; color: inherit; }
.doc-row.selected { background: var(--blue-soft); box-shadow: inset 3px 0 var(--blue); }
.doc-row-body { min-width: 0; }
.doc-row h3 { font-size: 13px; font-weight: 500; color: var(--ink); line-height: 1.45; }
.doc-row p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.doc-row .snippet { font-size: 12px; color: var(--text); background: #fbfcfe; border-left: 2px solid var(--blue-line); padding: 4px 8px; overflow-wrap: anywhere; }
.row-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.file-icon {
  display: grid; place-items: center; flex-shrink: 0;
  width: 32px; height: 40px; border: 1px solid var(--blue-line); border-radius: 4px; background: #f5f8fd;
  font-size: 8px; font-weight: 600; color: var(--blue);
}
.file-PDF { border-color: #efd3cf; color: #b25c4f; background: #fff8f7; }
.file-XLSX { border-color: #cfe5d8; color: var(--green); background: #f5fbf8; }
.file-TXT { border-color: var(--line); color: var(--muted); background: var(--canvas); }

.status, .sla, .badge, .check {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; white-space: nowrap;
}
.status { background: var(--blue-soft); color: var(--blue-strong); }
.status-pendente { background: #f1f3f7; color: var(--muted); }
.status-aprovado { background: var(--green-soft); color: var(--green); }
.status-rejeitado { background: var(--red-soft); color: var(--red); }
.badge { background: #f1f3f7; color: var(--muted); }
.sla-late { background: var(--red-soft); color: var(--red); }
.sla-today, .sla-soon { background: var(--amber-soft); color: var(--amber); }
.sla-ok { background: var(--green-soft); color: var(--green); }
.sla-done { background: #f1f3f7; color: var(--soft); }
.check.ok { background: var(--green-soft); color: var(--green); }
.check.warn { background: var(--amber-soft); color: var(--amber); }
.check.bad { background: var(--red-soft); color: var(--red); }

/* ---------- Prévia em folhas ---------- */
.preview { background: var(--stage); min-width: 0; display: flex; flex-direction: column; }
.preview-empty { justify-content: center; }
.preview-toolbar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 10px 18px; background: #f9fbfd; border-bottom: 1px solid var(--line);
}
.preview-kind { font-size: 11px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.preview-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.preview-actions a { color: var(--blue); }
.toggle { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.preview-stage { padding: 26px; overflow: auto; max-height: 1300px; flex: 1; }

.paper {
  position: relative; max-width: 760px; min-height: 960px; margin: 0 auto 22px;
  padding: 60px 64px 70px;
  background: var(--paper); border: 1px solid #e3e8ef; box-shadow: var(--shadow);
  font: calc(13px * var(--zoom))/1.8 var(--serif); color: #2f3b4c;
}
.paper-origin { font: 10px var(--sans); letter-spacing: 1px; color: var(--soft); text-transform: uppercase; border-bottom: 1px solid var(--line-soft); padding-bottom: 14px; margin-bottom: 24px; }
.paper-heading { font: 500 1.08em/1.5 var(--serif); color: var(--ink); margin: 22px 0 8px; letter-spacing: .2px; }
.paper-heading:first-of-type { font-size: 1.3em; text-align: center; margin-top: 4px; }
.paper-text { white-space: pre-line; margin: 0 0 12px; text-align: justify; overflow-wrap: anywhere; }
.paper-pairs { margin: 8px 0 14px; }
.paper-pairs div { display: flex; gap: 10px; padding: 3px 0; }
.paper-pairs dt { color: var(--muted); min-width: 34%; }
.paper-pairs dd { margin: 0; overflow-wrap: anywhere; }
.paper-table-wrap { overflow-x: auto; margin: 10px 0 16px; }
.paper-table { width: 100%; border-collapse: collapse; font-size: .9em; font-family: var(--sans); }
.paper-table th, .paper-table td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.paper-table th { background: var(--canvas); font-weight: 600; color: var(--ink); }
.paper-footer { position: absolute; left: 0; right: 0; bottom: 24px; text-align: center; font: 11px var(--sans); color: var(--soft); }

/* Destaques de campos extraídos e termos buscados */
mark.hit { background: #fff1a8; color: inherit; border-radius: 2px; padding: 0 1px; }
.fields-on .fx-cnpj { background: #e6effa; box-shadow: inset 0 -1px #8fb0da; }
.fields-on .fx-money { background: #e8f4ee; box-shadow: inset 0 -1px #86bda1; }
.fields-on .fx-date { background: #f6efe1; box-shadow: inset 0 -1px #d2b27b; }
.legend { padding: 8px 18px 12px; font-size: 11px; color: var(--muted); }
.legend span, .legend mark { padding: 0 4px; border-radius: 2px; }
.legend .fx-cnpj { background: #e6effa; }
.legend .fx-money { background: #e8f4ee; }
.legend .fx-date { background: #f6efe1; }

/* Planilhas */
.sheet-tabs { display: flex; gap: 2px; flex-wrap: wrap; margin-bottom: -1px; }
.sheet-tabs button {
  border-radius: 6px 6px 0 0; border: 1px solid var(--line); border-bottom: 0;
  background: #f3f6fa; color: var(--muted); padding: 6px 14px; font-weight: 400;
}
.sheet-tabs button[aria-selected="true"] { background: var(--paper); color: var(--green); font-weight: 600; }
.spreadsheet { background: var(--paper); border: 1px solid var(--line); margin-bottom: 18px; }
.js .spreadsheet[hidden] { display: none; }
.spreadsheet-scroll { overflow: auto; max-height: 620px; }
.grid { border-collapse: collapse; font-size: calc(12px * var(--zoom)); min-width: 100%; font-variant-numeric: tabular-nums; }
.grid th, .grid td { border: 1px solid #e4e8ee; padding: 5px 9px; white-space: nowrap; text-align: left; }
.grid thead th { position: sticky; top: 0; background: #f3f5f8; color: var(--soft); font-weight: 500; text-align: center; z-index: 1; }
.grid tbody th { background: #f3f5f8; color: var(--soft); font-weight: 400; text-align: right; min-width: 38px; }
.grid .header-row td { font-weight: 600; color: var(--ink); background: #f8fafc; }
.sheet-meta { padding: 8px 12px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line-soft); }

/* ---------- Propriedades ---------- */
.properties { padding: 20px 18px; border-left: 1px solid var(--line); min-width: 0; }
.properties > h2 { font: 400 17px/1.4 var(--serif); color: var(--ink); margin-bottom: 14px; overflow-wrap: anywhere; }
.facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 12px; border-bottom: 1px dashed var(--line-soft); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; color: var(--ink); overflow-wrap: anywhere; }
.prop-section { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.prop-section h3 { font-size: 12px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--ink); margin-bottom: 10px; }
.wf-state { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.help { font-size: 12px; color: var(--muted); margin: 6px 0; }
.stack { display: grid; gap: 10px; margin-top: 10px; }
.stack label, .inline-form label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.stack label small { color: var(--soft); }
.stack input, .stack select { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: 6px; }
.inline-form { display: flex; align-items: flex-end; gap: 6px; margin-top: 12px; }
.inline-form label { flex: 1; min-width: 0; }
.inline-form input, .inline-form select { width: 100%; flex: 1; min-width: 0; }
.classifier p { font-size: 12px; }
.meter { height: 5px; border-radius: 3px; background: var(--line-soft); margin: 6px 0; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--blue); }
.suggested { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.suggested em { font-style: normal; padding: 1px 7px; border: 1px dashed var(--blue-line); border-radius: 999px; color: var(--blue); }

.timeline { list-style: none; margin: 12px 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 12px 16px; border-left: 1px solid var(--blue-line); font-size: 12px; }
.timeline li::before { content: ''; position: absolute; left: -4px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.timeline strong { font-weight: 500; color: var(--ink); }
.timeline p { color: var(--text); overflow-wrap: anywhere; }
.timeline small { color: var(--soft); }
.exports { display: grid; gap: 8px; font-size: 12px; }
.exports a { color: var(--blue); }
.assistant-link { padding: 10px 12px; border: 1px solid var(--blue-line); border-radius: var(--radius); background: var(--blue-soft); }

/* ---------- Assistente ---------- */
.assistant { padding: 22px 26px 30px; background: #fbfcfe; min-width: 0; }
.honesty {
  padding: 12px 14px; margin-bottom: 16px; font-size: 12px; color: var(--text);
  background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: var(--radius);
}
.honesty strong { color: var(--ink); }
.alerts { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 18px; }
.alerts summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.alerts summary span { font-weight: 400; color: var(--soft); margin-left: 4px; }
.alerts ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.alerts li { display: grid; gap: 2px; padding: 6px 10px; border-radius: 4px; font-size: 12px; }
.alerts li a { font-weight: 500; color: var(--ink); }
.alert-high { background: var(--red-soft); }
.alert-medium { background: var(--amber-soft); }
.alert-low { background: var(--canvas); }
.assistant-head h2 { font: 400 22px/1.35 var(--serif); color: var(--ink); }
.assistant-head p { color: var(--muted); margin-top: 4px; }
.question-form { display: grid; gap: 8px; margin: 18px 0; }
.question-form > label { font-weight: 500; color: var(--ink); }
.question-row { display: flex; gap: 8px; }
.question-row input { flex: 1; }
.suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 10px; border-radius: 999px; background: var(--paper); border-color: var(--line); color: var(--muted); font-weight: 400; font-size: 12px; }
.answer { padding: 16px 18px; border: 1px solid var(--blue-line); border-radius: 8px; background: var(--blue-soft); margin-bottom: 14px; }
.answer .intent { display: inline-block; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--blue); margin-bottom: 4px; }
.answer strong { display: block; color: var(--ink); font-weight: 600; }
.answer p { margin: 8px 0; color: var(--text); overflow-wrap: anywhere; }
.answer small { color: var(--muted); }
.sources { margin: 8px 0; padding-left: 18px; font-size: 12px; }
.sources li { margin-bottom: 4px; font-family: var(--serif); overflow-wrap: anywhere; }
.sources span { font-family: var(--sans); color: var(--blue); font-size: 11px; margin-right: 4px; }
.qa-history { margin-bottom: 16px; font-size: 12px; }
.qa-history summary { cursor: pointer; color: var(--muted); }
.qa-item { padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.insight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 16px; min-width: 0; }
.card h2, .card h3 { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.quote { font-family: var(--serif); font-size: 13px; padding-left: 10px; border-left: 2px solid var(--blue-line); margin-bottom: 8px; }
.quote small { font-family: var(--sans); color: var(--soft); }
.field-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.field-table th, .field-table td { padding: 6px 0; border-top: 1px solid var(--line-soft); vertical-align: top; text-align: left; }
.field-table th { font-weight: 400; color: var(--muted); padding-right: 10px; width: 45%; overflow-wrap: anywhere; }
.field-table td { color: var(--ink); overflow-wrap: anywhere; }
.field-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.outline { margin: 0; padding-left: 18px; font-family: var(--serif); }

/* ---------- Workflow ---------- */
.reviewers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.reviewer {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
}
.reviewer.active { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.reviewer strong { display: block; font-weight: 500; color: var(--ink); font-size: 12px; }
.reviewer small { color: var(--soft); font-size: 11px; }
.reviewer b { font-size: 20px; font-weight: 500; color: var(--ink); }
.reviewer em { grid-column: 1 / -1; font-style: normal; font-size: 11px; color: var(--red); }
.wf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.board { display: grid; grid-template-columns: repeat(4, minmax(210px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.column { background: var(--stage); border-radius: 8px; padding: 14px; min-width: 0; }
.column h2 { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink); }
.column h2 span { color: var(--soft); font-weight: 400; }
.column-help { font-size: 11px; color: var(--muted); margin: 4px 0 12px; }
.wf-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; }
.wf-card-link { display: flex; gap: 10px; align-items: flex-start; }
.wf-card h3 { font-size: 13px; font-weight: 500; color: var(--ink); line-height: 1.4; }
.wf-card > p { font-size: 12px; color: var(--muted); margin-top: 8px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 12px; }
.card-actions button { padding: 4px 8px; font-size: 12px; }
.card-actions a { color: var(--blue); align-self: center; }
.wf-side { display: grid; gap: 14px; }
.table-scroll { overflow-x: auto; }
.queue { width: 100%; border-collapse: collapse; font-size: 12px; }
.queue th { text-align: left; font-weight: 500; color: var(--soft); padding: 6px 4px; border-bottom: 1px solid var(--line); }
.queue td { padding: 8px 4px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.queue td small { display: block; color: var(--soft); margin-top: 2px; }
.queue td a { color: var(--ink); }

.empty { padding: 26px 20px; color: var(--muted); }
.empty strong { color: var(--ink); font-weight: 500; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 28px 0; font-size: 11px; color: var(--soft); }

/* ---------- Responsivo ---------- */
@media (max-width: 1280px) {
  .workspace { grid-template-columns: 270px minmax(0, 1fr); }
  .properties {
    grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line);
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 30px;
  }
  .properties > .eyebrow, .properties > h2, .properties > .facts { grid-column: 1 / -1; }
  .wf-layout { grid-template-columns: 1fr; }
  .reviewers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toolbar { flex-direction: column; }
  .upload-form { left: 0; right: auto; }
}

@media (max-width: 820px) {
  .topbar { flex-wrap: wrap; height: auto; gap: 14px 24px; padding: 16px; }
  .main-nav { order: 3; width: 100%; gap: 22px; overflow-x: auto; }
  .main-nav a { padding-bottom: 8px; white-space: nowrap; }
  .page { padding: 22px 16px 0; }
  h1 { font-size: 25px; }
  .stats small { margin-left: 0; width: 100%; }
  .stats i { display: none; }
  .search select { flex: 1 1 45%; max-width: none; }
  .workspace { display: block; }
  .doc-list { max-height: 420px; border-right: 0; border-bottom: 1px solid var(--line); }
  .properties { display: block; }
  .preview-stage { padding: 14px; }
  .paper { padding: 32px 22px 56px; min-height: 560px; }
  .assistant { padding: 18px 16px; }
  .question-row { flex-direction: column; }
  .reviewers { grid-template-columns: 1fr 1fr; }
  .board { grid-template-columns: repeat(4, 240px); }
}

@media (max-width: 480px) {
  .page-title { flex-direction: column; }
  .company-name { display: none; }
  .reviewers { grid-template-columns: 1fr; }
  .upload-form { width: calc(100vw - 32px); }
  .paper-pairs div { flex-direction: column; gap: 0; }
}
