/* The new view (docs/simple-mode-plano-261028.md §4.5; docs/ui-paridade-v3-261103.md): the frame every person who is not a
   superuser sees — the prototype v3's white top bar across the whole width, the navy side menu and the page. Since 03/11 the layer
   follows the FDR prototype v3 (invoice-skill-build Interface/Share/Actual/sibyla-gott-2026-share/v3/v3.css @ 86fcaa5) through the
   --pf-* tokens below, pinned by tests/Sibyla.Tests.Browser/PrototypeTokenTests.cs against prototype-v3-expected.json and measured
   by UiParityTests. Three FDR rulings sit on top of the prototype and are recorded in the doc (§7.2): the T76's point 5 of 02/11
   (tickets#18: text >= 15 px, controls >= 48 px — the prototype's 44 px controls, 40 px text links, 12.5 px group titles and 14 px
   tags), the owner's ruling of 2026-10-07 (no 1180 px cap on the page), and the T01-F corrections of 03/11 (licence box, bar at
   intermediate widths). Applies only inside .sib-pf; the previous view (Advanced, superuser) keeps tokens.css and --sib-*. Literal px
   live only in the token block and in the 860 px media queries (custom properties cannot drive a breakpoint). */
.sib-pf {
  /* colours (v3 :root) */
  --pf-navy: #0f0c2d; --pf-primary: #013b7c; --pf-primary-soft: #e8eff8; --pf-pink: #ec008c; --pf-pink-ink: #d4007e; --pf-focus: #d4007e;
  --pf-muted-on-dark: #b9b5d6;
  --pf-ink: #1d2433; --pf-muted: #667085; --pf-line: #e3e7ee; --pf-soft: #f6f7f9; --pf-surface: #ffffff;
  --pf-ok: #087f5b; --pf-ok-soft: #e6f4ef; --pf-warn: #9a6100; --pf-warn-soft: #fff4dc; --pf-bad: #b42318; --pf-bad-soft: #fdecea;
  --pf-radius: 12px; --pf-radius-s: 8px;
  /* type: Poppins for titles, buttons, numbers and pills; Roboto for text (self-hosted, css/fonts.css) */
  --pf-font-display: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pf-font-body: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pf-display: var(--pf-font-display); --pf-body: var(--pf-font-body);
  --pf-fs-base: 16px; --pf-lh-base: 1.45; --pf-fs-small: 15px;
  --pf-fs-h1: 28px; --pf-fs-h1-phone: 24px; --pf-fs-h2: 20px; --pf-fs-h3: 18px; --pf-fs-eyebrow: 13px;
  --pf-fs-nav: 16px; --pf-fs-brand: 20px; --pf-fs-th: 15px; --pf-fs-td: 16px; --pf-fs-btn: 16px;
  /* the frame */
  --pf-nav-w: 248px; --pf-nav-pad: 18px 12px; --pf-nav-item-pad: 11px 12px; --pf-grp-pad: 16px 12px 6px;
  --pf-top-pad: 10px 20px; --pf-top-gap: 14px; --pf-top-h: 69px;
  --pf-main-pad: 28px 32px 96px; --pf-main-pad-phone: 18px 16px 96px; --pf-main-max: 1180px;
  /* components */
  --pf-card-pad: 20px 22px; --pf-stack-gap: 16px;
  --pf-control-h: 48px; --pf-btn-pad: 10px 20px; --pf-btn-border: 1.5px;
  --pf-cell-pad: 12px 14px; --pf-cell-pad-phone: 10px 8px; --pf-tag-pad: 4px 12px;
  --pf-select-pad: 10px 14px; --pf-search-pad: 14px 16px;
  --pf-task-pad: 16px 20px; --pf-task-cols: 28px 1fr auto; --pf-fs-task: 18px;
  /* E03: the row, the progress bar, the text link, «Está tudo tratado» */
  --pf-row-gap: 12px; --pf-bar-h: 10px; --pf-bar-margin: 8px 0 14px; --pf-bar-track: #e8ebf0;
  --pf-link-pad: 4px 0; --pf-done-pad: 48px 20px; --pf-fs-big: 32px;
  /* E06 / E07: the answers and the exits, the preview, the side, the comparison, the facts; the request row's padding is the
     prototype's inline «padding:14px 0» on the .task (not a v3.css rule) */
  --pf-answer-h: 56px; --pf-fs-answer: 17px; --pf-fs-rec: 12.5px; --pf-answers-gap: 14px; --pf-answers-mt: 18px; --pf-after-mt: 10px;
  --pf-preview-h: 220px; --pf-preview-h-side: 170px; --pf-preview-pad: 18px; --pf-preview-bg: #eef0f4; --pf-side-pad: 14px; --pf-compare-pad: 10px 2px;
  --pf-facts-pad: 9px 0; --pf-facts-gap: 14px; --pf-request-pad: 14px 0;
  /* E04 Documentos (04/11): the .head, the .search, the .filters, the row hover, the .tfoot, the phone cards (table.cards); the note's
     14 px is the prototype's inline «margin-top:14px» on the closing paragraph of R.documentos (not a v3.css rule) */
  --pf-head-gap: 12px; --pf-head-mb: 12px; --pf-search-mb: 12px; --pf-search-bg: #eef0f4; --pf-filters-gap: 10px; --pf-filters-mb: 16px;
  --pf-select-line: #c9ced8; --pf-row-hover: #fafbfd; --pf-tfoot-pad: 14px 18px; --pf-note-mt: 14px;
  --pf-cards-row-pad: 8px 4px; --pf-cards-cell-pad: 4px 12px; --pf-cards-gap: 10px; --pf-select-basis: 140px;
  /* The pages inside the frame take the prototype's colours and radii through the --sib-* tokens they already read. */
  --sib-font-family: var(--pf-font-body);
  --sib-brand: var(--pf-primary); --sib-brand-dark: var(--pf-primary); --sib-brand-ink: var(--pf-primary);
  --sib-brand-tint-bg: var(--pf-primary-soft); --sib-accent: var(--pf-primary-soft);
  --sib-brand-a10: rgba(1, 59, 124, .10); --sib-brand-a16: rgba(1, 59, 124, .16); --sib-brand-a22: rgba(1, 59, 124, .22);
  --sib-brand-a28: rgba(1, 59, 124, .28); --sib-brand-a52: rgba(1, 59, 124, .52);
  --sib-ink: var(--pf-ink); --sib-muted: var(--pf-muted); --sib-line: var(--pf-line); --sib-bg: var(--pf-soft);
  --sib-radius: var(--pf-radius); --sib-radius-sm: var(--pf-radius-s);

  display: grid; grid-template-columns: var(--pf-nav-w) minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; background: var(--pf-soft);
  font-family: var(--pf-font-body); font-size: var(--pf-fs-base); line-height: var(--pf-lh-base); color: var(--pf-ink);
}

/* ---------- type ---------- */
.sib-pf h1, .sib-pf h2, .sib-pf h3, .sib-pf strong, .sib-pf button, .sib-pf .btn, .sib-pf .sib-num, .sib-pf .sib-chip, .sib-pf .sib-eyebrow { font-family: var(--pf-font-display); }
.sib-pf select, .sib-pf input, .sib-pf textarea { font-family: inherit; }
.sib-pf h1 { font-size: var(--pf-fs-h1); line-height: 1.2; font-weight: 700; margin: 0 0 6px; color: var(--pf-ink); }
.sib-pf h2 { font-size: var(--pf-fs-h2); line-height: 1.2; font-weight: 600; margin: 0 0 12px; color: var(--pf-ink); }
.sib-pf h3 { font-size: var(--pf-fs-h3); line-height: 1.2; font-weight: 600; margin: 0 0 12px; color: var(--pf-ink); }
.sib-pf .sib-eyebrow { font-size: var(--pf-fs-eyebrow); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--pf-primary); margin: 0 0 6px; }
.sib-pf small, .sib-pf label, .sib-pf .sib-muted { font-size: var(--pf-fs-small); }
.sib-pf .sib-muted { color: var(--pf-muted); }
.sib-pf .sib-content a { color: var(--pf-primary); }
/* Not the heading Blazor focuses after a navigation (tabindex=-1): the ring is for the keyboard. */
.sib-pf :focus-visible:not([tabindex="-1"]) { outline: 2px solid var(--pf-focus); outline-offset: 2px; }
.sib-pf h1:focus, .sib-pf h1:focus-visible { outline: none; }
.sib-pf .sib-num, .sib-pf td.sib-num, .sib-pf th.sib-num { font-variant-numeric: tabular-nums; }
.sib-pf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- controls: the prototype's .btn (outlined blue, 48 px) and .btn.solid (= .primary). The previous view's small row actions
   (.sib-row-action: the superuser's capture dialog inside the frame) keep their own size. ---------- */
.sib-pf button:not(.sib-row-action), .sib-pf .btn {
  font-size: var(--pf-fs-btn); font-weight: 600; line-height: 1.2;
  min-height: var(--pf-control-h); height: auto; padding: var(--pf-btn-pad);
  border-radius: var(--pf-radius-s); border: var(--pf-btn-border) solid var(--pf-primary);
  background: var(--pf-primary-soft); color: var(--pf-primary); white-space: nowrap;
}
.sib-pf button:hover, .sib-pf .btn:hover { border-color: var(--pf-primary); background: #dde7f4; }
.sib-pf button.primary, .sib-pf .btn.primary { background: var(--pf-primary); border-color: var(--pf-primary); color: #fff; }
.sib-pf button.primary:hover, .sib-pf .btn.primary:hover { background: var(--pf-primary); border-color: var(--pf-primary); }
.sib-pf button.ghost, .sib-pf .btn.ghost { background: var(--pf-surface); }
.sib-pf button.quiet, .sib-pf .btn.quiet, .sib-pf button:disabled, .sib-pf .btn[aria-disabled="true"] { border-color: var(--pf-line); background: #eef0f4; color: #8a93a3; opacity: 1; }
.sib-pf .btn.wide, .sib-pf button.wide { width: 100%; }
/* the prototype's .link: a text button (its 40 px become the T76's 48) */
.sib-pf button.link, .sib-pf .btn.link { border: 0; background: none; color: var(--pf-primary); padding: var(--pf-link-pad); min-height: var(--pf-control-h); text-align: left; text-decoration: none; justify-content: flex-start; }
.sib-pf button.link:hover, .sib-pf .btn.link:hover { background: none; text-decoration: underline; }
/* The ID column's «⋯» trigger (SibIdAction: Entidades, Artigos, Integração inside the frame) is the identifier itself, not a button of the
   prototype: it keeps the previous view's compact look (tokens.css .sib-id-action) instead of the 48 px outlined button. */
.sib-pf button.sib-id-action, .sib-pf button.sib-id-action:hover { min-height: 0; height: auto; padding: 0; border: 0; background: none; color: inherit; font-family: var(--pf-font-body); font-size: var(--pf-fs-td); font-weight: 400; gap: .5em; }
.sib-pf :is(input:not([type="checkbox"], [type="radio"], [type="file"]), select, textarea) {
  font-family: var(--pf-font-body); font-size: var(--pf-fs-base); min-height: var(--pf-control-h); height: auto; padding: 10px;
  border: 1px solid var(--pf-line); border-radius: var(--pf-radius-s); background: var(--pf-surface); color: var(--pf-ink);
}
.sib-pf textarea { min-height: 96px; }
.sib-pf .sib-filterbar label, .sib-pf .sib-form label { gap: 4px; font-size: var(--pf-fs-small); font-weight: 400; color: var(--pf-ink); }
/* filter selects are pills; the search box sits on grey */
.sib-pf .sib-filterbar select, .sib-pf .sib-view-select select {
  font-family: var(--pf-font-display); font-weight: 500; min-height: var(--pf-control-h); padding: var(--pf-select-pad);
  border-radius: 999px; border-color: var(--pf-select-line); max-width: none;
}
.sib-pf .sib-filterbar input[type="search"] { min-height: var(--pf-control-h); padding: var(--pf-search-pad); background: var(--pf-search-bg); }
.sib-pf .sib-form-grid { gap: 10px; }
/* «Perguntar» (ArgusChat LauncherLabel): the prototype's .ss-ask pill; the «i» source and the account menu are <details>, untouched */
.sib-pf .sib-chat-launcher { min-height: 0; border: 0; background: var(--sib-brand); color: #fff; font-size: 15px; font-weight: 700; }
.sib-pf .sib-chat-launcher:hover { background: var(--sib-brand-dark); border: 0; }
.sib-pf .sib-chat-launcher.is-pill { width: auto; height: auto; min-height: var(--pf-control-h); padding: 12px 20px; border-radius: 999px; box-shadow: 0 6px 18px rgba(15, 12, 45, .25); }

/* ---------- the top bar (.top): across the whole width, the brand at its left (the prototype's place) ---------- */
.sib-pf-top {
  grid-column: 1 / -1; position: sticky; top: 0; z-index: var(--sib-z-topbar); box-sizing: border-box; min-height: var(--pf-top-h);
  display: flex; align-items: center; gap: var(--pf-top-gap); padding: var(--pf-top-pad);
  background: var(--pf-surface); border-bottom: 1px solid var(--pf-line);
}
.sib-pf-brand { display: flex; align-items: center; gap: 10px; color: var(--pf-navy); font-family: var(--pf-font-display); font-size: var(--pf-fs-brand); font-weight: 700; line-height: 1; text-decoration: none; }
.sib-pf-brand:hover { text-decoration: none; }
.sib-pf-brand img { width: 28px; height: 28px; flex: none; }
.sib-pf-grow { flex: 1; }
.sib-pf-top .sib-burger {
  width: var(--pf-control-h); height: var(--pf-control-h); flex: none; padding: 0; border: 1px solid var(--pf-line); border-radius: var(--pf-radius-s);
  background: var(--pf-surface); color: var(--pf-ink); font-size: 20px;
}
/* «Enviar documentos» (.btn.solid.topsend). */
.sib-pf-send-top {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; flex: none; min-height: var(--pf-control-h); padding: 8px 20px;
  border: var(--pf-btn-border) solid var(--pf-primary); border-radius: var(--pf-radius-s); background: var(--pf-primary); color: #fff;
  font-family: var(--pf-font-display); font-size: var(--pf-fs-btn); font-weight: 600; white-space: nowrap; text-decoration: none;
}
.sib-pf-send-top:hover { background: #0a4f9c; color: #fff; text-decoration: none; }
.sib-pf-send-sm { display: none; }
/* The company selector (.company): Poppins 600 15, padding 8 10, radius 8. */
.sib-pf-company { display: flex; align-items: center; min-width: 0; margin: 0; }
.sib-pf-company label { display: block; min-width: 0; }
.sib-pf .sib-pf-company select {
  display: block; box-sizing: border-box; min-height: var(--pf-control-h); max-width: 220px; padding: 8px 10px;
  border: 1px solid var(--pf-line); border-radius: var(--pf-radius-s); background: var(--pf-surface); color: var(--pf-ink);
  font-family: var(--pf-font-display); font-size: var(--pf-fs-small); font-weight: 600;
}
/* The selectors outside the prototype: licence, «Ver como» and language. */
.sib-pf-controls { flex: 0 1 auto; display: flex; align-items: center; justify-content: flex-end; gap: 8px 12px; flex-wrap: wrap; }
.sib-pf-top .sib-topbar-group { gap: 6px; }
.sib-pf-top .sib-topbar-label { color: var(--pf-muted); font-size: var(--pf-fs-small); font-weight: 400; letter-spacing: 0; text-transform: none; }
.sib-pf-top .sib-topbar-group select {
  box-sizing: border-box; height: auto; min-height: var(--pf-control-h); max-width: 190px; padding: 8px 10px;
  border: 1px solid var(--pf-line); border-radius: var(--pf-radius-s); color: var(--pf-ink); font-family: var(--pf-font-display); font-size: var(--pf-fs-small); font-weight: 600;
}
.sib-pf-top input[type="checkbox"] { accent-color: var(--pf-primary); }
/* The licence (T01-F 03/11, tickets#18): the name is never cut. The text is a span under a transparent select. In the bar the box is
   as wide as the whole name and is the first to narrow; the abbreviation takes no room on the whole name's line, so when the name no
   longer fits it wraps to a second line, clipped above the box (wrap-reverse), and the abbreviation fills the line that stays. A box
   with only one of the texts (LicenceAbbreviation) never narrows; 124 px holds the longest abbreviation with the arrow. */
.sib-pf-top > .sib-pf-licence { flex: none; }
.sib-pf-top > .sib-pf-licence:has(.sib-pf-licence-abbr + .sib-pf-licence-whole) { flex: 0 1000 auto; min-width: 184px; }
.sib-pf-licence-field { display: flex; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 0; margin: 0; }
.sib-pf-licence-field .sib-topbar-label { flex: none; }
.sib-pf-licence-box {
  position: relative; display: flex; flex-wrap: wrap-reverse; flex: none; box-sizing: border-box; height: var(--pf-control-h); overflow: hidden;
  padding: 0 28px 0 10px; border-radius: var(--pf-radius-s); background: var(--pf-surface); box-shadow: inset 0 0 0 1px var(--pf-line); color: var(--pf-ink);
  font-family: var(--pf-font-display); font-size: var(--pf-fs-small); font-weight: 600; line-height: var(--pf-control-h);
}
.sib-pf-licence-box:has(.sib-pf-licence-abbr) { min-width: 124px; }
.sib-pf-licence-box:has(.sib-pf-licence-abbr + .sib-pf-licence-whole) { flex: 0 1 auto; }
.sib-pf-licence-box:has(select:focus-visible) { outline: 2px solid var(--pf-focus); outline-offset: 2px; }
.sib-pf-licence-box::after {
  content: ""; position: absolute; top: 50%; right: 12px; width: 7px; height: 7px; pointer-events: none;
  border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg);
}
.sib-pf-licence-whole { flex: none; white-space: nowrap; }
.sib-pf-licence-abbr { flex: 1 0 0; width: 0; min-width: 0; overflow: hidden; white-space: nowrap; }
.sib-pf-top .sib-pf-licence-box select {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; margin: 0; opacity: 0; cursor: pointer;
}
.sib-pf-filters { display: none; position: relative; }
.sib-pf-filters > summary {
  display: flex; align-items: center; box-sizing: border-box; min-height: var(--pf-control-h); padding: 8px 12px; list-style: none; cursor: pointer;
  border: 1px solid var(--pf-line); border-radius: var(--pf-radius-s); background: var(--pf-surface); color: var(--pf-ink); font-family: var(--pf-font-display); font-size: var(--pf-fs-small); font-weight: 600;
}
.sib-pf-filters > summary::-webkit-details-marker { display: none; }
.sib-pf-filters-panel {
  position: fixed; top: calc(var(--pf-top-h) + 4px); left: 12px; right: 12px; z-index: var(--sib-z-modal);
  display: grid; gap: 12px; padding: 14px; background: var(--pf-surface); border: 1px solid var(--pf-line); border-radius: var(--pf-radius);
  box-shadow: var(--sib-shadow-modal);
}
.sib-pf-filters-panel .sib-topbar-group { display: grid; gap: 4px; }
.sib-pf-filters-panel .sib-topbar-group select { width: 100%; max-width: none; }
/* Inside «Filtros» there is room for lines, not for width: the whole name wraps. */
.sib-pf-filters-panel .sib-pf-licence-field { display: grid; gap: 4px; }
.sib-pf-filters-panel .sib-pf-licence-box { display: block; height: auto; min-height: var(--pf-control-h); padding: 12px 28px 12px 10px; line-height: 24px; }
.sib-pf-filters-panel .sib-pf-licence-whole { display: block; white-space: normal; overflow-wrap: anywhere; }
/* The avatar (.avatar): the initials in a navy circle; the account menu is behind it. */
.sib-pf-top .sib-account-menu { flex: none; }
.sib-pf-top .sib-account-menu summary { min-height: var(--pf-control-h); padding: 4px; }
.sib-pf-top .sib-account-menu summary > span[aria-hidden="true"]:not(.sib-account-avatar) { display: none; }
.sib-pf-top .sib-account-avatar { width: 40px; height: 40px; background: var(--pf-navy); color: #fff; font-family: var(--pf-font-display); font-size: var(--pf-fs-small); font-weight: 600; letter-spacing: 0; }
.sib-pf-top .sib-account-panel { font-size: var(--pf-fs-small); }

/* ---------- the side menu (.nav): always visible on a desktop; the T76's 48 px items and 15 px group titles ---------- */
.sib-pf-nav {
  position: sticky; top: var(--pf-top-h); box-sizing: border-box; height: calc(100vh - var(--pf-top-h)); overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px; padding: var(--pf-nav-pad); background: var(--pf-navy); color: #fff;
}
.sib-pf-navhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sib-pf-navhead .sib-drawer-close { display: none; }
.sib-pf-group { display: block; }
.sib-pf-group h2 {
  margin: 0; padding: var(--pf-grp-pad); color: var(--pf-muted-on-dark);
  font-size: var(--pf-fs-small); font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.sib-pf-menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sib-pf-menu a, .sib-pf-menu .sib-pf-off {
  display: flex; align-items: center; gap: 10px; box-sizing: border-box;
  padding: var(--pf-nav-item-pad); min-height: var(--pf-control-h); border-radius: var(--pf-radius-s);
  color: #fff; font-family: var(--pf-font-display); font-size: var(--pf-fs-nav); font-weight: 500; text-align: left; text-decoration: none;
}
.sib-pf-home {
  display: flex; align-items: center; gap: 10px; box-sizing: border-box; margin: 4px 0 0;
  padding: var(--pf-nav-item-pad); min-height: var(--pf-control-h); border-radius: var(--pf-radius-s);
  color: #fff; font-family: var(--pf-font-display); font-size: var(--pf-fs-nav); font-weight: 500; text-decoration: none;
}
.sib-pf-home:hover, .sib-pf-menu a:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.sib-pf-home.active, .sib-pf-menu a.active, .sib-pf-home.active:hover, .sib-pf-menu a.active:hover { background: #fff; color: var(--pf-navy); }
.sib-pf-label { min-width: 0; }
/* An entry without a page yet («Em breve», «Sem fonte»): greyed, not a link. */
.sib-pf-menu .sib-pf-off { color: var(--pf-muted-on-dark); cursor: default; }
.sib-pf-menu .sib-pf-off small { display: block; color: var(--pf-muted-on-dark); font-size: var(--pf-fs-small); }
/* Empresa sits at the bottom (.foot); Administração follows it for the superuser. */
.sib-pf-group[data-nav-group="empresa"] { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 10px; }
.sib-pf-foot { display: grid; gap: 4px; margin-top: 14px; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 10px; }
.sib-pf-group[data-nav-group="empresa"] ~ .sib-pf-foot { margin-top: 14px; }
.sib-pf-foot a, .sib-pf-foot button {
  display: flex; align-items: center; box-sizing: border-box; min-height: var(--pf-control-h); padding: var(--pf-nav-item-pad); border: 0; border-radius: var(--pf-radius-s); background: transparent;
  color: var(--pf-muted-on-dark); font-family: var(--pf-font-display); font-size: var(--pf-fs-small); font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; white-space: normal;
}
.sib-pf-foot a:hover, .sib-pf-foot button:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
/* The release badge of the Administrator (TKT-137). */
.sib-pf-foot .sib-app-release { display: block; padding: 6px 12px; color: var(--pf-muted-on-dark); font-size: var(--pf-fs-small); overflow-wrap: anywhere; }
/* «Enviar documentos» inside the side bar (an older place of the button; the frame now shows it in the top bar). */
.sib-pf-send {
  display: flex; align-items: center; justify-content: center; box-sizing: border-box; margin: 10px 0 6px;
  padding: 8px 16px; min-height: var(--pf-control-h); border-radius: var(--pf-radius-s); background: var(--pf-primary);
  color: #fff; font-family: var(--pf-font-display); font-size: var(--pf-fs-btn); font-weight: 600; text-align: center; text-decoration: none;
}
.sib-pf-send:hover { background: #0a4f9c; color: #fff; text-decoration: none; }

/* ---------- the page (.main: padding 28 32 96, left-aligned). Without the prototype's max-width of 1180 px: the owner's ruling of
   2026-10-07 (a wide screen is used: the tables fill the content) stands for the pages of today — recorded as a deviation. ---------- */
.sib-pf-main { display: flex; flex-direction: column; min-width: 0; }
.sib-pf .sib-content { flex: 1; box-sizing: border-box; width: 100%; padding: var(--pf-main-pad); }
/* The task page keeps the prototype's .main max-width (Miguel 04/11: the answers stretched across a 1900 px screen); the other pages
   stay without a cap (F-3, owner 2026-10-07). */
.sib-pf .sib-content:has(.sib-task) { max-width: var(--pf-main-max); }
.sib-pf .sib-container { max-width: none; margin: 0; padding: 0; }

/* ---------- cards, tables, tags (the T76's 15 px on the tags) ---------- */
.sib-pf .sib-panel, .sib-pf .sib-home-card, .sib-pf .sib-home-drop, .sib-pf .sib-context-card { padding: var(--pf-card-pad); border-color: var(--pf-line); border-radius: var(--pf-radius); background: var(--pf-surface); }
.sib-pf .sib-home-card.is-none { background: var(--pf-soft); }
.sib-pf .sib-table-wrap { border-color: var(--pf-line); border-radius: var(--pf-radius); }
.sib-pf table { width: 100%; border-collapse: collapse; }
.sib-pf thead th {
  padding: var(--pf-cell-pad); background: transparent; color: var(--pf-muted); border-bottom: 1px solid var(--pf-line);
  font-family: var(--pf-font-display); font-size: var(--pf-fs-th); font-weight: 500; text-transform: none; letter-spacing: 0; line-height: 1.3; text-align: left;
}
.sib-pf tbody td { padding: var(--pf-cell-pad); font-size: var(--pf-fs-td); color: var(--pf-ink); border-bottom: 0; border-top: 1px solid var(--pf-line); }
.sib-pf tbody tr:hover { background: var(--pf-row-hover); }
.sib-pf .sib-chip { display: inline-flex; align-items: center; font-size: var(--pf-fs-small); font-weight: 500; padding: var(--pf-tag-pad); border-radius: 999px; border: 1px solid var(--pf-line); background: var(--pf-soft); color: var(--pf-muted); white-space: nowrap; }
.sib-pf .sib-chip.success { background: var(--pf-ok-soft); color: var(--pf-ok); border-color: #b9e0d2; }
.sib-pf .sib-chip.warning, .sib-pf .sib-chip.attention { background: var(--pf-warn-soft); color: var(--pf-warn); border-color: #f1d79a; }
.sib-pf .sib-chip.danger { background: var(--pf-bad-soft); color: var(--pf-bad); border-color: #f5c2bc; }
.sib-pf .sib-chip.brand { background: var(--pf-primary-soft); color: var(--pf-primary); border-color: #c5d5ea; }
.sib-pf .sib-pager { margin: 0; padding: var(--pf-tfoot-pad); border-top: 1px solid var(--pf-line); font-size: var(--pf-fs-small); color: var(--pf-muted); }

/* ---------- E03 Início: the prototype's .h1/.lede, .h2, .tasks/.task, .grid2 > .card (.row, .bar, .link, .tag), .card.dashed, .card.done;
   plus the T25 decisions: the six recent documents («Ver todos») and the numbers only with a source. The page flows like the prototype
   (no grid gap): the margins below are the prototype's own. ---------- */
.sib-pf .sib-home { display: block; max-width: none; }
.sib-pf .sib-home-hello h1 { font-size: var(--pf-fs-h1); margin: 0 0 6px; }
.sib-pf .sib-home-hello p { font-size: var(--pf-fs-base); color: var(--pf-muted); margin: 0 0 22px; }
.sib-pf .sib-home-h2 { margin: 0 0 12px; font-size: var(--pf-fs-h2); font-weight: 600; }
.sib-pf .sib-home-head { display: flex; gap: 12px; margin: 0; align-items: flex-start; justify-content: space-between; }
.sib-pf .sib-home-head h2 { margin: 0 0 12px; font-size: var(--pf-fs-h3); font-weight: 600; }
.sib-pf .sib-home-card { display: block; }
.sib-pf .sib-home-card > .btn, .sib-pf .sib-home-card .sib-home-sentence + .btn { margin-top: 12px; }
.sib-pf .sib-home-sentence, .sib-pf .sib-home-none { font-size: var(--pf-fs-base); margin: 0 0 6px; }
.sib-pf .sib-home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pf-stack-gap); margin-top: var(--pf-stack-gap); }
.sib-pf .sib-home > .sib-home-card + .sib-home-card, .sib-pf .sib-home > .sib-home-grid + .sib-home-card, .sib-pf .sib-home-drop { margin-top: var(--pf-stack-gap); }
/* E07: the prototype's first grid sits right under the lede (grid2 with margin-top 0). */
.sib-pf [data-share] > .sib-home-grid { margin-top: 0; }
.sib-pf .sib-home-tasks { margin: 0; padding: 0; display: block; list-style: none; border: 1px solid var(--pf-line); border-radius: var(--pf-radius); background: var(--pf-surface); overflow: hidden; }
.sib-pf .sib-home-tasks li {
  display: grid; grid-template-columns: var(--pf-task-cols); gap: 14px; align-items: center;
  padding: var(--pf-task-pad); border: 0; border-top: 1px solid var(--pf-line); border-radius: 0; background: transparent;
}
.sib-pf .sib-home-tasks li:first-child { border-top: 0; }
.sib-pf .sib-home-tasks li > div { min-width: 0; overflow-wrap: anywhere; }
.sib-pf .sib-home-tasks li strong { display: block; font-size: var(--pf-fs-task); font-weight: 600; }
.sib-pf .sib-home-tasks li div > span { font-size: var(--pf-fs-base); color: var(--pf-muted); }
.sib-pf .sib-home-tasks + .link { margin-top: 8px; }
.sib-pf .sib-home-dot { display: block; width: 26px; height: 26px; margin: 0; border-radius: 50%; border: 2px solid #9aa5b8; background: #f1f3f6; }
.sib-pf .sib-home-dot.open { border-color: #3b82f6; background: #dbe8fd; }
.sib-pf .sib-home-dot.late { border-color: #f2b630; background: #fff1cc; }
.sib-pf .sib-home-dot.postponed { border-color: #9aa5b8; background: #f1f3f6; }
/* «Está tudo tratado»: the prototype's .card.done */
.sib-pf .sib-home-done { text-align: center; padding: var(--pf-done-pad); }
.sib-pf .sib-home-done .big { font-family: var(--pf-font-display); font-size: var(--pf-fs-big); font-weight: 700; line-height: 1.2; margin-bottom: 8px; }
.sib-pf .sib-home-done p { margin: 0; }
/* «Documentos de {mês}»: the prototype's .row, .bar, .link, the list of the missing ones, and the six recent (T25 decision 4) */
.sib-pf .sib-home-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--pf-row-gap); }
.sib-pf .sib-home-row strong { font-family: var(--pf-font-display); font-weight: 700; font-size: var(--pf-fs-base); }
.sib-pf .sib-home-bar {
  display: block; width: 100%; height: var(--pf-bar-h); margin: var(--pf-bar-margin); border: 0; border-radius: 999px;
  background: var(--pf-bar-track); color: var(--pf-primary); overflow: hidden; -webkit-appearance: none; appearance: none;
}
.sib-pf .sib-home-bar::-webkit-progress-bar { background: var(--pf-bar-track); border-radius: 999px; }
.sib-pf .sib-home-bar::-webkit-progress-value { background: var(--pf-primary); border-radius: 999px; }
.sib-pf .sib-home-bar::-moz-progress-bar { background: var(--pf-primary); border-radius: 999px; }
.sib-pf .sib-home-missing { margin: 6px 0 0; padding-left: 20px; font-size: var(--pf-fs-small); }
.sib-pf .sib-home-recent { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--pf-line); }
.sib-pf .sib-home-recent li a { display: flex; justify-content: space-between; align-items: center; gap: var(--pf-row-gap); min-height: var(--pf-control-h); padding: 6px 0; border-bottom: 1px solid var(--pf-line); color: var(--pf-ink); text-decoration: none; }
.sib-pf .sib-home-recent li a:hover { color: var(--pf-primary); }
.sib-pf .sib-home-recent li span { display: grid; min-width: 0; }
.sib-pf .sib-home-recent li strong { font-size: var(--pf-fs-base); font-weight: 600; overflow-wrap: anywhere; }
.sib-pf .sib-home-recent li small { font-size: var(--pf-fs-small); color: var(--pf-muted); }
.sib-pf .sib-home-recent li b { flex: none; font-family: var(--pf-font-display); font-weight: 600; font-size: var(--pf-fs-base); }
/* «Partilhado com o contabilista»: the tag, one sentence, the text link */
.sib-pf .sib-home-shared .sib-home-sentence { margin: 14px 0 6px; }
/* The month's numbers (T25 decision 1): three numbers at 32 px, no link */
.sib-pf .sib-home-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--pf-stack-gap); }
.sib-pf .sib-home-three > div { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--pf-line); border-radius: var(--pf-radius-s); min-width: 0; }
.sib-pf .sib-home-three span { font-size: var(--pf-fs-small); color: var(--pf-muted); }
.sib-pf .sib-home-three strong { font-size: var(--pf-fs-big); line-height: 1.1; overflow-wrap: anywhere; }
.sib-pf .sib-home-three strong.neg { color: var(--pf-bad); }
.sib-pf .sib-home-numbers .sib-home-sentence { margin: 12px 0 0; }
.sib-pf .sib-home-drop { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; border: 1px dashed var(--pf-line); gap: 12px; }
.sib-pf .sib-home-drop strong { display: block; font-size: var(--pf-fs-h3); font-weight: 600; margin: 0 0 4px; }
.sib-pf .sib-home-drop span { font-size: var(--pf-fs-base); color: var(--pf-muted); }

/* ---------- E06 Tarefa (Tarefas.razor): the prototype's .head/.back, .card, .eyebrow/.h1/.lede, .grid2 > .side/.preview/.file,
   .side.compare rows, .answers, .after, .card.done. tasks.css keeps the previous view's look and the focus mode. ---------- */
.sib-pf .sib-task { max-width: none; margin: 0; padding: 0; }
.sib-pf .sib-task-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--pf-row-gap); margin: 0 0 12px; color: var(--pf-muted); font-size: var(--pf-fs-base); }
.sib-pf .sib-task-bar a {
  display: inline-flex; align-items: center; gap: 4px; min-height: var(--pf-control-h); padding: 6px 0; border: 0; background: none;
  color: var(--pf-primary); font-family: var(--pf-font-display); font-size: var(--pf-fs-btn); font-weight: 600; text-decoration: none;
}
.sib-pf .sib-task-bar a:hover { text-decoration: underline; }
.sib-pf .sib-task-card { padding: var(--pf-card-pad); border: 1px solid var(--pf-line); border-radius: var(--pf-radius); background: var(--pf-surface); box-shadow: none; }
.sib-pf .sib-task-eyebrow { margin: 0 0 6px; font-family: var(--pf-font-display); font-size: var(--pf-fs-eyebrow); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--pf-primary); }
.sib-pf .sib-task h1 { margin: 0 0 6px; font-size: var(--pf-fs-h1); line-height: 1.2; font-weight: 700; color: var(--pf-ink); }
.sib-pf .sib-task-lede { margin: 0 0 22px; font-size: var(--pf-fs-base); color: var(--pf-muted); }
.sib-pf .sib-task-sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pf-stack-gap); }
.sib-pf .sib-task-sides.is-single { grid-template-columns: minmax(0, 1fr); }
.sib-pf .sib-task-side { display: block; padding: var(--pf-side-pad); border: 1px solid var(--pf-line); border-radius: var(--pf-radius); background: var(--pf-surface); }
.sib-pf .sib-task-side.is-new { border-color: var(--pf-line); }
.sib-pf .sib-task-preview {
  display: grid; place-items: center; box-sizing: border-box; min-height: var(--pf-preview-h); margin: 0 0 12px; padding: var(--pf-preview-pad);
  border: 1px solid var(--pf-line); border-radius: var(--pf-radius); background: var(--pf-preview-bg); color: var(--pf-muted);
  font-size: var(--pf-fs-base); text-align: center; text-decoration: none;
}
.sib-pf .sib-task-side .sib-task-preview { min-height: var(--pf-preview-h-side); }
.sib-pf .sib-content a.sib-task-preview { color: var(--pf-muted); }
.sib-pf .sib-content a.sib-task-preview:hover { border-color: var(--pf-primary); color: var(--pf-primary); text-decoration: none; }
.sib-pf .sib-task-side-label { display: block; margin: 0; font-size: var(--pf-fs-base); font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--pf-muted); }
.sib-pf .sib-task-file { display: block; margin: 0; font-family: var(--pf-font-display); font-size: var(--pf-fs-answer); font-weight: 600; color: var(--pf-ink); overflow-wrap: anywhere; }
/* the heading of the T2 reading and the T3 candidates: the prototype's h3 at 17 px inside the .side */
.sib-pf .sib-task-side.is-reading > .sib-task-side-label, .sib-pf .sib-task-side.is-candidates > .sib-task-side-label { margin: 0 0 12px; font-family: var(--pf-font-display); font-size: var(--pf-fs-answer); font-weight: 600; color: var(--pf-ink); }
/* T1 comparison (a .side box under the documents) and T2 reading: the prototype's .compare rows, only a top border between them */
/* «Retido para lançar»: the hold zone under the two sides, a .side of the prototype with the words and, for an entity, the way to declare it */
.sib-pf .sib-task-hold { margin-top: var(--pf-stack-gap); }
.sib-pf .sib-task-hold p { margin: 0 0 var(--pf-row-gap); }
.sib-pf .sib-task-hold .btn { display: inline-flex; align-items: center; text-decoration: none; }
/* «Voltar a ler com uma indicação»: the hint under the answers — label over the field, actions in a row */
.sib-pf .sib-task-reread { display: grid; gap: var(--pf-row-gap); margin-top: var(--pf-stack-gap); }
.sib-pf .sib-task-reread textarea { width: 100%; box-sizing: border-box; }
.sib-pf .sib-task-reread-help { margin: 0; color: var(--pf-muted); font-size: var(--pf-fs-small); }
.sib-pf .sib-task-reread-actions { display: flex; flex-wrap: wrap; gap: var(--pf-row-gap); }
.sib-pf .sib-task-compare { display: block; margin: var(--pf-stack-gap) 0 0; padding: 0 var(--pf-side-pad); border: 1px solid var(--pf-line); border-radius: var(--pf-radius); background: var(--pf-surface); }
.sib-pf .sib-task-read { display: block; margin: 0; padding: 0; }
.sib-pf .sib-task-compare li, .sib-pf .sib-task-read li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: var(--pf-row-gap); align-items: center;
  padding: var(--pf-compare-pad); border: 0; border-top: 1px solid var(--pf-line); border-radius: 0; background: transparent; font-size: var(--pf-fs-base);
}
.sib-pf .sib-task-read li { grid-template-columns: minmax(0, 1fr) auto auto; }
.sib-pf .sib-task-compare li:first-child, .sib-pf .sib-task-read li:first-child { border-top: 0; }
.sib-pf .sib-task-field { color: var(--pf-muted); }
.sib-pf .sib-task-badge { justify-self: end; padding: 0; border: 0; background: none; font-family: var(--pf-font-display); font-size: var(--pf-fs-base); font-weight: 600; white-space: nowrap; }
.sib-pf .sib-task-badge.is-equal { color: var(--pf-ok); }
.sib-pf .sib-task-badge.is-different { color: var(--pf-bad); }
.sib-pf .sib-task-badge.is-unknown { color: var(--pf-muted); font-weight: 500; }
/* T2: a missing field is the prototype's amber tag (15 px by the T76) */
.sib-pf .sib-task-read .sib-task-badge.is-different { padding: var(--pf-tag-pad); border: 1px solid #f1d79a; border-radius: 999px; background: var(--pf-warn-soft); color: var(--pf-warn); font-size: var(--pf-fs-small); font-weight: 500; }
.sib-pf .sib-task-waiting { border: 1px solid #f1d79a; border-radius: var(--pf-radius-s); background: var(--pf-warn-soft); color: var(--pf-warn); }
/* T3: one .side per possible company */
.sib-pf .sib-task-cards { display: grid; gap: var(--pf-stack-gap); margin: 0; padding: 0; }
.sib-pf .sib-task-cards li { display: block; padding: var(--pf-side-pad); border: 1px solid var(--pf-line); border-radius: var(--pf-radius); background: var(--pf-surface); font-size: var(--pf-fs-base); }
.sib-pf .sib-task-cards li strong { font-size: var(--pf-fs-base); }
.sib-pf .sib-task-cards li span { display: block; margin-top: 6px; color: var(--pf-muted); }
/* the answers: big, the recommended one solid, the others ghost */
.sib-pf .sib-task-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pf-answers-gap); margin-top: var(--pf-answers-mt); }
.sib-pf .sib-task-answers.has-many { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.sib-pf .sib-task-answers button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--pf-answer-h); padding: var(--pf-btn-pad); border: var(--pf-btn-border) solid var(--pf-primary); border-radius: var(--pf-radius-s);
  background: var(--pf-surface); color: var(--pf-primary); font-family: var(--pf-font-display); font-size: var(--pf-fs-answer); font-weight: 600; line-height: 1.2; white-space: normal;
}
.sib-pf .sib-task-answers button:hover { background: var(--pf-primary-soft); border-color: var(--pf-primary); }
.sib-pf .sib-task-answers button.is-recommended { border-width: 2px; background: var(--pf-primary); border-color: var(--pf-primary); color: #fff; }
.sib-pf .sib-task-answers button.is-recommended:hover { background: #0a4f9c; border-color: #0a4f9c; }
.sib-pf .sib-task-answers button small { font-family: var(--pf-font-body); font-size: var(--pf-fs-small); font-weight: 500; opacity: .85; }
.sib-pf .sib-task-answers button[disabled] { opacity: .6; }
/* the exits: text links, «Mais tarde» in grey */
.sib-pf .sib-task-exits { display: flex; justify-content: space-between; align-items: center; gap: var(--pf-row-gap); margin-top: var(--pf-after-mt); flex-wrap: wrap; }
.sib-pf .sib-task-exits button { min-height: var(--pf-control-h); padding: var(--pf-link-pad); border: 0; background: none; color: var(--pf-primary); font-family: var(--pf-font-display); font-size: var(--pf-fs-btn); font-weight: 600; text-align: left; text-decoration: none; }
.sib-pf .sib-task-exits button:hover { background: none; text-decoration: underline; }
.sib-pf .sib-task-exits button.is-muted { color: var(--pf-muted); font-weight: 500; }
/* the states */
.sib-pf .sib-task-done { text-align: center; padding: var(--pf-done-pad); }
.sib-pf .sib-task-done .big { margin-bottom: 8px; font-family: var(--pf-font-display); font-size: var(--pf-fs-big); font-weight: 700; color: var(--pf-ink); }
.sib-pf .sib-task-done .sib-task-lede { margin-bottom: 20px; }
.sib-pf .sib-task-error { border-color: #f3c1bb; border-radius: var(--pf-radius-s); background: var(--pf-bad-soft); color: var(--pf-bad); }
.sib-pf .sib-task-notice { border-color: #b9e0d2; border-radius: var(--pf-radius-s); background: var(--pf-ok-soft); color: var(--pf-ok); }
.sib-pf .sib-task-skel { background: var(--pf-preview-bg); border-radius: var(--pf-radius-s); }

/* ---------- E07 Partilha (Partilha.razor): the prototype's grid2 (the months table, «O seu contabilista» with .facts rows),
   .btn.wide, and the requests card with .task rows (padding 14 0, text + action) ---------- */
.sib-pf [data-share] .sib-share-note { margin: 12px 0 0; font-size: var(--pf-fs-small); color: var(--pf-muted); }
.sib-pf .sib-share-complete { margin: 12px 0 0; }
.sib-pf .sib-share-complete + .sib-home-none { margin: 8px 0 0; font-size: var(--pf-fs-small); }
.sib-pf .sib-share-facts { border-top: 1px solid var(--pf-line); }
.sib-pf .sib-share-facts > div { display: flex; justify-content: space-between; gap: var(--pf-facts-gap); padding: var(--pf-facts-pad); border-top: 1px solid var(--pf-line); }
.sib-pf .sib-share-facts > div:first-child { border-top: 0; }
.sib-pf .sib-share-facts span { color: var(--pf-muted); }
.sib-pf .sib-share-facts strong { text-align: right; font-family: var(--pf-font-display); font-weight: 500; color: var(--pf-ink); }
.sib-pf .sib-share-facts strong.is-head { font-weight: 600; }
.sib-pf .sib-share-facts > div + div strong { color: var(--pf-ok); font-weight: 600; }
.sib-pf .sib-share-requests { list-style: none; margin: 0; padding: 0; }
.sib-pf .sib-share-requests li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--pf-facts-gap); align-items: center; padding: var(--pf-request-pad); border-top: 1px solid var(--pf-line); }
.sib-pf .sib-share-requests li:first-child { border-top: 0; }
.sib-pf .sib-share-requests li > div { min-width: 0; overflow-wrap: anywhere; }
.sib-pf .sib-share-requests li strong { display: block; font-size: var(--pf-fs-task); font-weight: 600; }
.sib-pf .sib-share-requests li div > span { color: var(--pf-muted); }
.sib-pf .sib-share-requests li .sib-chip { margin-top: 6px; }
.sib-pf .sib-share-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.sib-pf .sib-share-answer, .sib-pf .sib-share-form { display: grid; gap: 8px; margin: 10px 0 0; }
.sib-pf .sib-share-form { margin: 0 0 12px; }
.sib-pf .sib-share-form label { display: grid; gap: 4px; }

/* The previous view opened from the new one: the way back (outside the frame). */
.sib-pf-back {
  display: inline-block; margin: 0 0 var(--sib-sp-4); padding: 6px 12px; border: 1px solid #e3e7ee; border-radius: 8px;
  background: #fff; color: #013B7C; font-weight: 600; font-size: 14px;
}
.sib-pf-back:hover { border-color: #013B7C; text-decoration: none; }
/* «Vista nova»: the superuser's pill in the previous view's header. */
.sib-nav-switch {
  display: inline-block; padding: 5px 12px; border: 1px solid #013B7C; border-radius: 999px;
  color: #013B7C; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.sib-nav-switch:hover { background: #e8eff8; text-decoration: none; }

/* The Início's last block keeps «Enviar» clear of the wider «Perguntar» pill. */
@media (min-width: 861px) {
  .sib-pf .sib-home-drop { padding-right: 150px; }
  .sib-pf-top .sib-burger { display: none; }
  /* The licence alone stays in the bar down to 861 px, so the company selector narrows here too. */
  .sib-pf-company { flex: 0 1 auto; }
  .sib-pf-company select { width: 100%; }
}

/* ---------- E04 Documentos (/documentos, Simple/Documentos.razor; tickets#37): the prototype's R.documentos — the .head (title + lede, the
   lede's inline margin:0), the .search, the .filters as pills, the .tablewrap (td .docno in Poppins 600 ink, td .tag), the .tfoot with its
   .link, the closing note. documents.css keeps the page's structure; the measures here are the prototype's through the tokens. The second
   line of a cell (the company under the number, when the list spans companies) runs inline, so a row keeps the prototype's height
   (Luís 04/11: «campos uns em cima dos outros»). ---------- */
.sib-pf .sib-docs-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--pf-head-gap); margin: 0 0 var(--pf-head-mb); }
.sib-pf .sib-docs-head .sib-home-hello p { margin: 0; }
.sib-pf input.sib-docs-search { margin: 0 0 var(--pf-search-mb); padding: var(--pf-search-pad); font-family: var(--pf-font-body); font-size: var(--pf-fs-base); border: 1px solid var(--pf-line); border-radius: var(--pf-radius-s); background: var(--pf-search-bg); color: var(--pf-ink); }
.sib-pf .sib-docs-filters { gap: var(--pf-filters-gap); margin: 0 0 var(--pf-filters-mb); }
.sib-pf .sib-docs-filters select { min-height: var(--pf-control-h); padding: var(--pf-select-pad); font-family: var(--pf-font-display); font-size: var(--pf-fs-btn); font-weight: 500; border: 1px solid var(--pf-select-line); border-radius: 999px; background: var(--pf-surface); color: var(--pf-ink); max-width: none; }
/* «Há n documentos à espera noutros meses» sits between the filters and the table: it takes the filters' margin, the table stays at 16 */
.sib-pf .sib-docs-filters + .sib-docs-note { margin: 0 0 var(--pf-filters-mb); }
.sib-pf .sib-docs-table { border: 1px solid var(--pf-line); border-radius: var(--pf-radius); background: var(--pf-surface); }
.sib-pf .sib-docs-table tbody tr[data-doc-row]:hover { background: transparent; }
.sib-pf .sib-docs-table tbody tr[data-doc-row]:hover td { background: var(--pf-row-hover); }
.sib-pf .sib-content a.sib-docs-number { font-family: var(--pf-font-display); font-weight: 600; color: inherit; white-space: nowrap; text-decoration: none; }
.sib-pf .sib-content a.sib-docs-number:hover { text-decoration: underline; }
.sib-pf .sib-docs-table small { display: inline; margin: 0; color: var(--pf-muted); font-size: var(--pf-fs-small); }
.sib-pf .sib-docs-state { display: inline-flex; align-items: center; padding: var(--pf-tag-pad); border: 1px solid var(--pf-line); border-radius: 999px; background: var(--pf-soft); color: var(--pf-muted); font-family: var(--pf-font-display); font-size: var(--pf-fs-small); font-weight: 500; white-space: nowrap; }
.sib-pf .sib-docs-state.archived { background: var(--pf-ok-soft); color: var(--pf-ok); border-color: #b9e0d2; }
.sib-pf .sib-docs-state.duplicate { background: var(--pf-warn-soft); color: var(--pf-warn); border-color: #f1d79a; }
.sib-pf .sib-docs-state.unreadable { background: var(--pf-bad-soft); color: var(--pf-bad); border-color: #f5c2bc; }
.sib-pf .sib-docs-state.needs, .sib-pf .sib-docs-state.accountant { background: var(--pf-primary-soft); color: var(--pf-primary); border-color: #c5d5ea; }
.sib-pf .sib-docs-foot { gap: var(--pf-row-gap); padding: var(--pf-tfoot-pad); border-top: 1px solid var(--pf-line); font-size: var(--pf-fs-small); color: var(--pf-muted); }
.sib-pf .sib-docs-note { margin: var(--pf-note-mt) 0 0; font-size: var(--pf-fs-small); color: var(--pf-muted); }

/* ---------- phone: one breakpoint, the prototype's 860 px — ☰, the icon, «Enviar», the selector, the avatar in the bar; the menu a
   drawer under the bar; the pages in one column with a 16 px margin ---------- */
@media (max-width: 860px) {
  .sib-pf { --pf-top-h: 65px; grid-template-columns: minmax(0, 1fr); }
  .sib-pf-top { padding: 8px 12px; gap: 6px; flex-wrap: wrap; }
  .sib-pf-top .sib-burger { display: inline-flex; }
  .sib-pf-brand span { display: none; }
  .sib-pf-grow { flex: 1 1 0; min-width: 0; }
  .sib-pf-send-top { padding: 6px 12px; font-size: var(--pf-fs-small); }
  .sib-pf-send-lg { display: none; }
  .sib-pf-send-sm { display: inline; }
  .sib-pf-company select { max-width: 120px; padding: 6px 8px; }
  .sib-pf-top > .sib-pf-licence, .sib-pf-controls { display: none; }
  .sib-pf-filters { display: block; }
  /* With «Filtros» (outside the prototype) the bar still fits one line at 390 px, with the icon (T01-F): the selector narrows, and
     below that width it gives way before anything wraps. */
  .sib-pf-top:has(.sib-pf-filters) { gap: 4px; }
  .sib-pf-top:has(.sib-pf-filters) .sib-pf-grow { display: none; }
  .sib-pf-top:has(.sib-pf-filters) .sib-pf-brand { margin-right: auto; }
  .sib-pf-top:has(.sib-pf-filters) .sib-pf-company { flex: 0 1 80px; }
  .sib-pf-top:has(.sib-pf-filters) .sib-pf-company select { width: 100%; max-width: 80px; padding: 6px 4px; }
  .sib-pf-top:has(.sib-pf-filters) .sib-pf-filters > summary { padding: 8px; }
  .sib-pf-nav { display: none; }
  .sib-pf.nav-open .sib-pf-nav {
    display: flex; position: fixed; top: var(--pf-top-h); left: 0; bottom: 0; z-index: var(--sib-z-modal); width: 270px; height: auto;
    padding-bottom: calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 10px 40px rgba(15, 12, 45, .35);
  }
  .sib-pf.nav-open .sib-chat-launcher { display: none; }
  .sib-pf.nav-open::before { content: ""; position: fixed; inset: var(--pf-top-h) 0 0 0; z-index: calc(var(--sib-z-modal) - 1); background: var(--sib-scrim); }
  .sib-pf-navhead .sib-drawer-close { display: grid; place-items: center; }
  .sib-pf .sib-content { padding: var(--pf-main-pad-phone); }
  /* «Perguntar» clears the last buttons at the bottom of a short page. */
  .sib-pf .sib-container { padding: 0 0 64px; }
  .sib-pf h1, .sib-pf .sib-home-hello h1, .sib-pf .sib-task h1 { font-size: var(--pf-fs-h1-phone); }
  .sib-pf thead th, .sib-pf tbody td { padding: var(--pf-cell-pad-phone); }
  .sib-pf .sib-home-grid, .sib-pf .sib-home-three { grid-template-columns: minmax(0, 1fr); }
  .sib-pf .sib-home-tasks li { grid-template-columns: 24px 1fr; }
  .sib-pf .sib-home-tasks li > .btn { grid-column: 2; justify-self: start; }
  .sib-pf .sib-home-dot { width: 24px; height: 24px; }
  .sib-pf .sib-home-drop { flex-direction: column; align-items: flex-start; }
  /* E06: the documents stacked (the new one first), one answer per row, the comparison values under the field */
  .sib-pf .sib-task-sides, .sib-pf .sib-task-answers, .sib-pf .sib-task-answers.has-many { grid-template-columns: minmax(0, 1fr); }
  .sib-pf .sib-task-compare li { grid-template-columns: minmax(0, 1fr) auto; }
  .sib-pf .sib-task-compare li > span:nth-child(2), .sib-pf .sib-task-compare li > span:nth-child(3) { grid-column: 1 / -1; color: var(--pf-ink); }
  /* E04: the filters share the row; the table becomes the prototype's table.cards (thead hidden, the label from data-l on the left) */
  .sib-pf .sib-docs-filters select { flex: 1 1 var(--pf-select-basis); min-width: 0; }
  .sib-pf .sib-docs-table thead { display: none; }
  .sib-pf .sib-docs-table tbody tr { display: block; padding: var(--pf-cards-row-pad); border-top: 1px solid var(--pf-line); border-bottom: 0; }
  .sib-pf .sib-docs-table tbody td { display: flex; justify-content: space-between; gap: var(--pf-cards-gap); padding: var(--pf-cards-cell-pad); border: 0; text-align: right; }
  .sib-pf .sib-docs-table tbody td::before { content: attr(data-l); color: var(--pf-muted); font-size: var(--pf-fs-small); text-align: left; }
  .sib-pf .sib-docs-table tbody td[colspan] { display: block; text-align: left; }
  .sib-pf .sib-docs-table tbody td[colspan]::before { content: none; }
}
@media (min-width: 350px) and (max-width: 860px) { .sib-pf-top:has(.sib-pf-filters) { flex-wrap: nowrap; } }
/* Intermediate widths (Miguel 03/11, tickets#18): licence, «Ver como» and language wrapped raggedly beside the bar's own items. They
   never wrap: from 1180 px the selectors narrow on one line, and under that, two or more go behind «Filtros», as on a phone. */
@media (min-width: 861px) and (max-width: 1179px) {
  .sib-pf-top[data-crowded] > .sib-pf-licence, .sib-pf-top[data-crowded] > .sib-pf-controls { display: none; }
  .sib-pf-top[data-crowded] > .sib-pf-filters { display: block; }
  .sib-pf-filters-panel { position: absolute; top: calc(100% + 8px); left: auto; right: 0; width: 320px; }
}
@media (min-width: 1180px) {
  .sib-pf-controls { flex-wrap: nowrap; min-width: 0; }
  .sib-pf-controls .sib-topbar-group { flex: 0 1 auto; min-width: 0; }
  .sib-pf-controls .sib-topbar-group:last-child { flex: none; }
  .sib-pf-controls .sib-topbar-label { flex: none; }
  .sib-pf-controls .sib-topbar-group select { flex: 0 1 auto; min-width: 0; }
}
