:root {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: #20293a;
  background: #f8f9fc;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; height: 100%; overflow: hidden; scroll-behavior: smooth; }
body { min-width: 320px; height: 100%; margin: 0; overflow: hidden; background: #f8f9fc; color: #20293a; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

/* SOIA — interactive application demo */
.app-page {
	--app-paper: oklch(98.5% .008 250);
	--app-surface: oklch(99.5% .003 250);
	--app-soft: oklch(96% .012 250);
	--app-line: oklch(89% .018 250);
	--app-ink: oklch(20% .035 255);
	--app-muted: oklch(50% .025 255);
	--app-blue: oklch(50% .19 260);
	--app-blue-deep: oklch(40% .17 261);
	--app-blue-soft: oklch(92% .04 260);
	--app-green: oklch(76% .12 165);
	display: flex;
	flex-direction: column;
	height: 100vh;
	height: 100dvh;
	min-height: 0;
	overflow: hidden;
	background: var(--app-paper);
	color: var(--app-ink);
	font-family: 'Source Sans 3', sans-serif;
}
.app-page *, .app-page *::before, .app-page *::after { box-sizing: border-box; }
.app-page button, .app-page input, .app-page textarea, .app-page select { font: inherit; }
.app-page button { border: 0; cursor: pointer; }
.app-layout { display: grid; flex: 1 1 0; grid-template-columns: 188px 282px minmax(0, 1fr); min-width: 0; min-height: 0; height: auto; overflow: hidden; }
.app-sidebar, .context-sidebar { background: var(--app-surface); border-color: var(--app-line); }
.app-sidebar { position: relative; z-index: 5; display: flex; flex-direction: column; width: 188px; min-height: 0; overflow-y: auto; border-right: 1px solid var(--app-line); padding: 24px 14px 18px; transform: translateX(-172px); transition: transform 1s cubic-bezier(.25, 1, .5, 1), box-shadow .36s cubic-bezier(.16, 1, .3, 1); }
.app-sidebar.is-open { transform: translateX(0); box-shadow: 12px 0 24px color-mix(in oklab, var(--app-ink), transparent 90%); }
.sidebar-reveal-hint { position: absolute; z-index: 1; top: 50%; right: 0; display: grid; place-items: center; width: 16px; height: 32px; color: var(--app-blue-deep); opacity: .88; cursor: pointer; transform: translateY(-50%); transition: opacity .18s ease, transform .28s cubic-bezier(.22, 1, .36, 1); }
.sidebar-reveal-hint svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.app-sidebar.is-open .sidebar-reveal-hint { opacity: 0; transform: translate(-4px, -50%); }
.app-wordmark { display: inline-flex; align-items: center; gap: 8px; color: var(--app-blue-deep); font: 800 1.18rem/1 'Archivo', sans-serif; letter-spacing: -.06em; }
.app-wordmark-logo { display: block; width: 112px; height: auto; }
.desktop-wordmark { padding: 5px 12px 28px; }
.app-nav { display: grid; gap: 3px; margin-top: 8px; }
.nav-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 12px; border-radius: 5px; background: transparent; color: var(--app-muted); text-align: left; transition: background .2s ease, color .2s ease, transform .2s ease; }
.nav-item:hover { background: var(--app-soft); color: var(--app-ink); transform: translateX(2px); }
.nav-item.is-active { background: var(--app-blue-soft); color: var(--app-blue-deep); font-weight: 700; }
.nav-item svg { width: 22px; height: 22px; flex: 0 0 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.55; }
.nav-item:first-child svg path { fill: currentColor; stroke: none; opacity: .85; }
.nav-label { font: 600 .88rem/1 'Archivo', sans-serif; }
.sidebar-demo-note { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 12px 12px 2px; color: var(--app-muted); font-size: .76rem; }
.status-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--app-green); box-shadow: 0 0 0 3px color-mix(in oklab, var(--app-green), transparent 75%); }
.context-sidebar { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow-y: auto; border-right: 1px solid var(--app-line); padding: 28px 18px 18px; transform: translateX(-172px); transition: transform 1s cubic-bezier(.25, 1, .5, 1); }
.app-sidebar.is-open ~ .context-sidebar { transform: translateX(0); }
.context-primary { display: flex; flex-direction: column; transform: translateY(12px); }
.context-brand { text-align: center; }
.context-brand-logo { display: block; width: 124px; height: auto; margin-inline: auto; }
.context-brand p { margin: 7px 0 12px; color: var(--app-blue); font-size: 1rem; font-weight: 700; }
.sidebar-home-link { display: inline-flex; align-items: center; justify-content: center; width: calc(100% - 24px); min-height: 34px; margin: 0 12px 14px; padding: 0 10px; border: 1px solid var(--app-line); border-radius: 5px; color: var(--app-blue); font: 600 .7rem/1.2 'Archivo', sans-serif; text-align: center; transition: border-color .2s ease, color .2s ease, background .2s ease; }
.sidebar-home-link:hover, .sidebar-home-link:focus-visible { color: var(--app-blue-deep); text-decoration: underline; text-underline-offset: 3px; }
.sidebar-home-link:hover { border-color: var(--app-blue); background: var(--app-blue-soft); }
.sidebar-home-link:focus-visible { outline: 2px solid color-mix(in oklab, var(--app-blue), transparent 45%); outline-offset: 2px; }
.ask-form, .conversation-form { position: relative; display: flex; align-items: center; }
.ask-form input, .conversation-form input { width: 100%; height: 45px; padding: 0 49px 0 16px; border: 0; border-radius: 24px; outline: 0; background: var(--app-soft); color: var(--app-ink); font-size: .88rem; }
.ask-form input:focus, .conversation-form input:focus { box-shadow: 0 0 0 2px color-mix(in oklab, var(--app-blue), transparent 65%); }
.ask-form button, .conversation-form button { position: absolute; right: 5px; display: grid; place-items: center; width: 35px; height: 35px; border-radius: 50%; background: var(--app-blue); color: var(--app-surface); font: 700 1.35rem/1 'Source Sans 3', sans-serif; transition: transform .2s ease, background .2s ease; }
.ask-form button:hover, .conversation-form button:hover { background: var(--app-blue-deep); transform: translateY(-1px); }
.context-section-label { margin: 30px 4px 14px; color: var(--app-muted); font: 700 .65rem/1 'Archivo', sans-serif; letter-spacing: .13em; text-transform: uppercase; text-align: center; }
.agent-stack { display: grid; justify-items: center; gap: 12px; }
.agent-orb { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 78px; height: 78px; border: 2px solid transparent; border-radius: 50%; background: var(--app-blue); color: var(--app-surface); transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.agent-orb:hover { transform: scale(1.04); }
.agent-orb.is-active { border-color: var(--app-ink); box-shadow: 0 0 0 3px var(--app-surface), 0 0 0 4px var(--app-ink); }
.agent-orb span { font: 800 .57rem/1 'Archivo', sans-serif; }
.agent-orb small { margin-top: 4px; font-size: .54rem; }
.context-footer { display: grid; gap: 23px; margin-top: auto; }
.theme-toggle { display: inline-flex; align-items: center; gap: 12px; padding: 0 4px; background: transparent; color: var(--app-ink); text-align: left; }
.theme-icon { display: grid; place-items: center; width: 25px; height: 25px; color: var(--app-blue); font-size: 1.4rem; }
.theme-label { font: 600 .79rem 'Archivo', sans-serif; }
.context-footer small { color: var(--app-muted); font-size: .6rem; line-height: 1.45; text-align: center; }
.app-main { min-width: 0; min-height: 0; height: 100%; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 18px clamp(22px, 3.3vw, 54px) 72px; background: var(--app-paper); }
.demo-banner { display: flex; align-items: center; gap: 9px; min-height: 24px; color: var(--app-muted); font-size: .71rem; }
.demo-divider { width: 1px; height: 12px; background: var(--app-line); }
.app-view { display: none; max-width: 1280px; margin: 38px auto 0; animation: view-in .35s ease-out both; }
.app-view.is-visible { display: block; }
.app-view[hidden] { display: none; }
/* Funções em sombra (17/10, decisão do utilizador): fora da demo, código guardado para mais tarde (painel Equipa, convites). */
[data-sombra] { display: none !important; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.view-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 42px; }
.view-heading.compact { align-items: center; }
.view-kicker { margin: 0 0 9px; color: var(--app-blue); font: 700 .67rem/1 'Archivo', sans-serif; letter-spacing: .13em; text-transform: uppercase; }
.view-heading h1 { margin: 0; font: 700 clamp(1.7rem, 2.1vw, 2.25rem)/1.05 'Archivo', sans-serif; letter-spacing: -.045em; }
.view-heading p:not(.view-kicker) { margin: 10px 0 0; color: var(--app-muted); font-size: .94rem; }
.view-date { padding-top: 4px; color: var(--app-muted); font-size: .72rem; line-height: 1.45; text-align: right; }
.view-date strong { color: var(--app-ink); font-weight: 600; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.metric-card { display: flex; flex-direction: column; min-width: 0; min-height: 178px; padding: 25px 21px 18px; border: 1px solid var(--app-line); border-radius: 10px; background: var(--app-surface); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.metric-card:hover { border-color: color-mix(in oklab, var(--app-blue), var(--app-line) 50%); box-shadow: 0 10px 24px color-mix(in oklab, var(--app-blue), transparent 91%); transform: translateY(-2px); }
.metric-value { color: var(--app-blue-deep); font: 700 2.2rem/1 'Archivo', sans-serif; letter-spacing: -.06em; }
.metric-label { margin-top: 9px; color: var(--app-muted); font: 700 .62rem/1 'Archivo', sans-serif; letter-spacing: .09em; text-transform: uppercase; }
.metric-card > strong { margin-top: 9px; color: var(--app-ink); font-size: .77rem; font-weight: 600; }
.text-link { display: inline-flex; align-items: center; gap: 6px; width: fit-content; margin-top: auto; padding: 8px 0 0; background: transparent; color: var(--app-blue); font-size: .72rem; font-weight: 700; }
.text-link:hover { color: var(--app-blue-deep); text-decoration: underline; text-underline-offset: 3px; }
.section-title-row { display: flex; align-items: end; justify-content: space-between; gap: 22px; }
.section-title-row { margin: 55px 0 18px; }
.section-title-row h2 { margin: 0; font: 700 1.08rem/1.1 'Archivo', sans-serif; letter-spacing: -.03em; }
.section-helper { color: var(--app-muted); font-size: .75rem; }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.quick-action { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 82px; padding: 14px 15px; border: 1px solid var(--app-line); border-radius: 8px; background: var(--app-surface); color: var(--app-ink); text-align: left; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.quick-action:hover { border-color: var(--app-blue); background: var(--app-blue-soft); transform: translateY(-2px); }
.action-icon { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 29px; border: 1px solid color-mix(in oklab, var(--app-blue), transparent 50%); border-radius: 50%; color: var(--app-blue); font-size: 1.18rem; }
.quick-action strong, .quick-action small { display: block; }
.quick-action > span:nth-child(2) { min-width: 0; }
.quick-action strong { font: 700 .75rem 'Archivo', sans-serif; }
.quick-action small { margin-top: 4px; color: var(--app-muted); font-size: .7rem; }
.action-arrow { margin-left: auto; color: var(--app-blue); font-size: .95rem; }
.recent-heading { margin-top: 54px; }
.quiet-button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--app-line); border-radius: 5px; background: transparent; color: var(--app-muted); font-size: .75rem; font-weight: 600; transition: border-color .2s ease, color .2s ease; }
.quiet-button:hover { border-color: var(--app-blue); color: var(--app-blue); }
.activity-list { overflow: hidden; border: 1px solid var(--app-line); border-radius: 10px; background: var(--app-surface); }
.activity-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 70px; padding: 12px 18px; border-bottom: 1px solid var(--app-line); }
.activity-row:last-child { border-bottom: 0; }
.activity-type, .resource-type { display: grid; place-items: center; width: 34px; height: 28px; border-radius: 4px; font: 700 .56rem/1 'Archivo', sans-serif; letter-spacing: .04em; }
.activity-type.doc, .resource-type.doc { background: oklch(91% .06 260); color: var(--app-blue-deep); }.activity-type.web, .resource-type.web { background: oklch(91% .06 165); color: oklch(38% .09 165); }.activity-type.note, .resource-type.txt { background: oklch(93% .035 80); color: oklch(46% .08 75); }
.activity-row strong, .activity-row small { display: block; }.activity-row strong { font-size: .84rem; font-weight: 600; }.activity-row small { margin-top: 3px; color: var(--app-muted); font-size: .72rem; }.activity-row time { color: var(--app-muted); font-size: .69rem; white-space: nowrap; }
.workspace-symbol { display: grid; place-items: center; width: 54px; height: 54px; background: var(--app-blue); color: var(--app-surface); font: 800 1.85rem/1 'Archivo', sans-serif; transform: skew(-11deg); }
.workspace-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 27px 16px; }
.form-field { display: grid; gap: 8px; }.form-field.full, .form-actions.full { grid-column: 1 / -1; }.form-field label { color: var(--app-muted); font: 700 .64rem/1 'Archivo', sans-serif; letter-spacing: .1em; text-transform: uppercase; }.form-field input, .form-field textarea, .form-field select { width: 100%; border: 1px solid var(--app-line); border-radius: 8px; outline: 0; background: var(--app-surface); color: var(--app-ink); font-size: .88rem; transition: border-color .2s ease, box-shadow .2s ease; }.form-field input, .form-field select { height: 45px; padding: 0 13px; }.form-field textarea { min-height: 88px; padding: 12px 13px; resize: vertical; }.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--app-blue); box-shadow: 0 0 0 3px color-mix(in oklab, var(--app-blue), transparent 87%); }.form-field small { color: var(--app-muted); font-size: .7rem; }.form-actions { display: flex; align-items: center; gap: 16px; margin-top: 4px; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 43px; padding: 0 18px; border-radius: 5px; background: var(--app-blue-deep); color: var(--app-surface); font: 700 .76rem 'Archivo', sans-serif; transition: background .2s ease, transform .2s ease; }.primary-button:hover { background: var(--app-ink); transform: translateY(-1px); }.form-status { color: oklch(41% .11 165); font-size: .76rem; }
.folder-tabs, .category-tabs { display: flex; align-items: center; gap: 10px; overflow-x: auto; border-bottom: 1px solid var(--app-line); }.folder-tabs { padding-bottom: 13px; }.category-tabs { gap: 5px; padding: 13px 0; }.tabs-prefix { margin-right: 4px; color: var(--app-muted); font: 700 .64rem 'Archivo', sans-serif; letter-spacing: .08em; text-transform: uppercase; }.folder-tab, .category-tab { flex: 0 0 auto; padding: 8px 13px; border-radius: 18px; background: transparent; color: var(--app-muted); font-size: .78rem; }.folder-tab:hover, .category-tab:hover { color: var(--app-ink); background: var(--app-soft); }.folder-tab.is-active { background: var(--app-ink); color: var(--app-surface); font-weight: 700; }.category-tab.is-active { background: color-mix(in oklab, var(--app-green), var(--app-surface) 45%); color: oklch(33% .08 165); font-weight: 700; }
.brain-content { min-height: 280px; margin-top: 17px; border: 1px solid var(--app-line); border-radius: 10px; background: var(--app-surface); }.brain-content-header { display: flex; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--app-line); color: var(--app-muted); font-size: .74rem; }.brain-content-header strong { color: var(--app-ink); }.resource-list { padding: 5px 14px; }.resource-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 13px; width: 100%; padding: 14px 4px; border-bottom: 1px solid var(--app-line); background: transparent; color: var(--app-ink); text-align: left; }.resource-row:last-child { border-bottom: 0; }.resource-row:hover .resource-copy strong { color: var(--app-blue); }.resource-type.img { background: oklch(92% .05 300); color: oklch(42% .12 300); }.resource-copy strong, .resource-copy small { display: block; }.resource-copy strong { font-size: .82rem; font-weight: 600; }.resource-copy small { margin-top: 3px; color: var(--app-muted); font-size: .7rem; }.resource-arrow { color: var(--app-blue); }
.member-list { overflow: hidden; border: 1px solid var(--app-line); border-radius: 10px; background: var(--app-surface); }.member-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto 28px; align-items: center; gap: 14px; min-height: 84px; padding: 15px 18px; }.member-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--app-soft); color: var(--app-blue-deep); font: 700 1rem 'Archivo', sans-serif; }.member-info strong, .member-info span, .member-role strong, .member-role span { display: block; }.member-info strong, .member-role strong { font-size: .82rem; font-weight: 700; }.member-info span, .member-role span { margin-top: 3px; color: var(--app-muted); font-size: .72rem; }.member-role { text-align: right; }.member-more { padding: 8px 3px; background: transparent; color: var(--app-muted); letter-spacing: 2px; }.member-more:hover { color: var(--app-blue); }.team-empty { display: flex; align-items: center; gap: 15px; margin-top: 16px; padding: 20px 18px; border: 1px dashed var(--app-line); border-radius: 9px; }.empty-plus { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid var(--app-line); border-radius: 50%; color: var(--app-blue); font-size: 1.25rem; }.team-empty strong { font: 700 .8rem 'Archivo', sans-serif; }.team-empty p { margin: 4px 0 0; color: var(--app-muted); font-size: .75rem; }.team-empty .quiet-button { margin-left: auto; white-space: nowrap; }
.agents-heading { align-items: end; }.agent-selector { display: flex; gap: 5px; padding: 4px; border: 1px solid var(--app-line); border-radius: 7px; background: var(--app-surface); }.selector-agent { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 4px; background: transparent; color: var(--app-muted); font-size: .75rem; font-weight: 600; }.selector-agent.is-active { background: var(--app-blue-soft); color: var(--app-blue-deep); }.mini-avatar { display: inline-grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; color: var(--app-surface); font: 700 .66rem 'Archivo', sans-serif; }.mini-avatar.raquel { background: var(--app-blue); }.mini-avatar.luis { background: oklch(42% .12 260); }.mini-avatar.soia { background: var(--app-ink); }.conversation { display: grid; gap: 20px; max-height: 470px; overflow-y: auto; padding: 24px 0 28px; }.message { max-width: 84%; padding: 16px 18px; border-radius: 10px; font-size: .9rem; line-height: 1.6; }.message p { margin: 10px 0 0; }.user-message { justify-self: end; background: var(--app-soft); color: var(--app-ink); }.agent-message { justify-self: start; border: 1px solid var(--app-line); background: var(--app-surface); }.message-meta { display: flex; align-items: center; gap: 8px; }.message-meta strong { font: 700 .76rem 'Archivo', sans-serif; }.message-meta time { margin-left: 4px; color: var(--app-muted); font-size: .69rem; }.message-sources { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }.message-sources span { padding: 4px 7px; border: 1px solid var(--app-line); border-radius: 3px; color: var(--app-muted); font-size: .64rem; }.conversation-form { padding-top: 15px; border-top: 1px solid var(--app-line); }.conversation-form input { height: 50px; }.conversation-form button { width: 38px; height: 38px; }
.toast { position: fixed; z-index: 20; right: 26px; bottom: 24px; max-width: min(360px, calc(100vw - 40px)); padding: 12px 16px; border: 1px solid color-mix(in oklab, var(--app-blue), transparent 60%); border-radius: 6px; background: var(--app-ink); color: var(--app-surface); font-size: .77rem; box-shadow: 0 12px 26px color-mix(in oklab, var(--app-ink), transparent 78%); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease; }.toast.is-visible { opacity: 1; transform: translateY(0); }
.mobile-app-header { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
body.app-dark .app-page { --app-paper: oklch(14% .025 255); --app-surface: oklch(18% .025 255); --app-soft: oklch(21% .028 255); --app-line: oklch(30% .035 255); --app-ink: oklch(94% .012 250); --app-muted: oklch(67% .025 250); --app-blue: oklch(63% .18 260); --app-blue-deep: oklch(68% .16 255); --app-blue-soft: oklch(25% .08 260); }
body.app-dark .app-sidebar, body.app-dark .context-sidebar, body.app-dark .app-main { background: var(--app-paper); }
body.app-dark .agent-orb.is-active { border-color: var(--app-ink); box-shadow: 0 0 0 3px var(--app-paper), 0 0 0 4px var(--app-ink); }
body.app-dark .theme-icon { color: var(--app-green); }

@media (max-width: 1180px) {
	.app-layout { grid-template-columns: 188px 245px minmax(0, 1fr); }.metric-grid, .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
	.mobile-app-header { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 18px; border-bottom: 1px solid var(--app-line); background: var(--app-surface); }.mobile-menu-button { display: grid; gap: 4px; padding: 8px; background: transparent; }.mobile-menu-button span { display: block; width: 20px; height: 2px; background: var(--app-ink); }.app-layout { display: block; min-height: 0; }.app-sidebar { position: static; z-index: auto; display: block; width: auto; max-height: 0; overflow: hidden; padding: 0 18px; border-right: 0; border-bottom: 1px solid transparent; transform: none; box-shadow: none; transition: max-height .3s ease, padding .3s ease; }.app-sidebar:hover, .app-sidebar:focus-within, .app-sidebar.is-open { transform: none; box-shadow: none; }.sidebar-reveal-hint { display: none; }.menu-open .app-sidebar { max-height: 350px; padding: 12px 18px 18px; border-bottom-color: var(--app-line); }.desktop-wordmark { display: none; }.app-nav { display: flex; gap: 4px; overflow-x: auto; margin: 0; padding-bottom: 2px; }.nav-item { flex: 0 0 auto; justify-content: flex-start; width: auto; padding: 10px 12px; }.nav-item .nav-label { display: block; }.sidebar-demo-note { justify-content: flex-start; margin-top: 12px; padding: 0; }.sidebar-demo-note > span:last-child { display: inline; }.context-sidebar { display: grid; grid-template-columns: 195px minmax(220px, 1fr); gap: 18px 24px; padding: 17px 18px; border-right: 0; border-bottom: 1px solid var(--app-line); transform: none; transition: none; }.context-brand { grid-row: span 2; }.context-brand p { margin-bottom: 8px; }.context-mark { display: none; }.ask-form { align-self: center; }.context-section-label { display: none; }.agent-stack { display: flex; align-items: center; justify-content: flex-start; gap: 9px; }.agent-orb { width: 58px; height: 58px; }.agent-orb small { display: none; }.context-footer { grid-column: 2; display: flex; justify-content: space-between; align-items: center; margin-top: 0; }.context-footer small { display: none; }.app-main { padding: 15px 20px 55px; transform: none; transition: none; }.app-view { margin-top: 32px; }.view-heading { margin-bottom: 30px; }
}
@media (max-width: 560px) {
	.mobile-app-header { min-height: 58px; }.context-sidebar { display: block; padding: 16px 14px 14px; }.context-brand { display: flex; align-items: center; gap: 9px; text-align: left; }.context-brand p { margin: 0 0 0 auto; font-size: .68rem; }.ask-form { margin-top: 15px; }.agent-stack { margin-top: 14px; }.context-footer { margin-top: 14px; }.theme-toggle { padding: 0; }.app-main { padding-inline: 14px; }.demo-banner { flex-wrap: wrap; gap: 7px; }.demo-divider { display: none; }.view-heading, .section-title-row { display: block; }.view-date, .section-helper { display: block; margin-top: 10px; text-align: left; }.view-heading .primary-button { margin-top: 18px; }.metric-grid, .quick-actions, .workspace-form { grid-template-columns: 1fr; }.metric-card { min-height: 145px; }.quick-action { min-height: 70px; }.section-title-row, .recent-heading { margin-top: 38px; }.activity-row { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding-inline: 12px; }.activity-row time { grid-column: 2; }.workspace-symbol { display: none; }.form-actions { align-items: flex-start; flex-direction: column; }.folder-tabs, .category-tabs { margin-right: -14px; padding-right: 14px; }.brain-content-header { align-items: flex-start; flex-direction: column; gap: 5px; }.team-empty { align-items: flex-start; flex-wrap: wrap; }.team-empty .quiet-button { margin-left: 50px; }.member-row { grid-template-columns: 36px minmax(0, 1fr) 25px; padding-inline: 12px; }.member-role { display: none; }.agents-heading { display: flex; flex-direction: column; }.agent-selector { width: 100%; }.selector-agent { flex: 1; justify-content: center; }.message { max-width: 94%; }.conversation { max-height: none; }.toast { right: 14px; bottom: 14px; }
}

@media (max-width: 820px) {
	.app-layout { display: flex; flex-direction: column; height: auto; }
	.context-sidebar { flex: 0 0 auto; }
	.app-main { flex: 1 1 auto; height: auto; }
}

/* Responder a uma resposta específica (seta no canto, como no
   WhatsApp): evita que o agente responda sempre à última troca
   quando o utilizador quer voltar a uma resposta anterior. */
.app-page .agent-message {
	position: relative;
	padding-right: 40px;
}
/* Pedido do utilizador (16/10): a seta fica no canto inferior direito
   (à mão, sem subir até ao início de uma resposta longa), sempre
   visível e num azul mais marcado. */
.app-page .message-reply-button {
	position: absolute;
	bottom: 10px;
	right: 10px;
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 1px solid var(--app-blue);
	border-radius: 50%;
	background: var(--app-surface);
	color: var(--app-blue-deep);
	opacity: 1;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.app-page .message-reply-button:hover,
.app-page .message-reply-button:focus-visible {
	background: var(--app-blue);
	color: var(--app-surface);
	border-color: var(--app-blue);
}
.app-page .reply-preview {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	padding: 8px 10px;
	border-left: 3px solid var(--app-blue);
	border-radius: 6px;
	background: var(--app-blue-soft);
	color: var(--app-ink);
	font-size: .78rem;
}
.app-page .reply-preview strong {
	flex: 0 0 auto;
	color: var(--app-blue-deep);
	font: 700 .74rem 'Archivo', sans-serif;
}
.app-page .reply-preview-text {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.app-page .reply-preview-cancel {
	flex: 0 0 auto;
	padding: 2px 7px;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: var(--app-muted);
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
}
.app-page .reply-preview-cancel:hover {
	background: var(--app-soft);
	color: var(--app-ink);
}

/* Rodapé (modo escuro) na 1.ª coluna; agente seleccionado a azul, os outros a cinzento. */
.app-sidebar .context-footer { margin-top: auto; gap: 10px; padding: 0 4px 12px; }
.app-sidebar .context-footer + .sidebar-demo-note { margin-top: 0; }
.agent-orb:not(.is-active) { background: oklch(66% .012 255); }
.agent-orb:not(.is-active):hover { background: oklch(58% .05 258); }
.agent-orb.is-active { border-color: var(--app-blue-deep); box-shadow: 0 0 0 3px var(--app-surface), 0 0 0 5px var(--app-blue); }
body.app-dark .agent-orb.is-active { border-color: var(--app-blue-deep); box-shadow: 0 0 0 3px var(--app-paper), 0 0 0 5px var(--app-blue); }
body.app-dark .agent-orb:not(.is-active) { background: oklch(42% .012 255); }

/* Botão "Procurar nos documentos" (camada de cortesia): sem caixa de mensagem à volta. */
.app-page .message.soia-search-offer { padding: 0; border: 0; background: transparent; }

/* Botão "Parar" (16/10): ao lado do botão de enviar, só enquanto há
   um pedido em curso. */
.app-page .conversation-form .soia-stop-button { right: 50px; width: auto; height: 34px; padding: 0 14px; border-radius: 17px; background: #b3261e; color: #fff; font: 700 .78rem/1 'Archivo', sans-serif; }
.app-page .conversation-form .soia-stop-button:hover { background: #8f1d17; }
.app-page .conversation-form .soia-stop-button[hidden] { display: none; }

/* Caixas que pedem uma decisão (guardar no Brain): limite azul-escuro
   mais grosso (pedido do utilizador, 16/10). */
.app-page .message.soia-decision-card { border: 2px solid #1f3f7a; }
.app-page .soia-search-offer .quiet-button { border: 1px solid var(--app-line); }
.app-page .soia-search-offer .quiet-button:hover { border-color: var(--app-blue); }
