/* Matanho Nexus V45 — explicit order lifecycle + source-visible reconciliation */
:root{--v45-ink:#07111f;--v45-muted:#66758a;--v45-line:#dfe6ef;--v45-soft:#f7f9fc;--v45-blue:#2459e8;--v45-cyan:#0799ad;--v45-green:#0a8065;--v45-amber:#b87512;--v45-red:#c7354d;--v45-violet:#6858db}
.v45-kicker{font-size:11px;letter-spacing:.075em;text-transform:uppercase;font-weight:800;color:var(--v45-blue)}
.v45-chip{display:inline-flex;align-items:center;min-height:24px;border-radius:999px;padding:3px 8px;font-size:11px;font-weight:750;background:#eef3f9;color:#526279;white-space:nowrap}.v45-chip.good{background:#eaf8f3;color:#08775f}.v45-chip.warn{background:#fff5e4;color:#94600a}.v45-chip.bad{background:#fff0f2;color:#b32b43}.v45-chip.info{background:#eef3ff;color:#2858c7}
.v45-btn{min-height:36px;border:1px solid #d5deea;border-radius:9px;background:#fff;color:#172235;padding:0 12px;font-size:11px;font-weight:720;cursor:pointer}.v45-btn:hover{background:#f8faff;border-color:#b8c6d8}.v45-btn.primary{background:linear-gradient(135deg,#315feb,#1f55e2);border-color:#1f55e2;color:#fff}.v45-btn:disabled{opacity:.45;cursor:not-allowed}

/* ---------------- Orders lifecycle ---------------- */
.v45-order-flow-shell{margin-top:12px;border:1px solid var(--v45-line);border-radius:13px;background:#fff;overflow:hidden;box-shadow:0 1px 2px rgba(8,20,36,.025)}
.v45-order-flow-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:13px 14px 11px;border-bottom:1px solid #edf1f5}.v45-order-flow-head h2{font-size:14px;margin:3px 0 4px}.v45-order-flow-head p{font-size:11px;line-height:1.45;color:var(--v45-muted);margin:0;max-width:760px}.v45-order-flow-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.v45-order-flow-strip{display:grid;grid-template-columns:repeat(10,minmax(108px,1fr));gap:5px;padding:10px 12px;background:#fafbfd;border-bottom:1px solid #edf1f5;overflow-x:auto;scrollbar-width:thin}.v45-order-stage{min-height:67px;border:1px solid #e0e7ef;border-radius:9px;background:#fff;padding:8px;text-align:left;cursor:pointer;position:relative}.v45-order-stage span,.v45-order-stage strong,.v45-order-stage small{display:block}.v45-order-stage span{font-size:10px;color:#718097;font-weight:800}.v45-order-stage strong{font-size:11px;margin:4px 0 2px}.v45-order-stage small{font-size:10px;color:#7a8798;line-height:1.3}.v45-order-stage.done{background:#f2faf7;border-color:#b7dfd2}.v45-order-stage.active{background:#f3f6ff;border-color:#8ea9ff;box-shadow:inset 0 0 0 1px rgba(36,89,232,.08)}.v45-order-stage.wait{background:#fff9ed;border-color:#edd7aa}.v45-order-stage:after{content:"";position:absolute;left:8px;right:8px;bottom:5px;height:2px;border-radius:2px;background:#e6ebf2}.v45-order-stage.done:after{background:#20a37c}.v45-order-stage.active:after{background:#315feb}
.v45-order-flow-board{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(380px,.95fr);gap:11px;padding:11px;align-items:stretch}.v45-order-panel{border:1px solid #e1e7ef;border-radius:11px;background:#fff;min-width:0;display:flex;flex-direction:column}.v45-order-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:11px 12px;border-bottom:1px solid #edf1f5}.v45-order-panel-head h3{font-size:13px;margin:3px 0}.v45-order-panel-head p{font-size:11px;color:var(--v45-muted);line-height:1.4;margin:0}.v45-order-panel-body{padding:11px 12px;flex:1;min-width:0}
.v45-order-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}.v45-order-summary>div{border:1px solid #e5eaf1;border-radius:8px;padding:8px;background:#f9fbfd;min-width:0}.v45-order-summary span,.v45-order-summary strong,.v45-order-summary small{display:block}.v45-order-summary span{font-size:10px;color:#75849a;text-transform:uppercase;font-weight:800}.v45-order-summary strong{font-size:12px;margin:4px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v45-order-summary small{font-size:10px;color:#7b889a;line-height:1.3}
.v45-evidence-chain{margin-top:10px;display:grid;gap:7px}.v45-evidence-row{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:9px;align-items:center;padding:8px;border:1px solid #e3e9f1;border-radius:9px}.v45-evidence-row b{width:32px;height:32px;border-radius:8px;background:#eef3ff;color:#2459e8;display:grid;place-items:center;font-size:10px}.v45-evidence-row strong,.v45-evidence-row small{display:block}.v45-evidence-row strong{font-size:11px}.v45-evidence-row small{font-size:10px;color:#76859a;margin-top:2px;line-height:1.35}.v45-evidence-row button{border:0;background:transparent;color:#2459e8;font-size:11px;font-weight:750;cursor:pointer}
.v45-handoff-map{display:grid;gap:7px}.v45-handoff{display:grid;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr);gap:5px;align-items:center}.v45-handoff>div{border:1px solid #e1e7ef;border-radius:8px;padding:8px;min-width:0}.v45-handoff span,.v45-handoff strong,.v45-handoff small{display:block}.v45-handoff span{font-size:10px;text-transform:uppercase;color:#75849a;font-weight:800}.v45-handoff strong{font-size:11px;margin:4px 0}.v45-handoff small{font-size:10px;color:#77869a;line-height:1.3}.v45-handoff>i{font-style:normal;text-align:center;color:#738297}.v45-order-next{margin-top:10px;border:1px solid #dbe5f3;border-radius:9px;background:#f6f9ff;padding:10px;display:flex;justify-content:space-between;gap:10px;align-items:center}.v45-order-next strong,.v45-order-next small{display:block}.v45-order-next strong{font-size:11px}.v45-order-next small{font-size:10px;color:#718097;margin-top:3px;line-height:1.35}

/* ---------------- reconciliation end-to-end ---------------- */
#page-reconciliations.v45-recon{padding:24px 28px 44px;max-width:1680px;margin:0 auto}.v45-recon-shell{display:grid;gap:12px}.v45-recon-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.v45-recon-head h1{font-size:26px;letter-spacing:-.035em;margin:3px 0 5px}.v45-recon-head p{font-size:11px;color:var(--v45-muted);line-height:1.5;margin:0;max-width:840px}.v45-recon-head-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.v45-recon-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.v45-recon-kpi{border:1px solid var(--v45-line);border-radius:10px;background:#fff;padding:10px 11px;min-width:0}.v45-recon-kpi span,.v45-recon-kpi strong,.v45-recon-kpi small{display:block}.v45-recon-kpi span{font-size:10px;color:#718097;text-transform:uppercase;font-weight:800}.v45-recon-kpi strong{font-size:18px;margin:5px 0 2px;letter-spacing:-.02em}.v45-recon-kpi small{font-size:10px;color:#7a8799;line-height:1.35}
.v45-recon-flow{border:1px solid var(--v45-line);border-radius:11px;background:#fff;overflow:hidden}.v45-recon-flow-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:11px 12px 8px}.v45-recon-flow-head h2{font-size:13px;margin:3px 0}.v45-recon-flow-head p{font-size:11px;color:var(--v45-muted);margin:0}.v45-recon-stages{display:grid;grid-template-columns:repeat(9,minmax(122px,1fr));gap:5px;padding:9px 10px 11px;overflow-x:auto;background:#fafbfd;border-top:1px solid #edf1f5}.v45-recon-stage{border:1px solid #e0e6ee;background:#fff;border-radius:8px;padding:8px;min-height:70px;text-align:left;cursor:pointer}.v45-recon-stage span,.v45-recon-stage strong,.v45-recon-stage small{display:block}.v45-recon-stage span{font-size:10px;font-weight:800;color:#708096}.v45-recon-stage strong{font-size:11px;margin:4px 0}.v45-recon-stage small{font-size:10px;color:#798699;line-height:1.3}.v45-recon-stage.done{background:#f3faf7;border-color:#b5dfd2}.v45-recon-stage.active{background:#f3f6ff;border-color:#8eabff}
.v45-source-hub{border:1px solid var(--v45-line);border-radius:11px;background:#fff;overflow:hidden}.v45-source-hub-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:11px 12px;border-bottom:1px solid #edf1f5}.v45-source-hub-head h2{font-size:13px;margin:3px 0}.v45-source-hub-head p{font-size:11px;color:var(--v45-muted);line-height:1.45;margin:0;max-width:860px}.v45-source-hub-actions{display:flex;gap:7px;flex-wrap:wrap}.v45-source-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:10px}.v45-source-card{border:1px solid #e1e7ef;border-radius:10px;background:#fff;padding:10px;min-width:0}.v45-source-card-top{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}.v45-source-icon{width:34px;height:34px;border-radius:8px;background:#eef3ff;color:#2459e8;display:grid;place-items:center;font-size:10px;font-weight:850}.v45-source-card h3{font-size:11px;margin:7px 0 2px}.v45-source-card p{font-size:10px;color:#76859a;line-height:1.35;margin:0}.v45-source-meta{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:8px}.v45-source-meta>div{background:#f8fafc;border:1px solid #edf1f5;border-radius:7px;padding:6px;min-width:0}.v45-source-meta span,.v45-source-meta strong{display:block}.v45-source-meta span{font-size:9px;color:#7a889b;text-transform:uppercase;font-weight:800}.v45-source-meta strong{font-size:10px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v45-source-card-actions{display:flex;gap:5px;margin-top:8px}.v45-source-card-actions button{flex:1;min-height:31px;border:1px solid #dde4ed;border-radius:7px;background:#fff;font-size:10px;font-weight:720;cursor:pointer}.v45-source-card-actions button:hover{background:#f7faff}
.v45-recon-workbench{display:grid;grid-template-columns:330px minmax(0,1fr);gap:10px;align-items:stretch}.v45-recon-queue-card,.v45-recon-detail{border:1px solid var(--v45-line);border-radius:11px;background:#fff;min-width:0;overflow:hidden}.v45-recon-card-head{padding:11px 12px;border-bottom:1px solid #edf1f5;display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.v45-recon-card-head h2{font-size:13px;margin:3px 0}.v45-recon-card-head p{font-size:10px;color:#75849a;margin:0;line-height:1.4}.v45-recon-tools{display:grid;grid-template-columns:1fr 110px;gap:6px;padding:9px 10px;border-bottom:1px solid #edf1f5}.v45-recon-tools input,.v45-recon-tools select{height:34px;border:1px solid #d9e1eb;border-radius:8px;background:#fff;padding:0 9px;font-size:11px;min-width:0}.v45-recon-queue{max-height:680px;overflow:auto}.v45-recon-case{width:100%;border:0;border-bottom:1px solid #edf1f5;background:#fff;padding:10px;text-align:left;display:grid;grid-template-columns:8px minmax(0,1fr) auto;gap:8px;cursor:pointer}.v45-recon-case:hover,.v45-recon-case.active{background:#f6f9ff}.v45-recon-case>i{width:7px;height:7px;border-radius:50%;background:#d88c16;margin-top:5px}.v45-recon-case.critical>i{background:#d23d54}.v45-recon-case.ready>i{background:#315feb}.v45-recon-case.waiting>i{background:#8a98aa}.v45-recon-case strong,.v45-recon-case small{display:block}.v45-recon-case strong{font-size:11px}.v45-recon-case small{font-size:10px;color:#77859a;line-height:1.35;margin-top:2px}.v45-recon-case em{font-size:10px;font-style:normal;font-weight:800;color:#3b485c}
.v45-recon-detail-body{padding:11px 12px}.v45-case-banner{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;padding-bottom:10px;border-bottom:1px solid #edf1f5}.v45-case-banner h2{font-size:16px;margin:3px 0 4px}.v45-case-banner p{font-size:11px;color:#6c7b90;line-height:1.45;margin:0;max-width:720px}.v45-case-amount{text-align:right}.v45-case-amount strong,.v45-case-amount span{display:block}.v45-case-amount strong{font-size:17px}.v45-case-amount span{font-size:10px;color:#77869a;margin-top:3px}
.v45-recon-source-compare{display:grid;grid-template-columns:minmax(0,1fr) 150px minmax(0,1fr);gap:8px;margin-top:10px;align-items:stretch}.v45-record-card{border:1px solid #e1e7ef;border-radius:9px;background:#fbfcfe;padding:10px;min-width:0}.v45-record-card.external{background:#fff}.v45-record-card span,.v45-record-card strong,.v45-record-card small{display:block}.v45-record-card>span{font-size:9.5px;color:#728198;text-transform:uppercase;font-weight:800}.v45-record-card>strong{font-size:14px;margin:5px 0}.v45-record-card>small{font-size:10px;color:#77869a;line-height:1.35}.v45-record-lineage{margin-top:8px;padding-top:8px;border-top:1px solid #e8edf3;display:grid;gap:4px}.v45-record-lineage div{display:grid;grid-template-columns:94px minmax(0,1fr);gap:6px;font-size:10px}.v45-record-lineage b{font-weight:720;color:#536176}.v45-record-lineage span{font-size:10px;text-transform:none;font-weight:600;color:#111a28;overflow-wrap:anywhere}.v45-record-card button{margin-top:8px;width:100%;min-height:32px;border:1px solid #dce4ee;background:#fff;border-radius:7px;font-size:10px;font-weight:720;cursor:pointer}.v45-difference-card{border:1px solid #efcad1;border-radius:9px;background:#fff6f7;display:grid;place-content:center;text-align:center;padding:9px}.v45-difference-card span,.v45-difference-card strong,.v45-difference-card small{display:block}.v45-difference-card span{font-size:9px;text-transform:uppercase;color:#a14d5d;font-weight:800}.v45-difference-card strong{font-size:15px;margin:5px 0}.v45-difference-card small{font-size:10px;color:#9a6370}.v45-difference-card.matched{background:#f1faf6;border-color:#bce0d4}.v45-difference-card.matched span,.v45-difference-card.matched small{color:#31745f}
.v45-match-explain{display:grid;grid-template-columns:1.15fr .85fr;gap:8px;margin-top:9px}.v45-match-panel{border:1px solid #e1e7ef;border-radius:9px;padding:10px}.v45-match-panel h3{font-size:11px;margin:0 0 8px}.v45-match-keys{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.v45-match-key{border:1px solid #edf1f5;border-radius:7px;padding:7px}.v45-match-key span,.v45-match-key strong,.v45-match-key small{display:block}.v45-match-key span{font-size:9px;color:#79879a;text-transform:uppercase;font-weight:800}.v45-match-key strong{font-size:10px;margin:3px 0}.v45-match-key small{font-size:9px;color:#7a8798}.v45-next-action{border:1px solid #dbe4f2;background:#f6f9ff;border-radius:9px;padding:9px}.v45-next-action span,.v45-next-action strong,.v45-next-action small{display:block}.v45-next-action span{font-size:9px;text-transform:uppercase;color:#5770b2;font-weight:800}.v45-next-action strong{font-size:11px;margin:4px 0}.v45-next-action small{font-size:10px;color:#6c7b91;line-height:1.4}.v45-case-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px;padding-top:9px;border-top:1px solid #edf1f5}
.v45-stage-detail{border:1px solid #dfe6ef;border-radius:9px;background:#f8fafc;padding:9px 10px;display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}.v45-stage-detail strong,.v45-stage-detail small{display:block}.v45-stage-detail strong{font-size:11px}.v45-stage-detail small{font-size:10px;color:#718097;line-height:1.4;margin-top:3px}

/* modal */
#v45Backdrop{position:fixed;inset:0;z-index:420;background:rgba(6,15,28,.38);backdrop-filter:blur(3px);display:none}#v45Backdrop.show{display:block}#v45Modal{position:fixed;z-index:421;left:50%;top:50%;transform:translate(-50%,-50%);width:min(860px,calc(100vw - 28px));max-height:calc(100vh - 34px);overflow:auto;background:#fff;border:1px solid #dbe3ed;border-radius:13px;box-shadow:0 26px 80px rgba(8,23,43,.26);display:none}#v45Modal.show{display:block}.v45-modal-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding:13px 14px;border-bottom:1px solid #edf1f5}.v45-modal-head h2{font-size:16px;margin:3px 0}.v45-modal-head p{font-size:11px;color:#708096;margin:0;line-height:1.45}.v45-modal-close{width:34px;height:34px;border:1px solid #dbe3ed;background:#fff;border-radius:8px;font-size:18px;cursor:pointer}.v45-modal-body{padding:13px 14px}.v45-modal-footer{display:flex;justify-content:flex-end;gap:7px;padding:10px 14px;border-top:1px solid #edf1f5}.v45-raw-record{background:#0f1826;color:#d9e2ef;border-radius:9px;padding:11px;white-space:pre-wrap;overflow:auto;font:11px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace}.v45-source-form{display:grid;grid-template-columns:1fr 1fr;gap:9px}.v45-source-form label{display:grid;gap:5px;font-size:10px;color:#5f6f84;font-weight:750}.v45-source-form .wide{grid-column:1/-1}.v45-source-form input,.v45-source-form select,.v45-source-form textarea{width:100%;border:1px solid #d7e0eb;border-radius:8px;padding:9px 10px;font-size:11px;background:#fff}.v45-source-form textarea{min-height:72px;resize:vertical}

@media(max-width:1200px){.v45-recon-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.v45-source-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.v45-order-flow-board{grid-template-columns:1fr}.v45-order-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.v45-recon-source-compare{grid-template-columns:1fr 120px 1fr}.v45-match-keys{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){#page-reconciliations.v45-recon{padding:18px 16px 40px}.v45-recon-head,.v45-order-flow-head{display:block}.v45-recon-head-actions,.v45-order-flow-actions{justify-content:flex-start;margin-top:9px}.v45-recon-workbench{grid-template-columns:1fr}.v45-recon-queue{max-height:300px}.v45-recon-source-compare{grid-template-columns:1fr}.v45-difference-card{min-height:80px}.v45-match-explain{grid-template-columns:1fr}.v45-source-grid{grid-template-columns:1fr 1fr}}
@media(max-width:640px){.v45-recon-kpis,.v45-source-grid,.v45-order-summary{grid-template-columns:1fr 1fr}.v45-source-meta{grid-template-columns:1fr}.v45-recon-tools{grid-template-columns:1fr}.v45-match-keys{grid-template-columns:1fr 1fr}.v45-case-banner{display:block}.v45-case-amount{text-align:left;margin-top:8px}.v45-source-form{grid-template-columns:1fr}.v45-source-form .wide{grid-column:auto}.v45-handoff{grid-template-columns:1fr}.v45-handoff>i{transform:rotate(90deg)}.v45-order-next{display:block}.v45-order-next button{margin-top:8px;width:100%}}
@media(max-width:430px){.v45-recon-kpis,.v45-source-grid,.v45-order-summary,.v45-match-keys{grid-template-columns:1fr}.v45-recon-head h1{font-size:23px}.v45-order-flow-strip,.v45-recon-stages{scroll-snap-type:x proximity}.v45-order-stage,.v45-recon-stage{scroll-snap-align:start}}
.v45-internal-books{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:10px 10px 0}.v45-internal-book{border:1px solid #e2e8ef;background:#f8fafc;border-radius:8px;padding:8px 9px;min-width:0}.v45-internal-book span,.v45-internal-book strong,.v45-internal-book small{display:block}.v45-internal-book span{font-size:9px;text-transform:uppercase;color:#76859a;font-weight:800}.v45-internal-book strong{font-size:10.5px;margin:3px 0}.v45-internal-book small{font-size:9.5px;color:#76859a;line-height:1.3}
@media(max-width:640px){.v45-internal-books{grid-template-columns:1fr}}
