:root{--bg: #eceff3;--surface: #fff;--ink: #16202b;--muted: #5a6777;--line: #c6cfda;--line-soft: #dde3ea;--accent: #1d5bc4;--accent-soft: #e3ecfb;--edge: #7f8c9b;--hub-bg: #f6f8fa;--ok: #2b8a55;--ok-bg: #e4f3ea;--warn: #9a6408;--warn-bg: #fbf0d9;--no: #c2443a;--no-bg: #f9e3e1;--banner: 30px;--font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;--mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "DejaVu Sans Mono", Menlo, monospace;font:15px/1.5 var(--font);color:var(--ink);background:var(--bg);color-scheme:light}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{padding-top:var(--banner)}button,input{font:inherit;color:inherit}button{cursor:pointer}h1,h2,h3{margin:0;line-height:1.25;text-wrap:balance}p{margin:0}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.muted{color:var(--muted)}.small{font-size:13.5px}.tiny{font-size:12px}.mono{font-family:var(--mono);font-size:13px}.grow{flex:1}.ko{color:var(--no)}.fictive{position:fixed;inset:0 0 auto 0;height:var(--banner);z-index:40;display:flex;align-items:center;justify-content:center;font-size:12.5px;font-weight:650;background:var(--warn-bg);color:#6b3d00;border-bottom:1px solid #f0d9b0}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:0 14px;border-radius:8px;border:1px solid var(--line);background:var(--surface);font-weight:600;font-size:14px;text-decoration:none;color:var(--accent);white-space:nowrap}.btn:hover{border-color:var(--accent)}.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn.primary:hover{background:#174ba3}.btn:disabled{opacity:.5;cursor:default}.btn.wide{width:100%;min-height:44px}.field{display:flex;flex-direction:column;gap:5px;font-weight:600;font-size:13.5px}.field input{min-height:40px;padding:0 12px;border:1px solid var(--line);border-radius:8px;background:#fff;font-weight:500;font-size:15px}.field input:focus{outline:3px solid var(--accent-soft);border-color:var(--accent)}.pill{display:inline-block;font-size:12px;font-weight:650;padding:1px 8px;border-radius:6px;white-space:nowrap}.pill.ok{background:var(--ok-bg);color:var(--ok)}.pill.ko{background:var(--no-bg);color:var(--no)}.pill.soft{background:var(--accent-soft);color:var(--accent)}.notice{padding:9px 12px;border-radius:8px;font-size:14px;border-left:3px solid}.notice.ko{background:var(--no-bg);border-color:var(--no);color:#7d221b}.notice.warn{background:var(--warn-bg);border-color:var(--warn);color:#5c3c05}.notice.info{background:var(--accent-soft);border-color:var(--accent)}.seg{display:inline-flex;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:var(--surface)}.seg button{border:0;background:transparent;padding:6px 12px;font-size:13.5px}.seg button+button{border-left:1px solid var(--line)}.seg button[aria-pressed=true]{background:var(--accent);color:#fff}.seg.wide{display:flex}.seg.wide button{flex:1;padding:9px 12px}.login{min-height:calc(100vh - var(--banner));display:grid;place-items:center;padding:24px;background:radial-gradient(1200px 500px at 50% -10%,#dfe8f7,transparent),var(--bg)}.login-card{width:420px;max-width:100%;background:var(--surface);border:1px solid var(--line-soft);border-radius:16px;padding:28px;box-shadow:0 10px 40px #16202b14;display:flex;flex-direction:column;gap:16px}.login-hero{display:flex;flex-direction:column;gap:4px}.login-hero h1{font-size:24px}.login-hero p{color:var(--muted)}.logo{width:34px;height:34px;border-radius:9px;background:var(--accent);color:#fff;display:grid;place-items:center;font-weight:800;font-size:18px;margin-bottom:8px}.sign-in{display:flex;flex-direction:column;gap:12px}.shell{height:100%;display:flex;flex-direction:column}header.top{display:flex;align-items:center;gap:18px;padding:10px 20px;background:var(--surface);border-bottom:1px solid var(--line)}header.top .brand{display:flex;align-items:center;gap:10px;font-size:17px}header.top .brand .logo{margin:0;width:28px;height:28px;font-size:15px;border-radius:7px}.tabs{display:flex;gap:4px;margin-left:12px}.tabs button{border:0;background:none;padding:7px 14px;border-radius:8px;font-weight:600;color:var(--muted)}.tabs button:hover{background:var(--bg)}.tabs button[aria-current]{background:var(--accent-soft);color:var(--accent)}.screen{flex:1;min-height:0;padding:22px 24px;display:grid;grid-template-columns:380px 1fr;gap:24px;align-items:start;overflow:auto}.search-pane{background:var(--surface);border:1px solid var(--line-soft);border-radius:12px;padding:18px;display:flex;flex-direction:column;gap:14px;position:sticky;top:0}.search{display:flex;gap:8px;align-items:flex-end}.search .field{flex:1}.patient-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:6px}.patient{width:100%;text-align:left;border:1px solid var(--line-soft);background:var(--surface);border-radius:10px;padding:10px 12px;display:grid;gap:1px}.patient:hover{border-color:var(--accent)}.patient.on{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent) inset}.actions-pane{display:flex;flex-direction:column;gap:12px;min-width:0}.actions-pane .empty{background:var(--surface);border:1px dashed var(--line);border-radius:12px;padding:28px;display:flex;flex-direction:column;gap:8px;max-width:720px}.actions-head{display:flex;align-items:center;gap:16px}.actions-head>div{flex:1}.actions-head h2{font-size:20px}.switch{display:inline-flex;align-items:center;gap:6px;font-size:14px;color:var(--muted)}.action-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:6px}.action{width:100%;text-align:left;border:1px solid var(--line-soft);background:var(--surface);border-radius:10px;padding:8px 14px;display:grid;grid-template-columns:128px minmax(0,1fr) 270px 230px 14px;gap:14px;align-items:center}.action:hover{border-color:var(--accent);box-shadow:0 2px 10px #1d5bc414}.action.refused{border-left:4px solid var(--no)}.action.done{border-left:4px solid var(--ok)}.action .at{color:var(--muted);font-size:12.5px}.action .who{display:flex;flex-direction:column;font-size:13.5px}.action .who .mono{color:var(--muted)}.action .outcome{display:flex;flex-direction:column;align-items:flex-start;gap:2px}.action .reason{font-size:12.5px;color:var(--no)}.action .go{color:var(--accent);font-weight:700}.flow-screen{flex:1;min-height:0;display:flex;flex-direction:column}.strip{display:flex;gap:14px;align-items:stretch;padding:10px 16px;background:var(--surface);border-bottom:1px solid var(--line)}.strip .back{align-self:center}.who-strip{display:flex;flex-direction:column;justify-content:center;min-width:150px}.strip .cards{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px}.strip .card{flex:none;width:214px;text-align:left;border:1px solid var(--line);border-radius:8px;padding:6px 10px;display:flex;flex-direction:column;gap:1px;background:var(--surface)}.strip .card:hover{border-color:var(--accent)}.strip .card[aria-current=true]{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent) inset;background:#f7faff}.strip .card .tm{font-size:11.5px;color:var(--muted)}.strip .card .wh{font-weight:650;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.strip .card .by{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.flow-view{flex:1;min-height:0;display:flex}.map-pane{flex:1;min-width:0;position:relative;background:var(--bg)}.map-stage{position:absolute;top:0;right:0;bottom:0;left:0}svg.map{width:100%;height:100%;display:block;cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none}svg.map.panning{cursor:grabbing}.zoom{position:absolute;right:14px;top:12px;display:flex;flex-direction:column;gap:6px}.zoom button{width:34px;height:34px;border:1px solid var(--line);border-radius:8px;background:var(--surface);font-size:18px;line-height:1}.zoom button.fit{font-size:12px}.legend{position:absolute;left:14px;bottom:14px;background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:7px 12px;font-size:12.5px;display:flex;flex-wrap:wrap;gap:4px 14px}.legend span{display:inline-flex;align-items:center;gap:6px}.legend i{width:14px;height:10px;border-radius:3px;display:inline-block}.legend .k-lit{background:var(--accent)}.legend .k-deduced{border:2px dashed var(--accent)}.legend .k-red{background:var(--no)}.legend .k-outbox{border-top:2px dashed var(--edge);height:0;border-radius:0}.clock{position:absolute;left:14px;top:12px;display:flex;gap:12px;align-items:baseline;background:#ffffffeb;border:1px solid var(--line);border-radius:10px;padding:6px 12px;box-shadow:0 2px 12px #16202b14}.clock strong{font-family:var(--mono);font-size:15px;color:var(--accent)}.clock strong.red{color:var(--no)}.map-wait{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;background:#eceff3b3}.map-wait p{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:16px 20px;max-width:520px}.frame{fill:var(--hub-bg);stroke:var(--ink);stroke-width:1.6}.band-title{font:650 14px var(--font);letter-spacing:.08em}.b{cursor:pointer;transition:opacity .25s}.b rect.box{fill:var(--surface);stroke:var(--line);stroke-width:1.2;transition:fill .25s,stroke .25s,stroke-width .25s}.b .t{font:650 16px var(--mono);fill:var(--ink)}.b .s{font:400 13px var(--font);fill:var(--muted)}.b .tag rect{fill:var(--surface);stroke:var(--accent);stroke-width:1.5;stroke-dasharray:4 3}.b .tag text{font:650 12px var(--font);fill:var(--accent)}.b.red .tag rect{stroke:var(--no);fill:var(--no-bg)}.b.outside rect.box{fill:none;stroke:var(--edge);stroke-dasharray:6 4}.b.outside .t{font:650 15px var(--font)}.b:hover rect.box{stroke:var(--accent);stroke-width:2}.b.dim{opacity:.28}.b.lit rect.box{stroke:var(--accent);stroke-width:3;fill:#f4f8ff}.b.lit.deduced rect.box{stroke-dasharray:7 5;fill:var(--surface)}.b.lit.red rect.box{stroke:var(--no);fill:var(--no-bg);stroke-width:3.5}.b.lit.red .tag text{fill:var(--no)}.b.now rect.box{stroke-width:5;animation:now 1s ease-out}.b.focus rect.box{stroke:var(--ink);stroke-width:4}@keyframes now{0%{stroke-width:10}to{stroke-width:5}}.hop{fill:none;stroke:var(--accent);stroke-width:3;opacity:.9}.hop.deduced{stroke-dasharray:3 5;opacity:.75}.hop.outbox{stroke:var(--edge);stroke-dasharray:9 6}.hop.failed{stroke:var(--no);stroke-dasharray:3 5}.hop.current{stroke-width:5}.arrow.hop{fill:var(--accent)}.arrow.hop-soft{fill:var(--edge)}.arrow.hop-red{fill:var(--no)}.badge circle{fill:var(--accent);stroke:var(--hub-bg);stroke-width:2.5}.badge.red circle{fill:var(--no)}.badge.now circle{r:16}.badge text{font:700 14px var(--font);fill:#fff;pointer-events:none}.panel{width:450px;flex:none;border-left:1px solid var(--line);background:var(--surface);overflow-y:auto;padding:18px 20px 40px;display:flex;flex-direction:column;gap:10px}.panel h2{font-size:21px}.panel h3{font-size:12px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);margin-top:10px}.panel .lede{color:var(--muted)}.facts{display:grid;grid-template-columns:auto 1fr;gap:2px 12px;margin:0;font-size:13.5px}.facts dt{color:var(--muted)}.facts dd{margin:0;word-break:break-all}.actions-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.chips{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:6px}.chip button{border:1px solid var(--line);background:var(--bg);border-radius:99px;padding:2px 10px;font-size:12.5px;font-family:var(--mono);opacity:.45}.chip.on button{opacity:1;background:var(--accent-soft);border-color:#b8cdf2}.chip.red button{background:var(--no-bg);border-color:#efb7b1;color:var(--no)}.chip.focus button{box-shadow:0 0 0 2px var(--ink) inset}.chip em{font-family:var(--font);color:var(--muted)}table.steps{width:100%;border-collapse:collapse;font-size:12.5px;font-variant-numeric:tabular-nums}table.steps th{text-align:left;font-weight:500;color:var(--muted);font-size:12px;padding:3px 4px;border-bottom:1px solid var(--line)}table.steps td{padding:3px 4px;border-bottom:1px solid var(--line-soft);vertical-align:top;transition:opacity .25s}table.steps .num{text-align:right;color:var(--muted);font-family:var(--mono);font-size:11.5px;white-space:nowrap}table.steps td.op{font-family:var(--mono);font-size:12px}table.steps .cr{color:var(--muted)}table.steps .ev{display:block;color:var(--muted);font-size:11.5px}table.steps tr{cursor:pointer}table.steps tr.ahead td{opacity:.35}table.steps tr.err td{background:var(--no-bg)}table.steps tr.deduced td{background:#f6f9fe;font-style:normal}table.steps tr.deduced em{color:var(--accent);font-family:var(--font)}table.steps tr.focus td{background:#eef3fb}@media (prefers-reduced-motion: reduce){.b,.b rect.box,table.steps td{transition:none}.b.now rect.box{animation:none}}
