/* Approved manual-vitals preview, scoped to the resident workspace. */
.mv-rail>.card:only-child{flex:0 0 auto}
.mv-workspace .mv-history table{min-width:0}
.mv-history .cell-detail{white-space:normal;overflow-wrap:anywhere}
.mv-workspace .mv-history th{overflow-wrap:normal}
.mv-chart polygon{pointer-events:none}
@media(prefers-reduced-motion:no-preference){.mv-chart .mv-reveal{animation:chart-series-reveal 1500ms ease forwards;transform-origin:0 0}}
@media print{.mv-workspace .mv-history{height:auto!important;max-height:none!important;overflow:visible!important}.mv-tabs,.mv-chart-caption button,[data-mv-record]{display:none!important}}
.mv-tooltip{position:absolute;top:18px;width:240px;max-width:95%;z-index:2;padding:12px 16px;border:1px solid #d8ddd1;background:white;box-shadow:0 4px 16px #29352f12;border-radius:8px;font-size:13px;pointer-events:none}.mv-tooltip small{display:block;color:#656b60}
.calm-resident-grid.mv-layout{align-items:stretch;gap:26px;grid-template-columns:minmax(0,1fr) 260px}
.mv-oximeter{display:flex;flex-direction:column;gap:0;min-width:0;background:#fff;border:1px solid #e4e6de;border-radius:12px;overflow:hidden}
.mv-oximeter>.trend-card{flex:1;border:0;border-radius:0;margin:0;box-shadow:none}
.mv-oximeter>.resident-reading-history{border:0;border-top:1px solid #e4e6de;border-radius:0;margin:0;box-shadow:none}
.mv-rail{display:flex;flex-direction:column;gap:16px;min-width:0}
.mv-rail>.card,.mv-rail>.mon-review{margin:0;padding:20px;border-radius:12px;flex:1 0 auto;min-height:min-content}
.mv-rail [data-rail-summary=plan]{background:#edf1e7}
.mv-workspace{grid-column:1/-1;min-width:0;margin-top:8px;color:#242722}
.mv-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 20px}
.mv-heading h2{font-size:18px;font-weight:600;letter-spacing:-.3px;margin:0}
.mv-heading p{font-size:12px;color:#656b60;margin:5px 0 0}.mv-heading>small{font-size:11px;color:#656b60}
.mv-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));position:relative;isolation:isolate;padding:6px;gap:12px;border:1px solid #e4e6de;border-radius:18px;background:#eceee6;margin-bottom:24px}
.mv-tabs button{display:flex;align-items:center;gap:14px;min-width:0;min-height:86px;padding:15px 20px;border:0;border-radius:13px;text-align:left;background:transparent;color:#4d5548;font:inherit;cursor:pointer}
.mv-tabs button:hover{background:#ffffff55}.mv-tabs button[aria-selected=true]{background:transparent;color:#29352f}
.mv-tabs .mv-selection{position:absolute;z-index:-1;top:6px;bottom:6px;left:6px;width:calc((100% - 36px)/3);border:1px solid #b8c7b0;border-radius:13px;background:#fff;box-shadow:0 2px 5px #263c2910;transform:translateX(calc(var(--index,0)*100% + var(--index,0)*12px))}
.mv-icon{display:grid;place-items:center;width:42px;height:42px;flex-shrink:0;background:#e1e5da;color:#67735e;border-radius:12px}
.mv-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
[aria-selected=true]>.mv-icon{background:#e5eee2;color:#31604e}.mv-tab-name{font-size:14px;font-weight:500;display:block}.mv-tabs button[aria-selected=true] .mv-tab-name{font-weight:600}
.mv-tabs small{display:block;font-size:13px;margin-top:4px;color:#656b60;font-variant-numeric:tabular-nums}.mv-check{margin-left:auto;font-size:15px;color:#39614b;opacity:0}[aria-selected=true]>.mv-check{opacity:1}
.mv-panel{background:#fff;border:1px solid #e4e6de;border-radius:12px;overflow:hidden}
.mv-panel-header{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:28px 30px 20px}.mv-panel-header small{font-size:12px;color:#656b60}.mv-panel-header p{font-size:12px;color:#656b60;margin:7px 0 0}.mv-panel-header .button{font-size:13px}
.mv-value{font-size:34px;letter-spacing:-1px;line-height:1.4;font-weight:500}.mv-value span{font-size:16px;letter-spacing:0;color:#656b60}
.mv-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:0 30px 16px}.mv-toolbar h3{font-size:13px;font-weight:500;color:#656b60;margin:0}.mv-toolbar>div{display:flex;align-items:center;gap:18px}.mv-toolbar select{min-height:44px;padding:8px 12px;border:1px solid #d8ddd1;border-radius:7px;background:white;font:inherit;font-size:12px;max-width:150px}
.mv-legend{display:flex;align-items:center;gap:6px;font-size:11px;color:#656b60}.mv-legend i{width:16px;border-top:2px solid #196f66}.mv-legend i.secondary{border-top:2px dashed #6f7291;margin-left:8px}
.mv-chart-frame{margin:0 24px;position:relative;min-height:270px}.mv-chart{display:block;width:100%;height:270px}.mv-chart text{font:12px Inter,Arial,sans-serif;fill:#656b60}.mv-chart polyline{fill:none;stroke-width:2.3;stroke-linejoin:round;stroke-linecap:round}.mv-chart circle{stroke:#fff;stroke-width:2}.mv-chart-empty{min-height:270px;display:grid;place-items:center;text-align:center;padding:30px;color:#656b60;font-size:14px}
.mv-chart-caption{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:8px 30px 20px;font-size:12px;color:#656b60}.mv-link{border:0;background:none;color:#196f66;font:inherit;font-size:12px;min-height:44px;cursor:pointer}
.mv-history-heading{display:flex;justify-content:space-between;align-items:center;padding:20px 30px;border-block:1px solid #e4e6de}.mv-history-heading h3{font-size:16px;font-weight:500;margin:0}.mv-history-heading small{font-size:12px;color:#656b60}
.mv-workspace .mv-history{height:auto;max-height:292px;overflow:auto;overscroll-behavior:contain}.mv-history table{width:100%;table-layout:fixed;border-collapse:collapse}.mv-history th,.mv-history td{padding:16px 22px;border-bottom:1px solid #e4e6de;text-align:left;font-size:14px;overflow-wrap:anywhere;white-space:normal}.mv-history th{font-size:12px;font-weight:400;color:#656b60;background:#fafbf7;position:sticky;top:0;z-index:1}.mv-history td strong{font-size:14px;font-weight:500}.mv-history td small{font-size:12px;display:block;color:#656b60;margin-top:4px}.mv-history th:nth-child(1){width:20%}.mv-history th:nth-child(2){width:18%}.mv-history th:nth-child(3){width:18%}.mv-history th:nth-child(4){width:19%}.mv-history th:nth-child(5){width:25%}
.mv-footer{display:flex;justify-content:space-between;gap:12px;padding:12px 22px;border-top:1px solid #e4e6de;color:#656b60;font-size:11px}
.mv-workspace button:focus-visible,.mv-workspace select:focus-visible,.mv-workspace [tabindex]:focus-visible,.mv-drawer :focus-visible,.mv-discard :focus-visible{outline:3px solid #196f66;outline-offset:3px}
.mv-drawer,.mv-discard{color:#242722;background:#fff;border:1px solid #e4e6de;padding:0;font:15px/1.55 Inter,Arial,sans-serif;box-shadow:0 10px 70px #18291f15}.mv-drawer::backdrop,.mv-discard::backdrop{background:#29352f45}
.mv-drawer{position:fixed;inset:0 0 0 auto;margin:0;width:540px;max-width:100vw;height:100dvh;max-height:100dvh;border:0;border-left:1px solid #e4e6de;border-radius:14px 0 0 14px}.mv-drawer[open]{display:flex;flex-direction:column}.mv-drawer>header{padding:25px 28px 20px;border-bottom:1px solid #e4e6de;display:flex;justify-content:space-between;align-items:start;gap:12px}.mv-drawer h2{font-size:23px;font-weight:500;letter-spacing:-.4px;margin:0}.mv-drawer small{display:block;color:#656b60;font-size:12px}.mv-drawer>header small{margin-top:4px}.mv-close{width:44px;height:44px;padding:0;border:0;background:none;font-size:26px;cursor:pointer}
.mv-drawer form{display:flex;flex-direction:column;flex:1;min-height:0}.mv-drawer-body{overflow:auto;overscroll-behavior:contain;padding:22px 28px;flex:1}.mv-identity{display:flex;align-items:center;gap:13px;background:#f5f6f0;border:1px solid #e4e6de;border-radius:9px;padding:15px;margin-bottom:24px}.mv-identity strong{font-size:15px;font-weight:500}.mv-identity small{margin-top:3px}
.mv-fields{display:grid;grid-template-columns:1fr 1fr;gap:20px 16px}.mv-full{grid-column:1/-1}.mv-drawer label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:500;min-width:0}.mv-drawer label small{font-weight:400}.mv-drawer input,.mv-drawer textarea,.mv-drawer select{width:100%;min-width:0;border:1px solid #d6dbcf;border-radius:8px;background:#fff;padding:12px;min-height:48px;font:400 16px Inter,Arial,sans-serif;color:inherit}.mv-drawer input[type=number]{font-size:29px;padding:13px 15px;height:66px;font-variant-numeric:tabular-nums}.mv-drawer textarea{resize:vertical;min-height:76px}.mv-help{font-size:12px;color:#656b60;margin:12px 0 0;line-height:1.6}.mv-divider{height:1px;background:#e4e6de;margin:24px 0}.mv-context{margin-top:22px}.mv-context summary{min-height:44px;color:#196f66;font-size:13px;cursor:pointer}.mv-context .mv-fields{margin-top:8px}
.mv-unit-row{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:10px;font-size:13px}.mv-unit-switch{display:flex;border:1px solid #e4e6de;border-radius:7px;padding:3px;background:#f4f5ef}.mv-unit-switch button{border:0;background:none;min-height:44px;padding:6px 15px;font:inherit;font-size:13px;border-radius:5px;cursor:pointer}.mv-unit-switch button[aria-pressed=true]{background:#e2e8da;color:#29352f}
.mv-drawer footer{padding:18px 28px max(18px,env(safe-area-inset-bottom));border-top:1px solid #e4e6de;background:#fff}.mv-actions{display:flex;justify-content:flex-end;gap:12px}.mv-actions button{border:1px solid #d6dbd0;border-radius:8px;background:#fff;padding:11px 16px;min-height:44px;font:500 14px Inter,Arial,sans-serif;cursor:pointer}.mv-actions .primary{background:#29352f;color:#fff;border-color:#29352f}.mv-drawer button:disabled{opacity:.5;cursor:default}.mv-error{background:#fbefeb;color:#983c30;padding:12px;border-radius:8px;margin-top:16px;font-size:13px}.mv-discard{width:400px;max-width:calc(100vw - 32px);border-radius:12px;padding:26px}.mv-discard h2{font-size:21px;margin:0}.mv-discard p{color:#656b60;margin:12px 0 24px}
@media(prefers-reduced-motion:no-preference){.mv-selection{transition:transform .22s ease}.mv-reveal{transform-origin:0 0;animation:mv-reveal 700ms cubic-bezier(.22,.61,.36,1) both}.chart-settled .mv-reveal{animation:none}@keyframes mv-reveal{from{transform:scaleX(0)}to{transform:scaleX(1)}}.mv-drawer[open]{animation:mv-slide .22s ease-out}@keyframes mv-slide{from{transform:translateX(100%)}to{transform:translateX(0)}}}
@media(max-width:1200px){.calm-resident-grid.mv-layout{grid-template-columns:minmax(0,1fr) 222px;gap:20px}.mv-rail>.card{padding:18px}.mv-history th,.mv-history td{padding:14px 12px;font-size:14px}.mv-history th{font-size:12px}.mv-tabs button{padding:14px 12px;gap:10px}.mv-tab-name{font-size:13px}.mv-check{display:none}}
@media(max-width:760px){.calm-resident-grid.mv-layout{grid-template-columns:minmax(0,1fr)}.mv-tabs{gap:6px}.mv-tabs .mv-selection{width:calc((100% - 24px)/3);transform:translateX(calc(var(--index,0)*100% + var(--index,0)*6px))}.mv-tabs button{flex-direction:column;justify-content:center;text-align:center;padding:10px 5px;gap:8px}.mv-tab-name{font-size:12px}.mv-tabs small{font-size:11px}.mv-panel-header{padding:20px}.mv-panel-header .button{font-size:12px;max-width:140px}.mv-value{font-size:28px}.mv-chart-frame{margin:0 8px}.mv-toolbar{padding:0 20px 16px;flex-wrap:wrap}.mv-legend{font-size:10px}.mv-history thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.mv-history tbody{display:block}.mv-history tr{display:grid;grid-template-columns:1fr 1fr;padding:14px;gap:14px;border-bottom:1px solid #e4e6de}.mv-history td{display:block;padding:0;border:0}.mv-history td::before{content:attr(data-label);display:block;font-size:11px;color:#656b60;margin-bottom:4px}.mv-history td:last-child{grid-column:1/-1}.mv-history-heading{padding:18px 20px}.mv-footer{flex-wrap:wrap}.mv-heading>small{display:none}.mv-drawer{border-radius:0}.mv-drawer-body{padding:20px}.mv-drawer>header{padding:22px 20px}.mv-drawer footer{padding:16px 20px}}
/* Use the available workspace width, including a widened navigation rail. */
@container(max-width:650px){.calm-resident-grid.mv-layout{grid-template-columns:minmax(0,1fr)}.mv-rail{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.mv-rail>.card:last-child{grid-column:1/-1}.mv-history th,.mv-history td{padding-inline:8px}}
@container(max-width:450px){.mv-rail{grid-template-columns:minmax(0,1fr)}}
