:root {
  color-scheme: light;
  --paper: #f4f7f8;
  --paper-2: #fff;
  --ink: #1c2b36;
  --muted: #61717e;
  --line: #e3e9ed;
  --brand: #70c3d5;
  --pine: #163f4a;
  --pine-2: #26788b;
  --foam: #edf8fb;
  --copper: #a95a25;
  --copper-soft: #fcf0e5;
  --ok: #18734c;
  --ok-soft: #eaf7ef;
  --warn: #895b12;
  --warn-soft: #fff5dd;
  --late: #b43c3c;
  --late-soft: #fff0f0;
  --shadow: 0 2px 5px rgb(28 43 54 / 2%);
  --sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.6; }
a { color: var(--pine-2); text-underline-offset: 3px; }
a:hover { color: var(--pine); }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.025em; line-height: 1.3; }
h1 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin: 0; }
h2 { font-size: 1rem; margin: 0 0 1rem; }
p { margin: 0.45rem 0; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--pine-2); outline-offset: 3px; }
.icon { width: 19px; height: 19px; flex: none; vertical-align: middle; }
code, pre { font-family: ui-monospace, Consolas, monospace; font-size: 0.8rem; }
code { background: #eef3f5; padding: 0.15rem 0.35rem; border-radius: 4px; overflow-wrap: anywhere; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #16343f; color: #e3f3f7; padding: 1rem; border-radius: 8px; overflow-x: auto; line-height: 1.7; }
pre code { background: transparent; }

.shell { display: flex; min-height: 100vh; align-items: flex-start; }
.nav { width: 232px; flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--brand); color: var(--pine); padding: 1.8rem 1rem 1.25rem; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 0.7rem; padding: 0 0.55rem 1.7rem; color: inherit; text-decoration: none; }
.brand:hover { color: var(--pine); }
.brand strong { display: block; font-size: 1.25rem; letter-spacing: -0.04em; line-height: 1.4; }
.brand small { display: block; color: #204b59; font-size: 0.7rem; }
.mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: #e6f7fb; color: var(--pine); font-size: 1.4rem; font-weight: 750; box-shadow: inset 0 0 0 1px #ffffff60; }
.nav-label { padding: 1rem 0.8rem 0.6rem; margin: 0; font-size: 0.65rem; text-transform: uppercase; font-weight: 650; letter-spacing: 0.13em; color: #204b59; border-top: 1px solid #163f4a26; }
.nav-links { display: flex; flex-direction: column; gap: 0.35rem; }
.nav-links a { display: flex; align-items: center; gap: 0.8rem; color: var(--pine); text-decoration: none; padding: 0.75rem 0.85rem; border-radius: 7px; font-weight: 500; border: 1px solid transparent; }
.nav-links a .icon { opacity: 0.8; }
.nav a:focus-visible { outline-color: var(--pine); }
.nav-links a:hover { background: #ffffff40; color: var(--pine); }
.nav-links a[aria-current="page"] { color: var(--pine); background: #ffffff80; border-color: #ffffff50; box-shadow: inset 3px 0 var(--pine-2); }
.nav-links a[aria-current="page"] .icon { color: var(--pine-2); opacity: 1; }
.nav-foot { margin: auto 0.3rem 0; padding: 1.25rem 0.5rem 0; color: #204b59; font-size: 0.73rem; border-top: 1px solid #163f4a26; }
.nav-foot > .icon { color: var(--pine-2); margin: 1.5rem 0 0.5rem; }
.nav-foot strong { display: block; color: var(--pine); font-size: 0.78rem; font-weight: 600; }
.nav-foot p { margin-top: 0.4rem; line-height: 1.7; }
.workspace { flex: 1; min-width: 0; }
.topbar { min-height: 65px; background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 2rem; }
.breadcrumb { display: flex; align-items: center; gap: 0.8rem; font-size: 0.78rem; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb > span:last-child { color: var(--ink); font-weight: 600; }
.breadcrumb > span[aria-hidden] { color: #aab5bd; }
.admin-link { color: var(--muted); display: inline-flex; gap: 0.45rem; align-items: center; font-size: 0.76rem; text-decoration: none; }
.admin-link .icon { width: 16px; height: 16px; }
.main { max-width: 1600px; margin: 0 auto; padding: 1.9rem 2rem 3rem; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.5rem; }
.page-head > div { min-width: 0; }
.page-head > .button { flex: none; margin-top: 1.7rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.64rem; font-weight: 700; color: var(--pine-2); margin: 0 0 0.45rem; }
.page-summary { font-size: 0.9rem; color: #435663; margin: 0.5rem 0 0; font-weight: 500; }
.lede { max-width: 78ch; color: var(--muted); font-size: 0.8rem; line-height: 1.7; margin-top: 0.5rem; }
.hint, .compare, .muted { color: var(--muted); }
.hint { font-size: 0.75rem; padding: 0 0.2rem; margin: 0.75rem 0 1.2rem; line-height: 1.7; }
.compare { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; margin: 0.9rem 0 1.5rem; }
.compare .icon { width: 15px; height: 15px; }

.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; background: white; border: 1px solid var(--line); border-radius: 10px; padding: 1rem; margin-bottom: 0.75rem; box-shadow: var(--shadow); }
.filters label, .field { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.78rem; min-width: 0; }
.filters label { flex: 1 1 125px; }
.filters label:has(select[name="escopo"]) { flex: 2 1 220px; }
.filters label:has(select[name="modo"]) { flex-basis: 140px; }
.filters label:has(input[type="search"]) { flex: 2 1 180px; }
.filters span, .field span, .composer label > span { color: #435663; font-weight: 600; font-size: 0.75rem; }
select, input, textarea, .control { color: var(--ink); background: white; border: 1px solid #d8e1e6; border-radius: 6px; padding: 0.6rem 0.65rem; min-width: 0; min-height: 39px; accent-color: var(--pine-2); }
select { padding-right: 1.2rem; text-overflow: ellipsis; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
textarea { width: 100%; resize: vertical; min-height: 100px; }
input[type="checkbox"] { align-self: flex-start; min-height: auto; width: 18px; height: 18px; }
button, .button { font: inherit; font-size: 0.78rem; font-weight: 600; min-height: 39px; border: 1px solid var(--pine-2); border-radius: 6px; padding: 0.6rem 0.95rem; background: var(--pine-2); color: white; text-decoration: none; cursor: pointer; display: inline-flex; gap: 0.5rem; align-items: center; justify-content: center; white-space: nowrap; line-height: 1.4; }
button .icon, .button .icon { width: 16px; height: 16px; }
button.ghost, .button.ghost { background: white; color: #354c58; border-color: #d8e1e6; }
button:hover:not(:disabled), .button:hover { background: #1c5e70; color: white; border-color: #1c5e70; }
button.ghost:hover:not(:disabled), .button.ghost:hover { background: var(--foam); color: var(--pine); border-color: #b5d8e3; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.kpis, .mode-grid, .people, .split { display: grid; gap: 1rem; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 1.25rem 0 0; }
.mode-grid, .split { grid-template-columns: 1.15fr 1fr; margin: 1.25rem 0; align-items: start; }
.people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpis article, .panel, .mode-card, .empty { background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); min-width: 0; }
.kpis article { padding: 1.15rem; position: relative; min-height: 132px; }
.kpis article > .icon { position: absolute; right: 1rem; top: 1rem; color: #4e8c9c; width: 18px; height: 18px; }
.kpis article > span { padding-right: 1.3rem; display: block; }
.kpis span, .mode-card > span { color: var(--muted); font-size: 0.73rem; font-weight: 500; }
.kpis strong, .mode-card strong { display: block; font-size: clamp(1.3rem, 2vw, 1.8rem); letter-spacing: -0.04em; line-height: 1.3; margin: 0.75rem 0 0.35rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.kpis article:nth-child(3) { background: var(--foam); border-color: #cce7ef; }
.kpis article:nth-child(3) strong { color: var(--pine-2); }
.kpis small, .mode-card small, .mode-card em { display: block; color: var(--muted); font-size: 0.71rem; font-style: normal; }
.panel { padding: 1.25rem; margin-top: 1rem; }
.split > .panel, .people > .panel, .chat-layout > .panel { margin-top: 0; }
.panel-head, .person header, .form-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.panel-head { margin-bottom: 0.85rem; }
.panel-head h2, .person header h2 { margin: 0; }
.panel-head a { font-size: 0.75rem; text-decoration: none; font-weight: 600; }
.mode-card { display: block; padding: 1.25rem; text-decoration: none; color: inherit; }
.mode-card:hover { border-color: #9bcbd8; }
.mode-card.is-active { border-color: var(--pine-2); box-shadow: inset 0 3px var(--pine-2); background: var(--foam); }
.mode-card em { margin-bottom: 0.5rem; color: var(--ink); }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.bar-label { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; font-size: 0.75rem; margin-bottom: 0.45rem; flex-wrap: wrap; }
.bar-label > span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar-label a { text-decoration: none; font-weight: 500; }
.bar-label em { color: var(--muted); font-style: normal; font-size: 0.67rem; display: block; }
.bar-track { height: 6px; background: #edf2f4; border-radius: 20px; overflow: hidden; }
.bar-track span { display: block; height: 100%; background: var(--pine-2); border-radius: inherit; }
.bars li:nth-child(2n) .bar-track span { background: var(--brand); }

.table-wrap { overflow-x: auto; max-width: 100%; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 0.76rem; }
th, td { text-align: left; padding: 0.9rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.65rem; letter-spacing: 0.04em; font-weight: 650; color: #637580; background: #f6f8fa; white-space: nowrap; }
tbody tr:hover { background: #f3f9fb; }
tbody tr:last-child td { border-bottom: 0; }
td strong { font-weight: 600; }
td strong, td small { display: block; }
td small { font-size: 0.69rem; margin-top: 0.2rem; }
.numeric { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.activity-table { min-width: 850px; }
.activity-table td:first-child { white-space: nowrap; }
.activity-table td:nth-child(2) { min-width: 175px; }
.tree-table { min-width: 560px; }
.tree-table td { vertical-align: middle; }
.tree-table td:first-child { padding-left: calc(1rem + var(--depth) * 1.5rem); }
.tree-table td:first-child small { margin-left: 17px; }
.tree-name { font-weight: 600; text-decoration: none; }
.tree-name::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; border: 1.5px solid #77acbc; border-radius: 2px; vertical-align: 1px; }
.tree-table tr[style="--depth: 0"] { background: #f0f8fb; }
.tree-table tr[style="--depth: 0"] .tree-name::before { background: var(--pine-2); border-color: var(--pine-2); }
.empty-cell { color: var(--muted); padding: 1.5rem; text-align: center; }
.empty { padding: 2rem; }
.empty h2 { margin-bottom: 0.5rem; }
.empty p { color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 0.3rem; border-radius: 5px; padding: 0.15rem 0.45rem; font-size: 0.64rem; font-weight: 600; background: var(--foam); color: var(--pine-2); line-height: 1.5; }
.pill.holding { background: #e9eefb; color: #465da0; }
.pill.empresa { background: var(--foam); color: var(--pine-2); }
.pill.filial, .pill.neutral { background: #edf1f5; color: #536473; }
.pill.normalized { background: var(--ok-soft); color: var(--ok); }
.pill.error { background: var(--late-soft); color: var(--late); }
.pill.landed, .pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.outbound { background: var(--copper-soft); color: var(--copper); }
.pill.normalized::before, .pill.error::before, .pill.landed::before, .pill.outbound::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.person > .muted { font-size: 0.75rem; margin: 0.4rem 0 1rem; }
.alloc-list { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.alloc-list li { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.8rem 0; border-top: 1px solid var(--line); font-size: 0.78rem; }
.alloc-list li > span { color: var(--muted); font-size: 0.73rem; }
.alloc-list a { text-decoration: none; font-weight: 500; }

.chat-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1rem; align-items: start; }
.chat-list { padding: 1rem; }
.chat-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.chat-list a { display: flex; flex-direction: column; text-decoration: none; color: inherit; padding: 0.7rem; border-radius: 6px; border: 1px solid transparent; }
.chat-list a[aria-current="page"], .chat-list a:hover { background: var(--foam); border-color: #cce7ef; }
.chat-list small, .sources small { color: var(--muted); font-size: 0.7rem; }
.chat-thread { display: flex; flex-direction: column; gap: 1.25rem; min-height: 440px; }
.chat-empty { box-shadow: none; border-style: dashed; background: #f7fbfc; text-align: center; }
.bubbles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.bubble { max-width: 90%; width: fit-content; padding: 1rem; border-radius: 10px 10px 10px 2px; background: #f2f6f8; border: 1px solid var(--line); font-size: 0.8rem; }
.bubble.user { margin-left: auto; background: var(--foam); border-color: #cce7ef; border-radius: 10px 10px 2px 10px; }
.bubble .who { display: block; font-size: 0.65rem; font-weight: 700; color: var(--pine-2); margin-bottom: 0.35rem; }
.sources { margin: 0.7rem 0 0; padding: 0.7rem 0 0; list-style: none; border-top: 1px solid #d5e5eb; }
.sources li + li { margin-top: 0.45rem; }
.sources small { display: block; }
.answer-text { white-space: pre-line; overflow-wrap: anywhere; }
.article-preview-link { display: inline-block; font-size: 0.72rem; margin-top: 0.4rem; }
.knowledge-image { margin: 0.8rem 0; }
.knowledge-image img, .knowledge-content img { display: block; max-width: 100%; height: auto; border-radius: 6px; }
.knowledge-content { overflow-wrap: anywhere; line-height: 1.8; }
.knowledge-content table { display: block; overflow-x: auto; }
.knowledge-content pre { white-space: pre-wrap; }
.chamado-line { font-weight: 600; }
.composer { display: flex; flex-direction: column; gap: 0.9rem; border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: auto; }
.composer label { display: flex; flex-direction: column; gap: 0.35rem; }
.composer textarea, .composer select { width: 100%; }
.suggestions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.suggestions button { background: white; color: #526873; border: 1px solid var(--line); font-size: 0.7rem; min-height: 32px; white-space: normal; }
.suggestions button:hover:not(:disabled) { background: var(--foam); color: var(--pine); border-color: #b5d8e3; }

.messages { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.message { padding: 0.8rem 1rem; border-radius: 7px; background: var(--foam); font-size: 0.8rem; }
.message.error { background: var(--late-soft); color: var(--late); }
.message.success { background: var(--ok-soft); color: var(--ok); }
.field-error { color: var(--late); font-weight: 600; font-size: 0.75rem; }
.errorlist { list-style: none; padding: 0; margin: 0; }
.stack-form { display: flex; flex-direction: column; gap: 1rem; }
.stack-form .form-actions { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 0.5rem; }
.stack-form > button { align-self: flex-start; }
.form-split { align-items: start; grid-template-columns: 1.4fr 1fr; }
.form-actions a { font-size: 0.8rem; }
.inline-form { margin-top: 0.8rem; }
.activity-comparison { margin: 1.8rem 0 2rem; }
.comparison-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }
.comparison-heading h2 { font-size: 1.25rem; margin-bottom: 0.35rem; }
.comparison-heading p:not(.eyebrow) { color: var(--muted); font-size: 0.8rem; margin: 0; }
.comparison-list-link { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.comparison-list-link .icon { width: 16px; height: 16px; }
.comparison-periods { display: flex; flex-wrap: wrap; gap: 1.25rem 3rem; padding: 1rem 1.15rem; border: 1px solid var(--line); background: white; border-radius: 9px; }
.comparison-periods > div { display: flex; align-items: flex-start; gap: 0.6rem; color: var(--muted); font-size: 0.74rem; }
.comparison-periods strong { display: block; color: var(--ink); font-size: 0.75rem; margin-bottom: 0.15rem; }
.period-dot { width: 9px; height: 9px; background: var(--pine-2); border-radius: 50%; margin-top: 0.35rem; flex: none; }
.period-dot.previous { background: #8c9aaf; }
.comparison-scope { margin-bottom: 0; }
.comparison-kpis article { min-height: 178px; }
.comparison-kpis strong { margin-bottom: 0.65rem; }
.metric-change { border-top: 1px solid var(--line); padding-top: 0.65rem; margin-top: 0.75rem; }
.delta { display: inline-block; font-size: 0.69rem; font-weight: 600; color: #526873; background: #eef3f6; border-radius: 4px; padding: 0.12rem 0.4rem; }
.delta.up { color: #22697d; background: #e3f3f8; }
.delta.down { color: #526073; background: #e9eef4; }
.stakeholder-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 1rem; margin: 1rem 0 1.4rem; }
.stakeholder-grid .panel { margin: 0; }
.stakeholder-title { display: flex; align-items: center; gap: 0.7rem; }
.stakeholder-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--foam); color: var(--pine-2); flex: none; }
.stakeholder-title .eyebrow { font-size: 0.58rem; margin-bottom: 0.2rem; }
.stakeholder-title h3 { font-size: 0.95rem; margin: 0; }
.stakeholder-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.2rem 0 0; }
.provider-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stakeholder-metrics dt { color: var(--muted); font-size: 0.72rem; }
.stakeholder-metrics dd { margin: 0.4rem 0 0.2rem; font-size: 1.2rem; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stakeholder-metrics small { display: block; color: var(--muted); font-size: 0.67rem; line-height: 1.6; }
.stakeholder-panel .stakeholder-note { font-size: 0.68rem; color: var(--muted); margin: 0.9rem 0 0; line-height: 1.65; }
.comparison-split { grid-template-columns: 1fr 1fr; }
.activity-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.25rem 0; scroll-margin-top: 1rem; }
.activity-chart-panel { margin: 0; min-width: 0; }
.activity-chart-panel h3 { font-size: 1rem; margin: 0; }
.activity-chart-panel figcaption > .muted { font-size: 0.74rem; margin: 0.5rem 0 1.1rem; }
.activity-chart-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; color: var(--muted); font-size: 0.7rem; }
.activity-chart-legend > span { display: inline-flex; align-items: center; gap: 0.4rem; }
.activity-chart-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--brand); }
.activity-chart-key.is-previous, .is-previous .activity-chart-bar { background: repeating-linear-gradient(135deg, #8c9aaf 0 4px, #a4afbf 4px 6px); }
.activity-chart-panel .activity-chart-unit { color: var(--muted); font-size: 0.65rem; margin: 1.1rem 0 0; }
.activity-chart-scroll { overflow-x: auto; padding: 2rem 0.25rem 0.5rem; scrollbar-width: thin; }
.activity-chart-columns { display: grid; grid-template-columns: repeat(var(--chart-columns), minmax(160px, 1fr)); list-style: none; margin: 0; padding: 0; }
.activity-chart-pair { height: 210px; display: flex; align-items: flex-end; justify-content: center; gap: 14px; padding: 0 14px; border-bottom: 1px solid #b7c6ce; background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), var(--line) calc(25% - 1px), var(--line) 25%); }
.activity-chart-series { position: relative; width: 48px; max-width: 40%; flex: 0 0 auto; }
.activity-chart-value { position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 0.68rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.activity-chart-bar { display: block; height: 100%; border-radius: 5px 5px 0 0; background: var(--brand); }
.activity-chart-columns .activity-chart-label { padding: 0.65rem 0.5rem 0; margin: 0; text-align: center; color: var(--muted); font-size: 0.7rem; line-height: 1.5; overflow-wrap: anywhere; }
.activity-chart-panel .activity-chart-note { margin: 0.8rem 0 0; color: var(--muted); font-size: 0.65rem; }
.activity-pie-panel .activity-pie-period { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; color: var(--muted); font-size: 0.7rem; margin: 0; }
.activity-pie-layout { display: grid; grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1.3fr); gap: 1.25rem; margin: 1.25rem 0 0; align-items: start; }
.activity-pie { width: min(100%, 190px); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; background: conic-gradient(var(--pie-stops)); }
.activity-pie.is-empty { display: grid; place-items: center; background: var(--line); color: var(--muted); font-size: 0.8rem; }
.activity-pie-total { display: flex; flex-direction: column; align-items: center; margin: 0.8rem 0 0; }
.activity-pie-total strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.activity-pie-total > span { color: var(--muted); font-size: 0.68rem; }
.activity-pie-legend { list-style: none; padding: 0 0.3rem 0 0; margin: 0; max-height: 300px; overflow-y: auto; scrollbar-width: thin; }
.activity-pie-legend > li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: baseline; gap: 0.6rem; padding: 0.65rem 0; border-bottom: 1px solid var(--line); font-size: 0.72rem; }
.activity-pie-legend > li:first-child { padding-top: 0; }
.activity-pie-legend > li:last-child { border: 0; }
.activity-pie-swatch { width: 10px; height: 10px; border-radius: 3px; }
.activity-pie-category { overflow-wrap: anywhere; }
.activity-pie-category small { display: block; color: var(--muted); margin-top: 0.2rem; font-size: 0.68rem; }
.activity-pie-legend strong { color: var(--pine); font-variant-numeric: tabular-nums; white-space: nowrap; }
.activity-pie-legend .activity-pie-empty { display: block; color: var(--muted); }
.activity-comparison .panel-head h3 { font-size: 0.95rem; margin: 0; }
.activity-comparison .panel-head > .muted { font-size: 0.69rem; }
.comparison-bars { list-style: none; margin: 0; padding: 0 0.4rem 0 0; max-height: 430px; overflow-y: auto; scrollbar-width: thin; }
.comparison-bars li + li { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
.comparison-bar-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.35rem 0.75rem; justify-content: space-between; margin-bottom: 0.75rem; }
.comparison-bar-head > strong { font-size: 0.78rem; font-weight: 600; }
.comparison-bar-head .delta { font-size: 0.63rem; }
.comparison-bar-line { display: grid; grid-template-columns: 48px minmax(0, 1fr) 75px; align-items: center; gap: 0.6rem; margin: 0.4rem 0; font-size: 0.7rem; }
.comparison-bar-line > strong { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.comparison-bar-line > span { color: var(--muted); }
.comparison-track { height: 6px; background: #eef3f6; border-radius: 10px; overflow: hidden; }
.comparison-track > span { display: block; height: 100%; background: var(--pine-2); border-radius: inherit; }
.is-previous .comparison-track > span { background: #8c9aaf; }
.comparison-bar-detail { color: var(--muted); font-size: 0.67rem; line-height: 1.7; margin: 0.65rem 0 0; }
.team-comparison > .muted { font-size: 0.74rem; }
.team-comparison table { min-width: 770px; }
.team-comparison tbody th { background: white; color: var(--ink); letter-spacing: 0; font-size: 0.76rem; font-weight: 600; }
.comparison-empty { margin-top: 1rem; }
.comparison-empty h3 { margin-top: 0; }
#lista-atividades { scroll-margin-top: 1rem; }
.panel > p { font-size: 0.8rem; margin-bottom: 1rem; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 10; padding: 0.75rem 1rem; background: white; color: var(--pine); border-radius: 6px; }

@media (max-width: 1250px) {
  .nav { width: 210px; }
  .main { padding: 1.5rem; }
  .topbar { padding-inline: 1.5rem; }
  .kpis { gap: 0.75rem; }
  .kpis article { padding: 1rem; }
  .kpis strong { font-size: 1.4rem; }
  .chat-layout { grid-template-columns: 195px minmax(0, 1fr); }
}
@media (max-width: 1050px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .form-split { grid-template-columns: 1fr; }
  .people { grid-template-columns: 1fr; }
  .stakeholder-grid { grid-template-columns: 1fr; }
  .activity-chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .nav { width: auto; position: static; height: auto; padding: 1rem; overflow: visible; }
  .brand { padding: 0 0 1rem; }
  .nav-label, .nav-foot { display: none; }
  .nav-links { flex-direction: row; overflow-x: auto; padding-bottom: 0.2rem; gap: 0.25rem; scrollbar-width: thin; scrollbar-color: var(--pine-2) var(--brand); }
  .nav-links a { flex: none; padding: 0.6rem 0.7rem; gap: 0.5rem; font-size: 0.78rem; }
  .nav-links a[aria-current="page"] { box-shadow: inset 0 -2px var(--pine-2); }
  .nav-links .icon { width: 16px; height: 16px; }
  .main { padding: 1.3rem 1rem 2.5rem; }
  .topbar { min-height: 52px; padding: 0.75rem 1rem; }
  .admin-link { font-size: 0.7rem; }
  .page-head { flex-direction: column; gap: 0.8rem; }
  .page-head > .button { margin-top: 0; }
  .lede { max-width: none; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-list ul { max-height: 180px; overflow-y: auto; }
  .mode-grid { grid-template-columns: 1fr; }
  .panel { padding: 1rem; }
  .filters { padding: 0.85rem; gap: 0.65rem; }
  .filters button { flex: 1 1 100%; }
  .filters label:has(select[name="escopo"]) { flex-basis: 100%; }
  .bubble { max-width: 100%; }
  .comparison-heading { align-items: flex-start; flex-direction: column; }
  .comparison-periods { gap: 1rem; }
  .provider-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-pie-layout { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .kpis { grid-template-columns: 1fr; }
  .breadcrumb { gap: 0.4rem; }
  .admin-link { gap: 0.2rem; }
}
@media print {
  .nav, .topbar, .filters, .button, button, .messages, .skip-link { display: none !important; }
  .shell, .workspace { display: block; }
  body { background: white; font-size: 11px; }
  .main { max-width: none; padding: 0; }
  .table-wrap { overflow: visible; }
  .activity-table, .tree-table { min-width: 0; }
  .panel, .kpis article { box-shadow: none; break-inside: avoid; }
  .comparison-bars { max-height: none; overflow: visible; }
  .activity-chart-grid { grid-template-columns: 1fr; }
  .activity-chart-scroll { overflow: visible; }
  .activity-chart-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 1rem; }
  .activity-chart-columns > li { break-inside: avoid; }
  .activity-chart-key, .activity-chart-bar { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .activity-pie, .activity-pie-swatch { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .activity-pie-legend { max-height: none; overflow: visible; }
  .team-comparison table { min-width: 0; }
}
