<mxfile host="app.diagrams.net" modified="2026-05-10T00:00:00.000Z" agent="Stoix Cartorial R5 Consolidated" version="22.0.0" type="device">
  <diagram id="01-context-c4" name="01-context-c4">
    <mxGraphModel dx="1800" dy="1300" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1900" pageHeight="1480" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="C4 - Level 1 (System Context) R5: Stoix Notarial Back-Office" style="text;html=1;align=center;fontSize=22;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="40" width="1820" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="subtitle" value="System at the centre; people in the inner ring (navy); active external systems in the outer ring (grey). R5: MVP scope reduced to 5 integrations - no ICP-Brasil chain, no MNE, no CENAD, no OpenTimestamps. Notary curates regulatory sources directly into the Knowledge Base." style="text;html=1;align=center;fontSize=14;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="40" y="80" width="1820" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="howread" value="&lt;b&gt;How to read:&lt;/b&gt; (1) Stoix Notarial Back-Office at the centre (blue). (2) People in the upper ring (navy) numbered 1-4 - auth = email/password + MFA TOTP, no A3 cert in MVP. (3) Active external systems in the lower ring (grey) numbered 5-9 - 5 integrations total. (4) Discrete &quot;Future roadmap&quot; block at the bottom-right lists what was deliberately left out of the MVP." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF8DC;strokeColor=#D4AC0D;fontSize=12;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="40" y="120" width="1820" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="ring_inner" value="Inner ring - People who operate the system" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F0F4F8;strokeColor=#08427B;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#08427B" vertex="1" parent="1">
          <mxGeometry x="80" y="220" width="1740" height="240" as="geometry"/>
        </mxCell>

        <mxCell id="notary" value="&lt;b&gt;1. Notary&lt;/b&gt;&#10;[Person - Controller]&#10;&#10;Approves act templates, fee schedule versions and KB versions. Auth = email/password + MFA TOTP. No A3 cert in MVP." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#08427B;strokeColor=#073B6F;fontColor=#ffffff;fontSize=12;align=center;arcSize=10;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="140" y="270" width="380" height="170" as="geometry"/>
        </mxCell>
        <mxCell id="clerk" value="&lt;b&gt;2. Notary Clerk&lt;/b&gt;&#10;[Person]&#10;&#10;Day-to-day execution: uploads documents, validates extraction, generates draft act. Billing uses the active fee_schedule_version snapshot." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#08427B;strokeColor=#073B6F;fontColor=#ffffff;fontSize=12;align=center;arcSize=10;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="570" y="270" width="380" height="170" as="geometry"/>
        </mxCell>
        <mxCell id="stoixadmin" value="&lt;b&gt;3. Stoix Admin&lt;/b&gt;&#10;[Person - Operator]&#10;&#10;Tenant onboarding (pulumi up), support, per-tenant billing, observability. No access to tenant data." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#08427B;strokeColor=#073B6F;fontColor=#ffffff;fontSize=12;align=center;arcSize=10;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1000" y="270" width="380" height="170" as="geometry"/>
        </mxCell>
        <mxCell id="dpo" value="&lt;b&gt;4. DPO&lt;/b&gt;&#10;[Person - Data Protection Officer]&#10;&#10;LGPD officer: exports tenant data (dedicated RDS), handles data-subject requests, receives 48h incident alerts via SES." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#08427B;strokeColor=#073B6F;fontColor=#ffffff;fontSize=12;align=center;arcSize=10;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1430" y="270" width="380" height="170" as="geometry"/>
        </mxCell>

        <mxCell id="system" value="&lt;b&gt;Stoix Notarial Back-Office&lt;/b&gt;&#10;[SaaS web system - Single-tenant data plane (Silo A2)]&#10;&#10;Flow A (hermeneutic template authoring), Flow B (act execution with OCR + LLM), Knowledge Base (RAG over NSCGJ / CGJ-SP provimentos), Fee Schedule (structural CRUD), Template Catalog and Procedure wiki. Per tenant: 1 dedicated RDS PostgreSQL + 4 dedicated S3 buckets + 1 dedicated KMS CMK + 1 dedicated Keycloak realm. ECS, VPC, ALB, CloudFront and Keycloak shared. Region sa-east-1 only." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#1168BD;strokeColor=#0E5BA6;fontColor=#ffffff;fontSize=14;align=center;fontStyle=0;arcSize=8;verticalAlign=middle;strokeWidth=3" vertex="1" parent="1">
          <mxGeometry x="450" y="540" width="1000" height="240" as="geometry"/>
        </mxCell>

        <mxCell id="ring_outer" value="Outer ring - Active external systems (5 integrations - MVP scope)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F8F8F8;strokeColor=#666;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="40" y="860" width="1820" height="280" as="geometry"/>
        </mxCell>

        <mxCell id="textract" value="&lt;b&gt;5. AWS Textract&lt;/b&gt;&#10;[Runtime - Managed OCR]&#10;&#10;OCR of party documents (RG, CPF, certificates) and OCR of KB ingestion PDFs. Region sa-east-1." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#999999;strokeColor=#666;fontColor=#ffffff;fontSize=12;align=center;arcSize=10;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="80" y="920" width="320" height="180" as="geometry"/>
        </mxCell>
        <mxCell id="bedrock" value="&lt;b&gt;6. AWS Bedrock&lt;/b&gt;&#10;[Runtime - Managed LLM]&#10;&#10;Claude Sonnet 4.5 (Flow A + KB extract), Claude Haiku 4.5 (Flow B + RAG), Titan Embed v2 multilingual (1024d, pgvector HNSW). Region sa-east-1. PII-stripped before invoke." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#999999;strokeColor=#666;fontColor=#ffffff;fontSize=12;align=center;arcSize=10;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="430" y="920" width="320" height="180" as="geometry"/>
        </mxCell>
        <mxCell id="ses" value="&lt;b&gt;7. AWS SES&lt;/b&gt;&#10;[Runtime - Transactional email]&#10;&#10;Per-tenant notifications: LGPD exports, 48h incident alerts to DPO, KB version expiring alerts, fee schedule expiring alerts, incident routing fallback." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#999999;strokeColor=#666;fontColor=#ffffff;fontSize=12;align=center;arcSize=10;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="780" y="920" width="320" height="180" as="geometry"/>
        </mxCell>
        <mxCell id="clickup" value="&lt;b&gt;8. ClickUp&lt;/b&gt;&#10;[Operational - Incident routing]&#10;&#10;CW Alarms -&gt; SNS -&gt; Lambda router -&gt; ClickUp API: incidents become tasks in the on-call list. No paging, no 24x7 SLA in MVP." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#999999;strokeColor=#666;fontColor=#ffffff;fontSize=12;align=center;arcSize=10;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="1130" y="920" width="320" height="180" as="geometry"/>
        </mxCell>
        <mxCell id="github" value="&lt;b&gt;9. GitHub Actions&lt;/b&gt;&#10;[Operational - CI/CD]&#10;&#10;Build, test and deploy via OIDC trust to AWS (no long-lived keys). Pulumi up per tenant on merge to main." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#999999;strokeColor=#666;fontColor=#ffffff;fontSize=12;align=center;arcSize=10;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="1480" y="920" width="320" height="180" as="geometry"/>
        </mxCell>

        <mxCell id="e1" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;entryX=0.15;entryY=0;strokeColor=#08427B;strokeWidth=2.5" edge="1" parent="1" source="notary" target="system">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e1_lbl" value="approves templates / KB / fee schedule (MFA TOTP challenge)" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="170" y="492" width="360" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="e2" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;entryX=0.4;entryY=0;strokeColor=#08427B;strokeWidth=2.5" edge="1" parent="1" source="clerk" target="system">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e2_lbl" value="executes acts, uploads docs, generates draft" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="615" y="492" width="320" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="e3" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;entryX=0.6;entryY=0;strokeColor=#08427B;strokeWidth=2.5" edge="1" parent="1" source="stoixadmin" target="system">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e3_lbl" value="onboarding (pulumi up), per-tenant billing, support" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="1045" y="492" width="320" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="e4" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;entryX=0.85;entryY=0;strokeColor=#08427B;strokeWidth=2.5" edge="1" parent="1" source="dpo" target="system">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e4_lbl" value="exports tenant RDS, receives 48h incident alerts" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="1460" y="492" width="360" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="e5" style="endArrow=classic;html=1;rounded=0;exitX=0.2;exitY=1;entryX=0.5;entryY=0;strokeColor=#666666;strokeWidth=2" edge="1" parent="1" source="system" target="textract">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e5_lbl" value="OCR party docs + KB ingestion (OcrClient)" style="text;html=1;fontSize=11;fontColor=#444444;align=center" vertex="1" parent="1">
          <mxGeometry x="80" y="820" width="320" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="e6" style="endArrow=classic;html=1;rounded=0;exitX=0.35;exitY=1;entryX=0.5;entryY=0;strokeColor=#666666;strokeWidth=2" edge="1" parent="1" source="system" target="bedrock">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e6_lbl" value="Sonnet 4.5 / Haiku 4.5 / Titan v2 (BedrockClient)" style="text;html=1;fontSize=11;fontColor=#444444;align=center" vertex="1" parent="1">
          <mxGeometry x="430" y="820" width="320" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="e7" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;entryX=0.5;entryY=0;strokeColor=#666666;strokeWidth=2" edge="1" parent="1" source="system" target="ses">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e7_lbl" value="incident + LGPD + KB/fee expiring emails" style="text;html=1;fontSize=11;fontColor=#444444;align=center" vertex="1" parent="1">
          <mxGeometry x="780" y="820" width="320" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="e8" style="endArrow=classic;html=1;rounded=0;exitX=0.65;exitY=1;entryX=0.5;entryY=0;strokeColor=#666666;strokeWidth=2" edge="1" parent="1" source="system" target="clickup">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e8_lbl" value="CW Alarm -&gt; SNS -&gt; ClickUp task" style="text;html=1;fontSize=11;fontColor=#444444;align=center" vertex="1" parent="1">
          <mxGeometry x="1130" y="820" width="320" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="e9" style="endArrow=classic;html=1;rounded=0;exitX=0.85;exitY=1;entryX=0.5;entryY=0;strokeColor=#666666;strokeWidth=2;dashed=1" edge="1" parent="1" source="system" target="github">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e9_lbl" value="OIDC trust, deploy via pulumi" style="text;html=1;fontSize=11;fontColor=#444444;align=center" vertex="1" parent="1">
          <mxGeometry x="1480" y="820" width="320" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="roadmap" value="&lt;b&gt;Future roadmap (out of scope - MVP)&lt;/b&gt;&#10;&#10;Deliberately deferred to a later release; no design dependency from the MVP:&#10;&#10;- ICP-Brasil PSC chain + Keycloak PKCS#11 plugin (A3 cert auth + qualified signature)&#10;- MNE / e-Notariado (CNJ Res. 100/2020) - native electronic notarial acts&#10;- CENAD (Central Notarial de Autenticacao Digital) - digital seal for copies&#10;- OpenTimestamps (Bitcoin RFC 3161) - external cryptographic anchor&#10;- TSA RFC 3161 (CertiSign / Serasa) - tamper-evidence outside AWS&#10;- WhatsApp gateway - P0/P1 push notifications&#10;- PagerDuty - 24x7 paging&#10;- Legacy notary system - historical data migration" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FAFAFA;strokeColor=#BBBBBB;dashed=1;strokeWidth=1;fontColor=#777777;fontSize=11;align=left;verticalAlign=top;spacingLeft=16;spacingRight=16;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="40" y="1170" width="1820" height="220" as="geometry"/>
        </mxCell>

        <mxCell id="legBox" value="&lt;b&gt;Legend R5&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#444;fontSize=12;fontStyle=1;align=left;verticalAlign=top;spacingLeft=14;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="40" y="1410" width="1820" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="leg1" value="Person" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#08427B;fontColor=#ffffff;fontSize=11;strokeColor=#073B6F" vertex="1" parent="1">
          <mxGeometry x="100" y="1430" width="140" height="34" as="geometry"/>
        </mxCell>
        <mxCell id="leg2" value="System (this)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#1168BD;fontColor=#ffffff;fontSize=11;strokeColor=#0E5BA6" vertex="1" parent="1">
          <mxGeometry x="260" y="1430" width="140" height="34" as="geometry"/>
        </mxCell>
        <mxCell id="leg3" value="External system (active)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#999999;fontColor=#ffffff;fontSize=11;strokeColor=#666" vertex="1" parent="1">
          <mxGeometry x="420" y="1430" width="180" height="34" as="geometry"/>
        </mxCell>
        <mxCell id="leg4" value="Future roadmap (out of scope MVP)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FAFAFA;strokeColor=#BBBBBB;dashed=1;fontColor=#777777;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="620" y="1430" width="240" height="34" as="geometry"/>
        </mxCell>
        <mxCell id="leg5" value="Solid grey arrow = runtime call  |  Dashed grey arrow = build-time/CI flow  |  Navy arrow = person uses the system" style="text;html=1;fontSize=11;align=left;verticalAlign=middle;spacingLeft=14;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="880" y="1430" width="940" height="34" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="02-container-c4" name="02-container-c4">
    <mxGraphModel dx="2200" dy="1500" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="2400" pageHeight="1700" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="C4 - Level 2 (Containers) R5: Stoix Notarial Back-Office" style="text;html=1;align=center;fontSize=22;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="40" width="2320" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="subtitle" value="UI/Edge -&gt; Application -&gt; Data (single-tenant data plane Silo A2 per notary). R5 modules wired explicitly: Knowledge Base (RAG), Fee Schedule (structural CRUD - NEW), Template Catalog (CRUD textual), Procedure (wiki). Keycloak shared with one realm per tenant; dedicated RDS per tenant. No A3 / no PKCS#11 / no TSA in MVP." style="text;html=1;align=center;fontSize=14;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="40" y="80" width="2320" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="howread" value="&lt;b&gt;How to read:&lt;/b&gt; (1) User enters from the top. (2) Layer 1 UI &amp; Edge - CloudFront/WAF/SPA + shared Keycloak (1 instance, N realms, MFA TOTP). (3) Layer 2 Application - API BFF + TS abstractions + Lambda workers (one queue + one worker per async pipeline) + module services (FeeScheduleService NEW, TemplateCatalogService, ProcedureService). (4) Layer 3 Data - 1 dedicated RDS + 4 dedicated S3 buckets + 1 dedicated KMS CMK per tenant. External systems on the right (grey). Colours: navy UI, orange application, red data, grey externals, green KB module." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF8DC;strokeColor=#D4AC0D;fontSize=12;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="40" y="130" width="2320" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="layer1" value="Layer 1 - UI &amp; Edge (shared across tenants)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F0F4F8;strokeColor=#08427B;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#08427B" vertex="1" parent="1">
          <mxGeometry x="60" y="230" width="1820" height="220" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="&lt;b&gt;Notary / Notary Clerk / Stoix Admin&lt;/b&gt;&lt;br/&gt;[Person]&lt;br/&gt;notary.stoix.com.br/{slug}" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#08427B;fontColor=#ffffff;fontSize=12;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="100" y="295" width="280" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="cdn" value="&lt;b&gt;CloudFront + WAF&lt;/b&gt;&lt;br/&gt;[CDN + Edge - shared]&lt;br/&gt;&lt;br/&gt;TLS 1.3, OWASP Top 10&lt;br/&gt;rate limit, geo-restriction BR" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#438DD5;strokeColor=#3C7FC0;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="430" y="295" width="280" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="alb" value="&lt;b&gt;ALB shared&lt;/b&gt;&lt;br/&gt;[Application Load Balancer]&lt;br/&gt;&lt;br/&gt;Routes by path /{slug} to API target group; injects X-Tenant-Slug header." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#438DD5;strokeColor=#3C7FC0;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="760" y="295" width="280" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="webapp" value="&lt;b&gt;Web App (SPA)&lt;/b&gt;&lt;br/&gt;[Next.js / React, TypeScript]&lt;br/&gt;&lt;br/&gt;UI for Flow A, Flow B and the 4 R5 modules (KB, Fee Schedule, Template Catalog, Procedure). Admin panel, audit timeline." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#438DD5;strokeColor=#3C7FC0;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="1090" y="295" width="280" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="keycloak" value="&lt;b&gt;Keycloak shared&lt;/b&gt;&lt;br/&gt;[ECS Fargate, 2 tasks multi-AZ]&lt;br/&gt;&lt;br/&gt;OIDC issuer, realm-per-tenant (notary-{slug}). MFA TOTP. JWT carries realm + role claims. No PKCS#11 / no A3 plugin in MVP." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#3334B9;strokeColor=#1F1F8C;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1420" y="295" width="440" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="layer2" value="Layer 2 - Application (shared across tenants - resolution by X-Tenant-Slug + JWT realm claim)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF7E6;strokeColor=#FF9900;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#7A4900" vertex="1" parent="1">
          <mxGeometry x="60" y="480" width="1820" height="560" as="geometry"/>
        </mxCell>

        <mxCell id="api" value="&lt;b&gt;API BFF&lt;/b&gt;&lt;br/&gt;[Node.js Fastify, ECS Fargate]&lt;br/&gt;&lt;br/&gt;Auth via Keycloak JWT (realm claim). TenantResolver maps realm-&gt;DB pool. OTel SDK. Hosts module routes: FeeScheduleService (NEW R5), TemplateCatalogService, ProcedureService, plus Flow A/B endpoints." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#438DD5;strokeColor=#3C7FC0;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="100" y="540" width="300" height="240" as="geometry"/>
        </mxCell>

        <mxCell id="absheader" value="TS abstractions (R5)" style="text;html=1;align=center;fontSize=12;fontStyle=1;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="430" y="520" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="ocrclient" value="&lt;b&gt;OcrClient&lt;/b&gt;&lt;br/&gt;[TS abstraction]&lt;br/&gt;&lt;br/&gt;Provider: Textract sa-east-1. Used by Flow B and KB/Fee extract workers. Local CPF DV (Mod 11)." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#3C7FC0;fontColor=#000000;fontSize=11;align=center;verticalAlign=middle;dashed=1;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="430" y="545" width="280" height="70" as="geometry"/>
        </mxCell>
        <mxCell id="bedrockclient" value="&lt;b&gt;BedrockClient&lt;/b&gt;&lt;br/&gt;[TS abstraction]&lt;br/&gt;&lt;br/&gt;Provider: Bedrock sa-east-1. Sonnet 4.5 (Flow A + KB extract), Haiku 4.5 (Flow B + RAG), Titan Embed v2 (1024d). PII-stripping before invoke." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#3C7FC0;fontColor=#000000;fontSize=11;align=center;verticalAlign=middle;dashed=1;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="430" y="625" width="280" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="feeclient" value="&lt;b&gt;FeeScheduleClient&lt;/b&gt;&lt;br/&gt;[TS abstraction - NEW R5]&lt;br/&gt;&lt;br/&gt;Lookup of active fee_schedule_line by (act_code, value_range). Returns version_id + content_hash for billing snapshot." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#3FBFAE;strokeColor=#1F8A7C;fontColor=#000000;fontSize=11;align=center;verticalAlign=middle;dashed=1;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="430" y="715" width="280" height="65" as="geometry"/>
        </mxCell>

        <mxCell id="workersheader" value="Async workers - Flow A / B" style="text;html=1;align=center;fontSize=12;fontStyle=1;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="740" y="520" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="ocrworker" value="&lt;b&gt;ocr-worker&lt;/b&gt;&lt;br/&gt;[Lambda]&lt;br/&gt;Flow B: extracts party documents via OcrClient. Persists to act_party / act_document." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#438DD5;strokeColor=#3C7FC0;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="740" y="545" width="280" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="llmworker" value="&lt;b&gt;llm-worker&lt;/b&gt;&lt;br/&gt;[Lambda]&lt;br/&gt;Flow A (Sonnet 4.5 sub-agents), Flow B (Haiku 4.5 + RAG via pgvector HNSW). Writes rag_query_text_hash only." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#438DD5;strokeColor=#3C7FC0;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="740" y="660" width="280" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="kbheader" value="Knowledge Base module (RAG)" style="text;html=1;align=center;fontSize=12;fontStyle=1;fontColor=#5C8A3E" vertex="1" parent="1">
          <mxGeometry x="1050" y="520" width="500" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="kbgroup" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EFF7E8;strokeColor=#5C8A3E;dashed=1;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1050" y="540" width="500" height="240" as="geometry"/>
        </mxCell>
        <mxCell id="kbupload" value="&lt;b&gt;KB Upload (API route)&lt;/b&gt;&lt;br/&gt;[Fastify route in API BFF]&lt;br/&gt;Notary uploads PDF/DOCX/HTML with effective_from / effective_until + kb_category. Persists kb_document." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;strokeColor=#5C8A3E;fontColor=#000000;fontSize=11;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="1060" y="550" width="240" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="kbextract" value="&lt;b&gt;kb-extract-worker&lt;/b&gt;&lt;br/&gt;[Lambda]&lt;br/&gt;OCR via OcrClient + Sonnet 4.5 via BedrockClient. Tier 1/2/3 chunking. Generates kb_chunk + Titan v2 embeddings (1024d). pgvector HNSW (m=16, ef_c=64)." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;strokeColor=#5C8A3E;fontColor=#000000;fontSize=11;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="1300" y="550" width="240" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="kbdiff" value="&lt;b&gt;KB Diff Reviewer (UI)&lt;/b&gt;&lt;br/&gt;Notary reviews PDF original vs structured JSON side-by-side. Approves -&gt; new active kb_version (MFA TOTP challenge + audit log)." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;strokeColor=#5C8A3E;fontColor=#000000;fontSize=11;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="1060" y="660" width="240" height="110" as="geometry"/>
        </mxCell>
        <mxCell id="kbvector" value="&lt;b&gt;Vector Store&lt;/b&gt;&lt;br/&gt;[pgvector on tenant RDS]&lt;br/&gt;kb_chunk + embedding (1024d). RAG hybrid: SQL exact + semantic. ef_search=40, top-K=20, threshold cos 0.30." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;strokeColor=#5C8A3E;fontColor=#000000;fontSize=11;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="1300" y="660" width="240" height="110" as="geometry"/>
        </mxCell>

        <mxCell id="otherwheader" value="Periodic / event-driven workers" style="text;html=1;align=center;fontSize=12;fontStyle=1;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="100" y="810" width="1450" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="billingworker" value="&lt;b&gt;billing-worker&lt;/b&gt;&lt;br/&gt;[Lambda + EventBridge cron]&lt;br/&gt;Per-tenant monthly close. Captures 3 immutable snapshots in billing_event: act_template_version_hash, fee_schedule_version_hash, kb_consultations_snapshot[]." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFB94D;strokeColor=#B27800;fontColor=#000000;fontSize=11;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="100" y="840" width="320" height="130" as="geometry"/>
        </mxCell>
        <mxCell id="feeextract" value="&lt;b&gt;fee-schedule-extract-worker&lt;/b&gt;&lt;br/&gt;[Lambda - NEW R5]&lt;br/&gt;OCR + Sonnet 4.5 to parse the SP fee schedule PDF into fee_schedule_line rows (act_code + value_range). Notary approves the diff -&gt; active fee_schedule_version." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#3FBFAE;strokeColor=#1F8A7C;fontColor=#000000;fontSize=11;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="450" y="840" width="320" height="130" as="geometry"/>
        </mxCell>
        <mxCell id="kbalert" value="&lt;b&gt;kb-vigencia-worker&lt;/b&gt;&lt;br/&gt;[Lambda + daily cron]&lt;br/&gt;Alerts notary 30/15/5 days before kb_version or fee_schedule_version expires. Blocks economic acts when expired." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;strokeColor=#5C8A3E;fontColor=#000000;fontSize=11;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="800" y="840" width="320" height="130" as="geometry"/>
        </mxCell>
        <mxCell id="eventbus" value="&lt;b&gt;EventBridge bus&lt;/b&gt;&lt;br/&gt;Domain events tagged with tenant_slug: act.created, draft.generated, billing.event, kb_version.approved, kb_version.expiring, fee_schedule_version.approved, fee_schedule_version.expiring." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F3F8FE;strokeColor=#3C7FC0;fontColor=#1F4E79;fontSize=11;align=center;verticalAlign=middle;dashed=1" vertex="1" parent="1">
          <mxGeometry x="1150" y="840" width="400" height="130" as="geometry"/>
        </mxCell>
        <mxCell id="layer2note" value="Application stateless: tenant resolved by X-Tenant-Slug header (sourced from Keycloak realm in JWT). Per-tenant connection pool in API memory. Workers receive tenant_slug in event payload. No 24x7 paging in MVP - alarms route to ClickUp via Lambda router." style="text;html=1;fontSize=11;align=center;fontColor=#7A4900;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="100" y="985" width="1700" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="layer3" value="Layer 3 - Data &amp; Security (DEDICATED PER TENANT - Silo A2)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFEEEC;strokeColor=#DD344C;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#8B0000" vertex="1" parent="1">
          <mxGeometry x="60" y="1060" width="1820" height="540" as="geometry"/>
        </mxCell>

        <mxCell id="tenantbox" value="Per tenant (1 notary = 1 set):" style="text;html=1;align=center;fontSize=12;fontStyle=1;fontColor=#8B0000" vertex="1" parent="1">
          <mxGeometry x="100" y="1100" width="1700" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="rds" value="&lt;b&gt;RDS PostgreSQL&lt;/b&gt;&lt;br/&gt;notary-{slug}-prd&lt;br/&gt;db.t4g.micro multi-AZ&lt;br/&gt;&lt;br/&gt;1 dedicated instance per tenant. Single &quot;app&quot; schema (no RLS, no tenant_id). Extensions: pgvector (HNSW), pgcrypto, pg_stat_statements. Hosts act, act_template/_version, kb_*, fee_schedule_*, procedure, billing_event." style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;strokeColor=#3C7FC0;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="100" y="1130" width="320" height="200" as="geometry"/>
        </mxCell>
        <mxCell id="s3uploads" value="&lt;b&gt;S3 notary-{slug}-uploads&lt;/b&gt;&lt;br/&gt;[Dedicated bucket]&lt;br/&gt;Party documents (RG, CPF, certificates). SSE-KMS with the tenant CMK. Versioning on." style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;strokeColor=#3C7FC0;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="450" y="1130" width="280" height="200" as="geometry"/>
        </mxCell>
        <mxCell id="s3livro" value="&lt;b&gt;S3 notary-{slug}-livro-perpetuo&lt;/b&gt;&lt;br/&gt;[Dedicated bucket + Object Lock Compliance]&lt;br/&gt;livro_notas perpetual (30y Object Lock); subsidiary papers 10y; audit 7y. Tamper-evidence = HMAC hash chain (no external TSA in MVP)." style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;strokeColor=#3C7FC0;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="760" y="1130" width="320" height="200" as="geometry"/>
        </mxCell>
        <mxCell id="s3kb" value="&lt;b&gt;S3 notary-{slug}-kb&lt;br/&gt;+ notary-{slug}-fee-schedule&lt;/b&gt;&lt;br/&gt;[2 dedicated buckets]&lt;br/&gt;KB originals (PDF/DOCX/HTML uploaded by notary) and SP fee schedule originals. Versioning on." style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;strokeColor=#3C7FC0;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="1110" y="1130" width="280" height="200" as="geometry"/>
        </mxCell>
        <mxCell id="kms" value="&lt;b&gt;KMS CMK alias/notary-{slug}&lt;/b&gt;&lt;br/&gt;[Customer Master Key - sa-east-1 only]&lt;br/&gt;1 dedicated CMK per tenant. Multi-region keys OFF. Annual rotation. Encrypts RDS, S3 (4 buckets), per-tenant Secrets, pgcrypto data keys for act_party.tax_id (CPF/CNPJ column-level)." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#DD344C;strokeColor=#B8001F;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1420" y="1130" width="380" height="200" as="geometry"/>
        </mxCell>

        <mxCell id="sharedbox" value="Shared across tenants:" style="text;html=1;align=center;fontSize=12;fontStyle=1;fontColor=#8B0000" vertex="1" parent="1">
          <mxGeometry x="100" y="1350" width="1700" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="rdsauth" value="&lt;b&gt;RDS Stoix-Auth&lt;/b&gt;&lt;br/&gt;db.t4g.micro multi-AZ&lt;br/&gt;Backing store for Keycloak (shared across realms - auth data is tenant-agnostic)." style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#3334B9;strokeColor=#1F1F8C;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="100" y="1380" width="320" height="200" as="geometry"/>
        </mxCell>
        <mxCell id="sqs" value="&lt;b&gt;SQS FIFO queues&lt;/b&gt;&lt;br/&gt;[Messaging - shared]&lt;br/&gt;ocr-queue, llm-queue, kb-extract-queue, fee-extract-queue, billing-queue. tenant_slug in payload + MessageGroupId. DLQ per stage." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#438DD5;strokeColor=#3C7FC0;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="450" y="1380" width="320" height="200" as="geometry"/>
        </mxCell>
        <mxCell id="ddb" value="&lt;b&gt;DynamoDB audit_log (shared)&lt;/b&gt;&lt;br/&gt;[NoSQL key-value]&lt;br/&gt;PK = tenant_slug#timestamp (HMAC hash chain per tenant). Streams ON, TTL 7y. Idempotency keys + session cache." style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;strokeColor=#3C7FC0;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="800" y="1380" width="320" height="200" as="geometry"/>
        </mxCell>
        <mxCell id="secrets" value="&lt;b&gt;Secrets Manager&lt;/b&gt;&lt;br/&gt;[Vault - shared]&lt;br/&gt;Per-tenant RDS credentials (30d rotation), Bedrock/Textract/SES/ClickUp/GitHub OIDC secrets, Keycloak admin. Each secret encrypted by the matching tenant CMK." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#DD344C;strokeColor=#B8001F;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1150" y="1380" width="320" height="200" as="geometry"/>
        </mxCell>
        <mxCell id="kmsnote" value="R5 isolation: 1 notary = 1 RDS + 4 S3 + 1 CMK + 1 Keycloak realm. A code bug CANNOT cause cross-tenant leakage because the data plane is physically separated. Shared: ECS, ALB, CloudFront, Keycloak (with realms), DDB (with PK), SQS (with tenant_slug + MessageGroupId)." style="text;html=1;fontSize=11;align=center;fontColor=#8B0000;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="1500" y="1380" width="380" height="200" as="geometry"/>
        </mxCell>

        <mxCell id="extlayer" value="External systems (5 - MVP scope)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F8F8F8;strokeColor=#666;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="1900" y="230" width="460" height="1370" as="geometry"/>
        </mxCell>
        <mxCell id="textract" value="&lt;b&gt;AWS Textract (sa-east-1)&lt;/b&gt;&lt;br/&gt;[via OcrClient]&lt;br/&gt;OCR for Flow B + KB ingest + Fee Schedule ingest" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#999999;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle;strokeColor=#666" vertex="1" parent="1">
          <mxGeometry x="1940" y="300" width="380" height="110" as="geometry"/>
        </mxCell>
        <mxCell id="bedrock" value="&lt;b&gt;AWS Bedrock (sa-east-1)&lt;/b&gt;&lt;br/&gt;[via BedrockClient]&lt;br/&gt;Sonnet 4.5 + Haiku 4.5 + Titan Embed v2 multilingual (1024d)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#999999;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle;strokeColor=#666" vertex="1" parent="1">
          <mxGeometry x="1940" y="430" width="380" height="110" as="geometry"/>
        </mxCell>
        <mxCell id="ses" value="&lt;b&gt;AWS SES&lt;/b&gt;&lt;br/&gt;Transactional email per tenant (notary, DPO, expiring versions, LGPD exports)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#999999;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle;strokeColor=#666" vertex="1" parent="1">
          <mxGeometry x="1940" y="560" width="380" height="110" as="geometry"/>
        </mxCell>
        <mxCell id="clickupext" value="&lt;b&gt;ClickUp API&lt;/b&gt;&lt;br/&gt;CW Alarm -&gt; SNS -&gt; Lambda router -&gt; ClickUp task in on-call list" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#999999;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle;strokeColor=#666" vertex="1" parent="1">
          <mxGeometry x="1940" y="690" width="380" height="110" as="geometry"/>
        </mxCell>
        <mxCell id="github" value="&lt;b&gt;GitHub Actions (OIDC)&lt;/b&gt;&lt;br/&gt;CI/CD - assume-role into AWS via OIDC trust. No long-lived keys. Pulumi up per tenant." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#999999;fontColor=#ffffff;fontSize=11;align=center;verticalAlign=middle;strokeColor=#666" vertex="1" parent="1">
          <mxGeometry x="1940" y="820" width="380" height="110" as="geometry"/>
        </mxCell>

        <mxCell id="roadmap_ext" value="&lt;b&gt;Future roadmap (out of scope - MVP)&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;Not wired in any container; no design dependency:&lt;br/&gt;- ICP-Brasil PSC + Keycloak PKCS#11 plugin&lt;br/&gt;- TSA RFC 3161 + OpenTimestamps&lt;br/&gt;- MNE / e-Notariado, CENAD&lt;br/&gt;- WhatsApp gateway, PagerDuty&lt;br/&gt;- Legacy notary system migration" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FAFAFA;strokeColor=#BBBBBB;dashed=1;fontColor=#777777;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="1940" y="960" width="380" height="220" as="geometry"/>
        </mxCell>

        <mxCell id="a1" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=2;strokeColor=#08427B" edge="1" parent="1" source="user" target="cdn">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="a1_lbl" value="1 HTTPS / TLS 1.3" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="385" y="360" width="120" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="a2" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=2;strokeColor=#08427B" edge="1" parent="1" source="cdn" target="alb">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="a2_lbl" value="2 origin" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="715" y="360" width="80" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="a3" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=2;strokeColor=#08427B" edge="1" parent="1" source="alb" target="webapp">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="a3_lbl" value="3 path /{slug}" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="1045" y="360" width="100" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="a4" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=2;strokeColor=#3334B9;dashed=1" edge="1" parent="1" source="webapp" target="keycloak">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="a4_lbl" value="4 OIDC realm notary-{slug} + MFA TOTP" style="text;html=1;fontSize=11;fontColor=#1F1F8C;align=center" vertex="1" parent="1">
          <mxGeometry x="1375" y="360" width="290" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="a5" style="endArrow=classic;html=1;exitX=0.4;exitY=1;entryX=0.5;entryY=0;strokeWidth=2;strokeColor=#FF9900" edge="1" parent="1" source="webapp" target="api">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="a5_lbl" value="5 HTTPS/JSON Bearer JWT" style="text;html=1;fontSize=11;fontColor=#7A4900;align=center" vertex="1" parent="1">
          <mxGeometry x="320" y="500" width="200" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="a6" style="endArrow=classic;html=1;exitX=1;exitY=0.2;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#FF9900" edge="1" parent="1" source="api" target="ocrclient">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="a6_lbl" value="6 OcrClient" style="text;html=1;fontSize=11;fontColor=#7A4900;align=center" vertex="1" parent="1">
          <mxGeometry x="395" y="566" width="100" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="a7" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#FF9900" edge="1" parent="1" source="api" target="bedrockclient">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="a7_lbl" value="7 BedrockClient" style="text;html=1;fontSize=11;fontColor=#7A4900;align=center" vertex="1" parent="1">
          <mxGeometry x="395" y="660" width="120" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="a7b" style="endArrow=classic;html=1;exitX=1;exitY=0.8;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#1F8A7C" edge="1" parent="1" source="api" target="feeclient">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="a7b_lbl" value="7b FeeScheduleClient" style="text;html=1;fontSize=11;fontColor=#1F5E55;align=center" vertex="1" parent="1">
          <mxGeometry x="395" y="745" width="160" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="a8" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#3C7FC0" edge="1" parent="1" source="ocrclient" target="ocrworker">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="a9" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#3C7FC0" edge="1" parent="1" source="bedrockclient" target="llmworker">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="a10" style="endArrow=classic;html=1;exitX=1;exitY=0.05;entryX=0;entryY=0.4;strokeWidth=1.5;strokeColor=#5C8A3E" edge="1" parent="1" source="api" target="kbupload">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="900" y="555"/>
              <mxPoint x="900" y="585"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="a10_lbl" value="8 KB upload (Notary)" style="text;html=1;fontSize=11;fontColor=#3F5E2A;align=center" vertex="1" parent="1">
          <mxGeometry x="800" y="535" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="a11" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#5C8A3E" edge="1" parent="1" source="kbupload" target="kbextract">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="a11_lbl" value="9 enqueue extract" style="text;html=1;fontSize=11;fontColor=#3F5E2A;align=center" vertex="1" parent="1">
          <mxGeometry x="1295" y="575" width="120" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="a12" style="endArrow=classic;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;strokeWidth=1.5;strokeColor=#5C8A3E" edge="1" parent="1" source="kbextract" target="kbvector">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="a12_lbl" value="10 chunks + Titan v2 embeddings" style="text;html=1;fontSize=11;fontColor=#3F5E2A;align=center" vertex="1" parent="1">
          <mxGeometry x="1300" y="650" width="220" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="a13" style="endArrow=classic;html=1;exitX=0;exitY=0.5;entryX=1;entryY=0.5;strokeWidth=1.5;strokeColor=#5C8A3E" edge="1" parent="1" source="kbdiff" target="kbextract">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1040" y="595"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="a13_lbl" value="11 Notary approves kb_version" style="text;html=1;fontSize=11;fontColor=#3F5E2A;align=center" vertex="1" parent="1">
          <mxGeometry x="1080" y="640" width="220" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="a14" style="endArrow=classic;html=1;exitX=0.3;exitY=1;entryX=0.5;entryY=0;strokeWidth=2;strokeColor=#DD344C" edge="1" parent="1" source="api" target="rds">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="a14_lbl" value="12 SQL pool per tenant" style="text;html=1;fontSize=11;fontColor=#8B0000;align=center" vertex="1" parent="1">
          <mxGeometry x="80" y="1035" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="a15" style="endArrow=classic;html=1;exitX=0.7;exitY=1;entryX=0.5;entryY=0;strokeWidth=2;strokeColor=#DD344C" edge="1" parent="1" source="api" target="s3uploads">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="a15_lbl" value="13 presigned URL (dedicated bucket)" style="text;html=1;fontSize=11;fontColor=#8B0000;align=center" vertex="1" parent="1">
          <mxGeometry x="430" y="1035" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="a16" style="endArrow=classic;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;strokeWidth=1.5;strokeColor=#DD344C" edge="1" parent="1" source="kbupload" target="s3kb">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="a16_lbl" value="14 store KB original" style="text;html=1;fontSize=11;fontColor=#8B0000;align=center" vertex="1" parent="1">
          <mxGeometry x="1080" y="1035" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="a17" style="endArrow=classic;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;strokeWidth=1.5;strokeColor=#DD344C;dashed=1" edge="1" parent="1" source="llmworker" target="s3livro">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="a17_lbl" value="15 final act -&gt; livro_perpetuo (Object Lock)" style="text;html=1;fontSize=11;fontColor=#8B0000;align=center" vertex="1" parent="1">
          <mxGeometry x="780" y="1035" width="320" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="a18" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=2;strokeColor=#FF9900" edge="1" parent="1" source="ocrworker" target="textract">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1880" y="595"/>
              <mxPoint x="1880" y="355"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="a18_lbl" value="16 AnalyzeDocument" style="text;html=1;fontSize=11;fontColor=#7A4900;align=center" vertex="1" parent="1">
          <mxGeometry x="1745" y="335" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="a19" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=2;strokeColor=#FF9900" edge="1" parent="1" source="llmworker" target="bedrock">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1885" y="720"/>
              <mxPoint x="1885" y="485"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="a19_lbl" value="17 InvokeModel + PII-stripped" style="text;html=1;fontSize=11;fontColor=#7A4900;align=center" vertex="1" parent="1">
          <mxGeometry x="1700" y="465" width="220" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="a20" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#666" edge="1" parent="1" source="kbalert" target="ses">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1890" y="905"/>
              <mxPoint x="1890" y="615"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="a20_lbl" value="18 expiring alert email" style="text;html=1;fontSize=11;fontColor=#444;align=center" vertex="1" parent="1">
          <mxGeometry x="1700" y="595" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="a21" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#666" edge="1" parent="1" source="billingworker" target="clickupext">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1895" y="905"/>
              <mxPoint x="1895" y="745"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="a21_lbl" value="19 incident -&gt; ClickUp task" style="text;html=1;fontSize=11;fontColor=#444;align=center" vertex="1" parent="1">
          <mxGeometry x="1700" y="725" width="220" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="a22" style="endArrow=classic;html=1;exitX=0;exitY=1;entryX=0.5;entryY=0;strokeWidth=1.5;strokeColor=#3334B9;dashed=1" edge="1" parent="1" source="keycloak" target="rdsauth">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1420" y="1620"/>
              <mxPoint x="260" y="1620"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="a22_lbl" value="20 RDS Stoix-Auth (shared)" style="text;html=1;fontSize=11;fontColor=#1F1F8C;align=center" vertex="1" parent="1">
          <mxGeometry x="500" y="1600" width="260" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="a23" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#1F8A7C;dashed=1" edge="1" parent="1" source="feeextract" target="textract">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1875" y="905"/>
              <mxPoint x="1875" y="380"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="a23_lbl" value="21 fee schedule OCR" style="text;html=1;fontSize=11;fontColor=#1F5E55;align=center" vertex="1" parent="1">
          <mxGeometry x="1690" y="385" width="180" height="20" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="03-component-flow-a" name="03-component-flow-a">
    <mxGraphModel dx="1500" dy="1000" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1620" pageHeight="2000" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="Flow A R5 - Act Template authoring with Hermeneutic AI (Template Catalog + KB)" style="text;html=1;align=center;fontSize=22;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="40" width="1540" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="subtitle" value="Notary picks origin (blank or derive from Template Catalog) - Sonnet 4.5 sub-agents propose structure - LegalRefAgent queries KB pgvector for normative citations - PII-stripping pre-Bedrock - Notary approves with MFA TOTP - act_template_version becomes effective." style="text;html=1;align=center;fontSize=14;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="40" y="80" width="1540" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="howread" value="&lt;b&gt;How to read:&lt;/b&gt; (1) Template origin - Notary picks blank OR derives from existing act_template_version. (2) Capture in API BFF. (3) Sonnet 4.5 sub-agents in parallel - LegalRefAgent does RAG on KB (K=20, N=5). (4) PII-stripping then LlmClient -&gt; Bedrock (Sonnet 4.5 primary, Haiku 4.5 fallback). (5) Notary review + MFA TOTP approval -&gt; publish act_template_version. Dashed grey = audit log to DynamoDB (HMAC chain). Out-of-MVP boxes called out at the bottom." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF8DC;strokeColor=#D4AC0D;fontSize=12;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="40" y="135" width="1540" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="U" value="&lt;b&gt;Notary&lt;/b&gt;&lt;br/&gt;[realm notary-{slug}]&lt;br/&gt;email + password + MFA TOTP" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#08427B;fontColor=#FFFFFF;strokeColor=#073B6F;fontSize=12;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="80" y="240" width="200" height="90" as="geometry"/>
        </mxCell>

        <mxCell id="ETAOR" value="Stage 1 - Template origin (Template Catalog module)" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#EFE6F8;strokeColor=#7A4FB6;strokeWidth=2;verticalAlign=top;align=left;fontStyle=1;fontSize=13;spacingLeft=14;spacingTop=10;fontColor=#3F2A6E" vertex="1" parent="1">
          <mxGeometry x="320" y="220" width="1240" height="130" as="geometry"/>
        </mxCell>
        <mxCell id="OR1" value="&lt;b&gt;Option A: blank&lt;/b&gt;&lt;br/&gt;Notary uploads own PDF/DOCX template." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#C8B8E6;fontColor=#000000;strokeColor=#7A4FB6;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="350" y="265" width="370" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="OR2" value="&lt;b&gt;Option B: derive from Template Catalog&lt;/b&gt;&lt;br/&gt;Notary picks effective act_template_version. System hydrates initial draft." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#C8B8E6;fontColor=#000000;strokeColor=#7A4FB6;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="730" y="265" width="380" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="TC" value="&lt;b&gt;Template Catalog (RDS)&lt;/b&gt;&lt;br/&gt;act_template, act_template_version&lt;br/&gt;CRUD textual editor + DOCX upload" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#7A4FB6;fontColor=#FFFFFF;strokeColor=#3F2A6E;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1130" y="255" width="410" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="ETA1" value="Stage 2 - Capture in API BFF (Fastify, ECS Fargate, TenantResolver via Keycloak claim)" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#EAF2FB;strokeColor=#5D82A8;strokeWidth=2;verticalAlign=top;align=left;fontStyle=1;fontSize=13;spacingLeft=14;spacingTop=10;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="320" y="380" width="1240" height="220" as="geometry"/>
        </mxCell>
        <mxCell id="UP" value="&lt;b&gt;TemplateUploadController&lt;/b&gt;&lt;br/&gt;validates MIME, generates presigned URL to tenant S3" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="350" y="430" width="280" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="PA" value="&lt;b&gt;DocumentParserService&lt;/b&gt;&lt;br/&gt;extracts PDF/DOCX text, normalises" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="660" y="430" width="280" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="OR" value="&lt;b&gt;HermeneuticOrchestrator&lt;/b&gt;&lt;br/&gt;coordinates sub-agents via SQS FIFO (tenant_slug in payload)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="970" y="430" width="280" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="S3T" value="S3 notary-{slug}-uploads&lt;br/&gt;(prefix templates/)" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;fontColor=#FFFFFF;strokeColor=#3C7FC0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="350" y="520" width="240" height="70" as="geometry"/>
        </mxCell>
        <mxCell id="SQ" value="SQS FIFO llm-queue&lt;br/&gt;(tenant_slug payload, DLQ)" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;fontColor=#FFFFFF;strokeColor=#3C7FC0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1280" y="430" width="240" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="ETA2" value="Stage 3 - llm-worker (Lambda) - 5 hermeneutic sub-agents in parallel + prompt cache + KB RAG (K=20, N=5)" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#FFF8E8;strokeColor=#B68F2C;strokeWidth=2;verticalAlign=top;align=left;fontStyle=1;fontSize=13;spacingLeft=14;spacingTop=10;fontColor=#7A5A0E" vertex="1" parent="1">
          <mxGeometry x="320" y="630" width="1240" height="240" as="geometry"/>
        </mxCell>
        <mxCell id="AS" value="&lt;b&gt;StructureAgent&lt;/b&gt;&lt;br/&gt;identifies sections" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="350" y="680" width="200" height="70" as="geometry"/>
        </mxCell>
        <mxCell id="AC" value="&lt;b&gt;ClauseAgent&lt;/b&gt;&lt;br/&gt;standard clauses" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="580" y="680" width="200" height="70" as="geometry"/>
        </mxCell>
        <mxCell id="AP2" value="&lt;b&gt;ParameterAgent&lt;/b&gt;&lt;br/&gt;variables and origin" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="810" y="680" width="200" height="70" as="geometry"/>
        </mxCell>
        <mxCell id="AR" value="&lt;b&gt;RuleAgent&lt;/b&gt;&lt;br/&gt;validation rules" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1040" y="680" width="200" height="70" as="geometry"/>
        </mxCell>
        <mxCell id="AL" value="&lt;b&gt;LegalRefAgent&lt;/b&gt;&lt;br/&gt;cites NSCGJ / CGJ-SP / jurisprudence via KB pgvector RAG" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;fontColor=#000000;strokeColor=#5C8A3E;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1270" y="680" width="240" height="70" as="geometry"/>
        </mxCell>
        <mxCell id="PC" value="PromptCache - Anthropic prompt caching (cache reads shared across sub-agents)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F3F8FE;fontColor=#000000;strokeColor=#5D82A8;fontSize=11;fontStyle=2;dashed=1" vertex="1" parent="1">
          <mxGeometry x="350" y="770" width="850" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="RAG" value="KB RAG - SELECT kb_chunk ORDER BY embedding &amp;lt;-&amp;gt; query LIMIT 20 -&gt; rerank score x kb_category.weight -&gt; top 5" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EFF7E8;fontColor=#3F5E2A;strokeColor=#5C8A3E;fontSize=11;fontStyle=2;dashed=1" vertex="1" parent="1">
          <mxGeometry x="1220" y="770" width="320" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="ETA3" value="Stage 4 - Mandatory PII-stripping + Bedrock invocation" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#FCEAEA;strokeColor=#DD344C;strokeWidth=2;verticalAlign=top;align=left;fontStyle=1;fontSize=13;spacingLeft=14;spacingTop=10;fontColor=#8B0000" vertex="1" parent="1">
          <mxGeometry x="320" y="910" width="1240" height="200" as="geometry"/>
        </mxCell>
        <mxCell id="PII" value="&lt;b&gt;PII-stripping pre-LLM&lt;/b&gt;&lt;br/&gt;regex CPF/CNPJ/RG/email/phone -&gt; reversible tokens (in-memory map per worker invocation)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;strokeColor=#D79B00;strokeWidth=2;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="360" y="960" width="380" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="LLMCLI" value="&lt;b&gt;LlmClient (interface)&lt;/b&gt;&lt;br/&gt;Sonnet 4.5 primary, Haiku 4.5 fallback if Sonnet sa-east-1 unavailable" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;dashed=1;strokeWidth=2;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="800" y="960" width="380" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="BR" value="&lt;b&gt;AWS Bedrock sa-east-1&lt;/b&gt;&lt;br/&gt;Claude Sonnet 4.5 + Haiku 4.5&lt;br/&gt;Titan Embed v2 multilingual (dim 1024)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#999999;fontColor=#FFFFFF;strokeColor=#666666;fontSize=12" vertex="1" parent="1">
          <mxGeometry x="1240" y="960" width="280" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="ETA4" value="Stage 5 - Notary review + MFA TOTP approval + publish act_template_version" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#EFF7E8;strokeColor=#5C8A3E;strokeWidth=2;verticalAlign=top;align=left;fontStyle=1;fontSize=13;spacingLeft=14;spacingTop=10;fontColor=#3F5E2A" vertex="1" parent="1">
          <mxGeometry x="320" y="1140" width="1240" height="280" as="geometry"/>
        </mxCell>
        <mxCell id="RV" value="&lt;b&gt;TemplateReviewService&lt;/b&gt;&lt;br/&gt;lists suggestions for the Notary to review item-by-item; surfaces KB citations (kb_version_id + relevance)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="350" y="1190" width="320" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="AP" value="&lt;b&gt;TemplatePublishService&lt;/b&gt;&lt;br/&gt;role check (notary) + MFA TOTP challenge -&gt; promotes act_template_version to effective" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="730" y="1190" width="320" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="VR" value="&lt;b&gt;ActTemplateVersionRepo&lt;/b&gt;&lt;br/&gt;immutable versioning (effective_from / effective_until + content_hash)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1110" y="1190" width="320" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="DB" value="RDS PostgreSQL&lt;br/&gt;notary-{slug}-prd&lt;br/&gt;(pgvector, pgcrypto)" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;fontColor=#FFFFFF;strokeColor=#3C7FC0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1180" y="1320" width="240" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="AUD" value="DynamoDB audit_log (shared)&lt;br/&gt;PK = tenant_slug#timestamp, Streams ON, TTL 7y&lt;br/&gt;HMAC hash chain (system-signed, no A3)" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;fontColor=#FFFFFF;strokeColor=#3C7FC0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="80" y="1320" width="320" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="OUT" value="&lt;b&gt;Out of MVP (Future roadmap)&lt;/b&gt; - ICP-Brasil A3 PKCS#11 plugin / MNE - e-Notariado / CENAD digital seal / OpenTimestamps anchor / WhatsApp gateway / PagerDuty / legacy notary system migration" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F0F0F0;fontColor=#555;strokeColor=#999;fontSize=11;fontStyle=2;dashed=1;align=left;spacingLeft=14;spacingRight=14;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="40" y="1450" width="1540" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="e1a" style="endArrow=classic;html=1;strokeWidth=1.8;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.3;entryX=0;entryY=0.5" edge="1" parent="1" source="U" target="OR1">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e1a_lbl" value="1a option A" style="text;html=1;fontSize=11;fontColor=#3F2A6E;align=center" vertex="1" parent="1">
          <mxGeometry x="290" y="270" width="80" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e1b" style="endArrow=classic;html=1;strokeWidth=1.8;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.7;entryX=0;entryY=0.5" edge="1" parent="1" source="U" target="OR2">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="300" y="305"/>
              <mxPoint x="730" y="295"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e1b_lbl" value="1b option B" style="text;html=1;fontSize=11;fontColor=#3F2A6E;align=center" vertex="1" parent="1">
          <mxGeometry x="500" y="305" width="80" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="etc" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;dashed=1;strokeColor=#7A4FB6" edge="1" parent="1" source="OR2" target="TC">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="etc_lbl" value="hydrate from act_template_version" style="text;html=1;fontSize=11;fontColor=#3F2A6E;align=center" vertex="1" parent="1">
          <mxGeometry x="1115" y="280" width="240" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="e1" style="endArrow=classic;html=1;strokeWidth=1.8;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.2;entryY=0" edge="1" parent="1" source="OR1" target="UP">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e1_lbl" value="2 send PDF/DOCX template" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="380" y="390" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e2" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.3;exitY=1;entryX=0.5;entryY=0" edge="1" parent="1" source="UP" target="S3T">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e2_lbl" value="3 store in tenant bucket" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="350" y="510" width="240" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e3" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5" edge="1" parent="1" source="UP" target="PA">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e3_lbl" value="4 raw text" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="630" y="458" width="80" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e4" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5" edge="1" parent="1" source="PA" target="OR">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e4_lbl" value="5 normalised" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="940" y="458" width="80" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e5" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5" edge="1" parent="1" source="OR" target="SQ">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e5_lbl" value="6 enqueue jobs" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="1250" y="458" width="100" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="e6" style="endArrow=classic;html=1;strokeWidth=1.8;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;strokeColor=#B68F2C" edge="1" parent="1" source="SQ" target="ETA2">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e6_lbl" value="7 deliver to sub-agents" style="text;html=1;fontSize=11;fontColor=#7A5A0E;align=center;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1230" y="610" width="200" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="eRag" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;dashed=1;strokeColor=#5C8A3E" edge="1" parent="1" source="AL" target="RAG">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="eRag_lbl" value="8 KB RAG (K=20, N=5)" style="text;html=1;fontSize=11;fontColor=#3F5E2A;align=center" vertex="1" parent="1">
          <mxGeometry x="1305" y="755" width="200" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="e7a" style="endArrow=none;html=1;strokeWidth=1.2;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.2;entryY=0;strokeColor=#5D82A8" edge="1" parent="1" source="AS" target="PII">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e7b" style="endArrow=none;html=1;strokeWidth=1.2;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.4;entryY=0;strokeColor=#5D82A8" edge="1" parent="1" source="AC" target="PII">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e7c" style="endArrow=none;html=1;strokeWidth=1.2;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.6;entryY=0;strokeColor=#5D82A8" edge="1" parent="1" source="AP2" target="PII">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e7d" style="endArrow=none;html=1;strokeWidth=1.2;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.8;entryY=0;strokeColor=#5D82A8" edge="1" parent="1" source="AR" target="PII">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e7e" style="endArrow=classic;html=1;strokeWidth=1.2;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.95;entryY=0;strokeColor=#5D82A8" edge="1" parent="1" source="AL" target="PII">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e7lbl" value="9 sub-agents -&gt; PII-stripping (mandatory)" style="text;html=1;fontSize=11;fontColor=#D79B00;align=center;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="800" y="910" width="380" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="e8" style="endArrow=classic;html=1;strokeWidth=2;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#D79B00" edge="1" parent="1" source="PII" target="LLMCLI">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e8_lbl" value="10 sanitised text" style="text;html=1;fontSize=11;fontColor=#8B0000;align=center" vertex="1" parent="1">
          <mxGeometry x="745" y="1000" width="160" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e9" style="endArrow=classic;html=1;strokeWidth=2;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#666666" edge="1" parent="1" source="LLMCLI" target="BR">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e9_lbl" value="11 InvokeModel" style="text;html=1;fontSize=11;fontColor=#444;align=center" vertex="1" parent="1">
          <mxGeometry x="1185" y="1000" width="120" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="ePc" style="endArrow=classic;html=1;strokeWidth=1.2;dashed=1;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.7;exitY=1;entryX=0.2;entryY=0;strokeColor=#5D82A8" edge="1" parent="1" source="PC" target="LLMCLI">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ePc_lbl" value="cache reads" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="850" y="840" width="100" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="e10" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.2;exitY=1;entryX=0.5;entryY=0;strokeColor=#5C8A3E" edge="1" parent="1" source="LLMCLI" target="RV">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="836" y="1140"/>
              <mxPoint x="510" y="1140"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e10_lbl" value="12 persist suggestions" style="text;html=1;fontSize=11;fontColor=#3F5E2A;align=center" vertex="1" parent="1">
          <mxGeometry x="540" y="1125" width="160" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e11" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.1;entryY=0;strokeColor=#5C8A3E" edge="1" parent="1" source="U" target="RV">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="180" y="1160"/>
              <mxPoint x="382" y="1160"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e11_lbl" value="13 review item-by-item" style="text;html=1;fontSize=11;fontColor=#3F5E2A;align=center" vertex="1" parent="1">
          <mxGeometry x="180" y="1145" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e12" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#5C8A3E" edge="1" parent="1" source="RV" target="AP">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e12_lbl" value="role check + MFA TOTP" style="text;html=1;fontSize=11;fontColor=#3F5E2A;align=center" vertex="1" parent="1">
          <mxGeometry x="675" y="1235" width="160" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e13" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#5C8A3E" edge="1" parent="1" source="AP" target="VR">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e13_lbl" value="14 version + emit event" style="text;html=1;fontSize=11;fontColor=#3F5E2A;align=center" vertex="1" parent="1">
          <mxGeometry x="1055" y="1235" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e14" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.6;exitY=1;entryX=0.5;entryY=0;strokeColor=#3C7FC0" edge="1" parent="1" source="VR" target="DB">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e14_lbl" value="persist on tenant RDS" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="1295" y="1300" width="200" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="eaud" style="endArrow=classic;html=1;strokeWidth=1.2;dashed=1;dashPattern=4 4;edgeStyle=orthogonalEdgeStyle;rounded=1;strokeColor=#999999;exitX=0;exitY=1;entryX=0.5;entryY=0" edge="1" parent="1" source="LLMCLI" target="AUD">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="800" y="1130"/>
              <mxPoint x="240" y="1130"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="eaud_lbl" value="audit (tokens, model, latency, kb_version_id, content_hash)" style="text;html=1;fontSize=11;fontColor=#444;align=center" vertex="1" parent="1">
          <mxGeometry x="60" y="1280" width="360" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="legend" value="&lt;b&gt;Legend R5&lt;/b&gt;  Navy: human actor  Light blue: API/worker  Green: KB (RAG)  Purple: Template Catalog (CRUD)  Dark blue: store/data  Grey: external service  Amber: PII-stripping  Dashed: abstraction or audit-log/RAG" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F5F5F5;strokeColor=#999;fontSize=11;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="40" y="1510" width="1540" height="40" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="04-component-flow-b" name="04-component-flow-b">
    <mxGraphModel dx="1500" dy="1000" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1700" pageHeight="2200" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="Flow B R5 - Act execution: OCR + LLM (KB fill) + Fee Schedule lookup + billing snapshots" style="text;html=1;align=center;fontSize=22;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="40" width="1620" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="subtitle" value="Clerk uploads party docs - OCR via Textract - deterministic validation - Haiku 4.5 fills act_template_version draft using KB RAG (K=15, N=3) - Notary reviews and approves with MFA TOTP - billing-worker does exact lookup on fee_schedule_version (no RAG) - billing_event captures 3 immutable snapshots - output is print-ready minute for in-person signature." style="text;html=1;align=center;fontSize=14;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="40" y="80" width="1620" height="50" as="geometry"/>
        </mxCell>

        <mxCell id="howread" value="&lt;b&gt;How to read:&lt;/b&gt; (1) Clerk uploads party documents. (2) ocr-worker via Textract. (3) DeterministicValidator (CPF Mod 11, dates, amounts). (4) PII-stripping + Haiku 4.5 LLM with KB RAG K=15 N=3 to fill the act_template_version. (5) Notary reviews diff and approves with MFA TOTP -&gt; minute is printed and signed in-person (act_modality enum = in_person only in MVP). (6) billing-worker does EXACT lookup on fee_schedule_version by (act_code, value_range) - no RAG. billing_event stores 3 snapshots: act_template_version_id+hash, fee_schedule_version_id+hash, kb_consultations_snapshot jsonb. Block if fee_schedule_version expired." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF8DC;strokeColor=#D4AC0D;fontSize=12;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="40" y="145" width="1620" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="U" value="&lt;b&gt;Clerk&lt;/b&gt;&lt;br/&gt;[realm notary-{slug}]&lt;br/&gt;email + password + MFA TOTP" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#08427B;fontColor=#FFFFFF;strokeColor=#073B6F;fontSize=12;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="80" y="280" width="200" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="T" value="&lt;b&gt;Notary&lt;/b&gt;&lt;br/&gt;[realm notary-{slug}]&lt;br/&gt;email + password + MFA TOTP" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#08427B;fontColor=#FFFFFF;strokeColor=#073B6F;fontSize=12;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="80" y="380" width="200" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="ETA1" value="Stage 1 - Capture in API BFF (Fastify, ECS Fargate, TenantResolver via Keycloak claim)" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#EAF2FB;strokeColor=#5D82A8;strokeWidth=2;verticalAlign=top;align=left;fontStyle=1;fontSize=13;spacingLeft=14;spacingTop=10;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="320" y="270" width="1340" height="200" as="geometry"/>
        </mxCell>
        <mxCell id="ATO" value="&lt;b&gt;ActInstanceController&lt;/b&gt;&lt;br/&gt;creates act_instance bound to effective act_template_version&lt;br/&gt;act_modality enum: in_person (MVP only)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="350" y="320" width="280" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="UPL" value="&lt;b&gt;DocumentUploadService&lt;/b&gt;&lt;br/&gt;presigned URL S3 notary-{slug}-uploads" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="660" y="320" width="280" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="OCRQ" value="SQS FIFO ocr-queue&lt;br/&gt;(tenant_slug payload, DLQ)" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;fontColor=#FFFFFF;strokeColor=#3C7FC0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="970" y="330" width="220" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="S3UP" value="S3 notary-{slug}-uploads" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;fontColor=#FFFFFF;strokeColor=#3C7FC0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1230" y="330" width="280" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="ETA2" value="Stage 2 - ocr-worker (Lambda) + deterministic validation" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#FFF8E8;strokeColor=#B68F2C;strokeWidth=2;verticalAlign=top;align=left;fontStyle=1;fontSize=13;spacingLeft=14;spacingTop=10;fontColor=#7A5A0E" vertex="1" parent="1">
          <mxGeometry x="320" y="500" width="1340" height="200" as="geometry"/>
        </mxCell>
        <mxCell id="OCRC" value="&lt;b&gt;OcrClient (interface)&lt;/b&gt;&lt;br/&gt;Provider: Textract sa-east-1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;dashed=1;strokeWidth=2;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="350" y="555" width="260" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="TX" value="&lt;b&gt;AWS Textract sa-east-1&lt;/b&gt;&lt;br/&gt;AnalyzeDocument FORMS+TABLES" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#999999;fontColor=#FFFFFF;strokeColor=#666666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="640" y="555" width="260" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="VAL" value="&lt;b&gt;DeterministicValidator&lt;/b&gt;&lt;br/&gt;CPF/CNPJ DV Mod 11 (local), date parsing (BR), monetary parsing, confidence threshold" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;strokeColor=#D79B00;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="930" y="555" width="320" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="LLMQ" value="SQS FIFO llm-queue&lt;br/&gt;(tenant_slug payload, DLQ)" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;fontColor=#FFFFFF;strokeColor=#3C7FC0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1280" y="555" width="240" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="VALnote" value="Low confidence -&gt; sends back to clerk for manual review before proceeding" style="text;html=1;fontSize=11;fontColor=#7A5A0E;fontStyle=2;align=center" vertex="1" parent="1">
          <mxGeometry x="930" y="645" width="320" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="ETA3" value="Stage 3 - llm-worker (Haiku 4.5) - fills act_template_version using KB RAG (K=15, N=3) + PII-stripping" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#FCEAEA;strokeColor=#DD344C;strokeWidth=2;verticalAlign=top;align=left;fontStyle=1;fontSize=13;spacingLeft=14;spacingTop=10;fontColor=#8B0000" vertex="1" parent="1">
          <mxGeometry x="320" y="730" width="1340" height="240" as="geometry"/>
        </mxCell>
        <mxCell id="PII" value="&lt;b&gt;PII-stripping pre-LLM&lt;/b&gt;&lt;br/&gt;CPF/CNPJ/RG/email/phone -&gt; reversible tokens (in-memory map per worker invocation)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;strokeColor=#D79B00;strokeWidth=2;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="350" y="785" width="280" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="LLMCLI" value="&lt;b&gt;LlmClient (interface)&lt;/b&gt;&lt;br/&gt;Haiku 4.5 + KB RAG via tenant pgvector (K=15, N=3, threshold cos &gt;= 0.30)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;dashed=1;strokeWidth=2;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="660" y="785" width="280" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="BR" value="&lt;b&gt;AWS Bedrock sa-east-1&lt;/b&gt;&lt;br/&gt;Claude Haiku 4.5&lt;br/&gt;Titan Embed v2 multilingual (dim 1024)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#999999;fontColor=#FFFFFF;strokeColor=#666666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="970" y="785" width="280" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="MIN" value="&lt;b&gt;MinuteGenerator&lt;/b&gt;&lt;br/&gt;fills act_template_version with DETOKENIZED values; emits kb_consultations_snapshot (jsonb array of {kb_version_id, content_hash, relevance})" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1280" y="785" width="320" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="RAGB" value="KB RAG (Flow B fill) - SELECT kb_chunk filtered by status=active and within effective range -&gt; rerank score x kb_category.weight -&gt; top 3" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EFF7E8;fontColor=#3F5E2A;strokeColor=#5C8A3E;fontSize=11;fontStyle=2;dashed=1" vertex="1" parent="1">
          <mxGeometry x="350" y="900" width="900" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="ETA4" value="Stage 4 - Notary review + MFA TOTP approval + persist act_instance" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#EFF7E8;strokeColor=#5C8A3E;strokeWidth=2;verticalAlign=top;align=left;fontStyle=1;fontSize=13;spacingLeft=14;spacingTop=10;fontColor=#3F5E2A" vertex="1" parent="1">
          <mxGeometry x="320" y="1000" width="1340" height="220" as="geometry"/>
        </mxCell>
        <mxCell id="REV" value="&lt;b&gt;MinuteReviewService&lt;/b&gt;&lt;br/&gt;Notary reviews diff between template and filled minute + KB citations" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="350" y="1050" width="320" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="LAV" value="&lt;b&gt;ActApprovalService&lt;/b&gt;&lt;br/&gt;role check (notary) + MFA TOTP -&gt; act_instance.status = approved -&gt; emits act.approved event" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="700" y="1050" width="320" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="WORM" value="S3 notary-{slug}-livro-perpetuo&lt;br/&gt;Object Lock Compliance 30y (livro perpetuo); 10y subsidiary papers" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;fontColor=#FFFFFF;strokeColor=#3C7FC0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1050" y="1050" width="280" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="DBR" value="RDS PostgreSQL&lt;br/&gt;notary-{slug}-prd&lt;br/&gt;act_instance, act_party, document&lt;br/&gt;act_party.tax_id encrypted (pgcrypto + KMS)" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;fontColor=#FFFFFF;strokeColor=#3C7FC0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1360" y="1050" width="240" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="OUTPUT" value="Output: print-ready minute for in-person signature (no MNE / no qualified digital signature in MVP)" style="text;html=1;fontSize=11;fontColor=#3F5E2A;fontStyle=2;align=center" vertex="1" parent="1">
          <mxGeometry x="700" y="1160" width="630" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="ETA5" value="Stage 5 - Billing: exact lookup on fee_schedule_version (no RAG) + billing_event with 3 immutable snapshots" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#FFF7E6;strokeColor=#FF9900;strokeWidth=2;verticalAlign=top;align=left;fontStyle=1;fontSize=13;spacingLeft=14;spacingTop=10;fontColor=#7A4900" vertex="1" parent="1">
          <mxGeometry x="320" y="1240" width="1340" height="320" as="geometry"/>
        </mxCell>
        <mxCell id="EVB" value="&lt;b&gt;EventBridge bus&lt;/b&gt;&lt;br/&gt;act.approved triggers billing-worker" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F3F8FE;fontColor=#1F4E79;strokeColor=#3C7FC0;fontSize=11;dashed=1" vertex="1" parent="1">
          <mxGeometry x="350" y="1290" width="280" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="CALC" value="&lt;b&gt;billing-worker (Lambda)&lt;/b&gt;&lt;br/&gt;1) EXACT lookup on fee_schedule_version by (act_code, value_range) effective at approval date. 2) compute emolument + ISS + Stoix fee. 3) write billing_event with 3 snapshots." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;strokeColor=#D79B00;strokeWidth=2;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="660" y="1290" width="380" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="KBE" value="&lt;b&gt;Fee Schedule (RDS)&lt;/b&gt;&lt;br/&gt;fee_schedule, fee_schedule_version, fee_schedule_line&lt;br/&gt;CRUD per row, no RAG" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#7DD3D8;fontColor=#000000;strokeColor=#2A8B91;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1080" y="1290" width="280" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="BLOCK" value="&lt;b&gt;Block&lt;/b&gt;&lt;br/&gt;If fee_schedule_version expired or no match for (act_code, value_range), block billing and alert Notary - act stays in pending_fee_schedule_renewal" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FCEAEA;fontColor=#8B0000;strokeColor=#DD344C;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1400" y="1290" width="240" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="BE" value="&lt;b&gt;billing_event (R5 - 3 snapshots)&lt;/b&gt;&lt;br/&gt;{ act_id, emolument, iss_value, stoix_value, &lt;b&gt;act_template_version_id + act_template_version_hash&lt;/b&gt;, &lt;b&gt;fee_schedule_version_id + fee_schedule_version_hash&lt;/b&gt;, &lt;b&gt;kb_consultations_snapshot jsonb&lt;/b&gt;, approved_at }" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="660" y="1430" width="700" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="AUD" value="DynamoDB audit_log (shared)&lt;br/&gt;PK = tenant_slug#timestamp, Streams ON, TTL 7y&lt;br/&gt;HMAC hash chain (system-signed, no A3)" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;fontColor=#FFFFFF;strokeColor=#3C7FC0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="80" y="1430" width="320" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="OUT" value="&lt;b&gt;Out of MVP (Future roadmap)&lt;/b&gt; - ICP-Brasil A3 PKCS#11 plugin / MNE - e-Notariado / CENAD digital seal / OpenTimestamps anchor / WhatsApp gateway / PagerDuty / legacy notary system migration" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F0F0F0;fontColor=#555;strokeColor=#999;fontSize=11;fontStyle=2;dashed=1;align=left;spacingLeft=14;spacingRight=14;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="40" y="1580" width="1620" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="e1" style="endArrow=classic;html=1;strokeWidth=1.8;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5" edge="1" parent="1" source="U" target="ATO">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e1_lbl" value="1 starts act" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="285" y="300" width="80" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e2" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5" edge="1" parent="1" source="ATO" target="UPL">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e2_lbl" value="2 upload party docs" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="635" y="300" width="160" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e3" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0" edge="1" parent="1" source="UPL" target="S3UP">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="800" y="430"/>
              <mxPoint x="1370" y="430"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e3_lbl" value="3 store in tenant bucket" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="940" y="445" width="220" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e4" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5" edge="1" parent="1" source="UPL" target="OCRQ">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e4_lbl" value="4 enqueue OCR" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="940" y="300" width="120" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="e5" style="endArrow=classic;html=1;strokeWidth=1.8;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.3;exitY=1;entryX=0.5;entryY=0;strokeColor=#B68F2C" edge="1" parent="1" source="OCRQ" target="OCRC">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e5_lbl" value="5 worker consumes" style="text;html=1;fontSize=11;fontColor=#7A5A0E;align=center" vertex="1" parent="1">
          <mxGeometry x="660" y="520" width="160" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e6" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#666" edge="1" parent="1" source="OCRC" target="TX">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e6_lbl" value="6 AnalyzeDocument" style="text;html=1;fontSize=11;fontColor=#444;align=center" vertex="1" parent="1">
          <mxGeometry x="615" y="585" width="140" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e7" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#D79B00" edge="1" parent="1" source="TX" target="VAL">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e7_lbl" value="7 fields + confidence" style="text;html=1;fontSize=11;fontColor=#7A5A0E;align=center" vertex="1" parent="1">
          <mxGeometry x="900" y="585" width="140" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e8" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#D79B00" edge="1" parent="1" source="VAL" target="LLMQ">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e8_lbl" value="8 valid -&gt; enqueue LLM" style="text;html=1;fontSize=11;fontColor=#7A5A0E;align=center" vertex="1" parent="1">
          <mxGeometry x="1255" y="585" width="180" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="e9" style="endArrow=classic;html=1;strokeWidth=1.8;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;strokeColor=#DD344C" edge="1" parent="1" source="LLMQ" target="PII">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1400" y="710"/>
              <mxPoint x="490" y="730"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e9_lbl" value="9 llm-worker consumes -&gt; PII-stripping" style="text;html=1;fontSize=11;fontColor=#8B0000;align=center;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="690" y="710" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e10" style="endArrow=classic;html=1;strokeWidth=1.8;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#D79B00" edge="1" parent="1" source="PII" target="LLMCLI">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e10_lbl" value="10 sanitised" style="text;html=1;fontSize=11;fontColor=#7A5A0E;align=center" vertex="1" parent="1">
          <mxGeometry x="635" y="815" width="120" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e11" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#666" edge="1" parent="1" source="LLMCLI" target="BR">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e11_lbl" value="11 InvokeModel Haiku + KB RAG" style="text;html=1;fontSize=11;fontColor=#444;align=center" vertex="1" parent="1">
          <mxGeometry x="940" y="815" width="220" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e12" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#5D82A8" edge="1" parent="1" source="BR" target="MIN">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e12_lbl" value="12 minute text + kb_consultations" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="1245" y="815" width="240" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="e13" style="endArrow=classic;html=1;strokeWidth=1.8;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;strokeColor=#5C8A3E" edge="1" parent="1" source="MIN" target="REV">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1440" y="970"/>
              <mxPoint x="510" y="1020"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e13_lbl" value="13 minute for review" style="text;html=1;fontSize=11;fontColor=#3F5E2A;align=center" vertex="1" parent="1">
          <mxGeometry x="800" y="980" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e14" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#08427B" edge="1" parent="1" source="T" target="REV">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e14_lbl" value="14 reviews" style="text;html=1;fontSize=11;fontColor=#08427B;align=center" vertex="1" parent="1">
          <mxGeometry x="285" y="400" width="80" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e15" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#5C8A3E" edge="1" parent="1" source="REV" target="LAV">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e15_lbl" value="15 approves (MFA TOTP)" style="text;html=1;fontSize=11;fontColor=#3F5E2A;align=center" vertex="1" parent="1">
          <mxGeometry x="675" y="1085" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e16" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#5C8A3E" edge="1" parent="1" source="LAV" target="WORM">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e16_lbl" value="16 store PDF (Object Lock 30y)" style="text;html=1;fontSize=11;fontColor=#3F5E2A;align=center" vertex="1" parent="1">
          <mxGeometry x="1025" y="1085" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e17" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#3C7FC0" edge="1" parent="1" source="WORM" target="DBR">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e17_lbl" value="17 persist metadata" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="1335" y="1085" width="160" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="e18" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;strokeColor=#FF9900" edge="1" parent="1" source="LAV" target="EVB">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="860" y="1210"/>
              <mxPoint x="490" y="1260"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e18_lbl" value="18 emit act.approved" style="text;html=1;fontSize=11;fontColor=#7A4900;align=center" vertex="1" parent="1">
          <mxGeometry x="630" y="1215" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e19" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#FF9900" edge="1" parent="1" source="EVB" target="CALC">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e19_lbl" value="19 trigger billing-worker" style="text;html=1;fontSize=11;fontColor=#7A4900;align=center" vertex="1" parent="1">
          <mxGeometry x="635" y="1320" width="160" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e20" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#2A8B91" edge="1" parent="1" source="CALC" target="KBE">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e20_lbl" value="20 EXACT lookup (act_code, value_range)" style="text;html=1;fontSize=11;fontColor=#2A8B91;align=center" vertex="1" parent="1">
          <mxGeometry x="1025" y="1320" width="260" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e21" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#DD344C;dashed=1" edge="1" parent="1" source="KBE" target="BLOCK">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e21_lbl" value="expired or no match?" style="text;html=1;fontSize=11;fontColor=#8B0000;align=center" vertex="1" parent="1">
          <mxGeometry x="1365" y="1320" width="160" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e22" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;strokeColor=#FF9900" edge="1" parent="1" source="CALC" target="BE">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e22_lbl" value="21 write billing_event with 3 immutable snapshots" style="text;html=1;fontSize=11;fontColor=#7A4900;align=center;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="700" y="1410" width="380" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="eaud" style="endArrow=classic;html=1;strokeWidth=1.2;dashed=1;dashPattern=4 4;edgeStyle=orthogonalEdgeStyle;rounded=1;strokeColor=#999999;exitX=0;exitY=0.5;entryX=1;entryY=0.5" edge="1" parent="1" source="BE" target="AUD">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="eaud_lbl" value="audit (act_id, all 3 snapshot ids+hashes, value)" style="text;html=1;fontSize=11;fontColor=#444;align=center" vertex="1" parent="1">
          <mxGeometry x="410" y="1450" width="320" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="legend" value="&lt;b&gt;Legend R5&lt;/b&gt;  Navy: human actor  Light blue: API/worker  Green: KB (RAG)  Turquoise: Fee Schedule (lookup)  Dark blue: store/data  Grey: external service  Amber: PII-stripping/validation  Orange: billing  Red: block  Dashed: abstraction or audit-log/RAG" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F5F5F5;strokeColor=#999;fontSize=11;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="40" y="1640" width="1620" height="50" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="05-component-kbc" name="05-component-kbc">
    <mxGraphModel dx="1500" dy="1000" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1700" pageHeight="2100" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="Knowledge Base Pipeline R5 - Curated RAG with Tunable Categories &amp; Telemetry" style="text;html=1;align=center;fontSize=22;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="40" width="1620" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="subtitle" value="Notary (Controller) curates the regulatory source - Stoix (Operator) provides platform + AI extraction. KB scope = normatives, case law, doctrine. Fee Schedule has its own pipeline (see 04-component-flow-b)." style="text;html=1;align=center;fontSize=14;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="40" y="80" width="1620" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="howread" value="&lt;b&gt;How to read:&lt;/b&gt; (1) Notary picks/creates a kb_category and uploads PDF/DOCX/HTML with effective_from/until. (2) KB Extract Worker runs OCR + Bedrock Sonnet 4.5 extract + Titan Embed v2 (1024d) with hierarchical chunking and structural anchors. (3) Diff Reviewer surfaces lateral PDF vs JSON; approval requires MFA TOTP + role check + stamped audit log. (4) kb_chunk indexed in pgvector HNSW (m=16, ef_construction=64). (5) Flow A consumes RAG (K=20, rerank by score x category.weight, N=5); Flow B fillingWorker (K=15, N=3). (6) KB Vigencia Worker raises 30/15/5d alerts via SES + ClickUp tasks; expired versions block acts via act_template.requires_kb_active. Telemetry: rag_config (runtime knobs), rag_query (per-retrieval log), rag_feedback (helpful/irrelevant signal) feed the tuning loop." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF8DC;strokeColor=#D4AC0D;fontSize=12;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="40" y="135" width="1620" height="115" as="geometry"/>
        </mxCell>

        <mxCell id="T" value="&lt;b&gt;Notary (Controller)&lt;/b&gt;&lt;br/&gt;[realm notary-{slug}]&lt;br/&gt;auth password + MFA TOTP" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#08427B;fontColor=#FFFFFF;strokeColor=#073B6F;fontSize=12;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="80" y="285" width="220" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="EXT" value="&lt;b&gt;External sources&lt;/b&gt;&lt;br/&gt;CGJ-SP, DJE-SP, doctrine, jurisprudence&lt;br/&gt;(KB scope = normatives + case law + doctrine)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#999999;strokeColor=#666;fontColor=#FFFFFF;fontSize=11;align=center" vertex="1" parent="1">
          <mxGeometry x="80" y="415" width="220" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="ETA1" value="Step 1 - Upload with metadata (Notary curates; categories are tenant-managed)" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#EFF7E8;strokeColor=#5C8A3E;strokeWidth=2;verticalAlign=top;align=left;fontStyle=1;fontSize=13;spacingLeft=14;spacingTop=10;fontColor=#3F5E2A" vertex="1" parent="1">
          <mxGeometry x="360" y="275" width="1300" height="240" as="geometry"/>
        </mxCell>
        <mxCell id="UPL" value="&lt;b&gt;KB Upload Service&lt;/b&gt;&lt;br/&gt;[ECS Fargate / API path]&lt;br/&gt;Receives PDF/DOCX/HTML + metadata: FK kb_category_id (pick or create inline), source enum (cgj_sp/dje_sp/doctrine/internal), title, effective_from, effective_until, tags." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;fontColor=#000000;strokeColor=#5C8A3E;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="390" y="320" width="360" height="170" as="geometry"/>
        </mxCell>
        <mxCell id="KCAT" value="&lt;b&gt;kb_category&lt;/b&gt;&lt;br/&gt;[CRUD by Notary]&lt;br/&gt;PK uuid, name, weight numeric(3,2) [0..1], description, is_active. Defaults seeded: Normative=1.00, Case_Law=0.80, Doctrine=0.50. Notary can add/edit/disable. Used by reranker (score x weight)." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;fontColor=#000000;strokeColor=#5C8A3E;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="775" y="320" width="290" height="170" as="geometry"/>
        </mxCell>
        <mxCell id="S3KB" value="&lt;b&gt;S3 notary-{slug}-kb&lt;/b&gt;&lt;br/&gt;[dedicated bucket]&lt;br/&gt;Originals with versioning + KMS SSE" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;fontColor=#FFFFFF;strokeColor=#3C7FC0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1090" y="320" width="240" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="KBD" value="&lt;b&gt;kb_document&lt;/b&gt;&lt;br/&gt;[RDS table]&lt;br/&gt;PK uuid, FK kb_category_id -&gt; kb_category.id, source enum, title, s3_key, effective_from, effective_until, status, created_at, created_by_user_id, updated_at, updated_by_user_id, version int" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1355" y="320" width="290" height="170" as="geometry"/>
        </mxCell>

        <mxCell id="ETA2" value="Step 2 - KB Extract Worker (OCR + LLM Sonnet 4.5 + Titan Embed v2) -&gt; chunks + anchors + embeddings" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#FFF8E8;strokeColor=#B68F2C;strokeWidth=2;verticalAlign=top;align=left;fontStyle=1;fontSize=13;spacingLeft=14;spacingTop=10;fontColor=#7A5A0E" vertex="1" parent="1">
          <mxGeometry x="360" y="540" width="1300" height="260" as="geometry"/>
        </mxCell>
        <mxCell id="KBQ" value="SQS kb-extract-queue&lt;br/&gt;FIFO + DLQ&lt;br/&gt;(tenant_slug + kb_document_id)" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;fontColor=#FFFFFF;strokeColor=#3C7FC0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="390" y="590" width="240" height="90" as="geometry"/>
        </mxCell>
        <mxCell id="EXW" value="&lt;b&gt;KB Extract Worker&lt;/b&gt;&lt;br/&gt;[Lambda kb-extract-worker]&lt;br/&gt;1) pulls from S3 KB. 2) OCR via OcrClient (Textract). 3) Bedrock Claude Sonnet 4.5 structures content + captures structural_anchor (e.g. &quot;Art.17 §2nd&quot;, &quot;Inciso III&quot;). 4) Chunking tier: hierarchical (Art./§/Inciso) -&gt; sentence (400 tokens, overlap 60) -&gt; single (&lt;300 tokens). 5) Titan Embed v2 multilingual 1024d. 6) Creates kb_version (status=reviewing)." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;fontColor=#000000;strokeColor=#5C8A3E;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="660" y="585" width="400" height="200" as="geometry"/>
        </mxCell>
        <mxCell id="OCRC" value="&lt;b&gt;OcrClient&lt;/b&gt;&lt;br/&gt;Textract sa-east-1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;dashed=1;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1090" y="585" width="250" height="70" as="geometry"/>
        </mxCell>
        <mxCell id="LLMC" value="&lt;b&gt;LlmClient&lt;/b&gt;&lt;br/&gt;Bedrock Claude Sonnet 4.5 (extract)&lt;br/&gt;Titan Embed v2 multilingual 1024d" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;dashed=1;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1360" y="585" width="285" height="70" as="geometry"/>
        </mxCell>
        <mxCell id="BR" value="&lt;b&gt;AWS Bedrock + Textract sa-east-1&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#999999;fontColor=#FFFFFF;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1090" y="690" width="555" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="ETA3" value="Step 3 - Diff Reviewer + Approval (mandatory human review; MFA TOTP + role check + stamped audit log)" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#EAF2FB;strokeColor=#5D82A8;strokeWidth=2;verticalAlign=top;align=left;fontStyle=1;fontSize=13;spacingLeft=14;spacingTop=10;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="360" y="830" width="1300" height="220" as="geometry"/>
        </mxCell>
        <mxCell id="DIFF" value="&lt;b&gt;KB Diff Reviewer (UI)&lt;/b&gt;&lt;br/&gt;[Next.js + react-pdf]&lt;br/&gt;Side-by-side: original PDF (left) vs editable extracted JSON + chunk list with structural anchors (right). Highlights low-confidence fields. Notary corrects inline and adds notes." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="390" y="880" width="500" height="140" as="geometry"/>
        </mxCell>
        <mxCell id="APR" value="&lt;b&gt;KB Approval Service&lt;/b&gt;&lt;br/&gt;Notary approves with MFA TOTP challenge + role check. Promotes kb_version to active. Marks previous active kb_version of same kb_document as superseded. Writes stamped entry to DynamoDB audit_log (HMAC chain)." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="920" y="880" width="320" height="140" as="geometry"/>
        </mxCell>
        <mxCell id="EVKB" value="EventBridge: kb_version.approved&lt;br/&gt;{tenant, kb_version_id, kb_hash, approved_by_user_id}" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F3F8FE;fontColor=#1F4E79;strokeColor=#3C7FC0;fontSize=11;dashed=1" vertex="1" parent="1">
          <mxGeometry x="1270" y="880" width="360" height="140" as="geometry"/>
        </mxCell>

        <mxCell id="ETA4" value="Step 4 - Indexing in tenant RDS (pgvector HNSW + denormalized rerank fields)" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#FFEEEC;strokeColor=#DD344C;strokeWidth=2;verticalAlign=top;align=left;fontStyle=1;fontSize=13;spacingLeft=14;spacingTop=10;fontColor=#8B0000" vertex="1" parent="1">
          <mxGeometry x="360" y="1080" width="1300" height="260" as="geometry"/>
        </mxCell>
        <mxCell id="KBV" value="&lt;b&gt;kb_version&lt;/b&gt;&lt;br/&gt;PK uuid, FK kb_document_id, status enum (uploaded/extracting/reviewing/active/expired/superseded), approved_at, approved_by_user_id, kb_hash, effective_from, effective_until" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="390" y="1130" width="290" height="180" as="geometry"/>
        </mxCell>
        <mxCell id="KBC" value="&lt;b&gt;kb_chunk&lt;/b&gt;&lt;br/&gt;[pgvector HNSW]&lt;br/&gt;PK uuid, FK kb_version_id, FK kb_category_id (denormalized for fast rerank), ordinal, content text, structural_anchor (e.g. &quot;Art.17 §2nd&quot;), source_page int, chunking_tier enum (hierarchical/sentence/single), embedding vector(1024) - Titan Embed v2.&lt;br/&gt;&lt;b&gt;Index: HNSW (m=16, ef_construction=64, ef_search=40)&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="710" y="1130" width="420" height="200" as="geometry"/>
        </mxCell>
        <mxCell id="FEENOTE" value="&lt;b&gt;Fee schedule has its own pipeline&lt;/b&gt;&lt;br/&gt;(see 04-component-flow-b)&lt;br/&gt;fee_schedule, fee_schedule_version, fee_schedule_line - structural CRUD, no RAG." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EEEEEE;fontColor=#444;strokeColor=#999;fontSize=10;dashed=1" vertex="1" parent="1">
          <mxGeometry x="1160" y="1130" width="220" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="RDS" value="RDS PostgreSQL&lt;br/&gt;notary-{slug}-prd&lt;br/&gt;extensions: pgvector, pgcrypto" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;fontColor=#FFFFFF;strokeColor=#3C7FC0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1410" y="1130" width="220" height="200" as="geometry"/>
        </mxCell>

        <mxCell id="ETA5" value="Step 5 - Consumption (Flow A hermeneutic / Flow B filling) with reranker + telemetry" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#FFF7E6;strokeColor=#FF9900;strokeWidth=2;verticalAlign=top;align=left;fontStyle=1;fontSize=13;spacingLeft=14;spacingTop=10;fontColor=#7A4900" vertex="1" parent="1">
          <mxGeometry x="360" y="1370" width="1300" height="240" as="geometry"/>
        </mxCell>
        <mxCell id="FLOWA" value="&lt;b&gt;Flow A LegalRefAgent&lt;/b&gt;&lt;br/&gt;RAG: top-K=20&lt;br/&gt;SELECT kb_chunk WHERE kb_version_id IN (active versions, date in [effective_from..effective_until])&lt;br/&gt;ORDER BY embedding &amp;lt;=&amp;gt; query LIMIT K&lt;br/&gt;-&gt; rerank by score x kb_category.weight&lt;br/&gt;-&gt; threshold 0.30&lt;br/&gt;-&gt; return top-N=5" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;strokeColor=#D79B00;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="390" y="1420" width="380" height="170" as="geometry"/>
        </mxCell>
        <mxCell id="FLOWB1" value="&lt;b&gt;Flow B billing&lt;/b&gt;&lt;br/&gt;Consults &lt;i&gt;fee_schedule_version&lt;/i&gt; directly (separate module - no KB call). See 04-component-flow-b." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EEEEEE;fontColor=#444;strokeColor=#999;fontSize=11;dashed=1" vertex="1" parent="1">
          <mxGeometry x="800" y="1420" width="360" height="170" as="geometry"/>
        </mxCell>
        <mxCell id="FLOWB2" value="&lt;b&gt;Flow B fillingWorker&lt;/b&gt;&lt;br/&gt;RAG for citations in the draft minute&lt;br/&gt;top-K=15, top-N=3&lt;br/&gt;same reranker (score x category.weight)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;strokeColor=#D79B00;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1190" y="1420" width="440" height="170" as="geometry"/>
        </mxCell>

        <mxCell id="ETA6" value="Step 6 - KB Vigencia Worker (daily cron) - alerts + block + ClickUp tasks" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#FCEAEA;strokeColor=#DD344C;strokeWidth=2;verticalAlign=top;align=left;fontStyle=1;fontSize=13;spacingLeft=14;spacingTop=10;fontColor=#8B0000" vertex="1" parent="1">
          <mxGeometry x="360" y="1640" width="1300" height="200" as="geometry"/>
        </mxCell>
        <mxCell id="VIG" value="&lt;b&gt;KB Vigencia Worker&lt;/b&gt;&lt;br/&gt;[Lambda kb-vigencia-worker + EventBridge cron 06:00 UTC-3]&lt;br/&gt;Per tenant: scan kb_version status=active. If effective_until - now() &amp;lt;= 30/15/5d -&gt; alert. If effective_until &amp;lt; now() -&gt; mark expired and block economic acts." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FCEAEA;strokeColor=#DD344C;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="390" y="1690" width="450" height="130" as="geometry"/>
        </mxCell>
        <mxCell id="SES" value="&lt;b&gt;AWS SES + ClickUp router&lt;/b&gt;&lt;br/&gt;Email to Notary with link to upload new version + creates task in project ClickUp space (alerts duplicate to operational queue)." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#999999;fontColor=#FFFFFF;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="870" y="1690" width="290" height="130" as="geometry"/>
        </mxCell>
        <mxCell id="LOCK" value="&lt;b&gt;App-level block&lt;/b&gt;&lt;br/&gt;act_template.requires_kb_active=true blocks new economic acts when no active kb_version covers the act date. Dashboard surfaces red banner." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FCEAEA;fontColor=#8B0000;strokeColor=#DD344C;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1190" y="1690" width="440" height="130" as="geometry"/>
        </mxCell>

        <mxCell id="RAGCFG" value="&lt;b&gt;rag_config (singleton)&lt;/b&gt;&lt;br/&gt;[NEW R5]&lt;br/&gt;Runtime config: embedding_model, hnsw_m, hnsw_ef_construction, hnsw_ef_search, default_k_flow_a, default_n_flow_a, default_k_flow_b, default_n_flow_b, score_threshold, mmr_enabled bool. Mutable without deploy. Audited via reviewed_by_user_id + tuning_notes + updated_at." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6F0F7;fontColor=#1F4E79;strokeColor=#3C7FC0;fontSize=10;dashed=1;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="80" y="1370" width="270" height="240" as="geometry"/>
        </mxCell>

        <mxCell id="RAGQ" value="&lt;b&gt;rag_query (telemetry, append-only)&lt;/b&gt;&lt;br/&gt;[NEW R5]&lt;br/&gt;PK uuid, tipo enum (flow_a/flow_b/manual), query_text_hash sha256, k_used, n_returned, chunks_returned jsonb (ids + scores + weights + used_by_llm flag), latency_ms, model_version, created_at. Feeds the tuning loop." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6F0F7;fontColor=#1F4E79;strokeColor=#3C7FC0;fontSize=10;dashed=1;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="80" y="850" width="270" height="200" as="geometry"/>
        </mxCell>

        <mxCell id="RAGFB" value="&lt;b&gt;rag_feedback&lt;/b&gt;&lt;br/&gt;[NEW R5 - schema ready, UI Phase 1.1]&lt;br/&gt;PK uuid, FK rag_query_id, FK kb_chunk_id, signal enum (helpful/irrelevant/redundant), notes text, created_by_user_id, created_at. Explicit user signal for relevance tuning." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6F0F7;fontColor=#1F4E79;strokeColor=#3C7FC0;fontSize=10;dashed=1;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="80" y="1080" width="270" height="200" as="geometry"/>
        </mxCell>

        <mxCell id="AUD" value="DynamoDB audit_log&lt;br/&gt;tag tenant=notary-{slug}&lt;br/&gt;PK = tenant_slug#timestamp&lt;br/&gt;Events: kb_version.approved, kb_version.expired, kb_category.created, &lt;b&gt;kb_category.weight_changed (NEW)&lt;/b&gt;, rag_config.updated. HMAC chain." style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;fontColor=#FFFFFF;strokeColor=#3C7FC0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="80" y="1690" width="240" height="130" as="geometry"/>
        </mxCell>

        <mxCell id="e0" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;dashed=1;strokeColor=#666" edge="1" parent="1" source="T" target="EXT">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e0_lbl" value="0 consults outside the system" style="text;html=1;fontSize=11;fontColor=#444;align=center" vertex="1" parent="1">
          <mxGeometry x="65" y="395" width="240" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="e1" style="endArrow=classic;html=1;strokeWidth=1.8;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#5C8A3E" edge="1" parent="1" source="T" target="UPL">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e1_lbl" value="1 uploads PDF/DOCX/HTML + metadata" style="text;html=1;fontSize=11;fontColor=#3F5E2A;align=center" vertex="1" parent="1">
          <mxGeometry x="305" y="320" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e1b" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#5C8A3E;dashed=1" edge="1" parent="1" source="UPL" target="KCAT">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e1b_lbl" value="1a pick / create category" style="text;html=1;fontSize=11;fontColor=#3F5E2A;align=center" vertex="1" parent="1">
          <mxGeometry x="755" y="395" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e2" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.3;entryX=0;entryY=0.3;strokeColor=#3C7FC0" edge="1" parent="1" source="KCAT" target="S3KB">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e2_lbl" value="2 stores original" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="1065" y="335" width="120" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e3" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.7;entryX=0;entryY=0.7;strokeColor=#5D82A8" edge="1" parent="1" source="KCAT" target="KBD">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1180" y="465"/>
              <mxPoint x="1340" y="465"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e3_lbl" value="3 creates kb_document (FK kb_category_id)" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="1140" y="475" width="290" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="e4" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.3;exitY=1;entryX=0.5;entryY=0;strokeColor=#B68F2C" edge="1" parent="1" source="UPL" target="KBQ">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e4_lbl" value="4 enqueues extract" style="text;html=1;fontSize=11;fontColor=#7A5A0E;align=center" vertex="1" parent="1">
          <mxGeometry x="430" y="520" width="160" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e5" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#5C8A3E" edge="1" parent="1" source="KBQ" target="EXW">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e5_lbl" value="5 worker consumes" style="text;html=1;fontSize=11;fontColor=#3F5E2A;align=center" vertex="1" parent="1">
          <mxGeometry x="630" y="615" width="140" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e6" style="endArrow=classic;html=1;strokeWidth=1.2;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.4;entryX=0;entryY=0.5;dashed=1;strokeColor=#5D82A8" edge="1" parent="1" source="EXW" target="OCRC">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e6_lbl" value="6a OCR" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="1055" y="610" width="60" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e7" style="endArrow=classic;html=1;strokeWidth=1.2;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.6;entryX=0;entryY=0.5;dashed=1;strokeColor=#5D82A8" edge="1" parent="1" source="EXW" target="LLMC">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1345" y="685"/>
              <mxPoint x="1345" y="620"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e7_lbl" value="6b extract + chunks + embeddings" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="1355" y="650" width="240" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e8" style="endArrow=classic;html=1;strokeWidth=1.2;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.3;entryY=0;strokeColor=#666" edge="1" parent="1" source="OCRC" target="BR">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e9" style="endArrow=classic;html=1;strokeWidth=1.2;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.7;entryY=0;strokeColor=#666" edge="1" parent="1" source="LLMC" target="BR">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="e10" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.3;exitY=1;entryX=0.5;entryY=0;strokeColor=#5C8A3E" edge="1" parent="1" source="EXW" target="DIFF">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="780" y="810"/>
              <mxPoint x="640" y="850"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e10_lbl" value="7 kb_version (status=reviewing) + chunks" style="text;html=1;fontSize=11;fontColor=#3F5E2A;align=center" vertex="1" parent="1">
          <mxGeometry x="600" y="810" width="290" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="e11" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0;exitY=0.5;entryX=0.2;entryY=0;strokeColor=#08427B" edge="1" parent="1" source="DIFF" target="T">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="200" y="950"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e11_lbl" value="8 Notary reviews diff" style="text;html=1;fontSize=11;fontColor=#08427B;align=center" vertex="1" parent="1">
          <mxGeometry x="60" y="510" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e12" style="endArrow=classic;html=1;strokeWidth=1.8;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#5C8A3E" edge="1" parent="1" source="DIFF" target="APR">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e12_lbl" value="9 approves (MFA TOTP)" style="text;html=1;fontSize=11;fontColor=#3F5E2A;align=center;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="895" y="930" width="160" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e13" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#FF9900" edge="1" parent="1" source="APR" target="EVKB">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e13_lbl" value="10 emits event" style="text;html=1;fontSize=11;fontColor=#7A4900;align=center" vertex="1" parent="1">
          <mxGeometry x="1245" y="930" width="120" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="e14a" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.3;exitY=1;entryX=0.5;entryY=0;strokeColor=#5D82A8" edge="1" parent="1" source="APR" target="KBV">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1015" y="1060"/>
              <mxPoint x="535" y="1100"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e14a_lbl" value="11a status=active" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="380" y="1070" width="160" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="e14b" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;strokeColor=#5D82A8" edge="1" parent="1" source="APR" target="KBC">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e14b_lbl" value="11b indexes chunks (HNSW)" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="800" y="1070" width="240" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="e15a" style="endArrow=classic;html=1;strokeWidth=1.2;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;strokeColor=#3C7FC0" edge="1" parent="1" source="KBV" target="RDS">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="535" y="1350"/>
              <mxPoint x="1520" y="1350"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e15b" style="endArrow=classic;html=1;strokeWidth=1.2;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;strokeColor=#3C7FC0" edge="1" parent="1" source="KBC" target="RDS">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="920" y="1350"/>
              <mxPoint x="1520" y="1350"/>
            </Array>
          </mxGeometry>
        </mxCell>

        <mxCell id="eFA" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=0;entryX=0.3;entryY=1;strokeColor=#D79B00;dashed=1" edge="1" parent="1" source="FLOWA" target="KBC">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="eFA_lbl" value="12 RAG K=20 -&gt; rerank -&gt; N=5" style="text;html=1;fontSize=11;fontColor=#7A5A0E;align=center" vertex="1" parent="1">
          <mxGeometry x="380" y="1345" width="240" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="eFB2" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.3;exitY=0;entryX=0.7;entryY=1;strokeColor=#D79B00;dashed=1" edge="1" parent="1" source="FLOWB2" target="KBC">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1322" y="1355"/>
              <mxPoint x="1004" y="1355"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="eFB2_lbl" value="14 RAG K=15 -&gt; N=3 (citations)" style="text;html=1;fontSize=11;fontColor=#7A5A0E;align=center" vertex="1" parent="1">
          <mxGeometry x="1180" y="1345" width="260" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="eRC" style="endArrow=classic;html=1;strokeWidth=1.2;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.3;dashed=1;dashPattern=4 4;strokeColor=#3C7FC0" edge="1" parent="1" source="RAGCFG" target="FLOWA">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="eRC_lbl" value="reads K/N/threshold" style="text;html=1;fontSize=10;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="350" y="1430" width="160" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="eRQ" style="endArrow=classic;html=1;strokeWidth=1.2;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0;exitY=0.5;entryX=1;entryY=0.5;dashed=1;dashPattern=4 4;strokeColor=#3C7FC0" edge="1" parent="1" source="FLOWA" target="RAGQ">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="370" y="1505"/>
              <mxPoint x="370" y="950"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="eRQ_lbl" value="logs each retrieval" style="text;html=1;fontSize=10;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="155" y="1340" width="170" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="eRFB" style="endArrow=classic;html=1;strokeWidth=1.2;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;dashed=1;dashPattern=4 4;strokeColor=#3C7FC0" edge="1" parent="1" source="RAGQ" target="RAGFB">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="eRFB_lbl" value="user signal" style="text;html=1;fontSize=10;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="100" y="1055" width="120" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="evig" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=0.2;exitY=0;entryX=0.5;entryY=1;dashed=1;strokeColor=#DD344C" edge="1" parent="1" source="VIG" target="KBV">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="evig_lbl" value="15 daily cron checks effective_until" style="text;html=1;fontSize=11;fontColor=#8B0000;align=center" vertex="1" parent="1">
          <mxGeometry x="430" y="1655" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="ev1" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#666" edge="1" parent="1" source="VIG" target="SES">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ev1_lbl" value="16 alert 30/15/5d (SES + ClickUp task)" style="text;html=1;fontSize=11;fontColor=#444;align=center" vertex="1" parent="1">
          <mxGeometry x="845" y="1735" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="ev2" style="endArrow=classic;html=1;strokeWidth=1.5;edgeStyle=orthogonalEdgeStyle;rounded=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeColor=#DD344C" edge="1" parent="1" source="SES" target="LOCK">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ev2_lbl" value="17 expired -&gt; block" style="text;html=1;fontSize=11;fontColor=#8B0000;align=center;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1165" y="1735" width="200" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="eaud" style="endArrow=classic;html=1;strokeWidth=1.2;dashed=1;dashPattern=4 4;edgeStyle=orthogonalEdgeStyle;rounded=1;strokeColor=#999999;exitX=0;exitY=0.5;entryX=1;entryY=0.5" edge="1" parent="1" source="VIG" target="AUD">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="eaud_lbl" value="audit (kb_version_id, event)" style="text;html=1;fontSize=11;fontColor=#444;align=center" vertex="1" parent="1">
          <mxGeometry x="320" y="1770" width="240" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="eaud2" style="endArrow=classic;html=1;strokeWidth=1.2;dashed=1;dashPattern=4 4;edgeStyle=orthogonalEdgeStyle;rounded=1;strokeColor=#999999;exitX=0;exitY=0.6;entryX=1;entryY=0.2" edge="1" parent="1" source="APR" target="AUD">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="200" y="980"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="eaud2_lbl" value="audit kb_version.approved + kb_category.weight_changed" style="text;html=1;fontSize=10;fontColor=#444;align=center" vertex="1" parent="1">
          <mxGeometry x="80" y="1060" width="320" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="legend" value="&lt;b&gt;Legend KB R5&lt;/b&gt;  Navy: Notary  Green: KB native (upload, extract, kb_category)  Light blue: API/UI/store/RDS/SQS/S3  Orange: Flow A/B consumers  Red: vigencia/block  Gray: external/audit/out-of-scope  Dashed: abstraction/RAG/audit/telemetry  -  &lt;b&gt;MVP back-office:&lt;/b&gt; no ICP-Brasil, no MNE, no CENAD, no OpenTimestamps - those are roadmap." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F5F5F5;strokeColor=#999;fontSize=11;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="40" y="1870" width="1620" height="50" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="06-deploy-aws" name="06-deploy-aws">
    <mxGraphModel dx="2000" dy="1500" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="2400" pageHeight="2000" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="Deploy AWS sa-east-1 R5 - Single-tenant infra A2 + Comandos CLI" style="text;html=1;align=center;fontSize=22;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="40" width="2320" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="subtitle" value="VPC/ALB/CloudFront/Keycloak/ECS service compartilhados; N RDS instances + 4N S3 buckets + N KMS CMK + N realms (1 set por tenant). Setas com comandos CLI inline para reproducao operacional." style="text;html=1;align=center;fontSize=14;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="40" y="80" width="2320" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="howread" value="&lt;b&gt;Como ler:&lt;/b&gt; (1) Bloco esquerdo - infra COMPARTILHADA Stoix (VPC, ALB, CloudFront, Keycloak ECS, NAT). (2) Bloco direito (repetido por tenant) - RDS dedicado + 4 buckets dedicados + KMS CMK + realm. (3) Setas anotadas com comandos AWS CLI / pulumi reais. (4) Onboarding novo notary = pulumi stack init + pulumi up. (5) Operacoes recorrentes (deploy, snapshot, key rotation) tem comando concreto." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF8DC;strokeColor=#D4AC0D;fontSize=12;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="40" y="120" width="2320" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="region" value="Regiao AWS sa-east-1 (Sao Paulo) - KMS exclusivo, multi-region keys OFF" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F5F5F5;strokeColor=#444;dashed=0;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="40" y="220" width="2320" height="1640" as="geometry"/>
        </mxCell>

        <mxCell id="shared" value="Infra COMPARTILHADA (Stoix base) - Pulumi stack stoix-shared-prd" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EAF2FB;strokeColor=#5D82A8;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=14;spacingTop=10;fontSize=13;fontStyle=1;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="80" y="280" width="1100" height="1540" as="geometry"/>
        </mxCell>

        <mxCell id="vpc" value="&lt;b&gt;VPC compartilhada&lt;/b&gt;&lt;br/&gt;10.0.0.0/16, 2 AZ (sa-east-1a / 1b)&lt;br/&gt;Subnets: public, private-app, private-data" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="320" width="380" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="vpccmd" value="pulumi up --stack stoix-shared-prd&#10;aws ec2 describe-vpcs --filters Name=tag:stoix,Values=true" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F4E79;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="520" y="320" width="640" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="cf" value="&lt;b&gt;CloudFront + WAF&lt;/b&gt;&lt;br/&gt;cartorio.stoix.com.br/{slug}&lt;br/&gt;TLS 1.3, geo-BR" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="450" width="380" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="cfcmd" value="aws cloudfront list-distributions&#10;aws cloudfront create-invalidation --distribution-id E1AB --paths /*&#10;aws wafv2 list-web-acls --scope CLOUDFRONT" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F4E79;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="520" y="450" width="640" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="alb" value="&lt;b&gt;Application Load Balancer&lt;/b&gt;&lt;br/&gt;Internal HTTPS, target group por servico&lt;br/&gt;Roteia path /{slug} -&gt; API; injeta header X-Tenant-Slug" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="580" width="380" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="albcmd" value="aws elbv2 describe-load-balancers --names stoix-shared-alb&#10;aws elbv2 describe-target-health --target-group-arn $TG_ARN" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F4E79;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="520" y="580" width="640" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="ecsapi" value="&lt;b&gt;ECS Fargate - API service&lt;/b&gt;&lt;br/&gt;Cluster stoix-shared, service api-bff&lt;br/&gt;2 tasks 0.5 vCPU 1GB, autoscale CPU 70%" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="710" width="380" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="ecsapicmd" value="aws ecs update-service --cluster stoix-shared --service api-bff --force-new-deployment&#10;aws ecs describe-services --cluster stoix-shared --services api-bff&#10;aws logs tail /ecs/api-bff --follow" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F4E79;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="520" y="710" width="640" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="ecskc" value="&lt;b&gt;ECS Fargate - Keycloak service&lt;/b&gt;&lt;br/&gt;2 tasks 1 vCPU 2GB multi-AZ&lt;br/&gt;1 instancia, N realms notary-{slug}&lt;br/&gt;MFA TOTP, OIDC issuer, realm-per-tenant" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#3334B9;strokeColor=#1F1F8C;fontColor=#ffffff;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="840" width="380" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="ecskccmd" value="aws ecs update-service --cluster stoix-shared --service keycloak --force-new-deployment&#10;# criar realm para novo tenant via Keycloak Admin API:&#10;curl -X POST $KC/admin/realms -H Authorization:Bearer-$T &#10;  -d (json com realm notary-27sp enabled true)" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F1F8C;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="520" y="840" width="640" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="lambdas" value="&lt;b&gt;Lambda workers (compartilhados)&lt;/b&gt;&lt;br/&gt;ocr-worker, llm-worker, billing-worker, kb-extract-worker, kb-vigencia-worker, fee-schedule-extract-worker. Recebem tenant_slug em payload." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="990" width="380" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="lambdacmd" value="aws lambda update-function-code --function-name ocr-worker --image-uri $ECR/ocr-worker:$SHA&#10;aws lambda invoke --function-name kb-vigencia-worker /tmp/out.json&#10;aws lambda invoke --function-name fee-schedule-extract-worker /tmp/out.json&#10;aws logs tail /aws/lambda/ocr-worker --follow" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F4E79;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="520" y="990" width="640" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="rdsauth" value="&lt;b&gt;RDS Stoix-Auth&lt;/b&gt;&lt;br/&gt;db.t4g.micro multi-AZ&lt;br/&gt;Backing store Keycloak (compartilhado entre realms)" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#3334B9;fontColor=#ffffff;strokeColor=#1F1F8C;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="1140" width="380" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="rdsauthcmd" value="aws rds describe-db-instances --db-instance-identifier stoix-auth&#10;aws rds create-db-snapshot --db-instance-identifier stoix-auth --db-snapshot-identifier auth-$(date +%F)" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F1F8C;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="520" y="1140" width="640" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="ddb" value="&lt;b&gt;DynamoDB audit_log&lt;/b&gt;&lt;br/&gt;PK = tenant_slug#timestamp&lt;br/&gt;Streams ON; TTL 7y" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="1260" width="380" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="ddbcmd" value="aws dynamodb describe-table --table-name audit_log&#10;aws dynamodb query --table-name audit_log &#10;  --key-condition-expression pk-eq-notary-27sp-2026" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F4E79;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="520" y="1260" width="640" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="sqs" value="&lt;b&gt;SQS FIFO + EventBridge&lt;/b&gt;&lt;br/&gt;Filas: ocr-queue, llm-queue, kb-extract-queue, fee-extract-queue, billing-queue&lt;br/&gt;DLQ por etapa" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="1380" width="380" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="sqscmd" value="aws sqs get-queue-attributes --queue-url $Q --attribute-names ApproximateNumberOfMessages&#10;aws events list-rules --name-prefix kb-vigencia" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F4E79;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="520" y="1380" width="640" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="nat" value="&lt;b&gt;NAT Gateway 2 AZ&lt;/b&gt;&lt;br/&gt;Egress private subnet&lt;br/&gt;VPC endpoints: S3, KMS, Secrets, Bedrock" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="1500" width="380" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="natcmd" value="aws ec2 describe-nat-gateways&#10;aws ec2 describe-vpc-endpoints --filters Name=service-name,Values=bedrock" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F4E79;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="520" y="1500" width="640" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="ecr" value="&lt;b&gt;ECR repos&lt;/b&gt;&lt;br/&gt;api-bff, ocr-worker, llm-worker, kb-extract-worker, kb-vigencia-worker, fee-schedule-extract-worker, billing-worker" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="1620" width="380" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="ecrcmd" value="aws ecr get-login-password | docker login --username AWS --password-stdin $ECR_URI&#10;docker build -t $ECR/api-bff:$SHA . &amp;&amp; docker push $ECR/api-bff:$SHA" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F4E79;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="520" y="1620" width="640" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="tenant" value="Infra DEDICADA por tenant - Pulumi stack notary-{slug}-prd" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EFF7E8;strokeColor=#5C8A3E;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=14;spacingTop=10;fontSize=13;fontStyle=1;fontColor=#3F5E2A" vertex="1" parent="1">
          <mxGeometry x="1220" y="280" width="1100" height="1540" as="geometry"/>
        </mxCell>

        <mxCell id="onboardnote" value="&lt;b&gt;Onboarding notary-27sp&lt;/b&gt;&lt;br/&gt;pulumi stack init notary-27sp-prd&lt;br/&gt;pulumi config set tenant:slug 27sp&lt;br/&gt;pulumi up --stack notary-27sp-prd&lt;br/&gt;# tempo estimado: ~12 min para criar todos os recursos abaixo" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;fontColor=#000000;strokeColor=#5C8A3E;fontSize=11;strokeWidth=2;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1260" y="320" width="1020" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="rdstenant" value="&lt;b&gt;RDS PostgreSQL notary-{slug}-prd&lt;/b&gt;&lt;br/&gt;db.t4g.micro multi-AZ (1 GB RAM, 2 vCPU burst)&lt;br/&gt;Schema unico app, sem RLS, sem tenant_id&lt;br/&gt;Extensoes: pgvector (HNSW), pgcrypto, pg_stat_statements" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;fontColor=#FFFFFF;strokeColor=#3C7FC0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1260" y="450" width="500" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="rdstenantcmd" value="aws rds describe-db-instances --db-instance-identifier notary-27sp-prd&#10;aws rds create-db-snapshot --db-instance-identifier notary-27sp-prd &#10;  --db-snapshot-identifier 27sp-$(date +%F)&#10;aws rds modify-db-instance --db-instance-identifier notary-27sp-prd &#10;  --db-instance-class db.t4g.small --apply-immediately" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#3F5E2A;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1780" y="450" width="500" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="s3uploads" value="&lt;b&gt;S3 notary-{slug}-uploads&lt;/b&gt;&lt;br/&gt;Documentos das partes&lt;br/&gt;SSE-KMS CMK do tenant" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;fontColor=#FFFFFF;strokeColor=#3C7FC0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1260" y="600" width="500" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="s3upcmd" value="aws s3 mb s3://notary-27sp-uploads --region sa-east-1&#10;aws s3 cp ./doc.pdf s3://notary-27sp-uploads/acts/$ACT/&#10;aws s3api put-bucket-encryption --bucket notary-27sp-uploads &#10;  --server-side-encryption-configuration ..." style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#3F5E2A;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1780" y="600" width="500" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="s3worm" value="&lt;b&gt;S3 notary-{slug}-livro-perpetuo&lt;/b&gt;&lt;br/&gt;Object Lock COMPLIANCE 30y livro perpetuo&lt;br/&gt;Documentos subsidiarios 10y&lt;br/&gt;Lambda extensao para retencao perpetua" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#438DD5;fontColor=#FFFFFF;strokeColor=#3C7FC0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1260" y="730" width="500" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="s3wormcmd" value="aws s3api create-bucket --bucket notary-27sp-livro-perpetuo &#10;  --object-lock-enabled-for-bucket --create-bucket-configuration LocationConstraint=sa-east-1&#10;aws s3api put-object-retention --bucket notary-27sp-livro-perpetuo &#10;  --key livro/2026/act-123.pdf --retention Mode=COMPLIANCE,RetainUntilDate=..." style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#3F5E2A;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1780" y="730" width="500" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="s3kb" value="&lt;b&gt;S3 notary-{slug}-kb&lt;/b&gt;&lt;br/&gt;Knowledge Base (NSCGJ, Provimentos, jurisprudencia)&lt;br/&gt;Versionamento ativado" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#A4C97A;fontColor=#000000;strokeColor=#5C8A3E;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1260" y="880" width="500" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="s3kbcmd" value="aws s3api put-bucket-versioning --bucket notary-27sp-kb &#10;  --versioning-configuration Status=Enabled&#10;aws s3 cp ./NSCGJ-SP-2026.pdf s3://notary-27sp-kb/normative/&#10;aws s3 cp ./fee-schedule-2026.pdf s3://notary-27sp-fee-schedule/" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#3F5E2A;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1780" y="880" width="500" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="s3fee" value="&lt;b&gt;S3 notary-{slug}-fee-schedule&lt;/b&gt;&lt;br/&gt;Tabela de emolumentos vigente (PDF/CSV originais)&lt;br/&gt;Source para fee-schedule-extract-worker&lt;br/&gt;Versionamento ON" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#5DADE2;fontColor=#FFFFFF;strokeColor=#2874A6;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1260" y="1000" width="500" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="s3feecmd" value="aws s3 mb s3://notary-27sp-fee-schedule --region sa-east-1&#10;aws s3api put-bucket-versioning --bucket notary-27sp-fee-schedule &#10;  --versioning-configuration Status=Enabled&#10;aws s3 cp ./tabela-emolumentos-CGJ-SP-2026.pdf s3://notary-27sp-fee-schedule/" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1B4F72;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1780" y="1000" width="500" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="kms" value="&lt;b&gt;KMS CMK alias/notary-{slug}&lt;/b&gt;&lt;br/&gt;Customer Master Key dedicada&lt;br/&gt;Multi-region keys OFF&lt;br/&gt;Rotacao anual automatica&lt;br/&gt;Cifra: RDS, 4 buckets S3, Secrets do tenant" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#DD344C;strokeColor=#B8001F;fontColor=#ffffff;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1260" y="1115" width="500" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="kmscmd" value="aws kms create-key --description Notary-27sp-CMK --multi-region false&#10;aws kms create-alias --alias-name alias/notary-27sp --target-key-id $KEY_ID&#10;aws kms enable-key-rotation --key-id $KEY_ID&#10;aws kms list-grants --key-id $KEY_ID  # auditoria de acessos" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#8B0000;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1780" y="1115" width="500" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="realm" value="&lt;b&gt;Keycloak realm notary-{slug}&lt;/b&gt;&lt;br/&gt;Hospedado no Keycloak compartilhado&lt;br/&gt;MFA TOTP obrigatorio (sem PKCS#11)&lt;br/&gt;Admin do realm = Tabeliao do notary" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#3334B9;strokeColor=#1F1F8C;fontColor=#ffffff;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1260" y="1180" width="500" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="realmcmd" value="curl -X POST $KC_URL/admin/realms -H Authorization:Bearer-$TOKEN &#10;  -d (json realm=notary-27sp enabled=true sslRequired=all)&#10;curl -X POST $KC_URL/admin/realms/notary-27sp/users &#10;  -d (json username=tabeliao.lucas requiredActions=CONFIGURE_TOTP)" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F1F8C;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1780" y="1180" width="500" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="crr" value="&lt;b&gt;S3 Cross-Region Replication&lt;/b&gt;&lt;br/&gt;Cifrado only (us-east-1 destino)&lt;br/&gt;Por tenant: 4 destinos espelhados&lt;br/&gt;KMS sa-east-1 nao acompanha (RTO indeterminado em region failure)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;strokeColor=#D79B00;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1260" y="1330" width="500" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="crrcmd" value="aws s3api put-bucket-replication --bucket notary-27sp-uploads &#10;  --replication-configuration file://replication.json&#10;aws s3api get-bucket-replication --bucket notary-27sp-uploads&#10;# replication.json define destino arn:aws:s3:::notary-27sp-uploads-dr us-east-1" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#7A5A0E;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1780" y="1330" width="500" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="secrets" value="&lt;b&gt;Secrets Manager por tenant&lt;/b&gt;&lt;br/&gt;notary-{slug}/rds-credentials&lt;br/&gt;notary-{slug}/kb-config&lt;br/&gt;notary-{slug}/fee-schedule-config&lt;br/&gt;Rotacao 30d via Lambda" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#DD344C;strokeColor=#B8001F;fontColor=#ffffff;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1260" y="1480" width="500" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="secretscmd" value="aws secretsmanager create-secret --name notary-27sp/rds-credentials &#10;  --kms-key-id alias/notary-27sp --secret-string (json user=app password=...)&#10;aws secretsmanager rotate-secret --secret-id notary-27sp/rds-credentials &#10;  --rotation-lambda-arn $ROT_LAMBDA --rotation-rules AutomaticallyAfterDays=30" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#8B0000;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1780" y="1480" width="500" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="cw" value="&lt;b&gt;CloudWatch tags por tenant&lt;/b&gt;&lt;br/&gt;Logs /aws/{service}/{tenant}&lt;br/&gt;Metricas custom dim tenant=notary-{slug}" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1260" y="1620" width="500" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="cwcmd" value="aws logs filter-log-events --log-group-name /aws/lambda/llm-worker &#10;  --filter-pattern (tenant=notary-27sp)&#10;aws cloudwatch get-metric-statistics --namespace Stoix --metric-name ActsCreated &#10;  --dimensions Name=tenant,Value=notary-27sp --start-time ... --period 86400 --statistics Sum" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F4E79;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1780" y="1620" width="500" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="ea" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.3;strokeWidth=2;strokeColor=#5D82A8;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="ecsapi" target="rdstenant">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="800" y="760"/>
              <mxPoint x="800" y="495"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="ea_lbl" value="API conecta no RDS do tenant via TenantResolver" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="780" y="475" width="380" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="eb" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#1F1F8C;dashed=1;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="ecskc" target="realm">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="800" y="900"/>
              <mxPoint x="800" y="1240"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="eb_lbl" value="serve realm notary-{slug}" style="text;html=1;fontSize=11;fontColor=#1F1F8C;align=center" vertex="1" parent="1">
          <mxGeometry x="800" y="1145" width="240" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="ec" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#5D82A8;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="lambdas" target="s3uploads">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="780" y="1050"/>
              <mxPoint x="780" y="650"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="ec_lbl" value="workers acessam buckets do tenant" style="text;html=1;fontSize=11;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="800" y="630" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="ed" style="endArrow=classic;html=1;exitX=1;exitY=0.7;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#B8001F;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="lambdas" target="kms">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="780" y="1080"/>
              <mxPoint x="780" y="1080"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="ed_lbl" value="Decrypt com CMK do tenant (KMS Grant)" style="text;html=1;fontSize=11;fontColor=#8B0000;align=center" vertex="1" parent="1">
          <mxGeometry x="780" y="1090" width="280" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="legend" value="&lt;b&gt;Legenda Deploy R5&lt;/b&gt;  Bloco azul claro: infra compartilhada Stoix  Bloco verde: dedicado por tenant  Bloco vermelho: KMS/Secrets  Caixa Courier: comando AWS CLI / pulumi real  Setas: relacao operacional entre componentes  Naming: notary-{slug}-* em buckets/db/realm/CMK" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F5F5F5;strokeColor=#999;fontSize=11;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="40" y="1880" width="2320" height="40" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="07-data-model" name="07-data-model">
    <mxGraphModel dx="2000" dy="1500" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="2400" pageHeight="2640" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <mxCell id="title" value="Data Model R5 — schema &#x27;app&#x27; on RDS dedicado por tenant (CMMI L3 conventions)" style="text;html=1;align=center;fontSize=22;fontStyle=1" vertex="1" parent="1"><mxGeometry x="40" y="40" width="2320" height="36" as="geometry"/></mxCell>
        <mxCell id="subtitle" value="MVP back-office only · KB scoped to normative + case law · Fee Schedule / Procedure / Templates as separate modules · RAG with manageable categories and runtime-tunable config" style="text;html=1;align=center;fontSize=14;fontStyle=2" vertex="1" parent="1"><mxGeometry x="40" y="80" width="2320" height="40" as="geometry"/></mxCell>
        <mxCell id="howread" value="&lt;b&gt;Como ler:&lt;/b&gt; (1) 6 clusters por cor; cada cluster agrupa entidades de um domínio. (2) Cabeçalho colorido = nome+tipo da entidade. Caixa abaixo = atributos (PK em negrito, FK explícita). (3) Setas crow's foot mostram cardinalidade; tracejadas indicam relações opcionais ou telemétricas. (4) Schema único 'app' por RDS — sem coluna tenant_id porque cada tenant tem RDS dedicado. (5) Layout gerado algoritmicamente — entidades posicionadas via grid dentro das regiões definidas pelos clusters." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF8DC;strokeColor=#D4AC0D;fontSize=12;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1"><mxGeometry x="40" y="135" width="2320" height="80" as="geometry"/></mxCell>
        <mxCell id="schemabox" value="Schema &#x27;app&#x27; — RDS PostgreSQL notary-{slug}-prd (db.t4g.micro multi-AZ, pgvector, pgcrypto)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FAFAFA;strokeColor=#444;dashed=0;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#444" vertex="1" parent="1"><mxGeometry x="40" y="240" width="2320" height="1980" as="geometry"/></mxCell>
        <mxCell id="cluster_core" value="Core (notarial act flow — in-person execution, back-office)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EBF8FF;strokeColor=#1A365D;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=10;fontSize=13;fontStyle=1;fontColor=#1A365D" vertex="1" parent="1"><mxGeometry x="80" y="260" width="2280" height="620" as="geometry"/></mxCell>
        <mxCell id="cluster_kbc" value="Knowledge Base (RAG) — normative + case law only (manageable categories with weight)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F0FFF4;strokeColor=#22543D;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=10;fontSize=13;fontStyle=1;fontColor=#22543D" vertex="1" parent="1"><mxGeometry x="80" y="910" width="2280" height="370" as="geometry"/></mxCell>
        <mxCell id="cluster_emol" value="Fee Schedule (structural — exact lookup, no RAG)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6FFFA;strokeColor=#234E52;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=10;fontSize=13;fontStyle=1;fontColor=#234E52" vertex="1" parent="1"><mxGeometry x="80" y="1310" width="1020" height="320" as="geometry"/></mxCell>
        <mxCell id="cluster_proc" value="Procedure (wiki — markdown)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FAF5FF;strokeColor=#44337A;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=10;fontSize=13;fontStyle=1;fontColor=#44337A" vertex="1" parent="1"><mxGeometry x="1130" y="1310" width="320" height="320" as="geometry"/></mxCell>
        <mxCell id="cluster_bill" value="Billing (immutable snapshots)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFFAF0;strokeColor=#9C4221;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=10;fontSize=13;fontStyle=1;fontColor=#9C4221" vertex="1" parent="1"><mxGeometry x="1480" y="1310" width="880" height="400" as="geometry"/></mxCell>
        <mxCell id="cluster_telem" value="Telemetry + audit + config (instrumented RAG tuning loop)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F7FAFC;strokeColor=#2D3748;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=10;fontSize=13;fontStyle=1;fontColor=#2D3748" vertex="1" parent="1"><mxGeometry x="80" y="1760" width="2280" height="380" as="geometry"/></mxCell>
        <mxCell id="user" value="&lt;b&gt;app_user&lt;/b&gt;&lt;br/&gt;[fundamental — mutable]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#1A365D;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="104" y="320" width="537" height="44" as="geometry"/></mxCell>
        <mxCell id="user_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;keycloak_subject text UNIQUE&lt;br/&gt;email text UNIQUE&lt;br/&gt;name text&lt;br/&gt;role enum (notary, notary_clerk, stoix_admin, dpo)&lt;br/&gt;is_mfa_totp_enabled bool&lt;br/&gt;is_active bool&lt;br/&gt;created_at timestamptz NOT NULL&lt;br/&gt;updated_at timestamptz NOT NULL&lt;br/&gt;version int NOT NULL default 1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#1A365D;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="104" y="364" width="537" height="226" as="geometry"/></mxCell>
        <mxCell id="atotpl" value="&lt;b&gt;act_template&lt;/b&gt;&lt;br/&gt;[fundamental — mutable]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#1A365D;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="669" y="320" width="537" height="44" as="geometry"/></mxCell>
        <mxCell id="atotpl_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;code text UNIQUE (ex: GENERIC_POA_2026)&lt;br/&gt;name text&lt;br/&gt;act_type text (power_of_attorney, deed, minute, ...)&lt;br/&gt;category enum (notes_book, document, audit)&lt;br/&gt;status enum (draft, active, deprecated)&lt;br/&gt;FK created_by_user_id uuid → app_user.id&lt;br/&gt;FK approved_by_user_id uuid NULL → app_user.id&lt;br/&gt;created_at, updated_at timestamptz NOT NULL&lt;br/&gt;version int NOT NULL default 1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#1A365D;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="669" y="364" width="537" height="226" as="geometry"/></mxCell>
        <mxCell id="atover" value="&lt;b&gt;act_template_version&lt;/b&gt;&lt;br/&gt;[weak — immutable on approval]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#1A365D;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="1234" y="320" width="537" height="44" as="geometry"/></mxCell>
        <mxCell id="atover_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;FK act_template_id uuid → act_template.id&lt;br/&gt;version_number int&lt;br/&gt;template_body text (handlebars)&lt;br/&gt;clauses jsonb&lt;br/&gt;parameters jsonb&lt;br/&gt;source enum (created_from_scratch, derived_from_template, docx_upload)&lt;br/&gt;FK kb_version_origin_id uuid NULL → kb_version.id (KBC consult)&lt;br/&gt;immutable_hash text (sha256)&lt;br/&gt;FK created_by_user_id uuid → app_user.id&lt;br/&gt;created_at timestamptz NOT NULL" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#1A365D;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="1234" y="364" width="537" height="226" as="geometry"/></mxCell>
        <mxCell id="atoinst" value="&lt;b&gt;act&lt;/b&gt;&lt;br/&gt;[fundamental — append-only after execution]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#1A365D;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="1799" y="320" width="537" height="44" as="geometry"/></mxCell>
        <mxCell id="atoinst_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;FK act_template_version_id uuid → act_template_version.id&lt;br/&gt;protocol_number text UNIQUE&lt;br/&gt;modality enum (in_person)  -- MVP back-office&lt;br/&gt;status enum (draft, processing, in_review, executed, amended, cancelled)&lt;br/&gt;field_values jsonb&lt;br/&gt;FK created_by_user_id uuid → app_user.id&lt;br/&gt;FK executed_by_user_id uuid NULL → app_user.id&lt;br/&gt;executed_at timestamptz NULL&lt;br/&gt;s3_draft_key text NULL&lt;br/&gt;draft_hash text NULL (sha256)&lt;br/&gt;created_at, updated_at timestamptz NOT NULL&lt;br/&gt;version int NOT NULL default 1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#1A365D;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="1799" y="364" width="537" height="226" as="geometry"/></mxCell>
        <mxCell id="doc" value="&lt;b&gt;act_attachment&lt;/b&gt;&lt;br/&gt;[weak — immutable]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#1A365D;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="104" y="614" width="537" height="44" as="geometry"/></mxCell>
        <mxCell id="doc_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;FK act_id uuid → act.id&lt;br/&gt;type enum (id_card, tax_id, birth_cert, marriage_cert, property_record, poa, other)&lt;br/&gt;s3_key text&lt;br/&gt;ocr_payload jsonb&lt;br/&gt;ocr_confidence numeric(4,3)&lt;br/&gt;local_validation jsonb (CPF DV, dates, amounts)&lt;br/&gt;status enum (uploaded, processing, validated, rejected)&lt;br/&gt;created_at timestamptz NOT NULL" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#1A365D;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="104" y="658" width="537" height="210" as="geometry"/></mxCell>
        <mxCell id="parte" value="&lt;b&gt;act_party&lt;/b&gt;&lt;br/&gt;[weak — LGPD data subject]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#1A365D;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="669" y="614" width="537" height="44" as="geometry"/></mxCell>
        <mxCell id="parte_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;FK act_id uuid → act.id&lt;br/&gt;role enum (grantor, grantee, buyer, seller, party)&lt;br/&gt;person_type enum (PF, PJ)  -- BR: PF=natural, PJ=legal entity&lt;br/&gt;tax_id text (CPF/CNPJ — column-encrypted pgcrypto+KMS)&lt;br/&gt;legal_name text&lt;br/&gt;identity_document text NULL&lt;br/&gt;address jsonb&lt;br/&gt;FK represented_by_party_id uuid NULL → act_party.id (self-ref)&lt;br/&gt;lgpd_consent jsonb&lt;br/&gt;created_at, updated_at timestamptz NOT NULL&lt;br/&gt;version int NOT NULL default 1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#1A365D;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="669" y="658" width="537" height="210" as="geometry"/></mxCell>
        <mxCell id="exportlgpd" value="&lt;b&gt;lgpd_request&lt;/b&gt;&lt;br/&gt;[weak — append-only]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#1A365D;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="1234" y="614" width="537" height="44" as="geometry"/></mxCell>
        <mxCell id="exportlgpd_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;FK requested_by_user_id uuid → app_user.id (DPO)&lt;br/&gt;FK subject_party_id uuid NULL → act_party.id&lt;br/&gt;type enum (access, rectification, deletion, portability, anonymization)&lt;br/&gt;status enum (requested, approved, rejected, fulfilled)&lt;br/&gt;rejection_reason text NULL&lt;br/&gt;exported_data jsonb NULL&lt;br/&gt;requested_at timestamptz NOT NULL&lt;br/&gt;responded_at timestamptz NULL&lt;br/&gt;response_deadline_days int NOT NULL default 15" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#1A365D;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="1234" y="658" width="537" height="210" as="geometry"/></mxCell>
        <mxCell id="kbcat" value="&lt;b&gt;kb_category&lt;/b&gt;&lt;br/&gt;[fundamental — mutable — NEW R5]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2F855A;strokeColor=#22543D;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="104" y="970" width="424" height="44" as="geometry"/></mxCell>
        <mxCell id="kbcat_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;slug text UNIQUE&lt;br/&gt;name text (ex: Normative, Case_Law, Doctrine)&lt;br/&gt;weight numeric(3,2) (0.00–1.00) — RAG rerank multiplier&lt;br/&gt;color text (#hex, UI pills)&lt;br/&gt;description text&lt;br/&gt;sort_order int&lt;br/&gt;is_active bool&lt;br/&gt;FK created_by_user_id uuid → app_user.id&lt;br/&gt;created_at, updated_at timestamptz NOT NULL&lt;br/&gt;version int NOT NULL default 1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#22543D;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="104" y="1014" width="424" height="226" as="geometry"/></mxCell>
        <mxCell id="kbdoc" value="&lt;b&gt;kb_document&lt;/b&gt;&lt;br/&gt;[fundamental — mutable — MODIFIED R5]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2F855A;strokeColor=#22543D;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="556" y="970" width="424" height="44" as="geometry"/></mxCell>
        <mxCell id="kbdoc_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;FK kb_category_id uuid → kb_category.id (replaces type enum)&lt;br/&gt;source enum (cgj_official, doctrine, internal, case_law)&lt;br/&gt;title text&lt;br/&gt;s3_key text (bucket notary-{slug}-kb)&lt;br/&gt;mime_type text&lt;br/&gt;tags text[] (free facets)&lt;br/&gt;FK created_by_user_id uuid → app_user.id (notary)&lt;br/&gt;created_at, updated_at timestamptz NOT NULL&lt;br/&gt;version int NOT NULL default 1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#22543D;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="556" y="1014" width="424" height="226" as="geometry"/></mxCell>
        <mxCell id="kbver" value="&lt;b&gt;kb_version&lt;/b&gt;&lt;br/&gt;[weak — immutable on approval]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2F855A;strokeColor=#22543D;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="1008" y="970" width="424" height="44" as="geometry"/></mxCell>
        <mxCell id="kbver_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;FK kb_document_id uuid → kb_document.id&lt;br/&gt;version_number int&lt;br/&gt;status enum (uploaded, extracting, reviewing, active, expired, superseded)&lt;br/&gt;effective_from date&lt;br/&gt;effective_until date NULL&lt;br/&gt;extracted_json jsonb&lt;br/&gt;content_hash text (sha256 of json)&lt;br/&gt;FK approved_by_user_id uuid NULL → app_user.id&lt;br/&gt;approved_at timestamptz NULL&lt;br/&gt;created_at timestamptz NOT NULL" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#22543D;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="1008" y="1014" width="424" height="226" as="geometry"/></mxCell>
        <mxCell id="kbchunk" value="&lt;b&gt;kb_chunk&lt;/b&gt;&lt;br/&gt;[weak — immutable — pgvector HNSW]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2F855A;strokeColor=#22543D;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="1460" y="970" width="424" height="44" as="geometry"/></mxCell>
        <mxCell id="kbchunk_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;FK kb_version_id uuid → kb_version.id&lt;br/&gt;FK kb_category_id uuid → kb_category.id (denormal — fast rerank)&lt;br/&gt;chunk_order int&lt;br/&gt;text_content text&lt;br/&gt;token_count int&lt;br/&gt;structural_anchor text NULL (NEW R5: &#x27;Art.17 §2nd&#x27;)&lt;br/&gt;source_page int NULL (NEW R5)&lt;br/&gt;chunking_tier enum (hierarchical, sentence, single) — NEW R5&lt;br/&gt;embedding vector(1024) — Titan Embed v2&lt;br/&gt;INDEX hnsw (embedding vector_cosine_ops) m=16 ef_const=64&lt;br/&gt;INDEX btree (kb_version_id, kb_category_id)&lt;br/&gt;created_at timestamptz NOT NULL" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#22543D;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="1460" y="1014" width="424" height="226" as="geometry"/></mxCell>
        <mxCell id="kbcalert" value="&lt;b&gt;kb_alert&lt;/b&gt;&lt;br/&gt;[weak — append-only]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2F855A;strokeColor=#22543D;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="1912" y="970" width="424" height="44" as="geometry"/></mxCell>
        <mxCell id="kbcalert_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;FK kb_version_id uuid → kb_version.id&lt;br/&gt;type enum (expiry_30d, expiry_15d, expiry_5d, expired)&lt;br/&gt;FK recipient_user_id uuid → app_user.id (notary)&lt;br/&gt;channel enum (email, in_app, both)&lt;br/&gt;status enum (pending, sent, read)&lt;br/&gt;ses_message_id text NULL&lt;br/&gt;sent_at timestamptz NULL&lt;br/&gt;created_at timestamptz NOT NULL" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#22543D;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="1912" y="1014" width="424" height="226" as="geometry"/></mxCell>
        <mxCell id="emoltab" value="&lt;b&gt;fee_schedule&lt;/b&gt;&lt;br/&gt;[fundamental — mutable — NEW R5]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#285E61;strokeColor=#234E52;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="104" y="1370" width="305" height="44" as="geometry"/></mxCell>
        <mxCell id="emoltab_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;description text (ex: CGJ-SP Fee Table 2026)&lt;br/&gt;source enum (cgj_sp_official_pdf, cgj_sp_official_csv, notary_manual)&lt;br/&gt;FK created_by_user_id uuid → app_user.id&lt;br/&gt;created_at, updated_at timestamptz NOT NULL&lt;br/&gt;version int NOT NULL default 1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#234E52;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="104" y="1414" width="305" height="210" as="geometry"/></mxCell>
        <mxCell id="emolver" value="&lt;b&gt;fee_schedule_version&lt;/b&gt;&lt;br/&gt;[weak — immutable on approval — NEW R5]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#285E61;strokeColor=#234E52;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="437" y="1370" width="305" height="44" as="geometry"/></mxCell>
        <mxCell id="emolver_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;FK fee_schedule_id uuid → fee_schedule.id&lt;br/&gt;version_number int&lt;br/&gt;status enum (draft, active, expired, superseded)&lt;br/&gt;effective_from date&lt;br/&gt;effective_until date NULL&lt;br/&gt;immutable_hash text (sha256 of all lines)&lt;br/&gt;source_document_s3_key text NULL&lt;br/&gt;FK approved_by_user_id uuid NULL → app_user.id&lt;br/&gt;approved_at timestamptz NULL&lt;br/&gt;created_at timestamptz NOT NULL" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#234E52;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="437" y="1414" width="305" height="210" as="geometry"/></mxCell>
        <mxCell id="emollin" value="&lt;b&gt;fee_schedule_line&lt;/b&gt;&lt;br/&gt;[weak — immutable — NEW R5]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#285E61;strokeColor=#234E52;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="770" y="1370" width="305" height="44" as="geometry"/></mxCell>
        <mxCell id="emollin_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;FK fee_schedule_version_id uuid → fee_schedule_version.id&lt;br/&gt;sort_order int&lt;br/&gt;act_code text&lt;br/&gt;act_description text&lt;br/&gt;value_range_min numeric(14,2)&lt;br/&gt;value_range_max numeric(14,2) NULL&lt;br/&gt;base_fee numeric(10,2)&lt;br/&gt;state_fund_amount numeric(10,2)&lt;br/&gt;fcdp_fee numeric(10,2)&lt;br/&gt;iss_rate numeric(5,4)&lt;br/&gt;notes text" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#234E52;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="770" y="1414" width="305" height="210" as="geometry"/></mxCell>
        <mxCell id="proc" value="&lt;b&gt;procedure&lt;/b&gt;&lt;br/&gt;[fundamental — mutable — NEW R5]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#6B46C1;strokeColor=#44337A;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="1154" y="1370" width="272" height="44" as="geometry"/></mxCell>
        <mxCell id="proc_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;slug text UNIQUE&lt;br/&gt;title text&lt;br/&gt;content_md text&lt;br/&gt;history jsonb (rolling 10 latest edits)&lt;br/&gt;FK current_author_user_id uuid → app_user.id&lt;br/&gt;is_active bool&lt;br/&gt;created_at, updated_at timestamptz NOT NULL&lt;br/&gt;version int NOT NULL default 1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#44337A;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="1154" y="1414" width="272" height="162" as="geometry"/></mxCell>
        <mxCell id="bill" value="&lt;b&gt;billing_event&lt;/b&gt;&lt;br/&gt;[fundamental — append-only — MODIFIED R5]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#C05621;strokeColor=#9C4221;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="1504" y="1370" width="832" height="44" as="geometry"/></mxCell>
        <mxCell id="bill_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;FK act_id uuid → act.id&lt;br/&gt;type enum (execution, amendment, cancellation)&lt;br/&gt;fee_amount numeric(10,2)&lt;br/&gt;iss_amount numeric(10,2)&lt;br/&gt;state_fund_amount numeric(10,2)&lt;br/&gt;stoix_revenue_amount numeric(10,2) (3.1% or R$ 7.50)&lt;br/&gt;FK act_template_version_id uuid → act_template_version.id (snapshot R5)&lt;br/&gt;act_template_version_hash text (snapshot R5)&lt;br/&gt;FK fee_schedule_version_id uuid → fee_schedule_version.id (snapshot R5)&lt;br/&gt;fee_schedule_version_hash text (snapshot R5)&lt;br/&gt;kb_consultations_snapshot jsonb → kb_version.id[] (array {kb_version_id, content_hash, relevance} — snapshot R5)&lt;br/&gt;executed_at timestamptz&lt;br/&gt;status enum (computed, invoiced, paid, contested)&lt;br/&gt;created_at timestamptz NOT NULL" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#9C4221;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="1504" y="1414" width="832" height="258" as="geometry"/></mxCell>
        <mxCell id="llmcall" value="&lt;b&gt;llm_call&lt;/b&gt;&lt;br/&gt;[weak — append-only — telemetry]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#4A5568;strokeColor=#2D3748;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="104" y="1820" width="424" height="44" as="geometry"/></mxCell>
        <mxCell id="llmcall_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;FK act_id uuid NULL → act.id&lt;br/&gt;FK kb_version_id uuid NULL → kb_version.id&lt;br/&gt;model text (claude-sonnet-4.5, claude-haiku-4.5, titan-embed-v2)&lt;br/&gt;type enum (flow_a_subagent, flow_b_fill, kbc_extract, kbc_embedding, rag_query)&lt;br/&gt;input_tokens int&lt;br/&gt;output_tokens int&lt;br/&gt;cache_read_tokens int&lt;br/&gt;latency_ms int&lt;br/&gt;created_at timestamptz NOT NULL" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#2D3748;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="104" y="1864" width="424" height="274" as="geometry"/></mxCell>
        <mxCell id="auditlog" value="&lt;b&gt;audit_event&lt;/b&gt;&lt;br/&gt;[materialized view — mirror of DDB]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#4A5568;strokeColor=#2D3748;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="556" y="1820" width="424" height="44" as="geometry"/></mxCell>
        <mxCell id="auditlog_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;ddb_event_id text&lt;br/&gt;event_at timestamptz&lt;br/&gt;event_name text (act.created, kb_version.approved, ...)&lt;br/&gt;FK actor_user_id uuid NULL → app_user.id&lt;br/&gt;FK act_id uuid NULL → act.id&lt;br/&gt;FK kb_version_id uuid NULL → kb_version.id&lt;br/&gt;previous_hash text&lt;br/&gt;current_hash text (system HMAC — no A3 in MVP)&lt;br/&gt;daily_merkle_root text NULL (root of the day)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#2D3748;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="556" y="1864" width="424" height="274" as="geometry"/></mxCell>
        <mxCell id="ragq" value="&lt;b&gt;rag_query&lt;/b&gt;&lt;br/&gt;[fundamental — append-only — NEW R5]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#4A5568;strokeColor=#2D3748;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="1008" y="1820" width="424" height="44" as="geometry"/></mxCell>
        <mxCell id="ragq_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;FK act_id uuid NULL → act.id&lt;br/&gt;query_type enum (flow_a_hermeneutic, flow_b_fill, kbc_manual_search)&lt;br/&gt;query_text_hash text (sha256 — no PII)&lt;br/&gt;embedding_model_used text&lt;br/&gt;k_requested int&lt;br/&gt;n_returned int&lt;br/&gt;chunks_returned jsonb (array {chunk_id → kb_chunk.id, score, category_id, weight, used_by_llm, final_position})&lt;br/&gt;search_latency_ms int&lt;br/&gt;rerank_latency_ms int&lt;br/&gt;mmr_applied bool&lt;br/&gt;created_at timestamptz NOT NULL" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#2D3748;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="1008" y="1864" width="424" height="274" as="geometry"/></mxCell>
        <mxCell id="ragfb" value="&lt;b&gt;rag_feedback&lt;/b&gt;&lt;br/&gt;[weak — append-only — NEW R5]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#4A5568;strokeColor=#2D3748;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="1460" y="1820" width="424" height="44" as="geometry"/></mxCell>
        <mxCell id="ragfb_attrs" value="&lt;b&gt;PK&lt;/b&gt; id uuid&lt;br/&gt;FK rag_query_id uuid → rag_query.id&lt;br/&gt;FK chunk_id uuid → kb_chunk.id&lt;br/&gt;signal enum (helpful, irrelevant, redundant)&lt;br/&gt;FK provided_by_user_id uuid → app_user.id&lt;br/&gt;note_text text NULL&lt;br/&gt;created_at timestamptz NOT NULL" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#2D3748;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="1460" y="1864" width="424" height="274" as="geometry"/></mxCell>
        <mxCell id="kbcfg" value="&lt;b&gt;rag_config&lt;/b&gt;&lt;br/&gt;[singleton — mutable — NEW R5]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#4A5568;strokeColor=#2D3748;fontColor=#FFFFFF;fontSize=12;fontStyle=1;align=center;verticalAlign=middle;strokeWidth=2" vertex="1" parent="1"><mxGeometry x="1912" y="1820" width="424" height="44" as="geometry"/></mxCell>
        <mxCell id="kbcfg_attrs" value="&lt;b&gt;PK&lt;/b&gt; id (always 1)&lt;br/&gt;embedding_model text default &#x27;amazon.titan-embed-text-v2&#x27;&lt;br/&gt;embedding_dim int default 1024&lt;br/&gt;hnsw_m int default 16&lt;br/&gt;hnsw_ef_search int default 40&lt;br/&gt;default_k int default 20&lt;br/&gt;default_n int default 5&lt;br/&gt;score_threshold numeric(4,3) default 0.300&lt;br/&gt;is_mmr_enabled bool default false&lt;br/&gt;mmr_lambda numeric(3,2) default 0.70&lt;br/&gt;config_per_query_type jsonb (override per Flow A/B/manual)&lt;br/&gt;FK reviewed_by_user_id uuid NULL → app_user.id&lt;br/&gt;last_reviewed_at timestamptz&lt;br/&gt;tuning_notes text NULL&lt;br/&gt;updated_at timestamptz NOT NULL&lt;br/&gt;version int NOT NULL default 1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#2D3748;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1"><mxGeometry x="1912" y="1864" width="424" height="274" as="geometry"/></mxCell>
        <mxCell id="notes" value="&lt;b&gt;Convenções de naming (CMMI L3 — defined process, baseline em ISO/IEC 11179 e DAMA-DMBOK):&lt;/b&gt;&lt;br/&gt;  • snake_case, inglês, nomes de tabela no singular  ·  PK = &#x27;id uuid&#x27; (UUID v7, ordenável)  ·  FK = &#x27;&lt;referenced_table&gt;_id&#x27; anotado com → tabela.id&lt;br/&gt;  • Booleans: prefixo &#x27;is_*&#x27; (ex: is_active, is_mfa_totp_enabled)  ·  Timestamps: sufixo &#x27;*_at&#x27; tz-aware (ex: created_at)  ·  Datas de vigência: &#x27;effective_from&#x27;/&#x27;effective_until&#x27;  ·  Enums: text + CHECK (portável)&lt;br/&gt;  • Tabelas mutáveis carregam audit columns: created_at, created_by_user_id, updated_at, updated_by_user_id, version int (optimistic lock).  Tabelas append-only (logs, snapshots) carregam apenas created_at.&lt;br/&gt;  • Reservadas: &#x27;user&#x27; → &#x27;app_user&#x27;.  Abreviações de domínio preservadas: s3, kms, kb, rag, lgpd, dpo, mfa, totp, ses, hmac, cpf/cnpj/iss (BR-specific).&lt;br/&gt;&lt;b&gt;Arquitetura R5:&lt;/b&gt;&lt;br/&gt;  1. RDS dedicado por tenant (db.t4g.micro multi-AZ). Banco: notary-{slug}-prd. Sem coluna tenant_id, sem RLS — isolamento físico.&lt;br/&gt;  2. KB cobre só normativos + jurisprudência. kb_category gerenciável pelo notary com weight (0–1) — RAG rerank por score × weight.&lt;br/&gt;  3. Fee schedule é módulo separado da KB (estrutural). Lookup exato por (act_code, value_range). Sem RAG na cobrança.&lt;br/&gt;  4. Modelos de ato vivem em act_template / act_template_version (catálogo CRUD textual). Sem entidade nova — só UI.&lt;br/&gt;  5. Procedure é wiki markdown plano com history rolling em jsonb (10 latest). Sem entidade de revisão dedicada.&lt;br/&gt;  6. billing_event guarda 3 snapshots imutáveis: act_template_version_id+hash, fee_schedule_version_id+hash, kb_consultations_snapshot jsonb. Reproduz cobrança em auditoria.&lt;br/&gt;  7. MVP back-office puro: sem ICP-Brasil, sem MNE, sem CENAD, sem OpenTimestamps. Auth = senha+MFA TOTP. Audit chain = HMAC do sistema (não A3) + Object Lock S3.&lt;br/&gt;  8. Defaults RAG são ponto de partida instrumentado. rag_config armazena parâmetros runtime (sem deploy). rag_query captura telemetria. rag_feedback (UI Fase 1.1) coleta sinal explícito. Refinamento a cada 30/90 dias.&lt;br/&gt;  9. act_party.tax_id (CPF/CNPJ) cifrado a nível de coluna com pgcrypto + KMS data key.&lt;br/&gt;  10. Embedding: amazon.titan-embed-text-v2 sa-east-1, dim 1024. Index pgvector HNSW (m=16, ef_construction=64, ef_search=40 runtime).&lt;br/&gt;**Convenção visual R5:** zero setas desenhadas. Cada FK é anotada com → table.column direto no atributo (ex: &#x27;FK act_template_id uuid → act_template.id&#x27;). Leitor segue a referência pelo nome, layout fica tabular e limpo." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF8DC;strokeColor=#D4AC0D;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=10;spacingRight=14" vertex="1" parent="1"><mxGeometry x="40" y="2240" width="2320" height="332" as="geometry"/></mxCell>
        <mxCell id="legend" value="Legenda Modelo R5  ·  Cores: Azul=Core, Verde=KBC, Turquesa=Emolumentos, Roxo=Procedimentos, Âmbar=Billing, Grafite=Telemetria  ·  Sem setas — relações são lidas direto na anotação do FK (&#x27;FK col uuid → tabela.id&#x27;). Convenção R5 pra layout tabular e limpo.  ·  Page 2400×2640  ·  Geração algorítmica (architecture/_generators/gen_07_data_model.py)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F5F5F5;strokeColor=#999;fontSize=11;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1"><mxGeometry x="40" y="2592" width="2320" height="60" as="geometry"/></mxCell>
      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="08-network-security" name="08-network-security">
    <mxGraphModel dx="1800" dy="1300" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1900" pageHeight="1600" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="Network &amp; Security R5 - Isolamento fisico por tenant" style="text;html=1;align=center;fontSize=22;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="40" width="1820" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="subtitle" value="Tenant isolation R5 e FISICO em DB+S3+KMS+realm. Nao ha RLS para explicar. Realm Keycloak + JWT claim sao a barreira. Auth = senha forte + MFA TOTP (sem ICP-Brasil). Hash chain HMAC + Object Lock 30y livro perpetuo." style="text;html=1;align=center;fontSize=14;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="40" y="80" width="1820" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="howread" value="&lt;b&gt;Como ler:&lt;/b&gt; Zonas concentricas - Zona 0 internet (vermelho), Zona 1 edge (azul), Zona 2 app (laranja), Zona 3 dados dedicados por tenant (vermelho intenso). Cada camada de tenant isolation listada na direita; numerada por nivel de defesa. Sem RLS porque nao ha schema compartilhado." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF8DC;strokeColor=#D4AC0D;fontSize=12;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="40" y="135" width="1820" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="z0" value="Zona 0 - Internet publica (nao confiavel)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FCEAEA;strokeColor=#DD344C;dashed=0;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#8B0000" vertex="1" parent="1">
          <mxGeometry x="80" y="220" width="1240" height="160" as="geometry"/>
        </mxCell>
        <mxCell id="usuarios" value="&lt;b&gt;Usuarios (Tabeliao, Escrevente, Admin, DPO)&lt;/b&gt;&lt;br/&gt;HTTPS TLS 1.3 + WebSocket WSS + senha forte + MFA TOTP (app authenticator)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;strokeColor=#D79B00;fontSize=12" vertex="1" parent="1">
          <mxGeometry x="120" y="270" width="540" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="ataques" value="&lt;b&gt;Atacantes potenciais&lt;/b&gt;&lt;br/&gt;OWASP Top 10, DDoS, credential stuffing, scraping, fraude documental" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FCEAEA;strokeColor=#DD344C;fontColor=#8B0000;fontSize=12" vertex="1" parent="1">
          <mxGeometry x="700" y="270" width="540" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="z1" value="Zona 1 - Edge AWS (compartilhada Stoix)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EAF2FB;strokeColor=#1F4E79;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="80" y="410" width="1240" height="180" as="geometry"/>
        </mxCell>
        <mxCell id="cf" value="&lt;b&gt;CloudFront + WAF + Shield Standard&lt;/b&gt;&lt;br/&gt;OWASP Top 10 rules, geo-restriction BR, rate limit 100 rps por IP, bot control" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="460" width="380" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="alb" value="&lt;b&gt;ALB internal&lt;/b&gt;&lt;br/&gt;HTTPS only, mTLS opcional, target group ECS&lt;br/&gt;injeta header X-Tenant-Slug do path /{slug}" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="520" y="460" width="380" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="kc" value="&lt;b&gt;Keycloak (compartilhado)&lt;/b&gt;&lt;br/&gt;OIDC issuer notary.stoix.com.br/realms/{slug}&lt;br/&gt;MFA TOTP obrigatorio (sem PKCS#11)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#3334B9;strokeColor=#1F1F8C;fontColor=#FFFFFF;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="920" y="460" width="380" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="z2" value="Zona 2 - Aplicacao (compartilhada com selecao por X-Tenant-Slug)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF7E6;strokeColor=#FF9900;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#7A4900" vertex="1" parent="1">
          <mxGeometry x="80" y="620" width="1240" height="220" as="geometry"/>
        </mxCell>
        <mxCell id="api" value="&lt;b&gt;API BFF (ECS Fargate)&lt;/b&gt;&lt;br/&gt;valida JWT (issuer+aud+claim realm), TenantResolver mapeia realm -&gt; conn pool RDS do tenant" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="670" width="380" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="workers" value="&lt;b&gt;Lambda workers&lt;/b&gt;&lt;br/&gt;tenant_slug em payload, sts:AssumeRole por tenant para acessar S3+KMS dedicados" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="520" y="670" width="380" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="kbcwk" value="&lt;b&gt;KB + Fee Schedule workers&lt;/b&gt;&lt;br/&gt;kb-extract, kb-vigencia, fee-schedule-extract. Mesmas restricoes IAM por tenant. Sem cross-tenant grants." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;strokeColor=#5C8A3E;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="920" y="670" width="380" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="vpcendp" value="VPC endpoints: S3 (gateway), KMS, Secrets, Bedrock, Textract - trafego nao sai pra internet" style="text;html=1;fontSize=11;fontColor=#7A4900;align=center" vertex="1" parent="1">
          <mxGeometry x="120" y="770" width="1180" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="z3" value="Zona 3 - Dados DEDICADOS por tenant (silo A2 - blast radius = 1 notary)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FCEAEA;strokeColor=#DD344C;dashed=0;strokeWidth=3;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#8B0000" vertex="1" parent="1">
          <mxGeometry x="80" y="870" width="1240" height="500" as="geometry"/>
        </mxCell>
        <mxCell id="rds" value="&lt;b&gt;RDS notary-{slug}-prd&lt;/b&gt;&lt;br/&gt;SG: ingress so de ECS+Lambda&lt;br/&gt;Cifragem at rest CMK do tenant&lt;br/&gt;pgvector HNSW + pgcrypto col-level&lt;br/&gt;app_party.tax_id cifrada (CPF/CNPJ)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="920" width="290" height="140" as="geometry"/>
        </mxCell>
        <mxCell id="s3uploads" value="&lt;b&gt;S3 notary-{slug}-uploads&lt;/b&gt;&lt;br/&gt;Documentos das partes&lt;br/&gt;Bucket Policy nega acesso fora do tenant role&lt;br/&gt;SSE-KMS CMK do tenant" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="430" y="920" width="290" height="140" as="geometry"/>
        </mxCell>
        <mxCell id="s3worm" value="&lt;b&gt;S3 notary-{slug}-livro-perpetuo&lt;/b&gt;&lt;br/&gt;Object Lock COMPLIANCE 30y&lt;br/&gt;Livro perpetuo (Lambda extensao)&lt;br/&gt;Documentos subsidiarios 10y" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="740" y="920" width="290" height="140" as="geometry"/>
        </mxCell>
        <mxCell id="s3kb" value="&lt;b&gt;S3 notary-{slug}-kb&lt;/b&gt;&lt;br/&gt;Knowledge Base normativa&lt;br/&gt;Versionamento ON&lt;br/&gt;Acesso so via kb-* workers + UI Tabeliao" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;strokeColor=#5C8A3E;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1050" y="920" width="250" height="140" as="geometry"/>
        </mxCell>
        <mxCell id="s3fee" value="&lt;b&gt;S3 notary-{slug}-fee-schedule&lt;/b&gt;&lt;br/&gt;Tabela emolumentos vigente&lt;br/&gt;Source para fee-schedule-extract-worker&lt;br/&gt;Versionamento ON, SSE-KMS" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#5DADE2;fontColor=#FFFFFF;strokeColor=#2874A6;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="1070" width="600" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="audit" value="&lt;b&gt;DynamoDB audit_log + hash chain&lt;/b&gt;&lt;br/&gt;PK = tenant_slug#timestamp; HMAC do sistema (SHA-256, secret KMS) encadeia eventos&lt;br/&gt;Object Lock S3 (Compliance 30y) ancora livro perpetuo - sem ICP-Brasil A3 signing" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;fontColor=#7A4900;strokeColor=#D79B00;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="740" y="1070" width="560" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="kms" value="&lt;b&gt;KMS CMK alias/notary-{slug}&lt;/b&gt;&lt;br/&gt;Key policy: principal = roles do tenant&lt;br/&gt;Multi-region keys OFF (sa-east-1 only)&lt;br/&gt;Rotacao anual + audit via CloudTrail&lt;br/&gt;Cifra: RDS, 4 buckets, Secrets, hash chain HMAC" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#DD344C;strokeColor=#B8001F;fontColor=#FFFFFF;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="120" y="1150" width="600" height="200" as="geometry"/>
        </mxCell>
        <mxCell id="secrets" value="&lt;b&gt;Secrets notary-{slug}/*&lt;/b&gt;&lt;br/&gt;rds-credentials (rot 30d)&lt;br/&gt;kb-config&lt;br/&gt;fee-schedule-config&lt;br/&gt;Cifrado por CMK do tenant&lt;br/&gt;Acesso so via IAM Role do tenant" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#DD344C;strokeColor=#B8001F;fontColor=#FFFFFF;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="740" y="1150" width="560" height="200" as="geometry"/>
        </mxCell>

        <mxCell id="iso" value="Camadas de tenant isolation R5" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F0F4F8;strokeColor=#08427B;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#08427B" vertex="1" parent="1">
          <mxGeometry x="1360" y="220" width="500" height="1150" as="geometry"/>
        </mxCell>
        <mxCell id="iso1" value="&lt;b&gt;Camada 1 - Realm Keycloak (senha + MFA TOTP)&lt;/b&gt;&lt;br/&gt;Usuario so existe em 1 realm (notary-{slug}). Login pra realm errado = NotFoundException. Auth = senha forte + TOTP. Sem PKCS#11/cert chain/CRL/OCSP." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#3334B9;fontColor=#FFFFFF;strokeColor=#1F1F8C;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1380" y="270" width="460" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="iso2" value="&lt;b&gt;Camada 2 - JWT claim realm&lt;/b&gt;&lt;br/&gt;API valida claim realm do JWT contra X-Tenant-Slug do path. Mismatch = 403. Tabeliao do notary-27sp nao ve dados do notary-rj01." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1380" y="380" width="460" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="iso3" value="&lt;b&gt;Camada 3 - TenantResolver + connection pool&lt;/b&gt;&lt;br/&gt;API mapeia tenant_slug -&gt; RDS endpoint do tenant. Bug em rota = no-op (nao acessa RDS de outro). Pool em memoria por tenant." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1380" y="490" width="460" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="iso4" value="&lt;b&gt;Camada 4 - IAM Role + sts:AssumeRole&lt;/b&gt;&lt;br/&gt;Workers Lambda assumem role do tenant antes de acessar S3+KMS+Secrets. Cross-tenant tentado = AccessDenied no AWS-side." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;fontColor=#000000;strokeColor=#D79B00;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1380" y="600" width="460" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="iso5" value="&lt;b&gt;Camada 5 - KMS Key Policy&lt;/b&gt;&lt;br/&gt;CMK do tenant tem principal explicito (so roles do tenant). Mesmo se IAM permitir, KMS nega Decrypt cross-tenant." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#DD344C;fontColor=#FFFFFF;strokeColor=#B8001F;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1380" y="710" width="460" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="iso6" value="&lt;b&gt;Camada 6 - Isolamento FISICO de RDS+S3 (4 buckets)&lt;/b&gt;&lt;br/&gt;Mesmo se TUDO acima falhasse, RDS e S3 buckets sao instancias diferentes. Sem rota de rede que conecte um RDS de tenant A a outro tenant. Sem schema compartilhado. 4 buckets por tenant: uploads, kb, fee-schedule, livro-perpetuo." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FCEAEA;fontColor=#8B0000;strokeColor=#DD344C;fontSize=11;strokeWidth=3" vertex="1" parent="1">
          <mxGeometry x="1380" y="820" width="460" height="140" as="geometry"/>
        </mxCell>
        <mxCell id="iso7" value="&lt;b&gt;Camada 7 - Audit DDB + HMAC chain por tenant&lt;/b&gt;&lt;br/&gt;PK = tenant_slug#timestamp. Hash chain HMAC-SHA256 por tenant (secret KMS). Object Lock S3 ancora chain (30y). Cross-tenant query = no rows. Sem A3 signing, sem OpenTimestamps." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;fontColor=#000000;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1380" y="970" width="460" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="isoNote" value="&lt;b&gt;R5 mantem isolamento fisico R4&lt;/b&gt;: realm + JWT + TenantResolver + IAM + KMS + RDS/S3 dedicados + DDB hash chain. Mudanca R5 = remover ICP-Brasil A3 / OpenTimestamps; auth fica senha+MFA TOTP; integridade fica HMAC + Object Lock 30y. Roadmap futuro (out of scope MVP): MNE/e-Notariado, CENAD, A3 signing." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF8DC;fontColor=#7A4900;strokeColor=#D4AC0D;fontSize=11;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="1380" y="1090" width="460" height="280" as="geometry"/>
        </mxCell>

        <mxCell id="ipsec" value="&lt;b&gt;Defesas adicionais R5&lt;/b&gt;&lt;br/&gt;CloudTrail multi-region OFF (so sa-east-1) + GuardDuty + AWS Config + Security Hub + Inspector ECR + IAM Access Analyzer. Logs de auth do Keycloak em CloudWatch + alertas anomalos para login falho/MFA bypass attempt. Rate limit por usuario no Keycloak. Sem cert chain validation, sem CRL/OCSP, sem ITI." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF8DC;strokeColor=#D4AC0D;fontSize=11;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="80" y="1390" width="1240" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="legend" value="&lt;b&gt;Legenda Network&amp;Security R5&lt;/b&gt;  Zona 0: internet (vermelho)  Zona 1: edge (azul)  Zona 2: app (laranja)  Zona 3: dados dedicados (vermelho intenso)  Caixa azul-escuro: identidade Keycloak (MFA TOTP)  Caixa vermelha: KMS/Secrets  Caixa verde: Knowledge Base  Caixa turquesa: Fee Schedule  Caixa amber: audit/hash chain HMAC + Object Lock 30y" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F5F5F5;strokeColor=#999;fontSize=11;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="80" y="1490" width="1780" height="40" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="09-observability" name="09-observability">
    <mxGraphModel dx="1800" dy="1300" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1900" pageHeight="1500" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="Observability R5 - AWS Managed + tags por tenant + sinais KB/RAG/Fee" style="text;html=1;align=center;fontSize=22;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="40" width="1820" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="subtitle" value="Tres pilares (logs, metricas, traces) + audit. Tags tenant=notary-{slug} em TUDO. OpenTelemetry SDK obrigatorio. Sinais R5: kbc.* + rag.query/rerank + fee-schedule-extract spans. Roteamento de alertas: SNS to Lambda router to ClickUp + SES (sem PagerDuty/Slack)." style="text;html=1;align=center;fontSize=14;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="40" y="80" width="1820" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="howread" value="&lt;b&gt;Como ler:&lt;/b&gt; (1) Sources (esquerda) - cada componente emite via OTel SDK. (2) Pipeline AWS Managed (meio). (3) Dashboards Grafana (direita) com filtro por tenant. (4) Alertas roteados via SNS to Lambda router to ClickUp tasks + SES email (Tabeliao). Toda metrica/log/trace tem dimensao tenant; queries Grafana usam {tenant=&quot;notary-27sp&quot;} para isolar visao por notary." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF8DC;strokeColor=#D4AC0D;fontSize=12;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="40" y="135" width="1820" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="sources" value="Sources (instrumentacao)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EAF2FB;strokeColor=#1F4E79;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="80" y="220" width="540" height="1080" as="geometry"/>
        </mxCell>
        <mxCell id="srcapi" value="&lt;b&gt;API BFF&lt;/b&gt; (ECS Fargate)&lt;br/&gt;OTel SDK + structured JSON logs&lt;br/&gt;Resource attrs: tenant=notary-{slug}, service=api-bff, env=prd" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="280" width="460" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="srcwk" value="&lt;b&gt;Lambda workers&lt;/b&gt;&lt;br/&gt;OTel SDK auto-instrumentation + custom spans por etapa (PII-strip, OCR, LLM, persist)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="380" width="460" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="srckbc" value="&lt;b&gt;KB workers + RAG (R5)&lt;/b&gt;&lt;br/&gt;Spans: kbc.upload, kbc.extract, kbc.diff_review, kbc.approval, kbc.indexing, rag.query (NEW), rag.rerank (NEW)&lt;br/&gt;Metrics: kb_extract_latency_ms, kb_approval_rate, rag_query_latency_ms, rag_chunks_used_avg" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;strokeColor=#5C8A3E;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="480" width="460" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="srckc" value="&lt;b&gt;Keycloak compartilhado&lt;/b&gt;&lt;br/&gt;Auth events com realm como tenant id&lt;br/&gt;Login success/failure, MFA TOTP challenge/verify, password reset por realm" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#3334B9;fontColor=#FFFFFF;strokeColor=#1F1F8C;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="600" width="460" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="srcrds" value="&lt;b&gt;RDS por tenant&lt;/b&gt;&lt;br/&gt;Performance Insights, Slow query log, pg_stat_statements&lt;br/&gt;Tag CloudWatch: tenant=notary-{slug}" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="700" width="460" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="srcaws" value="&lt;b&gt;AWS-managed integrations&lt;/b&gt;&lt;br/&gt;ALB access logs, CloudFront real-time logs, WAF logs, VPC Flow Logs, CloudTrail eventos por tenant" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="800" width="460" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="srcsynth" value="&lt;b&gt;Synthetic + RUM&lt;/b&gt;&lt;br/&gt;CloudWatch Synthetics canary por tenant (login + ato simples)&lt;br/&gt;CloudWatch RUM no SPA (UX core web vitals + erros JS)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="900" width="460" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="srcaud" value="&lt;b&gt;Audit DDB Streams&lt;/b&gt;&lt;br/&gt;DDB Stream -&gt; Lambda forwarder -&gt; CW Logs ImmutableTrail&lt;br/&gt;HMAC chain por tenant (sem OpenTimestamps tokens)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;strokeColor=#D79B00;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="1020" width="460" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="srcfee" value="&lt;b&gt;fee-schedule-extract-worker (R5)&lt;/b&gt;&lt;br/&gt;Spans: fee.upload, fee.extract, fee.diff_review, fee.approval (similar ao kb-extract)&lt;br/&gt;Metrics: fee_extract_latency_ms, fee_lines_extracted_count, fee_approval_rate" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#5DADE2;fontColor=#FFFFFF;strokeColor=#2874A6;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="120" y="1110" width="460" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="srcbiz" value="&lt;b&gt;Business telemetry&lt;/b&gt;&lt;br/&gt;acts_created_total, billing_events_total, kb_versions_active, kb_overdue_count, llm_calls_total, fee_lookups_total, rag_queries_total. All with dim tenant=notary-{slug}." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;strokeColor=#D79B00;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="1200" width="460" height="90" as="geometry"/>
        </mxCell>

        <mxCell id="pipe" value="Pipeline AWS Managed" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF7E6;strokeColor=#FF9900;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#7A4900" vertex="1" parent="1">
          <mxGeometry x="660" y="220" width="540" height="1080" as="geometry"/>
        </mxCell>
        <mxCell id="cwlogs" value="&lt;b&gt;CloudWatch Logs&lt;/b&gt;&lt;br/&gt;Log groups por servico+tenant&lt;br/&gt;Subscription filters -&gt; Lambda forwarders&lt;br/&gt;Retencao 30d hot, archive S3 7y" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="700" y="280" width="460" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="amp" value="&lt;b&gt;AWS Managed Prometheus (AMP)&lt;/b&gt;&lt;br/&gt;Metricas Prom + dim tenant&lt;br/&gt;Retencao 150d&lt;br/&gt;Recording rules: P95/P99 latency por tenant + por servico" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="700" y="400" width="460" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="xray" value="&lt;b&gt;AWS X-Ray&lt;/b&gt;&lt;br/&gt;Distributed traces&lt;br/&gt;Service map global + por tenant&lt;br/&gt;Sampling 100% para erros, 5% para success" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="700" y="520" width="460" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="cwa" value="&lt;b&gt;CloudWatch Alarms + EventBridge&lt;/b&gt;&lt;br/&gt;Alarme por tenant: error_rate &amp;gt; 1%, latency_p95 &amp;gt; 2s, queue_depth &amp;gt; 100, kb_overdue, fee_overdue, rag_score_avg &amp;lt; 0.30, llm_anomaly." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="700" y="640" width="460" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="cwsrec" value="&lt;b&gt;OpenSearch Service&lt;/b&gt;&lt;br/&gt;Logs full-text para investigacao&lt;br/&gt;Indices por tenant + retencao 30d&lt;br/&gt;Acesso so time Stoix support" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="700" y="760" width="460" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="kbcsig" value="&lt;b&gt;KB / RAG dedicated signals (R5)&lt;/b&gt;&lt;br/&gt;Feeds Dashboard KB Health + Dashboard X RAG Health: kb_versions_active, kb_overdue_count, kb_extract_latency_p95, kb_approval_rate_24h, rag_chunks_used_avg, rag_score_avg, rag_feedback_rate. Por tenant + global." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;strokeColor=#5C8A3E;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="700" y="880" width="460" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="cost" value="&lt;b&gt;Resource tagging por tenant&lt;/b&gt;&lt;br/&gt;Tag tenant=notary-{slug} em RDS, S3, Lambda, KMS, Bedrock, Textract, SES&lt;br/&gt;Permite atribuir uso de recursos por tenant para auditoria operacional" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;strokeColor=#D79B00;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="700" y="1020" width="460" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="router" value="&lt;b&gt;SNS to Lambda alert-router (R5)&lt;/b&gt;&lt;br/&gt;CW Alarms publicam em SNS topic. Lambda router consome e despacha:&lt;br/&gt;- ClickUp API: cria task em lista por severidade (TODOS os alertas)&lt;br/&gt;- AWS SES: email pro Tabeliao quando alerta e de dominio (kb_overdue, fee_overdue, approval pending)&lt;br/&gt;Sem PagerDuty, sem Slack." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FCEAEA;fontColor=#8B0000;strokeColor=#DD344C;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="700" y="1140" width="460" height="140" as="geometry"/>
        </mxCell>

        <mxCell id="dash" value="Dashboards &amp; Alert Routing" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EFF7E8;strokeColor=#5C8A3E;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#3F5E2A" vertex="1" parent="1">
          <mxGeometry x="1240" y="220" width="620" height="1080" as="geometry"/>
        </mxCell>
        <mxCell id="grafana" value="&lt;b&gt;AWS Managed Grafana&lt;/b&gt;&lt;br/&gt;DataSources: AMP, CloudWatch, X-Ray, OpenSearch&lt;br/&gt;Variavel global $tenant - todos os dashboards filtram por tenant=notary-{slug}" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1280" y="280" width="540" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="dash1" value="&lt;b&gt;Dashboard 1 - Notary Health (por tenant)&lt;/b&gt;&lt;br/&gt;acts_created/day, queue_depth, ocr_latency_avg, http_5xx_rate, kb_active_vs_overdue, fee_active_vs_overdue" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EFF7E8;strokeColor=#5C8A3E;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1280" y="400" width="540" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="dash2" value="&lt;b&gt;Dashboard 2 - SLO Stoix (multi-tenant)&lt;/b&gt;&lt;br/&gt;availability_slo 99.5%. error_budget_remaining. Top-10 tenants by error_rate / latency_p95." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EFF7E8;strokeColor=#5C8A3E;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1280" y="500" width="540" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="dash3" value="&lt;b&gt;Dashboard 3 - KB Health&lt;/b&gt;&lt;br/&gt;kb_extract_latency_p95 por tenant, kb_approval_rate_24h, kb_versions_active_count, kb_vigencia_alerts_pending, kb_overdue global, fee_extract_latency_p95, fee_lines_extracted_count" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;strokeColor=#5C8A3E;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1280" y="600" width="540" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="dashX" value="&lt;b&gt;Dashboard X - RAG Health (R5 NEW)&lt;/b&gt;&lt;br/&gt;Alimentado por rag.query / rag.rerank spans:&lt;br/&gt;- rag_chunks_used (avg/p50/p95) por tenant&lt;br/&gt;- rag_score_avg (cosine) histogram&lt;br/&gt;- rag_query_distribution_by_kb_category&lt;br/&gt;- rag_feedback_rate (via rag_feedback table)&lt;br/&gt;- rag_query_latency_p95, rag_threshold_misses_count" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;strokeColor=#5C8A3E;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1280" y="710" width="540" height="140" as="geometry"/>
        </mxCell>
        <mxCell id="dash5" value="&lt;b&gt;Dashboard 5 - Immutable Audit (DPO)&lt;/b&gt;&lt;br/&gt;Tenant events. DPO consulta UI, nao Grafana.&lt;br/&gt;HMAC chain validation status (sem OpenTimestamps tokens). Object Lock retention metrics." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EFF7E8;strokeColor=#5C8A3E;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1280" y="860" width="540" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="alerts" value="&lt;b&gt;Alert routing (R5)&lt;/b&gt;&lt;br/&gt;CW Alarms -&gt; SNS -&gt; Lambda alert-router -&gt;&lt;br/&gt;- ClickUp API: TASK em lista por severidade (RECEBE TUDO)&lt;br/&gt;- AWS SES: email pro Tabeliao quando alerta e de dominio (kb_overdue, fee_overdue, approval pending)&lt;br/&gt;Sem PagerDuty / Slack. Tag tenant no payload referencia runbook." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FCEAEA;strokeColor=#DD344C;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1280" y="960" width="540" height="140" as="geometry"/>
        </mxCell>
        <mxCell id="slo" value="&lt;b&gt;SLOs R5 (por tenant)&lt;/b&gt;&lt;br/&gt;api_availability 99.5% mensal&lt;br/&gt;api_latency_p95 &amp;lt; 800ms&lt;br/&gt;flow_B_end_to_end_p95 &amp;lt; 90s&lt;br/&gt;kb_extract_p95 &amp;lt; 5min, fee_extract_p95 &amp;lt; 5min&lt;br/&gt;rag_query_p95 &amp;lt; 1.5s, rag_score_avg &amp;gt; 0.45&lt;br/&gt;kb_approval_rate_24h &amp;gt; 70%" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF8DC;strokeColor=#D4AC0D;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1280" y="1110" width="540" height="160" as="geometry"/>
        </mxCell>

        <mxCell id="e1" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#1F4E79;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="srcapi" target="cwlogs">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e1_lbl" value="OTLP" style="text;html=1;fontSize=10;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="600" y="295" width="60" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="e2" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#1F4E79;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="srcwk" target="amp">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e2_lbl" value="metrics" style="text;html=1;fontSize=10;fontColor=#1F4E79;align=center" vertex="1" parent="1">
          <mxGeometry x="600" y="408" width="60" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="e3" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#5C8A3E;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="srckbc" target="kbcsig">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="640" y="528"/>
              <mxPoint x="640" y="940"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e3_lbl" value="kbc spans" style="text;html=1;fontSize=10;fontColor=#3F5E2A;align=center" vertex="1" parent="1">
          <mxGeometry x="600" y="940" width="80" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="e4" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#1F1F8C;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="srckc" target="cwlogs">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="640" y="640"/>
              <mxPoint x="640" y="330"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e4_lbl" value="auth events" style="text;html=1;fontSize=10;fontColor=#1F1F8C;align=center" vertex="1" parent="1">
          <mxGeometry x="600" y="335" width="100" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="e5" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#1F4E79;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="srcrds" target="amp">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e6" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#1F4E79;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="srcaws" target="cwlogs">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="640" y="840"/>
              <mxPoint x="640" y="350"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e7" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#1F4E79;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="srcsynth" target="cwa">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e8" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#D79B00;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="srcaud" target="cwsrec">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e9" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#D79B00;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="srcbiz" target="cost">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="ep1" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#5C8A3E;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="cwlogs" target="grafana">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ep1_lbl" value="data source" style="text;html=1;fontSize=10;fontColor=#3F5E2A;align=center" vertex="1" parent="1">
          <mxGeometry x="1180" y="300" width="100" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="ep2" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#5C8A3E;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="amp" target="grafana">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ep3" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#5C8A3E;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="xray" target="grafana">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ep4" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#DD344C;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="cwa" target="alerts">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ep5" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#5C8A3E;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="kbcsig" target="dash3">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ep6" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#5C8A3E;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="kbcsig" target="dashX">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ep6_lbl" value="rag spans" style="text;html=1;fontSize=10;fontColor=#3F5E2A;align=center" vertex="1" parent="1">
          <mxGeometry x="1180" y="780" width="80" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="ep7" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#2874A6;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="srcfee" target="kbcsig">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="640" y="1150"/>
              <mxPoint x="640" y="940"/>
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="ep7_lbl" value="fee.* spans" style="text;html=1;fontSize=10;fontColor=#1B4F72;align=center" vertex="1" parent="1">
          <mxGeometry x="600" y="1150" width="80" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="ep8" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#DD344C;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="cwa" target="router">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ep8_lbl" value="SNS topic" style="text;html=1;fontSize=10;fontColor=#8B0000;align=center" vertex="1" parent="1">
          <mxGeometry x="700" y="1145" width="80" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="ep9" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#DD344C;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="router" target="alerts">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ep9_lbl" value="ClickUp + SES" style="text;html=1;fontSize=10;fontColor=#8B0000;align=center" vertex="1" parent="1">
          <mxGeometry x="1180" y="1180" width="100" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="legend" value="&lt;b&gt;Legenda Obs R5&lt;/b&gt;  Azul: app/infra Stoix  Verde: KB + RAG + dashboards  Turquesa: Fee Schedule  Laranja: pipeline gerenciado AWS  Amarelo: business telemetry  Vermelho: alert routing (SNS to Lambda router to ClickUp + SES)  Tag tenant=notary-{slug} em TUDO permite filtrar Grafana, queries de log, alertas e SLOs por notary. Sem PagerDuty / Slack." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F5F5F5;strokeColor=#999;fontSize=11;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="80" y="1320" width="1780" height="70" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="10-cicd-pipeline" name="10-cicd-pipeline">
    <mxGraphModel dx="2200" dy="1500" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="2400" pageHeight="1500" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="CI/CD Pipeline R5 - Pulumi stack per tenant + inline AWS CLI commands" style="text;html=1;align=center;fontSize=22;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="40" width="2320" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="subtitle" value="Pipeline tem 3 tracks: app (codigo), infra-shared (1 stack), infra-tenant (N stacks). Onboarding novo notary = pulumi stack init + pulumi up + UAT do tabeliao + pulumi up prd. Cada gate tem comando concreto." style="text;html=1;align=center;fontSize=14;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="40" y="80" width="2320" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="howread" value="&lt;b&gt;Como ler:&lt;/b&gt; (1) Track 1 (App) - codigo branch pra main -&gt; CI -&gt; ECR -&gt; staging deploy. (2) Track 2 (Infra shared) - mudancas em pulumi/shared -&gt; preview -&gt; up. (3) Track 3 (Infra tenant) - onboarding ou upgrade per-tenant. (4) Gate adicional R5: Tabeliao do notary aprova UAT em hml antes de prd. (5) Comandos CLI/pulumi inline em cada gate." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF8DC;strokeColor=#D4AC0D;fontSize=12;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="40" y="135" width="2320" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="t1" value="Track 1 - App code (api-bff, lambda workers, web app)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EAF2FB;strokeColor=#1F4E79;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="80" y="240" width="2280" height="280" as="geometry"/>
        </mxCell>
        <mxCell id="t1pr" value="&lt;b&gt;PR opened&lt;/b&gt;&lt;br/&gt;branch -&gt; main" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="300" width="200" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t1prcmd" value="git push origin feat/x&#10;gh pr create" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F4E79;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="120" y="385" width="200" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="t1ci" value="&lt;b&gt;CI Github Actions&lt;/b&gt;&lt;br/&gt;tsc, eslint, vitest, pnpm test, Zod schema check, OWASP audit" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="380" y="300" width="240" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t1cicmd" value="pnpm install --frozen-lockfile&#10;pnpm test --coverage&#10;pnpm dlx audit-ci --high" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F4E79;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="380" y="385" width="240" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="t1build" value="&lt;b&gt;Build + Push ECR&lt;/b&gt;&lt;br/&gt;Images tagged with SHA + cosign signature" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="680" y="300" width="240" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t1buildcmd" value="aws ecr get-login-password | docker login -u AWS --password-stdin $ECR&#10;docker build -t $ECR/api-bff:$SHA .&#10;cosign sign --key awskms:///alias/cosign $ECR/api-bff:$SHA&#10;docker push $ECR/api-bff:$SHA" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F4E79;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="680" y="385" width="240" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="t1stg" value="&lt;b&gt;Deploy staging&lt;/b&gt;&lt;br/&gt;Auto on merge main" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="980" y="300" width="240" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t1stgcmd" value="aws ecs update-service --cluster stoix-shared-stg --service api-bff &#10;  --task-definition api-bff:$REV --force-new-deployment&#10;aws ecs wait services-stable --cluster stoix-shared-stg --services api-bff" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F4E79;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="980" y="385" width="240" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="t1e2e" value="&lt;b&gt;E2E synthetic&lt;/b&gt;&lt;br/&gt;Playwright login + simple act + KB upload em staging" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1280" y="300" width="240" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t1e2ecmd" value="pnpm playwright test --reporter=junit&#10;aws synthetics start-canary-run --name stoix-stg-canary&#10;aws synthetics get-canary-runs --name stoix-stg-canary" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F4E79;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1280" y="385" width="240" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="t1prom" value="&lt;b&gt;Promote candidate&lt;/b&gt;&lt;br/&gt;SHA tag promovido para hml/prd via Pulumi config" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1580" y="300" width="240" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t1promcmd" value="pulumi config set --stack stoix-shared-prd app:imageTag $SHA&#10;# tags imutaveis no ECR; nao re-build, so update da config" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F4E79;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1580" y="385" width="240" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="t1deploy" value="&lt;b&gt;Deploy hml + prd shared&lt;/b&gt;&lt;br/&gt;ECS rolling update&lt;br/&gt;Lambda update via update-function-code" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1880" y="300" width="380" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t1deploycmd" value="pulumi up --stack stoix-shared-prd --yes&#10;aws ecs update-service ... --force-new-deployment&#10;aws lambda update-function-code --function-name kb-extract-worker --image-uri $ECR/kb-extract-worker:$SHA" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F4E79;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1880" y="385" width="380" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="t2" value="Track 2 - Shared infra (pulumi/shared)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF7E6;strokeColor=#FF9900;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#7A4900" vertex="1" parent="1">
          <mxGeometry x="80" y="540" width="2280" height="220" as="geometry"/>
        </mxCell>
        <mxCell id="t2pr" value="&lt;b&gt;PR pulumi/shared&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="600" width="200" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="t2prcmd" value="pulumi preview --stack stoix-shared-prd --diff&#10;pulumi policy run aws-best-practices --stack ..." style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#7A4900;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="120" y="665" width="200" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="t2review" value="&lt;b&gt;Mandatory preview review&lt;/b&gt;&lt;br/&gt;Tech Lead + SRE sign-off" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="380" y="600" width="240" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="t2revcmd" value="gh pr review --approve --body 'preview validated'&#10;# CODEOWNERS exige 2 approvers para pulumi/" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#7A4900;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="380" y="665" width="240" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="t2hml" value="&lt;b&gt;Apply hml shared&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="680" y="600" width="240" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="t2hmlcmd" value="pulumi up --stack stoix-shared-hml --yes&#10;aws sts get-caller-identity # confirma role correto" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#7A4900;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="680" y="665" width="240" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="t2smoke" value="&lt;b&gt;Smoke test infra hml&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="980" y="600" width="240" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="t2smokecmd" value="aws ecs describe-clusters --clusters stoix-shared-hml&#10;aws elbv2 describe-target-health --target-group-arn $TG&#10;curl -fsS https://hml.stoix.com.br/health" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#7A4900;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="980" y="665" width="240" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="t2gate" value="&lt;b&gt;Human gate (CTO/CEO)&lt;/b&gt;&lt;br/&gt;Mudanca em shared afeta TODOS os tenants" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;strokeColor=#D79B00;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1280" y="600" width="240" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="t2gatecmd" value="# Slack approval ou GitHub environment protection&#10;gh deployment create --ref main --environment shared-prd" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#7A5A0E;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1280" y="665" width="240" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="t2prd" value="&lt;b&gt;Apply prd shared&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1580" y="600" width="240" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="t2prdcmd" value="pulumi up --stack stoix-shared-prd --yes&#10;aws cloudwatch describe-alarms --state-value ALARM" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#7A4900;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1580" y="665" width="240" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="t2note" value="&lt;b&gt;Mudancas em shared sao raras e cuidadosas - blast radius = 100% dos tenants&lt;/b&gt;" style="text;html=1;fontSize=11;fontColor=#8B0000;align=left;fontStyle=1;verticalAlign=middle;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="1880" y="600" width="380" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="t3" value="Track 3 - Per-tenant infra (pulumi/tenant) - onboarding e upgrades" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EFF7E8;strokeColor=#5C8A3E;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#3F5E2A" vertex="1" parent="1">
          <mxGeometry x="80" y="780" width="2280" height="320" as="geometry"/>
        </mxCell>

        <mxCell id="t3init" value="&lt;b&gt;Init tenant&lt;/b&gt;&lt;br/&gt;Operacao manual Stoix&lt;br/&gt;cria stack por env" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;strokeColor=#5C8A3E;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="840" width="220" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t3initcmd" value="pulumi stack init notary-27sp-hml&#10;pulumi stack init notary-27sp-prd&#10;pulumi config set tenant:slug 27sp&#10;pulumi config set tenant:notary_email tabeliao@27sp.com.br" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#3F5E2A;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="120" y="925" width="220" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="t3uphml" value="&lt;b&gt;pulumi up hml&lt;/b&gt;&lt;br/&gt;~12 min&lt;br/&gt;Cria RDS + 4 buckets + CMK + realm" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;strokeColor=#5C8A3E;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="400" y="840" width="240" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t3uphmlcmd" value="pulumi up --stack notary-27sp-hml --yes&#10;aws rds wait db-instance-available --db-instance-identifier notary-27sp-hml&#10;aws kms describe-key --key-id alias/notary-27sp" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#3F5E2A;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="400" y="925" width="240" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="t3seed" value="&lt;b&gt;Initial seed hml&lt;/b&gt;&lt;br/&gt;Postgres migrations + create realm + create Tabeliao user" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;strokeColor=#5C8A3E;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="700" y="840" width="240" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t3seedcmd" value="pnpm migrate:up --tenant notary-27sp-hml&#10;curl -X POST $KC/admin/realms ... # cria realm notary-27sp&#10;curl -X POST $KC/.../users ... # Tabeliao com email/senha + MFA TOTP" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#3F5E2A;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="700" y="925" width="240" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="t3uat" value="&lt;b&gt;UAT do Tabeliao em hml (R5)&lt;/b&gt;&lt;br/&gt;Tabeliao testa fluxos + sobe primeiras KB versions + aprova&lt;br/&gt;Gate obrigatorio antes de prd" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;strokeColor=#D79B00;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1000" y="840" width="280" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="t3uatcmd" value="# Tabeliao acessa hml.notary.stoix.com.br/27sp&#10;# UAT checklist:&#10;# - login email/senha + MFA TOTP&#10;# - upload KB: CGJ-SP emolumentos 2026&#10;# - aprovar kb_version&#10;# - executar Flow B end-to-end&#10;gh issue close 'UAT notary-27sp aprovado' --reason completed" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#7A5A0E;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1000" y="945" width="280" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="t3dpa" value="&lt;b&gt;DPA + DPIA assinados&lt;/b&gt;&lt;br/&gt;DPO valida.&lt;br/&gt;Gate juridico" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;strokeColor=#D79B00;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="1340" y="840" width="220" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t3dpacmd" value="# Anexos no contrato + checklist em ClickUp&#10;# Sem comando AWS - gate humano&#10;# Bloqueio: pulumi config set tenant:dpa_signed=true" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#7A5A0E;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1340" y="925" width="220" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="t3upprd" value="&lt;b&gt;pulumi up prd&lt;/b&gt;&lt;br/&gt;Cria infra dedicada do tenant em prd&lt;br/&gt;~12 min" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;strokeColor=#5C8A3E;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1620" y="840" width="240" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t3upprdcmd" value="# Pre-condicao: $UAT_OK == true &amp;&amp; $DPA_SIGNED == true&#10;pulumi up --stack notary-27sp-prd --yes&#10;aws rds describe-db-instances --db-instance-identifier notary-27sp-prd&#10;aws s3 ls | grep notary-27sp" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#3F5E2A;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1620" y="925" width="240" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="t3ga" value="&lt;b&gt;Go-live + observabilidade ativa&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;strokeColor=#5C8A3E;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1920" y="840" width="340" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t3gacmd" value="aws cloudwatch put-metric-alarm --alarm-name notary-27sp-error-rate ...&#10;aws synthetics create-canary --name notary-27sp-canary ...&#10;aws synthetics start-canary --name notary-27sp-canary&#10;# Tabeliao recebe email (SES) com URL prd e checklist Day-1" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#3F5E2A;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1920" y="925" width="340" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="t3upgrade" value="&lt;b&gt;Per-tenant upgrade&lt;/b&gt;&lt;br/&gt;Ex: subir RDS de db.t4g.micro para small. Ou aplicar nova KB migration. Sem afetar outros tenants." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EFF7E8;strokeColor=#5C8A3E;fontSize=11;align=left;spacingLeft=10;spacingTop=8;verticalAlign=top" vertex="1" parent="1">
          <mxGeometry x="120" y="1130" width="600" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t3upgradecmd" value="# upgrade isolado por tenant - bug em um nao afeta outros&#10;pulumi config set --stack notary-27sp-prd rds:instanceClass db.t4g.small&#10;pulumi up --stack notary-27sp-prd --yes" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#3F5E2A;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="740" y="1130" width="500" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t3rollback" value="&lt;b&gt;Per-tenant rollback&lt;/b&gt;&lt;br/&gt;pulumi state contem versao anterior. Restore RDS via snapshot." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FCEAEA;strokeColor=#DD344C;fontSize=11;align=left;spacingLeft=10;spacingTop=8;verticalAlign=top" vertex="1" parent="1">
          <mxGeometry x="1260" y="1130" width="400" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t3rollbackcmd" value="pulumi stack history --stack notary-27sp-prd&#10;pulumi up --stack notary-27sp-prd --target-replace ...&#10;aws rds restore-db-instance-from-db-snapshot ..." style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#8B0000;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1680" y="1130" width="580" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="ec1" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#1F4E79;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t1pr" target="t1ci">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ec2" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#1F4E79;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t1ci" target="t1build">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ec3" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#1F4E79;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t1build" target="t1stg">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ec4" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#1F4E79;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t1stg" target="t1e2e">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ec5" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#1F4E79;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t1e2e" target="t1prom">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ec6" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#1F4E79;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t1prom" target="t1deploy">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="ed1" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#7A4900;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t2pr" target="t2review">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ed2" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#7A4900;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t2review" target="t2hml">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ed3" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#7A4900;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t2hml" target="t2smoke">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ed4" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#7A4900;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t2smoke" target="t2gate">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ed5" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#7A4900;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t2gate" target="t2prd">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="ee1" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#3F5E2A;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t3init" target="t3uphml">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ee2" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#3F5E2A;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t3uphml" target="t3seed">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ee3" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#3F5E2A;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t3seed" target="t3uat">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ee4" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#D79B00;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t3uat" target="t3dpa">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ee4_lbl" value="aprovacao Tabeliao" style="text;html=1;fontSize=10;fontColor=#7A5A0E;align=center;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1280" y="820" width="180" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="ee5" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#3F5E2A;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t3dpa" target="t3upprd">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ee6" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#3F5E2A;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t3upprd" target="t3ga">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="legend" value="&lt;b&gt;Legenda CICD R5&lt;/b&gt;  Track 1 (azul): app code  Track 2 (laranja): shared infra  Track 3 (verde): per-tenant infra  Caixa Courier: comando real  Gate amarelo: aprovacao humana  Gate vermelho: rollback. R5: naming notary-{slug}; auth = email/senha + MFA TOTP (sem ICP-Brasil A3); UAT do Tabeliao gate obrigatorio antes de prd." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F5F5F5;strokeColor=#999;fontSize=11;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="80" y="1240" width="2280" height="60" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="11-disaster-recovery" name="11-disaster-recovery">
    <mxGraphModel dx="1800" dy="1300" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1900" pageHeight="1500" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="Disaster Recovery R5 - Arch A pure, per-tenant recovery, KMS sa-east-1 ONLY" style="text;html=1;align=center;fontSize=22;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="40" width="1820" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="subtitle" value="Multi-AZ in-region + S3 CRR cifrado por tenant. Sem failover ativo us-east-1. Cada tenant tem CRR independente; recovery e per-tenant. KMS exclusivo sa-east-1 mantido - cenario region failure = decadal aceito por contrato." style="text;html=1;align=center;fontSize=14;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="40" y="80" width="1820" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="howread" value="&lt;b&gt;Como ler:&lt;/b&gt; (1) Lado esquerdo - regiao primaria sa-east-1 com infra completa (shared + per-tenant). (2) Lado direito - regiao secundaria us-east-1 com APENAS S3 CRR cifrado. (3) Cenarios numerados 1-4 com RTO esperado e procedimento. (4) KMS multi-region keys OFF - chaves so existem em sa-east-1; em region failure decadal o cifrotexto fica em us-east-1 mas espera retorno do KMS." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF8DC;strokeColor=#D4AC0D;fontSize=12;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="40" y="135" width="1820" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="r1" value="Primary region - sa-east-1 (Sao Paulo) - PRD ACTIVE" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EAF2FB;strokeColor=#1F4E79;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="80" y="240" width="1100" height="500" as="geometry"/>
        </mxCell>

        <mxCell id="azs" value="Multi-AZ (sa-east-1a + sa-east-1b)" style="text;html=1;align=center;fontSize=12;fontStyle=1;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="100" y="290" width="500" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="ecs" value="ECS Fargate shared (2 AZ)&lt;br/&gt;api-bff + Keycloak + lambda workers" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#85BBF0;strokeColor=#5D82A8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="320" width="280" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="rdsstoix" value="RDS Stoix-Auth multi-AZ&lt;br/&gt;Auto AZ failover &amp;lt;1min" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#3334B9;fontColor=#FFFFFF;strokeColor=#1F1F8C;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="420" y="320" width="280" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="kmsprim" value="KMS sa-east-1 ONLY&lt;br/&gt;Multi-region keys OFF&lt;br/&gt;CMK per tenant" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#DD344C;strokeColor=#B8001F;fontColor=#FFFFFF;fontSize=11;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="720" y="320" width="280" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="tenantsbox" value="N tenants - cada um com infra dedicada multi-AZ" style="text;html=1;align=center;fontSize=12;fontStyle=1;fontColor=#3F5E2A" vertex="1" parent="1">
          <mxGeometry x="100" y="420" width="1060" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="tenant27" value="&lt;b&gt;notary-27sp-prd&lt;/b&gt;&lt;br/&gt;RDS multi-AZ (AZ failover &amp;lt;1min)&lt;br/&gt;4 buckets S3 (uploads, kb, fee-schedule, livro-perpetuo)&lt;br/&gt;CMK alias/notary-27sp" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;strokeColor=#5C8A3E;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="120" y="450" width="280" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="tenantrj" value="&lt;b&gt;notary-rj01-prd&lt;/b&gt;&lt;br/&gt;RDS multi-AZ&lt;br/&gt;4 buckets S3&lt;br/&gt;CMK alias/notary-rj01" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;strokeColor=#5C8A3E;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="420" y="450" width="280" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="tenantn" value="&lt;b&gt;notary-{slug}-prd&lt;/b&gt;&lt;br/&gt;...&lt;br/&gt;Cada tenant 100% isolado em DR&lt;br/&gt;Backup/restore independente" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A4C97A;strokeColor=#5C8A3E;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="720" y="450" width="280" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="snap" value="&lt;b&gt;Snapshots automaticos por tenant&lt;/b&gt;&lt;br/&gt;RDS: snapshot diario + transaction log continuo (PITR 7d)&lt;br/&gt;S3 versionamento + Object Lock (notary-{slug}-livro-perpetuo Compliance 30y; notary-{slug}-uploads/kb/fee-schedule = versioning + lifecycle TTL menor)&lt;br/&gt;DynamoDB audit_log PITR 35d + export S3 mensal (TTL 7y)&lt;br/&gt;Pulumi state em S3 com versionamento + DynamoDB lock" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;strokeColor=#D79B00;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="120" y="580" width="880" height="140" as="geometry"/>
        </mxCell>

        <mxCell id="r2" value="Secondary region - us-east-1 (N. Virginia) - S3 CRR ENCRYPTED ONLY" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FCEAEA;strokeColor=#DD344C;dashed=1;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#8B0000" vertex="1" parent="1">
          <mxGeometry x="1220" y="240" width="640" height="500" as="geometry"/>
        </mxCell>
        <mxCell id="us27" value="&lt;b&gt;S3 CRR per tenant (us-east-1)&lt;/b&gt;&lt;br/&gt;notary-27sp-uploads-dr&lt;br/&gt;notary-27sp-kb-dr&lt;br/&gt;notary-27sp-fee-schedule-dr&lt;br/&gt;notary-27sp-livro-perpetuo-dr (Object Lock 30y)&lt;br/&gt;Ciphertext only - KMS sa-east-1 nao acompanha" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;strokeColor=#D79B00;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1260" y="290" width="560" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="usrj" value="&lt;b&gt;S3 CRR notary-rj01-*-dr&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;strokeColor=#D79B00;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1260" y="410" width="560" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="usn" value="&lt;b&gt;S3 CRR notary-{slug}-*-dr (1 set per tenant)&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6CC;strokeColor=#D79B00;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1260" y="490" width="560" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="usnotes" value="&lt;b&gt;us-east-1 NAO tem:&lt;/b&gt;&lt;br/&gt;ECS, RDS, Lambda, Bedrock, Textract, Keycloak, Stoix KMS keys.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;us-east-1 SO tem:&lt;/b&gt; S3 ciphertext.&lt;br/&gt;Sem KMS local nao da pra decifrar - aguarda sa-east-1 voltar." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FCEAEA;strokeColor=#DD344C;fontColor=#8B0000;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="1260" y="570" width="560" height="160" as="geometry"/>
        </mxCell>

        <mxCell id="cen" value="Scenarios and RTO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F5F5F5;strokeColor=#444;dashed=0;strokeWidth=2;verticalAlign=top;align=left;spacingLeft=20;spacingTop=14;fontSize=14;fontStyle=1;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="80" y="770" width="1780" height="600" as="geometry"/>
        </mxCell>

        <mxCell id="c1" value="&lt;b&gt;Scenario 1 - AZ failure (rotineiro - 1-2x/ano)&lt;/b&gt;&lt;br/&gt;Impacto: parcial. Auto failover.&lt;br/&gt;Expected RTO: &amp;lt; 5 min, RPO ~ 0&lt;br/&gt;Tenants afetados: TODOS, simultaneamente, mas tempo curto." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EFF7E8;strokeColor=#5C8A3E;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="120" y="820" width="540" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="c1cmd" value="# Auto action:&#10;# - RDS multi-AZ failover (~30s)&#10;# - ECS Fargate task replacement (~1-2min)&#10;# - ALB health check remove targets degradados&#10;# Manual verification:&#10;aws rds describe-events --duration 60 --source-type db-instance&#10;aws ecs describe-services --cluster stoix-shared --services api-bff" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#3F5E2A;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="120" y="945" width="540" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="c2" value="&lt;b&gt;Scenario 2 - RDS failure of ONE tenant (corruption, bug query)&lt;/b&gt;&lt;br/&gt;Impacto: 1 notary. Outros tenants intactos.&lt;br/&gt;Expected RTO: 30-60 min&lt;br/&gt;RPO: ate 5 min (PITR)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF7E6;strokeColor=#FF9900;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="690" y="820" width="540" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="c2cmd" value="# PITR restore in the same tenant:&#10;aws rds restore-db-instance-to-point-in-time &#10;  --source-db-instance-identifier notary-27sp-prd &#10;  --target-db-instance-identifier notary-27sp-prd-restore &#10;  --restore-time 2026-05-07T14:00:00Z&#10;# Apos validacao, swap via Pulumi config + pulumi up" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#7A4900;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="690" y="945" width="540" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="c3" value="&lt;b&gt;Scenario 3 - Tenant compromise (wrong KB version approved / data leak)&lt;/b&gt;&lt;br/&gt;Impacto: 1 notary.&lt;br/&gt;RTO depende da extensao&lt;br/&gt;Acoes: rollback kb_version, restore S3 versionado, audit forensics no DynamoDB do tenant" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF7E6;strokeColor=#FF9900;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="1260" y="820" width="540" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="c3cmd" value="# Rollback kb_version no DB:&#10;UPDATE kb_version SET status='superseded' WHERE id=$BAD_VERSION;&#10;UPDATE kb_version SET status='active' WHERE id=$PREV_VERSION;&#10;# Restore S3 versioned:&#10;aws s3api list-object-versions --bucket notary-27sp-kb&#10;aws s3api copy-object --copy-source ...?versionId=$PREV ..." style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#7A4900;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="1260" y="945" width="540" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="c4" value="&lt;b&gt;Scenario 4 - Region failure sa-east-1 (cenario decadal)&lt;/b&gt;&lt;br/&gt;Impacto: TOTAL. Todos tenants offline.&lt;br/&gt;RTO: indeterminado (espera AWS recuperar sa-east-1)&lt;br/&gt;Cifrotexto S3 CRR esta em us-east-1, mas KMS sa-east-1 fora = sem decifragem.&lt;br/&gt;Aceito por contrato (Lei 8.935 nao exige RTO especifico)." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FCEAEA;strokeColor=#DD344C;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="120" y="1100" width="840" height="140" as="geometry"/>
        </mxCell>
        <mxCell id="c4cmd" value="# No failover command - aguardar sa-east-1 voltar.&#10;# Communication:&#10;# 1) Tabeliao notificado por email (SES) ou SMS (canal alternativo)&#10;# 2) Status page: status.stoix.com.br&#10;# 3) Quando sa-east-1 voltar:&#10;aws health describe-events --filter eventTypeCodes=AWS_REGION_DOWN&#10;aws rds describe-db-instances --db-instance-identifier notary-27sp-prd&#10;# Validar consistencia + act_instance.status pendentes -&gt; reprocessar SQS queues" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#8B0000;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="120" y="1245" width="840" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="c5" value="&lt;b&gt;Mandatory regular practice&lt;/b&gt;&lt;br/&gt;1) Per-tenant RDS restore drill every 90d (light chaos engineering)&lt;br/&gt;2) Quarterly AZ failover test em hml&lt;br/&gt;3) Monthly S3 versioning recovery test em hml&lt;br/&gt;4) Quarterly Pulumi state recovery test&lt;br/&gt;5) Monthly DynamoDB PITR test" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EAF2FB;strokeColor=#5D82A8;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="990" y="1100" width="810" height="140" as="geometry"/>
        </mxCell>
        <mxCell id="c5cmd" value="# Monthly restore drill (em hml):&#10;aws rds create-db-snapshot --db-instance-identifier notary-27sp-hml --db-snapshot-identifier drill-$(date +%F)&#10;aws rds restore-db-instance-from-db-snapshot --target ... # tempo cronometrado&#10;# Documentar tempo real em runbook + atualizar SLA contratual" style="text;html=1;fontSize=10;fontFamily=Courier New;fontColor=#1F4E79;align=left;verticalAlign=top;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="990" y="1245" width="810" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="er1" style="endArrow=classic;html=1;exitX=1;exitY=0.3;entryX=0;entryY=0.3;strokeWidth=2;strokeColor=#D79B00;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="tenant27" target="us27">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="er1_lbl" value="CRR encrypted - continuous replication" style="text;html=1;fontSize=10;fontColor=#7A5A0E;align=center" vertex="1" parent="1">
          <mxGeometry x="1010" y="430" width="240" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="er2" style="endArrow=classic;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#D79B00;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="tenantrj" target="usrj">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="er3" style="endArrow=classic;html=1;exitX=1;exitY=0.7;entryX=0;entryY=0.5;strokeWidth=1.5;strokeColor=#D79B00;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="tenantn" target="usn">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="legend" value="&lt;b&gt;Legenda DR R5&lt;/b&gt;  Verde claro: per-tenant dedicated  Azul: primary infra  Laranja: backup/replication  Vermelho: KMS/Secrets/region failure  Caixa Courier: comando real. R5: naming notary-{slug}; Object Lock 30y APENAS em notary-{slug}-livro-perpetuo; demais buckets = versioning + lifecycle TTL menor; KMS sa-east-1 ONLY mantido (cenario decadal aceito por contrato)." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F5F5F5;strokeColor=#999;fontSize=11;align=left;verticalAlign=middle;spacingLeft=14;spacingRight=14" vertex="1" parent="1">
          <mxGeometry x="80" y="1390" width="1780" height="60" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="00-mapa-do-sistema" name="00-mapa-do-sistema">
    <mxGraphModel dx="1600" dy="1000" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1600" pageHeight="1280" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="Mapa do Sistema — Stoix Cartorial (R5, MVP back-office)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=20;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1520" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="subtitle" value="Visão macro de todas as telas e seus 4 módulos (KB · Fee Schedule · Template Catalog · Procedure) — wireframe low-fi · ~39 telas" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="40" y="55" width="1520" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="login" value="01 Login&#10;(senha forte + MFA TOTP&#10;todos os perfis · Keycloak)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="700" y="100" width="200" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="lane-tabeliao" value="NOTARY (Tabelião — Lucas)" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#666;fontSize=12;fontStyle=1;startSize=24" vertex="1" parent="1">
          <mxGeometry x="40" y="200" width="500" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="lane-escrevente" value="CLERK (Escrevente — até 6)" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#666;fontSize=12;fontStyle=1;startSize=24" vertex="1" parent="1">
          <mxGeometry x="560" y="200" width="500" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="lane-dpo-admin" value="DPO / ADMIN" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#666;fontSize=12;fontStyle=1;startSize=24" vertex="1" parent="1">
          <mxGeometry x="1080" y="200" width="480" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="dash-tab" value="02 Dashboard Notary&#10;Métricas + atos pendentes&#10;de aprovação + alertas KB" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="80" y="250" width="180" height="70" as="geometry"/>
        </mxCell>

        <mxCell id="catalogo" value="08 Template Catalog&#10;Lista de act_template&#10;(versão, status)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="320" y="250" width="180" height="70" as="geometry"/>
        </mxCell>

        <mxCell id="fa-1" value="04 Fluxo A · 1&#10;Upload modelo&#10;(PDF/DOCX) ou derivar&#10;do Template Catalog" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="80" y="360" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="fa-2" value="05 Fluxo A · 2&#10;Revisão sugestões IA&#10;(LegalRefAgent → KB)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="320" y="360" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="fa-3" value="06 Fluxo A · 3&#10;Parâmetros e regras&#10;(variáveis + validações)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="80" y="450" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="fa-4" value="07 Fluxo A · 4&#10;Aprovação final&#10;(MFA TOTP + role check)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="320" y="450" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="kb-list" value="20 Knowledge Base&#10;Lista kb_document&#10;por kb_category" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d1fae5;strokeColor=#065f46;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="80" y="560" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="kb-cat" value="21 KB Categories&#10;CRUD kb_category&#10;(weight, vigência)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d1fae5;strokeColor=#065f46;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="320" y="560" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="kb-version" value="22 KB Document Detail&#10;Histórico kb_version,&#10;chunks, alertas vigência" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d1fae5;strokeColor=#065f46;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="80" y="650" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="kb-search" value="23 KB Manual Search&#10;Busca RAG (K=30, N=10)&#10;por normativos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d1fae5;strokeColor=#065f46;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="320" y="650" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="fee-list" value="24 Fee Schedule&#10;Tabela vigente&#10;CGJ-SP por linha" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ccfbf1;strokeColor=#0f766e;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="80" y="740" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="fee-version" value="25 Fee Schedule Versions&#10;Histórico fee_schedule_version&#10;effective_from/until" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ccfbf1;strokeColor=#0f766e;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="320" y="740" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="proc-list" value="26 Procedure Wiki&#10;Runbooks &amp; checklists&#10;markdown internos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f3e8ff;strokeColor=#6b21a8;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="80" y="830" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="proc-edit" value="27 Procedure Edit&#10;Editor markdown,&#10;history rolling jsonb" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f3e8ff;strokeColor=#6b21a8;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="320" y="830" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="rel-billing" value="15 Relatório Billing&#10;billing_event do mês&#10;(snapshots imutáveis)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fef3c7;strokeColor=#92400e;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="80" y="920" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="rel-sla" value="16 Relatório SLA&#10;Disponibilidade,&#10;CW alarms, ClickUp tasks" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e5e7eb;strokeColor=#374151;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="320" y="920" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="dash-escr" value="03 Dashboard Clerk&#10;Ação primária NOVO ATO&#10;+ fila de revisão" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="600" y="250" width="180" height="70" as="geometry"/>
        </mxCell>

        <mxCell id="fila-rev" value="13 Fila de Revisão&#10;act.status: draft /&#10;in_review / ready" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="840" y="250" width="180" height="70" as="geometry"/>
        </mxCell>

        <mxCell id="fb-1" value="09 Fluxo B · 1&#10;Selecionar act_template&#10;do catálogo" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="600" y="360" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="fb-2" value="10 Fluxo B · 2&#10;Upload act_attachment + OCR&#10;(Textract sa-east-1)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="840" y="360" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="fb-3" value="11 Fluxo B · 3&#10;Preench LLM (Bedrock)&#10;+ revisão campo a campo" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="600" y="450" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="fb-4" value="12 Fluxo B · 4&#10;Alertas e validações&#10;(act_party.tax_id cifrado)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="840" y="450" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="fb-5" value="14 Fluxo B · 5&#10;Minuta pronta para impressão&#10;e assinatura presencial&#10;(GERAR MINUTA)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="720" y="560" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="rag-feedback" value="28 RAG Feedback&#10;Histórico rag_query&#10;+ rag_feedback do clerk" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d1fae5;strokeColor=#065f46;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="600" y="650" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="proc-clerk" value="29 Procedure Wiki (Clerk)&#10;Consulta runbooks&#10;read-only" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f3e8ff;strokeColor=#6b21a8;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="840" y="650" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="config-cart" value="18 Configurações&#10;Notary, ambiente,&#10;5 integrações ativas" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1120" y="250" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="gest-users" value="17 Gestão app_user&#10;Papéis, permissões,&#10;reset MFA TOTP" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1340" y="250" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="dpo-area" value="19 Painel DPO / LGPD&#10;Eventos audit_event,&#10;incidentes (48h)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1120" y="340" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="lgpd-req" value="30 lgpd_request&#10;Acesso · retificação · exclusão&#10;portabilidade · anonimização" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1340" y="340" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="audit-trail" value="Audit trail&#10;(timeline lateral em cada act&#10;— audit_event append-only)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999;fontSize=10;dashed=1" vertex="1" parent="1">
          <mxGeometry x="1120" y="430" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="llm-calls" value="31 llm_call log&#10;Auditoria de chamadas&#10;Bedrock (cost, tokens)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1340" y="430" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="rag-config" value="32 RAG Config&#10;rag_config (K, N, threshold,&#10;ef_search por query type)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d1fae5;strokeColor=#065f46;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1120" y="520" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="kb-alerts" value="33 KB Alerts&#10;kb_alert: mudança de&#10;vigência detectada" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d1fae5;strokeColor=#065f46;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1340" y="520" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="legenda-cores" value="LEGENDA DE MÓDULOS (R5)&#10;Azul = Core (Template Catalog, Auth, Atos)&#10;Verde = Knowledge Base (RAG, normativos)&#10;Turquesa = Fee Schedule (CRUD estrutural)&#10;Roxo = Procedure (wiki markdown)&#10;Âmbar = Billing&#10;Grafite = Telemetria / SLA&#10;Pontilhado amarelo = nota lateral / não-tela" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1120" y="610" width="400" height="140" as="geometry"/>
        </mxCell>

        <mxCell id="roadmap-futuro" value="ROADMAP FUTURO (out of scope MVP)&#10;· ICP-Brasil A3 PKCS#11 plugin no Keycloak&#10;· MNE / e-Notariado (CNJ Res. 100/2020)&#10;· CENAD (selo digital de cópias)&#10;· OpenTimestamps (âncora externa)&#10;· Migração de dados do sistema legado&#10;· WhatsApp gateway · PagerDuty 24×7" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fef3c7;strokeColor=#b45309;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8;dashed=1" vertex="1" parent="1">
          <mxGeometry x="1120" y="770" width="400" height="140" as="geometry"/>
        </mxCell>

        <mxCell id="legenda-tec" value="STACK MVP (5 integrações ativas)&#10;Bedrock (Claude Sonnet/Haiku 4.5 + Titan Embed v2)&#10;Textract · SES · ClickUp API · GitHub OIDC&#10;Auth: Keycloak realm notary-{slug} + MFA TOTP&#10;DB tenant: notary-{slug}-prd · pgvector HNSW&#10;Buckets: notary-{slug}-{uploads,kb,fee-schedule,livro-perpetuo}" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1120" y="930" width="400" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="e1" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0" edge="1" parent="1" source="login" target="dash-tab">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e2" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0" edge="1" parent="1" source="login" target="dash-escr">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e3" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0" edge="1" parent="1" source="login" target="dpo-area">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="e4" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="dash-tab" target="catalogo">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e5" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="catalogo" target="fa-1">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e6" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="fa-1" target="fa-2">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e7" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="fa-2" target="fa-3">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e8" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="fa-3" target="fa-4">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e9" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="fa-4" target="catalogo">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="e-kb1" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="fa-2" target="kb-search">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e-kb2" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="dash-tab" target="kb-list">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e-kb3" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="kb-list" target="kb-cat">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e-kb4" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="kb-list" target="kb-version">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e-kb5" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="kb-list" target="kb-search">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="e-fee1" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="dash-tab" target="fee-list">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e-fee2" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="fee-list" target="fee-version">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="e-proc1" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="dash-tab" target="proc-list">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e-proc2" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="proc-list" target="proc-edit">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="e10" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="dash-escr" target="fb-1">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e11" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="fb-1" target="fb-2">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e12" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="fb-2" target="fb-3">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e13" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="fb-3" target="fb-4">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e14" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="fb-4" target="fb-5">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="e15" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="fb-3" target="fila-rev">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e16" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="fila-rev" target="fb-5">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="e-rag1" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="fb-3" target="rag-feedback">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e-procclerk" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="dash-escr" target="proc-clerk">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="e17" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="fb-5" target="rel-billing">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="e18" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="dash-tab" target="rel-billing">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e19" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="dash-tab" target="rel-sla">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e20" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="dash-tab" target="config-cart">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e21" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="dash-tab" target="gest-users">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="e-dpo1" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="dpo-area" target="lgpd-req">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e-dpo2" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="dpo-area" target="audit-trail">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e-dpo3" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="dpo-area" target="llm-calls">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e-dpo4" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="dpo-area" target="rag-config">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e-dpo5" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="dpo-area" target="kb-alerts">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="01-fluxo-a-cadastro-ato" name="01-fluxo-a-cadastro-ato">
    <mxGraphModel dx="1800" dy="1200" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1700" pageHeight="2400" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="Fluxo A — Cadastro Autônomo de Modelo de Ato (Notary)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1620" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="subtitle" value="Swimlanes: Notary · Sub-agentes IA (Bedrock) · Sistema · Template Catalog. Cada item gerado por IA passa por revisão humana. KB consultada via RAG (LegalRefAgent)." style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="40" y="55" width="1620" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="lane-tab" value="NOTARY (Tabelião)" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="100" width="1620" height="320" as="geometry"/>
        </mxCell>
        <mxCell id="lane-ia" value="SUB-AGENTES IA (Bedrock Claude Sonnet 4.5)" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="420" width="1620" height="320" as="geometry"/>
        </mxCell>
        <mxCell id="lane-sys" value="SISTEMA" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="740" width="1620" height="280" as="geometry"/>
        </mxCell>
        <mxCell id="lane-cat" value="TEMPLATE CATALOG" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="1020" width="1620" height="200" as="geometry"/>
        </mxCell>

        <mxCell id="start" value="Início" style="ellipse;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="100" y="200" width="80" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="t1" value="Notary abre&#10;Template Catalog →&#10;NOVO MODELO DE ATO" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="220" y="190" width="160" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="t-opcao" value="Opção A: upload PDF/DOCX vigente&#10;Opção B: derivar do Template Catalog&#10;(act_template_version base)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="420" y="180" width="200" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="t3" value="Revisa item-a-item&#10;sugestões IA&#10;(estrutura, cláusulas,&#10;refs normativas KB)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="800" y="190" width="160" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="t-decisao" value="Aceita?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1000" y="190" width="100" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="t-edita" value="Edita ou&#10;rejeita item" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1140" y="270" width="120" height="50" as="geometry"/>
        </mxCell>

        <mxCell id="t4" value="Define parâmetros&#10;(variáveis act_template)&#10;e regras de validação" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1140" y="190" width="160" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="t5" value="Preview final +&#10;MFA TOTP challenge +&#10;role check + PUBLICAR" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1340" y="190" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="ia1" value="StructureAgent&#10;sugere seções&#10;(qualificação, objeto,&#10;cláusulas, fechamento)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d1fae5;strokeColor=#065f46;fontSize=10;dashed=1" vertex="1" parent="1">
          <mxGeometry x="380" y="500" width="160" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="ia2" value="ClauseAgent&#10;extrai cláusulas-tipo&#10;e propõe redação&#10;parametrizada" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d1fae5;strokeColor=#065f46;fontSize=10;dashed=1" vertex="1" parent="1">
          <mxGeometry x="560" y="500" width="160" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="ia3" value="ParameterAgent&#10;identifica variáveis&#10;(nome, tax_id, valor,&#10;matrícula, endereço)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d1fae5;strokeColor=#065f46;fontSize=10;dashed=1" vertex="1" parent="1">
          <mxGeometry x="740" y="500" width="160" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="ia4" value="RuleAgent&#10;sugere validações&#10;e alertas&#10;(CPF, CNPJ, datas)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d1fae5;strokeColor=#065f46;fontSize=10;dashed=1" vertex="1" parent="1">
          <mxGeometry x="920" y="500" width="160" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="ia5" value="LegalRefAgent (RAG)&#10;consulta KB hermenêutica&#10;K=20, N=5 → traz NSCGJ,&#10;Provimentos, jurisprudência" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d1fae5;strokeColor=#065f46;fontSize=10;dashed=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="500" width="180" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="ia-note" value="IA gera apenas SUGESTÕES. Nada é aplicado sem aprovação humana. KB (RAG) usada só para enriquecer com normativos vigentes — sem PII." style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="380" y="600" width="900" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="sys1" value="Persiste arquivo em&#10;notary-{slug}-uploads&#10;e dispara sub-agentes IA&#10;(SQS llm-queue)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="560" y="800" width="180" height="70" as="geometry"/>
        </mxCell>
        <mxCell id="sys2" value="Persiste decisões&#10;humanas em audit_event&#10;(append-only, HMAC)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="900" y="800" width="160" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="sys3" value="Compila act_template_version&#10;(version N, content_hash,&#10;parâmetros, regras)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1140" y="800" width="180" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="sys4" value="Marca act_template&#10;como ATIVO + audit_event&#10;(approver_id, MFA proof)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1340" y="800" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="cat1" value="act_template disponível&#10;para Fluxo B (Clerks)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1340" y="1090" width="180" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="end" value="Fim" style="ellipse;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1560" y="1100" width="80" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="ed1" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="start" target="t1">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ed2" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t1" target="t-opcao">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ed3" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t-opcao" target="sys1">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ed4" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="sys1" target="ia1">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ed5" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="sys1" target="ia2">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ed6" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="sys1" target="ia3">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ed7" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="sys1" target="ia4">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ed7b" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="sys1" target="ia5">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="ed8" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="ia2" target="t3">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="ed9" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t3" target="t-decisao">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="ed10" value="Sim" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t-decisao" target="t4">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ed11" value="Não" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t-decisao" target="t-edita">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ed12" value="loop" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="t-edita" target="t3">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

        <mxCell id="ed13" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t3" target="sys2">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ed14" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t4" target="t5">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ed15" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t4" target="sys3">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ed16" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t5" target="sys4">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ed17" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="sys4" target="cat1">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="ed18" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="cat1" target="end">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="02-fluxo-b-execucao-ato" name="02-fluxo-b-execucao-ato">
    <mxGraphModel dx="1800" dy="1400" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1800" pageHeight="1400" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="Fluxo B — Execução de Ato (Clerk · OCR Textract + LLM Bedrock · modalidade in_person)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1720" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="subtitle" value="Swimlanes: Clerk · OCR · LLM · Sistema · Notary (auditoria post-fact). Geração da minuta = billing_event com 3 snapshots imutáveis." style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="40" y="55" width="1720" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="lane-esc" value="CLERK (Escrevente)" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="100" width="1720" height="240" as="geometry"/>
        </mxCell>
        <mxCell id="lane-ocr" value="OCR (AWS Textract sa-east-1)" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="340" width="1720" height="180" as="geometry"/>
        </mxCell>
        <mxCell id="lane-llm" value="LLM (Bedrock Claude Sonnet 4.5 + LegalRefAgent RAG K=15, N=3)" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="520" width="1720" height="180" as="geometry"/>
        </mxCell>
        <mxCell id="lane-sys" value="SISTEMA (regras, audit_event, billing_event)" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="700" width="1720" height="240" as="geometry"/>
        </mxCell>
        <mxCell id="lane-tab" value="NOTARY (auditoria)" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="940" width="1720" height="160" as="geometry"/>
        </mxCell>

        <mxCell id="start" value="Início" style="ellipse;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="100" y="200" width="80" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="e1" value="Dashboard Clerk&#10;NOVO ATO" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="220" y="200" width="120" height="50" as="geometry"/>
        </mxCell>
        <mxCell id="e2" value="Seleciona act_template&#10;(Template Catalog)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="380" y="200" width="140" height="50" as="geometry"/>
        </mxCell>
        <mxCell id="e3" value="Upload act_attachment&#10;das partes&#10;(RG, CPF, matrícula)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="560" y="195" width="140" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="e4" value="Revisa act_party&#10;extraído pela IA&#10;campo a campo" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="900" y="195" width="140" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="e-decisao" value="Alertas?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1080" y="200" width="100" height="50" as="geometry"/>
        </mxCell>
        <mxCell id="e5" value="Corrige campos&#10;ou complementa" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1080" y="270" width="120" height="50" as="geometry"/>
        </mxCell>
        <mxCell id="e6" value="Marca act como&#10;status=ready" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1240" y="200" width="120" height="50" as="geometry"/>
        </mxCell>
        <mxCell id="e7" value="Par revisa&#10;na fila" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1400" y="200" width="100" height="50" as="geometry"/>
        </mxCell>
        <mxCell id="e8" value="GERAR&#10;MINUTA FINAL" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1540" y="200" width="120" height="50" as="geometry"/>
        </mxCell>

        <mxCell id="ocr1" value="ocr-worker dispara&#10;Textract async&#10;(SQS ocr-queue)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffe4e6;strokeColor=#9f1239;fontSize=10;dashed=1" vertex="1" parent="1">
          <mxGeometry x="540" y="395" width="140" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="ocr2" value="Extrai texto estruturado&#10;por documento&#10;(KV blocks + Forms)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffe4e6;strokeColor=#9f1239;fontSize=10;dashed=1" vertex="1" parent="1">
          <mxGeometry x="700" y="395" width="160" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="llm1" value="llm-worker carrega&#10;OCR + act_template_version" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d1fae5;strokeColor=#065f46;fontSize=10;dashed=1" vertex="1" parent="1">
          <mxGeometry x="700" y="575" width="160" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="llm2" value="Popula variáveis&#10;e gera act_party&#10;(LegalRefAgent enriquece&#10;com KB K=15, N=3)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d1fae5;strokeColor=#065f46;fontSize=10;dashed=1" vertex="1" parent="1">
          <mxGeometry x="880" y="575" width="180" height="70" as="geometry"/>
        </mxCell>

        <mxCell id="llm-note" value="LLM faz proposta. Cada campo mostrado com badge 'sugestão IA' + confidence. KB consultations capturadas em rag_query para snapshot do billing_event." style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="680" y="655" width="700" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="s1" value="Cria act (status=draft,&#10;mode=in_person)&#10;audit_event: criado por X" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="360" y="775" width="180" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="s2" value="Aplica regras&#10;(act_party.tax_id cifrado&#10;pgcrypto + KMS data key)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="900" y="780" width="180" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="s3" value="Move na fila:&#10;status draft → in_review" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1240" y="780" width="140" height="50" as="geometry"/>
        </mxCell>
        <mxCell id="s4" value="Lookup exato em&#10;fee_schedule_version&#10;(act_code, value_range) →&#10;cria billing_event" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fef3c7;strokeColor=#92400e;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1420" y="775" width="180" height="70" as="geometry"/>
        </mxCell>
        <mxCell id="s5" value="billing_event grava 3 snapshots:&#10;act_template_version_id + hash&#10;fee_schedule_version_id + hash&#10;kb_consultations_snapshot jsonb" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fef3c7;strokeColor=#92400e;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1420" y="855" width="220" height="70" as="geometry"/>
        </mxCell>
        <mxCell id="s6" value="audit_event: minuta gerada,&#10;approver_id, timestamp,&#10;HMAC hash chain" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1180" y="855" width="200" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="t1" value="Painel Notary:&#10;atos do dia + alertas&#10;(post-fact, read-only)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1420" y="990" width="200" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="end" value="Fim&#10;(minuta pronta pra impressão&#10;e assinatura presencial)" style="ellipse;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1540" y="270" width="160" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="ed1" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="start" target="e1"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed2" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="e1" target="e2"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed3" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="e2" target="e3"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed4" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="e2" target="s1"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed5" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="e3" target="ocr1"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed6" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="ocr1" target="ocr2"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed7" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="ocr2" target="llm1"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed8" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="llm1" target="llm2"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed9" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="llm2" target="e4"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed10" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="e4" target="s2"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed11" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="e4" target="e-decisao"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed12" value="Sim" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="e-decisao" target="e5"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed13" value="loop" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="e5" target="e4"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed14" value="Não" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="e-decisao" target="e6"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed15" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="e6" target="s3"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed16" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="e6" target="e7"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed17" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="e7" target="e8"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed18" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="e8" target="s4"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed19" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="s4" target="s5"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed19b" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="s5" target="s6"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed20" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="s6" target="t1"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed21" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="e8" target="end"><mxGeometry relative="1" as="geometry"/></mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="03-fluxo-onboarding" name="03-fluxo-onboarding">
    <mxGraphModel dx="1400" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1600" pageHeight="980" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="Fluxo Onboarding — Provisionamento do Tenant + Setup dos 4 Módulos" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1520" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="subtitle" value="Setup conduzido pelo Admin Stoix junto com Notary. Tenant começa em HOMOLOGAÇÃO. D-1 dedicado a popular KB, Fee Schedule, Template Catalog e Procedure." style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="40" y="55" width="1520" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="lane-stoix" value="ADMIN STOIX" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="100" width="1520" height="220" as="geometry"/>
        </mxCell>
        <mxCell id="lane-tab" value="NOTARY (popular 4 módulos D-1)" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="320" width="1520" height="280" as="geometry"/>
        </mxCell>
        <mxCell id="lane-esc" value="CLERKS" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="600" width="1520" height="160" as="geometry"/>
        </mxCell>
        <mxCell id="lane-sys" value="SISTEMA" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="760" width="1520" height="180" as="geometry"/>
        </mxCell>

        <mxCell id="start" value="Início" style="ellipse;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="100" y="190" width="80" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="a1" value="Provisiona tenant via IaC&#10;(RDS notary-{slug}-prd,&#10;buckets notary-{slug}-*,&#10;modo HOMOLOGAÇÃO)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="220" y="170" width="200" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="a2" value="Cria realm Keycloak&#10;notary-{slug}, app_user&#10;inicial do Notary,&#10;envia convite via SES" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="450" y="170" width="200" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="a3" value="Carga inicial Fee Schedule:&#10;importa tabela CGJ-SP vigente&#10;(fee_schedule_version v1,&#10;effective_from definido)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ccfbf1;strokeColor=#0f766e;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="680" y="170" width="220" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="a4" value="Seed KB com normativos base:&#10;NSCGJ atual + Provimentos CGJ-SP&#10;(kb_extract-worker indexa em pgvector,&#10;kb_category com weight padrão)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d1fae5;strokeColor=#065f46;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="930" y="170" width="240" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="a5" value="Configura 5 integrações ativas:&#10;Bedrock · Textract · SES&#10;ClickUp (incidentes) · GitHub OIDC" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1200" y="170" width="240" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="t1" value="Aceita convite,&#10;define senha forte,&#10;ativa MFA TOTP&#10;(sem A3 / ICP-Brasil)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="220" y="380" width="180" height="70" as="geometry"/>
        </mxCell>
        <mxCell id="t2" value="Completa dados&#10;do cartório&#10;(CNPJ, endereço,&#10;DPO contato)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="430" y="380" width="180" height="70" as="geometry"/>
        </mxCell>
        <mxCell id="t3" value="Cria app_user dos&#10;clerks (até 6),&#10;atribui role,&#10;dispara MFA TOTP&#10;por user" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="640" y="380" width="180" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t4" value="Popula Template Catalog:&#10;cadastra act_template típicos&#10;(escritura, procuração, ata)&#10;via Fluxo A — em homologação" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="850" y="380" width="220" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t4b" value="Cria procedure inicial&#10;(opcional): runbooks&#10;internos do cartório&#10;em markdown" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f3e8ff;strokeColor=#6b21a8;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="850" y="480" width="220" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t5" value="Após validação,&#10;solicita migração&#10;HOMOL → PROD" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="380" width="180" height="70" as="geometry"/>
        </mxCell>

        <mxCell id="e1" value="Aceitam convite SES,&#10;definem senha + MFA TOTP" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="640" y="650" width="220" height="50" as="geometry"/>
        </mxCell>
        <mxCell id="e2" value="Tutorial guiado Fluxo B&#10;(ato simulado em HOMOL)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="880" y="650" width="220" height="50" as="geometry"/>
        </mxCell>

        <mxCell id="s1" value="Migra ambiente para PRODUÇÃO,&#10;ativa billing_event,&#10;ativa Object Lock S3 livro-perpetuo (30y)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fef3c7;strokeColor=#92400e;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1180" y="820" width="280" height="70" as="geometry"/>
        </mxCell>

        <mxCell id="end" value="Tenant operando&#10;em PRODUÇÃO" style="ellipse;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1330" y="380" width="140" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="ed1" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="start" target="a1"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed2" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="a1" target="a2"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed3" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="a2" target="a3"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed3b" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="a3" target="a4"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed3c" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="a4" target="a5"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed4" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="a2" target="t1"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed5" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t1" target="t2"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed6" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t2" target="t3"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed7" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t3" target="t4"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed7b" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="t4" target="t4b"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed8" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t3" target="e1"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed9" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="e1" target="e2"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed10" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t4" target="t5"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed11" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t5" target="s1"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed12" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="s1" target="end"><mxGeometry relative="1" as="geometry"/></mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="04-fluxo-billing-mensal" name="04-fluxo-billing-mensal">
    <mxGraphModel dx="1400" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="Fluxo Billing Mensal — Apuração via billing_event Snapshots Imutáveis" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1420" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="subtitle" value="Apuração: somar billing_event do mês em PRODUÇÃO. Cada evento já carrega snapshots imutáveis de act_template_version, fee_schedule_version e kb_consultations — reproduz cobrança sem depender da versão atual." style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="40" y="55" width="1420" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="lane-sys" value="SISTEMA (billing-worker)" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="100" width="1420" height="280" as="geometry"/>
        </mxCell>
        <mxCell id="lane-tab" value="NOTARY" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="380" width="1420" height="200" as="geometry"/>
        </mxCell>
        <mxCell id="lane-stoix" value="ADMIN STOIX / FINANCEIRO" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="580" width="1420" height="220" as="geometry"/>
        </mxCell>

        <mxCell id="start" value="Início&#10;(dia 1 do mês)" style="ellipse;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="100" y="200" width="100" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="s1" value="billing-worker coleta&#10;billing_event do mês&#10;(status=settled, ambiente=PROD)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fef3c7;strokeColor=#92400e;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="220" y="195" width="200" height="70" as="geometry"/>
        </mxCell>
        <mxCell id="s2" value="Cada billing_event já carrega:&#10;· fee_schedule_version_id + hash&#10;· act_template_version_id + hash&#10;· kb_consultations_snapshot jsonb&#10;Sem necessidade de relookup." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fef3c7;strokeColor=#92400e;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="450" y="180" width="240" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="s3" value="Soma valores dos&#10;snapshots imutáveis&#10;e gera prévia de fatura" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fef3c7;strokeColor=#92400e;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="730" y="195" width="180" height="70" as="geometry"/>
        </mxCell>
        <mxCell id="s4" value="Notifica Notary via SES&#10;(dashboard + email)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="950" y="195" width="180" height="70" as="geometry"/>
        </mxCell>

        <mxCell id="t1" value="Abre Relatório Billing&#10;(drill-down por billing_event,&#10;ver snapshots de cada cobrança)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="950" y="450" width="240" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="t-decisao" value="Concorda?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1210" y="455" width="100" height="50" as="geometry"/>
        </mxCell>
        <mxCell id="t-contesta" value="Contesta&#10;(cria task ClickUp&#10;via Lambda router)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1210" y="525" width="180" height="50" as="geometry"/>
        </mxCell>

        <mxCell id="adm1" value="Stoix analisa contestação&#10;via snapshots imutáveis&#10;(reproduz cobrança exata)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1210" y="640" width="200" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="adm2" value="Emite NF (Facilita Systems)&#10;e envia boleto via SES" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="950" y="640" width="200" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="adm3" value="Concilia pagamento e fecha mês&#10;(billing_event.status=paid)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="700" y="640" width="220" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="end" value="Fim&#10;(mês fechado)" style="ellipse;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="500" y="650" width="120" height="50" as="geometry"/>
        </mxCell>

        <mxCell id="ed1" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="start" target="s1"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed2" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="s1" target="s2"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed3" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="s2" target="s3"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed4" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="s3" target="s4"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed5" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="s4" target="t1"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed6" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t1" target="t-decisao"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed7" value="Sim" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t-decisao" target="adm2"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed8" value="Não" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t-decisao" target="t-contesta"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed9" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t-contesta" target="adm1"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed10" value="ajusta" style="endArrow=classic;html=1;rounded=0;dashed=1" edge="1" parent="1" source="adm1" target="adm2"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed11" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="adm2" target="adm3"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed12" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="adm3" target="end"><mxGeometry relative="1" as="geometry"/></mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="05-fluxo-incidente-lgpd" name="05-fluxo-incidente-lgpd">
    <mxGraphModel dx="1400" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="980" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="Fluxo Incidente LGPD — Detecção, Triagem e Notificação em 48h" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1420" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="subtitle" value="Detecção (auto via audit_event ou denúncia) → triagem DPO → lgpd_request → comunicação ANPD/titulares dentro de 48h. Trilha em audit_event append-only + HMAC chain." style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="40" y="55" width="1420" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="lane-sys" value="SISTEMA / DETECÇÃO (audit_event triggers, CW Alarms)" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="100" width="1420" height="200" as="geometry"/>
        </mxCell>
        <mxCell id="lane-dpo" value="DPO (lgpd_request: access · rectification · deletion · portability · anonymization)" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="300" width="1420" height="260" as="geometry"/>
        </mxCell>
        <mxCell id="lane-tab" value="NOTARY (co-controlador)" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="560" width="1420" height="160" as="geometry"/>
        </mxCell>
        <mxCell id="lane-anpd" value="ANPD / TITULARES (externo)" style="swimlane;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333;fontSize=12;fontStyle=1;startSize=24;horizontal=0" vertex="1" parent="1">
          <mxGeometry x="40" y="720" width="1420" height="160" as="geometry"/>
        </mxCell>

        <mxCell id="start" value="Evento&#10;detectado" style="ellipse;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="100" y="180" width="100" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="s1" value="Trigger automático em audit_event:&#10;acesso anômalo a act_party.tax_id,&#10;export massivo, falha auth repetida&#10;(CW Alarm → SNS → Lambda router)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="220" y="170" width="240" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="s2" value="Cria registro de incidente&#10;com timestamp imutável,&#10;notifica DPO via SES&#10;e abre task ClickUp" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="490" y="170" width="220" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="d1" value="DPO recebe alerta&#10;e abre painel LGPD" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="220" y="370" width="180" height="50" as="geometry"/>
        </mxCell>
        <mxCell id="d2" value="Triagem:&#10;classifica severidade&#10;(low / medium / high)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="430" y="370" width="180" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="d-decisao" value="Risco a&#10;titulares?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="640" y="370" width="120" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="d3" value="Documenta em audit_event&#10;(append-only, HMAC chain)&#10;sem notificação externa" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="640" y="460" width="200" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="d4" value="Cria lgpd_request&#10;(type: access/deletion/etc)&#10;e prepara comunicação&#10;ANPD + titulares" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="800" y="370" width="200" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="d4b" value="Ferramentas DPO via lgpd_request:&#10;· access — exporta dados do titular&#10;· rectification — corrige campo&#10;· deletion — exclui se base legal permite&#10;· portability — exporta em formato estruturado&#10;· anonymization — anonimiza act_party.tax_id" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=9;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="220" y="450" width="380" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="t1" value="Notary revisa e aprova&#10;via MFA TOTP&#10;(co-controlador)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="800" y="600" width="200" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="d5" value="Envia em até 48h da ciência&#10;(via SES email transacional)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1040" y="370" width="220" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="anpd" value="ANPD / titulares&#10;recebem comunicação" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#1e3a8a;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1040" y="780" width="220" height="50" as="geometry"/>
        </mxCell>

        <mxCell id="end1" value="Fim" style="ellipse;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="900" y="535" width="60" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="end2" value="Fim" style="ellipse;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1290" y="785" width="60" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="ed1" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="start" target="s1"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed2" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="s1" target="s2"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed3" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="s2" target="d1"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed4" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="d1" target="d2"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed5" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="d2" target="d-decisao"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed6" value="Não" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="d-decisao" target="d3"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed7" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="d3" target="end1"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed8" value="Sim" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="d-decisao" target="d4"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed9" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="d4" target="t1"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed10" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="t1" target="d5"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed11" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="d5" target="anpd"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ed12" style="endArrow=classic;html=1;rounded=0" edge="1" parent="1" source="anpd" target="end2"><mxGeometry relative="1" as="geometry"/></mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="01-login" name="01-login">
    <mxGraphModel dx="1400" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1300" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="01 — Tela de Login" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="800" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="env-bar" value="HOMOLOGAÇÃO  |  produção tem header neutro" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#333;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="28" as="geometry"/>
        </mxCell>

        <mxCell id="logo" value="[ Logo Stoix Cartorial ]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999;fontSize=12" vertex="1" parent="1">
          <mxGeometry x="540" y="160" width="200" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="cartorio-name" value="27º Tabelionato de Notas — São Paulo / SP" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="440" y="230" width="400" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="form-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="440" y="280" width="400" height="380" as="geometry"/>
        </mxCell>

        <mxCell id="form-title" value="Acessar a plataforma" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="460" y="295" width="360" height="25" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-email" value="E-mail funcional" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="460" y="335" width="360" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="inp-email" value="seu.nome@27notas.com.br" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="460" y="357" width="360" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-senha" value="Senha" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="460" y="405" width="360" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="inp-senha" value="••••••••••" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="460" y="427" width="320" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="show-pwd" value="ver" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="780" y="427" width="40" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-2fa" value="Código 2FA (6 dígitos)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="460" y="475" width="360" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="inp-2fa" value="000 000" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="460" y="497" width="360" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="btn-login" value="Entrar" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#333333;strokeColor=#333;fontColor=#ffffff;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="460" y="555" width="360" height="42" as="geometry"/>
        </mxCell>

        <mxCell id="forgot" value="Esqueci minha senha" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=4" vertex="1" parent="1">
          <mxGeometry x="460" y="610" width="360" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="footer" value="Stoix Cartorial · v1.0 · suporte@stoix.dev · LGPD: dpo@stoix.dev" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="40" y="820" width="1200" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="ann-1" value="ANOTAÇÕES UX&#10;1. Banner de ambiente sempre visível (laranja em homol., neutro em produção).&#10;2. 2FA é obrigatório para todos os perfis (Tabelião, Escrevente, DPO). Sistema cartorial = dados sensíveis LGPD.&#10;3. Sem 'lembrar de mim' — sessão sensível. Sessão expira em 30min de inatividade (suposição UX — validar).&#10;4. Microcopy: 'E-mail funcional' deixa claro que não é login pessoal — é vínculo com o cartório.&#10;5. 1 único formulário, sem etapas. Tabelião, Escrevente e DPO usam mesma tela; sistema redireciona ao dashboard correto." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="900" y="280" width="320" height="380" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="02-dashboard-tabeliao" name="02-dashboard-tabeliao">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="02 — Dashboard do Tabelião" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="800" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="search" value="[buscar] buscar ato, parte, nº protocolo..." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;spacingLeft=8;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="400" y="76" width="380" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="sidebar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="200" height="744" as="geometry"/>
        </mxCell>
        <mxCell id="nav1" value="▣  Dashboard" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=none;fontSize=11;align=left;spacingLeft=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="130" width="200" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="nav2" value="[catalogo]  Catálogo de atos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="170" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav3" value="[lista]  Atos em execução" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="206" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav4" value="[graph]  Relatórios" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="242" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav5" value="[users]  Usuários" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="278" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav6" value="⚙  Configurações" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="314" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav7" value="[shield]  LGPD / DPO" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="350" width="200" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="welcome" value="Bom dia, Lucas. Hoje é 06/05/2026." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="130" width="500" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="kpi1" value="MINUTAS NO MÊS&#10;47" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="260" y="180" width="220" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="kpi1-sub" value="produção · ↑ 12 vs mês anterior" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="272" y="250" width="200" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="kpi2" value="EMOLUMENTO ACUMULADO&#10;R$ 142.380,00" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="500" y="180" width="220" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="kpi2-sub" value="estimativa billing Stoix: R$ 4.413,78" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="512" y="250" width="200" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="kpi3" value="FILA DE REVISÃO&#10;6" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="740" y="180" width="220" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="kpi3-sub" value="3 prontos p/ lavratura" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="752" y="250" width="200" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="kpi4" value="ALERTAS&#10;2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="980" y="180" width="220" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="kpi4-sub" value="1 LGPD · 1 SLA" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="992" y="250" width="200" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="sec1-title" value="Tipos de ato pendentes da sua aprovação (Fluxo A)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="310" width="600" height="25" as="geometry"/>
        </mxCell>

        <mxCell id="card1" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="345" width="940" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="card1-name" value="Escritura de Venda e Compra com Cláusula Resolutiva — v2 (rascunho)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="276" y="356" width="700" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="card1-meta" value="38 sugestões IA · 12 cláusulas · 24 parâmetros · iniciado 04/05" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="276" y="378" width="700" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="card1-cta" value="Continuar revisão →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#333333;strokeColor=#333;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1050" y="370" width="140" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="card2" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="435" width="940" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="card2-name" value="Procuração para Adquirir Imóvel — v1 (pronto p/ aprovação)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="276" y="446" width="700" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="card2-meta" value="14 cláusulas aceitas · 11 parâmetros · pronto há 2 dias" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="276" y="468" width="700" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="card2-cta" value="Aprovar e publicar →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#333333;strokeColor=#333;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1050" y="460" width="140" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="sec2-title" value="Atividade recente do cartório" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="540" width="600" height="25" as="geometry"/>
        </mxCell>

        <mxCell id="act-list" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="575" width="940" height="240" as="geometry"/>
        </mxCell>

        <mxCell id="act-1" value="14h32 · Maria S. (escrevente) gerou minuta — Escritura de V&amp;C — protocolo #2026-0473" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="276" y="585" width="900" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="act-2" value="14h08 · João P. (escrevente) marcou pronto p/ revisão — Procuração Geral — protocolo #2026-0472" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="276" y="613" width="900" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="act-3" value="13h47 · OCR processou 4 documentos — protocolo #2026-0473" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="276" y="641" width="900" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="act-4" value="11h12 · Você publicou Doação c/ Reserva de Usufruto v1 no catálogo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="276" y="669" width="900" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="act-5" value="09h54 · DPO marcou incidente #003 como concluído (sem risco a titulares)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="276" y="697" width="900" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX&#10;1. Squint test: KPIs no topo (4 cards horizontais) — Tabelião vê em 2s o estado do mês.&#10;2. Ações pendentes do Tabelião com CTA forte — não é só relatório.&#10;3. Atividade recente substitui notificações intrusivas — feed cronológico, sem badges piscantes.&#10;4. Sidebar é a mesma para Tabelião e Escrevente, mas com itens condicionais por papel.&#10;5. Pílula HOMOLOGAÇÃO no header é o lembrete persistente." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1260" y="120" width="220" height="320" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="03-dashboard-escrevente" name="03-dashboard-escrevente">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <mxCell id="c2" value="03 - Dashboard do Escrevente" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="800" height="30" as="geometry"/>
        </mxCell>
        <mxCell id="c3" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>
        <mxCell id="c4" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="c5" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="c6" value="PRODUCAO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#666666;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="c7" value="buscar protocolo, parte, CPF... (atalho /)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999999;fontSize=10;align=left;spacingLeft=8;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="380" y="76" width="400" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="c8" value="Maria S. (Escrevente) v" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1050" y="78" width="180" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="c9" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333333" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="200" height="744" as="geometry"/>
        </mxCell>
        <mxCell id="c10" value="Dashboard" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=none;fontSize=11;align=left;spacingLeft=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="130" width="200" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="c11" value="Fila de revisao" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="170" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="c12" value="Catalogo" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="206" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="c13" value="Meus atos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="242" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="c14" value="+ NOVO ATO (atalho N)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#333333;strokeColor=#333333;fontColor=#ffffff;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="140" width="280" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="c15" value="Atalho: tecle N em qualquer tela" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="260" y="220" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="c16" value="MEUS ATOS DE HOJE: 5" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999999;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="560" y="140" width="200" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="c17" value="A REVISAR (parceiros): 3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999999;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="780" y="140" width="200" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="c18" value="COM ALERTA: 1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999999;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="1000" y="140" width="200" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="c19" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999999" vertex="1" parent="1">
          <mxGeometry x="260" y="260" width="940" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="c20" value="MEUS ATOS (5)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999999;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="260" width="160" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="c21" value="A REVISAR (3)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="420" y="260" width="160" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="c22" value="TODOS DO CARTORIO (12)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="580" y="260" width="200" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="c23" value="filtrar v" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999999;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1120" y="270" width="70" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="c24" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999999" vertex="1" parent="1">
          <mxGeometry x="260" y="300" width="940" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="c25" value="PROTOCOLO" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="260" y="300" width="120" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="c26" value="TIPO DE ATO" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="380" y="300" width="280" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="c27" value="STATUS" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="660" y="300" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="c28" value="ATUALIZADO" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="820" y="300" width="120" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="c29" value="ACOES" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="940" y="300" width="240" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="c30" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999999" vertex="1" parent="1">
          <mxGeometry x="260" y="332" width="940" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c31" value="#2026-0473" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="260" y="332" width="120" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c32" value="Escritura de Venda e Compra c/ Clausula Resolutiva" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="380" y="332" width="280" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c33" value="EM REVISAO (par)" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="660" y="332" width="160" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c34" value="ha 12 min" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="820" y="332" width="120" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c35" value="Abrir" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#666666;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="940" y="338" width="80" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="c36" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999999" vertex="1" parent="1">
          <mxGeometry x="260" y="376" width="940" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c37" value="#2026-0470" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="260" y="376" width="120" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c38" value="Procuracao para Adquirir Imovel" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="380" y="376" width="280" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c39" value="RASCUNHO" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="660" y="376" width="160" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c40" value="ha 1h" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="820" y="376" width="120" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c41" value="Continuar" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#666666;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="940" y="382" width="100" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="c42" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="260" y="420" width="940" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c43" value="#2026-0468" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="420" width="120" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c44" value="Doacao c/ Reserva de Usufruto" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="380" y="420" width="280" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c45" value="2 ALERTAS" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="660" y="420" width="160" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c46" value="ha 3h" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="820" y="420" width="120" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c47" value="Resolver" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#cc6600;strokeColor=#cc6600;fontColor=#ffffff;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="940" y="426" width="100" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="c48" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999999" vertex="1" parent="1">
          <mxGeometry x="260" y="464" width="940" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c49" value="#2026-0461" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="260" y="464" width="120" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c50" value="Hipoteca em garantia de emprestimo" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="380" y="464" width="280" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c51" value="PRONTO P/ LAVRATURA" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="660" y="464" width="160" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c52" value="ontem" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="820" y="464" width="120" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="c53" value="Ver minuta" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#666666;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="940" y="470" width="110" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="c54" value="ANOTACOES UX&#10;1. CTA NOVO ATO e a acao primaria - botao grande e atalho N. Escrevente faz 5-15x por dia.&#10;2. Tabs MEUS / A REVISAR / TODOS. Default: MEUS.&#10;3. Linha com alerta destacada em laranja.&#10;4. Status: rascunho / em revisao / pronto - acessivel.&#10;5. Pilula PRODUCAO neutra. Em homol. seria laranja.&#10;6. Sem modal de boas-vindas - vai direto a fila.&#10;7. Sem sidebar de Configuracoes/LGPD - escrevente nao tem acesso." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999999;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1260" y="120" width="220" height="420" as="geometry"/>
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="04-fluxo-a-01-novo-ato-upload-modelo" name="04-fluxo-a-01-novo-ato-upload-modelo">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="04 — Fluxo A · Passo 1 · Novo tipo de ato — Upload do modelo vigente" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1200" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe0b2;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="Catálogo / Novo tipo de ato" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="300" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas T. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1050" y="78" width="180" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="sidebar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="200" height="744" as="geometry"/>
        </mxCell>
        <mxCell id="nav1" value="▣  Dashboard" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="130" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav2" value="[catalogo]  Catálogo de atos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=none;fontSize=11;align=left;spacingLeft=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="166" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav3" value="[lista]  Fila do cartório" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="202" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav4" value="[graph]  Relatórios" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="238" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav5" value="[users]  Usuários" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="274" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav6" value="⚙  Configurações" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="310" width="200" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="stepper" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="140" width="940" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step1" value="● 1. Upload modelo" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="140" width="200" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step2" value="○ 2. Revisar sugestões IA" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="460" y="140" width="220" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step3" value="○ 3. Parâmetros e regras" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="680" y="140" width="220" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step4" value="○ 4. Aprovar e publicar" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="900" y="140" width="220" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="form-title" value="Identificação do tipo de ato" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="280" y="220" width="400" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-nome" value="Nome do tipo de ato *" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="280" y="252" width="300" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="inp-nome" value="ex: Escritura de Venda e Compra c/ Cláusula Resolutiva" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="280" y="272" width="600" height="34" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-fam" value="Família" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="280" y="316" width="300" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="inp-fam" value="Escrituras imobiliárias  ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="280" y="336" width="290" height="34" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-onda" value="Onda do MVP" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="590" y="316" width="300" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="inp-onda" value="Onda 1  ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="590" y="336" width="290" height="34" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-desc" value="Descrição interna (uso dos escreventes)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="280" y="380" width="500" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="inp-desc" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10;verticalAlign=top;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="280" y="400" width="600" height="64" as="geometry"/>
        </mxCell>

        <mxCell id="upload-title" value="Modelo vigente" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="280" y="490" width="400" height="30" as="geometry"/>
        </mxCell>
        <mxCell id="btn-import-kbc" value="[catalogo]  Importar modelo do KBC →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;fontColor=#1F4E79;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="620" y="488" width="260" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="upload-help" value="Faça upload do modelo PDF/DOCX que o cartório usa hoje, OU importe um modelo já aprovado na sua Knowledge Base Cartorial. Os sub-agentes de IA hermenêuticos analisarão a estrutura, cláusulas-tipo e variáveis e proporão sugestões — você revisa item-a-item no próximo passo." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="280" y="525" width="600" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="dropzone" value="[ Arraste arquivos aqui ou clique para selecionar ]&#10;PDF ou DOCX · até 20 MB cada · até 5 arquivos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=12;dashed=1;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="280" y="566" width="600" height="140" as="geometry"/>
        </mxCell>

        <mxCell id="file1" value="[doc] escritura_venda_compra_v2024.docx · 84 KB · ✓ enviado" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="280" y="716" width="600" height="28" as="geometry"/>
        </mxCell>

        <mxCell id="btn-cancel" value="Cancelar" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="780" y="780" width="100" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-rascunho" value="Salvar como rascunho" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="890" y="780" width="160" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-next" value="Analisar com IA →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#333333;strokeColor=#333;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1060" y="780" width="140" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX&#10;1. Stepper de 4 passos no topo, sempre visível. Permite voltar mas não pular.&#10;2. Pílula HOMOLOGAÇÃO em laranja — Tabelião está montando catálogo, ainda não publicado em produção.&#10;3. Botão primário escuro &quot;Analisar com IA&quot; deixa explícito que IA será acionada após este passo (gera expectativa correta).&#10;4. &quot;Salvar como rascunho&quot; sempre disponível — cadastrar ato é trabalho longo, persistência é crucial.&#10;5. Drop-zone com instruções claras de formato e tamanho — evita erros de upload.&#10;6. Família e Onda permitem agrupamento posterior no catálogo.&#10;7. Microcopy: &quot;modelo vigente&quot; (linguagem cartorial) em vez de &quot;template&quot;." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1260" y="120" width="220" height="440" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="05-fluxo-a-02-revisao-sugestoes-ia" name="05-fluxo-a-02-revisao-sugestoes-ia">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="05 — Fluxo A · Passo 2 · Revisão das sugestões dos sub-agentes IA (item-a-item)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1200" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe0b2;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="Catálogo / Escritura V&amp;C c/ Cláusula Resolutiva / Revisão IA" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="500" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas T. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1050" y="78" width="180" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="stepper" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="1200" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step1" value="✓ 1. Upload" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="280" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step2" value="● 2. Revisar sugestões IA" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="320" y="116" width="280" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step3" value="○ 3. Parâmetros e regras" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="600" y="116" width="320" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step4" value="○ 4. Aprovar e publicar" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="920" y="116" width="320" height="44" as="geometry"/>
        </mxCell>

        <mxCell id="left-col" value="Estrutura proposta&#10;[Painel hierárquico das seções do ato]&#10;✓ Cabeçalho&#10;✓ Qualificação das partes&#10;◐ Objeto (em revisão)&#10;○ Preço e forma de pagamento&#10;○ Cláusula resolutiva&#10;○ Declarações fiscais&#10;○ Outorga e aceitação&#10;○ Encerramento&#10;[Subagentes processaram 8 seções]&#10;[3 cláusulas-tipo identificadas]&#10;[12 variáveis sugeridas]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="60" y="180" width="240" height="660" as="geometry"/>
        </mxCell>

        <mxCell id="counter" value="Sugestão 3 de 27" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="320" y="180" width="200" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="badge-ia" value="◆ SUGESTÃO IA · agente Estrutural" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8eaf6;strokeColor=#666;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="320" y="212" width="240" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="badge-confiance" value="confiança: alta · 93%" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#666;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="570" y="212" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="badge-fonte" value="extraído do modelo · pág. 2" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#666;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="740" y="212" width="200" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="card-title" value="Cláusula-tipo: Objeto da escritura" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="320" y="244" width="600" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="card-body" value="Por meio do presente instrumento, o(a) VENDEDOR(A) {{nome_vendedor}}, já qualificado(a), TRANSFERE e CEDE ao(à) COMPRADOR(A) {{nome_comprador}}, já qualificado(a), o imóvel matriculado sob nº {{matricula_imovel}} no {{cartorio_registro_imoveis}}, com a área de {{area_m2}} m², situado em {{endereco_imovel}}, livre e desembaraçado de quaisquer ônus, exceto os declarados a seguir.&#10;[6 variáveis identificadas — verificar no Passo 3]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=12;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="320" y="276" width="900" height="180" as="geometry"/>
        </mxCell>

        <mxCell id="diff-title" value="Diff vs. modelo enviado" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="320" y="466" width="300" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="diff-body" value="• Removido &quot;sito à&quot; (português arcaico) → &quot;situado em&quot; (sugestão de modernização)&#10;• Adicionada variável {{cartorio_registro_imoveis}} antes ausente&#10;• Removida menção fixa &quot;19º RI&quot; — substituída por variável" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="320" y="490" width="900" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="action-bar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="320" y="586" width="900" height="64" as="geometry"/>
        </mxCell>
        <mxCell id="btn-aceitar" value="✓ Aceitar  (A)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#333333;strokeColor=#333;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="340" y="600" width="160" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-editar" value="✎ Editar  (E)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="510" y="600" width="160" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-rejeitar" value="✗ Rejeitar  (R)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="680" y="600" width="160" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-coment" value="[chat] Comentar" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="850" y="600" width="120" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-pular" value="Pular  (→)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1080" y="600" width="120" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="progress-title" value="Progresso da revisão" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="320" y="666" width="300" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="progress-bar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="320" y="688" width="900" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="progress-fill" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#666666;strokeColor=#666" vertex="1" parent="1">
          <mxGeometry x="320" y="688" width="80" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="progress-lbl" value="2 aceitas  ·  0 editadas  ·  0 rejeitadas  ·  25 pendentes" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="320" y="712" width="600" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="btn-back" value="← Voltar" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="320" y="780" width="100" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-rascunho" value="Salvar rascunho" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="900" y="780" width="160" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-next" value="Próximo passo →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#cccccc;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1080" y="780" width="140" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-next-help" value="(habilitado quando todas as sugestões forem revisadas)" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="800" y="820" width="420" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX&#10;1. UX item-a-item (não &quot;aceitar tudo&quot;) é exigência contratual: revisão humana de cada sugestão.&#10;2. Atalhos A/E/R no teclado — Tabelião revisa 27 itens, velocidade conta.&#10;3. Badge ◆ SUGESTÃO IA + nome do agente que sugeriu (Estrutural / Cláusulas / Variáveis / Validação) — transparência.&#10;4. Confiança e fonte (página do PDF) reduzem opacidade.&#10;5. Diff vs modelo original mostra exatamente o que mudou — Tabelião não fica desconfiado de mudanças invisíveis.&#10;6. Editar abre o card em modo texto livre — Tabelião pode reescrever.&#10;7. Coluna esquerda mostra árvore — permite navegação não-linear.&#10;8. Botão &quot;Próximo passo&quot; só habilita após 100% das sugestões revisadas — força fechamento." style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=9;align=left;verticalAlign=top" vertex="1" parent="1">
          <mxGeometry x="40" y="820" width="280" height="20" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="06-fluxo-a-03-parametros-regras" name="06-fluxo-a-03-parametros-regras">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="06 — Fluxo A · Passo 3 · Parâmetros (variáveis) e regras de validação" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1200" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe0b2;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas T. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1050" y="78" width="180" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="stepper" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="1200" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step1" value="✓ 1. Upload" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="280" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step2" value="✓ 2. Revisar sugestões IA" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="320" y="116" width="280" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step3" value="● 3. Parâmetros e regras" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="600" y="116" width="320" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step4" value="○ 4. Aprovar e publicar" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="920" y="116" width="320" height="44" as="geometry"/>
        </mxCell>

        <mxCell id="tabs" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="60" y="180" width="1180" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="tab1" value="Parâmetros (12)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="180" width="180" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="tab2" value="Regras de validação (8)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="240" y="180" width="220" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="tab3" value="Alertas (5)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="460" y="180" width="160" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="thead" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="220" width="1160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th1" value="VARIÁVEL" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="220" width="240" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th2" value="LABEL VISÍVEL AO ESCREVENTE" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="300" y="220" width="280" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th3" value="TIPO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="580" y="220" width="140" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th4" value="FONTE / OCR" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="720" y="220" width="180" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th5" value="OBRIG." style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="900" y="220" width="80" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th6" value="AÇÕES" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="980" y="220" width="160" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="r1" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="252" width="1160" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r1c1" value="{{nome_vendedor}}" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="60" y="252" width="240" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r1c2" value="Nome do vendedor" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="300" y="252" width="280" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r1c3" value="Texto" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="580" y="252" width="140" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r1c4" value="OCR · RG/CNH" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="720" y="252" width="180" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r1c5" value="✓" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="900" y="252" width="80" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r1c6" value="Editar  ·  Remover" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="980" y="252" width="160" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="r2" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="292" width="1160" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r2c1" value="{{cpf_vendedor}}" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="60" y="292" width="240" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r2c2" value="CPF do vendedor" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="300" y="292" width="280" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r2c3" value="CPF (validado)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="580" y="292" width="140" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r2c4" value="OCR · RG/CPF" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="720" y="292" width="180" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r2c5" value="✓" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="900" y="292" width="80" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r2c6" value="Editar  ·  Remover" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="980" y="292" width="160" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="r3" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="332" width="1160" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r3c1" value="{{matricula_imovel}}" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="60" y="332" width="240" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r3c2" value="Matrícula do imóvel" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="300" y="332" width="280" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r3c3" value="Texto + nº cartório RI" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="580" y="332" width="140" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r3c4" value="OCR · matrícula" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="720" y="332" width="180" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r3c5" value="✓" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="900" y="332" width="80" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r3c6" value="Editar  ·  Remover" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="980" y="332" width="160" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="r4" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="372" width="1160" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r4c1" value="{{valor_imovel}}" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="60" y="372" width="240" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r4c2" value="Valor da venda (R$)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="300" y="372" width="280" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r4c3" value="Moeda BRL" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="580" y="372" width="140" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r4c4" value="manual (escrevente)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="720" y="372" width="180" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r4c5" value="✓" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="900" y="372" width="80" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r4c6" value="Editar  ·  Remover" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="980" y="372" width="160" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="r-more" value="[ + 8 variáveis... ]" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="412" width="240" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="btn-add-var" value="+ Adicionar variável" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="60" y="452" width="180" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="rules-title" value="Regras de validação atuais (preview)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="510" width="500" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="rule-card1" value="◆ Sugerida pela IA · Validação CPF&#10;SE {{cpf_vendedor}} inválido → bloquear avanço&#10;Mensagem: &quot;CPF do vendedor é inválido. Confira o documento.&quot;&#10;[Aceitar] [Editar] [Rejeitar]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="60" y="540" width="380" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="rule-card2" value="◆ Sugerida pela IA · Conferência matrícula&#10;SE {{matricula_imovel}} não existe no RI integrado → ALERTA (não bloqueia)&#10;Mensagem: &quot;Matrícula não localizada — confira manualmente.&quot;&#10;[Aceitar] [Editar] [Rejeitar]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="460" y="540" width="380" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="rule-card3" value="◆ Sugerida pela IA · Coerência partes&#10;SE {{cpf_vendedor}} == {{cpf_comprador}} → BLOQUEIO&#10;Mensagem: &quot;Vendedor e comprador não podem ser a mesma pessoa.&quot;&#10;[Aceitar] [Editar] [Rejeitar]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="860" y="540" width="380" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="btn-add-rule" value="+ Adicionar regra manualmente" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="60" y="676" width="240" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="btn-back" value="← Voltar" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="60" y="800" width="100" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-rascunho" value="Salvar rascunho" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="900" y="800" width="160" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-next" value="Aprovação final →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#333333;strokeColor=#333;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1080" y="800" width="160" height="36" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="07-fluxo-a-04-aprovacao-final-publicacao" name="07-fluxo-a-04-aprovacao-final-publicacao">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="07 — Fluxo A · Passo 4 · Aprovação final e publicação no catálogo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1200" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe0b2;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas T. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1050" y="78" width="180" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="stepper" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="1200" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step1" value="✓ 1. Upload" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="280" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step2" value="✓ 2. Revisar sugestões IA" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="320" y="116" width="280" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step3" value="✓ 3. Parâmetros e regras" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="600" y="116" width="320" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step4" value="● 4. Aprovar e publicar" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="920" y="116" width="320" height="44" as="geometry"/>
        </mxCell>

        <mxCell id="preview-title" value="Pré-visualização do template" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="180" width="400" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="preview-body" value="ESCRITURA PÚBLICA DE VENDA E COMPRA COM CLÁUSULA RESOLUTIVA&#10;Aos {{data_lavratura}}, perante mim, Tabelião do 27º Tabelionato de Notas da Capital de São Paulo, compareceram:&#10;OUTORGANTE VENDEDOR: {{nome_vendedor}}, brasileiro(a), portador(a) do RG nº {{rg_vendedor}} e inscrito(a) no CPF sob nº {{cpf_vendedor}}, residente em {{endereco_vendedor}}.&#10;OUTORGADO COMPRADOR: {{nome_comprador}}, brasileiro(a), portador(a) do RG nº {{rg_comprador}} e inscrito(a) no CPF sob nº {{cpf_comprador}}, residente em {{endereco_comprador}}.&#10;Por este instrumento e na forma da lei, declaram, livres e conscientes, o que segue:&#10;CLÁUSULA 1ª — OBJETO&#10;Por meio do presente instrumento, o(a) VENDEDOR(A), já qualificado(a), TRANSFERE e CEDE ao(à) COMPRADOR(A), o imóvel matriculado sob nº {{matricula_imovel}} no {{cartorio_registro_imoveis}}, com a área de {{area_m2}} m², situado em {{endereco_imovel}}, livre e desembaraçado de quaisquer ônus.&#10;CLÁUSULA 2ª — PREÇO&#10;O valor da presente venda é de R$ {{valor_imovel}} ({{valor_imovel_extenso}}), pago [...]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="60" y="210" width="700" height="500" as="geometry"/>
        </mxCell>

        <mxCell id="preview-paginate" value="página 1 de 4  ·  ← anterior  ·  próxima →" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="60" y="714" width="700" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="resumo-title" value="Resumo do tipo de ato" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="800" y="180" width="400" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="resumo-card" value="Nome:&#10;Escritura de Venda e Compra c/ Cláusula Resolutiva&#10;Família: Escrituras imobiliárias&#10;Onda: 1&#10;Versão: v1 (será publicada)&#10;Sugestões IA revisadas: 27 / 27&#10;  · 22 aceitas&#10;  · 4 editadas&#10;  · 1 rejeitada&#10;Variáveis: 12&#10;Regras de validação: 8&#10;Alertas configurados: 5&#10;Última edição: hoje 14h32&#10;por Lucas T. (Tabelião)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="800" y="210" width="400" height="280" as="geometry"/>
        </mxCell>

        <mxCell id="approve-title" value="Aprovação e publicação" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="800" y="510" width="400" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="check1" value="☐  Declaro que revisei integralmente o texto, parâmetros e regras." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="800" y="540" width="400" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="check2" value="☐  Autorizo o uso pelos escreventes em ambiente de PRODUÇÃO." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="800" y="586" width="400" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="ambiente-title" value="Publicar em" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="800" y="640" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="radio1" value="◉  Homologação (não fatura — testes internos)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=middle;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="800" y="664" width="400" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="radio2" value="○  Produção (escreventes podem usar — gera billing)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=middle;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="800" y="700" width="400" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="btn-back" value="← Voltar" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="60" y="800" width="100" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-publish" value="Publicar tipo de ato no catálogo" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#333333;strokeColor=#333;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="900" y="800" width="300" height="36" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="08-catalogo-atos" name="08-catalogo-atos">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="08 — Catálogo de tipos de ato (versão e status)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="800" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="PRODUÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#666;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas T. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1050" y="78" width="180" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="sidebar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="200" height="744" as="geometry"/>
        </mxCell>
        <mxCell id="nav1" value="▣  Dashboard" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="130" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav2" value="[catalogo]  Catálogo de atos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=none;fontSize=11;align=left;spacingLeft=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="166" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav3" value="[lista]  Fila do cartório" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="202" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav4" value="[graph]  Relatórios" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="238" width="200" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="page-title" value="Catálogo de atos do cartório" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="130" width="500" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="cta-novo" value="+ Novo tipo de ato" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#333333;strokeColor=#333;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1060" y="130" width="180" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="filtros" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="180" width="980" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="search" value="[buscar] buscar por nome ou família..." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;spacingLeft=8;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="276" y="190" width="280" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="f1" value="Família: Todas ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="568" y="190" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="f2" value="Status: Todos ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="740" y="190" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="f3" value="Ambiente: Todos ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="912" y="190" width="160" height="28" as="geometry"/>
        </mxCell>

        <mxCell id="thead" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="240" width="980" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th1" value="TIPO DE ATO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="260" y="240" width="320" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th2" value="FAMÍLIA" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="580" y="240" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th3" value="VERSÃO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="740" y="240" width="80" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th4" value="STATUS / AMBIENTE" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="820" y="240" width="180" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th5" value="USO (30d)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1000" y="240" width="100" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th6" value="AÇÕES" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="240" width="140" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="r1" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="272" width="980" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r1c1" value="Escritura de Venda e Compra" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="272" width="320" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r1c2" value="Escrituras imobiliárias" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="580" y="272" width="160" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r1c3" value="v3" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="740" y="272" width="80" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r1c4" value="● Publicado · PRODUÇÃO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="820" y="272" width="180" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r1c5" value="42" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1000" y="272" width="100" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r1c6" value="Ver  ·  Nova versão" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1100" y="272" width="140" height="42" as="geometry"/>
        </mxCell>

        <mxCell id="r2" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="314" width="980" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r2c1" value="Escritura de V&amp;C c/ Cláusula Resolutiva" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="314" width="320" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r2c2" value="Escrituras imobiliárias" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="580" y="314" width="160" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r2c3" value="v1" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="740" y="314" width="80" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r2c4" value="◐ Em homologação" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="820" y="314" width="180" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r2c5" value="3" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1000" y="314" width="100" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r2c6" value="Ver  ·  Promover" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1100" y="314" width="140" height="42" as="geometry"/>
        </mxCell>

        <mxCell id="r3" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="356" width="980" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r3c1" value="Escritura de V&amp;C — Imóvel Rural" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="356" width="320" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r3c2" value="Escrituras imobiliárias" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="580" y="356" width="160" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r3c3" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="740" y="356" width="80" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r3c4" value="○ Rascunho" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="820" y="356" width="180" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r3c5" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1000" y="356" width="100" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r3c6" value="Continuar" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1100" y="356" width="140" height="42" as="geometry"/>
        </mxCell>

        <mxCell id="r4" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="398" width="980" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r4c1" value="Hipoteca em garantia de empréstimo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="398" width="320" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r4c2" value="Garantias reais" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="580" y="398" width="160" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r4c3" value="v2" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="740" y="398" width="80" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r4c4" value="● Publicado · PRODUÇÃO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="820" y="398" width="180" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r4c5" value="14" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1000" y="398" width="100" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r4c6" value="Ver  ·  Nova versão" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1100" y="398" width="140" height="42" as="geometry"/>
        </mxCell>

        <mxCell id="r5" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="440" width="980" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r5c1" value="Doação c/ Reserva de Usufruto" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="440" width="320" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r5c2" value="Doação / Usufruto" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="580" y="440" width="160" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r5c3" value="v1" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="740" y="440" width="80" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r5c4" value="● Publicado · PRODUÇÃO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="820" y="440" width="180" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r5c5" value="6" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1000" y="440" width="100" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r5c6" value="Ver  ·  Nova versão" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1100" y="440" width="140" height="42" as="geometry"/>
        </mxCell>

        <mxCell id="r-more" value="[ + 9 outros tipos do MVP — Procurações, Testamento, Divórcio, etc. ]" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="260" y="490" width="600" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="legend" value="LEGENDA STATUS&#10;● Publicado em PRODUÇÃO — escreventes podem usar, gera billing&#10;◐ Em homologação — escreventes podem testar, NÃO gera billing&#10;○ Rascunho — apenas Tabelião pode editar, ainda não disponível" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="260" y="540" width="700" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX&#10;1. Coluna USO (30d) ajuda Tabelião a priorizar quais atos manter atualizados.&#10;2. Versão visível na lista — &quot;v3&quot; deixa claro que houve evolução.&#10;3. Ação contextual: rascunho mostra Continuar; publicado mostra Nova versão; homologação mostra Promover.&#10;4. Escrevente vê catálogo só com publicados em produção (ou homologação se em testes), nunca rascunho.&#10;5. Filtro por ambiente importante: Tabelião pode querer ver só homologação para revisar antes de promover." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="260" y="660" width="700" height="180" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="09-fluxo-b-01-novo-documento-selecao-ato" name="09-fluxo-b-01-novo-documento-selecao-ato">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="09 — Fluxo B · Passo 1 · Novo documento — selecionar tipo de ato" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1200" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="PRODUÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#666;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="search" value="[buscar] buscar protocolo, parte, CPF... (atalho /)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;spacingLeft=8;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="380" y="76" width="400" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Maria S. (Escrevente) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1050" y="78" width="180" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="stepper" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="1200" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step1" value="● 1. Tipo de ato" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="240" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step2" value="○ 2. Documentos das partes (OCR)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="280" y="116" width="280" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step3" value="○ 3. Preencher e revisar" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="560" y="116" width="240" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step4" value="○ 4. Validar alertas" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="800" y="116" width="220" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step5" value="○ 5. Gerar minuta" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1020" y="116" width="220" height="44" as="geometry"/>
        </mxCell>

        <mxCell id="page-q" value="Que tipo de ato você quer iniciar?" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="180" width="600" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="search-cat" value="[buscar] começar a digitar &quot;venda&quot;, &quot;hipoteca&quot;, &quot;procuração&quot;..." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="60" y="216" width="600" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="search-help" value="Você pode também tocar &quot;/&quot; em qualquer tela para abrir busca rápida." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="60" y="260" width="600" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="recent-title" value="Mais usados nos últimos 30 dias" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="300" width="500" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="card1" value="Escritura de Venda e Compra&#10;Escrituras imobiliárias · v3&#10;42 atos no mês&#10;[Selecionar]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="334" width="280" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="card2" value="Hipoteca em garantia de empréstimo&#10;Garantias reais · v2&#10;14 atos no mês&#10;[Selecionar]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="360" y="334" width="280" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="card3" value="Procuração para Adquirir Imóvel&#10;Procurações · v1&#10;9 atos no mês&#10;[Selecionar]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="660" y="334" width="280" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="card4" value="Doação c/ Reserva de Usufruto&#10;Doação / Usufruto · v1&#10;6 atos no mês&#10;[Selecionar]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="960" y="334" width="280" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="all-title" value="Todos os tipos de ato disponíveis" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="490" width="500" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="fam1" value="Escrituras imobiliárias (4)&#10;  · Escritura de Venda e Compra&#10;  · Escritura de V&amp;C c/ Cláusula Resolutiva (homologação)&#10;  · Escritura de V&amp;C c/ Hipoteca&#10;  · Escritura de V&amp;C — Imóvel Rural" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="60" y="520" width="380" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="fam2" value="Garantias reais (1)&#10;  · Hipoteca em garantia de empréstimo&#10;Sucessão (1)&#10;  · Testamento" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="460" y="520" width="380" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="fam3" value="Procurações imobiliárias (4)&#10;  · Adquirir / Alienar / Doar&#10;  · Anuir&#10;  · Geral" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="860" y="520" width="380" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="fam4" value="Doação / Usufruto (3)&#10;  · Doação c/ Reserva de Usufruto&#10;  · Instituição de Usufruto&#10;  · Renúncia de Usufruto" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="60" y="660" width="380" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="fam5" value="Família (2)&#10;  · Divórcio&#10;  · Separação c/ Partilha" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="460" y="660" width="380" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="btn-cancel" value="Cancelar" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="60" y="800" width="100" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX: 1) Cards &quot;Mais usados&quot; aceleram 70%+ dos casos. 2) Busca por digitação como primary path. 3) Versão visível mantém transparência. 4) Não há &quot;Próximo&quot; — clique no card já avança." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="200" y="800" width="900" height="40" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="10-fluxo-b-02-upload-docs-ocr" name="10-fluxo-b-02-upload-docs-ocr">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="10 — Fluxo B · Passo 2 · Upload de documentos das partes (com OCR)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1200" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="PRODUÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#666;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="proto" value="Protocolo #2026-0473  ·  Escritura de V&amp;C c/ Cláusula Resolutiva  ·  auto-save ativo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="600" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Maria S. ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1100" y="78" width="140" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="stepper" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="1200" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step1" value="✓ 1. Tipo de ato" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="240" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step2" value="● 2. Documentos das partes (OCR)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="280" y="116" width="280" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step3" value="○ 3. Preencher e revisar" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="560" y="116" width="240" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step4" value="○ 4. Validar alertas" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="800" y="116" width="220" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step5" value="○ 5. Gerar minuta" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1020" y="116" width="220" height="44" as="geometry"/>
        </mxCell>

        <mxCell id="parts-title" value="Partes do ato" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="180" width="500" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="part1" value="VENDEDOR(A)&#10;[ Arraste docs aqui ou clique ]&#10;RG, CPF, comprovante de residência&#10;[doc] rg_jose.pdf · ✓ OCR concluído (3s)&#10;[doc] comprovante.pdf · ✓ OCR concluído&#10;[+ Adicionar documento]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="60" y="216" width="380" height="200" as="geometry"/>
        </mxCell>

        <mxCell id="part2" value="COMPRADOR(A)&#10;[ Arraste docs aqui ou clique ]&#10;RG, CPF, comprovante de residência&#10;[doc] cnh_ana.pdf · ◐ processando OCR... 60%&#10;[doc] comp_resid_ana.jpg · ✓ OCR concluído&#10;[+ Adicionar documento]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="460" y="216" width="380" height="200" as="geometry"/>
        </mxCell>

        <mxCell id="part3" value="IMÓVEL&#10;[ Arraste docs aqui ou clique ]&#10;Matrícula atualizada (CRI), IPTU, certidão neg. ônus&#10;[doc] matricula_atualizada.pdf · ! OCR baixa qualidade — revisar&#10;[+ Adicionar documento]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="860" y="216" width="380" height="200" as="geometry"/>
        </mxCell>

        <mxCell id="extracted-title" value="Dados extraídos pelo OCR (preview)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="436" width="500" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="extracted-help" value="Os dados abaixo serão usados como base para o preenchimento automático no próximo passo. Você poderá editar tudo." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="60" y="462" width="800" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="ext-card1" value="Vendedor (do RG + comp. resid.)&#10;Nome: JOSÉ DA SILVA SANTOS&#10;RG: 12.345.678-9 SSP/SP&#10;CPF: 123.456.789-00 (✓ válido)&#10;Endereço: Rua das Flores, 100 — São Paulo/SP&#10;[Editar]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="60" y="492" width="380" height="160" as="geometry"/>
        </mxCell>

        <mxCell id="ext-card2" value="Comprador (da CNH + comp. resid.)&#10;Nome: ANA PAULA MOREIRA&#10;CNH: 01234567890&#10;CPF: 987.654.321-00 (✓ válido)&#10;Endereço: Av. Brasil, 500 — São Paulo/SP&#10;[Editar]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="460" y="492" width="380" height="160" as="geometry"/>
        </mxCell>

        <mxCell id="ext-card3" value="Imóvel (da matrícula — confiança baixa)&#10;Matrícula: 1??.??? (parcial)&#10;Cartório RI: 9º RI da Capital&#10;Área: 84,30 m²&#10;Endereço: Rua das Flores, ?? — SP&#10;! Reler manualmente&#10;[Editar]  [Reenviar PDF]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="860" y="492" width="380" height="160" as="geometry"/>
        </mxCell>

        <mxCell id="manual-fallback" value="Não tem os documentos digitalizados? [Pular OCR e digitar manualmente]" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="60" y="680" width="600" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="btn-back" value="← Voltar" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="60" y="800" width="100" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="autosave" value="✓ salvo às 14h32 · auto-save ativo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="180" y="800" width="300" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-next" value="Preencher template →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#333333;strokeColor=#333;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1060" y="800" width="180" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX&#10;1. Drop zones por papel da parte (Vendedor / Comprador / Imóvel) — escrevente sabe onde colocar cada doc.&#10;2. Estados explícitos por arquivo: ✓ concluído, ◐ processando %, ! baixa qualidade.&#10;3. Card laranja onde OCR teve baixa confiança — atrai a atenção sem bloquear.&#10;4. Preview dos dados extraídos JÁ na tela de upload — escrevente confere antes de avançar.&#10;5. Auto-save indicator no rodapé — tranquiliza durante uploads longos.&#10;6. Fallback &quot;digitar manualmente&quot; sempre acessível — para casos de doc físico/ausente." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="40" y="848" width="900" height="20" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="11-fluxo-b-03-preenchimento-llm-revisao" name="11-fluxo-b-03-preenchimento-llm-revisao">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="11 — Fluxo B · Passo 3 · Preenchimento por LLM + revisão campo a campo (split view)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1300" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1400" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1400" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="PRODUÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#666;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="proto" value="#2026-0473  ·  Escritura de V&amp;C c/ Cláusula Resolutiva" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="500" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Maria S. ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1300" y="78" width="140" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="stepper" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="1400" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step1" value="✓ 1. Tipo" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="240" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step2" value="✓ 2. Documentos (OCR)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="280" y="116" width="280" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step3" value="● 3. Preencher e revisar" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="560" y="116" width="240" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step4" value="○ 4. Validar alertas" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="800" y="116" width="220" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step5" value="○ 5. Gerar minuta" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1020" y="116" width="420" height="44" as="geometry"/>
        </mxCell>

        <mxCell id="left-col-title" value="Variáveis do template (12)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="180" width="500" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="ia-status" value="◆ LLM preencheu 9 de 12 variáveis (3 precisam de atenção)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8eaf6;strokeColor=#666;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="208" width="500" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="f1-grp" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="240" width="700" height="170" as="geometry"/>
        </mxCell>
        <mxCell id="f1-title" value="Vendedor" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="74" y="248" width="200" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="f1-1" value="Nome do vendedor *" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="74" y="272" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="f1-1v" value="JOSÉ DA SILVA SANTOS  ◆ IA · OCR" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="74" y="292" width="400" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="f1-1conf" value="confiança alta · pág. 1 do RG" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="490" y="296" width="200" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="f1-2" value="CPF do vendedor *" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="74" y="328" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="f1-2v" value="123.456.789-00  ◆ IA · OCR  ✓ válido" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="74" y="348" width="400" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="f1-2conf" value="confiança alta · pág. 1 do RG" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="490" y="352" width="200" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="f2-grp" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="424" width="700" height="170" as="geometry"/>
        </mxCell>
        <mxCell id="f2-title" value="Comprador" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="74" y="432" width="200" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="f2-1" value="Nome do comprador *" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="74" y="456" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="f2-1v" value="ANA PAULA MOREIRA  ◆ IA · OCR" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="74" y="476" width="400" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="f3-grp" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="60" y="608" width="700" height="170" as="geometry"/>
        </mxCell>
        <mxCell id="f3-title" value="Imóvel  ! requer atenção" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="74" y="616" width="400" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="f3-1" value="Matrícula do imóvel *" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="74" y="640" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="f3-1v" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cc6600;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="74" y="660" width="400" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="f3-1msg" value="! Não foi possível extrair com confiança suficiente — preencha manualmente. Sugestão LLM: &quot;1??.???&quot;" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="74" y="694" width="600" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="f3-2" value="Valor da venda (R$) *" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="74" y="720" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="f3-2v" value="R$ 850.000,00" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="74" y="740" width="400" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="f3-2conf" value="manual (sem OCR para este campo)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="490" y="744" width="200" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="right-col-title" value="Pré-visualização da minuta" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="800" y="180" width="500" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="preview-toggle" value="atualiza ao vivo  ·  ☐ destacar variáveis" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="1100" y="180" width="320" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="preview-body" value="ESCRITURA PÚBLICA DE VENDA E COMPRA COM CLÁUSULA RESOLUTIVA&#10;Aos {{data_lavratura}}, perante mim, Tabelião do 27º Tabelionato de Notas da Capital de São Paulo, compareceram:&#10;OUTORGANTE VENDEDOR: [JOSÉ DA SILVA SANTOS], brasileiro, portador do RG nº [12.345.678-9 SSP/SP] e inscrito no CPF sob nº [123.456.789-00], residente em [Rua das Flores, 100 — São Paulo/SP].&#10;OUTORGADA COMPRADORA: [ANA PAULA MOREIRA], brasileira, portadora da CNH nº [01234567890] e inscrita no CPF sob nº [987.654.321-00], residente em [Av. Brasil, 500 — São Paulo/SP].&#10;CLÁUSULA 1ª — OBJETO&#10;Por meio do presente instrumento, o VENDEDOR, já qualificado, TRANSFERE e CEDE à COMPRADORA o imóvel matriculado sob nº [______] no [9º RI da Capital], com a área de [84,30] m², situado em [Rua das Flores, 100 — São Paulo/SP].&#10;CLÁUSULA 2ª — PREÇO&#10;O valor da presente venda é de R$ [850.000,00] (oitocentos e cinquenta mil reais), pago à vista por...&#10;CLÁUSULA 3ª — CLÁUSULA RESOLUTIVA&#10;Caso..." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="800" y="208" width="620" height="540" as="geometry"/>
        </mxCell>

        <mxCell id="preview-paginate" value="página 1 de 4  ·  ← anterior  ·  próxima →" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="800" y="754" width="620" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="btn-back" value="← Voltar" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="60" y="800" width="100" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="autosave" value="✓ salvo às 14h36" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="180" y="800" width="200" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-fila" value="Enviar para revisão (par)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1020" y="800" width="200" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-next" value="Validar alertas →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#333333;strokeColor=#333;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1240" y="800" width="180" height="36" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="12-fluxo-b-04-alertas-validacoes" name="12-fluxo-b-04-alertas-validacoes">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="12 — Fluxo B · Passo 4 · Alertas e validações (regras pré-cadastradas)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1200" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="PRODUÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#666;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="proto" value="#2026-0473  ·  Escritura de V&amp;C c/ Cláusula Resolutiva" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="500" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Maria S. ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1100" y="78" width="140" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="stepper" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="1200" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step1" value="✓ 1. Tipo" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="200" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step2" value="✓ 2. Documentos" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="240" y="116" width="240" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step3" value="✓ 3. Preencher" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="480" y="116" width="240" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step4" value="● 4. Validar alertas" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="720" y="116" width="240" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step5" value="○ 5. Gerar minuta" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="960" y="116" width="280" height="44" as="geometry"/>
        </mxCell>

        <mxCell id="summary" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="180" width="1160" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="sum1" value="✓ 5 regras OK" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1;spacingLeft=20" vertex="1" parent="1">
          <mxGeometry x="60" y="180" width="220" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="sum2" value="! 2 alertas" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="280" y="180" width="220" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="sum3" value="✗ 1 bloqueio" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="500" y="180" width="220" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="sum-help" value="Bloqueios impedem o avanço para a geração da minuta. Alertas são informativos." style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="720" y="180" width="500" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="block-title" value="Bloqueios" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="284" width="200" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="block-card" value="✗ BLOQUEIO · Matrícula do imóvel não preenchida&#10;A regra &quot;Conferência matrícula&quot; exige um número de matrícula válido. Este campo está vazio.&#10;Ação sugerida: volte ao Passo 3 e digite manualmente o número da matrícula a partir do PDF da matrícula atualizada (CRI).&#10;[Ir ao campo no Passo 3]   [Ver regra]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fde7e9;strokeColor=#cc0000;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="60" y="316" width="1160" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="warn-title" value="Alertas (não bloqueiam)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="460" width="300" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="warn-card1" value="! ALERTA · Matrícula não localizada no RI integrado&#10;Não foi possível confirmar automaticamente a matrícula. Confira manualmente com o cartório de registro de imóveis antes de lavrar.&#10;[Marcar como verificado]   [Ver regra]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="60" y="492" width="570" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="warn-card2" value="! ALERTA · Endereço do imóvel difere do endereço do vendedor&#10;Os dados extraídos indicam que o vendedor reside no mesmo imóvel — confirme se há cláusula de desocupação ou se vendedor permanece.&#10;[Marcar como verificado]   [Ver regra]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="650" y="492" width="570" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="ok-title" value="Regras passando" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="636" width="200" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="ok-list" value="✓ CPF do vendedor é válido&#10;✓ CPF do comprador é válido&#10;✓ Vendedor ≠ Comprador (CPFs distintos)&#10;✓ Valor da venda preenchido e &gt; R$ 0,00&#10;✓ Cláusula resolutiva está presente no template" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="60" y="668" width="1160" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="btn-back" value="← Voltar" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="60" y="800" width="100" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-rev" value="Enviar para revisão (par)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="820" y="800" width="200" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-next" value="Gerar minuta final →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#cccccc;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1040" y="800" width="180" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-next-help" value="(habilitado quando o bloqueio for resolvido)" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="800" y="838" width="420" height="20" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="13-fluxo-b-05-fila-revisao" name="13-fluxo-b-05-fila-revisao">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="13 — Fila de revisão compartilhada (rascunho · em revisão · pronto p/ lavratura)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1300" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1400" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1400" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="PRODUÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#666;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Maria S. ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1300" y="78" width="140" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="sidebar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="200" height="744" as="geometry"/>
        </mxCell>
        <mxCell id="nav1" value="▣  Dashboard" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="130" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav2" value="[lista]  Fila de revisão" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=none;fontSize=11;align=left;spacingLeft=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="166" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav3" value="[catalogo]  Catálogo" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="202" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav4" value="[pasta]  Meus atos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="238" width="200" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="page-title" value="Fila de revisão" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="130" width="500" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="filters-bar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="170" width="1170" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="f1" value="◉ Todos do cartório" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="280" y="170" width="180" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="f2" value="○ Apenas meus" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="460" y="170" width="180" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="f3" value="○ Atribuídos a mim" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="640" y="170" width="180" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="f-search" value="[buscar] buscar..." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;spacingLeft=8;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="900" y="180" width="240" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="f-tipo" value="Tipo: Todos ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1160" y="180" width="180" height="28" as="geometry"/>
        </mxCell>

        <mxCell id="kanban-h1" value="○ RASCUNHO (5)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=12;fontStyle=1;align=left;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="260" y="232" width="380" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="kanban-h2" value="◐ EM REVISÃO (3)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=12;fontStyle=1;align=left;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="650" y="232" width="380" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="kanban-h3" value="● PRONTO P/ LAVRATURA (4)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=12;fontStyle=1;align=left;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="1040" y="232" width="390" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="kc1-1" value="#2026-0473&#10;Esc. V&amp;C c/ Cláusula Resolutiva&#10;Maria S. · há 12min&#10;! 2 alertas" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="260" y="280" width="380" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="kc1-2" value="#2026-0470&#10;Procuração para Adquirir Imóvel&#10;Maria S. · há 1h" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="260" y="370" width="380" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="kc1-3" value="#2026-0468&#10;Doação c/ Reserva de Usufruto&#10;Carlos M. · há 3h&#10;! 2 alertas · ✗ 1 bloqueio" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="260" y="460" width="380" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="kc1-4" value="#2026-0466&#10;Hipoteca em garantia de empréstimo&#10;Júlia P. · ontem" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="260" y="550" width="380" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="kc1-5" value="#2026-0464&#10;Testamento&#10;Pedro R. · ontem" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="260" y="640" width="380" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="kc2-1" value="#2026-0463&#10;Esc. V&amp;C — Imóvel Rural&#10;Autor: Júlia P. · Revisor: Pedro R. · há 30min" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="650" y="280" width="380" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="kc2-2" value="#2026-0462&#10;Procuração Geral&#10;Autor: Maria S. · Revisor: SEM ATRIBUIÇÃO&#10;[Atribuir-me]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="650" y="370" width="380" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="kc2-3" value="#2026-0460&#10;Divórcio Consensual&#10;Autor: Carlos M. · Revisor: Maria S. · há 2h" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="650" y="460" width="380" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="kc3-1" value="#2026-0461&#10;Hipoteca em garantia de empréstimo&#10;Autor: Maria S. · Aprov: Pedro R. · ontem&#10;[Ver minuta] [Marcar lavrado]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1040" y="280" width="390" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="kc3-2" value="#2026-0459&#10;Esc. V&amp;C&#10;Autor: Carlos M. · ontem&#10;[Ver minuta] [Marcar lavrado]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1040" y="370" width="390" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="kc3-3" value="#2026-0457&#10;Procuração para Doar&#10;Autor: Júlia P. · 2 dias&#10;[Ver minuta] [Marcar lavrado]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1040" y="460" width="390" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="kc3-4" value="#2026-0455&#10;Renúncia de Usufruto&#10;Autor: Pedro R. · 3 dias&#10;[Ver minuta] [Marcar lavrado]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1040" y="550" width="390" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX&#10;1. Kanban 3-colunas é padrão mental para fila de trabalho — todo escrevente entende sem treino.&#10;2. Drag-and-drop entre colunas (não detalhado no wireframe) — clicar no card abre o detalhe; arrastar muda status quando há permissão.&#10;3. Card laranja para atos com bloqueio chama a atenção — princípio: nada que precise de ação fica escondido.&#10;4. Filtro de visão (Todos / Meus / Atribuídos) atende suposição UX-4 (validar com cliente).&#10;5. &quot;PRONTO P/ LAVRATURA&quot; já gerou minuta — billing está disparado. Lavratura é externa: botão [Marcar lavrado] fecha o ciclo." style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=9;align=left;verticalAlign=top" vertex="1" parent="1">
          <mxGeometry x="260" y="740" width="1170" height="120" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="14-fluxo-b-06-minuta-final-emolumento" name="14-fluxo-b-06-minuta-final-emolumento">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="14 — Fluxo B · Passo 5 · Minuta final + cálculo do emolumento (porta única do billing)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1300" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1400" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1400" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="PRODUÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#666;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="proto" value="#2026-0473  ·  Escritura de V&amp;C c/ Cláusula Resolutiva" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="500" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Maria S. ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1300" y="78" width="140" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="stepper" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="1400" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step1" value="✓ 1. Tipo" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="240" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step2" value="✓ 2. Documentos" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="280" y="116" width="280" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step3" value="✓ 3. Preencher" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="560" y="116" width="240" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step4" value="✓ 4. Validar alertas" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="800" y="116" width="220" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step5" value="● 5. Gerar minuta" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1020" y="116" width="420" height="44" as="geometry"/>
        </mxCell>

        <mxCell id="preview-title" value="Pré-visualização da minuta final" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="180" width="500" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="preview-body" value="ESCRITURA PÚBLICA DE VENDA E COMPRA COM CLÁUSULA RESOLUTIVA&#10;Aos seis dias do mês de maio do ano de dois mil e vinte e seis, perante mim, Tabelião do 27º Tabelionato de Notas da Capital de São Paulo, compareceram:&#10;OUTORGANTE VENDEDOR: JOSÉ DA SILVA SANTOS, brasileiro, portador do RG nº 12.345.678-9 SSP/SP e inscrito no CPF sob nº 123.456.789-00, residente em Rua das Flores, 100 — São Paulo/SP.&#10;OUTORGADA COMPRADORA: ANA PAULA MOREIRA, brasileira, portadora da CNH nº 01234567890 e inscrita no CPF sob nº 987.654.321-00, residente em Av. Brasil, 500 — São Paulo/SP.&#10;Por este instrumento e na forma da lei, declaram, livres e conscientes, o que segue:&#10;CLÁUSULA 1ª — OBJETO&#10;Por meio do presente instrumento, o VENDEDOR, já qualificado, TRANSFERE e CEDE à COMPRADORA o imóvel matriculado sob nº 145.382 no 9º RI da Capital, com a área de 84,30 m², situado em Rua das Flores, 100 — São Paulo/SP.&#10;CLÁUSULA 2ª — PREÇO&#10;O valor da presente venda é de R$ 850.000,00 (oitocentos e cinquenta mil reais), pago à vista por TED bancário em data anterior...&#10;CLÁUSULA 3ª — CLÁUSULA RESOLUTIVA&#10;Caso a comprovação do pagamento integral não ocorra até..." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="60" y="208" width="800" height="540" as="geometry"/>
        </mxCell>

        <mxCell id="preview-paginate" value="página 1 de 4  ·  ← anterior  ·  próxima →  ·  Baixar PDF de revisão" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="60" y="752" width="800" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="emol-title" value="Cálculo do emolumento" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="900" y="180" width="500" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="emol-card" value="Tabela CGJ-SP · vigente 2026&#10;Tipo: Escritura de Venda e Compra&#10;Faixa: Acima de R$ 750.000 e até R$ 1.500.000&#10;Valor da venda: R$ 850.000,00&#10;Emolumento (cartório): R$ 4.831,20&#10;ISS, taxas e contribuições: R$ 1.207,80&#10;TOTAL EMOLUMENTOS: R$ 6.039,00&#10;[Detalhar]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="900" y="208" width="500" height="200" as="geometry"/>
        </mxCell>

        <mxCell id="kb-source-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;strokeWidth=1" vertex="1" parent="1">
          <mxGeometry x="900" y="408" width="500" height="14" as="geometry"/>
        </mxCell>
        <mxCell id="kb-source" value="[lock]  Fonte: Tabela CGJ-SP 2026 · vigente desde 01/01/2026 · aprovada por Tabelião Lucas C. · hash a3f9...c12" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontColor=#1F4E79;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="900" y="408" width="500" height="14" as="geometry"/>
        </mxCell>

        <mxCell id="billing-title" value="Apuração Stoix (informativo)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="900" y="426" width="500" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="billing-card" value="Modelo: 3,1% do emolumento OU R$ 7,50&#10;(o que for maior)&#10;3,1% × R$ 6.039,00 = R$ 187,21&#10;Mínimo R$ 7,50&#10;Cobrança Stoix: R$ 187,21&#10;Cobrança ocorre apenas em PRODUÇÃO,&#10;ao gerar a minuta final.&#10;Apuração mensal — fatura emitida no dia 5 do mês seguinte." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="900" y="454" width="500" height="220" as="geometry"/>
        </mxCell>

        <mxCell id="warn-final" value="! Atenção: ao gerar a minuta final em PRODUÇÃO, esta operação será computada para fins de billing e ficará registrada no audit trail. Esta ação não pode ser desfeita — apenas anulada com justificativa registrada." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;align=left;verticalAlign=top;spacingLeft=14;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="900" y="688" width="500" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="btn-back" value="← Voltar" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="60" y="800" width="100" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-baixar" value="Baixar como rascunho (PDF)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="180" y="800" width="220" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-gerar" value="GERAR MINUTA FINAL  (R$ 187,21)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#333333;strokeColor=#333;fontColor=#ffffff;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1080" y="800" width="320" height="36" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="15-relatorios-billing" name="15-relatorios-billing">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="15 — Relatório de billing mensal (base 3,1% / R$ 7,50)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="800" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="PRODUÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#666;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas T. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1050" y="78" width="180" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="page-title" value="Relatório de billing — Abril/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="130" width="500" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="filters" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="170" width="1180" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="f-mes" value="Mês: Abril/2026 ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="76" y="180" width="200" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="f-tipo" value="Tipo: Todos ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="290" y="180" width="200" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="f-amb" value="Ambiente: Produção ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="504" y="180" width="200" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="btn-csv" value="Exportar CSV" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="940" y="180" width="140" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="btn-pdf" value="Exportar PDF" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1090" y="180" width="140" height="28" as="geometry"/>
        </mxCell>

        <mxCell id="kpi1" value="MINUTAS GERADAS&#10;(Produção · Abril)&#10;87" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=12;fontStyle=1;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="60" y="240" width="280" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="kpi2" value="EMOLUMENTOS TOTAIS&#10;(base de cálculo)&#10;R$ 412.380,00" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=12;fontStyle=1;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="360" y="240" width="280" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="kpi3" value="COBRANÇA STOIX&#10;(3,1% ou R$ 7,50)&#10;R$ 12.783,78" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=12;fontStyle=1;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="660" y="240" width="280" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="kpi4" value="MINUTAS HOMOLOGAÇÃO&#10;(não fatura)&#10;5" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999;fontSize=12;fontStyle=1;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="960" y="240" width="280" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="chart-title" value="Minutas geradas por dia" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="360" width="400" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="chart-area" value="[ Bar chart — 30 dias × nº minutas ]&#10;Picos visuais nos dias 5, 12, 19, 26 (segundas-feiras).&#10;Eixo Y: 0-12 minutas/dia. Média: 2,9/dia." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=10;align=center;verticalAlign=middle;dashed=1" vertex="1" parent="1">
          <mxGeometry x="60" y="390" width="800" height="180" as="geometry"/>
        </mxCell>

        <mxCell id="topact-title" value="Top tipos de ato" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="880" y="360" width="300" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="topact-list" value="1. Esc. Venda e Compra — 42&#10;2. Hipoteca — 14&#10;3. Procuração Adquirir Imóvel — 9&#10;4. Doação c/ Reserva Usufruto — 6&#10;5. Procuração Geral — 5&#10;6. Outros — 11" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="880" y="390" width="360" height="180" as="geometry"/>
        </mxCell>

        <mxCell id="detail-title" value="Detalhamento das minutas (auditoria)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="590" width="500" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="thead" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="618" width="1180" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th1" value="DATA/HORA" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="618" width="140" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th2" value="PROTOCOLO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="200" y="618" width="120" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th3" value="TIPO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="320" y="618" width="280" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th4" value="ESCREVENTE" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="600" y="618" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th5" value="EMOLUMENTO" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="760" y="618" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th6" value="STOIX (R$)" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="920" y="618" width="140" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th7" value="AUDIT" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1060" y="618" width="180" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="r1" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="650" width="1180" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r1-1" value="30/04 17:42" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="650" width="140" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r1-2" value="#2026-0473" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="200" y="650" width="120" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r1-3" value="Esc. V&amp;C c/ Cláusula Resolutiva" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="320" y="650" width="280" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r1-4" value="Maria S." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="600" y="650" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r1-5" value="R$ 6.039,00" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="760" y="650" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r1-6" value="187,21" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="920" y="650" width="140" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r1-7" value="Ver timeline" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1060" y="650" width="180" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="r2" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="682" width="1180" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r2-1" value="30/04 15:18" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="682" width="140" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r2-2" value="#2026-0461" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="200" y="682" width="120" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r2-3" value="Hipoteca" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="320" y="682" width="280" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r2-4" value="Pedro R." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="600" y="682" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r2-5" value="R$ 2.130,00" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="760" y="682" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r2-6" value="66,03" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="920" y="682" width="140" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r2-7" value="Ver timeline" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1060" y="682" width="180" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="r-more" value="[ + 85 outras minutas... ]" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="720" width="600" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="footer-tot" value="Total mês: 87 minutas  ·  R$ 412.380,00 emolumentos  ·  R$ 12.783,78 cobrança Stoix" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="600" y="800" width="640" height="32" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="16-relatorios-sla" name="16-relatorios-sla">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="16 — Relatório de SLA (disponibilidade, tickets, severidade)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="800" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="PRODUÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#666;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas T. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1050" y="78" width="180" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="page-title" value="Relatório de SLA — Abril/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="130" width="500" height="30" as="geometry"/>
        </mxCell>
        <mxCell id="period" value="Período: 01/04/2026 a 30/04/2026  ·  Mês de competência abril" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="60" y="160" width="600" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="kpi1" value="DISPONIBILIDADE&#10;(meta 99,5%)&#10;99,87%&#10;✓ acima da meta" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="200" width="280" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="kpi2" value="TEMPO INDISPONÍVEL&#10;(janelas planejadas excluídas)&#10;56 minutos&#10;em 4 incidentes" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="360" y="200" width="280" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="kpi3" value="TICKETS ABERTOS&#10;(no mês)&#10;12 abertos&#10;11 resolvidos · 1 em andamento" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="660" y="200" width="280" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="kpi4" value="SLA RESPOSTA&#10;(severidade crítica: 1h útil)&#10;100%&#10;0 violações" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="960" y="200" width="280" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="chart-title" value="Disponibilidade diária (30 dias)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="340" width="500" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="chart-area" value="[ Heatmap ou linha — 30 dias × disponibilidade % ]&#10;Linha de meta 99,5% sempre visível.&#10;Picos de queda destacados em 12/04 e 23/04 (incidentes).&#10;Y: 99,0% a 100,0%" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=10;align=center;verticalAlign=middle;dashed=1" vertex="1" parent="1">
          <mxGeometry x="60" y="370" width="800" height="180" as="geometry"/>
        </mxCell>

        <mxCell id="sev-title" value="Distribuição por severidade" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="880" y="340" width="300" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="sev-list" value="Crítica (resp. ≤ 1h):  1 ticket&#10;  └ resp. média: 18 min&#10;Alta (resp. ≤ 4h):  3 tickets&#10;  └ resp. média: 47 min&#10;Média (resp. ≤ 1 dia útil):  5 tickets&#10;  └ resp. média: 3h12&#10;Baixa (resp. ≤ 3 dias úteis):  3 tickets&#10;  └ resp. média: 6h40" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="880" y="370" width="360" height="180" as="geometry"/>
        </mxCell>

        <mxCell id="inc-title" value="Incidentes do mês" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="570" width="500" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="thead" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="598" width="1180" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th1" value="DATA/HORA" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="598" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th2" value="SEVERIDADE" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="220" y="598" width="120" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th3" value="DESCRIÇÃO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="340" y="598" width="440" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th4" value="DURAÇÃO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="780" y="598" width="120" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th5" value="STATUS" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="900" y="598" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th6" value="POST-MORTEM" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1060" y="598" width="180" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="r1" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="630" width="1180" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="r1-1" value="23/04 14:32" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="630" width="160" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="r1-2" value="Crítica" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="220" y="630" width="120" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="r1-3" value="Indisponibilidade do OCR (timeout fornecedor)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="340" y="630" width="440" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="r1-4" value="22 min" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="780" y="630" width="120" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="r1-5" value="✓ Resolvido" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="900" y="630" width="160" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="r1-6" value="Ver post-mortem" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1060" y="630" width="180" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="r2" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="666" width="1180" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="r2-1" value="12/04 09:15" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="666" width="160" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="r2-2" value="Alta" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="220" y="666" width="120" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="r2-3" value="Lentidão na geração de minuta (DB CPU alto)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="340" y="666" width="440" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="r2-4" value="14 min" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="780" y="666" width="120" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="r2-5" value="✓ Resolvido" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="900" y="666" width="160" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="r2-6" value="Ver post-mortem" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1060" y="666" width="180" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="r-more" value="[ + 2 incidentes... ]" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="710" width="600" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="export" value="Exportar PDF mensal · Exportar CSV técnico · Compartilhar com auditoria" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="60" y="760" width="1180" height="32" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="17-gestao-usuarios" name="17-gestao-usuarios">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="17 — Gestão de usuários e papéis" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="800" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="PRODUÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#666;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas T. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1050" y="78" width="180" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="page-title" value="Usuários do cartório" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="130" width="500" height="30" as="geometry"/>
        </mxCell>
        <mxCell id="cta-novo" value="+ Convidar usuário" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#333333;strokeColor=#333;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1060" y="130" width="180" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="kpis" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="180" width="1180" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="kpi1" value="1 Tabelião  ·  6 Escreventes  ·  1 DPO  ·  8 ativos / 0 inativos" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1;spacingLeft=20" vertex="1" parent="1">
          <mxGeometry x="60" y="180" width="800" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="kpi2" value="Limite do plano: até 8 usuários · ✓ ok" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;spacingRight=20" vertex="1" parent="1">
          <mxGeometry x="900" y="180" width="320" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="filter-bar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="60" y="280" width="1180" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="search" value="[buscar] buscar por nome ou e-mail..." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;spacingLeft=8;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="60" y="284" width="320" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="f-papel" value="Papel: Todos ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="400" y="284" width="180" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="f-status" value="Status: Todos ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="600" y="284" width="180" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="thead" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="336" width="1180" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th1" value="NOME" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="336" width="240" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th2" value="E-MAIL" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="300" y="336" width="280" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th3" value="PAPEL" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="580" y="336" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th4" value="STATUS" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="740" y="336" width="120" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th5" value="ÚLTIMO ACESSO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="860" y="336" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th6" value="AÇÕES" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1020" y="336" width="220" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="r1" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="368" width="1180" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r1-1" value="Lucas Tarrega" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="368" width="240" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r1-2" value="lucas@27notas.sp.br" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="300" y="368" width="280" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r1-3" value="Tabelião" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="580" y="368" width="160" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r1-4" value="● Ativo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="740" y="368" width="120" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r1-5" value="agora" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="860" y="368" width="160" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r1-6" value="Editar  (não pode desativar)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="1020" y="368" width="220" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="r2" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="408" width="1180" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r2-1" value="Maria Silva" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="408" width="240" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r2-2" value="maria.s@27notas.sp.br" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="300" y="408" width="280" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r2-3" value="Escrevente" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="580" y="408" width="160" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r2-4" value="● Ativo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="740" y="408" width="120" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r2-5" value="há 2 min" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="860" y="408" width="160" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r2-6" value="Editar · Reset senha · Desativar" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1020" y="408" width="220" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="r3" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="448" width="1180" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r3-1" value="Carlos Mendonça" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="448" width="240" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r3-2" value="carlos.m@27notas.sp.br" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="300" y="448" width="280" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r3-3" value="Escrevente" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="580" y="448" width="160" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r3-4" value="● Ativo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="740" y="448" width="120" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r3-5" value="há 1h" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="860" y="448" width="160" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r3-6" value="Editar · Reset senha · Desativar" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1020" y="448" width="220" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="r-more" value="[ + 4 escreventes... + DPO Renata B. ]" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="488" width="600" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="papeis-title" value="Permissões por papel (matriz)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="540" width="500" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="matrix-h" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="572" width="1180" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="m-h1" value="AÇÃO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="572" width="500" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="m-h2" value="TABELIÃO" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="560" y="572" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="m-h3" value="ESCREVENTE" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="720" y="572" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="m-h4" value="DPO" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="880" y="572" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="m-h5" value="ADMIN STOIX" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1040" y="572" width="200" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="mr1" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="604" width="1180" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr1-1" value="Cadastrar tipo de ato (Fluxo A)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="604" width="500" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr1-2" value="✓" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="560" y="604" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr1-3" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="720" y="604" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr1-4" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="880" y="604" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr1-5" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1040" y="604" width="200" height="28" as="geometry"/>
        </mxCell>

        <mxCell id="mr2" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="632" width="1180" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr2-1" value="Executar ato (Fluxo B)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="632" width="500" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr2-2" value="✓" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="560" y="632" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr2-3" value="✓" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="720" y="632" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr2-4" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="880" y="632" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr2-5" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1040" y="632" width="200" height="28" as="geometry"/>
        </mxCell>

        <mxCell id="mr3" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="660" width="1180" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr3-1" value="Ver relatórios de billing e SLA" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="660" width="500" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr3-2" value="✓" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="560" y="660" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr3-3" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="720" y="660" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr3-4" value="parcial (LGPD)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="880" y="660" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr3-5" value="✓ (todos)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1040" y="660" width="200" height="28" as="geometry"/>
        </mxCell>

        <mxCell id="mr4" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="688" width="1180" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr4-1" value="Gerenciar usuários" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="688" width="500" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr4-2" value="✓" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="560" y="688" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr4-3" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="720" y="688" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr4-4" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="880" y="688" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr4-5" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1040" y="688" width="200" height="28" as="geometry"/>
        </mxCell>

        <mxCell id="mr5" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="716" width="1180" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr5-1" value="Acessar logs LGPD e exportar dados" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="716" width="500" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr5-2" value="ler" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="560" y="716" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr5-3" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="720" y="716" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr5-4" value="✓ (gerencia)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="880" y="716" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="mr5-5" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1040" y="716" width="200" height="28" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="18-configuracoes-cartorio" name="18-configuracoes-cartorio">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="18 — Configurações do cartório (dados, ambiente, integrações)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="800" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="PRODUÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#666;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas T. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1050" y="78" width="180" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="left-tabs" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="140" width="240" height="700" as="geometry"/>
        </mxCell>
        <mxCell id="t1" value="▣  Dados do cartório" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=none;fontSize=11;align=left;spacingLeft=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="150" width="240" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="t2" value="[refresh]  Ambiente" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="60" y="186" width="240" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="t3" value="[link]  Integrações" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="60" y="222" width="240" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="t4" value="[$]  Tabela de emolumentos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="60" y="258" width="240" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="t5" value="[bell]  Notificações" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="60" y="294" width="240" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="t6" value="[lock]  Segurança e 2FA" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="60" y="330" width="240" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="t7" value="[lista]  Plano e billing" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="60" y="366" width="240" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="content-title" value="Dados do cartório" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="320" y="140" width="400" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-nome" value="Nome do cartório *" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="320" y="180" width="400" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="inp-nome" value="27º Tabelionato de Notas da Capital de São Paulo" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="320" y="200" width="600" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-cnpj" value="CNPJ" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="320" y="244" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="inp-cnpj" value="00.000.000/0001-00" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="320" y="264" width="280" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-cnj" value="CNS / CNJ" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="640" y="244" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="inp-cnj" value="06.0000-0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="640" y="264" width="280" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-end" value="Endereço" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="320" y="306" width="400" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="inp-end" value="Rua XV de Novembro, 100 — Centro — São Paulo/SP — 01000-000" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="320" y="326" width="600" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-tab" value="Tabelião titular" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="320" y="370" width="400" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="inp-tab" value="Lucas Tarrega  (lucas@27notas.sp.br)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="320" y="390" width="600" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-dpo" value="DPO designado" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="320" y="434" width="400" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="inp-dpo" value="Renata Bizarria  (dpo@27notas.sp.br)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="320" y="454" width="600" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="amb-title" value="Ambiente atual" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="320" y="520" width="400" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="amb-card" value="◉  PRODUÇÃO  (em uso pelos escreventes — gera billing)&#10;○  HOMOLOGAÇÃO  (testes — não gera billing)&#10;! Mudança de ambiente afeta TODO o cartório.&#10;Ação restrita ao Tabelião e exige confirmação 2FA." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12" vertex="1" parent="1">
          <mxGeometry x="320" y="554" width="600" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="cgj-title" value="Tabela CGJ-SP" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="320" y="690" width="300" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="cgj-card" value="Versão vigente: CGJ-SP 2026 (atualizada em 02/01/2026 pela Stoix)&#10;Esta tabela é mantida e atualizada pela Stoix conforme provimento da CGJ-SP.&#10;O cartório não pode editá-la diretamente. Em caso de divergência, abrir ticket." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=14;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="320" y="716" width="600" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="btn-save" value="Salvar alterações" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#333333;strokeColor=#333;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="780" y="810" width="160" height="36" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="19-area-dpo-lgpd" name="19-area-dpo-lgpd">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="19 — Área DPO / LGPD (logs, incidentes 48h, exportação de dados)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1000" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="PRODUÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#666;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Renata B. (DPO) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1050" y="78" width="180" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="page-title" value="Painel LGPD" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="130" width="500" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="kpi1" value="ACESSOS A DADOS&#10;PESSOAIS (30d)&#10;1.247" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="170" width="280" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="kpi2" value="INCIDENTES ATIVOS&#10;(notificação 48h pendente)&#10;0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="360" y="170" width="280" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="kpi3" value="SOLICITAÇÕES TITULARES&#10;(direitos LGPD)&#10;2 abertas / 8 atendidas" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="660" y="170" width="280" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="kpi4" value="POLÍTICAS&#10;✓ Privacidade: v3 vigente&#10;✓ Retenção: 5 anos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=14;spacingTop=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="960" y="170" width="280" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="inc-title" value="Incidentes recentes" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="290" width="500" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="cta-novo" value="+ Registrar incidente" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#333333;strokeColor=#333;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1060" y="284" width="180" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="thead" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="328" width="1180" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th1" value="DETECTADO EM" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="328" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th2" value="TIPO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="220" y="328" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th3" value="DESCRIÇÃO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="380" y="328" width="380" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th4" value="JANELA 48h" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="760" y="328" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th5" value="STATUS" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="920" y="328" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th6" value="AÇÕES" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1080" y="328" width="160" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="r1" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="360" width="1180" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r1-1" value="14/03 09:42" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="360" width="160" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r1-2" value="Acesso indevido" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="220" y="360" width="160" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r1-3" value="Tentativa de login forçada (bloqueada após 5 tentativas)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="380" y="360" width="380" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r1-4" value="encerrada (47h)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="760" y="360" width="160" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r1-5" value="✓ Notificado ANPD" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="920" y="360" width="160" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="r1-6" value="Ver detalhes" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1080" y="360" width="160" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="r-empty" value="Nenhum incidente ativo no momento — bom trabalho!" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="400" width="600" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="logs-title" value="Logs de acesso a dados pessoais (auditoria LGPD)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="450" width="600" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="logs-filter" value="Período: últimos 7 dias ▾  ·  Usuário: todos ▾  ·  Tipo de dado: todos ▾  ·  [buscar] buscar..." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=10;align=left;verticalAlign=middle;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="60" y="478" width="1180" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="log-thead" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="522" width="1180" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="lh1" value="DATA/HORA" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="522" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="lh2" value="USUÁRIO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="220" y="522" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="lh3" value="AÇÃO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="380" y="522" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="lh4" value="DADO ACESSADO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="580" y="522" width="280" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="lh5" value="PROTOCOLO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="860" y="522" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="lh6" value="IP / FINALIDADE" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1020" y="522" width="220" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="lr1" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="554" width="1180" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="lr1-1" value="06/05 14:32" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="554" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="lr1-2" value="Maria S." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="220" y="554" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="lr1-3" value="OCR · leitura RG" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="380" y="554" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="lr1-4" value="José da Silva Santos · CPF ***.***.789-00" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="580" y="554" width="280" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="lr1-5" value="#2026-0473" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="860" y="554" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="lr1-6" value="200.x.x.x · execução ato" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1020" y="554" width="220" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="lr2" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="586" width="1180" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="lr2-1" value="06/05 14:33" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="586" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="lr2-2" value="Maria S." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="220" y="586" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="lr2-3" value="LLM · preenchimento" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="380" y="586" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="lr2-4" value="Ana Paula Moreira · CPF ***.***.321-00" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="580" y="586" width="280" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="lr2-5" value="#2026-0473" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="860" y="586" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="lr2-6" value="200.x.x.x · execução ato" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1020" y="586" width="220" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="lr-more" value="[ + 1.245 outros eventos no período... ]  ·  [Exportar CSV completo]" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="624" width="800" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="rights-title" value="Solicitações de titulares (direitos LGPD)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="676" width="500" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="rt1" value="Solicitação #2026-RT-007&#10;Maria do Carmo Souza · CPF ***.***.111-00&#10;Tipo: Acesso aos próprios dados&#10;Recebida em: 02/05/2026 · prazo: 17/05/2026&#10;[Atender]  [Detalhar]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=14;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="60" y="704" width="580" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="rt2" value="Solicitação #2026-RT-008&#10;João Pedro Lima · CPF ***.***.222-00&#10;Tipo: Anonimização de dados&#10;Recebida em: 04/05/2026 · prazo: 19/05/2026&#10;[Atender]  [Detalhar]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=14;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="660" y="704" width="580" height="120" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="00-kbc-admin-categorias" name="00-kbc-admin-categorias">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="KBC 00 — Admin de Categorias da Knowledge Base (kb_category · peso aplicado no rerank do RAG)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1200" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="Knowledge Base / Categorias e pesos" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="350" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="sidebar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="200" height="744" as="geometry"/>
        </mxCell>
        <mxCell id="nav1" value="▣  Dashboard" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="130" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav2" value="[catalogo]  Modelos de ato" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="166" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav3" value="[folder]  Knowledge Base" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=none;fontSize=11;align=left;spacingLeft=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="202" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav-fee" value="[tabela]  Emolumentos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="238" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav-proc" value="[wiki]  Procedimentos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="274" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav4" value="[lista]  Atos em execução" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="310" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav5" value="[graph]  Relatórios" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="346" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav6" value="[users]  Usuários" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="382" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav7" value="⚙  Configurações" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="418" width="200" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="kbc-sidebar-sub" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="60" y="234" width="180" height="200" as="geometry"/>
        </mxCell>
        <mxCell id="sub1" value="•  Visão geral" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="76" y="240" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="sub2" value="•  Subir documento" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="76" y="262" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="sub3" value="•  Versões aprovadas" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="76" y="284" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="sub-cat" value="•  Categorias e pesos" style="text;html=1;strokeColor=none;fillColor=#dceede;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#1f5d36" vertex="1" parent="1">
          <mxGeometry x="76" y="306" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="sub5" value="•  Auditoria de uso" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="76" y="328" width="160" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="page-title" value="Categorias e pesos da Knowledge Base" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="130" width="600" height="30" as="geometry"/>
        </mxCell>
        <mxCell id="page-sub" value="Você (Tabelião) define a taxonomia da KB e o peso de cada categoria. O peso é aplicado no rerank do RAG (top-K → score × kb_category.weight → top-N), influenciando direto o que a IA hermenêutica retorna." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=2;fontColor=#555" vertex="1" parent="1">
          <mxGeometry x="260" y="156" width="780" height="34" as="geometry"/>
        </mxCell>

        <mxCell id="cta-new" value="+  Nova categoria" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#2F855A;strokeColor=#2F855A;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1040" y="130" width="180" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="info-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dceede;strokeColor=#2F855A" vertex="1" parent="1">
          <mxGeometry x="260" y="200" width="940" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="info-icon" value="ⓘ" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=20;fontColor=#2F855A" vertex="1" parent="1">
          <mxGeometry x="272" y="212" width="32" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="info-txt" value="Como o peso funciona: cada chunk recuperado pelo HNSW recebe score = cos_sim × kb_category.weight. Categorias com peso mais alto sobem na lista final. Use 1.00 para fontes obrigatórias (normativos), 0.50–0.80 para fontes de apoio (jurisprudência, doutrina). Mudança de peso reflete imediatamente na próxima query — sem rebuild de índice." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#1f5d36" vertex="1" parent="1">
          <mxGeometry x="312" y="208" width="880" height="42" as="geometry"/>
        </mxCell>

        <mxCell id="tbl-h" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#2F855A;strokeColor=#2F855A" vertex="1" parent="1">
          <mxGeometry x="260" y="276" width="940" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="tbl-h0" value="⋮⋮" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="266" y="276" width="24" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="tbl-h1" value="PREVIEW DA PÍLULA" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="296" y="276" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="tbl-h2" value="NAME  ·  slug" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="460" y="276" width="180" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="tbl-h3" value="WEIGHT (0–100%)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="640" y="276" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="tbl-h4" value="COLOR" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="846" y="276" width="80" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="tbl-h5" value="STATUS" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="930" y="276" width="80" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="tbl-h6" value="CREATED BY" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="1014" y="276" width="120" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="tbl-h7" value="AÇÕES" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="1140" y="276" width="60" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="row1-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="260" y="308" width="940" height="86" as="geometry"/>
        </mxCell>
        <mxCell id="row1-drag" value="⋮⋮" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontColor=#bbb" vertex="1" parent="1">
          <mxGeometry x="266" y="308" width="24" height="86" as="geometry"/>
        </mxCell>
        <mxCell id="row1-pill" value="Normativo · 1.0" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;fontSize=10;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="296" y="332" width="140" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="row1-name" value="Normative" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="460" y="318" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="row1-name-pt" value="Normativo (UI PT-BR)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="460" y="338" width="180" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="row1-slug" value="slug: normative" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#999;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="460" y="356" width="180" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="row1-desc" value="ord: 1 · NSCGJ-SP, Provimentos CGJ-SP/CNJ" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="460" y="372" width="180" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="row1-slider-bg" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="650" y="338" width="160" height="8" as="geometry"/>
        </mxCell>
        <mxCell id="row1-slider-fill" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#1F4E79;strokeColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="650" y="338" width="160" height="8" as="geometry"/>
        </mxCell>
        <mxCell id="row1-slider-knob" value="●" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="800" y="328" width="20" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="row1-w-input" value="100  %" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=center;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="650" y="354" width="60" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row1-w-hint" value="(weight 1.00 · float)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="716" y="354" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row1-color" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1F4E79;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="846" y="332" width="32" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="row1-color-hex" value="#1F4E79 ▾" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontFamily=Courier New;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="846" y="366" width="80" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="row1-active-bg" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2F855A;strokeColor=#2F855A" vertex="1" parent="1">
          <mxGeometry x="930" y="332" width="40" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row1-active-knob" value="●" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="950" y="328" width="20" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="row1-active-lbl" value="ativo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#1f5d36" vertex="1" parent="1">
          <mxGeometry x="975" y="332" width="40" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row1-cby" value="seed" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1014" y="332" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row1-cby-date" value="seed inicial · 01/04/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="1014" y="354" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row1-acoes" value="✎  ⋮" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontColor=#2F855A;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1140" y="332" width="60" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="row2-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="260" y="394" width="940" height="86" as="geometry"/>
        </mxCell>
        <mxCell id="row2-drag" value="⋮⋮" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontColor=#bbb" vertex="1" parent="1">
          <mxGeometry x="266" y="394" width="24" height="86" as="geometry"/>
        </mxCell>
        <mxCell id="row2-pill" value="Jurisprudência · 0.8" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5e8f8;strokeColor=#7b1fa2;fontSize=10;fontColor=#6a1b9a;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="296" y="418" width="160" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="row2-name" value="Case_Law" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="460" y="404" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="row2-name-pt" value="Jurisprudência (UI PT-BR)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="460" y="424" width="180" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="row2-slug" value="slug: case_law" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#999;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="460" y="442" width="180" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="row2-desc" value="ord: 2 · acórdãos CSM, decisões corregedoria" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="460" y="458" width="180" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="row2-slider-bg" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="650" y="424" width="160" height="8" as="geometry"/>
        </mxCell>
        <mxCell id="row2-slider-fill" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#7b1fa2;strokeColor=#7b1fa2" vertex="1" parent="1">
          <mxGeometry x="650" y="424" width="128" height="8" as="geometry"/>
        </mxCell>
        <mxCell id="row2-slider-knob" value="●" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontColor=#7b1fa2" vertex="1" parent="1">
          <mxGeometry x="768" y="414" width="20" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="row2-w-input" value="80  %" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=center;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="650" y="440" width="60" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row2-w-hint" value="(weight 0.80 · float)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="716" y="440" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row2-color" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#7b1fa2;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="846" y="418" width="32" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="row2-color-hex" value="#7B1FA2 ▾" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontFamily=Courier New;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="846" y="452" width="80" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="row2-active-bg" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2F855A;strokeColor=#2F855A" vertex="1" parent="1">
          <mxGeometry x="930" y="418" width="40" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row2-active-knob" value="●" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="950" y="414" width="20" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="row2-active-lbl" value="ativo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#1f5d36" vertex="1" parent="1">
          <mxGeometry x="975" y="418" width="40" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row2-cby" value="seed" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1014" y="418" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row2-cby-date" value="seed inicial · 01/04/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="1014" y="440" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row2-acoes" value="✎  ⋮" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontColor=#2F855A;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1140" y="418" width="60" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="row3-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="260" y="480" width="940" height="86" as="geometry"/>
        </mxCell>
        <mxCell id="row3-drag" value="⋮⋮" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontColor=#bbb" vertex="1" parent="1">
          <mxGeometry x="266" y="480" width="24" height="86" as="geometry"/>
        </mxCell>
        <mxCell id="row3-pill" value="Doutrina · 0.5" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#666;fontSize=10;fontColor=#444;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="296" y="504" width="120" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="row3-name" value="Doctrine" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="460" y="490" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="row3-name-pt" value="Doutrina (UI PT-BR)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="460" y="510" width="180" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="row3-slug" value="slug: doctrine" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#999;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="460" y="528" width="180" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="row3-desc" value="ord: 3 · livros, artigos, pareceres internos" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="460" y="544" width="180" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="row3-slider-bg" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="650" y="510" width="160" height="8" as="geometry"/>
        </mxCell>
        <mxCell id="row3-slider-fill" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#666;strokeColor=#666" vertex="1" parent="1">
          <mxGeometry x="650" y="510" width="80" height="8" as="geometry"/>
        </mxCell>
        <mxCell id="row3-slider-knob" value="●" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="720" y="500" width="20" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="row3-w-input" value="50  %" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=center;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="650" y="526" width="60" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row3-w-hint" value="(weight 0.50 · float)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="716" y="526" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row3-color" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#666666;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="846" y="504" width="32" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="row3-color-hex" value="#666666 ▾" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontFamily=Courier New;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="846" y="538" width="80" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="row3-active-bg" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2F855A;strokeColor=#2F855A" vertex="1" parent="1">
          <mxGeometry x="930" y="504" width="40" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row3-active-knob" value="●" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="950" y="500" width="20" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="row3-active-lbl" value="ativo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#1f5d36" vertex="1" parent="1">
          <mxGeometry x="975" y="504" width="40" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row3-cby" value="seed" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1014" y="504" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row3-cby-date" value="seed inicial · 01/04/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="1014" y="526" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row3-acoes" value="✎  ⋮" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontColor=#2F855A;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1140" y="504" width="60" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="row4-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#e0e0e0;dashed=1" vertex="1" parent="1">
          <mxGeometry x="260" y="566" width="940" height="86" as="geometry"/>
        </mxCell>
        <mxCell id="row4-drag" value="⋮⋮" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontColor=#bbb" vertex="1" parent="1">
          <mxGeometry x="266" y="566" width="24" height="86" as="geometry"/>
        </mxCell>
        <mxCell id="row4-edit-badge" value="EDITANDO INLINE" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=8;fontColor=#995200;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="296" y="572" width="100" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="row4-pill" value="Manual interno · 0.6" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#cc6600;fontSize=10;fontColor=#995200;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="296" y="590" width="160" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="row4-pill-hint" value="(preview ao vivo)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;fontStyle=2;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="296" y="618" width="160" height="14" as="geometry"/>
        </mxCell>
        <mxCell id="row4-name-input" value="Manual_Interno" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cc6600;fontSize=11;align=left;spacingLeft=8;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="460" y="576" width="180" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="row4-slug-input" value="slug: manual_interno  (auto)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=9;align=left;spacingLeft=8;fontFamily=Courier New;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="460" y="604" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="row4-desc-input" value="manuais e POPs internos do cartório" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=9;align=left;spacingLeft=8;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="460" y="628" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="row4-slider-bg" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="650" y="596" width="160" height="8" as="geometry"/>
        </mxCell>
        <mxCell id="row4-slider-fill" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#cc6600;strokeColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="650" y="596" width="96" height="8" as="geometry"/>
        </mxCell>
        <mxCell id="row4-slider-knob" value="●" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="736" y="586" width="20" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="row4-w-input" value="60  %" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cc6600;fontSize=10;align=center;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="650" y="612" width="60" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row4-w-hint" value="(weight 0.60)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="716" y="612" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row4-color" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#CC6600;strokeColor=#cc6600;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="846" y="590" width="32" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="row4-color-hex" value="#CC6600 ▾" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontFamily=Courier New;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="846" y="624" width="80" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="row4-active-bg" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2F855A;strokeColor=#2F855A" vertex="1" parent="1">
          <mxGeometry x="930" y="590" width="40" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row4-active-knob" value="●" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="950" y="586" width="20" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="row4-active-lbl" value="ativo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#1f5d36" vertex="1" parent="1">
          <mxGeometry x="975" y="590" width="40" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row4-cby" value="Lucas C. (Tabelião)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1014" y="590" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row4-cby-date" value="agora · não salvo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="1014" y="612" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row4-save" value="✓ salvar" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#2F855A;strokeColor=#2F855A;fontColor=#ffffff;fontSize=9;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1140" y="590" width="60" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row4-cancel" value="cancelar" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="1140" y="616" width="60" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="row5-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="260" y="652" width="940" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="row5-drag" value="⋮⋮" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontColor=#ccc" vertex="1" parent="1">
          <mxGeometry x="266" y="652" width="24" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="row5-pill" value="Súmula CSM · 0.7 (inativa)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=10;fontColor=#999;fontStyle=4" vertex="1" parent="1">
          <mxGeometry x="296" y="666" width="160" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="row5-name" value="Sumula_CSM" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="460" y="660" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="row5-slug" value="slug: sumula_csm  ·  ord: 4" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#999;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="460" y="680" width="200" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="row5-w" value="70%  (weight 0.70)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#999;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="650" y="670" width="180" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row5-color" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#999999;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="846" y="668" width="32" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row5-active-bg" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#cccccc;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="930" y="670" width="40" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row5-active-knob" value="●" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="930" y="666" width="20" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="row5-active-lbl" value="inativa" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="975" y="670" width="40" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row5-cby" value="Lucas C. · 14/04/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="1014" y="670" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row5-acoes" value="✎  ⋮" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontColor=#666;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1140" y="670" width="60" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="seeded-note" value="Seed inicial: Normative · Case_Law · Doctrine (criadas no provisionamento do tenant). Tabelião pode adicionar ilimitadas categorias depois — cada uma vira filtro no upload e na busca da KB." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#1f5d36" vertex="1" parent="1">
          <mxGeometry x="260" y="720" width="940" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="impact-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dceede;strokeColor=#2F855A" vertex="1" parent="1">
          <mxGeometry x="260" y="754" width="940" height="76" as="geometry"/>
        </mxCell>
        <mxCell id="impact-title" value="Impacto da última alteração de peso (preview de auditoria)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#1f5d36" vertex="1" parent="1">
          <mxGeometry x="276" y="760" width="500" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="impact-line1" value="• Doctrine 0.5 → 0.6 reordena 18 chunks no top-N de 47 queries do último mês (Flow A)." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1f5d36" vertex="1" parent="1">
          <mxGeometry x="276" y="782" width="900" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="impact-line2" value="• Mudanças de weight são logadas em audit_log (DynamoDB) com hash chain HMAC. Não há rebuild de índice — efeito imediato na próxima query." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1f5d36" vertex="1" parent="1">
          <mxGeometry x="276" y="800" width="900" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX (R5)&#10;1. Cluster KB usa #2F855A (verde) — header da tabela, CTA primário, toggles ativo, callout impacto. Mantém significado &quot;KB&quot; consistente com 07-data-model.&#10;2. Coluna PREVIEW DA PÍLULA é a primeira após drag-handle: o tabelião vê EXATAMENTE como a pílula vai aparecer nas listas (KBC dashboard, lista de versões, detalhe doc). WYSIWYG real, não promessa.&#10;3. Slider 0–100% mostra valor humano + valor float entre parênteses (weight 0.50). Math abstraída pra leitura rápida, exposta pra confiança técnica.&#10;4. Drag-handle ⋮⋮ na primeira coluna controla sort_order. Reordenar arrastando equivale a editar sort_order — mais natural que digitar.&#10;5. Edição inline (linha 4) usa borda laranja temporária + badge EDITANDO INLINE. Salva atomicamente com botão verde + cancelar. Sem modal.&#10;6. Linha INATIVA (5) fica desbotada mas presente — tabelião precisa ver pra entender que kb_documents continuam vinculados, só param de aparecer em filtros novos.&#10;7. Callout verde no rodapé exibe impacto da última alteração de peso — fechando o loop entre &quot;mexi no slider&quot; e &quot;o que isso muda no RAG&quot;. Educação contínua.&#10;8. Color picker mostra hex em mono — color codes como dados auditáveis, não só estética.&#10;9. created_by mostra &quot;seed&quot; (system-generated) ou nome do usuário. Distingue defaults do tenant das customizações." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dceede;strokeColor=#2F855A;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1260" y="120" width="220" height="700" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="01-kbc-dashboard" name="01-kbc-dashboard">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="KBC 01 — Dashboard da Knowledge Base Cartorial (normativos, jurisprudência, doutrina)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1100" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="Knowledge Base Cartorial" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="300" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="sidebar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="200" height="744" as="geometry"/>
        </mxCell>
        <mxCell id="nav1" value="▣  Dashboard" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="130" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav2" value="[catalogo]  Modelos de ato" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="166" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav3" value="[folder]  Knowledge Base" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=none;fontSize=11;align=left;spacingLeft=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="202" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav-fee" value="[tabela]  Emolumentos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="238" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav-proc" value="[wiki]  Procedimentos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="274" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav4" value="[lista]  Atos em execução" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="310" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav5" value="[graph]  Relatórios" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="346" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav6" value="[users]  Usuários" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="382" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav7" value="⚙  Configurações" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="418" width="200" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="kbc-sidebar-sub" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="60" y="234" width="180" height="180" as="geometry"/>
        </mxCell>
        <mxCell id="sub1" value="•  Visão geral" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="76" y="240" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="sub2" value="•  Subir documento" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="76" y="262" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="sub3" value="•  Versões aprovadas" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="76" y="284" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="sub-cat" value="•  Categorias e pesos" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="76" y="306" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="sub5" value="•  Auditoria de uso" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="76" y="328" width="160" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="welcome" value="Knowledge Base do 27º Tabelionato" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="130" width="600" height="30" as="geometry"/>
        </mxCell>
        <mxCell id="welcome-sub" value="Você é o Controlador. A Stoix processa, você aprova. Esta KB cobre normativos, jurisprudência e doutrina — emolumentos, modelos de ato e procedimentos têm módulos próprios na barra lateral." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=2;fontColor=#555" vertex="1" parent="1">
          <mxGeometry x="260" y="156" width="800" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="cta-upload" value="+  Subir novo documento" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1F4E79;strokeColor=#1F4E79;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1040" y="130" width="180" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="kpi-title" value="Documentos por categoria · peso aplicado no rerank RAG" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#555" vertex="1" parent="1">
          <mxGeometry x="260" y="196" width="700" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="kpi1" value="NORMATIVO&#10;14" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#1F4E79;strokeWidth=2;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="260" y="222" width="300" height="92" as="geometry"/>
        </mxCell>
        <mxCell id="kpi1-weight" value="peso 1.0" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#1F4E79;strokeColor=#1F4E79;fontColor=#ffffff;fontSize=9;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="490" y="232" width="60" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="kpi1-sub" value="NSCGJ-SP, provimentos CGJ-SP, provimentos CNJ" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="272" y="282" width="280" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="kpi2" value="JURISPRUDÊNCIA&#10;6" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#7b1fa2;strokeWidth=2;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10;fontColor=#6a1b9a" vertex="1" parent="1">
          <mxGeometry x="580" y="222" width="300" height="92" as="geometry"/>
        </mxCell>
        <mxCell id="kpi2-weight" value="peso 0.8" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#7b1fa2;strokeColor=#7b1fa2;fontColor=#ffffff;fontSize=9;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="810" y="232" width="60" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="kpi2-sub" value="acórdãos CSM, decisões corregedoria, súmulas" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="592" y="282" width="280" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="kpi3" value="DOUTRINA&#10;7" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#666;strokeWidth=2;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="900" y="222" width="300" height="92" as="geometry"/>
        </mxCell>
        <mxCell id="kpi3-weight" value="peso 0.5" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#666;strokeColor=#666;fontColor=#ffffff;fontSize=9;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1130" y="232" width="60" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="kpi3-sub" value="livros, artigos, pareceres internos" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="912" y="282" width="280" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="cat-link" value="Gerenciar categorias e pesos →" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="320" width="240" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="alerts-title" value="Atenção — itens que exigem ação" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="350" width="600" height="25" as="geometry"/>
        </mxCell>

        <mxCell id="alert1" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="260" y="380" width="940" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="alert1-icon" value="!" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=20;fontColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="272" y="390" width="40" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="alert1-txt" value="Provimento CGJ-SP 28/2024 (normativo, peso 1.0) expira em 23 dias (31/12/2026). Subir versão substituta antes do vencimento para não bloquear cobrança no Fluxo B." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="320" y="390" width="700" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="alert1-cta" value="Atualizar agora →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#cc6600;strokeColor=#cc6600;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1060" y="392" width="130" height="34" as="geometry"/>
        </mxCell>

        <mxCell id="alert2" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="450" width="940" height="46" as="geometry"/>
        </mxCell>
        <mxCell id="alert2-icon" value="ⓘ" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="272" y="458" width="40" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="alert2-txt" value="3 documentos sem vigência cadastrada — sistema não saberá quando expiram. Edite metadados antes de aprovar." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="320" y="458" width="700" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="alert2-cta" value="Ver pendências" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontColor=#333;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1080" y="458" width="110" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="recent-title" value="Últimas 5 versões aprovadas" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="516" width="600" height="25" as="geometry"/>
        </mxCell>
        <mxCell id="recent-link" value="Ver tudo →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="1100" y="516" width="100" height="25" as="geometry"/>
        </mxCell>

        <mxCell id="recent-list" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="548" width="940" height="282" as="geometry"/>
        </mxCell>

        <mxCell id="rh1" value="DOCUMENTO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="276" y="558" width="380" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="rh2" value="CATEGORIA · PESO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="660" y="558" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="rh3" value="VIGÊNCIA" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="826" y="558" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="rh4" value="APROVADA" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="990" y="558" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="rh5" value="" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9" vertex="1" parent="1">
          <mxGeometry x="1090" y="558" width="100" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="row1-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="276" y="584" width="908" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="row1-c1" value="NSCGJ-SP Tomo II — Cap. XIV (Notas)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="284" y="588" width="370" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row1-c1b" value="hash 7e2a...8ff · 312 KB · PDF original" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="284" y="610" width="370" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="row1-c2" value="Normativo · 1.0" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;fontSize=9;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="660" y="596" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row1-c3" value="20/03/2026 — perpétuo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="826" y="596" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row1-c4" value="Lucas C. · 21/03/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="990" y="596" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row1-pill" value="VIGENTE" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f5e9;strokeColor=#5c8a3e;fontSize=9;fontColor=#3a6027;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="596" width="76" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="row2-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="276" y="636" width="908" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="row2-c1" value="Provimento CNJ 149/2023 (regularizado interno)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="284" y="640" width="370" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row2-c1b" value="hash 4d8f...112 · 96 KB · PDF original" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="284" y="662" width="370" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="row2-c2" value="Normativo · 1.0" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;fontSize=9;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="660" y="648" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row2-c3" value="01/03/2026 — perpétuo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="826" y="648" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row2-c4" value="Lucas C. · 04/03/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="990" y="648" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row2-pill" value="VIGENTE" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f5e9;strokeColor=#5c8a3e;fontSize=9;fontColor=#3a6027;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="648" width="76" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="row3-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="276" y="688" width="908" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="row3-c1" value="CSM-SP Acórdão 2024/0089 — usufruto vidual" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="284" y="692" width="370" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row3-c1b" value="hash bc41...d09 · 42 KB · PDF original" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="284" y="714" width="370" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="row3-c2" value="Jurisprudência · 0.8" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5e8f8;strokeColor=#7b1fa2;fontSize=9;fontColor=#6a1b9a;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="660" y="700" width="140" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row3-c3" value="15/04/2026 — perpétuo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="826" y="700" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row3-c4" value="Lucas C. · 15/04/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="990" y="700" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row3-pill" value="VIGENTE" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f5e9;strokeColor=#5c8a3e;fontSize=9;fontColor=#3a6027;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="700" width="76" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="row4-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="276" y="740" width="908" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="row4-c1" value="Provimento CGJ-SP 28/2024 — qualificação de outorgantes" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="284" y="744" width="370" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row4-c1b" value="hash 22ca...903 · 58 KB · PDF original" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="284" y="766" width="370" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="row4-c2" value="Normativo · 1.0" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;fontSize=9;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="660" y="752" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row4-c3" value="01/01/2026 — 31/12/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="826" y="752" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row4-c4" value="Lucas C. · 02/01/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="990" y="752" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row4-pill" value="VENCE 23d" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=9;fontColor=#995200;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="752" width="76" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="row5-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="276" y="792" width="908" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="row5-c1" value="Loureiro — Manual de Direito Notarial (cap. III)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="284" y="796" width="370" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row5-c1b" value="hash 9a18...77c · 184 KB · PDF original · referência interna" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="284" y="814" width="370" height="14" as="geometry"/>
        </mxCell>
        <mxCell id="row5-c2" value="Doutrina · 0.5" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#666;fontSize=9;fontColor=#444;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="660" y="800" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row5-c3" value="20/04/2026 — perpétuo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="826" y="800" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row5-c4" value="Lucas C. · 20/04/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="990" y="800" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row5-pill" value="VIGENTE" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f5e9;strokeColor=#5c8a3e;fontSize=9;fontColor=#3a6027;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="800" width="76" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX (R5)&#10;1. Hierarquia: alerta laranja &gt; CTA &quot;Subir&quot; &gt; KPIs por categoria &gt; lista recente. Tabelião identifica em 2s o que precisa.&#10;2. KBC reduzida ao escopo R5: só normativo + jurisprudência + doutrina. Emolumentos, modelos e procedimentos têm módulos próprios na sidebar (links visíveis acima).&#10;3. Pílulas viraram CATEGORIA (gerenciada pelo Tabelião) em vez de TIPO fixo. Cor segue a definida em kb_category. Defaults seed: Normativo (azul, 1.0), Jurisprudência (roxo, 0.8), Doutrina (cinza, 0.5).&#10;4. Peso aplicado no rerank do RAG (top-K → score × kb_category.weight → top-N). Mostrar o peso na pílula educa o Tabelião sobre o efeito real da decisão dele.&#10;5. Hash visível por linha — auditoria material. Sem hash, KB perde valor probatório.&#10;6. CTA &quot;Atualizar agora&quot; no alerta de vencimento leva direto pro upload com categoria do normativo expirando pré-selecionada.&#10;7. Sub-navegação à esquerda inclui &quot;Categorias e pesos&quot; — onde o Tabelião cria/edita kb_category.&#10;8. Bucket lógico: notary-{slug}-kb (R5 rename). Tabelião não vê path de S3, só hash." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1260" y="120" width="220" height="600" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="02-kbc-upload-passo-1-metadados" name="02-kbc-upload-passo-1-metadados">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="KBC 02 — Upload · Passo 1 · Drop file e metadados" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="900" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="Knowledge Base / Subir documento" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="350" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="sidebar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="200" height="744" as="geometry"/>
        </mxCell>
        <mxCell id="nav3" value="[folder]  Knowledge Base" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=none;fontSize=11;align=left;spacingLeft=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="130" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="sub2" value="•  Subir documento" style="text;html=1;strokeColor=none;fillColor=#f0f0f0;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="170" width="180" height="26" as="geometry"/>
        </mxCell>

        <mxCell id="stepper" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="140" width="940" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step1" value="● 1. Drop file e metadados" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="140" width="240" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step2" value="○ 2. Processando" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="500" y="140" width="200" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step3" value="○ 3. Diff e edição" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="700" y="140" width="240" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step4" value="○ 4. Aprovar versão" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="940" y="140" width="220" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="responsabilidade" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#cc6600;strokeWidth=1.5" vertex="1" parent="1">
          <mxGeometry x="260" y="216" width="940" height="58" as="geometry"/>
        </mxCell>
        <mxCell id="responsabilidade-icon" value="ⓘ" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontColor=#cc6600;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="272" y="226" width="34" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="responsabilidade-txt" value="Responsabilidade do Controlador. Você é responsável pela conformidade da fonte que está subindo. A Stoix processa o documento (OCR + IA), você revisa, aprova e atesta a vigência. A versão aprovada por você é a fonte oficial — todo ato lavrado registra qual versão da KB foi consultada (snapshot por hash em billing_event)." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="312" y="222" width="870" height="48" as="geometry"/>
        </mxCell>

        <mxCell id="leftcol-title" value="Arquivo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="290" width="400" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="dropzone" value="[ Arraste o arquivo aqui ou clique para selecionar ]&#10;PDF · DOCX · HTML · até 50 MB&#10;Para fontes oficiais (CGJ-SP, CNJ, CSM-SP), prefira o PDF original assinado.&#10;Esta KB recebe normativos, jurisprudência e doutrina." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=12;dashed=1;align=center;verticalAlign=middle" vertex="1" parent="1">
          <mxGeometry x="260" y="330" width="540" height="200" as="geometry"/>
        </mxCell>

        <mxCell id="file-uploaded" value="[doc]  cgj-sp-provimento-31-2026-qualif-outorgantes.pdf · 96 KB · ✓ enviado" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e8f5e9;strokeColor=#5c8a3e;fontSize=11;align=left;spacingLeft=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="540" width="540" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="rightcol-title" value="Metadados" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="820" y="290" width="400" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-cat" value="Categoria *" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="820" y="326" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="cat-help" value="categoria define a cor da pílula e o peso aplicado no rerank do RAG" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="820" y="346" width="380" height="14" as="geometry"/>
        </mxCell>

        <mxCell id="cat-dd-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="820" y="364" width="380" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="cat-dd-pill" value="Normativo" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;fontSize=10;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="830" y="372" width="100" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="cat-dd-weight" value="peso 1.0" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="940" y="372" width="80" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="cat-dd-arrow" value="▾" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12" vertex="1" parent="1">
          <mxGeometry x="1170" y="372" width="20" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="cat-options-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#1F4E79;strokeWidth=1.5;shadow=1" vertex="1" parent="1">
          <mxGeometry x="820" y="402" width="380" height="156" as="geometry"/>
        </mxCell>
        <mxCell id="cat-opt1-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="820" y="402" width="380" height="34" as="geometry"/>
        </mxCell>
        <mxCell id="cat-opt1-pill" value="Normativo" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;fontSize=10;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="832" y="410" width="100" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="cat-opt1-w" value="peso 1.0 · 14 docs" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="942" y="410" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="cat-opt1-check" value="✓" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1170" y="410" width="20" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="cat-opt2-pill" value="Jurisprudência" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5e8f8;strokeColor=#7b1fa2;fontSize=10;fontColor=#6a1b9a;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="832" y="446" width="100" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="cat-opt2-w" value="peso 0.8 · 6 docs" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="942" y="446" width="200" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="cat-opt3-pill" value="Doutrina" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#666;fontSize=10;fontColor=#444;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="832" y="480" width="100" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="cat-opt3-w" value="peso 0.5 · 7 docs" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="942" y="480" width="200" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="cat-divider" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="828" y="516" width="364" height="1" as="geometry"/>
        </mxCell>
        <mxCell id="cat-new" value="+ nova categoria…" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#1F4E79;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="820" y="524" width="380" height="28" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-vigencia" value="Vigência *" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="820" y="576" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="vig-from-lbl" value="Início (effective_from)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="820" y="596" width="170" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="vig-from" value="01/01/2026  [date]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="820" y="616" width="170" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="vig-to-lbl" value="Fim (effective_until)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1010" y="596" width="170" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="vig-to" value="—  [date]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="1010" y="616" width="170" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="vig-perp" value="☑  Perpétuo (sem prazo de fim — normativo permanente)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="820" y="654" width="380" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-origem" value="Origem *" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="820" y="686" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="origem-dd" value="Oficial CGJ-SP  ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="820" y="706" width="360" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="origem-help" value="opções: oficial CGJ-SP · oficial CNJ · acórdão CSM-SP · doutrina · interno do cartório" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="820" y="742" width="360" height="14" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-tags" value="Tags" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="610" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="tags-input" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=8;spacingTop=6" vertex="1" parent="1">
          <mxGeometry x="260" y="630" width="540" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="chip1" value="qualificação" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;fontSize=10;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="270" y="640" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="chip2" value="cgj-sp" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;fontSize=10;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="378" y="640" width="62" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="chip3" value="provimento" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;fontSize=10;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="448" y="640" width="90" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="tags-input-cursor" value="adicionar tag…" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="548" y="640" width="180" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="btn-cancel" value="Cancelar" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="260" y="780" width="100" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-rascunho" value="Salvar como rascunho" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="370" y="780" width="160" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-next" value="Processar com IA →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1F4E79;strokeColor=#1F4E79;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1040" y="780" width="160" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX (R5)&#10;1. Layout 2 colunas: arquivo à esquerda, metadados à direita. Lê de cima pra baixo, esquerda pra direita.&#10;2. Banner amarelo de Responsabilidade NÃO é fechável — Tabelião precisa ler em todo upload (defesa material). Cita billing_event como snapshot por hash.&#10;3. CATEGORIA agora é um select dinâmico (era radio fixo de 5 tipos). Cada opção mostra a pílula colorida + o peso + contagem de docs. Decisão R5: cada Tabelionato gerencia suas próprias kb_category.&#10;4. &quot;+ nova categoria…&quot; inline abre form pop pra criar kb_category (nome, cor hex, peso 0.0-1.0). Não tira o Tabelião do fluxo de upload.&#10;5. Defaults seed visíveis: Normativo (azul, 1.0), Jurisprudência (roxo, 0.8), Doutrina (cinza, 0.5).&#10;6. Vigência: 2 datas + toggle &quot;perpétuo&quot;. Labels técnicos entre parênteses (effective_from/effective_until) — reforça o vínculo com o schema kb_version sem assustar o Tabelião.&#10;7. Tags livres mas auto-sugeridas com base na categoria + título (Sonnet faz a sugestão na hora do upload).&#10;8. CTA principal escuro destaca acionamento da IA. &quot;Salvar rascunho&quot; sempre disponível.&#10;9. Microcopy do dropzone diz &quot;normativos, jurisprudência e doutrina&quot; — escopo R5 explicitado. Emolumento, modelo e procedimento têm fluxos próprios de upload.&#10;10. Acessibilidade: select navegável por seta; campos de data aceitam digitação além do picker." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1260" y="120" width="220" height="700" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="03-kbc-upload-passo-2-processando" name="03-kbc-upload-passo-2-processando">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="KBC 03 — Upload · Passo 2 · Processando (OCR + IA + estruturação)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1100" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="Knowledge Base / Subir normativo / Processando" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="400" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="sidebar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="200" height="744" as="geometry"/>
        </mxCell>
        <mxCell id="nav3" value="[folder]  Knowledge Base" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=none;fontSize=11;align=left;spacingLeft=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="130" width="200" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="stepper" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="140" width="940" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step1" value="✓ 1. Drop file e metadados" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#3a6027" vertex="1" parent="1">
          <mxGeometry x="260" y="140" width="240" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step2" value="● 2. Processando" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="500" y="140" width="200" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step3" value="○ 3. Diff e edição" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="700" y="140" width="240" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step4" value="○ 4. Aprovar versão" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="940" y="140" width="220" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="status-title" value="cgj-sp-provimento-31-2026-qualif-outorgantes.pdf" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="232" width="940" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="status-sub" value="Processando · você pode fechar esta tela e voltar quando estiver pronto · enviaremos notificação" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="260" y="262" width="940" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="step-card1" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e8f5e9;strokeColor=#5c8a3e;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="320" y="320" width="820" height="64" as="geometry"/>
        </mxCell>
        <mxCell id="step-card1-icon" value="✓" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=22;fontColor=#3a6027;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="332" y="332" width="40" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="step-card1-name" value="Upload concluído" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="380" y="328" width="400" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="step-card1-desc" value="96 KB recebidos · armazenado em bucket notary-27sp-kb · KMS criptografado" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#555" vertex="1" parent="1">
          <mxGeometry x="380" y="350" width="600" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="step-card1-time" value="2s" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#3a6027;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1060" y="340" width="60" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="step-card2" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e8f5e9;strokeColor=#5c8a3e;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="320" y="396" width="820" height="64" as="geometry"/>
        </mxCell>
        <mxCell id="step-card2-icon" value="✓" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=22;fontColor=#3a6027;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="332" y="408" width="40" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="step-card2-name" value="OCR concluído" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="380" y="404" width="400" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="step-card2-desc" value="Textract sa-east-1 · 8 páginas · 98% confiança média · estrutura art./§/inciso preservada" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#555" vertex="1" parent="1">
          <mxGeometry x="380" y="426" width="600" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="step-card2-time" value="38s" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#3a6027;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1060" y="416" width="60" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="step-card3" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="320" y="472" width="820" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="step-card3-icon" value="[aguarda]" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=22" vertex="1" parent="1">
          <mxGeometry x="332" y="492" width="40" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="step-card3-name" value="Extração hermenêutica com IA — em andamento" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="380" y="484" width="500" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="step-card3-desc" value="Bedrock Sonnet 4.5 sa-east-1 · identificando trechos normativos, structural anchors (art./§/inciso) e referências cruzadas" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#555" vertex="1" parent="1">
          <mxGeometry x="380" y="506" width="640" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="progressbar-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="380" y="534" width="600" height="10" as="geometry"/>
        </mxCell>
        <mxCell id="progressbar-fg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1F4E79;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="380" y="534" width="380" height="10" as="geometry"/>
        </mxCell>
        <mxCell id="progressbar-pct" value="63%" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="990" y="528" width="40" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="step-card3-time" value="~ 50s restantes" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1F4E79;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="990" y="548" width="120" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="step-card4" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="320" y="584" width="820" height="64" as="geometry"/>
        </mxCell>
        <mxCell id="step-card4-icon" value="○" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=22;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="332" y="596" width="40" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="step-card4-name" value="Chunking e indexação vetorial" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="380" y="592" width="400" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="step-card4-desc" value="Embeddings Titan Embed v2 (dim 1024) · gravação em kb_chunk · pgvector HNSW (m=16, ef_construction=64)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="380" y="614" width="640" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="step-card4-time" value="~ 30s" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#999;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="1060" y="604" width="60" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="cancel-area" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="320" y="688" width="820" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="cancel-info" value="ⓘ  Você pode cancelar agora — nada cobrado. Após estruturação, descarte ainda é possível na tela seguinte." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="320" y="688" width="640" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="btn-cancel" value="Cancelar processamento" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cc0000;fontSize=11;fontColor=#cc0000" vertex="1" parent="1">
          <mxGeometry x="980" y="690" width="160" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="aside-title" value="Estimativa de custo desta extração" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="320" y="744" width="400" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="aside-row" value="OCR Textract · 8 páginas · ≈ R$ 0,12       Bedrock Sonnet 4.5 · ≈ R$ 0,22       Titan Embed v2 · ≈ R$ 0,01       Total estimado: R$ 0,35" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="320" y="766" width="820" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX&#10;1. 4 cards verticais empilhados — feedback de progresso linear, sem acordeon.&#10;2. Estado de cada card é visível pelo cor da borda + ícone:&#10;   verde + ✓ = concluído&#10;   azul + [aguarda] = em andamento (com progress bar e ETA)&#10;   cinza + ○ = pendente&#10;3. ETA em cima e tempo decorrido na lateral direita — Tabelião sabe quanto falta sem precisar fazer conta.&#10;4. Microcopy explícita: pode fechar tela sem perder progresso, notificação avisa quando pronto. Reduz ansiedade.&#10;5. Cancelamento sempre disponível durante OCR/Extração com aviso de gratuidade. Após estruturação, custo já foi gasto — descarte é diferente de cancelar.&#10;6. Estimativa de custo aparece desde o início — transparência radical (Stoix usa contrato pay-as-you-process, isso evita reclamação na fatura).&#10;7. Estado de erro: card 3 muda pra fillColor vermelho claro, ícone ✕, mensagem (&quot;OCR falhou — provavelmente PDF protegido. Tentar novamente ou subir PDF desbloqueado&quot;) e CTA &quot;Tentar de novo&quot;." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1260" y="120" width="220" height="540" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="04-kbc-diff-extracao" name="04-kbc-diff-extracao">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="KBC 04 — Diff visual de extração · revisão dos chunks (kb_chunk + Titan Embed v2 + structural anchor)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=15;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1200" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="KB / Subir / Diff de extração — Provimento CGJ-SP 31/2026 (rascunho)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="500" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="stepper" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="40" y="124" width="1200" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step1" value="✓ 1. Drop file" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#3a6027" vertex="1" parent="1">
          <mxGeometry x="40" y="124" width="280" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step2" value="✓ 2. Processado" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#3a6027" vertex="1" parent="1">
          <mxGeometry x="320" y="124" width="280" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step3" value="● 3. Diff e edição" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="600" y="124" width="320" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="step4" value="○ 4. Aprovar versão" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="920" y="124" width="320" height="44" as="geometry"/>
        </mxCell>

        <mxCell id="lefthead" value="DOCUMENTO ORIGINAL — cgj-sp-provimento-31-2026.pdf · pág 3/8" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1F4E79;strokeColor=#1F4E79;fontColor=#ffffff;fontSize=11;fontStyle=1;align=left;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="40" y="180" width="500" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="righthead" value="CHUNKS EXTRAÍDOS (kb_chunk) — editáveis" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1F4E79;strokeColor=#1F4E79;fontColor=#ffffff;fontSize=11;fontStyle=1;align=left;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="540" y="180" width="500" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="confhead" value="CONFIANÇA POR CHUNK" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1F4E79;strokeColor=#1F4E79;fontColor=#ffffff;fontSize=11;fontStyle=1;align=left;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="1040" y="180" width="200" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="leftpane" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="40" y="212" width="500" height="560" as="geometry"/>
        </mxCell>

        <mxCell id="pdf-line1" value="PROVIMENTO CGJ-SP Nº 31, DE 02 DE JANEIRO DE 2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="56" y="226" width="470" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="pdf-line2" value="Dispõe sobre a qualificação de outorgantes e poderes em escrituras públicas." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="56" y="248" width="470" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="pdf-art-h" value="CAPÍTULO II — DOS REQUISITOS DE QUALIFICAÇÃO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="56" y="282" width="470" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="pdf-hl1" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8c4;strokeColor=#cc6600;strokeWidth=1;dashed=1" vertex="1" parent="1">
          <mxGeometry x="50" y="306" width="480" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="pdf-row1" value="Art. 7º — A qualificação dos outorgantes em escritura pública será feita mediante apresentação de documento de identidade válido e CPF, conferida nominal e fotograficamente pelo tabelião ou escrevente autorizado." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="56" y="306" width="470" height="44" as="geometry"/>
        </mxCell>

        <mxCell id="pdf-hl2" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8c4;strokeColor=#cc6600;strokeWidth=1;dashed=1" vertex="1" parent="1">
          <mxGeometry x="50" y="354" width="480" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="pdf-row2" value="§ 1º — Quando o outorgante for pessoa jurídica, exige-se também: I — contrato/estatuto social atualizado; II — ata de eleição/designação dos representantes legais vigente; III — certidão simplificada da Junta Comercial (até 30 dias)." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="56" y="354" width="470" height="56" as="geometry"/>
        </mxCell>

        <mxCell id="pdf-hl3" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8c4;strokeColor=#cc6600;strokeWidth=1;dashed=1" vertex="1" parent="1">
          <mxGeometry x="50" y="414" width="480" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="pdf-row3" value="§ 2º — Estrangeiros não residentes apresentarão passaporte e RNE/CRNM, sendo dispensado o CPF se a finalidade for ato sem repercussão tributária." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="56" y="414" width="470" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="pdf-hl4" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fde8e8;strokeColor=#cc0000;strokeWidth=1;dashed=1" vertex="1" parent="1">
          <mxGeometry x="50" y="450" width="480" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="pdf-row4" value="Art. 8º — Procurações outorgadas há mais de 90 (noven|ta) dias exigem confirmação telefônica do outorgante, salvo quando lavradas no próprio cartório ou contiverem firma reconhecida por autenticidade nos últimos 30 dias." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="56" y="450" width="470" height="56" as="geometry"/>
        </mxCell>

        <mxCell id="pdf-row5" value="Art. 9º — Em caso de outorgante incapaz ou relativamente capaz, exigir-se-á alvará judicial específico ou, conforme o caso, presença e assistência do representante/assistente legal." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="56" y="510" width="470" height="56" as="geometry"/>
        </mxCell>

        <mxCell id="pdf-note" value="(continua na pág. 4 — Capítulo III: poderes especiais)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="56" y="582" width="470" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="pdf-pagination" value="◀ pág 3 de 8 ▶" style="text;html=1;strokeColor=none;fillColor=#f0f0f0;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="200" y="740" width="180" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="rightpane" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="540" y="212" width="500" height="560" as="geometry"/>
        </mxCell>

        <mxCell id="ext-table-title" value="kb_chunk · 5 chunks (Tier 1: hierárquico estrutural Art./§/Inciso)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="556" y="226" width="470" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="ext-pill-cat" value="Normativo · peso 1.0" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;fontSize=9;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="900" y="226" width="130" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="ext-c1-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="550" y="252" width="480" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="ext-c1-anchor" value="anchor: art_7_caput" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="558" y="256" width="200" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="ext-c1-tokens" value="312 tokens · embed dim 1024" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="820" y="256" width="200" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="ext-c1-text" value="Art. 7º — A qualificação dos outorgantes em escritura pública será feita mediante apresentação de documento de identidade válido e CPF, conferida nominal e fotograficamente pelo tabelião ou escrevente autorizado." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=2;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="550" y="274" width="480" height="56" as="geometry"/>
        </mxCell>

        <mxCell id="ext-c2-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="550" y="332" width="480" height="92" as="geometry"/>
        </mxCell>
        <mxCell id="ext-c2-anchor" value="anchor: art_7_§1" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="558" y="336" width="200" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="ext-c2-tokens" value="358 tokens · embed dim 1024" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="820" y="336" width="200" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="ext-c2-text" value="§ 1º — Quando o outorgante for pessoa jurídica, exige-se também: I — contrato/estatuto social atualizado; II — ata de eleição/designação dos representantes legais vigente; III — certidão simplificada da Junta Comercial (até 30 dias)." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=2;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="550" y="354" width="480" height="68" as="geometry"/>
        </mxCell>

        <mxCell id="ext-c3-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="550" y="424" width="480" height="68" as="geometry"/>
        </mxCell>
        <mxCell id="ext-c3-anchor" value="anchor: art_7_§2" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="558" y="428" width="200" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="ext-c3-tokens" value="186 tokens · embed dim 1024" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="820" y="428" width="200" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="ext-c3-text" value="§ 2º — Estrangeiros não residentes apresentarão passaporte e RNE/CRNM, sendo dispensado o CPF se a finalidade for ato sem repercussão tributária." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=2;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="550" y="446" width="480" height="44" as="geometry"/>
        </mxCell>

        <mxCell id="ext-c4-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fde8e8;strokeColor=#cc0000;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="550" y="492" width="480" height="92" as="geometry"/>
        </mxCell>
        <mxCell id="ext-c4-anchor" value="anchor: art_8_caput  ⚠ revisar" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#cc0000" vertex="1" parent="1">
          <mxGeometry x="558" y="496" width="240" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="ext-c4-tokens" value="298 tokens · embed dim 1024" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="820" y="496" width="200" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="ext-c4-text" value="Art. 8º — Procurações outorgadas há mais de 90 (noven|ta) dias exigem confirmação telefônica do outorgante, salvo quando lavradas no próprio cartório ou contiverem firma reconhecida por autenticidade nos últimos 30 dias." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=2;spacingLeft=8;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="550" y="514" width="480" height="68" as="geometry"/>
        </mxCell>

        <mxCell id="ext-c5-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="550" y="584" width="480" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="ext-c5-anchor" value="anchor: art_9_caput" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="558" y="588" width="200" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="ext-c5-tokens" value="244 tokens · embed dim 1024" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="820" y="588" width="200" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="ext-c5-text" value="Art. 9º — Em caso de outorgante incapaz ou relativamente capaz, exigir-se-á alvará judicial específico ou, conforme o caso, presença e assistência do representante/assistente legal." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=2;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="550" y="606" width="480" height="56" as="geometry"/>
        </mxCell>

        <mxCell id="ext-add" value="+ adicionar chunk manual" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="556" y="676" width="200" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="conf-pane" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="1040" y="212" width="200" height="560" as="geometry"/>
        </mxCell>

        <mxCell id="conf-overall" value="confiança média" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontColor=#666;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1052" y="222" width="160" height="14" as="geometry"/>
        </mxCell>
        <mxCell id="conf-overall-val" value="93%" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=20;fontStyle=1;fontColor=#3a6027" vertex="1" parent="1">
          <mxGeometry x="1052" y="236" width="160" height="28" as="geometry"/>
        </mxCell>

        <mxCell id="conf-divider" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#999;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="1052" y="270" width="176" height="1" as="geometry"/>
        </mxCell>

        <mxCell id="conf-h" value="chunk · confiança" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontColor=#666;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1052" y="278" width="160" height="14" as="geometry"/>
        </mxCell>

        <mxCell id="conf-1" value="art_7_caput → 99%" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#3a6027" vertex="1" parent="1">
          <mxGeometry x="1052" y="296" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="conf-2" value="art_7_§1 → 97%" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#3a6027" vertex="1" parent="1">
          <mxGeometry x="1052" y="316" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="conf-3" value="art_7_§2 → 96%" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#3a6027" vertex="1" parent="1">
          <mxGeometry x="1052" y="336" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="conf-4" value="art_8_caput → 74% !" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#cc0000" vertex="1" parent="1">
          <mxGeometry x="1052" y="356" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="conf-5" value="art_9_caput → 95%" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#3a6027" vertex="1" parent="1">
          <mxGeometry x="1052" y="376" width="180" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="conf-low-warn" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fde8e8;strokeColor=#cc0000;strokeWidth=1" vertex="1" parent="1">
          <mxGeometry x="1052" y="408" width="176" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="conf-low-txt" value="Atenção: chunk art_8_caput com confiança baixa.&#10;Possível causa: caractere &quot;|&quot; entre &quot;noven&quot; e &quot;ta&quot; no PDF (artefato OCR).&#10;Confira o original e edite o texto do chunk no painel central — isso afeta o embedding gerado pelo Titan." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontColor=#cc0000;spacingLeft=8;spacingTop=6" vertex="1" parent="1">
          <mxGeometry x="1052" y="408" width="176" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="conf-divider2" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#999;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="1052" y="544" width="176" height="1" as="geometry"/>
        </mxCell>

        <mxCell id="conf-meta-h" value="metadados" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontColor=#666;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1052" y="554" width="160" height="14" as="geometry"/>
        </mxCell>
        <mxCell id="conf-meta-1" value="modelo: Sonnet 4.5" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1052" y="570" width="180" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="conf-meta-2" value="embed: titan-embed-v2" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1052" y="588" width="180" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="conf-meta-3" value="região: sa-east-1" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1052" y="606" width="180" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="conf-meta-4" value="hash extr: a3f9...c12" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1052" y="624" width="180" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="conf-meta-5" value="duração: 1m 18s" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1052" y="642" width="180" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="actions" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="40" y="784" width="1200" height="56" as="geometry"/>
        </mxCell>

        <mxCell id="btn-reject" value="Rejeitar versão" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#cc0000;fontSize=11;fontColor=#cc0000" vertex="1" parent="1">
          <mxGeometry x="56" y="794" width="140" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-rextract" value="Solicitar reextração" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#1F4E79;fontSize=11;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="206" y="794" width="160" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-save-draft" value="Salvar edições (rascunho)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="376" y="794" width="200" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-approve" value="Aprovar versão · publicar como vigente →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#5c8a3e;strokeColor=#3a6027;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="900" y="794" width="320" height="36" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="05-kbc-lista-versoes" name="05-kbc-lista-versoes">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="KBC 05 — Lista de versões aprovadas (kb_version · normativos, jurisprudência, doutrina)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=15;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1100" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="Knowledge Base / Versões aprovadas" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="350" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="sidebar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="200" height="744" as="geometry"/>
        </mxCell>
        <mxCell id="nav3" value="[folder]  Knowledge Base" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=none;fontSize=11;align=left;spacingLeft=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="130" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="sub3" value="•  Versões aprovadas" style="text;html=1;strokeColor=none;fillColor=#f0f0f0;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="170" width="180" height="26" as="geometry"/>
        </mxCell>

        <mxCell id="page-title" value="Versões aprovadas" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="130" width="600" height="30" as="geometry"/>
        </mxCell>
        <mxCell id="page-sub" value="27 versões · todas com hash registrado · armazenadas com Object Lock 30y · escopo: normativos, jurisprudência, doutrina" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="260" y="156" width="700" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="cta-upload" value="+  Subir novo documento" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1F4E79;strokeColor=#1F4E79;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1040" y="130" width="180" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="filters-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="190" width="940" height="58" as="geometry"/>
        </mxCell>

        <mxCell id="f-label" value="Filtrar por:" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="276" y="200" width="80" height="38" as="geometry"/>
        </mxCell>
        <mxCell id="f-cat" value="Categoria: todas  ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="356" y="206" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="f-vig" value="Vigência: vigente  ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;fontSize=10;align=left;spacingLeft=10;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="526" y="206" width="180" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="f-origem" value="Origem: todas  ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="716" y="206" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="f-search" value="[buscar]  buscar nome, hash, tag, anchor..." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;spacingLeft=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="886" y="206" width="300" height="28" as="geometry"/>
        </mxCell>

        <mxCell id="active-filters" value="↳  Vigente · 24 resultados encontrados" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="276" y="258" width="600" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="tbl-h" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1F4E79;strokeColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="260" y="288" width="940" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="tbl-h1" value="DOCUMENTO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="276" y="290" width="260" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="tbl-h2" value="CATEGORIA · PESO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="540" y="290" width="140" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="tbl-h3" value="VIGÊNCIA" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="680" y="290" width="140" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="tbl-h4" value="APROVADOR · DATA" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="820" y="290" width="180" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="tbl-h5" value="STATUS" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="1000" y="290" width="80" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="tbl-h6" value="AÇÕES" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="1080" y="290" width="120" height="28" as="geometry"/>
        </mxCell>

        <mxCell id="r1-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="260" y="320" width="940" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="r1-mark" value="VIGENTE AGORA" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#1F4E79;strokeColor=#1F4E79;fontColor=#ffffff;fontSize=8;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="266" y="326" width="100" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="r1-c1" value="Provimento CGJ-SP 31/2026 — qualif. de outorgantes" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="276" y="346" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r1-c1b" value="hash a3f9...c12 · 5 chunks" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="276" y="364" width="280" height="14" as="geometry"/>
        </mxCell>
        <mxCell id="r1-c2" value="Normativo · 1.0" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;fontSize=9;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="540" y="340" width="120" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r1-c3" value="01/01/2026 — perpétuo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="680" y="340" width="140" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r1-c4" value="Lucas C. · 02/01/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="820" y="340" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r1-c5" value="Vigente" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f5e9;strokeColor=#5c8a3e;fontSize=9;fontColor=#3a6027;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1000" y="340" width="76" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r1-c6" value="ver · baixar PDF · chunks" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="1080" y="340" width="120" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="r2-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="260" y="380" width="940" height="50" as="geometry"/>
        </mxCell>
        <mxCell id="r2-c1" value="NSCGJ-SP Tomo II — Cap. XIV (Notas) v.2026-03" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="276" y="384" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r2-c1b" value="hash 7e2a...8ff · 42 chunks" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="276" y="404" width="280" height="14" as="geometry"/>
        </mxCell>
        <mxCell id="r2-c2" value="Normativo · 1.0" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;fontSize=9;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="540" y="394" width="120" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r2-c3" value="20/03/2026 — perpétuo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="680" y="394" width="140" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r2-c4" value="Lucas C. · 21/03/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="820" y="394" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r2-c5" value="Vigente" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f5e9;strokeColor=#5c8a3e;fontSize=9;fontColor=#3a6027;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1000" y="394" width="76" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r2-c6" value="ver · baixar PDF · chunks" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="1080" y="394" width="120" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="r3-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="260" y="430" width="940" height="50" as="geometry"/>
        </mxCell>
        <mxCell id="r3-c1" value="CSM-SP Acórdão 2024/0089 — usufruto vidual" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="276" y="434" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r3-c1b" value="hash bc41...d09 · 4 chunks · consultado em 11 atos" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="276" y="454" width="320" height="14" as="geometry"/>
        </mxCell>
        <mxCell id="r3-c2" value="Jurisprudência · 0.8" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5e8f8;strokeColor=#7b1fa2;fontSize=9;fontColor=#6a1b9a;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="540" y="444" width="140" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r3-c3" value="15/04/2026 — perpétuo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="680" y="444" width="140" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r3-c4" value="Lucas C. · 15/04/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="820" y="444" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r3-c5" value="Vigente" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f5e9;strokeColor=#5c8a3e;fontSize=9;fontColor=#3a6027;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1000" y="444" width="76" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r3-c6" value="ver · baixar PDF · chunks" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="1080" y="444" width="120" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="r4-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="260" y="480" width="940" height="50" as="geometry"/>
        </mxCell>
        <mxCell id="r4-c1" value="Provimento CGJ-SP 28/2024 (versão substituída)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="276" y="484" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r4-c1b" value="hash 22ca...903 · 6 chunks" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="276" y="504" width="280" height="14" as="geometry"/>
        </mxCell>
        <mxCell id="r4-c2" value="Normativo · 1.0" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;fontSize=9;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="540" y="494" width="120" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r4-c3" value="01/06/2024 — 31/12/2025" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="680" y="494" width="160" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r4-c4" value="Lucas C. · 28/05/2024" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="820" y="494" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r4-c5" value="Expirada" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=9;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1000" y="494" width="76" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r4-c6" value="ver · auditar uso (37)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="1080" y="494" width="120" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="r5-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="260" y="530" width="940" height="50" as="geometry"/>
        </mxCell>
        <mxCell id="r5-c1" value="Provimento CGJ-SP 32/2026 (rascunho)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="276" y="534" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r5-c1b" value="aguardando aprovação · iniciado 04/05" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="276" y="554" width="280" height="14" as="geometry"/>
        </mxCell>
        <mxCell id="r5-c2" value="Normativo · 1.0" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;fontSize=9;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="540" y="544" width="120" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r5-c3" value="01/06/2026 — perpétuo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="680" y="544" width="140" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r5-c4" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="820" y="544" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r5-c5" value="Rascunho" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=9;fontColor=#995200;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1000" y="544" width="76" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r5-c6" value="continuar revisão →" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1080" y="544" width="120" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="r6-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="260" y="580" width="940" height="50" as="geometry"/>
        </mxCell>
        <mxCell id="r6-c1" value="Loureiro — Manual de Direito Notarial (cap. III)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="276" y="584" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r6-c1b" value="hash 4d8f...112 · 28 chunks · referência interna" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="276" y="604" width="320" height="14" as="geometry"/>
        </mxCell>
        <mxCell id="r6-c2" value="Doutrina · 0.5" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#666;fontSize=9;fontColor=#444;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="540" y="594" width="120" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r6-c3" value="20/04/2026 — perpétuo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="680" y="594" width="140" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r6-c4" value="Lucas C. · 20/04/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="820" y="594" width="180" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r6-c5" value="Vigente" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f5e9;strokeColor=#5c8a3e;fontSize=9;fontColor=#3a6027;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1000" y="594" width="76" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r6-c6" value="ver · baixar PDF · chunks" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="1080" y="594" width="120" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="empty-state" value="ⓘ  Use os filtros para encontrar versões específicas. Versões expiradas continuam consultáveis para auditoria — atos lavrados durante a vigência delas continuam válidos e mostram o snapshot kb_version_id usado." style="text;html=1;strokeColor=none;fillColor=#fff8e1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="260" y="650" width="940" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="pagination" value="Mostrando 6 de 24 vigentes · 3 expiradas · 0 futuras · 1 rascunho" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="260" y="700" width="500" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="pages" value="◀  1 · 2 · 3 · 4  ▶" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="900" y="700" width="300" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX (R5)&#10;1. Versão vigente em destaque (azul borda 2px + pílula &quot;VIGENTE AGORA&quot;) — Tabelião identifica em 1s qual versão está sendo consumida pelo Flow A hermenêutica.&#10;2. Coluna TIPO virou CATEGORIA · PESO. Cor segue kb_category. Peso visível na pílula educa o Tabelião sobre o efeito do rerank (top-K → score × peso → top-N).&#10;3. Filtro Vigência default = &quot;vigente&quot; — caso de uso primário; expiradas e futuras só com 1 clique.&#10;4. Status diferentes:&#10;   verde = Vigente   cinza = Expirada   laranja = Rascunho   azul = Futura&#10;5. Hash visível em pequeno mas presente em todas as linhas — material para auditoria. Click no hash = copia.&#10;6. Contagem de chunks (kb_chunk) por versão dá noção do tamanho e do custo de embedding daquela versão.&#10;7. Ações (ver/baixar/chunks) como links inline em vez de menu kebab — economiza 1 click. &quot;chunks&quot; abre painel com lista de kb_chunk + structural anchor.&#10;8. Rascunho aparece NA MESMA lista — Tabelião não esquece de continuar a revisão.&#10;9. Linha de doc expirada com texto em cinza médio (não regular) — deemphasize visual sem ocultar.&#10;10. Auditar uso (37) na linha expirada → leva pra wireframe 06 aba &quot;Histórico de uso&quot;. Doc expirado mostra quantos rag_query consultaram ele (snapshot via billing_event.kb_consultations_snapshot).&#10;11. Escopo R5: lista cobre só normativos, jurisprudência, doutrina. Emolumentos vivem em /Emolumentos (módulo Fee Schedule); modelos em /Modelos de ato (Template Catalog); procedimentos em /Procedimentos (wiki)." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1260" y="120" width="220" height="700" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="06-kbc-detalhe-versao-aprovada" name="06-kbc-detalhe-versao-aprovada">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="KBC 06 — Detalhe de versão aprovada (kb_version + kb_chunk + uso por rag_query)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=15;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1100" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="KB / Versões / Provimento CGJ-SP 31/2026 — qualif. de outorgantes" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="500" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="sidebar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="200" height="744" as="geometry"/>
        </mxCell>
        <mxCell id="nav3" value="[folder]  Knowledge Base" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=none;fontSize=11;align=left;spacingLeft=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="130" width="200" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="docheader" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="130" width="940" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="doc-name" value="Provimento CGJ-SP 31/2026 — qualificação de outorgantes" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="276" y="140" width="700" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="doc-pill-vigente" value="VIGENTE AGORA" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#5c8a3e;strokeColor=#3a6027;fontColor=#ffffff;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1060" y="142" width="130" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="doc-meta-row" value="Categoria: Normativo (peso 1.0)  ·  Vigência: 01/01/2026 — perpétuo  ·  Origem: oficial CGJ-SP" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="276" y="170" width="900" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="doc-meta-row2" value="Aprovado por: Lucas C. (Tabelião) em 02/01/2026 às 09h14 · MFA TOTP confirmado" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="276" y="192" width="900" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="doc-hash-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="276" y="218" width="600" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="doc-hash" value="hash sha-256: a3f9b4c1d8e2f7090b6e... (click p/ copiar)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="276" y="218" width="600" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="doc-pdf-link" value="[doc]  baixar PDF original (Object Lock 30 anos)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="900" y="218" width="280" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="tabs-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="266" width="940" height="44" as="geometry"/>
        </mxCell>

        <mxCell id="tab1-active" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1F4E79;strokeColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="260" y="266" width="200" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="tab1" value="Chunks indexados (5)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="260" y="266" width="200" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="tab2" value="Documento original" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="460" y="266" width="200" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="tab3" value="Histórico de uso (47)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="660" y="266" width="200" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="tab4" value="Auditoria" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="860" y="266" width="200" height="44" as="geometry"/>
        </mxCell>

        <mxCell id="tab-content-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="310" width="940" height="478" as="geometry"/>
        </mxCell>

        <mxCell id="cont-title" value="5 chunks (kb_chunk) · consumidos pelo Flow A hermenêutica" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="276" y="324" width="700" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="cont-edit" value="✎  editar (cria nova versão)" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="980" y="324" width="200" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="ttbl-h-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="276" y="358" width="908" height="30" as="geometry"/>
        </mxCell>
        <mxCell id="ttbl-h1" value="ANCHOR" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="290" y="360" width="120" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="ttbl-h2" value="TRECHO (preview)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="410" y="360" width="540" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="ttbl-h3" value="TOKENS" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="950" y="360" width="80" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="ttbl-h4" value="CONSULTAS" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1040" y="360" width="120" height="26" as="geometry"/>
        </mxCell>

        <mxCell id="tt1-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="276" y="388" width="908" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="tt1-1" value="art_7_caput" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="290" y="390" width="120" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="tt1-2" value="A qualificação dos outorgantes em escritura pública será feita mediante apresentação de documento de identidade válido e CPF…" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="410" y="390" width="540" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="tt1-3" value="312" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="950" y="390" width="80" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="tt1-4" value="14 atos" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="1040" y="390" width="120" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="tt2-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="276" y="428" width="908" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="tt2-1" value="art_7_§1" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="290" y="430" width="120" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="tt2-2" value="Quando o outorgante for pessoa jurídica, exige-se também: I — contrato/estatuto social atualizado; II — ata de eleição…" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="410" y="430" width="540" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="tt2-3" value="358" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="950" y="430" width="80" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="tt2-4" value="22 atos" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="1040" y="430" width="120" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="tt3-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="276" y="468" width="908" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="tt3-1" value="art_7_§2" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="290" y="470" width="120" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="tt3-2" value="Estrangeiros não residentes apresentarão passaporte e RNE/CRNM, sendo dispensado o CPF se a finalidade…" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="410" y="470" width="540" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="tt3-3" value="186" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="950" y="470" width="80" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="tt3-4" value="3 atos" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="1040" y="470" width="120" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="tt4-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="276" y="508" width="908" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="tt4-1" value="art_8_caput" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="290" y="510" width="120" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="tt4-2" value="Procurações outorgadas há mais de 90 dias exigem confirmação telefônica do outorgante, salvo quando lavradas…" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="410" y="510" width="540" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="tt4-3" value="298" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="950" y="510" width="80" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="tt4-4" value="6 atos" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="1040" y="510" width="120" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="tt5-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="276" y="548" width="908" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="tt5-1" value="art_9_caput" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="290" y="550" width="120" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="tt5-2" value="Em caso de outorgante incapaz ou relativamente capaz, exigir-se-á alvará judicial específico ou…" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="410" y="550" width="540" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="tt5-3" value="244" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="950" y="550" width="80" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="tt5-4" value="2 atos" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="1040" y="550" width="120" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="usage-summary-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;strokeWidth=1" vertex="1" parent="1">
          <mxGeometry x="276" y="608" width="908" height="74" as="geometry"/>
        </mxCell>
        <mxCell id="usage-icon" value="[graph]" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=22" vertex="1" parent="1">
          <mxGeometry x="288" y="620" width="40" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="usage-title" value="Esta versão foi consultada pelo Flow A em 47 atos até agora" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="340" y="616" width="600" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="usage-sub" value="snapshot kb_consultations registrado em billing_event de cada ato · ver detalhamento por rag_query →" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="340" y="638" width="700" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="usage-cta" value="Ver detalhamento →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1F4E79;strokeColor=#1F4E79;fontColor=#ffffff;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1040" y="626" width="130" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="actions-row-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="276" y="700" width="908" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="btn-archive" value="Arquivar versão" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#cc0000;fontSize=11;fontColor=#cc0000" vertex="1" parent="1">
          <mxGeometry x="290" y="710" width="140" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-archive-help" value="(arquiva apenas; não altera atos já lavrados — snapshot kb_consultations preservado)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="436" y="710" width="440" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-edit" value="Criar nova versão (substitui esta)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1F4E79;strokeColor=#1F4E79;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="940" y="710" width="240" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX (R5)&#10;1. Header da página com nome + pílula vigente + metadata. Tabelião confirma identidade da versão antes de qualquer ação.&#10;2. CATEGORIA + PESO no metadata (era TIPO antes). Reforça consistência com lista (05).&#10;3. Hash em fonte mono, click pra copiar — instrumento de auditoria. NÃO está escondido.&#10;4. Tabs pra separar 4 visões (chunks / original / uso / auditoria). Tab default = &quot;Chunks indexados&quot; pq é a representação que o RAG consome.&#10;5. Tab &quot;Histórico de uso (47)&quot; com badge de contagem. Importante pra DPO em caso de auditoria.&#10;6. Tabela de chunks mostra anchor (art_7_caput etc.) — a ID estrutural é mais útil que um número sequencial pro Tabelião reconhecer o trecho. Coluna &quot;consultas&quot; mostra quantos rag_query trouxeram aquele chunk pro top-N.&#10;7. Card destacado azul mostra uso real — transparência total. Stoix mostra isso porque é base de billing_event.kb_consultations_snapshot.&#10;8. Botão &quot;Arquivar&quot; vermelho fantasma — ação destrutiva mas reversível, microcopy explica que snapshot é preservado.&#10;9. Edição NÃO altera in-place — sempre cria nova versão (immutability obrigatória pra audit hash chain). Microcopy do CTA é clara.&#10;10. Estado expirado: pílula muda pra cinza &quot;EXPIRADA&quot;, banner amarelo no topo &quot;Esta versão expirou em DD/MM. Atos lavrados durante a vigência continuam válidos — Flow A não consultará mais este normativo.&quot;" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1260" y="120" width="220" height="700" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="07-kbc-modal-vigencia-expirando" name="07-kbc-modal-vigencia-expirando">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="KBC 07 — Modal de vigência expirando (no login do Tabelião) — normativos e jurisprudência" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=15;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1100" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="bg-overlay" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#000000;strokeColor=none;opacity=50" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="1200" height="744" as="geometry"/>
        </mxCell>

        <mxCell id="bg-blurry-dash" value="(dashboard borrado por trás)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=2;fontColor=#cccccc" vertex="1" parent="1">
          <mxGeometry x="40" y="200" width="1200" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="modal-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333;strokeWidth=2;shadow=1" vertex="1" parent="1">
          <mxGeometry x="320" y="200" width="640" height="540" as="geometry"/>
        </mxCell>

        <mxCell id="modal-header-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="320" y="200" width="640" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="modal-icon" value="!" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=32;fontColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="332" y="216" width="60" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="modal-title" value="Atenção, Tabelião — sua KB tem normativos vencendo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1;fontColor=#995200" vertex="1" parent="1">
          <mxGeometry x="400" y="212" width="540" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="modal-sub" value="Mantenha sua KB atualizada para que o Flow A hermenêutica continue consultando normativos vigentes." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#995200" vertex="1" parent="1">
          <mxGeometry x="400" y="238" width="540" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="content-title" value="Próximos a vencer (30 dias)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="340" y="296" width="600" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="item1-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fde8e8;strokeColor=#cc0000;strokeWidth=1.5" vertex="1" parent="1">
          <mxGeometry x="340" y="324" width="600" height="74" as="geometry"/>
        </mxCell>
        <mxCell id="item1-name" value="Provimento CGJ-SP 28/2024 — qualificação de outorgantes" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="354" y="332" width="440" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="item1-cat" value="Normativo · peso 1.0" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;fontSize=9;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="354" y="354" width="120" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="item1-vig" value="vence em 23 dias · 31/12/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#cc0000;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="486" y="354" width="220" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="item1-impact" value="impacto: chunks deste normativo deixam de ser elegíveis no Flow A após expirar" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="354" y="374" width="500" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="item1-cta" value="Atualizar →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#cc6600;strokeColor=#cc6600;fontColor=#ffffff;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="836" y="346" width="100" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="item2-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="340" y="408" width="600" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="item2-name" value="Provimento CSM 1.234/2025 — vigência limitada" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="354" y="416" width="440" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="item2-cat" value="Normativo · peso 1.0" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;fontSize=9;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="354" y="438" width="120" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="item2-vig" value="vence em 27 dias · 04/01/2027" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#995200" vertex="1" parent="1">
          <mxGeometry x="486" y="438" width="220" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="item2-cta" value="Atualizar →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cc6600;fontColor=#cc6600;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="836" y="422" width="100" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="item3-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="340" y="478" width="600" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="item3-name" value="CSM-SP Acórdão 2024/0089 — usufruto vidual" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="354" y="486" width="440" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="item3-cat" value="Jurisprudência · peso 0.8" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5e8f8;strokeColor=#7b1fa2;fontSize=9;fontColor=#6a1b9a;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="354" y="508" width="140" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="item3-vig" value="vence em 18 dias · 26/12/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#995200" vertex="1" parent="1">
          <mxGeometry x="506" y="508" width="220" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="item3-cta" value="Atualizar →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cc6600;fontColor=#cc6600;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="836" y="492" width="100" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="snooze-area" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="340" y="560" width="600" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="snooze-label" value="Adiar lembrete por:" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="356" y="578" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="snooze-1" value="○ 1 dia" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="510" y="578" width="80" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="snooze-7" value="○ 7 dias" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="590" y="578" width="80" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="snooze-help" value="(adiamento &gt; 7 dias bloqueado para normativos com peso ≥ 1.0)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="676" y="578" width="280" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="modal-actions-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="320" y="676" width="640" height="64" as="geometry"/>
        </mxCell>
        <mxCell id="btn-later" value="Lembrar amanhã" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="340" y="690" width="160" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-list" value="Ver lista completa" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#1F4E79;fontColor=#1F4E79;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="510" y="690" width="160" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-now" value="Atualizar agora →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#cc6600;strokeColor=#cc6600;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="780" y="690" width="160" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX (R5)&#10;1. Modal centralizado, fundo escuro 50% — bloqueio funcional. Tabelião precisa decidir antes de continuar.&#10;2. Escopo R5: itens listados aqui são KB (normativos + jurisprudência + doutrina). Vencimentos de Fee Schedule (emolumentos) e Template Catalog (modelos) aparecem em modais próprios desses módulos.&#10;3. Cada item agora mostra a pílula de CATEGORIA · PESO (era TIPO antes). A categoria define cor e peso conforme kb_category gerenciada pelo Tabelião.&#10;4. Hierarquia em 3 níveis de urgência:&#10;   vermelho = vence em ≤ 25 dias&#10;   laranja = vence em 26-30 dias&#10;   amarelo = vence em &gt; 30 dias (só dashboard)&#10;5. Cada item mostra impacto em texto explícito — Tabelião entende consequência (chunks deixam de aparecer no top-N do Flow A).&#10;6. Adiamento limitado: normativos com peso ≥ 1.0 NÃO podem ser adiados &gt; 7 dias. Decisão jurídica: defesa material.&#10;7. CTA primário laranja — atenção, não sucesso. Visualmente urgente.&#10;8. &quot;Lembrar amanhã&quot; preserva agência do Tabelião — pode fechar e voltar ao trabalho.&#10;9. ESC fecha o modal MAS reabre no próximo login até o item ser atualizado ou snoozado válido.&#10;10. Acessibilidade: foco vai pro botão primário ao abrir, navegação Tab cíclica dentro do modal." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="980" y="200" width="240" height="600" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="08-kbc-bloqueio-fluxob-vencida" name="08-kbc-bloqueio-fluxob-vencida">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="KBC 08 — Bloqueio em Flow B (escrevente) por normativo crítico vencido na KB" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=15;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1100" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="PRODUÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fde8e8;strokeColor=#cc0000;fontSize=10;fontStyle=1;fontColor=#cc0000" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="Flow B / Ato em execução / Etapa 4 — Qualificação dos outorgantes" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="268" y="76" width="500" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Maria S. (Escrevente) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="bg-overlay" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#000000;strokeColor=none;opacity=70" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="1200" height="744" as="geometry"/>
        </mxCell>

        <mxCell id="bg-fading" value="(tela do Flow B Etapa 4 borrada por trás — protocolo #2026-0473, escritura de procuração)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=2;fontColor=#cccccc" vertex="1" parent="1">
          <mxGeometry x="40" y="140" width="1200" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="modal-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cc0000;strokeWidth=3;shadow=1" vertex="1" parent="1">
          <mxGeometry x="280" y="200" width="720" height="580" as="geometry"/>
        </mxCell>

        <mxCell id="modal-header-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fde8e8;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="280" y="200" width="720" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="modal-icon" value="[stop]" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=42" vertex="1" parent="1">
          <mxGeometry x="304" y="220" width="60" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="modal-title" value="Etapa bloqueada — normativo crítico expirado na KB" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1;fontColor=#cc0000" vertex="1" parent="1">
          <mxGeometry x="380" y="220" width="600" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="modal-sub" value="Esta etapa depende de normativo (peso 1.0) cuja versão vigente expirou. O Flow B não prossegue até que o Tabelião aprove a versão substituta." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#995200" vertex="1" parent="1">
          <mxGeometry x="380" y="252" width="600" height="38" as="geometry"/>
        </mxCell>

        <mxCell id="explain-title" value="O que aconteceu" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="304" y="316" width="400" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="status-card" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="304" y="346" width="672" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="status-row1" value="Normativo na KB" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="320" y="356" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="status-row1-val" value="Provimento CGJ-SP 28/2024 — qualificação de outorgantes" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="520" y="356" width="440" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="status-row2" value="Categoria · peso" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="320" y="380" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="status-row2-val" value="Normativo · peso 1.0 (crítico — bloqueia Flow B ao expirar)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="520" y="380" width="440" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="status-row3" value="Vigência" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="320" y="404" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="status-row3-val" value="01/06/2024 — 31/12/2025 (expirou há 4 dias)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#cc0000;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="520" y="404" width="440" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="status-row4" value="Atualização pendente do Tabelião" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="320" y="428" width="220" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="status-row4-val" value="Provimento substituto 31/2026 ainda não foi aprovado por Lucas C." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="540" y="428" width="440" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="next-title" value="O que fazer agora" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="304" y="486" width="400" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="opt1-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e8f0f8;strokeColor=#1F4E79;strokeWidth=1.5" vertex="1" parent="1">
          <mxGeometry x="304" y="516" width="672" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="opt1-num" value="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#1F4E79;strokeColor=#1F4E79;fontColor=#ffffff;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="316" y="528" width="32" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="opt1-name" value="Notificar o Tabelião agora" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="360" y="522" width="500" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="opt1-sub" value="Envia e-mail (SES) pra Lucas C. com link direto pra subir a versão substituta do normativo." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="360" y="544" width="500" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="opt1-cta" value="Notificar →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1F4E79;strokeColor=#1F4E79;fontColor=#ffffff;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="876" y="528" width="92" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="opt2-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="304" y="582" width="672" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="opt2-num" value="2" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#999;strokeColor=#999;fontColor=#ffffff;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="316" y="594" width="32" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="opt2-name" value="Salvar minuta e adiar lavratura" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="360" y="588" width="500" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="opt2-sub" value="Volta à fila com flag &quot;aguardando KB&quot;. Continua quando o normativo for aprovado — sem perda de trabalho." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="360" y="610" width="500" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="opt2-cta" value="Salvar →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="876" y="594" width="92" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="opt3-link" value="3.  Falar diretamente com Lucas: telefone 11 9 8765-4321 · canal interno do cartório" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="316" y="654" width="660" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="footer-help" value="Por que existe esse bloqueio? O Flow A hermenêutica recusa chunks fora de vigência (filtro hard em kb_version.status). Normativos com peso 1.0 são considerados críticos para a etapa atual — o sistema não pode prosseguir consultando versão expirada." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="304" y="694" width="672" height="44" as="geometry"/>
        </mxCell>

        <mxCell id="footer-divider" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="304" y="694" width="672" height="1" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX (R5)&#10;1. Modal full-screen com overlay 70% — bloqueio total, escrevente NÃO pode prosseguir. Defesa material por design.&#10;2. Mudança de escopo: este modal agora é sobre KB de normativo (peso 1.0), não sobre fee_schedule. O bloqueio do Fee Schedule por tabela vencida tem modal próprio do módulo Emolumentos.&#10;3. Borda vermelha 3px + ícone [stop] + título vermelho — tom severo MAS:&#10;   - mensagem é técnica e factual&#10;   - não culpa o escrevente&#10;   - dá 2 caminhos práticos&#10;4. Card de status mostra 4 fatos lado a lado, incluindo CATEGORIA · PESO. Escrevente entende exatamente o que está fora do lugar e por que peso 1.0 dispara o bloqueio.&#10;5. Opção 1 (Notificar via SES) destacada — caminho ativo. Opção 2 (Salvar e adiar) é o caminho passivo legítimo (preserva trabalho do escrevente).&#10;6. Microcopy do footer educa sobre o filtro hard em kb_version.status — escrevente entende que é regra do sistema, não capricho. Reduz fricção emocional.&#10;7. Telefone do Tabelião como opção 3 — última instância.&#10;8. Pílula PRODUÇÃO em vermelho no header indica ambiente real.&#10;9. NÃO há CTA &quot;ignorar&quot;, &quot;continuar com versão expirada&quot; ou &quot;prosseguir mesmo assim&quot;. Por design.&#10;10. Acessibilidade: foco vai pro botão Notificar; ESC não fecha (intencional).&#10;11. Sem WhatsApp na lista de contato — fora de escopo MVP (R5)." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1020" y="200" width="220" height="640" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="01-fs-dashboard" name="01-fs-dashboard">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="FS 01 — Tabela de Emolumentos · Visão geral (versões cadastradas, vigência, próximos vencimentos)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1180" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#0F2536;strokeColor=#0F2536" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1c3a52;strokeColor=#0F2536;fontColor=#ffffff;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="Tabela de Emolumentos · Visão geral" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#cfd8dc;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="350" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontColor=#ffffff;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="sidebar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="200" height="744" as="geometry"/>
        </mxCell>
        <mxCell id="nav1" value="▣  Dashboard" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="130" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav2" value="[catalogo]  Modelos de ato" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="166" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav3" value="[folder]  Knowledge Base" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="202" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav-fee" value="[tabela]  Emolumentos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d8f0ee;strokeColor=none;fontSize=11;align=left;spacingLeft=14;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="40" y="238" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="fee-sub-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="60" y="270" width="180" height="144" as="geometry"/>
        </mxCell>
        <mxCell id="fsub1" value="•  Visão geral" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="76" y="276" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="fsub2" value="•  Nova versão (upload)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="76" y="298" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="fsub3" value="•  Histórico de versões" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="76" y="320" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="fsub4" value="•  Linhas (consulta rápida)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="76" y="342" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="fsub5" value="•  Auditoria de cobrança" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="76" y="364" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="nav-proc" value="[wiki]  Procedimentos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="418" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav4" value="[lista]  Atos em execução" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="454" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav5" value="[graph]  Relatórios" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="490" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav6" value="[users]  Usuários" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="526" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav7" value="⚙  Configurações" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="562" width="200" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="welcome" value="Tabela de Emolumentos do 27º Tabelionato" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="260" y="130" width="700" height="30" as="geometry"/>
        </mxCell>
        <mxCell id="welcome-sub" value="Fonte oficial pra cobrança de cada ato. Tabela CGJ-SP é estadual; aqui você cadastra a versão vigente e mantém histórico imutável (cada billing_event grava qual fee_schedule_version_hash cobrou). Sem RAG: lookup é exato por (act_code, value_range)." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=2;fontColor=#555" vertex="1" parent="1">
          <mxGeometry x="260" y="156" width="800" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="cta-new" value="+  Nova versão da tabela" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#285E61;strokeColor=#285E61;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1020" y="130" width="200" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="kpi-title" value="Estado atual da tabela vigente" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#555" vertex="1" parent="1">
          <mxGeometry x="260" y="200" width="700" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="kpi1" value="VERSÃO VIGENTE&#10;v2026.01" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#E6FFFA;strokeColor=#285E61;strokeWidth=2;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="260" y="226" width="225" height="92" as="geometry"/>
        </mxCell>
        <mxCell id="kpi1-pill" value="ACTIVE" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#285E61;strokeColor=#285E61;fontColor=#ffffff;fontSize=9;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="412" y="236" width="60" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="kpi1-sub" value="hash a4f2…91c · 312 linhas" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="272" y="282" width="220" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="kpi2" value="VENCE EM&#10;23 dias" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;strokeWidth=2;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10;fontColor=#995200" vertex="1" parent="1">
          <mxGeometry x="500" y="226" width="225" height="92" as="geometry"/>
        </mxCell>
        <mxCell id="kpi2-sub" value="effective_until 31/12/2026 — subir nova versão antes" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#995200" vertex="1" parent="1">
          <mxGeometry x="512" y="278" width="206" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="kpi3" value="LINHAS NA VERSÃO&#10;312" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;strokeWidth=2;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="740" y="226" width="225" height="92" as="geometry"/>
        </mxCell>
        <mxCell id="kpi3-sub" value="48 atos × faixas · cobrindo escrituras, procurações, atas" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="752" y="278" width="206" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="kpi4" value="ÚLTIMA APROVAÇÃO&#10;21/12/2025" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;strokeWidth=2;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="980" y="226" width="225" height="92" as="geometry"/>
        </mxCell>
        <mxCell id="kpi4-sub" value="aprovado por Lucas C. + MFA TOTP" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="992" y="278" width="206" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="alert" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="260" y="338" width="945" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="alert-icon" value="!" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=20;fontColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="272" y="348" width="40" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="alert-txt" value="A versão v2026.01 vence em 23 dias (31/12/2026). CGJ-SP costuma publicar a tabela do ano seguinte na segunda quinzena de dezembro. Sem versão vigente, Fluxo B bloqueia cobrança." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="320" y="348" width="700" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="alert-cta" value="Subir v2027.01 →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#cc6600;strokeColor=#cc6600;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1065" y="350" width="130" height="34" as="geometry"/>
        </mxCell>

        <mxCell id="versions-title" value="Tabelas cadastradas" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="416" width="600" height="25" as="geometry"/>
        </mxCell>
        <mxCell id="versions-link" value="Ver histórico completo →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1040" y="416" width="160" height="25" as="geometry"/>
        </mxCell>

        <mxCell id="vlist" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="448" width="945" height="370" as="geometry"/>
        </mxCell>

        <mxCell id="vh1" value="VERSÃO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="276" y="458" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vh2" value="VIGÊNCIA (effective_from → effective_until)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="446" y="458" width="290" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vh3" value="LINHAS" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="746" y="458" width="60" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vh4" value="APROVADA POR" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="816" y="458" width="180" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vh5" value="STATUS" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1010" y="458" width="100" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="vrow1-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="276" y="484" width="913" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="vrow1-c1" value="v2026.01 — Tabela CGJ-SP 2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="284" y="488" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vrow1-c1b" value="hash a4f2…91c" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="284" y="510" width="160" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="vrow1-c2" value="01/01/2026 → 31/12/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="446" y="492" width="290" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vrow1-c2b" value="vence em 23 dias" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="446" y="510" width="200" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="vrow1-c3" value="312" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="746" y="500" width="60" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vrow1-c4" value="Lucas C. · 21/12/2025" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="816" y="500" width="200" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vrow1-pill" value="ACTIVE" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6FFFA;strokeColor=#285E61;fontSize=9;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="500" width="76" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="vrow2-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="276" y="540" width="913" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="vrow2-c1" value="v2027.01 — Tabela CGJ-SP 2027" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="284" y="544" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vrow2-c1b" value="hash 7c19…ab8 · em revisão" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="284" y="566" width="200" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="vrow2-c2" value="01/01/2027 → 31/12/2027" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="446" y="548" width="290" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vrow2-c2b" value="entra em vigência em 23 dias" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="446" y="566" width="200" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="vrow2-c3" value="318" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="746" y="556" width="60" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vrow2-c4" value="— ainda não aprovada" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="816" y="556" width="200" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vrow2-pill" value="DRAFT" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#cc6600;fontSize=9;fontColor=#995200;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="556" width="76" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="vrow3-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fcfcfc;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="276" y="596" width="913" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="vrow3-c1" value="v2025.01 — Tabela CGJ-SP 2025" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="284" y="600" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vrow3-c1b" value="hash 2e90…44d" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="284" y="622" width="160" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="vrow3-c2" value="01/01/2025 → 31/12/2025" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="446" y="604" width="290" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vrow3-c2b" value="superseded por v2026.01" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="446" y="622" width="200" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="vrow3-c3" value="306" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="746" y="612" width="60" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vrow3-c4" value="Lucas C. · 18/12/2024" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="816" y="612" width="200" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vrow3-pill" value="EXPIRED" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=9;fontColor=#666;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="612" width="76" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="vrow4-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fcfcfc;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="276" y="652" width="913" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="vrow4-c1" value="v2024.01 — Tabela CGJ-SP 2024" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="284" y="656" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vrow4-c1b" value="hash 91ab…0fe" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="284" y="678" width="160" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="vrow4-c2" value="01/01/2024 → 31/12/2024" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="446" y="660" width="290" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vrow4-c2b" value="superseded por v2025.01" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="446" y="678" width="200" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="vrow4-c3" value="298" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="746" y="668" width="60" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vrow4-c4" value="Lucas C. · 22/12/2023" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="816" y="668" width="200" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="vrow4-pill" value="SUPERSEDED" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=9;fontColor=#666;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1090" y="668" width="96" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="usage-title" value="Cobranças geradas com a versão vigente (últimos 30d)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#555" vertex="1" parent="1">
          <mxGeometry x="290" y="722" width="600" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="usage-stat" value="1.847 billing_event vinculados a v2026.01 — todos com snapshot fee_schedule_version_hash" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="290" y="746" width="700" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="usage-link" value="Ver auditoria de cobrança →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1000" y="746" width="180" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX (R5 · Fee Schedule)&#10;1. Hierarquia visual: alerta de vencimento &gt; CTA &quot;Nova versão&quot; &gt; KPIs do estado atual &gt; lista de versões. Tabelião identifica em 2s se há ação pendente.&#10;2. Cor turquesa (#285E61) marca o cluster Fee no header dark navy + nav lateral ativa + pílula ACTIVE + KPI principal. Mantém significado visual da R5 (Turquesa=Fee).&#10;3. KPIs respondem a 4 perguntas em ordem natural: qual a versão? quando vence? quantas linhas tem? quem aprovou e quando? — não é decoração.&#10;4. Linha DRAFT (v2027.01) destacada com pill âmbar — sinaliza que o Tabelião já começou o trabalho da próxima vigência mas não finalizou. Reduz risco de virar o ano sem tabela.&#10;5. Linhas EXPIRED/SUPERSEDED em cinza esmaecido — visíveis pra auditoria, mas não competem por atenção.&#10;6. Hash visível por linha — fundamental: cada billing_event aponta pra esse hash. Sem isso, perde valor probatório.&#10;7. Bloco discreto na base lembra que cobrança consome essa tabela (vínculo R5 com billing_event).&#10;8. Sub-nav lateral expõe os 5 verbos do módulo: ver, subir, histórico, consultar, auditar." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1260" y="120" width="220" height="600" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="02-fs-upload-passo-1" name="02-fs-upload-passo-1">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="FS 02 — Nova versão · Passo 1 · Fonte, vigência e arquivo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="900" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#0F2536;strokeColor=#0F2536" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1c3a52;strokeColor=#0F2536;fontColor=#ffffff;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="Emolumentos / Nova versão" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#cfd8dc;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="350" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontColor=#ffffff;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="sidebar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="200" height="744" as="geometry"/>
        </mxCell>
        <mxCell id="nav-fee" value="[tabela]  Emolumentos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d8f0ee;strokeColor=none;fontSize=11;align=left;spacingLeft=14;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="40" y="130" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="sub-active" value="•  Nova versão (upload)" style="text;html=1;strokeColor=none;fillColor=#f0f0f0;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="172" width="180" height="26" as="geometry"/>
        </mxCell>

        <mxCell id="stepper" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="140" width="940" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step1" value="● 1. Fonte e vigência" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="260" y="140" width="220" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step2" value="○ 2. Extração (IA)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="480" y="140" width="220" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step3" value="○ 3. Revisão linha a linha" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="700" y="140" width="240" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step4" value="○ 4. Aprovar versão" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="940" y="140" width="220" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="responsabilidade" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#E6FFFA;strokeColor=#285E61;strokeWidth=1.5" vertex="1" parent="1">
          <mxGeometry x="260" y="216" width="940" height="62" as="geometry"/>
        </mxCell>
        <mxCell id="responsabilidade-icon" value="ⓘ" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="272" y="226" width="34" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="responsabilidade-txt" value="Você está cadastrando uma nova fee_schedule_version. Após aprovação, ela entra em vigência conforme as datas abaixo e passa a ser fonte única de cobrança. Cada billing_event gerado carregará fee_schedule_version_hash imutável — auditoria reproduz a cobrança décadas depois sem depender da versão atual." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="312" y="222" width="870" height="52" as="geometry"/>
        </mxCell>

        <mxCell id="leftcol-title" value="Fonte da tabela" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="294" width="400" height="30" as="geometry"/>
        </mxCell>
        <mxCell id="leftcol-help" value="A Stoix processa os 3 formatos. Para versão CGJ-SP oficial, prefira o PDF assinado publicado no DJE." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="260" y="320" width="540" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="src-pdf-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#E6FFFA;strokeColor=#285E61;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="260" y="344" width="175" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="src-pdf-radio" value="●" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="266" y="350" width="20" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="src-pdf-icon" value="[pdf]" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="290" y="350" width="60" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="src-pdf-title" value="PDF oficial CGJ-SP" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="272" y="378" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="src-pdf-desc" value="OCR + IA extrai linha-a-linha. Recomendado." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="272" y="400" width="155" height="38" as="geometry"/>
        </mxCell>

        <mxCell id="src-csv-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="445" y="344" width="175" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="src-csv-radio" value="○" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="451" y="350" width="20" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="src-csv-icon" value="[csv]" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="475" y="350" width="60" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="src-csv-title" value="CSV estruturado" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="457" y="378" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="src-csv-desc" value="Pula OCR. Schema: act_code; descricao; valor_min; valor_max; base_fee; …" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="457" y="400" width="155" height="38" as="geometry"/>
        </mxCell>
        <mxCell id="src-csv-link" value="baixar template" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="457" y="424" width="100" height="14" as="geometry"/>
        </mxCell>

        <mxCell id="src-man-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="630" y="344" width="170" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="src-man-radio" value="○" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="636" y="350" width="20" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="src-man-icon" value="[edit]" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="660" y="350" width="60" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="src-man-title" value="Cadastro manual" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="642" y="378" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="src-man-desc" value="Vai direto pra edição linha-a-linha (sem upload). Útil pra ajustes pequenos numa nova versão." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="642" y="400" width="150" height="38" as="geometry"/>
        </mxCell>

        <mxCell id="dropzone-title" value="Arquivo (PDF oficial CGJ-SP)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="460" width="400" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="dropzone" value="[ Arraste o PDF aqui ou clique para selecionar ]&#10;PDF · até 50 MB · prefira o arquivo original do DJE-SP&#10;O fee-schedule-extract-worker fará OCR (Textract) + extração estruturada (Claude Sonnet 4.5)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f7fffe;strokeColor=#285E61;fontSize=12;dashed=1;align=center;verticalAlign=middle;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="260" y="486" width="540" height="160" as="geometry"/>
        </mxCell>

        <mxCell id="file-uploaded" value="[pdf]  cgj-sp-tabela-emolumentos-2027.pdf · 2.4 MB · ✓ enviado para notary-27tabsp-fee-schedule" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#E6FFFA;strokeColor=#285E61;fontSize=11;align=left;spacingLeft=12;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="260" y="656" width="540" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="rightcol-title" value="Metadados da versão" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="820" y="294" width="400" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-label" value="Identificação *" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="820" y="328" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="label-help" value="rótulo curto da versão (label) — aparece no histórico e em billing_event" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="820" y="346" width="380" height="14" as="geometry"/>
        </mxCell>
        <mxCell id="label-input" value="v2027.01" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="820" y="362" width="380" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-desc" value="Descrição" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="820" y="404" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="desc-input" value="Tabela de Emolumentos CGJ-SP exercício 2027.&#10;Reajuste anual conforme Lei Estadual 11.331/2002." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="820" y="424" width="380" height="74" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-vigencia" value="Vigência *" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="820" y="510" width="200" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="vig-help" value="entrada e saída obrigatórias — fee_schedule não permite vigência aberta" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="820" y="528" width="380" height="14" as="geometry"/>
        </mxCell>
        <mxCell id="vig-from-lbl" value="Início (effective_from)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="820" y="544" width="170" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="vig-from" value="01/01/2027  [date]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="820" y="564" width="180" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="vig-to-lbl" value="Fim (effective_until)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1020" y="544" width="170" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="vig-to" value="31/12/2027  [date]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="1020" y="564" width="180" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="vig-overlap" value="ⓘ A vigência atual (v2026.01) será automaticamente marcada como SUPERSEDED em 31/12/2026 23:59." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="820" y="602" width="380" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-base" value="Base / referência legal" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="820" y="644" width="300" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="base-input" value="Provimento CGJ-SP CG nº 47/2026 (DJE 22/12/2026)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="820" y="664" width="380" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="btn-cancel" value="Cancelar" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="260" y="780" width="100" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-rascunho" value="Salvar como rascunho" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="370" y="780" width="160" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-next" value="Extrair com IA →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#285E61;strokeColor=#285E61;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1040" y="780" width="160" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX (R5 · Fee Schedule)&#10;1. 3 opções de fonte como cards radio (não dropdown) — decisão de origem muda o fluxo (PDF = OCR + LLM, CSV = parser direto, Manual = pula upload). Visual antecipa o caminho.&#10;2. Card &quot;PDF oficial CGJ-SP&quot; selecionado por default — caminho real do 27º Tabelionato. Reduz cognição em 90% dos uploads.&#10;3. Drop file abaixo dos cards porque depende da escolha do tipo (se CSV, microcopy do dropzone muda; se Manual, dropzone some). Modelo mental: escolho a fonte → forneço a fonte.&#10;4. Microcopy técnico cita o worker exato (fee-schedule-extract-worker) — Tabelião aprende a arquitetura sem precisar abrir doc.&#10;5. Identificação livre (label) — Tabelião batiza como quiser (v2027.01, &quot;reajuste mar/2027&quot;). Sem versionamento automático que possa colidir com nomenclatura interna do cartório.&#10;6. Vigência: NÃO tem checkbox &quot;perpétuo&quot; aqui (diferente da KB). Tabela de emolumentos sempre tem ano-base — sem prazo abre buraco probatório.&#10;7. Banner do overlap (&quot;v2026.01 vira SUPERSEDED&quot;) aparece reativo assim que datas são preenchidas. Tabelião sabe que não precisa expirar manual.&#10;8. Banner de responsabilidade em turquesa (não amarelo como KB) — sinaliza que aqui o registro é fee_schedule_version, não kb_version. Cor cluster R5.&#10;9. Botão &quot;Salvar rascunho&quot; sempre disponível — fee_schedule_version.status='draft' permanece em DB sem entrar em vigência.&#10;10. CTA escuro destaca acionamento da IA. Microcopy do botão é a ação real, não &quot;avançar&quot;." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1260" y="120" width="220" height="700" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="03-fs-upload-passo-2-extracao" name="03-fs-upload-passo-2-extracao">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="FS 03 — Nova versão · Passo 2 · Extração estruturada (OCR + LLM)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="900" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#0F2536;strokeColor=#0F2536" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1c3a52;strokeColor=#0F2536;fontColor=#ffffff;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="Emolumentos / Nova versão / Extraindo…" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#cfd8dc;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="350" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontColor=#ffffff;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="sidebar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="200" height="744" as="geometry"/>
        </mxCell>
        <mxCell id="nav-fee" value="[tabela]  Emolumentos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d8f0ee;strokeColor=none;fontSize=11;align=left;spacingLeft=14;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="40" y="130" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="sub-active" value="•  Nova versão (upload)" style="text;html=1;strokeColor=none;fillColor=#f0f0f0;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="172" width="180" height="26" as="geometry"/>
        </mxCell>

        <mxCell id="stepper" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="140" width="940" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step1" value="✓ 1. Fonte e vigência" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="260" y="140" width="220" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step2" value="● 2. Extração (IA)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="480" y="140" width="220" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step3" value="○ 3. Revisão linha a linha" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="700" y="140" width="240" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="step4" value="○ 4. Aprovar versão" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="940" y="140" width="220" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="filename" value="cgj-sp-tabela-emolumentos-2027.pdf · 2.4 MB · v2027.01 · vigência 01/01/2027 → 31/12/2027" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="216" width="940" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="filename-sub" value="extract_id ext_8c4f-2a1e · iniciado 14:32:08 · executando no fee-schedule-extract-worker (Lambda)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="260" y="238" width="940" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="overall-card" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#E6FFFA;strokeColor=#285E61;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="260" y="276" width="940" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="overall-title" value="Processando — fique nessa tela ou volte ao Dashboard, te avisamos por email" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="280" y="290" width="700" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="overall-sub" value="Tempo estimado restante: ~1m 40s · 312 linhas previstas (estimado pela contagem de páginas)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="280" y="312" width="700" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="bar-track" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="280" y="346" width="900" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="bar-fill" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#285E61;strokeColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="280" y="346" width="495" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="bar-pct" value="55%" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="1140" y="346" width="60" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="bar-detail" value="172 / 312 linhas extraídas · 4 com baixa confiança · 0 com erro" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="280" y="372" width="700" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="stages-title" value="Etapas do pipeline" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="416" width="400" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="s1-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#E6FFFA;strokeColor=#285E61;strokeWidth=1.5" vertex="1" parent="1">
          <mxGeometry x="260" y="446" width="225" height="148" as="geometry"/>
        </mxCell>
        <mxCell id="s1-icon" value="✓" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=24;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="270" y="456" width="40" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="s1-label" value="1. Upload" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="318" y="460" width="160" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="s1-status" value="concluído" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="318" y="480" width="160" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="s1-detail" value="PDF persistido em S3 notary-27tabsp-fee-schedule/v2027.01/source.pdf · sha256 5b3c…d72" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="272" y="510" width="200" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="s1-time" value="00:00:03" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="272" y="566" width="200" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="s2-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#E6FFFA;strokeColor=#285E61;strokeWidth=1.5" vertex="1" parent="1">
          <mxGeometry x="495" y="446" width="225" height="148" as="geometry"/>
        </mxCell>
        <mxCell id="s2-icon" value="✓" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=24;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="505" y="456" width="40" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="s2-label" value="2. OCR (Textract)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="553" y="460" width="160" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="s2-status" value="concluído" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="553" y="480" width="160" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="s2-detail" value="84 páginas reconhecidas · 0 página com falha · texto bruto + bounding boxes salvos" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="507" y="510" width="200" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="s2-time" value="00:00:42" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="507" y="566" width="200" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="s3-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f7fffe;strokeColor=#285E61;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="730" y="446" width="225" height="148" as="geometry"/>
        </mxCell>
        <mxCell id="s3-icon" value="◐" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=24;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="740" y="456" width="40" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="s3-label" value="3. Extração estruturada" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="788" y="460" width="160" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="s3-status" value="em execução" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#285E61;fontStyle=3" vertex="1" parent="1">
          <mxGeometry x="788" y="480" width="160" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="s3-detail" value="Claude Sonnet 4.5 estruturando linhas em fee_schedule_line — 172/312 prontas" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="742" y="510" width="200" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="s3-mini-track" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="742" y="566" width="200" height="10" as="geometry"/>
        </mxCell>
        <mxCell id="s3-mini-fill" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#285E61;strokeColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="742" y="566" width="110" height="10" as="geometry"/>
        </mxCell>
        <mxCell id="s3-time" value="em curso · 00:01:18" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="742" y="578" width="200" height="14" as="geometry"/>
        </mxCell>

        <mxCell id="s4-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#bbb;strokeWidth=1.5" vertex="1" parent="1">
          <mxGeometry x="965" y="446" width="225" height="148" as="geometry"/>
        </mxCell>
        <mxCell id="s4-icon" value="○" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=24;fontColor=#999;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="975" y="456" width="40" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="s4-label" value="4. Pronto pra revisão" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1023" y="460" width="160" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="s4-status" value="aguardando" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="1023" y="480" width="160" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="s4-detail" value="ao concluir, te levamos pra tela de revisão linha-a-linha. Linhas com confiança &lt; 0.85 aparecem destacadas." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="977" y="510" width="200" height="56" as="geometry"/>
        </mxCell>

        <mxCell id="live-title" value="Linhas extraídas em tempo real (preview)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="612" width="400" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="live-counter" value="atualizado a cada 2s — 172 linhas processadas" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="800" y="612" width="400" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="live-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="640" width="940" height="130" as="geometry"/>
        </mxCell>

        <mxCell id="lh1" value="ACT_CODE" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="276" y="648" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lh2" value="DESCRIÇÃO DO ATO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="400" y="648" width="320" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lh3" value="FAIXA" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="724" y="648" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lh4" value="BASE_FEE" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="888" y="648" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lh5" value="CONFIANÇA" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1000" y="648" width="180" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="lr1-c1" value="ESC.PUB.001" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="276" y="672" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lr1-c2" value="Escritura pública (ato sem valor declarado)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="400" y="672" width="320" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lr1-c3" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="724" y="672" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lr1-c4" value="R$ 423,90" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="888" y="672" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lr1-c5" value="0.98" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6FFFA;strokeColor=#285E61;fontSize=9;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1140" y="672" width="40" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="lr2-c1" value="ESC.PUB.002" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="276" y="694" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lr2-c2" value="Escritura pública c/ valor declarado · faixa 1" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="400" y="694" width="320" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lr2-c3" value="R$ 0,00 → R$ 67.500,00" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="724" y="694" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lr2-c4" value="R$ 156,21" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="888" y="694" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lr2-c5" value="0.96" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6FFFA;strokeColor=#285E61;fontSize=9;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1140" y="694" width="40" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="lr3-c1" value="PROC.GER.014" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="276" y="716" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lr3-c2" value="Procuração c/ poderes especiais (faixa não identificada)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#995200" vertex="1" parent="1">
          <mxGeometry x="400" y="716" width="320" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lr3-c3" value="? — verificar" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#995200" vertex="1" parent="1">
          <mxGeometry x="724" y="716" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lr3-c4" value="R$ 89,40" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="888" y="716" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lr3-c5" value="0.62" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=9;fontColor=#995200;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1140" y="716" width="40" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="lr4-c1" value="ATA.NOT.003" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="276" y="738" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lr4-c2" value="Ata notarial — fato simples" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="400" y="738" width="320" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lr4-c3" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="724" y="738" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lr4-c4" value="R$ 312,80" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="888" y="738" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="lr4-c5" value="0.99" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6FFFA;strokeColor=#285E61;fontSize=9;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1140" y="738" width="40" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="btn-back" value="← Voltar ao Dashboard" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="260" y="800" width="180" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-cancel-ext" value="Cancelar extração" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="450" y="800" width="160" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-next" value="Aguardando extração…" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#cdd5d2;strokeColor=#cdd5d2;fontColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1040" y="800" width="160" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX (R5 · Fee Schedule)&#10;1. Estado &quot;processando&quot; é o mais ansiogênico do fluxo. Cabeçalho promete: pode sair, te avisamos por SES. Reduz pressão de ficar olhando.&#10;2. Tempo restante estimado em texto + barra geral de % no topo. Tabelião lê o estado em 1s sem precisar interpretar a tela inteira.&#10;3. 4 etapas explícitas como cards horizontais (estado da arte: skeuomorfismo de pipeline). Cada uma mostra ✓/◐/○ + status PT-BR + detalhe técnico EN. Educa sem assustar.&#10;4. Stage 3 (em execução) destacada com strokeWidth=2 e ícone meio cheio (◐) — comunica progresso em curso sem animação no wireframe.&#10;5. Mini-progress bar dentro do card da etapa ativa — Tabelião confirma que tá saindo do lugar mesmo.&#10;6. Tabela &quot;preview ao vivo&quot; é a peça-chave de confiança: Tabelião VÊ a IA trabalhando, não fica adivinhando. Linha com confiança baixa já aparece destacada em âmbar — antecipa onde ele vai gastar atenção no Passo 3.&#10;7. Microcopy técnico (act_code, fee_schedule_line, sha256, Claude Sonnet 4.5, Textract) deliberadamente exposto — Tabelião deste cliente é técnico e quer auditar o pipeline.&#10;8. CTA principal vira disabled (cinza claro) durante extração, com texto claro &quot;Aguardando extração…&quot;. Volta a ficar ativo automaticamente quando Stage 4 conclui.&#10;9. Estado de erro (não mostrado): se uma etapa falha, card vira vermelho com retry inline. Sem voltar pro passo 1.&#10;10. Sem skeleton screens: dados reais aparecem assim que extraídos. Skeleton enganaria sobre o estado real do worker." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1260" y="120" width="220" height="700" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="04-fs-crud-linhas" name="04-fs-crud-linhas">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="FS 04 — Nova versão · Passo 3 · Revisão e edição linha a linha (diff com versão anterior)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1180" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#0F2536;strokeColor=#0F2536" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1c3a52;strokeColor=#0F2536;fontColor=#ffffff;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="Emolumentos / v2027.01 / Revisão linha a linha" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#cfd8dc;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="350" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontColor=#ffffff;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="stepper" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="130" width="1160" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="step1" value="✓ 1. Fonte e vigência" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="60" y="130" width="260" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="step2" value="✓ 2. Extração (IA)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="320" y="130" width="260" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="step3" value="● 3. Revisão linha a linha" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="580" y="130" width="320" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="step4" value="○ 4. Aprovar versão" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="900" y="130" width="320" height="48" as="geometry"/>
        </mxCell>

        <mxCell id="summary-bar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="190" width="1160" height="58" as="geometry"/>
        </mxCell>
        <mxCell id="sum-total" value="318" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="80" y="196" width="80" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="sum-total-l" value="linhas total" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="80" y="222" width="80" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="sum-novas" value="12" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontStyle=1;fontColor=#2e7d32" vertex="1" parent="1">
          <mxGeometry x="180" y="196" width="80" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="sum-novas-l" value="novas vs v2026.01" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="170" y="222" width="100" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="sum-alt" value="47" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontStyle=1;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="290" y="196" width="80" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="sum-alt-l" value="alteradas (valor mudou)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="270" y="222" width="120" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="sum-rem" value="6" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontStyle=1;fontColor=#b71c1c" vertex="1" parent="1">
          <mxGeometry x="410" y="196" width="80" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="sum-rem-l" value="removidas" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="410" y="222" width="80" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="sum-low" value="4" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontStyle=1;fontColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="510" y="196" width="80" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="sum-low-l" value="baixa confiança (&lt; 0.85)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="490" y="222" width="120" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="filter-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="640" y="202" width="270" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="filter-icon" value="[search]" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="648" y="202" width="60" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="filter-txt" value="filtrar por act_code, descrição…" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="700" y="202" width="200" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="fchip1" value="● baixa confiança" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontColor=#995200;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="920" y="206" width="120" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="fchip2" value="diff vs anterior" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="1050" y="206" width="100" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="fchip3-add" value="+ filtro" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1160" y="206" width="60" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="table-head" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#285E61;strokeColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="60" y="262" width="1160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th-diff" value="DIFF" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#ffffff;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="60" y="262" width="50" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th-code" value="ACT_CODE" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="110" y="262" width="110" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th-desc" value="DESCRIÇÃO DO ATO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="220" y="262" width="220" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th-range" value="FAIXA (valor_min → valor_max)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="440" y="262" width="190" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th-base" value="BASE_FEE" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="630" y="262" width="90" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th-state" value="STATE_FUND" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="720" y="262" width="90" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th-fcdp" value="FCDP_FEE" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="810" y="262" width="80" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th-iss" value="ISS_RATE" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="890" y="262" width="70" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th-conf" value="CONF" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="960" y="262" width="50" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th-obs" value="OBSERVAÇÕES" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="1010" y="262" width="140" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th-act" value="" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="1150" y="262" width="60" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="r1-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="60" y="294" width="1160" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r1-diff" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="60" y="294" width="50" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r1-code" value="ESC.PUB.001" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="110" y="294" width="110" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r1-desc" value="Escritura sem valor declarado" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="220" y="294" width="220" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r1-range" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="440" y="294" width="190" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r1-base" value="R$ 423,90" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="630" y="294" width="90" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r1-state" value="R$ 67,82" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="720" y="294" width="90" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r1-fcdp" value="R$ 12,72" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="810" y="294" width="80" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r1-iss" value="3,00%" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="890" y="294" width="70" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r1-conf" value="0.98" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6FFFA;strokeColor=#285E61;fontSize=9;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="965" y="304" width="40" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r1-obs" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="1010" y="294" width="140" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r1-act" value="✎  ⋯" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1150" y="294" width="60" height="42" as="geometry"/>
        </mxCell>

        <mxCell id="r2-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#eaf3fb;strokeColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="60" y="336" width="1160" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r2-diff" value="~" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#1F4E79;strokeColor=#1F4E79;fontSize=10;fontColor=#ffffff;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="68" y="346" width="22" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r2-code" value="ESC.PUB.002" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="110" y="336" width="110" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r2-desc" value="Escritura c/ valor · faixa 1" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="220" y="336" width="220" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r2-range" value="R$ 0,00 → R$ 67.500,00" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="440" y="336" width="190" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r2-base" value="R$ 156,21" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="630" y="336" width="90" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r2-base-old" value="era R$ 148,90" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;fontStyle=2;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="630" y="356" width="90" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="r2-state" value="R$ 24,99" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="720" y="336" width="90" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r2-fcdp" value="R$ 4,68" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="810" y="336" width="80" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r2-iss" value="3,00%" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="890" y="336" width="70" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r2-conf" value="0.96" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6FFFA;strokeColor=#285E61;fontSize=9;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="965" y="346" width="40" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r2-obs" value="reajuste anual" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1010" y="336" width="140" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r2-act" value="✎  ⋯" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontColor=#1F4E79" vertex="1" parent="1">
          <mxGeometry x="1150" y="336" width="60" height="42" as="geometry"/>
        </mxCell>

        <mxCell id="r3-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;strokeWidth=1.5" vertex="1" parent="1">
          <mxGeometry x="60" y="378" width="1160" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="r3-diff" value="!" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#cc6600;strokeColor=#cc6600;fontSize=12;fontColor=#ffffff;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="68" y="388" width="22" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r3-edit-banner" value="Edição inline · linha com baixa confiança da IA (0.62) — confira faixa e base_fee antes de aprovar" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#995200" vertex="1" parent="1">
          <mxGeometry x="100" y="386" width="700" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="r3-code-input" value="PROC.GER.014" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cc6600;fontSize=10;align=left;spacingLeft=8;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="110" y="416" width="106" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r3-desc-input" value="Procuração c/ poderes especiais" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cc6600;fontSize=10;align=left;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="220" y="416" width="216" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r3-min-input" value="0,00" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cc6600;fontSize=10;align=right;spacingRight=8" vertex="1" parent="1">
          <mxGeometry x="440" y="416" width="90" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r3-max-input" value="—" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cc6600;fontSize=10;align=right;spacingRight=8" vertex="1" parent="1">
          <mxGeometry x="534" y="416" width="92" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r3-base-input" value="89,40" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cc6600;fontSize=10;align=right;spacingRight=8" vertex="1" parent="1">
          <mxGeometry x="630" y="416" width="86" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r3-state-input" value="14,30" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cc6600;fontSize=10;align=right;spacingRight=8" vertex="1" parent="1">
          <mxGeometry x="720" y="416" width="86" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r3-fcdp-input" value="2,68" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cc6600;fontSize=10;align=right;spacingRight=8" vertex="1" parent="1">
          <mxGeometry x="810" y="416" width="76" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r3-iss-input" value="3,00" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cc6600;fontSize=10;align=right;spacingRight=8" vertex="1" parent="1">
          <mxGeometry x="890" y="416" width="66" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r3-conf" value="0.62" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=9;fontColor=#995200;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="965" y="421" width="40" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r3-obs-input" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cc6600;fontSize=10;align=left;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="1010" y="416" width="140" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="r3-help" value="ⓘ IA não conseguiu identificar faixa de valor — verifique se este ato realmente independe de valor declarado ou cadastre faixas separadas. Bounding box no PDF: pág. 14, linha 7." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#995200" vertex="1" parent="1">
          <mxGeometry x="110" y="456" width="900" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="r3-cancel" value="Cancelar" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1020" y="456" width="60" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="r3-save" value="Salvar linha" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#cc6600;strokeColor=#cc6600;fontColor=#ffffff;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1086" y="456" width="100" height="26" as="geometry"/>
        </mxCell>

        <mxCell id="r4-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#eafaef;strokeColor=#2e7d32" vertex="1" parent="1">
          <mxGeometry x="60" y="498" width="1160" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r4-diff" value="+" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2e7d32;strokeColor=#2e7d32;fontSize=10;fontColor=#ffffff;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="68" y="508" width="22" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r4-code" value="DOA.ELE.001" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="110" y="498" width="110" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r4-desc" value="Doação eletrônica (novo ato 2027)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="220" y="498" width="220" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r4-range" value="R$ 0,00 → R$ 67.500,00" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="440" y="498" width="190" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r4-base" value="R$ 142,30" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#2e7d32" vertex="1" parent="1">
          <mxGeometry x="630" y="498" width="90" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r4-state" value="R$ 22,77" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="720" y="498" width="90" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r4-fcdp" value="R$ 4,27" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="810" y="498" width="80" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r4-iss" value="3,00%" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="890" y="498" width="70" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r4-conf" value="0.91" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6FFFA;strokeColor=#285E61;fontSize=9;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="965" y="508" width="40" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r4-obs" value="Provim. 47/2026, art. 12" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1010" y="498" width="140" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r4-act" value="✎  ⋯" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1150" y="498" width="60" height="42" as="geometry"/>
        </mxCell>

        <mxCell id="r5-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fdeded;strokeColor=#b71c1c" vertex="1" parent="1">
          <mxGeometry x="60" y="540" width="1160" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r5-diff" value="−" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#b71c1c;strokeColor=#b71c1c;fontSize=10;fontColor=#ffffff;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="68" y="550" width="22" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r5-code" value="DOA.ANT.009" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New;fontColor=#888;fontStyle=4" vertex="1" parent="1">
          <mxGeometry x="110" y="540" width="110" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r5-desc" value="Doação física antiga (revogado CGJ-SP)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#888;fontStyle=4" vertex="1" parent="1">
          <mxGeometry x="220" y="540" width="220" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r5-range" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="440" y="540" width="190" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r5-base" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="630" y="540" width="90" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r5-obs" value="removida na v2027.01 (não tem mais previsão)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#b71c1c" vertex="1" parent="1">
          <mxGeometry x="720" y="540" width="430" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r5-act" value="↺ restaurar" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#1F4E79;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1150" y="540" width="60" height="42" as="geometry"/>
        </mxCell>

        <mxCell id="r6-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="60" y="582" width="1160" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r6-diff" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="60" y="582" width="50" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r6-code" value="ATA.NOT.003" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="110" y="582" width="110" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r6-desc" value="Ata notarial — fato simples" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="220" y="582" width="220" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r6-range" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="440" y="582" width="190" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r6-base" value="R$ 312,80" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="630" y="582" width="90" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r6-state" value="R$ 50,05" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="720" y="582" width="90" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r6-fcdp" value="R$ 9,38" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="810" y="582" width="80" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r6-iss" value="3,00%" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="890" y="582" width="70" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r6-conf" value="0.99" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6FFFA;strokeColor=#285E61;fontSize=9;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="965" y="592" width="40" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r6-obs" value="—" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="1010" y="582" width="140" height="42" as="geometry"/>
        </mxCell>
        <mxCell id="r6-act" value="✎  ⋯" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1150" y="582" width="60" height="42" as="geometry"/>
        </mxCell>

        <mxCell id="pagination" value="‹  página 1 de 11  · mostrando 1–30 de 318 linhas  ›" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="60" y="638" width="1160" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="footer-bar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="60" y="676" width="1160" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="legend-title" value="LEGENDA:" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="76" y="688" width="80" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="legend-add-d" value="+" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2e7d32;strokeColor=#2e7d32;fontSize=10;fontColor=#ffffff;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="156" y="690" width="22" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="legend-add-l" value="nova" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="182" y="688" width="50" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="legend-alt-d" value="~" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#1F4E79;strokeColor=#1F4E79;fontSize=10;fontColor=#ffffff;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="236" y="690" width="22" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="legend-alt-l" value="alterada" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="262" y="688" width="70" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="legend-rem-d" value="−" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#b71c1c;strokeColor=#b71c1c;fontSize=10;fontColor=#ffffff;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="336" y="690" width="22" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="legend-rem-l" value="removida" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="362" y="688" width="70" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="legend-low-d" value="!" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#cc6600;strokeColor=#cc6600;fontSize=10;fontColor=#ffffff;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="436" y="690" width="22" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="legend-low-l" value="baixa confiança" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="462" y="688" width="120" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="autosave" value="✓ rascunho salvo automaticamente · há 12s · fee_schedule_version_id v_dr_8c4f" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="76" y="710" width="500" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="legend-action" value="+ adicionar linha manual" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="800" y="700" width="180" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="legend-export" value="exportar CSV pra revisar offline" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="990" y="700" width="220" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="btn-discard" value="Descartar versão" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#b71c1c;fontColor=#b71c1c;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="60" y="752" width="160" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-draft" value="Salvar rascunho" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#666;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="230" y="752" width="140" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-back" value="← voltar" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="400" y="752" width="100" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-approve" value="Aprovar versão →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#285E61;strokeColor=#285E61;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1040" y="752" width="180" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="approve-help" value="aprovação exige MFA TOTP · 4 linhas com baixa confiança ainda não revisadas" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="700" y="792" width="520" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX (R5 · Fee Schedule)&#10;1. Tela full-width (sem sidebar) — esta é a tela de trabalho intenso do Tabelião, cada pixel horizontal vale ouro pra exibir as 11 colunas da fee_schedule_line.&#10;2. Diff é a essência desta tela — Tabelião precisa SABER o que mudou em relação à versão vigente. KPIs no topo respondem &quot;quanto?&quot;; coluna DIFF responde &quot;onde?&quot;.&#10;3. 5 estados visuais distintos: inalterada (branca), alterada (azul, mostra valor anterior em cinza pequeno embaixo), nova (verde), removida (vermelha + strikethrough), baixa confiança (laranja, edição inline expandida).&#10;4. Edição inline (linha laranja expandida) é o padrão — clicar em ✎ transforma a linha numa série de inputs sem abrir modal. Mantém contexto da tabela toda.&#10;5. Linha de baixa confiança vem ABERTA por default na primeira vez que a tela carrega — força revisão antes de poder aprovar.&#10;6. Microcopy técnica abaixo da linha em edição cita coordenada do PDF (pág. 14, linha 7) — Tabelião pode auditar contra fonte original em segundos.&#10;7. Removidas mantêm botão ↺ restaurar — IA não decide sozinha que algo sumiu pra sempre.&#10;8. Auto-save é mostrado em texto + hash do draft. Tabelião confia que pode sair e voltar.&#10;9. CTA &quot;Aprovar versão →&quot; em turquesa, ao lado de helper text alertando MFA + linhas pendentes. Não bloqueia o botão, mas explicita o custo.&#10;10. &quot;Descartar versão&quot; em vermelho contornado, lado esquerdo — distante do CTA principal (Fitts: difícil clicar por engano)." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1260" y="60" width="220" height="800" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="05-fs-lista-versoes" name="05-fs-lista-versoes">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="FS 05 — Histórico de versões da Tabela de Emolumentos (timeline + diff entre versões)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1180" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#0F2536;strokeColor=#0F2536" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1c3a52;strokeColor=#0F2536;fontColor=#ffffff;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="Emolumentos / Histórico de versões" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#cfd8dc;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="350" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontColor=#ffffff;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="sidebar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="200" height="744" as="geometry"/>
        </mxCell>
        <mxCell id="nav-fee" value="[tabela]  Emolumentos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d8f0ee;strokeColor=none;fontSize=11;align=left;spacingLeft=14;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="40" y="130" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="sub-active" value="•  Histórico de versões" style="text;html=1;strokeColor=none;fillColor=#f0f0f0;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="60" y="172" width="180" height="26" as="geometry"/>
        </mxCell>

        <mxCell id="page-title" value="Histórico de versões — fee_schedule_version" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="260" y="130" width="600" height="30" as="geometry"/>
        </mxCell>
        <mxCell id="page-sub" value="Cada linha é uma versão imutável (Object Lock S3, hash sha256). Cobranças passadas continuam apontando pro hash da versão vigente naquele momento — nada se perde com substituição." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=2;fontColor=#555" vertex="1" parent="1">
          <mxGeometry x="260" y="156" width="800" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="cta-compare" value="Comparar 2 versões" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#285E61;fontColor=#285E61;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="900" y="130" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="cta-new" value="+ Nova versão" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#285E61;strokeColor=#285E61;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1080" y="130" width="140" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="filter-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="200" width="940" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="f-status-l" value="Status:" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="276" y="200" width="50" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="f-c1" value="todos" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#285E61;strokeColor=#285E61;fontColor=#ffffff;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="326" y="208" width="60" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="f-c2" value="active" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#285E61;fontColor=#285E61;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="392" y="208" width="60" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="f-c3" value="draft" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontColor=#666;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="458" y="208" width="60" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="f-c4" value="expired" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontColor=#666;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="524" y="208" width="60" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="f-c5" value="superseded" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontColor=#666;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="590" y="208" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="f-period-l" value="Período:" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="730" y="200" width="60" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="f-period" value="todas as datas  ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="788" y="208" width="180" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="f-count" value="5 versões encontradas" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="990" y="200" width="200" height="40" as="geometry"/>
        </mxCell>

        <mxCell id="timeline-axis" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#cdd5d2;strokeColor=#cdd5d2" vertex="1" parent="1">
          <mxGeometry x="298" y="280" width="2" height="540" as="geometry"/>
        </mxCell>

        <mxCell id="t1-dot" value="" style="ellipse;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#cc6600;strokeWidth=3" vertex="1" parent="1">
          <mxGeometry x="284" y="288" width="30" height="30" as="geometry"/>
        </mxCell>
        <mxCell id="t1-card" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cc6600;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="340" y="270" width="860" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="t1-label" value="v2027.01" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="356" y="280" width="150" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="t1-pill" value="DRAFT" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#cc6600;fontSize=9;fontColor=#995200;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="500" y="284" width="60" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="t1-desc" value="Tabela de Emolumentos CGJ-SP exercício 2027 · Provim. CGJ-SP CG nº 47/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="356" y="306" width="600" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="t1-grid" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="356" y="332" width="824" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="t1-g1l" value="Vigência prevista" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="364" y="334" width="160" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="t1-g1v" value="01/01/2027 → 31/12/2027" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="364" y="352" width="160" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="t1-g2l" value="Linhas" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="540" y="334" width="120" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="t1-g2v" value="318 (12 novas, 47 alteradas, 6 removidas)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="540" y="352" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="t1-g3l" value="Hash sha256 (provisório)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="840" y="334" width="180" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="t1-g3v" value="7c19…ab8 (recalcula ao aprovar)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="840" y="352" width="240" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="t1-action" value="Continuar revisão →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#cc6600;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1040" y="282" width="150" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="t2-dot" value="●" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=24;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="280" y="402" width="40" height="30" as="geometry"/>
        </mxCell>
        <mxCell id="t2-card" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#E6FFFA;strokeColor=#285E61;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="340" y="394" width="860" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="t2-label" value="v2026.01" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1;fontColor=#285E61" vertex="1" parent="1">
          <mxGeometry x="356" y="404" width="150" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="t2-pill" value="ACTIVE" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#285E61;strokeColor=#285E61;fontSize=9;fontColor=#ffffff;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="500" y="408" width="60" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="t2-current" value="vigente agora · vence em 23 dias" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="568" y="408" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="t2-desc" value="Tabela de Emolumentos CGJ-SP exercício 2026 · Provim. CGJ-SP CG nº 51/2025" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="356" y="430" width="600" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="t2-grid" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="356" y="456" width="824" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="t2-g1l" value="Vigência" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="364" y="458" width="160" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="t2-g1v" value="01/01/2026 → 31/12/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="364" y="476" width="160" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="t2-g2l" value="Linhas" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="540" y="458" width="120" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="t2-g2v" value="312 (1.847 cobranças geradas em 30d)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="540" y="476" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="t2-g3l" value="Hash sha256 imutável" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="840" y="458" width="180" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="t2-g3v" value="a4f29c7d1e83…2b91c · S3 Object Lock" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="840" y="476" width="280" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="t2-action" value="Aprovado por Lucas C. + MFA · 21/12/2025 14:08" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="850" y="406" width="340" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="t3-dot" value="○" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=20;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="280" y="528" width="40" height="30" as="geometry"/>
        </mxCell>
        <mxCell id="t3-card" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fcfcfc;strokeColor=#bbb" vertex="1" parent="1">
          <mxGeometry x="340" y="520" width="860" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t3-label" value="v2025.01" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="356" y="526" width="150" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="t3-pill" value="EXPIRED" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=9;fontColor=#666;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="500" y="528" width="70" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="t3-desc" value="Tabela de Emolumentos CGJ-SP exercício 2025 · vigência 01/01/2025 → 31/12/2025 · 306 linhas · superseded por v2026.01" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="356" y="552" width="700" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="t3-detail" value="hash 2e9051fa…44d · aprovada por Lucas C. + MFA · 18/12/2024 · 12.482 cobranças no histórico (auditável)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="356" y="572" width="700" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="t3-action" value="Ver linhas →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1080" y="552" width="100" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="t4-dot" value="○" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=20;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="280" y="616" width="40" height="30" as="geometry"/>
        </mxCell>
        <mxCell id="t4-card" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fcfcfc;strokeColor=#bbb" vertex="1" parent="1">
          <mxGeometry x="340" y="608" width="860" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t4-label" value="v2024.01" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="356" y="614" width="150" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="t4-pill" value="SUPERSEDED" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=9;fontColor=#666;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="500" y="616" width="96" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="t4-desc" value="Tabela de Emolumentos CGJ-SP exercício 2024 · vigência 01/01/2024 → 31/12/2024 · 298 linhas · superseded por v2025.01" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="356" y="640" width="700" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="t4-detail" value="hash 91ab437c…0fe · aprovada por Lucas C. + MFA · 22/12/2023 · 11.205 cobranças no histórico (auditável)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="356" y="660" width="700" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="t4-action" value="Ver linhas →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1080" y="640" width="100" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="t5-dot" value="○" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=20;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="280" y="704" width="40" height="30" as="geometry"/>
        </mxCell>
        <mxCell id="t5-card" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fcfcfc;strokeColor=#bbb" vertex="1" parent="1">
          <mxGeometry x="340" y="696" width="860" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="t5-label" value="v2023.01" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="356" y="702" width="150" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="t5-pill" value="SUPERSEDED" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=9;fontColor=#666;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="500" y="704" width="96" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="t5-desc" value="Versão semente — primeira tabela cadastrada no go-live · 280 linhas · superseded por v2024.01" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="356" y="728" width="700" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="t5-detail" value="hash f380bb12…19a · cadastro inicial Stoix · 15/01/2023 · 9.834 cobranças no histórico" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="356" y="748" width="700" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="t5-action" value="Ver linhas →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#285E61;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1080" y="728" width="100" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="end-marker" value="início do registro · go-live em 15/01/2023" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="340" y="788" width="400" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX (R5 · Fee Schedule)&#10;1. Timeline vertical com axis cinza ao centro — comunica continuidade temporal e imutabilidade do registro. Cada versão é um nó.&#10;2. Pílulas de status ordenadas por urgência visual: DRAFT (laranja, contornado) &gt; ACTIVE (turquesa preenchido) &gt; EXPIRED/SUPERSEDED (cinza). Tabelião lê o estado em 1 olhar.&#10;3. Cards expandidos pra DRAFT e ACTIVE (4 colunas: vigência, linhas, hash, ação) — versões que ainda importam pra trabalho. Cards condensados pra EXPIRED/SUPERSEDED (1 linha de descrição + 1 de detalhe) — auditáveis sem competir por atenção.&#10;4. Hash sha256 sempre visível — fundamento probatório da fee_schedule_version. Cada billing_event aponta pra essa string.&#10;5. Card ACTIVE mostra inline &quot;1.847 cobranças geradas em 30d&quot; — Tabelião sabe o impacto da versão sem precisar ir pra Relatórios.&#10;6. Cards EXPIRED/SUPERSEDED mostram contagem histórica de cobranças (12.482, 11.205) — comunica que NADA se perde com substituição. Tranquiliza sobre auditoria.&#10;7. Filtros como pílulas-toggle no topo (não dropdown) — mais rápido pra Tabelião alternar entre views. Pílula ativa em turquesa preenchido.&#10;8. CTA &quot;Comparar 2 versões&quot; ao lado de &quot;+ Nova versão&quot; — abre modo de seleção de 2 cards pra exibir diff completo (próxima tela, fora do escopo deste wireframe).&#10;9. Marcador &quot;início do registro&quot; no final da timeline — fecha o tempo, comunica que esse é o estado completo do histórico.&#10;10. Card ACTIVE recebe destaque sutil de fundo turquesa claro (#E6FFFA), enquanto DRAFT recebe fundo branco com borda laranja — ambos chamam atenção sem se sobrepor visualmente." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1260" y="120" width="220" height="700" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="01-tc-lista" name="01-tc-lista">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="TC 01 — Catálogo de modelos de ato (act_template) · lista, filtros, KPIs" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1100" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1a202c;strokeColor=#1a202c" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="Stoix Cartorial" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontColor=#ffffff;fontSize=12;fontStyle=1;align=left;spacingLeft=18" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="160" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="220" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="Template Catalog · Modelos de ato" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#cbd5e0" vertex="1" parent="1">
          <mxGeometry x="360" y="76" width="320" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="sidebar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="200" height="744" as="geometry"/>
        </mxCell>
        <mxCell id="nav1" value="▣  Dashboard" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="130" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav2" value="[catalogo]  Modelos de ato" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e6effa;strokeColor=none;fontSize=11;align=left;spacingLeft=14;fontStyle=1;fontColor=#2C5282" vertex="1" parent="1">
          <mxGeometry x="40" y="166" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav3" value="[folder]  Knowledge Base" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="202" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav-fee" value="[tabela]  Emolumentos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="238" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav-proc" value="[wiki]  Procedimentos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="274" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav4" value="[lista]  Atos em execução" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="310" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav5" value="[graph]  Relatórios" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="346" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav6" value="[users]  Usuários" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="382" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav7" value="⚙  Configurações" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="418" width="200" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="tc-sidebar-sub" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="60" y="198" width="180" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="sub1" value="•  Lista de modelos" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#2C5282" vertex="1" parent="1">
          <mxGeometry x="76" y="204" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="sub2" value="•  Novo modelo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="76" y="226" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="sub3" value="•  Versões aprovadas" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="76" y="248" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="sub4" value="•  Cláusulas reutilizáveis" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="76" y="270" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="sub5" value="•  Auditoria de uso" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="76" y="292" width="160" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="welcome" value="Modelos de ato do 27º Tabelionato" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="130" width="600" height="30" as="geometry"/>
        </mxCell>
        <mxCell id="welcome-sub" value="Catálogo versionado de act_template. Cada versão tem hash imutável; o Tabelião aprova antes de tornar-se vigente. Modelos vigentes alimentam Fluxo A (criação/derivação) e Fluxo B (preenchimento durante lavratura)." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=2;fontColor=#555" vertex="1" parent="1">
          <mxGeometry x="260" y="156" width="780" height="34" as="geometry"/>
        </mxCell>

        <mxCell id="cta-novo" value="+  Novo modelo" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#2C5282;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1080" y="130" width="160" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="kpi-title" value="Inventário de modelos · status na entidade act_template" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#555" vertex="1" parent="1">
          <mxGeometry x="260" y="200" width="700" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="kpi1" value="VIGENTES&#10;18" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#2C5282;strokeWidth=2;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10;fontColor=#2C5282" vertex="1" parent="1">
          <mxGeometry x="260" y="226" width="300" height="92" as="geometry"/>
        </mxCell>
        <mxCell id="kpi1-pill" value="effective" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#2C5282;fontColor=#ffffff;fontSize=9;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="490" y="236" width="60" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="kpi1-sub" value="modelos publicados · consumidos por Fluxos A/B" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="272" y="286" width="280" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="kpi2" value="EM REVISÃO&#10;4" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#cc6600;strokeWidth=2;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10;fontColor=#995200" vertex="1" parent="1">
          <mxGeometry x="580" y="226" width="300" height="92" as="geometry"/>
        </mxCell>
        <mxCell id="kpi2-pill" value="draft" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#cc6600;strokeColor=#cc6600;fontColor=#ffffff;fontSize=9;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="810" y="236" width="60" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="kpi2-sub" value="rascunhos aguardando aprovação do Tabelião" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="592" y="286" width="280" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="kpi3" value="DEPRECATED&#10;3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#666;strokeWidth=2;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="900" y="226" width="300" height="92" as="geometry"/>
        </mxCell>
        <mxCell id="kpi3-pill" value="deprecated" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#666;strokeColor=#666;fontColor=#ffffff;fontSize=9;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1120" y="236" width="70" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="kpi3-sub" value="aposentados — históricos preservados em billing_event" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="912" y="286" width="280" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="filtros" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="332" width="940" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="search" value="[buscar] codigo, nome ou tipo_ato..." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;spacingLeft=8;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="276" y="342" width="280" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="f1" value="tipo_ato: Todos ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="568" y="342" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="f2" value="classe: Todas ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="740" y="342" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="f3" value="status: Todos ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="912" y="342" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="f4" value="↻" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=14;fontColor=#2C5282" vertex="1" parent="1">
          <mxGeometry x="1080" y="342" width="36" height="28" as="geometry"/>
        </mxCell>

        <mxCell id="thead" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="392" width="940" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th1" value="CÓDIGO · NOME" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;spacingLeft=10;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="260" y="392" width="320" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th2" value="tipo_ato · classe" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="580" y="392" width="180" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th3" value="VERSÃO VIGENTE" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="760" y="392" width="120" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th4" value="STATUS" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="880" y="392" width="100" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th5" value="ATUALIZADO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="980" y="392" width="120" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="th6" value="" style="text;html=1;strokeColor=none;fillColor=none" vertex="1" parent="1">
          <mxGeometry x="1100" y="392" width="100" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="r1" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="260" y="424" width="940" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r1c1" value="ESC-VC-URB-01 · Escritura de venda e compra (urbano)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="424" width="320" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r1c1b" value="hash 7e2a...8ff · 12 cláusulas · 18 parâmetros" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="260" y="446" width="320" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r1c2" value="escritura · imobiliário" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="580" y="424" width="180" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r1c3" value="v3 · effective_from 03/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="760" y="424" width="120" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r1c4" value="VIGENTE" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e6effa;strokeColor=#2C5282;fontSize=9;fontColor=#2C5282;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="880" y="436" width="80" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r1c5" value="Lucas C. · 12/03/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="980" y="424" width="120" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r1c6" value="abrir →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#2C5282;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="424" width="90" height="48" as="geometry"/>
        </mxCell>

        <mxCell id="r2" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="260" y="472" width="940" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r2c1" value="PROC-PUB-AMP-02 · Procuração pública ampla" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="472" width="320" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r2c1b" value="hash bc41...d09 · 6 cláusulas · 9 parâmetros" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="260" y="494" width="320" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r2c2" value="procuração · representação" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="580" y="472" width="180" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r2c3" value="v2 · effective_from 01/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="760" y="472" width="120" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r2c4" value="VIGENTE" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e6effa;strokeColor=#2C5282;fontSize=9;fontColor=#2C5282;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="880" y="484" width="80" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r2c5" value="Lucas C. · 04/01/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="980" y="472" width="120" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r2c6" value="abrir →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#2C5282;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="472" width="90" height="48" as="geometry"/>
        </mxCell>

        <mxCell id="r3" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fffaf0;strokeColor=#e0c080" vertex="1" parent="1">
          <mxGeometry x="260" y="520" width="940" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r3c1" value="ATA-NOT-FATO-01 · Ata notarial de constatação de fato" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="520" width="320" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r3c1b" value="hash 22ca...903 · 4 cláusulas · 5 parâmetros · revisão pendente" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#995200;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="260" y="542" width="380" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r3c2" value="ata · constatação" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="580" y="520" width="180" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r3c3" value="v1 (rascunho) · v0 vigente" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="760" y="520" width="120" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r3c4" value="DRAFT" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=9;fontColor=#995200;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="880" y="532" width="80" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r3c5" value="Marina S. · 02/05/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="980" y="520" width="120" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r3c6" value="aprovar →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#cc6600;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="520" width="90" height="48" as="geometry"/>
        </mxCell>

        <mxCell id="r4" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="260" y="568" width="940" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r4c1" value="ESC-DOA-USU-01 · Doação com reserva de usufruto" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="568" width="320" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r4c1b" value="hash 9a18...77c · 9 cláusulas · 14 parâmetros" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="260" y="590" width="320" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r4c2" value="escritura · doação" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="580" y="568" width="180" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r4c3" value="v1 · effective_from 04/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="760" y="568" width="120" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r4c4" value="VIGENTE" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e6effa;strokeColor=#2C5282;fontSize=9;fontColor=#2C5282;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="880" y="580" width="80" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r4c5" value="Lucas C. · 15/04/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="980" y="568" width="120" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r4c6" value="abrir →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#2C5282;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="568" width="90" height="48" as="geometry"/>
        </mxCell>

        <mxCell id="r5" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="260" y="616" width="940" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r5c1" value="TEST-PUB-CER-01 · Testamento público cerrado" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;spacingLeft=10;fontStyle=1;fontColor=#888;textDecoration=line-through" vertex="1" parent="1">
          <mxGeometry x="260" y="616" width="320" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r5c1b" value="hash 4d8f...112 · superado por TEST-PUB-CER-02 (v1)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="260" y="638" width="320" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="r5c2" value="testamento · sucessório" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="580" y="616" width="180" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r5c3" value="v2 (deprecated 01/2026)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="760" y="616" width="120" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r5c4" value="DEPRECATED" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#666;fontSize=9;fontColor=#444;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="870" y="628" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="r5c5" value="Lucas C. · 02/01/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="980" y="616" width="120" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="r5c6" value="histórico →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1100" y="616" width="90" height="48" as="geometry"/>
        </mxCell>

        <mxCell id="r-more" value="[ + 20 outros modelos do MVP — escrituras de permuta, dação em pagamento, instituição de bem de família, atas notariais... ]" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;spacingLeft=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="260" y="668" width="700" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="paginator" value="‹  1  2  3  ›   ·   25 modelos · 10 por página" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="900" y="668" width="300" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="legend" value="LEGENDA STATUS · entidade act_template&#10;VIGENTE — versão publicada, hash imutável, alimentando Fluxo A (criação) e Fluxo B (preenchimento)&#10;DRAFT — rascunho criado pelo escrevente, aguarda aprovação do Tabelião (MFA + audit log)&#10;DEPRECATED — aposentado; histórico preservado em billing_event.act_template_version_hash" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=12;spacingTop=10" vertex="1" parent="1">
          <mxGeometry x="260" y="710" width="940" height="100" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX (R5)&#10;1. Hierarquia: KPI por status &gt; CTA novo &gt; tabela. Tabelião identifica em 2s o que precisa aprovar (DRAFT laranja).&#10;2. Modelos = act_template (entidade R5 já existente). Cada linha resume a versão vigente; ações abrem TC-03 (versões) ou TC-04 (detalhe).&#10;3. Hash visível na sub-linha — material de auditoria. Sem hash, modelo perde vínculo com billing_event imutável.&#10;4. Filtros por tipo_ato, classe e status mapeiam atributos do schema R5 — labels técnicos em EN, copy em PT-BR.&#10;5. Cor azul-marinho #2C5282 (cluster Core) reservada ao Template Catalog. KBC usa #1F4E79; Fee usa turquesa; Procedure usa roxo.&#10;6. Linha DEPRECATED com strike-through educa: modelo continua existindo (FK histórica), mas não pode ser instanciado em novos atos.&#10;7. Sub-nav inclui &quot;Cláusulas reutilizáveis&quot; — quando catálogo crescer, biblioteca de clausulas vira entidade própria.&#10;8. Bucket lógico: notary-{slug}-templates (R5 rename). Tabelião não vê path S3, só hash e versão." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#999;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1260" y="120" width="220" height="600" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="02-tc-criar-editar" name="02-tc-criar-editar">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="TC 02 — Editor de modelo (act_template_version draft) · 3 colunas + tab Editor / Upload DOCX" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=15;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1200" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1a202c;strokeColor=#1a202c" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="Stoix Cartorial" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontColor=#ffffff;fontSize=12;fontStyle=1;align=left;spacingLeft=18" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="160" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="220" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="Template Catalog / Modelos / ESC-VC-URB-01 · editar v4 (draft)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#cbd5e0" vertex="1" parent="1">
          <mxGeometry x="360" y="76" width="500" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="toolbar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="40" y="124" width="1200" height="56" as="geometry"/>
        </mxCell>

        <mxCell id="tab1-active" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#2C5282" vertex="1" parent="1">
          <mxGeometry x="40" y="124" width="220" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="tab1" value="✎  Editor textual" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="40" y="124" width="220" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="tab2" value="[doc]  Upload DOCX" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="260" y="124" width="220" height="56" as="geometry"/>
        </mxCell>

        <mxCell id="actions-bar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="500" y="134" width="740" height="38" as="geometry"/>
        </mxCell>
        <mxCell id="status-info" value="● rascunho · alterações não salvas (3)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#cc6600;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="500" y="134" width="240" height="38" as="geometry"/>
        </mxCell>
        <mxCell id="btn-validar" value="✓ Validar sintaxe" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="760" y="134" width="130" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-rascunho" value="Salvar rascunho" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#2C5282;fontSize=10;fontColor=#2C5282;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="900" y="134" width="140" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="btn-aprovar" value="Submeter p/ aprovação →" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#2C5282;fontSize=10;fontColor=#ffffff;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1050" y="134" width="180" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="col1-head" value="METADADOS · act_template" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#2C5282;fontColor=#ffffff;fontSize=11;fontStyle=1;align=left;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="40" y="190" width="280" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="col1-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="40" y="222" width="280" height="638" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-codigo" value="codigo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="56" y="234" width="240" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="inp-codigo" value="ESC-VC-URB-01" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=8;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="56" y="254" width="248" height="30" as="geometry"/>
        </mxCell>
        <mxCell id="hint-codigo" value="imutável após primeira aprovação" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="56" y="284" width="240" height="14" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-nome" value="nome" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="56" y="306" width="240" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="inp-nome" value="Escritura de venda e compra (urbano)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="56" y="326" width="248" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-tipo" value="tipo_ato" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="56" y="370" width="240" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="inp-tipo" value="escritura ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="56" y="390" width="248" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-classe" value="classe" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="56" y="434" width="240" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="inp-classe" value="imobiliário ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;align=left;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="56" y="454" width="248" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="lbl-status" value="status (versão atual)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="56" y="498" width="240" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="inp-status" value="DRAFT" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontColor=#995200;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="56" y="518" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="hint-status" value="só Tabelião pode promover a effective" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="146" y="518" width="160" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="version-info" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cccccc" vertex="1" parent="1">
          <mxGeometry x="56" y="558" width="248" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="vi-h" value="VERSÃO EM EDIÇÃO" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="56" y="562" width="248" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="vi1" value="numero_versao: v4" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="56" y="582" width="248" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="vi2" value="hash_imutavel: pendente" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10;fontFamily=Courier New;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="56" y="600" width="248" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="vi3" value="kb_version_origem_id: NSCGJ-Tomo-II-v3" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="56" y="618" width="248" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="vi4" value="created_by_user_id: lucas.c@27tab.sp" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="56" y="636" width="248" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="param-section" value="parametros declarados (18)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#2C5282;spacingLeft=4" vertex="1" parent="1">
          <mxGeometry x="56" y="676" width="240" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="param-list" value="• outorgante_nome (string, req)&#10;• outorgante_cpf (cpf, req)&#10;• outorgado_nome (string, req)&#10;• outorgado_cpf (cpf, req)&#10;• imovel_matricula (string, req)&#10;• valor_negocio (currency, req)&#10;• forma_pagamento (enum, req)&#10;• ... + 11 outros" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=4;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="56" y="698" width="248" height="146" as="geometry"/>
        </mxCell>

        <mxCell id="col2-head" value="EDITOR · corpo_template (handlebars)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#2C5282;fontColor=#ffffff;fontSize=11;fontStyle=1;align=left;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="320" y="190" width="600" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="col2-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="320" y="222" width="600" height="638" as="geometry"/>
        </mxCell>

        <mxCell id="ed-toolbar-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cccccc" vertex="1" parent="1">
          <mxGeometry x="320" y="222" width="600" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="tb1" value="B" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="332" y="226" width="28" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="tb2" value="I" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="360" y="226" width="28" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="tb3" value="¶" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14" vertex="1" parent="1">
          <mxGeometry x="388" y="226" width="28" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="tb-sep" value="|" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontColor=#cccccc" vertex="1" parent="1">
          <mxGeometry x="416" y="226" width="14" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="tb4" value="+ Inserir cláusula ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e6effa;strokeColor=#2C5282;fontSize=10;fontColor=#2C5282;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="436" y="228" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="tb5" value="{{ Inserir parâmetro }} ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e6effa;strokeColor=#2C5282;fontSize=10;fontColor=#2C5282;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="600" y="228" width="180" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="tb6" value="📚 Consultar KB" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="784" y="228" width="124" height="28" as="geometry"/>
        </mxCell>

        <mxCell id="ed-content" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cccccc" vertex="1" parent="1">
          <mxGeometry x="320" y="262" width="600" height="598" as="geometry"/>
        </mxCell>

        <mxCell id="ed-l1" value="ESCRITURA PÚBLICA DE VENDA E COMPRA" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="336" y="278" width="568" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="ed-l2" value="SAIBAM quantos esta escritura pública virem que, aos {{data_extenso}}, neste 27º Tabelionato de Notas da Capital de São Paulo, perante mim, Tabelião, compareceram as partes:" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="336" y="306" width="568" height="46" as="geometry"/>
        </mxCell>

        <mxCell id="ed-claus1-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f6fc;strokeColor=#2C5282;strokeWidth=1;dashed=1" vertex="1" parent="1">
          <mxGeometry x="332" y="358" width="576" height="68" as="geometry"/>
        </mxCell>
        <mxCell id="ed-claus1-tag" value="cláusula: qualificação_outorgante" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#2C5282;fontColor=#ffffff;fontSize=8;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="338" y="362" width="180" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="ed-claus1" value="OUTORGANTE VENDEDOR: {{outorgante_nome}}, brasileiro(a), portador do CPF {{outorgante_cpf}}, residente e domiciliado em {{outorgante_endereco}};" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="338" y="380" width="566" height="42" as="geometry"/>
        </mxCell>

        <mxCell id="ed-claus2-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f6fc;strokeColor=#2C5282;strokeWidth=1;dashed=1" vertex="1" parent="1">
          <mxGeometry x="332" y="432" width="576" height="68" as="geometry"/>
        </mxCell>
        <mxCell id="ed-claus2-tag" value="cláusula: qualificação_outorgado" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#2C5282;fontColor=#ffffff;fontSize=8;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="338" y="436" width="180" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="ed-claus2" value="OUTORGADO COMPRADOR: {{outorgado_nome}}, brasileiro(a), portador do CPF {{outorgado_cpf}}, residente e domiciliado em {{outorgado_endereco}};" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="338" y="454" width="566" height="42" as="geometry"/>
        </mxCell>

        <mxCell id="ed-claus3-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f6fc;strokeColor=#2C5282;strokeWidth=1;dashed=1" vertex="1" parent="1">
          <mxGeometry x="332" y="506" width="576" height="98" as="geometry"/>
        </mxCell>
        <mxCell id="ed-claus3-tag" value="cláusula: descrição_imóvel · pré-aprovada NSCGJ-Tomo-II" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#2C5282;fontColor=#ffffff;fontSize=8;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="338" y="510" width="280" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="ed-claus3" value="OBJETO: o imóvel matriculado sob nº {{imovel_matricula}} no {{cri_nome}}, situado à {{imovel_endereco}}, com área total de {{imovel_area_m2}} m², descrito conforme certidão atualizada datada de {{certidao_data}}, livre e desembaraçado de quaisquer ônus." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="338" y="528" width="566" height="72" as="geometry"/>
        </mxCell>

        <mxCell id="ed-claus4-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fffaf0;strokeColor=#cc6600;strokeWidth=1;dashed=1" vertex="1" parent="1">
          <mxGeometry x="332" y="610" width="576" height="68" as="geometry"/>
        </mxCell>
        <mxCell id="ed-claus4-tag" value="cláusula: preço_e_pagamento · EDITADA" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#cc6600;strokeColor=#cc6600;fontColor=#ffffff;fontSize=8;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="338" y="614" width="200" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="ed-claus4" value="PREÇO: o valor total de {{valor_negocio}} ({{valor_extenso}}), pago na forma {{forma_pagamento}}, conforme {{#if comprovante}}comprovante anexo{{/if}}." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="338" y="632" width="566" height="44" as="geometry"/>
        </mxCell>

        <mxCell id="ed-more" value="[ ... + 8 cláusulas — encerramento, declarações fiscais, fé pública ... ]" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#888;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="332" y="690" width="576" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="ed-validation-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e8f5e9;strokeColor=#5c8a3e" vertex="1" parent="1">
          <mxGeometry x="332" y="720" width="576" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="ed-validation" value="✓ sintaxe handlebars válida · 18 parâmetros declarados · 12 cláusulas · 0 referências quebradas" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#3a6027;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="332" y="720" width="576" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="ed-kb-snippet-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#cc9933" vertex="1" parent="1">
          <mxGeometry x="332" y="766" width="576" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="ed-kb-h" value="📚 Sugestão da KB · NSCGJ-SP Tomo II Cap. XIV §3" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#996600;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="332" y="770" width="566" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="ed-kb-text" value="&quot;A qualificação dos outorgantes incluirá referência expressa ao regime de bens, quando casados, sob pena de retificação posterior.&quot; — Considerar adição de campo regime_bens nesta cláusula." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10;spacingTop=2" vertex="1" parent="1">
          <mxGeometry x="332" y="790" width="566" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="ed-kb-cta" value="aplicar →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#996600;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="800" y="826" width="100" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="col3-head" value="PREVIEW · render do template" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#2C5282;fontColor=#ffffff;fontSize=11;fontStyle=1;align=left;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="920" y="190" width="320" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="col3-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="920" y="222" width="320" height="638" as="geometry"/>
        </mxCell>

        <mxCell id="pv-mode" value="modo: dados de exemplo ▾" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="920" y="232" width="280" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="pv-paper" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cccccc" vertex="1" parent="1">
          <mxGeometry x="936" y="262" width="288" height="588" as="geometry"/>
        </mxCell>

        <mxCell id="pv-title" value="ESCRITURA PÚBLICA DE VENDA E COMPRA" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="940" y="280" width="280" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="pv-p1" value="SAIBAM quantos esta escritura pública virem que, aos oito dias do mês de maio de 2026, neste 27º Tabelionato de Notas da Capital de São Paulo, perante mim, Tabelião, compareceram as partes:" style="text;html=1;strokeColor=none;fillColor=none;align=justify;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="950" y="306" width="260" height="58" as="geometry"/>
        </mxCell>

        <mxCell id="pv-p2" value="OUTORGANTE VENDEDOR: João da Silva Santos, brasileiro, portador do CPF 123.456.789-00, residente e domiciliado em Rua das Flores, 100, São Paulo/SP;" style="text;html=1;strokeColor=none;fillColor=none;align=justify;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="950" y="368" width="260" height="58" as="geometry"/>
        </mxCell>

        <mxCell id="pv-p3" value="OUTORGADO COMPRADOR: Maria Aparecida Costa, brasileira, portadora do CPF 987.654.321-00, residente e domiciliada em Av. Paulista, 2000, São Paulo/SP;" style="text;html=1;strokeColor=none;fillColor=none;align=justify;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="950" y="430" width="260" height="58" as="geometry"/>
        </mxCell>

        <mxCell id="pv-p4" value="OBJETO: o imóvel matriculado sob nº 28.451 no 4º CRI-SP, situado à Rua das Margaridas, 88, com área total de 120 m², descrito conforme certidão atualizada datada de 03/05/2026, livre e desembaraçado de quaisquer ônus." style="text;html=1;strokeColor=none;fillColor=none;align=justify;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="950" y="492" width="260" height="80" as="geometry"/>
        </mxCell>

        <mxCell id="pv-p5" value="PREÇO: o valor total de R$ 850.000,00 (oitocentos e cinquenta mil reais), pago na forma transferência bancária, conforme comprovante anexo." style="text;html=1;strokeColor=none;fillColor=none;align=justify;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="950" y="576" width="260" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="pv-elip" value="[...]" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="950" y="640" width="260" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="pv-foot" value="E, lida e achada conforme, vai esta por mim, Tabelião, assinada em fé pública." style="text;html=1;strokeColor=none;fillColor=none;align=justify;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="950" y="666" width="260" height="44" as="geometry"/>
        </mxCell>

        <mxCell id="pv-stamp-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="950" y="720" width="260" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="pv-stamp-h" value="STATS DO PREVIEW" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="950" y="724" width="260" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="pv-stat1" value="páginas estimadas: 4" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=8;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="950" y="744" width="260" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="pv-stat2" value="palavras: 1.247" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=8;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="950" y="760" width="260" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="pv-stat3" value="parâmetros preenchidos: 18/18" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=8;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="950" y="776" width="260" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="pv-stat4" value="cláusulas renderizadas: 12" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=8;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="950" y="792" width="260" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="pv-stat5" value="hash preview: 8b32...e7d (recalcula ao salvar)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=8;fontFamily=Courier New;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="950" y="808" width="260" height="16" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="03-tc-versoes" name="03-tc-versoes">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="TC 03 — Histórico de versões (act_template_version) · timeline + diff lado-a-lado" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=15;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1200" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1a202c;strokeColor=#1a202c" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="Stoix Cartorial" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontColor=#ffffff;fontSize=12;fontStyle=1;align=left;spacingLeft=18" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="160" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="220" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="Template Catalog / ESC-VC-URB-01 · histórico de versões" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#cbd5e0" vertex="1" parent="1">
          <mxGeometry x="360" y="76" width="500" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="docheader" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="40" y="124" width="1200" height="92" as="geometry"/>
        </mxCell>
        <mxCell id="doc-name" value="ESC-VC-URB-01 · Escritura de venda e compra (urbano)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=15;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="56" y="134" width="700" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="doc-meta" value="tipo_ato: escritura · classe: imobiliário · 4 versões totais · 1 vigente · 2 deprecated · 1 draft" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="56" y="160" width="700" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="doc-meta2" value="usado em 47 atos lavrados (últimos 90 dias) · referenciado em 47 billing_event imutáveis" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="56" y="180" width="700" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="doc-back" value="←  voltar ao catálogo" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#2C5282;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1040" y="134" width="180" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="doc-cta" value="+  Nova versão a partir da vigente" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#2C5282;fontColor=#ffffff;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="990" y="170" width="240" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="timeline-head" value="Linha do tempo (act_template_version)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="230" width="500" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="timeline-help" value="selecione 2 versões abaixo para diff lado-a-lado · hash sha-256 = âncora imutável" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="40" y="252" width="600" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="tl-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="40" y="280" width="380" height="560" as="geometry"/>
        </mxCell>

        <mxCell id="tl-line" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#cccccc;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="74" y="296" width="2" height="528" as="geometry"/>
        </mxCell>

        <mxCell id="tl-v4-dot" value="●" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="62" y="298" width="24" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v4-card-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cc6600;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="98" y="294" width="306" height="116" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v4-h" value="v4 · DRAFT" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1;spacingLeft=10;fontColor=#995200" vertex="1" parent="1">
          <mxGeometry x="98" y="298" width="200" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v4-pill" value="DRAFT" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=8;fontColor=#995200;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="338" y="302" width="56" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v4-d" value="created_at: 02/05/2026 14h22" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="98" y="320" width="280" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v4-u" value="created_by: Marina S. (Escrevente)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="98" y="338" width="280" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v4-h2" value="hash_imutavel: pendente (recalcula ao aprovar)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=10;fontFamily=Courier New;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="98" y="356" width="280" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v4-cb" value="☐ comparar" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="98" y="380" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v4-act" value="abrir editor →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#2C5282;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="280" y="380" width="120" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="tl-v3-dot" value="●" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontColor=#2C5282" vertex="1" parent="1">
          <mxGeometry x="62" y="430" width="24" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v3-card-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f6fc;strokeColor=#2C5282;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="98" y="426" width="306" height="116" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v3-h" value="v3 · VIGENTE" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1;spacingLeft=10;fontColor=#2C5282" vertex="1" parent="1">
          <mxGeometry x="98" y="430" width="200" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v3-pill" value="VIGENTE" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#2C5282;fontSize=8;fontColor=#ffffff;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="332" y="434" width="62" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v3-d" value="approved_at: 12/03/2026 09h47" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="98" y="452" width="280" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v3-u" value="approved_by: Lucas C. (Tabelião)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="98" y="470" width="280" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v3-h2" value="hash: 7e2a4b1c8ff90b6e... (clique p/ copiar)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=10;fontFamily=Courier New;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="98" y="488" width="280" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v3-cb" value="☑ comparar (A)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10;fontStyle=1;fontColor=#2C5282" vertex="1" parent="1">
          <mxGeometry x="98" y="512" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v3-act" value="ver detalhe →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#2C5282;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="280" y="512" width="120" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="tl-v2-dot" value="●" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="62" y="562" width="24" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v2-card-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#cccccc" vertex="1" parent="1">
          <mxGeometry x="98" y="558" width="306" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v2-h" value="v2 · DEPRECATED" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1;spacingLeft=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="98" y="562" width="200" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v2-pill" value="DEPRECATED" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#666;fontSize=8;fontColor=#444;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="312" y="566" width="84" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v2-d" value="vigente: 04/2025 — 12/03/2026" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="98" y="584" width="280" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v2-h2" value="hash: 4d8f112a009e7b25..." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=10;fontFamily=Courier New;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="98" y="602" width="280" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v2-cb" value="☑ comparar (B)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10;fontStyle=1;fontColor=#2C5282" vertex="1" parent="1">
          <mxGeometry x="98" y="624" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v2-act" value="ver detalhe →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="280" y="624" width="120" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="tl-v1-dot" value="●" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="62" y="678" width="24" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v1-card-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#cccccc" vertex="1" parent="1">
          <mxGeometry x="98" y="674" width="306" height="84" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v1-h" value="v1 · DEPRECATED (versão inicial)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1;spacingLeft=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="98" y="678" width="280" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v1-d" value="vigente: 09/2024 — 04/2025" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="98" y="700" width="280" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v1-h2" value="hash: bc41d09f22ca903e..." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=10;fontFamily=Courier New;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="98" y="718" width="280" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="tl-v1-cb" value="☐ comparar" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="98" y="732" width="120" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="tl-origin" value="○ origem · seed inicial 09/2024" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#888;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="56" y="780" width="340" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="diff-head" value="Diff lado-a-lado · v3 (vigente) → v2 (deprecated anterior)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="440" y="230" width="600" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="diff-help" value="32 linhas alteradas · 4 cláusulas afetadas · 2 parâmetros novos" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#888" vertex="1" parent="1">
          <mxGeometry x="440" y="252" width="500" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="diff-export" value="exportar diff (.patch) ↓" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#2C5282;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1040" y="252" width="180" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="diff-A-head" value="A · v3 (vigente · hash 7e2a...8ff)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#2C5282;fontColor=#ffffff;fontSize=11;fontStyle=1;align=left;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="440" y="280" width="390" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="diff-B-head" value="B · v2 (deprecated · hash 4d8f...112)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#666666;strokeColor=#666666;fontColor=#ffffff;fontSize=11;fontStyle=1;align=left;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="830" y="280" width="390" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="diff-A-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="440" y="312" width="390" height="528" as="geometry"/>
        </mxCell>
        <mxCell id="diff-B-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="830" y="312" width="390" height="528" as="geometry"/>
        </mxCell>

        <mxCell id="dA-l1" value="L18  ESCRITURA PÚBLICA DE VENDA E COMPRA" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=8;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="450" y="320" width="380" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="dB-l1" value="L18  ESCRITURA PÚBLICA DE VENDA E COMPRA" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=8;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="840" y="320" width="380" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="dA-add1-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e8f5e9;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="442" y="344" width="386" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="dA-add1" value="L42+ regime_bens: {{regime_bens}} (NSCGJ Tomo II §3)&#10;L43+ certidao_negativa_onus: {{cert_onus_data}}" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=8;spacingTop=2;fontFamily=Courier New;fontColor=#2d5016" vertex="1" parent="1">
          <mxGeometry x="450" y="346" width="380" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="dB-add1-empty" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="832" y="344" width="386" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="dB-add1-l" value="(linhas não existentes)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#aaaaaa" vertex="1" parent="1">
          <mxGeometry x="840" y="346" width="380" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="dA-eq1" value="L57  PREÇO: o valor total de {{valor_negocio}}" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=8;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="450" y="390" width="380" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="dB-eq1" value="L55  PREÇO: o valor total de {{valor_negocio}}" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=8;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="840" y="390" width="380" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="dA-mod1-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e8f5e9;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="442" y="414" width="386" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="dA-mod1" value="L58  ({{valor_extenso}}), pago na forma&#10;L59  {{forma_pagamento}}, conforme&#10;L60  {{#if comprovante}}comprovante anexo{{/if}}." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=8;spacingTop=2;fontFamily=Courier New;fontColor=#2d5016" vertex="1" parent="1">
          <mxGeometry x="450" y="416" width="380" height="52" as="geometry"/>
        </mxCell>
        <mxCell id="dB-mod1-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fdecea;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="832" y="414" width="386" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="dB-mod1" value="L56  ({{valor_extenso}}), pago em dinheiro,&#10;L57  declarando o vendedor recebimento&#10;L58  integral neste ato." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=8;spacingTop=2;fontFamily=Courier New;fontColor=#7a1a1a" vertex="1" parent="1">
          <mxGeometry x="840" y="416" width="380" height="52" as="geometry"/>
        </mxCell>

        <mxCell id="dA-eq2" value="L78  E, lida e achada conforme, vai esta" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=8;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="450" y="476" width="380" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="dB-eq2" value="L73  E, lida e achada conforme, vai esta" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=8;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="840" y="476" width="380" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="dA-mod2-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e8f5e9;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="442" y="500" width="386" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="dA-mod2" value="L82+ kb_version_origem_id reference&#10;L83+ NSCGJ-Tomo-II-v3 (cap. XIV §3)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;spacingLeft=8;spacingTop=2;fontFamily=Courier New;fontColor=#2d5016" vertex="1" parent="1">
          <mxGeometry x="450" y="502" width="380" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="dB-mod2-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="832" y="500" width="386" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="dB-mod2" value="(sem referência KB)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#aaaaaa" vertex="1" parent="1">
          <mxGeometry x="840" y="500" width="380" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="dA-stop" value="[ ... + 28 linhas adicionais — toolbar &quot;próxima divergência ↓&quot; ... ]" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#888;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="450" y="556" width="380" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="dB-stop" value="[ ... ]" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#888;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="840" y="556" width="380" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="diff-summary-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cccccc" vertex="1" parent="1">
          <mxGeometry x="450" y="590" width="770" height="240" as="geometry"/>
        </mxCell>
        <mxCell id="diff-summary-h" value="RESUMO DAS MUDANÇAS · v2 → v3" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#444;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="450" y="594" width="500" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="ds-row1" value="+ adicionada cláusula regime_bens (atende NSCGJ Tomo II §3)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontColor=#2d5016" vertex="1" parent="1">
          <mxGeometry x="450" y="624" width="700" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="ds-row2" value="+ adicionado parâmetro certidao_negativa_onus (req)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontColor=#2d5016" vertex="1" parent="1">
          <mxGeometry x="450" y="646" width="700" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="ds-row3" value="~ alterada cláusula preço_e_pagamento — agora aceita formas plurais (transferência, financiamento, parcelado)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="450" y="668" width="760" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="ds-row4" value="+ vinculada FK kb_version_origem_id → NSCGJ-Tomo-II-v3 (auditoria de fonte)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontColor=#2d5016" vertex="1" parent="1">
          <mxGeometry x="450" y="690" width="760" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="ds-row5" value="• motivo (changelog): &quot;Adequação ao Provimento CGJ-SP 28/2024 sobre qualificação de outorgantes&quot; — Lucas C." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="450" y="712" width="760" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="ds-impact-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#cc9933" vertex="1" parent="1">
          <mxGeometry x="462" y="744" width="746" height="74" as="geometry"/>
        </mxCell>
        <mxCell id="ds-impact-h" value="⚠ Impacto da promoção de v3" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#996600;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="462" y="746" width="500" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="ds-impact-t" value="Atos lavrados antes de 12/03/2026 continuam apontando para v2 via billing_event.act_template_version_hash. Não retroage. Atos novos a partir desta data usarão v3. Histórico imutável preservado." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=10;spacingTop=2" vertex="1" parent="1">
          <mxGeometry x="462" y="766" width="746" height="48" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="04-tc-detalhe-versao" name="04-tc-detalhe-versao">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="TC 04 — Detalhe de versão aprovada (act_template_version) · read-only · audit completo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=15;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1200" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1a202c;strokeColor=#1a202c" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="Stoix Cartorial" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontColor=#ffffff;fontSize=12;fontStyle=1;align=left;spacingLeft=18" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="160" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="220" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="Template Catalog / ESC-VC-URB-01 / v3 (vigente)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#cbd5e0" vertex="1" parent="1">
          <mxGeometry x="360" y="76" width="500" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="docheader" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="40" y="124" width="1200" height="120" as="geometry"/>
        </mxCell>
        <mxCell id="doc-name" value="Escritura de venda e compra (urbano) — v3" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="56" y="134" width="700" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="doc-pill-vigente" value="VIGENTE AGORA" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#2C5282;fontColor=#ffffff;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1080" y="136" width="140" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="doc-meta-row" value="codigo: ESC-VC-URB-01  ·  tipo_ato: escritura  ·  classe: imobiliário  ·  effective_from: 12/03/2026  ·  effective_until: —" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="166" width="900" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="doc-hash-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="56" y="194" width="600" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="doc-hash" value="hash_imutavel: 7e2a4b1c8ff90b6eaf3c... (clique p/ copiar)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666;spacingLeft=8;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="56" y="194" width="600" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="doc-pdf-link" value="[doc] baixar render preview .pdf  ·  [doc] baixar fonte .docx (Object Lock 30y)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#2C5282;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="680" y="194" width="500" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="doc-cta-newver" value="+ Criar nova versão a partir desta" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#2C5282;fontColor=#ffffff;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="950" y="216" width="240" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="tabs-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="40" y="252" width="1200" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="tab1-active" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#2C5282" vertex="1" parent="1">
          <mxGeometry x="40" y="252" width="220" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="tab1" value="Render do template" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="40" y="252" width="220" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="tab2" value="Cláusulas e parâmetros" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="260" y="252" width="220" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="tab3" value="Histórico de uso (47)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="480" y="252" width="220" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="tab4" value="Auditoria" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="700" y="252" width="220" height="44" as="geometry"/>
        </mxCell>

        <mxCell id="left-col-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="40" y="296" width="700" height="564" as="geometry"/>
        </mxCell>

        <mxCell id="render-readonly-bar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#cccccc" vertex="1" parent="1">
          <mxGeometry x="40" y="296" width="700" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="render-readonly" value="🔒 read-only · render do corpo_template com dados de exemplo · hash bate com 7e2a...8ff" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="40" y="296" width="540" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="render-zoom" value="100% ▾" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="660" y="296" width="76" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="render-paper" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cccccc" vertex="1" parent="1">
          <mxGeometry x="64" y="344" width="652" height="500" as="geometry"/>
        </mxCell>

        <mxCell id="rp-title" value="ESCRITURA PÚBLICA DE VENDA E COMPRA" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="80" y="364" width="620" height="24" as="geometry"/>
        </mxCell>

        <mxCell id="rp-p1" value="SAIBAM quantos esta escritura pública virem que, aos oito dias do mês de maio do ano de dois mil e vinte e seis, neste 27º Tabelionato de Notas da Capital de São Paulo, perante mim, Tabelião, compareceram as partes:" style="text;html=1;strokeColor=none;fillColor=none;align=justify;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="80" y="396" width="620" height="48" as="geometry"/>
        </mxCell>

        <mxCell id="rp-p2" value="OUTORGANTE VENDEDOR: João da Silva Santos, brasileiro, casado sob o regime de comunhão parcial de bens, portador do CPF 123.456.789-00, residente e domiciliado em Rua das Flores, 100, São Paulo/SP;" style="text;html=1;strokeColor=none;fillColor=none;align=justify;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="80" y="450" width="620" height="48" as="geometry"/>
        </mxCell>

        <mxCell id="rp-p3" value="OUTORGADO COMPRADOR: Maria Aparecida Costa, brasileira, solteira, portadora do CPF 987.654.321-00, residente e domiciliada em Av. Paulista, 2000, São Paulo/SP;" style="text;html=1;strokeColor=none;fillColor=none;align=justify;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="80" y="504" width="620" height="48" as="geometry"/>
        </mxCell>

        <mxCell id="rp-p4" value="OBJETO: o imóvel matriculado sob nº 28.451 no 4º CRI-SP, situado à Rua das Margaridas, 88, com área total de 120 m², descrito conforme certidão atualizada datada de 03/05/2026, livre e desembaraçado de quaisquer ônus (certidão negativa juntada)." style="text;html=1;strokeColor=none;fillColor=none;align=justify;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="80" y="558" width="620" height="60" as="geometry"/>
        </mxCell>

        <mxCell id="rp-p5" value="PREÇO: o valor total de R$ 850.000,00 (oitocentos e cinquenta mil reais), pago na forma transferência bancária, conforme comprovante anexo." style="text;html=1;strokeColor=none;fillColor=none;align=justify;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="80" y="624" width="620" height="48" as="geometry"/>
        </mxCell>

        <mxCell id="rp-elip" value="[ … cláusulas de declarações fiscais, fé pública, encerramento … ]" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#888;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="80" y="680" width="620" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="rp-p6" value="E, lida e achada conforme, vai esta por mim, Tabelião, assinada em fé pública, dando-se por reconhecidas as firmas das partes." style="text;html=1;strokeColor=none;fillColor=none;align=justify;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;spacingTop=4" vertex="1" parent="1">
          <mxGeometry x="80" y="710" width="620" height="44" as="geometry"/>
        </mxCell>

        <mxCell id="rp-foot" value="São Paulo, 08 de maio de 2026.  ____________________  Tabelião" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="80" y="780" width="620" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="right-col-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="760" y="296" width="480" height="564" as="geometry"/>
        </mxCell>

        <mxCell id="block-claus-h" value="cláusulas (12)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#2C5282;fontColor=#ffffff;fontSize=11;fontStyle=1;align=left;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="760" y="296" width="480" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="block-claus-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="760" y="324" width="480" height="166" as="geometry"/>
        </mxCell>

        <mxCell id="cl-1" value="1.  qualificação_outorgante" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="760" y="332" width="320" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="cl-1-tag" value="pré-aprovada" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e6effa;strokeColor=#2C5282;fontSize=8;fontColor=#2C5282;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1140" y="334" width="80" height="16" as="geometry"/>
        </mxCell>

        <mxCell id="cl-2" value="2.  qualificação_outorgado" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="760" y="352" width="320" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="cl-2-tag" value="pré-aprovada" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e6effa;strokeColor=#2C5282;fontSize=8;fontColor=#2C5282;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1140" y="354" width="80" height="16" as="geometry"/>
        </mxCell>

        <mxCell id="cl-3" value="3.  regime_bens_outorgante  (NEW v3)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontFamily=Courier New;fontColor=#2d5016" vertex="1" parent="1">
          <mxGeometry x="760" y="372" width="320" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="cl-3-tag" value="kb-derived" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#cc9933;fontSize=8;fontColor=#996600;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1140" y="374" width="80" height="16" as="geometry"/>
        </mxCell>

        <mxCell id="cl-4" value="4.  descrição_imóvel" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="760" y="392" width="320" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="cl-4-tag" value="pré-aprovada" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e6effa;strokeColor=#2C5282;fontSize=8;fontColor=#2C5282;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1140" y="394" width="80" height="16" as="geometry"/>
        </mxCell>

        <mxCell id="cl-5" value="5.  preço_e_pagamento" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="760" y="412" width="320" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="cl-5-tag" value="customizada" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=8;fontColor=#995200;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1140" y="414" width="80" height="16" as="geometry"/>
        </mxCell>

        <mxCell id="cl-6" value="6.  declarações_fiscais  (ITBI, ITR)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="760" y="432" width="320" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="cl-6-tag" value="pré-aprovada" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e6effa;strokeColor=#2C5282;fontSize=8;fontColor=#2C5282;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1140" y="434" width="80" height="16" as="geometry"/>
        </mxCell>

        <mxCell id="cl-7" value="7.  certidão_negativa_ônus  (NEW v3)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontFamily=Courier New;fontColor=#2d5016" vertex="1" parent="1">
          <mxGeometry x="760" y="452" width="320" height="20" as="geometry"/>
        </mxCell>
        <mxCell id="cl-7-tag" value="kb-derived" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#cc9933;fontSize=8;fontColor=#996600;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1140" y="454" width="80" height="16" as="geometry"/>
        </mxCell>

        <mxCell id="cl-more" value="[ + 5 cláusulas — fé pública, encerramento, reconhecimento, etc. ]" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#888;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="760" y="472" width="460" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="block-param-h" value="parametros declarados (18)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#2C5282;fontColor=#ffffff;fontSize=11;fontStyle=1;align=left;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="760" y="498" width="480" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="block-param-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="760" y="526" width="480" height="120" as="geometry"/>
        </mxCell>

        <mxCell id="param-tbl-h" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#cccccc" vertex="1" parent="1">
          <mxGeometry x="772" y="534" width="456" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="ph1" value="parametro" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="772" y="534" width="180" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="ph2" value="tipo" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="952" y="534" width="100" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="ph3" value="obrigatório" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1052" y="534" width="80" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="ph4" value="origem" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1132" y="534" width="100" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="pr1" value="outorgante_nome" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontFamily=Courier New;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="772" y="558" width="180" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="pr1b" value="string" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="952" y="558" width="100" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="pr1c" value="✓" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9" vertex="1" parent="1">
          <mxGeometry x="1052" y="558" width="80" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="pr1d" value="contratante" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1132" y="558" width="100" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="pr2" value="outorgante_cpf" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontFamily=Courier New;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="772" y="576" width="180" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="pr2b" value="cpf 🔒" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="952" y="576" width="100" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="pr2c" value="✓" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9" vertex="1" parent="1">
          <mxGeometry x="1052" y="576" width="80" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="pr2d" value="contratante" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1132" y="576" width="100" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="pr3" value="regime_bens" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontFamily=Courier New;spacingLeft=8;fontColor=#2d5016" vertex="1" parent="1">
          <mxGeometry x="772" y="594" width="180" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="pr3b" value="enum" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontFamily=Courier New;fontColor=#2d5016" vertex="1" parent="1">
          <mxGeometry x="952" y="594" width="100" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="pr3c" value="condicional" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontColor=#2d5016" vertex="1" parent="1">
          <mxGeometry x="1052" y="594" width="80" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="pr3d" value="kb (NSCGJ)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#996600" vertex="1" parent="1">
          <mxGeometry x="1132" y="594" width="100" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="pr4" value="valor_negocio" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontFamily=Courier New;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="772" y="612" width="180" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="pr4b" value="currency" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="952" y="612" width="100" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="pr4c" value="✓" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9" vertex="1" parent="1">
          <mxGeometry x="1052" y="612" width="80" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="pr4d" value="negócio" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1132" y="612" width="100" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="pr-more" value="[ + 14 outros parâmetros — imovel_*, cri_*, certidao_* … ]" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#888;spacingLeft=8" vertex="1" parent="1">
          <mxGeometry x="772" y="630" width="460" height="14" as="geometry"/>
        </mxCell>

        <mxCell id="block-audit-h" value="auditoria · cadeia imutável" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#2C5282;strokeColor=#2C5282;fontColor=#ffffff;fontSize=11;fontStyle=1;align=left;spacingLeft=12" vertex="1" parent="1">
          <mxGeometry x="760" y="654" width="480" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="block-audit-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="760" y="682" width="480" height="178" as="geometry"/>
        </mxCell>

        <mxCell id="au-r1-l" value="created_by_user_id" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="760" y="690" width="180" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="au-r1-v" value="marina.s@27tab.sp · 09/03/2026 16h12" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="940" y="690" width="290" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="au-r2-l" value="approved_by_user_id" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="760" y="710" width="180" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="au-r2-v" value="lucas.c@27tab.sp · 12/03/2026 09h47" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="940" y="710" width="290" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="au-r3-l" value="approval_method" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="760" y="730" width="180" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="au-r3-v" value="role:tabeliao + MFA TOTP challenge ✓" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="940" y="730" width="290" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="au-r4-l" value="hash_imutavel" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="760" y="750" width="180" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="au-r4-v" value="7e2a4b1c8ff90b6eaf3c9d2e5b78a1f0" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New;fontColor=#444" vertex="1" parent="1">
          <mxGeometry x="940" y="750" width="290" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="au-r5-l" value="hmac_audit_chain" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="760" y="770" width="180" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="au-r5-v" value="prev=4d8f...112  ·  curr=7e2a...8ff  ✓ válido" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New;fontColor=#3a6027" vertex="1" parent="1">
          <mxGeometry x="940" y="770" width="290" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="au-r6-l" value="kb_version_origem_id" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontStyle=1;fontColor=#996600" vertex="1" parent="1">
          <mxGeometry x="760" y="790" width="180" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="au-r6-v" value="NSCGJ-Tomo-II-v3 (Cap. XIV §3 — qualificação)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New;fontColor=#2C5282" vertex="1" parent="1">
          <mxGeometry x="940" y="790" width="290" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="au-r7-l" value="storage" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="760" y="810" width="180" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="au-r7-v" value="s3://notary-27tab-templates/ · Object Lock 30y" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="940" y="810" width="290" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="au-r8-l" value="referenced_in" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;spacingLeft=12;fontStyle=1;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="760" y="830" width="180" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="au-r8-v" value="47 billing_event imutáveis (livro perpétuo)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="940" y="830" width="290" height="18" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="01-proc-lista" name="01-proc-lista">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="PROC 01 — Lista de Procedimentos (wiki interno · runbooks &amp; checklists)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1100" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="Procedimentos" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="300" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="sidebar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="200" height="744" as="geometry"/>
        </mxCell>
        <mxCell id="nav1" value="▣  Dashboard" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="130" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav2" value="[catalogo]  Modelos de ato" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="166" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav3" value="[folder]  Knowledge Base" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="202" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav-fee" value="[tabela]  Emolumentos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="238" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav-proc" value="[wiki]  Procedimentos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=none;fontSize=11;align=left;spacingLeft=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="274" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav4" value="[lista]  Atos em execução" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="310" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav5" value="[graph]  Relatórios" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="346" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav6" value="[users]  Usuários" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="382" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav7" value="⚙  Configurações" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="418" width="200" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="proc-sidebar-sub" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=none" vertex="1" parent="1">
          <mxGeometry x="60" y="306" width="180" height="116" as="geometry"/>
        </mxCell>
        <mxCell id="sub1" value="•  Todos procedimentos" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="76" y="312" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="sub2" value="•  Meus rascunhos" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="76" y="334" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="sub3" value="•  Arquivados" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="76" y="356" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="sub4" value="•  Auditoria de edições" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="76" y="378" width="160" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="page-title" value="Procedimentos internos do cartório" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="260" y="130" width="600" height="30" as="geometry"/>
        </mxCell>
        <mxCell id="page-sub" value="Wiki em markdown — runbooks, checklists e fluxos operacionais. Tabelião e escrevente editam livre, sem aprovação formal. Cada salvamento mantém as 10 últimas edições no histórico (rolling jsonb)." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=2;fontColor=#555" vertex="1" parent="1">
          <mxGeometry x="260" y="156" width="780" height="34" as="geometry"/>
        </mxCell>

        <mxCell id="cta-new" value="+  Novo procedimento" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6B46C1;strokeColor=#6B46C1;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1040" y="130" width="180" height="36" as="geometry"/>
        </mxCell>

        <mxCell id="kpi1" value="ATIVOS&#10;18" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#6B46C1;strokeWidth=2;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=8;fontColor=#5a3aa8" vertex="1" parent="1">
          <mxGeometry x="260" y="200" width="240" height="62" as="geometry"/>
        </mxCell>
        <mxCell id="kpi1-sub" value="visíveis para todo o time operacional" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="272" y="240" width="220" height="16" as="geometry"/>
        </mxCell>

        <mxCell id="kpi2" value="EDITADOS NA SEMANA&#10;5" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="520" y="200" width="240" height="62" as="geometry"/>
        </mxCell>
        <mxCell id="kpi2-sub" value="3 por escreventes · 2 por tabelião" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="532" y="240" width="220" height="16" as="geometry"/>
        </mxCell>

        <mxCell id="kpi3" value="RASCUNHOS (você)&#10;2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999;fontSize=11;fontStyle=1;align=left;verticalAlign=top;spacingLeft=12;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="780" y="200" width="240" height="62" as="geometry"/>
        </mxCell>
        <mxCell id="kpi3-sub" value="abrir &quot;Meus rascunhos&quot; →" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#5a3aa8" vertex="1" parent="1">
          <mxGeometry x="792" y="240" width="220" height="16" as="geometry"/>
        </mxCell>

        <mxCell id="filters-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="280" width="940" height="58" as="geometry"/>
        </mxCell>

        <mxCell id="f-label" value="Filtrar por:" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="276" y="290" width="80" height="38" as="geometry"/>
        </mxCell>
        <mxCell id="f-autor" value="Autor: todos  ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="356" y="296" width="180" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="f-ativo" value="Status: ativo  ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#efe7fb;strokeColor=#6B46C1;fontSize=10;align=left;spacingLeft=10;fontColor=#5a3aa8;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="546" y="296" width="160" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="f-edit" value="Última edição: 30 dias  ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;spacingLeft=10" vertex="1" parent="1">
          <mxGeometry x="716" y="296" width="190" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="f-search" value="[buscar]  buscar slug, título, conteúdo..." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10;align=left;spacingLeft=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="916" y="296" width="270" height="28" as="geometry"/>
        </mxCell>

        <mxCell id="active-filters" value="↳  Status=ativo · 18 procedimentos" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="276" y="346" width="600" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="tbl-h" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6B46C1;strokeColor=#6B46C1" vertex="1" parent="1">
          <mxGeometry x="260" y="376" width="940" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="tbl-h1" value="TÍTULO  ·  slug" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="276" y="376" width="380" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="tbl-h2" value="AUTOR ATUAL" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="660" y="376" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="tbl-h3" value="ATUALIZADO EM" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="826" y="376" width="160" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="tbl-h4" value="STATUS" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="990" y="376" width="100" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="tbl-h5" value="AÇÕES" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#ffffff" vertex="1" parent="1">
          <mxGeometry x="1100" y="376" width="100" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="row1-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="260" y="408" width="940" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="row1-c1" value="Recebimento de outorgantes em escritura de V&amp;C" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="276" y="412" width="380" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row1-c1b" value="recebimento-outorgantes-vc · 7 edições no histórico" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="276" y="436" width="380" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="row1-c2" value="Maria S. (Escrevente)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="660" y="424" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row1-c3" value="06/05/2026 · 11h42" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="826" y="424" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row1-pill" value="ATIVO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#efe7fb;strokeColor=#6B46C1;fontSize=9;fontColor=#5a3aa8;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="990" y="424" width="60" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row1-acoes" value="Abrir  ·  ⋮" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#5a3aa8;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="424" width="100" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="row2-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="260" y="464" width="940" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="row2-c1" value="Checklist OCR — documentos exigidos por tipo de ato" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="276" y="468" width="380" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row2-c1b" value="checklist-ocr-docs-por-ato · 10 edições no histórico (rolling)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="276" y="492" width="380" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="row2-c2" value="Lucas C. (Tabelião)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="660" y="480" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row2-c3" value="05/05/2026 · 16h08" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="826" y="480" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row2-pill" value="ATIVO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#efe7fb;strokeColor=#6B46C1;fontSize=9;fontColor=#5a3aa8;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="990" y="480" width="60" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row2-acoes" value="Abrir  ·  ⋮" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#5a3aa8;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="480" width="100" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="row3-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="260" y="520" width="940" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="row3-c1" value="Runbook — incidente LGPD (vazamento de tax_id)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="276" y="524" width="380" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row3-c1b" value="runbook-incidente-lgpd-tax-id · 4 edições no histórico" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="276" y="548" width="380" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="row3-c2" value="Lucas C. (Tabelião · DPO)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="660" y="536" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row3-c3" value="29/04/2026 · 09h17" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="826" y="536" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row3-pill" value="ATIVO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#efe7fb;strokeColor=#6B46C1;fontSize=9;fontColor=#5a3aa8;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="990" y="536" width="60" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row3-acoes" value="Abrir  ·  ⋮" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#5a3aa8;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="536" width="100" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="row4-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="260" y="576" width="940" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="row4-c1" value="Procedimento de fechamento de caixa diário" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="276" y="580" width="380" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row4-c1b" value="fechamento-caixa-diario · 6 edições no histórico" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="276" y="604" width="380" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="row4-c2" value="João P. (Escrevente)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="660" y="592" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row4-c3" value="22/04/2026 · 17h54" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="826" y="592" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row4-pill" value="ATIVO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#efe7fb;strokeColor=#6B46C1;fontSize=9;fontColor=#5a3aa8;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="990" y="592" width="60" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row4-acoes" value="Abrir  ·  ⋮" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#5a3aa8;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="592" width="100" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="row5-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="260" y="632" width="940" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="row5-c1" value="Onboarding de novo escrevente" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="276" y="636" width="380" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row5-c1b" value="onboarding-escrevente · 2 edições no histórico" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="276" y="660" width="380" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="row5-c2" value="Lucas C. (Tabelião)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="660" y="648" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row5-c3" value="14/03/2026 · 14h20" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="826" y="648" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row5-pill" value="ATIVO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#efe7fb;strokeColor=#6B46C1;fontSize=9;fontColor=#5a3aa8;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="990" y="648" width="60" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row5-acoes" value="Abrir  ·  ⋮" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#5a3aa8;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="648" width="100" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="row6-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="260" y="688" width="940" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="row6-c1" value="Atendimento presencial — fluxo de balcão (DEPRECADO)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="276" y="692" width="380" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row6-c1b" value="atendimento-balcao · arquivado em 12/04/2026 — substituído por v2" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="276" y="716" width="380" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="row6-c2" value="Lucas C. (Tabelião)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="660" y="704" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row6-c3" value="12/04/2026 · 10h33" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="826" y="704" width="160" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row6-pill" value="ARQUIVADO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=9;fontColor=#666;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="990" y="704" width="92" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="row6-acoes" value="Abrir  ·  ⋮" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#999" vertex="1" parent="1">
          <mxGeometry x="1100" y="704" width="100" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="footer" value="Procedimentos editados livre por Notary/Clerk · sem aprovação formal · histórico rolling jsonb mantém as 10 últimas edições · entidade `procedure`" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="260" y="822" width="940" height="20" as="geometry"/>
        </mxCell>

        <mxCell id="ann" value="ANOTAÇÕES UX (R5)&#10;1. Cluster Procedure usa #6B46C1 (roxo) — header da tabela, CTA primário e pílula ATIVO. Diferencia visualmente de KB (verde) e Fee (turquesa).&#10;2. Filtros priorizam Status (ativo/arquivado) e Autor — mais usados em wiki interno. Última edição ajuda quem busca &quot;mexeram em algo recente?&quot;.&#10;3. Subtítulo da página explica regra de governança: editar livre, sem aprovação. Histórico rolling 10 versões dá segurança sem burocracia.&#10;4. Cada linha mostra slug em segunda linha (técnico em EN visível, sem dominar). Conta de edições no histórico antecipa o que o usuário verá ao abrir.&#10;5. Linha ARQUIVADO mostrada com cinza/desbotada — visível mas não dominante. Sem badges piscantes.&#10;6. Ações inline (Abrir + ⋮) — ⋮ abre menu Editar / Duplicar / Arquivar / Ver histórico.&#10;7. Sub-nav esquerdo separa rascunhos próprios (privacy do trabalho em andamento) dos publicados.&#10;8. KPIs com strokeWidth=2 só no card ativo do cluster — espelha padrão do KBC dashboard." style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f3eaff;strokeColor=#6B46C1;fontSize=10;align=left;verticalAlign=top;spacingLeft=8;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="1260" y="120" width="220" height="600" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="02-proc-editor" name="02-proc-editor">
    <mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="title" value="PROC 02 — Editor markdown (procedure · wiki interno · histórico rolling 10 versões em jsonb)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1200" height="30" as="geometry"/>
        </mxCell>

        <mxCell id="frame" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="800" as="geometry"/>
        </mxCell>

        <mxCell id="header" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="1200" height="56" as="geometry"/>
        </mxCell>
        <mxCell id="logo" value="[Stoix]" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="56" y="76" width="80" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="env-pill" value="HOMOLOGAÇÃO" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff3e0;strokeColor=#cc6600;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="148" y="78" width="120" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="breadcrumb" value="Procedimentos / Checklist OCR — documentos exigidos por tipo de ato" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="288" y="76" width="600" height="26" as="geometry"/>
        </mxCell>
        <mxCell id="user" value="Lucas C. (Tabelião) ▾" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="1060" y="78" width="170" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="sidebar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#333" vertex="1" parent="1">
          <mxGeometry x="40" y="116" width="200" height="744" as="geometry"/>
        </mxCell>
        <mxCell id="nav1" value="▣  Dashboard" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="130" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav2" value="[catalogo]  Modelos de ato" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="166" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav3" value="[folder]  Knowledge Base" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="202" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav-fee" value="[tabela]  Emolumentos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="238" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav-proc" value="[wiki]  Procedimentos" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e0e0e0;strokeColor=none;fontSize=11;align=left;spacingLeft=14;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="274" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav4" value="[lista]  Atos em execução" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="310" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav5" value="[graph]  Relatórios" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="346" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav6" value="[users]  Usuários" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="382" width="200" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="nav7" value="⚙  Configurações" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=none;fontSize=11;align=left;spacingLeft=14" vertex="1" parent="1">
          <mxGeometry x="40" y="418" width="200" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="title-row" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="130" width="710" height="68" as="geometry"/>
        </mxCell>
        <mxCell id="titulo-label" value="Título" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#555" vertex="1" parent="1">
          <mxGeometry x="272" y="138" width="100" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="titulo-input" value="Checklist OCR — documentos exigidos por tipo de ato" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#6B46C1;fontSize=12;align=left;spacingLeft=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="272" y="158" width="540" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="slug-label" value="slug (auto)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#555" vertex="1" parent="1">
          <mxGeometry x="826" y="138" width="120" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="slug-input" value="checklist-ocr-docs-por-ato" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999;fontSize=11;align=left;spacingLeft=10;fontColor=#666;fontStyle=2" vertex="1" parent="1">
          <mxGeometry x="826" y="158" width="130" height="32" as="geometry"/>
        </mxCell>

        <mxCell id="cta-save" value="✓  Salvar" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6B46C1;strokeColor=#6B46C1;fontColor=#ffffff;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="990" y="130" width="100" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="cta-save-version" value="Salvar como nova versão" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#6B46C1;fontColor=#5a3aa8;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1100" y="130" width="170" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="cta-discard" value="Descartar" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontColor=#666;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="990" y="166" width="100" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="meta-info" value="autor atual: Lucas C. · 10/10 slots de histórico em uso (rolling)" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1100" y="166" width="170" height="28" as="geometry"/>
        </mxCell>

        <mxCell id="toolbar-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f0f0f0;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="208" width="500" height="36" as="geometry"/>
        </mxCell>
        <mxCell id="tb-h1" value="H1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="268" y="214" width="36" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="tb-h2" value="H2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="306" y="214" width="36" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="tb-h3" value="H3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="344" y="214" width="36" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="tb-sep1" value="|" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontColor=#bbb" vertex="1" parent="1">
          <mxGeometry x="384" y="214" width="10" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="tb-bold" value="B" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="396" y="214" width="28" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="tb-italic" value="I" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=12;fontStyle=6" vertex="1" parent="1">
          <mxGeometry x="426" y="214" width="28" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="tb-sep2" value="|" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontColor=#bbb" vertex="1" parent="1">
          <mxGeometry x="458" y="214" width="10" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="tb-list" value="• lista" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="470" y="214" width="56" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="tb-num" value="1. num" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="528" y="214" width="56" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="tb-sep3" value="|" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;fontColor=#bbb" vertex="1" parent="1">
          <mxGeometry x="586" y="214" width="10" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="tb-link" value="🔗 link" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="598" y="214" width="56" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="tb-code" value="&lt; / &gt; code" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="656" y="214" width="72" height="24" as="geometry"/>
        </mxCell>
        <mxCell id="tb-modes" value="Editor | Split | Preview" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#5a3aa8" vertex="1" parent="1">
          <mxGeometry x="640" y="246" width="320" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="editor-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="260" y="270" width="490" height="560" as="geometry"/>
        </mxCell>
        <mxCell id="editor-label" value="EDITOR · markdown" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#5a3aa8" vertex="1" parent="1">
          <mxGeometry x="272" y="276" width="200" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="editor-content" value="# Checklist OCR — documentos exigidos por tipo de ato&#10;&#10;Este procedimento define **quais documentos** o escrevente deve&#10;solicitar antes de subir para o OCR, por tipo de ato lavrado.&#10;&#10;## Escritura de Venda e Compra&#10;&#10;1. RG/CNH e CPF de cada outorgante&#10;2. Certidão de casamento atualizada (≤ 90 dias)&#10;3. Matrícula do imóvel atualizada (≤ 30 dias)&#10;4. Comprovante de quitação de IPTU do exercício&#10;5. Certidão de ônus reais&#10;&#10;## Procuração para adquirir imóvel&#10;&#10;1. Documento de identidade do outorgante&#10;2. CPF do outorgante&#10;3. Comprovante de residência (≤ 90 dias)&#10;&#10;## Ata notarial&#10;&#10;1. Documento do solicitante&#10;2. Descrição do fato a ser autenticado&#10;&#10;&gt; **Atenção:** documentos digitalizados precisam ter resolução&#10;&gt; ≥ 200 DPI para o Textract reconhecer corretamente.&#10;&#10;Em caso de divergência entre RG e CPF, **não subir** —&#10;encaminhar para o tabelião antes do OCR.&#10;&#10;### Links úteis&#10;&#10;- [NSCGJ-SP Tomo II — Cap. XIV](kb://normative/nscgj-sp-cap-xiv)&#10;- [Provimento CGJ-SP 28/2024](kb://normative/prov-cgj-sp-28-2024)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontFamily=Courier New" vertex="1" parent="1">
          <mxGeometry x="272" y="298" width="466" height="524" as="geometry"/>
        </mxCell>

        <mxCell id="preview-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999" vertex="1" parent="1">
          <mxGeometry x="760" y="270" width="210" height="560" as="geometry"/>
        </mxCell>
        <mxCell id="preview-label" value="PREVIEW · render" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#5a3aa8" vertex="1" parent="1">
          <mxGeometry x="772" y="276" width="200" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="prev-h1" value="Checklist OCR — documentos exigidos por tipo de ato" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="772" y="300" width="190" height="32" as="geometry"/>
        </mxCell>
        <mxCell id="prev-p" value="Este procedimento define quais documentos o escrevente deve solicitar antes de subir para o OCR, por tipo de ato lavrado." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9" vertex="1" parent="1">
          <mxGeometry x="772" y="336" width="190" height="38" as="geometry"/>
        </mxCell>
        <mxCell id="prev-h2-1" value="Escritura de Venda e Compra" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="772" y="378" width="190" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="prev-ol-1" value="1.  RG/CNH e CPF de cada outorgante&#10;2.  Certidão de casamento (≤ 90d)&#10;3.  Matrícula do imóvel (≤ 30d)&#10;4.  Comprovante de IPTU&#10;5.  Certidão de ônus reais" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9" vertex="1" parent="1">
          <mxGeometry x="772" y="398" width="190" height="76" as="geometry"/>
        </mxCell>
        <mxCell id="prev-h2-2" value="Procuração para adquirir imóvel" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="772" y="478" width="190" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="prev-ol-2" value="1.  Documento de identidade&#10;2.  CPF do outorgante&#10;3.  Comprovante de residência" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9" vertex="1" parent="1">
          <mxGeometry x="772" y="498" width="190" height="48" as="geometry"/>
        </mxCell>
        <mxCell id="prev-h2-3" value="Ata notarial" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="772" y="550" width="190" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="prev-ol-3" value="1.  Documento do solicitante&#10;2.  Descrição do fato a autenticar" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9" vertex="1" parent="1">
          <mxGeometry x="772" y="570" width="190" height="34" as="geometry"/>
        </mxCell>
        <mxCell id="prev-blockquote-bar" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#efe7fb;strokeColor=#6B46C1" vertex="1" parent="1">
          <mxGeometry x="772" y="610" width="4" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="prev-blockquote" value="Atenção: documentos digitalizados ≥ 200 DPI para o Textract reconhecer corretamente." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#555" vertex="1" parent="1">
          <mxGeometry x="784" y="610" width="178" height="44" as="geometry"/>
        </mxCell>
        <mxCell id="prev-p2" value="Em caso de divergência RG × CPF, não subir — encaminhar ao tabelião antes do OCR." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9" vertex="1" parent="1">
          <mxGeometry x="772" y="658" width="190" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="prev-h3-links" value="Links úteis" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="772" y="702" width="190" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="prev-link1" value="• NSCGJ-SP Tomo II — Cap. XIV" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontColor=#5a3aa8" vertex="1" parent="1">
          <mxGeometry x="772" y="722" width="190" height="16" as="geometry"/>
        </mxCell>
        <mxCell id="prev-link2" value="• Provimento CGJ-SP 28/2024" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontColor=#5a3aa8" vertex="1" parent="1">
          <mxGeometry x="772" y="738" width="190" height="16" as="geometry"/>
        </mxCell>

        <mxCell id="hist-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#6B46C1" vertex="1" parent="1">
          <mxGeometry x="980" y="208" width="260" height="622" as="geometry"/>
        </mxCell>
        <mxCell id="hist-title" value="Histórico — últimas edições" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontColor=#5a3aa8" vertex="1" parent="1">
          <mxGeometry x="992" y="216" width="240" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="hist-sub" value="rolling jsonb · 10 slots · descartado o mais antigo a cada salvar" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="992" y="238" width="240" height="26" as="geometry"/>
        </mxCell>

        <mxCell id="h-current-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#efe7fb;strokeColor=#6B46C1;strokeWidth=2" vertex="1" parent="1">
          <mxGeometry x="990" y="272" width="240" height="50" as="geometry"/>
        </mxCell>
        <mxCell id="h-current" value="v10 · agora (rascunho não salvo)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#5a3aa8" vertex="1" parent="1">
          <mxGeometry x="1000" y="278" width="220" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="h-current-meta" value="Lucas C. · 3 linhas alteradas" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1000" y="298" width="220" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="h1-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="990" y="328" width="240" height="46" as="geometry"/>
        </mxCell>
        <mxCell id="h1-v" value="v9 · 06/05 · 11h42" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1000" y="332" width="140" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="h1-diff" value="diff →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#5a3aa8" vertex="1" parent="1">
          <mxGeometry x="1160" y="332" width="60" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="h1-meta" value="Maria S. — ajuste em ata notarial" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1000" y="352" width="220" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="h2-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="990" y="378" width="240" height="46" as="geometry"/>
        </mxCell>
        <mxCell id="h2-v" value="v8 · 05/05 · 16h08" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1000" y="382" width="140" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="h2-diff" value="diff →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#5a3aa8" vertex="1" parent="1">
          <mxGeometry x="1160" y="382" width="60" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="h2-meta" value="Lucas C. — adicionou bloco DPI" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1000" y="402" width="220" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="h3-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="990" y="428" width="240" height="46" as="geometry"/>
        </mxCell>
        <mxCell id="h3-v" value="v7 · 04/05 · 09h33" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1000" y="432" width="140" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="h3-diff" value="diff →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#5a3aa8" vertex="1" parent="1">
          <mxGeometry x="1160" y="432" width="60" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="h3-meta" value="Maria S. — reordenou itens V&amp;C" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1000" y="452" width="220" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="h4-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="990" y="478" width="240" height="46" as="geometry"/>
        </mxCell>
        <mxCell id="h4-v" value="v6 · 02/05 · 14h21" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1000" y="482" width="140" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="h4-diff" value="diff →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#5a3aa8" vertex="1" parent="1">
          <mxGeometry x="1160" y="482" width="60" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="h4-meta" value="João P. — link p/ NSCGJ-SP" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1000" y="502" width="220" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="h5-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="990" y="528" width="240" height="46" as="geometry"/>
        </mxCell>
        <mxCell id="h5-v" value="v5 · 28/04 · 10h12" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="1000" y="532" width="140" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="h5-diff" value="diff →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#5a3aa8" vertex="1" parent="1">
          <mxGeometry x="1160" y="532" width="60" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="h5-meta" value="Lucas C. — texto inicial procuração" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1000" y="552" width="220" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="h6-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="990" y="578" width="240" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="h6-v" value="v4 · 24/04 · 17h05" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1000" y="582" width="140" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="h6-diff" value="diff →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#5a3aa8" vertex="1" parent="1">
          <mxGeometry x="1160" y="582" width="60" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="h7-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="990" y="622" width="240" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="h7-v" value="v3 · 22/04 · 11h47" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1000" y="626" width="140" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="h7-diff" value="diff →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#5a3aa8" vertex="1" parent="1">
          <mxGeometry x="1160" y="626" width="60" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="h8-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="990" y="666" width="240" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="h8-v" value="v2 · 18/04 · 15h12" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1000" y="670" width="140" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="h8-diff" value="diff →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#5a3aa8" vertex="1" parent="1">
          <mxGeometry x="1160" y="670" width="60" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="h9-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#e0e0e0" vertex="1" parent="1">
          <mxGeometry x="990" y="710" width="240" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="h9-v" value="v1 · 15/04 · 09h08 (mais antigo)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="1000" y="714" width="180" height="18" as="geometry"/>
        </mxCell>
        <mxCell id="h9-diff" value="diff →" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#5a3aa8" vertex="1" parent="1">
          <mxGeometry x="1160" y="714" width="60" height="18" as="geometry"/>
        </mxCell>

        <mxCell id="h-rolling-warn" value="⚠  Próximo salvamento descarta v1." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=1;fontColor=#cc6600" vertex="1" parent="1">
          <mxGeometry x="1000" y="760" width="240" height="22" as="geometry"/>
        </mxCell>
        <mxCell id="h-restore" value="Restaurar uma versão →" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1;fontColor=#5a3aa8" vertex="1" parent="1">
          <mxGeometry x="1000" y="784" width="240" height="22" as="geometry"/>
        </mxCell>

        <mxCell id="footer" value="entidade `procedure` · campo `history` jsonb (array de 10) · sem aprovação formal — qualquer Notary/Clerk salva direto · audit_log no DynamoDB registra cada salvamento" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=9;fontStyle=2;fontColor=#666" vertex="1" parent="1">
          <mxGeometry x="260" y="838" width="980" height="18" as="geometry"/>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
