/* MA Rooming — the assistant's lens on the visit note.
   Same family as the morning huddle: navy heads, white cards, one hairline, generous rhythm.
   Bigger targets than the physician composer, because this is filled in standing up. */
.rm { --rm-ink: var(--ink, #19223b); --rm-muted: var(--ink-3, #6b7288); --rm-line: var(--line, rgba(24,36,96,.10));
  display: flex; flex-direction: column; height: 100%; min-height: 0; background: #fbfcfe; }

.rm-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 22px 12px; }
.rm-name { font-size: 22px; font-weight: 700; letter-spacing: -.03em; color: var(--navy, #1E2E60); line-height: 1.1; }
.rm-sub { font-size: 12.5px; color: var(--rm-muted); margin-top: 3px; }
.rm-prog { display: flex; align-items: center; gap: 10px; }
.rm-ring { position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(#4FA97B calc(var(--p) * 1%), #e7eaf1 0); }
.rm-ring::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #fbfcfe; }
.rm-ring b { position: relative; z-index: 1; font-size: 14px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.rm-ring b i { font-style: normal; font-size: 10px; color: var(--rm-muted); }
.rm-proglbl { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--rm-muted); line-height: 1.5; }
.rm-proglbl em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--navy); }

/* One page, six blocks, one scroll. No tabs: the MA works top to bottom and never hunts for a step. */
.rm-block { max-width: 900px; padding: 11px 0 13px; border-top: 1px solid var(--rm-line); }
.rm-block:first-child { border-top: 0; padding-top: 4px; }
.rm-bh { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.rm-bh i { font-style: normal; flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  font-size: 9.5px; font-weight: 800; background: #eef1f6; color: #6b7288; align-self: center; }
.rm-bh h3 { font-size: 13.5px; font-weight: 700; letter-spacing: -.015em; color: var(--navy, #1E2E60); }
.rm-bh .rm-hint { margin-left: 2px; }
.rm-bh .rm-link { margin-left: auto; }
.rm-block.done .rm-bh i { background: #dff0e6; color: #2e7d52; }
.rm-block.done .rm-bh h3 { color: #4a5468; }

/* One column, compact. A little scrolling is fine; hunting through six tall blocks is not. */
.rm-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 22px 8px; }
.rm-sec { max-width: 900px; }
.rm-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 15px; font-weight: 700; color: var(--navy, #1E2E60); margin-bottom: 12px; }
.rm-hint { font-size: 11.5px; font-weight: 500; color: var(--rm-muted); }
.rm-link { font: inherit; font-size: 12px; font-weight: 700; color: var(--cyan-text, #2766a8); background: none; border: 0; cursor: pointer; padding: 0; margin-left: auto; }
.rm-link:hover { text-decoration: underline; }
.rm-link.rm-back { margin-left: 0; margin-right: 4px; }
.rm-empty { font-size: 13px; color: var(--rm-muted); padding: 14px 0; }
.rm-ok { font-size: 12px; font-weight: 650; color: #2e7d52; }

/* vitals */
.rm-vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); gap: 8px; }
.rm-v { position: relative; display: flex; flex-direction: column; gap: 3px; background: #fff; border: 1px solid var(--rm-line); border-radius: 12px; padding: 9px 11px; }
.rm-v > span { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--rm-muted); }
.rm-v input { font: inherit; font-size: 19px; font-weight: 700; letter-spacing: -.02em; color: var(--rm-ink); border: 0; background: transparent; outline: none; width: 100%; font-variant-numeric: tabular-nums; }
.rm-v input::placeholder { font-size: 15px; font-weight: 500; color: #c3cad8; }
.rm-v i { position: absolute; right: 11px; bottom: 9px; font-style: normal; font-size: 10.5px; color: #a8b1c4; }
.rm-v:focus-within { border-color: var(--navy, #1E2E60); box-shadow: 0 0 0 3px rgba(30,46,96,.08); }
.rm-v.hi { border-color: #e8b4a4; background: #fdf7f5; }
.rm-v.hi input { color: #b4482a; }
.rm-v.calc { background: #f4f6fa; }
.rm-vnote { margin-top: 8px; }

.rm-in { font: inherit; font-size: 13.5px; color: var(--rm-ink); background: #fff; border: 1px solid var(--rm-line); border-radius: 10px; padding: 9px 12px; width: 100%; outline: none; }
.rm-in:focus { border-color: var(--navy, #1E2E60); box-shadow: 0 0 0 3px rgba(30,46,96,.08); }
.rm-in.rm-thin { font-size: 12.5px; padding: 7px 10px; margin-top: 6px; }
.rm-cc { font-size: 15px; font-weight: 600; padding: 11px 13px; }
.rm-acts { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.rm-acts.thin { margin-top: 8px; }
.cal-btn.small { font-size: 12px; padding: 6px 11px; }

/* pills */
.rm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rm-pill { font: inherit; font-size: 12.5px; font-weight: 650; color: #4a5468; background: #fff; border: 1px solid var(--rm-line); border-radius: 999px; padding: 7px 13px; cursor: pointer; transition: all .12s; }
.rm-pill:hover { border-color: #b9c3d9; background: #f7f8fb; }
.rm-pill.on { color: #fff; background: var(--navy, #1E2E60); border-color: var(--navy, #1E2E60); }
.rm-pill.on.not, .rm-pill.on.declined { background: #b4482a; border-color: #b4482a; }
.rm-pill.on.changed, .rm-pill.on.ask { background: #b07d15; border-color: #b07d15; }
.rm-pill.on.refill { background: #2766a8; border-color: #2766a8; }
.rm-pill.on.taking, .rm-pill.on.today, .rm-pill.on.done { background: #2e7d52; border-color: #2e7d52; }
.rm-pill.task { font-weight: 600; }

/* asks */
.rm-asks { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.rm-ask { background: #fff; border: 1px solid var(--rm-line); border-radius: 14px; padding: 12px 14px; }
.rm-q { font-size: 13.5px; font-weight: 650; color: var(--rm-ink); }

/* lists */
.rm-list { display: flex; flex-direction: column; gap: 6px; }
.rm-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--rm-line); border-radius: 12px; padding: 10px 13px; }
.rm-rmain { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rm-rmain b { font-size: 13px; font-weight: 650; color: var(--rm-ink); }
.rm-rmain span { font-size: 11.5px; color: var(--rm-muted); overflow: hidden; text-overflow: ellipsis; }
.rm-when { font-size: 11.5px; color: var(--rm-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rm-tag { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: #eef1f6; color: #5b6478; white-space: nowrap; }
.rm-tag.lab { background: #e6f0f8; color: #2766a8; }
.rm-tag.imaging { background: #ede8f8; color: #5b46a8; }
.rm-tag.hosp { background: #fbe9e3; color: #b4482a; }
.rm-tag.proc { background: #e4f1e9; color: #2e7d52; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.rm-x { font: inherit; font-size: 13px; color: #a8b1c4; background: none; border: 0; cursor: pointer; padding: 2px 4px; }
.rm-x:hover { color: #b4482a; }
.rm-check { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 8px; font-size: 13px; font-weight: 650; color: var(--rm-ink); cursor: pointer; }
.rm-check input { width: 17px; height: 17px; accent-color: #2e7d52; }

/* meds + gaps */
.rm-meds, .rm-gaps { display: flex; flex-direction: column; gap: 8px; }
.rm-med, .rm-gap { background: #fff; border: 1px solid var(--rm-line); border-radius: 14px; padding: 12px 14px; transition: border-color .12s; }
.rm-med.set, .rm-gap.set { border-color: #c9d5e6; background: #fdfeff; }
.rm-mname { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.rm-mname b { font-size: 13.5px; font-weight: 700; color: var(--rm-ink); }
.rm-mname span { font-size: 11.5px; color: var(--rm-muted); }
.rm-gmain { display: flex; flex-direction: column; gap: 2px; }
.rm-gmain b { font-size: 13.5px; font-weight: 650; color: var(--rm-ink); }
.rm-gmain span { font-size: 11.5px; color: var(--rm-muted); }

/* done-today templates */
.rm-tg { margin-top: 14px; }
.rm-gl { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--rm-muted); }
.rm-tform { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.rm-f { display: flex; flex-direction: column; gap: 4px; }
.rm-f > span { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--rm-muted); }
.rm-prev { margin-top: 14px; padding: 13px 15px; background: #fff; border: 1px solid var(--rm-line); border-left: 3px solid var(--navy, #1E2E60); border-radius: 4px 12px 12px 4px;
  font-family: Georgia, 'Times New Roman', serif; font-size: 13.5px; line-height: 1.6; color: var(--rm-ink); }

/* footer */
.rm-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 22px; border-top: 1px solid var(--rm-line); background: #fff; }
.rm-footnote { font-size: 11.5px; color: var(--rm-muted); }
.rm-send { white-space: nowrap; }

/* the toggle that lives in the note header */
/* sits on the name line — small, so the patient stays the loudest thing on the page */
.nt-mode { display: inline-flex; vertical-align: middle; background: #f1f3f6; border-radius: 8px; padding: 2px; gap: 2px; margin-left: 12px; position: relative; top: -2px; }
.nt-mode button { font: inherit; font-size: 11.5px; font-weight: 700; letter-spacing: .01em; color: #5b6478; background: transparent; border: 0; border-radius: 6px; padding: 4px 10px; cursor: pointer; white-space: nowrap; }
.nt-mode button:hover { background: #fff; color: var(--navy, #1E2E60); }
.nt-mode button.on { background: var(--navy, #1E2E60); color: #fff; }
.nt-roomwrap { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.nt-roomwrap[hidden] { display: none !important; }   /* display:flex otherwise beats the hidden attribute and eats the note */
.nt-roombanner { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; padding: 9px 13px; border-radius: 10px; background: #eef4fb; border: 1px solid #d3e2f2; font-size: 12.5px; color: #24507f; }
.nt-roombanner b { font-weight: 700; }
@media (max-width: 760px) { .rm-top, .rm-rail, .rm-body, .rm-foot { padding-left: 14px; padding-right: 14px; } .rm-foot { flex-direction: column; align-items: stretch; } }

/* the story box: the MA writes it the way they would say it, and it becomes the history verbatim */
.rm-story { display: block; margin-top: 10px; resize: vertical; line-height: 1.6; font-size: 13.5px; min-height: 110px; }
.rm-under { display: block; margin-top: 6px; }

/* a care gap is a row with a verb, like the morning huddle — one click settles it */
.rm-gap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--rm-line); border-radius: 14px; padding: 11px 14px; transition: border-color .12s; }
.rm-gap.set { background: #fafcfb; border-color: #cfe3d7; }
.rm-gap.set.declined, .rm-gap.set.ask { background: #fdfaf6; border-color: #ecdcc4; }
.rm-tag.gap { background: #fdf3e3; color: #a06a10; }
.rm-go { white-space: nowrap; }
.rm-not { font: inherit; font-size: 12px; font-weight: 650; color: #8b93a6; background: none; border: 0; cursor: pointer; padding: 4px 2px; white-space: nowrap; }
.rm-not:hover { color: var(--navy, #1E2E60); text-decoration: underline; }
.rm-settled { font-size: 12.5px; font-weight: 700; color: #2e7d52; white-space: nowrap; }
.rm-gap.set.declined .rm-settled, .rm-gap.set.ask .rm-settled { color: #a06a10; }
.rm-gmore, .rm-gwhy { grid-column: 1 / -1; }
.rm-gmore { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
@media (max-width: 640px) { .rm-gap { grid-template-columns: auto minmax(0, 1fr); } .rm-go, .rm-not { grid-column: 2; justify-self: start; } }

/* the note's own sections, lent to this screen — they keep their look, they just sit here */
.rm-slot { margin-top: -4px; }
.rm-slot .np-sec.rm-lent { margin: 0; padding: 0; border: 0; }
.rm-slot .np-sec.rm-lent > .np-h { display: none; }   /* the block header already names it */
.rm-name .nt-mode { margin-left: 12px; vertical-align: middle; position: relative; top: -2px; }
.rm-tplhead { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; font-size: 13.5px; color: var(--rm-ink); }
.rm-tplhead b { font-weight: 700; }
.rm-f.wide { grid-column: 1 / -1; }
.rm-tag.gap { background: #fdf3e3; color: #a06a10; }
.rm-tag.met { background: #e4f1e9; color: #2e7d52; }
.rm-gap.met { background: #f9fcfa; border-color: #dbe9e1; }
.rm-gap.met .rm-settled { font-weight: 600; }

/* compact: the whole visit on one screen */
.rm-top { padding: 10px 22px 6px; }
.rm-name { font-size: 18px; }
.rm-sub { font-size: 11.5px; }
.rm-ring { width: 38px; height: 38px; }
.rm-ring::after { inset: 4px; }
.rm-ring b { font-size: 12px; }
.rm-hint { font-size: 10.5px; }
.rm-gap { padding: 6px 10px; border-radius: 9px; gap: 8px; }
.rm-gaps { gap: 4px; }
.rm-gmain b { font-size: 12px; }
.rm-gmain span { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-tag { font-size: 8.5px; padding: 2px 5px; }
.rm-go { font-size: 11px; padding: 4px 9px; }
.rm-not { font-size: 10.5px; }
.rm-settled { font-size: 11px; }
.rm-cc { font-size: 13px; padding: 8px 11px; }
.rm-story { min-height: 66px; font-size: 12.5px; }
.rm-chips { gap: 4px; margin-top: 5px; }
.rm-pill { font-size: 11px; padding: 5px 10px; }
.rm-wide { width: 100%; justify-content: center; }
.rm-row { padding: 6px 10px; }
.rm-foot { padding: 8px 22px; }
.rm-footnote { font-size: 11px; }
/* the lent sections give back their own padding so they sit tight in a column */
.rm-slot .np-sec.rm-lent .np-line, .rm-slot .np-sec.rm-lent .np-embed { margin: 0; }

/* rooming takes the window: the note card is sized for paper, this page is not */
.nt-card.nt-roommode { width: 96vw !important; max-width: 1400px !important; height: 93vh !important; max-height: 93vh !important; }
.nt-card.nt-roommode .nt-body { height: 100%; }
.rm-met { font: inherit; font-size: 11px; font-weight: 700; color: #2e7d52; background: #f2f9f5; border: 1px solid #cfe3d7; border-radius: 999px; padding: 4px 11px; margin-top: 6px; cursor: pointer; }
.rm-met:hover { background: #e8f4ed; }

/* rooming does not need the note-type chips or the letterhead — the visit type is already set */
.nt-card.nt-roommode .nt-types, .nt-card.nt-roommode .nt-tochart { display: none; }
.nt-card.nt-roommode .modal-head { padding-top: 8px; padding-bottom: 8px; }
.rm-met.plain { color: #2766a8; background: #f2f6fb; border-color: #d3e2f2; }
.rm-met.plain:hover { background: #e8f0f9; }

/* the medication section lends its rows, not its filing cabinet: the browse toggles and the two
   history expanders are chart furniture the MA does not need mid-rooming */
.rm-slot .med-viewseg, .rm-slot .med-scripts6, .rm-slot .med-past-link,
.rm-slot .med-recon, .rm-slot .med-hist { display: none !important; }
.rm-slot .med-seg-h { padding-top: 2px; padding-bottom: 2px; }
.rm-slot .med-item { padding-top: 4px; padding-bottom: 4px; }

/* the visit's own questions — the ones the physician should never be typing */
.rm-vw { margin-top: 10px; }
.rm-vw .rm-gl { margin-bottom: 5px; }
.rm-tag.ask { background: #eef4fb; color: #2766a8; }

/* the nurse note, rendered in place instead of over the chart */
.rm-mahost { margin-top: 2px; }
.ma-inline { position: static; display: block; background: none; padding: 0; }
.ma-inline .modal-card { width: 100% !important; max-width: none !important; height: auto !important; max-height: none !important;
  box-shadow: none; border: 1px solid var(--rm-line); border-radius: 12px; }
.ma-inline .modal-head { padding: 8px 14px; }
.ma-inline .modal-head h2 { font-size: 13.5px; }
.ma-inline .modal-head .cpoe-pt, .ma-inline .modal-x { display: none; }
.ma-inline .qn-body { padding: 10px 14px; max-height: none; }
.rm-slot .np-sec.rm-lent .np-ccquick { margin-top: 5px; }
.rm-slot .np-sec.rm-lent .np-cc { font-size: 13px; }

/* the vitals form itself, in place: blank boxes to type into, not chips to click open */
.rm-vhost { margin-top: 2px; }
.vm-inline { position: static; display: block; background: none; padding: 0; }
.vm-inline .modal-card { width: 100% !important; max-width: none !important; height: auto !important; max-height: none !important;
  box-shadow: none; border: 1px solid var(--rm-line); border-radius: 12px; }
.vm-inline .modal-head { display: none; }
.vm-inline .hist-form { padding: 10px 14px; }
.vm-inline .modal-foot { padding: 8px 14px; }


/* ── A care gap is one line: what it is, and the buttons that settle it ──────────────────────── */
.rm-gap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 8px;
  background: #fff; border: 1px solid var(--rm-line); }
.rm-gaps { display: flex; flex-direction: column; gap: 3px; }
.rm-gap .rm-tag { flex: none; align-self: center; font-size: 8.5px; padding: 2px 5px; }
.rm-gmain { flex: 1 1 auto; min-width: 0; display: block; }
.rm-gmain b { display: block; font-size: 12px; font-weight: 600; color: var(--rm-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-gmain span { display: none; }
.rm-gacts { flex: none; display: flex; align-items: center; gap: 4px; margin-left: auto; }
.rm-go { flex: none; font: inherit; font-size: 11px; font-weight: 650; color: var(--navy, #1E2E60); background: #fff;
  border: 1px solid rgba(24,36,96,.16); border-radius: 7px; padding: 4px 10px; cursor: pointer; white-space: nowrap; transition: all .12s; }
.rm-go:hover { background: var(--navy, #1E2E60); color: #fff; border-color: var(--navy, #1E2E60); }
.rm-go.rec { border-color: rgba(30,46,96,.45); box-shadow: inset 0 0 0 1px rgba(30,46,96,.10); }
.rm-not { flex: none; font: inherit; font-size: 10.5px; color: #a2aab9; background: none; border: 0; padding: 2px 4px; cursor: pointer; white-space: nowrap; }
.rm-not:hover { color: var(--navy, #1E2E60); }
.rm-settled { flex: none; font-size: 11px; font-weight: 650; color: #2e7d52; white-space: nowrap; }
.rm-gmore, .rm-gwhy { flex: 0 0 100%; }
.rm-gmore { display: flex; flex-wrap: wrap; gap: 5px; padding-top: 3px; }
.rm-block { padding: 9px 0 10px; }
.rm-bh { margin-bottom: 5px; }

/* Full visit / Quick visit — the MA says whether a physician is seeing this patient too */
.rm-modes { display: inline-flex; background: #f1f3f6; border-radius: 8px; padding: 2px; gap: 2px; margin: 6px 0 2px; }
.rm-modes button { font: inherit; font-size: 11px; font-weight: 700; color: #5b6478; background: transparent; border: 0; border-radius: 6px; padding: 4px 11px; cursor: pointer; white-space: nowrap; }
.rm-modes button:hover { background: #fff; color: var(--navy, #1E2E60); }
.rm-modes button.on { background: var(--navy, #1E2E60); color: #fff; }
