﻿<mxfile host="app.diagrams.net">
  <diagram id="7kyUFida1-ciAWYa7Imt" name="Page-1">
    <mxGraphModel dx="4713" dy="2590" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="2480" pageHeight="3508" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="title" parent="1" style="text;html=1;strokeColor=#999999;fillColor=#f5f5f5;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=1;fontStyle=1;fontSize=13;fontColor=#333333;" value="Cruits Housing — Booking Configuration &amp; State Machine&#xa;FR-8 · FR-13–17 · FR-19–21 · FR-23–24 · FR-31 · FR-44–46 · FR-50 · FR-75–76 · FR-79–83" vertex="1">
          <mxGeometry height="50" width="2200" x="30" y="20" as="geometry" />
        </mxCell>
        <mxCell id="hdr_a" parent="1" style="text;html=1;strokeColor=#6c8ebf;fillColor=#dae8fc;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontStyle=1;fontSize=10;" value="A. PAYMENT CONFIGURATION" vertex="1">
          <mxGeometry height="26" width="230" x="30" y="82" as="geometry" />
        </mxCell>
        <mxCell id="ctx" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1;align=center;" value="booking_context arrives (Cruits → Housing Module)&#xa;worker_id · job_location · booking_context · FR-44" vertex="1">
          <mxGeometry height="70" width="330" x="610" y="90" as="geometry" />
        </mxCell>
        <mxCell id="res_perm" parent="1" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="Reservation&#xa;permitted?&#xa;FR-45" vertex="1">
          <mxGeometry height="80" width="160" x="700" y="220" as="geometry" />
        </mxCell>
        <mxCell id="browse" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontStyle=1;" value="BROWSE ONLY&#xa;(server-enforced, FR-46)" vertex="1">
          <mxGeometry height="50" width="220" x="960" y="238" as="geometry" />
        </mxCell>
        <mxCell id="dir_q" parent="1" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="Direct payment&#xa;available?&#xa;(booking_context)" vertex="1">
          <mxGeometry height="80" width="180" x="380" y="360" as="geometry" />
        </mxCell>
        <mxCell id="ind_q" parent="1" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="Indirect payment&#xa;available?&#xa;(booking_context)" vertex="1">
          <mxGeometry height="80" width="180" x="690" y="360" as="geometry" />
        </mxCell>
        <mxCell id="pf_dir" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=center;" value="payment_form:&#xa;worker_direct&#xa;(payer = resident)&#xa;FR-20" vertex="1">
          <mxGeometry height="80" width="210" x="320" y="520" as="geometry" />
        </mxCell>
        <mxCell id="pf_ind" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=left;" value="Worker selects payment_form (FR-20):&#xa;• payer_prepay_deduct&#xa;• payer_postpay_deduct&#xa;• payer_subsidy_full&#xa;• payer_subsidy_partial&#xa;(payer ≠ resident)" vertex="1">
          <mxGeometry height="120" width="280" x="650" y="510" as="geometry" />
        </mxCell>
        <mxCell id="cost_q" parent="1" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="Unit cost ≤&#xa;max_daily_cost?&#xa;FR-46" vertex="1">
          <mxGeometry height="80" width="190" x="670" y="730" as="geometry" />
        </mxCell>
        <mxCell id="cost_rej" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontStyle=1;" value="API rejects reservation&#xa;(cost exceeds context max, FR-46)" vertex="1">
          <mxGeometry height="50" width="260" x="950" y="748" as="geometry" />
        </mxCell>
        <mxCell id="fr82" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;align=left;" value="FR-82 confirmation notice (required before submit):&#xa;(a) Payer-covered period + payer name&#xa;(b) Worker&#39;s right to book independently,&#xa;    incl. direct payment if available (FR-82b)&#xa;(c) 28-day reminder info (or in BOOKED msg&#xa;    if stay &lt; 28 days)" vertex="1">
          <mxGeometry height="130" width="320" x="950" y="870" as="geometry" />
        </mxCell>
        <mxCell id="res_create" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontColor=#333333;" value="Reservation submitted (FR-50)" vertex="1">
          <mxGeometry height="50" width="230" x="665" y="1060" as="geometry" />
        </mxCell>
        <mxCell id="RESERVED" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1;fontSize=14;" value="RESERVED" vertex="1">
          <mxGeometry height="60" width="200" x="680" y="1180" as="geometry" />
        </mxCell>
        <mxCell id="PEND_SUP" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1;fontSize=13;" value="PENDING_PROVIDER" vertex="1">
          <mxGeometry height="60" width="220" x="670" y="1320" as="geometry" />
        </mxCell>
        <mxCell id="fr75" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;align=left;" value="FR-75: Pre-BOOKED Cancellation&#xa;Flexworker may cancel from ANY&#xa;pre-BOOKED state:&#xa;RESERVED · PENDING_PROVIDER&#xa;PENDING_PAYER · SIGNING&#xa;→ unit released; all parties notified" vertex="1">
          <mxGeometry height="120" width="275" x="40" y="1320" as="geometry" />
        </mxCell>
        <mxCell id="CANC_pre" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontStyle=1;" value="CANCELLED&#xa;(unit released, FR-75)" vertex="1">
          <mxGeometry height="60" width="205" x="75" y="1530" as="geometry" />
        </mxCell>
        <mxCell id="sup_rej" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="Provider rejects or timeout (FR-16)" vertex="1">
          <mxGeometry height="50" width="230" x="350" y="1332" as="geometry" />
        </mxCell>
        <mxCell id="RES_FAIL_1" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontStyle=1;" value="RESERVATION_FAILED&#xa;(unit released; Flexworker + Payer notified, FR-16)" vertex="1">
          <mxGeometry height="60" width="285" x="325" y="1460" as="geometry" />
        </mxCell>
        <mxCell id="payer_eq_q" parent="1" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="payer =&#xa;resident?&#xa;FR-14" vertex="1">
          <mxGeometry height="80" width="170" x="695" y="1470" as="geometry" />
        </mxCell>
        <mxCell id="PEND_PAY" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1;" value="PENDING_PAYER&#xa;(payer_approval_window · FR-13&#xa;configurable per platform + provider)" vertex="1">
          <mxGeometry height="80" width="270" x="1020" y="1460" as="geometry" />
        </mxCell>
        <mxCell id="pay_exp" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="hold window expires&#xa;OR Payer rejects (FR-15)" vertex="1">
          <mxGeometry height="50" width="250" x="1025" y="1630" as="geometry" />
        </mxCell>
        <mxCell id="RES_FAIL_2" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontStyle=1;" value="RESERVATION_FAILED&#xa;(unit released; Flexworker + Payer notified, FR-16)" vertex="1">
          <mxGeometry height="60" width="285" x="1007.5" y="1720" as="geometry" />
        </mxCell>
        <mxCell id="pay_conf" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" value="Payer confirms (FR-15)&#xa;via Payer Admin or direct API" vertex="1">
          <mxGeometry height="60" width="240" x="1410" y="1625" as="geometry" />
        </mxCell>
        <mxCell id="sign_q1" parent="1" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="Signing&#xa;enabled?&#xa;FR-23" vertex="1">
          <mxGeometry height="80" width="160" x="585" y="1670" as="geometry" />
        </mxCell>
        <mxCell id="sign_q2" parent="1" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="Signing&#xa;enabled?&#xa;FR-23" vertex="1">
          <mxGeometry height="80" width="160" x="1335" y="1850" as="geometry" />
        </mxCell>
        <mxCell id="SIGNING" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1;fontSize=13;" value="SIGNING&#xa;FR-24, FR-25" vertex="1">
          <mxGeometry height="60" width="200" x="685" y="1870" as="geometry" />
        </mxCell>
        <mxCell id="BOOKED" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontStyle=1;fontSize=18;" value="BOOKED" vertex="1">
          <mxGeometry height="70" width="210" x="680" y="2020" as="geometry" />
        </mxCell>
        <mxCell id="pay_terms" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999999;align=left;dashed=1;fontSize=10;" value="PAYMENT TERMS CONFIG (FR-8, FR-21)&#xa;Per payer-provider agreement:&#xa;• prepay: N days before arrival&#xa;• postpay: N days after arrival&#xa;• custom schedule&#xa;Auto-applied on booking confirmation" vertex="1">
          <mxGeometry height="110" width="290" x="1360" y="1320" as="geometry" />
        </mxCell>
        <mxCell id="invoice_cfg" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999999;align=left;dashed=1;fontSize=10;" value="INVOICE CONFIG (FR-79)&#xa;Per payer-provider agreement:&#xa;• Auto-invoice enabled/disabled&#xa;• Template: PDF upload&#xa;• Frequency: per billing period unit&#xa;• Accessible via Settlements (FR-36)" vertex="1">
          <mxGeometry height="110" width="290" x="1360" y="1515" as="geometry" />
        </mxCell>
        <mxCell id="hold_window_cfg" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999999;align=left;dashed=1;fontSize=10;" value="HOLD WINDOW CONFIG (FR-13)&#xa;Platform Admin sets platform-wide defaults + caps:&#xa;• Standard hold window (default: 14 days)&#xa;• Short-notice window (default: 24 h)&#xa;• Short-notice threshold (default: 3 days to start)&#xa;• Min-notice cap: window ends ≥ N days before start (default: 2 days)&#xa;• Payer approval window defaults (configured separately)&#xa;Provider may override any window per-listing, within platform caps" vertex="1">
          <mxGeometry height="130" width="310" x="1360" y="1155" as="geometry" />
        </mxCell>
        <mxCell id="hdr_b" parent="1" style="text;html=1;strokeColor=#82b366;fillColor=#d5e8d4;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontStyle=1;fontSize=10;" value="B. BOOKED STATE EVENTS" vertex="1">
          <mxGeometry height="26" width="230" x="30" y="2108" as="geometry" />
        </mxCell>
        <mxCell id="fr83" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999999;align=left;dashed=1;fontSize=10;" value="FR-83: Period-end notification:&#xa;≥ 28 days: notify 28d before period.end&#xa;&lt; 28 days: include in BOOKED confirm msg&#xa;Content: right to make new reservation" vertex="1">
          <mxGeometry height="80" width="270" x="30" y="2150" as="geometry" />
        </mxCell>
        <mxCell id="ended_act" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;align=left;" value="Explicit checkout (FR-80):&#xa;(a) Resident self-checkout (worker UI)&#xa;OR (b) Provider checkout confirm&#xa;      (Provider Admin)&#xa;System does NOT auto-ENDED at period.end" vertex="1">
          <mxGeometry height="110" width="280" x="270" y="2150" as="geometry" />
        </mxCell>
        <mxCell id="ENDED" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontStyle=1;fontSize=15;" value="ENDED" vertex="1">
          <mxGeometry height="60" width="190" x="315" y="2360" as="geometry" />
        </mxCell>
        <mxCell id="ovs_trig" parent="1" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="period.end reached,&#xa;no checkout initiated&#xa;(FR-81)" vertex="1">
          <mxGeometry height="100" width="230" x="620" y="2150" as="geometry" />
        </mxCell>
        <mxCell id="ovs_notif" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" value="Notify Provider + Resident:&#xa;&#39;Overstay notification&#39; (FR-81)" vertex="1">
          <mxGeometry height="60" width="250" x="620" y="2360" as="geometry" />
        </mxCell>
        <mxCell id="ovs_stays_1" parent="1" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;fontStyle=2;fontSize=10;" value="Booking stays BOOKED" vertex="1">
          <mxGeometry height="25" width="220" x="620" y="2495" as="geometry" />
        </mxCell>
        <mxCell id="prov_flag_q" parent="1" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="Provider flags&#xa;Overstay?&#xa;(manual, FR-81)" vertex="1">
          <mxGeometry height="80" width="190" x="630" y="2590" as="geometry" />
        </mxCell>
        <mxCell id="prov_flag_act" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" value="Provider flags Overstay (FR-81)&#xa;Notify Payer&#xa;Event logged in booking history" vertex="1">
          <mxGeometry height="70" width="250" x="610" y="2775" as="geometry" />
        </mxCell>
        <mxCell id="nonpay_trig" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" value="Non-payment by Resident&#xa;(after payer-covered period ends)" vertex="1">
          <mxGeometry height="70" width="260" x="940" y="2590" as="geometry" />
        </mxCell>
        <mxCell id="nonpay_log" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" value="System logs event&#xa;(booking history; booking stays BOOKED)" vertex="1">
          <mxGeometry height="60" width="260" x="1120" y="2780" as="geometry" />
        </mxCell>
        <mxCell id="nonpay_dead" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontStyle=1;" value="DEAD END (Housing Module)&#xa;BW art. 7:231 — legal process&#xa;outside MVP scope" vertex="1">
          <mxGeometry height="70" width="260" x="1120" y="2930" as="geometry" />
        </mxCell>
        <mxCell id="ghost_trig" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" value="Provider raises Ghost Alarm (FR-31)&#xa;(Resident not found /&#xa;does not appear at unit)" vertex="1">
          <mxGeometry height="80" width="270" x="1280" y="2150" as="geometry" />
        </mxCell>
        <mxCell id="ghost_notif" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" value="Notify Payer + Resident&#xa;Event logged in booking history (FR-31)" vertex="1">
          <mxGeometry height="60" width="260" x="1285" y="2340" as="geometry" />
        </mxCell>
        <mxCell id="ghost_stays" parent="1" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;fontStyle=2;fontSize=10;" value="Booking stays BOOKED&#xa;(no mandatory consequence, FR-31)" vertex="1">
          <mxGeometry height="30" width="260" x="1285" y="2475" as="geometry" />
        </mxCell>
        <mxCell id="canc_actor" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" value="Cancellation initiated (FR-76):&#xa;Flexworker (Resident)&#xa;OR Provider&#xa;OR Payer" vertex="1">
          <mxGeometry height="90" width="260" x="1640" y="2150" as="geometry" />
        </mxCell>
        <mxCell id="win_check" parent="1" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="Within cancellation window? (FR-76)&#xa;Provider window: configurable&#xa;Payer window: configurable&#xa;Flexworker: subject to Provider window" vertex="1">
          <mxGeometry height="120" width="310" x="1615" y="2340" as="geometry" />
        </mxCell>
        <mxCell id="win_rej" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontStyle=1;" value="Cancellation REJECTED&#xa;(out-of-window error, FR-76)" vertex="1">
          <mxGeometry height="50" width="240" x="2060" y="2375" as="geometry" />
        </mxCell>
        <mxCell id="canc_reason" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" value="Actor selects / enters&#xa;cancellation reason (FR-76)" vertex="1">
          <mxGeometry height="60" width="250" x="1640" y="2570" as="geometry" />
        </mxCell>
        <mxCell id="disc_show" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;align=left;" value="Disclaimer displayed (FR-76):&#xa;&#39;By proceeding you assume responsibility&#xa;per accommodation contract +&#xa;WGV / BW art. 7:231.&#xa;Actor MUST explicitly acknowledge.&#39;" vertex="1">
          <mxGeometry height="120" width="280" x="1625" y="2730" as="geometry" />
        </mxCell>
        <mxCell id="disc_ack" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" value="Actor acknowledges disclaimer&#xa;(required before submission)" vertex="1">
          <mxGeometry height="60" width="260" x="1635" y="2960" as="geometry" />
        </mxCell>
        <mxCell id="canc_notif" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" value="Notify ALL 3 parties (FR-76):&#xa;Flexworker + Provider + Payer&#xa;(cancelling actor identity + reason)" vertex="1">
          <mxGeometry height="80" width="260" x="1635" y="3120" as="geometry" />
        </mxCell>
        <mxCell id="CANCELLED" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontStyle=1;fontSize=13;" value="CANCELLED&#xa;(unit released, FR-76)" vertex="1">
          <mxGeometry height="60" width="220" x="1655" y="3310" as="geometry" />
        </mxCell>
        <mxCell id="e1" edge="1" parent="1" source="ctx" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="res_perm">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e2" edge="1" parent="1" source="res_perm" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="browse" value="no">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e3" edge="1" parent="1" source="res_perm" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="dir_q" value="yes">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e4" edge="1" parent="1" source="res_perm" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="ind_q" value="yes">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e5" edge="1" parent="1" source="dir_q" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="pf_dir" value="yes">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e6" edge="1" parent="1" source="ind_q" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="pf_ind" value="yes">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e7" edge="1" parent="1" source="pf_dir" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="res_create" value="payer=resident&#xa;no FR-82 notice needed">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="425" y="980" />
              <mxPoint x="780" y="980" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e8" edge="1" parent="1" source="pf_ind" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="cost_q">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e9" edge="1" parent="1" source="cost_q" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="cost_rej" value="no / exceeds max">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e10" edge="1" parent="1" source="cost_q" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="fr82" value="yes / ok">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="765" y="850" />
              <mxPoint x="1100" y="850" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e11" edge="1" parent="1" source="fr82" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="res_create" value="notice confirmed">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e12" edge="1" parent="1" source="res_create" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="RESERVED">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e13" edge="1" parent="1" source="RESERVED" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="PEND_SUP" value="auto (FR-12, FR-13)&#xa;hold window starts&#xa;(configurable per platform + provider)">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e_fr75" edge="1" parent="1" source="fr75" style="edgeStyle=orthogonalEdgeStyle;html=1;dashed=1;endArrow=block;endFill=1;" target="CANC_pre">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e14" edge="1" parent="1" source="PEND_SUP" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="sup_rej" value="reject / timeout">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e15" edge="1" parent="1" source="sup_rej" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="RES_FAIL_1">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e16" edge="1" parent="1" source="PEND_SUP" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="payer_eq_q" value="provider confirms (FR-14)">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e17" edge="1" parent="1" source="payer_eq_q" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="sign_q1" value="yes&#xa;(payer=resident)">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e18" edge="1" parent="1" source="payer_eq_q" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="PEND_PAY" value="no (payer≠resident)&#xa;→ PENDING_PAYER">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e19" edge="1" parent="1" source="PEND_PAY" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="pay_exp" value="timeout or&#xa;Payer rejects">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e20" edge="1" parent="1" source="pay_exp" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="RES_FAIL_2">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e21" edge="1" parent="1" source="PEND_PAY" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="pay_conf" value="Payer confirms">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e22" edge="1" parent="1" source="pay_conf" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="sign_q2">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e23" edge="1" parent="1" source="sign_q1" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="SIGNING" value="yes">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e24" edge="1" parent="1" source="sign_q1" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="BOOKED" value="no">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="665" y="1990" />
              <mxPoint x="740" y="1990" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e25" edge="1" parent="1" source="sign_q2" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="SIGNING" value="yes">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1170" y="1900" />
              <mxPoint x="1170" y="1900" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e26" edge="1" parent="1" source="sign_q2" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=0.75;entryY=0;entryDx=0;entryDy=0;" target="BOOKED" value="no">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1415" y="2000" />
              <mxPoint x="837" y="2000" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e27" edge="1" parent="1" source="SIGNING" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="BOOKED" value="signed (FR-24)">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e30" edge="1" parent="1" source="BOOKED" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="ended_act" value="explicit checkout (FR-80)">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e31" edge="1" parent="1" source="ended_act" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="ENDED">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e32" edge="1" parent="1" source="BOOKED" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="ovs_trig" value="period.end reached">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e33" edge="1" parent="1" source="ovs_trig" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="ovs_notif" value="no checkout">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e34" edge="1" parent="1" source="ovs_notif" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="ovs_stays_1">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e35" edge="1" parent="1" source="ovs_stays_1" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="prov_flag_q">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e36" edge="1" parent="1" source="prov_flag_q" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="prov_flag_act" value="yes">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e38" edge="1" parent="1" source="prov_flag_q" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=0.25;entryY=0;entryDx=0;entryDy=0;" target="nonpay_log" value="no">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="910" y="2630" />
              <mxPoint x="910" y="2730" />
              <mxPoint x="1185" y="2730" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e39" edge="1" parent="1" source="BOOKED" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="nonpay_trig" value="non-payment occurs">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e40" edge="1" parent="1" source="nonpay_trig" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="nonpay_log">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e41" edge="1" parent="1" source="nonpay_log" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="nonpay_dead">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e42" edge="1" parent="1" source="BOOKED" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="ghost_trig" value="Provider raises Ghost Alarm">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e43" edge="1" parent="1" source="ghost_trig" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="ghost_notif">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e44" edge="1" parent="1" source="ghost_notif" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="ghost_stays">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e45" edge="1" parent="1" source="BOOKED" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="canc_actor" value="cancellation initiated (FR-76)">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e46" edge="1" parent="1" source="canc_actor" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="win_check">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e47" edge="1" parent="1" source="win_check" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="win_rej" value="outside window">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e48" edge="1" parent="1" source="win_check" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="canc_reason" value="inside window">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e49" edge="1" parent="1" source="canc_reason" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="disc_show">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e50" edge="1" parent="1" source="disc_show" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="disc_ack">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e51" edge="1" parent="1" source="disc_ack" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="canc_notif">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e52" edge="1" parent="1" source="canc_notif" style="edgeStyle=orthogonalEdgeStyle;html=1;" target="CANCELLED">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="ywi-UtZxk4BS40GZtmiX-1" edge="1" parent="1" source="prov_flag_act" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" target="nonpay_log" value="">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="860" y="2805" as="sourcePoint" />
            <mxPoint x="920" y="2805" as="targetPoint" />
          </mxGeometry>
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
