:root {
    --bg: #fbf8f3;
    --surface: #fffdf9;
    --surface-alt: #f6f0e7;
    --ink: #10251f;
    --ink-soft: #284139;
    --muted: #65736d;
    --line: rgba(16, 37, 31, .16);
    --sidebar: #f6f0e7;
    --sidebar-soft: #fffdf9;
    --sidebar-text: #10251f;
    --purple: #10251f;
    --purple-dark: #284139;
    --purple-pale: #f0ffd0;
    --green: #315b3d;
    --green-pale: #edf5e6;
    --orange: #80530f;
    --orange-pale: #fff0c9;
    --red: #a43b32;
    --red-pale: #fde8e3;
    --blue: #24576a;
    --shadow: 0 1px 2px rgba(16, 37, 31, .08);
    --radius: 16px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--bg); font: 14px/1.45 Geist, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(99, 91, 219, .25); outline-offset: 2px; }
button[hidden], [hidden] { display: none !important; }
a { color: inherit; }

.skip-link { position: fixed; z-index: 30; top: -50px; left: 12px; padding: 9px 12px; border-radius: 7px; color: #fff; background: var(--purple); text-decoration: none; }
.skip-link:focus { top: 12px; }
.saas-shell { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0, 1fr); }

.app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 12; width: 264px; display: flex; flex-direction: column; color: var(--sidebar-text); background: var(--sidebar); padding: 24px 13px 15px; }
.sidebar-top { position: relative; }
.brand { display: flex; align-items: center; gap: 8px; padding: 0 11px 24px; color: #fff; font-size: 21px; font-weight: 800; letter-spacing: -1.2px; text-decoration: none; }
.brand > span:last-child > span { color: #a59dfd; }
.workspace-switcher { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid #24344e; border-radius: 11px; color: #eff3fb; background: #15223a; text-align: left; transition: border .2s, background .2s; }
.workspace-switcher:hover { border-color: #3d5073; background: #192842; }
.workspace-avatar { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #10251f; background: #c6fd4d; font-size: 10px; font-weight: 800; }
.workspace-copy { min-width: 0; display: grid; gap: 1px; }
.workspace-copy b { overflow: hidden; max-width: 160px; color: #fff; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-copy small { color: #8fa0bc; font-size: 10px; }
.chevron { margin-left: auto; color: #8291aa; font-size: 17px; }
.workspace-popover, .user-popover { position: absolute; z-index: 20; width: calc(100% - 10px); left: 5px; border: 1px solid #2c3d58; border-radius: 10px; padding: 7px; color: var(--ink); background: #fff; box-shadow: 0 16px 40px rgba(0,0,0,.22); }
.workspace-popover { top: 100%; margin-top: 7px; }
.workspace-popover > p { margin: 5px 8px 7px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .8px; }
.workspace-popover button { width: 100%; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 7px; padding: 8px; color: var(--ink); background: transparent; text-align: left; }
.workspace-popover button:hover { background: #f1f2fe; }
.workspace-popover button span:not(.workspace-avatar) { display: grid; gap: 1px; }
.workspace-popover b { font-size: 12px; }.workspace-popover small { color: var(--muted); font-size: 10px; }

.sidebar-nav { padding: 27px 3px 0; overflow-y: auto; }
.nav-label { margin: 0 9px 7px; color: #6f7f99; font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.nav-label-spaced { margin-top: 22px; }
.nav-link { width: 100%; display: flex; align-items: center; gap: 11px; min-height: 38px; padding: 8px 9px; border: 0; border-radius: 8px; color: #aebbd0; background: transparent; text-align: left; font-size: 13px; font-weight: 650; transition: color .15s, background .15s; }
.nav-link > i { width: 16px; color: #91a2be; font-style: normal; text-align: center; font-size: 16px; }
.nav-link:hover { color: #fff; background: #192942; }.nav-link.active { color: #fff; background: #293b61; }.nav-link.active > i { color: #aeabff; }
.nav-count { min-width: 18px; height: 18px; display: grid; place-items: center; margin-left: auto; border-radius: 99px; color: #c8c5ff; background: #3c4d75; font-size: 10px; }
.sidebar-footer { position: relative; margin-top: auto; padding: 14px 4px 0; border-top: 1px solid #26364f; }
.security-state { display: flex; align-items: center; gap: 8px; padding: 1px 7px 13px; }.security-state > span { width: 7px; height: 7px; border-radius: 50%; background: #5dd0ad; box-shadow: 0 0 0 4px rgba(93,208,173,.12); }.security-state div { display: grid; }.security-state b { color: #dce5f4; font-size: 10px; }.security-state small { color: #7687a3; font-size: 9px; }
.user-card { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; padding: 7px; border-radius: 9px; color: #e7edf8; background: transparent; text-align: left; }.user-card:hover { background: var(--sidebar-soft); }.user-card > span:nth-child(2) { display: grid; gap: 1px; min-width: 0; }.user-card b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.user-card small { color: #7d8da8; font-size: 9px; }.user-card > i { margin-left: auto; color: #8798b3; font-style: normal; letter-spacing: 1px; }.user-avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; background: #c27565; font-size: 9px; font-weight: 800; }
.user-popover { bottom: 52px; }.user-popover button { display: block; width: 100%; border: 0; padding: 8px; border-radius: 6px; color: var(--ink); background: transparent; text-align: left; font-size: 12px; }.user-popover button:hover { background: #f1f2fe; }

.app-main { grid-column: 2; min-width: 0; padding: 0 42px 64px; }
.app-topbar { min-width: 0; height: 73px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }.breadcrumb { min-width: 0; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }.breadcrumb b { color: #b1bbc9; font-weight: 500; }.breadcrumb strong { overflow: hidden; color: var(--ink); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }.topbar-tools { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }.icon-button { position: relative; min-width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; color: #69768d; background: #fff; }.icon-button:hover { color: var(--purple); border-color: #cfcef4; }.icon-button span { margin-left: 2px; font-size: 9px; font-weight: 800; }.notification-button { font-size: 18px; }.notification-button em { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border: 1px solid #fff; border-radius: 50%; background: var(--red); }.mobile-menu { display: none; }
.button { min-height: 37px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 8px; padding: 8px 13px; font-size: 12px; font-weight: 750; text-decoration: none; transition: background .18s, border .18s, transform .18s; }.button:hover { transform: translateY(-1px); }.button-primary { color: #fff; background: var(--purple); box-shadow: 0 4px 10px rgba(99,91,219,.17); }.button-primary:hover { background: var(--purple-dark); }.button-secondary { border-color: #dce2ec; color: var(--ink); background: #fff; }.button-secondary:hover { border-color: #bfc6da; background: #fafbfe; }.top-create { margin-left: 4px; }.top-create span, .hero-actions .button span { font-size: 16px; line-height: 9px; }

.connection-banner { min-height: 48px; display: flex; align-items: center; gap: 10px; margin: 20px 0 0; border: 1px solid #e0ddfa; border-radius: 10px; padding: 10px 13px; color: #514d94; background: #f2f1ff; font-size: 12px; }.connection-banner .banner-symbol { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: #625bd9; background: #e2e1ff; font-size: 11px; }.connection-banner p { margin: 0; }.connection-banner b { font-weight: 800; }.connection-banner button { margin-left: auto; border: 0; padding: 0; color: #5853cb; background: transparent; font-size: 11px; font-weight: 800; white-space: nowrap; }.connection-banner button span { font-size: 15px; }.connection-banner.live { border-color: #ccecdf; color: #27765e; background: #effbf6; }.connection-banner.live .banner-symbol { color: #138f6b; background: #d7f5e9; }.connection-banner.live button { color: #178260; }

.view { padding-top: 36px; }.page-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }.page-hero .eyebrow { margin-bottom: 7px; }.page-hero h1 { margin: 0; color: #172137; font-size: 30px; line-height: 1.14; letter-spacing: -1.2px; }.overview-hero h1 span { color: #827bea; font-size: 19px; vertical-align: 5px; }.hero-subtitle { max-width: 620px; margin: 8px 0 0; color: var(--muted); font-size: 13px; }.hero-actions { display: flex; gap: 8px; flex: 0 0 auto; }.page-hero.compact { margin-bottom: 22px; }.page-hero.compact h1 { font-size: 29px; }.eyebrow { margin: 0; color: #7f8ba0; font-size: 9px; font-weight: 850; letter-spacing: 1.05px; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 15px; }.metric-card, .surface { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }.metric-card { min-height: 137px; padding: 17px; }.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 700; }.metric-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--purple); background: var(--purple-pale); font-size: 16px; }.metric-icon.green { color: var(--green); background: var(--green-pale); }.metric-icon.orange { color: var(--orange); background: var(--orange-pale); }.metric-icon.blue { color: var(--blue); background: #eef5ff; }.metric-card strong { display: block; margin-top: 13px; color: #1e2941; font-size: 27px; letter-spacing: -1px; }.metric-card small { display: block; margin-top: 3px; color: #8994a7; font-size: 10px; }.metric-card small.positive { color: var(--green); font-weight: 700; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr); gap: 15px; }.lower-grid { margin-top: 15px; grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr); }.surface { padding: 21px; }.surface-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }.surface h2 { margin: 3px 0 0; color: #1e2940; font-size: 17px; letter-spacing: -.45px; }.link-button { border: 0; padding: 1px 0; color: var(--purple); background: transparent; font-size: 11px; font-weight: 800; }.link-button:hover { text-decoration: underline; }
.activity-list { display: grid; }.activity-row { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid #edf0f5; }.activity-row:first-child { padding-top: 0; border-top: 0; }.activity-symbol { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--purple); background: #f0efff; font-size: 13px; }.activity-symbol.success { color: var(--green); background: var(--green-pale); }.activity-symbol.warning { color: var(--orange); background: var(--orange-pale); }.activity-copy { min-width: 0; }.activity-copy b { display: block; overflow: hidden; color: #344158; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.activity-copy p { margin: 1px 0 0; color: var(--muted); font-size: 10px; }.activity-row time { color: #9aa4b3; font-size: 10px; white-space: nowrap; }
.trend-up { border-radius: 5px; padding: 3px 6px; color: var(--green); background: var(--green-pale); font-size: 10px; font-weight: 800; }.completion-visual { display: grid; grid-template-columns: 125px minmax(0,1fr); align-items: center; min-height: 151px; }.donut { width: 112px; height: 112px; display: grid; place-items: center; border-radius: 50%; background: var(--sage, #a9c8b7); }.donut::before { content: ""; position: absolute; width: 83px; height: 83px; border-radius: 50%; background: #fff; }.donut > div { position: relative; z-index: 1; display: grid; text-align: center; }.donut strong { color: #27334c; font-size: 22px; letter-spacing: -1px; }.donut small { color: var(--muted); font-size: 9px; }.legend-list { display: grid; gap: 10px; }.legend-list > div { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 7px; }.legend-list b { color: #59657a; font-size: 11px; }.legend-list strong { color: #27334b; font-size: 12px; }.legend-dot { width: 7px; height: 7px; border-radius: 50%; }.legend-dot.completed { background: var(--purple); }.legend-dot.waiting { background: #b9c2d2; }.legend-dot.expired { background: #edc278; }.wide-link { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-top: 9px; border: 0; border-top: 1px solid #edf0f5; padding: 14px 0 0; color: var(--purple); background: transparent; font-size: 11px; font-weight: 800; text-align: left; }.wide-link:hover { color: var(--purple-dark); }.wide-link span { font-size: 15px; }
.mini-request-list { display: grid; }.mini-request { display: grid; grid-template-columns: 31px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #edf0f5; }.mini-request:first-child { padding-top: 0; border-top: 0; }.file-symbol { display: grid; place-items: center; width: 30px; height: 34px; border: 1px solid #e2e6f1; border-radius: 7px; color: #e35b5b; background: #fff8f8; font-size: 9px; font-weight: 800; }.mini-request b { display: block; overflow: hidden; color: #38445a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.mini-request small { color: var(--muted); font-size: 10px; }.status-pill { display: inline-flex; align-items: center; justify-content: center; border-radius: 50px; padding: 4px 7px; font-size: 9px; font-weight: 850; white-space: nowrap; }.status-pill.waiting { color: #a66e18; background: var(--orange-pale); }.status-pill.completed, .status-pill.healthy { color: #158564; background: var(--green-pale); }.status-pill.draft { color: #64748b; background: #edf0f5; }.status-pill.expired, .status-pill.cancelled { color: #b84e4e; background: var(--red-pale); }.status-pill.warning { color: #aa731c; background: var(--orange-pale); }
.launch-surface { background: var(--vs-ink, #10251f); border-color: var(--vs-ink, #10251f); color: #fff; box-shadow: 0 13px 34px rgba(16,37,31,.16); }.launch-surface .eyebrow { color: var(--vs-lime, #c8f04d); }.launch-surface h2 { color: #fff; margin-top: 4px; }.launch-surface > p { max-width: 370px; margin: 8px 0 15px; color: #e1ebe5; font-size: 12px; }.launch-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }.launch-list li { display: grid; grid-template-columns: 25px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid rgba(246,240,231,.18); }.launch-list li > span { display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid var(--vs-sage, #a9c8b7); border-radius: 50%; color: #f6f0e7; font-size: 9px; font-weight: 800; }.launch-list li.done > span { border-color: var(--vs-lime, #c8f04d); color: #10251f; background: var(--vs-lime, #c8f04d); }.launch-list b { display: block; color: #fff; font-size: 11px; }.launch-list small { color: #c7d4cd; font-size: 9px; }.launch-list button { border: 0; padding: 0; color: var(--vs-lime, #c8f04d); background: transparent; font-size: 10px; font-weight: 800; }.launch-list button:hover { color: #fff; text-decoration: underline; }

.document-launchpad { display: grid; gap: 18px; margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--surface); box-shadow: var(--shadow); }
.document-launchpad > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.document-launchpad > header h2 { margin: 4px 0 0; color: var(--ink); font-size: 17px; letter-spacing: -.35px; }
.document-launchpad > header > p { max-width: 380px; margin: 0; color: var(--muted); font-size: 11px; text-align: right; }
.signature-entry-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.signature-entry { position: relative; min-width: 0; min-height: 174px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; align-items: start; gap: 14px; border: 1px solid var(--line); border-radius: 11px; padding: 15px; color: var(--ink); background: var(--surface); text-align: left; transition: border-color .18s ease, background-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.signature-entry:hover { border-color: var(--ink); background: var(--surface-alt); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(25, 35, 60, .08); }
.signature-entry:active { transform: translateY(0); }
.signature-entry.featured { border-color: color-mix(in srgb, var(--purple) 42%, var(--line)); background: var(--purple-pale); }
.signature-entry.featured:hover { border-color: var(--purple); }
.signature-entry-icon { min-width: 44px; width: max-content; height: 44px; display: inline-grid; place-items: center; border: 1px solid color-mix(in srgb, var(--purple) 24%, var(--line)); border-radius: 10px 10px 10px 4px; padding: 0 8px; color: var(--purple); background: var(--surface); font-size: 10px; font-weight: 850; letter-spacing: .03em; }
.signature-entry.featured .signature-entry-icon { color: #fff; border-color: var(--purple); background: var(--purple); font-size: 19px; }
.signature-entry > span:not(.signature-entry-icon) { min-width: 0; display: grid; gap: 4px; }
.signature-entry b { display: block; color: var(--ink); font-size: 13px; }
.signature-entry small { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; }
.signature-entry strong { align-self: end; color: var(--purple); font-size: 10px; font-weight: 850; }

.template-journey { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 11px; padding: 14px 16px; background: var(--surface); }
.template-journey > div { min-width: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 10px; }
.template-journey > div > span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; color: var(--ink); background: var(--purple-pale); font-size: 10px; font-weight: 850; }
.template-journey p { min-width: 0; margin: 0; }
.template-journey b, .template-journey small { display: block; }
.template-journey b { color: var(--ink); font-size: 11px; }
.template-journey small { margin-top: 2px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.template-journey > i { color: var(--muted); font-style: normal; font-size: 15px; }
.library-tabs { display: flex; align-items: center; gap: 4px; margin: 22px 0 0; border-bottom: 1px solid var(--line); }
.library-tabs button { position: relative; min-height: 44px; border: 0; padding: 10px 14px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 800; }
.library-tabs button:hover, .library-tabs button.active { color: var(--ink); }
.library-tabs button.active::after { content: ''; position: absolute; right: 10px; bottom: -1px; left: 10px; height: 2px; background: var(--purple); }
.library-tabs button span { margin-left: 5px; border-radius: 20px; padding: 2px 6px; color: inherit; background: var(--surface-alt); font-size: 9px; }
.library-context { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 18px 2px 12px; }
.library-context h2 { margin: 3px 0 0; color: var(--ink); font-size: 16px; }
.library-context > p { max-width: 480px; margin: 0; color: var(--muted); font-size: 11px; text-align: right; }
.table-inline-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: max-content; }
.link-button.danger { color: var(--red); }
.request-participant-list { display: grid; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.request-participant-row, .envelope-detail-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 62px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.request-participant-row:last-child, .envelope-detail-row:last-child { border-bottom: 0; }
.request-participant-row b, .envelope-detail-row b { display: block; color: var(--ink); font-size: 11px; }
.request-participant-row small, .envelope-detail-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.request-detail-footer { justify-content: space-between; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }

@media (max-width: 1180px) {
    .signature-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .document-launchpad { padding: 16px; }
    .document-launchpad > header { align-items: flex-start; flex-direction: column; gap: 7px; }
    .document-launchpad > header > p { max-width: 520px; text-align: left; }
    .template-journey { grid-template-columns: 1fr; gap: 10px; }
    .template-journey > i { display: none; }
    .library-context { align-items: flex-start; flex-direction: column; gap: 5px; }
    .library-context > p { text-align: left; }
    .request-participant-row, .envelope-detail-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
    .request-participant-row > .inline-actions { grid-column: 2 / -1; justify-content: flex-start; }
}

@media (max-width: 520px) {
    .signature-entry-grid { grid-template-columns: 1fr; }
    .signature-entry { min-height: 0; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; gap: 5px 12px; }
    .signature-entry-icon { grid-row: 1 / span 2; }
    .signature-entry strong { grid-column: 2; margin-top: 4px; }
}

/* Links únicos preservam hierarquia e ações sem concatenar rótulos. */
.request-link-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.request-link-row > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.request-link-row > span small {
  display: block;
}

@media (max-width: 520px) {
  .request-link-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .request-link-row > span {
    grid-column: 1 / -1;
  }
}

.filter-bar { display: flex; align-items: center; gap: 7px; margin-bottom: 15px; }.search-field { min-width: 260px; max-width: 365px; display: flex; align-items: center; gap: 7px; margin-right: 4px; border: 1px solid #dfe4ee; border-radius: 8px; padding: 0 10px; color: #8c97aa; background: #fff; }.search-field:focus-within { border-color: #aaa7ec; box-shadow: 0 0 0 3px #eeedff; }.search-field span { font-size: 18px; line-height: 1; }.search-field input { width: 100%; height: 36px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }.search-field input::placeholder { color: #9ba5b5; }.filter-button { min-height: 31px; border: 1px solid #e0e5ee; border-radius: 7px; padding: 5px 9px; color: #6c778b; background: #fff; font-size: 10px; font-weight: 750; }.filter-button:hover { border-color: #c0c3ec; color: var(--purple); }.filter-button.active { border-color: #d5d3f7; color: var(--purple); background: var(--purple-pale); }.filter-button span { display: inline-grid; place-items: center; min-width: 15px; height: 15px; margin-left: 3px; border-radius: 50%; color: var(--purple); background: #e2e1ff; font-size: 8px; }.filter-context { margin-left: auto; color: var(--muted); font-size: 11px; }
.table-surface { padding: 0; overflow: hidden; }.table-scroll { width: 100%; overflow-x: auto; }.data-table { width: 100%; min-width: 680px; border-collapse: collapse; }.data-table th { height: 44px; padding: 0 18px; border-bottom: 1px solid #eef0f5; color: #8893a6; background: #fbfcfe; text-align: left; font-size: 9px; font-weight: 850; letter-spacing: .65px; text-transform: uppercase; }.data-table td { padding: 12px 18px; border-top: 1px solid #eef0f5; color: #566277; font-size: 11px; }.data-table tbody tr { transition: background .15s; }.data-table tbody tr:hover { background: #fafaff; }.data-table tbody tr:first-child td { border-top: 0; }.document-cell { display: flex; align-items: center; gap: 10px; min-width: 190px; }.document-cell .file-symbol { flex: 0 0 auto; }.document-cell b { display: block; max-width: 270px; overflow: hidden; color: #344057; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.document-cell small { color: #8d98aa; font-size: 10px; }.table-action { border: 0; padding: 4px; color: #77839a; background: transparent; font-size: 16px; }.table-action:hover { color: var(--purple); }.empty-table { display: grid; justify-items: center; padding: 55px 20px; text-align: center; }.empty-table > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: var(--purple); background: var(--purple-pale); font-size: 20px; }.empty-table h2 { margin: 10px 0 2px; font-size: 15px; }.empty-table p { margin: 0 0 13px; color: var(--muted); font-size: 11px; }

.contact-cell { display: flex; align-items: center; gap: 9px; }.contact-avatar { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--vs-ink, #10251f); background: var(--vs-coral, #ff8468); font-size: 9px; font-weight: 800; }.contact-cell b { display: block; color: #38455b; font-size: 11px; }.contact-cell small { color: var(--muted); font-size: 9px; }.empty-cell { padding: 34px !important; color: var(--muted) !important; text-align: center; }.text-danger { color: var(--red); }.muted { color: var(--muted); font-size: 11px; }

.request-summary { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }.request-summary article, .company-kpis article { display: grid; gap: 3px; min-height: 75px; border: 1px solid var(--line); border-radius: 11px; padding: 13px 15px; background: #fff; }.request-summary span, .company-kpis span { color: var(--muted); font-size: 10px; font-weight: 700; }.request-summary strong, .company-kpis strong { color: #29354d; font-size: 21px; letter-spacing: -.8px; }.request-summary small, .company-kpis small { color: #98a1b0; font-size: 9px; }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }.template-card { min-height: 206px; position: relative; display: flex; flex-direction: column; padding: 18px; }.template-card.featured { border-color: var(--vs-sage, #a9c8b7); background: var(--vs-porcelain, #f6f0e7); }.template-card .template-icon { display: grid; place-items: center; width: 34px; height: 38px; margin-bottom: 14px; border-radius: 8px; color: #e05a5a; background: #fff0f0; font-size: 10px; font-weight: 800; }.template-card .template-icon.purple { color: var(--purple); background: var(--purple-pale); }.template-card h2 { font-size: 15px; }.template-card p { min-height: 37px; margin: 5px 0 13px; color: var(--muted); font-size: 11px; }.template-meta { display: flex; gap: 6px; margin-top: auto; }.template-meta span { border-radius: 99px; padding: 3px 6px; color: #66738b; background: #eef1f6; font-size: 9px; font-weight: 700; }.template-card .wide-link { margin-top: 11px; }.template-menu { position: absolute; top: 15px; right: 14px; border: 0; color: #8590a3; background: transparent; font-weight: 800; }

.integration-cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; margin-bottom: 15px; }.integration-card { min-height: 222px; position: relative; display: grid; grid-template-columns: 39px minmax(0,1fr); gap: 11px; align-content: start; }.integration-card .status-pill { position: absolute; top: 17px; right: 17px; }.integration-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; color: #fff; font-size: 18px; }.api-icon { background: var(--vs-ink, #10251f); }.webhook-icon { background: #20755f; }.mcp-icon { color: var(--vs-ink, #10251f); background: var(--vs-coral, #ff8468); }.integration-card h2 { font-size: 15px; }.integration-card p { margin: 5px 0; color: var(--muted); font-size: 10px; }.integration-card .wide-link { grid-column: 1/-1; align-self: end; }.content-grid-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0,1fr); gap: 15px; }.key-list { display: grid; }.key-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; padding: 11px 0; border-top: 1px solid #edf0f5; }.key-row:first-child { padding-top: 0; border-top: 0; }.key-row b { display: block; color: #364258; font-size: 11px; }.key-row code { margin-left: 3px; border-radius: 4px; padding: 2px 4px; color: #63708a; background: #f0f2f6; font-size: 9px; }.key-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }.key-row div:last-child { display: flex; align-items: center; gap: 7px; }.revoke-key { border: 0; padding: 0; color: var(--red); background: transparent; font-size: 10px; font-weight: 750; }.revoke-key:hover { text-decoration: underline; }.code-surface { color: #edf0ff; background: #17213a; border-color: #17213a; }.code-surface .eyebrow { color: #a7b1da; }.code-surface h2 { color: #fff; }.code-surface p { margin: 14px 0 0; color: #b5bed6; font-size: 10px; }.code-surface pre, .key-reveal pre { overflow: auto; margin: 0; color: #e0e5ff; font: 10px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }.copy-code { border: 0; color: #bfc3ff; background: transparent; font-size: 10px; font-weight: 800; }.copy-code:hover { color: #fff; text-decoration: underline; }.endpoint-surface { display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 18px; margin-top: 15px; align-items: center; }.endpoint-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }.endpoint-list a { display: grid; gap: 4px; min-height: 76px; border: 1px solid #e6eaf1; border-radius: 8px; padding: 10px; color: var(--ink); text-decoration: none; }.endpoint-list a:hover { border-color: #bdbbf1; background: #fbfbff; }.endpoint-list b { color: var(--green); font-size: 9px; }.endpoint-list code { color: #4b5870; font-size: 9px; }.endpoint-list span { color: var(--muted); font-size: 9px; }

.mcp-hero { min-height: 220px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; overflow: hidden; border-color: var(--vs-ink, #10251f); color: #fff; background: var(--vs-ink, #10251f); }.mcp-badge { display: inline-block; border: 1px solid var(--vs-sage, #a9c8b7); border-radius: 5px; padding: 4px 6px; color: #f6f0e7; background: rgba(255,255,255,.08); font-size: 9px; font-weight: 850; letter-spacing: .8px; }.mcp-hero h2 { max-width: 520px; margin-top: 10px; color: #fff; font-size: 22px; }.mcp-hero p { max-width: 560px; color: #d5e0da; font-size: 12px; }.mcp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }.mcp-tags span { border: 1px solid rgba(246,240,231,.3); border-radius: 99px; padding: 4px 7px; color: #f6f0e7; background: rgba(255,255,255,.08); font-size: 9px; font-weight: 700; }.mcp-orbit { position: relative; width: 170px; height: 170px; margin-right: 27px; border: 1px solid rgba(246,240,231,.2); border-radius: 50%; }.mcp-orbit::before, .mcp-orbit::after { content: ""; position: absolute; border: 1px solid rgba(246,240,231,.16); border-radius: 50%; }.mcp-orbit::before { inset: 19px; }.mcp-orbit::after { inset: 43px; }.mcp-orbit > span { position: absolute; inset: 57px; z-index: 2; display: grid; place-items: center; border-radius: 50%; color: var(--vs-ink, #10251f); background: var(--vs-lime, #c8f04d); font-size: 23px; box-shadow: 0 0 30px rgba(200,240,77,.28); }.mcp-orbit i { position: absolute; z-index: 3; width: 8px; height: 8px; border-radius: 50%; background: var(--vs-lime, #c8f04d); }.mcp-orbit i:nth-child(2) { top: 21px; right: 29px; }.mcp-orbit i:nth-child(3) { bottom: 16px; left: 33px; background: var(--vs-sage, #a9c8b7); }.mcp-orbit i:nth-child(4) { top: 79px; left: -4px; background: var(--vs-coral, #ff8468); }.mcp-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }.mcp-tools div { min-height: 67px; border: 1px solid #e7eaf1; border-radius: 8px; padding: 9px; background: #fafbfe; }.mcp-tools code { color: var(--purple); font-size: 10px; font-weight: 800; }.mcp-tools span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }

.company-kpis { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 15px; }.audit-surface { padding: 0; overflow: hidden; }.audit-toolbar { display: flex; align-items: center; gap: 10px; padding: 15px 19px; border-bottom: 1px solid #edf0f5; }.audit-toolbar p { margin: 0; color: var(--muted); font-size: 10px; }.audit-list { padding: 0 19px; }.audit-event { display: grid; grid-template-columns: 35px minmax(0,1fr) auto; gap: 11px; align-items: center; min-height: 68px; border-top: 1px solid #edf0f5; }.audit-event:first-child { border-top: 0; }.audit-event-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--purple); background: var(--purple-pale); }.audit-event b { display: block; color: #37435a; font-size: 11px; }.audit-event p { margin: 1px 0 0; color: var(--muted); font-size: 10px; }.audit-event time { color: #97a1b1; font-size: 10px; white-space: nowrap; }

.settings-layout { display: grid; grid-template-columns: 190px minmax(0,650px); gap: 16px; align-items: start; }.settings-nav { border: 1px solid var(--line); border-radius: 12px; padding: 7px; background: #fff; }.settings-nav button { display: block; width: 100%; border: 0; border-radius: 7px; padding: 9px 10px; color: #6f7b8e; background: transparent; text-align: left; font-size: 11px; font-weight: 700; }.settings-nav button:hover { color: var(--purple); background: #f4f3ff; }.settings-nav button.active { color: var(--purple); background: var(--purple-pale); }.settings-panels { min-width: 0; }.setting-panel { display: grid; gap: 14px; }.setting-panel h2 { margin: -8px 0 3px; }.setting-panel label { display: grid; gap: 5px; color: #526076; font-size: 10px; font-weight: 800; }.setting-panel input:not([type=checkbox]), .setting-panel select, .modal-card input:not([type=file]), .modal-card select, .modal-card textarea { width: 100%; min-height: 37px; border: 1px solid #dce2ed; border-radius: 7px; padding: 8px 10px; outline: 0; color: var(--ink); background: #fff; font-size: 12px; }.setting-panel textarea, .modal-card textarea { min-height: 75px; resize: vertical; }.setting-panel input:focus, .setting-panel select:focus, .modal-card input:focus, .modal-card select:focus, .modal-card textarea:focus { border-color: #a7a3ec; box-shadow: 0 0 0 3px #efeeff; }.toggle-row { grid-template-columns: 30px minmax(0,1fr); align-items: center; column-gap: 9px; padding: 10px 0; border-top: 1px solid #edf0f5; }.toggle-row input { position: absolute; opacity: 0; }.toggle-row > span { position: relative; width: 29px; height: 17px; border-radius: 99px; background: #dce1ea; transition: background .2s; }.toggle-row > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: left .2s; }.toggle-row input:checked + span { background: var(--purple); }.toggle-row input:checked + span::after { left: 15px; }.toggle-row div { display: grid; gap: 1px; }.toggle-row b { color: #415067; font-size: 11px; }.toggle-row small { color: var(--muted); font-size: 10px; }.setting-note { border: 1px solid #f0ddaf; border-radius: 8px; padding: 11px; color: #755a23; background: #fffaee; }.setting-note b { font-size: 11px; }.setting-note p { margin: 2px 0 0; font-size: 10px; }

.modal { width: min(560px, calc(100% - 28px)); max-height: calc(100% - 28px); overflow: auto; border: 0; padding: 0; background: transparent; }.modal::backdrop { background: rgba(15, 24, 43, .58); backdrop-filter: blur(2px); }.modal-card { position: relative; border-radius: 15px; padding: 26px; color: var(--ink); background: #fff; box-shadow: 0 20px 55px rgba(15,23,43,.22); }.modal-card h2 { margin: 4px 0 8px; font-size: 21px; letter-spacing: -.6px; }.modal-card > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; }.modal-mark { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 13px; border-radius: 9px; color: #fff; background: var(--purple); font-size: 17px; }.modal-close { position: absolute; top: 12px; right: 14px; width: 26px; height: 26px; border: 0; border-radius: 6px; color: #7b8799; background: transparent; font-size: 23px; line-height: 1; }.modal-close:hover { color: var(--ink); background: #f2f3f7; }.modal-form { display: grid; gap: 13px; }.modal-form > p:not(.eyebrow) { margin-top: -8px; }.modal-form label { display: grid; gap: 5px; color: #536078; font-size: 10px; font-weight: 800; }.modal-form label small { color: var(--muted); font-size: 9px; font-weight: 500; }.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 5px; }.dropzone { min-height: 126px; place-items: center; align-content: center; border: 1px dashed #b5b3ea; border-radius: 9px; color: #6d68d4 !important; background: #f8f8ff; text-align: center; }.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }.dropzone span { font-size: 21px; }.dropzone b { font-size: 11px; }.dropzone small { color: #818da1 !important; }.dropzone:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px #eeedff; }.form-message { min-height: 13px; margin: -4px 0 0 !important; color: var(--red) !important; font-size: 10px !important; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.form-grid .full { grid-column: 1/-1; }.form-section { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 5px; padding-top: 14px; border-top: 1px solid #edf0f5; }.form-section h3 { margin: 3px 0 0; color: #354158; font-size: 13px; }.step-indicator { display: flex; align-items: center; gap: 5px; margin-bottom: 3px; }.step-indicator span { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; color: #7b8798; background: #edf0f5; font-size: 9px; font-weight: 800; }.step-indicator span.active { color: #fff; background: var(--purple); }.step-indicator i { width: 18px; height: 1px; background: #e1e5ed; }.key-reveal pre { margin: 15px 0 5px; border-radius: 8px; padding: 12px; color: #e7eaff; background: #17213a; word-break: break-all; }.detail-card { min-height: 180px; }.detail-card .detail-icon { display: grid; place-items: center; width: 36px; height: 40px; border-radius: 9px; color: #e25a5a; background: #fff0f0; font-size: 10px; font-weight: 800; }.detail-card h2 { margin-top: 12px; }.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }.detail-grid div { border: 1px solid #edf0f5; border-radius: 8px; padding: 9px; }.detail-grid span { display: block; color: var(--muted); font-size: 9px; }.detail-grid b { display: block; margin-top: 3px; color: #3f4c63; font-size: 11px; }

.toast-region { position: fixed; right: 25px; bottom: 22px; z-index: 40; display: grid; gap: 8px; }.toast { min-width: 260px; max-width: 380px; display: grid; grid-template-columns: 21px minmax(0,1fr); gap: 9px; align-items: center; border: 1px solid #cfeee1; border-radius: 9px; padding: 10px; color: #276f5a; background: #f1fcf7; box-shadow: 0 10px 30px rgba(21,46,54,.16); font-size: 11px; animation: toast-in .23s ease-out; }.toast.error { border-color: #f1cfcf; color: #a93f3f; background: #fff4f4; }.toast > span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; background: var(--green); font-weight: 900; }.toast.error > span { background: var(--red); } @keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Caminho operacional de criação, assinatura e validação. */
.request-created { display: grid; gap: 10px; }.request-created .detail-icon { display: grid; place-items: center; width: 36px; height: 40px; border-radius: 9px; color: #248764; background: #eafaf2; font-size: 17px; font-weight: 800; }.request-created h2 { margin: 0; }.request-id { display: grid; gap: 4px; border-radius: 8px; padding: 9px; background: #f5f6fb; }.request-id span { color: #7b8798; font-size: 9px; font-weight: 800; text-transform: uppercase; }.request-id code { overflow: hidden; color: #4d5871; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.created-links { display: grid; gap: 9px; }.created-link { display: grid; gap: 8px; border: 1px solid #dcdaf6; border-radius: 10px; padding: 11px; background: #fbfbff; }.created-link b { color: #3b4760; font-size: 11px; }.created-link .button { justify-self: start; }.request-actions { display: grid; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #edf0f5; }.request-actions h3 { margin: 0; color: #3e4b63; font-size: 12px; }.request-link-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; border: 1px solid #e5e8f2; border-radius: 8px; padding: 8px; background: #fafbfe; }.request-link-row code { overflow: hidden; color: #5b6284; font: 9px ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }.detail-note { margin: 14px 0 0; color: #7b8798; font-size: 10px; line-height: 1.5; }

.command-palette { position: fixed; inset: 0; z-index: 35; display: grid; place-items: start center; padding-top: 13vh; background: rgba(15,24,43,.37); backdrop-filter: blur(2px); }.command-card { width: min(520px, calc(100% - 28px)); border: 1px solid #e0e3f0; border-radius: 13px; padding: 9px; background: #fff; box-shadow: 0 24px 65px rgba(15,23,43,.24); }.command-search { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #edf0f5; padding: 5px 6px 11px; color: #8a95a7; }.command-search span { font-size: 20px; }.command-search input { flex: 1; border: 0; outline: 0; color: var(--ink); font-size: 13px; }.command-search kbd, .command-card kbd { border: 1px solid #dfe4ec; border-radius: 4px; padding: 1px 4px; color: #8a94a6; background: #f9fafc; font: 9px ui-monospace, monospace; }.command-card > p { margin: 12px 7px 5px; color: #8c96a8; font-size: 9px; font-weight: 800; letter-spacing: .8px; }.command-card > button { width: 100%; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 8px; border: 0; border-radius: 7px; padding: 8px; color: var(--ink); background: transparent; text-align: left; }.command-card > button:hover { background: #f2f2ff; }.command-card > button > i { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 6px; color: var(--purple); background: var(--purple-pale); font-style: normal; font-size: 14px; }.command-card b { display: block; font-size: 11px; }.command-card small { display: block; margin-top: 1px; color: var(--muted); font-size: 9px; }

body.command-palette-open,
body:has(dialog:modal) { overflow: hidden; }
.command-palette {
    box-sizing: border-box;
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    overflow: auto;
    border: 0;
    padding: 13vh 14px 24px;
    color: var(--ink);
}
.command-palette::backdrop { background: transparent; }
.command-close {
    width: 30px;
    min-width: 30px;
    height: 30px;
    border: 0;
    border-radius: 7px;
    color: #66738b;
    background: transparent;
    font-size: 21px;
    line-height: 1;
}
.command-close:hover { color: var(--ink); background: #f2f3f7; }
.command-close:focus-visible { outline: 2px solid var(--vs-ink, #10251f); outline-offset: 2px; }
.command-palette .command-filtered { display: none !important; }
.interaction-blocker {
    width: min(430px, calc(100% - 28px));
    border: 0;
    padding: 0;
    color: var(--ink);
    background: transparent;
}
.interaction-blocker::backdrop { background: rgba(15, 24, 43, .58); backdrop-filter: blur(2px); }
.interaction-blocker-card {
    display: flex;
    align-items: center;
    gap: 14px;
    border-radius: 15px;
    padding: 22px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(15, 23, 43, .24);
}
.interaction-blocker-card h2 { margin: 0 0 3px; font-size: 17px; }
.interaction-blocker-card p { margin: 0; color: var(--muted); font-size: 11px; }

@media (max-width: 1180px) { .app-main { padding-right: 27px; padding-left: 27px; }.metrics-grid { grid-template-columns: repeat(2,1fr); }.template-grid, .integration-cards { grid-template-columns: repeat(2,1fr); }.endpoint-surface { grid-template-columns: 1fr; }.endpoint-list { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 920px) { .saas-shell { grid-template-columns: 226px minmax(0,1fr); }.app-sidebar { width: 226px; }.app-main { padding: 0 21px 50px; }.workspace-copy b { max-width: 125px; }.dashboard-grid, .lower-grid { grid-template-columns: 1fr; }.settings-layout { grid-template-columns: 165px minmax(0,1fr); }.mcp-orbit { width: 140px; height: 140px; margin-right: 0; }.mcp-orbit > span { inset: 45px; }.mcp-orbit::before { inset: 15px; }.mcp-orbit::after { inset: 35px; }.integration-cards { grid-template-columns: 1fr; }.integration-card { min-height: 155px; }.integration-card .wide-link { margin-top: 5px; } }
@media (max-width: 900px) { .saas-shell { grid-template-columns: minmax(0,1fr); }.app-sidebar { width: min(294px,88vw); transform: translateX(-100%); transition: transform .22s ease; box-shadow: 8px 0 30px rgba(10,20,40,.22); }.app-sidebar.open { transform: translateX(0); }.app-main { grid-column: 1; min-width: 0; padding: 0 21px 50px; }.mobile-menu { display: grid; place-items: center; width: 32px; min-width: 32px; height: 32px; margin-right: 10px; border: 1px solid var(--line); border-radius: 7px; color: #5c6980; background: #fff; }.breadcrumb { flex: 1; }.global-search, .help-button, .top-create { display: none; } }
@media (max-width: 720px) { .saas-shell { grid-template-columns: 1fr; }.app-sidebar { transform: translateX(-100%); transition: transform .22s ease; width: min(280px, 88vw); box-shadow: 8px 0 30px rgba(10,20,40,.22); }.app-sidebar.open { transform: translateX(0); }.app-main { grid-column: 1; padding: 0 16px 40px; }.app-topbar { height: 61px; }.mobile-menu { display: grid; place-items: center; width: 32px; height: 32px; margin-right: 10px; border: 1px solid var(--line); border-radius: 7px; color: #5c6980; background: #fff; }.breadcrumb { flex: 1; }.breadcrumb span, .breadcrumb b { display: none; }.top-create { padding: 7px 9px; font-size: 10px; }.icon-button:first-child { display: none; }.connection-banner { align-items: flex-start; margin-top: 15px; }.connection-banner p { line-height: 1.4; }.connection-banner button { display: none; }.view { padding-top: 26px; }.page-hero, .page-hero.compact { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }.page-hero h1, .page-hero.compact h1 { font-size: 25px; }.hero-actions { width: 100%; }.hero-actions .button { flex: 1; }.metrics-grid, .request-summary, .company-kpis { grid-template-columns: 1fr 1fr; }.filter-bar { flex-wrap: wrap; }.search-field { min-width: 100%; max-width: none; margin: 0 0 2px; }.filter-context { margin-left: 0; }.template-grid { grid-template-columns: 1fr; }.content-grid-two { grid-template-columns: 1fr; }.mcp-hero { min-height: 250px; }.mcp-orbit { position: absolute; right: -55px; opacity: .5; }.mcp-hero > div:first-child { position: relative; z-index: 2; }.endpoint-list { grid-template-columns: 1fr; }.settings-layout { grid-template-columns: 1fr; }.settings-nav { display: flex; overflow-x: auto; }.settings-nav button { flex: 0 0 auto; }.toast-region { right: 12px; left: 12px; bottom: 12px; }.toast { min-width: 0; max-width: none; }.command-palette { padding-top: 8vh; } }
@media (max-width: 440px) { .topbar-tools { gap: 5px; }.notification-button { display: none; }.top-create { min-height: 33px; }.metrics-grid, .request-summary, .company-kpis { grid-template-columns: 1fr; }.completion-visual { grid-template-columns: 112px minmax(0,1fr); }.surface { padding: 16px; }.table-surface { padding: 0; }.modal-card { padding: 22px 17px; }.form-grid { grid-template-columns: 1fr; }.form-grid .full { grid-column: auto; }.modal-actions { flex-direction: column-reverse; }.modal-actions .button { width: 100%; }.mcp-tools { grid-template-columns: 1fr; } }

/* Application frame ------------------------------------------------------
   The frame itself is edge-to-edge. Spacing belongs to the content inside
   each surface, so the header and focused workspaces meet both viewport
   edges without a decorative gutter. The id selector intentionally wins
   over the legacy bridge loaded after this stylesheet. */
#app-shell {
    --shell-content-gutter: var(--vs-page-gutter, 32px);
    width: 100%;
}

#app-shell > .app-main {
    width: 100%;
    max-width: none;
    padding-inline: 0;
}

#app-shell > .app-main > .app-topbar {
    width: 100%;
    gap: 12px;
    padding-inline: var(--shell-content-gutter);
}

#app-shell > .app-main > .app-topbar .breadcrumb { flex: 1 1 auto; }

#app-shell > .app-main > .connection-banner {
    margin-right: var(--shell-content-gutter);
    margin-left: var(--shell-content-gutter);
}

#app-shell > .app-main > .view:not(.focused-view) {
    padding-right: var(--shell-content-gutter);
    padding-left: var(--shell-content-gutter);
}

#app-shell > .app-main > .view.focused-view {
    width: 100%;
    padding-right: 0;
    padding-left: 0;
}

#app-shell > .app-main > .view.focused-view > .product-view-root {
    width: 100%;
    max-width: none;
    margin-inline: 0;
}

#app-shell > .app-main > .view.focused-view .workflow-shell { margin-inline: 0; }

/* Brand lockup -----------------------------------------------------------
   The official SVGs remain the source of the lockup geometry, rendered as a
   Paper mask directly on Deep Ink. There is no light card around the mark;
   the detached lime corner carries the Venue document-fold signature. */
#app-shell > .app-sidebar .venue-brand {
    position: relative;
    isolation: isolate;
    width: calc(100% - 20px);
    min-height: 54px;
    justify-content: center;
    margin: 0 auto 10px;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    padding: 6px 22px 8px 10px;
    color: var(--vs-paper, #fffdf9);
    background: transparent;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

#app-shell > .app-sidebar .venue-brand::before {
    width: min(150px, calc(100% - 4px));
    height: 40px;
    flex: 0 0 auto;
    background: var(--vs-paper, #fffdf9);
    content: "";
    -webkit-mask: url("../assets/brand/venue-sign-logo-horizontal.svg?v=20260812.4") center / contain no-repeat;
    mask: url("../assets/brand/venue-sign-logo-horizontal.svg?v=20260812.4") center / contain no-repeat;
}

#app-shell > .app-sidebar .venue-brand::after {
    position: absolute;
    z-index: 0;
    top: 0;
    right: 0;
    width: 16px;
    height: 16px;
    background: var(--vs-lime, #c6fd4d);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    content: "";
}

#app-shell > .app-sidebar .venue-brand:focus-visible {
    outline: 2px solid var(--vs-lime, #c6fd4d);
    outline-offset: 2px;
    box-shadow: none;
}

#app-shell > .app-sidebar :is(.venue-brand-wordmark, .venue-brand-isologo) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    filter: none;
}

#app-shell > .app-sidebar .venue-brand-wordmark { display: block; }
#app-shell > .app-sidebar .venue-brand-isologo { display: none; }

.sidebar-collapse {
    position: absolute;
    z-index: 14;
    top: 20px;
    right: -17px;
    display: none;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px !important;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--vs-ink, #10251f) 42%, var(--vs-paper, #fffdf9));
    border-radius: 8px;
    color: var(--vs-ink, #10251f);
    background: var(--vs-paper, #fffdf9);
    box-shadow: 0 2px 7px rgba(16, 37, 31, .13);
    touch-action: manipulation;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.sidebar-collapse::before {
    position: absolute;
    inset: -5px;
    content: "";
}

body.vs-app #app-shell > .app-sidebar .sidebar-collapse {
    min-height: 34px !important;
}

.sidebar-collapse:hover {
    border-color: var(--vs-ink, #10251f);
    background: var(--vs-lime, #c6fd4d);
}

.sidebar-collapse:focus-visible {
    outline: 2px solid var(--vs-lime, #c6fd4d);
    outline-offset: 2px;
}

.sidebar-collapse svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .2s ease;
}

.app-sidebar .sidebar-nav {
    scrollbar-color: color-mix(in srgb, var(--vs-paper, #fffdf9) 32%, transparent) transparent;
    scrollbar-width: thin;
}

.app-sidebar .sidebar-nav::-webkit-scrollbar { width: 6px; }
.app-sidebar .sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.app-sidebar .sidebar-nav::-webkit-scrollbar-thumb {
    border-radius: 99px;
    background: color-mix(in srgb, var(--vs-paper, #fffdf9) 32%, transparent);
}

@media (max-width: 1180px) {
    #app-shell { --shell-content-gutter: 27px; }
}

@media (min-width: 1024px) {
    .sidebar-collapse { display: grid; }

    #app-shell,
    #app-shell > .app-sidebar {
        transition: grid-template-columns .2s ease, width .2s ease, padding .2s ease;
    }

    #app-shell[data-sidebar-collapsed="true"] {
        grid-template-columns: var(--vs-sidebar-collapsed-width, 88px) minmax(0, 1fr);
    }

    #app-shell[data-sidebar-collapsed="true"] > .app-sidebar {
        width: var(--vs-sidebar-collapsed-width, 88px);
        padding: 17px 8px 14px;
    }

    #app-shell[data-sidebar-collapsed="true"] .sidebar-collapse svg { transform: rotate(180deg); }

    #app-shell[data-sidebar-collapsed="true"] .venue-brand {
        width: 46px;
        min-height: 48px;
        justify-content: center;
        padding: 5px 10px 7px 4px;
    }

    #app-shell[data-sidebar-collapsed="true"] .venue-brand::before {
        width: 27px;
        height: 36px;
        -webkit-mask-image: url("../assets/brand/venue-sign-symbol.svg?v=20260812.4");
        mask-image: url("../assets/brand/venue-sign-symbol.svg?v=20260812.4");
    }

    #app-shell[data-sidebar-collapsed="true"] .venue-brand-wordmark { display: none; }
    #app-shell[data-sidebar-collapsed="true"] .venue-brand-isologo { display: block; }

    #app-shell[data-sidebar-collapsed="true"] :is(
        .workspace-switcher,
        .nav-link,
        .security-state,
        .user-card
    ) { justify-content: center; }

    #app-shell[data-sidebar-collapsed="true"] :is(.workspace-switcher, .user-card) { padding-inline: 0; }
    #app-shell[data-sidebar-collapsed="true"] .nav-link { position: relative; padding-inline: 0; }

    #app-shell[data-sidebar-collapsed="true"] :is(
        .workspace-copy,
        .chevron,
        .nav-label,
        .nav-link > span,
        .venue-ai-link em,
        .security-state > div,
        .user-card > span:nth-child(2),
        .user-card > i
    ) {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0 0 0 0) !important;
        clip-path: inset(50%) !important;
        white-space: nowrap !important;
    }

    #app-shell[data-sidebar-collapsed="true"] :is(.workspace-popover, .user-popover) {
        left: calc(100% + 8px);
        width: min(320px, calc(100vw - 112px));
    }

    #app-shell[data-sidebar-collapsed="true"] .workspace-popover { top: 0; margin-top: 0; }
    #app-shell[data-sidebar-collapsed="true"] .user-popover { bottom: 0; }
}

/* Tablet keeps the existing compact rail, now with the same high-contrast
   official isologo used by the explicit desktop collapsed state. */
@media (min-width: 640px) and (max-width: 1023px) {
    #app-shell > .app-sidebar .venue-brand {
        width: 46px;
        min-height: 48px;
        padding: 5px 10px 7px 4px;
    }

    #app-shell > .app-sidebar .venue-brand::before {
        width: 27px;
        height: 36px;
        -webkit-mask-image: url("../assets/brand/venue-sign-symbol.svg?v=20260812.4");
        mask-image: url("../assets/brand/venue-sign-symbol.svg?v=20260812.4");
    }

    #app-shell > .app-sidebar .venue-brand-wordmark { display: none; }
    #app-shell > .app-sidebar .venue-brand-isologo { display: block; }
}

/* Only the signature wizard compresses the tenant-status strip. Together,
   the 8 px top margin, 44 px status target and 8 px view gap occupy ~60 px. */
body[data-view="document-workflow"] #app-shell > .app-main > .connection-banner {
    min-height: 44px;
    margin-top: 8px;
    padding-block: 0;
}

body[data-view="document-workflow"] #app-shell > .app-main > #view-document-workflow {
    padding-top: 8px;
}

@media (max-width: 900px) {
    #app-shell { --shell-content-gutter: 21px; }
}

@media (max-width: 639px) {
    #app-shell { --shell-content-gutter: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    #app-shell,
    #app-shell > .app-sidebar,
    .sidebar-collapse,
    .sidebar-collapse svg { transition: none; }
}

/* Template Engine v2 */
.template-mode-note { display: flex; align-items: center; gap: 9px; min-height: 42px; margin: -5px 0 16px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; color: #58667c; background: #fff; font-size: 11px; }
.template-mode-note::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--purple); }
.template-mode-note.local::before { background: #d79037; }
.template-import-status { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 13px; align-items: start; margin: -5px 0 16px; border: 1px solid #d9ddeb; border-radius: 11px; padding: 14px; background: #fff; box-shadow: 0 8px 24px rgba(36, 48, 70, .05); }
.template-import-status.loading { border-color: #d9d7ef; background: #faf9ff; }
.template-import-status.warning { border-color: #e8c98f; background: #fffaf0; }
.template-import-status.success { border-color: #b7d7c5; background: #f6fbf8; }
.template-import-status.error { border-color: #e7b9b9; background: #fff7f7; }
.template-import-status-icon { display: grid; place-items: center; width: 45px; height: 49px; border-radius: 9px; color: #625dcc; background: #eeedff; font-size: 9px; font-weight: 900; letter-spacing: .4px; }
.template-import-status.warning .template-import-status-icon { color: #855d22; background: #fff0cf; }
.template-import-status.success .template-import-status-icon { color: #2f7050; background: #e3f4ea; }
.template-import-status.error .template-import-status-icon { color: #963f3f; background: #ffe8e8; }
.template-import-status-copy { min-width: 0; }
.template-import-status-copy h2 { margin: 2px 0 4px; color: #36435a; font-size: 14px; }
.template-import-status-copy > p:last-of-type { margin: 0; color: #657187; font-size: 10px; line-height: 1.5; }
.template-import-status-copy ul { display: grid; gap: 4px; margin: 9px 0 0; padding-left: 18px; color: #755523; font-size: 10px; line-height: 1.45; }
.template-import-status-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.template-import-status-actions .button { min-height: 32px; padding: 6px 10px; font-size: 10px; white-space: nowrap; }
.template-card { min-height: 285px; }
.template-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.template-card-top .template-icon { margin-bottom: 10px; }
.template-version-badge { border: 1px solid #dddff0; border-radius: 99px; padding: 4px 7px; color: #645fc0; background: #f7f6ff; font-size: 9px; font-weight: 800; }
.template-card > p { min-height: 48px; }
.template-card-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; color: #748096; font-size: 9px; }
.template-card-stats span { display: inline-flex; align-items: center; gap: 4px; }
.template-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 13px; }
.template-card-actions button { min-height: 32px; border: 1px solid #e1e5ed; border-radius: 7px; padding: 6px 8px; color: #536078; background: #fff; font-size: 10px; font-weight: 750; }
.template-card-actions button:hover { border-color: #bab7eb; color: var(--purple); background: #f8f7ff; }
.template-card-actions .primary { border-color: var(--purple); color: #fff; background: var(--purple); }
.template-card-actions .primary:hover { color: #fff; background: #5751c7; }
.template-card-actions .danger { grid-column: 1 / -1; color: #a84545; }
.template-card-actions .danger:hover { border-color: #e6bcbc; color: #963737; background: #fff6f6; }

.template-editor-modal { width: min(980px, calc(100% - 28px)); }
.template-editor-card { gap: 17px; }
.template-editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-right: 25px; }
.template-editor-heading h2 { margin-bottom: 0; }
.template-editor-mode { flex: 0 0 auto; border: 1px solid #d9d9ec; border-radius: 99px; padding: 5px 9px; color: #615cbf; background: #f7f6ff; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.template-editor-mode.local { border-color: #edd7b9; color: #8a622d; background: #fff9ef; }
.template-editor-intro { margin-top: -12px !important; }
.template-editor-message { display: none; min-height: 38px; margin: -5px 0 0 !important; border: 1px solid #d9ddeb; border-radius: 8px; padding: 9px 11px; color: #4e5b70 !important; background: #f8f9fc; font-size: 10px !important; }
.template-editor-message:not(:empty) { display: block; }
.template-editor-message.error, .template-editor-message.conflict { border-color: #e9b9b9; color: #8b3838 !important; background: #fff7f7; }
.template-editor-message.conflict { border-color: #eccf9f; color: #755523 !important; background: #fffaf0; }
.template-editor-message.guidance { border-color: #c9c5ea; color: #514d8f !important; background: #f8f7ff; }
.template-import-review { display: grid; gap: 10px; border: 1px solid #e5c07d; border-radius: 10px; padding: 14px; color: #684d26; background: #fff9ec; }
.template-import-review-heading { display: flex; align-items: center; gap: 10px; }
.template-import-review-heading > span { display: grid; flex: 0 0 auto; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; background: #b8791f; font-weight: 900; }
.template-import-review-heading h3 { margin: 2px 0 0; color: #5d431f; font-size: 13px; }
.template-import-review > p { margin: 0 !important; color: #72562c !important; font-size: 10px !important; line-height: 1.55; }
.template-import-review ul { display: grid; gap: 5px; margin: 0; border-radius: 8px; padding: 10px 10px 10px 27px; background: rgba(255, 255, 255, .65); font-size: 10px; line-height: 1.45; }
.template-review-confirmation { display: flex !important; align-items: flex-start; gap: 8px !important; color: #5f4928 !important; font-size: 10px !important; font-weight: 750 !important; }
.template-review-confirmation input { flex: 0 0 auto; width: 16px; min-height: 16px; margin-top: 1px; accent-color: var(--purple); }
.template-builder-section { display: grid; gap: 12px; border: 1px solid #e5e8ef; border-radius: 11px; padding: 15px; background: #fbfcfe; }
.template-builder-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.template-builder-header h3 { margin: 2px 0 2px; color: #354158; font-size: 14px; }
.template-builder-header small { display: block; color: var(--muted); font-size: 9px; font-weight: 500; }
.button-compact { min-height: 31px; padding: 6px 10px; font-size: 10px; white-space: nowrap; }
.template-definition-list { display: grid; gap: 10px; }
.template-definition-row { display: grid; gap: 10px; border: 1px solid #dde2eb; border-radius: 9px; padding: 12px; background: #fff; }
.template-definition-row:focus-within { border-color: #b6b2e8; box-shadow: 0 0 0 3px #f1f0ff; }
.template-row-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.template-row-heading strong { color: #435168; font-size: 11px; }
.template-remove-button { border: 0; border-radius: 6px; padding: 4px 7px; color: #a84c4c; background: transparent; font-size: 10px; font-weight: 700; }
.template-remove-button:hover { background: #fff1f1; }
.template-variable-fields { display: grid; grid-template-columns: minmax(145px, 1.3fr) 115px 105px minmax(150px, 1fr); gap: 9px; align-items: end; }
.template-variable-fields .description { grid-column: 1 / -1; }
.template-required-field { align-content: end; }
.template-required-control { display: flex; align-items: center; gap: 7px; min-height: 37px; border: 1px solid #dce2ed; border-radius: 7px; padding: 8px 9px; color: #536078; background: #fff; font-size: 10px; font-weight: 700; }
.template-required-control input[type=checkbox] { width: 16px; min-height: 16px; margin: 0; padding: 0; accent-color: var(--purple); }
.template-condition-fields { display: grid; grid-template-columns: minmax(130px, 1fr) 130px 88px minmax(140px, 1fr); gap: 9px; align-items: end; }
.template-condition-fields .condition-variable { grid-column: span 2; }
.template-condition-fields .condition-operator { grid-column: span 2; }
.template-condition-fields .condition-content { grid-column: 1 / -1; }
.template-condition-fields textarea { min-height: 74px; }
.template-definition-row input:disabled { color: #8c96a7; background: #f2f4f7; }
.template-empty-builder { margin: 0 !important; border: 1px dashed #d8dde7; border-radius: 8px; padding: 11px; color: #7d889a !important; background: #fff; text-align: center; font-size: 10px !important; }
.template-editor-actions { position: sticky; bottom: -26px; z-index: 2; margin: 0 -26px -26px; border-top: 1px solid #e8ebf0; padding: 14px 26px; background: #fff; }
.template-rich-field { display: grid; gap: 0 !important; color: #536078; font-size: 10px; font-weight: 800; }
.template-field-label { margin-bottom: 5px; }
.template-rich-field > small { margin-top: 5px; color: var(--muted); font-size: 9px; font-weight: 500; }
.rich-editor-toolbar { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--surface-alt); }
.rich-editor-toolbar button { min-width: 34px; min-height: 32px; border: 1px solid transparent; border-radius: 5px; padding: 5px 9px; color: var(--ink); background: transparent; font: inherit; font-size: 10px; font-weight: 800; }
.rich-editor-toolbar button:hover, .rich-editor-toolbar button:focus-visible { border-color: var(--ink); background: #fff; }
.rich-editor-toolbar button:disabled { opacity: .45; cursor: not-allowed; }
.rich-editor-toolbar-separator { align-self: stretch; width: 1px; margin: 2px 2px; background: var(--line); }
.rich-editor-view-switch { display: inline-flex; gap: 3px; margin-left: auto; border: 1px solid #dfe3eb; border-radius: 7px; padding: 2px; background: #fff; }
.rich-editor-view-switch button { min-height: 27px; padding: 3px 8px; }
.rich-editor-view-switch button.active { color: #fff; background: var(--purple); }
.template-rich-editor { min-height: 260px; max-height: 52vh; overflow: auto; border: 1px solid var(--line); border-radius: 0 0 8px 8px; padding: 22px; color: var(--ink); background: #fff; font: 15px/1.65 Georgia, "Times New Roman", serif; outline: 0; }
.template-rich-editor:focus { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 55%, transparent); }
.template-rich-editor:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.template-rich-editor h1, .template-rich-editor h2, .template-rich-editor h3 { margin: 1em 0 .45em; color: var(--ink); font-family: inherit; line-height: 1.2; }
.template-rich-editor p { margin: 0 0 .9em; }
.template-rich-editor ul { padding-left: 1.5em; }
.template-rich-editor blockquote { margin-left: 0; border-left: 3px solid var(--sage); padding-left: 1em; color: var(--muted); }
.template-markdown-source { min-height: 260px; max-height: 52vh; resize: vertical; border-radius: 0 0 8px 8px !important; padding: 18px !important; color: #28344a; background: #fbfcfe; font: 13px/1.65 "SFMono-Regular", Consolas, "Liberation Mono", monospace; tab-size: 2; }
.template-markdown-source:focus { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 55%, transparent); }

.template-history-modal { width: min(700px, calc(100% - 28px)); }
.template-history-card > p { margin: 0; color: var(--muted); font-size: 11px; }
.template-history-list { display: grid; gap: 9px; margin-top: 17px; }
.template-history-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 11px; align-items: center; border: 1px solid #e3e6ed; border-radius: 9px; padding: 11px; }
.template-history-version { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 9px; color: #625dcc; background: #f0efff; font-size: 11px; font-weight: 850; }
.template-history-copy { min-width: 0; }
.template-history-copy b, .template-history-copy small { display: block; }
.template-history-copy b { color: #3e4b61; font-size: 11px; }
.template-history-copy small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.template-history-meta { color: #778399; font-size: 9px; text-align: right; }
.template-history-empty { border: 1px dashed #d8dde7; border-radius: 8px; padding: 20px; color: var(--muted); text-align: center; font-size: 10px; }

@media (max-width: 760px) {
  .template-editor-modal { width: calc(100% - 16px); max-height: calc(100% - 16px); }
  .template-import-status { grid-template-columns: auto minmax(0, 1fr); }
  .template-import-status-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .template-variable-fields, .template-condition-fields { grid-template-columns: 1fr 1fr; }
  .template-variable-fields .description, .template-condition-fields .condition-content { grid-column: 1 / -1; }
  .template-condition-fields .condition-variable, .template-condition-fields .condition-operator { grid-column: auto; }
  .template-editor-actions { bottom: -26px; }
}

@media (max-width: 500px) {
  .template-builder-header, .template-editor-heading { align-items: stretch; flex-direction: column; }
  .template-editor-mode { align-self: flex-start; }
  .template-builder-header .button { width: 100%; }
  .template-variable-fields, .template-condition-fields, .template-card-actions { grid-template-columns: 1fr; }
  .template-card-actions .danger { grid-column: auto; }
  .template-variable-fields .description, .template-condition-fields .condition-content { grid-column: auto; }
  .template-history-item { grid-template-columns: 42px minmax(0, 1fr); }
  .template-history-meta { grid-column: 2; text-align: left; }
  .template-editor-actions { margin-right: -17px; margin-bottom: -22px; margin-left: -17px; padding: 12px 17px; }
  .rich-editor-view-switch { width: 100%; margin-left: 0; }
  .rich-editor-view-switch button { flex: 1; }
  .template-rich-editor, .template-markdown-source { min-height: 220px; padding: 15px !important; }
}

/* Contract Lifecycle Management */
.contract-mode-note { display: flex; align-items: center; gap: 9px; min-height: 42px; margin: -5px 0 16px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; color: #58667c; background: #fff; font-size: 11px; }
.contract-mode-note::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--purple); }
.contract-mode-note.local::before { background: #d79037; }
.contract-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 15px; }
.contract-kpis article { border: 1px solid var(--line); border-radius: 11px; padding: 14px; background: #fff; }
.contract-kpis span, .contract-kpis small { display: block; color: var(--muted); font-size: 9px; }
.contract-kpis strong { display: block; margin: 4px 0 2px; color: #26344b; font-size: 23px; letter-spacing: -.6px; }
.contract-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 15px; align-items: start; }
.contract-list-column, .contract-agenda { display: grid; gap: 13px; min-width: 0; }
.contract-filter-bar { display: grid; grid-template-columns: minmax(220px, 1fr) 160px 150px auto; gap: 9px; align-items: end; }
.contract-filter-bar .search-field { min-width: 0; max-width: none; margin: 0; }
.contract-filter-field { display: grid; gap: 4px; color: #647188; font-size: 9px; font-weight: 800; }
.contract-filter-field select { width: 100%; min-height: 37px; border: 1px solid #dce2ed; border-radius: 7px; padding: 7px 9px; outline: 0; color: #45536a; background: #fff; font-size: 10px; }
.contract-filter-field select:focus { border-color: #a7a3ec; box-shadow: 0 0 0 3px #efeeff; }
.contract-table-surface { overflow: hidden; }
.contract-table td:first-child { min-width: 225px; }
.contract-table td:nth-child(3), .contract-table td:nth-child(4) { min-width: 130px; }
.contract-title-cell b, .contract-title-cell small { display: block; }
.contract-title-cell b { color: #354158; font-size: 11px; }
.contract-title-cell small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.contract-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.contract-tags span { border-radius: 99px; padding: 2px 5px; color: #6b6897; background: #f1f0fb; font-size: 8px; }
.contract-row-action { border: 1px solid #e0e4ec; border-radius: 7px; padding: 5px 8px; color: var(--purple); background: #fff; font-size: 9px; font-weight: 800; }
.contract-row-action:hover { border-color: #b8b4e8; background: #f8f7ff; }
.contract-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #edf0f5; padding: 11px 14px; color: var(--muted); font-size: 9px; }
.contract-pagination > div { display: flex; gap: 6px; }
.contract-pagination button:disabled { cursor: not-allowed; opacity: .48; }
.contract-agenda-card { padding: 15px; }
.contract-agenda-card .surface-heading { margin-bottom: 11px; }
.contract-agenda-card h2 { font-size: 14px; }
.contract-agenda-list { display: grid; gap: 7px; }
.contract-agenda-item { width: 100%; border: 1px solid #e5e8ef; border-radius: 8px; padding: 9px; color: inherit; background: #fff; text-align: left; }
.contract-agenda-item:hover { border-color: #bbb7e9; background: #faf9ff; }
.contract-agenda-item b, .contract-agenda-item small { display: block; }
.contract-agenda-item b { overflow: hidden; color: #3e4b61; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.contract-agenda-item small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.contract-agenda-item.overdue { border-color: #e9c1c1; background: #fff9f9; }
.contract-agenda-empty { margin: 0; border: 1px dashed #d9dde6; border-radius: 8px; padding: 13px; color: var(--muted); text-align: center; font-size: 9px; }

.contract-editor-modal { width: min(860px, calc(100% - 28px)); }
.contract-editor-card { gap: 16px; }
.contract-editor-heading, .contract-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-right: 24px; }
.contract-editor-heading h2, .contract-detail-heading h2 { margin-bottom: 0; }
.contract-editor-mode, .contract-version-chip { flex: 0 0 auto; border: 1px solid #d9d9ec; border-radius: 99px; padding: 5px 9px; color: #615cbf; background: #f7f6ff; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.contract-editor-mode.local { border-color: #edd7b9; color: #8a622d; background: #fff9ef; }
.contract-editor-message, .contract-detail-message { display: none; margin: -5px 0 0 !important; border: 1px solid #d9ddeb; border-radius: 8px; padding: 9px 11px; color: #4e5b70 !important; background: #f8f9fc; font-size: 10px !important; }
.contract-editor-message:not(:empty), .contract-detail-message:not(:empty) { display: block; }
.contract-editor-message.error, .contract-detail-message.error { border-color: #e9b9b9; color: #8b3838 !important; background: #fff7f7; }
.contract-editor-message.conflict, .contract-detail-message.conflict { border-color: #eccf9f; color: #755523 !important; background: #fffaf0; }
.contract-form-section { display: grid; gap: 12px; border: 1px solid #e5e8ef; border-radius: 11px; padding: 15px; background: #fbfcfe; }
.contract-section-heading h3 { margin: 2px 0 0; color: #354158; font-size: 14px; }
.contract-field-note { margin: -5px 0 0 !important; color: #7a6670 !important; font-size: 9px !important; }
.contract-check-field { align-content: end; }
.contract-check-field > span:first-child:not(.contract-check-control) { color: #536078; font-size: 10px; font-weight: 800; }
.contract-check-control { display: flex; align-items: center; gap: 7px; min-height: 37px; border: 1px solid #dce2ed; border-radius: 7px; padding: 8px 9px; color: #536078; background: #fff; font-size: 10px; font-weight: 700; }
.contract-check-control input[type=checkbox] { width: 16px; min-height: 16px; margin: 0; padding: 0; accent-color: var(--purple); }
.contract-sticky-actions { position: sticky; bottom: -26px; z-index: 2; margin: 0 -26px -26px; border-top: 1px solid #e8ebf0; padding: 14px 26px; background: #fff; }

.contract-detail-modal { width: min(1040px, calc(100% - 28px)); }
.contract-detail-card { display: grid; gap: 15px; }
.contract-detail-state { display: flex; align-items: center; gap: 7px; }
.contract-detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.contract-detail-summary > div { min-width: 0; border: 1px solid #e7e9ef; border-radius: 8px; padding: 10px; background: #fbfcfd; }
.contract-detail-summary span, .contract-detail-summary b { display: block; }
.contract-detail-summary span { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .35px; }
.contract-detail-summary b { margin-top: 4px; overflow-wrap: anywhere; color: #3d4b61; font-size: 10px; }
.contract-detail-actions { display: flex; flex-wrap: wrap; gap: 7px; border-top: 1px solid #eceef3; border-bottom: 1px solid #eceef3; padding: 11px 0; }
.contract-detail-actions button { min-height: 31px; border: 1px solid #dde1e9; border-radius: 7px; padding: 6px 10px; color: #536078; background: #fff; font-size: 9px; font-weight: 800; }
.contract-detail-actions button:hover { border-color: #b9b5e7; color: var(--purple); background: #f9f8ff; }
.contract-detail-actions button.primary { border-color: var(--purple); color: #fff; background: var(--purple); }
.contract-detail-actions button.danger { color: #9e4343; }
.contract-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; align-items: start; }
.contract-detail-section { min-width: 0; border: 1px solid #e4e7ee; border-radius: 10px; padding: 13px; background: #fbfcfe; }
.contract-detail-section h3 { margin: 2px 0 0; color: #354158; font-size: 13px; }
.contract-collaboration-section { grid-column: 1 / -1; }
.contract-collaboration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.contract-collaboration-grid h4 { margin: 0 0 8px; color: #354158; font-size: 12px; }
.contract-collaboration-list { display: grid; gap: 8px; max-height: 360px; overflow: auto; }
.contract-collaboration-item { display: grid; gap: 5px; padding: 10px; border: 1px solid #e4e7ee; border-radius: 8px; background: #fff; }
.contract-collaboration-item small { color: #697386; overflow-wrap: anywhere; }
.contract-collaboration-item .inline-actions { justify-content: flex-start; }
.collaboration-modal-card { width: min(900px, calc(100vw - 28px)); }
.settings-live-block { display: grid; gap: 14px; margin-top: 16px; }
.settings-live-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.settings-live-grid .product-panel { min-width: 0; }
.settings-live-grid .policy-row { flex-wrap: wrap; }
.settings-live-grid .policy-row select { width: auto; min-width: 112px; }
.settings-live-block code, .settings-live-grid code { overflow-wrap: anywhere; }
/* Administrative provider diagnostics: scoped to settings, never signer UI. */
#settings-biometric-provider-status { min-width: 0; margin-top: 0; }
#settings-biometric-provider-status .panel-heading { flex-wrap: wrap; gap: 12px; }
#settings-biometric-provider-status h3 { margin: 4px 0 0; font-size: 18px; }
#settings-biometric-provider-status .metadata-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px;
}
#settings-biometric-provider-status .metadata-grid > div { min-width: 0; }
#settings-biometric-provider-status dt { color: var(--vs-muted, var(--muted)); font-size: 12px; }
#settings-biometric-provider-status dd { margin: 5px 0 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
#settings-biometric-provider-status .status-pill { max-width: 100%; white-space: normal; text-align: left; }
#settings-biometric-provider-status ul { margin: 14px 0; padding-left: 20px; font-size: 12px; line-height: 1.6; }
#settings-biometric-provider-status .helper-text { font-size: 12px; line-height: 1.5; }
@media (max-width: 900px) {
  #settings-biometric-provider-status .metadata-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .vs-app #view-settings .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .vs-app #view-settings .settings-nav {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; overflow: visible;
  }
  .vs-app #view-settings .settings-nav button { min-width: 0; width: auto; white-space: normal; padding: 8px; }
  #settings-biometric-provider-status .metadata-grid { grid-template-columns: minmax(0, 1fr); }
  #settings-biometric-provider-status .panel-heading,
  #settings-biometric-provider-status .panel-body { padding-right: 0; padding-left: 0; }
  #settings-biometric-provider-status [data-refresh-biometric-provider] { width: 100%; }
}
.contract-obligation-list, .contract-timeline-list { display: grid; gap: 8px; margin-top: 11px; max-height: 420px; overflow: auto; }
.contract-obligation-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; border: 1px solid #e2e5ec; border-radius: 8px; padding: 10px; background: #fff; }
.contract-obligation-item.overdue { border-color: #e7bbbb; background: #fff9f9; }
.contract-obligation-copy b, .contract-obligation-copy small { display: block; }
.contract-obligation-copy b { color: #3e4b61; font-size: 10px; }
.contract-obligation-copy small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.contract-obligation-actions { display: flex; flex-direction: column; gap: 4px; }
.contract-obligation-actions button { border: 0; border-radius: 5px; padding: 4px 6px; color: #635ec1; background: #f2f1ff; font-size: 8px; font-weight: 800; }
.contract-obligation-actions button.danger { color: #9b4545; background: #fff1f1; }
.contract-timeline-item { position: relative; margin-left: 7px; border-left: 2px solid #dcdaf2; padding: 2px 0 10px 15px; }
.contract-timeline-item::before { content: ""; position: absolute; top: 5px; left: -6px; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: var(--purple); }
.contract-timeline-item b, .contract-timeline-item small, .contract-timeline-item code { display: block; }
.contract-timeline-item b { color: #3d4b61; font-size: 10px; }
.contract-timeline-item small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.contract-timeline-item code { margin-top: 5px; overflow: hidden; color: #6a7487; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.contract-empty-detail { margin: 0; border: 1px dashed #d8dde7; border-radius: 8px; padding: 14px; color: var(--muted); background: #fff; text-align: center; font-size: 9px; }
.contract-transition-modal, .contract-obligation-modal { width: min(590px, calc(100% - 28px)); }

@media (max-width: 1180px) {
  .contract-workspace { grid-template-columns: 1fr; }
  .contract-agenda { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .contract-kpis { grid-template-columns: 1fr 1fr; }
  .contract-filter-bar { grid-template-columns: 1fr 1fr; }
  .contract-filter-bar .search-field { grid-column: 1 / -1; }
  .contract-detail-summary { grid-template-columns: 1fr 1fr; }
  .contract-detail-grid { grid-template-columns: 1fr; }
  .contract-collaboration-grid { grid-template-columns: 1fr; }
  .settings-live-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .contract-kpis, .contract-agenda, .contract-filter-bar, .contract-detail-summary { grid-template-columns: 1fr; }
  .contract-filter-bar .search-field { grid-column: auto; }
  .contract-pagination { align-items: stretch; flex-direction: column; }
  .contract-pagination > div, .contract-pagination button { width: 100%; }
  .contract-editor-heading, .contract-detail-heading { align-items: stretch; flex-direction: column; }
  .contract-editor-mode { align-self: flex-start; }
  .contract-detail-state { justify-content: flex-start; }
  .contract-sticky-actions { margin-right: -17px; margin-bottom: -22px; margin-left: -17px; padding: 12px 17px; }
  .contract-detail-actions { display: grid; grid-template-columns: 1fr; }
}

.status-pill.danger { color: #b84e4e; background: var(--red-pale); }

/* Hash encadeado de cada evento de auditoria. */
.audit-hash { margin-top: 3px; }
.audit-hash code { border-radius: 4px; padding: 1px 4px; color: #63708a; background: #f0f2f6; font: 9px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
/* The application shell is revealed only after /auth/me validates the browser
   session. This prevents customer data and protected controls flashing to anonymous users. */
.console-auth-bootstrap {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1rem;
  background: #10251f;
  color: #fffdf9;
}

.console-auth-bootstrap img {
  filter: brightness(0) invert(1);
  animation: venue-auth-reveal 720ms cubic-bezier(.22, 1, .36, 1) both;
}

.console-auth-bootstrap p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 650;
}

.console-auth-bootstrap p::after {
  width: 0.5rem;
  height: 0.5rem;
  display: inline-block;
  margin-left: 0.55rem;
  border-radius: 0.125rem;
  background: #ff6b68;
  content: "";
  animation: venue-auth-confirm 1.1s cubic-bezier(.22, 1, .36, 1) both;
}

.console-auth-bootstrap::after {
  width: 9rem;
  height: 0.1875rem;
  border-radius: 999px;
  background: #c6fd4d;
  content: "";
  transform-origin: left center;
  animation: venue-auth-progress 900ms cubic-bezier(.22, 1, .36, 1) both;
}

.console-auth-bootstrap.error img {
  animation: none;
}

.console-auth-bootstrap.error::after,
.console-auth-bootstrap.error p::after { display: none; }

.console-auth-bootstrap.error p {
  max-width: 30rem;
  padding-inline: 1.25rem;
  text-align: center;
}

.console-auth-bootstrap.error a {
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border-radius: 0.5rem 0 0.5rem 0.5rem;
  background: #c6fd4d;
  color: #10251f;
  clip-path: polygon(0 0, calc(100% - 0.75rem) 0, 100% 0.75rem, 100% 100%, 0 100%);
  font-weight: 700;
  text-decoration: none;
}

@keyframes venue-auth-reveal {
  from { transform: translateY(0.5rem); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes venue-auth-progress {
  from { transform: scaleX(0); opacity: 0.5; }
  to { transform: scaleX(1); opacity: 1; }
}

@keyframes venue-auth-confirm {
  0%, 65% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .console-auth-bootstrap img,
  .console-auth-bootstrap::after,
  .console-auth-bootstrap p::after { animation: none; }
}

/* Viewport seguro para modais extensos e colaboração em tablets/mobile. */
.modal {
  max-height: calc(100dvh - 28px);
  overscroll-behavior: contain;
}

.collaboration-modal {
  width: min(900px, calc(100vw - 28px));
}

.collaboration-modal-card {
  width: 100%;
  min-width: 0;
}

.template-editor-actions,
.contract-sticky-actions {
  bottom: 0;
  margin-bottom: 0;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
}

@media (max-width: 760px) {
  .template-editor-modal {
    max-height: calc(100dvh - 16px);
  }
}

@media (max-width: 680px) {
  .toast-region { bottom: calc(78px + env(safe-area-inset-bottom)); }
}

@media (max-width: 520px) {
  .template-editor-actions,
  .contract-sticky-actions {
    margin-bottom: 0;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}
